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
BizForm::SetClientScripts auto add javascripts code to the page
protected function SetClientScripts() { global $g_BizSystem; if ($this->m_jsClass != "jbForm") $g_BizSystem->GetClientProxy()->AppendScripts($this->m_jsClass, $this->m_jsClass.".js"); // scan all elements foreach ($this->m_RecordRow as $ctrl) { $cType = strtoupper($ctrl->m_Type); if ($cType == "RICHTEXT") $g_BizSystem->GetClientProxy()->IncludeRTEScripts(); else if ($cType == "DATETIME" || $cType == "DATE") $g_BizSystem->GetClientProxy()->IncludeCalendarScripts(); else if ($cType == "AUTOSUGGEST") $g_BizSystem->GetClientProxy()->AppendScripts("scriptaculous", "scriptaculous.js"); } $g_BizSystem->GetClientProxy()->AppendScripts("tablekit", "tablekit.js"); //$g_BizSystem->GetClientProxy()->AppendScripts("fastinit", "fastinit.js"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n codeActivity.lang = {\n empty_name: '\" . addslashes(get_string('js_empty_name', 'codeactivity')) . \"',\n empty_test_code: '\" . addslashes(get_string('js_empty_test_code', 'codeactivity')).\"',\n error_add: '\" . addslashes(get_string('js_error_add', 'codeactivity')).\"',\n error_delete: '\" . addslashes(get_string('js_error_delete', 'codeactivity')).\"',\n error_forbidden: '\" . addslashes(get_string('js_error_forbidden', 'codeactivity')).\"'\n }\n });\n </script>\";\n \n $this->_form->addElement('html', $script);\n }", "public function registerClientScripts()\n {\n // add the script\n $cs = Yii::app()->getClientScript();\n $cs->registerCoreScript('jquery');\n $js = $this->createJsCode();\n $cs->registerScript('mbmenu_' . $this->getId(), $js, CClientScript::POS_READY);\n }", "public function registerFormScripts() {\n $view = $this->getView();\n $view->registerJsFile($this->stripeJs, ['position' => \\yii\\web\\View::POS_HEAD]);\n $js = \"Stripe.setPublishableKey('\" . Yii::$app->stripe->getPublishableKey() . \"');\";\n $view->registerJs($js, \\yii\\web\\View::POS_BEGIN);\n //form scripts\n $view->registerJs($this->stripeResponseHandler, \\yii\\web\\View::POS_READY);\n $view->registerJs($this->stripeRequestHandler, \\yii\\web\\View::POS_READY);\n }", "private function registerClientScripts()\n {\n $view = $this->getView();\n\n DatepickerAsset::$language = $this->_language;\n DatepickerAsset::$juiNoConflict = $this->juiNoConflict;\n DatepickerAsset::register($view);\n\n $clientOptions = array_replace([\n 'format' => 'yyyy-mm-dd',\n ], $this->clientOptions);\n $options = Json::htmlEncode($clientOptions);\n\n $view->registerJs(\"jQuery('#{$this->options['id']}').datepicker(jQuery.extend({autoclose: true, zIndexOffset: 100}, $options));\");\n }", "private function _addJavascript ()\n {\n $options = array ();\n\n if ($this->isTypeahead) {\n $options['documentReady'][] = 'init';\n if ($this->desc)\n $options['documentReady'][] = 'tooltip';\n }\n \n if ($this->selectable) {\n $options['documentReady'][] = 'selectable';\n if ($this->sortable) {\n $options['documentReady'][] = 'sortable';\n }\n }\n\n if ($this->clickable) {\n \t$options['documentReady'][] = 'click';\n }\n\n if (!empty ($options)) {\n $this->buildJS('thesaurus/', $options);\n }\n\n if ($this->selectable) {\n $this->_element->addDocumentReady($this->endJavascript);\n if (isset($this->required_items) && is_array ($this->required_items)) {\n foreach ($this->required_items as $item) {\n $this->_element->addDocumentReady(\"setRequiredItems_\" . $this->idfilter . \" ('$item');\");\n }\n }\n }\n }", "protected function registerClientScript()\n\t{\n\t\t$cs=Yii::app()->clientScript;\n\t\t$cs->registerScriptFile(Yii::app()->request->baseUrl.'/js/ImageSelector.js', CClientScript::POS_HEAD);\n\t}", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function registerClientScripts()\n {\n $view = $this->getView();\n\n TranslitAsset::register($view);\n\n $replace = Json::htmlEncode(TranslitHelper::$replace);\n $view->registerJs(\"translit.replace = $replace;\", $view::POS_READY, 'translit');\n }", "private function add_rich_form_scripts() {\r\n\r\n\t$this->template->libs_js = array(\r\n\t \"http://code.jquery.com/jquery-1.8.2.js\",\r\n\t \"http://code.jquery.com/ui/1.9.1/jquery-ui.js\",\r\n\t \"jquery-ui-timepicker-addon.js\",\r\n\t \"http://cdn.aloha-editor.org/latest/lib/require.js\"\r\n\t);\r\n\t$this->template->libs_css = array(\r\n\t \"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\",\r\n\t \"datetimepicker.css\",\r\n\t \"http://cdn.aloha-editor.org/latest/css/aloha.css\"\r\n\t);\r\n }", "protected function addOnSubmitJavaScriptCode() {}", "public function registerClientScript()\n {\n $view = $this->getView();\n KCFinderWidgetAsset::register($view);\n $this->clientOptions['kcfUrl'] = Yii::$app->assetManager->getPublishedUrl((new KCFinderAsset)->sourcePath);\n\n if ($this->iframe) {\n $this->clientOptions['iframeModalId'] = $this->getIFrameModalId();\n }\n\n $clientOptions = Json::encode($this->clientOptions);\n $view->registerJs(\"jQuery('#{$this->buttonOptions['id']}').KCFinderInputWidget($clientOptions)\");\n }", "public function registerClientScripts()\r\n {\r\n if ($this->baseUrl === '')\r\n throw new CException('Can not find the base folder');\r\n\r\n $this->clientScript = Yii::app()->getClientScript();\r\n \r\n $this->clientScript->registerCoreScript('jquery');\r\n\r\n foreach ($this->Jscripts as $script)\r\n {\r\n \t$this->clientScript->registerScriptFile($this->baseUrl.'/js/'.$script,CClientScript::POS_BEGIN); \t\r\n } \r\n \r\n $this->clientScript->registerCssFile($this->baseUrl.'/css/'.$this->Cssscript);\r\n }", "public function registerClientScripts()\r\n {\r\n if ($this->baseUrl === '')\r\n throw new CException('Can not find the base folder');\r\n\r\n $this->clientScript = Yii::app()->getClientScript();\r\n\r\n// $this->clientScript->registerCoreScript('jquery');\r\n \r\n foreach ($this->Jscripts as $script)\r\n {\r\n $this->clientScript->registerScriptFile($this->baseUrl.'/js/'.$script,CClientScript::POS_HEAD); \t\r\n }\r\n\r\n\r\n \r\n $this->clientScript->registerCssFile($this->baseUrl.'/css/'.$this->Cssscript);\r\n }", "public function registerClientScript() {\n\n// $_cssFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jquery.innerfade/css/jq_fade.css';\n// $cssFile = Yii::app()->getAssetManager()->publish($_cssFile);\n// Yii::app()->getClientScript()->registerCssFile($cssFile);\n\n $_jsFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jquery.innerfade/js/jquery.innerfade.js';\n $jsFile = Yii::app()->getAssetManager()->publish($_jsFile);\n\n Yii::app()->getClientScript()->registerScriptFile($jsFile);\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function generateClientScript()\r\n\t{\r\n\t\tif ($this->bInlineScript)\r\n\t\t{\r\n\t\t\techo \"\\n<script type='text/javascript' \" . $this->sDefer . \"charset='UTF-8'>\\n\";\r\n\t\t\techo \"/* <![CDATA[ */\\n\";\r\n\r\n\t\t\tinclude(dirname(__FILE__) . '/modalWindow.js');\r\n\t\t\t\t\r\n\t\t\techo \"/* ]]> */\\n\";\r\n\t\t\techo \"</script>\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"\\n<script type='text/javascript' src='\" . $this->sJavascriptURI . \"xajax_plugins/response/modalWindow/modalWindow.js' \" . $this->sDefer . \"charset='UTF-8'></script>\\n\";\r\n\t\t}\r\n\t}", "public function registerClientScripts()\r\n {\r\n if ($this->baseUrl === '')\r\n throw new CException('Can not find the base folder');\r\n\r\n $this->clientScript = Yii::app()->getClientScript();\r\n \r\n if($this->needCore)\r\n $this->clientScript->registerCoreScript('jquery');\r\n \r\n foreach ($this->Jscripts as $jsfile)\r\n {\r\n $this->clientScript->registerScriptFile($this->baseUrl.'/'.$jsfile,CClientScript::POS_HEAD); \t\r\n }\r\n foreach ($this->Cssscript as $cssfile)\r\n \t$this->clientScript->registerCssFile($this->baseUrl.'/'.$cssfile);\r\n }", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function setJavascript() {\n $this->javascript = true;\n }", "protected function generateJavascript()\n\t{\n\t}", "protected function registerClientScript()\n {\n $js = [];\n $view = $this->getView();\n\n TinyMceAsset::register($view);\n\n $id = $this->options['id'];\n\n Yii::debug($this->language, 'DBG');\n if ($this->language == null) {\n $this->language = yii::$app->language;\n }\n if ($this->language == \"en\") $this->language = \"en_GB\";\n $this->clientOptions['language'] = $this->language;\n Yii::debug($this->language, 'DBG');\n\n $this->clientOptions['document_base_url'] = yii::$app->urlManager->hostInfo . '/';\n\n $this->clientOptions['content_css'] =\n yii::$app->assetManager->getPublishedUrl(yii::$app->assetManager->getBundle('yii\\bootstrap\\BootstrapAsset')->sourcePath) . \"/css/bootstrap.css,\" .\n $this->extraCss;\n $this->clientOptions['selector'] = \"#$id\";\n\n $langFile = \"langs/{$this->language}.js\";\n $langAssetBundle = TinyMceLangAsset::register($view);\n $langAssetBundle->js[] = $langFile;\n $this->clientOptions['language_url'] = $langAssetBundle->baseUrl . \"/{$langFile}\";\n $options = Json::encode($this->clientOptions);\n\n $js[] = \"tinymce.init($options);\";\n $js[] = \"$('#{$id}').parents('form').on('beforeValidate beforeSubmit submit', function() {\n tinymce.triggerSave();\n $('[name={$id}]').attr('name',$('#{$id}').attr('name'));\n return true;\n });\";\n $view->registerJs(implode(\"\\n\", $js));\n }", "protected function addCustomJS()\n\t{\n\t\t\n\t}", "private function registerScript(){\n Yii::app()->clientScript->registerScript(UniqId::get(\"scr-\", true), \"\n $(window).bind('beforeunload', function(e){\n var scrollTop = $('#$this->id').scrollTop();\n $.cookie( '$this->id', scrollTop, {expires: 7, path: '/'} );\n });\n\n $(window).bind('load', function(){\n var top = $.cookie('$this->id');\n if ( top != undefined ){\n $('#$this->id').scrollTop(top);\n }\n });\n \");\n }", "public function setJavascriptData() {\n // Make Services List\n $services = array(\n 'billingDashboard' => $this->createAbsoluteUrl('billingDashboard/index'),\n // Invoice export / preview urls\n 'exportInvoice' => $this->createAbsoluteUrl('createInvoice', array('report' => 1)),\n );\n // Encode to javascript\n $servicesEncoded = CJavaScript::encode($services);\n \n // Set javascript variable\n Yii::app()->clientScript->registerScript('set_services', \"\n var services = {$servicesEncoded};\n \", CClientScript::POS_BEGIN);\n }", "public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "private function registerClientScript()\n {\n ArrayInputAsset::register($this->view);\n }", "public function registerClientScript()\n {\n $view = $this->getView();\n\n CroppieAsset::register($view);\n\n if (isset($this->clientOptions['enableExif']) && $this->clientOptions['enableExif'] === true) {\n ExifJsAsset::register($view);\n }\n\n $options = !empty($this->clientOptions)\n ? Json::encode($this->clientOptions)\n : '';\n\n $id = $this->getId();\n\n $js[] = \";jQuery('#$id').croppie($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n\n $view->registerJs(implode(\"\\n\", $js));\n }", "protected function registerClientScript()\n\t{\n\t\t// Prepare script package.\n\t\t$this->package = array_merge(array(\n\t\t\t\t'baseUrl' => $this->getAssetsUrl(),\n\t\t\t\t'js' => array(\n\t\t\t\t\tYII_DEBUG ? 'jquery.textmistake.js' : 'jquery.textmistake.min.js',\n\t\t\t\t),\n\t\t\t\t'depends' => array(\n\t\t\t\t\t'jquery',\n\t\t\t\t),\n\t\t\t), $this->package);\n\n\t\t$clientScript = Yii::app()->getClientScript();\n\t\t$options = CJavaScript::encode($this->options);\n\n\t\t$clientScript\n\t\t\t->addPackage(self::PACKAGE_ID, $this->package)\n\t\t\t->registerPackage(self::PACKAGE_ID)\n\t\t\t->registerScript(\n\t\t\t\t$this->id,\n 'jQuery(document).textmistake('.$options.');',\n\t\t\t\tCClientScript::POS_READY\n\t\t\t);\n\t}", "public function init()\n {\n Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . \"/js/search-triple.js\", CClientScript::POS_END);\n\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n\n DatePickerAsset::register($view);\n JuiAsset::register($view);\n\n $id = $this->options['id'];\n $options = Json::encode($this->clientOptions);\n $view->registerJs(\"jQuery('#$id').progressiveDatePicker('{$this->options['formattedValue']}', $options);\");\n }", "public function includeBaseClientScripts()\n {\n if (defined('OPENBIZ_JSLIB_BASE') && OPENBIZ_JSLIB_BASE == 'JQUERY') {\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery\", \"jquery.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_class\", \"jquery.class.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_dollarj\", \"<script>try{var \\$j=\\$;}catch(e){}</script>\", false);\n Openbizx::$app->getClientProxy()->appendStyles(\"default\", \"openbiz.css\");\n if (DeviceUtil::$PHONE_TOUCH) {\n Openbizx::$app->getClientProxy()->appendScripts(\"openbiz\", \"openbiz.mobile.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_mobile\", \"jqm/jquery.mobile-1.0.js\");\n $style = \"<link rel=\\\"stylesheet\\\" href=\\\"\" . Openbizx::$app->getJsUrl() . \"/jqm/jquery.mobile-1.0.css\\\" type=\\\"text/css\\\">\";\n Openbizx::$app->getClientProxy()->appendStyles(\"jquery_mobile_css\", $style, false);\n } else {\n Openbizx::$app->getClientProxy()->appendScripts(\"openbiz\", \"openbiz.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_ui\", \"jquery-ui-1.8.16.custom.min.js\");\n $style = \"<link rel=\\\"stylesheet\\\" href=\\\"\" . Openbizx::$app->getJsUrl() . \"/jquery-ui/ui-lightness/jquery-ui-1.8.16.custom.css\\\" type=\\\"text/css\\\">\";\n $style .= \"<link rel=\\\"stylesheet\\\" href=\\\"\" . Openbizx::$app->getJsUrl() . \"/jquery-ui/ui-openbiz/jquery.css\\\" type=\\\"text/css\\\">\";\n Openbizx::$app->getClientProxy()->appendStyles(\"jquery_ui_css\", $style, false);\n }\n return;\n }\n // prototype is still the default js lib\n Openbizx::$app->getClientProxy()->appendScripts(\"prototype\", \"prototype.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"scriptaculous\", \"scriptaculous.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"effects\", \"effects.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"controls\", \"controls.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"cookies\", \"cookies.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"openbiz\", \"openbiz.js\");\n Openbizx::$app->getClientProxy()->appendStyles(\"default\", \"openbiz.css\");\n // window lib\n Openbizx::$app->getClientProxy()->includePropWindowScripts();\n // validator lib\n //Openbizx::$app->getClientProxy()->includeValidatorScripts();\n }", "public function registerClientScript() {\n\t\t$cs = Yii::app()->getClientScript();\n\t\t$cs->registerCoreScript('jquery');\n\t\t$asset_url = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tiny_mce', false, -1, true);\n\t\t$cs->registerScriptFile(\"$asset_url/jquery.tinymce.js\", CClientScript::POS_END);\n\t\t$id = $this->htmlOptions['id'];\n\t\t$this->options = CMap::mergeArray($this->defaultOptions, $this->options);\n\t\t$this->options['script_url'] = \"$asset_url/tiny_mce.js\";\n\t\t$options = $this->options !== array() ? CJavaScript::encode($this->options) : '';\n\t\t$js =\"jQuery(\\\"#{$id}\\\").tinymce({$options});\";\n\t\t$cs->registerScript('KahWee.KRichTextEditor#' . $id, $js);\n\t}", "public function enqueue_control_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "public function registerClientScript()\n {\n $view = $this->getView();\n\n if ($this->plus) {\n FileUploadPlusAsset::register($view);\n } else {\n FileUploadAsset::register($view);\n }\n\n $options = Json::encode($this->clientOptions);\n $id = $this->options['id'];\n\n $js[] = \";jQuery('#$id').fileupload($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n $view->registerJs(implode(\"\\n\", $js));\n }", "public function registerScriptsFrontend() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n \n wp_register_script('wpjb-js', $p.'frontend.js', array(\"jquery\"), $v );\n \n wp_register_script('wpjb-payment', $p.'frontend-payment.js', array(\"jquery\"), $v );\n wp_register_script('wpjb-serialize', $p.'serialize.js', array(), $v, true);\n wp_register_script('wpjb-alert', $p.'frontend-alert.js', array(\"jquery\", \"wp-util\", 'wpjb-serialize'), $v, true);\n wp_register_script('wpjb-manage', $p.'frontend-manage.js', array(\"jquery\"), $v, true);\n wp_register_script('wpjb-manage-apps', $p.'frontend-manage-apps.js', array(\"jquery\"), $v, true);\n \n wp_register_script(\"wpjb-paypal-reply\", $p.\"wpjb-paypal-reply.js\", array(\"jquery\"), $v);\n\n }", "public function getJavaScripts() {\n return array_merge(parent::getJavaScripts(), array(\n '/sfEPFactoryFormPlugin/js/jquery.min.js',\n '/sfAdminTemplatePlugin/js/jquery.fancybox-1.3.4.pack.js',\n 'ficheForm.js'\n ));\n }", "protected function loadJavascript() {}", "public function registerScripts() {\r\n\t\t$baseUrl = Yii::app()->assetManager->publish(dirname(__FILE__).\"/assets/\".__CLASS__);\r\n\t\tYii::app()->clientScript->registerScriptFile($baseUrl.\"/AFileBrowser.js\");\r\n\t\t\r\n\t}", "public function registerClientScript()\n {\n $view = $this->getView();\n\n CroppieAsset::register($view);\n\n if (isset($this->clientOptions['enableExif']) && $this->clientOptions['enableExif'] === true) {\n ExifJsAsset::register($view);\n }\n\n $options = !empty($this->clientOptions)\n ? Json::encode($this->clientOptions)\n : '';\n\n $id = $this->getId();\n\n $js[] = \";jQuery('#$id').croppie($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n\n $view->registerJs(implode(\"\\n\", $js), View::POS_READY, 'test-croppie-js');\n }", "protected function registerClientScript()\n {\n $js = [];\n $view = $this->getView();\n\n MarkitupAsset::register($this->getView());\n\n $this->options = array_merge($this->_defaultOptions, $this->options);\n\n $id = $this->options['id'];\n\n $js[] = \"jQuery('#{$id}').markItUp(mySettings());\";\n\n $view->registerJs(implode(\"\\n\", $js));\n }", "protected function registerClientScript() {\n $cs = Yii::app()->getClientScript();\n\n // Build jQuery Raty options\n // $options = CMap::mergeArray($this->_defaultOptions, $this->options);\n if (!isset($this->options['target'])) {\n $this->options['target'] = '#' . $this->targetHtmlOptions['id'];\n }\n\n if (!empty($this->data)) {\n $this->options['hints'] = $this->data;\n $this->options['number'] = count($this->data);\n $this->options['targetType'] = 'hint';\n }\n\n // Global default options\n if (!$cs->isScriptRegistered(__CLASS__ . '#defaults', CClientScript::POS_HEAD)) {\n $js_default = '';\n $defaultOptions = $this->_defaultOptions;\n unset($defaultOptions['target']);\n unset($defaultOptions['score']);\n foreach ($defaultOptions as $id_option => $val_option) {\n $js_default .= \"$.fn.raty.defaults.\" . $id_option . \"=\" . CJavaScript::encode($val_option) . \"; \\n\";\n }\n $cs->registerScript(__CLASS__ . '#defaults', $js_default, CClientScript::POS_HEAD);\n }\n\n // Javascript needed for this raty widget\n $cs->registerCoreScript('jquery');\n $cs->registerScriptFile(\"{$this->assetsUrl}/js/jquery.raty\" . (YII_DEBUG ? '' : '.min') . \".js\");\n $cs->registerScript(__CLASS__ . '#' . $this->id, \"jQuery('#{$this->htmlOptions['id']}').raty(\" . CJavaScript::encode($this->options) . \"); jQuery('{$this->options['target']}').hide();\", CClientScript::POS_READY);\n }", "public function getEnableClientScript()\n\t{\n\t\treturn true;\n\t}", "public function registerClientScript()\n {\n $view = $this->getView();\n \n $jsObject = $this->optionsJs ?\n $this->optionsJs :\n ( empty( $this->options ) ? '{}' : json_encode( $this->options ));\n \n $view->registerJs( \"window.addEventListener(\\\"load\\\",function(){window.cookieconsent.initialise({$jsObject})});\", $view::POS_HEAD, 'cookieconsent-starter' );\n \n CookieConsentAsset::register( $view );\n }", "public function registerClientScript()\n {\n $id = $this->list->options['id'];\n $view = $this->list->getView();\n $js = <<<js\n var {$this->name}_checkBox_all=$(\"#$id .select-on-check-all\");var {$this->name}_checkBox=$(\"#$id .select-on-check\");{$this->name}_checkBox_all.change(function(){{$this->name}_checkBox.prop('checked',$(this).prop('checked'))});{$this->name}_checkBox.change(function(){var checkAll=$(\"#$id .select-on-check\").length===$(\"#$id .select-on-check:checked\").length;{$this->name}_checkBox_all.prop('checked',checkAll)});\njs;\n $view->registerJs($js);\n }", "public static function render_control_template_scripts()\n {\n }", "public static function render_control_template_scripts()\n {\n }", "public function registerClientScript()\n {\n Yii::app()->clientScript->registerPackage('bootstrap-box');\n Yii::app()->bootstrap->registerAssetCss('bootstrap-box.css');\n }", "protected function addJavascriptToBackend() {\n\t\t$this->backendReference->addJavascriptFile(t3lib_extMgm::extRelPath($this->extkey) . 'mod_role/newspaper_role.js');\n\t}", "protected function addJavaScript() {\n\t\t$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['contagged']);\n\t\t$javaScriptPathAndFilename = $extensionConfiguration['javaScriptPathAndFilename'];\n\t\tif (is_string($javaScriptPathAndFilename) && $javaScriptPathAndFilename !== '') {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData['contagged'] .= '<script src=\"' . $javaScriptPathAndFilename . '\" type=\"text/javascript\"></script>';\n\t\t}\n\t}", "public function get_required_javascript() {\n parent::get_required_javascript();\n\n $this->page->requires->jquery();\n }", "function _ext_scripts()\r\n\t{\r\n\t\t$str = '';\r\n\r\n\t\t/* -------------------------------------------\r\n\t\t/* 'cp_js_end' hook.\r\n\t\t/* - Add Javascript into a file call at the end of the control panel\r\n\t\t/* - Added 2.1.2\r\n\t\t*/\r\n\t\t\t$str = $this->extensions->call('cp_js_end');\r\n\t\t/*\r\n\t\t/* -------------------------------------------*/\r\n\t\t\r\n\t\t$this->output->out_type = 'cp_asset';\r\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\r\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\"); \r\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\r\n\t\t$this->output->set_output($str);\r\n\t}", "public function addJs(){\r\n\t\treturn '<script type=\"text/javascript\" src=\"'.Mage::getBaseUrl('js').'interaktingslider/interaktingslider.js\"></script>';\r\n\r\n\t}", "function _ext_scripts()\n\t{\n\t\t$str = '';\n\n\t\t/* -------------------------------------------\n\t\t/* 'cp_js_end' hook.\n\t\t/* - Add Javascript into a file call at the end of the control panel\n\t\t/* - Added 2.1.2\n\t\t*/\n\t\t\t$str = $this->extensions->call('cp_js_end');\n\t\t/*\n\t\t/* -------------------------------------------*/\n\n\t\t$this->output->out_type = 'cp_asset';\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\");\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\n\t\t$this->output->set_output($str);\n\t}", "public function add_scripts() {\n\t\t\t$fusion_settings = fusion_get_fusion_settings();\n\n\t\t\t$is_sticky_header_transparent = 0;\n\t\t\tif ( 1 > Fusion_Color::new_color( $fusion_settings->get( 'header_sticky_bg_color' ) )->alpha ) {\n\t\t\t\t$is_sticky_header_transparent = 1;\n\t\t\t}\n\n\t\t\tFusion_Dynamic_JS::enqueue_script(\n\t\t\t\t'fusion-container',\n\t\t\t\tFusionBuilder::$js_folder_url . '/general/fusion-container.js',\n\t\t\t\tFusionBuilder::$js_folder_path . '/general/fusion-container.js',\n\t\t\t\t[ 'jquery', 'modernizr', 'fusion-animations', 'jquery-fade', 'fusion-parallax', 'fusion-video-general', 'fusion-video-bg' ],\n\t\t\t\t'1',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\tFusion_Dynamic_JS::localize_script(\n\t\t\t\t'fusion-container',\n\t\t\t\t'fusionContainerVars',\n\t\t\t\t[\n\t\t\t\t\t'content_break_point' => intval( $fusion_settings->get( 'content_break_point' ) ),\n\t\t\t\t\t'container_hundred_percent_height_mobile' => intval( $fusion_settings->get( 'container_hundred_percent_height_mobile' ) ),\n\t\t\t\t\t'is_sticky_header_transparent' => $is_sticky_header_transparent,\n\t\t\t\t\t'hundred_percent_scroll_sensitivity' => intval( $fusion_settings->get( 'container_hundred_percent_scroll_sensitivity' ) ),\n\t\t\t\t]\n\t\t\t);\n\t\t}", "public function get_form_editor_inline_script_on_page_render() {\n\n\t\t// set the default field label for the simple type field\n\t\t$script = sprintf( \"function SetDefaultValues_simple(field) {field.label = '%s';}\", $this->get_form_editor_field_title() ) . PHP_EOL;\n\n\t\t// initialize the fields custom settings\n\t\t$script .= \"jQuery(document).bind('gform_load_field_settings', function (event, field, form) {\" .\n\t\t \"var inputClass = field.inputClass == undefined ? '' : field.inputClass;\" .\n\t\t \"jQuery('#input_class_setting').val(inputClass);\" .\n\t\t \"});\" . PHP_EOL;\n\n\t\t// saving the simple setting\n\t\t$script .= \"function SetInputClassSetting(value) {SetFieldProperty('inputClass', value);}\" . PHP_EOL;\n\n\t\treturn $script;\n\t}", "function inject_js(){\n global $bp;\n if(bp_is_group()&&bp_is_group_admin_page()&& $bp->action_variables[0]=='appearances')\n wp_enqueue_script ('bpgclite-js',plugin_dir_url(__FILE__).'js/group-customizer-lite.js',array('jquery'));\n }", "protected function regScripts() {\n // Check the settings, turn jQquery\n $jscripts = array(\n $this->config['jsUrl'] . 'web/lib/jquery.history.js',\n $this->config['jsUrl'] . 'web/lib/jquery.autogrow.js',\n $this->config['jsUrl'] . 'web/lib/jquery.misc.js',\n $this->config['jsUrl'] . 'web/lib/jquery.scrollTo.js',\n $this->config['jsUrl'] . 'web/ejs_production.js',\n $this->config['jsUrl'] . 'web/lib/timeago.js',\n $this->config['jsUrl'] . 'web/bbcode/bbcode.js',\n $this->config['jsUrl'] . 'web/highlight.pack.js',\n );\n\n // Add jquery if not exist\n $this->modx->regClientHTMLBlock('<script type=\"text/javascript\">\n if(typeof jQuery == \"undefined\") {\n document.write(\"<script src=\\\"' . $this->config['jsUrl'] . 'web/lib/jquery-1.9.min.js\\\" type=\\\"text/javascript\\\"><\\/script>\");\n }\n</script>');\n\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.history.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.autogrow.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.misc.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.scrollTo.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/ejs_production.js');\n\n if (!$this->revers) {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/modxtalks.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/scrubber.js');\n } else {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/modxtalks_rev.js');\n }\n\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/timeago.js');\n // Localization for timeago plugin\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/timeago/' . $this->lang . '.js');\n\n // Add a button at quoting the resource allocation in the footer\n $this->modx->regClientHTMLBlock('<div id=\"mt_MTpopUpBox\"><span class=\"\">' . $this->modx->lexicon('modxtalks.quote_text') . '</span></div>');\n\n // Check the settings, turn BBCode\n if ($this->config['bbcode']) {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/bbcode/bbcode.js');\n }\n\n // Check the settings, turn Highlight\n if ($this->modx->getOption('modxtalks.highlight', null, false)) {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/highlight.pack.js');\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/highlight/' . strtolower($this->modx->getOption('modxtalks.highlighttheme', null, 'GitHub')) . '.css');\n }\n\n return true;\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n $options = Json::encode($this->jsOptions);\n Asset::register($view);\n $view->registerJs('jQuery.address(' . $options . ');');\n }", "public function registerClientScript()\r\n\t{\r\n\t\t/** @var $cs CClientScript */\r\n\t\t$cs = Yii::app()->getClientScript();\r\n\r\n\t\t$cs->registerPackage('picker');\r\n\r\n\t\t$pickerOptions = CJavaScript::encode($this->pickerOptions);\r\n\t\t$gridId = $this->grid->id;\r\n\t\t$class = preg_replace('/\\s+/', '.', $this->class);\r\n\r\n\t\t// Registering script to properly open *only* the picker for which corresponding toggler was clicked,\r\n\t\t// and close all other pickers.\r\n\t\t$cs->registerScript(\r\n\t\t\t__CLASS__ . '#' . $this->id,\r\n\t\t\t<<<ENDL\r\n$(document).on('click','#{$gridId} a.{$class}', function() {\r\n\tif ($(this).hasClass('pickeron')) {\r\n\t\t$(this).removeClass('pickeron').picker('toggle');\r\n\t\treturn;\r\n\t}\r\n\t$('#{$gridId} a.pickeron')\r\n\t\t.removeClass('pickeron')\r\n\t\t.each(function (i, elem) {\r\n\t\t\t$(elem).picker('toggle');\r\n\t\t});\r\n\t$(this)\r\n\t\t.picker({$pickerOptions})\r\n\t\t.picker('toggle').addClass('pickeron'); return false;\r\n});\r\nENDL\r\n\t\t);\r\n\t}", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-addons', plugins_url( '/assets/js/frontend.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-content-filter', plugins_url( '/assets/js/content-filter.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-custom-frontend', plugins_url( '/assets/js/custom-frontend.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-bloodhound', plugins_url( '/assets/js/typeahead/typeahead.bundle.min.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-masonry', plugins_url( '/assets/js/masonry.pkgd.min.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t}", "public function registerClientScript()\n {\n $view = $this->getView();\n $this->initClientOptions();\n $asset = UploadifyAsset::register($view);\n if (empty($this->clientOptions['swf'])) {\n $this->clientOptions['swf'] = $asset->baseUrl . '/uploadify.swf';\n }\n $id = $this->options['id'];\n $js = \"jQuery('#{$id}').uploadify(\" . Json::encode($this->clientOptions) . \");\";\n $view->registerJs($js);\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "private function _registerScripts()\n\t{ \n $owner = $this->owner;\n if($this->app_id===null || $this->res_id === null)return;\n $url = $owner->createUrl('/api/public/uploadcount',array('YII_CSRF_TOKEN'=>Yii::app()->request->getCsrfToken(),'t'=>$this->res_id,'app'=>$this->app_id));\n $js = Yii::app()->getClientScript();\n $assetsUrl = $this->_getAssetsUrl();\n $js->registerScriptFile($assetsUrl.'/countupload.js'); \n $js->registerScript(\"#{$this->id}\",\"\n var url = '{$url}';\n var set = new viewCount(url);\n set.push();\n \");\n\t}", "private function addJS()\n {\n Filters::add('scripts', array($this, 'renderRevisionsJS'));\n }", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "protected function loadJavaScripts() {}", "public function setJavaScript($javaScript) {}", "public function addPluginFrontendScripts() {\n global $laterpay_version;\n\n wp_register_script(\n 'jquery',\n '//code.jquery.com/jquery-1.11.0.min.js'\n );\n wp_register_script(\n 'laterpay-yui',\n 'https://static.laterpay.net/yui/3.13.0/build/yui/yui.js',\n array(),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-config',\n 'https://static.laterpay.net/client/1.0.0/config.js',\n array('laterpay-yui'),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-peity',\n LATERPAY_ASSET_PATH . '/static/js/vendor/jquery.peity.min.js',\n array('jquery'),\n $laterpay_version,\n false\n );\n wp_register_script(\n 'laterpay-post-view',\n LATERPAY_ASSET_PATH . '/static/js/laterpay-post-view.js',\n array('jquery', 'laterpay-peity'),\n $laterpay_version,\n false\n );\n wp_enqueue_script('laterpay-yui');\n wp_enqueue_script('laterpay-config');\n wp_enqueue_script('laterpay-peity');\n wp_enqueue_script('laterpay-post-view');\n }", "protected function initJavascriptCode() {}", "function add_ordin_widget_scripts() {\n if( ! apply_filters( 'add_ordin_widget_scripts', true, $this->id_base ) )\n return;\n ?>\n <script>\n jQuery(document).ready(function( $ ) {\n\n });\n </script>\n <?php\n }", "protected function registerClientEvents()\n {\n if (!empty($this->clientEvents)) {\n $id = $this->options['id'];\n $js = '';\n foreach ($this->clientEvents as $event => $handler) {\n $js .= \"jQuery('#$id').on('$event', $handler);\";\n }\n $this->getView()->registerJs($js);\n }\n }", "public function addStaticJavascript()\n {\n JHTML::_('behavior.mootools');\n\n $document = JFactory::getDocument();\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/jquery-ui-base-1.8.20.css\");\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/tagit-stylish-yellow.css\");\n\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery.1.7.2.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery-ui.1.8.20.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/tagit.js\");\n $document->addScriptDeclaration(\"jQuery.noConflict();\");\n }", "function block__custom_javascripts(){\n $app =& Dataface_Application::getInstance();\n $record =& $app->getRecord();\n \n echo \"\\t\\t<!-- jQuery library (served from Google) -->\\n\";\n echo \"\\t\\t<script src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'></script>\\n\";\n echo \"\\t\\t<!-- load OpenLayers -->\\n\";\n echo \"\\t\\t<script src='js/ol/OpenLayers.js'></script>\\n\";\n echo \"<script type='text/javascript' src='js/stations.js'></script>\\n\";\n \n /*parse Station information to Javascript using JSON*/\n if(isset($record)){ \n echo \"<script type='text/javascript'>\";\n echo \"var Station ={'name':'\".$record->val('name_station').\"','lon':'\".\n $record->val('longitude').\"','lat':'\".$record->val('latitude').\"'};\";\n echo \"</script>\";\n }\n }", "function customize_control_scripts() {\n\n\t\t\twp_enqueue_style( 'tf-base', THEMIFY_URI . '/css/base.min.css', null, THEMIFY_VERSION);\n\n\t\t\t// Font Icon CSS\n\t\t\tthemify_enque_style('themify-icons', THEMIFY_URI . '/themify-icons/themify-icons.css', null, '2.0');\n\n\t\t\t// Minicolors\n\t\t\tthemify_enque_style('themify-colorpicker', THEMIFY_METABOX_URI . 'css/jquery.minicolors.css', null, THEMIFY_VERSION);\n\n\t\t\t// Enqueue media scripts\n\t\t\twp_enqueue_media();\n\n\t\t\t// Controls CSS\n\t\t\tthemify_enque_style('themify-customize-control', THEMIFY_CUSTOMIZER_URI . '/css/themify.customize-control.css', null, THEMIFY_VERSION);\n\n\t\t\t// Minicolors JS\n\t\t\tthemify_enque_script('themify-colorpicker-js', THEMIFY_METABOX_URI . 'js/jquery.minicolors.js', array('jquery'), THEMIFY_VERSION,true);\n\t\t\twp_localize_script( 'themify-colorpicker-js', 'themifyCM', Themify_Metabox::themify_localize_cm_data() );\n\n\t\t\t// Plupload\n\t\t\tThemify_Metabox::get_instance()->admin_enqueue_scripts();\n\t\t\tThemify_Metabox::get_instance()->enqueue();\n\n\t\t\t//Combobox JS\n\t\t\tthemify_enque_style('themify-combobox', THEMIFY_CUSTOMIZER_URI . '/css/jquery.scombobox.css', null, THEMIFY_VERSION);\n\t\t\tthemify_enque_script('themify-combobox', THEMIFY_CUSTOMIZER_URI . '/js/jquery.scombobox.min.js', array('jquery'), THEMIFY_VERSION, true);\n\n\n\t\t\t// Controls JS\n\t\t\tthemify_enque_script('themify-customize-control', THEMIFY_CUSTOMIZER_URI . '/js/themify.customize-control.js', array('jquery', 'customize-controls', 'underscore', 'backbone'), THEMIFY_VERSION, true);\n\t\t\t$controls = array(\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce'),\n\t\t\t\t'clearMessage' => __('This will reset all styling and customization. Do you want to proceed?', 'themify'),\n\t\t\t\t'exportMessage' => __('You have un-saved settings. If proceed then export will not have them. Do you want to proceed?', 'themify'),\n\t\t\t\t'confirm_on_unload' => __('You have unsaved data.', 'themify'),\n\t\t\t\t'header_transparnet' => $this->get_header_transparent() ? __('Transparent header is being selected in header background option, thus header background does not reflect on preview but it will show on pages with regular header background mode.', 'themify') : false,\n\t\t\t\t'responsiveBreakpoints' => array(\n\t\t\t\t\t'tablet_landscape' => themify_get('setting-customizer_responsive_design_tablet_landscape', '', true),\n\t\t\t\t\t'tablet' => themify_get('setting-customizer_responsive_design_tablet', '', true),\n\t\t\t\t\t'mobile' => themify_get('setting-customizer_responsive_design_mobile', '', true)\n\t\t\t\t),\n\t\t\t\t'mobile_menu_trigger_point' => themify_get( 'setting-mobile_menu_trigger_point', 1200,true ),\n\t\t\t\t'cf_api_url' => Themify_Custom_Fonts::$api_url\n\t\t\t);\n\n\t\t\t// Pass JS variables to controls\n\t\t\twp_localize_script('themify-customize-control', 'themifyCustomizerControls', $controls);\n\t\t}", "public function customizer_footer_scripts()\n {\n $this->add_activate_switch();\n $this->change_title_html();\n do_action('mo_optin_customizer_footer_scripts', $this);\n }", "public function scripts() {\n\t\t// Make sure scripts are only added once via shortcode\n\t\t$this->add_scripts = true;\n\n\t\twp_register_script( 'jquery-form-validation', plugins_url( '/js/jquery.validate.min.js', __FILE__ ), array( 'jquery' ), '1.9.0', true );\n\t\twp_register_script( 'visual-form-builder-validation', plugins_url( \"/js/vfb-validation$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-form-validation' ), '20140221', true );\n\t\twp_register_script( 'visual-form-builder-metadata', plugins_url( \"/js/jquery.metadata$this->load_dev_files.js\", __FILE__ ) , array( 'jquery', 'jquery-form-validation' ), '2.0', true );\n\t\twp_register_script( 'farbtastic-js', plugins_url( \"/js/farbtastic$this->load_dev_files.js\", __FILE__ ), array( 'jquery' ), '1.3', true );\n\t\twp_register_script( 'vfb-ckeditor', plugins_url( '/js/ckeditor/ckeditor.js', __FILE__ ), array( 'jquery' ), '4.1', true );\n\n\t\twp_enqueue_script( 'jquery-form-validation' );\n\t\twp_enqueue_script( 'visual-form-builder-validation' );\n\t\twp_enqueue_script( 'visual-form-builder-metadata' );\n\n\t\twp_localize_script( 'visual-form-builder-validation', 'VfbAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );\n\n\t\t$locale = get_locale();\n $translations = array(\n \t'cs_CS',\t// Czech\n \t'de_DE',\t// German\n \t'el_GR',\t// Greek\n \t'en_US',\t// English (US)\n \t'en_AU',\t// English (AU)\n \t'en_GB',\t// English (GB)\n \t'es_ES',\t// Spanish\n \t'fr_FR',\t// French\n \t'he_IL', \t// Hebrew\n \t'hu_HU',\t// Hungarian\n \t'id_ID',\t// Indonseian\n \t'it_IT',\t// Italian\n \t'ja_JP',\t// Japanese\n \t'ko_KR',\t// Korean\n \t'nl_NL',\t// Dutch\n \t'pl_PL',\t// Polish\n \t'pt_BR',\t// Portuguese (Brazilian)\n \t'pt_PT',\t// Portuguese (European)\n \t'ro_RO',\t// Romanian\n \t'ru_RU',\t// Russian\n \t'sv_SE',\t// Swedish\n \t'tr_TR', \t// Turkish\n \t'zh_CN',\t// Chinese\n \t'zh_TW',\t// Chinese (Taiwan)\n );\n\n\t\t// Load localized vaidation and datepicker text, if translation files exist\n if ( in_array( $locale, $translations ) ) {\n wp_register_script( 'vfb-validation-i18n', plugins_url( \"/js/i18n/validate/messages-$locale.js\", __FILE__ ), array( 'jquery-form-validation' ), '1.9.0', true );\n wp_register_script( 'vfb-datepicker-i18n', plugins_url( \"/js/i18n/datepicker/datepicker-$locale.js\", __FILE__ ), array( 'jquery-ui-datepicker' ), '1.0', true );\n\n wp_enqueue_script( 'vfb-validation-i18n' );\n }\n // Otherwise, load English translations\n else {\n\t wp_register_script( 'vfb-validation-i18n', plugins_url( \"/js/i18n/validate/messages-en_US.js\", __FILE__ ), array( 'jquery-form-validation' ), '1.9.0', true );\n wp_register_script( 'vfb-datepicker-i18n', plugins_url( \"/js/i18n/datepicker/datepicker-en_US.js\", __FILE__ ), array( 'jquery-ui-datepicker' ), '1.0', true );\n\n wp_enqueue_script( 'vfb-validation-i18n' );\n }\n\t}", "protected function _addJs() {\n\t\t$checkUrl = $this->Html->url([\n\t\t\t'plugin' => 'vat_number_check', 'controller' => 'vat_number_checks', 'action' => 'check', 'ext' => 'json'\n\t\t]);\n\t\t$checkImages = [\n\t\t\t'ok' => $this->Html->url('/vat_number_check/img/ok.png'),\n\t\t\t'failure' => $this->Html->url('/vat_number_check/img/failure.png'),\n\t\t\t'serviceUnavailable' => $this->Html->url('/vat_number_check/img/service-unavailable.png'),\n\t\t];\n\n\t\t$script = \"\n\t\t\t/* jshint jquery:true */\n\n\t\t\tjQuery.noConflict();\n\t\t\t(function($) {\n\t\t\t\t$(function () {\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\telementSelector: '\" . sprintf('input.%s', $this->_inputClass) . \"',\n\t\t\t\t\t\tcheckUrl: '\" . $checkUrl . \"',\n\t\t\t\t\t\tcheckImages: \" . json_encode($checkImages) . \",\n\t\t\t\t\t};\n\t\t\t\t\tvar vatNumberCheck = new VatNumberCheck(options);\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t\";\n\n\t\t$this->Html->script([\n\t\t\t'VatNumberCheck.jquery.min', 'VatNumberCheck.klass.min', 'VatNumberCheck.vat_number_check'\n\t\t], ['inline' => false, 'once' => true]);\n\t\t$this->Html->scriptBlock($script, ['inline' => false]);\n\t}", "function addCommonJs() {\n\t\t// call parent if need RunnerJS API \n\t\tRunnerPage::addCommonJs();\n\t\t\n\t\t$this->addJsGroupsAndRights();\t\t\n\t}", "public function registerClientScript()\n\t{\n\t\t$options = $this->getClientOptions();\n\t\t$options = empty($options) ? '' : Json::htmlEncode($options);\n\t\t$view = $this->getView();\n\t\tValiantAsset::register($view);\n\t\t$id = $this->options['id'];\n\t\t$view->registerJs(\"jQuery('#$id').valiantPhone($options);\");\n\t}", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "protected function registerClientScript()\n\t{\n\t\t$assets = Booster::getBooster()->cs;\n\n\t\t$assets->registerCss(__CLASS__ . '#sidebar-toggle','\n\t\t\t\t\t#'.$this->wrapper.'.toggled #'.$this->sidebar.' {\n\t\t\t\t\t width: 0px;\n\t\t\t\t\t}\n\t\t\t\t\t#'.$this->wrapper.'.toggled #'.$this->content.' {\n\t\t\t\t\t width: 100%;\n\t\t\t\t\t margin-left: 0px;\n\t\t\t\t\t}\n\t\t\t\t\t');\n\n\t\t$assets->registerScript(\n\t\t\t__CLASS__ . '#sidebar-toggle' , '\n $(\"#sidebar-toggle\").click(function(){ \n $(\"#'.$this->wrapper.'\").toggleClass(\"toggled\"); \n });\n ', CClientScript::POS_LOAD\n\t\t);\n\t}", "function bcm_add_scripts() {\t\r\n\t\tglobal $bcmDirPath;\r\n\t\tif (function_exists('wp_enqueue_script') && function_exists('wp_register_script')) {\r\n\t\t\twp_enqueue_script('bcm_edit_script', $bcmDirPath.'/editcomments.js.php');\r\n\t\t\twp_enqueue_script('prototype');\r\n\t\t\twp_enqueue_script('scriptaculous-effects');\r\n\t\t\twp_enqueue_script( 'admin-comments' );\r\n\t\t} else {\r\n\t\t\twpau_add_scripts_legacy();\r\n\t\t}\r\n\t}", "public function registerScripts() {\n\n if ($this->_vendorBaseUrl === '' || $this->_extBaseUrl === '') {\n throw new CException('baseUrl must be set!');\n }\n\n $this->_clientScript = Yii::app()->getClientScript();\n\n // JS\n if (YII_DEBUG) {\n $this->_clientScript->registerScriptFile($this->_vendorBaseUrl . '/dist/js/standalone/selectize.js');\n } else {\n $this->_clientScript->registerScriptFile($this->_vendorBaseUrl . '/dist/js/standalone/selectize.min.js');\n }\n\n // CSS\n $this->_clientScript->registerCssFile($this->_vendorBaseUrl . '/dist/css/selectize.css');\n\n $cssTheme = 'default';\n if (!empty($this->cssTheme)) {\n if (in_array($this->cssTheme, $this->_validCssThemes)) {\n $cssTheme = $this->cssTheme;\n }\n else {\n throw new CException('Please provide a valid theme name: '.implode(',', $this->_validCssThemes));\n }\n }\n elseif ($this->useWithBootstrap) {\n $cssTheme = 'bootstrap3';\n }\n\n $this->_clientScript->registerCssFile($this->_vendorBaseUrl . \"/dist/css/selectize.{$cssTheme}.css\");\n\n\n if ($this->includeBaseCss) {\n $this->_clientScript->registerCssFile($this->_extBaseUrl . '/base.css');\n }\n\n if ($this->useWithBootstrap) {\n $this->_clientScript->registerCssFile($this->_extBaseUrl . '/bootstrap.css');\n }\n\n\n // include es5-shim if ie8 support is needed:\n if ($this->ie8support) {\n // TODO: include the <!--[if lt IE 9]> ... <![endif]--> statement when Yii will support it\n $this->_clientScript->registerScriptFile('http://cdn.bootcss.com/es5-shim/2.2.0/es5-sham.js');\n }\n }", "protected function getScripts() { \n\n $aJSArray = json_encode( $this->aFieldTypeSlugs );\n /* \n * The below function will be triggered when a new repeatable field is added. \n * \n * Use the registerAPFCallback method to register a callback.\n * Available callbacks are:\n * added_repeatable_field - triggered when a repeatable field gets repeated. Parameters 1. (object) the jQuery element object. 2. (string) the field type slug. 3. (string) the field tag id.\n * removed_repeatable_field - triggered when a repeatable field gets removed. Parameters 1. (object) the jQuery element object. 2. (string) the field type slug. 3. (string) the field tag id.\n * sorted_fields - triggered when a sortable field gets sorted. Parameters 1. (object) the jQuery element object. 2. (string) the field type slug. 3. (string) the field tag id.\n * */\n return \"\n jQuery( document ).ready( function(){\n jQuery().registerAPFCallback( { \n \n /**\n * The repeatable field callback.\n * \n * @param object oCopiedNode\n * @param string the field type slug\n * @param string the field container tag ID\n * @param integer the caller type. 1 : repeatable sections. 0 : repeatable fields.\n */\n added_repeatable_field: function( oCopiedNode, sFieldType, sFieldTagID, iCallType ) {\n \n /* If it is not this field type, do nothing. */\n if ( jQuery.inArray( sFieldType, {$aJSArray} ) <= -1 ) return;\n\n /* If the input tag is not found, do nothing */\n var nodeNewAutoComplete = oCopiedNode.find( 'input.autocomplete' );\n if ( nodeNewAutoComplete.length <= 0 ) return;\n \n /* Remove unnecessary elements */\n oCopiedNode.find( 'ul.token-input-list' ).remove();\n \n /* Bind the autocomplete script */\n var sFieldsID = oCopiedNode.closest( '.admin-page-framework-fields' ).attr( 'id' );\n var sOptionID = oCopiedNode.closest( '.admin-page-framework-sections' ).attr( 'id' ) + '_' + oCopiedNode.closest( '.admin-page-framework-fields' ).attr( 'id' ); // sections id + _ + fields id \n var aOptions = jQuery( '#' + nodeNewAutoComplete.attr( 'id' ) ).getTokenInputOptions( sOptionID );\n aOptions = jQuery.isArray( aOptions ) ? aOptions : [ [], [] ];\n \n jQuery( nodeNewAutoComplete ).tokenInput( \n aOptions[0], \n jQuery.extend( true, aOptions[1], {\n onAdd: function ( item ) {\n jQuery( nodeNewAutoComplete ).attr( 'value', JSON.stringify( jQuery( nodeNewAutoComplete ).tokenInput( 'get' ) ) );\n },\n onDelete: function ( item ) {\n jQuery( nodeNewAutoComplete ).attr( 'value', JSON.stringify( jQuery( nodeNewAutoComplete ).tokenInput( 'get' ) ) );\n },\n })\n );\n }, \n });\n }); \n \n \" . PHP_EOL;\n \n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n WebUIPopoverAsset::register($view);\n\n $id = $this->options['id'];\n if (!empty($this->pluginOptions)) {\n foreach($this->pluginOptions as $option => $value){\n if (in_array($option, ['onShow', 'onHide'])) {\n $this->pluginOptions[$option] = new JsExpression($value);\n }\n }\n }\n $options = Json::encode($this->pluginOptions);\n $js = \"$('#$id').webuiPopover($options);\";\n $view->registerJs($js);\n }", "public function jsInit()\n\t{\n\t\t$is_customizer = $this->wp_widget->is_customizer;\n\t\t$default_dateformat = $this->wp_widget->default_dateformat;\n\n\t\tinclude CDP_ADMIN_VIEWS . 'widget-js-init.php';\n\t}", "public function register_script() {\n\t\ttribe_asset(\n\t\t\tTribe__Main::instance(),\n\t\t\t'tribe-common-logging-controls',\n\t\t\t'admin-log-controls.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'admin_enqueue_scripts',\n\t\t\tarray(\n\t\t\t\t'conditionals' => array( Tribe__Admin__Help_Page::instance(), 'is_current_page' ),\n\t\t\t\t'localize' => (object) array(\n\t\t\t\t\t'name' => 'tribe_logger_data',\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'check' => wp_create_nonce( 'logging-controls' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "function options_general_add_js()\n {\n }", "public function getJavaScript()\n {\n ob_start();\n ?>\n webFormChangesMade = false;\n\n <?php\n foreach($this->_fields as $field)\n {\n if ($field['type'] == WFT_CC_EXPIRATION)\n {\n echo sprintf(\" var wf%sMonthError = false;\\n var wf%sYearError = false;\",\n $field['id'], $field['id']\n );\n }\n else\n {\n echo sprintf(\" var wf%sError = false;\\n\",\n $field['id']\n );\n }\n }\n ?>\n\n function webFormSubmit(form)\n {\n var errors = '';\n var tmperrors = '';\n <?php\n foreach($this->_fields as $field)\n {\n if ($field['type'] == WFT_CC_EXPIRATION)\n {\n ?>\n var <?php echo $field['id'] ?>Month = document.getElementById('<?php echo $field['id'] ?>Month');\n var <?php echo $field['id'] ?>Year = document.getElementById('<?php echo $field['id'] ?>Year');\n if (<?php echo $field['id'] ?>Month.value == 'nosel' || <?php echo $field['id'] ?>Year.value == 'nosel')\n errors += \":You must select an expiration date and year for your credit card\";\n <?php\n }\n else if($field['type'] == WFT_SELECT || $field['type'] == WFT_CC_TYPE || $field['type'] == WFT_BOOLEAN)\n {\n ?>\n var <?php echo $field['id'] ?> = document.getElementById('<?php echo $field['id'] ?>');\n if (<?php echo $field['id'] ?>.value == 'nosel')\n errors += \":You must select a value for <?php echo addslashes($field['caption']) ?>\";\n <?php\n }\n else\n {\n ?>\n errors += webFormValidateField('<?php echo $field['id']; ?>', <?php echo ($field['required'] ? 'true' : 'false'); ?>);\n <?php\n }\n }\n ?>\n\n if (errors != '')\n {\n alert(\"Please correct the following problems with your entries:\\n\" + errors.replace(/:/g,\"\\n- \"));\n }\n else\n {\n eval('document.' + form + '.submit();');\n }\n }\n function webFormValidateField(id, required)\n {\n var obj = document.getElementById(id);\n var objCaption = document.getElementById(id + 'Caption');\n var retVal;\n\n if(obj)\n {\n if (obj.value == '' && required == false) return '';\n var str = obj.value;\n str = str.replace(/'/g,\"\\\\'\");\n str = str.replace(/\\r/g,\"\");\n str = str.replace(/\\n/g,\"\");\n eval( 'retVal = webFormValidate' + id + '(\\'' + str + '\\');' );\n\n if (retVal != '')\n {\n obj.style.backgroundColor = '#FFE8E8';\n if (objCaption) objCaption.innerHTML = retVal.substr(1);\n <?php\n if ($this->_verifyForm)\n {\n echo sprintf(\"webFormEditField('%s', true, %s);\", $field['id'], ($field['required'] ? 'true' : 'false'));\n }\n ?>\n }\n else\n {\n obj.style.backgroundColor= '#FFFFFF';\n if (objCaption) objCaption.innerHTML = '';\n }\n return retVal;\n }\n return '';\n }\n\n <?php\n if ($this->_verifyForm)\n {\n ?>\n function webFormFormatEditFields()\n {\n <?php\n // get the formatting right for display\n foreach ($this->_fields as $field)\n {\n switch ($field['type'])\n {\n case WFT_PHONE:\n ?>programs:/Utilities/\n var obj = document.getElementById('<?php echo $field['id'] ?>EditText');\n if (obj)\n {\n var str = obj.innerHTML;\n if (str.length == 10)\n obj.innerHTML = str.substring(0, 3) + '-' + str.substring(3, 6) + '-' + str.substring(6, 10);\n }\n <?php\n break;\n }\n }\n ?>\n }\n\n function webFormFieldHover(id, tf)\n {\n var editButton = document.getElementById(id + 'Edit');\n var editContainer = document.getElementById(id + 'Container');\n if (tf == true && editButton)\n {\n editButton.style.visibility = 'visible';\n editContainer.style.border = '1px dotted #333333';\n editContainer.style.backgroundColor = '#e0e0e0';\n }\n else if(editButton)\n {\n editButton.style.visibility = 'hidden';\n editContainer.style.border = '1px solid #c0c0c0';\n editContainer.style.backgroundColor = '#f0f0f0';\n }\n }\n\n function webFormCancelEditField(id, required)\n {\n var inputBox = document.getElementById(id);\n var inputBoxMonth = document.getElementById(id+'Month');\n var inputBoxYear = document.getElementById(id+'Year');\n var editText = document.getElementById(id + 'EditText');\n\n if (inputBox)\n {\n var oldText = editText.innerHTML;\n if (oldText.indexOf('(Empty)') != -1)\n inputBox.value = '';\n else\n inputBox.value = oldText;\n }\n else if(inputBoxMonth && inputBoxYear)\n {\n var expire = editText.innerHTML;\n var parts = expire.split('/');\n inputBoxMonth.value = parts[0];\n inputBoxYear.value = parts[1];\n }\n webFormEditField(id, false, false);\n }\n\n function webFormEditField(id, tf, required)\n {\n var editButton = document.getElementById(id + 'Edit');\n var editContainer = document.getElementById(id + 'Container');\n var editText = document.getElementById(id + 'EditText');\n var inputBox = document.getElementById(id);\n var saveButton = document.getElementById(id + 'Save');\n var cancelButton = document.getElementById(id + 'Cancel');\n\n var inputBoxMonth = document.getElementById(id+'Month');\n var inputBoxYear = document.getElementById(id+'Year');\n\n // for verify images\n if (!saveButton) return;\n\n if (tf == true)\n {\n showVal = \"\";\n hideVal = \"none\";\n saveButton.style.display = \"\";\n cancelButton.style.display = \"\";\n editButton.style.display = \"none\";\n editContainer.style.display = \"none\";\n editText.style.display = \"none\";\n if (inputBox)\n {\n inputBox.style.display = \"\";\n inputBox.focus();\n if (inputBox.type != 'select-one')\n inputBox.select();\n }\n if (inputBoxMonth && inputBoxYear)\n {\n inputBoxMonth.style.display = \"\";\n inputBoxMonth.focus();\n inputBoxYear.style.display = \"\";\n }\n }\n else\n {\n errors = webFormValidateField(id, required);\n if (errors == '')\n {\n saveButton.style.display = \"none\";\n cancelButton.style.display = \"none\";\n editButton.style.display = \"\";\n editContainer.style.display = \"\";\n editText.style.display = \"\";\n if (inputBox) inputBox.style.display = \"none\";\n if (inputBoxMonth && inputBoxYear)\n {\n inputBoxMonth.style.display = \"none\";\n inputBoxYear.style.display = \"none\";\n if (inputBoxMonth.value != '' && inputBoxYear.value != '')\n editText.innerHTML = inputBoxMonth.value + \"/\" + inputBoxYear.value;\n else\n editText.innerHTML = \"<span style=\\\"color: #999999;\\\">(Empty)</span>\";\n }\n else\n {\n var str;\n\n if (inputBox.type == 'select-one')\n {\n // <select> element\n str = inputBox.options[inputBox.selectedIndex].text;\n }\n else\n {\n str = inputBox.value;\n }\n\n if (str.length == 0)\n editText.innerHTML = \"<span style=\\\"color: #999999;\\\">(Empty)</span>\";\n else\n editText.innerHTML = str;\n }\n webFormChangesMade = true;\n }\n webFormFormatEditFields();\n }\n }\n <?php\n }\n ?>\n\n <?php\n foreach($this->_fields as $field)\n {\n ?>\n function webFormValidate<?php echo $field['id'] ?>(data)\n {\n <?php\n if ($field['required'])\n {\n ?>\n if (data == '')\n {\n wf<?php echo $field['id']; ?>Error = true;\n return ':<?php echo (strlen($field['caption']) > 0 ? $field['caption'] : 'This field'); ?> is a required field';\n }\n <?php\n }\n if (!$field['required']) echo \"if (data.length > 0)\\n{\\n\";\n ?>\n if (data.length < <?php echo $field['length'][0]; ?> || data.length > <?php echo $field['length'][1]; ?>)\n {\n <?php\n if ($field['length'][0] == $field['length'][1])\n {\n ?>\n wf<?php echo $field['id']; ?>Error = true;\n return ':<?php echo (strlen($field['caption']) > 0 ? $field['caption'] : 'This field'); ?> must be <?php echo $field['length'][0] ?> characters in length';\n <?php\n }\n else\n {\n ?>\n wf<?php echo $field['id']; ?>Error = true;\n return ':<?php echo $field['caption']; ?> must be between <?php echo implode(' and ', $field['length']) ?> characters in length';\n <?php\n }\n ?>\n }\n <?php\n if (!$field['required'])\n {\n echo \"}\\n\";\n }\n if (strlen($field['regex_test']) > 0)\n {\n ?>\n var re = <?php echo $field['regex_test']; ?>;\n if (!data.match(re))\n {\n wf<?php echo $field['id']; ?>Error = true;\n return ':<?php echo $field['regex_fail']; ?>';\n }\n <?php\n }\n if ($field['type'] == WFT_SELECT)\n {\n ?>\n if (data == 'nosel')\n {\n wf<?php echo $field['id']; ?>Error = true;\n return ':Please select a value for <?php echo $field['caption']; ?>';\n }\n <?php\n }\n ?>\n wf<?php echo $field['id']; ?>Error = false;\n return '';\n }\n <?php\n }\n\n ?>\n function webFormShowErrorBox(obj)\n {\n var xy = webFormFindPos(obj);\n var error = false;\n var errorMessage = '';\n var errorBox = document.getElementById('webFormErrorBox');\n\n if (document.getElementById(obj.name))\n {\n eval('error = wf' + obj.name + 'Error;');\n }\n\n if (error)\n {\n errorMessage = '<table><tr><td align=\"left\" valign=\"center\"><img src=\"<?php echo $this->_relPath; ?>images/wf_error.gif\" border=\"0\" align=\"left\" style=\"padding-right: 5px;\"/></td><td align=\"left\" valign=\"center\" class=\"wfErrorText\">' + document.getElementById(obj.name + 'Caption').innerHTML + \"</td></tr></table>\";\n errorBox.style.left = '' + (xy[0] + 140) + 'px';\n errorBox.style.top = '' + (xy[1] - 10) + 'px';\n errorBox.style.visibility = 'visible';\n errorBox.innerHTML = errorMessage;\n }\n }\n\n function webFormHideErrorBox()\n {\n var errorBox = document.getElementById('webFormErrorBox');\n if (errorBox)\n errorBox.style.visibility = 'hidden';\n }\n\n function webFormShowHelpBox(obj, title, desc, rules)\n {\n var xy = webFormFindPos(obj);\n var helpBox = document.getElementById('webFormHelpBox');\n var error = false;\n\n if (document.getElementById(obj.name))\n {\n eval('error = wf' + obj.name + 'Error;');\n }\n\n if (helpBox && obj && !error)\n {\n helpBox.style.left = '' + (xy[0] + 140) + 'px';\n helpBox.style.top = '' + (xy[1] - 30) + 'px';\n helpBox.style.visibility = 'visible';\n helpBox.innerHTML = '<b>' + title + '</b><br />' + desc + '<p><b>Rules:</b><br />' + rules;\n }\n }\n\n function webFormHideHelpBox()\n {\n var helpBox = document.getElementById('webFormHelpBox');\n if (helpBox)\n helpBox.style.visibility = 'hidden';\n }\n\n function webFormFindPos(obj)\n {\n \tvar curleft = curtop = 0;\n \tif (obj.offsetParent)\n \t{\n \t\tcurleft = obj.offsetLeft\n \t\tcurtop = obj.offsetTop\n \t\twhile (obj = obj.offsetParent)\n \t\t{\n \t\t\tcurleft += obj.offsetLeft\n \t\t\tcurtop += obj.offsetTop\n \t\t}\n \t}\n \treturn [curleft,curtop];\n }\n <?php\n\n $js = ob_get_contents();\n ob_end_clean();\n return $js;\n }", "private function includeJavaScript() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId]\n\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t'pi1/tx_explanationbox_pi1.js\">' .\n\t\t\t'</script>';\n\n\t\tif ($this->hasConfValueString('mooTools')) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_moo']\n\t\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t\t$this->getConfValueString('mooTools') . '\">' .\n\t\t\t\t'</script>';\n\t\t}\n\t}", "function preRenderCallback() {\n $scripts = array('aurigma.uploader', 'aurigma.uploader.amazons3');\n foreach ($scripts as $script) {\n $this->_parent->addScriptFileName($script, $this->_parent->getDebugScriptLevel() > 0 ?\n $script . '.js' : $script . '.min.js');\n }\n\n $clientPreRender = $this->_parent->getClientEvents()->getPreRender();\n if (!isset($clientPreRender)) {\n $clientPreRender = array();\n }\n $clientPreRender[] = $this->buildScript();\n $this->_parent->getClientEvents()->setPreRender($clientPreRender);\n }" ]
[ "0.7834655", "0.74229556", "0.72017837", "0.71647453", "0.70598006", "0.7002699", "0.70014197", "0.6997561", "0.69918525", "0.69523233", "0.6929925", "0.6902576", "0.69006145", "0.68536353", "0.68114644", "0.68107283", "0.6787066", "0.67858565", "0.6757396", "0.6737201", "0.6736386", "0.67258847", "0.6711923", "0.67072356", "0.6707058", "0.67028314", "0.6701471", "0.6698541", "0.6666824", "0.66443", "0.66329145", "0.6608618", "0.6608447", "0.6604176", "0.6603416", "0.6603416", "0.6603416", "0.6603416", "0.6603416", "0.65997094", "0.65962815", "0.65884227", "0.6568286", "0.6548917", "0.6541982", "0.65332544", "0.6523562", "0.65192574", "0.6518916", "0.6512717", "0.65100706", "0.6503163", "0.6503163", "0.6499167", "0.64948034", "0.64852583", "0.6479779", "0.6467798", "0.6453703", "0.6441675", "0.6434448", "0.64303845", "0.64148355", "0.6402281", "0.640076", "0.639955", "0.639223", "0.63868946", "0.6385046", "0.6385046", "0.6385046", "0.638447", "0.6380493", "0.63769364", "0.6363149", "0.63628054", "0.6348759", "0.63486004", "0.63423705", "0.6290473", "0.628719", "0.6278479", "0.6270522", "0.6258618", "0.6241585", "0.62407213", "0.62381256", "0.62165093", "0.6211669", "0.6208008", "0.61945695", "0.6191651", "0.61893386", "0.61856186", "0.6178776", "0.61742324", "0.61733353", "0.6170776", "0.6162575", "0.61604536" ]
0.8174726
0
BizForm::ReRender() rerender this form (form is rendered already) .
public function ReRender($redrawForm=true, $hasRecordChange=true) { if ($this->m_ReRenderOn == false) return; // consider the postAction $postAction = $this->GetPostAction(); if ($postAction) { $this->HandlePostAction($postAction); return; } global $g_BizSystem; if ($redrawForm) { if ($g_BizSystem->GetClientProxy()->HasFormRerendered($this->m_Name) == false) $g_BizSystem->GetClientProxy()->ReDrawForm($this->m_Name, $this->RenderHTML()); } if ($hasRecordChange) { $this->ReRenderSubForms(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#[BeforeReRender]\n public function submitFormOnRender(): void\n {\n if (!$this->getFormInstance()->isSubmitted()) {\n $this->submitForm(false);\n }\n }", "protected function ReRenderSubForms()\n {\n if (!$this->m_SubForms)\n return;\n\n $this->m_ActiveRecord = $this->GetActiveRecord();\n\n global $g_BizSystem;\n $mode = $this->GetDisplayMode()->GetMode();\n foreach($this->m_SubForms as $subForm) {\n $formObj = $g_BizSystem->GetObjectFactory()->GetObject($subForm);\n $formObj->SetPostActionOff();\n if ($mode == MODE_N) { // parent form on new mode\n $formObj->SetPrtCommitPending(true);\n }\n else {\n $formObj->SetPrtCommitPending(false);\n $dataObj = $this->GetDataObj()->GetRefObject($formObj->m_DataObjName);\n if ($dataObj)\n $formObj->SetDataObj($dataObj);\n }\n // force the active row on the first row\n $formObj->SetActiveRecordId(null);\n $formObj->ReRender();\n }\n return;\n }", "function reload_form() {\n\tglobal $ROW, $ERROR_MESSAGE;\n\n\t// Only reload if it hasn't been reloaded already\n\tif ( $ERROR_MESSAGE && ( !isset($ROW[0]['STATUS']) || $ROW[0]['STATUS'] != 'RELOAD') ) {\n\t\t$ROW[0]=$_POST;\n\t\t$ROW[0]['STATUS']='RELOAD';\n\t\tLOG_MSG('INFO',\"reload_form(): ROW=[\".print_r($ROW,true).\"]\");\n\t}\n}", "public function Render()\n\t{\n\t // when in NEW mode or when parent form in NEW mode, do nothing\n\t global $g_BizSystem;\n\t $prtMode = \"\";\n\t if ($this->m_ParentFormName) {\n $prtForm = $g_BizSystem->GetObjectFactory()->GetObject($this->m_ParentFormName);\n $prtMode = $prtForm->GetDisplayMode()->GetMode();\n\t }\n\t if ($this->m_Mode != MODE_N && $prtMode != MODE_N)\n\t {\n \t // get view history\n \t if (!$this->m_NoHistoryInfo)\n\t $this->SetHistoryInfo($g_BizSystem->GetSessionContext()->GetViewHistory($this->m_Name));\n\t }\n\t if ($this->m_Mode == MODE_N)\n $this->UpdateActiveRecord($this->GetDataObj()->NewRecord());\n\n //Moved the renderHTML function infront of declaring subforms\n $renderedHTML = $this->RenderHTML();\n\n\t global $g_BizSystem;\n\t // prepare the subforms' dataobjs, since the subform relates to parent form by dataobj association\n\t if ($this->m_SubForms) {\n \t foreach($this->m_SubForms as $subForm) {\n $formObj = $g_BizSystem->GetObjectFactory()->GetObject($subForm);\n $dataObj = $this->GetDataObj()->GetRefObject($formObj->m_DataObjName);\n if ($dataObj)\n $formObj->SetDataObj($dataObj);\n }\n\t }\n\t $this->SetClientScripts();\n\n return $renderedHTML;\n\t}", "public function resetForm()\n\t{\n\t\tparent::resetForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}", "public function getRender(){\n //Adiciona a funcionalidade para definir o campo que deve receber o foco inicial\n if($this->getCampoFoco() != null){\n $sFuncao = View::campoFocus($this->getCampoFoco()->getId());\n $this->addListener(Base::EVENTO_APOS_MONTAR, $sFuncao);\n }\n \n //Adiciona a funcionalidade que centraliza o formulário na tela\n if($this->getCentraliza()){\n $sFuncao = Base::getFuncaoCentraliza();\n $this->addListener(Base::EVENTO_MONTAR, $sFuncao);\n }\n \n //Adiciona a funcionalidade que indica que será possível arrastar o formulário\n if($this->getPermiteArrastar()){\n $sFuncao = Base::getFuncaoLimitaArrasto($this->getId(),$this->getRenderTo());\n $this->addListener(Base::EVENTO_MONTAR, $sFuncao);\n }\n \n $aRender = array(\n \"animCollapse\" => true,\n \"autoScroll\" => true,\n \"waitMsgTarget\" => true,\n \"bodyPadding\" => 10,\n \"iconCls\" => 'icon-form',\n \"border\" => $this->getAdicionaBorda(),\n //\"glyph\" => 36,\n \"layout\" => $this->getLayout(),\n \"id\" => $this->getId(),\n \"title\" => $this->getTitulo(),\n \"closable\" => $this->getPermiteFechar(),\n \"resizable\" => $this->getPermiteRedimensionar(),\n \"draggable\" => $this->getPermiteArrastar(),\n \"collapsible\" => $this->getPermiteRecolher(),\n \"height\" => $this->getAltura(),\n \"width\" => $this->getLargura(),\n \"html\" => $this->getHtml(),\n \"items\" => $this->getStringItemsLayout(),\n \"buttons\" => $this->getBotoes(),\n \"listeners\" => $this->getListeners(),\n \"reloadPreviousOnClose\" => $this->getReloadPreviousOnClose()\n );\n \n $oForm = \"Ext.create('Ext.panel.Panel', {\".Base::getRender($aRender).\"})\";\n \n return Base::addObj($oForm,$this->getRenderTo());\n }", "function _onRenderForm($tmp) {\n\t\t\n\t\t/* Show Page title */\n\t\tif ($this->_FORM_CONFIG ['showtitle'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_PAGE_TITLE', TRUE );\n\t\t}\n\t\t\n\t\t/* Show Reset Button */\n\t\tif ($this->_FORM_CONFIG ['showresetbutton'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_RESET_BUTTON', TRUE );\n\t\t}\n\t\t\n\t\t$tmp->assign ( 'RESETBUTTONTEXT', $this->_FORM_CONFIG ['resetbuttontext'] );\n\t\t$tmp->assign ( 'SUBMITBUTTONTEXT', $this->_FORM_CONFIG ['submitbuttontext'] );\n\t\t\n\t\treturn $tmp;\n\t}", "function render(Form $form);", "function goToFormReinit(){\n\n require('view/frontend/formReinitMdpView.php');\n }", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "public function render()\n {\n $root =& XCube_Root::getSingleton();\n $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);\n\n $renderTarget =& $renderSystem->createRenderTarget('main');\n\n $renderTarget->setAttribute('legacy_module', 'legacy');\n $renderTarget->setTemplateName('legacy_xoopsform_tableform.html');\n $renderTarget->setAttribute('form', $this);\n\n $renderSystem->render($renderTarget);\n\n return $renderTarget->getResult();\n }", "public function Render($form)\r\n\t{\r\n\t\t$this->form = $form;\r\n\t}", "public function updateForm(){\n $new = $this->model->getNew();\n $this->view->updateForm($new);\n }", "abstract function repopulate(Form $arg0);", "protected function Form_Run() {}", "function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "function render ()\n {\n parent::render();\n }", "public function renderForm() {\n\n $id_default_lang = $this->context->language->id;\n $id_shop = $this->context->shop->id;\n\n /* Render Form */\n $carousel_types = array(\n array(\n 'value' => 'featured',\n 'name' => $this->l('Featured products')\n ),\n array(\n 'value' => 'new',\n 'name' => $this->l('New products')\n ),\n array(\n 'value' => 'special',\n 'name' => $this->l('Special products')\n ),\n array(\n 'value' => 'category',\n 'name' => $this->l('All products from certain category')\n ),\n array(\n 'value' => 'custom',\n 'name' => $this->l('Custom products')\n )\n );\n\n // Get Categories\n $root_category = Category::getRootCategory($id_default_lang);\n $this->_getCategories($root_category->id_category, $id_shop);\n\n // Init Fields form array\n $this->fields_form = array(\n 'legend' => array(\n 'title' => $this->l('Carousel'),\n 'icon' => 'icon-cogs'\n ),\n // Inputs\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Title'),\n 'name' => 'title',\n 'desc' => $this->l('Must be less than 250 characters.'),\n 'size' => 50,\n 'required' => true,\n 'lang' => true\n ),\n array(\n 'type' => 'select',\n 'name' => 'carousel_type',\n 'label' => $this->l('Carousel Content'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $carousel_types,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'select',\n 'name' => 'select_category',\n 'label' => $this->l('Select a category'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $this->_categorySelect,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Add a product'),\n 'name' => 'product_autocomplete',\n 'size' => 50,\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Content'),\n 'name' => 'carousel_content',\n 'size' => 50\n ),\n ),\n // Submit Button\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'name' => 'saveProductCarousel'\n )\n );\n\n if (Shop::isFeatureActive()){\n $this->fields_form['input'][] = array(\n 'type' => 'shop',\n 'label' => $this->l('Shop association'),\n 'name' => 'checkBoxShopAsso',\n );\n }\n\n if (!($obj = $this->loadObject(true)))\n return;\n\n if ($obj && $obj->carousel_type == 'custom'){\n $carousel_content_products = array();\n $carousel_content = explode(',', $obj->carousel_content);\n\n foreach ($carousel_content as $pid) {\n $product = new Product($pid, false, $id_default_lang);\n $carousel_content_products[] = array(\n 'id' => $pid,\n 'name' => $product->name,\n 'ref' => $product->reference\n );\n }\n\n $this->tpl_form_vars['carousel_content_products'] = $carousel_content_products;\n }\n\n return parent::renderForm();\n }", "public function postRender()\n {\n }", "public function redrawForm($formName, $sHTML)\n {\n if ($this->isRpc) {\n $this->_formsOutput[$formName] = $this->buildTargetContent($formName, $sHTML);\n } else {\n $this->_formsOutput[$formName] = $sHTML;\n }\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitKushkipagosModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n if(Currency::getDefaultCurrency()->iso_code=='COP'){\n return $helper->generateForm(array($this->getConfigFormCOP()));\n }else{\n return $helper->generateForm(array($this->getConfigForm()));\n }\n\n }", "protected function regenerateFormControls()\n\t{\n\t\t$form = $this->getForm();\n\n\t\t// regenerate checker's checkbox controls\n\t\tif ($this->hasOperations()) {\n\t\t\t$values = $form->getValues();\n\n\t\t\t$form->removeComponent($form['checker']);\n\t\t\t$sub = $form->addContainer('checker');\n\t\t\tforeach ($this->getRows() as $row) {\n\t\t\t\t$sub->addCheckbox($row[$this->keyName], $row[$this->keyName]);\n\t\t\t}\n\n\t\t\tif (!empty($values['checker'])) {\n\t\t\t\t$form->setDefaults(array('checker' => $values['checker']));\n\t\t\t}\n\t\t}\n\n\t\t// for selectbox filter controls update values if was filtered over column\n\t\tif ($this->hasFilters()) {\n\t\t\tparse_str($this->filters, $list);\n\n\t\t\tforeach ($this->getFilters() as $filter) {\n\t\t\t\tif ($filter instanceof SelectboxFilter) {\n\t\t\t\t\t$filter->generateItems();\n\t\t\t\t}\n\n\t\t\t\tif ($this->filters === $this->defaultFilters && ($filter->value !== NULL || $filter->value !== '')) {\n\t\t\t\t\tif (!in_array($filter->getName(), array_keys($list))) $filter->value = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// page input & items selectbox\n\t\t$form['page']->setValue($this->paginator->page); // intentionally page from paginator\n\t\t$form['items']->setValue($this->paginator->itemsPerPage);\n\t}", "public function postDispatch()\n {\n if ($this->_shouldRender()) {\n $this->render();\n }\n }", "public function RefreshQuery()\n {\n if ($this->m_OnSortField) {\n $this->SetSortFieldFlag($this->m_OnSortField, null);\n $this->m_OnSortField = null;\n $this->GetDataObj()->ClearSortRule();\n }\n $this->SetDisplayMode (MODE_R);\n $this->m_ClearSearchRule = true;\n return $this->ReRender();\n }", "protected function callRenderMethod() {}", "public function index_onUpdateForm()\n\t{\n\t\t$record_id = post('record_id');\n\t\tparent::update($record_id);\n\t\t$this->controller->vars['record_id'] = $record_id;\n\t\treturn $this->makePartial('update');\n\t}", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "public function saveForm()\n\t{\n\t\tparent::saveForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}", "public static function refresh(array $form, FormStateInterface $form_state) {\n $form_state->setRebuild();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitOrderrefModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = PrestashopFactory::buildHelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitIfthenpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function resetForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->reset();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_RESET );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "protected function callRenderHook() {}", "public function setForm() {\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\t\t \n\t\t$this->addEnabled();\n\t\t$this->addRentDueDay();\n\t\t$this->addProrationType();\n\t\t$this->addProrationApplyMonth();\n\t\t$this->addSecondMonthDue();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup( $this->displayGroupArray, 'updateRentProrationSetting',array('legend' => 'rentProrationSettings'));\n\t\t$this->getDisplayGroup('updateRentProrationSetting')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t));\n\t}", "public function hookForm() {\n if ($this->isCompanyForm()) {\n $this->setDefaultExpDate();\n $this->makeBillingAreaRequired();\n }\n elseif ($this->isCompanyViewsMultiSearchForm()) {\n $this->form['company_name']['#type'] = 'textarea';\n $this->duplicateField('sort_by');\n }\n }", "public function render() {\n /* verify all fields except checkbox */\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n /* verify checkbox */\n $tempName = str_replace('[]', NULL, $this->name);\n\n if($this->required\n && $this->form->isSubmitted()\n && $this->type == 'checkbox'\n && !isset($_REQUEST[$tempName])) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n $html = NULL;\n $this->value = htmlspecialchars($this->value);\n\n $html .= '<input type=\"'.$this->type.'\" id=\"'.$this->id.'\" name=\"'.$this->name.'\" value=\"'.$this->value.'\"';\n $html .= (bool)$this->size ? ' size= \"'.$this->size.'\"' : NULL;\n $html .= (bool)$this->maxlength ? ' maxlength= \"'.$this->maxlength.'\"' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= ($this->type == 'text' || $this->type == 'password') ? ' class=\"' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'submit') ? ' class=\"submit ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'checkbox') ? ' class=\"checkbox ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'radio') ? ' class=\"radio ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'image') ? ' source=\"'.$this->source.'\"' : NULL;\n $html .= ($this->type == 'image' && (bool)$this->width && (bool)$this->height) ? ' style=\"width:'.$this->width.'px; height:'.$this->height.'px;\"' : NULL;\n $html .= (bool)$this->checked ? ' checked' : NULL;\n $html .= ' />';\n\n if (isset($this->label)) {\n $html .= '<span class=\"label\">' . $this->label . '</span>';\n }\n\n $this->html = ($this->type == 'hidden') ? $html : $this->wrap($html);\n }", "public function setAsAjaxForm() {\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit_apisfact_prestashop';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitPromoModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n // Ligne de code pour afficher le formulaire de base du module\n // return $helper->generateForm(array($this->getConfigForm()));\n return $helper->generateForm(array());\n }", "public function render()\n {\n // specify a view to render.\n $this->view = 'dkrepeator::repeator';\n\n $this->buildNestedForm($this->column, $this->builder);\n\n list($template, $script) = $this->buildNestedForm($this->column, $this->builder)\n ->getTemplateHtmlAndScript();\n\n//\n $this->setupScriptForDefaultView($script);\n\n return parent::render()->with([\n 'forms' => $this->buildRelatedForms(),\n 'template' => $template,\n 'relationName' => null,\n ]);\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitCaptureleadsxavierModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "function postRender(&$render)\n {\n }", "public function hookForm() {\n }", "protected function renderForm()\n {\n $this->addAttribute(\"method\",$this->getMethod());\n \n if($this->getHasFile()) $this->addAttribute(\"enctype\",\"multipart/form-data\");\n\n $ret = '<form '.$this->getAttributes().'>';\n if($this->getHasFile())\n {\n $ret .= \"<input type='hidden' name='MAX_FILE_SIZE' value='10485760' />\";\n }\n if($this->error)\n {\n $ret .= \"<div class='fapi-error'><ul>\";\n foreach($this->errors as $error)\n {\n $ret .= \"<li>$error</li>\";\n }\n $ret .= \"</ul></div>\";\n }\n $ret .= $this->renderElements();\n\n $onclickFunction = \"fapi_ajax_submit_\".$this->getId().\"()\";\n $onclickFunction = str_replace(\"-\",\"_\",$onclickFunction);\n \n if($this->getShowClear())\n {\n $clearButton = '<input class=\"fapi-submit\" type=\"reset\" value=\"Clear\"/>';\n }\n\n if($this->getShowSubmit())\n {\n $ret .= '<div id=\"fapi-submit-area\">';\n $submitValue = $this->submitValue?('value=\"'.$this->submitValue.'\"'):\"\";\n if($this->ajaxSubmit)\n {\n $ret .= sprintf('<input class=\"fapi-submit\" type=\"button\" %s onclick=\"%s\" /> %s',$submitValue,$onclickFunction,$clearButton);\n }\n else\n {\n $ret .= sprintf('<input class=\"fapi-submit\" type=\"submit\" %s /> %s',$submitValue,$clearButton);\n }\n $ret .= '</div>';\n }\n $id = $this->getId();\n \n if($id != '')\n {\n $ret .= \"<input type='hidden' name='is_form_{$id}_sent' value='yes' />\";\n }\n \n $ret .= '<input type=\"hidden\" name=\"is_form_sent\" value=\"yes\" />';\n $ret .= '</form>';\n\n if($this->ajaxSubmit)\n {\n $elements = $this->getFields();\n $ajaxData = array();\n foreach($elements as $element)\n {\n $id = $element->getId();\n if($element->getStorable())\n {\n $ajaxData[] = \"'\".urlencode($id).\"='+document.getElementById('$id').\".($element->getType()==\"Field\"?\"value\":\"checked\");\n }\n $validations = $element->getJsValidations();\n $validators .= \"if(!fapiValidate('$id',$validations)) error = true;\\n\";\n }\n $ajaxData[] = \"'fapi_dt=\".urlencode($this->getDatabaseTable()).\"'\";\n $ajaxData = addcslashes(implode(\"+'&'+\", $ajaxData),\"\\\\\");\n\n $ret .=\n \"<script type='text/javascript'>\n function $onclickFunction\n {\n var error = false;\n $validators\n if(error == false)\n {\n \\$.ajax({\n type : 'POST',\n url : '{$this->ajaxAction}',\n data : $ajaxData\n });\n }\n }\n </script>\";\n }\n return $ret;\n }", "function pnFormRender($module)\n {\n // Construct and make normal Smarty use possible\n $this->pnRender($module, false);\n array_push($this->plugins_dir, \"system/pnForm/plugins\");\n\n // Setup\n $this->pnFormIdCount = 1;\n $this->pnFormErrorMsgSet = false;\n $this->pnFormPlugins = array();\n $this->pnFormBlockStack = array();\n $this->pnFormRedirected = false;\n\n $this->pnFormValidators = array();\n $this->pnFormValidationChecked = false;\n $this->_pnFormIsValid = null;\n\n $this->pnFormInitializeState();\n $this->pnFormInitializeIncludes();\n }", "public function formForget()\n {\n $this->view->addForget();\n }", "public function beforeRender(){\n\n //render edit form with actual values from database\n $component_iterator = $this->getComponent(\"editForm\")->getComponents();\n $componenty = iterator_to_array($component_iterator);\n\n if ($this->actualListingValues != null){\n \n $optArray = $this->postageOptions;\n $postageCounter = $priceCounter = 0;\n \n foreach ($componenty as $comp){\n switch($comp->name){\n \n case 'product_name':\n $comp->setValue($this->actualListingValues['product_name']);\n break;\n case 'product_desc':\n $comp->setValue($this->actualListingValues['product_desc']);\n break;\n case 'price':\n $comp->setValue($this->actualListingValues['price']);\n break;\n case 'ships_from':\n $comp->setValue($this->actualListingValues['ships_from']);\n break;\n case 'ships_to';\n $comp->setValue($this->actualListingValues['ships_to']);\n break;\n case 'product_type':\n $comp->setValue($this->actualListingValues['ships_to']);\n break;\n case (strpos($comp->name, \"postage\")):\n //render all postage options into correct textboxes\n if (array_key_exists($postageCounter, $optArray)){\n $comp->setValue($optArray[$postageCounter]['option']);\n $postageCounter++;\n }\n break; \n case (strpos($comp->name, \"pprice\")):\n //render postage prices into correct textboxes\n if (array_key_exists($priceCounter, $optArray)){\n $comp->setValue($optArray[$priceCounter]['price']);\n $priceCounter++; \n } \n break; \n }\n }\n }\n \n $urlPath = $this->URL->path;\n \n //template variables shared between templates\n if ( strpos($urlPath, \"edit\" )|| strpos($urlPath, \"view\") \n || strpos($urlPath, \"buy\")){\n \n $lst = $this->hlp->sess(\"listing\");\n $imgs = $this->hlp->sess(\"images\");\n $this->template->listingDetails = $lst->listingDetails;\n $this->template->listingImages = $imgs->listingImages;\n }\n }", "public abstract function render($update = false);", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitB2binpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "function commercebox_feature_injection_form_submit($form, &$form_state) {\n views_invalidate_cache();\n}", "public function renderView(){ \n if ($this->hlp->sess(\"listing\")->render){\n $this->template->renderBuyForm = TRUE;\n }\n }", "public function rebuild()\n\t{\n\t\t$id=3;\n\t\t$dataAlbum = $this->admin->data_album($id);\n\t\t$namaAlbum = $dataAlbum->row()->nama_album;\n\t\t$albumKey = $dataAlbum->row()->kode_album;\n\t\t$data['title'] = \"Dashboard | FaceVoting Versi 1.0\";\n\t\t$data['getRebuild']= $this->_prosesRebuild($namaAlbum,$albumKey);\n\t\t$view ='v_rebuildalbum';\n\t\t$this->_template($data,$view);\n\t}", "public function refreshFormSubmission(){\r\n\t\t\t$this->load->model('gs_admission/ajax_base_model', 'AB');\r\n\t\t\t$data[\"school_lists\"] = $this->AB->school_id();\r\n\t\t\t$data[\"grade_lists\"] = $this->AB->grade_id();\r\n\t\t\t$this->load->view('gs_admission/submission/empty_form',$data);\r\n\t\t}", "public function buildForm()\n {\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMClModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMyeticketsModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function getRevalidate() : bool {\n return $this->revalidate;\n }", "public function renderForm()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-gears'\n ),\n 'input' => array(\n array(),\n array(\n 'type' => 'text',\n 'label' => $this->l('API Key'),\n 'name' => 'SEND_SMS_API',\n 'desc' => $this->l('The API Key is used to authenticate in order to send SMS.'),\n 'required' => true\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Admin Mobile Number'),\n 'name' => 'ADMIN_MOBILE',\n 'required' => true\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save')\n )\n )\n );\n $fields_form = $this->setDefaultInput($fields_form);\n $helper = new HelperForm();\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));\n $helper->default_form_language = $lang->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG')\n ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;\n $this->fields_form = array();\n $helper->id = (int) Tools::getValue('id_carrier');\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'btnSubmit';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false);\n $helper->currentIndex .= '&configure=' . $this->name . '&tab_module=' . $this->tab;\n $helper->currentIndex .= '&module_name=' . $this->name;\n $helper->currentIndex .= '&configuration=yes';\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n \n return $helper->generateForm(array(\n $fields_form\n ));\n }", "public function recycle(){\n $qry = new InvokePostMethodQuery($this->getResourcePath(),\"recycle\");\n $this->getContext()->addQuery($qry);\n }", "function renderConfigForm() {\n\t}", "public function renderForm()\n {\n\n $table = \"luda_resource_has_tag\";\n $identifier = \"Light_Kit_Admin_UserData.generated/luda_resource_has_tag\";\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_base\";\n $vars = [\n \"title\" => \"Resource has tag form\",\n ];\n if (array_key_exists(\"solo\", $_GET)) {\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_solo\";\n $vars['related_links'] = []; // cancel any existing related links\n $this->setOnSuccessIframeSignal(\"done\");\n }\n\n $form = $this->processForm($identifier, $table);\n\n\n\n //--------------------------------------------\n // RENDERING\n //--------------------------------------------\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_form', [\n \"parent_layout\" => $parentLayout,\n \"form\" => $form,\n ], PageConfUpdator::create()->updateWidget(\"body.lka_chloroform\", [\n 'vars' => $vars,\n ]));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit'.$this->name;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "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 gform_pre_render( $form ) {\n\n\t\treturn $this->hide_form_if_user_already_submitted( $form );\n\n\t}", "protected function _render()\n {\n }", "public function indexAction() {\n // (first) sub form\n if (!$form = $this->getCurrentSubForm()) {\n $form = $this->getNextSubForm();\n }\n\n //Zend_Debug::dump($form);\n //$form->setDecorators(array(array('ViewScript', array('viewScript' => 'formScript.phtml'))));\n //$this->view->form = $this->getForm()->prepareSubForm($form);\n $form = $this->getForm()->prepareSubForm($form);\n $this->view->form = $form;\n }", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n $output .= $this->admin_language_tab(); //have to start language tab from here on\n $output .= $this->admin_language_tab_start();\n\n $all_languages = LanguageHelper::all_languages();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $output .= Text::get([\n 'name' => 'title_'.$lang->slug,\n 'label' => __('Title'),\n 'value' => $widget_saved_values['title_' . $lang->slug] ?? null,\n ]);\n $output .= $this->admin_language_tab_content_end();\n }\n\n $output .= $this->admin_language_tab_end(); //have to end language tab\n\n $output .= Repeater::get([\n 'multi_lang' => true,\n 'settings' => $widget_saved_values,\n 'id' => 'contact_page_contact_info_01',\n 'fields' => [\n [\n 'type' => RepeaterField::TEXT,\n 'name' => 'title',\n 'label' => __('Title')\n ],\n [\n 'type' => RepeaterField::TEXTAREA,\n 'name' => 'description',\n 'label' => __('Details'),\n 'info' => __('new line count as a separate text')\n ],\n [\n 'type' => RepeaterField::ICON_PICKER,\n 'name' => 'icon',\n 'label' => __('Icon')\n ]\n ]\n ]);\n $output .= Select::get([\n 'name' => 'custom_form_id',\n 'label' => __('Custom Form'),\n 'placeholder' => __('Select form'),\n 'options' => FormBuilder::all()->pluck('title','id')->toArray(),\n 'value' => $widget_saved_values['custom_form_id'] ?? []\n ]);\n $output .= Slider::get([\n 'name' => 'padding_top',\n 'label' => __('Padding Top'),\n 'value' => $widget_saved_values['padding_top'] ?? 120,\n 'max' => 500,\n ]);\n $output .= Slider::get([\n 'name' => 'padding_bottom',\n 'label' => __('Padding Bottom'),\n 'value' => $widget_saved_values['padding_bottom'] ?? 120,\n 'max' => 500,\n ]);\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('reverbsync/reverbsync_field/save'),\n 'method' => 'post',\n\t\t\t\t\t'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n\t\t$model = $this->_coreRegistry->registry('reverbsync_field_mapping');\n\t\t$fieldset = $form->addFieldset(\n 'base_fieldset',\n array('legend' => __('Magento-Reverb Field Mapping'), 'class'=>'fieldset-wide')\n );\n\t\t\n\t\tif ($model->getMappingId()) {\n $fieldset->addField(\n\t\t\t\t'mapping_id',\n\t\t\t\t'hidden', \n\t\t\t\t['name' => 'mapping_id']\n\t\t\t);\n }\n\t\t$fieldset->addField(\n 'magento_attribute_code',\n 'select',\n [\n\t\t\t\t'name' => 'magento_attribute_code', \n\t\t\t\t'label' => __('Magento Attribute'), \n\t\t\t\t'title' => __('Magento Attribute Code'),\n\t\t\t\t'values' => $this->_productAttribute->toOptionArray(),\n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$fieldset->addField(\n 'reverb_api_field',\n 'text',\n [\n\t\t\t\t'name' => 'reverb_api_field', \n\t\t\t\t'label' => __('Reverb API Field'), \n\t\t\t\t'title' => __('Reverb API Field'), \n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function beforerender() {\n parent::beforeRender();\n $this->Meta->data();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitTwispayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function _setForm()\n\t{\t\n\t\t$controller = $this->getActionController();\n\t\t\n\t\t$this->_setViewFormData($controller)\n\t\t\t ->_setViewErrors($controller)\n\t\t\t ->_setViewWarnings($controller);\n\t\t\t\n\t}", "public function populateForm() {}", "public function build() { $this->form_built = TRUE; return $this; }", "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}", "function onSubscriptionFormRender($userparams, $cache)\n\t{\n\t\t$level = $cache['id'];\n\t\tif(in_array($level, $this->addLevels)) {\n\t\t\t// Current value of the field\n\t\t\tif(array_key_exists('projectfork', $cache['custom'])) {\n\t\t\t\t$current = $cache['custom']['projectfork'];\n\t\t\t} else {\n\t\t\t\tif(!is_object($userparams->params)) {\n\t\t\t\t\t$current = '';\n\t\t\t\t} else {\n\t\t\t\t\t$current = property_exists($userparams->params, 'projectfork') ? $userparams->params->projectfork : '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($current)) {\n\t\t\t\t// Take the existing title if the project already exists\n\t\t\t\t$user_id = $userparams->user_id;\n\t\t\t\t$current = $this->getProjectTitle($user_id, $level);\n\t\t\t}\n\t\t\t$html = '<input type=\"text\" name=\"custom[projectfork]\" id=\"projectfork\" value=\"'.htmlentities($current).'\" />';\n\n\t\t\t// Setup the field\n\t\t\t$pf_field[] = array(\n\t\t\t\t'id'\t\t\t=> 'projectfork',\n\t\t\t\t'label'\t\t\t=> JText::_('PLG_AKEEBASUBS_PROJECTFORK4_SUBSCRIPTIONFORM_TITLE'),\n\t\t\t\t'elementHTML'\t=> $html,\n\t\t\t\t'invalidLabel'\t=> JText::_('COM_AKEEBASUBS_LEVEL_ERR_REQUIRED'),\n\t\t\t\t'isValid'\t\t=> true\n\t\t\t);\n\t\t\treturn $pf_field;\n\t\t}\n\t}", "public function form()\n {\n $this->setData();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_weatherModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function validateForm() {\n\n\t\t$validated_ok = $this->adapter->revalidate();\n\n\t\treturn !$validated_ok;\n\t}", "public function render()\n {\n echo htmlspecialcharsbx($this->getPrefix());\n $action = $this->getAction();\n $id = $this->getId();\n $class = $this->getClass();\n $name = $this->getName();\n $dataAttributes = $this->getDataAttributes();\n $dataAttributesString = '';\n foreach ($dataAttributes as $key => $value) {\n $dataAttributesString .= ' data-' . $key . '=\"' . $value . '\" ';\n }\n\n $formArguments = 'action=\"' . (($action !== null) ? $action : '#') . '\" ';\n $formArguments .= ($id !== null) ? 'id=\"' . $id . '\" ' : '';\n $formArguments .= !empty($class) ? 'class=\"' . implode(' ', $class) . '\" ' : '';\n $formArguments .= ($name !== null) ? 'name=\"' . $name . '\" ' : '';\n $formArguments .= $dataAttributesString;\n echo '<form ' . $formArguments . '>';\n\n $fields = $this->getFields();\n foreach ($fields as $key => $field) {\n $field->render();\n }\n\n echo '</form>';\n\n echo htmlspecialcharsbx($this->getPostfix());\n }", "public function xforms() {\n\t\t\n\t\t/* Load Model */\n\t\t$forms = $this->getModel ( 'form' );\n\t\t\n\t\t/* Get all rows */\n\t\t$forms->getAll ();\n\t\t\n\t\tif (! count ( $forms->rows )) {\n\t\t\t$this->_redirect ( '_newForm' );\n\t\t\treturn;\n\t\t}\n\t\t/* set the view file (optional) */\n\t\t$this->setView ( 'forms' );\n\t\t\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t\n\t}", "public function renderForm()\n {\n $formUnit = $this->interActor->formUnit($this->inputHandler->getArrayMap());\n\n $view = new \\View\\Model(\n \\View\\Customer::form($formUnit),\n $this->inputHandler->routeArrayMap()\n );\n return $view->render();\n }", "public function render()\n {\n return $this->getFormCreator()->render();\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Div')->class('row')\n\t\t\t\t->add($oDivLeft = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-7 left-block'))\n\t\t\t\t->add($oDivRight = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-5 right-block'))\n\t\t\t);\n\n\t\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Script')\n\t\t\t\t->value('\n\t\t\t\t\t$(function(){\n\t\t\t\t\t\tvar timer = setInterval(function(){\n\t\t\t\t\t\t\tif ($(\"#' . $windowId . ' .left-block\").height())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclearInterval(timer);\n\n\t\t\t\t\t\t\t\t$(\"#' . $windowId . ' .right-block\").find(\"#' . $windowId . '_notes\").slimscroll({\n\t\t\t\t\t\t\t\t\theight: $(\"#' . $windowId . ' .left-block\").height() - 75,\n\t\t\t\t\t\t\t\t\tcolor: \"rgba(0, 0, 0, 0.3)\",\n\t\t\t\t\t\t\t\t\tsize: \"5px\"\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t});\n\t\t\t\t'));\n\n\t\t$oDivLeft\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow4 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t;\n\n\t\t$oDivRight\n\t\t\t->add($oMainRowRight1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$sColorValue = ($this->_object->id && $this->getField('color')->value)\n\t\t\t? $this->getField('color')->value\n\t\t\t: '#aebec4';\n\n\t\t$this->getField('color')\n\t\t\t->colorpicker(TRUE)\n\t\t\t->value($sColorValue);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('name')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow1)\n\t\t\t->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12'))->rows(10), $oMainRow2)\n\t\t\t->move($this->getField('datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('deadline')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('color')->set('data-control', 'hue')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6')), $oMainRow4)\n\t\t\t->move($this->getField('completed')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6 margin-top-21')), $oMainRow4);\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$countNotes = $this->_object->Crm_Notes->getCount()\n\t\t\t? '<span class=\"badge badge-palegreen\">' . $this->_object->Crm_Notes->getCount() . '</span>'\n\t\t\t: '';\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"tabbable\">\n\t\t\t<ul class=\"nav nav-tabs tabs-flat\" id=\"crmProjectTabs\">\n\t\t\t\t<li class=\"active\">\n\t\t\t\t\t<a data-toggle=\"tab\" href=\"#<?php echo $windowId?>_notes\" data-path=\"/admin/crm/project/note/index.php\" data-window-id=\"<?php echo $windowId?>_notes\" data-additional=\"crm_project_id=<?php echo $this->_object->id?>\">\n\t\t\t\t\t\t<?php echo Core::_(\"Crm_Project.tabNotes\")?> <?php echo $countNotes?>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<div class=\"tab-content tabs-flat\">\n\t\t\t\t<div id=\"<?php echo $windowId?>_notes\" class=\"tab-pane in active\">\n\t\t\t\t\t<?php\n\t\t\t\t\tAdmin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->controller($this->_Admin_Form_Controller)\n\t\t\t\t\t\t->id(\"crm-project-notes\")\n\t\t\t\t\t\t->add(\n\t\t\t\t\t\t\t$this->_object->id\n\t\t\t\t\t\t\t\t? $this->_addNotes()\n\t\t\t\t\t\t\t\t: Admin_Form_Entity::factory('Code')->html(\n\t\t\t\t\t\t\t\t\tCore_Message::get(Core::_('Crm_Project.enable_after_save'), 'warning')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->execute();\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\t$oMainRowRight1->add(Admin_Form_Entity::factory('Div')\n\t\t\t->class('form-group col-xs-12 margin-top-20')\n\t\t\t->add(\n\t\t\t\tAdmin_Form_Entity::factory('Code')\n\t\t\t\t\t->html(ob_get_clean())\n\t\t\t)\n\t\t);\n\n\t\t$this->title($this->_object->id\n\t\t\t? Core::_('Crm_Project.edit_title', $this->_object->name, FALSE)\n\t\t\t: Core::_('Crm_Project.add_title')\n\t\t);\n\n\t\treturn $this;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitStatsProfitMarginModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function execute()\n\t{\n\t\t$opf = Opl_Registry::get('opf');\n\n\t\t$this->invokeEvent('preInit');\n\t\t$this->onInit();\n\t\t$this->invokeEvent('postInit');\n\n\t\t// Validate the input data.\n\t\t$data = $this->_retrieveData();\n\n\t\t// Decide, if the form has been sent to us.\n\t\tif($_SERVER['REQUEST_METHOD'] == $this->_method && isset($data[$opf->formInternalId]))\n\t\t{\n\t\t\t// Get the internal data and remove them from the \"official\" scope.\n\t\t\t$internals = $data[$opf->formInternalId];\n\t\t\tunset($data[$opf->formInternalId]);\n\n\t\t\t// The names must match.\n\t\t\tif(isset($internals['name']) && $internals['name'] == $this->_name)\n\t\t\t{\n\t\t\t\t$this->_step = 0;\n\t\t\t\tif(isset($internals['step']))\n\t\t\t\t{\n\t\t\t\t\t$this->_step = (integer)$internals['step'];\n\t\t\t\t}\n\t\t\t\t$tracker = $this->getTracker();\n\t\t\t\t$tracker->setSequence($this);\n\t\t\t\t$current = 0;\n\t\t\t\twhile($current < $this->_step)\n\t\t\t\t{\n\t\t\t\t\t// Get the current form and advance the placeholder pointer.\n\t\t\t\t\t$form = $this->getNextSubform();\n\n\t\t\t\t\t// Attempt to ensure that the tracked data are still valid.\n\t\t\t\t\t$formData = $tracker->retrieve($internals, $current);\n\t\t\t\t\t$current++;\n\n\t\t\t\t\t$state = $form->_validate($formData);\n\t\t\t\t\tif(!$state)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_step = $current;\n\t\t\t\t\t\t$this->_state = $form->_state = self::ERROR;\n\t\t\t\t\t\t$form->populate($data);\n\t\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t\t$this->_onRender($this->_view);\n\t\t\t\t\t\t$this->invokeEvent('preRender');\n\t\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t\t$form->onRender();\n\t\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\t\t$this->invokeEvent('postRender');\n\t\t\t\t\t\treturn $this->_state;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$form = $this->getNextSubform();\n\t\t\t\t// Now, the currently displayed form.\n\t\t\t\t$state = $form->_validate($data);\n\t\t\t\tif(!$state)\n\t\t\t\t{\n\t\t\t\t\t$this->_state = $form->_state = self::ERROR;\n\t\t\t\t\t$form->populate($data);\n\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t$form->onRender();\n\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tracker->track($data, $current);\n\t\t\t\t\t$form->_state = self::ACCEPTED;\n\t\t\t\t}\n\t\t\t\t// Decide, what to do next: display another form or return\n\t\t\t\t$this->_step++;\n\t\t\t\tif(($form = $this->getNextSubform()) === false)\n\t\t\t\t{\n\t\t\t\t\t$this->_state = self::ACCEPTED;\n\t\t\t\t\t$this->invokeEvent('preAccept');\n\t\t\t\t\t$this->onAccept();\n\t\t\t\t\t$this->invokeEvent('postAccept');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_state = $form->_state = self::RENDER;\n\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t$this->_onRender($this->_view);\n\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t$form->onRender();\n\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$form = $this->getNextSubform();\n\t\t$this->_state = $form->_state = self::RENDER;\n\t\t$form->_onRender($this->_view);\n\t\t$this->_onRender($this->_view);\n\t\t$form->invokeEvent('preRender');\n\t\t$form->onRender();\n\t\t$form->invokeEvent('postRender');\n\t\treturn $this->_state;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_spentModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function RenderBegin($blnDisplayOutput = true) {\r\n\t\t\tswitch ($this->intFormStatus) {\r\n\t\t\t\tcase QFormBase::FormStatusUnrendered:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase QFormBase::FormStatusRenderBegun:\r\n\t\t\t\tcase QFormBase::FormStatusRenderEnded:\r\n\t\t\t\t\tthrow new QCallerException('$this->RenderBegin() has already been called');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new QCallerException('FormStatus is in an unknown status');\r\n\t\t\t}\r\n\r\n\t\t\t// Update FormStatus\r\n\t\t\t$this->intFormStatus = QFormBase::FormStatusRenderBegun;\r\n\r\n\t\t\t// Iterate through the form's ControlArray to Define FormAttributes and JavaScriptIncludes\r\n\t\t\t$strJavaScriptArray = array();\r\n\t\t\t$strFormAttributeArray = array();\r\n\t\t\tforeach ($this->GetAllControls() as $objControl) {\r\n\t\t\t\t// JavaScript Includes? The control would have a\r\n\t\t\t\t// comma-delimited list of javascript files to include (if applicable)\r\n\t\t\t\tif ($objControl->JavaScripts) {\r\n\t\t\t\t\t$strScriptArray = explode(',', $objControl->JavaScripts);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($strScriptArray) foreach ($strScriptArray as $strScript) {\r\n\t\t\t\t\t\tif (trim($strScript))\r\n\t\t\t\t\t\t\t$strJavaScriptArray[trim($strScript)] = $strScript;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Form Attributes?\r\n\t\t\t\tif ($objControl->FormAttributes) {\r\n\t\t\t\t\t$strFormAttributeArray = array_merge($strFormAttributeArray, $objControl->FormAttributes);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Create $strFormAttributes\r\n\t\t\t$strFormAttributes = '';\r\n\t\t\tforeach ($strFormAttributeArray as $strKey=>$strValue) {\r\n\t\t\t\t$strFormAttributes .= sprintf(' %s=\"%s\"', $strKey, $strValue);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$strOutputtedText = strtolower(trim(ob_get_contents()));\r\n\t\t\tif (strpos($strOutputtedText, '<body') === false) {\r\n\t\t\t\t$strToReturn = '<body>';\r\n\t\t\t\t$this->blnRenderedBodyTag = true;\r\n\t\t\t} else\r\n\t\t\t\t$strToReturn = '';\r\n\r\n\t\t\t// Setup Rendered HTML\r\n//\t\t\t$strToReturn .= sprintf('<form method=\"post\" name=\"%s\" id=\"%s\" action=\"%s\"%s>', $this->strFormId, $this->strFormId, QApplication::$RequestUri, $strFormAttributes);\r\n\t\t\t$strToReturn .= sprintf('<form method=\"post\" id=\"%s\" autocomplete=\"off\" action=\"%s\"%s>', $this->strFormId, QApplication::$RequestUri, $strFormAttributes);\r\n\r\n\t\t\t// Call in JavaScript\r\n\t\t\t$strToReturn .= sprintf('<script type=\"text/javascript\" src=\"%s%s/includes/qcodo/qform_objects/_form.js\"></script>', DOCROOT_VIRTUAL_DIRECTORY, DOCROOT_SUBFOLDER);\r\n\r\n\t\t\t// Call in OTHER JavaScripts (if any)\r\n\t\t\tforeach ($strJavaScriptArray as $strScript)\r\n\t\t\t\t$strToReturn .= sprintf('<script type=\"text/javascript\" src=\"%s%s/includes/qform/assets/%s\"></script>', DOCROOT_VIRTUAL_DIRECTORY, DOCROOT_SUBFOLDER, $strScript);\r\n\r\n\t\t\t// Perhaps a strFormModifiers as an array to\r\n\t\t\t// allow controls to update other parts of the form, like enctype, onsubmit, etc.\r\n\r\n\t\t\t// Return or Display\r\n\t\t\tif ($blnDisplayOutput) {\r\n\t\t\t\tprint ($strToReturn);\r\n\t\t\t\treturn null;\r\n\t\t\t} else\r\n\t\t\t\treturn $strToReturn;\r\n\t\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public function renderFormClose()\n {\n if ( !empty( $this->viewState ) )\n $this->renderInput( 'hidden', '__viewState', $this->saveViewState() );\n echo \"</div></form>\\n\";\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}", "protected function render(){\n //render view\n \n }", "function render(){\n \t\treturn parent::render();\n \t}", "function _renderForm($data) {\n\t\t$user = JFactory::getUser ();\n\t\t\n\t\t$vars = new JObject ();\n\t\t\n\t\t$html = $this->_getLayout ( 'form', $vars );\n\t\t\n\t\treturn $html;\n\t}", "function _renderForm($data) {\n\t\t$user = JFactory::getUser ();\n\t\t\n\t\t$vars = new JObject ();\n\t\t\n\t\t$html = $this->_getLayout ( 'form', $vars );\n\t\t\n\t\treturn $html;\n\t}", "public function Refresh($blnReload = false) {\n\t\t\tif ($blnReload)\n\t\t\t\t$this->objFichas->Reload();\n\n\t\t\tif ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objFichas->Id;\n\n\t\t\tif ($this->lstIdMarcaObject) {\n\t\t\t\t\t$this->lstIdMarcaObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstIdMarcaObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objIdMarcaObjectArray = Marcas::LoadAll();\n\t\t\t\tif ($objIdMarcaObjectArray) foreach ($objIdMarcaObjectArray as $objIdMarcaObject) {\n\t\t\t\t\t$objListItem = new QListItem($objIdMarcaObject->__toString(), $objIdMarcaObject->Id);\n\t\t\t\t\tif (($this->objFichas->IdMarcaObject) && ($this->objFichas->IdMarcaObject->Id == $objIdMarcaObject->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstIdMarcaObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblIdMarca) $this->lblIdMarca->Text = ($this->objFichas->IdMarcaObject) ? $this->objFichas->IdMarcaObject->__toString() : null;\n\n\t\t\tif ($this->lstIdTiposObject) {\n\t\t\t\t\t$this->lstIdTiposObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstIdTiposObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objIdTiposObjectArray = Tipos::LoadAll();\n\t\t\t\tif ($objIdTiposObjectArray) foreach ($objIdTiposObjectArray as $objIdTiposObject) {\n\t\t\t\t\t$objListItem = new QListItem($objIdTiposObject->__toString(), $objIdTiposObject->Id);\n\t\t\t\t\tif (($this->objFichas->IdTiposObject) && ($this->objFichas->IdTiposObject->Id == $objIdTiposObject->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstIdTiposObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblIdTipos) $this->lblIdTipos->Text = ($this->objFichas->IdTiposObject) ? $this->objFichas->IdTiposObject->__toString() : null;\n\n\t\t\tif ($this->lstIdModeloObject) {\n\t\t\t\t\t$this->lstIdModeloObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstIdModeloObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objIdModeloObjectArray = Modelo::LoadAll();\n\t\t\t\tif ($objIdModeloObjectArray) foreach ($objIdModeloObjectArray as $objIdModeloObject) {\n\t\t\t\t\t$objListItem = new QListItem($objIdModeloObject->__toString(), $objIdModeloObject->IdModelo);\n\t\t\t\t\tif (($this->objFichas->IdModeloObject) && ($this->objFichas->IdModeloObject->IdModelo == $objIdModeloObject->IdModelo))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstIdModeloObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblIdModelo) $this->lblIdModelo->Text = ($this->objFichas->IdModeloObject) ? $this->objFichas->IdModeloObject->__toString() : null;\n\n\t\t\tif ($this->lstIdVersionObject) {\n\t\t\t\t\t$this->lstIdVersionObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstIdVersionObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objIdVersionObjectArray = Version::LoadAll();\n\t\t\t\tif ($objIdVersionObjectArray) foreach ($objIdVersionObjectArray as $objIdVersionObject) {\n\t\t\t\t\t$objListItem = new QListItem($objIdVersionObject->__toString(), $objIdVersionObject->IdVersion);\n\t\t\t\t\tif (($this->objFichas->IdVersionObject) && ($this->objFichas->IdVersionObject->IdVersion == $objIdVersionObject->IdVersion))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstIdVersionObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblIdVersion) $this->lblIdVersion->Text = ($this->objFichas->IdVersionObject) ? $this->objFichas->IdVersionObject->__toString() : null;\n\n\t\t\tif ($this->lstIdPaisObject) {\n\t\t\t\t\t$this->lstIdPaisObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstIdPaisObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objIdPaisObjectArray = Paises::LoadAll();\n\t\t\t\tif ($objIdPaisObjectArray) foreach ($objIdPaisObjectArray as $objIdPaisObject) {\n\t\t\t\t\t$objListItem = new QListItem($objIdPaisObject->__toString(), $objIdPaisObject->Id);\n\t\t\t\t\tif (($this->objFichas->IdPaisObject) && ($this->objFichas->IdPaisObject->Id == $objIdPaisObject->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstIdPaisObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblIdPais) $this->lblIdPais->Text = ($this->objFichas->IdPaisObject) ? $this->objFichas->IdPaisObject->__toString() : null;\n\n\t\t\tif ($this->txtIdSeguro) $this->txtIdSeguro->Text = $this->objFichas->IdSeguro;\n\t\t\tif ($this->lblIdSeguro) $this->lblIdSeguro->Text = $this->objFichas->IdSeguro;\n\n\t\t\tif ($this->txtIdServicio) $this->txtIdServicio->Text = $this->objFichas->IdServicio;\n\t\t\tif ($this->lblIdServicio) $this->lblIdServicio->Text = $this->objFichas->IdServicio;\n\t\t\t\n\t\t\tif ($this->txtMoneda) $this->txtMoneda->Text = $this->objFichas->Moneda;\n\t\t\tif ($this->lblMoneda) $this->lblMoneda->Text = $this->objFichas->IdMoneda;\n\t\t\t\n\t\t\t\n\t\t\tif ($this->txtDescripcion) $this->txtDescripcion->Text = $this->objFichas->Descripcion;\n\t\t\tif ($this->lblDescripcion) $this->lblDescripcion->Text = $this->objFichas->Descripcion;\n\n\t\t\tif ($this->txtPrecio) $this->txtPrecio->Text = $this->objFichas->Precio;\n\t\t\tif ($this->lblPrecio) $this->lblPrecio->Text = $this->objFichas->Precio;\n\n\t\t\tif ($this->txtAnio) $this->txtAnio->Text = $this->objFichas->Anio;\n\t\t\tif ($this->lblAnio) $this->lblAnio->Text = $this->objFichas->Anio;\n\n\t\t\tif ($this->txtCombustible) $this->txtCombustible->Text = $this->objFichas->Combustible;\n\t\t\tif ($this->lblCombustible) $this->lblCombustible->Text = $this->objFichas->Combustible;\n\n\t\t\tif ($this->txtCilindrada) $this->txtCilindrada->Text = $this->objFichas->Cilindrada;\n\t\t\tif ($this->lblCilindrada) $this->lblCilindrada->Text = $this->objFichas->Cilindrada;\n\n\t\t\tif ($this->txtCilindros) $this->txtCilindros->Text = $this->objFichas->Cilindros;\n\t\t\tif ($this->lblCilindros) $this->lblCilindros->Text = $this->objFichas->Cilindros;\n\n\t\t\tif ($this->txtPotenciaMaxima) $this->txtPotenciaMaxima->Text = $this->objFichas->PotenciaMaxima;\n\t\t\tif ($this->lblPotenciaMaxima) $this->lblPotenciaMaxima->Text = $this->objFichas->PotenciaMaxima;\n\n\t\t\tif ($this->txtParMotorTorque) $this->txtParMotorTorque->Text = $this->objFichas->ParMotorTorque;\n\t\t\tif ($this->lblParMotorTorque) $this->lblParMotorTorque->Text = $this->objFichas->ParMotorTorque;\n\n\t\t\tif ($this->txtPosicion) $this->txtPosicion->Text = $this->objFichas->Posicion;\n\t\t\tif ($this->lblPosicion) $this->lblPosicion->Text = $this->objFichas->Posicion;\n\n\t\t\tif ($this->txtAlimentacion) $this->txtAlimentacion->Text = $this->objFichas->Alimentacion;\n\t\t\tif ($this->lblAlimentacion) $this->lblAlimentacion->Text = $this->objFichas->Alimentacion;\n\n\t\t\tif ($this->txtMotorShort) $this->txtMotorShort->Text = $this->objFichas->MotorShort;\n\t\t\tif ($this->lblMotorShort) $this->lblMotorShort->Text = $this->objFichas->MotorShort;\n\n\t\t\tif ($this->txtValvulas) $this->txtValvulas->Text = $this->objFichas->Valvulas;\n\t\t\tif ($this->lblValvulas) $this->lblValvulas->Text = $this->objFichas->Valvulas;\n\n\t\t\tif ($this->txtTipo) $this->txtTipo->Text = $this->objFichas->Tipo;\n\t\t\tif ($this->lblTipo) $this->lblTipo->Text = $this->objFichas->Tipo;\n\n\t\t\tif ($this->txtMarchas) $this->txtMarchas->Text = $this->objFichas->Marchas;\n\t\t\tif ($this->lblMarchas) $this->lblMarchas->Text = $this->objFichas->Marchas;\n\n\t\t\tif ($this->txtTraccion) $this->txtTraccion->Text = $this->objFichas->Traccion;\n\t\t\tif ($this->lblTraccion) $this->lblTraccion->Text = $this->objFichas->Traccion;\n\n\t\t\tif ($this->txtVelocidadMaxima) $this->txtVelocidadMaxima->Text = $this->objFichas->VelocidadMaxima;\n\t\t\tif ($this->lblVelocidadMaxima) $this->lblVelocidadMaxima->Text = $this->objFichas->VelocidadMaxima;\n\n\t\t\tif ($this->txtAceleracion0100) $this->txtAceleracion0100->Text = $this->objFichas->Aceleracion0100;\n\t\t\tif ($this->lblAceleracion0100) $this->lblAceleracion0100->Text = $this->objFichas->Aceleracion0100;\n\n\t\t\tif ($this->txtConsumoUrbano) $this->txtConsumoUrbano->Text = $this->objFichas->ConsumoUrbano;\n\t\t\tif ($this->lblConsumoUrbano) $this->lblConsumoUrbano->Text = $this->objFichas->ConsumoUrbano;\n\n\t\t\tif ($this->txtConsumoInterurbano) $this->txtConsumoInterurbano->Text = $this->objFichas->ConsumoInterurbano;\n\t\t\tif ($this->lblConsumoInterurbano) $this->lblConsumoInterurbano->Text = $this->objFichas->ConsumoInterurbano;\n\n\t\t\tif ($this->txtConsumoMixto) $this->txtConsumoMixto->Text = $this->objFichas->ConsumoMixto;\n\t\t\tif ($this->lblConsumoMixto) $this->lblConsumoMixto->Text = $this->objFichas->ConsumoMixto;\n\n\t\t\tif ($this->txtPuertas) $this->txtPuertas->Text = $this->objFichas->Puertas;\n\t\t\tif ($this->lblPuertas) $this->lblPuertas->Text = $this->objFichas->Puertas;\n\n\t\t\tif ($this->txtPlazas) $this->txtPlazas->Text = $this->objFichas->Plazas;\n\t\t\tif ($this->lblPlazas) $this->lblPlazas->Text = $this->objFichas->Plazas;\n\n\t\t\tif ($this->txtFilasDeAsientos) $this->txtFilasDeAsientos->Text = $this->objFichas->FilasDeAsientos;\n\t\t\tif ($this->lblFilasDeAsientos) $this->lblFilasDeAsientos->Text = $this->objFichas->FilasDeAsientos;\n\n\t\t\tif ($this->txtInfoEjes) $this->txtInfoEjes->Text = $this->objFichas->InfoEjes;\n\t\t\tif ($this->lblInfoEjes) $this->lblInfoEjes->Text = $this->objFichas->InfoEjes;\n\n\t\t\tif ($this->txtPeso) $this->txtPeso->Text = $this->objFichas->Peso;\n\t\t\tif ($this->lblPeso) $this->lblPeso->Text = $this->objFichas->Peso;\n\n\t\t\tif ($this->txtCapacidadBaul) $this->txtCapacidadBaul->Text = $this->objFichas->CapacidadBaul;\n\t\t\tif ($this->lblCapacidadBaul) $this->lblCapacidadBaul->Text = $this->objFichas->CapacidadBaul;\n\n\t\t\tif ($this->txtCapacidadTanque) $this->txtCapacidadTanque->Text = $this->objFichas->CapacidadTanque;\n\t\t\tif ($this->lblCapacidadTanque) $this->lblCapacidadTanque->Text = $this->objFichas->CapacidadTanque;\n\n\t\t\tif ($this->txtCapacidadCarga) $this->txtCapacidadCarga->Text = $this->objFichas->CapacidadCarga;\n\t\t\tif ($this->lblCapacidadCarga) $this->lblCapacidadCarga->Text = $this->objFichas->CapacidadCarga;\n\n\t\t\tif ($this->txtFrenosDelanteros) $this->txtFrenosDelanteros->Text = $this->objFichas->FrenosDelanteros;\n\t\t\tif ($this->lblFrenosDelanteros) $this->lblFrenosDelanteros->Text = $this->objFichas->FrenosDelanteros;\n\n\t\t\tif ($this->txtFrenosTraseros) $this->txtFrenosTraseros->Text = $this->objFichas->FrenosTraseros;\n\t\t\tif ($this->lblFrenosTraseros) $this->lblFrenosTraseros->Text = $this->objFichas->FrenosTraseros;\n\n\t\t\tif ($this->txtNeumaticos) $this->txtNeumaticos->Text = $this->objFichas->Neumaticos;\n\t\t\tif ($this->lblNeumaticos) $this->lblNeumaticos->Text = $this->objFichas->Neumaticos;\n\n\t\t\tif ($this->txtSuspensionDelantera) $this->txtSuspensionDelantera->Text = $this->objFichas->SuspensionDelantera;\n\t\t\tif ($this->lblSuspensionDelantera) $this->lblSuspensionDelantera->Text = $this->objFichas->SuspensionDelantera;\n\n\t\t\tif ($this->txtSuspensionTrasera) $this->txtSuspensionTrasera->Text = $this->objFichas->SuspensionTrasera;\n\t\t\tif ($this->lblSuspensionTrasera) $this->lblSuspensionTrasera->Text = $this->objFichas->SuspensionTrasera;\n\n\t\t\tif ($this->lstIdEstadoObject) {\n\t\t\t\t\t$this->lstIdEstadoObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstIdEstadoObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objIdEstadoObjectArray = Estados::LoadAll();\n\t\t\t\tif ($objIdEstadoObjectArray) foreach ($objIdEstadoObjectArray as $objIdEstadoObject) {\n\t\t\t\t\t$objListItem = new QListItem($objIdEstadoObject->__toString(), $objIdEstadoObject->Id);\n\t\t\t\t\tif (($this->objFichas->IdEstadoObject) && ($this->objFichas->IdEstadoObject->Id == $objIdEstadoObject->Id))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstIdEstadoObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblIdEstado) $this->lblIdEstado->Text = ($this->objFichas->IdEstadoObject) ? $this->objFichas->IdEstadoObject->__toString() : null;\n\n\t\t\tif ($this->chkProcesada) $this->chkProcesada->Checked = $this->objFichas->Procesada;\n\t\t\tif ($this->lblProcesada) $this->lblProcesada->Text = ($this->objFichas->Procesada) ? QApplication::Translate('Yes') : QApplication::Translate('No');\n\n\t\t}", "public function render ()\r\n\t{\r\n\t\t$this->decorate(); // decorate bofore render\r\n\t\treturn parent::render();\r\n\t}", "function renderWholeForm() {\n\t\t$output = $this->renderCurrentStep();\n\t\t$output .= $this->renderSubmitButtons();\n\n\t\treturn $this->wrapWithForm ($output);\n\t}", "public function preRender()\n {\n }", "public function preRender()\n {\n }" ]
[ "0.7193632", "0.69183314", "0.61419123", "0.60782564", "0.5925603", "0.59230065", "0.5920741", "0.5748224", "0.57376385", "0.5657635", "0.5573895", "0.5536717", "0.55123013", "0.549581", "0.5471474", "0.54503703", "0.5428482", "0.5414958", "0.54090816", "0.5375595", "0.5362937", "0.53419304", "0.5340902", "0.5339753", "0.53211707", "0.53097105", "0.53059757", "0.5304808", "0.52943027", "0.52869713", "0.52826416", "0.52716404", "0.5264575", "0.5262188", "0.5250318", "0.5245516", "0.52368647", "0.52331215", "0.52322406", "0.5226399", "0.5215828", "0.5198597", "0.519827", "0.519196", "0.51757634", "0.5173394", "0.5170497", "0.51693416", "0.5161808", "0.5157814", "0.51544553", "0.5153428", "0.51501304", "0.51447", "0.5143553", "0.5139592", "0.5139404", "0.51250774", "0.5124669", "0.5117908", "0.5111788", "0.5110922", "0.5097245", "0.5094427", "0.50874203", "0.5082379", "0.50801384", "0.5077616", "0.507555", "0.5074584", "0.5062417", "0.5053906", "0.5047803", "0.50450575", "0.50405973", "0.5033033", "0.5032653", "0.50289935", "0.502746", "0.50191754", "0.50132626", "0.50006384", "0.49925208", "0.4991456", "0.4978422", "0.49765825", "0.49734908", "0.49624297", "0.49608427", "0.49569413", "0.49559265", "0.4953932", "0.49529776", "0.49488607", "0.49488607", "0.49293068", "0.49274662", "0.49274015", "0.49256188", "0.49256188" ]
0.7392372
0
BizForm::ReRenderSubForms() rerender sub forms who has dependecy on this form. This method is called when parent form's change affect the sub forms
protected function ReRenderSubForms() { if (!$this->m_SubForms) return; $this->m_ActiveRecord = $this->GetActiveRecord(); global $g_BizSystem; $mode = $this->GetDisplayMode()->GetMode(); foreach($this->m_SubForms as $subForm) { $formObj = $g_BizSystem->GetObjectFactory()->GetObject($subForm); $formObj->SetPostActionOff(); if ($mode == MODE_N) { // parent form on new mode $formObj->SetPrtCommitPending(true); } else { $formObj->SetPrtCommitPending(false); $dataObj = $this->GetDataObj()->GetRefObject($formObj->m_DataObjName); if ($dataObj) $formObj->SetDataObj($dataObj); } // force the active row on the first row $formObj->SetActiveRecordId(null); $formObj->ReRender(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ReRender($redrawForm=true, $hasRecordChange=true)\n\t{\n\t if ($this->m_ReRenderOn == false)\n\t return;\n\t \n\t // consider the postAction\n\t $postAction = $this->GetPostAction();\n if ($postAction) {\n $this->HandlePostAction($postAction);\n return;\n }\n\n global $g_BizSystem;\n if ($redrawForm)\n {\n if ($g_BizSystem->GetClientProxy()->HasFormRerendered($this->m_Name) == false)\n\t $g_BizSystem->GetClientProxy()->ReDrawForm($this->m_Name, $this->RenderHTML());\n }\n\t if ($hasRecordChange)\n\t {\n\t $this->ReRenderSubForms();\n\t }\n\t return;\n\t}", "public function Render()\n\t{\n\t // when in NEW mode or when parent form in NEW mode, do nothing\n\t global $g_BizSystem;\n\t $prtMode = \"\";\n\t if ($this->m_ParentFormName) {\n $prtForm = $g_BizSystem->GetObjectFactory()->GetObject($this->m_ParentFormName);\n $prtMode = $prtForm->GetDisplayMode()->GetMode();\n\t }\n\t if ($this->m_Mode != MODE_N && $prtMode != MODE_N)\n\t {\n \t // get view history\n \t if (!$this->m_NoHistoryInfo)\n\t $this->SetHistoryInfo($g_BizSystem->GetSessionContext()->GetViewHistory($this->m_Name));\n\t }\n\t if ($this->m_Mode == MODE_N)\n $this->UpdateActiveRecord($this->GetDataObj()->NewRecord());\n\n //Moved the renderHTML function infront of declaring subforms\n $renderedHTML = $this->RenderHTML();\n\n\t global $g_BizSystem;\n\t // prepare the subforms' dataobjs, since the subform relates to parent form by dataobj association\n\t if ($this->m_SubForms) {\n \t foreach($this->m_SubForms as $subForm) {\n $formObj = $g_BizSystem->GetObjectFactory()->GetObject($subForm);\n $dataObj = $this->GetDataObj()->GetRefObject($formObj->m_DataObjName);\n if ($dataObj)\n $formObj->SetDataObj($dataObj);\n }\n\t }\n\t $this->SetClientScripts();\n\n return $renderedHTML;\n\t}", "#[BeforeReRender]\n public function submitFormOnRender(): void\n {\n if (!$this->getFormInstance()->isSubmitted()) {\n $this->submitForm(false);\n }\n }", "public function setSubFormDecorators(Zend_Form_SubForm $subForm)\r\n {\r\n $subForm->setDecorators(array('FormElements',\r\n array('HtmlTag', \r\n array('tag' => 'dl',\r\n 'class' => 'zend_form')),\r\n 'Form',\r\n ));\r\n \r\n \r\n //if ($subForm->getName() == 'basic_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'devotees/addNewDevotee.phtml')),\r\n// ));\r\n// \r\n// }\r\n// \r\n// if ($subForm->getName() == 'personal_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'devotees/addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n//\r\n// if ($subForm->getName() == 'address_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n// \r\n// if ($subForm->getName() == 'family_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n// \r\n// if ($subForm->getName() == 'education_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n// \r\n// if ($subForm->getName() == 'office_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n// \r\n// if ($subForm->getName() == 'devotional_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n// \r\n// if ($subForm->getName() == 'services_info') {\r\n// $subForm->setDecorators(array('PrepareElements',\r\n// array('ViewScript', \r\n// array('viewScript' => 'addNewDevotee.phtml')),\r\n// ));\r\n//\r\n// }\r\n\r\n return $this;\r\n }", "public function updateForms()\n {\n $this->updateSubmitForms();\n $this->updateSearchForms();\n $this->updateSearchFields();\n $this->updateFeaturedFormFields();\n $this->updateTitlesFormFields();\n $this->updateShortFormFields();\n $this->updateSortingFormFields();\n }", "protected function regenerateFormControls()\n\t{\n\t\t$form = $this->getForm();\n\n\t\t// regenerate checker's checkbox controls\n\t\tif ($this->hasOperations()) {\n\t\t\t$values = $form->getValues();\n\n\t\t\t$form->removeComponent($form['checker']);\n\t\t\t$sub = $form->addContainer('checker');\n\t\t\tforeach ($this->getRows() as $row) {\n\t\t\t\t$sub->addCheckbox($row[$this->keyName], $row[$this->keyName]);\n\t\t\t}\n\n\t\t\tif (!empty($values['checker'])) {\n\t\t\t\t$form->setDefaults(array('checker' => $values['checker']));\n\t\t\t}\n\t\t}\n\n\t\t// for selectbox filter controls update values if was filtered over column\n\t\tif ($this->hasFilters()) {\n\t\t\tparse_str($this->filters, $list);\n\n\t\t\tforeach ($this->getFilters() as $filter) {\n\t\t\t\tif ($filter instanceof SelectboxFilter) {\n\t\t\t\t\t$filter->generateItems();\n\t\t\t\t}\n\n\t\t\t\tif ($this->filters === $this->defaultFilters && ($filter->value !== NULL || $filter->value !== '')) {\n\t\t\t\t\tif (!in_array($filter->getName(), array_keys($list))) $filter->value = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// page input & items selectbox\n\t\t$form['page']->setValue($this->paginator->page); // intentionally page from paginator\n\t\t$form['items']->setValue($this->paginator->itemsPerPage);\n\t}", "function RenderChildren() {\n if ($this->HasControls()) {\n foreach($this->Controls as $control) {\n $control->Render();\n }\n }\n }", "private function loadSubWidgets()\n {\n $subWidgets = [];\n // get widgets for the fields\n foreach ($this->fields as $index => $field) :\n $subWidgets[$index] = $field->widget;\n endforeach;\n\n $this->widget->setSubWidgets($subWidgets);\n }", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Div')->class('row')\n\t\t\t\t->add($oDivLeft = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-7 left-block'))\n\t\t\t\t->add($oDivRight = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-5 right-block'))\n\t\t\t);\n\n\t\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Script')\n\t\t\t\t->value('\n\t\t\t\t\t$(function(){\n\t\t\t\t\t\tvar timer = setInterval(function(){\n\t\t\t\t\t\t\tif ($(\"#' . $windowId . ' .left-block\").height())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclearInterval(timer);\n\n\t\t\t\t\t\t\t\t$(\"#' . $windowId . ' .right-block\").find(\"#' . $windowId . '_notes\").slimscroll({\n\t\t\t\t\t\t\t\t\theight: $(\"#' . $windowId . ' .left-block\").height() - 75,\n\t\t\t\t\t\t\t\t\tcolor: \"rgba(0, 0, 0, 0.3)\",\n\t\t\t\t\t\t\t\t\tsize: \"5px\"\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t});\n\t\t\t\t'));\n\n\t\t$oDivLeft\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow4 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t;\n\n\t\t$oDivRight\n\t\t\t->add($oMainRowRight1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$sColorValue = ($this->_object->id && $this->getField('color')->value)\n\t\t\t? $this->getField('color')->value\n\t\t\t: '#aebec4';\n\n\t\t$this->getField('color')\n\t\t\t->colorpicker(TRUE)\n\t\t\t->value($sColorValue);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('name')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow1)\n\t\t\t->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12'))->rows(10), $oMainRow2)\n\t\t\t->move($this->getField('datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('deadline')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('color')->set('data-control', 'hue')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6')), $oMainRow4)\n\t\t\t->move($this->getField('completed')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6 margin-top-21')), $oMainRow4);\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$countNotes = $this->_object->Crm_Notes->getCount()\n\t\t\t? '<span class=\"badge badge-palegreen\">' . $this->_object->Crm_Notes->getCount() . '</span>'\n\t\t\t: '';\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"tabbable\">\n\t\t\t<ul class=\"nav nav-tabs tabs-flat\" id=\"crmProjectTabs\">\n\t\t\t\t<li class=\"active\">\n\t\t\t\t\t<a data-toggle=\"tab\" href=\"#<?php echo $windowId?>_notes\" data-path=\"/admin/crm/project/note/index.php\" data-window-id=\"<?php echo $windowId?>_notes\" data-additional=\"crm_project_id=<?php echo $this->_object->id?>\">\n\t\t\t\t\t\t<?php echo Core::_(\"Crm_Project.tabNotes\")?> <?php echo $countNotes?>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<div class=\"tab-content tabs-flat\">\n\t\t\t\t<div id=\"<?php echo $windowId?>_notes\" class=\"tab-pane in active\">\n\t\t\t\t\t<?php\n\t\t\t\t\tAdmin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->controller($this->_Admin_Form_Controller)\n\t\t\t\t\t\t->id(\"crm-project-notes\")\n\t\t\t\t\t\t->add(\n\t\t\t\t\t\t\t$this->_object->id\n\t\t\t\t\t\t\t\t? $this->_addNotes()\n\t\t\t\t\t\t\t\t: Admin_Form_Entity::factory('Code')->html(\n\t\t\t\t\t\t\t\t\tCore_Message::get(Core::_('Crm_Project.enable_after_save'), 'warning')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->execute();\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\t$oMainRowRight1->add(Admin_Form_Entity::factory('Div')\n\t\t\t->class('form-group col-xs-12 margin-top-20')\n\t\t\t->add(\n\t\t\t\tAdmin_Form_Entity::factory('Code')\n\t\t\t\t\t->html(ob_get_clean())\n\t\t\t)\n\t\t);\n\n\t\t$this->title($this->_object->id\n\t\t\t? Core::_('Crm_Project.edit_title', $this->_object->name, FALSE)\n\t\t\t: Core::_('Crm_Project.add_title')\n\t\t);\n\n\t\treturn $this;\n\t}", "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\n $subform = new Dnna_Form_SubFormBase($this->_view);\n // Επιλογή Έργου/Υποέργου\n $subform->addSubForm(new Application_Form_Subforms_SubProjectSelect(array('required' => true), $this->_view), 'subproject', false);\n // Επιλογή Δικαιούχου\n $subsubform = new Dnna_Form_SubFormBase();\n if($this->_aitisi != null && $this->_aitisi->get_recipientauthor() != null) {\n $employee = array($this->_aitisi->get_recipientauthor()->get_recordid() => $this->_aitisi->get_recipientauthor()->__toString());\n } else {\n $employee = array();\n }\n if($this->_aitisi != null && $this->_aitisi->get_recipientcontractor() != null) {\n $contractor = array($this->_aitisi->get_recipientcontractor()->get_recordid() => $this->_aitisi->get_recipientcontractor()->__toString());\n } else {\n $contractor = array();\n }\n $subsubform->addElement('select', 'recordid', array(\n 'label' => 'Δικαιούχος (Σύμβαση):',\n 'registerInArrayValidator' => false,\n 'multiOptions' => $employee,\n ));\n $subform->addSubForm($subsubform, 'recipientauthor', false);\n $subsubform = new Dnna_Form_SubFormBase();\n $subsubform->addElement('select', 'recordid', array(\n 'label' => 'Δικαιούχος (Σύμβαση):',\n 'registerInArrayValidator' => false,\n 'multiOptions' => $contractor,\n ));\n $subform->addSubForm($subsubform, 'recipientcontractor', false);\n // Ποσό Εντολής (€):\n $subform->addElement('text', 'amount', array(\n 'label' => 'Ποσό Εντολής (€):',\n 'required' => true,\n 'validators' => array(\n array('validator' => 'Float')\n ),\n 'class' => 'formatFloat',\n ));\n // Είδος Πληρωμής\n $subform->addElement('select', 'type', array(\n 'required' => true,\n 'label' => 'Είδος Πληρωμής:',\n 'multiOptions' => Aitiseis_Model_EntoliPliromis::getConstantAsArray('TYPE')\n ));\n // Είδος Παραστατικού (αν το είδος πληρωμής είναι Αμοιβή)\n $subform->addElement('select', 'vouchertype', array(\n 'required' => true,\n 'label' => 'Είδος Παραστατικού:',\n 'multiOptions' => Aitiseis_Model_EntoliPliromis::getConstantAsArray('VOUCHERTYPE')\n ));\n // Υποτύπος (αν το είδος ΔΕΝ είναι Αμοιβή)\n $subform->addElement('select', 'subtype', array(\n 'label' => 'Τύπος:',\n 'multiOptions' => Aitiseis_Model_EntoliPliromis::getConstantAsArray('SUBTYPE')\n ));\n // Αιτιολογία\n $subform->addElement('textarea', 'reasoning', 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 'required' => true,\n ));\n // Κωδικός Λογιστικής\n $subform->addElement('text', 'acccode', array(\n 'label' => 'Κωδικός Λογιστικής:',\n )\n );\n // Κατηγορία δαπάνης (από την σχετική λίστα)\n $subform->addElement('select', 'expenditurecategory', array(\n 'label' => 'Κατηγορία Δαπάνης:',\n 'required' => true,\n 'multiOptions' => Application_Model_Repositories_Lists::getListAsArray('Application_Model_Lists_ExpenditureCategory')\n ));\n // Τρόπος Πληρωμής\n $subform->addElement('select', 'paymentmethod', array(\n 'required' => true,\n 'label' => 'Τρόπος Πληρωμής:',\n 'multiOptions' => Aitiseis_Model_EntoliPliromis::getConstantAsArray('PAYMENTMETHOD')\n ));\n // Τραπεζικός λογαριασμός δικαιούχου\n $subform->addElement('text', 'recbankaccount', array(\n 'label' => 'Τραπεζικός λογαριασμός δικαιούχου:',\n ));\n\n $this->addSubForm($subform, 'default');\n // Επιλογή παραδοτέων\n $this->addDeliverableFields($subform);\n\n $this->addSubmitFields();\n }", "function InitChildControls() {\n }", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n $output .= $this->admin_language_tab(); //have to start language tab from here on\n $output .= $this->admin_language_tab_start();\n\n $all_languages = LanguageHelper::all_languages();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $output .= Text::get([\n 'name' => 'title_'.$lang->slug,\n 'label' => __('Title'),\n 'value' => $widget_saved_values['title_' . $lang->slug] ?? null,\n ]);\n $output .= $this->admin_language_tab_content_end();\n }\n\n $output .= $this->admin_language_tab_end(); //have to end language tab\n\n $output .= Repeater::get([\n 'multi_lang' => true,\n 'settings' => $widget_saved_values,\n 'id' => 'contact_page_contact_info_01',\n 'fields' => [\n [\n 'type' => RepeaterField::TEXT,\n 'name' => 'title',\n 'label' => __('Title')\n ],\n [\n 'type' => RepeaterField::TEXTAREA,\n 'name' => 'description',\n 'label' => __('Details'),\n 'info' => __('new line count as a separate text')\n ],\n [\n 'type' => RepeaterField::ICON_PICKER,\n 'name' => 'icon',\n 'label' => __('Icon')\n ]\n ]\n ]);\n $output .= Select::get([\n 'name' => 'custom_form_id',\n 'label' => __('Custom Form'),\n 'placeholder' => __('Select form'),\n 'options' => FormBuilder::all()->pluck('title','id')->toArray(),\n 'value' => $widget_saved_values['custom_form_id'] ?? []\n ]);\n $output .= Slider::get([\n 'name' => 'padding_top',\n 'label' => __('Padding Top'),\n 'value' => $widget_saved_values['padding_top'] ?? 120,\n 'max' => 500,\n ]);\n $output .= Slider::get([\n 'name' => 'padding_bottom',\n 'label' => __('Padding Bottom'),\n 'value' => $widget_saved_values['padding_bottom'] ?? 120,\n 'max' => 500,\n ]);\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "public function resetForm()\n\t{\n\t\tparent::resetForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}", "private function cacheGetRestoreRelations(fapitng_FormBase $parent) {\n foreach ($parent->children as $element) {\n $element->form = $this;\n $element->form = $parent;\n $this->cacheGetRestoreRelations($element);\n }\n }", "public function indexAction() {\n // (first) sub form\n if (!$form = $this->getCurrentSubForm()) {\n $form = $this->getNextSubForm();\n }\n\n //Zend_Debug::dump($form);\n //$form->setDecorators(array(array('ViewScript', array('viewScript' => 'formScript.phtml'))));\n //$this->view->form = $this->getForm()->prepareSubForm($form);\n $form = $this->getForm()->prepareSubForm($form);\n $this->view->form = $form;\n }", "function action_index()\n\t{\n\t\t$subforms = array(\n\t\t\t\\Artefacts\\Subform_Description::forge(),\n\t\t\t\\Artefacts\\Subform_Owner::forge(),\n\t\t\t\\Artefacts\\Subform_File::forge(),\n\t\t\t\\Quotes\\Subform_Worksub::forge(),\n\t\t\t\\Quotes\\Subform_Quote::forge(),\n \\Receipts\\Subform_Receipt::forge(),\n \\Jobs\\Subform_Jobs::forge(),\n \\Invoices\\Subform_Invoices::forge(),\n \\Files\\Subform_Files::forge()\n\t\t);\n\n\t\t$vsubforms = array();\n\t\tforeach($subforms as $subform)\n\t\t{\n\t\t\tif(isset($vsubforms[$subform->get_prefix()]))\n\t\t\t{\n\t\t\t\tthrow new \\FuelException('Specified subform prefix already exists in subform test.');\n\t\t\t}\n\t\t\t$vsubforms[$subform->get_prefix()] = $subform->render(); \n\t\t}\n\n\t\t//update\n\t\tif(\\Input::post('save'))\n\t\t{\n\t\t\tforeach ($subforms as $subform) \n\t\t\t{\n\t\t\t\t$subform->update(\\Input::post($subform->get_prefix()));\n\t\t\t}\n\t\t}\n \n\n\t\tif (\\Input::post('save') ) \n\t\t{\n\t\t\tif(\\Input::param('lock'))\n {\n //return \\Message::set('error', 'Form locked has been changed'); \n $tab = \\Input::param('lock');\n \\Response::redirect(\\Uri::create('mainform/index/?tab='.$tab.'&quote_id='.$_GET['quote_id']));\n }else{\n return \\Message::set('success', 'Successfully saved..!') . \\Response::redirect(\\Uri::create('mainform/index/?tab=0&quote_id='.$_GET['quote_id']));\n } \n }\n \n if ( \\Input::post('cancel')) \n\t\t{\n\t\t\treturn \\Response::redirect(Helper_App::url_from_tab(\\Input::get('active_tab')));\n \n\t\t}\n\n\t\t$view = \\View::forge('mainform');\n if(\\Input::param('wind')){\n $this->set_iframe_template();\n }\n\t\t$view->set('subforms', $vsubforms, false);\n\t\t$this->template->body_classes = array('contact_un');\n\t\t$this->template->content = $view;\t\t\n\t}", "function initChildrenRecursive() {\n $this->initChildControls();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n $control->initChildrenRecursive();\n }\n }\n\n }", "public function updateSearchForms()\n {\n global $config, $rlListingTypes, $reefless, $rlDb;\n\n if (!$config['cache']) {\n return false;\n }\n\n $sql = \"SELECT `T1`.`Category_ID`, `T1`.`Group_ID`, `T1`.`Fields`, \";\n $sql .= \"`T2`.`Key` AS `Group_key`, `T2`.`Display`, \";\n $sql .= \"`T3`.`Type` AS `Listing_type`, `T3`.`Key` AS `Form_key`, `T3`.`With_picture` \";\n $sql .= \"FROM `{db_prefix}search_forms_relations` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}listing_groups` AS `T2` ON `T1`.`Group_ID` = `T2`.`ID` AND `T2`.`Status` = 'active' \";\n $sql .= \"LEFT JOIN `{db_prefix}search_forms` AS `T3` ON `T1`.`Category_ID` = `T3`.`ID` \";\n $sql .= \"WHERE `T3`.`Status` = 'active' \";\n $sql .= \"ORDER BY `Position` \";\n\n $GLOBALS['rlHook']->load('phpCacheUpdateSearchFormsGetRelations', $sql); // >= v4.3\n\n $relations = $rlDb->getAll($sql);\n\n if (!$relations) {\n $out = array(1);\n }\n\n $reefless->loadClass('Categories');\n\n /* populate field information */\n foreach ($relations as $key => $value) {\n if (!$value) {\n continue;\n }\n\n $sql = \"SELECT `ID`, `Key`, `Type`, `Default`, `Values`, `Condition`, CONCAT('listing_fields+name+', `Key`) AS `pName`, \";\n $sql .= \"`Multilingual`, `Opt1`, `Opt2`, 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);\n\n if ($value['Group_key']) {\n $relations[$key]['pName'] = 'listing_groups+name+' . $value['Group_key'];\n }\n $relations[$key]['Fields'] = empty($fields) ? false : $GLOBALS['rlCommon']->fieldValuesAdaptation($fields, 'listing_fields', $value['Listing_type']);\n\n $out[$value['Form_key']][] = $relations[$key];\n }\n\n $GLOBALS['rlHook']->load('phpCacheUpdateSearchFormsBeforeSave', $out, $relations); // >= v4.3\n\n unset($relations);\n\n $this->set('cache_search_forms', $out);\n }", "function rebound_form_alter(&$form, &$form_state) {\n $form['comment_body']['#after_build'][] = 'rebound_customize_form';\n\t\n\tif($form['#node']->type == \"guild_application\") {\n\t\t$form['body']['#after_build'][] = 'rebound_customize_form';\n\t\t$form['application_references']['#after_build'][] = 'rebound_customize_form';\n\t\t$form['application_raid_experience']['#after_build'][] = 'rebound_customize_form';\n\t\t$form['application_raid_availablity']['#after_build'][] = 'rebound_customize_form';\n\t}\n\n}", "function loadRecursive() {\n $this->ControlOnLoad();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count ; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n $control->loadRecursive();\n }\n }\n $this->_state = WEB_CONTROL_LOADED;\n }", "public function indexAction()\n {\n // (first) sub form\n\t\tZend_Session::namespaceUnset($this->_namespace);\t\t// Delete all former forms datas\n\t\t\n if (!$form = $this->getCurrentSubForm()) {\n $form = $this->getNextSubForm();\n }\n $this->view->form = $this->getForm()->prepareSubForm($form);\n }", "public function init()\n {\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PersonalDetails(), 'subform_personaldetails');\n \t$this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_DataProtection(), 'subform_dataprotection');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_CorrespondenceDetails(), 'subform_correspondencedetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_InsuredAddress(), 'subform_insuredaddress');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_PolicyDetails(), 'subform_policydetails');\n $this->addSubForm(new LandlordsInsuranceQuote_Form_Subforms_IDD(), 'subform_idd');\n }", "public function render()\n {\n $root =& XCube_Root::getSingleton();\n $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);\n\n $renderTarget =& $renderSystem->createRenderTarget('main');\n\n $renderTarget->setAttribute('legacy_module', 'legacy');\n $renderTarget->setTemplateName('legacy_xoopsform_tableform.html');\n $renderTarget->setAttribute('form', $this);\n\n $renderSystem->render($renderTarget);\n\n return $renderTarget->getResult();\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/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 test_buildSubForm ( )\n {\n $form = new Rx_Form_Abstract;\n\n $result = $form->buildSubForm();\n\n $this->assertInstanceOf('Zend_Form_SubForm', $result);\n\n }", "function reload_form() {\n\tglobal $ROW, $ERROR_MESSAGE;\n\n\t// Only reload if it hasn't been reloaded already\n\tif ( $ERROR_MESSAGE && ( !isset($ROW[0]['STATUS']) || $ROW[0]['STATUS'] != 'RELOAD') ) {\n\t\t$ROW[0]=$_POST;\n\t\t$ROW[0]['STATUS']='RELOAD';\n\t\tLOG_MSG('INFO',\"reload_form(): ROW=[\".print_r($ROW,true).\"]\");\n\t}\n}", "function teligence_cart_errors_form_pre_render($form)\r\n{\r\n\tforeach((array)element_children($form) as $key)\r\n\t{\r\n\t\t//!strstr($key, '#') ? $form[$key]['#description'] .= \"Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\" : null;\r\n\t\t$form[$key]['#description'] .= \" Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\";\r\n\t\t\r\n\t\tif(substr($key, -8) == '_subject')\r\n\t\t{\r\n\t\t\t$subjectsibling = substr($key, 0, -8);\r\n\t\t\t$form['group_'.$subjectsibling] = array(\r\n\t\t\t\t'#title' => \"COMBO - \" . $subjectsibling,\r\n\t\t\t\t'#type' => 'fieldset',\r\n\t\t\t\t'#collapsible' => true,\r\n\t\t\t\t'#collapsed' => true,\r\n\t\t\t\t'#weight' => -100,\r\n\t\t\t);\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t}\r\n\t\tif($key == $subjectsibling)\r\n\t\t{\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t\tunset($subjectsibling);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\treturn $form;\r\n}", "function recursiveRender(){\n\t\tif( $this->folder_id === 0)\n\t\t\treturn parent::recursiveRender();\n\n\t\t// on click on new button open modal popup\n\t\t\t$js = [\n\t\t\t\t$this->js()->_selector('#'.$this->modal_popup->name)->modal(),\n\t\t\t\t$this->js()->_selector(\"#\".$this->modal_popup->name.\" .modal-header h4\")->text($this->js()->_selectorThis()->data('title')),\n\t\t\t\t$this->js()->_selector(\"#\".$this->modal_popup->name.\" #\".$this->field_new_type->name)->val($this->js()->_selectorThis()->data('documenttype'))\n\t\t\t];\n\t\t$this->action->js('click',$js)->_selector('li.xepan-new-document');\n\n\t\t// form submition handle\n\t\tif($this->form->isSubmitted()){\n\n\t\t\ttry{\n\t\t\t\t$this->api->db->beginTransaction();\n\t\t\t\t$document_model = $this->add('xepan\\hr\\Model_'.$this->form['add_new_document_type']);\n\t\t\t\t$document_model->createNew($this->form['name'],$this->form['folder_id']);\n\t\t\t\t$this->api->db->commit();\n\t\t\t}catch(Exception $e){\n\t\t\t\t$this->api->db->rollback();\n\t\t\t\t\n\t\t\t\t$this->form->js()->univ()->errorMessage('error occured '.$e->message())->execute();\n\t\t\t}\n\t\t\t$js = [$this->js()->_selector('#'.$this->modal_popup->name)->modal('toggle')];\n\t\t\t$this->form->js(null,$js)->univ()->successMessage(\"Added Successfully\")->execute();\n\t\t}\n\n\t\tparent::recursiveRender();\n\t}", "protected function buildRenderChildrenClosure() {}", "public function renderForeignRecordHeaderControl_postProcess(\n $parentUid,\n $foreignTable,\n array $childRecord,\n array $childConfig,\n $isVirtual,\n array &$controlItems\n ) {\n // registered empty to satisfy interface\n }", "public function renderForm() {\n\n $id_default_lang = $this->context->language->id;\n $id_shop = $this->context->shop->id;\n\n /* Render Form */\n $carousel_types = array(\n array(\n 'value' => 'featured',\n 'name' => $this->l('Featured products')\n ),\n array(\n 'value' => 'new',\n 'name' => $this->l('New products')\n ),\n array(\n 'value' => 'special',\n 'name' => $this->l('Special products')\n ),\n array(\n 'value' => 'category',\n 'name' => $this->l('All products from certain category')\n ),\n array(\n 'value' => 'custom',\n 'name' => $this->l('Custom products')\n )\n );\n\n // Get Categories\n $root_category = Category::getRootCategory($id_default_lang);\n $this->_getCategories($root_category->id_category, $id_shop);\n\n // Init Fields form array\n $this->fields_form = array(\n 'legend' => array(\n 'title' => $this->l('Carousel'),\n 'icon' => 'icon-cogs'\n ),\n // Inputs\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Title'),\n 'name' => 'title',\n 'desc' => $this->l('Must be less than 250 characters.'),\n 'size' => 50,\n 'required' => true,\n 'lang' => true\n ),\n array(\n 'type' => 'select',\n 'name' => 'carousel_type',\n 'label' => $this->l('Carousel Content'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $carousel_types,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'select',\n 'name' => 'select_category',\n 'label' => $this->l('Select a category'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $this->_categorySelect,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Add a product'),\n 'name' => 'product_autocomplete',\n 'size' => 50,\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Content'),\n 'name' => 'carousel_content',\n 'size' => 50\n ),\n ),\n // Submit Button\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'name' => 'saveProductCarousel'\n )\n );\n\n if (Shop::isFeatureActive()){\n $this->fields_form['input'][] = array(\n 'type' => 'shop',\n 'label' => $this->l('Shop association'),\n 'name' => 'checkBoxShopAsso',\n );\n }\n\n if (!($obj = $this->loadObject(true)))\n return;\n\n if ($obj && $obj->carousel_type == 'custom'){\n $carousel_content_products = array();\n $carousel_content = explode(',', $obj->carousel_content);\n\n foreach ($carousel_content as $pid) {\n $product = new Product($pid, false, $id_default_lang);\n $carousel_content_products[] = array(\n 'id' => $pid,\n 'name' => $product->name,\n 'ref' => $product->reference\n );\n }\n\n $this->tpl_form_vars['carousel_content_products'] = $carousel_content_products;\n }\n\n return parent::renderForm();\n }", "function layout_builder_post_update_layout_builder_dependency_change() {\n // Empty post-update hook.\n}", "public function getRender(){\n //Adiciona a funcionalidade para definir o campo que deve receber o foco inicial\n if($this->getCampoFoco() != null){\n $sFuncao = View::campoFocus($this->getCampoFoco()->getId());\n $this->addListener(Base::EVENTO_APOS_MONTAR, $sFuncao);\n }\n \n //Adiciona a funcionalidade que centraliza o formulário na tela\n if($this->getCentraliza()){\n $sFuncao = Base::getFuncaoCentraliza();\n $this->addListener(Base::EVENTO_MONTAR, $sFuncao);\n }\n \n //Adiciona a funcionalidade que indica que será possível arrastar o formulário\n if($this->getPermiteArrastar()){\n $sFuncao = Base::getFuncaoLimitaArrasto($this->getId(),$this->getRenderTo());\n $this->addListener(Base::EVENTO_MONTAR, $sFuncao);\n }\n \n $aRender = array(\n \"animCollapse\" => true,\n \"autoScroll\" => true,\n \"waitMsgTarget\" => true,\n \"bodyPadding\" => 10,\n \"iconCls\" => 'icon-form',\n \"border\" => $this->getAdicionaBorda(),\n //\"glyph\" => 36,\n \"layout\" => $this->getLayout(),\n \"id\" => $this->getId(),\n \"title\" => $this->getTitulo(),\n \"closable\" => $this->getPermiteFechar(),\n \"resizable\" => $this->getPermiteRedimensionar(),\n \"draggable\" => $this->getPermiteArrastar(),\n \"collapsible\" => $this->getPermiteRecolher(),\n \"height\" => $this->getAltura(),\n \"width\" => $this->getLargura(),\n \"html\" => $this->getHtml(),\n \"items\" => $this->getStringItemsLayout(),\n \"buttons\" => $this->getBotoes(),\n \"listeners\" => $this->getListeners(),\n \"reloadPreviousOnClose\" => $this->getReloadPreviousOnClose()\n );\n \n $oForm = \"Ext.create('Ext.panel.Panel', {\".Base::getRender($aRender).\"})\";\n \n return Base::addObj($oForm,$this->getRenderTo());\n }", "public function render_admin_form_children() {\n\t\tforeach ( array_keys( bp_xprofile_get_field_types() ) as $field_type ) {\n\t\t\t$type_obj = bp_xprofile_create_field_type( $field_type );\n\t\t\t$type_obj->admin_new_field_html( $this );\n\t\t}\n\t}", "public function saveForm()\n\t{\n\t\tparent::saveForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}", "function getDataCollectionForms()\n{\n $dataForms = array();\n foreach($this->getScreens() as $screenName => $screen){\n if('editscreen' == strtolower(get_class($screen))){\n //remove unnecessary properties?\n\n //filter out screens without editable fields (we might support screens with grids later)\n $fields = $screen->Fields;\n $dataFields = array();\n\n foreach($fields as $fieldName => $field){\n //determine which screen fields to show\n if($field->isEditable()){\n $moduleField = $this->ModuleFields[$fieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $field->nonSaving = true;\n break;\n }\n $field->phrase = $moduleField->phrase;\n $dataFields[$fieldName] = $field;\n }\n\t\t\t\tif(count($field->Fields) > 0){\n foreach($field->Fields as $subFieldName => $subField){\n\n if($subField->isEditable()){\n $moduleField = $this->ModuleFields[$subFieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $subField->nonSaving = true;\n break;\n }\n $subField->phrase = $moduleField->phrase;\n $dataFields[$subFieldName] = $subField;\n }\n }\n }\n }\n if(count($dataFields) > 0){\n $dataForms[$screenName]['phrase'] = $screen->phrase;\n $dataForms[$screenName]['fields'] = $dataFields;\n }\n if(count($screen->Grids) > 0){\n $grids = $screen->Grids;\n foreach($grids as $gridName => $grid){\n if('editgrid' == strtolower(get_class($grid)) && $grid->dataCollectionForm){\n $subModule =& $this->SubModules[$grid->moduleID];\n $gridFields = array();\n\n foreach($grid->FormFields as $fieldName => $field){\n //determine which screen fields to show\n if($field->isEditable()){\n $moduleField = $subModule->ModuleFields[$fieldName];\n switch(strtolower(get_class($moduleField))){\n case 'tablefield':\n case 'remotefield':\n\n break;\n default:\n //non-saving field\n $field->nonSaving = true;\n break;\n }\n $field->phrase = $moduleField->phrase;\n $gridFields[$fieldName] = $field;\n }\n }\n\n $dataForms[$screenName]['moduleName'] = $subModule->Name;\n $dataForms[$screenName]['phrase'] = $screen->phrase;\n $dataForms[$screenName]['sub'][$grid->moduleID] = array(\n $grid->phrase,\n $gridFields\n );\n\n }\n }\n }\n }\n }\n return $dataForms;\n}", "function GetForms($curchild = null)\r\n\t{\r\n\t\t$ret = null;\r\n\t\t$context = $curchild != null ? $this->ds->children[$curchild] : $this;\r\n\r\n\t\t$ci = Server::GetState($this->Name.'_ci');\r\n\t\t$ca = Server::GetVar($this->Name.'_ca');\r\n\r\n\t\t$frm = $this->GetForm($this->state, $curchild);\r\n\t\tif ($frm != null) $ret[] = $frm;\r\n\r\n\t\tif (isset($ci) && $ca == 'edit')\r\n\t\t{\r\n\t\t\tif (!empty($context->ds->children))\r\n\t\t\tforeach ($context->ds->children as $ix => $child)\r\n\t\t\t\tif (isset($child->ds->FieldInputs))\r\n\t\t\t\t\t$ret[] = $this->GetForm(STATE_CREATE, $ix);\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "public function hasSubForms()\n {\n return count($this->getSubForms()) > 0;\n }", "public function updateSubmitForms()\n {\n global $config, $rlDb;\n\n if (!$config['cache']) {\n return false;\n }\n\n $this->removeFiles('cache_submit_forms');\n\n /* submit forms cache */\n $sql = \"SELECT `T1`.`Group_ID`, `T1`.`ID`, `T2`.`ID` AS `Category_ID`, `T3`.`Key` AS `Key`, `T3`.`Display` AS `Display`, \";\n $sql .= \"`T1`.`Fields`, CONCAT('listing_groups+name+', `T3`.`Key`) AS `pName`, `T2`.`Type` AS `Listing_type` \";\n $sql .= \"FROM `{db_prefix}listing_relations` AS `T1` \";\n $sql .= \"LEFT JOIN `{db_prefix}categories` AS `T2` ON `T1`.`Category_ID` = `T2`.`ID` \";\n $sql .= \"LEFT JOIN `{db_prefix}listing_groups` AS `T3` ON `T1`.`Group_ID` = `T3`.`ID` \";\n $sql .= \"WHERE `T1`.`Group_ID` = '' OR `T3`.`Status` = 'active' \";\n $sql .= \"ORDER BY `T1`.`Position`\";\n\n $rows = $rlDb->getAll($sql);\n\n if (!$rows) {\n return false;\n }\n\n foreach ($rows as $key => $value) {\n if (!empty($value['Fields'])) {\n $sql = \"SELECT *, FIND_IN_SET(`ID`, '{$value['Fields']}') AS `Order`, \";\n $sql .= \"CONCAT('listing_fields+name+', `Key`) AS `pName`, CONCAT('listing_fields+description+', `Key`) AS `pDescription`, \";\n $sql .= \"CONCAT('listing_fields+default+', `Key`) AS `pDefault`, `Multilingual` \";\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 if (empty($fields)) {\n unset($rows[$key]);\n } else {\n $rows[$key]['Fields'] = $GLOBALS['rlCommon']->fieldValuesAdaptation($fields, 'listing_fields', $value['Listing_type']);\n }\n } else {\n $rows[$key]['Fields'] = false;\n }\n\n unset($field_ids, $fields, $field_info);\n\n // reassign to form, collect by category ID\n $set = count($form[$value['Category_ID']]) + 1;\n $index = $value['Key'] ? $value['Key'] : 'nogroup_' . $set;\n $form[$value['Category_ID']][$index] = $rows[$key];\n }\n\n unset($rows);\n\n $this->set('cache_submit_forms', $form);\n }", "public function __parentBeforeRender() {\r\n\t\treturn parent::beforeRender();\t\t\r\n\t}", "function _onRenderForm($tmp) {\n\t\t\n\t\t/* Show Page title */\n\t\tif ($this->_FORM_CONFIG ['showtitle'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_PAGE_TITLE', TRUE );\n\t\t}\n\t\t\n\t\t/* Show Reset Button */\n\t\tif ($this->_FORM_CONFIG ['showresetbutton'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_RESET_BUTTON', TRUE );\n\t\t}\n\t\t\n\t\t$tmp->assign ( 'RESETBUTTONTEXT', $this->_FORM_CONFIG ['resetbuttontext'] );\n\t\t$tmp->assign ( 'SUBMITBUTTONTEXT', $this->_FORM_CONFIG ['submitbuttontext'] );\n\t\t\n\t\treturn $tmp;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitKushkipagosModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n if(Currency::getDefaultCurrency()->iso_code=='COP'){\n return $helper->generateForm(array($this->getConfigFormCOP()));\n }else{\n return $helper->generateForm(array($this->getConfigForm()));\n }\n\n }", "function loadFromForm() \r\n {\t \t\r\n\t parent::loadFromForm();\r\n\t \r\n// \t $this->formName = $_REQUEST['form_name']; \t \r\n// \t \r\n// // \t echo 'Inside load_from_form of main page: <pre>'.print_r($this->formValues,true).'</pre><br>';\t \r\n// \t \r\n// \t\tswitch($this->formName) {\r\n// \t\t\t\r\n// \t\t\tcase 'basicStaffForm':\r\n// \t\t\t\t \r\n// \t\t\t\t$this->active_subPage = $this->basic_form;\t\r\n// \t\t\t\tbreak;\r\n// \t\t\tcase 'scheduledActivityForm':\r\n\r\n// \t\t\t\t$this->active_subPage = $this->optional_sheduled_activity_form;\t \r\n// \t\t\t\tbreak;\t\t\t\r\n// \t\t\tdefault:\r\n// \t\t\t\tdie('VALID FORM NAME **NOT** FOUND; name = '.$this->formName);\r\n// \t\t} \r\n// \t\t$this->active_subPage->loadFromForm(); \r\n// \t\t$this->form_submitted = true; \r\n \r\n }", "function modified()\r\n {\r\n if (!$this->isUpdating() && $this->_control!=null && ($this->_control->_controlstate & csLoading) != csLoading && $this->_control->_name != \"\")\r\n {\r\n $f=new Font();\r\n $fstring=$f->readFontString();\r\n\r\n $tstring=$this->readFontString();\r\n\r\n\r\n if ($this->_control->ParentFont)\r\n {\r\n $parent=$this->_control->Parent;\r\n if ($parent!=null) $fstring=$parent->Font->readFontString();\r\n }\r\n\r\n // check if font changed and if the ParentFont can be reset\r\n if ($fstring!=$tstring && $this->_control->DoParentReset)\r\n {\r\n $c=$this->_control;\r\n $c->ParentFont = 0;\r\n }\r\n\r\n if ($this->_control->methodExists(\"updateChildrenFonts\"))\r\n {\r\n $this->_control->updateChildrenFonts();\r\n }\r\n }\r\n }", "function onSubscriptionFormRender($userparams, $cache)\n\t{\n\t\t$level = $cache['id'];\n\t\tif(in_array($level, $this->addLevels)) {\n\t\t\t// Current value of the field\n\t\t\tif(array_key_exists('projectfork', $cache['custom'])) {\n\t\t\t\t$current = $cache['custom']['projectfork'];\n\t\t\t} else {\n\t\t\t\tif(!is_object($userparams->params)) {\n\t\t\t\t\t$current = '';\n\t\t\t\t} else {\n\t\t\t\t\t$current = property_exists($userparams->params, 'projectfork') ? $userparams->params->projectfork : '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($current)) {\n\t\t\t\t// Take the existing title if the project already exists\n\t\t\t\t$user_id = $userparams->user_id;\n\t\t\t\t$current = $this->getProjectTitle($user_id, $level);\n\t\t\t}\n\t\t\t$html = '<input type=\"text\" name=\"custom[projectfork]\" id=\"projectfork\" value=\"'.htmlentities($current).'\" />';\n\n\t\t\t// Setup the field\n\t\t\t$pf_field[] = array(\n\t\t\t\t'id'\t\t\t=> 'projectfork',\n\t\t\t\t'label'\t\t\t=> JText::_('PLG_AKEEBASUBS_PROJECTFORK4_SUBSCRIPTIONFORM_TITLE'),\n\t\t\t\t'elementHTML'\t=> $html,\n\t\t\t\t'invalidLabel'\t=> JText::_('COM_AKEEBASUBS_LEVEL_ERR_REQUIRED'),\n\t\t\t\t'isValid'\t\t=> true\n\t\t\t);\n\t\t\treturn $pf_field;\n\t\t}\n\t}", "function layout_builder_post_update_routing_entity_form() {\n // Empty post-update hook.\n}", "function evt__form_sub__modificacion($datos)\r\n\t{\r\n if($this->dep('datos')->tabla('subroga')->esta_cargada()){//es modificacion\r\n $sub=$this->dep('datos')->tabla('subroga')->get();\r\n if($datos['desde']!=$sub['desde']){\r\n $this->dep('datos')->tabla('subroga')->modif_desde($datos['desde'],$sub['id_cargo'],$sub['desde']);\r\n }\r\n } \r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n $this->dep('datos')->tabla('subroga')->set($datos);\r\n $this->dep('datos')->tabla('subroga')->sincronizar();\r\n \r\n toba::notificacion()->agregar('Se ha guardado correctamente', 'info');\r\n $this->s__mostrar_s=0;\r\n\t}", "public function postDispatch()\n {\n if ($this->_shouldRender()) {\n $this->render();\n }\n }", "protected function renderThenChild() {}", "private function gravity_forms_customizer() {\n\n\t\t//Init vars\n\t\t$file_path \t\t\t= get_template_directory() . \"/prso_framework/includes/gravity_forms_custom.php\";\n\t\t$child_file_path\t= get_stylesheet_directory() . \"/prso_framework/includes/gravity_forms_custom.php\";\n\n\t\tif( file_exists($child_file_path) ) {\n\n\t\t\trequire_once( $child_file_path ); //Child theme override\n\n\t\t} elseif( file_exists($file_path) ) {\n\n\t\t\trequire_once( $file_path );\n\n\t\t}\n\n\t}", "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('reverbsync/reverbsync_field/save'),\n 'method' => 'post',\n\t\t\t\t\t'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n\t\t$model = $this->_coreRegistry->registry('reverbsync_field_mapping');\n\t\t$fieldset = $form->addFieldset(\n 'base_fieldset',\n array('legend' => __('Magento-Reverb Field Mapping'), 'class'=>'fieldset-wide')\n );\n\t\t\n\t\tif ($model->getMappingId()) {\n $fieldset->addField(\n\t\t\t\t'mapping_id',\n\t\t\t\t'hidden', \n\t\t\t\t['name' => 'mapping_id']\n\t\t\t);\n }\n\t\t$fieldset->addField(\n 'magento_attribute_code',\n 'select',\n [\n\t\t\t\t'name' => 'magento_attribute_code', \n\t\t\t\t'label' => __('Magento Attribute'), \n\t\t\t\t'title' => __('Magento Attribute Code'),\n\t\t\t\t'values' => $this->_productAttribute->toOptionArray(),\n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$fieldset->addField(\n 'reverb_api_field',\n 'text',\n [\n\t\t\t\t'name' => 'reverb_api_field', \n\t\t\t\t'label' => __('Reverb API Field'), \n\t\t\t\t'title' => __('Reverb API Field'), \n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t$form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "public function beforeRender(){\n\n //render edit form with actual values from database\n $component_iterator = $this->getComponent(\"editForm\")->getComponents();\n $componenty = iterator_to_array($component_iterator);\n\n if ($this->actualListingValues != null){\n \n $optArray = $this->postageOptions;\n $postageCounter = $priceCounter = 0;\n \n foreach ($componenty as $comp){\n switch($comp->name){\n \n case 'product_name':\n $comp->setValue($this->actualListingValues['product_name']);\n break;\n case 'product_desc':\n $comp->setValue($this->actualListingValues['product_desc']);\n break;\n case 'price':\n $comp->setValue($this->actualListingValues['price']);\n break;\n case 'ships_from':\n $comp->setValue($this->actualListingValues['ships_from']);\n break;\n case 'ships_to';\n $comp->setValue($this->actualListingValues['ships_to']);\n break;\n case 'product_type':\n $comp->setValue($this->actualListingValues['ships_to']);\n break;\n case (strpos($comp->name, \"postage\")):\n //render all postage options into correct textboxes\n if (array_key_exists($postageCounter, $optArray)){\n $comp->setValue($optArray[$postageCounter]['option']);\n $postageCounter++;\n }\n break; \n case (strpos($comp->name, \"pprice\")):\n //render postage prices into correct textboxes\n if (array_key_exists($priceCounter, $optArray)){\n $comp->setValue($optArray[$priceCounter]['price']);\n $priceCounter++; \n } \n break; \n }\n }\n }\n \n $urlPath = $this->URL->path;\n \n //template variables shared between templates\n if ( strpos($urlPath, \"edit\" )|| strpos($urlPath, \"view\") \n || strpos($urlPath, \"buy\")){\n \n $lst = $this->hlp->sess(\"listing\");\n $imgs = $this->hlp->sess(\"images\");\n $this->template->listingDetails = $lst->listingDetails;\n $this->template->listingImages = $imgs->listingImages;\n }\n }", "protected function _prepareForm()\n { \n $shippingrate = Mage::registry('shippingrate'); /* @var $shippingrate Varien_Object */\n $sessionData = $this->_getHelper()->getShippingRateSessionData();\n if (is_array($sessionData)) {\n $shippingrate->setData($sessionData);\n $this->_getHelper()->clearShippingRateSessionData();\n } \n \n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post',\n \n )); \n \n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('checkout')->__('Rate Information'),\n 'class' => 'fieldset-wide',\n )); \n \n \n \n \n if ($shippingrate->getData('pk')) {\n $fieldset->addField('pk', 'hidden', array(\n 'name' => 'pk',\n )); \n }\n \n $websiteSelect = $fieldset->addField('website_id', 'select', array(\n 'name' => 'website_id',\n 'label' => Mage::helper('shippingratesadmin')->__('Website'),\n 'title' => Mage::helper('shippingratesadmin')->__('Website'),\n 'required' => true,\n 'values' => Mage::getSingleton('adminhtml/system_store')->getWebsiteValuesForForm(false, false),\n 'onchange' => 'changeRatesWebsite()'\n ));\n \n $websiteSelect->setAfterElementHtml(\n \"<script type=\\\"text/javascript\\\">\n //<![CDATA[\n function changeRatesWebsite() { \n var url = \\\"{$this->getUrl('shippingratesadmin/adminhtml_tablerate/changewebsite')}\\\";\n var website = $('website_id').getValue();\n new Ajax.Request(url, {\n method: 'post',\n parameters: {\\\"website\\\": website}, \n onSuccess: function(transport) { \n var jsonResponse = transport.responseJSON;\n if (!jsonResponse) {\n return;\n } \n var label = $$('label[for=\\\"condition_value\\\"]')[0];\n label.innerHTML = jsonResponse.conditionLabel;\n }\n }); \n }\n \n document.observe(\\\"dom:loaded\\\", function(){\n changeRatesWebsite();\n });\n //]]>\n </script>\"); \n \n \n $country = $fieldset->addField('dest_country_id', 'select', array(\n 'name' => 'dest_country_id',\n 'label' => Mage::helper('shippingratesadmin')->__('Country'),\n 'values' => Mage::getModel('adminhtml/system_config_source_country') ->toOptionArray(),\n 'onchange' => 'getstate(this)',\n ));\n \n \n \n if($shippingrate->getData('dest_country_id'))\n $regions = Mage::getModel('directory/region')->getResourceCollection()->addCountryFilter($shippingrate->getData('dest_country_id'))->toOptionArray();\n else\n $regions = array( 0 => 'Select Country');\n \n $fieldset->addField('dest_region_id', 'select', array(\n 'name' => 'dest_region_id',\n 'label' => Mage::helper('shippingratesadmin')->__('State/Region'),\n 'values' => $regions,\n \n ));\n \n $country->setAfterElementHtml(\n \"<script type=\\\"text/javascript\\\">\n function getstate(selectElement){\n var reloadurl = '\". $this->getUrl('shippingratesadmin/adminhtml_tablerate/region') . \"country/' + selectElement.value;\n new Ajax.Request(reloadurl, {\n method: 'get',\n onLoading: function (stateform) {\n $('state').update('Searching...');\n },\n onComplete: function(stateform) { \n $('dest_region_id').update(stateform.responseText);\n }\n });\n }\n </script>\");\n \n \n $fieldset->addField('dest_zip', 'text', array(\n 'name' => 'dest_zip',\n 'label' => Mage::helper('shippingratesadmin')->__('Zip/Postal Code'),\n 'title' => Mage::helper('shippingratesadmin')->__('Zip/Postal Code'),\n 'required' => true,\n 'note' => Mage::helper('shippingratesadmin')->__('Use * for all'),\n ));\n \n \n $fieldset->addField('condition_value', 'text', array(\n 'name' => 'condition_value',\n 'label' => Mage::helper('shippingratesadmin')->__('Order Subtotal (and above)'),\n 'title' => Mage::helper('shippingratesadmin')->__('Order Subtotal (and above)'),\n 'required' => true,\n ));\n \n $fieldset->addField('price', 'text', array(\n 'name' => 'price',\n 'label' => Mage::helper('shippingratesadmin')->__('Price'),\n 'title' => Mage::helper('shippingratesadmin')->__('Price'),\n 'required' => true,\n )); \n \n \n \n $form->setValues($shippingrate->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n \n return parent::_prepareForm();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitOrderrefModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function onRsformBackendAfterShowFormEditTabs(): void\n\t{\n\t\t$formId = $this->app->input->getInt('formId');\n\t\t$tables = $this->db->getTableList();\n\t\t$table = $this->db->getPrefix() . 'rsform_jdideal';\n\n\t\tif (!in_array($table, $tables, true))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Load the settings\n\t\t$settings = $this->loadFormSettings($formId);\n\n\t\t$form = new Form('ropayments');\n\t\t$form->loadFile(__DIR__ . '/configuration.xml');\n\t\t$form->bind(['roPaymentsParams' => $settings->toArray()]);\n\n\t\tHTMLHelper::_('formbehavior.chosen');\n\n\t\t?>\n\t\t<div id=\"ropayments\" class=\"form-horizontal <?php\n\t\techo Version::MAJOR_VERSION === 3 ? 'ropayments3' : ''; ?>\">\n\t\t\t<?php\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'bootstrap.startTabSet', 'ropayments-config',\n\t\t\t\t['active' => 'ropayments-general']\n\t\t\t);\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'bootstrap.addTab',\n\t\t\t\t'ropayments-config',\n\t\t\t\t'ropayments-general',\n\t\t\t\tText::_('PLG_RSFP_JDIDEAL_CONFIG_GENERAL')\n\t\t\t);\n\t\t\techo $form->renderField('profileAlias', 'roPaymentsParams');\n\t\t\techo $form->renderField('currency', 'roPaymentsParams');\n\t\t\techo $form->renderField('allowEmpty', 'roPaymentsParams');\n\t\t\techo $form->renderField('showMessage', 'roPaymentsParams');\n\t\t\techo HTMLHelper::_('bootstrap.endTab');\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'bootstrap.addTab',\n\t\t\t\t'ropayments-config',\n\t\t\t\t'ropayments-currency',\n\t\t\t\tText::_('PLG_RSFP_JDIDEAL_CONFIG_PRICE')\n\t\t\t);\n\t\t\techo $form->renderField('thousands', 'roPaymentsParams');\n\t\t\techo $form->renderField('decimal', 'roPaymentsParams');\n\t\t\techo $form->renderField('numberDecimals', 'roPaymentsParams');\n\t\t\techo $form->renderField('priceMask', 'roPaymentsParams');\n\t\t\techo $form->renderField('amountMask', 'roPaymentsParams');\n\t\t\techo '<div class=\"totalPriceMask\">';\n\t\t\techo $form->renderField('totalMask', 'roPaymentsParams');\n\t\t\techo '</div>';\n\t\t\techo $form->renderField('taxType', 'roPaymentsParams');\n\t\t\techo $form->renderField('taxValue', 'roPaymentsParams');\n\t\t\techo HTMLHelper::_('bootstrap.endTab');\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'bootstrap.addTab',\n\t\t\t\t'ropayments-config',\n\t\t\t\t'ropayments-fields',\n\t\t\t\tText::_('PLG_RSFP_JDIDEAL_CONFIG_FIELDS')\n\t\t\t);\n\t\t\techo $form->renderField('fieldOrderNumber', 'roPaymentsParams');\n\t\t\techo $form->renderField('fieldName', 'roPaymentsParams');\n\t\t\techo $form->renderField('fieldEmail', 'roPaymentsParams');\n\t\t\techo HTMLHelper::_('bootstrap.endTab');\n\t\t\techo HTMLHelper::_(\n\t\t\t\t'bootstrap.addTab',\n\t\t\t\t'ropayments-config',\n\t\t\t\t'ropayments-emails',\n\t\t\t\tText::_('PLG_RSFP_JDIDEAL_CONFIG_MAIL')\n\t\t\t);\n\t\t\techo $form->renderField('userEmail', 'roPaymentsParams');\n\t\t\techo $form->renderField('adminEmail', 'roPaymentsParams');\n\t\t\techo $form->renderField('additionalEmails', 'roPaymentsParams');\n\t\t\techo $form->renderField(\n\t\t\t\t'sendEmailOnFailedPayment', 'roPaymentsParams'\n\t\t\t);\n\t\t\techo $form->renderField('confirmationEmail', 'roPaymentsParams');\n\t\t\techo '<div class=\"control-group ro-confirmation-info\" data-showon=\\'[{\"field\":\"roPaymentsParams[confirmationEmail]\",\"values\":[\"1\"],\"sign\":\"=\",\"op\":\"\"}]\\' style=\"display: none;\">';\n\t\t\techo '<div class=\"text-info\">' . Text::_(\n\t\t\t\t\t'PLG_RSFP_JDIDEAL_CONFIRMATIONHELP'\n\t\t\t\t) . '</div>';\n\t\t\techo '</div>';\n\t\t\techo $form->renderField(\n\t\t\t\t'confirmationRecipient', 'roPaymentsParams'\n\t\t\t);\n\t\t\techo $form->renderField('confirmationSubject', 'roPaymentsParams');\n\t\t\techo $form->renderField('confirmationMessage', 'roPaymentsParams');\n\t\t\techo $form->renderField('includeNonSelected', 'roPaymentsParams');\n\t\t\techo HTMLHelper::_('bootstrap.endTab');\n\t\t\techo HTMLHelper::_('bootstrap.endTabSet');\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "public function setup()\n {\n parent::setup();\n \n $formClass = $this->getChildFormClass();\n $collection = $this->getParentObject()->{$this->getRelationAlias()};\n $nbChilds = 0;\n $min = $this->getMinNbChilds();\n $max = $this->getMaxNbChilds();\n \n if ($min > $max && $max > 0)\n throw new RuntimeException('min cannot be greater than max.');\n \n // embed forms for each child element that is already persisted\n foreach ($collection as $childObject)\n {\n $form = new $formClass($childObject);\n $pk = $childObject->identifier();\n \n if ($childObject->exists() === false)\n throw new RuntimeException('Transient child objects are not supported.');\n \n if (count($pk) !== 1)\n throw new RuntimeException('Composite primary keys are not supported.');\n \n $this->embedForm(self::PERSISTENT_PREFIX.reset($pk), $form);\n $nbChilds += 1;\n }\n \n // embed as many additional forms as are needed to reach the minimum\n // number of required child objects\n for (; $nbChilds < $min; $nbChilds += 1)\n {\n $form = new $formClass($collection->get(null));\n $this->embedForm(self::TRANSIENT_PREFIX.$nbChilds, $form);\n }\n \n $this->validatorSchema->setPostValidator(new sfValidatorCallback(array(\n 'callback' => array($this, 'validateLogic'),\n )));\n }", "function acf_render_field_settings() {\n\n\t\tif ( class_exists('acf') ) {\n\n\t\t\tif ( version_compare( $this->settings['this_acf_version'], $this->settings['min_acf_pro_version'], '>=' ) ) {\n\t\t\t\tadd_action('acf/render_field_settings/type=repeater', array($this, '_dhz_repeater_render_field_settings') );\n\t\t\t\tadd_filter('acf/prepare_field/type=repeater', array($this, '_dhz_collapse_all_repeater_fields') );\n\t\t\t\tadd_action('acf/render_field_settings/type=flexible_content', array($this, '_dhz_flexible_render_field_settings') );\n\t\t\t\tadd_filter('acf/prepare_field/type=flexible_content', array($this, '_dhz_collapse_all_flexible_fields') );\n\t\t\t}\n\n\t\t}\n\n\t}", "public function admin_render()\n {\n $output = $this->admin_form_before();\n $output .= $this->admin_form_start();\n $output .= $this->default_fields();\n $widget_saved_values = $this->get_settings();\n\n $output .= $this->admin_language_tab(); //have to start language tab from here on\n $output .= $this->admin_language_tab_start();\n\n $all_languages = LanguageHelper::all_languages();\n foreach ($all_languages as $key => $lang) {\n $output .= $this->admin_language_tab_content_start([\n 'class' => $key == 0 ? 'tab-pane fade show active' : 'tab-pane fade',\n 'id' => \"nav-home-\" . $lang->slug\n ]);\n $output .= Text::get([\n 'name' => 'title_'.$lang->slug,\n 'label' => __('Title'),\n 'value' => $widget_saved_values['title_' . $lang->slug] ?? null,\n ]);\n $output .= $this->admin_language_tab_content_end();\n }\n\n $output .= $this->admin_language_tab_end(); //have to end language tab\n\n $output .= Text::get([\n 'name' => 'location',\n 'label' => __('Location'),\n 'value' => $widget_saved_values['location'] ?? null,\n ]);\n $output .= Select::get([\n 'name' => 'custom_form_id',\n 'label' => __('Custom Form'),\n 'placeholder' => __('Select form'),\n 'options' => FormBuilder::all()->pluck('title','id')->toArray(),\n 'value' => $widget_saved_values['custom_form_id'] ?? []\n ]);\n $output .= Slider::get([\n 'name' => 'padding_top',\n 'label' => __('Padding Top'),\n 'value' => $widget_saved_values['padding_top'] ?? 50,\n 'max' => 200,\n ]);\n $output .= Slider::get([\n 'name' => 'padding_bottom',\n 'label' => __('Padding Bottom'),\n 'value' => $widget_saved_values['padding_bottom'] ?? 50,\n 'max' => 200,\n ]);\n $output .= $this->admin_form_submit_button();\n $output .= $this->admin_form_end();\n $output .= $this->admin_form_after();\n\n return $output;\n }", "protected function renderForm()\n {\n $helper = PrestashopFactory::buildHelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitIfthenpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "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 function hookForm() {\n if ($this->isCompanyForm()) {\n $this->setDefaultExpDate();\n $this->makeBillingAreaRequired();\n }\n elseif ($this->isCompanyViewsMultiSearchForm()) {\n $this->form['company_name']['#type'] = 'textarea';\n $this->duplicateField('sort_by');\n }\n }", "function goToFormReinit(){\n\n require('view/frontend/formReinitMdpView.php');\n }", "public function renderField(array &$parameters, &$parentObject) {\n \n \n // Vars\n $uid = &$parameters[\"row\"][\"uid\"];\n $pid = $parameters[\"row\"][\"pid\"];\n\t\t$name = $parameters['itemFormElName'];\n\t\t$value = $parameters['itemFormElValue'];\n \n \n // Initial Wert\n if(trim($value)==\"\") {\n $value = 'none none none none';\n }\n $values = explode(' ', $value);\n\n\n // FTM Template-Verzeichnis ermitteln\n $rootlinePages = \\CodingMs\\Ftm\\Utility\\Tools::getRootlinePids($pid);\n $rootlineFtms = \\CodingMs\\Ftm\\Utility\\Tools::getRootlineFtms($rootlinePages);\n if(!empty($rootlineFtms) && count($rootlineFtms)==1) {\n $ftmTemplateDir = $rootlineFtms[0];\n }\n else {\n return \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\"tx_ftm_backend_gridelementclassesrow.error_multiple_ftm_templates_on_rootline\", \"Ftm\");\n // return \"Error: Multiple FTM-Templates on rootline! Only one is valid!\";\n }\n\n\n // echo \"<pre>\";\n // var_dump(&$parameters[\"row\"][\"uid\"]);\n // var_dump($rootlineFtms);\n // echo \"</pre>\";\n // exit;\n // die(serialize(&$parentObject['_THIS_UID']));\n\n \n // Hidden-Field zum Speichern\n $hidden = '<input type=\"hidden\" name=\"'.htmlspecialchars($name).'\" value=\"'.htmlspecialchars($value).'\" id=\"ftm_gridElementClasses_'.$uid.'\"/>';\n \n $templateDir = \\CodingMs\\Ftm\\Utility\\Tools::getDirectory(\"DyncssGridElementLayouts\", $ftmTemplateDir);\n $directory = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName($templateDir);\n\n // Select-Boxen bauen\n $select = '';\n for($i=0; $i<=3; $i++) {\n $options = array();\n $select.= '<select name=\"'.htmlspecialchars($name).'['.$i.']\" class=\"formField select\" onchange=\"ftm_updateGridElementClasses_'.$uid.'(this.value, '.$i.')\">' . LF;\n $select.= '<option value=\"none\">-</option>' . LF;\n if($handleLess=opendir($directory)) {\n while($fileLess=readdir($handleLess)){\n if(substr($fileLess , 0, 1) != \".\") {\n $selected = (str_replace(\".less\", \"\", $fileLess) === $values[$i] ? ' selected=\"selected\"' : '');\n $options[$fileLess] = '<option value=\"'.str_replace(\".less\", \"\", $fileLess).'\" '.$selected.'>'.str_replace(\".less\", \"\", $fileLess).'</option>' . LF;\n }\n }\n }\n ksort($options);\n $select.= implode('', $options).'</select>&nbsp;&nbsp;'; \n }\n \n \n $script = '<script type=\"text/javascript\">'.LF;\n $script.= 'function ftm_updateGridElementClasses_'.$uid.'(value, no) {'.LF;\n $script.= ' var tempValue = document.getElementById(\"ftm_gridElementClasses_'.$uid.'\").value;'.LF;\n $script.= ' var valueParts = tempValue.split(\\' \\');'.LF;\n $script.= ' valueParts[no] = value;'.LF;\n $script.= ' document.getElementById(\"ftm_gridElementClasses_'.$uid.'\").value = valueParts.join(\\' \\');'.LF;\n $script.= '}'.LF;\n $script.= '</script>'.LF;\n \n \n $notice1 = \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\"tx_ftm_backend_gridelementclassesrow.directory_notice\", \"Ftm\", array(\"<b>\".$templateDir.\"</b>\"));\n //$notice1 = 'Options were created from '.$templateDir.' directory.';\n $notice2 = \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\"tx_ftm_backend_gridelementclassesrow.documentation_notice\", \"Ftm\", array('<a href=\"http://fluid-template-manager.de/documentation/Dyncss.html\" target=\"_blank\"><u>http://fluid-template-manager.de/documentation/Css-Less.html</u></a>'));\n //$notice2 = 'How to manage the provided classes, you can read here: .';\n \n return '<div>'.$select.$hidden.$script.'<br />'.$notice1.'<br/>'.$notice2.'</div>'.LF;\n\t}", "public function selectFormsBySubType( $sSubType );", "function CreateChildControls()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::CreateChildControls();\" . \"<HR>\";\n if ($this->listSettings->GetCount()) {\n if ($this->listSettings->HasItem(\"MAIN\", \"TABLE\")) {\n $this->Table = $this->listSettings->GetItem(\"MAIN\", \"TABLE\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_TABLE_SETTINGS\", array(), true);\n }\n if (! $this->error) {\n\n //parse library file\n \t$this->InitLibraryData();\n \t//reinitilize database columns definitions\n $this->ReInitTableColumns();\n //create validator\n $this->validator = new Validate($this, $this->Storage->columns, $this->library_ID);\n $this->Kernel->ImportClass(\"web.controls.\" . $this->editcontrol, $this->editcontrol);\n $_editControl = new $this->editcontrol(\"ItemsEdit\", \"edit\", $this->Storage);\n $this->AddControl($_editControl);\n }\n } // if\n else {\n $this->AddEditErrorMessage(\"EMPTY_LIBRARY_SETTINGS\", array(), true);\n }\n }", "function render_callback() {\n\t\tif ( NULL === $this->render_callback ) {\n\t\t\t$sub_render_method = 'render_' . $this->field_type;\n\t\t\tcall_user_func( array( $this, $sub_render_method ) );\n\t\t} else {\n\t\t\tcall_user_func( $this->render_callback, $this );\n\t\t}\n\t}", "function layout_builder_post_update_remove_layout_is_rebuilding() {\n // Empty post-update hook.\n}", "protected function renderFormAdvanced()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n // helper->submit_action = 'submitDoofinderModuleAdvanced';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&adv=1&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = [\n 'fields_value' => $this->getConfigFormValuesAdvanced(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n ];\n $this->context->smarty->assign('id_tab', 'advanced_tab');\n $html = $this->context->smarty->fetch($this->local_path . 'views/templates/admin/dummy/pre_tab.tpl');\n $html .= $this->renderFeedURLs();\n $html .= $helper->generateForm([$this->getConfigFormAdvanced()]);\n $html .= $this->context->smarty->fetch($this->local_path . 'views/templates/admin/dummy/after_tab.tpl');\n\n return $html;\n }", "protected function _changed()\n {\n // Clean up caches\n $this->_subClasses = array();\n $this->_notSubClasses = array();\n }", "protected function Form_Run() {}", "public function getCurrentSubForm()\n {\n $request = $this->getRequest();\n if (!$request->isPost()) {\n return false;\n }\n \n foreach ($this->getPotentialForms() as $name) {\n if ($data = $request->getPost($name, false)) {\n if (is_array($data)) {\n return $this->getForm()->getSubForm($name);\n break;\n }\n }\n }\n \n return false;\n }", "public function getNextSubForm()\n {\n $storedForms = $this->getStoredForms();\n $potentialForms = $this->getPotentialForms();\n \n foreach ($potentialForms as $name) {\n if (!in_array($name, $storedForms)) {\n return $this->getForm()->getSubForm($name);\n }\n }\n return false;\n }", "public function rebuild() {\n update_option('responsive_menu_pro_version', '2.8.9');\n\n return $this->view->render(\n 'admin/main.html.twig',\n [\n 'options' => $this->manager->all(),\n 'alert' => ['success' => 'Responsive Menu Pro Database Rebuilt Successfully.']\n ]\n );\n }", "protected function RenderEnd($blnDisplayOutput = true) {\r\n\t\t\tswitch ($this->intFormStatus) {\r\n\t\t\t\tcase QFormBase::FormStatusUnrendered:\r\n\t\t\t\t\tthrow new QCallerException('$this->RenderBegin() was never called');\r\n\t\t\t\tcase QFormBase::FormStatusRenderBegun:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase QFormBase::FormStatusRenderEnded:\r\n\t\t\t\t\tthrow new QCallerException('$this->RenderEnd() has already been called');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new QCallerException('FormStatus is in an unknown status');\r\n\t\t\t}\r\n\r\n\t\t\t// Get End Script\r\n//\t\t\t$strEndScript = '<script type=\"text/javascript\">';\r\n\t\t\t$strEndScript = '';\r\n\t\t\tforeach ($this->GetAllControls() as $objControl)\r\n\t\t\t\tif ($objControl->Rendered)\r\n//\t\t\t\t$strEndScript .= sprintf('qcodo.registerControl(\"%s\"); ', $objControl->ControlId);\r\n\t\t\t\t\t$strEndScript .= sprintf('qc.regC(\"%s\"); ', $objControl->ControlId);\r\n\t\t\tforeach ($this->GetAllControls() as $objControl)\r\n\t\t\t\tif ($objControl->Rendered)\r\n\t\t\t\t\t$strEndScript .= $objControl->GetEndScript();\r\n\t\t\tforeach ($this->objGroupingArray as $objGrouping) {\r\n\t\t\t\t$strEndScript .= $objGrouping->Render();\r\n\t\t\t}\r\n\t\t\t$strEndScript .= sprintf('qc.includesPath = \"%s\"; ', DOCROOT_VIRTUAL_DIRECTORY . DOCROOT_SUBFOLDER . '/includes');\r\n\t\t\t\r\n\t\t\t// End Script Compressor\r\n\t\t\t$strEndScriptArray = explode('; ', $strEndScript);\r\n\t\t\t$strEndScriptCommands = array();\r\n\t\t\tforeach ($strEndScriptArray as $strEndScript)\r\n\t\t\t\t$strEndScriptCommands[trim($strEndScript)] = true;\r\n\t\t\t\t\r\n\t\t\t// End Script Outputter\r\n//\t\t\t$strEndScript = sprintf('<script type=\"text/javascript\">%s</script>',\r\n\t\t\t$strEndScript = sprintf('<script type=\"text/javascript\">%s qc.registerForm();</script>',\r\n\t\t\t\timplode('; ', array_keys($strEndScriptCommands)));\r\n\r\n\t\t\t// Clone Myself\r\n\t\t\t$objForm = clone($this);\r\n\r\n\t\t\t// Render HTML\r\n\t\t\t$strToReturn = \"\\n\\t\";\r\n\t\t\t$strToReturn .= sprintf('<input type=\"hidden\" name=\"Qform__FormState\" id=\"Qform__FormState\" value=\"%s\" />', QForm::Serialize($objForm));\r\n\r\n\t\t\t$strToReturn .= \"\\n\\t\";\t\t\t\r\n\t\t\t$strToReturn .= sprintf('<input type=\"hidden\" name=\"Qform__FormId\" id=\"Qform__FormId\" value=\"%s\" />', $this->strFormId);\r\n\r\n//\t\t\t$strToReturn .= \"\\n\\t\";\r\n//\t\t\t$strToReturn .= '<input type=\"hidden\" name=\"Qform__FormControl\" id=\"Qform__FormControl\" value=\"\" />';\r\n//\t\t\t$strToReturn .= '<input type=\"hidden\" name=\"Qform__FormEvent\" id=\"Qform__FormEvent\" value=\"\" />';\r\n//\t\t\t$strToReturn .= '<input type=\"hidden\" name=\"Qform__FormParameter\" id=\"Qform__FormParameter\" value=\"\" />';\r\n//\t\t\t$strToReturn .= '<input type=\"hidden\" name=\"Qform__FormCallType\" id=\"Qform__FormCallType\" value=\"\" />';\r\n//\t\t\t$strToReturn .= '<input type=\"hidden\" name=\"Qform__FormUpdates\" id=\"Qform__FormUpdates\" value=\"\" />';\r\n//\t\t\t$strToReturn .= '<input type=\"hidden\" name=\"Qform__FormCheckableControls\" id=\"Qform__FormCheckableControls\" value=\"\" />';\r\n\r\n/*\t\t\t$strToReturn .= '<div id=\"Qform_Logger\" style=\"display:none;width:400px;background-color:#dddddd;font-size:10px;font-family:lucida console, courier, monospaced;padding:6px;';\r\n\t\t\tif (QApplication::IsBrowser(QBrowserType::InternetExplorer))\r\n\t\t\t\t$strToReturn .= 'filter:alpha(opacity=50);';\r\n\t\t\telse\r\n\t\t\t\t$strToReturn .= 'opacity:0.5;';\r\n\t\t\t$strToReturn .= 'overflow:auto;\"></div>';*/\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$strToReturn .= $objControl->GetEndHtml();\r\n\t\t\t$strToReturn .= \"\\n</form>\";\r\n\r\n\t\t\t$strToReturn .= $strEndScript;\r\n\r\n\t\t\tif ($this->blnRenderedBodyTag)\r\n\t\t\t\t$strToReturn .= '</body>';\r\n\r\n\t\t\t// Update Form Status\r\n\t\t\t$this->intFormStatus = QFormBase::FormStatusRenderEnded;\r\n\r\n\t\t\t// Display or Return\r\n\t\t\tif ($blnDisplayOutput) {\r\n\t\t\t\tprint ($strToReturn);\r\n\t\t\t\treturn null;\r\n\t\t\t} else\r\n\t\t\t\treturn $strToReturn;\r\n\t\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitPromoModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n // Ligne de code pour afficher le formulaire de base du module\n // return $helper->generateForm(array($this->getConfigForm()));\n return $helper->generateForm(array());\n }", "public function getCurrentSubForm() {\n $request = $this->getRequest();\n if (!$request->isPost()) {\n return false;\n }\n\n foreach ($this->getPotentialForms() as $name) {\n if ($data = $request->getPost($name, false)) {\n if (is_array($data)) {\n return $this->getForm()->getSubForm($name);\n break;\n }\n }\n }\n\n return false;\n }", "public static function buildPatchDisplay(\n $form1,\n $hidden_fields,\n $form_action,\n $types = array('module'),\n $active_form = 'form1'\n ) {\n \tglobal $current_language;\n $mod_strings = return_module_language($current_language, \"Administration\");\n $ss = new Sugar_Smarty();\n $ss->assign('FORM_1_PLACE_HOLDER', $form1);\n $ss->assign('form_action', $form_action);\n $ss->assign('hidden_fields', $hidden_fields);\n $mod_strings = return_module_language($current_language, \"Administration\");\n\n $ss->assign('MOD', $mod_strings);\n $result = PackageManagerDisplay::getHeader();\n $header_text = $result['text'];\n $isAlive = $result['isAlive'];\n $show_login = $result['show_login'];\n $display = 'block';\n $form2 = \"<table class='tabForm' width='100%' cellpadding='0' cellspacing='0' width='100%' border='0'>\";\n if(!$isAlive)\n \t$form2 .= \"<tr><td><span id='span_display_html'>\".$header_text.\"</span></td></tr>\";\n $form2 .= \"</table>\";\n $form2 .= \"<table width='100%'><tr><td align='left'>\";\n if($show_login){\n \t$form2 .= \"<input type='button' class='button' onClick='PackageManager.showLoginDialog(true);' value='\".$mod_strings['LBL_MODIFY_CREDENTIALS'].\"'>\";\n }\n $form2 .= \"</td><td align='right'><div id='workingStatusDiv' style='display:none;'>\".SugarThemeRegistry::current()->getImage(\"sqsWait\",\"border='0' align='bottom'\",null,null,'.gif',\"Loading\").\"</div></td></tr><tr><td colspan='2'>\";\n\n $loginViewStyle = ($isAlive ? 'none' : 'block');\n\t\t$selectViewStyle = ($isAlive ? 'block' : 'none');\n\t\t$form2 .= \"<div id='selectView' style='display:\".$selectViewStyle.\"'>\";\n\t\t$form2 .= \" <div id='patch_downloads' class='ygrid-mso' style='height:205px; display: \".$display.\";'></div>\";\n\t\t $form2 .= \"</div>\";\n\t\t if(!$show_login)\n \t$loginViewStyle = 'none';\n\n $form2 .= \"</td></tr></table>\";\n $form2 = '';\n $packages = array();\n $releases = array();\n if($isAlive){\n \t$filter = array();\n \t$count = count($types);\n \t$index = 1;\n \t$type_str = '\"';\n \tforeach($types as $type){\n \t\t$type_str .= \"'\".$type.\"'\";\n \t\tif($index < $count)\n \t\t\t$type_str .= \",\";\n \t\t$index++;\n \t}\n \t$type_str .= '\"';\n \t$filter = array('type' => $type_str);\n \t$filter = PackageManager::toNameValueList($filter);\n $pm = new PackageManager();\n }\n $tree = PackageManagerDisplay::buildTreeView('treeview', $isAlive);\n $tree->tree_style= getVersionedPath('vendor/ytree/TreeView/css/check/tree.css');\n $ss->assign('TREEHEADER',$tree->generate_header());\n\t\t$ss->assign('module_load', 'false');\n\t\t$ss->assign('MODULE_SELECTOR', PackageManagerDisplay::buildGridOutput($tree, $mod_strings, $isAlive, $show_login));\n $ss->assign('FORM_2_PLACE_HOLDER', $form2);\n $ss->assign('scripts', PackageManagerDisplay::getDisplayScript(false, 'patch', $releases, $types, $isAlive));\n $str = $ss->fetch('ModuleInstall/PackageManager/tpls/PackageForm.tpl');\n return $str;\n }", "public function initSubFields() {\n $post = $this->getData('post');\n switch ($post['custom_type']) {\n case 'shop_customer':\n case 'import_users':\n $optionName = 'wpcf-usermeta';\n break;\n case 'taxonomies':\n $optionName = 'wpcf-termmeta';\n break;\n default:\n $optionName = 'wpcf-field';\n break;\n }\n\n $this->fieldsData = wpcf_admin_fields_get_fields_by_group(\n $this->groupPost->ID,\n 'slug',\n false,\n false,\n false,\n TYPES_CUSTOM_FIELD_GROUP_CPT_NAME,\n $optionName,\n true\n );\n\n foreach ($this->getFieldsData() as $fieldData) {\n $field = FieldFactory::create($fieldData, $post, $this->getFieldName(), $this);\n $this->subFields[] = $field;\n }\n }", "public function preRender() {\n\t\tif ($this->hasOwnBoundObject()) {\n\t\t\t$this->ownBoundObject = $this->getBoundObject();\n\t\t}\n\t\tparent::preRender();\n\t}", "public function getNextSubForm() {\n $storedForms = $this->getStoredForms();\n $potentialForms = $this->getPotentialForms();\n\n foreach ($potentialForms as $name) {\n if (!in_array($name, $storedForms)) {\n return $this->getForm()->getSubForm($name);\n }\n }\n\n return false;\n }", "protected function onChange()\n {\n $this->markAsChanged();\n if ($this->parent !== null) {\n $this->parent->onChange();\n }\n }", "function initRecursive() {\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n @$control->Page = &$this->Page;\n $control->initRecursive();\n }\n }\n $this->_state = WEB_CONTROL_INITIALIZED;\n $this->ControlOnInit();\n }", "public function conversational_form_hooks() {\n\n\t\t\\add_filter( 'template_include', array( $this, 'get_form_template' ), PHP_INT_MAX );\n\t\t\\add_filter( 'document_title_parts', array( $this, 'change_form_page_title' ) );\n\t\t\\add_filter( 'post_type_link', array( $this, 'modify_permalink' ), 10, 2 );\n\n\t\t\\remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 );\n\n\t\t\\add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\n\t\t\\add_action( 'wpforms_wp_footer', array( $this, 'dequeue_scripts' ) );\n\t\t\\add_action( 'wpforms_frontend_confirmation', array( $this, 'dequeue_scripts' ) );\n\t\t\\add_action( 'wp_print_styles', array( $this, 'css_compatibility_mode' ) );\n\t\t\\add_action( 'wp_head', array( $this, 'print_form_styles' ) );\n\t\t\\add_filter( 'body_class', array( $this, 'set_body_classes' ) );\n\n\t\t\\add_filter( 'wpseo_opengraph_desc', array( $this, 'yoast_seo_description' ) );\n\t\t\\add_filter( 'wpseo_twitter_description', array( $this, 'yoast_seo_description' ) );\n\n\t\t\\add_filter( 'wpforms_frontend_form_data', array( $this, 'ignore_pagebreaks' ) );\n\t\t\\add_filter( 'wpforms_field_data', array( $this, 'ignore_date_dropdowns' ), 10, 2 );\n\t\t\\add_filter( 'wpforms_field_properties', array( $this, 'ignore_multi_column_layout' ), 10, 3 );\n\t\t\\add_filter( 'wpforms_field_properties', array( $this, 'add_data_field_type_attr' ), 10, 3 );\n\t\t\\add_action( 'wpforms_display_field_after', array( $this, 'add_file_upload_html' ), 10, 2 );\n\n\t\t\\add_action( 'wpforms_conversational_forms_content_before', array( $this, 'form_loader_html' ) );\n\t\t\\add_action( 'wpforms_conversational_forms_content_before', array( $this, 'form_header_html' ) );\n\t\t\\add_action( 'wpforms_conversational_forms_footer', array( $this, 'form_footer_html' ) );\n\t}", "function postRender(&$render)\n {\n }", "function loadSubModules()\n{\n $debug_prefix = debug_indent(\"Module->loadSubModules() {$this->ModuleID}:\");\n $submodule_elements = $this->_map->selectChildrenOfFirst('SubModules', null, null, true, true);\n if(count($submodule_elements) > 0){\n foreach($submodule_elements as $submodule_element){\n $submodule = $submodule_element->createObject($this->ModuleID);\n $subModuleID = $submodule_element->getAttr('moduleID', true);\n $this->SubModules[$subModuleID] = $submodule;\n print \"$debug_prefix Submodule $subModuleID parsed.\\n\";\n unset($submodule);\n }\n\n //special for best practices: add the IsBestPractice SummaryField\n if(isset($this->SubModules['bpc'])){\n $this->useBestPractices = true;\n $recordIDField = end($this->PKFields);\n\n $field_object = MakeObject(\n $this->ModuleID,\n 'IsBestPractice',\n 'SummaryField',\n array(\n 'name' => 'IsBestPractice',\n 'type' => 'tinyint',\n 'summaryFunction' => 'count',\n 'summaryField' => 'BestPracticeID',\n 'summaryKey' => 'RelatedRecordID',\n 'summaryModuleID' => 'bpc',\n 'localKey' => $recordIDField,\n 'phrase' => 'Is Best Practice|Whether the associated record is a best practice'\n )\n );\n//print \"best practice auto field\";\n//print_r($field_object);\n//die();\n $this->ModuleFields['IsBestPractice'] = $field_object;\n }\n\n //copies submodule conditions to summary fields\n foreach($this->ModuleFields as $fieldName => $field){\n if('summaryfield' == strtolower(get_class($field))){\n if(!$field->isGlobal){\n\n if(isset($this->SubModules[$field->summaryModuleID])){\n $subModule =& $this->SubModules[$field->summaryModuleID];\n if(count($subModule->conditions) > 0){\n //$field->conditions = $subModule->conditions;\n $field->conditions = array_merge($subModule->conditions, (array)$field->conditions);\n $this->ModuleFields[$fieldName] = $field;\n }\n unset($subModule);\n } else {\n trigger_error(\"The summaryfield '{$field->name}' requires a '{$field->summaryModuleID}' submodule.\", E_USER_ERROR);\n }\n }\n }\n }\n }\n debug_unindent();\n}", "function teligence_surveys_prerender($form)\r\n{\r\n\tforeach((array)element_children($form) as $key)\r\n\t{\r\n\t\t$form[$key]['#description'] .= \" Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\";\r\n\t\t\r\n\t\tif(substr($key, -8) == '_subject')\r\n\t\t{\r\n\t\t\t$subjectsibling = substr($key, 0, -8);\r\n\t\t\t$form['group_'.$subjectsibling] = array(\r\n\t\t\t\t'#title' => \"COMBO - \" . $subjectsibling,\r\n\t\t\t\t'#type' => 'fieldset',\r\n\t\t\t\t'#collapsible' => true,\r\n\t\t\t\t'#collapsed' => true,\r\n\t\t\t\t'#weight' => -100,\r\n\t\t\t);\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t}\r\n\t\tif($key == $subjectsibling)\r\n\t\t{\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t\tunset($subjectsibling);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\treturn $form;\r\n}", "protected function _prepareForm()\n {\n $model = Mage::registry('navision_customermapping');\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('checkout')->__('Customer Information'),\n 'class' => 'fieldset-wide',\n ));\n\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', array(\n 'name' => 'id',\n ));\n }\n\n $fieldset->addField('customeremail', 'text', array(\n 'name' => 'customeremail',\n 'label' => Mage::helper('checkout')->__('Customer Email'),\n 'title' => Mage::helper('checkout')->__('Customer Email'),\n 'required' => true,\n ));\n\n $fieldset->addField('magentocustomerid', 'text', array(\n 'name' => 'magentocustomerid',\n 'label' => Mage::helper('checkout')->__('Magento Customer ID'),\n 'title' => Mage::helper('checkout')->__('Magento Customer ID'),\n 'required' => true,\n ));\n $fieldset->addField('navisioncustomerid', 'text', array(\n 'name' => 'navisioncustomerid',\n 'label' => Mage::helper('checkout')->__('Navision Customer ID'),\n 'title' => Mage::helper('checkout')->__('Navision Customer ID'),\n 'required' => true,\n ));\n\n$fieldset->addField('createdby', 'text', array(\n 'name' => 'createdby',\n 'label' => Mage::helper('checkout')->__('Created By'),\n 'title' => Mage::helper('checkout')->__('Created By'),\n 'required' => true,\n ));\n\n $fieldset->addField('needsync', 'checkbox', array(\n \n\n 'name' => 'needsync',\n 'label' => Mage::helper('checkout')->__('Need Sync'),\n\t\t'onclick' => 'this.value = this.checked ? 1 : 0;',\n 'title' => Mage::helper('checkout')->__('Need Sync'),\n 'required' => true,\n ));\n\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "function _name_field_settings_pre_render($form) {\n\n $warning = t('<strong>Warning! Changing this setting after data has been created could result in the loss of data!</strong>');\n\n $form['field_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'components' => array(\n '#prefix' => '<tr><td><strong>' . t('Components') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'minimum_components' => array(\n '#prefix' => '<tr><td><strong>' . t('Minimum components') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'max_length' => array(\n '#prefix' => '<tr><td><strong>' . t('Maximum length') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n 'labels' => array(\n '#prefix' => '<tr><td><strong>' . t('Labels') . ' <sup>4</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 4,\n ),\n 'sort_options' => array(\n '#prefix' => '<tr><td><strong>' . t('Sort options') . ' <sup>5</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 5,\n ),\n\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('Only selected components will be activated on this field. All non-selected components / component settings will be ignored.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The minimal set of components required before considered the name field to be incomplete.') . '</li>'\n . '<li>'. t('The maximum length of the field in characters. This must be between 1 and 255.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The labels are used to distinguish the fields. You can use the special label \"!tag\" to hide this.', array('!tag' => '<none>')) . '</li>'\n . '<li>'. t('This enables sorting on the options after the vocabulary terms are added and duplicate values are removed.') . '</li>'\n . '</ol></td></tr></tfoot>',\n '#weight' => 2,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['field_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['field_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['components'][$key]['#description']);\n unset($form['components'][$key]['#title']);\n\n unset($form['minimum_components'][$key]['#description']);\n unset($form['minimum_components'][$key]['#title']);\n\n unset($form['max_length'][$key]['#description']);\n unset($form['max_length'][$key]['#title']);\n $form['max_length'][$key]['#size'] = 10;\n\n unset($form['labels'][$key]['#description']);\n unset($form['labels'][$key]['#title']);\n $form['labels'][$key]['#size'] = 10;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]['#description']);\n unset($form['sort_options'][$key]['#title']);\n }\n\n // Moves the elements into the table.\n $form['field_properties']['tbody']['components'][$key] = $form['components'][$key];\n $form['field_properties']['tbody']['components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['minimum_components'][$key] = $form['minimum_components'][$key];\n $form['field_properties']['tbody']['minimum_components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['max_length'][$key] = $form['max_length'][$key];\n $form['field_properties']['tbody']['max_length'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['max_length'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['max_length'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['labels'][$key] = $form['labels'][$key];\n $form['field_properties']['tbody']['labels'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['labels'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['labels'][$key]['#weight'] = $i;\n\n if (isset($form['sort_options'][$key])) {\n $form['field_properties']['tbody']['sort_options'][$key] = $form['sort_options'][$key];\n }\n else {\n $form['field_properties']['tbody']['sort_options'][$key] = array('#value' => '&nbsp;');\n }\n $form['field_properties']['tbody']['sort_options'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['components'][$key]);\n $form['components']['#access'] = FALSE;\n\n unset($form['minimum_components'][$key]);\n $form['minimum_components']['#access'] = FALSE;\n\n unset($form['max_length'][$key]);\n $form['max_length']['#access'] = FALSE;\n\n unset($form['labels'][$key]);\n $form['labels']['#access'] = FALSE;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]);\n $form['sort_options']['#access'] = FALSE;\n }\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['title_options']['#weight'] = 0;\n $form['generational_options']['#weight'] = 1;\n $form['extra_fields']['title_options'] = $form['title_options'];\n $form['extra_fields']['generational_options'] = $form['generational_options'];\n unset($form['title_options']);\n unset($form['generational_options']);\n\n return $form;\n}", "public function renderForm()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-gears'\n ),\n 'input' => array(\n array(),\n array(\n 'type' => 'text',\n 'label' => $this->l('API Key'),\n 'name' => 'SEND_SMS_API',\n 'desc' => $this->l('The API Key is used to authenticate in order to send SMS.'),\n 'required' => true\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Admin Mobile Number'),\n 'name' => 'ADMIN_MOBILE',\n 'required' => true\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save')\n )\n )\n );\n $fields_form = $this->setDefaultInput($fields_form);\n $helper = new HelperForm();\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));\n $helper->default_form_language = $lang->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG')\n ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;\n $this->fields_form = array();\n $helper->id = (int) Tools::getValue('id_carrier');\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'btnSubmit';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false);\n $helper->currentIndex .= '&configure=' . $this->name . '&tab_module=' . $this->tab;\n $helper->currentIndex .= '&module_name=' . $this->name;\n $helper->currentIndex .= '&configuration=yes';\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n \n return $helper->generateForm(array(\n $fields_form\n ));\n }", "public function handleGetForm($name, $parent_id = null, $edit_id = null) {\r\n\t\t$this->parent_id = $parent_id;\r\n\t\t$this->edit_id = $edit_id;\r\n\t\t$var = \"show\" . ucfirst($name) . \"Form\";\r\n\t\t$this->renderedArgs[$var] = true;\r\n\t\t$this->invalidateControl($name . \"Form\");\r\n\t}", "function build() {\n $this->built = TRUE;\n foreach ($this->build_callbacks as $callback) {\n call_user_func($callback, $this);\n drupal_alter(\"fapitng_form_$callback\", $this);\n }\n drupal_alter('fapitng_form', $this);\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit_apisfact_prestashop';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitCaptureleadsxavierModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$modelName = $this->_object->getModelName();\n\n\t\tswitch ($modelName)\n\t\t{\n\t\t\tcase 'shop_discount':\n\t\t\t\t// Создаем вкладку\n\t\t\t\t$oShopDiscountTabExportImport = Admin_Form_Entity::factory('Tab')\n\t\t\t\t\t->caption(Core::_('Shop_Discount.tab_export'))\n\t\t\t\t\t->name('ExportImport');\n\n\t\t\t\t// Добавляем вкладку\n\t\t\t\t$this\n\t\t\t\t\t->addTabAfter($oShopDiscountTabExportImport, $oMainTab);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t//->add($oMainRow4 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oDaysBlock = Admin_Form_Entity::factory('Div')->class('well with-header well-sm'))\n\t\t\t\t\t->add($oSiteuserGroupBlock = Admin_Form_Entity::factory('Div')->class('well with-header well-sm'))\n\t\t\t\t\t->add($oMainRow5 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow6 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$oShopDiscountTabExportImport\n\t\t\t\t\t->add($oShopDiscountTabExportImportRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t//Переносим GUID на \"Экспорт/Импорт\"\n\t\t\t\t$oMainTab->move($this->getField('guid'), $oShopDiscountTabExportImport);\n\n\t\t\t\t$oShopDiscountTabExportImport->move($this->getField('guid'), $oShopDiscountTabExportImportRow1);\n\n\t\t\t\t$this->getField('description')->rows(7)->wysiwyg(Core::moduleIsActive('wysiwyg'));\n\t\t\t\t$oMainTab->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow2);\n\n\t\t\t\t$sColorValue = ($this->_object->id && $this->getField('color')->value)\n\t\t\t\t? $this->getField('color')->value\n\t\t\t\t: '#aebec4';\n\n\t\t\t\t$this->getField('color')\n\t\t\t\t\t->colorpicker(TRUE)\n\t\t\t\t\t->value($sColorValue);\n\n\t\t\t\t$oMainTab->move($this->getField('start_datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('end_datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('start_time')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('end_time')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-2')), $oMainRow3);\n\t\t\t\t$oMainTab->move($this->getField('color')->set('data-control', 'hue')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3')), $oMainRow3);\n\n\t\t\t\t$oDaysBlock\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->class('header bordered-palegreen')\n\t\t\t\t\t\t->value(Core::_(\"Shop_Discount.days\"))\n\t\t\t\t\t)\n\t\t\t\t\t->add($oDaysBlockRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$oMainTab->move($this->getField('day1')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day2')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day3')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day4')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day5')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-3')), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day6')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2'))->class('colored-danger'), $oDaysBlockRow1);\n\t\t\t\t$oMainTab->move($this->getField('day7')->divAttr(array('class' => 'form-group col-xs-6 col-sm-4 col-md-3 col-lg-2'))->class('colored-danger'), $oDaysBlockRow1);\n\n\t\t\t\t// Группа доступа\n\t\t\t\t$aSiteuser_Groups = array(0 => Core::_('Shop_Discount.all'));\n\n\t\t\t\tif (Core::moduleIsActive('siteuser'))\n\t\t\t\t{\n\t\t\t\t\t$oSiteuser_Controller_Edit = new Siteuser_Controller_Edit($this->_Admin_Form_Action);\n\t\t\t\t\t$aSiteuser_Groups = $aSiteuser_Groups + $oSiteuser_Controller_Edit->fillSiteuserGroups($this->_object->Shop->site_id);\n\t\t\t\t}\n\n\t\t\t\t$oSiteuserGroupBlock\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->class('header bordered-azure')\n\t\t\t\t\t\t->value(Core::_(\"Shop_Discount.siteuser_groups\"))\n\t\t\t\t\t)\n\t\t\t\t\t->add($oSiteuserGroupBlockRow1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$aTmp = array();\n\n\t\t\t\t$aShop_Discount_Siteuser_Groups = $this->_object->Shop_Discount_Siteuser_Groups->findAll(FALSE);\n\t\t\t\tforeach ($aShop_Discount_Siteuser_Groups as $oShop_Discount_Siteuser_Group)\n\t\t\t\t{\n\t\t\t\t\t!in_array($oShop_Discount_Siteuser_Group->siteuser_group_id, $aTmp)\n\t\t\t\t\t\t&& $aTmp[] = $oShop_Discount_Siteuser_Group->siteuser_group_id;\n\t\t\t\t}\n\n\t\t\t\tforeach ($aSiteuser_Groups as $siteuser_group_id => $name)\n\t\t\t\t{\n\t\t\t\t\t$oSiteuserGroupBlockRow1->add($oCheckbox = Admin_Form_Entity::factory('Checkbox')\n\t\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-md-4'))\n\t\t\t\t\t\t->name('siteuser_group_' . $siteuser_group_id)\n\t\t\t\t\t\t->caption(htmlspecialchars($name))\n\t\t\t\t\t);\n\n\t\t\t\t\t(!$this->_object->id || in_array($siteuser_group_id, $aTmp))\n\t\t\t\t\t\t&& $oCheckbox->checked('checked');\n\t\t\t\t}\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->move($this->getField('active')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 margin-top-21')), $oMainRow5)\n\t\t\t\t\t->move($this->getField('not_apply_purchase_discount')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 margin-top-21'))->class('colored-danger times'), $oMainRow5)\n\t\t\t\t\t->move($this->getField('public')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 margin-top-21')), $oMainRow5);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->move($this->getField('url')->divAttr(array('class' => 'form-group col-xs-12 col-sm-8'))->placeholder('https://'), $oMainRow6)\n\t\t\t\t\t->move($this->getField('sorting')->divAttr(array('class' => 'form-group col-xs-12 col-sm-4 col-md-3 col-lg-2')), $oMainRow6);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->delete($this->getField('value'))\n\t\t\t\t\t->delete($this->getField('type'));\n\n\t\t\t\t// Удаляем группу\n\t\t\t\t$oAdditionalTab->delete($this->getField('shop_discount_dir_id'));\n\n\t\t\t\t$oGroupSelect = Admin_Form_Entity::factory('Select');\n\n\t\t\t\t$oGroupSelect\n\t\t\t\t\t->caption(Core::_('Shop_Discount.shop_discount_dir_id'))\n\t\t\t\t\t->options(array(' … ') + self::fillShopDiscountDir($this->_object->shop_id))\n\t\t\t\t\t->name('shop_discount_dir_id')\n\t\t\t\t\t->value($this->_object->shop_discount_dir_id)\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-lg-4'));\n\n\t\t\t\t$oMainRow1->add($oGroupSelect);\n\n\t\t\t\t$oMainRow1->add(Admin_Form_Entity::factory('Div')\n\t\t\t\t\t->class('col-xs-12 col-sm-4 col-md-3 col-lg-2 form-group input-group select-group')\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Code')\n\t\t\t\t\t\t->html('<div class=\"caption\">' . Core::_('Shop_Discount.value') . '</div>')\n\t\t\t\t\t)\n\t\t\t\t\t->add(Admin_Form_Entity::factory('Input')\n\t\t\t\t\t\t->name('value')\n\t\t\t\t\t\t->value($this->_object->value)\n\t\t\t\t\t\t->divAttr(array('class' => ''))\n\t\t\t\t\t\t->class('form-control semi-bold')\n\t\t\t\t\t\t->add(Core_Html_Entity::factory('Select')\n\t\t\t\t\t\t\t->name('type')\n\t\t\t\t\t\t\t->options(array(\n\t\t\t\t\t\t\t\t'%',\n\t\t\t\t\t\t\t\t$this->_object->Shop->Shop_Currency->sign\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t->value($this->_object->type)\n\t\t\t\t\t\t\t->class('form-control input-group-addon')\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$oMainTab->move($this->getField('coupon')\n\t\t\t\t\t->divAttr(array('class' => 'form-group margin-top-21 col-xs-12 col-sm-6 col-md-4 col-lg-3'))->onclick(\"$.toggleCoupon(this)\"), $oMainRow1);\n\n\t\t\t\t$hidden = !$this->_object->coupon\n\t\t\t\t\t? ' hidden'\n\t\t\t\t\t: '';\n\n\t\t\t\t$oMainTab->move($this->getField('coupon_text')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-3 col-lg-3' . $hidden)), $oMainRow1);\n\n\t\t\t\t$title = $this->_object->id\n\t\t\t\t\t? Core::_('Shop_Discount.item_discount_edit_form_title', $this->_object->name, FALSE)\n\t\t\t\t\t: Core::_('Shop_Discount.item_discount_add_form_title');\n\t\t\tbreak;\n\t\t\tcase 'shop_discount_dir':\n\t\t\t\t$oMainTab\n\t\t\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$this->getField('description')->rows(9)->wysiwyg(Core::moduleIsActive('wysiwyg'));\n\t\t\t\t$oMainTab->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow2);\n\n\t\t\t\t// Удаляем группу\n\t\t\t\t$oAdditionalTab->delete($this->getField('parent_id'));\n\n\t\t\t\t$oGroupSelect = Admin_Form_Entity::factory('Select');\n\n\t\t\t\t$oGroupSelect\n\t\t\t\t\t->caption(Core::_('Shop_Discount_Dir.parent_id'))\n\t\t\t\t\t->options(array(' … ') + self::fillShopDiscountDir($this->_object->shop_id, 0, array($this->_object->id)))\n\t\t\t\t\t->name('parent_id')\n\t\t\t\t\t->value($this->_object->parent_id)\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-md-6'));\n\n\t\t\t\t$oMainRow3->add($oGroupSelect);\n\n\t\t\t\t$oMainTab->move($this->getField('sorting')->divAttr(array('class' => 'form-group col-xs-12 col-sm-3')), $oMainRow3);\n\n\t\t\t\t$title = $this->_object->id\n\t\t\t\t\t? Core::_('Shop_Discount_Dir.edit_title', $this->_object->name, FALSE)\n\t\t\t\t\t: Core::_('Shop_Discount_Dir.add_title');\n\t\t\tbreak;\n\t\t}\n\n\t\t$this->title($title);\n\n\t\treturn $this;\n\t}", "function loadListFieldDefs(&$subpanel_fields,&$child_focus)\n {\n $this->list_field_defs = $subpanel_fields;\n\n for($i=0;$i < count($this->list_field_defs);$i++)\n {\n $list_field = $this->list_field_defs[$i];\n $field_def = null;\n $key = '';\n if(!empty($list_field['vname']))\n {\n $key = $list_field['vname'];\n } else if(isset($list_field['name']) && isset($child_focus->field_defs[$list_field['name']]))\n {\n $field_def = $child_focus->field_defs[$list_field['name']];\n $key = $field_def['vname'];\n }\n if(!empty($key))\n {\n $list_field['label'] = translate($key,$child_focus->module_dir);\n $this->list_field_defs[$i]['label'] = preg_replace('/:$/','',$list_field['label']);\n }\n else\n {\n $this->list_field_defs[$i]['label'] ='&nbsp;';\n }\n }\n }", "public function rebuild()\n\t{\n\t\t$id=3;\n\t\t$dataAlbum = $this->admin->data_album($id);\n\t\t$namaAlbum = $dataAlbum->row()->nama_album;\n\t\t$albumKey = $dataAlbum->row()->kode_album;\n\t\t$data['title'] = \"Dashboard | FaceVoting Versi 1.0\";\n\t\t$data['getRebuild']= $this->_prosesRebuild($namaAlbum,$albumKey);\n\t\t$view ='v_rebuildalbum';\n\t\t$this->_template($data,$view);\n\t}", "private function formView($reform = false) {\n if ($this->formed === true && $reform !== true) {\n throw new ViewAlreadyFormedException(self::childClass());\n }\n\n if ($this->rootContent === null) {\n throw new ViewRootContentNotSetException(self::childClass());\n }\n\n // Forms subviews and includes until there is nothing left to form\n // from successive inclusions\n while ($this->formSubViews() !== 0 || $this->formIncludes() !== 0);\n\n $this->formed = true;\n }", "function layout_builder_post_update_override_entity_form_controller() {\n // Empty post-update hook.\n}", "public function adminSettingsSubform () {\n $form = array();\n $this->adminSettingsPrintFriendlyForm($form);\n return $form;\n }", "protected function callRenderHook() {}" ]
[ "0.6582182", "0.62850034", "0.60938174", "0.56778204", "0.5406098", "0.534997", "0.5332994", "0.5269312", "0.5265423", "0.52481663", "0.51877964", "0.5104601", "0.50673497", "0.50629926", "0.5018036", "0.5016725", "0.49698514", "0.49688122", "0.4959845", "0.49394217", "0.49087048", "0.49065694", "0.49056235", "0.49001008", "0.48888153", "0.48842952", "0.48567608", "0.48531413", "0.48444864", "0.48430097", "0.48401123", "0.48212484", "0.48006064", "0.4800064", "0.47850937", "0.47696915", "0.47680533", "0.4764615", "0.47627297", "0.47587186", "0.47581953", "0.4733827", "0.4731883", "0.47209632", "0.47194353", "0.47151348", "0.46797603", "0.46735093", "0.46343893", "0.4622656", "0.46126926", "0.46122122", "0.46057737", "0.4600853", "0.45919853", "0.45739612", "0.45622006", "0.45596948", "0.45543492", "0.4543032", "0.45322734", "0.45311245", "0.45303732", "0.45303437", "0.45143506", "0.4507667", "0.45015872", "0.45000497", "0.44986403", "0.44927004", "0.44892028", "0.44876888", "0.44872463", "0.44871986", "0.44835824", "0.44789305", "0.44787672", "0.4477005", "0.44766143", "0.44713426", "0.4469826", "0.44687304", "0.4461817", "0.44556335", "0.44527036", "0.44493625", "0.44465923", "0.44441563", "0.44430006", "0.4442149", "0.44326904", "0.44304037", "0.44225731", "0.44187662", "0.4412816", "0.44125503", "0.4406627", "0.4402229", "0.43979436", "0.43969116" ]
0.8432645
0
BizForm::RenderHTML() render html content of this form
protected function RenderHTML() { $dispmode = $this->GetDisplayMode(); $this->SetDisplayMode($dispmode->GetMode()); $smarty = BizSystem::GetSmartyTemplate(); $smarty->assign_by_ref("name", $this->m_Name); $smarty->assign_by_ref("title", $this->m_Title); $smarty->assign_by_ref("formstate", $this->m_FormState); $smarty->assign_by_ref("toolbar", $this->m_ToolBar->Render()); if ($dispmode->m_DataFormat == "array") // if dataFormat is array, call array render function $smarty->assign_by_ref("fields", $this->RenderArray()); else if ($dispmode->m_DataFormat == "table") // if dataFormat is table, call table render function. { $smarty->assign_by_ref("table", $this->RenderTable()); $smarty->assign_by_ref("formobj", $this); } else if ($dispmode->m_DataFormat == "block" && $dispmode->m_FormatStyle) $smarty->assign_by_ref("block", $this->RenderFormattedTable()); $smarty->assign_by_ref("navbar", $this->m_NavBar->Render()); return $smarty->fetch(BizSystem::GetTplFileWithPath($dispmode->m_TemplateFile, $this->m_Package)) . "\n" . $this->RenderShortcutKeys() . "\n" . $this->RenderContextMenu(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n echo htmlspecialcharsbx($this->getPrefix());\n $action = $this->getAction();\n $id = $this->getId();\n $class = $this->getClass();\n $name = $this->getName();\n $dataAttributes = $this->getDataAttributes();\n $dataAttributesString = '';\n foreach ($dataAttributes as $key => $value) {\n $dataAttributesString .= ' data-' . $key . '=\"' . $value . '\" ';\n }\n\n $formArguments = 'action=\"' . (($action !== null) ? $action : '#') . '\" ';\n $formArguments .= ($id !== null) ? 'id=\"' . $id . '\" ' : '';\n $formArguments .= !empty($class) ? 'class=\"' . implode(' ', $class) . '\" ' : '';\n $formArguments .= ($name !== null) ? 'name=\"' . $name . '\" ' : '';\n $formArguments .= $dataAttributesString;\n echo '<form ' . $formArguments . '>';\n\n $fields = $this->getFields();\n foreach ($fields as $key => $field) {\n $field->render();\n }\n\n echo '</form>';\n\n echo htmlspecialcharsbx($this->getPostfix());\n }", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "public function render() {\n $html = str_replace('{text}', $this->text, FORMWIZARD_SEPARATOR);\n $this->html = $html;\n }", "public function render()\n {\n return $this->getFormCreator()->render();\n }", "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "protected function outputHTML() {\r\n echo new \\view\\components\\ErrorMessage(array(\r\n \"errorMessage\" => $this->errorMessage\r\n ));\r\n echo new \\view\\components\\ResultMessage(array(\r\n \"resultMessage\" => $this->resultMessage\r\n ));\r\n\t\t\r\n\t\techo new \\view\\components\\ObjavaForm(array(\r\n\t\t\t\"postAction\" => \\route\\Route::get('d3')->generate(array(\r\n\t\t\t\t\"controller\" => 'ozsn',\r\n\t\t\t\t\"action\" => 'modifyObjava'\r\n\t\t\t)) . \"?id=\" . $this->objava->idObjave,\r\n\t\t\t\"submitButtonText\" => \"Spremi promjene\",\r\n\t\t\t\"elektrijade\" => $this->elektrijade,\r\n\t\t\t\"mediji\" => $this->mediji,\r\n\t\t\t\"objava\" => $this->objava,\r\n\t\t\t\"objaveOElektrijadi\" => $this->objaveOElektrijadi\r\n\t\t));\r\n }", "public function getContent()\n {\n $this->_html = '';\n \n /**\n * If values have been submitted in the form, validate and process.\n */\n if (((bool)Tools::isSubmit('submitOrderrefModule')) == true) {\n $errors = $this->postValidation();\n if (!count($errors)) {\n $this->postProcess();\n } else {\n $this->_html .= $this->displayError($errors);\n }\n }\n \n $this->_html .= $this->renderForm();\n\n return $this->_html;\n }", "public function buildHTML()\n {\n $view = $this->container;\n $attr = [];\n if (is_array($this->container)) {\n if (isset($this->container[0])) {\n list($view, $attr) = $this->container;\n } else {\n $view = 'webarq::manager.cms.form.element';\n $attr = $this->container;\n }\n }\n\n if ('hidden' === $this->type) {\n return $this->buildInput();\n }\n\n return view($view, [\n 'title' => $this->getTitle(),\n 'input' => $this->buildInput(),\n 'attribute' => Arr::merge((array)$attr, ['class' => 'form-group'], 'join'),\n 'info' => $this->info,\n 'type' => $this->type\n ] + get_object_vars($this))->render();\n }", "public function render() {\n /* verify all fields except checkbox */\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n /* verify checkbox */\n $tempName = str_replace('[]', NULL, $this->name);\n\n if($this->required\n && $this->form->isSubmitted()\n && $this->type == 'checkbox'\n && !isset($_REQUEST[$tempName])) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n $html = NULL;\n $this->value = htmlspecialchars($this->value);\n\n $html .= '<input type=\"'.$this->type.'\" id=\"'.$this->id.'\" name=\"'.$this->name.'\" value=\"'.$this->value.'\"';\n $html .= (bool)$this->size ? ' size= \"'.$this->size.'\"' : NULL;\n $html .= (bool)$this->maxlength ? ' maxlength= \"'.$this->maxlength.'\"' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= ($this->type == 'text' || $this->type == 'password') ? ' class=\"' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'submit') ? ' class=\"submit ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'checkbox') ? ' class=\"checkbox ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'radio') ? ' class=\"radio ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'image') ? ' source=\"'.$this->source.'\"' : NULL;\n $html .= ($this->type == 'image' && (bool)$this->width && (bool)$this->height) ? ' style=\"width:'.$this->width.'px; height:'.$this->height.'px;\"' : NULL;\n $html .= (bool)$this->checked ? ' checked' : NULL;\n $html .= ' />';\n\n if (isset($this->label)) {\n $html .= '<span class=\"label\">' . $this->label . '</span>';\n }\n\n $this->html = ($this->type == 'hidden') ? $html : $this->wrap($html);\n }", "public function _Render() {\n $form_instance = $this->form_instance;\n // Return the contents\n return '3/15 Questions Answered';\n }", "public function render() {\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n $this->value = htmlspecialchars($this->value);\n\n $html = '<textarea id=\"'.$this->id.'\" name=\"'.$this->name.'\"';\n $html .= (bool)$this->cols ? ' cols=\"'.$this->cols.'\"' : NULL;\n $html .= (bool)$this->rows ? ' rows=\"'.$this->rows.'\"' : NULL;\n $html .= (bool)$this->cssClass ? ' class=\"'.$this->cssClass.'\"' : NULL;\n $html .= '>'.$this->value.'</textarea>';\n\n $this->html = $this->wrap($html);\n }", "public function Render()\n\t{\n\t // when in NEW mode or when parent form in NEW mode, do nothing\n\t global $g_BizSystem;\n\t $prtMode = \"\";\n\t if ($this->m_ParentFormName) {\n $prtForm = $g_BizSystem->GetObjectFactory()->GetObject($this->m_ParentFormName);\n $prtMode = $prtForm->GetDisplayMode()->GetMode();\n\t }\n\t if ($this->m_Mode != MODE_N && $prtMode != MODE_N)\n\t {\n \t // get view history\n \t if (!$this->m_NoHistoryInfo)\n\t $this->SetHistoryInfo($g_BizSystem->GetSessionContext()->GetViewHistory($this->m_Name));\n\t }\n\t if ($this->m_Mode == MODE_N)\n $this->UpdateActiveRecord($this->GetDataObj()->NewRecord());\n\n //Moved the renderHTML function infront of declaring subforms\n $renderedHTML = $this->RenderHTML();\n\n\t global $g_BizSystem;\n\t // prepare the subforms' dataobjs, since the subform relates to parent form by dataobj association\n\t if ($this->m_SubForms) {\n \t foreach($this->m_SubForms as $subForm) {\n $formObj = $g_BizSystem->GetObjectFactory()->GetObject($subForm);\n $dataObj = $this->GetDataObj()->GetRefObject($formObj->m_DataObjName);\n if ($dataObj)\n $formObj->SetDataObj($dataObj);\n }\n\t }\n\t $this->SetClientScripts();\n\n return $renderedHTML;\n\t}", "public function render(): String\n {\n\n $this->view = \"<form action='$this->action' method='$this->method' name='$this->name' id='$this->id'\";\n\n // Add all other attributes like class, id, required etc.\n foreach ($this->attr as $key => $value) {\n $this->view .= \" $key=$value \";\n }\n $this->view .= \"/>\";\n\n // Add field's HTML code\n $fieldsView = $this->renderFields();\n $this->view .= \" <br> $fieldsView\";\n\n // Add submit button HTML code\n $submitButtonView = $this->buildSubmitButton();\n $this->view .= \" <br> $submitButtonView\";\n\n // Close the form tag\n $this->view .= \" <br> </form>\";\n\n return $this->view;\n }", "public function render() {\n\t\tif ($this->getPage()) {\n\t\t\t$options = $this->getPage()->getOptions();\n\t\t} else {\n\t\t\t$options = [];\n\t\t}\n\t\techo $this->field->render($options);\n\t}", "public function output() {\n $form_div = new div();\n $form_div->setId('form_' . $this->_fname);\n $form_div->setClass('form_elements');\n\n $form_div->add(implode(\"\\n\",$this->_output));\n\n if (!empty($this->_output_submit)) {\n $submitWrapper = new div();\n $submitWrapper->setId('form_submit_' .$this->_fname);\n $submitWrapper->setClass('form_submit_elements');\n $form_div->add($submitWrapper->add(implode(\"\\n\",$this->_output_submit)));\n }\n\n return $form_div->html();\n }", "public function render(): string\n {\n return $this->getForm()->getRenderer()->render($this);\n }", "public function renderHTML()\n {\n }", "public function renderForm() {\n $enctype = $this->_enctype ? \"enctype=\\\"multipart/form-data\\\"\" : \"\";\n $formAttributes = $this->_renderAttributes($this->_formAttributes);\n $html = \"<form action=\\\"{$this->getAction()}\\\" method=\\\"{$this->_method}\\\" {$enctype} $formAttributes>\";\n $currentFieldset = NULL;\n\n if (count($this->_inputElements)) {\n foreach ($this->_inputElements as $element) {\n if ($element[1] !== NULL) {\n if ($element[1] !== $currentFieldset) {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n $fieldset = $this->_fieldsets[$element[1]];\n $fieldsetAttributes = $this->_renderAttributes($fieldset[1]);\n $html .= \"<fieldset {$fieldsetAttributes}><legend>{$fieldset[0]}</legend>\";\n $currentFieldset = $element[1];\n }\n } else {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n }\n $html .= $this->renderElement($element[0]->getName());\n $currentFieldset = $element[1];\n }\n }\n if (count($this->_hiddenElements)) {\n foreach ($this->_hiddenElements as $element) {\n $html .= $this->renderElement($element->getName());\n }\n }\n $html .= \"</form>\";\n return $html;\n }", "public function getHTML(){\n $twig = get_instance()->twig->getTwig();\n $template = $twig->load('sistema/theme/default/lib/field.twig');\n \n return $template->render(array(\n 'element_type' => $this->getElementName()\n , 'type' => $this->getFieldType()\n , 'id' => $this->getId()\n , 'name' => $this->getName()\n , 'title' => $this->getAttr('title')\n , 'class' => $this->getClass()\n , 'form_name' => $this->getFormName()\n , 'error_name' => $this->getErrorName()\n , 'attributes' => $this->getTagAttributes()\n , 'disabled' => $this->hasDisabled()\n ));\n }", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "public function render()\n {\n $root =& XCube_Root::getSingleton();\n $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);\n\n $renderTarget =& $renderSystem->createRenderTarget('main');\n\n $renderTarget->setAttribute('legacy_module', 'legacy');\n $renderTarget->setTemplateName('legacy_xoopsform_tableform.html');\n $renderTarget->setAttribute('form', $this);\n\n $renderSystem->render($renderTarget);\n\n return $renderTarget->getResult();\n }", "public function render() {\n echo $this->getHtml();\n }", "public function getHTML()\n\t{\n\t\t$start = '\n\t\t\t<form';\n\t\t$start .= ( $this->id ) ? ' id=\"' . $this->id . '\"' : '';\n $start .= ' class=\"group\"';\n $start .= ' action=\"' . $this->action . '\"';\n\t\t$start .= ' method=\"' . $this->method . '\"';\n\t\t$start .= ( $this->enctype ) ? ' enctype=\"multipart/form-data\"' : '';\n\t\t$start .= \">\\n\";\n\t\t\n\t\t$end = \"</form>\\n\";\n\t\t\n\t\t$content = '';\n\t\tforeach ( $this->elements as $element ) {\n\t\t\t$content .= $element->getHtml();\n\t\t}\n\t\t\n\t\treturn $start . $content . $end;\n\t}", "public function render() {\n\n echo $this->html;\n\n }", "function render(Form $form);", "public function getContent()\n {\n\n //Save Form configuration post data\n $this->__saveConfiguration();\n\n //Show Configuration form\n $this->__setConfigurationForm();\n\n return $this->_html;\n }", "public function render()\n {\n if (! $this->inline) {\n $this->addClass('form-text');\n }\n\n return view('bootstrap-blade::form-text');\n }", "function render() {\n return $this->render_label().$this->render_field().$this->render_message();\n }", "public function render()\n {\n $label = $this->presentLabel();\n\n return '<div class=\"form-group\">'.PHP_EOL.$label.$this->renderInner().'</div>';\n }", "public function html(){\n\t\treturn '<div class=\"form-group\">'.$this->label.$this->input.'</div>';\n\t}", "public function render()\n {\n // dd($this->value);\n return view(load_view('components.forms.render'));\n }", "public function render_html() {\n global $USER;\n $courseid = \\mod_customcert\\element_helper::get_courseid($this->get_id());\n $content = $this->get_decoded_data()->content;\n $text = format_text($content, FORMAT_HTML, ['context' => \\context_course::instance($courseid)]);\n\n return \\mod_customcert\\element_helper::render_html_content($this, $this->render_table($text, $USER, true));\n }", "public function render()\n {\n $_ipt = '';\n\n if($this->type == 'submit') {\n $_ipt = $this->renderSubmitItem();\n }else if($this->inline !== 'false' || $this->type == 'inline') {\n $_ipt = $this->renderInlineItem();\n }else{\n $_ipt = <<<'blade'\n <div {{ $attributes->merge([\"class\" => \"layui-form-item\"]) }}>\n <label for=\"name\" class=\"layui-form-label {{$required}}\">\n @if($required)<span>*</span> @endif{{$label}}\n </label>\n <div class=\"layui-input-block\">{{$slot}}</div>\n </div>\n blade;\n }\n return $_ipt;\n }", "public function render(): string\n {\n $output = $this->openForm();\n\n foreach($this->options['groups'] as $fieldset_id => $fieldset) {\n if (!empty($fieldset['legend'])) {\n $output .= sprintf('<fieldset id=\"%s\" class=\"%s\">',\n $fieldset_id,\n $fieldset['class'] ?? ''\n );\n $output .= '<legend>'.$fieldset['legend'].'</legend>';\n\n if (!empty($fieldset['description'])) {\n $output .= '<p>'.$fieldset['description'].'</p>';\n }\n }\n\n foreach($fieldset['elements'] as $element_id => $element_info) {\n if (!empty($element_info[1]['belongsTo']))\n $element_id = $element_info[1]['belongsTo'].'_'.$element_id;\n\n if (isset($this->fields[$element_id])) {\n $field = $this->fields[$element_id];\n $output .= $field->render($this->name);\n }\n }\n\n if (!empty($fieldset['legend'])) {\n $output .= '</fieldset>';\n }\n }\n\n $output .= $this->fields[self::CSRF_FIELD_NAME]->render($this->name);\n\n $output .= $this->closeForm();\n return $output;\n }", "public function getForm(): string\n {\n return $this->html;\n }", "function render_field() {\n return xFormTemplate::apply($this->template_field, $this->options);\n }", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "final public function render()\n {\n echo $this->generateMarkup($this->sanitizeData());\n }", "public function render() {\n $this->checkValue();\n $html = NULL;\n\n $html .= '<select id=\"'.$this->id.'\" name=\"'.$this->name.'\"';\n $html .= (bool)$this->multiple ? ' multiple' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= \">\\n\";\n\n foreach($this->options as $option) {\n $html .= '<option value=\"'.$option['optionValue'].'\"';\n\n if($this->form->isSubmitted()) {\n $html .= ($_REQUEST[$this->name] == $option['optionValue']) ? ' selected' : NULL;\n } else {\n $html .= (isset($option['selected']) && (bool)$option['selected']) ? ' selected' : NULL;\n }\n\n $html .= '>'.$option['optionTitle'].\"</option>\\n\";\n }\n\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n }\n\n $html .= '</select>';\n $this->html = $this->wrap($html);\n }", "public function renderForm()\n {\n $formUnit = $this->interActor->formUnit($this->inputHandler->getArrayMap());\n\n $view = new \\View\\Model(\n \\View\\Customer::form($formUnit),\n $this->inputHandler->routeArrayMap()\n );\n return $view->render();\n }", "public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}", "protected function renderForm()\n {\n $this->addAttribute(\"method\",$this->getMethod());\n \n if($this->getHasFile()) $this->addAttribute(\"enctype\",\"multipart/form-data\");\n\n $ret = '<form '.$this->getAttributes().'>';\n if($this->getHasFile())\n {\n $ret .= \"<input type='hidden' name='MAX_FILE_SIZE' value='10485760' />\";\n }\n if($this->error)\n {\n $ret .= \"<div class='fapi-error'><ul>\";\n foreach($this->errors as $error)\n {\n $ret .= \"<li>$error</li>\";\n }\n $ret .= \"</ul></div>\";\n }\n $ret .= $this->renderElements();\n\n $onclickFunction = \"fapi_ajax_submit_\".$this->getId().\"()\";\n $onclickFunction = str_replace(\"-\",\"_\",$onclickFunction);\n \n if($this->getShowClear())\n {\n $clearButton = '<input class=\"fapi-submit\" type=\"reset\" value=\"Clear\"/>';\n }\n\n if($this->getShowSubmit())\n {\n $ret .= '<div id=\"fapi-submit-area\">';\n $submitValue = $this->submitValue?('value=\"'.$this->submitValue.'\"'):\"\";\n if($this->ajaxSubmit)\n {\n $ret .= sprintf('<input class=\"fapi-submit\" type=\"button\" %s onclick=\"%s\" /> %s',$submitValue,$onclickFunction,$clearButton);\n }\n else\n {\n $ret .= sprintf('<input class=\"fapi-submit\" type=\"submit\" %s /> %s',$submitValue,$clearButton);\n }\n $ret .= '</div>';\n }\n $id = $this->getId();\n \n if($id != '')\n {\n $ret .= \"<input type='hidden' name='is_form_{$id}_sent' value='yes' />\";\n }\n \n $ret .= '<input type=\"hidden\" name=\"is_form_sent\" value=\"yes\" />';\n $ret .= '</form>';\n\n if($this->ajaxSubmit)\n {\n $elements = $this->getFields();\n $ajaxData = array();\n foreach($elements as $element)\n {\n $id = $element->getId();\n if($element->getStorable())\n {\n $ajaxData[] = \"'\".urlencode($id).\"='+document.getElementById('$id').\".($element->getType()==\"Field\"?\"value\":\"checked\");\n }\n $validations = $element->getJsValidations();\n $validators .= \"if(!fapiValidate('$id',$validations)) error = true;\\n\";\n }\n $ajaxData[] = \"'fapi_dt=\".urlencode($this->getDatabaseTable()).\"'\";\n $ajaxData = addcslashes(implode(\"+'&'+\", $ajaxData),\"\\\\\");\n\n $ret .=\n \"<script type='text/javascript'>\n function $onclickFunction\n {\n var error = false;\n $validators\n if(error == false)\n {\n \\$.ajax({\n type : 'POST',\n url : '{$this->ajaxAction}',\n data : $ajaxData\n });\n }\n }\n </script>\";\n }\n return $ret;\n }", "public function getHtml() {\n if ($this->isMultiple) {\n throw new ZiboException('This submit field has multiple values, please use getOptionHtml instead of getHtml');\n }\n\n return $this->getSubmitHtml($this->getId(), $this->getDisplayValue());\n }", "public function render()\n {\n $key = $this->config['key'];\n $className = $this->config['className'];\n\n return $this->view->make('recaptcha::form', compact('key', 'className'));\n }", "protected function renderContent()\n\t{\n\n\t\treturn $this->view->render($this->formView, [\n\t\t\t'model'=>$this->model,\n\t\t\t'mode'=>$this->mode,\n\t\t]);\n\t}", "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"file\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printAccept()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t;\r\n\t}", "public function getHTML() : string\n {\n $strStyle = '';\n if ($this->oFlags->isSet(FormFlags::ALIGN_CENTER)) {\n $strStyle = 'text-align: center;';\n } else if ($this->oFlags->isSet(FormFlags::ALIGN_RIGHT)) {\n $strStyle = 'text-align: right;';\n }\n $strHTML = $this->buildContainerDiv($strStyle);\n\n $strHTML .= '<input type=\"button\" ';\n $strHTML .= $this->buildID();\n $strHTML .= $this->buildStyle();\n $strHTML .= $this->buildAttributes();\n $strHTML .= ' value=\"' . $this->strBtnText . '\"></div>' . PHP_EOL;\n\n return $strHTML;\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitCaptureleadsxavierModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitB2binpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\t\t$javascriptValidationCode = $this->printJavascriptValidationCode();\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.(!empty($printJavascriptValidationCode) ? ' '.parent::JSENABLEDCLASS : '').'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"password\"'\r\n\t\t\t\t\t\t.' value=\"'.HtmlFormTools::auto_htmlspecialchars($this->text, $this->needsUtf8Safety()).'\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t\t.$javascriptValidationCode\r\n\t\t;\r\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMyeticketsModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitOrderrefModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = PrestashopFactory::buildHelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitIfthenpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "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 html()\n {\n return ($this->isEncrypted()) ? $this->encryptedField() : $this->regularField();\n }", "public function render(Varien_Data_Form_Element_Abstract $element){\n return $this->toHtml();\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit_apisfact_prestashop';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function render() {\n $this->addClass('form-group form-group-sm');\n $this->addClass($this->layoutClass);\n $this->addClass($this->errorClass);\n\n $this->addClass('input-group', 'fieldOptions');\n $this->addClass('input-list', 'fieldOptions');\n if ($this->itemLayout == \"Horizontal\") {\n $this->addClass('inline', 'fieldOptions');\n }\n\n $this->setDefaultOption('ng-model', \"model['{$this->originalName}']\", $this->options);\n $this->processExpr();\n return $this->renderInternal('template_render.php');\n }", "function renderWholeForm() {\n\t\t$output = $this->renderCurrentStep();\n\t\t$output .= $this->renderSubmitButtons();\n\n\t\treturn $this->wrapWithForm ($output);\n\t}", "public abstract function asHTML();", "public function display()\n {\n $output = \"\";\n\n // Ouverture\n /// ID HTML\n $openId = $this->getAttr('container_id');\n /// Classes HTML\n $openClass = [];\n $openClass[] = 'tiFyForm-FieldContainer';\n $openClass[] = 'tiFyForm-FieldContainer--' . $this->getType();\n $openClass[] = 'tiFyForm-FieldContainer--' . $this->getSlug();\n if ($this->getErrors()) :\n $openClass[] = 'tiFyForm-FieldContainer--error';\n endif;\n $openClass[] = $this->getAttr('container_class');\n if ($this->getAttr('required')) :\n $openClass[] = 'tiFyForm-FieldContainer--required';\n endif;\n $output .= $this->form()\n ->factory()\n ->fieldOpen($this, $openId, join(' ', $openClass));\n\n // Contenu du champ\n $output .= $this->type()->_display();\n\n // Fermeture\n $output .= $this->form()->factory()->fieldClose($this);\n\n return $output;\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->postAjax()\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->postAjax()\n ->parameters($this->getBuilderParameters());\n }", "public function toHtml()\n {\n return $this->render();\n }", "public function toHtml()\n {\n return $this->render();\n }", "function render() {\n\t\tglobal $current_user, $user_identity;\n\n\t\t$r = '';\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\t\t$field_required = $this->get_attribute( 'required' );\n\t\t$placeholder = $this->get_attribute( 'placeholder' );\n\t\t$field_placeholder = ( ! empty( $placeholder ) ) ? \"placeholder='\" . esc_attr( $placeholder ) . \"'\" : '';\n\n\t\tif ( isset( $_POST[$field_id] ) ) {\n\t\t\t$this->value = stripslashes( (string) $_POST[$field_id] );\n\t\t} elseif (\n\t\t\tis_user_logged_in()\n\t\t\t&& ( ( defined( 'IS_WPCOM' ) && IS_WPCOM )\n\t\t\t || true === apply_filters( 'jetpack_auto_fill_logged_in_user', false )\n\t\t\t)\n\t\t) {\n\t\t\t// Special defaults for logged-in users\n\t\t\tswitch ( $this->get_attribute( 'type' ) ) {\n\t\t\tcase 'email';\n\t\t\t\t$this->value = $current_user->data->user_email;\n\t\t\t\tbreak;\n\t\t\tcase 'name' :\n\t\t\t\t$this->value = $user_identity;\n\t\t\t\tbreak;\n\t\t\tcase 'url' :\n\t\t\t\t$this->value = $current_user->data->user_url;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->value = $this->get_attribute( 'default' );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->value = $this->get_attribute( 'default' );\n\t\t}\n\n\t\t$field_value = Grunion_Contact_Form_Plugin::strip_tags( $this->value );\n\t\t$field_label = Grunion_Contact_Form_Plugin::strip_tags( $field_label );\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label email\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='email' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='email' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'textarea' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='contact-form-comment-\" . esc_attr( $field_id ) . \"' class='grunion-field-label textarea\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<textarea name='\" . esc_attr( $field_id ) . \"' id='contact-form-comment-\" . esc_attr( $field_id ) . \"' rows='20' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \">\" . esc_textarea( $field_value ) . \"</textarea>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'radio' :\n\t\t\t$r .= \"\\t<div><label class='grunion-field-label\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\tforeach ( $this->get_attribute( 'options' ) as $option ) {\n\t\t\t\t$option = Grunion_Contact_Form_Plugin::strip_tags( $option );\n\t\t\t\t$r .= \"\\t\\t<label class='grunion-radio-label radio\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\";\n\t\t\t\t$r .= \"<input type='radio' name='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $option ) . \"' class='radio' \" . checked( $option, $field_value, false ) . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/> \";\n\t\t\t\t$r .= esc_html( $option ) . \"</label>\\n\";\n\t\t\t\t$r .= \"\\t\\t<div class='clear-form'></div>\\n\";\n\t\t\t}\n\t\t\t$r .= \"\\t\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'checkbox' :\n\t\t\t$r .= \"\\t<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label class='grunion-field-label checkbox\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='checkbox' name='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr__( 'Yes', 'jetpack' ) . \"' class='checkbox' \" . checked( (bool) $field_value, true, false ) . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/> \\n\";\n\t\t\t$r .= \"\\t\\t\" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<div class='clear-form'></div>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'select' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label select\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t<select name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' class='select' \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \">\\n\";\n\t\t\tforeach ( $this->get_attribute( 'options' ) as $option ) {\n\t\t\t\t$option = Grunion_Contact_Form_Plugin::strip_tags( $option );\n\t\t\t\t$r .= \"\\t\\t<option\" . selected( $option, $field_value, false ) . \">\" . esc_html( $option ) . \"</option>\\n\";\n\t\t\t}\n\t\t\t$r .= \"\\t</select>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'date' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label \" . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='date' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='\" . esc_attr( $field_type ) . \"' \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\n\t\t\twp_enqueue_script( 'grunion-frontend', plugins_url( 'js/grunion-frontend.js', __FILE__ ), array( 'jquery', 'jquery-ui-datepicker' ) );\n\t\t\tbreak;\n\t\tdefault : // text field\n\t\t\t// note that any unknown types will produce a text input, so we can use arbitrary type names to handle\n\t\t\t// input fields like name, email, url that require special validation or handling at POST\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label \" . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='text' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='\" . esc_attr( $field_type ) . \"' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t}\n\n\t\treturn apply_filters( 'grunion_contact_form_field_html', $r, $field_label, ( in_the_loop() ? get_the_ID() : null ) );\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit'.$this->name;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function getContent()\n {\n $postProcessConfigResult = null;\n if (((bool)Tools::isSubmit('submitSatispayModuleConfig')) == true) {\n $postProcessConfigResult = $this->postProcessConfig();\n }\n\n $postProcessRefundResult = null;\n if (((bool)Tools::isSubmit('submitSatispayModuleRefund')) == true) {\n $postProcessRefundResult = $this->postProcessRefund();\n }\n\n return $this->renderForm($postProcessConfigResult, $postProcessRefundResult);\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_spentModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function render()\n {\n return view('bs-component::form.editor');\n }", "function render_html($fval) \n {\n $methodname = '_field_' . $this->type;\n if (!method_exists($this, $methodname)) {\n $methodname = \"_field_text\";\n }\n $this->html = '<span class=\"formexField' . ucfirst($this->type) . '\">';\n $this->html .= $this->$methodname($fval);\n $this->html .= '</span>';\n }", "public function render(){\n\t\t$fhp; // form_helper_params\n\t\t$value = $this->_data['value'];\n\t\t$form_helper = 'input';\n\t\t$attributes = Arr::extract($this->_data,['id','required','maxlength','title','pattern','readonly','class','size','placeholder','multiple','accept','options']);\n\t\tif(!in_array($this->_data['type'],['radio'])) unset($attributes['options']);\n\t\tif($attributes['required']!==true) unset($attributes['required']);\n\t\tif($attributes['readonly']!==true) unset($attributes['readonly']);\n\t\tif(!$attributes['maxlength']) unset($attributes['maxlength']);\n\t\tif(!$attributes['size']) unset($attributes['size']);\n\t\t$fhp = [$this->_data['name'],$value,$attributes];\n\t\t//$name = $this->_data['name'];\n\t\t//open,close,input,button,checkbox,file,hidden,image,label,password,radio,select,submit,textarea,\n\t\t//$attr\n\t\tswitch($this->_data['type']){\n\t\t\tcase'form':\n\t\t\t\t$form_helper = $this->_data['data_type']; $fhp=[];\n\t\t\t\tbreak;\n\t\t\tcase'select':\n\t\t\t\t//unset\n\t\t\t\t$form_helper='select'; $fhp=[$this->_data['name'],$this->_data['options'],$value,$attributes];\n\t\t\t\tbreak;\n\t\t\tcase'checkbox':\n\t\t\t\t$fhp = [$this->_data['name'],1,!!($value),$attributes];\n\t\t\t\t$form_helper='checkbox';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//if($this->_data['type'] == 'radio') $fhp[2]['options'] = Arr::get($this->_data,'options');\n\t\t\t\tif(in_array($this->_data['type'],['file','select','checkbox','radio','hidden'])) $this->_data['inputtype'] = $this->_data['type'];\n\t\t\t\t//if()\n\t\t\t\tswitch($this->_data['data_type']){\n\t\t\t\t\tcase'int':\n\t\t\t\t\t\t$fhp[2]['type']='number';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase'text':\n\t\t\t\t\t\t$form_helper='textarea';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\tif($form_helper=='input') $fhp[2]['type']=$this->_data['inputtype'];\n\t\t/*switch($this->_data['data_type']){\n\t\t\tcase'form':\n\t\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\treturn call_user_func_array([$this,$form_helper],$fhp);\n\t\t//->($this->_data['name']);\n\t\t//return json_encode($this->_datations);\n\t\t//return \n\t\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitStatsProfitMarginModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitKushkipagosModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n if(Currency::getDefaultCurrency()->iso_code=='COP'){\n return $helper->generateForm(array($this->getConfigFormCOP()));\n }else{\n return $helper->generateForm(array($this->getConfigForm()));\n }\n\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMClModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "function render(Form $form): string;", "public function renderForm()\n {\n\n $table = \"luda_resource_has_tag\";\n $identifier = \"Light_Kit_Admin_UserData.generated/luda_resource_has_tag\";\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_base\";\n $vars = [\n \"title\" => \"Resource has tag form\",\n ];\n if (array_key_exists(\"solo\", $_GET)) {\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_solo\";\n $vars['related_links'] = []; // cancel any existing related links\n $this->setOnSuccessIframeSignal(\"done\");\n }\n\n $form = $this->processForm($identifier, $table);\n\n\n\n //--------------------------------------------\n // RENDERING\n //--------------------------------------------\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_form', [\n \"parent_layout\" => $parentLayout,\n \"form\" => $form,\n ], PageConfUpdator::create()->updateWidget(\"body.lka_chloroform\", [\n 'vars' => $vars,\n ]));\n }", "public function render()\r\n { \r\n $val = \"\";\r\n\t\tif(isset($_POST[$this->get_name()])) \r\n\t\t\t$val = htmlspecialchars($this->get_value());\r\n\t\telse $val = '';\r\n\t\t$html = array();\r\n \t$html[] = sprintf(\r\n '<textarea name=\"%s\" id=\"%1$s\" %s>'. $val .'</textarea>',\r\n $this->name,\r\n $this->attributestorage->get_attributes()\r\n );\r\n return implode('\\n', $html);\r\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "function render($wrap = TRUE)\n {\n $fields = array();\n foreach ($this->object->_get_field_names() as $field) {\n $method = \"_render_{$field}_field\";\n if ($this->object->has_method($method)) {\n $fields[] = $this->object->{$method}($this->object->get_model());\n }\n }\n return $this->object->render_partial('photocrati-nextgen_admin#form', array('fields' => $fields, 'wrap' => $wrap), TRUE);\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitTwispayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function render()\n {\n if (! is_null($this->cultivated)) {\n return $this->cultivated;\n }\n\n $html = collect();\n $groups = $this->modules();\n\n $argc = array_values(request()->getRouteResolver()->call($this)->parameters());\n\n foreach ($groups as $form) {\n if (! is_object($form)) {\n $form = new $form();\n }\n if (method_exists($form, 'get')) {\n $html->put($form->name, $form->get(...$argc));\n }\n }\n\n $this->cultivated = $html;\n\n return $this->cultivated;\n }", "protected function RenderBegin($blnDisplayOutput = true) {\r\n\t\t\tswitch ($this->intFormStatus) {\r\n\t\t\t\tcase QFormBase::FormStatusUnrendered:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase QFormBase::FormStatusRenderBegun:\r\n\t\t\t\tcase QFormBase::FormStatusRenderEnded:\r\n\t\t\t\t\tthrow new QCallerException('$this->RenderBegin() has already been called');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new QCallerException('FormStatus is in an unknown status');\r\n\t\t\t}\r\n\r\n\t\t\t// Update FormStatus\r\n\t\t\t$this->intFormStatus = QFormBase::FormStatusRenderBegun;\r\n\r\n\t\t\t// Iterate through the form's ControlArray to Define FormAttributes and JavaScriptIncludes\r\n\t\t\t$strJavaScriptArray = array();\r\n\t\t\t$strFormAttributeArray = array();\r\n\t\t\tforeach ($this->GetAllControls() as $objControl) {\r\n\t\t\t\t// JavaScript Includes? The control would have a\r\n\t\t\t\t// comma-delimited list of javascript files to include (if applicable)\r\n\t\t\t\tif ($objControl->JavaScripts) {\r\n\t\t\t\t\t$strScriptArray = explode(',', $objControl->JavaScripts);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($strScriptArray) foreach ($strScriptArray as $strScript) {\r\n\t\t\t\t\t\tif (trim($strScript))\r\n\t\t\t\t\t\t\t$strJavaScriptArray[trim($strScript)] = $strScript;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Form Attributes?\r\n\t\t\t\tif ($objControl->FormAttributes) {\r\n\t\t\t\t\t$strFormAttributeArray = array_merge($strFormAttributeArray, $objControl->FormAttributes);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Create $strFormAttributes\r\n\t\t\t$strFormAttributes = '';\r\n\t\t\tforeach ($strFormAttributeArray as $strKey=>$strValue) {\r\n\t\t\t\t$strFormAttributes .= sprintf(' %s=\"%s\"', $strKey, $strValue);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$strOutputtedText = strtolower(trim(ob_get_contents()));\r\n\t\t\tif (strpos($strOutputtedText, '<body') === false) {\r\n\t\t\t\t$strToReturn = '<body>';\r\n\t\t\t\t$this->blnRenderedBodyTag = true;\r\n\t\t\t} else\r\n\t\t\t\t$strToReturn = '';\r\n\r\n\t\t\t// Setup Rendered HTML\r\n//\t\t\t$strToReturn .= sprintf('<form method=\"post\" name=\"%s\" id=\"%s\" action=\"%s\"%s>', $this->strFormId, $this->strFormId, QApplication::$RequestUri, $strFormAttributes);\r\n\t\t\t$strToReturn .= sprintf('<form method=\"post\" id=\"%s\" autocomplete=\"off\" action=\"%s\"%s>', $this->strFormId, QApplication::$RequestUri, $strFormAttributes);\r\n\r\n\t\t\t// Call in JavaScript\r\n\t\t\t$strToReturn .= sprintf('<script type=\"text/javascript\" src=\"%s%s/includes/qcodo/qform_objects/_form.js\"></script>', DOCROOT_VIRTUAL_DIRECTORY, DOCROOT_SUBFOLDER);\r\n\r\n\t\t\t// Call in OTHER JavaScripts (if any)\r\n\t\t\tforeach ($strJavaScriptArray as $strScript)\r\n\t\t\t\t$strToReturn .= sprintf('<script type=\"text/javascript\" src=\"%s%s/includes/qform/assets/%s\"></script>', DOCROOT_VIRTUAL_DIRECTORY, DOCROOT_SUBFOLDER, $strScript);\r\n\r\n\t\t\t// Perhaps a strFormModifiers as an array to\r\n\t\t\t// allow controls to update other parts of the form, like enctype, onsubmit, etc.\r\n\r\n\t\t\t// Return or Display\r\n\t\t\tif ($blnDisplayOutput) {\r\n\t\t\t\tprint ($strToReturn);\r\n\t\t\t\treturn null;\r\n\t\t\t} else\r\n\t\t\t\treturn $strToReturn;\r\n\t\t}", "protected function _toHtml() \n {\n $zaakpay = Mage::getModel('zaakpay/transact');\n $fields = $zaakpay->getCheckoutFormFields();\n $form = '<form id=\"zaakpay_checkout\" method=\"POST\" action=\"' . $zaakpay->getZaakpayTransactAction() . '\">';\n foreach($fields as $key => $value) {\n if ($key == 'returnUrl') {\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"'.$key.'\" value=\"'.Checksum::sanitizedURL($value).'\" />'.\"\\n\";\n\t\t\t} else {\n\t\t\t\t$form .= '<input type=\"hidden\" name=\"'.$key.'\" value=\"'.Checksum::sanitizedParam($value).'\" />'.\"\\n\";\n\t\t\t}\n }\n $form .= '</form>';\n $html = '<html><body>';\n $html .= $this->__('You will be redirected to the Zaakpay website in a few seconds.');\n $html .= $form;\n $html.= '<script type=\"text/javascript\">document.getElementById(\"zaakpay_checkout\").submit();</script>';\n $html.= '</body></html>';\n return $html;\n }", "public function render()\n {\n return view('components.form.input');\n }", "public function getHtml()\n {\n $attributes = $this->getAttributes();\n $attributes['value'] = htmlspecialchars($this->getValue());\n $attributes['type'] = 'hidden';\n $attributesStr = $this->_buildAttributeStr($attributes);\n\n $html = '<input ' . $attributesStr . ' />';\n return $html;\n }", "public function render()\n {\n return view('components.form.form-section');\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_weatherModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "function get_html($fval) \n {\n $this->render_html($fval);\n return $this->html;\n }", "public function render()\r\n\t{\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\tif (!empty($this->id)) \r\n\t\t{\r\n\t\t\t$content .= \"id='\" . $this->id . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($this->name)) \r\n\t\t{\r\n\t\t\t$content .= \"name='\" . $this->name . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($this->className)) \r\n\t\t{\r\n\t\t\t$content .= \"class='\" . $this->className . \"' \";\r\n\t\t}\r\n\t\t\r\n\t\treturn $content;\r\n\t}", "public function render()\n {\n try {\n $html = $this->html();\n\n if ($this->editable === true || Editor::isHistory()) {\n $html = $this->addAttributesToHtml($html);\n }\n\n return empty($html) ? $html : $this->before.$html.$this->after;\n } catch (\\Exception $e) {\n if (App::environment() === 'local') {\n throw $e;\n }\n }\n }", "public function get_html()\n\t{\n\t\tif ( empty($this->html) && $this->name ){\n\t\t\t\n\t\t\t$this->html .= '<'.$this->tag.' name=\"'.$this->name.'\"';\n\t\t\t\n\t\t\tif ( isset($this->id) ){\n\t\t\t\t$this->html .= ' id=\"'.$this->id.'\"';\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->tag === 'input' && isset($this->options['type']) ){\n\t\t\t\t$this->html .= ' type=\"'.$this->options['type'].'\"';\n\t\t\t\t\n\t\t\t\tif ( $this->options['type'] === 'text' || $this->options['type'] === 'number' || $this->options['type'] === 'password' || $this->options['type'] === 'email' ){\n\t\t\t\t\tif ( isset($this->options['maxlength']) && ( $this->options['maxlength'] > 0 ) && $this->options['maxlength'] <= 1000 ){\n\t\t\t\t\t\t$this->html .= ' maxlength=\"'.$this->options['maxlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['minlength']) && ( $this->options['minlength'] > 0 ) && $this->options['minlength'] <= 1000 && ( \n\t\t\t\t\t( isset($this->options['maxlength']) && $this->options['maxlength'] > $this->options['minlength'] ) || !isset($this->options['maxlength']) ) ){\n\t\t\t\t\t\t$this->html .= ' minlength=\"'.$this->options['minlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['size']) && ( $this->options['size'] > 0 ) && $this->options['size'] <= 100 ){\n\t\t\t\t\t\t$this->html .= ' size=\"'.$this->options['size'].'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $this->options['type'] === 'checkbox' ){\n\t\t\t\t\tif ( !isset($this->options['value']) ){\n\t\t\t\t\t\t$this->options['value'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->options['value']).'\"';\n\t\t\t\t\tif ( $this->value == $this->options['value'] ){\n\t\t\t\t\t\t$this->html .= ' checked=\"checked\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( $this->options['type'] === 'radio' ){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->value).'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['title']) ){\n\t\t\t\t$this->html .= ' title=\"'.$this->options['title'].'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$class = '';\n\t\t\t\n\t\t\tif ( isset($this->options['cssclass']) ){\n\t\t\t\t$class .= $this->options['cssclass'].' ';\n\t\t\t}\n\n\t\t\tif ( $this->required ){\n\t\t\t\t$class .= 'required ';\n\t\t\t}\n\t\t\tif ( isset($this->options['email']) ){\n\t\t\t\t$class .= 'email ';\n\t\t\t}\n\t\t\tif ( isset($this->options['url']) ){\n\t\t\t\t$class .= 'url ';\n\t\t\t}\n\t\t\tif ( isset($this->options['number']) ){\n\t\t\t\t$class .= 'number ';\n\t\t\t}\n\t\t\tif ( isset($this->options['digits']) ){\n\t\t\t\t$class .= 'digits ';\n\t\t\t}\n\t\t\tif ( isset($this->options['creditcard']) ){\n\t\t\t\t$class .= 'creditcard ';\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($class) ){\n\t\t\t\t$this->html .= ' class=\"'.trim($class).'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$this->html .= '>';\n\t\t\t\n\t\t\tif ( $this->tag === 'select' || $this->tag === 'textarea' ){\n\t\t\t\t$this->html .= '</'.$this->tag.'>';\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['placeholder']) && strpos($this->options['placeholder'],'%s') !== false ){\n\t\t\t\t$this->html = sprintf($this->options['placeholder'], $this->html);\n\t\t\t}\n\t\t}\n\t\treturn $this->html;\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->parameters($this->getBuilderParameters());\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->parameters($this->getBuilderParameters());\n }", "public function render() {\n $model = $this->storePath ? \"store-path=\\\"{$this->storePath}\\\"\" : '';\n $form = \":form=\\\"{$this->toProp()}\\\"\";\n\n\t\treturn \"<{$this->getComponent()} $form $model></{$this->getComponent()}>\";\n\t}", "public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->ajax('')\n ->addAction(['width' => '150px'])\n ->parameters($this->getBuilderParameters());\n }", "public function Render($form)\r\n\t{\r\n\t\t$this->form = $form;\r\n\t}", "public function render()\n {\n return view('components.submit-form', [\n 'buttonName' => $this->buttonName\n ]);\n }" ]
[ "0.7252208", "0.70790607", "0.7002298", "0.6993586", "0.69901067", "0.6944451", "0.69373906", "0.6918433", "0.6899601", "0.68714017", "0.6824665", "0.67850226", "0.6777467", "0.67761964", "0.67641073", "0.6743195", "0.6728927", "0.6710809", "0.66570747", "0.6629029", "0.66252124", "0.6607351", "0.65908074", "0.6569986", "0.6554391", "0.6504518", "0.65011996", "0.6500866", "0.6472235", "0.64695406", "0.6457319", "0.6457097", "0.64416957", "0.64408886", "0.64157337", "0.64127254", "0.64067006", "0.6375285", "0.6371175", "0.63601273", "0.6353581", "0.6339789", "0.632848", "0.63156456", "0.6313523", "0.63011974", "0.629141", "0.62861776", "0.627701", "0.62660545", "0.6257933", "0.6255489", "0.6248255", "0.6246959", "0.62440515", "0.62412804", "0.62400913", "0.6239907", "0.62380326", "0.62271017", "0.6219937", "0.621704", "0.6211566", "0.6211566", "0.6209478", "0.6209478", "0.619356", "0.61865944", "0.6182404", "0.61795217", "0.61751264", "0.6172578", "0.6166016", "0.61634976", "0.6155561", "0.6153117", "0.61401325", "0.6132984", "0.61305857", "0.61279255", "0.6121327", "0.61120707", "0.6111599", "0.61011446", "0.6096133", "0.6095982", "0.6091602", "0.60895586", "0.60891116", "0.60879797", "0.60737324", "0.6070736", "0.60676956", "0.60671246", "0.60554814", "0.6050111", "0.6036818", "0.6024097", "0.60222423", "0.6019146" ]
0.69579965
5
BizForm::RenderArray() Render form as array format using array template
protected function RenderArray() { if ($this->m_QueryONRender && !$this->m_ActiveRecord && $this->m_DataObjName) { if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule)) return $this->ProcessDataObjError($ok); $this->UpdateActiveRecord($resultRecords[0]); } $columns = $this->m_RecordRow->RenderColumn(); foreach($columns as $key=>$val) { $fields[$key]["label"] = $val; $fields[$key]["required"] = $this->GetControl($key)->m_Required; $fields[$key]["description"] = $this->GetControl($key)->m_Description; $fields[$key]["value"] = $this->GetControl($key)->m_Value; } $controls = $this->m_RecordRow->Render(); if ($this->CanShowData()) { foreach($controls as $key=>$val) { $fields[$key]["control"] = $val; } } return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function renderArray() {}", "public function render(){\n\t\t$data = array();\n\n\t\tforeach($this->fields as $fieldName => $field){\n\t\t\t$field->invokeContents($field->getValue(), $field);\n\t\t\t$data[$fieldName] = $this->renderTag($field);\n $data['fieldData'][$fieldName] = $this->renderArray($field);\n\t\t}\n $data['namespace'] = $this->settings['namespace'];\n\t\t$data['errors'] = $this->getMessageBag()->get(\"errors\");\n\t\t$data['messages'] = $this->getMessageBag()->get(\"messages\");\n $data['fieldData'] = substr(json_encode($data['fieldData']), 1, -1); // <-- remove outer curly's for IDE\n\n\t\treturn $data;\n\t}", "private function arrayToPrint()\n\t{\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->arrRender['CONTENT'] = $this->view\n\t\t\t->setTemplateFile('employeeedit')->renderFile();\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->view->setTemplateFile('index')->templateRender();\n\t}", "public function render()\n {\n $languageService = $this->getLanguageService();\n $resultArray = $this->initializeResultArray();\n\n $parameterArray = $this->data['parameterArray'];\n $config = $parameterArray['fieldConf']['config'];\n $elementName = $parameterArray['itemFormElName'];\n\n if ($config['readOnly']) {\n // Early return for the relatively simple read only case\n return $this->renderReadOnly();\n }\n\n $possibleItems = $config['items'];\n $selectedItems = $parameterArray['itemFormElValue'] ?: [];\n $selectedItemsCount = count($selectedItems);\n\n $maxItems = $config['maxitems'];\n $autoSizeMax = MathUtility::forceIntegerInRange($config['autoSizeMax'], 0);\n $size = 2;\n if (isset($config['size'])) {\n $size = (int)$config['size'];\n }\n if ($autoSizeMax >= 1) {\n $size = MathUtility::forceIntegerInRange($selectedItemsCount + 1, MathUtility::forceIntegerInRange($size, 1), $autoSizeMax);\n }\n $itemCanBeSelectedMoreThanOnce = !empty($config['multiple']);\n\n $listOfSelectedValues = [];\n $selectedItemsHtml = [];\n foreach ($selectedItems as $itemValue) {\n foreach ($possibleItems as $possibleItem) {\n if ($possibleItem[1] == $itemValue) {\n $title = $possibleItem[0];\n $listOfSelectedValues[] = $itemValue;\n $selectedItemsHtml[] = '<option value=\"' . htmlspecialchars($itemValue) . '\" title=\"' . htmlspecialchars($title) . '\">' . htmlspecialchars($title) . '</option>';\n break;\n }\n }\n }\n\n $selectableItemsHtml = [];\n foreach ($possibleItems as $possibleItem) {\n $disabledAttr = '';\n $classAttr = '';\n if (!$itemCanBeSelectedMoreThanOnce && in_array((string)$possibleItem[1], $selectedItems, true)) {\n $disabledAttr = ' disabled=\"disabled\"';\n $classAttr = ' class=\"hidden\"';\n }\n $selectableItemsHtml[] =\n '<option value=\"'\n . htmlspecialchars($possibleItem[1])\n . '\" title=\"' . htmlspecialchars($possibleItem[0]) . '\"'\n . $classAttr . $disabledAttr\n . '>'\n . htmlspecialchars($possibleItem[0]) .\n '</option>';\n }\n\n // Html stuff for filter and select filter on top of right side of multi select boxes\n $filterTextfield = [];\n if ($config['enableMultiSelectFilterTextfield']) {\n $filterTextfield[] = '<span class=\"input-group input-group-sm\">';\n $filterTextfield[] = '<span class=\"input-group-addon\">';\n $filterTextfield[] = '<span class=\"fa fa-filter\"></span>';\n $filterTextfield[] = '</span>';\n $filterTextfield[] = '<input class=\"t3js-formengine-multiselect-filter-textfield form-control\" value=\"\">';\n $filterTextfield[] = '</span>';\n }\n $filterDropDownOptions = [];\n if (isset($config['multiSelectFilterItems']) && is_array($config['multiSelectFilterItems']) && count($config['multiSelectFilterItems']) > 1) {\n foreach ($config['multiSelectFilterItems'] as $optionElement) {\n $value = $languageService->sL($optionElement[0]);\n $label = $value;\n if (isset($optionElement[1]) && trim($optionElement[1]) !== '') {\n $label = $languageService->sL($optionElement[1]);\n }\n $filterDropDownOptions[] = '<option value=\"' . htmlspecialchars($value) . '\">' . htmlspecialchars($label) . '</option>';\n }\n }\n $filterHtml = [];\n if (!empty($filterTextfield) || !empty($filterDropDownOptions)) {\n $filterHtml[] = '<div class=\"form-multigroup-item-wizard\">';\n if (!empty($filterTextfield) && !empty($filterDropDownOptions)) {\n $filterHtml[] = '<div class=\"t3js-formengine-multiselect-filter-container form-multigroup-wrap\">';\n $filterHtml[] = '<div class=\"form-multigroup-item form-multigroup-element\">';\n $filterHtml[] = '<select class=\"form-control input-sm t3js-formengine-multiselect-filter-dropdown\">';\n $filterHtml[] = implode(LF, $filterDropDownOptions);\n $filterHtml[] = '</select>';\n $filterHtml[] = '</div>';\n $filterHtml[] = '<div class=\"form-multigroup-item form-multigroup-element\">';\n $filterHtml[] = implode(LF, $filterTextfield);\n $filterHtml[] = '</div>';\n $filterHtml[] = '</div>';\n } elseif (!empty($filterTextfield)) {\n $filterHtml[] = implode(LF, $filterTextfield);\n } else {\n $filterHtml[] = '<select class=\"form-control input-sm t3js-formengine-multiselect-filter-dropdown\">';\n $filterHtml[] = implode(LF, $filterDropDownOptions);\n $filterHtml[] = '</select>';\n }\n $filterHtml[] = '</div>';\n }\n\n $classes = [];\n $classes[] = 'form-control';\n $classes[] = 'tceforms-multiselect';\n if ($maxItems === 1) {\n $classes[] = 'form-select-no-siblings';\n }\n $multipleAttribute = '';\n if ($maxItems !== 1 && $size !== 1) {\n $multipleAttribute = ' multiple=\"multiple\"';\n }\n $selectedListStyle = '';\n if (isset($config['selectedListStyle'])) {\n GeneralUtility::deprecationLog('TCA property selectedListStyle is deprecated since TYPO3 v8 and will be removed in v9');\n $selectedListStyle = ' style=\"' . htmlspecialchars($config['selectedListStyle']) . '\"';\n }\n $selectableListStyle = '';\n if (isset($config['itemListStyle'])) {\n GeneralUtility::deprecationLog('TCA property itemListStyle is deprecated since TYPO3 v8 and will be removed in v9');\n $selectableListStyle = ' style=\"' . htmlspecialchars($config['itemListStyle']) . '\"';\n }\n\n $legacyWizards = $this->renderWizards();\n $legacyFieldControlHtml = implode(LF, $legacyWizards['fieldControl']);\n $legacyFieldWizardHtml = implode(LF, $legacyWizards['fieldWizard']);\n\n $fieldInformationResult = $this->renderFieldInformation();\n $fieldInformationHtml = $fieldInformationResult['html'];\n $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $fieldInformationResult, false);\n\n $fieldControlResult = $this->renderFieldControl();\n $fieldControlHtml = $legacyFieldControlHtml . $fieldControlResult['html'];\n $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $fieldControlResult, false);\n\n $fieldWizardResult = $this->renderFieldWizard();\n $fieldWizardHtml = $legacyFieldWizardHtml . $fieldWizardResult['html'];\n $resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $fieldWizardResult, false);\n\n $html = [];\n $html[] = '<div class=\"formengine-field-item t3js-formengine-field-item\">';\n $html[] = $fieldInformationHtml;\n $html[] = '<div class=\"form-wizards-wrap\">';\n $html[] = '<div class=\"form-wizards-element\">';\n $html[] = '<input type=\"hidden\" data-formengine-input-name=\"' . htmlspecialchars($elementName) . '\" value=\"' . (int)$itemCanBeSelectedMoreThanOnce . '\" />';\n $html[] = '<div class=\"form-multigroup-wrap t3js-formengine-field-group\">';\n $html[] = '<div class=\"form-multigroup-item form-multigroup-element\">';\n $html[] = '<label>';\n $html[] = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.selected'));\n $html[] = '</label>';\n $html[] = '<div class=\"form-wizards-wrap form-wizards-aside\">';\n $html[] = '<div class=\"form-wizards-element\">';\n $html[] = '<select';\n $html[] = ' id=\"' . StringUtility::getUniqueId('tceforms-multiselect-') . '\"';\n $html[] = ' size=\"' . $size . '\"';\n $html[] = ' class=\"' . implode(' ', $classes) . '\"';\n $html[] = $multipleAttribute;\n $html[] = ' data-formengine-input-name=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = $selectedListStyle;\n $html[] = '>';\n $html[] = implode(LF, $selectedItemsHtml);\n $html[] = '</select>';\n $html[] = '</div>';\n $html[] = '<div class=\"form-wizards-items-aside\">';\n $html[] = '<div class=\"btn-group-vertical\">';\n if ($maxItems > 1 && $size >= 5) {\n $html[] = '<a href=\"#\"';\n $html[] = ' class=\"btn btn-default t3js-btn-moveoption-top\"';\n $html[] = ' data-fieldname=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' title=\"' . htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.move_to_top')) . '\"';\n $html[] = '>';\n $html[] = $this->iconFactory->getIcon('actions-move-to-top', Icon::SIZE_SMALL)->render();\n $html[] = '</a>';\n }\n if ($maxItems > 1) {\n $html[] = '<a href=\"#\"';\n $html[] = ' class=\"btn btn-default t3js-btn-moveoption-up\"';\n $html[] = ' data-fieldname=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' title=\"' . htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.move_up')) . '\"';\n $html[] = '>';\n $html[] = $this->iconFactory->getIcon('actions-move-up', Icon::SIZE_SMALL)->render();\n $html[] = '</a>';\n $html[] = '<a href=\"#\"';\n $html[] = ' class=\"btn btn-default t3js-btn-moveoption-down\"';\n $html[] = ' data-fieldname=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' title=\"' . htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.move_down')) . '\"';\n $html[] = '>';\n $html[] = $this->iconFactory->getIcon('actions-move-down', Icon::SIZE_SMALL)->render();\n $html[] = '</a>';\n }\n if ($maxItems > 1 && $size >= 5) {\n $html[] = '<a href=\"#\"';\n $html[] = ' class=\"btn btn-default t3js-btn-moveoption-bottom\"';\n $html[] = ' data-fieldname=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' title=\"' . htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.move_to_bottom')) . '\"';\n $html[] = '>';\n $html[] = $this->iconFactory->getIcon('actions-move-to-bottom', Icon::SIZE_SMALL)->render();\n $html[] = '</a>';\n }\n $html[] = '<a href=\"#\"';\n $html[] = ' class=\"btn btn-default t3js-btn-removeoption\"';\n $html[] = ' data-fieldname=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' title=\"' . htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.remove_selected')) . '\"';\n $html[] = '>';\n $html[] = $this->iconFactory->getIcon('actions-selection-delete', Icon::SIZE_SMALL)->render();\n $html[] = '</a>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '<div class=\"form-multigroup-item form-multigroup-element\">';\n $html[] = '<label>';\n $html[] = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.items'));\n $html[] = '</label>';\n $html[] = '<div class=\"form-wizards-wrap form-wizards-aside\">';\n $html[] = '<div class=\"form-wizards-element\">';\n $html[] = implode(LF, $filterHtml);\n $html[] = '<select';\n $html[] = ' data-relatedfieldname=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' data-exclusivevalues=\"' . htmlspecialchars($config['exclusiveKeys']) . '\"';\n $html[] = ' id=\"' . StringUtility::getUniqueId('tceforms-multiselect-') . '\"';\n $html[] = ' data-formengine-input-name=\"' . htmlspecialchars($elementName) . '\"';\n $html[] = ' class=\"form-control t3js-formengine-select-itemstoselect\"';\n $html[] = ' size=\"' . $size . '\"';\n $html[] = ' onchange=\"' . htmlspecialchars(implode('', $parameterArray['fieldChangeFunc'])) . '\"';\n $html[] = ' data-formengine-validation-rules=\"' . htmlspecialchars($this->getValidationDataAsJsonString($config)) . '\"';\n $html[] = $selectableListStyle;\n $html[] = '>';\n $html[] = implode(LF, $selectableItemsHtml);\n $html[] = '</select>';\n $html[] = '</div>';\n $html[] = '<div class=\"form-wizards-items-aside\">';\n $html[] = '<div class=\"btn-group-vertical\">';\n $html[] = $fieldControlHtml;\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '<input type=\"hidden\" name=\"' . htmlspecialchars($elementName) . '\" value=\"' . htmlspecialchars(implode(',', $listOfSelectedValues)) . '\" />';\n $html[] = '</div>';\n $html[] = '<div class=\"form-wizards-items-bottom\">';\n $html[] = $fieldWizardHtml;\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n\n $resultArray['html'] = implode(LF, $html);\n return $resultArray;\n }", "public function templateStrings(){\n \n foreach($this->rules as $field => $rules){\n $array[$field] = array(\n 'rules' => $this->renderRules($field),\n 'value' => $this->value($field) \n );\n }\n \n $array['form_token'] = $this->renderToken();\n \n return $array;\n }", "public function getElementHtml()\n {\n \t$form = $this->getForm();\n \t$parent = $form->getParent();\n \t$layout = $parent->getLayout();\n \t$arrayBlock = $layout->createBlock('aydus_scheduledemails/adminhtml_system_config_form_field_array', $this->getName(), $this->getData());\n \t\n \t$arrayBlock->setElement($this);\n \t\n \t$html = $arrayBlock->toHtml();\n \t$html.= $this->getAfterElementHtml();\n \t\n \t$htmlId = $arrayBlock->getHtmlId();\n \t$rows = $arrayBlock->getArrayRows();\n \t$columns = $this->getColumns();\n \t$selectedValues = $this->getValue();\n \t\n \tif (is_array($rows) && count($rows)>0 && is_array($columns) && count($columns)>0){\n \t\t\n \t\t$html.= '<script type=\"application/javascript\">\n \t\t\t';\n \t\tforeach ($rows as $i=>$row){\n \t\t\tforeach ($columns as $columnName=>$column){\n \t\t\t\t$html.= '$$(\"select[name=\\\"'.$htmlId.'['.$i.']['.$columnName.']\\\"]\").each(function(select, selectIndex){\n\t \t\t\t$(select).select(\"option\").each(function(option, optionIndex){\n\t \t\t\t\tif (\"'.$selectedValues[$i][$columnName].'\" == option.value){\n\t \t\t\t\t\toption.selected = true;\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}\n \t\t}\n \t\t\n \t\t$html.= '</script>\n \t\t';\n \t}\n \t \n \treturn $html;\n }", "protected function renderReadOnly()\n {\n $languageService = $this->getLanguageService();\n\n $parameterArray = $this->data['parameterArray'];\n $config = $parameterArray['fieldConf']['config'];\n $fieldName = $parameterArray['itemFormElName'];\n\n $possibleItems = $config['items'];\n $selectedItems = $parameterArray['itemFormElValue'] ?: [];\n if (!is_array($selectedItems)) {\n $selectedItems = GeneralUtility::trimExplode(',', $selectedItems, true);\n }\n $selectedItemsCount = count($selectedItems);\n\n $autoSizeMax = MathUtility::forceIntegerInRange($config['autoSizeMax'], 0);\n $size = 2;\n if (isset($config['size'])) {\n $size = (int)$config['size'];\n }\n if ($autoSizeMax >= 1) {\n $size = MathUtility::forceIntegerInRange($selectedItemsCount + 1, MathUtility::forceIntegerInRange($size, 1), $autoSizeMax);\n }\n $multiple = '';\n if ($size !== 1) {\n $multiple = ' multiple=\"multiple\"';\n }\n\n $listOfSelectedValues = [];\n $optionsHtml = [];\n foreach ($selectedItems as $itemValue) {\n foreach ($possibleItems as $possibleItem) {\n if ($possibleItem[1] == $itemValue) {\n $title = $possibleItem[0];\n $listOfSelectedValues[] = $itemValue;\n $optionsHtml[] = '<option value=\"' . htmlspecialchars($itemValue) . '\" title=\"' . htmlspecialchars($title) . '\">' . htmlspecialchars($title) . '</option>';\n break;\n }\n }\n }\n\n $html = [];\n $html[] = '<div class=\"formengine-field-item t3js-formengine-field-item\">';\n $html[] = '<div class=\"form-wizards-wrap\">';\n $html[] = '<div class=\"form-wizards-element\">';\n $html[] = '<label>';\n $html[] = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.selected'));\n $html[] = '</label>';\n $html[] = '<div class=\"form-wizards-wrap form-wizards-aside\">';\n $html[] = '<div class=\"form-wizards-element\">';\n $html[] = '<select';\n $html[] = ' id=\"' . StringUtility::getUniqueId('tceforms-multiselect-') . '\"';\n $html[] = ' size=\"' . $size . '\"';\n $html[] = ' class=\"form-control tceforms-multiselect\"';\n $html[] = $multiple;\n $html[] = ' data-formengine-input-name=\"' . htmlspecialchars($fieldName) . '\"';\n $html[] = ' disabled=\"disabled\">';\n $html[] = '/>';\n $html[] = implode(LF, $optionsHtml);\n $html[] = '</select>';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '<input type=\"hidden\" name=\"' . htmlspecialchars($fieldName) . '\" value=\"' . htmlspecialchars(implode(',', $listOfSelectedValues)) . '\" />';\n $html[] = '</div>';\n $html[] = '</div>';\n $html[] = '</div>';\n\n $resultArray = $this->initializeResultArray();\n $resultArray['html'] = implode(LF, $html);\n return $resultArray;\n }", "public function toFormArray() : array {\n $return = [];\n\n foreach ($this->toArray() as $component) {\n $return = array_merge($return, $component->toFormArray());\n }\n\n return $return;\n }", "public function buildFieldArray($renderables, $data) {\n\n\t\t$renderablesArray = '';\n\n\t\tforeach ($renderables as $renderable) {\n\t\t\tif (is_array($renderable) && array_key_exists('identifier', $renderable)) {\n\t\t\t\tif (in_array($renderable['type'], $this->fieldTypesToBeIgnored)) {\n\t\t\t\t\t// ignore static text fields\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$renderablesArray[$renderable['identifier']] = $this->buildFieldArray($renderable, $data);\n\t\t\t\t$renderablesArray[$renderable['identifier']]['identifier'] = $renderable['identifier'];\n\t\t\t\t$renderablesArray[$renderable['identifier']]['label'] = $renderable['label'];\n\t\t\t\t$renderablesArray[$renderable['identifier']]['type'] = $renderable['type'];\n\t\t\t} elseif (is_array($renderable)) {\n\t\t\t\tforeach ($renderable as $subRenderable) {\n\t\t\t\t\tif (is_array($subRenderable) && array_key_exists('identifier', $subRenderable) && array_key_exists('type', $subRenderable)) {\n\t\t\t\t\t\tif (in_array($subRenderable['type'], $this->fieldTypesToBeIgnored)) {\n\t\t\t\t\t\t\t// ignore static text fields\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} elseif ($subRenderable['type'] === 'TYPO3.Form:Section') {\n\t\t\t\t\t\t\t// we have another layer of subs\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']] = $this->buildFieldArray($subRenderable, $data);\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['identifier'] = $subRenderable['identifier'];\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['label'] = $subRenderable['label'];\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['type'] = $subRenderable['type'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// last layer\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['label'] = $subRenderable['label'];\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['identifier'] = $subRenderable['identifier'];\n\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['type'] = $subRenderable['type'];\n\t\t\t\t\t\t\tif (is_array($data) && array_key_exists($subRenderable['identifier'], $data)) {\n\t\t\t\t\t\t\t\t$renderablesArray['items'][$subRenderable['identifier']]['value'] = $data[$subRenderable['identifier']];\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\n\t\t}\n\n\t\treturn $renderablesArray;\n\t}", "function render()\n {\n return array(\n 'init' => $this->__init,\n 'data' => $this->__items\n );\n }", "public function render()\n {\n foreach ($this->arrayList as $item)\n {\n $this->render .= $item->render();\n }\n return $this->render;\n }", "public function render()\n {\n $parameters = $this->data['parameterArray'];\n $parameters['row'] = $this->data['databaseRow'];\n // Vars\n $uid = $parameters['row']['uid'];\n $pid = $parameters['row']['pid'];\n $name = $parameters['itemFormElName'];\n $value = $parameters['itemFormElValue'];\n $cType = $parameters['row']['CType'];\n $gridLayout = $parameters['row']['tx_gridelements_backend_layout'];\n // In case of new content elements, pid might be negative\n if ($pid < 1) {\n $pid = $this->getPidFromParentContentElement($pid);\n }\n // C-Type could be an array or a string\n if (is_array($cType) && isset($cType[0])) {\n $cType = $cType[0];\n }\n if (is_array($gridLayout) && isset($gridLayout[0])) {\n $gridLayout = $gridLayout[0];\n }\n // Get values\n $values = explode(',', $value);\n $this->valuesFlipped = array_flip($values);\n $this->valuesAvailable = [];\n // Get configuration\n $behaviours = $this->getMergedConfiguration($pid, 'behaviour', $cType);\n // Build checkboxes\n $this->checkboxesArray['default'] = [];\n $this->checkboxesArray['ctype'] = [];\n $this->checkboxesArray['gridLayout'] = [];\n if (isset($behaviours['properties']) && is_array($behaviours['properties'])) {\n foreach ($behaviours['properties'] as $contentElementKey => $label) {\n // GridElements: are able to provide grid-specific behaviours\n if (is_array($label) && $cType === 'gridelements_pi1' && !array_key_exists($contentElementKey, $this->defaultProperties)) {\n $contentElementKey = substr($contentElementKey, 0, -1);\n\n // Behaviour for all GridElements\n if ($contentElementKey == 'default' && !empty($label)) {\n foreach ($label as $gridLayoutKey => $gridLayoutBehaviourLabel) {\n $this->createElement($gridLayoutKey, $gridLayoutBehaviourLabel, 'ctype');\n }\n }\n // Behaviour only for selected GridElement\n elseif ($contentElementKey == $gridLayout && !empty($label)) {\n foreach ($label as $gridLayoutKey => $gridLayoutBehaviourLabel) {\n $this->createElement($gridLayoutKey, $gridLayoutBehaviourLabel, 'gridLayout');\n }\n }\n }\n // Normal CEs\n else {\n // Is default property!?\n if (array_key_exists($contentElementKey, $this->defaultProperties)) {\n $this->createElement($contentElementKey, $label, 'default');\n }\n // Is ctype specific!\n else {\n $this->createElement($contentElementKey, $label, 'ctype');\n }\n }\n }\n }\n // Merge checkbox groups\n $checkboxes = '';\n $checkboxes .= $this->getMergedCheckboxes('default');\n $checkboxes .= $this->getMergedCheckboxes('ctype', $cType);\n $checkboxes .= $this->getMergedCheckboxes('gridLayout', $gridLayout);\n if ($checkboxes === '') {\n $checkboxes = $this->getLanguageService()->sL('LLL:EXT:themes/Resources/Private/Language/locallang.xlf:behaviour.no_behaviour_available');\n }\n // Process current classes/identifiers\n $setClasses = array_intersect($values, $this->valuesAvailable);\n $setClass = htmlspecialchars(implode(' ', $setClasses));\n $setValue = htmlspecialchars(implode(',', $setClasses));\n // Allow admins to see the internal identifiers\n $inputType = 'hidden';\n if ($this->isAdminAndDebug()) {\n $inputType = 'text';\n }\n // Build hidden field structure\n $hiddenField = '<div>'.LF;\n $hiddenField .= '<div class=\"form-control-wrap\">'.LF;\n $hiddenField .= '<input class=\"form-control themes-hidden-admin-field '.$setClass.'\" ';\n $hiddenField .= 'readonly=\"readonly\" type=\"'.$inputType.'\" ';\n $hiddenField .= 'name=\"'.htmlspecialchars($name).'\" ';\n $hiddenField .= 'value=\"'.$setValue.'\" class=\"'.$setClass.'\">'.LF;\n $hiddenField .= '</div>'.LF;\n $hiddenField .= '</div>'.LF;\n // Missed classes\n $missedField = $this->getMissedFields($values, $this->valuesAvailable);\n\n return ['html' => '<div class=\"contentBehaviour\">'.$checkboxes.$hiddenField.$missedField.'</div>'];\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 jsonSerialize()\n\t{\n\t\t$form = [\n\t\t\t'key' => $this->getFormKey(),\n\t\t\t'data' => $this->data,\n\t\t\t'schema' => $this->getSchema('frontend'),\n\t\t\t'theme' => $this->getTheme(),\n\t\t\t'columns' => $this->getColumns(),\n\t\t\t'class' => $this->class,\n\t\t\t'classes' => $this->classes,\n\t\t\t'labels' => $this->getLabels(),\n\t\t\t'layout' => $this->getLayout(),\n\t\t\t'formErrors' => $this->getFormErrors(),\n\t\t\t'buttons' => $this->getButtons(),\n\t\t\t'with' => $this->with,\n\t\t\t'messages' => $this->getMessages(),\n\t\t\t'locale' => $this->getLocale(),\n\t\t\t'endpoint' => $this->getEndpoint(),\n\t\t\t'method' => $this->getMethod(),\n\t\t\t'validateOn' => $this->getValidateOn(),\n\t\t];\n\n\t\treturn $form;\n\t}", "public function toArray()\n {\n $arrayForm = array();\n \n if ($this->m_availability_zone != null)\n {\n $arrayForm['AvailabilityZone'] = $this->m_availability_zone;\n }\n \n if ($this->m_group_name != null)\n {\n $arrayForm['GroupName'] = $this->m_group_name;\n }\n \n if ($this->m_tenancy != null)\n {\n $arrayForm['Tenancy'] = $this->m_tenancy;\n }\n \n return $arrayForm;\n }", "public function render():array\n {\n return $this->itinerary;\n }", "public function render(){\n\t\t$fhp; // form_helper_params\n\t\t$value = $this->_data['value'];\n\t\t$form_helper = 'input';\n\t\t$attributes = Arr::extract($this->_data,['id','required','maxlength','title','pattern','readonly','class','size','placeholder','multiple','accept','options']);\n\t\tif(!in_array($this->_data['type'],['radio'])) unset($attributes['options']);\n\t\tif($attributes['required']!==true) unset($attributes['required']);\n\t\tif($attributes['readonly']!==true) unset($attributes['readonly']);\n\t\tif(!$attributes['maxlength']) unset($attributes['maxlength']);\n\t\tif(!$attributes['size']) unset($attributes['size']);\n\t\t$fhp = [$this->_data['name'],$value,$attributes];\n\t\t//$name = $this->_data['name'];\n\t\t//open,close,input,button,checkbox,file,hidden,image,label,password,radio,select,submit,textarea,\n\t\t//$attr\n\t\tswitch($this->_data['type']){\n\t\t\tcase'form':\n\t\t\t\t$form_helper = $this->_data['data_type']; $fhp=[];\n\t\t\t\tbreak;\n\t\t\tcase'select':\n\t\t\t\t//unset\n\t\t\t\t$form_helper='select'; $fhp=[$this->_data['name'],$this->_data['options'],$value,$attributes];\n\t\t\t\tbreak;\n\t\t\tcase'checkbox':\n\t\t\t\t$fhp = [$this->_data['name'],1,!!($value),$attributes];\n\t\t\t\t$form_helper='checkbox';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//if($this->_data['type'] == 'radio') $fhp[2]['options'] = Arr::get($this->_data,'options');\n\t\t\t\tif(in_array($this->_data['type'],['file','select','checkbox','radio','hidden'])) $this->_data['inputtype'] = $this->_data['type'];\n\t\t\t\t//if()\n\t\t\t\tswitch($this->_data['data_type']){\n\t\t\t\t\tcase'int':\n\t\t\t\t\t\t$fhp[2]['type']='number';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase'text':\n\t\t\t\t\t\t$form_helper='textarea';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\tif($form_helper=='input') $fhp[2]['type']=$this->_data['inputtype'];\n\t\t/*switch($this->_data['data_type']){\n\t\t\tcase'form':\n\t\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\treturn call_user_func_array([$this,$form_helper],$fhp);\n\t\t//->($this->_data['name']);\n\t\t//return json_encode($this->_datations);\n\t\t//return \n\t\t}", "public function provider_render() {\n return array(\n array(\n array(\n \n ),\n ),\n );\n }", "public function form() {\n\t\treturn array();\n\t}", "function usingArraysMult()\r\n{ \r\n echo '<span style=\"color:teal;\r\n margin-left:-15px;\">\r\n 1) Print arrays elements by using Multidimensional Arrays.\r\n </span>'. \"<br>\";\r\n echo \"<br>\";\r\n \r\n $fullForms = array (\r\n array(\"HTML \", \"Hypertext\",\" Markup Language\"),\r\n array(\"CSS \",\"Cascading\",\" Style Sheets\"),\r\n array(\"JS \",\"Java\",\"Script\")\r\n );\r\n \r\n $sizeOfArray = count($fullForms); \r\n \r\n if($sizeOfArray<1)\r\n {\r\n throw new Exception(\"Array is empty!!!\");\r\n } \r\n \r\n echo $fullForms[0][0].\": \".$fullForms[0][1].$fullForms[0][2].\".<br><br>\";\r\n echo $fullForms[1][0].\": \".$fullForms[1][1].$fullForms[1][2].\".<br><br>\";\r\n echo $fullForms[2][0].\": \".$fullForms[2][1].$fullForms[2][2].\".<br><br>\";\r\n}", "protected function _addFormArrayProvider()\n {\n $this->addContextProvider('array', function ($request, $data) {\n if (is_array($data['entity']) && isset($data['entity']['schema'])) {\n return new ArrayContext($request, $data['entity']);\n }\n });\n }", "public function renderForm($fields = array()){\r\n\t\t$formFields \t= $this->formElements;\r\n\t\t$formStarttag \t= $this->generateFormProperites($this->formProperties);\r\n\t\t$formElements \t= $formStarttag;\r\n\t\tforeach($formFields as $key=>$fields) {\r\n\t\t\t$type = $fields['type'];\t\t\t\r\n\t\t\t$formElements.= $this->generateFormField($type,$fields);\r\n\t\t}\r\n\t\t$formEndTag \t= '</form>'.$this->validationJsCode;\r\n\t\t$formElements .= $formEndTag;\r\n\t \treturn $formElements;\r\n\t}", "private function compileFillableArray()\n {\n /** @var \\Doctrine\\DBAL\\Schema\\Column[] $columns */\n $columns = $this->schema->listTableColumns($this->tableName);\n\n $fillableArrayCompiler = new FillableArrayCompiler();\n $fillableArrayCompiled = $fillableArrayCompiler->compile(['columns' => $columns]);\n\n //{{FillableArray}}\n $this->replaceInStub(['{{FillableArray}}' => $fillableArrayCompiled]);\n }", "public function provideRender()\n {\n return [\n 'empty atttribs array test' => [\n 'expected' => '<input type=\"submit\" value=\"Submit\" class=\"btn btn-default\">',\n 'attribs' => [],\n ],\n\n ];\n }", "public function renderForm()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-gears'\n ),\n 'input' => array(\n array(),\n array(\n 'type' => 'text',\n 'label' => $this->l('API Key'),\n 'name' => 'SEND_SMS_API',\n 'desc' => $this->l('The API Key is used to authenticate in order to send SMS.'),\n 'required' => true\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Admin Mobile Number'),\n 'name' => 'ADMIN_MOBILE',\n 'required' => true\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save')\n )\n )\n );\n $fields_form = $this->setDefaultInput($fields_form);\n $helper = new HelperForm();\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));\n $helper->default_form_language = $lang->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG')\n ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;\n $this->fields_form = array();\n $helper->id = (int) Tools::getValue('id_carrier');\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'btnSubmit';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false);\n $helper->currentIndex .= '&configure=' . $this->name . '&tab_module=' . $this->tab;\n $helper->currentIndex .= '&module_name=' . $this->name;\n $helper->currentIndex .= '&configuration=yes';\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n \n return $helper->generateForm(array(\n $fields_form\n ));\n }", "public function render()\n {\n $content = \"Ext.create('Ext.form.Panel', {\";\n \n $content .= \"frame: true\";\n \n if ($this->getAction()) {\n $content .= \", url: '\" . $this->getAction() . \"'\";\n }\n \n foreach ($this->getAttribs() as $name => $value) {\n $content .= \", \";\n \n switch ($name) {\n case 'renderTo':\n $content .= \"renderTo: Ext.get('\" . (string)$value . \"')\";\n break;\n case 'height':\n case 'width':\n $content .= $name . \": \" . (int)$value;\n break;\n case 'standardSubmit':\n case 'hidden':\n $content .= $name . \": \" . ((boolean)$value === true ? 'true' : 'false');\n break;\n case 'onEnter':\n $content .= \"listeners: {\n afterRender: function(form, options){\n this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {\n enter: function() {\" . $value . \"},\n scope: this\n });\n }\n }\";\n break;\n case 'defaults':\n $content .= \"defaults: \" . (string)$value;\n break;\n default:\n $content .= $name . \": '\" . htmlspecialchars((string)$value, ENT_QUOTES) . \"'\";\n break;\n }\n }\n \n if (!$this->getAttrib('renderTo')) {\n $content .= \", renderTo: Ext.getBody()\";\n }\n \n $content .= \", items: [\";\n \n if ($this->hasSubForms()) {\n $iterator = new ArrayIterator($this->getSubForms());\n while($iterator->valid()) {\n $subForm = $iterator->current();\n $content .= \"{\";\n \n if ($subForm->getAttrib('width')) {\n $content .= \"width: \" . (int)$subForm->getAttrib('width') . \",\";\n }\n \n $content .= $subForm->render();\n \n $content .= \"}\";\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n } \n }\n }\n \n if ($this->hasElements()) {\n $iterator = new ArrayIterator($this->getElements());\n while ($iterator->valid()) {\n $element = $iterator->current();\n $content .= $element->render();\n \n $iterator->next();\n if ($iterator->valid()) {\n $content .= \",\";\n }\n }\n }\n\n $content .= \"],\";\n \n $content .= \"buttons: [\";\n \n $iterator = new ArrayIterator($this->getButtons());\n while ($iterator->valid()) {\n $button = $iterator->current();\n \n $content .= $button->render();\n \n $iterator->next();\n \n if ($iterator->valid()) {\n $content .= \",\";\n }\n \n }\n \n $content .= \"]\";\n \n $content .= '});';\n \n return $content;\n }", "private function getMenuArrayRender()\n {\n $this->load->model('Menu_Model', \"menuModel\");\n $this->menuModel->setControllerName($this->_controllerName);\n return $this->menuModel->getMenuArray();\n }", "function feedback($array)\r\n{\r\n\r\n\tforeach ($array as $key=>$value)\r\n\t{\r\n\t\t$output.=format_feedback($value);\r\n\t}\r\n\t$output.=feedback_form();\r\n\treturn $output;\r\n}", "public function toArray()\n {\n return $this->map(function ($label) {\n return str_replace(\n [\n '{one}',\n '{many}'\n ],\n [\n $this->singularForm,\n $this->pluralForm\n ],\n $label\n );\n })->all();\n }", "public function render() {\n return [\n '#theme' => $this->themeFunctions(),\n '#view' => $this->view,\n '#options' => $this->options,\n '#rows' => $this->view->result,\n '#mapping' => $this->defineMapping(),\n ];\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "public function fromArray(array $data)\n {\n if (! isset($data['name'])) {\n $data['name'] = '__NAME__';\n }\n $markup = sprintf(\n $this->template,\n $data['index'],\n $data['interpreter_id'],\n $data['index'],\n $data['event_id'],\n //$data['index'],\n //$data['name'],\n $data['name']\n );\n return $markup;\n }", "function formBlocks($dataArray, $offset, $length) {\n\t$data = array_slice($dataArray, $offset, $length);\n\tforeach($data as $name => $value) {\n\t\techo <<<EOT\n\t\t<fieldset>\n\t\t\t<label for=\"$name\">$value[0]: </label><br />\n\t\t\t<input autocomplete=\"$value[4]\" id=\"$name\" type=\"$value[1]\" name=\"$name\" value=\"$value[3]\" placeholder=\"$value[2]\" required />\n\t\t</fieldset>\\n\nEOT;\n\t}\n}", "public function render()\n {\n return view('bs-component::form.dynamic-template');\n }", "public function displayForm()\r\n {\r\n $id_default_lang = $this->context->language->id;\r\n $languages = $this->context->language->getLanguages();\r\n\r\n $fields_form = array(\r\n 'fieldbrandslider-general' => array(\r\n 'form' => array(\r\n 'legend' => array(\r\n 'title' => $this->l('Manufacturer Carousel Options'),\r\n 'icon' => 'icon-cogs'\r\n ),\r\n 'input' => array(\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_title',\r\n 'label' => $this->l('Title'),\r\n 'desc' => $this->l('This title will appear just before the manufacturer carousel, leave it empty to hide it completely'),\r\n 'required' => false,\r\n 'lang' => true,\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_maxitem',\r\n 'label' => $this->l('Max item'),\r\n 'desc' => $this->l('The item number is showing on desstop screen'),\r\n 'suffix' => 'item',\r\n 'class' => 'fixed-width-xs',\r\n 'required' => false,\r\n 'lang' => false,\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_minitem',\r\n 'label' => $this->l('Min item'),\r\n 'desc' => $this->l('The item number is showing on mobile'),\r\n 'suffix' => 'item',\r\n 'class' => 'fixed-width-xs',\r\n 'required' => false,\r\n 'lang' => false,\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Auto scroll'),\r\n 'desc' => $this->l('Scroll the manufacturers automatically'),\r\n 'name' => 'fieldbrand_autoscroll',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'autoscroll_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'autoscroll_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'name' => 'fieldbrand_autoscrolldelay',\r\n 'label' => $this->l('Auto scroll delay'),\r\n 'desc' => $this->l('Delay between the auto scrolls'),\r\n 'suffix' => 'milliseconds',\r\n 'required' => false,\r\n 'lang' => false,\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Pause on hover'),\r\n 'desc' => $this->l('Pause the carousel on mouse hover'),\r\n 'name' => 'fieldbrand_pauseonhover',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'pauseonhover_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'pauseonhover_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Show pagination'),\r\n 'name' => 'fieldbrand_pagination',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'pagination_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'pagination_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Show navigation'),\r\n 'name' => 'fieldbrand_navigation',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'navigation_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'navigation_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n ),\r\n array(\r\n 'type' => 'switch',\r\n 'label' => $this->l('Show manufacturers title'),\r\n 'name' => 'fieldbrand_mantitle',\r\n 'required' => false,\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'mantitle_on',\r\n 'value' => 1,\r\n 'label' => $this->l('On')\r\n ),\r\n array(\r\n 'id' => 'mantitle_off',\r\n 'value' => 0,\r\n 'label' => $this->l('Off')\r\n )\r\n )\r\n )\r\n ),\r\n // Submit Button\r\n 'submit' => array(\r\n 'title' => $this->l('Save'),\r\n 'name' => 'saveFrontpageBlocksOptions'\r\n )\r\n )\r\n )\r\n );\r\n\r\n $helper = new HelperForm();\r\n\r\n $helper->module = $this;\r\n $helper->name_controller = $this->name;\r\n $helper->token = Tools::getAdminTokenLite('AdminModules');\r\n $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;\r\n\r\n $helper->default_form_language = $id_default_lang;\r\n $helper->allow_employee_form_lang = $id_default_lang;\r\n\r\n $helper->title = $this->displayName;\r\n $helper->show_toolbar = true;\r\n $helper->toolbar_scroll = true;\r\n $helper->submit_action = 'submit'.$this->name;\r\n\r\n foreach($languages as $language){\r\n $helper->languages[] = array(\r\n 'id_lang' => $language['id_lang'],\r\n 'iso_code' => $language['iso_code'],\r\n 'name' => $language['name'],\r\n 'is_default' => ($id_default_lang == $language['id_lang'] ? 1 : 0)\r\n );\r\n }\r\n\r\n // Load current values\r\n $helper->fields_value['fieldbrand_maxitem'] = Configuration::get($this->name . '_MAXITEM');\r\n $helper->fields_value['fieldbrand_minitem'] = Configuration::get($this->name . '_MINITEM');\r\n $helper->fields_value['fieldbrand_autoscroll'] = Configuration::get($this->name . '_AUTOSCROLL');\r\n $helper->fields_value['fieldbrand_autoscrolldelay'] = Configuration::get($this->name . '_AUTOSCROLLDELAY');\r\n $helper->fields_value['fieldbrand_pauseonhover'] = Configuration::get($this->name . '_PAUSEONHOVER');\r\n $helper->fields_value['fieldbrand_pagination'] = Configuration::get($this->name . '_PAGINATION');\r\n $helper->fields_value['fieldbrand_navigation'] = Configuration::get($this->name . '_NAVIGATION');\r\n $helper->fields_value['fieldbrand_mantitle'] = Configuration::get($this->name . '_MANTITLE');\r\n\r\n foreach($languages as $language){\r\n $helper->fields_value['fieldbrand_title'][$language['id_lang']] = Configuration::get($this->name . '_TITLE', $language['id_lang']);\r\n }\r\n\r\n return $helper->generateForm($fields_form);\r\n }", "protected abstract function render(array $collection);", "protected function createRenderArray(array $result) {\n $items = [];\n foreach ($result as $id => $row) {\n\n $items[$id] = [\n 'vsite_name' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $row['vsite_name'],\n '#attributes' => [\n 'class' => 'lynx-title',\n ],\n ],\n 'vsite_description' => [\n '#markup' => '<div class=\"meta-description\">' . $row['vsite_description'] . '</div>',\n ],\n 'content_type' => [\n '#markup' => '<div class=\"content-type\">' . $row['content_type'] . '</div>',\n ],\n 'title' => [\n '#prefix' => '<h2 class=\"node--title\">',\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $row['title'],\n '#suffix' => '</h2>',\n ],\n 'body' => [\n '#markup' => '<div class=\"body\">' . Unicode::truncate($row['body'], 128, TRUE, TRUE) . '</div>',\n ],\n 'see_more' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $this->t('Read more'),\n ],\n ];\n if ($row['vsite_logo']) {\n $image = [\n '#theme' => 'image',\n '#uri' => $row['vsite_logo'],\n '#alt' => $row['vsite_name'],\n '#weight' => -1,\n ];\n $items[$id]['vsite_logo'] = [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $image,\n '#weight' => -2,\n ];\n }\n }\n\n $build['search_results'] = [\n '#title' => $this->t('Search'),\n 'content' => [\n '#theme' => 'item_list__search_results',\n '#items' => $items,\n '#empty' => [\n '#markup' => '<h3>' . $this->t('Your search yielded no results.') . '</h3>',\n ],\n '#type' => 'remote',\n '#attributes' => [\n 'class' => ['lynx-search-listing'],\n ],\n ],\n ];\n return $build;\n }", "protected abstract function formatArrayValue(array $value);", "function teligence_surveys_prerender($form)\r\n{\r\n\tforeach((array)element_children($form) as $key)\r\n\t{\r\n\t\t$form[$key]['#description'] .= \" Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\";\r\n\t\t\r\n\t\tif(substr($key, -8) == '_subject')\r\n\t\t{\r\n\t\t\t$subjectsibling = substr($key, 0, -8);\r\n\t\t\t$form['group_'.$subjectsibling] = array(\r\n\t\t\t\t'#title' => \"COMBO - \" . $subjectsibling,\r\n\t\t\t\t'#type' => 'fieldset',\r\n\t\t\t\t'#collapsible' => true,\r\n\t\t\t\t'#collapsed' => true,\r\n\t\t\t\t'#weight' => -100,\r\n\t\t\t);\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t}\r\n\t\tif($key == $subjectsibling)\r\n\t\t{\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t\tunset($subjectsibling);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\treturn $form;\r\n}", "function toHtml()\n {\n $arr_return = parent::toHtml();\n $arr_return['html'] = '';\n $arr_radios = array();\n $arr_radios = $this->getAttribute('radios');\n $checked = $this->getAttribute('checked');\n $id = $this->getAttribute('id');\n if (is_array($arr_radios))\n {\n foreach ($arr_radios as $key => $value)\n {\n $encode_key = str_replace(' ', '_', $key);\n \n $arr_return['html'] .= '<input {attr_name=attr_value} {extra_attr} id=\"'\n .\"${id}_$encode_key\".'\" value=\"'.$key.'\"';\n $arr_return['html'] .= ($key == $checked)? ' checked' : '';\n $arr_return['html'] .= '%id|checked|radios|separator% />';\n $arr_return['html'] .= ($value != '')? \n '<label for=\"{attr_id}_'.$encode_key.'\">'.$value.'</label>' : '';\n $arr_return['html'] .= $this->arr_attr['separator'].\"\\n\";\n }\n }\n return $arr_return;\n }", "public function index() {\n\t\tif($this->Content && $form = $this->Form()) {\n\t\t\t$hasLocation = stristr($this->Content, '$UserDefinedForm');\n\t\t\tif($hasLocation) {\n\t\t\t\t$content = str_ireplace('$UserDefinedForm', $form->forTemplate(), $this->Content);\n\t\t\t\treturn array(\n\t\t\t\t\t'Content' => DBField::create('HTMLText', $content),\n\t\t\t\t\t'Form' => \"\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn array(\n\t\t\t'Content' => $this->Content,\n\t\t\t'Form' => $this->Form\n\t\t);\n\t}", "public function getRender(){\n //Adiciona a funcionalidade para definir o campo que deve receber o foco inicial\n if($this->getCampoFoco() != null){\n $sFuncao = View::campoFocus($this->getCampoFoco()->getId());\n $this->addListener(Base::EVENTO_APOS_MONTAR, $sFuncao);\n }\n \n //Adiciona a funcionalidade que centraliza o formulário na tela\n if($this->getCentraliza()){\n $sFuncao = Base::getFuncaoCentraliza();\n $this->addListener(Base::EVENTO_MONTAR, $sFuncao);\n }\n \n //Adiciona a funcionalidade que indica que será possível arrastar o formulário\n if($this->getPermiteArrastar()){\n $sFuncao = Base::getFuncaoLimitaArrasto($this->getId(),$this->getRenderTo());\n $this->addListener(Base::EVENTO_MONTAR, $sFuncao);\n }\n \n $aRender = array(\n \"animCollapse\" => true,\n \"autoScroll\" => true,\n \"waitMsgTarget\" => true,\n \"bodyPadding\" => 10,\n \"iconCls\" => 'icon-form',\n \"border\" => $this->getAdicionaBorda(),\n //\"glyph\" => 36,\n \"layout\" => $this->getLayout(),\n \"id\" => $this->getId(),\n \"title\" => $this->getTitulo(),\n \"closable\" => $this->getPermiteFechar(),\n \"resizable\" => $this->getPermiteRedimensionar(),\n \"draggable\" => $this->getPermiteArrastar(),\n \"collapsible\" => $this->getPermiteRecolher(),\n \"height\" => $this->getAltura(),\n \"width\" => $this->getLargura(),\n \"html\" => $this->getHtml(),\n \"items\" => $this->getStringItemsLayout(),\n \"buttons\" => $this->getBotoes(),\n \"listeners\" => $this->getListeners(),\n \"reloadPreviousOnClose\" => $this->getReloadPreviousOnClose()\n );\n \n $oForm = \"Ext.create('Ext.panel.Panel', {\".Base::getRender($aRender).\"})\";\n \n return Base::addObj($oForm,$this->getRenderTo());\n }", "public function build_array_form_item( $value, $type = '' ) {\n\n\t\t$output = '';\n\n\t\t// Basic check for type when not set\n\t\tif ( empty( $type ) ) :\n\t\t\tif ( is_array( $value ) && array_key_exists( 'address', $value ) )\n\t\t\t\t$type = 'address';\n\t\t\telseif ( is_array( $value ) && array_key_exists( 'first', $value ) && array_key_exists( 'last', $value ) )\n\t\t\t\t$type = 'name';\n\t\t\telseif ( is_array( $value ) && array_key_exists( 'hour', $value ) && array_key_exists( 'min', $value ) )\n\t\t\t\t$type = 'time';\n\t\t\telseif ( is_array( $value ) )\n\t\t\t\t$type = 'checkbox';\n\t\t\telse\n\t\t\t\t$type = 'default';\n\t\tendif;\n\n\t\t// Build array'd form item output\n\t\tswitch( $type ) :\n\n\t\t\tcase 'time' :\n\t\t\t\t$output = ( array_key_exists( 'ampm', $value ) ) ? substr_replace( implode( ':', $value ), ' ', 5, 1 ) : implode( ':', $value );\n\t\t\t\tbreak;\n\n\t\t\tcase 'address' :\n\n\t\t\t\tif ( !empty( $value['address'] ) )\n\t\t\t\t\t$output .= $value['address'];\n\n\t\t\t\tif ( !empty( $value['address-2'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) )\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\t$output .= $value['address-2'];\n\t\t\t\t}\n\n\t\t\t\tif ( !empty( $value['city'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) )\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\t$output .= $value['city'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $value['state'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) && empty( $value['city'] ) )\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\telseif ( !empty( $output ) && !empty( $value['city'] ) )\n\t\t\t\t\t\t$output .= ', ';\n\t\t\t\t\t$output .= $value['state'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $value['zip'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) && ( empty( $value['city'] ) && empty( $value['state'] ) ) )\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\telseif ( !empty( $output ) && ( !empty( $value['city'] ) || !empty( $value['state'] ) ) )\n\t\t\t\t\t\t$output .= ' ';\n\t\t\t\t\t$output .= $value['zip'];\n\t\t\t\t}\n\t\t\t\tif ( !empty( $value['country'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) )\n\t\t\t\t\t\t$output .= '<br>';\n\t\t\t\t\t$output .= $value['country'];\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'name' :\n\n\t\t\t\tif ( !empty( $value['first'] ) )\n\t\t\t\t\t$output .= $value['first'];\n\n\t\t\t\tif ( !empty( $value['last'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) )\n\t\t\t\t\t\t$output .= ' ';\n\t\t\t\t\t$output .= $value['last'];\n\t\t\t\t}\n\n\t\t\t\tif ( !empty( $value['title'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) )\n\t\t\t\t\t\t$output = ' ' . $output;\n\t\t\t\t\t$output = $value['title'] . $output;\n\t\t\t\t}\n\n\t\t\t\tif ( !empty( $value['suffix'] ) ) {\n\t\t\t\t\tif ( !empty( $output ) )\n\t\t\t\t\t\t$output .= ' ';\n\t\t\t\t\t$output .= $value['suffix'];\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'likert' :\n\n\t\t\t\tforeach ( $value as $row => $col ) {\n\t\t\t\t\t$output .= sprintf( '* %1$s - %2$s<br>', esc_html( $row ), esc_html( $col ) );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' :\n\t\t\t\t$output = esc_html( implode( ', ', $value ) );\n\t\t\t\tbreak;\n\n\t\t\tdefault :\n\t\t\t\t$output = wp_specialchars_decode( stripslashes( esc_html( $value ) ), ENT_QUOTES );\n\t\t\t\tbreak;\n\n\t\tendswitch;\n\n\t\treturn $output;\n\t}", "public function getFormFields() {\n $fields = array(\n 'shapes[]' => array(\n 'type' => 'select',\n 'multiplicate' => '5',\n 'values' => array(\n '-' => '-',\n 'cube' => 'cube',\n 'round' => 'round',\n )\n ),\n 'width[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Width'\n ),\n 'higth[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Higth'\n ),\n 'x_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'X position'\n ),\n 'y_position[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Y position'\n ),\n 'red[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color red',\n ),\n 'green[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color green',\n ),\n 'blue[]' => array(\n 'type' => 'text',\n 'multiplicate' => '5',\n 'label' => 'Color blue',\n ),\n 'size[]' => array(\n 'type' => 'text',\n 'multiplicate' => '1',\n 'label' => 'Size holst'\n ),\n 'enable[]' => array(\n 'type' => 'checkbox',\n 'multiplicate' => '5',\n 'label' => 'enable'\n )\n );\n return $fields;\n }", "public function getFieldsArray($create = false) {}", "function teligence_cart_errors_form_pre_render($form)\r\n{\r\n\tforeach((array)element_children($form) as $key)\r\n\t{\r\n\t\t//!strstr($key, '#') ? $form[$key]['#description'] .= \"Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\" : null;\r\n\t\t$form[$key]['#description'] .= \" Variable Name: <strong>variable_get('\" . $key . \"', '' )</strong>\";\r\n\t\t\r\n\t\tif(substr($key, -8) == '_subject')\r\n\t\t{\r\n\t\t\t$subjectsibling = substr($key, 0, -8);\r\n\t\t\t$form['group_'.$subjectsibling] = array(\r\n\t\t\t\t'#title' => \"COMBO - \" . $subjectsibling,\r\n\t\t\t\t'#type' => 'fieldset',\r\n\t\t\t\t'#collapsible' => true,\r\n\t\t\t\t'#collapsed' => true,\r\n\t\t\t\t'#weight' => -100,\r\n\t\t\t);\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t}\r\n\t\tif($key == $subjectsibling)\r\n\t\t{\r\n\t\t\t$form['group_'.$subjectsibling][$key] = $form[$key];\r\n\t\t\tunset($form[$key]);\r\n\t\t\tunset($subjectsibling);\r\n\t\t}\r\n\t}\t\r\n\t\r\n\treturn $form;\r\n}", "public function formatApplicantArray(array $answers);", "function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}", "function element_form($element, $record, $options = array())\n{\n $html = '';\n // If we have an array of Elements, loop through the form to display them.\n if (is_array($element)) {\n foreach ($element as $key => $e) {\n $html .= get_view()->elementForm($e, $record, $options);\n }\n } else {\n $html = get_view()->elementForm($element, $record, $options);\n }\n return $html;\n}", "protected function form()\n {\n return [];\n }", "protected function form()\n {\n return [];\n }", "public function getFormTemplates();", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "public function render(Zend_Form $form = NULL)\n\t{\n\t\t$form = $this->createModelFormFields($form);\n\t\tif ($form instanceof Zend_Form) {\n\t\t\treturn (string) $form;\n\t\t}\n\n\t\t$buffer = '';\n\t\tforeach ($form as $field) {\n\t\t\t$buffer .= $field->render();\n\t\t}\n\n\t\treturn $buffer;\n\t}", "function _onGetFormFieldsArray() {\n\t\t\n\t\t/* Are we resuming a paused submission ??? */\n\t\t$form_id = ( int ) bfRequest::getVar ( 'form_id' );\n\t\t$submission_id = ( int ) bfRequest::getVar ( 'submission_id' );\n\t\t$user = bfUser::getInstance ();\n\t\tif ($form_id && $submission_id && $user->get ( 'id' ) > 0) {\n\t\t\t\n\t\t\t/* get submission */\n\t\t\t$path = _BF_JPATH_BASE . DS . 'components' . DS . 'com_form' . DS . 'model' . DS . 'submission.php';\n\t\t\trequire_once ($path);\n\t\t\t$submission = new Submission ( );\n\t\t\t$submission->setTableName ( $form_id );\n\t\t\t$submission->get ( $submission_id );\n\t\t\t\n\t\t\t/* check its mine and paused */\n\t\t\tif ($submission->bf_status != 'Paused' || $submission->bf_user_id != $user->get ( 'id' )) {\n\t\t\t\tunset ( $submission );\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t$rows = array ();\n\t\t\n\t\tif (count ( $this->_FIELDS_CONFIG )) {\n\t\t\tforeach ( $this->_FIELDS_CONFIG as $field ) {\n\t\t\t\t$fieldname = 'FIELD_' . $field->id;\n\t\t\t\t\n\t\t\t\t$vars = array ();\n\t\t\t\tforeach ( $field as $k => $v ) {\n\t\t\t\t\t$vars [$k] = $v;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* if unpausing a submission then */\n\t\t\t\tif (isset ( $submission ) && @$submission->$fieldname != '') {\n\t\t\t\t\t\n\t\t\t\t\tswitch ($field->type) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"checkbox\" :\n\t\t\t\t\t\tcase \"radio\" :\n\t\t\t\t\t\t\t$field->multiple = $submission->$fieldname;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Tested and Works for: \n\t\t\t\t\t\t * textbox \n\t\t\t\t\t\t * textarea\n\t\t\t\t\t\t * select\n\t\t\t\t\t\t * password\n\t\t\t\t\t\t */\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t$field->value = $submission->$fieldname;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* Done unpausing */\n\t\t\t\t\n\t\t\t\tPlugins_Fields::loadPlugin ( $field->plugin );\n\t\t\t\t\n\t\t\t\tswitch ($field->plugin) {\n\t\t\t\t\tcase \"text\" :\n\t\t\t\t\t\t$field->plugin = 'textbox';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"file\" :\n\t\t\t\t\t\t$field->plugin = 'fileupload';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"UNKNOWN\" :\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$plugin = 'plugins_fields_' . $field->plugin;\n\t\t\t\t$fieldObj = new $plugin ( );\n\t\t\t\t$fieldObj->setConfig ( $field );\n\t\t\t\t\n\t\t\t\t$vars ['element'] = $fieldObj->toString ();\n\t\t\t\t$vars ['label'] = '';\n\t\t\t\t\n\t\t\t\t$rows [] = $vars;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rows;\n\t\n\t}", "public function render(array $data, ContextInterface $context) {\n // default options\n $data += [\n 'val' => '',\n 'name' => '',\n 'escape' => true,\n 'rows' => 5,\n 'templateVars' => []\n ];\n\n // require prerequisites\n $this->require($data['view']);\n unset($data['view']);\n\n // calculate existing tags\n $tags = null;\n if(isset($data['list'])) {\n $tags = \"<div class='list'><label>\" . __d('Unimatrix/backend', 'Or select some from this list:') . \"</label>\";\n $existing = explode(',', str_replace(', ', ',', $data['val']));\n foreach(explode(',', str_replace(', ', ',', $data['list'])) as $value)\n $tags .= \"<tag\". (in_array($value, $existing) ? ' class=\"hidden\"' : false) .\"><div><span title='{$value}'>{$value}</span></div></tag>\";\n $tags .= \"</div>\";\n }\n\n // create the textarea\n $textarea = $this->_templates->format('textarea', [\n 'name' => $data['name'],\n 'value' => $data['escape'] ? h($data['val']) : $data['val'],\n 'templateVars' => $data['templateVars'],\n 'attrs' => $this->_templates->formatAttributes(\n $data,\n ['name', 'val', 'type', 'list', 'required']\n )\n ]);\n\n // return the actual template for this input type\n return \"<div class='tag-widget'>\" . $textarea . $tags . '</div>';\n }", "function render($values) {\n // Render a Views form item placeholder.\n\n //$values = array();\n //$values[0] = '<!--form-item-' . $this->options['id'] . '99' . '--' . $this->view->row_index . '-->';\n //$values[1] = '<!--form-item-' . $this['Editable'] . '--' . $this->view->row_index . '-->';\n //return $values;\n\n return '<!--form-item-' . $this->options['id'][1] . '--' . $this->view->row_index . '-->';\n //return '<!--form-item-' . $this['Editable'] . '--' . $this->view->row_index . '-->';\n }", "function create_content_array()\n {\n if ($this->fetch_post('cancel', false)) {\n $this->redirect(page::fetch_post('redirect'));\n } else {\n // set action url\n $action = INFORMAL_URLBASE . '?'\n . $_SERVER['QUERY_STRING'];\n \n // find out where this page has been called from\n $redirect = $_SERVER['HTTP_REFERER'];\n \n // create form instance\n $form = new form('add', 'post', $action);\n \n // add text input field and make mandatory\n $form->addElement('text', 'name', 'Form Name');\n $form->set_mandatory('name');\n \n // add hidden field for redirect target\n $form->addElement('hidden', 'redirect', $redirect);\n \n // add buttons\n $button_submit = &HTML_QuickForm::createElement('submit',\n 'submit', 'erstelle Form', 'class=\"submitButton\"');\n $button_cancel = &HTML_QuickForm::createElement('submit',\n 'cancel', 'abbrechen', 'class=\"submitButton\"');\n \n // group buttons\n $form->addGroup(array($button_submit, $button_cancel));\n \n // see if form validates\n if ($form->validate()) {\n $name = $form->getElementValue('name');\n $all_forms = new all_forms();\n $new_form_id = $all_forms->add_form($name);\n // redirect either to a given url or the http referer\n if ($this->redirect_url) {\n // %d is replaced by new form id\n $url = sprintf($this->redirect_url, $new_form_id);\n $this->redirect($url);\n } else {\n $this->redirect(page::fetch_post('redirect'));\n }\n } else {\n $content['form'] = $form->smarty_html($this);\n }\n \n // return content html for page\n return $content;\n }\n }", "function render(Form $form);", "public function render() {\n $this->addClass('form-group form-group-sm');\n $this->addClass($this->layoutClass);\n $this->addClass($this->errorClass);\n\n $this->addClass('input-group', 'fieldOptions');\n $this->addClass('input-list', 'fieldOptions');\n if ($this->itemLayout == \"Horizontal\") {\n $this->addClass('inline', 'fieldOptions');\n }\n\n $this->setDefaultOption('ng-model', \"model['{$this->originalName}']\", $this->options);\n $this->processExpr();\n return $this->renderInternal('template_render.php');\n }", "public static function getForm($dataArray = array()){\n $dataForm = new Form('cptvisit');\n\n $dataForm->add('Select', 'cptNbDigit')\n ->label('nombre de chiffres du compteur')\n ->choices(Array(\n 5=>'00005',\n 6=>'000006',\n 7=>'0000007',\n 8=>'00000008',\n 9=>'000000009')\n )\n ->required(true);\n\n $dataForm->add('Text', 'cptBeginDigit')\n ->label('Votre compteur commence à')\n ->required(FALSE);\n\n\n $dataForm->add('Submit', 'submit')->value('Mettre à jour');\n\n $dataForm->bound($dataArray);\n\n return $dataForm;\n }", "public static function viewArray($array_in) {\n\t\tif (is_array($array_in)) {\n\t\t\t$result = '<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"white\">';\n\t\t\tif (count($array_in) == 0) {\n\t\t\t\t$result .= '<tr><td><font face=\"Verdana,Arial\" size=\"1\"><strong>EMPTY!</strong></font></td></tr>';\n\t\t\t} else {\n\t\t\t\tforeach ($array_in as $key => $val) {\n\t\t\t\t\t$result .= '<tr><td valign=\"top\"><font face=\"Verdana,Arial\" size=\"1\">' . htmlspecialchars((string)$key) . '</font></td><td>';\n\t\t\t\t\tif (is_array($val)) {\n\t\t\t\t\t\t$result .= self::viewArray($val);\n\t\t\t\t\t} elseif (is_object($val)) {\n\t\t\t\t\t\t$string = '';\n\t\t\t\t\t\tif (method_exists($val, '__toString')) {\n\t\t\t\t\t\t\t$string .= get_class($val) . ': ' . (string)$val;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$string .= print_r($val, TRUE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$result .= '<font face=\"Verdana,Arial\" size=\"1\" color=\"red\">' . nl2br(htmlspecialchars($string)) . '<br /></font>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (gettype($val) == 'object') {\n\t\t\t\t\t\t\t$string = 'Unknown object';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$string = (string)$val;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$result .= '<font face=\"Verdana,Arial\" size=\"1\" color=\"red\">' . nl2br(htmlspecialchars($string)) . '<br /></font>';\n\t\t\t\t\t}\n\t\t\t\t\t$result .= '</td>\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result .= '</table>';\n\t\t} else {\n\t\t\t$result = '<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"white\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><font face=\"Verdana,Arial\" size=\"1\" color=\"red\">' .\n\t\t\t\tnl2br(htmlspecialchars((string)$array_in)) .\n\t\t\t\t'<br /></font></td>\n\t\t\t</tr>\n\t\t</table>'; // Output it as a string.\n\t\t}\n\t\treturn $result;\n\t}", "public function render()\n\t{\n\t\t//without collection, without decorators and without populate widgets through triggers\n\t\tif (sizeof($this->values) == 0) {\n\t\t\t$label = ($this->getSetting('label')) ? $this->getSetting('label') : $this->getValue();\n\t\t\treturn Vf_Forms_Helper::checkbox($this->getFieldName(), $this->getValue(), $this->isChecked($this->getValue()), $this->getAttributes()) . $label;\n\t\t} else if (sizeof($this->values) == 1) { //step1 with collection and populate widget with triggers\n\t\t\t$this->setAttribute('value', $this->values[0]['value']);\n\t\t\t$checkbox = Vf_Forms_Helper::checkbox($this->getFieldName(), $this->getAttribute('value'), $this->isChecked($this->values[0]['value']), $this->getAttributes());\n\t\t\t$label = (isset($this->values[0]['label'])) ? $this->values[0]['label'] : $this->values[0]['value'];\n\t\t\tif ($this->getUseDecorators() && !$this->isBootstrap()) {\n\t\t\t\treturn $checkbox;\n\t\t\t} elseif ($this->getUseDecorators() && $this->isBootstrap()) {\n\t\t\t\treturn $checkbox . $label;\n\t\t\t} else {\n\t\t\t\treturn $checkbox . $label;\n\t\t\t}\n\t\t} elseif (sizeof($this->values) > 1) { //step2 if we use collections and triggers and we have more than 1 element\n\t\t\tif ($this->getMultiple()) {\n\t\t\t\t$fName = $this->getFieldName();\n\t\t\t\t$this->setFieldName($fName . '[]');\n\t\t\t}\n\t\t\tif ($this->getUseDecorators()) {\n\t\t\t\t$this->createCollection($this); //create collection of checkbox objects\n\t\t\t\tforeach ($this->collections as $collection) {\n\t\t\t\t\t$label = ($collection->getSetting('label')) ? $collection->getSetting('label') : $collection->getValue();\n\t\t\t\t\t$collection->loadDecorators(array('Label', 'BootstrapFormGroup', 'Text'));\n\t\t\t\t\tif (!$this->isBootstrap()) {\n\t\t\t\t\t\t$collection->addDecorator(\n\t\t\t\t\t\t\tVf_Form_Label_Decorator::create()\n\t\t\t\t\t\t\t\t->setPosition(Vf_Form_Decorator::APPEND)\n\t\t\t\t\t\t\t\t->setOption('title', $label)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$collection->addDecorator(Vf_Form_BootstrapFormGroup_Decorator::create()->setAttribute('class', 'form-group'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$collection->addDecorator(Vf_Form_Label_Decorator::create()->setPosition(Vf_Form_Label_Decorator::WRAP));\n\t\t\t\t\t\t$collection->addDecorator(Vf_Form_BootstrapFormGroup_Decorator::create()->setAttribute('class', 'checkbox'));\n\t\t\t\t\t\t//$collection->addDecorator(Vf_Form_Text_Decorator::create()->setOption('text', $label));\n\t\t\t\t\t}\n\t\t\t\t\t$checkboxes .= $collection->display(); //when we call this method for each element we recall render metohd for each checkbox element and go to step1\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($this->values as $k => $v) {\n\t\t\t\t\t$this->setAttribute('value', $v['value']);\n\t\t\t\t\t$label = (isset($v['label']) ? $v['label'] : $v['value']);\n\t\t\t\t\t$checkboxes[] = Vf_Forms_Helper::checkbox(null, null, $this->isChecked($v['value']), $this->getAttributes()) . $label;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->getUseDecorators()) {\n\t\t\t\treturn $checkboxes;\n\t\t\t} else {\n\t\t\t\treturn ($this->toArray) ? $checkboxes : implode($this->getSeparator(), $checkboxes);\n\t\t\t}\n\t\t}\n\t}", "public function render(): string\n {\n $output = $this->openForm();\n\n foreach($this->options['groups'] as $fieldset_id => $fieldset) {\n if (!empty($fieldset['legend'])) {\n $output .= sprintf('<fieldset id=\"%s\" class=\"%s\">',\n $fieldset_id,\n $fieldset['class'] ?? ''\n );\n $output .= '<legend>'.$fieldset['legend'].'</legend>';\n\n if (!empty($fieldset['description'])) {\n $output .= '<p>'.$fieldset['description'].'</p>';\n }\n }\n\n foreach($fieldset['elements'] as $element_id => $element_info) {\n if (!empty($element_info[1]['belongsTo']))\n $element_id = $element_info[1]['belongsTo'].'_'.$element_id;\n\n if (isset($this->fields[$element_id])) {\n $field = $this->fields[$element_id];\n $output .= $field->render($this->name);\n }\n }\n\n if (!empty($fieldset['legend'])) {\n $output .= '</fieldset>';\n }\n }\n\n $output .= $this->fields[self::CSRF_FIELD_NAME]->render($this->name);\n\n $output .= $this->closeForm();\n return $output;\n }", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "public function convertArray(array $list){\n $o = $this->getHeader();\n if (count($list) > 0){\n foreach($list as $key => $value){\n \t$o .= \"<entry>\\n\";\n \t$o .= \"\\t<form>\\n\";\n\t$o .= \"\\t\\t<orth>\\n\";\n\t$infinitive = $value['infinitive'][0];\n\t$o .= \"\\t\\t\\t$infinitive\\n\";\n\t$o .= \"\\t\\t</orth>\\n\";\n\t$o .= \"\\t\\t<model>\\n\";\n\t$model = $value['model'];\n\t$o .= \"\\t\\t\\t$model\\n\";\n\t$o .= \"\\t\\t</model>\\n\";\n $o .= $this->convertConjugation($value);\n\t$o .= \"\\t</form>\\n\";\n \t$o .= \"</entry>\\n\";\n } // for\n } // if\n\n $o .= $this->getFooter();\n $this->createDownloadFile($o);\t \n }", "function publicRender( $form = null ){\n\t\tif(!empty($this->input->values)):\n\t\t\t$count = 0;\n\t\t\tforeach( $this->input->values as $valueindex => $option):\n\t\t\t$choiceForId = \"choice-{$this->fieldID}-{$count}\";\n\t\t\t$selectOption = $option->value;\n\t\t\tif(isset($this->input->settings->for_admin_email)):\n\t\t\t\t$selectOption = \"{$valueindex}:{$selectOption}\";\n\t\t\tendif;\n\t\t\t?>\n\t\t\t\t<div id=\"<?php echo (\"field-{$choiceForId}\");?>\"><input type=\"radio\" value=\"<?php echo ($selectOption); ?>\" name=\"<?php echo (afFieldName($this->fieldname));?>\" id=\"<?php echo ($choiceForId);?>\" <?php $this->fieldRequired();?>><label for=\"<?php echo ($choiceForId);?>\"><?php echo ($option->display);?></label></div>\n\t\t\t<?php\n\t\t\t$count++;\n\t\t\tendforeach;\n\t\tendif;;\n\t}", "function htmlspecialchars_array($data){\r\n\tif ( is_array($data) ){\r\n\t\tforeach ( $data as $k => $v ){\r\n\t\t\t$data[$k] = ( is_array($v) ) ? htmlspecialchars_array($v) : htmlspecialchars($v);\r\n\t\t}\r\n\t}\r\n\treturn $data;\r\n}", "public function renderInput(){\n $row = '';\n $row .= \"<input type=\\\"$this->type\\\" id=\\\"$this->id\\\" name=\\\"$this->name\\\" $this->required \";\n\n return $row;\n }", "public function setAsStaticForm() {\n\t\treturn $this->form_tag(implode('<br />', $this->_elements));\n\t}", "function createFieldForm($arrLang)\n{\n\n $arrFields = array(\"conference_name\" => array(\"LABEL\" => $arrLang['Conference Name'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:300px;\"),\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_owner\" => array(\"LABEL\" => $arrLang['Conference Owner'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"conference_number\" => array(\"LABEL\" => $arrLang['Conference Number'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_pin\" => array(\"LABEL\" => $arrLang['Moderator PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_1\" => array(\"LABEL\" => $arrLang['Moderator Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"moderator_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_pin\" => array(\"LABEL\" => $arrLang['User PIN'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_1\" => array(\"LABEL\" => $arrLang['User Options'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_2\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"user_options_3\" => array(\"LABEL\" => \"\",\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"start_time\" => array(\"LABEL\" => $arrLang['Start Time (PST/PDT)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"DATE\",\n \"INPUT_EXTRA_PARAM\" => array(\"TIME\" => true, \"FORMAT\" => \"%Y-%m-%d %H:%M\",\"TIMEFORMAT\" => \"12\"),\n \"VALIDATION_TYPE\" => \"ereg\",\n \"VALIDATION_EXTRA_PARAM\" => \"^(([1-2][0,9][0-9][0-9])-((0[1-9])|(1[0-2]))-((0[1-9])|([1-2][0-9])|(3[0-1]))) (([0-1][0-9]|2[0-3]):[0-5][0-9])$\"),\n \"duration\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"duration_min\" => array(\"LABEL\" => $arrLang['Duration (HH:MM)'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:20px;text-align:center\",\"maxlength\" =>\"2\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n/*\n \"recurs\" => array(\"LABEL\" => $arrLang['Recurs'],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"CHECKBOX\",\n \"INPUT_EXTRA_PARAM\" => \"\",\n \"VALIDATION_TYPE\" => \"\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n \"reoccurs_period\" => array(\"LABEL\" => $arrLang[\"Reoccurs\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_period,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n \"reoccurs_days\" => array(\"LABEL\" => $arrLang[\"for\"],\n \"REQUIRED\" => \"no\",\n \"INPUT_TYPE\" => \"SELECT\",\n \"INPUT_EXTRA_PARAM\" => $arrReoccurs_days,\n \"VALIDATION_TYPE\" => \"text\",\n \"VALIDATION_EXTRA_PARAM\" => \"\",\n \"EDITABLE\" => \"no\",\n \"SIZE\" => \"1\"),\n*/\n \"max_participants\" => array(\"LABEL\" => $arrLang['Max Participants'],\n \"REQUIRED\" => \"yes\",\n \"INPUT_TYPE\" => \"TEXT\",\n \"INPUT_EXTRA_PARAM\" => array(\"style\" => \"width:50px;\"),\n \"VALIDATION_TYPE\" => \"numeric\",\n \"VALIDATION_EXTRA_PARAM\" => \"\"),\n );\n return $arrFields;\n}", "public function preRenderForm(array $form) {\n foreach (Element::children($form['buttons']) as $child) {\n // The 1 is the cell number where we insert the button.\n $form['table']['#rows'][$child][1] = [\n 'data' => $form['buttons'][$child]\n ];\n unset($form['buttons'][$child]);\n }\n\n return $form;\n }", "function label($array){\n //\n //Get the fields \n $fields= $this->fields->get_array();\n //\n //Ouptut a table\n echo \"<div name='{$this->entity->name}'>\";\n echo $this->header();\n //\n //Loop through the array and display the results in a table \n foreach ($array as $row) {\n //\n //Step through the columns\n foreach($fields as $field){\n //\n //Get the indexes of the field\n $name= is_null($field->alias) ? $field->column->name:$field->alias;\n //\n //Get the field value\n $value = $row[$name];\n \n echo \"<span> $name :<span>$value></span>\"; \n }\n }\n echo \"</div>\"; \n }", "public function reverse()\n {\n $array = $this->toArray();\n return static::createFormArray(array_reverse($array), false);\n }", "protected function generateForm(array $instance)\r\n {\r\n if (empty($instance['list_uid']) || empty($instance['public_key']) || empty($instance['private_key'])) {\r\n return '';\r\n }\r\n \r\n $oldSdkConfig = MailWizzApi_Base::getConfig();\r\n MailWizzApi_Base::setConfig(mwznb_build_sdk_config($instance['api_url'], $instance['public_key'], $instance['private_key']));\r\n\r\n $endpoint = new MailWizzApi_Endpoint_ListFields();\r\n $response = $endpoint->getFields($instance['list_uid']);\r\n $response = $response->body->toArray();\r\n \r\n mwznb_restore_sdk_config($oldSdkConfig);\r\n unset($oldSdkConfig);\r\n \r\n if (!isset($response['status']) || $response['status'] != 'success' || empty($response['data']['records'])) {\r\n return '';\r\n }\r\n \r\n $freshFields = $response['data']['records'];\r\n $selectedFields = !empty($instance['selected_fields']) ? $instance['selected_fields'] : array();\r\n $rowTemplate = '<div class=\"form-group\"><label>[LABEL] [REQUIRED_SPAN]</label><input type=\"text\" class=\"form-control\" name=\"[TAG]\" placeholder=\"[HELP_TEXT]\" value=\"\" [REQUIRED]/></div>';\r\n \r\n $output = array();\r\n foreach ($freshFields as $field) {\r\n $searchReplace = array(\r\n '[LABEL]' => $field['label'],\r\n '[REQUIRED]' => $field['required'] != 'yes' ? '' : 'required',\r\n '[REQUIRED_SPAN]' => $field['required'] != 'yes' ? '' : '<span class=\"required\">*</span>',\r\n '[TAG]' => $field['tag'],\r\n '[HELP_TEXT]' => $field['help_text'],\r\n \r\n );\r\n if (in_array($field['tag'], $selectedFields) || $field['required'] == 'yes') {\r\n $output[] = str_replace(array_keys($searchReplace), array_values($searchReplace), $rowTemplate);\r\n }\r\n }\r\n \r\n $out = '<form method=\"post\" data-uid=\"'.$instance['uid'].'\">' . \"\\n\\n\";\r\n $out .= implode(\"\\n\\n\", $output);\r\n $out .= \"\\n\\n\";\r\n $out .= '<div class=\"clearfix\"><!-- --></div><div class=\"actions pull-right\"><button type=\"submit\" class=\"btn btn-default btn-submit\">Subscribe</button></div><div class=\"clearfix\"><!-- --></div>';\r\n $out .= \"\\n\\n\" . '</form>';\r\n \r\n return $out;\r\n }", "protected function inputData() : array\n {\n return factory(Employee::class)->make()\n ->makeVisible('password')\n ->toArray();\n }", "public function render() {\n /* verify all fields except checkbox */\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n /* verify checkbox */\n $tempName = str_replace('[]', NULL, $this->name);\n\n if($this->required\n && $this->form->isSubmitted()\n && $this->type == 'checkbox'\n && !isset($_REQUEST[$tempName])) {\n $this->error = TRUE;\n $this->cssClass = 'error';\n }\n\n $html = NULL;\n $this->value = htmlspecialchars($this->value);\n\n $html .= '<input type=\"'.$this->type.'\" id=\"'.$this->id.'\" name=\"'.$this->name.'\" value=\"'.$this->value.'\"';\n $html .= (bool)$this->size ? ' size= \"'.$this->size.'\"' : NULL;\n $html .= (bool)$this->maxlength ? ' maxlength= \"'.$this->maxlength.'\"' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= ($this->type == 'text' || $this->type == 'password') ? ' class=\"' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'submit') ? ' class=\"submit ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'checkbox') ? ' class=\"checkbox ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'radio') ? ' class=\"radio ' . $this->cssClass .'\"' : NULL;\n $html .= ($this->type == 'image') ? ' source=\"'.$this->source.'\"' : NULL;\n $html .= ($this->type == 'image' && (bool)$this->width && (bool)$this->height) ? ' style=\"width:'.$this->width.'px; height:'.$this->height.'px;\"' : NULL;\n $html .= (bool)$this->checked ? ' checked' : NULL;\n $html .= ' />';\n\n if (isset($this->label)) {\n $html .= '<span class=\"label\">' . $this->label . '</span>';\n }\n\n $this->html = ($this->type == 'hidden') ? $html : $this->wrap($html);\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 renderForm() {\n $enctype = $this->_enctype ? \"enctype=\\\"multipart/form-data\\\"\" : \"\";\n $formAttributes = $this->_renderAttributes($this->_formAttributes);\n $html = \"<form action=\\\"{$this->getAction()}\\\" method=\\\"{$this->_method}\\\" {$enctype} $formAttributes>\";\n $currentFieldset = NULL;\n\n if (count($this->_inputElements)) {\n foreach ($this->_inputElements as $element) {\n if ($element[1] !== NULL) {\n if ($element[1] !== $currentFieldset) {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n $fieldset = $this->_fieldsets[$element[1]];\n $fieldsetAttributes = $this->_renderAttributes($fieldset[1]);\n $html .= \"<fieldset {$fieldsetAttributes}><legend>{$fieldset[0]}</legend>\";\n $currentFieldset = $element[1];\n }\n } else {\n if ($currentFieldset !== NULL)\n $html .= \"</fieldset>\";\n }\n $html .= $this->renderElement($element[0]->getName());\n $currentFieldset = $element[1];\n }\n }\n if (count($this->_hiddenElements)) {\n foreach ($this->_hiddenElements as $element) {\n $html .= $this->renderElement($element->getName());\n }\n }\n $html .= \"</form>\";\n return $html;\n }", "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 getList(){\n \t$formobj=$this->getFormObj();\n \t$list=array();\n \tfor($i=1;$i<=$formobj->totalPages;$i++){\n \t\tarray_push($list,array(\"val\"=>$i,\"txt\"=>$i));\n \t}\n \treturn $list;\n }", "public function box_multi($array=null)\n {\n if( is_array($array) )\n {\n foreach($array as $key => $value)\n {\n $this->html($value , $key);\n }\n }\n }", "public function renderForm()\n {\n $formUnit = $this->interActor->formUnit($this->inputHandler->getArrayMap());\n\n $view = new \\View\\Model(\n \\View\\Customer::form($formUnit),\n $this->inputHandler->routeArrayMap()\n );\n return $view->render();\n }", "public function render(): array\n {\n $this->setAttribute('type', self::TYPE);\n\n return $this->attributes;\n }", "protected function Fields_active_forCompile_array() {\n\treturn array(\n\t 't.ID',\n\t //'t.Name',\t// saved in master\n\t 'QtyInStock' => 'SUM(sl.Qty)',\n\t 'CountForSale' => 'COUNT((Qty>0) OR isAvail)',\n\t 'PriceMin' => 'MIN(PriceSell)',\n\t 'PriceMax' => 'MAX(PriceSell)',\n\t 'ItOptions' => \"GROUP_CONCAT(DISTINCT io.CatKey ORDER BY io.Sort SEPARATOR ', ')\"\n\t);\n }", "public function renderForm() {\n\n $id_default_lang = $this->context->language->id;\n $id_shop = $this->context->shop->id;\n\n /* Render Form */\n $carousel_types = array(\n array(\n 'value' => 'featured',\n 'name' => $this->l('Featured products')\n ),\n array(\n 'value' => 'new',\n 'name' => $this->l('New products')\n ),\n array(\n 'value' => 'special',\n 'name' => $this->l('Special products')\n ),\n array(\n 'value' => 'category',\n 'name' => $this->l('All products from certain category')\n ),\n array(\n 'value' => 'custom',\n 'name' => $this->l('Custom products')\n )\n );\n\n // Get Categories\n $root_category = Category::getRootCategory($id_default_lang);\n $this->_getCategories($root_category->id_category, $id_shop);\n\n // Init Fields form array\n $this->fields_form = array(\n 'legend' => array(\n 'title' => $this->l('Carousel'),\n 'icon' => 'icon-cogs'\n ),\n // Inputs\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Title'),\n 'name' => 'title',\n 'desc' => $this->l('Must be less than 250 characters.'),\n 'size' => 50,\n 'required' => true,\n 'lang' => true\n ),\n array(\n 'type' => 'select',\n 'name' => 'carousel_type',\n 'label' => $this->l('Carousel Content'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $carousel_types,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'select',\n 'name' => 'select_category',\n 'label' => $this->l('Select a category'),\n 'required' => false,\n 'lang' => false,\n 'options' => array(\n 'query' => $this->_categorySelect,\n 'id' => 'value',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Add a product'),\n 'name' => 'product_autocomplete',\n 'size' => 50,\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Carousel Content'),\n 'name' => 'carousel_content',\n 'size' => 50\n ),\n ),\n // Submit Button\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'name' => 'saveProductCarousel'\n )\n );\n\n if (Shop::isFeatureActive()){\n $this->fields_form['input'][] = array(\n 'type' => 'shop',\n 'label' => $this->l('Shop association'),\n 'name' => 'checkBoxShopAsso',\n );\n }\n\n if (!($obj = $this->loadObject(true)))\n return;\n\n if ($obj && $obj->carousel_type == 'custom'){\n $carousel_content_products = array();\n $carousel_content = explode(',', $obj->carousel_content);\n\n foreach ($carousel_content as $pid) {\n $product = new Product($pid, false, $id_default_lang);\n $carousel_content_products[] = array(\n 'id' => $pid,\n 'name' => $product->name,\n 'ref' => $product->reference\n );\n }\n\n $this->tpl_form_vars['carousel_content_products'] = $carousel_content_products;\n }\n\n return parent::renderForm();\n }", "public function generateForm()\n {\n $form = \\Drupal::formBuilder()->getForm('\\Drupal\\demo\\Form\\DemoForm');\n \n $build = array();\n\n $build['enabled'] = array(\n '#type' => 'checkbox',\n '#title' => 'Activer'\n );\n\n $build['forms'] = array(\n 'form1' => $form,\n 'form2' => $form\n );\n\n return $build;\n }", "protected function generateFields($dca, $arrSelectedFields, $formId, $strTemplate = '')\n {\n $row = 0;\n $arrFields = array();\n $hasError = false;\n\n foreach ($arrSelectedFields as $fieldname) {\n //tableless or not\n if ($this->tableless) {\n $dca['fields'][$fieldname]['eval']['tableless'] = true;\n }\n // get the field array\n $arrField = $dca['fields'][$fieldname];\n // get the widget class from the dca and create widget object\n $widgetClass = 'Form' . ucfirst($arrField['inputType']);\n $objWidget = new $widgetClass($this->prepareForWidget($arrField, $fieldname));\n // set widget template\n $objWidget->template = $strTemplate == '' ? $objWidget->template : $strTemplate;\n // set explanation\n $objWidget->explanation = $arrField['explanation'] ? $arrField['explanation'] : '';\n // set the class property\n $objWidget->class = $arrField['eval']['class'];\n //set row class\n $objWidget->rowClass = sprintf('row_%s %s', $row, ($row % 2 == 0 ? 'even' : 'odd'));\n // Validate widget\n if ($this->Input->post('FORM_SUBMIT') == $formId) {\n // add value to the fields\n $objWidget->value = isset($this->userData[$fieldname]) ? $this->userData[$fieldname] : $this->Input->post($fieldname);\n // validate inputs\n $objWidget->validate();\n\n if ($objWidget->hasErrors()) {\n $objWidget->value = '';\n $hasError = true;\n }\n }\n\n\n $arrFields[$fieldname] = $objWidget->parse();\n $row++;\n }\n // if all forms are filled correctly check the code and reload the page\n // the code status will be found in the session\n if (!$hasError && $this->Input->post('FORM_SUBMIT') == $formId) {\n $this->validateCode($this->Input->post('code'));\n $this->reload();\n }\n return $arrFields;\n }", "public function toArray(): array\n {\n return [\n 'header' => (array)$this->header(),\n 'content' => (string)$this->getFormValue('content')\n ];\n }", "private function renderForm()\n\t{\n\t\t$config_values = Array(\n\t\t\t'clickline_account' => (isset($this->fields_list['CLICKLINE_ACCOUNT']) ? $this->fields_list['CLICKLINE_ACCOUNT'] : ''),\n\t\t\t'clickline_password' => (isset($this->fields_list['CLICKLINE_PASSWORD']) ? $this->fields_list['CLICKLINE_PASSWORD'] : ''),\n\t\t\t'clickline_cp_from' => (isset($this->fields_list['CLICKLINE_CP_FROM']) ? $this->fields_list['CLICKLINE_CP_FROM'] : ''),\n\t\t\t'clickline_country_from' => (isset($this->fields_list['CLICKLINE_COUNTRY_FROM']) ? $this->fields_list['CLICKLINE_COUNTRY_FROM'] : ''),\n\t\t\t'clickline_carrier_def' => (isset($this->fields_list['CLICKLINE_CARRIER_DEF']) ? $this->fields_list['CLICKLINE_CARRIER_DEF'] : 0),\n\t\t\t'apply_discount' => (int) Configuration::get('CLICKLINE_APPLY_DISCOUNT'),\n\t\t\t'shop_name' => (isset($this->fields_list['CLICKLINE_SHOP_NAME']) ? $this->fields_list['CLICKLINE_SHOP_NAME'] : ''),\n\t\t\t'first_name' => (isset($this->fields_list['CLICKLINE_FIRST_NAME']) ? $this->fields_list['CLICKLINE_FIRST_NAME'] : ''),\n\t\t\t'last_name' => (isset($this->fields_list['CLICKLINE_LAST_NAME']) ? $this->fields_list['CLICKLINE_LAST_NAME'] : ''),\n\t\t\t'last_name_2' => (isset($this->fields_list['CLICKLINE_LAST_NAME_2']) ? $this->fields_list['CLICKLINE_LAST_NAME_2'] : ''),\n\t\t\t'street' => (isset($this->fields_list['CLICKLINE_STREET']) ? $this->fields_list['CLICKLINE_STREET'] : ''),\n\t\t\t'road_number' => (isset($this->fields_list['CLICKLINE_ROAD_NUMBER']) ? $this->fields_list['CLICKLINE_ROAD_NUMBER'] : ''),\n\t\t\t'portal' => (isset($this->fields_list['CLICKLINE_PORTAL']) ? $this->fields_list['CLICKLINE_PORTAL'] : ''),\n\t\t\t'floor' => (isset($this->fields_list['CLICKLINE_FLOOR']) ? $this->fields_list['CLICKLINE_FLOOR'] : ''),\n\t\t\t'door' => (isset($this->fields_list['CLICKLINE_DOOR']) ? $this->fields_list['CLICKLINE_DOOR'] : ''),\n\t\t\t'postcode' => (isset($this->fields_list['CLICKLINE_POSTCODE']) ? $this->fields_list['CLICKLINE_POSTCODE'] : ''),\n\t\t\t'city' => (isset($this->fields_list['CLICKLINE_CITY']) ? $this->fields_list['CLICKLINE_CITY'] : ''),\n\t\t\t'country' => (isset($this->fields_list['CLICKLINE_COUNTRY']) ? $this->fields_list['CLICKLINE_COUNTRY'] : 0),\n\t\t\t'telephone' => (isset($this->fields_list['CLICKLINE_TELEPHONE']) ? $this->fields_list['CLICKLINE_TELEPHONE'] : ''),\n\t\t\t'fax' => (isset($this->fields_list['CLICKLINE_FAX']) ? $this->fields_list['CLICKLINE_FAX'] : ''),\n\t\t\t'email' => (isset($this->fields_list['CLICKLINE_EMAIL']) ? $this->fields_list['CLICKLINE_EMAIL'] : ''),\n\t\t);\n//Prepare the carriers list\n\t\t$carrier_list = array();\n\t\t$carrier_list[] = array('carrier_id' => 0, 'carrier' => $this->l('None'));\n\t\tif (isset($this->fields_list['CLICKLINE_ACCOUNT']))\n\t\t{\n// Get carrier list from WS\n// Create ClickLine_api Object\n\t\t\t$clickline = new ClickLineApi();\n\n// Open connection and call WS\n\t\t\t$carrier_list_to_add = $clickline->getCarriersList();\n\t\t\t$carrier_list = array_merge($carrier_list, $carrier_list_to_add);\n\t\t}\n\n// Get countries\n\t\t$country_list = array();\n\t\t$country_list[] = array('id_country' => '0', 'name' => $this->l('Choose your country'));\n\t\t$country_list = array_merge($country_list, Country::getCountries($this->_lang));\n\n\n//Lets go, gen the form\n//<editor-fold defaultstate=\"collapsed\" desc=\"Form's template\">\n\n\t\t$fields_form = array();\n\t\t$fields_form[] = array('form' => array(\n\t\t\t\t'legend' => array(\n\t\t\t\t\t'title' => $this->l('ClickLine Module Configuration'),\n\t\t\t\t\t'image' => $this->_path.'logo.gif'\n\t\t\t\t),\n\t\t\t\t'input' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'clickline_account',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => $this->l('User'),\n\t\t\t\t\t\t'desc' => $this->l('User of Clickline account'),\n\t\t\t\t\t\t'size' => 32\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t\t'name' => 'clickline_password',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => $this->l('Password'),\n\t\t\t\t\t\t'desc' => $this->l('Password of Clickline account'),\n\t\t\t\t\t\t'size' => 32\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'clickline_cp_from',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => $this->l('CP From'),\n\t\t\t\t\t\t'desc' => $this->l('ZIP code where the order is sent'),\n\t\t\t\t\t\t'size' => 32\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'clickline_country_from',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => $this->l('Country From'),\n\t\t\t\t\t\t'desc' => $this->l('Country code where the order is sent, for example: ES for Spain'),\n\t\t\t\t\t\t'size' => 32\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'name' => 'clickline_carrier_def',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => $this->l('Default carrier'),\n\t\t\t\t\t\t'desc' => $this->l('Carrier that will be selected by default at Front Office'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'query' => $carrier_list,\n\t\t\t\t\t\t\t'id' => 'carrier_id',\n\t\t\t\t\t\t\t'name' => 'carrier'\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'type' => 'radio',\n\t\t\t\t\t\t'name' => 'apply_discount',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'class' => 't',\n\t\t\t\t\t\t'is_bool' => true,\n\t\t\t\t\t\t'label' => $this->l('Send measures'),\n\t\t\t\t\t\t'desc' => $this->l('Send measures from the Front Office of the store (in the product must indicate their size and weight)'),\n\t\t\t\t\t\t'values' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'id' => 'active_on',\n\t\t\t\t\t\t\t\t'value' => 1,\n\t\t\t\t\t\t\t\t'label' => $this->l('Enabled')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'id' => 'active_off',\n\t\t\t\t\t\t\t\t'value' => 0,\n\t\t\t\t\t\t\t\t'label' => $this->l('Disabled')\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,\n\t\t\t\t'submit' => array(\n\t\t\t\t\t'name' => 'submitSave',\n\t\t\t\t\t'title' => $this->l('Save'),\n\t\t\t\t\t'class' => 'button'\n\t\t\t\t)\n\t\t));\n\n\t\t$fields_form[] = array('form' => array(\n\t\t\t\t'legend' => array(\n\t\t\t\t\t'title' => $this->l('Shop Information'),\n\t\t\t\t\t'image' => $this->_path.'logo.gif'\n\t\t\t\t),\n\t\t\t\t'input' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'shop_name',\n\t\t\t\t\t\t'label' => $this->l('Shop name'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'first_name',\n\t\t\t\t\t\t'label' => $this->l('First Name'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'last_name',\n\t\t\t\t\t\t'label' => $this->l('Last Name'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'last_name_2',\n\t\t\t\t\t\t'label' => $this->l('Last Name 2'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'street',\n\t\t\t\t\t\t'label' => $this->l('Street'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'road_number',\n\t\t\t\t\t\t'label' => $this->l('Road number'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'portal',\n\t\t\t\t\t\t'label' => $this->l('Portal'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'floor',\n\t\t\t\t\t\t'label' => $this->l('Floor'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'door',\n\t\t\t\t\t\t'label' => $this->l('Door'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'postcode',\n\t\t\t\t\t\t'label' => $this->l('Postcode'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'city',\n\t\t\t\t\t\t'label' => $this->l('City'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'name' => 'country',\n\t\t\t\t\t\t'label' => $this->l('Country'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'query' => $country_list,\n\t\t\t\t\t\t\t'id' => 'id_country',\n\t\t\t\t\t\t\t'name' => 'name'\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'type' => 'text',\n\t\t\t\t\t\t'name' => 'telephone',\n\t\t\t\t\t\t'label' => $this->l('Telephone'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'fax',\n\t\t\t\t\t\t'label' => $this->l('Fax'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'name' => 'email',\n\t\t\t\t\t\t'label' => $this->l('Email'),\n\t\t\t\t\t\t'size' => 45\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t,\n\t\t\t\t'submit' => array(\n\t\t\t\t\t'name' => 'submitSave',\n\t\t\t\t\t'title' => $this->l('Save'),\n\t\t\t\t\t'class' => 'button'\n\t\t\t\t)\n\t\t));\n//</editor-fold>\n\n\t\t$helper = new HelperForm();\n\t\t$helper->module = $this;\n\t\t$helper->token = Tools::getAdminTokenLite('AdminModules'); //Security Token\n\t\t$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; //Current url\n\t\t$helper->fields_value = $config_values;\n\t\t$helper->show_toolbar = false; //Hide the toolbar\n\t\t$helper->default_form_language = (int) Configuration::get('PS_LANG_DEFAULT'); //And set the default language\n\t\t$options = $helper->generateForm($fields_form);\n\n\t\treturn $options;\n\t}", "public function _setValueTemplate($arr)\n\t{\n\t\t$arrayNew = array();\n\t\t$array = $arr['vars'];\n\t\tforeach ($array as $key => $value) {\n\t\t\tif ($value['id'] == 'StrTitle'\n\t\t\t\t|| $value['id'] == 'IdAccountTitle'\n\t\t\t\t|| $value['id'] == 'ArrCommaIdAccountTitle'\n\t\t\t\t|| $value['id'] == 'FlagUse'\n\t\t\t) {\n\t\t\t\t$arrayNew[] = $value;\n\n\t\t\t}\n\t\t}\n\n\t\treturn $arrayNew;\n\t}", "static public function print_form($arr, $k)\n\t{\n\t\tforeach ($arr as $key => $value)\n\t\t{\n\t\t\tif (!is_array($value))\n\t\t\t{\n\n\t\t\t\tif ($k == '')\n\t\t\t\t\tprint '<textarea name=\"' . $key . '\" style=\"display:none;\">' . htmlspecialchars($value) . '</textarea>';\n\t\t\t\telse\n\t\t\t\t\tprint '<textarea name=\"' . $k . '[' . $key . ']\" style=\"display:none;\">' . htmlspecialchars($value) . '</textarea>';\n\t\t\t}\n\t\t}\n\t}", "public function widgetContents($array);", "protected function forms()\r\n {\r\n $metaFileInfo = $this->getFormObj()->GetMetaFileInfo();\r\n $modulePath = $metaFileInfo['modules_path'];\r\n $modulePath = substr($modulePath,0,strlen($modulePath)-1);\r\n global $g_MetaFiles;\r\n php_grep(\"<EasyForm\", $modulePath);\r\n \r\n for ($i=0; $i<count($g_MetaFiles); $i++)\r\n {\r\n $g_MetaFiles[$i] = str_replace('/','.',str_replace(array($modulePath.'/','.xml'),'', $g_MetaFiles[$i]));\r\n $list[$i]['val'] = $g_MetaFiles[$i];\r\n $list[$i]['txt'] = $g_MetaFiles[$i];\r\n }\r\n\r\n return $list; \r\n }", "function searchFieldArray($option_name,$value_name) {\n\n\t\tglobal $t;\n\n\t\tfor ($i=0; $i<count($option_name); $i++) {\n\n\t\t\t$output .= \"<tr bgcolor=$t->tableColor>\n\t\t\t\t\t\t<td>\".$value_name[$i].\"</td>\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"query[]\\\"><input type=\\\"hidden\\\" name=\\\"field[]\\\" value=\\\"\".$option_name[$i].\"\\\"></td>\n\t\t\t\t\t\t</tr>\";\n\t\t}\n\t\treturn $output;\n\t}", "public function render()\n {\n // dd( $this->createItemArray() );\n return $this->htmlFromArray($this->createItemArray());\n }", "public function toArray()\n {\n return array(\n 'blogic' => $this->bLogic,\n 'field_name' => $this->fieldName,\n 'operator' => $this->operator,\n 'value' => $this->value,\n );\n }", "function FieldTypesArray() {}", "public function render()\n {\n return <<<'blade'\n @foreach($options as $_k=>$_opt)\n <input id=\"{{$iptkey}}\" type=\"checkbox\"\n name=\"{{$name}}\"\n title=\"{{$_opt}}\"\n @if($selected==$_k)checked @endif\n value=\"{{$_k}}\" />\n @endforeach\n blade;\n }", "public function toArray(): array\n\t{\n\t\treturn [\n\t\t\t'languages' => $this->getLanguages(),\n\t\t\t'views' => $this->getViews(),\n\t\t\t'catalog' => [\n\t\t\t\t'id' => \\CAllCrmCatalog::EnsureDefaultExists(),\n\t\t\t\t'currencies' => $this->getCurrencies(),\n\t\t\t],\n\t\t\t'payment' => $this->getPayment(),\n\t\t\t'document' => $this->getDocument(),\n\t\t\t'callback' => $this->getCallback(),\n\t\t\t'whatsapp' => $this->getWhatsApp(),\n\t\t\t'captcha' => $this->getCaptcha(),\n\t\t\t'templates' => [],\n\t\t\t'personalization' => $this->getPersonalization(),\n\t\t\t'properties' => $this->getProperties(),\n\t\t\t'deps' => $this->getDeps(),\n\t\t\t'sign' => $this->getSign(),\n\t\t\t'restriction' => $this->getRestriction(),\n\t\t\t'product' => [\n\t\t\t\t'isCloud' => Crm\\Integration\\Bitrix24\\Product::isCloud(),\n\t\t\t\t'isRegionRussian' => Crm\\Integration\\Bitrix24\\Product::isRegionRussian(),\n\t\t\t],\n\t\t\t'contentTypes' => [\n\t\t\t\t['id' => 'image/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_IMAGE')],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'x-bx/doc',\n\t\t\t\t\t'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_MSGVER_1'),\n\t\t\t\t\t'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_DOC_HINT'),\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'x-bx/arc',\n\t\t\t\t\t'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE'),\n\t\t\t\t\t'hint' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_ARCHIVE_HINT'),\n\t\t\t\t],\n\t\t\t\t['id' => 'audio/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_AUDIO')],\n\t\t\t\t['id' => 'video/*', 'name' => Loc::getMessage('CRM_WEBFORM_OPTIONS_DICT_FIELD_FILE_CONTENT_TYPE_VIDEO')],\n\t\t\t],\n\t\t\t'defaultMaxFileFieldSizeMbValue' => Main\\Config\\Option::get('crm', '~webform_default_max_file_field_size_mb', 1000),\n\t\t\t'dailyFileLimitSizeMbValue' => WebForm\\Limitations\\DailyFileUploadLimit::instance()->getLimit(),\n\t\t\t'integration' => $this->getIntegration(),\n\t\t\t'scenarios' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioList(),\n\t\t\t'scenarioCategories' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getScenarioCategoryList(),\n\t\t\t'sidebarButtons' => Main\\DI\\ServiceLocator::getInstance()->get('crm.service.webform.scenario')->getSidebarMenuItems(),\n\t\t];\n\t}" ]
[ "0.7627677", "0.647688", "0.59977555", "0.59065557", "0.5873088", "0.5806575", "0.5781639", "0.5715454", "0.567836", "0.56447166", "0.5579045", "0.54680765", "0.54086125", "0.5402145", "0.5392746", "0.5376283", "0.53589725", "0.5348386", "0.53443897", "0.5301276", "0.52846336", "0.5274346", "0.5258861", "0.5253247", "0.5240712", "0.5240289", "0.52350664", "0.5221171", "0.52122855", "0.5190965", "0.51883334", "0.5180977", "0.5174994", "0.5166971", "0.5154749", "0.5151597", "0.513514", "0.51310503", "0.5128789", "0.5094456", "0.5091758", "0.508897", "0.5080804", "0.5078853", "0.505568", "0.5055234", "0.5036893", "0.50362647", "0.50309104", "0.5020148", "0.5020148", "0.5017692", "0.5016582", "0.50101787", "0.5009854", "0.50090694", "0.5001192", "0.49964905", "0.4994137", "0.4987959", "0.49839422", "0.498346", "0.49778593", "0.49705485", "0.49616286", "0.49603295", "0.49365747", "0.49335048", "0.493117", "0.49249938", "0.4924753", "0.49197197", "0.49139005", "0.4911519", "0.49102592", "0.49102485", "0.49072295", "0.49064988", "0.4903663", "0.49015453", "0.48993677", "0.4899255", "0.4896845", "0.4895118", "0.48927414", "0.48829353", "0.4882138", "0.48812428", "0.4881095", "0.48791358", "0.4878791", "0.4875114", "0.4874803", "0.48661762", "0.48614177", "0.485275", "0.48447025", "0.4843934", "0.48435023", "0.48371017" ]
0.697619
1
BizForm::RenderTable() Render form as table format using table template
protected function RenderTable() { if ($this->m_QueryONRender) if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule)) return $this->ProcessDataObjError($ok); $records = array(); $records[] = $this->m_RecordRow->RenderColumn(); $counter = 0; while (true) { if ($this->m_Range != null && $this->m_Range > 0 && $counter > $this->m_Range) break; if ($this->CanShowData()) $arr = $resultRecords[$counter]; if (!$arr) break; $this->m_RecordRow->SetRecordArr($arr); $tblRow = $this->m_RecordRow->Render(); $records[] = $tblRow; $counter++; } return $records; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function RenderFormattedTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $dispmode = $this->GetDisplayMode();\n $hasSub = $this->m_SubForms ? 1 : 0;\n //$this->SetDisplayMode($dispmode->GetMode());\n $cls_tbl = strlen($dispmode->m_FormatStyle[0])>0 ? \"class='\".$dispmode->m_FormatStyle[0].\"'\" : \"\";\n $sHTML_tbl = \"<table width=100% border=0 cellspacing=0 cellpadding=3 $cls_tbl>\\n\";\n //$sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody' Highlighted='\".$this->m_Name.\"_data_\".($this->m_CursorIndex+1).\"' SelectedRow='\".($this->m_CursorIndex+1).\"'>\\n\";\n\n // print column header\n $columns = $this->m_RecordRow->RenderColumn();\n $sHTML = \"\";\n foreach($columns as $colname)\n $sHTML .= \"<th class=head>$colname</th>\\n\";\n\n // print column data table\n $name = $this->m_Name;\n $counter = 0;\n $sHTML_rows = \"\";\n $selectedRecId = null;\n $selectedIndex = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter >= $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n else\n $arr = null;\n if (!$arr && $this->m_FullPage == \"N\")\n break;\n if (!$arr)\n $sHTML_rows .= \"<tr><td colspan=99>&nbsp;</td></tr>\\n\";\n else {\n $recId = $arr[\"Id\"];\n\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $rowHTML = \"\";\n foreach($tblRow as $cell) {\n $cell_html = $cell==\"\" ? \"&nbsp;\" : $cell;\n $rowHTML .= \"<td valign=top class=cell>$cell_html</td>\\n\";\n }\n $rownum = $counter+1;\n $rowid = $name.\"_data_\".$rownum;\n $attr = $rownum % 2 == 0 ? \"normal=roweven select=rowsel\" : \"normal=rowodd select=rowsel\";\n\n if ($this->m_HistRecordId != null)\n $this->m_RecordId = $this->m_HistRecordId;\n if ($this->m_RecordId == null)\n $this->m_RecordId = $recId;\n \n if ($this->m_RecordId == $recId) {\n $style_class = \"class=rowsel\";\n $selectedRecId = $recId;\n $selectedIndex = $counter;\n }\n else if ($rownum % 2 == 0)\n $style_class = \"class=roweven\";\n else\n $style_class = \"class=rowodd\";\n\n $onclick = \"ondblclick=\\\"CallFunction('$name.EditRecord($recId)');\\\"\" . \n \" onclick=\\\"CallFunction('$name.SelectRecord($recId,$hasSub)');\\\"\";\n if ($rownum == 1) {\n $sHTML_row1 = \"<tr id='$recId' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n $row1_id = $recId;\n }\n else\n $sHTML_rows .= \"<tr id='$recId' $style_class $attr $onclick>\\n$rowHTML</tr>\\n\";\n }\n $counter++;\n } // while\n if ($selectedRecId == null) {\n $selectedRecId = $row1_id;\n $this->m_RecordId = $selectedRecId;\n $sHTML_row1 = str_replace(\"class=rowodd\", \"class=rowsel\", $sHTML_row1);\n }\n $sHTML .= $sHTML_row1 . $sHTML_rows;\n $this->GetDataObj()->SetActiveRecord($resultRecords[$selectedIndex]);\n\n $sHTML_pre = \"\\n<input type='hidden' id='\".$this->m_Name.\"_selectedId' name='_selectedId' value='$selectedRecId'/>\\n\";\n $sHTML_tby = \"<tbody id='\".$this->m_Name.\"_tbody'>\\n\";\n $sHTML = $sHTML_pre . $sHTML_tbl . $sHTML_tby . $sHTML . \"</tbody></table>\";\n\n return $sHTML;\n }", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "public function render()\n\t{\n\n\t\t$table = \"<table\";\n\n\t\t// Add all attributes\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t$table .= ' ' . $key . '=\"' . $value .'\"';\n\t\t}\n\n\t\t$table .= \">\"; // Close table\n\n\t\t// Add the head\n\t\tif ($this->showHeadRow) {\n\t\t\t$table .= \"<thead><tr>\";\n\n\t\t\t// Show the number header.\n\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t$table .= \"<th>#</th>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$columnHeadTitle = isset($column['headTitle']) ? $column['headTitle'] : $column[0];\n\t\t\t\t$table .= \"<th>\" . $columnHeadTitle . \"</th>\";\n\t\t\t}\n\n\t\t\t$table .= \"</tr></thead>\"; // finish head\n\t\t}\n\n\t\t// Body\n\t\t$table .= \"<tbody>\";\n\n\t\t$row = $this->numberColumnOffset;\n\n\t\tif (count($this->data) == 0) {\n\t\t\t// Show a no data entry\n\t\t\t$colspan = count($this->columns) + ($this->showNumberColumn ? 1 : 0);\n\t\t\t$table .= '<tr><td colspan=\"'.$colspan.'\"><p align=\"center\" style=\"font-weight:bold;\">Keine Einträge</p></td></tr>';\n\t\t}\n\t\telse {\n\t\t\tforeach ($this->data as $dataObject) {\n\n\t\t\t\t// Row attributes\n\t\t\t\t$attributes = $this->rowAttributes;\n\t\t\t\tif (!is_array($attributes)) {\n\t\t\t\t\tif (is_callable($this->rowAttributes)) {\n\t\t\t\t\t\t$callable = $this->rowAttributes;\n\t\t\t\t\t\t$attributes = $callable($dataObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$attributeString = '';\n\t\t\t\tif ($attributes) {\t\t// Add attributes if we have some\n\t\t\t\t\tforeach ($attributes as $attributeName => $attributeValue) {\n\t\t\t\t\t\t$attributeString .= $attributeName . '=\"' . $attributeValue . '\" ' ;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->rowIdDataMethod) {\n\t\t\t\t\t// method name or closure?\n\t\t\t\t\t$id = '';\n\t\t\t\t\tif (is_string($this->rowIdDataMethod)) {\n\t\t\t\t\t\t$id = $dataObject->{$this->rowIdDataMethod}(); // Call the row data method\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($this->rowIdDataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\t\t\t\t\t\t\t// we got a closure\n\t\t\t\t\t\t\t$closure = $this->rowIdDataMethod;\n\t\t\t\t\t\t\t$id = $closure($dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t$table .= '<tr id=\"'. $id .'\" ' . $attributeString . '>'; // Start row with id\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$table .= \"<tr \". $attributeString .\">\";\t// Start row without id\n\t\t\t\t}\n\n\t\t\t\t// Number?\n\t\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t\t$table .= \"<td>\" . $row . \"</td>\";\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\t$dataMethod = isset($column['dataMethod']) ? $column['dataMethod'] : $column[1];\n\t\t\t\t\tif (is_string($dataMethod)) {\n\t\t\t\t\t\t// Just call the method an insert the return value into the table cell\n\t\t\t\t\t\t$table .= \"<td>\". $dataObject->$dataMethod() .\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($dataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\n\t\t\t\t\t\t\t// Call the closure and get the result\n\t\t\t\t\t\t\t$value = $dataMethod($dataObject, $this);\n\n\t\t\t\t\t\t\t$table .= \"<td>\". $value .\"</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$table .= \"</tr>\";\t// End the table row\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\t// Render the footer row\n\t\t\t$table = $this->renderFooter($table);\n\n\t\t}\n\n\t\t$table .= \"</tbody>\";\n\n\t\t$table .= \"</table>\";\n\t\treturn $table;\n\t}", "public function getHtml($fieldsPerRow = 1, $displayOrder = \"vertical\"){\n $fields = $this->form->fields;\n $fieldsHidden = array();\n $fieldsBlock = array();\n foreach($fields as $key => $field){\n if($field instanceof Form_Field_Hidden){\n $fieldsHidden[] = $field;\n unset($fields[$key]);\n }\n }\n $fieldsPerBlock = ceil(count($fields) / $fieldsPerRow);\n if($displayOrder == \"horizontal\"){\n for($i = 1 ; $i <= $fieldsPerBlock; $i++){\n for($b = 1; $b <= $fieldsPerRow; $b++){\n $field = array_shift($fields);\n if($field === null) break 2;\n $fieldsBlock[$b][$field->name] = $field;\n }\n }\n }elseif($displayOrder == \"vertical\"){\n for($b = 1; $b <= $fieldsPerRow; $b++){\n for($i = 1 ; $i <= $fieldsPerBlock; $i++){\n $field = array_shift($fields);\n if($field === null) break 2;\n $fieldsBlock[$b][$field->name] = $field;\n }\n }\n }\n\n $output = '<div id=\"'.$this->id.'\" class=\"formtable\">';\n $output .= '<form '.$this->form->attr->getHtml().'>';\n $output .= '<input type=\"hidden\" name=\"form-'.$this->form->attr->get(\"name\").'\" value=\"1\"/>';\n foreach($fieldsHidden as $field){\n $output .= $field->getHtml();\n }\n if($fieldsBlock){\n $blockWidth = round(100 / $fieldsPerRow, 2, PHP_ROUND_HALF_DOWN);\n foreach($fieldsBlock as $block => $fields){\n $output .= '<div class=\"formtable-block\" style=\"width:'.$blockWidth.'%\">';\n if($fields){\n $output .= '<table class=\"formtable-table\">';\n foreach($fields as $field){\n $output .= '<tr class=\"formtable-fieldtype-'.strtolower(slugify(get_class($field))).' formtable-field-name-'.slugify($field->name).'\">';\n $output .= '<td class=\"formtable-label\"><label for=\"'.$field->attr->get(\"id\").'\">'.$field->label.'</label></td>';\n $output .= '<td class=\"formtable-field\">'.$field->getHtml().'</td>';\n $output .= '</tr>';\n }\n $output .= '</table>';\n }\n $output .= '</div>';\n }\n }\n if($this->buttons){\n $output .= '<div class=\"formtable-buttons\">';\n if($fieldsBlock) $output .= '<table class=\"formtable-table\"><tr><td class=\"formtable-label\"></td><td class=\"formtable-field\">';\n foreach($this->buttons as $field){\n $output .= $field->getHtml();\n }\n if($fieldsBlock) $output .= '</td></tr></table>';\n $output .= '</div>';\n }\n $output .= '</form></div>';\n $output .= '<script type=\"text/javascript\">(function(){var container = $(\"#'.$this->id.'\"); if(!container.data(\"formtable\")) new FormTable(container)})();</script>';\n return $output;\n }", "public function render()\n {\n $root =& XCube_Root::getSingleton();\n $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);\n\n $renderTarget =& $renderSystem->createRenderTarget('main');\n\n $renderTarget->setAttribute('legacy_module', 'legacy');\n $renderTarget->setTemplateName('legacy_xoopsform_tableform.html');\n $renderTarget->setAttribute('form', $this);\n\n $renderSystem->render($renderTarget);\n\n return $renderTarget->getResult();\n }", "public function renderTableBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows) && $this->emptyText !== false) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n }\n\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }", "public function tableRender($form, $table_name, $table_rows, $last_year, $table_id) {\n $fields_list = ['Year', 'Jan', 'Feb', 'Mar', 'Q1', 'Apr', 'May', 'Jun', 'Q2', 'Jul', 'Aug', 'Sep', 'Q3', 'Oct', 'Nov', 'Dec', 'Q4', 'YTD'];\n $actions_name = \"action_{$table_id}\";\n\n $form[$actions_name]['addYear'] = [\n '#type' => 'button',\n '#value' => $this->t('Add Year'),\n '#name' => 'add_year_' . $table_id,\n '#last_year' => $last_year,\n '#ajax' => [\n 'callback' => '::submitAjaxCallback',\n 'event' => 'click',\n 'wrapper' => 'table_wrapper',\n ]\n ];\n\n $form[$table_name] = [\n '#type' => 'table',\n '#title' => 'Sample Table',\n '#header' => $fields_list,\n ];\n\n for ($j = 0; $j <= $table_rows; $j++) {\n $qtd = 1;\n for ($i = 0; $i < count($fields_list); $i++) {\n if ($fields_list[$i] == 'Year') {\n $form[$table_name][$j]['Year'] = array(\n '#type' => 'textfield',\n '#size' => 4,\n '#attributes' => array('readonly' => 'readonly'),\n '#default_value' => $last_year,\n );\n } elseif ($fields_list[$i] == 'Q1' || $fields_list[$i] == 'Q2' || $fields_list[$i] == 'Q3' || $fields_list[$i] == 'Q4') {\n $qtd++;\n $form[$table_name][$j][$fields_list[$i]] = [\n '#type' => 'number',\n '#prefix' => \"<div class='table-field-$j-$fields_list[$i]-$table_name black-field'>\",\n '#suffix' => \"</div>\",\n '#step' => '0.01',\n '#attributes' => [\n 'class' => ['qtd-input'],\n 'data-qtd' => $fields_list[$i],\n ]\n ];\n } elseif ($fields_list[$i] == 'YTD') {\n $form[$table_name][$j][$fields_list[$i]] = [\n '#type' => 'number',\n '#prefix' => \"<div class='table-field-YTD-$j-$table_name'>\",\n '#suffix' => \"</div>\",\n '#attributes' => [\n 'class' => ['year-input'],\n ],\n '#step' => '0.01',\n ];\n } else {\n $form[$table_name][$j][$fields_list[$i]] = [\n '#type' => 'number',\n '#step' => '0.01',\n '#attributes' => [\n 'class' => ['month-input'],\n 'data-month' => $i,\n 'data-qtd' => 'Q' . $qtd,\n ]\n ];\n }\n }\n }\n\n return $form;\n }", "public function render()\r\n {\r\n $widths = $this->calculateWidths();\r\n\r\n $table = $this->renderHeaders($widths);\r\n $table .= $this->renderRows($widths);\r\n\r\n return $table;\r\n }", "private function getFormTableContent(){\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t$bgCol1='#FFFFFF';\n\t\t$bgCol2='#e4edf9';\n\t\t$bgColDarkerBG='#cddaeb';\n\t\t$colOutline='#8a99ae';\n\t\t$rowCount=0;\n\t\t$NL=\"\\r\\n\";\n\t\t$s_ret='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.'\">'.$NL;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\tif(get_class($o_el)=='FormItBuilder_htmlBlock'){\n\t\t\t\t//do nothing\n\t\t\t}else{\n\t\t\t\tif($o_el->showInEmail()===true){\n\t\t\t\t\t\n\t\t\t\t\t$bgCol=$bgCol1;\n\t\t\t\t\tif($rowCount%2==0){\n\t\t\t\t\t\t$bgCol=$bgCol2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$elType=get_class($o_el);\n\t\t\t\t\t$elId = $o_el->getId();\n\t\t\t\t\t\n\t\t\t\t\tswitch($elType){\n\t\t\t\t\t\tcase 'FormItBuilder_elementMatrix':\n\t\t\t\t\t\t\t$type = $o_el->getType();\n\t\t\t\t\t\t\t$cols = $o_el->getColumns();\n\t\t\t\t\t\t\t$rows = $o_el->getRows();\n\t\t\t\t\t\t\t$r_cnt=0;\n\t\t\t\t\t\t\t$s_val='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.' font-size:10px;\"><tr><td>&nbsp;</td>';\n\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t$s_val.='<td style=\"'.($c_cnt==0?'border-left:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.'; border-top:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($column).'</em></td>';\n\t\t\t\t\t\t\t\t$c_cnt++;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\tforeach($rows as $row){\n\t\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\t\t$s_val.='<tr><td style=\"'.($r_cnt==0?'border-top:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-left:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($row).'</em></td>';\n\t\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t\t$s_val.='<td style=\"text-align:center; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\">';\n\t\t\t\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=htmlspecialchars($_REQUEST[$elId.'_'.$r_cnt.'_'.$c_cnt]);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=($c_cnt==$_REQUEST[$elId.'_'.$r_cnt]?'&#10004;':'-');\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\t\t\t\tif(isset($_REQUEST[$elId.'_'.$r_cnt]) && in_array($c_cnt,$_REQUEST[$elId.'_'.$r_cnt])===true){\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='&#10004;';\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='-';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\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\t$s_val.='</td>';\n\t\t\t\t\t\t\t\t\t$c_cnt++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$r_cnt++;\n\t\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</table>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementFile':\n\t\t\t\t\t\t\tif(isset($_FILES[$elId])){\n\t\t\t\t\t\t\t\tif($_FILES[$elId]['size']==0){\n\t\t\t\t\t\t\t\t\t$s_val='None';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementDate':\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).'_0]] [[+'.htmlspecialchars($o_el->getId()).'_1]] [[+'.htmlspecialchars($o_el->getId()).'_2]]';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).':nl2br]]';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_ret.='<tr valign=\"top\" bgcolor=\"'.$bgCol.'\"><td><b>'.htmlspecialchars($o_el->getLabel()).':</b></td><td>'.$s_val.'</td></tr>'.$NL;\n\t\t\t\t\t$rowCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$s_ret.='</table>'.$NL;\n\t\treturn $s_ret;\n\t}", "public function renderItems()\n {\n $content = array_filter([\n $this->renderCaption(),\n $this->renderColumnGroup(),\n $this->showHeader ? $this->renderTableHeader() : false,\n $this->showFooter ? $this->renderTableFooter() : false,\n $this->renderTableBody(),\n ]);\n\n $table = Html::tag('table', implode(\"\\n\", $content), $this->tableOptions);\n if ($this->responsive)\n {\n $table = Html::tag('div', $table, ['class' => 'table-responsive']);\n }\n else\n {\n $table = Html::tag('div', $table, ['class' => 'table-scrollable']);\n }\n\n return $table;\n }", "public static function build_table( $db_array ) {\n\n $display = self::formhead();\n \tforeach ( $db_array[0] as $column => $field ) {\n \t\t$display .= \"<th class='cell100 column1'>$column</th>\\n\";\n \t}\n \t$display .= \"</tr></thead></table></div>\\n\";\n $display .= \"<div class='table100-body '><table><tbody>\" ;\n \tforeach ( $db_array as $record ) {\n \t\t$display .= \"<tr class='row100 body'>\\n\";\n \t\tforeach ( $record as $field ) {\n \t\t\t$display .= \"<td class='cell100 column1'>$field</td>\\n\";\n \t\t}\n \t\t$display .= \"</tr>\\n\";\n \t}\n\n \t$display .= \"</tbody></table>\\n\";\n $display .= \"</div></div>\\n\";\n \t\n \treturn $display;\n }", "public function write() {\n\t\t$table = '<table '.$this->addHTML.'>';\n\t\tif(!is_null($this->tableInfo['head'])) {\n\t\t\t$table .= '<thead><tr>';\n\t\t\tforeach($this->tableInfo['head'] as $value) {\n\t\t\t\t$table .= '<th>'.$value.'</th>';\n\t\t\t}\n\t\t\tif($this->crud) {\n\t\t\t\t\t$table .= '<th>Options</th>';\t\n\t\t\t}\n\t\t\t$table .= '</tr></thead>';\n\t\t}\n\t\t$table .= '<tbody>';\n\t\tif(isset($this->tableInfo['rows'])) {\n\t\t\tforeach($this->tableInfo['rows'] as $row) {\n\t\t\t\t$table .= '<tr>';\n\t\t\t\tforeach($row as $key => $column) {\n\t\t\t\t\tif(($key != $this->crud_id) OR $this->show_crud_id) {\n\t\t\t\t\t\t$table .= '<td>'.$column.'</td>';\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($this->crud && isset($row[$this->crud_id])) {\n\t\t\t\t\t$table .= '<td>';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Details/'.$row[$this->crud_id].'\" title=\"Details\"><i class=\"fa fa-search\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Edit/'.$row[$this->crud_id].'\" title=\"Edit\"><i class=\"fa fa-wrench\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Delete/'.$row[$this->crud_id].'\" title=\"Delete\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t\t$table .= '</td>';\n\t\t\t\t}\n\t\t\t\t$table .= '</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$table .= '<tr>';\n\t\t\t$table .= '<td>';\n\t\t\t$table .= 'No Data to show here.';\n\t\t\t$table .= '</td>';\n\t\t\t$table .= '</tr>';\t\n\t\t}\n\t\t\n\t\t$table .= '</tbody></table>';\n\t\treturn $table;\n\t}", "public function renderItems() {\n\n \t $caption = $this->renderCaption();\n \t $columnGroup = $this->renderColumnGroup();\n \t $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n \t $tableBody = $this->renderTableBody();\n \t $tableFooter = $this->showFooter ? $this->renderTableFooter() : false;\n \t $content = array_filter([\n \t$caption,\n \t$columnGroup,\n \t$tableHeader,\n \t$tableFooter,\n \t$tableBody,\n \t ]);\n\n\t return self::html()->tag('table', array('options' => $this->tableOptions, 'content' => implode(\"\\n\", $content)), $this->tableOptions);\n }", "function Render()\n\t{\n\t\t$strTableName = $this->_strName;\n\t\t$strVixenTable = \"Vixen.table.{$strTableName}\";\n\n\t\techo \"\n<script type='text/javascript'>\n\t{$strVixenTable} = Object();\n\t{$strVixenTable}.collapseAll = TRUE;\n\t{$strVixenTable}.linked = TRUE;\n\t{$strVixenTable}.totalRows = 0;\n\t{$strVixenTable}.row = Array();\n</script>\";\n\t\t\t\n\t\t\n\t\t$strPageSize = $this->_intPageSize > 0 ? \" page_size='{$this->_intPageSize}' \" : \"\";\n\n\t\techo \"<table border='0' cellpadding='3' cellspacing='0' class='Listing' width='100%' id='$strTableName'$strPageSize>\\n\";\n\t\t\n\t\t// Build headers\n\t\techo \"<tr class='First'>\\n\";\n\t\t$intHeaderCount = 0;\n\t\t$intSortLimit = ($this->_bolSortable && is_array($this->_arrSortFields)) ? count ($this->_arrSortFields) : -1;\n\t\tforeach ($this->_arrHeader AS $objField)\n\t\t{\n\t\t\t$strAlign = $this->_arrAlignments[$intHeaderCount];\n\t\t\t$strSortLabel = \"\";\n\t\t\tif ($intHeaderCount <= $intSortLimit)\n\t\t\t{\n\t\t\t\tif ($this->_arrSortFields[$intHeaderCount] !== NULL)\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" TABLE_SORT='\" . $this->_arrSortFields[$intHeaderCount] . \"' \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" NO_TABLE_SORT='1' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \" <th width='{$this->_arrWidths[$intHeaderCount]}' align='$strAlign'$strSortLabel>\". $objField .\"</th>\\n\";\n\t\t\t$intHeaderCount++;\n\t\t}\n\t\techo \"</tr>\\n\";\n\t\t\n\t\t// Build rows\n\t\t$intRow = -1;\n\t\tforeach ($this->_arrRows AS $objRow)\n\t\t{\n\t\t\t$intRow++;\n\t\t\t$strClass = ($intRow % 2) ? 'Odd' : 'Even';\n\t\t\t$strStyle = \"\";\n\t\t\t\n\t\t\tif (isset($objRow['OnClick']))\n\t\t\t{\n\t\t\t\t// Escape special chars\n\t\t\t\t$strOnClick = \"onclick='\". htmlspecialchars($objRow['OnClick'], ENT_QUOTES) .\"'\";\n\t\t\t\t$strStyle .= \"cursor:pointer;\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strOnClick = \"\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<tr id='\" . $strTableName . \"_\" . $intRow . \"' class='$strClass' $strOnClick style='$strStyle'>\\n\";\n\t\t\t\n\t\t\t$intColCount = 0;\n\t\t\t// Build fields\n\t\t\tforeach ($objRow['Columns'] as $objField)\n\t\t\t{\n\t\t\t\t$strWidth = '';\n\t\t\t\t// Work out which width to use\n\t\t\t\t//TODO! After setting the widths once in the header, you shouldn't have to set them again, but we are anyway.\n\t\t\t\t//This could cut down the size of the html file generated\n\t\t\t\t/*if (isset($objRow['Widths']))\n\t\t\t\t{\n\t\t\t\t\t// Use the width specific to this row and column\n\t\t\t\t\t$strWidth = \"width='\". $objRow['Widths'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general width of this column\n\t\t\t\t\t$strWidth = \"width='\". $this->_arrWidths[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t// Work out which alignment to use\n\t\t\t\tif (isset($objRow['Alignments']))\n\t\t\t\t{\n\t\t\t\t\t// Use the alignment specific to this row and column\n\t\t\t\t\t$strAlignment = \"align='\". $objRow['Alignments'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general alignment of this column\n\t\t\t\t\t$strAlignment = \"align='\". $this->_arrAlignments[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Work out how many columns, this column spans\n\t\t\t\t$strColSpan = \"\";\n\t\t\t\tif (isset($objRow['ColSpans']))\n\t\t\t\t{\n\t\t\t\t\t// colspan values have been declared for this row\n\t\t\t\t\t$strColSpan = \"colspan='\". $objRow['ColSpans'][$intColCount] .\"'\";\n\t\t\t\t\t\n\t\t\t\t\t// If using ColSpans do not use row widths\n\t\t\t\t\t$strWidth = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"<td $strWidth $strAlignment $strColSpan>\";\n\t\t\t\techo \"$objField\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t\t$intColCount++;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Build detail\n\t\t\tif ($this->_bolDetails)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=\". count($this->_arrHeader) .\" style='padding: 0px 1px 1px 1px;'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-DETAIL' style='display: block; overflow:hidden;'>\";\n\t\t\t\techo $objRow['Detail'];\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t// Build tooltip\n\t\t\tif ($this->_bolToolTips)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=4 style='padding-top: 0px; padding-bottom: 0px'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-TOOLTIP' style='display: none;'>\";\n\t\t\t\techo $objRow['ToolTip'];\n\t\t\t\techo \"</div>\\n\";\n\t\t\t\techo \"</td>\";\n\t\t\t}\n\t\t\n\t\t\techo \"\\n<script type='text/javascript'>\";\n\t\t\techo \"objRow = Object();\\n\";\n\t\t\t\n\t\t\techo \"objRow.selected = false;\\n\";\n\t\t\techo \"objRow.up = true;\\n\";\n\n\t\t\tif ($this->_bolLinked)\n\t\t\t{\n\t\t\t\tif (is_array($objRow['Index']))\n\t\t\t\t{\n\t\t\t\t\t// add Indexes to objRow\n\t\t\t\t\techo \"objIndex = Object();\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ($objRow['Index'] as $strIndexName=>$arrValues)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"objIndex.{$strIndexName} = Array();\";\n\t\t\t\t\t\tforeach ($arrValues as $strValue)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"objIndex.{$strIndexName}.push('$strValue');\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"objRow.index = objIndex;\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\techo \"{$strVixenTable}.row.push(objRow);\\n\";\n\t\t\techo \"</script>\\n\";\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t\t$intRowCount = $intRow + 1;\n\t\techo \"</table>\\n\";\n\t\t\n\t\techo \"<script type='text/javascript'>{$strVixenTable}.totalRows = $intRowCount;</script>\\n\";\t\n\t\t\n\t\tif ($this->_bolRowHighlighting)\n\t\t{\n\t\t\t// The following \"Vixen.AddCommand\" method breaks down when you try dynamicly inserting a VixenTable into\n\t\t\t// the DOM, because AddCommand only triggers the command when the body.onload event is triggered\n\t\t\t//echo \"<script type='text/javascript'>Vixen.AddCommand('Vixen.Highlight.Attach','\\'$strTableName\\'', $intRowCount);</script>\";\n\t\t\techo \"<script type='text/javascript'>Vixen.Highlight.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolToolTips)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Tooltip.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolDetails)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Slide.Attach('$strTableName', TRUE);</script>\\n\";\n\t\t}\n\t\t\n\t\tif ($this->_bolLinked)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"{$strVixenTable}.linked = TRUE;\";\n\t\t\t\n\t\t\techo \"objLink = Object();\\n\";\n\t\t\t\n\t\t\tforeach ($this->_arrLinkedTables AS $strTableName=>$arrIndexes)\n\t\t\t{\n\t\t\t\techo \"objLink.{$strTableName} = Array();\\n\";\n\t\t\t\tforeach ($arrIndexes AS $strIndex)\n\t\t\t\t{\n\t\t\t\t\techo \"objLink.{$strTableName}.push('$strIndex');\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"{$strVixenTable}.link = objLink;\\n\";\n\t\t\t\n\t\t\techo \"</script>\\n\";\n\t\t\t\t/*'link':\n\t\t\t{\n\t\t\t\t'AccountInvoices' :\n\t\t\t\t[\n\t\t\t\t\t'Invoice'\n\t\t\t\t]\n\t\t\t},*/\n\t\t}\n\t\t\n\t\tif ($this->_bolSortable)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.TableSort.prepare('$strTableName');</script>\\n\";\n\t\t}\n\t}", "public function getTable($css_classes=''){\r\n\t\t$table=\"<table class='$css_classes'>\";\r\n\t\t // this condition check the single array\r\n\t\t\tif(count($this->values)==count($this->values,1)){\r\n\t\t\t\tforeach($this->values as $key=>$val){\r\n\t\t\t\t\t$table.=\"<tr>\";\r\n\t\t\t\t\t\t$table.=\"<th>$key</th><td>$val</td>\";\r\n\t\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$table.=\"<tr>\";\r\n // this condition check for nested array\r\n\t\t\t\tforeach($this->values[0] as $key=>$row){\r\n\t\t\t\t\t$table.=\"<th>\".ucfirst($key).\"</th>\";\r\n\t\t\t\t}\r\n\t\t\t\t$table.=\"<th>Action</th>\";\r\n\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\tforeach($this->values as $row){\r\n\t\t\t\t\t$table.=\"<tr>\";\r\n\t\t\t\t\t\tforeach($row as $val){\r\n\t\t\t\t\t\t\t$table.=\"<td>$val</td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// add two button for edit and delete data\r\n\t\t\t\t\t\t$table.=\"<td><a class='btn btn-info' href='edit.php?id=$row[id]'>Edit</a> <a class='btn btn-danger mt-1' href='delete.php?delid=$row[id]'>Delete</a></td>\";\r\n\t\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\t}\r\n\t\t\t\t// ceate a new row for add new data \r\n\t\t\t\t$colspan=count($this->values)+1;\r\n\t\t\t\t$table.=\"<tr><td class='text-center' colspan='$colspan'><a class='btn btn-primary' href='insert_form.php'>Add New Value</a></td></tr>\";\r\n\t\t\t}\r\n\r\n\t\t$table.=\"</table>\";\r\n\t\treturn $table;\r\n\t}", "protected function renderTable($results, $formOpts) { \n $html = \"\"; \n $html .= Xml::openElement( 'p' ); \n $html .= 'Brief table explanation for users.'; #html text displayed with the table\n $html .= Xml::closeElement( 'p' );\n\t\t$html .= Xml::openElement( \n\t\t\t\t\t'table',\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'id' => 'data display',\n\t\t\t\t\t\t'class' => 'dataTable OMP_annotation_table tableEdit',\n\t\t\t\t\t\t'border' => 1\n\t\t\t\t\t)\n\t\t\t\t); \t\t \t\n\t\t\n\t\tswitch($formOpts){\n \tcase '0':\n\t\t\t\t// make the headings\n\t\t\t\t$headings = array('column 1 heading','column 2 heading','column 3 heading');\n\t\t\t\t$html .= self::make_table_header($headings); \n\t \n\t\t\t\t// make the body\n\t\t\t\t$html .= Xml::openElement( 'tbody' );\n\t\t\t\tforeach($results as $x){\n\t\t\t\t\t$html .= \"<tr><td>$x->database_query_column_1</td><td>$x->database_query_column_2</td><td>$x->database_query_column_3</td></tr>\";\n\t\t\t\t}\t\n\t\t\t\tbreak;\t\n \tcase '1':\n\t\t\t\t#same as case 0\n\t\t\t\tbreak;\t\n\t\t\tcase '2':\n\t\t\t\t#same as case 0\n\t\t\tdefault:\n\t\t}\n\t\t\t#closing table body and table\n\t\t\t$html .= Xml::closeElement( 'tbody' );\n\t\t\t$html .= Xml::closeElement( 'table' ); \n\t\t\treturn $html; #display table\n\t}", "public function render()\n {\n return view('components.table', [\n 'format' => $this->format,\n 'data' => $this->data,\n ]);\n }", "protected function tableBodyHTML()\r\n\t{\r\n\t\tglobal $wpdb;\r\n\t\tglobal $WPGMZA_TABLE_NAME_CUSTOM_FIELDS;\r\n\t\t\r\n\t\t$fields = $wpdb->get_results(\"SELECT * FROM $WPGMZA_TABLE_NAME_CUSTOM_FIELDS\");\r\n\t\t\r\n\t\tforeach($fields as $obj)\r\n\t\t{\r\n\t\t\t?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input readonly name=\"ids[]\" value=\"<?php echo $obj->id; ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input name=\"names[]\" value=\"<?php echo addslashes($obj->name); ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input class=\"wpgmza-fontawesome-iconpicker\" name=\"icons[]\" value=\"<?php echo $obj->icon; ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->attributeTableHTML($obj);\r\n\t\t\t\t\t\r\n\t\t\t\t\t?>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$options = array(\r\n\t\t\t\t\t\t'none'\t\t\t=> 'None',\r\n\t\t\t\t\t\t'text'\t\t\t=> 'Text',\r\n\t\t\t\t\t\t'dropdown'\t\t=> 'Dropdown',\r\n\t\t\t\t\t\t'checkboxes'\t=> 'Checkboxes'\r\n\t\t\t\t\t);\r\n\t\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t\t<select name=\"widget_types[]\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tforeach($options as $value => $text)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<option value=\"<?php echo $value; ?>\"\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tif($obj->widget_type == $value)\r\n\t\t\t\t\t\t\t\techo ' selected=\"selected\"';\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<?php echo __($text, 'wp-google-maps'); ?>\r\n\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Use this filter to add options to the dropdown\r\n\t\t\t\t\t\t$custom_options = apply_filters('wpgmza_custom_fields_widget_type_options', $obj);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(is_string($custom_options))\r\n\t\t\t\t\t\t\techo $custom_options;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<button type='button' class='button wpgmza-delete-custom-field'><i class='fa fa-trash-o' aria-hidden='true'></i></button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<?php\r\n\t\t}\r\n\t}", "public function build($action = null) {\n\t\t$attributes = $this->get_config ( 'form_attributes' );\n\t\tif ($action and ($this->fieldset_tag == 'form' or empty ( $this->fieldset_tag ))) {\n\t\t\t$attributes ['action'] = $action;\n\t\t}\n\t\t\n\t\t$open = ($this->fieldset_tag == 'form' or empty ( $this->fieldset_tag )) ? $this->form ()->open ( $attributes ) . PHP_EOL : $this->form ()->{$this->fieldset_tag . '_open'} ( $attributes );\n\t\t\n\t\t$fields_output = '';\n\t\t\n\t\t// construct the tabular form table header\n\t\tif ($this->tabular_form_relation) {\n\t\t\t$properties = call_user_func ( $this->tabular_form_model . '::properties' );\n\t\t\t$primary_keys = call_user_func ( $this->tabular_form_model . '::primary_key' );\n\t\t\t$fields_output .= '<thead><tr>' . PHP_EOL;\n\t\t\tforeach ( $properties as $field => $settings ) {\n\t\t\t\tif ((isset ( $settings ['skip'] ) and $settings ['skip']) or in_array ( $field, $primary_keys )) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (isset ( $settings ['form'] ['type'] ) and ($settings ['form'] ['type'] === false or $settings ['form'] ['type'] === 'hidden')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$fields_output .= \"\\t\" . '<th class=\"' . $this->tabular_form_relation . '_col_' . $field . '\">' . (isset ( $settings ['label'] ) ? \\Lang::get ( $settings ['label'], array (), $settings ['label'] ) : '') . '</th>' . PHP_EOL;\n\t\t\t}\n\t\t\t$fields_output .= \"\\t\" . '<th>' . \\Config::get ( 'form.tabular_delete_label', 'Delete?' ) . '</th>' . PHP_EOL;\n\t\t\t\n\t\t\t$fields_output .= '</tr></thead>' . PHP_EOL;\n\t\t}\n\t\t\n\t\tforeach ( $this->field () as $f ) {\n\t\t\tin_array ( $f->name, $this->disabled ) or $fields_output .= $f->build () . PHP_EOL;\n\t\t}\n\t\t\n\t\t$close = ($this->fieldset_tag == 'form' or empty ( $this->fieldset_tag )) ? $this->form ()->close ( $attributes ) . PHP_EOL : $this->form ()->{$this->fieldset_tag . '_close'} ( $attributes );\n\t\t\n\t\t$template = $this->form ()->get_config ( (empty ( $this->fieldset_tag ) ? 'form' : $this->fieldset_tag) . '_template', \"\\n\\t\\t{open}\\n\\t\\t<table>\\n{fields}\\n\\t\\t</table>\\n\\t\\t{close}\\n\" );\n\t\t\n\t\t$template = str_replace ( array (\n\t\t\t\t'{form_open}',\n\t\t\t\t'{open}',\n\t\t\t\t'{fields}',\n\t\t\t\t'{form_close}',\n\t\t\t\t'{close}' \n\t\t), array (\n\t\t\t\t$open,\n\t\t\t\t$open,\n\t\t\t\t$fields_output,\n\t\t\t\t$close,\n\t\t\t\t$close \n\t\t), $template );\n\t\t\n\t\treturn $template;\n\t}", "function get_filter_form(Table $table) {\n return $table->renderFilter();\n}", "function make_table($result)\r\n{\r\n $temp_result=\"\\n<form name=f1 metbod='POST' action=''>\";\r\n $temp_result.=\"\\n<table cellpadding=2 cellspacing=1>\";\r\n for($i=0;$i<mysql_num_rows($result);$i++)\r\n {\r\n $a_rows=mysql_fetch_assoc($result);\r\n $noofcolumns=mysql_num_fields($result);\r\n #Starting rows-\r\n if($i==0)\r\n\t{\r\n\t $temp_result.=\"\\n<tr bgcolor=#d3dce3>\\n\";\r\n\t \t $temp_result.=\"<td colspan=3></td>\";\r\n\t foreach($a_rows as $key=>$value)\r\n\t {\r\n\t $temp_result.=\"<td>\".$key.\"</td>\";\r\n\t }\r\n\t $temp_result.=\"\\n</tr>\";\r\n\t}\r\n\r\n #data rows-\r\n $temp_result.=\"\\n<tr bgcolor=\".(($i%2==0)?\"#e5e5e5\":\"#d5d5d5\").\">\\n\";\r\n\t#edit columns-\r\n $temp_result.=\"\\n\\t<td><input type=checkbox name=check\".$i.\"></td>\";\r\n $temp_result.=\"\\n\\t<td><a name=\".$i.\" href=\\\"javascript:enable(\".$i.\",\".$noofcolumns.\")\\\"><img src=\\\"b_edit.png\\\" border=0></a></td>\";\r\n $temp_result.=\"\\n\\t<td><a href=\\\"\\\"><img src=\\\"b_drop.png\\\" border=0></a></td>\";\r\n\t#data columns- \r\n foreach($a_rows as $key=>$value)\r\n\t{\r\n\t $temp_result.=\"\\n\\t<td visibility='hidden'>\".$value.\"</td>\";\r\n\t $temp_result.=\"\\n\\t\";\r\n\t $temp_result.='<td id='.$key.$value.' display=\"none\"><input type=\"text\" disabled value=\"'.$value.'\" size='.size_of($key);\r\n\t /* if($key==\"Rollno\")*/ $temp_result.=(' name='.parsekey($key).$i);\r\n\t $temp_result.=' ></td>';\r\n\t}\r\n $temp_result.=\"\\n</tr>\";\r\n }\r\n\r\n $temp_result.=\"\\n</table>\";\r\n $temp_result.=\"\\n</form>\";\r\n\r\n $temp_java_result='<SCRIPT type=text/javascript>\r\n\tfunction hide(obj)\r\n\t{\r\n\t\tif(obj.style.display==\"none\")obj.style.display=\"\";\r\n\t\telse obj.style.display=\"none\";\r\n\t}\r\n\tfunction enable(row,col)\r\n\t{\r\n//\t\talert(\"row=\"+row+\"col=\"+col);\r\n\t\tfor( i=row*col+row+1;i<row*col+col+row+1 ;i++ )\r\n\t\t{\r\n//\t\t\talert(\"i=\"+document.f1.elements[i].name);\r\n\t\t\tdocument.f1.elements[i].disabled=false;//abled();//=\"\";\r\n\t\t}\t\t';\r\n\r\n foreach($a_rows as $key=>$value)\r\n {\r\n $temp_java_result.=\"\\n\\t\\tcellname=eval(\\\"\".parsekey($key).\"\\\"+row);\";\r\n $temp_java_result.=\"\\n\\t\\tdocument.f1.cellname.enabled=on;\";\r\n }\r\n $temp_java_result.='\r\n\t}\r\n\t</SCRIPT>';\r\n \r\n $temp_result=$temp_java_result.$temp_result;\r\n return $temp_result;\r\n}", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "public function html() {\n $table = $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '250px'])\n ->parameters([\n 'dom' => 'Bfrtip',\n 'buttons' => [\n ['extend' => 'create', 'className' => 'btn btn-success', 'text' => 'Create User', 'init' => 'function(api, node, config) {\n $(node).removeClass(\"dt-button buttons-create btn-default\")\n }']\n ],\n 'select' => true,\n 'initComplete' => 'function () {\n var r = $(\"#datatable-buttons tfoot tr\");\n $(\"#datatable-buttons thead\") . append(r);\n this.api().columns([0,1,2,3]).every(function () {\n var column = this; \n var input = document . createElement(\"input\");\n $(input).addClass(\"form-control input-lg col-xs-12\");\n $(input).appendTo($(column.footer()).empty())\n .on(\"change\", function () {\n\n column.search($(this).val(), false, false, true).draw();\n });\n });\n }',\n ]);\n return $table;\n }", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "public function renderItems()\n {\n $caption = $this->renderCaption();\n $columnGroup = $this->renderColumnGroup();\n $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n $tableBody = $this->renderTableBody();\n\n $tableFooter = false;\n $tableFooterAfterBody = false;\n\n if ($this->showFooter) {\n if ($this->placeFooterAfterBody) {\n $tableFooterAfterBody = $this->renderTableFooter();\n } else {\n $tableFooter = $this->renderTableFooter();\n }\n }\n\n $content = array_filter([\n $caption,\n $columnGroup,\n $tableHeader,\n $tableFooter,\n $tableBody,\n $tableFooterAfterBody,\n ]);\n\n return Html::tag('table', implode(\"\\n\", $content), $this->tableOptions);\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public function render()\n\t{\n\t\t// convert json to PHP arrays\n\t\tif(!is_array($this->headers))\n\t\t\t$this->headers = $this->extract_json($this->headers);\n\t\tif(!is_array($this->data))\n\t\t\t$this->data = $this->extract_json($this->data);\n\n\t\t// generate a table of the appropriate type with sub-render method\n\t\t$table_html = $this->{\"render_$this->type\"}();\n\t\t\n\t\t// get the snippets directory if set\n\t\tif($this->snippets_dir && file_exists(\"$this->snippets_dir/table.php\"))\n\t\t\t$snippet = \"$this->snippets_dir/table.php\";\n\t\telse\n\t\t\t$snippet = __DIR__ . \"/snippets/table.php\";\n\t\t\n\t\t// build up the replacements array\n\t\t$replacements = array(\n\t\t\t'body' => $table_html,\n\t\t\t'class' => strlen($this->class)?\"class=\\\"$this->class\\\"\":'',\n\t\t\t'id' => strlen($this->id)?\"id=\\\"$this->id\\\"\":'',\n\t\t\t'caption' => strlen($this->caption)?\"<caption>$this->caption</caption>\":'',\n\t\t);\n\t\t\n\t\t$html = \\helpers\\html\\html::load_snippet($snippet, $replacements);\n\n\t\treturn $html;\n\t}", "function render_subscriber_table($table) {\n $s = '<table>';\n $s .= '<tr><th>Id</th><th>Name</th><th>Email</th></tr>';\n foreach($table as $row) {\n $id = \"$row[id]\";\n $name = \"<b>$row[name]</b>\";\n $email = \"$row[email]\";\n $s .= \"<tr><td>$id</td><td>$name</td><td>$email</td></tr>\";\n }\n $s .= '</table>';\n return $s;\n }", "public function table($data = null) {\n\t\t\tif ($data) {\n\t\t\t\tforeach ( $data as $key => $value ) {\n\t\t\t\t\t$this->{$key} = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// baut tabelle zusammen\n\t\t\techo \"<table>\";\n\t\t\techo \"<thead>\";\n\t\t\t// falls alias übergeben wurde\n\t\t\tif (isset ( $this->alias )) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\tforeach ( $this->alias [0] as $key => $value ) {\n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"</thead>\";\n\t\t\t} else {\n\t\t\t\t// falls keine alias übergeben, dann spaltenname\n\t\t\t\techo \"<tr>\";\n\t\t\t\tforeach ( $this->table [0] as $key => $value ) {\n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\techo htmlentities ( $key );\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"</thead>\";\n\t\t\t}\n\t\t\t// befüllt tabelle mit daten\n\t\t\techo \"<tbody>\";\n\t\t\techo \"<tr>\";\n\t\t\t$i = 0;\n\t\t\twhile ( $i < count ( $this->table ) ) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\tforeach ( $this->table [$i] as $key => $value ) {\n\t\t\t\t\tif ($i % 2 != 0) {\n\t\t\t\t\t\techo \"<td style=background:#A9DFFF; >\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<td>\";\n\t\t\t\t\t}\n\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\t// falls link\n\t\t\t\tif (isset ( $this->link )) {\n\t\t\t\t\tforeach ( $this->link [0] as $key => $value ) {\n\t\t\t\t\t\t$submitName = $key;\n\t\t\t\t\t\techo \"<td align=center>\";\n\t\t\t\t\t\techo \"<form action=\\\"\";\n\t\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\t\techo \"\\\" method=\\\"post\\\">\";\n\t\t\t\t\t\tforeach ( $this->table [$i] as $key => $value ) {\n\t\t\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"\";\n\t\t\t\t\t\t\techo htmlentities ( $key );\n\t\t\t\t\t\t\techo \"\\\" value=\\\"\";\n\t\t\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\t\t\techo \"\\\">\";\n\t\t\t\t\t\t}\n\t/*\n\t * ===============================================\n\t * Start Sprint: 4\n\t * @author: Kilian Kraus\n\t * User Story: Als Admin/Verwalter möchte ich Rechte vergeben können.\n\t * ===============================================\n\t */\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// zusätzliche hidden values\n\t\t\t\t\t\t\tif(isset($this->hidden)){\n\t\t\t\t\t\t\t\tforeach ( $this->hidden[0] as $key => $value ) {\n\t\t\t\t\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"\";\n\t\t\t\t\t\t\t\t\techo htmlentities ( $key );\n\t\t\t\t\t\t\t\t\techo \"\\\" value=\\\"\";\n\t\t\t\t\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\t\t\t\t\techo \"\\\">\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n \t/**-----------------------------------------------------------------------------------------\n\t* START SPRINT 05\n\t* @author: Damian Wysocki\n\t* User Story (Nr.: 430a) Als Mitarbeiter möchte ich Noten von Veranstaltungen für die Teilnehmer eintragen können. (erneut)\n\t* Task: 430a/03 Beschreibung: Maske zum Eintragen\n\t* Zeitaufwand (in Stunden): 5\n\t* START SPRINT 05\t\n\t*/\n\t \n\t\t/**\n\t\t *\n\t\t * @author Damian Wysocki\n\t\t * \n\t\t * Nur Zahlen mit Schritten von 0,3 als Noteneintrag erlaubt\n\t\t **/ \n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo \"<select name=\\\"Note\\\" required=\\\"required\\\" style=\\\"max-width:45%\\\" >\n\t\t\t\t<option value=\\\"1.0\\\">1.0</option>\n\t\t\t\t<option value=\\\"1.3\\\">1.3</option>\n\t\t\t\t<option value=\\\"1.7\\\">1.7</option>\n\t\t\t\t<option value=\\\"2.0\\\">2.0</option>\n\t\t\t\t<option value=\\\"2.3\\\">2.3</option>\n\t\t\t\t<option value=\\\"2.7\\\">2.7</option>\n\t\t\t\t<option value=\\\"3.0\\\">3.0</option>\n\t\t\t\t<option value=\\\"3.3\\\">3.3</option>\n\t\t\t\t<option value=\\\"3.7\\\">3.7</option>\n\t\t\t\t<option value=\\\"4.0\\\">4.0</option>\n\t\t\t\t<option value=\\\"5.0\\\">5.0</option>\t\t\t\t\n\t\t\t\t<\\\"select>\";\n\t\t\t\t\t\n\t\t\t\t\t\techo \"<input class=\\\"button\\\" type=\\\"submit\\\" onClick=\\\"return confirm('Wollen Sie die Note wirklich ändern?')\\\" value=\\\"\";\n\t\t\t\t\t\t/**\n\t* ENDE SPRINT 05\n\t* @author: Damian Wysocki\n\t* User Story (Nr.: 430a) Als Mitarbeiter möchte ich Noten von Veranstaltungen für die Teilnehmer eintragen können. (erneut)\n\t* Task: 430a/03 Beschreibung: Maske zum Eintragen\n\t* Zeitaufwand (in Stunden): 5\n\t* ENDE SPRINT 05\n\t**-----------------------------------------------------------------------------------------*/\t\n\t\t\t\t\t\t\n\t\t\t\t\t\techo htmlentities ( $submitName );\n\t\t\t\t\t\techo \"\\\">\";\n\t\t\t\t\t\techo \"</form>\";\n\t\t\t\t\t\techo \"</td>\";\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\techo \"</tr>\";\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t\techo \"</tbody>\";\n\t\t\techo \"</table>\";\n\t\t}", "public function output($options = []) {\r\n\t\t$options = array_merge([\r\n\t\t\t'form' => $this->hasForm,\r\n\t\t], $options);\r\n\t\t\r\n\t\t$this->currentTableId++;\r\n\t\t\r\n\t\tif (!is_array($options)) {\r\n\t\t\t$options = [$options => true];\r\n\t\t}\r\n\t\t\r\n\t\t$isEmpty = empty($this->rows);\r\n\t\t\r\n\t\t$output = '';\r\n\t\t$after = '';\r\n\t\t\r\n\t\tif (!$this->hasHeader) {\r\n\t\t\t$this->headers = null;\r\n\t\t}\r\n\t\tif (!$isEmpty && !empty($this->checkboxCount)) {\r\n\t\t\tif (!empty($options['withChecked'])) {\r\n\t\t\t\tif (!isset($options['form'])) {\r\n\t\t\t\t\t$options['form'] = true;\r\n\t\t\t\t}\r\n\t\t\t\t$after .= $this->withChecked($options['withChecked']);\r\n\t\t\t\tunset($options['withChecked']);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Wraps it in a form tag\r\n\t\t\tif (!isset($options['form'])) {\r\n\t\t\t\t$options['form'] = $this->hasForm;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$formOptions = !empty($options['form']) ? $options['form'] : null;\r\n\t\tunset($options['form']);\r\n\r\n\t\t$output .= $this->_table($this->headers, $this->rows, $options + compact('after'));\r\n\r\n\t\tif (!empty($formOptions)) {\r\n\t\t\t$output = $this->formWrap($output, $formOptions);\r\n\t\t}\r\n\t\t\r\n\t\t$this->reset();\r\n\t\treturn $output;\r\n\t}", "function renderTableTemplate()\n {\n\n global $wpdb;\n\n $query = \"SELECT * FROM \" . $wpdb->prefix . \"posts WHERE post_type='flamingo_inbound' and post_title LIKE '%-%-%'\";\n\n $data = $wpdb->get_results($query);\n\n // Header frame.\n echo '\n\t\t\t<div class=\"limiter\">\n\t\t\t\t<div class=\"container-table100\">\n\t\t\t\t\t<div class=\"wrap-table100\">\n\t\t\t\t\t\t<div class=\"table100\">\n\t\t\t\t\t\t\t<table class=\"birthday-table\">\n\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t<tr class=\"table100-head\">\n\t\t\t\t\t\t\t\t\t\t<th class=\"column1\">Username</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column2\">Birthday Date</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column3\">Age</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column3\">Days to birthdate</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column3\">Contact</th>\n\t\t\t\t\t\t\t\t\t\t<th class=\"column4\">Joined at</th>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t<tbody class=\"birthday-table-body\">';\n\n // Join together all query's data into an array of multiples arrays for each customer.\n $data_array = parseUsersInfo($data);\n\n $users_data_array = addAgeAndDaysToBirthdate($data_array);\n\n // Sort the multidimensional array.\n usort($users_data_array, 'compareDates');\n\n foreach ($users_data_array as &$users_info) {\n renderTableData($users_info);\n }\n\n // Footer frame.\n echo '\n \t\t\t\t\t\t</tbody>\n \t\t\t\t\t</table>\n \t\t\t\t</div>\n \t\t\t</div>\n \t\t</div>\n \t</div>';\n }", "function Formitable(& $db, $table){\n\n\t\t//sniff for Netscape 4.x\n\t\tif( stristr(getenv(\"HTTP_USER_AGENT\"), \"Mozilla/4\") && !stristr(getenv(\"HTTP_USER_AGENT\"), \"compatible\" ) )\n\t\t\t$this->NS4 = true; else $this->NS4 = false;\n\n\t\t$this->_magic_quotes = get_magic_quotes_gpc();\n\n\t\t$this->db = $db;\n\n\t\t$this->formName = $this->table = $table;\n\n\t\t$this->fields = $this->db->execute(\"DESCRIBE $table \")\n\t\t\t\t\t\tor die(\"DB Form Connection Error \");\n\n\t\t$this->columns = count($this->fields);\n\n\t\t$this->pkey = \"\";\n\n\t\t$this->optionBreak = $this->labelBreak = \"<br/>\\n\";\n\n\t\t$this->fieldBreak = \"<br/>\\n\";\n\n\t\t$this->fieldSets = true;\n\n\t\t$this->feedback = \"both\";\n\n\t\t$this->mysql_errors = false;\n\n\t\t$this->hasFiles = false;\n\n\t\t$this->submitted = 0;\n\n\t\t$this->skipFields( array(\"formitable_signature\",\"formitable_multipage\",\"formitable_setcheck\",\"pkey\",\"submit\",\"x\",\"y\",\"MAX_FILE_SIZE\") );\n\n\t}", "public function renderComponentsToTable(): void\n {\n $language = $this->getDefaultLanguage();\n $this->table->setHeaders(['Name', 'Language', 'File']);\n foreach ($this->components as $component) {\n $this->table->addRow([$component->name, $language, $component->filename]);\n }\n\n $this->table->render();\n }", "public function renderTable()\n {\n $get = new GetBag();\n\n $type = $get->fetchEscape('type', $this->db);\n\n /**\n * Column order.\n */\n $order = $get->fetch('order');\n $order = $order[0]['column'];\n switch ($order) {\n case 0:\n $order = 'id';\n break;\n case 1:\n $order = 'date';\n break;\n default:\n $order = 'id';\n }\n\n $direction = $get->fetch('order');\n $direction = $direction[0]['dir'];\n\n /**\n * Total.\n */\n $total = 0;\n $queryTotal = \"SELECT COUNT(*) as `count` FROM `film_review` WHERE `status` = '{$type}'\";\n $result = $this->db->query($queryTotal);\n if ($row = $result->fetch_assoc()) {\n $total = $row['count'];\n }\n\n /**\n * Page offset.\n */\n $length = $get->fetchInt('length');\n $offset = $get->fetchInt('start');\n\n $order = $this->db->real_escape_string($order);\n $direction = $this->db->real_escape_string($direction);\n\n $query = \"SELECT t1.`id`, t1.`status`, t1.`filmId`, t1.`userId`, t1.`name`, t1.`text`, t1.`date`, t2.`login` \n FROM `film_review` as `t1` LEFT JOIN `user` as `t2` ON t1.`userId` = t2.`id` WHERE t1.`status` = '{$type}'\";\n $query .= \" ORDER BY t1.`{$order}` {$direction} LIMIT {$offset}, {$length}\";\n\n $data = [];\n $result = $this->db->query($query);\n while ($row = $result->fetch_assoc()) {\n $login = $row['login'];\n if (empty($login)) {\n $login = $row['name'];\n }\n \n $item[0] = $row['id'];\n $item[1] = $this->formatDate($row['date'], true);\n $item[2] = $row['userId'];\n $item[3] = $row['text'];\n $item[4] = $row['filmId'];\n $item[5] = $login;\n\n $data[] = $item;\n }\n\n $data = [\n 'draw' => $get->fetchInt('draw'),\n 'recordsTotal' => $total,\n 'recordsFiltered' => $total,\n 'data' => $data\n ];\n\n return json_encode($data);\n }", "private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}", "function makeForm($frm) {\r\n\t\tif(!empty($frm)) preg_replace('/\\s+/', ' ', $frm);\r\n\r\n \t$html=\"<table>\";\r\n\r\n\t foreach ($frm AS $row) {\r\n\t\t\t$html.=\"<tr><td>\".$row['title'].\"</td><td>\".$row['field'].\"</td></tr>\";\r\n\t\t}\r\n\r\n \t$html.=\"</table>\";\r\n\r\n\t return $html;\r\n\t}", "public function display_table_to_form($id = \"\", $class = \"\",\r\n $action = \"\", $method = \"\",\r\n $table, $model)\r\n {\r\n $data = $model->get_type($table);\r\n echo \"<form class='$class' id='$id' method='$method' action='?action=$action'>\";\r\n echo \"<filedset>\";\r\n foreach ($data as $k => $v) {\r\n echo \"<label>$k</label>\";\r\n if (strpos($v, 'int') !== false) {\r\n $type = 'number';\r\n } else if (strpos($v, 'date') !== false) {\r\n $type = 'date';\r\n } else if ($k == 'Password') {\r\n $type = 'password';\r\n } else if ($k == 'Email') {\r\n $type = 'email';\r\n } else {\r\n $type = 'text';\r\n }\r\n echo \"<input class='form-control' type='$type' name = '$k' placeholder='$k' required='required'><br>\";\r\n }\r\n echo \"<input class='btn btn-primary' type='submit' name='submit' value='submit'>\";\r\n echo \"</form>\";\r\n }", "public function render($data){\n $html = \"<html><body><table border = 1>\";\n\t $html .= \"<tr>\";\n\t foreach($data[0] as $header){\n\t $html .=\"<th>\" .$header. \"</th>\";\n\t }\n\t $html .= \"</tr>\";\n\t for ($i=1;$i<count($data);$i++){\n\t $html .= \"<tr>\";\n\t foreach ($data[$i] as $row) {\n\t $html .= \"<td>\" .$row. \"</td>\";\n\t }\n\t $html .=\"</tr>\";\n\t }\n\t $html .=\"</table>\";\n\t return $html; \n }", "public function output() {\n\t\trequire_once WPCF7_ENTRIES_PLUGIN_DIR. '/includes/class-wpcf7-forms-table.php';\n\t\t$forms = new WPCF7_Forms_Table();\n\t\t$forms->prepare_items(); ?>\n\n <div class=\"wrap\">\n\t\t\t<h1 class=\"wp-heading-inline\"><?php _e('Form Submissions', 'wpcf7-entries'); ?></h1>\n\n <form method=\"post\">\n <?php $forms->search_box( __( 'Search Forms', 'wpcf7-entries' ), 'form' ); ?>\n <?php $forms->display(); ?>\n </form>\n </div>\n <?php\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 1px solid\") ;\r\n\r\n $table->add_row($this->element_label(\"Organization\"),\r\n $this->element_form(\"Organization\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Name\"),\r\n $this->element_form(\"Meet Name\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Address 1\"),\r\n $this->element_form(\"Meet Address 1\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Address 2\"),\r\n $this->element_form(\"Meet Address 2\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet State\"),\r\n $this->element_form(\"Meet State\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Postal Code\"),\r\n $this->element_form(\"Meet Postal Code\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Country\"),\r\n $this->element_form(\"Meet Country\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Code\"),\r\n $this->element_form(\"Meet Code\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Start\"),\r\n $this->element_form(\"Meet Start\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet End\"),\r\n $this->element_form(\"Meet End\")) ;\r\n\r\n $table->add_row($this->element_label(\"Pool Altitude\"),\r\n $this->element_form(\"Pool Altitude\")) ;\r\n\r\n $table->add_row($this->element_label(\"Course Code\"),\r\n $this->element_form(\"Course Code\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }", "public function render(renderable $widget) {\n $data = $widget->export_for_template($this);\n return parent::render_from_template('tool_odeialba/records_table', $data);\n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'centry_exit_log.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "public function render()\n {\n $view = Str::singular($this->resource->getTable());\n\n return view(\"components.{$view}-form\");\n }", "function form() \r\n {\r\n \t //El formateo va a ser realizado sobre una tabla en la que cada fila es un campo del formulario\r\n $table = &html_table($this->_width,0,2,2);\r\n $table->add_row($this->_showElement(\"Asunto\", '6', \"asunto_de_usuario\", 'Asunto', \"Asunto\", \"left\" )); \r\n $table->add_row($this->_showElement(\"Comentario\", '7', \"comentario\", 'Texto', \"Comentario\", \"left\" )); \r\n \r\n $this->set_form_tabindex(\"Aceptar\", '10'); \r\n $label = html_label( \"submit\" );\r\n $label->add($this->element_form(\"Aceptar\"));\r\n $table->add_row(html_td(\"\", \"left\", $label));\r\n \r\n return $table; \r\n }", "protected function _render()\n {\n $resultTRs = array();\n $resultTDs = array();\n $options = array();\n\n if (is_null($this->_paginator)) {\n FaZend_Exception::raise(\n 'FaZend_View_Helper_HtmlTable_MissedPaginatorParameter',\n \"Paginator must be set first\"\n );\n }\n\n foreach ($this->_paginator as $key=>$rowOriginal) {\n // convert ROW, if necessary. skip the ROW if false returned\n if (!$this->_convertColumnValue(false, true, $rowOriginal)) {\n continue;\n }\n\n // prepare one row for rendering, converting it to the ARRAY\n // type, no matter what was the original type.\n if (is_array($rowOriginal)) {\n $row = $rowOriginal;\n } elseif (is_object($rowOriginal)) {\n if (method_exists($rowOriginal, 'toArray')) {\n $row = $rowOriginal->toArray();\n } else {\n $row = array();\n }\n } else {\n $row = array('column'=>$rowOriginal);\n }\n\n // inject columns\n foreach ($this->_injectedColumns as $injectedColumn=>$predecessor) {\n // sanity check\n if (!is_object($rowOriginal)) {\n break;\n }\n\n // if it's a method - call it\n if ($injectedColumn == '__key') {\n $injectedValue = $key;\n } elseif (method_exists($rowOriginal, $injectedColumn)) {\n $injectedValue = $rowOriginal->$injectedColumn();\n } else {\n try {\n $injectedValue = $rowOriginal->$injectedColumn;\n } catch (Exception $e) {\n $injectedValue = $e->getMessage();\n }\n }\n\n $this->_inject($row, $injectedColumn, $predecessor, $injectedValue);\n }\n\n $resultTRs[] = sprintf(\n \"\\t<tr class='%s' onmouseover='this.className=\\\"highlight\\\"' \" .\n \"onmouseout='this.className=\\\"%s\\\"'%s>\\n\",\n (fmod(count($resultTRs), 2) ? 'even' : 'odd'),\n (fmod(count($resultTRs), 2) ? 'even' : 'odd'),\n $this->_formatColumnStyle(false, null, $rowOriginal)\n );\n\n if (!empty($this->_columnOrder)) {\n $row = $this->_orderColumns($row);\n }\n\n $tds = array();\n foreach ($row as $title=>$value) {\n $column = $this->_column($title);\n\n // maybe we should show only some particular columns\n if (!$this->_isVisible($title)) {\n continue;\n }\n\n // convert value, if necessary\n $value = $this->_convertColumnValue($title, $value, $rowOriginal);\n\n // attach link to the TD\n if ($column->link) {\n $value = $this->_resolveLink($column->link, $value, $rowOriginal, $key);\n }\n\n // append CSS style\n $tds[$title] = sprintf(\n \"\\t\\t<td%s>%s\",\n $this->_formatColumnStyle($title, $value, $rowOriginal),\n $value\n );\n }\n\n if (count($this->_options)) {\n $optString = \"\\t\\t<td>\";\n foreach ($this->_options as $option) {\n // skip the option\n if ($option->skip) {\n if ($option->skip->call($rowOriginal, $key)) {\n continue;\n }\n }\n\n // build the <A HREF> link for this option\n $optLink = $this->_optionsSeparator .\n $this->_resolveLink($option->link, $option->title, $rowOriginal, $key);\n\n // attach this option to the particular column\n if ($option->toColumn) {\n $tds[$option->toColumn] .= ' ' . $optLink;\n } else {\n $optString .= $optLink;\n }\n }\n $options[] = $optString;\n }\n $resultTDs[] = $tds;\n }\n\n // if no data in the paginator\n if (!count($resultTDs)) {\n return $this->_noDataMessage;\n }\n\n // build the header using the last ROW information\n $header = \"\\t<tr><!-- header -->\\n\";\n foreach ($row as $title=>$value) {\n if (!$this->_isVisible($title)) {\n continue;\n }\n\n // rename the column\n if ($this->_column($title)->title) {\n $title = $this->_column($title)->title;\n }\n\n $header .= \"\\t\\t<th>{$title}</th>\\n\";\n }\n\n // add header column for OPTIONS\n if (count($this->_options)) {\n $header .= \"\\t\\t<th>\" . _t('Options') . \"</th>\\n\";\n }\n $header .= \"\\t</tr>\\n\";\n\n $html = \"\\n<table>\\n\" . $header;\n foreach ($resultTRs as $tr=>$line) {\n $html .=\n $line .\n implode(\n \"</td>\\n\",\n array_merge(\n $resultTDs[$tr],\n isset($options[$tr]) ? array($options[$tr]) : array()\n )\n ) .\n \"</td>\\n\\t</tr>\\n\";\n }\n\n return $html . \"</table>\\n\";\n }", "function render_form_fields ( $opt_groups, $prefix, $name_attr = false ) {\n\n #$first_row = null;\n\t\t\t\t#$rowgroup_counter = false;\n $output = '';\n \n\t\t\t\tforeach ( $opt_groups as $group => $opt_fields ) {\n\n \t\t$output.= '<fieldset class=\"'.$group.'\"><legend>'. $opt_fields['label'] .'</legend><table class=\"form-table\">';\n\n\t\t foreach ( $opt_fields['fields'] as $id => $field ) {\n\n\t\t\t\t\t\t\t\t$formfield = '';\n\n\t\t\t\t\t\t\t\t// set name attribute\n\t\t\t\t\t\t\t\t$name\t=\t( $name_attr ) ? $name_attr.'['.$id.']' : $id ;\n\n\t\t\t\t\t\t\t\t// set id and css class\n\t\t\t\t\t\t\t\t$css_id = $prefix.$usage.$family.'_'.$id;\n\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$class = $prefix.$usage.$family.' '.$prefix.$usage.$id.' '.$prefix.$family.$id;\n\t\t\t\t\t\t\t\t$class = ( isset( $field['class'] ) ) ? $class.' '.$field['class'] : $class;\n\t\t\t\t\t\t\t\t$status = ( isset( $field['status'] ) ) ? ' '.$field['status'] : '';\n\n\t\t\t\t\t\t\t\t// pre-define if to use scope=\"rowgroup\" or tr without th\n\t\t\t\t\t\t\t\t#$rowgroup_counter = ( $rowgroup_counter >= 0 ) ? $rowgroup_counter : false ;\n\n\n/*\n\t\t\t\t\t\t\t\tif ( $field['type'] == 'rowgroup' ) {\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t $output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\"><th scope=\"rowgroup\" rowspan=\"'.$field['rows'].'\">'.$field['label'].'</th>';\n\t\t\t\t $rowgroup_counter = $field['rows'];\n\t\t\t\t $first_row = true;\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// go on and do not add another tr\n\t\t\t\t\t\t\t\t\t\tif ( isset( $first_row ) ) {\n\t\t unset( $first_row );\n\t\t //\n\t\t\t\t\t\t\t\t\t\t} elseif ( $rowgroup_counter === null || $rowgroup_counter === false ) {\n\t\t\t\t \t\t\t\t\t\t\t\t$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\"><th><label for=\"'.$css_id.'\">'.$field['label'].'</label></th>';\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t \t\t\t\t\t\t\t\t$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\">';\n\t\t\t\t\t\t\t\t }\n*/\n\t\t\t\t \t\t\t\t\t\t$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\"><th><label for=\"'.$css_id.'\">'.$field['label'].'</label></th>';\n\t\t\t\t\t\t\t\t\t\t#$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\">';\n\t\t\t\t\t\t $output .= '<td class=\"'.$field['type'].'\">';\n\n\t\t\t\t\t\t switch( $field['type'] ) {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"text\" name=\"'.$name.'\" id=\"'.$css_id.'\" value=\"'.$field['value'].'\" class=\"'.$class.'\"/>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"checkbox\" name=\"'.$name.'\" id=\"'.$css_id.'\" value=\"1\" '. checked( $field['value'], 1, false ) .' class=\"'.$class.'\"/>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'select':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<select name=\"'.$name.'\" id=\"'.$css_id.'\" class=\"'.$class.'\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $k => $v ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<option'. selected( $field['value'], $k, false ) .' value=\"'.$k.'\">'.$v.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '</select>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $k => $v ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"radio\" name=\"'.$name.'\" id=\"'.$css_id.'-'.$k.'\" value=\"'.$k.'\" '. checked( $field['value'], $k, false ) .' class=\"'.$id.'-'.$k.'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<label for=\"'.$css_id.'-'.$k.'\" class=\"'.$id.' '.$id.'-'.$k.'\">'.$v.'</label>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'upload':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"text\" name=\"'.$name.'\" id=\"'.$css_id.'\" value=\"'.$field['value'].'\" class=\"'.$class.'\"/>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input id=\"'.$css_id.'-upload\" class=\"wp-cmm_call-wp-mediamanagement\" type=\"button\" value=\"'.__( 'Upload' ).'\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n/*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'multipleselect':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<select name=\"'.$name.'[]\" id=\"'.$css_id.'\" class=\"'.$class.'\" multiple>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $value => $label ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t$selected = ( in_array( $value, $field['value'] ) ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<option'. $selected .' value=\"'.$value.'\">'.$label.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '</select>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n*/\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'terms_checklist':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<ul id=\"'.$css_id.'\" class=\"categorychecklist form-no-clear '.$class.'\" >';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $value => $label ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$checked = ( in_array( $value, $field['value'] ) ) ? ' checked' : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<li><label for=\"'.$css_id.'-'.$value.'\"><input'.$checked.' type=\"checkbox\" name=\"'.$name.'['.$value.']\" id=\"'.$css_id.'-'.$value.'\" value=\"1\" />'.$label.'</label></li>';\n#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<li><label for=\"'.$css_id.'-'.$value.'\"><input'.$checked.' type=\"checkbox\" name=\"'.$name.'\" id=\"'.$css_id.'-'.$value.'\" value=\"'.$value.'\" />'.$label.'</label></li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '</ul>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t } //end switch\n\n/*\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif ( $rowgroup_counter !== false && $rowgroup_counter !== null && $field['label'] ) {\n\t\t\t\t \t\t\t\t\t\t\t\t$output .= '<label for=\"'.$css_id.'\">'.$formfield.$field['label'].'</label>';\n\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t$output .= $formfield;\n\t\t\t\t\t\t\t\t\t\t}\n*/\n\t\t\t\t\t\t\t\t\t\t\t\t$output .= $formfield;\n\t\t\t\t \t\t\t\t\t#\t$output .= '<label for=\"'.$css_id.'\">'.$formfield.$field['label'].'</label>';\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif ( $field['desc'] ){\n\t\t\t\t\t\t\t\t\t\t\t\t$output .= '<span class=\"howto\">'.$field['desc'].'</span>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t $output .= \"</td></tr>\\n\\n\";\n\t\t\t\t #}\n\n\t\t\t\t\t\t\t\t#$rowgroup_counter--;\n\n\n\t\t } // end foreach $opt_fields\n\t\t \n\t\t $output.= '</table></fieldset>';\n\t\t \n\t\t } // end foreach $opt_groups\n\t\t \n\t\t\t\techo $output;\n\t\t}", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cCountry_list.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "private function prepare_table()\n {\n global $g_dirs;\n\n $l_dao = new isys_cmdb_dao($this->database);\n $l_quicky = new isys_ajax_handler_quick_info();\n\n $l_table = \"<table width=\\\"100%\\\" class=\\\"report_listing\\\">\";\n\n foreach ($this->m_its_arr as $l_obj_id => $l_title) {\n unset($this->m_obj_arr);\n $l_table .= \"<tr style=\\\"\\\"><td onclick=\\\"collapse_it_service('\" . $l_obj_id . \"')\\\" id=\\\"\" . $l_obj_id . \"\\\" class=\\\"report_listing\\\"><img id=\\\"\" . $l_obj_id .\n \"_plusminus\\\" src=\\\"\" . $g_dirs[\"images\"] . \"dtree/nolines_plus.gif\\\" class=\\\"vam\\\">\";\n\n $l_table .= $l_quicky->get_quick_info($l_obj_id, $l_dao->get_obj_name_by_id_as_string($l_obj_id), C__LINK__OBJECT);\n\n $l_table .= \"<img src=\\\"\" . $g_dirs[\"images\"] . \"ajax-loading.gif\\\" id=\\\"ajax_loading_view_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\" class=\\\"vam\\\" /></td></tr>\";\n\n $l_table .= \"<tr id=\\\"childs_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\"><td><div id=\\\"childs_content_\" . $l_obj_id . \"\\\"></div>\";\n $l_table .= \"</td></tr>\";\n }\n\n $l_table .= \"</table>\";\n\n return $l_table;\n }", "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 makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "public function getHTML()\n {\n $rowIDs = $this->rowID;\n $numberOfColumns = $this->tableColumns;\n $html = \"\";\n $rowCounter = 0;\n\n $html .= \"<table class='table'>\";\n\n if ($this->tableHead != null) {\n $html .= \"<tr>\";\n\n foreach ($this->tableHead as $head) {\n $html .= \"<th>$head</th>\";\n }\n $html .= \"</tr>\";\n }\n $html .= \"<tr>\";\n\n $i = 0;\n foreach ($this->tableData as $data) {\n if (($i) % $numberOfColumns == 0) {\n $html .= \"</tr><tr id='$rowIDs[$rowCounter]'>\";\n $rowCounter++;\n }\n//\n $html .= \"<td>$data</td>\";\n $i++;\n\n }\n $html .= \"</tr>\";\n\n $html .= \"</table>\";\n\n return $html;\n\n }", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cdiscount.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "function render(Form $form);", "protected function renderForm()\n {\n $helper = PrestashopFactory::buildHelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitIfthenpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function renderTables(array &$form, $form_state, int $tables) {\n $tables_return = [];\n $form['fieldset'][$tables] = [\n '#type' => 'fieldset',\n '#title' => $this->t('Table № @number',\n ['@number' => $tables]),\n ];\n $form['fieldset'][$tables]['table'] = [\n '#type' => 'table',\n '#header' => ['Year', 'Jan', 'Feb', 'Mar', 'Q1', 'Apr', 'May', 'Jun',\n 'Q2', 'Jul', 'Aug', 'Sep', 'Q3', 'Oct', 'Nov', 'Dec', 'Q4', 'YTD',\n ],\n ];\n $form['fieldset'][$tables]['actions'] = [\n '#type' => 'actions',\n '#weight' => -1,\n ];\n $form['fieldset'][$tables]['actions']['add_year'] = [\n '#name' => \"add_year_$tables\",\n '#type' => 'submit',\n '#value' => $this->t('Add Year'),\n '#submit' => ['::addYear'],\n '#ajax' => [\n 'callback' => '::addmoreCallback',\n 'wrapper' => $this->getFormId(),\n 'effect' => 'slide',\n 'speed' => 600,\n ],\n ];\n return $tables_return;\n }", "public function render()\n {\n return view('components.transaction-table');\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "public function render($conf = [])\n {\n $controlTable = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(TableRenderer::class);\n $tableParams = isset($conf['tableParams.']) ? $this->cObj->stdWrap($conf['tableParams'], $conf['tableParams.']) : $conf['tableParams'];\n if ($tableParams) {\n $controlTable->tableParams = $tableParams;\n }\n // loads the pagecontent\n $conf['cWidth'] = isset($conf['cWidth.']) ? $this->cObj->stdWrap($conf['cWidth'], $conf['cWidth.']) : $conf['cWidth'];\n $controlTable->contentW = $conf['cWidth'];\n // loads the menues if any\n if (is_array($conf['c.'])) {\n $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.');\n $contentTDParams = isset($conf['c.']['TDParams.']) ? $this->cObj->stdWrap($conf['c.']['TDParams'], $conf['c.']['TDParams.']) : $conf['c.']['TDParams'];\n $controlTable->contentTDparams = isset($contentTDParams) ? $contentTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['lm.'])) {\n $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.');\n $lmTDParams = isset($conf['lm.']['TDParams.']) ? $this->cObj->stdWrap($conf['lm.']['TDParams'], $conf['lm.']['TDParams.']) : $conf['lm.']['TDParams'];\n $controlTable->lmTDparams = isset($lmTDParams) ? $lmTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['tm.'])) {\n $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.');\n $tmTDParams = isset($conf['tm.']['TDParams.']) ? $this->cObj->stdWrap($conf['tm.']['TDParams'], $conf['tm.']['TDParams.']) : $conf['tm.']['TDParams'];\n $controlTable->tmTDparams = isset($tmTDParams) ? $tmTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['rm.'])) {\n $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.');\n $rmTDParams = isset($conf['rm.']['TDParams.']) ? $this->cObj->stdWrap($conf['rm.']['TDParams'], $conf['rm.']['TDParams.']) : $conf['rm.']['TDParams'];\n $controlTable->rmTDparams = isset($rmTDParams) ? $rmTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['bm.'])) {\n $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.');\n $bmTDParams = isset($conf['bm.']['TDParams.']) ? $this->cObj->stdWrap($conf['bm.']['TDParams'], $conf['bm.']['TDParams.']) : $conf['bm.']['TDParams'];\n $controlTable->bmTDparams = isset($bmTDParams) ? $bmTDParams : 'valign=\"top\"';\n }\n $conf['offset'] = isset($conf['offset.']) ? $this->cObj->stdWrap($conf['offset'], $conf['offset.']) : $conf['offset'];\n $conf['cMargins'] = isset($conf['cMargins.']) ? $this->cObj->stdWrap($conf['cMargins'], $conf['cMargins.']) : $conf['cMargins'];\n $theValue = $controlTable->start($conf['offset'], $conf['cMargins']);\n if (isset($conf['stdWrap.'])) {\n $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);\n }\n return $theValue;\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitB2binpayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function drawTable()\n {\n echo \"<table border='1'>\";\n for ($i = 0; $i < $this->m; $i++) {\n echo \"<tr>\";\n for ($j = 0; $j < $this->n; $j++) {\n if ($this->isInSolution($i, $j, $this->matrix)) {\n echo \"<td bgcolor='#9acd32'>\";\n } else {\n echo \"<td>\";\n }\n echo $this->matrix[$i][$j];\n echo \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}", "function FrontPageTable(){\r\n //$this->SetFillColor(135,206,250);\r\n $this->SetFillColor(176,196,222);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(0,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('','B');\r\n // Header\r\n\r\n $this->SetX(35);\r\n $this->Cell(70,7,'Prepared By:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetTextColor(0,0,0);\r\n $this->SetFont('');\r\n $this->Cell(70,7,$this->PreparedBy,1,0,'C',false);\r\n $this->Cell(40,7,'NRAO',1,0,'C',false);\r\n $this->Cell(40,7,$this->MakeDate,1,0,'C',false);\r\n $this->Ln();\r\n\r\n\r\n $this->SetX(35);\r\n $this->SetTextColor(0);\r\n $this->SetFont('','B');\r\n $this->Cell(70,7,'FEIC WP Manager Approval:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetFont('');\r\n $this->Cell(70,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetTextColor(0);\r\n $this->SetFont('','B');\r\n $this->Cell(70,7,'FE System Engineering Approval:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetFont('');\r\n $this->Cell(70,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetTextColor(0);\r\n $this->SetFont('','B');\r\n $this->Cell(70,7,'FE IPT Lead Approval:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetFont('');\r\n $this->Cell(70,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Ln();\r\n\r\n // Color and font restoration\r\n $this->SetFillColor(224,235,255);\r\n $this->SetTextColor(255);\r\n $this->SetFont('');\r\n // Data\r\n $fill = false;\r\n }", "protected function render_instantquiz_table($table) {\n return html_writer::table($table);\n }", "function getForm()\r\n\t{\r\n\t\t$this->action();\r\n\t\t$mainForm\t= $this->getMainForm();\r\n\t\tif($this->isFormRequire)\r\n\t\t{\r\n\t\t\t$cls = ' class=\"formIsRequire\"';\r\n\t\t\tlink_js(_PEA_URL.'includes/formIsRequire.js', false);\r\n\t\t}else{\r\n\t\t\t$cls = '';\r\n\t\t}\r\n\r\n\t\t$i = 0;\r\n\t\t$out = '';\r\n\r\n\t\t$out .= '<form method=\"'.$this->methodForm.'\" action=\"'.$this->actionUrl.'\" name=\"'. $this->formName .'\"'.$cls.' enctype=\"multipart/form-data\" role=\"form\">';\r\n\t\t$out .= $this->getSaveSuccessPage();\r\n\t\t$out .= $this->getDeleteSuccessPage();\r\n\r\n\t\t$hover= $this->isChangeBc ? ' table-hover' : '';\r\n\t\t$out .= '<table class=\"table table-striped table-bordered'.$hover.'\">';\r\n\t\t$out .= '<thead><tr>';\r\n\r\n\t\t// ngambil tr title\r\n\t\t$numColumns = 0;\r\n\r\n\t\tforeach($this->arrInput as $input)\r\n\t\t{\r\n\t\t\tif ($input->isInsideRow && !$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t{\r\n\t\t\t\t// buat array data untuk report\r\n\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t{\r\n\t\t\t\t\t$arrHeader[]\t= $input->title;\r\n\t\t\t\t}\r\n\t\t\t\t// dapatkan text bantuan\r\n\t\t\t\tif (!empty($input->textHelp))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->help->value[$input->name] = $input->textHelp;\r\n\t\t\t\t}\r\n\t\t\t\tif (!empty($input->textTip))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->tip->value[$input->name] = $input->textTip;\r\n\t\t\t\t}\r\n\t\t\t\t$label = '';\r\n\t\t\t\tif (@$input->isCheckAll)\r\n\t\t\t\t{\r\n\t\t\t\t\t$label = $this->getCheckAll($input);\r\n\t\t\t\t}\r\n\t\t\t\t$href = $this->getOrderUrl($input, $input->title);\r\n\t\t\t\tif (!empty($this->tip->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$input->title = tip($input->title, $this->tip->value[$input->name]);\r\n\t\t\t\t}\r\n\t\t\t\t$label .= $href['start'].$input->title.$href['end'];\r\n\t\t\t\t$out .= ' <th>'.$label;\r\n\t\t\t\tif (!empty($this->help->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$out .= ' <span style=\"font-weight: normal;\">'.help($this->help->value[$input->name],'bottom').'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t$out\t\t.= \"</th>\\n\";\r\n\t\t\t\t$numColumns++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= '</tr></thead>';\r\n\t\t$this->reportData['header']\t= isset($arrHeader) ? $arrHeader : array();\r\n\t\t// ambil mainFormnya\r\n\t\t$out .= $mainForm;\r\n\r\n\t\t/* Return, Save, Reset, Navigation, Delete */\r\n\t\t$button = '';\r\n\t\tif (!empty($_GET['return']) && empty($_GET['is_ajax']))\r\n\t\t{\r\n\t\t\t$button .= $GLOBALS['sys']->button($_GET['return']);\r\n\t\t}\r\n\t\tif ($this->saveTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"submit\" name=\"'. $this->saveButton->name .'\" value=\"'. $this->saveButton->value\r\n\t\t\t\t\t\t.\t'\" class=\"btn btn-primary btn-sm\"><span class=\"glyphicon glyphicon-'.$this->saveButton->icon.'\"></span>'\r\n\t\t\t\t\t\t. $this->saveButton->label .'</button>';\r\n\t\t}\r\n\t\tif ($this->resetTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"reset\" class=\"btn btn-warning btn-sm\"><span class=\"glyphicon glyphicon-'.$this->resetButton->icon.'\"></span>'.$this->resetButton->label.'</button> ';\r\n\t\t}\r\n\t\t$nav = $this->nav->getNav();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\tif (!empty($button))\r\n\t\t\t{\r\n\t\t\t\t$button = '<table style=\"width: 100%;\"><tr><td style=\"width: 10px;white-space: nowrap;\">'.$button.'</td><td style=\"text-align: center;\">'.$nav.'</td></tr></table>';\r\n\t\t\t}else{\r\n\t\t\t\t$button .= $nav;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$footerTD = array();\r\n\t\t$colspan = $numColumns;\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$colspan -= 1;\r\n\t\t}\r\n\t\t$attr = $colspan > 1 ? ' colspan=\"'.$colspan.'\"' : '';\r\n\t\t$footerTD[] = '<td'.$attr.'>'.$button.'</td>';\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$footerTD[] = '<td>'\r\n\t\t\t\t. '<button type=\"submit\" name=\"'.$this->deleteButton->name.'\" value=\"'. $this->deleteButton->value.'\" class=\"btn btn-danger btn-sm\" '\r\n\t\t\t\t. 'onclick=\"if (confirm(\\'Are you sure want to delete selected row(s) ?\\')) { return true; }else{ return false; }\">'\r\n\t\t\t\t. '<span class=\"glyphicon glyphicon-'.$this->deleteButton->icon.'\"></span>'.$this->deleteButton->label .'</button>'\r\n\t\t\t\t. '</td>';\r\n\t\t}\r\n\t\tif (!empty($footerTD))\r\n\t\t{\r\n\t\t\t$out .= '<tfoot><tr>'.implode('', $footerTD).'</tr></tfoot>';\r\n\t\t}\r\n\t\t$out .= '</table>';\r\n\t\t$out .= '</form>';\r\n\r\n\t\t/* Export Tool, Page Status, Form Navigate */\r\n\t\t$nav = $this->nav->getViewAllLink();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\t$nav = '<span class=\"input-group-addon\">'.$nav.'</span>';\r\n\t\t}\r\n\t\t$nav .= $this->nav->getGoToForm(false);\r\n\t\t$out .= '<form method=\"get\" action=\"\" role=\"form\" style=\"margin-top:-20px;margin-bottom: 20px;\">'\r\n\t\t\t\t.\t'<div class=\"input-group\">'\r\n\t\t\t\t. $this->getReport($this->nav->int_cur_page)\r\n\t\t\t\t. '<span class=\"input-group-addon\">'\r\n\t\t\t\t. $this->nav->getStatus().'</span>'.$nav.'</div></form>';\r\n\r\n\t\t/* Form Panel */\r\n\t\t$formHeader = $this->getHeaderType();\r\n\t\tif (!empty($formHeader))\r\n\t\t{\r\n\t\t\t$out = '\r\n\t\t\t\t<div class=\"panel panel-default\">\r\n\t\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t\t<h3 class=\"panel-title\">'.$formHeader.'</h3>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"panel-body\">\r\n\t\t\t\t\t\t'.$out.'\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>';\r\n\t\t}\r\n\t\t$out = $this->getHideFormToolStart().$out.$this->getHideFormToolEnd();\r\n\t\treturn $out;\r\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit_apisfact_prestashop';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function show_tablefields()\n {\n $table_name = JFactory::getApplication()->input->get('table_name');\n\n if( ! $table_name)\n {\n return;\n }\n\n $db = JFactory::getDBO();\n\n $table_name = $db->getPrefix().$table_name;\n $fields = $db->getTableColumns($table_name);\n\n if( ! count($fields) || ! count($fields[$table_name]))\n {\n JFactory::getApplication()->enqueueMessage(jgettext('No table fields found'), 'error');\n }\n\n ?>\n<table>\n <tr>\n <th colspan=\"2\"><?php echo jgettext('Include')?></th>\n <th><?php echo jgettext('Editable'); ?></th>\n <th><?php echo jgettext('Type'); ?></th>\n </tr>\n <?php\n foreach($fields[$table_name] as $key => $value)\n {\n switch($value)\n {\n case 'int':\n case 'tinyint':\n $def = '0';\n break;\n\n default:\n $def = 'NULL';\n break;\n }\n\n $javascript1 = \"$('tblfield_edit_\".$key.\"').disabled=(this.checked)?false:true;\";\n $javascript2 = \"$('tblfield_type_\".$key.\"').disabled=(this.checked && $('tblfield_edit_\"\n .$key.\"').checked)?false:true;\";\n\n $javascript = $javascript1.$javascript2;\n ?>\n <tr>\n <td><input type=\"checkbox\" onchange=\"<?php echo $javascript; ?>\"\n name=\"table_fields[]\" checked=\"checked\"\n id=\"tblfield_<?php echo $key; ?>\"\n value=\"<?php echo $key; ?>\">\n </td>\n <td><label for=\"tblfield_<?php echo $key; ?>\">\n <?php echo $key.'<br />('.$value.')'; ?>\n </label></td>\n <td><input type=\"checkbox\" onchange=\"<?php echo $javascript2; ?>\"\n name=\"table_fields_edits[]\" checked=\"checked\"\n id=\"tblfield_edit_<?php echo $key; ?>\"\n value=\"<?php echo $key; ?>\"></td>\n <td><select name=\"table_fields_types[<?php echo $key; ?>]\"\n id=\"tblfield_type_<?php echo $key; ?>\">\n <option>text</option>\n <option>text area</option>\n <option>radio bool</option>\n <option>html</option>\n </select></td>\n </tr>\n <?php\n }\n ?>\n</table>\n <?php\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->setTableAttribute('class', 'table table-hover')\n ->parameters([\n 'dom' => 'lBfrtip',\n 'responsive' => false,\n 'stateSave' => true,\n 'filterDefinitions' => $this->getFilterDefinition(),\n 'filterRules' => $this->filterRules,\n 'headerFilters' => true,\n 'buttons' => DataTableHelper::buttons(),\n 'regexp' => true\n\n ]);\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitOrderrefModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function html()\n {\n return\n $this->builder()\n ->columns($this->getColumns())\n ->parameters([\n 'dom' => \"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>\",\n 'buttons' => [\n ['extend' => 'print', 'className' => 'btn xs default'],\n ['extend' => 'excel', 'className' => 'btn xs default'],\n ['extend' => 'pdf', 'className' => 'btn xs default'],\n ],\n 'language' => config('datatables.language_trans')\n ])->setTableAttribute(['class' => 'table dataTable no-footer table-bordered table-condensed']);\n }", "function getTableForm($title, $arr, $upload = false, $method = 'post')\n{\n\t$end = '';\n\n\t$ret = '<p/><form method=\"' . $method . '\" action=\"index.php\" ' . ($upload ? ' enctype=\"multipart/form-data\"' : '') . '><table><tr><td colspan=\"' . count($arr[0]) . '\">' . $title . '</td></tr>';\n\n\twhile(list(,$array) = each($arr))\n\t{\n\t\tif($array[1]['type'] != 'hidden')\n\t\t\t$ret .= '<tr><td>' . $array[0] . '</td><td>' . getFormField($array[1]) . '</td></tr>';\n\t\telse\n\t\t\t$end .= getFormField($array[1]);\n\t}\n\n\t$ret .= '</table>' . $end . '</form>';\n\n\treturn $ret;\n}", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t\t// Unique table name:\n\t\t\t$table_suffixes = array();\n\t\t\tif (is_array($this->wizard->wizArray[$this->sectionID])) {\n\t\t\t\tforeach ($this->wizard->wizArray[$this->sectionID] as $kk => $vv) {\n\t\t\t\t\tif (!strcmp($action[1], $kk)) {\n\t\t\t\t\t\tif (count($table_suffixes)\n\t\t\t\t\t\t\t&& t3lib_div::inList(\n\t\t\t\t\t\t\t\timplode(',', $table_suffixes), trim($vv['tablename']) . 'Z'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$piConf['tablename'] .= $kk;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$table_suffixes[] = trim($vv['tablename']) . 'Z';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Tablename:</strong><BR>' .\n\t\t\t\t$this->returnName($this->wizard->extKey, 'tables') . '_' . $this->renderStringBox(\n\t\t\t\t\t$ffPrefix . '[tablename]', trim($piConf['tablename'])\n\t\t\t\t) .\n\t\t\t\t'<BR><strong>Notice:</strong> Use characters a-z0-9 only. Only lowercase, no spaces.<BR>\n\t\t\t\tThis becomes the table name in the database. ';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Title of the table:</strong><BR>' .\n\t\t\t\t$this->renderStringBox_lang('title', $ffPrefix, $piConf);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Fields - overview\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\t\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t\t$piConf['fields'], $this->sectionID, $action[1],\n\t\t\t\t\t$piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t\t);\n\n\t\t\t\t// Do it for real...\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Fields Overview </strong></td></tr>';\n\t\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t\t$subContent = '<tr ' . $this->bgCol(2) . '>\n\t\t\t\t\t<td><strong>Name</strong></td>\n\t\t\t\t\t<td><strong>Title</strong></td>\n\t\t\t\t\t<td><strong>Type</strong></td>\n\t\t\t\t\t<td><strong>Exclude?</strong></td>\n\t\t\t\t\t<td><strong>Details</strong></td>\n\t\t\t\t</tr>';\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent .= $this->renderFieldOverview($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t}\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td><table>' . $this->fw($subContent) . '</table></td></tr>';\n\t\t\t}\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Edit Fields </strong></td></tr>';\n\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t$subContent = '';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_deleted]', $piConf['add_deleted'], 1) . 'Add \"Deleted\" field '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Whole system: If a table has a deleted column, records are never really deleted, just \"marked deleted\" . Thus deleted records can actually be restored by clearing a deleted-flag later. Notice that all attached files are also not deleted from the server, so if you expect the table to hold some heavy size uploads, maybe you should not set this...'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_hidden]', $piConf['add_hidden'], 1) . 'Add \"Hidden\" flag '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: The \"Hidden\" flag will prevent the record from being displayed on the frontend.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_hidden.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_starttime]', $piConf['add_starttime']) . 'Add \"Starttime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Starttime\" is set, the record will not be visible on the website, before that date arrives.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_starttime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[add_endtime]', $piConf['add_endtime']) . 'Add \"Endtime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Endtime\" is set, the record will be hidden from that date and into the future.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_endtime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_access]', $piConf['add_access']) . 'Add \"Access group\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a frontend user group is set for a record, only frontend users that are members of that group will be able to see the record.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_access.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Sorting\n\t\t\t$optValues = array(\n\t\t\t\t'crdate' => '[crdate]',\n\t\t\t\t'cruser_id' => '[cruser_id]',\n\t\t\t\t'tstamp' => '[tstamp]',\n\t\t\t);\n\t\t\t$subContent = '';\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[localization]', $piConf['localization'])\n\t\t\t\t. 'Enabled localization features' . $this->whatIsThis(\n\t\t\t\t\t'If set, the records will have a selector box for language and a reference field which can point back to the original default translation for the record. These features are part of the internal framework for localization.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[versioning]', $piConf['versioning']) . 'Enable versioning '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, you will be able to versionize records from this table. Highly recommended if the records are passed around in a workflow.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting]', $piConf['sorting']) . 'Manual ordering of records '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, the records can be moved up and down relative to each other in the backend. Just like Content Elements. Otherwise they are sorted automatically by any field you specify'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .= $this->textSetup(\n\t\t\t\t'', 'If \"Manual ordering\" is not set, order the table by this field:<BR>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[sorting_field]', $piConf['sorting_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) . '<BR>' .\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting_desc]', $piConf['sorting_desc']) . ' Descending'\n\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Type field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>\"Type-field\", if any:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[type_field]', $piConf['type_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis(\n\t\t\t\t\t'A \"type-field\" is the field in the table which determines how the form is rendered in the backend, eg. which fields are shown under which circumstances. For instance the Content Element table \"tt_content\" has a type-field, CType. The value of this field determines if the editing form shows the bodytext field as is the case when the type is \"Text\" or if also the image-field should be shown as when the type is \"Text w/Image\"'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Header field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>Label-field:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[header_field]', $piConf['header_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis('A \"label-field\" is the field used as record title in the backend.');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Icon\n\t\t\t$optValues = array(\n\t\t\t\t'default.gif' => 'Default (white)',\n\t\t\t\t'default_black.gif' => 'Black',\n\t\t\t\t'default_gray4.gif' => 'Gray',\n\t\t\t\t'default_blue.gif' => 'Blue',\n\t\t\t\t'default_green.gif' => 'Green',\n\t\t\t\t'default_red.gif' => 'Red',\n\t\t\t\t'default_yellow.gif' => 'Yellow',\n\t\t\t\t'default_purple.gif' => 'Purple',\n\t\t\t);\n\n\t\t\t$subContent = $this->renderSelectBox($ffPrefix . '[defIcon]', $piConf['defIcon'], $optValues)\n\t\t\t\t. ' Default icon ' . $this->whatIsThis(\n\t\t\t\t\t'All tables have at least one associated icon. Select which default icon you wish. You can always substitute the file with another.'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed on pages\n\t\t\t$subContent = '<strong>Allowed on pages:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_on_pages]', $piConf['allow_on_pages']\n\t\t\t\t) . ' Allow records from this table to be created on regular pages.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed in \"Insert Records\"\n\t\t\t$subContent = '<strong>Allowed in \"Insert Records\" field in content elements:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_ce_insert_records]', $piConf['allow_ce_insert_records']\n\t\t\t\t) . ' Allow records from this table to be linked to by content elements.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Add new button\n\t\t\t$subContent = '<strong>Add \"Save and new\" button in forms:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[save_and_new]', $piConf['save_and_new']\n\t\t\t\t) . ' Will add an additional save-button to forms by which you can save the item and instantly create the next.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$subContent = '<strong>Notice on fieldnames:<BR></strong>' .\n\t\t\t\t'Don\\'t use fieldnames from this list of reserved names/words: <BR>\n\t\t\t\t<blockquote><em>' . implode(', ', $this->wizard->reservedWords) . '</em></blockquote>';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// PRESETS:\n\t\t\t$selPresetBox = $this->presetBox($piConf[\"fields\"]);\n\n\t\t\t// Fields\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\n\t\t\t\t// Do it for real...\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// New field:\n\t\t\t$k = max($c) + 1;\n\t\t\t$v = array();\n\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t\t'<BR><BR>Load preset fields: <BR>' . $selPresetBox\n\t\t\t\t) . '</td></tr>';\n\t\t}\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=0 cellpadding=2 cellspacing=2>' . implode('', $lines) . '</table>';\n\n\t\treturn $content;\n\t}", "private function render_table($table_header, $table_content)\n\t{\n\t\t$table = new Table($this->output);\n\t\t$table->setHeaders($table_header)\n\t\t\t->setRows($table_content)\n\t\t\t->render();\n\n\t\t$this->output->writeln('');\n\t}", "public function render($buffer=false)\n\t{\n\t\t//--------------------------------------------------------\n\t\t// Inset Value Buffer\n\t\t//--------------------------------------------------------\n\t\tob_start();\n\n\t\t//--------------------------------------------------------\n\t\t// Data Output Buffer\n\t\t//--------------------------------------------------------\n\t\tob_start();\n\t\t\n\t\t//--------------------------------------------------------\n\t\t// Form Label\n\t\t//--------------------------------------------------------\n\t\tif (isset($this->form_label)) {\n\t\t\t print new GenElement('form_label', $this->form_label);\n\t\t}\n\t\t\n\t\t//--------------------------------------------------------\n\t\t// Headers\n\t\t//--------------------------------------------------------\n\t\t$headers_arr = array();\n\t\tfor ($x = 0; $x < $this->cols; $x++) {\n\t\t\tif (isset($this->headers[$x])) { $headers_arr[] = $this->headers[$x]; }\n\t\t}\n\t\tprint Format::array2xml('headers', $headers_arr);\n\t\t\n\t\t//--------------------------------------------------------\n\t\t// Button Cell Attributes\n\t\t//--------------------------------------------------------\n\t\tprint Format::array2xml('button_cell_attrs', $this->button_cell_attrs);\n\t\t\n\t\t//--------------------------------------------------------\n\t\t// Button(s)\n\t\t//--------------------------------------------------------\n\t\tif (gettype($this->button) == 'array') {\n\t\t\t$buttons = array();\n\t\t\tforeach ($this->button as $key => $value) {\n\t\t\t\tif (gettype($key) == 'integer') { $key = 'button_' . $key; }\n\t\t\t\t$buttons[$key] = array('name' => $key, 'value' => $this->xml_escape($value));\n\t\t\t}\n\t\t\tprint Format::array2xml('buttons', $buttons);\n\t\t}\n\t\telse {\n\t\t\tif ($this->button !== NULL) {\n\t\t\t\tprint new GenElement('button', $this->xml_escape($this->button));\n\t\t\t}\n\t\t}\n\t\tprint new GenElement('columns', $this->cols);\n\n\t\t//--------------------------------------------------------\n\t\t// Form content\n\t\t//--------------------------------------------------------\n\t\t$curr_cols = 0;\n\t\t$colspan = 0;\n\t\t$row_begin = false;\n\t\t$row_end = false;\n\n\t\t//--------------------------------------------------------\n\t\t// Hidden Form Elements\n\t\t//--------------------------------------------------------\n\t\t$hid_elems = array();\n\t\tforeach ($this->hidden_elements as $he_key => $hid_element) {\n\t\t\tob_start();\n\t\t\t$this->process_element($hid_element);\n\t\t\t$hid_elems[] = (!empty($this->xsl_template)) ? ($this->xml_escape(ob_get_clean())) : (ob_get_clean());\n\t\t}\n\t\tprint Format::array2xml('hidden_elements', $hid_elems);\n\t\t\n\t\t//--------------------------------------------------------\n\t\t// Visible Form Elements\n\t\t//--------------------------------------------------------\n\t\tob_start();\n\t\t$rows = 0;\n\t\tforeach ($this->form_elements as $element) {\n\n\t\t\t//--------------------------------------------------------\n\t\t\t// Process the element:\n\t\t\t// -> object -> render, \n\t\t\t// -> text -> print, \n\t\t\t// -> array -> process elements\n\t\t\t//--------------------------------------------------------\n\t\t\tob_start();\n\t\t\t$this->process_element($element[0]);\n\t\t\t$tmp_element = ob_get_clean();\n\t\t\t\n\t\t\tif ($element[2] == 'cell') {\n\n\t\t\t\t//--------------------------------------------------------\n\t\t\t\t// Start ROW\n\t\t\t\t//--------------------------------------------------------\n\t\t\t\tif ($curr_cols == 0) {\n\t\t\t\t\tob_start();\n\t\t\t\t\tif ($rows % 2 == 1 && $this->alt_rows) { $this->set_row_attr($rows, 'class', 'alt'); }\n\t\t\t\t\t$row_attrs = (isset($this->row_attrs[$rows])) ? ($this->row_attrs[$rows]) : (array());\n\t\t\t\t\t$row_begin = true;\n\t\t\t\t\t$row_end = false;\n\t\t\t\t\t$rows++;\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------------------\n\t\t\t\t// Build Form Element\n\t\t\t\t//--------------------------------------------------------\n\t\t\t\t$colspan = $element[1] + 0;\n\t\t\t\t$fe_attrs = array('colspan' => $element[1]);\n\t\t\t\tforeach ($element[3] as $fe_attr_key => $fe_attr_val) { $fe_attrs[$fe_attr_key] = $fe_attr_val; }\n\t\t\t\t$fe_content = (!empty($this->xsl_template)) ? ($this->xml_escape($tmp_element)) : ($tmp_element);\n\t\t\t\tprint new GenElement('form_element', $fe_content, $fe_attrs);\n\t\t\t\t\n\t\t\t\t//--------------------------------------------------------\n\t\t\t\t// End ROW\n\t\t\t\t//--------------------------------------------------------\n\t\t\t\tif ($curr_cols + $colspan >= $this->cols) {\n\t\t\t\t\tprint new GenElement('row', ob_get_clean(), $row_attrs);\n\t\t\t\t\t$row_begin = false;\n\t\t\t\t\t$row_end = true;\n\t\t\t\t\t$curr_cols = 0;\n\t\t\t\t}\n\t\t\t\telse { $curr_cols += $colspan; }\n\t\t\t}\n\t\t\telse {\n\t\t\t\tprint (!empty($this->xsl_template) && $element[2] != 'fieldset') ? ($this->xml_escape($tmp_element)) : ($tmp_element);\n\t\t\t}\n\t\t}\n\n\t\t//--------------------------------------------------------\n\t\t// End ROW if not already terminated\n\t\t//--------------------------------------------------------\n\t\tif (!$row_end && $row_begin && count($this->form_elements) > 0) {\n\t\t\tprint new GenElement('row', ob_get_clean(), $row_attrs);\n\t\t}\t\t\n\n\t\tprint new GenElement('elements', ob_get_clean());\n\t\tprint new GenElement('data', ob_get_clean());\n\t\t$this->inset_val .= ob_get_clean();\n\t\treturn parent::render($buffer);\n\t}", "function table($text) {\n\t\t$output = \"\";\n\t\tif (!empty($text)) {\n\t\t\t$output .= '<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"100%\">';\n\t\t\t$array = explode(\"\\n\", $text);\n\t\t\tfor ($i=0; $i<count($array); $i++) {\n\t\t\t\tif (!empty($array[$i])) {\n\t\t\t\t\t$row = explode(\":\", $array[$i], 2);\n\t\t\t\t\t$title = isset($row[0]) ? $row[0] : '';\n\t\t\t\t\t$data = isset($row[1]) ? $row[1] : '';\n\t\t\t\t\tif ($i%2 == 0) {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_a\"><td class=\"form_title\" width=\"30%\">'.$title.'</td><td bgcolor=\"#EBF1F6\" width=\"70%\">'.$data.'</td></tr>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_b\"><td class=\"form_title\">'.$title.'</td><td bgcolor=\"#FFFFFF\">'.$data.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '</table>';\n\t\t}\n\n\t\treturn $output;\n\t}", "public function getTableFilterHTML()\n\t{\n\t\treturn $this->render();\n\t}", "function Print_Objekte_Table($Objektarr, $OptionalerParm)\n{\n \n\t\t// der tabenlenkopf\n\t\t$table = \n \"<form method=\\\"post\\\"\".\n \"action= \\\"\".$_SERVER['PHP_SELF'].\"?\".SID \n .\"\\\">\n\t \\n<table id=\\\"Objek_tab\\\">\n\t \\n\t<thead>\n\t \\n\t\t<tr>\n\t \\n\t\t\t<th>Name</th>\n\t \\n\t\t\t<th>TelefonNr.</th>\n\t \\n\t\t\t<th>Adresse</th>\n \\n\t\t\t<th>Ort</th>\n \\n\t\t\t<th>Postleitzahl</th>\n \\n\t\t\t<th>Status</th>\n \\n\t\t\t<th></th>\n\n\t \\n\t\t</tr>\n\t \\n\t</thead>\n\t \\n\t<tbody>\";\n\t // Hier kommen in einer Schleife alle tabelenzeilen hin n mal \n foreach($Objektarr AS $Objekt)\n\t{\n \t $dbconn = dbconnect(\"HssUser\",\"oss_test\");\n\t\t\t$ID =$Objekt['ObjektID'];\n $Objektdetails = GetObjektDetailsByObjektID($ID);\n\t// $lehrer ist immernoch ein eindimensionale assoziatives array\n\tif ($Objekt['ObjektID'] != $OptionalerParm) {\n\n\n\n\n $table.=\n\t\t\t\"\\n<tr>\".\n\t\t\t\"\\n\t<td>\".$Objektdetails['Name'].\"</td>\".\n\t\t\t\"\\n\t<td>\".$Objektdetails['Tel'].\"</td>\".\n\t\t\t\"\\n\t<td>\".$Objektdetails['Str_HN'].\"</td>\".\n \"\\n\t<td>\".$Objektdetails['Ort'].\"</td>\".\n \"\\n\t<td>\".$Objektdetails['PLZ'].\"</td>\".\n \"\\n\t<td>\".$Objektdetails['Status_OJ'].\"</td>\".\n \"\\n\t<td><input type=\\\"submit\\\" name=\\\"Bearbeiten\\\" class=\\\"Bearbeiten\\\" value=\\\"\".$Objekt['ObjektID'].\"\\\" /></td>\".\n $option.\n\t\t\t\"\\n </tr>\";\n\t\t\t\n }\n else {\n\n $table.=\n\t\t\t\"\\n<tr>\".\n\t\t\t\"\\n\t<input type=\\\"hidden\\\" name=\\\"ID\\\" value =\\\"\".$Objekt['ObjektID'].\"\\\" />\".\n\t\t\t\"\\n\t<td><input type=\\\"text\\\" name=\\\"ObjektName\\\" value =\\\"\".$Objektdetails['Name'].\"\\\" /></td>\".\n\t\t\t\"\\n\t<td><input type=\\\"text\\\" class =\\\"Breit\\\" name=\\\"Tel\\\" value=\\\"\".$Objektdetails['Tel'].\"\\\" /></td>\".\n \"\\n\t<td><input type=\\\"text\\\" class =\\\"Breit\\\" name=\\\"Str_HN\\\" value=\\\"\".$Objektdetails['Str_HN'].\"\\\" /></td>\".\n \"\\n\t<td><input type=\\\"text\\\" name=\\\"Ort\\\" value=\\\"\".$Objektdetails['Ort'].\"\\\" /></td>\".\n \"\\n\t<td><input type=\\\"text\\\" name=\\\"PLZ\\\" value=\\\"\".$Objektdetails['PLZ'].\"\\\" /></td>\".\n\t\t\t\"\\n\t<td><select name=\\\"Status\\\" > \n <option>OK</option> \n <option>Gesperrt</option> \n </select> </td>\".\n \"\\n\t<td>\n <input type=\\\"submit\\\" name=\\\"Save\\\" value=\\\"Save\\\" /></td>\".\n\t\t\t\"\\n </tr>\";\n }\n\t}\n\t\n\t$table .=\"\\n\t</tbody> \\n</table></form>\";\n\treturn $table;\n }", "public function actionTable()\n {\n if (isset($_POST['editableAttribute'])) {\n $model = User::find()\n ->where(['_id' => $_POST['editableKey']])\n ->limit(1)\n ->one();\n if ($_POST['editableAttribute']=='type') {\n $model['type']=intval($_POST['Users'][$_POST['editableIndex']]['type']);\n if ($model['active']==true) $model['active']=1;\n else $model['active']=0;\n $model->save();\n return json_encode($model->errors);\n }\n if ($_POST['editableAttribute']=='active') {\n if ($_POST['Users'][$_POST['editableIndex']]['active']==true)\n $model['active']=1;\n else $model['active']=0;\n $model->save();\n return json_encode(\"hui2\");\n }\n }\n $searchModel = new UserSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 15;\n return $this->render(\n 'table',\n [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]\n );\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitKushkipagosModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n if(Currency::getDefaultCurrency()->iso_code=='COP'){\n return $helper->generateForm(array($this->getConfigFormCOP()));\n }else{\n return $helper->generateForm(array($this->getConfigForm()));\n }\n\n }", "public function renderTable(string $dataTables, array $options = []): string {\n\t\t$configBundle = Builder::getInstance()->getConfigBundle($dataTables, $this->getConfig('cache'));\n\t\t$this->_configBundles[$configBundle->getUniqueId()] = $configBundle;\n\n\t\treturn $configBundle->generateTableHtml($this->getView(), $options);\n\t}", "protected static function genChildDbFieldTableTemplate() { return array(); }", "function build_table($new,$array_cat){\n\t\t//de categorias de serviceo.\n\t\t//Hacemos las iniciaciones pertinentes para intentar\n\t\t//aclarar un poco el codigo\n\t\t$ini_fila=\"<tr>\";\n\t\t$fin_fila=\"</tr>\";\n\t\t$ini_col='<td valign=\"top\" nowrap>';\n\t\t$fin_col=\"</td>\";\n\t\t$NUM_MAX_COLS=1;\n\t\t//Por cada columna un padre y sus hijos.\n\t\t$cadena='<table border=\"0\">';\n\t\t$num_current_col=$NUM_MAX_COLS+1;\t\t\n\t\tfor ($i=0;$i<count($array_cat);$i++){\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$num_current_col=1;\n\t\t\t\t$cadena=$cadena.$ini_fila;\n\t\t\t}\n\t\t\t$cadena=$cadena.$ini_col;\n\t\t\t//Damos el padre para que empiece la recursividad\t\t\t\n\t\t\t\n\t\t\t$cadena=$cadena.$this->build_col($new,$array_cat[$i],0,\"services\");\t\t\n\t\t\t//0 es el numero de tabulaciones inicial.\n\t\t\t//\"services\" es el nombre que tendran los checkbox.\n\t\t\t$cadena=$cadena.$fin_col;\n\t\t\t$num_current_col++;\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$cadena=$cadena.$fin_fila;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Si el numero de la columna actual es menor\n\t\t//que el numero maximo de columnas +1 \n\t\t//restamos al maximo la actual para saber cuantas faltan. \n\t\tif ($num_current_col<$NUM_MAX_COLS+1){\t\t\t\n\t\t\t$cadena=$cadena.'<td colspan=\"'.($NUM_MAX_COLS+1-$num_current_col).'\">&nbsp;'.$fin_col.$fin_fila;\n\t\t}\n\t\t$cadena=$cadena.'</table>';\n\t\treturn $cadena;\n\t}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitWi_spentModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function getTableContent() {\n\t\treturn \"<tr data-key='\" . $this -> getKey() . \"'><td>\" . $this -> key . \"</td><td contenteditable='true'>\" . $this -> value . \"</td><td>\" . $this -> dataType . \"</td></tr>\";\n\t}", "public function outputAsTableRow() {\n $table_row = \"<tr>\";\n $table_row .= \"<td><input type='radio' name='reservation_sn' value='$this->sn'</td>\";\n $table_row .= \"<td>$this->sn</td>\";\n $table_row .= \"<td>\".$this->outputStatus().\"</td>\";\n $table_row .= \"<td>$this->member_id</td>\";\n $table_row .= \"<td>$this->equipment_sn</td>\";\n $table_row .= \"<td>$this->start_datetime</td>\";\n $table_row .= \"<td>$this->end_datetime</td>\";\n $table_row .= \"<td>$this->memo</td>\";\n $table_row .= \"<td>$this->register_datetime</td>\";\n $table_row .= \"</tr>\";\n\n return $table_row;\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $msg = html_div(\"ft_form_msg\") ;\r\n $msg->add(html_p(html_b(\"Processing the SDIF Queue requires\r\n processing swimmers, swim meets, and/or swim teams which are\r\n not currently stored in the database. Specify how unknown\r\n data should be processed.\"), html_br())) ;\r\n\r\n $td = html_td(null, null, $msg) ;\r\n $td->set_tag_attribute(\"colspan\", \"2\") ;\r\n $table->add_row($td) ;\r\n $table->add_row($this->element_label(\"Swimmers\"), $this->element_form(\"Swimmers\")) ;\r\n $table->add_row($this->element_label(\"Swim Meets\"), $this->element_form(\"Swim Meets\")) ;\r\n $table->add_row($this->element_label(\"Swim Teams\"), $this->element_form(\"Swim Teams\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitStatsProfitMarginModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitMyeticketsModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public static function formhead(){\n\n $forms = \"<div class='limiter'>\";\n $forms .= \"<div class='container-table100'>\" ;\n $forms .= \"<div class='wrap-table100'>\";\n $forms .= \"<div class='table100 ver1 m-b-110'> \";\n $forms .= \"<div class='table100-head'> \";\n $forms .= \"<table><thead>\\n<tr class='row100 head'>\\n\";\n return $forms;\n\n }", "function format($form_name, $form_action, $form_method, $table_name, $column_key, $state, $default_value, $label);", "function createTable($result) {\n $table = \"<table class='table table-bordered'>\";\n $row = $result->fetch_assoc();\n $table .= \"<tr>\";\n foreach(array_keys($row) as $field) {\n $table .= \"<th class='text-center'>$field</th>\";\n }\n $table .= \"</tr>\";\n while($row) {\n $table .= \"<tr>\";\n foreach($row as $key => $value) {\n $table .= \"<td class='text-center'>\";\n if(strcmp($key, \"Price\") == 0 or strcmp($key, \"Revenue\") == 0) {\n $table.=\"\\$\" . number_format($value, 2, \".\", \"\");\n }\n else {\n $table .= $value;\n }\n $table.=\"</td>\";\n }\n $table .= \"</tr>\";\n $row = $result->fetch_assoc();\n }\n $table .= \"</table>\";\n return $table;\n }", "function buildTable($array){\n // start table\n $html = '<table class=\"table\">';\n // data rows\n foreach( $array as $key=>$value){\n $html .= '<tr>';\n foreach($value as $key2=>$value2){\n $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n }\n $html .= '</tr>';\n }\n\n // finish table and return it\n\n $html .= '</table>';\n return $html;\n}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submit'.$this->name;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "public function renderLanguagesToTable(): void\n {\n $this->table->setHeaders(['ID', 'Country', 'Language', 'Default']);\n\n foreach ($this->languages as $language) {\n $this->table->addRow([\n $language->id,\n $language->country,\n $language->name,\n $language->default ? 'true' : 'false'\n ]);\n }\n\n $this->table->render();\n }", "function get_form_query() {\n\n $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_query_body');\n $my_table->set_col($this->get_button_filter());\n $my_table->set_col('เงื่อนไข ');\n $my_table->set_col(' ค่าที่ค้นหา ');\n $my_table->set_row();\n foreach ($this->caption_fields AS $caption => $id) {\n if (!is_object($this->filter_controls[$id])) {\n $this->set_filter_controls(new OrTextbox($id));\n }\n $my_compare = new OrSelectbox('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[option]->set(array(\n '=' => '=',\n '<>' => '<>',\n '>=' => '>=',\n '<=' => '<=',\n 'BETWEEN' => 'BETWEEN',\n 'LIKE' => 'LIKE',\n 'IN' => 'IN'\n ));\n $my_compare->OP_[default_value]->set($this->get_filter_compare($id)); //สร้าง Function เพื่อค้นหาค่า Default compare\n $my_compare->OP_[auto_post]->set(true);\n //$my_table->set_col($my_control->OP_[caption]->get() , \"td_caption\");\n debug_mode(__FILE__, __LINE__, $this->filter_controls[$id]->OP_[caption]->get(), 'Filter_controls');\n $my_table->set_col($this->filter_controls[$id]->OP_[caption]->get(), \"td_query_caption\");\n $my_table->set_col($my_compare->get_tag(), \"td_query_compare\");\n $my_table->set_col($this->filter_controls[$id]->get_tag(), \"td_query_value\");\n $my_table->set_row('tr_query_body');\n }\n\n $my_table->set_col('ค้นคำ เรียงลำดับ');\n $my_table->set_col($this->get_control_filter());\n $my_table->set_col($this->get_control_order());\n $my_table->set_row();\n\n return $my_table->get_tag();\n }", "protected function openTable($name, $form_id=null, $form_class=null,\n $table_id=null, $table_class=null){\n $form_attribs = '';\n $table_attribs = '';\n if($form_class != null){$form_attribs .= ' class=\"' . $form_class . '\"';}\n if($form_id != null){$form_attribs .= ' id=\"' . $form_id . '\"';}\n if($table_class != null){$table_attribs .= ' class=\"' . $table_class . '\"';}\n if($table_id != null){$table_attribs .= ' id=\"' . $table_id . '\"';}\n\n \n $output ='\n <form name=\"' . $name . '\"' . $form_attribs . ' method=\"post\">\n <table class=\"table table-hover\"' . $table_attribs . '>';\n \n return $output;\n }", "public function changeTable(array $form, FormStateInterface $form_state){\n return $form['table'];\n }", "function buildHTMLTable($dataSet){\n\n $tblHTML = \"<table class='cleanTbl'>\";\n\n foreach ($dataSet as $row) {\n\n $tblHTML = $tblHTML.\"<tr class='cleanTbl'>\";\n\n foreach($row as $col){\n\n $tblHTML = $tblHTML.\"<td class='cleanTbl'>$col</td>\";\n\n }\n $tblHTML = $tblHTML.\"</tr>\";\n\n }\n $tblHTML = $tblHTML.\"</table>\";\n\n return $tblHTML;\n}", "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'submitTwispayModule';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }" ]
[ "0.66639596", "0.6624935", "0.6617751", "0.660413", "0.65923977", "0.65825117", "0.64422756", "0.6412728", "0.6349563", "0.6340403", "0.63346887", "0.63181204", "0.62476295", "0.62418336", "0.6212688", "0.61915064", "0.61912334", "0.61857533", "0.6135722", "0.6120143", "0.6115684", "0.61151904", "0.61081666", "0.61081564", "0.60944617", "0.60865337", "0.60561264", "0.60472876", "0.60461134", "0.60440844", "0.59957665", "0.59517634", "0.5940271", "0.5878193", "0.58740735", "0.58721155", "0.5871166", "0.5867668", "0.58630264", "0.582706", "0.5816049", "0.58134454", "0.58104676", "0.57931066", "0.57895094", "0.5786515", "0.5784585", "0.57795537", "0.5771278", "0.5768218", "0.5753188", "0.57510567", "0.57336664", "0.56916714", "0.5689771", "0.56887525", "0.5686326", "0.56802136", "0.5672072", "0.56668943", "0.5665438", "0.56587756", "0.5648948", "0.56386095", "0.5627946", "0.56273884", "0.56220305", "0.5620003", "0.56169", "0.56099665", "0.56044346", "0.5602843", "0.55934876", "0.55889934", "0.55864954", "0.5586259", "0.5584081", "0.5581048", "0.5580176", "0.5576866", "0.5570963", "0.5569409", "0.55557495", "0.5552527", "0.55513304", "0.555128", "0.5543825", "0.5536501", "0.553623", "0.5530376", "0.5529593", "0.5529004", "0.5519809", "0.5519234", "0.55132914", "0.5510696", "0.5508413", "0.55083305", "0.55078155", "0.5502735" ]
0.61037654
24
BizForm::RenderFormattedTable() Render form as table format using table format style Example as template>m_FormatStyle:table_style give the top style of the table. head,rowodd,roweven,rowsel,cell in css file will be used in the table elements
protected function RenderFormattedTable() { if ($this->m_QueryONRender) if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule)) return $this->ProcessDataObjError($ok); $dispmode = $this->GetDisplayMode(); $hasSub = $this->m_SubForms ? 1 : 0; //$this->SetDisplayMode($dispmode->GetMode()); $cls_tbl = strlen($dispmode->m_FormatStyle[0])>0 ? "class='".$dispmode->m_FormatStyle[0]."'" : ""; $sHTML_tbl = "<table width=100% border=0 cellspacing=0 cellpadding=3 $cls_tbl>\n"; //$sHTML_tby = "<tbody id='".$this->m_Name."_tbody' Highlighted='".$this->m_Name."_data_".($this->m_CursorIndex+1)."' SelectedRow='".($this->m_CursorIndex+1)."'>\n"; // print column header $columns = $this->m_RecordRow->RenderColumn(); $sHTML = ""; foreach($columns as $colname) $sHTML .= "<th class=head>$colname</th>\n"; // print column data table $name = $this->m_Name; $counter = 0; $sHTML_rows = ""; $selectedRecId = null; $selectedIndex = 0; while (true) { if ($this->m_Range != null && $this->m_Range > 0 && $counter >= $this->m_Range) break; if ($this->CanShowData()) $arr = $resultRecords[$counter]; else $arr = null; if (!$arr && $this->m_FullPage == "N") break; if (!$arr) $sHTML_rows .= "<tr><td colspan=99>&nbsp;</td></tr>\n"; else { $recId = $arr["Id"]; $this->m_RecordRow->SetRecordArr($arr); $tblRow = $this->m_RecordRow->Render(); $rowHTML = ""; foreach($tblRow as $cell) { $cell_html = $cell=="" ? "&nbsp;" : $cell; $rowHTML .= "<td valign=top class=cell>$cell_html</td>\n"; } $rownum = $counter+1; $rowid = $name."_data_".$rownum; $attr = $rownum % 2 == 0 ? "normal=roweven select=rowsel" : "normal=rowodd select=rowsel"; if ($this->m_HistRecordId != null) $this->m_RecordId = $this->m_HistRecordId; if ($this->m_RecordId == null) $this->m_RecordId = $recId; if ($this->m_RecordId == $recId) { $style_class = "class=rowsel"; $selectedRecId = $recId; $selectedIndex = $counter; } else if ($rownum % 2 == 0) $style_class = "class=roweven"; else $style_class = "class=rowodd"; $onclick = "ondblclick=\"CallFunction('$name.EditRecord($recId)');\"" . " onclick=\"CallFunction('$name.SelectRecord($recId,$hasSub)');\""; if ($rownum == 1) { $sHTML_row1 = "<tr id='$recId' $style_class $attr $onclick>\n$rowHTML</tr>\n"; $row1_id = $recId; } else $sHTML_rows .= "<tr id='$recId' $style_class $attr $onclick>\n$rowHTML</tr>\n"; } $counter++; } // while if ($selectedRecId == null) { $selectedRecId = $row1_id; $this->m_RecordId = $selectedRecId; $sHTML_row1 = str_replace("class=rowodd", "class=rowsel", $sHTML_row1); } $sHTML .= $sHTML_row1 . $sHTML_rows; $this->GetDataObj()->SetActiveRecord($resultRecords[$selectedIndex]); $sHTML_pre = "\n<input type='hidden' id='".$this->m_Name."_selectedId' name='_selectedId' value='$selectedRecId'/>\n"; $sHTML_tby = "<tbody id='".$this->m_Name."_tbody'>\n"; $sHTML = $sHTML_pre . $sHTML_tbl . $sHTML_tby . $sHTML . "</tbody></table>"; return $sHTML; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getFormTableContent(){\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t$bgCol1='#FFFFFF';\n\t\t$bgCol2='#e4edf9';\n\t\t$bgColDarkerBG='#cddaeb';\n\t\t$colOutline='#8a99ae';\n\t\t$rowCount=0;\n\t\t$NL=\"\\r\\n\";\n\t\t$s_ret='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.'\">'.$NL;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\tif(get_class($o_el)=='FormItBuilder_htmlBlock'){\n\t\t\t\t//do nothing\n\t\t\t}else{\n\t\t\t\tif($o_el->showInEmail()===true){\n\t\t\t\t\t\n\t\t\t\t\t$bgCol=$bgCol1;\n\t\t\t\t\tif($rowCount%2==0){\n\t\t\t\t\t\t$bgCol=$bgCol2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$elType=get_class($o_el);\n\t\t\t\t\t$elId = $o_el->getId();\n\t\t\t\t\t\n\t\t\t\t\tswitch($elType){\n\t\t\t\t\t\tcase 'FormItBuilder_elementMatrix':\n\t\t\t\t\t\t\t$type = $o_el->getType();\n\t\t\t\t\t\t\t$cols = $o_el->getColumns();\n\t\t\t\t\t\t\t$rows = $o_el->getRows();\n\t\t\t\t\t\t\t$r_cnt=0;\n\t\t\t\t\t\t\t$s_val='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.' font-size:10px;\"><tr><td>&nbsp;</td>';\n\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t$s_val.='<td style=\"'.($c_cnt==0?'border-left:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.'; border-top:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($column).'</em></td>';\n\t\t\t\t\t\t\t\t$c_cnt++;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\tforeach($rows as $row){\n\t\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\t\t$s_val.='<tr><td style=\"'.($r_cnt==0?'border-top:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-left:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($row).'</em></td>';\n\t\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t\t$s_val.='<td style=\"text-align:center; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\">';\n\t\t\t\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=htmlspecialchars($_REQUEST[$elId.'_'.$r_cnt.'_'.$c_cnt]);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=($c_cnt==$_REQUEST[$elId.'_'.$r_cnt]?'&#10004;':'-');\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\t\t\t\tif(isset($_REQUEST[$elId.'_'.$r_cnt]) && in_array($c_cnt,$_REQUEST[$elId.'_'.$r_cnt])===true){\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='&#10004;';\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='-';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\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\t$s_val.='</td>';\n\t\t\t\t\t\t\t\t\t$c_cnt++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$r_cnt++;\n\t\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</table>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementFile':\n\t\t\t\t\t\t\tif(isset($_FILES[$elId])){\n\t\t\t\t\t\t\t\tif($_FILES[$elId]['size']==0){\n\t\t\t\t\t\t\t\t\t$s_val='None';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementDate':\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).'_0]] [[+'.htmlspecialchars($o_el->getId()).'_1]] [[+'.htmlspecialchars($o_el->getId()).'_2]]';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).':nl2br]]';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_ret.='<tr valign=\"top\" bgcolor=\"'.$bgCol.'\"><td><b>'.htmlspecialchars($o_el->getLabel()).':</b></td><td>'.$s_val.'</td></tr>'.$NL;\n\t\t\t\t\t$rowCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$s_ret.='</table>'.$NL;\n\t\treturn $s_ret;\n\t}", "public function render()\r\n {\r\n $widths = $this->calculateWidths();\r\n\r\n $table = $this->renderHeaders($widths);\r\n $table .= $this->renderRows($widths);\r\n\r\n return $table;\r\n }", "public function GetHTML( $showCount = true, $styleTable = NULL, $styleHeader = NULL, $styleData = NULL )\r\n\t{\r\n\t\tif( $styleTable === NULL )\r\n\t\t{\r\n\t\t\t$tb = \"border-collapse:collapse;empty-cells:show\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$tb = $styleTable;\r\n\t\t}\r\n\t\tif( $styleHeader === NULL )\r\n\t\t{\r\n\t\t\t$th = \"border-width:1px;border-style:solid;background-color:navy;color:white\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$th = $styleHeader;\r\n\t\t}\r\n\t\tif( $styleData === NULL )\r\n\t\t{\r\n\t\t\t$td = \"border-width:1px;border-style:solid\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$td = $styleData;\r\n\t\t}\r\n\r\n\t\tif( $this->last_result )\r\n\t\t{\r\n\t\t\tif( $this->RowCount() > 0 )\r\n\t\t\t{\r\n\t\t\t\t$html = \"\";\r\n\t\t\t\tif( $showCount ) $html = \"Record Count: \" . $this->RowCount() . \"<br />\\n\";\r\n\t\t\t\t$html .= \"<table style=\\\"$tb\\\" cellpadding=\\\"2\\\" cellspacing=\\\"2\\\">\\n\";\r\n\t\t\t\t$this->MoveFirst();\r\n\t\t\t\t$header = false;\r\n\t\t\t\twhile( $member = mysql_fetch_object( $this->last_result ) )\r\n\t\t\t\t{\r\n\t\t\t\t\tif( !$header )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= \"\\t<tr>\\n\";\r\n\t\t\t\t\t\tforeach( $member as $key => $value )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$html .= \"\\t\\t<td style=\\\"$th\\\"><strong>\" . htmlspecialchars( $key ) . \"</strong></td>\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$html .= \"\\t</tr>\\n\";\r\n\t\t\t\t\t\t$header = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html .= \"\\t<tr>\\n\";\r\n\t\t\t\t\tforeach( $member as $key => $value )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= \"\\t\\t<td style=\\\"$td\\\">\" . htmlspecialchars( $value ) . \"</td>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html .= \"\\t</tr>\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t$this->MoveFirst();\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$html = \"No records were returned.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->active_row = -1;\r\n\t\t\t$html = false;\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "public function tableRender($form, $table_name, $table_rows, $last_year, $table_id) {\n $fields_list = ['Year', 'Jan', 'Feb', 'Mar', 'Q1', 'Apr', 'May', 'Jun', 'Q2', 'Jul', 'Aug', 'Sep', 'Q3', 'Oct', 'Nov', 'Dec', 'Q4', 'YTD'];\n $actions_name = \"action_{$table_id}\";\n\n $form[$actions_name]['addYear'] = [\n '#type' => 'button',\n '#value' => $this->t('Add Year'),\n '#name' => 'add_year_' . $table_id,\n '#last_year' => $last_year,\n '#ajax' => [\n 'callback' => '::submitAjaxCallback',\n 'event' => 'click',\n 'wrapper' => 'table_wrapper',\n ]\n ];\n\n $form[$table_name] = [\n '#type' => 'table',\n '#title' => 'Sample Table',\n '#header' => $fields_list,\n ];\n\n for ($j = 0; $j <= $table_rows; $j++) {\n $qtd = 1;\n for ($i = 0; $i < count($fields_list); $i++) {\n if ($fields_list[$i] == 'Year') {\n $form[$table_name][$j]['Year'] = array(\n '#type' => 'textfield',\n '#size' => 4,\n '#attributes' => array('readonly' => 'readonly'),\n '#default_value' => $last_year,\n );\n } elseif ($fields_list[$i] == 'Q1' || $fields_list[$i] == 'Q2' || $fields_list[$i] == 'Q3' || $fields_list[$i] == 'Q4') {\n $qtd++;\n $form[$table_name][$j][$fields_list[$i]] = [\n '#type' => 'number',\n '#prefix' => \"<div class='table-field-$j-$fields_list[$i]-$table_name black-field'>\",\n '#suffix' => \"</div>\",\n '#step' => '0.01',\n '#attributes' => [\n 'class' => ['qtd-input'],\n 'data-qtd' => $fields_list[$i],\n ]\n ];\n } elseif ($fields_list[$i] == 'YTD') {\n $form[$table_name][$j][$fields_list[$i]] = [\n '#type' => 'number',\n '#prefix' => \"<div class='table-field-YTD-$j-$table_name'>\",\n '#suffix' => \"</div>\",\n '#attributes' => [\n 'class' => ['year-input'],\n ],\n '#step' => '0.01',\n ];\n } else {\n $form[$table_name][$j][$fields_list[$i]] = [\n '#type' => 'number',\n '#step' => '0.01',\n '#attributes' => [\n 'class' => ['month-input'],\n 'data-month' => $i,\n 'data-qtd' => 'Q' . $qtd,\n ]\n ];\n }\n }\n }\n\n return $form;\n }", "public function render()\n\t{\n\n\t\t$table = \"<table\";\n\n\t\t// Add all attributes\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t$table .= ' ' . $key . '=\"' . $value .'\"';\n\t\t}\n\n\t\t$table .= \">\"; // Close table\n\n\t\t// Add the head\n\t\tif ($this->showHeadRow) {\n\t\t\t$table .= \"<thead><tr>\";\n\n\t\t\t// Show the number header.\n\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t$table .= \"<th>#</th>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t$columnHeadTitle = isset($column['headTitle']) ? $column['headTitle'] : $column[0];\n\t\t\t\t$table .= \"<th>\" . $columnHeadTitle . \"</th>\";\n\t\t\t}\n\n\t\t\t$table .= \"</tr></thead>\"; // finish head\n\t\t}\n\n\t\t// Body\n\t\t$table .= \"<tbody>\";\n\n\t\t$row = $this->numberColumnOffset;\n\n\t\tif (count($this->data) == 0) {\n\t\t\t// Show a no data entry\n\t\t\t$colspan = count($this->columns) + ($this->showNumberColumn ? 1 : 0);\n\t\t\t$table .= '<tr><td colspan=\"'.$colspan.'\"><p align=\"center\" style=\"font-weight:bold;\">Keine Einträge</p></td></tr>';\n\t\t}\n\t\telse {\n\t\t\tforeach ($this->data as $dataObject) {\n\n\t\t\t\t// Row attributes\n\t\t\t\t$attributes = $this->rowAttributes;\n\t\t\t\tif (!is_array($attributes)) {\n\t\t\t\t\tif (is_callable($this->rowAttributes)) {\n\t\t\t\t\t\t$callable = $this->rowAttributes;\n\t\t\t\t\t\t$attributes = $callable($dataObject);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$attributeString = '';\n\t\t\t\tif ($attributes) {\t\t// Add attributes if we have some\n\t\t\t\t\tforeach ($attributes as $attributeName => $attributeValue) {\n\t\t\t\t\t\t$attributeString .= $attributeName . '=\"' . $attributeValue . '\" ' ;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($this->rowIdDataMethod) {\n\t\t\t\t\t// method name or closure?\n\t\t\t\t\t$id = '';\n\t\t\t\t\tif (is_string($this->rowIdDataMethod)) {\n\t\t\t\t\t\t$id = $dataObject->{$this->rowIdDataMethod}(); // Call the row data method\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($this->rowIdDataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\t\t\t\t\t\t\t// we got a closure\n\t\t\t\t\t\t\t$closure = $this->rowIdDataMethod;\n\t\t\t\t\t\t\t$id = $closure($dataObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t$table .= '<tr id=\"'. $id .'\" ' . $attributeString . '>'; // Start row with id\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$table .= \"<tr \". $attributeString .\">\";\t// Start row without id\n\t\t\t\t}\n\n\t\t\t\t// Number?\n\t\t\t\tif ($this->showNumberColumn) {\n\t\t\t\t\t$table .= \"<td>\" . $row . \"</td>\";\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\t$dataMethod = isset($column['dataMethod']) ? $column['dataMethod'] : $column[1];\n\t\t\t\t\tif (is_string($dataMethod)) {\n\t\t\t\t\t\t// Just call the method an insert the return value into the table cell\n\t\t\t\t\t\t$table .= \"<td>\". $dataObject->$dataMethod() .\"</td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$rf = new \\ReflectionFunction($dataMethod);\n\t\t\t\t\t\tif ($rf->isClosure()) {\n\n\t\t\t\t\t\t\t// Call the closure and get the result\n\t\t\t\t\t\t\t$value = $dataMethod($dataObject, $this);\n\n\t\t\t\t\t\t\t$table .= \"<td>\". $value .\"</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$table .= \"</tr>\";\t// End the table row\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\t// Render the footer row\n\t\t\t$table = $this->renderFooter($table);\n\n\t\t}\n\n\t\t$table .= \"</tbody>\";\n\n\t\t$table .= \"</table>\";\n\t\treturn $table;\n\t}", "public function getTable($css_classes=''){\r\n\t\t$table=\"<table class='$css_classes'>\";\r\n\t\t // this condition check the single array\r\n\t\t\tif(count($this->values)==count($this->values,1)){\r\n\t\t\t\tforeach($this->values as $key=>$val){\r\n\t\t\t\t\t$table.=\"<tr>\";\r\n\t\t\t\t\t\t$table.=\"<th>$key</th><td>$val</td>\";\r\n\t\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$table.=\"<tr>\";\r\n // this condition check for nested array\r\n\t\t\t\tforeach($this->values[0] as $key=>$row){\r\n\t\t\t\t\t$table.=\"<th>\".ucfirst($key).\"</th>\";\r\n\t\t\t\t}\r\n\t\t\t\t$table.=\"<th>Action</th>\";\r\n\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\tforeach($this->values as $row){\r\n\t\t\t\t\t$table.=\"<tr>\";\r\n\t\t\t\t\t\tforeach($row as $val){\r\n\t\t\t\t\t\t\t$table.=\"<td>$val</td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// add two button for edit and delete data\r\n\t\t\t\t\t\t$table.=\"<td><a class='btn btn-info' href='edit.php?id=$row[id]'>Edit</a> <a class='btn btn-danger mt-1' href='delete.php?delid=$row[id]'>Delete</a></td>\";\r\n\t\t\t\t\t$table.=\"</tr>\";\r\n\t\t\t\t}\r\n\t\t\t\t// ceate a new row for add new data \r\n\t\t\t\t$colspan=count($this->values)+1;\r\n\t\t\t\t$table.=\"<tr><td class='text-center' colspan='$colspan'><a class='btn btn-primary' href='insert_form.php'>Add New Value</a></td></tr>\";\r\n\t\t\t}\r\n\r\n\t\t$table.=\"</table>\";\r\n\t\treturn $table;\r\n\t}", "public function getHtml($fieldsPerRow = 1, $displayOrder = \"vertical\"){\n $fields = $this->form->fields;\n $fieldsHidden = array();\n $fieldsBlock = array();\n foreach($fields as $key => $field){\n if($field instanceof Form_Field_Hidden){\n $fieldsHidden[] = $field;\n unset($fields[$key]);\n }\n }\n $fieldsPerBlock = ceil(count($fields) / $fieldsPerRow);\n if($displayOrder == \"horizontal\"){\n for($i = 1 ; $i <= $fieldsPerBlock; $i++){\n for($b = 1; $b <= $fieldsPerRow; $b++){\n $field = array_shift($fields);\n if($field === null) break 2;\n $fieldsBlock[$b][$field->name] = $field;\n }\n }\n }elseif($displayOrder == \"vertical\"){\n for($b = 1; $b <= $fieldsPerRow; $b++){\n for($i = 1 ; $i <= $fieldsPerBlock; $i++){\n $field = array_shift($fields);\n if($field === null) break 2;\n $fieldsBlock[$b][$field->name] = $field;\n }\n }\n }\n\n $output = '<div id=\"'.$this->id.'\" class=\"formtable\">';\n $output .= '<form '.$this->form->attr->getHtml().'>';\n $output .= '<input type=\"hidden\" name=\"form-'.$this->form->attr->get(\"name\").'\" value=\"1\"/>';\n foreach($fieldsHidden as $field){\n $output .= $field->getHtml();\n }\n if($fieldsBlock){\n $blockWidth = round(100 / $fieldsPerRow, 2, PHP_ROUND_HALF_DOWN);\n foreach($fieldsBlock as $block => $fields){\n $output .= '<div class=\"formtable-block\" style=\"width:'.$blockWidth.'%\">';\n if($fields){\n $output .= '<table class=\"formtable-table\">';\n foreach($fields as $field){\n $output .= '<tr class=\"formtable-fieldtype-'.strtolower(slugify(get_class($field))).' formtable-field-name-'.slugify($field->name).'\">';\n $output .= '<td class=\"formtable-label\"><label for=\"'.$field->attr->get(\"id\").'\">'.$field->label.'</label></td>';\n $output .= '<td class=\"formtable-field\">'.$field->getHtml().'</td>';\n $output .= '</tr>';\n }\n $output .= '</table>';\n }\n $output .= '</div>';\n }\n }\n if($this->buttons){\n $output .= '<div class=\"formtable-buttons\">';\n if($fieldsBlock) $output .= '<table class=\"formtable-table\"><tr><td class=\"formtable-label\"></td><td class=\"formtable-field\">';\n foreach($this->buttons as $field){\n $output .= $field->getHtml();\n }\n if($fieldsBlock) $output .= '</td></tr></table>';\n $output .= '</div>';\n }\n $output .= '</form></div>';\n $output .= '<script type=\"text/javascript\">(function(){var container = $(\"#'.$this->id.'\"); if(!container.data(\"formtable\")) new FormTable(container)})();</script>';\n return $output;\n }", "public function renderTableBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows) && $this->emptyText !== false) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n }\n\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }", "public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }", "function Render()\n\t{\n\t\t$strTableName = $this->_strName;\n\t\t$strVixenTable = \"Vixen.table.{$strTableName}\";\n\n\t\techo \"\n<script type='text/javascript'>\n\t{$strVixenTable} = Object();\n\t{$strVixenTable}.collapseAll = TRUE;\n\t{$strVixenTable}.linked = TRUE;\n\t{$strVixenTable}.totalRows = 0;\n\t{$strVixenTable}.row = Array();\n</script>\";\n\t\t\t\n\t\t\n\t\t$strPageSize = $this->_intPageSize > 0 ? \" page_size='{$this->_intPageSize}' \" : \"\";\n\n\t\techo \"<table border='0' cellpadding='3' cellspacing='0' class='Listing' width='100%' id='$strTableName'$strPageSize>\\n\";\n\t\t\n\t\t// Build headers\n\t\techo \"<tr class='First'>\\n\";\n\t\t$intHeaderCount = 0;\n\t\t$intSortLimit = ($this->_bolSortable && is_array($this->_arrSortFields)) ? count ($this->_arrSortFields) : -1;\n\t\tforeach ($this->_arrHeader AS $objField)\n\t\t{\n\t\t\t$strAlign = $this->_arrAlignments[$intHeaderCount];\n\t\t\t$strSortLabel = \"\";\n\t\t\tif ($intHeaderCount <= $intSortLimit)\n\t\t\t{\n\t\t\t\tif ($this->_arrSortFields[$intHeaderCount] !== NULL)\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" TABLE_SORT='\" . $this->_arrSortFields[$intHeaderCount] . \"' \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strSortLabel = \" NO_TABLE_SORT='1' \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \" <th width='{$this->_arrWidths[$intHeaderCount]}' align='$strAlign'$strSortLabel>\". $objField .\"</th>\\n\";\n\t\t\t$intHeaderCount++;\n\t\t}\n\t\techo \"</tr>\\n\";\n\t\t\n\t\t// Build rows\n\t\t$intRow = -1;\n\t\tforeach ($this->_arrRows AS $objRow)\n\t\t{\n\t\t\t$intRow++;\n\t\t\t$strClass = ($intRow % 2) ? 'Odd' : 'Even';\n\t\t\t$strStyle = \"\";\n\t\t\t\n\t\t\tif (isset($objRow['OnClick']))\n\t\t\t{\n\t\t\t\t// Escape special chars\n\t\t\t\t$strOnClick = \"onclick='\". htmlspecialchars($objRow['OnClick'], ENT_QUOTES) .\"'\";\n\t\t\t\t$strStyle .= \"cursor:pointer;\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strOnClick = \"\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"<tr id='\" . $strTableName . \"_\" . $intRow . \"' class='$strClass' $strOnClick style='$strStyle'>\\n\";\n\t\t\t\n\t\t\t$intColCount = 0;\n\t\t\t// Build fields\n\t\t\tforeach ($objRow['Columns'] as $objField)\n\t\t\t{\n\t\t\t\t$strWidth = '';\n\t\t\t\t// Work out which width to use\n\t\t\t\t//TODO! After setting the widths once in the header, you shouldn't have to set them again, but we are anyway.\n\t\t\t\t//This could cut down the size of the html file generated\n\t\t\t\t/*if (isset($objRow['Widths']))\n\t\t\t\t{\n\t\t\t\t\t// Use the width specific to this row and column\n\t\t\t\t\t$strWidth = \"width='\". $objRow['Widths'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general width of this column\n\t\t\t\t\t$strWidth = \"width='\". $this->_arrWidths[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t// Work out which alignment to use\n\t\t\t\tif (isset($objRow['Alignments']))\n\t\t\t\t{\n\t\t\t\t\t// Use the alignment specific to this row and column\n\t\t\t\t\t$strAlignment = \"align='\". $objRow['Alignments'][$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Use the general alignment of this column\n\t\t\t\t\t$strAlignment = \"align='\". $this->_arrAlignments[$intColCount] .\"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Work out how many columns, this column spans\n\t\t\t\t$strColSpan = \"\";\n\t\t\t\tif (isset($objRow['ColSpans']))\n\t\t\t\t{\n\t\t\t\t\t// colspan values have been declared for this row\n\t\t\t\t\t$strColSpan = \"colspan='\". $objRow['ColSpans'][$intColCount] .\"'\";\n\t\t\t\t\t\n\t\t\t\t\t// If using ColSpans do not use row widths\n\t\t\t\t\t$strWidth = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"<td $strWidth $strAlignment $strColSpan>\";\n\t\t\t\techo \"$objField\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t\t$intColCount++;\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Build detail\n\t\t\tif ($this->_bolDetails)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=\". count($this->_arrHeader) .\" style='padding: 0px 1px 1px 1px;'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-DETAIL' style='display: block; overflow:hidden;'>\";\n\t\t\t\techo $objRow['Detail'];\n\t\t\t\techo \"</div>\";\n\t\t\t\techo \"</td>\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t// Build tooltip\n\t\t\tif ($this->_bolToolTips)\n\t\t\t{\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"<tr>\";\n\t\t\t\techo \"<td colspan=4 style='padding-top: 0px; padding-bottom: 0px'>\";\n\t\t\t\techo \"<div id='\" . $strTableName . \"_\" . $intRow . \"DIV-TOOLTIP' style='display: none;'>\";\n\t\t\t\techo $objRow['ToolTip'];\n\t\t\t\techo \"</div>\\n\";\n\t\t\t\techo \"</td>\";\n\t\t\t}\n\t\t\n\t\t\techo \"\\n<script type='text/javascript'>\";\n\t\t\techo \"objRow = Object();\\n\";\n\t\t\t\n\t\t\techo \"objRow.selected = false;\\n\";\n\t\t\techo \"objRow.up = true;\\n\";\n\n\t\t\tif ($this->_bolLinked)\n\t\t\t{\n\t\t\t\tif (is_array($objRow['Index']))\n\t\t\t\t{\n\t\t\t\t\t// add Indexes to objRow\n\t\t\t\t\techo \"objIndex = Object();\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ($objRow['Index'] as $strIndexName=>$arrValues)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"objIndex.{$strIndexName} = Array();\";\n\t\t\t\t\t\tforeach ($arrValues as $strValue)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"objIndex.{$strIndexName}.push('$strValue');\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"objRow.index = objIndex;\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\techo \"{$strVixenTable}.row.push(objRow);\\n\";\n\t\t\techo \"</script>\\n\";\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t\t$intRowCount = $intRow + 1;\n\t\techo \"</table>\\n\";\n\t\t\n\t\techo \"<script type='text/javascript'>{$strVixenTable}.totalRows = $intRowCount;</script>\\n\";\t\n\t\t\n\t\tif ($this->_bolRowHighlighting)\n\t\t{\n\t\t\t// The following \"Vixen.AddCommand\" method breaks down when you try dynamicly inserting a VixenTable into\n\t\t\t// the DOM, because AddCommand only triggers the command when the body.onload event is triggered\n\t\t\t//echo \"<script type='text/javascript'>Vixen.AddCommand('Vixen.Highlight.Attach','\\'$strTableName\\'', $intRowCount);</script>\";\n\t\t\techo \"<script type='text/javascript'>Vixen.Highlight.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolToolTips)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Tooltip.Attach('$strTableName');</script>\";\n\t\t}\n\t\t\n\t\tif ($this->_bolDetails)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.Slide.Attach('$strTableName', TRUE);</script>\\n\";\n\t\t}\n\t\t\n\t\tif ($this->_bolLinked)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"{$strVixenTable}.linked = TRUE;\";\n\t\t\t\n\t\t\techo \"objLink = Object();\\n\";\n\t\t\t\n\t\t\tforeach ($this->_arrLinkedTables AS $strTableName=>$arrIndexes)\n\t\t\t{\n\t\t\t\techo \"objLink.{$strTableName} = Array();\\n\";\n\t\t\t\tforeach ($arrIndexes AS $strIndex)\n\t\t\t\t{\n\t\t\t\t\techo \"objLink.{$strTableName}.push('$strIndex');\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"{$strVixenTable}.link = objLink;\\n\";\n\t\t\t\n\t\t\techo \"</script>\\n\";\n\t\t\t\t/*'link':\n\t\t\t{\n\t\t\t\t'AccountInvoices' :\n\t\t\t\t[\n\t\t\t\t\t'Invoice'\n\t\t\t\t]\n\t\t\t},*/\n\t\t}\n\t\t\n\t\tif ($this->_bolSortable)\n\t\t{\n\t\t\techo \"<script type='text/javascript'>Vixen.TableSort.prepare('$strTableName');</script>\\n\";\n\t\t}\n\t}", "function FrontPageTable(){\r\n //$this->SetFillColor(135,206,250);\r\n $this->SetFillColor(176,196,222);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(0,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('','B');\r\n // Header\r\n\r\n $this->SetX(35);\r\n $this->Cell(70,7,'Prepared By:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetTextColor(0,0,0);\r\n $this->SetFont('');\r\n $this->Cell(70,7,$this->PreparedBy,1,0,'C',false);\r\n $this->Cell(40,7,'NRAO',1,0,'C',false);\r\n $this->Cell(40,7,$this->MakeDate,1,0,'C',false);\r\n $this->Ln();\r\n\r\n\r\n $this->SetX(35);\r\n $this->SetTextColor(0);\r\n $this->SetFont('','B');\r\n $this->Cell(70,7,'FEIC WP Manager Approval:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetFont('');\r\n $this->Cell(70,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetTextColor(0);\r\n $this->SetFont('','B');\r\n $this->Cell(70,7,'FE System Engineering Approval:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetFont('');\r\n $this->Cell(70,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetTextColor(0);\r\n $this->SetFont('','B');\r\n $this->Cell(70,7,'FE IPT Lead Approval:',1,0,'C',true);\r\n $this->Cell(40,7,'Organization',1,0,'C',true);\r\n $this->Cell(40,7,'Date',1,0,'C',true);\r\n $this->Ln();\r\n $this->SetX(35);\r\n $this->SetFont('');\r\n $this->Cell(70,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Cell(40,27,'',1,0,'C',false);\r\n $this->Ln();\r\n\r\n // Color and font restoration\r\n $this->SetFillColor(224,235,255);\r\n $this->SetTextColor(255);\r\n $this->SetFont('');\r\n // Data\r\n $fill = false;\r\n }", "private function render_data()\n\t{\n\t\t// create if the headers exists\n\t\t// 2 header style table\n\t\tif(count($this->headers) == 2 && isset($this->headers[0][0]) && isset($this->headers[1][0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr><th></th>';\n\t\t\tforeach($this->headers[0] as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the row headers and the data\n\t\t\tfor($i=0; $i<count($this->headers[1]); $i++)\n\t\t\t{\n\t\t\t\t// the header\n\t\t\t\t$html .= \"<tr><th>{$this->headers[1][$i]}</th>\";\n\t\t\t\t\n\t\t\t\t// and now the data\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\t// 1 header style table\n\t\tif(count($this->headers) > 0 && isset($this->headers[0]) && !is_array($this->headers[0]) )\n\t\t{\n\t\t\t// generate the column headers\n\t\t\t$html = '<tr>';\n\t\t\tforeach($this->headers as $header)\n\t\t\t\t$html .= \"<th>$header</th>\";\n\t\t\t$html .= '</tr>';\n\t\t\t\n\t\t\t// generate the data\n\t\t\tfor($i=0; $i<count($this->data); $i++)\n\t\t\t{\n\t\t\t\tforeach($this->data[$i] as $datum)\n\t\t\t\t\t$html .= \"<td>$datum</td>\";\n\t\t\t\t\n\t\t\t\t$html .= '</tr>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}//end if\n\t\t\n\t\treturn '';\n\t}", "public function render() {\n $output = array();\n array_push($output, 0, \"STYLE\");\n array_push($output, 5, $this->getHandle());\n array_push($output, 100, \"AcDbSymbolTableRecord\");\n array_push($output, 100, \"AcDbTextStyleTableRecord\");\n array_push($output, 2, strtoupper($this->name));\n array_push($output, 70, $this->flag);\n array_push($output, 6, $this->lineType);\n return implode(PHP_EOL, $output);\n }", "public static function build_table( $db_array ) {\n\n $display = self::formhead();\n \tforeach ( $db_array[0] as $column => $field ) {\n \t\t$display .= \"<th class='cell100 column1'>$column</th>\\n\";\n \t}\n \t$display .= \"</tr></thead></table></div>\\n\";\n $display .= \"<div class='table100-body '><table><tbody>\" ;\n \tforeach ( $db_array as $record ) {\n \t\t$display .= \"<tr class='row100 body'>\\n\";\n \t\tforeach ( $record as $field ) {\n \t\t\t$display .= \"<td class='cell100 column1'>$field</td>\\n\";\n \t\t}\n \t\t$display .= \"</tr>\\n\";\n \t}\n\n \t$display .= \"</tbody></table>\\n\";\n $display .= \"</div></div>\\n\";\n \t\n \treturn $display;\n }", "function make_table($result)\r\n{\r\n $temp_result=\"\\n<form name=f1 metbod='POST' action=''>\";\r\n $temp_result.=\"\\n<table cellpadding=2 cellspacing=1>\";\r\n for($i=0;$i<mysql_num_rows($result);$i++)\r\n {\r\n $a_rows=mysql_fetch_assoc($result);\r\n $noofcolumns=mysql_num_fields($result);\r\n #Starting rows-\r\n if($i==0)\r\n\t{\r\n\t $temp_result.=\"\\n<tr bgcolor=#d3dce3>\\n\";\r\n\t \t $temp_result.=\"<td colspan=3></td>\";\r\n\t foreach($a_rows as $key=>$value)\r\n\t {\r\n\t $temp_result.=\"<td>\".$key.\"</td>\";\r\n\t }\r\n\t $temp_result.=\"\\n</tr>\";\r\n\t}\r\n\r\n #data rows-\r\n $temp_result.=\"\\n<tr bgcolor=\".(($i%2==0)?\"#e5e5e5\":\"#d5d5d5\").\">\\n\";\r\n\t#edit columns-\r\n $temp_result.=\"\\n\\t<td><input type=checkbox name=check\".$i.\"></td>\";\r\n $temp_result.=\"\\n\\t<td><a name=\".$i.\" href=\\\"javascript:enable(\".$i.\",\".$noofcolumns.\")\\\"><img src=\\\"b_edit.png\\\" border=0></a></td>\";\r\n $temp_result.=\"\\n\\t<td><a href=\\\"\\\"><img src=\\\"b_drop.png\\\" border=0></a></td>\";\r\n\t#data columns- \r\n foreach($a_rows as $key=>$value)\r\n\t{\r\n\t $temp_result.=\"\\n\\t<td visibility='hidden'>\".$value.\"</td>\";\r\n\t $temp_result.=\"\\n\\t\";\r\n\t $temp_result.='<td id='.$key.$value.' display=\"none\"><input type=\"text\" disabled value=\"'.$value.'\" size='.size_of($key);\r\n\t /* if($key==\"Rollno\")*/ $temp_result.=(' name='.parsekey($key).$i);\r\n\t $temp_result.=' ></td>';\r\n\t}\r\n $temp_result.=\"\\n</tr>\";\r\n }\r\n\r\n $temp_result.=\"\\n</table>\";\r\n $temp_result.=\"\\n</form>\";\r\n\r\n $temp_java_result='<SCRIPT type=text/javascript>\r\n\tfunction hide(obj)\r\n\t{\r\n\t\tif(obj.style.display==\"none\")obj.style.display=\"\";\r\n\t\telse obj.style.display=\"none\";\r\n\t}\r\n\tfunction enable(row,col)\r\n\t{\r\n//\t\talert(\"row=\"+row+\"col=\"+col);\r\n\t\tfor( i=row*col+row+1;i<row*col+col+row+1 ;i++ )\r\n\t\t{\r\n//\t\t\talert(\"i=\"+document.f1.elements[i].name);\r\n\t\t\tdocument.f1.elements[i].disabled=false;//abled();//=\"\";\r\n\t\t}\t\t';\r\n\r\n foreach($a_rows as $key=>$value)\r\n {\r\n $temp_java_result.=\"\\n\\t\\tcellname=eval(\\\"\".parsekey($key).\"\\\"+row);\";\r\n $temp_java_result.=\"\\n\\t\\tdocument.f1.cellname.enabled=on;\";\r\n }\r\n $temp_java_result.='\r\n\t}\r\n\t</SCRIPT>';\r\n \r\n $temp_result=$temp_java_result.$temp_result;\r\n return $temp_result;\r\n}", "public function write() {\n\t\t$table = '<table '.$this->addHTML.'>';\n\t\tif(!is_null($this->tableInfo['head'])) {\n\t\t\t$table .= '<thead><tr>';\n\t\t\tforeach($this->tableInfo['head'] as $value) {\n\t\t\t\t$table .= '<th>'.$value.'</th>';\n\t\t\t}\n\t\t\tif($this->crud) {\n\t\t\t\t\t$table .= '<th>Options</th>';\t\n\t\t\t}\n\t\t\t$table .= '</tr></thead>';\n\t\t}\n\t\t$table .= '<tbody>';\n\t\tif(isset($this->tableInfo['rows'])) {\n\t\t\tforeach($this->tableInfo['rows'] as $row) {\n\t\t\t\t$table .= '<tr>';\n\t\t\t\tforeach($row as $key => $column) {\n\t\t\t\t\tif(($key != $this->crud_id) OR $this->show_crud_id) {\n\t\t\t\t\t\t$table .= '<td>'.$column.'</td>';\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($this->crud && isset($row[$this->crud_id])) {\n\t\t\t\t\t$table .= '<td>';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Details/'.$row[$this->crud_id].'\" title=\"Details\"><i class=\"fa fa-search\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Edit/'.$row[$this->crud_id].'\" title=\"Edit\"><i class=\"fa fa-wrench\"></i></a> | ';\n\t\t\t\t\t$table .= '<a href=\"'.$this->crudPath.'Delete/'.$row[$this->crud_id].'\" title=\"Delete\"><i class=\"fa fa-trash\"></i></a>';\n\t\t\t\t\t$table .= '</td>';\n\t\t\t\t}\n\t\t\t\t$table .= '</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$table .= '<tr>';\n\t\t\t$table .= '<td>';\n\t\t\t$table .= 'No Data to show here.';\n\t\t\t$table .= '</td>';\n\t\t\t$table .= '</tr>';\t\n\t\t}\n\t\t\n\t\t$table .= '</tbody></table>';\n\t\treturn $table;\n\t}", "public function renderItems() {\n\n \t $caption = $this->renderCaption();\n \t $columnGroup = $this->renderColumnGroup();\n \t $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n \t $tableBody = $this->renderTableBody();\n \t $tableFooter = $this->showFooter ? $this->renderTableFooter() : false;\n \t $content = array_filter([\n \t$caption,\n \t$columnGroup,\n \t$tableHeader,\n \t$tableFooter,\n \t$tableBody,\n \t ]);\n\n\t return self::html()->tag('table', array('options' => $this->tableOptions, 'content' => implode(\"\\n\", $content)), $this->tableOptions);\n }", "public function renderItems()\n {\n $content = array_filter([\n $this->renderCaption(),\n $this->renderColumnGroup(),\n $this->showHeader ? $this->renderTableHeader() : false,\n $this->showFooter ? $this->renderTableFooter() : false,\n $this->renderTableBody(),\n ]);\n\n $table = Html::tag('table', implode(\"\\n\", $content), $this->tableOptions);\n if ($this->responsive)\n {\n $table = Html::tag('div', $table, ['class' => 'table-responsive']);\n }\n else\n {\n $table = Html::tag('div', $table, ['class' => 'table-scrollable']);\n }\n\n return $table;\n }", "public function renderItems()\n {\n $caption = $this->renderCaption();\n $columnGroup = $this->renderColumnGroup();\n $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n $tableBody = $this->renderTableBody();\n\n $tableFooter = false;\n $tableFooterAfterBody = false;\n\n if ($this->showFooter) {\n if ($this->placeFooterAfterBody) {\n $tableFooterAfterBody = $this->renderTableFooter();\n } else {\n $tableFooter = $this->renderTableFooter();\n }\n }\n\n $content = array_filter([\n $caption,\n $columnGroup,\n $tableHeader,\n $tableFooter,\n $tableBody,\n $tableFooterAfterBody,\n ]);\n\n return Html::tag('table', implode(\"\\n\", $content), $this->tableOptions);\n }", "public function render()\n\t{\n\t\t// convert json to PHP arrays\n\t\tif(!is_array($this->headers))\n\t\t\t$this->headers = $this->extract_json($this->headers);\n\t\tif(!is_array($this->data))\n\t\t\t$this->data = $this->extract_json($this->data);\n\n\t\t// generate a table of the appropriate type with sub-render method\n\t\t$table_html = $this->{\"render_$this->type\"}();\n\t\t\n\t\t// get the snippets directory if set\n\t\tif($this->snippets_dir && file_exists(\"$this->snippets_dir/table.php\"))\n\t\t\t$snippet = \"$this->snippets_dir/table.php\";\n\t\telse\n\t\t\t$snippet = __DIR__ . \"/snippets/table.php\";\n\t\t\n\t\t// build up the replacements array\n\t\t$replacements = array(\n\t\t\t'body' => $table_html,\n\t\t\t'class' => strlen($this->class)?\"class=\\\"$this->class\\\"\":'',\n\t\t\t'id' => strlen($this->id)?\"id=\\\"$this->id\\\"\":'',\n\t\t\t'caption' => strlen($this->caption)?\"<caption>$this->caption</caption>\":'',\n\t\t);\n\t\t\n\t\t$html = \\helpers\\html\\html::load_snippet($snippet, $replacements);\n\n\t\treturn $html;\n\t}", "function table($text) {\n\t\t$output = \"\";\n\t\tif (!empty($text)) {\n\t\t\t$output .= '<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"100%\">';\n\t\t\t$array = explode(\"\\n\", $text);\n\t\t\tfor ($i=0; $i<count($array); $i++) {\n\t\t\t\tif (!empty($array[$i])) {\n\t\t\t\t\t$row = explode(\":\", $array[$i], 2);\n\t\t\t\t\t$title = isset($row[0]) ? $row[0] : '';\n\t\t\t\t\t$data = isset($row[1]) ? $row[1] : '';\n\t\t\t\t\tif ($i%2 == 0) {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_a\"><td class=\"form_title\" width=\"30%\">'.$title.'</td><td bgcolor=\"#EBF1F6\" width=\"70%\">'.$data.'</td></tr>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output .= '<tr class=\"row_ab_b\"><td class=\"form_title\">'.$title.'</td><td bgcolor=\"#FFFFFF\">'.$data.'</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '</table>';\n\t\t}\n\n\t\treturn $output;\n\t}", "function Formitable(& $db, $table){\n\n\t\t//sniff for Netscape 4.x\n\t\tif( stristr(getenv(\"HTTP_USER_AGENT\"), \"Mozilla/4\") && !stristr(getenv(\"HTTP_USER_AGENT\"), \"compatible\" ) )\n\t\t\t$this->NS4 = true; else $this->NS4 = false;\n\n\t\t$this->_magic_quotes = get_magic_quotes_gpc();\n\n\t\t$this->db = $db;\n\n\t\t$this->formName = $this->table = $table;\n\n\t\t$this->fields = $this->db->execute(\"DESCRIBE $table \")\n\t\t\t\t\t\tor die(\"DB Form Connection Error \");\n\n\t\t$this->columns = count($this->fields);\n\n\t\t$this->pkey = \"\";\n\n\t\t$this->optionBreak = $this->labelBreak = \"<br/>\\n\";\n\n\t\t$this->fieldBreak = \"<br/>\\n\";\n\n\t\t$this->fieldSets = true;\n\n\t\t$this->feedback = \"both\";\n\n\t\t$this->mysql_errors = false;\n\n\t\t$this->hasFiles = false;\n\n\t\t$this->submitted = 0;\n\n\t\t$this->skipFields( array(\"formitable_signature\",\"formitable_multipage\",\"formitable_setcheck\",\"pkey\",\"submit\",\"x\",\"y\",\"MAX_FILE_SIZE\") );\n\n\t}", "protected function RenderTable()\n {\n if ($this->m_QueryONRender)\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n\n $records = array();\n $records[] = $this->m_RecordRow->RenderColumn();\n $counter = 0;\n while (true) {\n if ($this->m_Range != null && $this->m_Range > 0 && $counter > $this->m_Range)\n break;\n if ($this->CanShowData())\n $arr = $resultRecords[$counter];\n if (!$arr)\n break;\n $this->m_RecordRow->SetRecordArr($arr);\n $tblRow = $this->m_RecordRow->Render();\n $records[] = $tblRow;\n $counter++;\n }\n return $records;\n }", "function prepareDefaultHeader()\n {\n $this->formatBuffer .= \"p.normalText, li.normalText, div.normalText{\\n\";\n $this->formatBuffer .= \" mso-style-parent: \\\"\\\";\\n\";\n $this->formatBuffer .= \" margin: 0cm;\\n\";\n $this->formatBuffer .= \" margin-bottom: 6pt;\\n\";\n $this->formatBuffer .= \" mso-pagination: widow-orphan;\\n\";\n $this->formatBuffer .= \" font-size: {$this->fontSize}pt;\\n\";\n $this->formatBuffer .= \" font-family: \\\"{$this->fontFamily}\\\";\\n\";\n $this->formatBuffer .= \" mso-fareast-font-family: \\\"{$this->fontFamily}\\\";\\n\";\n $this->formatBuffer .= \"}\\n\\n\";\n \n $this->formatBuffer .= \"table.normalTable{\\n\";\n $this->formatBuffer .= \" mso-style-name: \\\"Tabela com grade\\\";\\n\";\n $this->formatBuffer .= \" mso-tstyle-rowband-size: 0;\\n\";\n $this->formatBuffer .= \" mso-tstyle-colband-size: 0;\\n\";\n $this->formatBuffer .= \" border-collapse: collapse;\\n\";\n $this->formatBuffer .= \" mso-border-alt: solid windowtext {$this->tableBorderAlt}pt;\\n\";\n $this->formatBuffer .= \" mso-yfti-tbllook: 480;\\n\";\n $this->formatBuffer .= \" mso-padding-alt: 0cm {$this->tablePaddingAltRight}pt 0cm {$this->tablePaddingAltLeft}pt;\\n\";\n $this->formatBuffer .= \" mso-border-insideh: {$this->tableBorderInsideH}pt solid windowtext;\\n\";\n $this->formatBuffer .= \" mso-border-insidev: {$this->tableBorderInsideV}pt solid windowtext;\\n\";\n $this->formatBuffer .= \" mso-para-margin: 0cm;\\n\";\n $this->formatBuffer .= \" mso-para-margin-bottom: .0001pt;\\n\";\n $this->formatBuffer .= \" mso-pagination: widow-orphan;\\n\";\n $this->formatBuffer .= \" font-size: {$this->fontSize}pt;\\n\";\n $this->formatBuffer .= \" font-family: \\\"{$this->fontFamily}\\\";\\n\";\n $this->formatBuffer .= \"}\\n\";\n $this->formatBuffer .= \"table.normalTable td{\\n\";\n $this->formatBuffer .= \" border: solid windowtext 1.0pt;\\n\";\n $this->formatBuffer .= \" border-left: none;\\n\";\n $this->formatBuffer .= \" mso-border-left-alt: solid windowtext .5pt;\\n\";\n $this->formatBuffer .= \" mso-border-alt: solid windowtext .5pt;\\n\";\n $this->formatBuffer .= \" padding: 0cm 5.4pt 0cm 5.4pt;\\n\";\n $this->formatBuffer .= \"}\\n\\n\";\n \n $this->formatBuffer .= \"table.tableWithoutGrid{\\n\";\n $this->formatBuffer .= \" mso-style-name: \\\"Tabela sem grade\\\";\\n\";\n $this->formatBuffer .= \" mso-tstyle-rowband-size: 0;\\n\";\n $this->formatBuffer .= \" mso-tstyle-colband-size: 0;\\n\";\n $this->formatBuffer .= \" border-collapse: collapse;\\n\";\n $this->formatBuffer .= \" border: none;\\n\";\n $this->formatBuffer .= \" mso-border-alt: none;\\n\";\n $this->formatBuffer .= \" mso-yfti-tbllook: 480;\\n\";\n $this->formatBuffer .= \" mso-padding-alt: 0cm {$this->tablePaddingAltRight}pt 0cm {$this->tablePaddingAltLeft}pt;\\n\";\n $this->formatBuffer .= \" mso-border-insideh: {$this->tableBorderInsideH}pt solid windowtext;\\n\";\n $this->formatBuffer .= \" mso-border-insidev: {$this->tableBorderInsideV}pt solid windowtext;\\n\";\n $this->formatBuffer .= \" mso-para-margin: 0cm;\\n\";\n $this->formatBuffer .= \" mso-para-margin-bottom: .0001pt;\\n\";\n $this->formatBuffer .= \" mso-pagination: widow-orphan;\\n\";\n $this->formatBuffer .= \" font-size: {$this->fontSize}pt;\\n\";\n $this->formatBuffer .= \" font-family: \\\"{$this->fontFamily}\\\";\\n\";\n $this->formatBuffer .= \"}\\n\\n\";\n \n if ($this->cssFile != '') {\n if (file_exists($this->cssFile))\n $this->formatBuffer .= file_get_contents($this->cssFile);\n }\n }", "protected function _render()\n {\n $resultTRs = array();\n $resultTDs = array();\n $options = array();\n\n if (is_null($this->_paginator)) {\n FaZend_Exception::raise(\n 'FaZend_View_Helper_HtmlTable_MissedPaginatorParameter',\n \"Paginator must be set first\"\n );\n }\n\n foreach ($this->_paginator as $key=>$rowOriginal) {\n // convert ROW, if necessary. skip the ROW if false returned\n if (!$this->_convertColumnValue(false, true, $rowOriginal)) {\n continue;\n }\n\n // prepare one row for rendering, converting it to the ARRAY\n // type, no matter what was the original type.\n if (is_array($rowOriginal)) {\n $row = $rowOriginal;\n } elseif (is_object($rowOriginal)) {\n if (method_exists($rowOriginal, 'toArray')) {\n $row = $rowOriginal->toArray();\n } else {\n $row = array();\n }\n } else {\n $row = array('column'=>$rowOriginal);\n }\n\n // inject columns\n foreach ($this->_injectedColumns as $injectedColumn=>$predecessor) {\n // sanity check\n if (!is_object($rowOriginal)) {\n break;\n }\n\n // if it's a method - call it\n if ($injectedColumn == '__key') {\n $injectedValue = $key;\n } elseif (method_exists($rowOriginal, $injectedColumn)) {\n $injectedValue = $rowOriginal->$injectedColumn();\n } else {\n try {\n $injectedValue = $rowOriginal->$injectedColumn;\n } catch (Exception $e) {\n $injectedValue = $e->getMessage();\n }\n }\n\n $this->_inject($row, $injectedColumn, $predecessor, $injectedValue);\n }\n\n $resultTRs[] = sprintf(\n \"\\t<tr class='%s' onmouseover='this.className=\\\"highlight\\\"' \" .\n \"onmouseout='this.className=\\\"%s\\\"'%s>\\n\",\n (fmod(count($resultTRs), 2) ? 'even' : 'odd'),\n (fmod(count($resultTRs), 2) ? 'even' : 'odd'),\n $this->_formatColumnStyle(false, null, $rowOriginal)\n );\n\n if (!empty($this->_columnOrder)) {\n $row = $this->_orderColumns($row);\n }\n\n $tds = array();\n foreach ($row as $title=>$value) {\n $column = $this->_column($title);\n\n // maybe we should show only some particular columns\n if (!$this->_isVisible($title)) {\n continue;\n }\n\n // convert value, if necessary\n $value = $this->_convertColumnValue($title, $value, $rowOriginal);\n\n // attach link to the TD\n if ($column->link) {\n $value = $this->_resolveLink($column->link, $value, $rowOriginal, $key);\n }\n\n // append CSS style\n $tds[$title] = sprintf(\n \"\\t\\t<td%s>%s\",\n $this->_formatColumnStyle($title, $value, $rowOriginal),\n $value\n );\n }\n\n if (count($this->_options)) {\n $optString = \"\\t\\t<td>\";\n foreach ($this->_options as $option) {\n // skip the option\n if ($option->skip) {\n if ($option->skip->call($rowOriginal, $key)) {\n continue;\n }\n }\n\n // build the <A HREF> link for this option\n $optLink = $this->_optionsSeparator .\n $this->_resolveLink($option->link, $option->title, $rowOriginal, $key);\n\n // attach this option to the particular column\n if ($option->toColumn) {\n $tds[$option->toColumn] .= ' ' . $optLink;\n } else {\n $optString .= $optLink;\n }\n }\n $options[] = $optString;\n }\n $resultTDs[] = $tds;\n }\n\n // if no data in the paginator\n if (!count($resultTDs)) {\n return $this->_noDataMessage;\n }\n\n // build the header using the last ROW information\n $header = \"\\t<tr><!-- header -->\\n\";\n foreach ($row as $title=>$value) {\n if (!$this->_isVisible($title)) {\n continue;\n }\n\n // rename the column\n if ($this->_column($title)->title) {\n $title = $this->_column($title)->title;\n }\n\n $header .= \"\\t\\t<th>{$title}</th>\\n\";\n }\n\n // add header column for OPTIONS\n if (count($this->_options)) {\n $header .= \"\\t\\t<th>\" . _t('Options') . \"</th>\\n\";\n }\n $header .= \"\\t</tr>\\n\";\n\n $html = \"\\n<table>\\n\" . $header;\n foreach ($resultTRs as $tr=>$line) {\n $html .=\n $line .\n implode(\n \"</td>\\n\",\n array_merge(\n $resultTDs[$tr],\n isset($options[$tr]) ? array($options[$tr]) : array()\n )\n ) .\n \"</td>\\n\\t</tr>\\n\";\n }\n\n return $html . \"</table>\\n\";\n }", "protected function renderTable($results, $formOpts) { \n $html = \"\"; \n $html .= Xml::openElement( 'p' ); \n $html .= 'Brief table explanation for users.'; #html text displayed with the table\n $html .= Xml::closeElement( 'p' );\n\t\t$html .= Xml::openElement( \n\t\t\t\t\t'table',\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'id' => 'data display',\n\t\t\t\t\t\t'class' => 'dataTable OMP_annotation_table tableEdit',\n\t\t\t\t\t\t'border' => 1\n\t\t\t\t\t)\n\t\t\t\t); \t\t \t\n\t\t\n\t\tswitch($formOpts){\n \tcase '0':\n\t\t\t\t// make the headings\n\t\t\t\t$headings = array('column 1 heading','column 2 heading','column 3 heading');\n\t\t\t\t$html .= self::make_table_header($headings); \n\t \n\t\t\t\t// make the body\n\t\t\t\t$html .= Xml::openElement( 'tbody' );\n\t\t\t\tforeach($results as $x){\n\t\t\t\t\t$html .= \"<tr><td>$x->database_query_column_1</td><td>$x->database_query_column_2</td><td>$x->database_query_column_3</td></tr>\";\n\t\t\t\t}\t\n\t\t\t\tbreak;\t\n \tcase '1':\n\t\t\t\t#same as case 0\n\t\t\t\tbreak;\t\n\t\t\tcase '2':\n\t\t\t\t#same as case 0\n\t\t\tdefault:\n\t\t}\n\t\t\t#closing table body and table\n\t\t\t$html .= Xml::closeElement( 'tbody' );\n\t\t\t$html .= Xml::closeElement( 'table' ); \n\t\t\treturn $html; #display table\n\t}", "function table_display($table)\n{\n $out = '';\n $out = '<style> td,th{border: solid 2px black;}</style>';\n if (count($table) == 0) {\n //table is empty\n return 'table is empty';\n }\n $out .= '<table>';\n\n //table header\n $col_names = array_keys($table[0]);\n $out .= '<tr>';\n foreach ($col_names as $col_name) {\n $out .= '<th>'.$col_name.'</th>';\n }\n $out .= '</tr>';\n //table data\n $out .= '</tr>';\n foreach ($table as $one_row) {\n $out .= '<tr>';\n foreach ($one_row as $key => $col_name) {\n if ($key == 'price' and gettype($key) != 'integer') {\n $out .= '<td> $'.$col_name.' </td>';\n } else {\n $out .= '<td>'.$col_name.' </td>';\n }\n }\n $out .= '</tr>';\n }\n $out .= '</table>';\n\n return $out;\n}", "function generateTable($widths, $headers, $values)\n{\n\t$theTable = \"<table width=\\\"100%\\\">\\n\";\n\t$theTable = $theTable . \"<tr>\"; \n\n\t$table_column_width = \"\";\n\t$rowcounter = 0;\n\n\tforeach ( $headers as $table_cell )\n\t{ \n\t\tif ($widths != null)\n\t\t{\n\t\t\t$table_column_width = \" width=\\\"\".$widths[$rowcounter].\"\\\"\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<th class=\\\"tdHeader\\\"\".$table_column_width.\">$table_cell</th>\";\n\t\t$rowcounter++;\n\t} \n\n\t$theTable = $theTable . \"</tr>\\n\\t<tr>\";\n\n\t$count = count( $headers );\n\t$rowcounter = 0;\n\t$table_odd = \"1\";\n\n\tforeach ( $values as $table_value )\n\t{\n\t\tif ($rowcounter == $count) \n\t\t{\n\t\t\t$theTable = $theTable . \"</tr>\\n<tr>\";\n\t\t\t$rowcounter = 0;\n\t\t\tif ($table_odd == \"1\") \n\t\t\t{\n\t\t\t\t$table_odd = \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$table_odd = \"1\";\n\t\t\t}\n\t\t}\n\t\tif ($table_odd == \"1\") \n\t\t{\n\t\t\t$table_class = \"tdOdd\";\n\t\t} else\n\t\t{\n\t\t\t$table_class = \"tdEven\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<td class=\\\"$table_class\\\" valign=\\\"top\\\">$table_value</td>\";\n\t\t$rowcounter++;\n\t}\n\t$theTable = $theTable . (\"</tr>\\n</table>\\n\");\n\treturn $theTable;\n}", "function getTable($array, $firstLineHeader = true, $lastLineFooter = true, $withTableStructure = true)\n{\n\t$ret = '';\n\n\t$rows = count($array);\n\t$cols = isset($array[0]) ? count($array[0]) : 0;\n\t$i = 0;\n\n\tif($firstLineHeader)\n\t{\n\t\t$ret .= '<tr class=\"tableHeaderRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellR\">';\n\t\t\telse if($j == 0)\n\t\t\t\t$ret .= '<td class=\"tableHeaderCellL\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableHeaderCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\n\t\t$i++;\n\t}\n\n\tfor(; $i < $rows; $i++)\n\t{\n\t\t$ret .= '<tr class=\"tableRow\">';\n\t\tfor($j = 0; $j < $cols; $j++)\n\t\t{\n\t\t\tif($j == ($cols - 1))\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBR\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTR\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellR\">';\n\t\t\t}\n\t\t\telse if($j == 0)\n\t\t\t{\n\t\t\t\tif($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t\t$ret .= '<td class=\"tableCellBL\">';\n\t\t\t\telse if($i == 0)\n\t\t\t\t\t$ret .= '<td class=\"tableCellTL\">';\n\t\t\t\telse\n\t\t\t\t\t$ret .= '<td class=\"tableCellL\">';\n\t\t\t}\n\t\t\telse if($i == ($rows - 1) && $lastLineFooter)\n\t\t\t\t$ret .= '<td class=\"tableCellB\">';\n\t\t\telse if($i == 0)\n\t\t\t\t$ret .= '<td class=\"tableCellT\">';\n\t\t\telse\n\t\t\t\t$ret .= '<td class=\"tableCell\">';\n\n\t\t\t$ret .= $array[$i][$j] . '</td>' . \"\\n\";\n\t\t}\n\t\t$ret .= '</tr>' . \"\\n\";\n\t}\n\n\tif($withTableStructure)\n\t\t$ret = '<p/><table class=\"tableMain\">' . $ret . '</table>';\n\n\treturn $ret;\n}", "function WriteTable($tcolums)\n {\n for ($i = 0; $i < sizeof($tcolums); $i++)\n {\n $current_col = $tcolums[$i];\n $height = 0;\n \n // get max height of current col\n $nb=0;\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]); \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n \n $nb = max($nb, $this->NbLines($current_col[$b]['width'], $current_col[$b]['text'])); \n $height = $current_col[$b]['height'];\n } \n $h=$height*$nb;\n \n \n // Issue a page break first if needed\n $this->CheckPageBreak($h);\n \n // Draw the cells of the row\n for($b = 0; $b < sizeof($current_col); $b++)\n {\n $w = $current_col[$b]['width'];\n $a = $current_col[$b]['align'];\n \n // Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n \n // set style\n $this->SetFont($current_col[$b]['font_name'], $current_col[$b]['font_style'], $current_col[$b]['font_size']);\n $color = explode(\",\", $current_col[$b]['fillcolor']);\n $this->SetFillColor($color[0], $color[1], $color[2]);\n $color = explode(\",\", $current_col[$b]['textcolor']);\n $this->SetTextColor($color[0], $color[1], $color[2]); \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n $this->SetLineWidth($current_col[$b]['linewidth']);\n \n $color = explode(\",\", $current_col[$b]['fillcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n \n // Draw Cell Background\n $this->Rect($x, $y, $w, $h, 'FD');\n \n $color = explode(\",\", $current_col[$b]['drawcolor']); \n $this->SetDrawColor($color[0], $color[1], $color[2]);\n \n // Draw Cell Border\n if (substr_count($current_col[$b]['linearea'], \"T\") > 0)\n {\n $this->Line($x, $y, $x+$w, $y);\n } \n \n if (substr_count($current_col[$b]['linearea'], \"B\") > 0)\n {\n $this->Line($x, $y+$h, $x+$w, $y+$h);\n } \n \n if (substr_count($current_col[$b]['linearea'], \"L\") > 0)\n {\n $this->Line($x, $y, $x, $y+$h);\n }\n \n if (substr_count($current_col[$b]['linearea'], \"R\") > 0)\n {\n $this->Line($x+$w, $y, $x+$w, $y+$h);\n }\n \n \n // Print the text\n $this->MultiCell($w, $current_col[$b]['height'], $current_col[$b]['text'], 0, $a, 0);\n \n // Put the position to the right of the cell\n $this->SetXY($x+$w, $y); \n }\n \n // Go to the next line\n $this->Ln($h); \n } \n }", "function as_table() \n {\n #$str = \"<table> \\n\";\n $str = \"\";\n foreach(get_object_vars($this) as $name => $obj) \n {\n if ($obj != NULL) \n {\n $str .= \"<tr>\\n\\t<td>\".$obj->label().\"</td>\\n\\t\";\n $str .= \"<td>\".$obj.\"</td>\\n</tr>\\n\";\n }\n }\n #$str .= \"</table>\\n\";\n return $str;\n }", "function format($form_name, $form_action, $form_method, $table_name, $column_key, $state, $default_value, $label);", "protected function RenderHTML()\n\t{\n\t $dispmode = $this->GetDisplayMode();\n\t $this->SetDisplayMode($dispmode->GetMode());\n\n $smarty = BizSystem::GetSmartyTemplate();\n $smarty->assign_by_ref(\"name\", $this->m_Name);\n $smarty->assign_by_ref(\"title\", $this->m_Title);\n $smarty->assign_by_ref(\"formstate\", $this->m_FormState);\n $smarty->assign_by_ref(\"toolbar\", $this->m_ToolBar->Render());\n\n if ($dispmode->m_DataFormat == \"array\") // if dataFormat is array, call array render function\n $smarty->assign_by_ref(\"fields\", $this->RenderArray());\n else if ($dispmode->m_DataFormat == \"table\") // if dataFormat is table, call table render function.\n {\n $smarty->assign_by_ref(\"table\", $this->RenderTable());\n $smarty->assign_by_ref(\"formobj\", $this);\n }\n else if ($dispmode->m_DataFormat == \"block\" && $dispmode->m_FormatStyle)\n $smarty->assign_by_ref(\"block\", $this->RenderFormattedTable());\n\n $smarty->assign_by_ref(\"navbar\", $this->m_NavBar->Render());\n\n\t return $smarty->fetch(BizSystem::GetTplFileWithPath($dispmode->m_TemplateFile, $this->m_Package))\n\t . \"\\n\" . $this->RenderShortcutKeys()\n\t . \"\\n\" . $this->RenderContextMenu();\n\t}", "function render_form_fields ( $opt_groups, $prefix, $name_attr = false ) {\n\n #$first_row = null;\n\t\t\t\t#$rowgroup_counter = false;\n $output = '';\n \n\t\t\t\tforeach ( $opt_groups as $group => $opt_fields ) {\n\n \t\t$output.= '<fieldset class=\"'.$group.'\"><legend>'. $opt_fields['label'] .'</legend><table class=\"form-table\">';\n\n\t\t foreach ( $opt_fields['fields'] as $id => $field ) {\n\n\t\t\t\t\t\t\t\t$formfield = '';\n\n\t\t\t\t\t\t\t\t// set name attribute\n\t\t\t\t\t\t\t\t$name\t=\t( $name_attr ) ? $name_attr.'['.$id.']' : $id ;\n\n\t\t\t\t\t\t\t\t// set id and css class\n\t\t\t\t\t\t\t\t$css_id = $prefix.$usage.$family.'_'.$id;\n\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$class = $prefix.$usage.$family.' '.$prefix.$usage.$id.' '.$prefix.$family.$id;\n\t\t\t\t\t\t\t\t$class = ( isset( $field['class'] ) ) ? $class.' '.$field['class'] : $class;\n\t\t\t\t\t\t\t\t$status = ( isset( $field['status'] ) ) ? ' '.$field['status'] : '';\n\n\t\t\t\t\t\t\t\t// pre-define if to use scope=\"rowgroup\" or tr without th\n\t\t\t\t\t\t\t\t#$rowgroup_counter = ( $rowgroup_counter >= 0 ) ? $rowgroup_counter : false ;\n\n\n/*\n\t\t\t\t\t\t\t\tif ( $field['type'] == 'rowgroup' ) {\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t $output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\"><th scope=\"rowgroup\" rowspan=\"'.$field['rows'].'\">'.$field['label'].'</th>';\n\t\t\t\t $rowgroup_counter = $field['rows'];\n\t\t\t\t $first_row = true;\n\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// go on and do not add another tr\n\t\t\t\t\t\t\t\t\t\tif ( isset( $first_row ) ) {\n\t\t unset( $first_row );\n\t\t //\n\t\t\t\t\t\t\t\t\t\t} elseif ( $rowgroup_counter === null || $rowgroup_counter === false ) {\n\t\t\t\t \t\t\t\t\t\t\t\t$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\"><th><label for=\"'.$css_id.'\">'.$field['label'].'</label></th>';\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t \t\t\t\t\t\t\t\t$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\">';\n\t\t\t\t\t\t\t\t }\n*/\n\t\t\t\t \t\t\t\t\t\t$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\"><th><label for=\"'.$css_id.'\">'.$field['label'].'</label></th>';\n\t\t\t\t\t\t\t\t\t\t#$output .= '<tr class=\"'.$css_id.' '.$prefix.$id.$status.'\">';\n\t\t\t\t\t\t $output .= '<td class=\"'.$field['type'].'\">';\n\n\t\t\t\t\t\t switch( $field['type'] ) {\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"text\" name=\"'.$name.'\" id=\"'.$css_id.'\" value=\"'.$field['value'].'\" class=\"'.$class.'\"/>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"checkbox\" name=\"'.$name.'\" id=\"'.$css_id.'\" value=\"1\" '. checked( $field['value'], 1, false ) .' class=\"'.$class.'\"/>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'select':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<select name=\"'.$name.'\" id=\"'.$css_id.'\" class=\"'.$class.'\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $k => $v ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<option'. selected( $field['value'], $k, false ) .' value=\"'.$k.'\">'.$v.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '</select>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $k => $v ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"radio\" name=\"'.$name.'\" id=\"'.$css_id.'-'.$k.'\" value=\"'.$k.'\" '. checked( $field['value'], $k, false ) .' class=\"'.$id.'-'.$k.'\" />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<label for=\"'.$css_id.'-'.$k.'\" class=\"'.$id.' '.$id.'-'.$k.'\">'.$v.'</label>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'upload':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input type=\"text\" name=\"'.$name.'\" id=\"'.$css_id.'\" value=\"'.$field['value'].'\" class=\"'.$class.'\"/>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<input id=\"'.$css_id.'-upload\" class=\"wp-cmm_call-wp-mediamanagement\" type=\"button\" value=\"'.__( 'Upload' ).'\">';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n/*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'multipleselect':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<select name=\"'.$name.'[]\" id=\"'.$css_id.'\" class=\"'.$class.'\" multiple>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $value => $label ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t$selected = ( in_array( $value, $field['value'] ) ) ? ' selected' : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<option'. $selected .' value=\"'.$value.'\">'.$label.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '</select>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n*/\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcase 'terms_checklist':\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<ul id=\"'.$css_id.'\" class=\"categorychecklist form-no-clear '.$class.'\" >';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($field['options'] as $value => $label ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t$checked = ( in_array( $value, $field['value'] ) ) ? ' checked' : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<li><label for=\"'.$css_id.'-'.$value.'\"><input'.$checked.' type=\"checkbox\" name=\"'.$name.'['.$value.']\" id=\"'.$css_id.'-'.$value.'\" value=\"1\" />'.$label.'</label></li>';\n#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '<li><label for=\"'.$css_id.'-'.$value.'\"><input'.$checked.' type=\"checkbox\" name=\"'.$name.'\" id=\"'.$css_id.'-'.$value.'\" value=\"'.$value.'\" />'.$label.'</label></li>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$formfield .= '</ul>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t } //end switch\n\n/*\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif ( $rowgroup_counter !== false && $rowgroup_counter !== null && $field['label'] ) {\n\t\t\t\t \t\t\t\t\t\t\t\t$output .= '<label for=\"'.$css_id.'\">'.$formfield.$field['label'].'</label>';\n\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t\t\t$output .= $formfield;\n\t\t\t\t\t\t\t\t\t\t}\n*/\n\t\t\t\t\t\t\t\t\t\t\t\t$output .= $formfield;\n\t\t\t\t \t\t\t\t\t#\t$output .= '<label for=\"'.$css_id.'\">'.$formfield.$field['label'].'</label>';\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif ( $field['desc'] ){\n\t\t\t\t\t\t\t\t\t\t\t\t$output .= '<span class=\"howto\">'.$field['desc'].'</span>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t $output .= \"</td></tr>\\n\\n\";\n\t\t\t\t #}\n\n\t\t\t\t\t\t\t\t#$rowgroup_counter--;\n\n\n\t\t } // end foreach $opt_fields\n\t\t \n\t\t $output.= '</table></fieldset>';\n\t\t \n\t\t } // end foreach $opt_groups\n\t\t \n\t\t\t\techo $output;\n\t\t}", "private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}", "public function render($format = null){\n\t\tif($format !== null)\n\t\t\tcall_user_func_array(array($this, 'setFormat'), func_get_args());\n\n\t\tif(!is_array($this->align)){\n\t\t\t$align = array();\n\t\t\tforeach(array_keys($this->header) as $key)\n\t\t\t\t$align[$key] = $this->align;\n\t\t\t$this->align = $align;\n\t\t}\n\n\t\t// Compute length of columns\n\t\t$this->setColumnLength($this->header, false);\n\t\tforeach($this->rows as $row)\n\t\t\t$this->setColumnLength($row);\n\n\t\t// Render\n\t\tif($this->header)\n\t\t\t$this->renderHeader();\n\n\t\tforeach($this->rows as $row)\n\t\t\t$this->renderRow($row);\n\n\t\treturn $this;\n\t}", "public function drawTable()\n {\n echo \"<table border='1'>\";\n for ($i = 0; $i < $this->m; $i++) {\n echo \"<tr>\";\n for ($j = 0; $j < $this->n; $j++) {\n if ($this->isInSolution($i, $j, $this->matrix)) {\n echo \"<td bgcolor='#9acd32'>\";\n } else {\n echo \"<td>\";\n }\n echo $this->matrix[$i][$j];\n echo \"</td>\";\n }\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "public function output($options = []) {\r\n\t\t$options = array_merge([\r\n\t\t\t'form' => $this->hasForm,\r\n\t\t], $options);\r\n\t\t\r\n\t\t$this->currentTableId++;\r\n\t\t\r\n\t\tif (!is_array($options)) {\r\n\t\t\t$options = [$options => true];\r\n\t\t}\r\n\t\t\r\n\t\t$isEmpty = empty($this->rows);\r\n\t\t\r\n\t\t$output = '';\r\n\t\t$after = '';\r\n\t\t\r\n\t\tif (!$this->hasHeader) {\r\n\t\t\t$this->headers = null;\r\n\t\t}\r\n\t\tif (!$isEmpty && !empty($this->checkboxCount)) {\r\n\t\t\tif (!empty($options['withChecked'])) {\r\n\t\t\t\tif (!isset($options['form'])) {\r\n\t\t\t\t\t$options['form'] = true;\r\n\t\t\t\t}\r\n\t\t\t\t$after .= $this->withChecked($options['withChecked']);\r\n\t\t\t\tunset($options['withChecked']);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Wraps it in a form tag\r\n\t\t\tif (!isset($options['form'])) {\r\n\t\t\t\t$options['form'] = $this->hasForm;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$formOptions = !empty($options['form']) ? $options['form'] : null;\r\n\t\tunset($options['form']);\r\n\r\n\t\t$output .= $this->_table($this->headers, $this->rows, $options + compact('after'));\r\n\r\n\t\tif (!empty($formOptions)) {\r\n\t\t\t$output = $this->formWrap($output, $formOptions);\r\n\t\t}\r\n\t\t\r\n\t\t$this->reset();\r\n\t\treturn $output;\r\n\t}", "private function displayTableData($table, $format = \"html\") {\n\t\t$db = new mysql_db();\n\n\t\t$result = $db -> query(\"SELECT * FROM {$table}\");\n\n\t\tif ($db -> num_rows($result) == 0) {\n\t\t\theader(\"Content-Type:text/html\");\n\t\t\tprint \"No records found.\";\n\t\t} elseif ($format == \"xml\") {\n\t\t\theader(\"Content-Type:text/xml\");\n\t\t\t$xml = $db -> MYSQL2XML2($result, \"ThinkFunBrainLab\", $table);\n\t\t\tprint $xml;\n\t\t} elseif ($format == \"html\") {\n\t\t\theader(\"Content-Type:text/html\");\n\t\t\tprint \"<HTML>\\n\";\n\t\t\tprint \"<BODY>\\n\";\n\t\t\t$html = $db -> MYSQL2HTML($result, \"ThinkFunBrainLab\", $table);\n\t\t\tprint $html;\n\t\t\tprint \"</BODY>\\n\";\n\t\t\tprint \"</HTML>\\n\";\n\t\t}\n\n\t\t$db -> close_connection();\n\t}", "public static function getTabularFormats() {\n $result = self::getFormats();\n array_unshift($result, 'list');\n array_unshift($result, 'csv');\n array_unshift($result, 'table');\n return $result;\n }", "function get_table($table_format, $table_data, $meta = null)\n{\n\t$meta_defaults = [\n\t\t'alt_class' => 'alt',\n\t\t'caption' => '',\n\t\t'class' => 'datatable',\n\t\t'extra_html' => '',\n\t\t'init_sort_column' => null,\n\t\t'no_data' => 'There is no data',\n\t\t'sortable' => false,\n\t\t'totals' => false,\n\t];\n\n\t$opts = array_merge($meta_defaults, $meta);\n\n\tif ( ! is_array($table_data) || (0 == count($table_data))) {\n\t\treturn $opts['no_data'];\n\t}\n\n\t$opts['caption'] = ('' != $opts['caption']) ? '<caption>'.$opts['caption'].'</caption>' : '';\n\n\t// start building the header\n\t$headhtml = '\n\t\t\t<thead>\n\t\t\t<tr>';\n\n\t$total_cols = $sort_types = [];\n\tforeach ($table_format as $col) {\n\t\t// test for SPECIAL data first\n\t\tif ( ! is_array($col[TYPE]) && ('SPECIAL_' == substr($col[TYPE], 0, 8))) {\n\t\t\t${$col[TYPE]}[] = $col; // will be named either SPECIAL_CLASS or SPECIAL_HTML\n\t\t}\n\t\telse {\n\t\t\t$sort_types[] = (isset($col[SORT])) ? $col[SORT] : null;\n\n\t\t\tif ( ! is_array($col[HEADER])) {\n\t\t\t\t$headhtml .= '\n\t\t\t\t<th>'.$col[HEADER].'</th>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$headhtml .= '\n\t\t\t\t<th title=\"'.$col[HEADER][1].'\">'.$col[HEADER][0].'</th>';\n\t\t\t}\n\n\t\t\t// do some stuff for the totals row\n\t\t\tif ($opts['totals'] && isset($col[TOTAL])) {\n\t\t\t\tif ((false != $col[TOTAL]) && ('total' != strtolower($col[TOTAL]))) {\n\t\t\t\t\t// test if we have any [[[meta_vars]]]\n\t\t\t\t\t// and make a total entry for those matches if any VALID ones are found\n\t\t\t\t\t// if the code is eval'd, we'll do that when we put the total row on\n\t\t\t\t\tif (preg_match_all('/\\\\[\\\\[\\\\[(\\\\w+)\\\\]\\\\]\\\\]/i', $col[TOTAL], $matches, PREG_PATTERN_ORDER)) {\n\t\t\t\t\t\tforeach ($matches[1] as $match) {\n\t\t\t\t\t\t\tif (in_array($match, array_keys(reset($table_data))) && ! in_array($match, $total_cols)) {\n\t\t\t\t\t\t\t\t$total_cols[] = $match;\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\telse {\n\t\t\t\t\t\t$total_cols[] = $col[TOTAL];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t$total_cols = array_unique($total_cols);\n\n\t$headhtml .= '\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t';\n\n\t// start building the body\n\t$bodyhtml = '<tbody>\n\t\t\t';\n\n\t// start placing the data in the table\n\t$i = 0;\n\tforeach ($table_data as $rkey => $row) {\n\t\tif ( ! is_array($row)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// clear out previous data\n\t\t$classes = false;\n\n\t\t// run our special class code\n\t\t// this code adds a class (or not) to the table row based on field contents\n\t\tif (isset($SPECIAL_CLASS)) {\n\t\t\tforeach ($SPECIAL_CLASS as $SP_CLASS_USE) {\n\t\t\t\t$SP_CLASS_USE[CODE] = replace_meta($row, $SP_CLASS_USE[CODE]);\n\n#\t\t\t\tcall('$do_it = (bool) ('.$SP_CLASS_USE[CODE].');');\n\t\t\t\teval('$do_it = (bool) ('.$SP_CLASS_USE[CODE].');');\n\n\t\t\t\tif ($do_it && ! empty($SP_CLASS_USE[TRU])) {\n\t\t\t\t\t$classes[] = massage_data($row, $SP_CLASS_USE[TRU]);\n\t\t\t\t}\n\n\t\t\t\tif ( ! $do_it && ! empty($SP_CLASS_USE[FALS])) {\n\t\t\t\t\t$classes[] = massage_data($row, $SP_CLASS_USE[FALS]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// run our special html code\n\t\t// this code adds html (or not) to the table row based on field contents\n\t\t$spec_html = '';\n\t\tif (isset($SPECIAL_HTML)) {\n\t\t\tforeach ($SPECIAL_HTML as $SP_HTML_USE) {\n\t\t\t\tforeach ($SP_HTML_USE as $key => $col) {\n\t\t\t\t\t$SP_HTML_USE[$key] = replace_meta($row, $col);\n\t\t\t\t}\n\n#\t\t\t\tcall('$do_it = (bool) ('.$SP_HTML_USE[CODE].');');\n\t\t\t\teval('$do_it = (bool) ('.$SP_HTML_USE[CODE].');');\n\n\t\t\t\tif ($do_it && ! empty($SP_HTML_USE[TRU])) {\n\t\t\t\t\t$spec_html .= ' '.massage_data($row, $SP_HTML_USE[TRU]);\n\t\t\t\t}\n\n\t\t\t\tif ( ! $do_it && ! empty($SP_HTML_USE[FALS])) {\n\t\t\t\t\t$spec_html .= ' '.massage_data($row, $SP_HTML_USE[FALS]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (1 === ($i % 2) && ! empty($opts['alt_class'])) {\n\t\t\t$classes[] = $opts['alt_class'];\n\t\t}\n\n\t\t$class = (is_array($classes)) ? ' class=\"'.implode(' ', $classes).'\"' : '';\n\n\t\t$bodyhtml .= '<tr'.$class.$spec_html.'>';\n\n\t\t// don't just start outputting the data\n\t\t// output it in the order specified by the table_format\n\t\tforeach ($table_format as $ckey => $col) {\n\t\t\tif ( ! is_array($col)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! is_array($col[TYPE]) && ('SPECIAL_' == substr($col[TYPE], 0, 8))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$col[EXTRA] = (isset($col[EXTRA])) ? ' '.trim($col[EXTRA]) : '';\n\n\t\t\t$bodyhtml .= '\n\t\t\t\t<td'.$col[EXTRA].'>';\n\t\t\tif (is_null($col[FIELD])) {\n\t\t\t\t// we don't want to show anything in this column\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\telseif (isset($row[$col[FIELD]])) {\n\t\t\t\t// we have normal data\n\t\t\t\t$bodyhtml .= $row[$col[FIELD]];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$bodyhtml .= massage_data($row, $col[FIELD]);\n\t\t\t}\n\n\t\t\t$bodyhtml .= '</td>';\n\t\t}\n\n\t\t// grab the totals\n\t\tif ($opts['totals'] && (0 != count($total_cols))) {\n\t\t\tforeach ($total_cols as $total_col) {\n\t\t\t\tif ('__total' == $total_col) {\n\t\t\t\t\t$totals[$total_col] = 'Total';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$totals[$total_col] += $row[$total_col];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$bodyhtml .= '\n\t\t\t</tr>';\n\n\t\t++$i;\n\t}\n\n\t$bodyhtml .= '\n\t\t\t</tbody>';\n\n\t// start building the footer\n\tif ($opts['totals'] && (0 != count($totals))) {\n\t\t$foothtml = '\n\t\t\t<tfoot>\n\t\t\t<tr>';\n\n\t\tforeach ($table_format as $ckey => $col) {\n\t\t\tif ( ! is_array($col)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ('SPECIAL_' == substr($col[TYPE], 0, 8)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$foothtml .= '\n\t\t\t\t<td>';\n\t\t\tif (is_null($col[TOTAL])) {\n\t\t\t\t$foothtml .= '--';\n\t\t\t}\n\t\t\telseif (isset($totals[$col[TOTAL]])) {\n\t\t\t\t// we have normal data\n\t\t\t\t$foothtml .= $totals[$col[TOTAL]];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$foothtml .= massage_data($totals, $col[TOTAL]);\n\t\t\t}\n\n\t\t\t$foothtml .= '</td>';\n\t\t}\n\n\t\t$foothtml .= '\n\t\t\t</tr>\n\t\t\t</tfoot>';\n\t}\n\telse {\n\t\t$foothtml = '';\n\t}\n\n\t// build the sortable script\n\tif ($opts['sortable']) {\n\t\t$table_id = get_table_id( );\n\t\t$opts['extra_html'] .= ' id=\"'.$table_id.'\"';\n\n\t\t$sort_script = get_sort_script($table_id, $sort_types, $opts['alt_class'], $opts['init_sort_column']);\n\t}\n\telse {\n\t\t$sort_script = '';\n\t}\n\n\t$html = '\n\t\t<table class=\"'.$opts['class'].'\" '.$opts['extra_html'].'>\n\t\t\t'.$opts['caption']\n\t\t\t.$headhtml\n\t\t\t.$foothtml\n\t\t\t.$bodyhtml.'\n\t\t</table>'\n\t\t.$sort_script;\n\n\treturn $html;\n}", "function build_form_table_begin($width='100%', $height='', $cellpadding=1, $cellspacing=1, $class='outer')\n{\n\t$text = $this->build_html_table_tag_begin($width, $height, $cellpadding, $cellspacing, $class);\n\treturn $text;\n}", "public function flush ($echo=true) {\n\n /* process if height, width and tdData is not empty */\n if (empty ($this->height) ||\n empty ($this->width) ||\n empty ($this->tdData) )\n return;\n\n $ret[] = '<table'. $this->tblAttr .'>';\n\n /* set header / <th> */\n $ret[] = '<thead'. $this->theadAttr .'>';\n if (! empty ($this->thData)) {\n $ret[] = '<tr'. $this->trthAttr .'>';\n\n for ($x=0; $x<$this->width; ++$x)\n $TH[] = '<th'. $this->thData[$x][1] .'>'. $this->thData[$x][0] .'</th>';\n\n $ret[] = implode($TH);\n $ret[] = '</tr>';\n }\n $ret[] = '</thead>';\n\n /* set body data, td tag. */\n $ret[] = '<tbody'. $this->tbodyAttr .'>';\n\n for ($x=0; $x<$this->height; ++$x) {\n $ret[] = '<tr'. $this->trtdAttr[$x] .'>';\n $TD = array();\n\n for($y=0; $y<$this->width; ++$y)\n $TD[] = '<td'. $this->tdData[$x][$y][1] .'>'. $this->tdData[$x][$y][0] .'</td>';\n\n $ret[] = implode ($TD);\n $ret[] = '</tr>';\n }\n $ret[] = '</tbody>';\n\n $ret[] = '</table>';\n\n if (! $echo)\n return implode ($ret);\n\n echo implode ($ret);\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "function FancyTable($header, $data)\n{\n $this->SetFillColor(255,0,0);\n $this->SetTextColor(255);\n $this->SetDrawColor(128,0,0);\n $this->SetLineWidth(.3);\n $this->SetFont('','B');\n // Header\n $w = array(40, 35, 40, 45);\n for($i=0;$i<count($header);$i++)\n $this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n $this->Ln();\n // Color and font restoration\n $this->SetFillColor(224,235,255);\n $this->SetTextColor(0);\n $this->SetFont('');\n // Data\n $fill = false;\n foreach($data as $row)\n {\n $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);\n $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);\n $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w),0,'','T');\n}", "public function getHTML()\n {\n $rowIDs = $this->rowID;\n $numberOfColumns = $this->tableColumns;\n $html = \"\";\n $rowCounter = 0;\n\n $html .= \"<table class='table'>\";\n\n if ($this->tableHead != null) {\n $html .= \"<tr>\";\n\n foreach ($this->tableHead as $head) {\n $html .= \"<th>$head</th>\";\n }\n $html .= \"</tr>\";\n }\n $html .= \"<tr>\";\n\n $i = 0;\n foreach ($this->tableData as $data) {\n if (($i) % $numberOfColumns == 0) {\n $html .= \"</tr><tr id='$rowIDs[$rowCounter]'>\";\n $rowCounter++;\n }\n//\n $html .= \"<td>$data</td>\";\n $i++;\n\n }\n $html .= \"</tr>\";\n\n $html .= \"</table>\";\n\n return $html;\n\n }", "function clsTable($aConfiguration=array())\r\n\t{\r\n\t\t$this->clearEvent_AddHeader();\r\n\t\t$this->clearEvent_AddHeaderRow();\r\n\t\t$this->clearEvent_AddHeaderRowCell();\r\n\t\t$this->clearEvent_AddBody();\r\n\t\t$this->clearEvent_AddBodyRow();\r\n\t\t$this->clearEvent_AddBodyRowCell();\r\n\t\t$this->clearEvent_AddFooter();\r\n\t\t$this->clearEvent_AddFooterRow();\r\n\t\t$this->clearEvent_AddFooterRowCell();\r\n\t\t\r\n\t\txajaxControlContainer::xajaxControlContainer('table', $aConfiguration);\r\n\r\n\t\t$this->sClass = '%block';\r\n\t}", "function _im_user_getmms_format() { \r\n\t$rows = _im_user_getmms(); \r\n $header = array(\"Code\", \"Description\");\r\n $output = '<div class =\"table-trans-replace\">';\r\n $output .= '<div id =\"table-second-save\">';\r\n $output .= theme('table', array('header' => $header, 'rows' => $rows, ));\r\n $output .= '</div></div>';\r\n return $output;\r\n}", "public function render()\n {\n $root =& XCube_Root::getSingleton();\n $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);\n\n $renderTarget =& $renderSystem->createRenderTarget('main');\n\n $renderTarget->setAttribute('legacy_module', 'legacy');\n $renderTarget->setTemplateName('legacy_xoopsform_tableform.html');\n $renderTarget->setAttribute('form', $this);\n\n $renderSystem->render($renderTarget);\n\n return $renderTarget->getResult();\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->total_gross->FormValue == $this->total_gross->CurrentValue && is_numeric(ew_StrToFloat($this->total_gross->CurrentValue)))\n\t\t\t$this->total_gross->CurrentValue = ew_StrToFloat($this->total_gross->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// row_id\n\n\t\t$this->row_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_date\n\t\t$this->auc_date->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_number\n\t\t$this->auc_number->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_place\n\t\t$this->auc_place->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// start_bid\n\t\t$this->start_bid->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// close_bid\n\t\t$this->close_bid->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_notes\n\t\t// total_sack\n\n\t\t$this->total_sack->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// total_netto\n\t\t$this->total_netto->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// total_gross\n\t\t$this->total_gross->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_status\n\t\t$this->auc_status->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// rate\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// auc_date\n\t\t$this->auc_date->ViewValue = $this->auc_date->CurrentValue;\n\t\t$this->auc_date->ViewValue = ew_FormatDateTime($this->auc_date->ViewValue, 7);\n\t\t$this->auc_date->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_date->ViewCustomAttributes = \"\";\n\n\t\t// auc_number\n\t\t$this->auc_number->ViewValue = $this->auc_number->CurrentValue;\n\t\t$this->auc_number->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_number->ViewCustomAttributes = \"\";\n\n\t\t// auc_place\n\t\t$this->auc_place->ViewValue = $this->auc_place->CurrentValue;\n\t\t$this->auc_place->ViewCustomAttributes = \"\";\n\n\t\t// start_bid\n\t\t$this->start_bid->ViewValue = $this->start_bid->CurrentValue;\n\t\t$this->start_bid->ViewValue = ew_FormatDateTime($this->start_bid->ViewValue, 11);\n\t\t$this->start_bid->CellCssStyle .= \"text-align: center;\";\n\t\t$this->start_bid->ViewCustomAttributes = \"\";\n\n\t\t// close_bid\n\t\t$this->close_bid->ViewValue = $this->close_bid->CurrentValue;\n\t\t$this->close_bid->ViewValue = ew_FormatDateTime($this->close_bid->ViewValue, 11);\n\t\t$this->close_bid->CellCssStyle .= \"text-align: center;\";\n\t\t$this->close_bid->ViewCustomAttributes = \"\";\n\n\t\t// auc_notes\n\t\t$this->auc_notes->ViewValue = $this->auc_notes->CurrentValue;\n\t\t$this->auc_notes->ViewCustomAttributes = \"\";\n\n\t\t// total_sack\n\t\t$this->total_sack->ViewValue = $this->total_sack->CurrentValue;\n\t\t$this->total_sack->ViewValue = ew_FormatNumber($this->total_sack->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_sack->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_sack->ViewCustomAttributes = \"\";\n\n\t\t// total_netto\n\t\t$this->total_netto->ViewValue = $this->total_netto->CurrentValue;\n\t\t$this->total_netto->ViewValue = ew_FormatNumber($this->total_netto->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_netto->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_netto->ViewCustomAttributes = \"\";\n\n\t\t// total_gross\n\t\t$this->total_gross->ViewValue = $this->total_gross->CurrentValue;\n\t\t$this->total_gross->ViewValue = ew_FormatNumber($this->total_gross->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_gross->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_gross->ViewCustomAttributes = \"\";\n\n\t\t// auc_status\n\t\tif (strval($this->auc_status->CurrentValue) <> \"\") {\n\t\t\t$this->auc_status->ViewValue = $this->auc_status->OptionCaption($this->auc_status->CurrentValue);\n\t\t} else {\n\t\t\t$this->auc_status->ViewValue = NULL;\n\t\t}\n\t\t$this->auc_status->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_status->ViewCustomAttributes = \"\";\n\n\t\t// rate\n\t\t$this->rate->ViewValue = $this->rate->CurrentValue;\n\t\t$this->rate->ViewCustomAttributes = \"\";\n\n\t\t\t// auc_number\n\t\t\t$this->auc_number->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_number->HrefValue = \"\";\n\t\t\t$this->auc_number->TooltipValue = \"\";\n\n\t\t\t// auc_place\n\t\t\t$this->auc_place->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_place->HrefValue = \"\";\n\t\t\t$this->auc_place->TooltipValue = \"\";\n\n\t\t\t// start_bid\n\t\t\t$this->start_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->start_bid->HrefValue = \"\";\n\t\t\t$this->start_bid->TooltipValue = \"\";\n\n\t\t\t// close_bid\n\t\t\t$this->close_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->close_bid->HrefValue = \"\";\n\t\t\t$this->close_bid->TooltipValue = \"\";\n\n\t\t\t// auc_notes\n\t\t\t$this->auc_notes->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_notes->HrefValue = \"\";\n\t\t\t$this->auc_notes->TooltipValue = \"\";\n\n\t\t\t// total_sack\n\t\t\t$this->total_sack->LinkCustomAttributes = \"\";\n\t\t\t$this->total_sack->HrefValue = \"\";\n\t\t\t$this->total_sack->TooltipValue = \"\";\n\n\t\t\t// total_gross\n\t\t\t$this->total_gross->LinkCustomAttributes = \"\";\n\t\t\t$this->total_gross->HrefValue = \"\";\n\t\t\t$this->total_gross->TooltipValue = \"\";\n\n\t\t\t// auc_status\n\t\t\t$this->auc_status->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_status->HrefValue = \"\";\n\t\t\t$this->auc_status->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function startTable($inlineStyle = NULL, $className = 'normalTable')\n {\n $style = '';\n if (is_array($inlineStyle)) {\n foreach ($inlineStyle as $key => $value)\n $style .= \"$key: $value;\";\n }\n $this->documentBuffer .= \"<table class=\\\"$className\\\" style=\\\"$style\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\\n\";\n \n $this->tableIsOpen = true;\n }", "public function flush() {\n if (empty($this->_row) or empty($this->_row['line']['normal'])) {\n // Nothing to print - each line has to have at least number\n $this->_row = array();\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n return;\n }\n $ci = 0;\n $ri = 1;\n echo '<tr class=\"r'.$ri.'\">';\n foreach ($this->_row as $key=>$field) {\n foreach ($field as $type=>$content) {\n if ($field[$type] !== '') {\n $field[$type] = '<span class=\"uu'.$type.'\">'.$field[$type].'</span>';\n } else {\n unset($field[$type]);\n }\n }\n echo '<td class=\"cell c'.$ci++.'\">';\n if (!empty($field)) {\n echo implode('<br />', $field);\n } else {\n echo '&nbsp;';\n }\n echo '</td>';\n }\n echo '</tr>';\n foreach ($this->columns as $col) {\n $this->_row[$col] = array('normal'=>'', 'info'=>'', 'warning'=>'', 'error'=>'');\n }\n }", "protected function generateTable(&$params)\n {\n $groupingField = array_search($params[\"grouping_fields\"][$params[\"grouping_level\"]],$params[\"fields\"]);\n $groupingLevel = $params[\"grouping_level\"];\n $accumulatedTotals = array();\n \n if(count($this->reportData) == 0) return;\n \n do\n {\n if($_POST[\"grouping_\".($params[\"grouping_level\"]+1).\"_newpage\"] == \"1\")\n {\n $params[\"report\"]->addPage($_POST[\"grouping_\".($params[\"grouping_level\"]+1).\"_newpage\"]);\n }\n\n $headingValue = $this->reportData[$this->reportDataIndex][$groupingField];\n $this->drawHeading($headingValue, $params);\n\n $totalsBox = new TableContent($params[\"headers\"],null);\n $totalsBox->style[\"totalsBox\"] = true;\n array_unshift($params[\"previous_headings\"], array($headingValue, $groupingField));\n $params[\"ignored_fields\"][] = $groupingField;\n\n if($params[\"grouping_fields\"][$groupingLevel + 1] == \"\")\n {\n $data = array();\n do\n {\n //if($t == 1000) die(); $t++;\n $continue = true;\n $row = $this->reportData[$this->reportDataIndex];\n //var_dump($row);\n\n @$data[] = array_values($row);\n\n $this->reportDataIndex++;\n\n foreach($params[\"previous_headings\"] as $heading)\n {\n if($heading[0] != $this->reportData[$this->reportDataIndex][$heading[1]])\n {\n array_shift($params[\"previous_headings\"]);\n $continue = false;\n break;\n }\n }\n }while($continue);\n \n $totals = $this->drawTable($data, $params, $params[\"data_params\"], null, $headingValue);\n array_pop($params[\"ignored_fields\"]);\n }\n else\n {\n $params[\"grouping_level\"]++;\n $totals = $this->generateTable($params);\n array_shift($params[\"previous_headings\"]);\n $params[\"grouping_level\"]--;\n array_pop($params[\"ignored_fields\"]);\n }\n\n if($this->drawTotals && $totals != null)\n {\n $totalsBox->data_params = $this->dataParams;\n $totalsBox->data_params[\"widths\"] = $this->widths;\n $totals[0] = \"$headingValue\";\n $totalsBox->setData($totals);\n $params[\"report\"]->add($totalsBox);\n foreach($totals as $i => $total)\n {\n if($total === null) continue;\n $accumulatedTotals[$i] += $total;\n }\n }\n\n if($params[\"previous_headings\"][0][0] != $this->reportData[$this->reportDataIndex][$params[\"previous_headings\"][0][1]])\n {\n break;\n }\n\n }while($this->reportDataIndex < count($this->reportData));\n \n return $accumulatedTotals; \n }", "public function getTable()\r\n {\r\n $this->calculateColumnWidth();\r\n\r\n $output = $this->border ? $this->getBorderLine() : '';\r\n foreach ($this->data as $y => $row) {\r\n if ($row === self::HR) {\r\n if (!$this->allBorders) {\r\n $output .= $this->getBorderLine();\r\n unset($this->data[$y]);\r\n }\r\n\r\n continue;\r\n }\r\n\r\n foreach ($row as $x => $cell) {\r\n $output .= $this->getCellOutput($x, $row);\r\n }\r\n $output .= PHP_EOL;\r\n\r\n if ($y === self::HEADER_INDEX) {\r\n $output .= $this->getBorderLine();\r\n } else {\r\n if ($this->allBorders) {\r\n $output .= $this->getBorderLine();\r\n }\r\n }\r\n }\r\n\r\n if (!$this->allBorders) {\r\n $output .= $this->border ? $this->getBorderLine() : '';\r\n }\r\n\r\n if (PHP_SAPI !== 'cli') {\r\n $output = '<pre>' . $output . '</pre>';\r\n }\r\n\r\n return $output;\r\n }", "function toHtml()\n {\n require_once 'HTML/Table.php';\n $table = new HTML_Table(null, 0, true);\n $table->updateAttributes($this->getAttributes());\n\n $tbody = $table->getBody();\n $tbody->setAutoGrow(true);\n $tbody->setAutoFill('');\n\n $thead = $table->getHeader();\n $thead->setAutoGrow(true);\n $thead->setAutoFill('');\n \n $tfoot = $table->getFooter();\n $tfoot->setAutoGrow(true);\n $tfoot->setAutoFill('');\n \n if (isset($this->_footer) && is_array($this->_footer) && count($this->_footer)) {\n $footer = $this->_footer;\n } elseif (is_string($this->_footer)) {\n $last_column = array_pop(array_keys($this->_columnNames));\n $footer = array($last_column => $this->_footer);\n if (isset($this->_footerAttributes['@all'])) {\n if (isset($this->_footerAttributes[$last_column])) {\n $this->_footerAttributes[$last_column] = array_merge($this->_footerAttributes['@all'], $this->_footerAttributes[$last_column]);\n } else {\n $this->_footerAttributes[$last_column] = $this->_footerAttributes['@all'];\n }\n unset($this->_footerAttributes['@all']);\n }\n }\n\n $col = 0;\n if ($this->_columnNames) {\n foreach ($this->_columnNames as $key => $value) {\n $thead->setHeaderContents(0, $col, $value, $this->_columnAttributes[$key]);\n if (isset($footer)) {\n if (isset($footer[$key])) {\n $attributes = isset($this->_footerAttributes['@all']) ? $this->_footerAttributes['@all'] : array();\n if (isset($this->_footerAttributes[$key])) $attributes = array_merge($attributes, $this->_footerAttributes[$key]);\n if (isset($col_spanned)) {\n $tfoot->setCellContents(0, $col_spanned, $footer[$key]);\n $tfoot->setCellAttributes(0, $col_spanned, array_merge($attributes, array('colspan' => $key - $col_spanned + 1)));\n unset($col_spanned);\n } else {\n $tfoot->setCellContents(0, $col, $footer[$key]);\n if (!empty($attributes)) $tfoot->setCellAttributes(0, $col, $attributes);\n }\n } else {\n if (!isset($col_spanned)) $col_spanned = $key;\n }\n }\n ++$col;\n }\n }\n if (!empty($this->_rows)) {\n $row = 0;\n foreach (array_keys($this->_rows) as $key) {\n $col = 0;\n foreach (array_keys($this->_rows[$key]) as $key2) {\n $tbody->setCellContents($row, $col, $this->_rows[$key][$key2]->toHTML());\n $attributes = isset($this->_rowAttributes[$key]['@all']) ? $this->_rowAttributes[$key]['@all'] : array();\n if (isset($this->_rowAttributes[$key][$key2])) $attributes = array_merge($attributes, $this->_rowAttributes[$key][$key2]);\n if (!empty($attributes)) $tbody->setCellAttributes($row, $col, $attributes); \n ++$col;\n }\n if (isset($this->_rowAttributes[$key]['@row'])) $tbody->setRowAttributes($row, $this->_rowAttributes[$key]['@row'], true);\n ++$row;\n }\n } elseif (isset($this->_emptyText)) {\n $tbody->setCellContents(0, 0, $this->_emptyText);\n $tbody->setCellAttributes(0, 0, array('align' => 'center', 'colspan' => count($this->_columnNames)));\n }\n\n return $table->toHTML();\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "function outputFormat(array $headers, array $cells, $result, $content_name) {\necho '<h3>'.ucfirst($content_name).' Content</h3>';\necho '<table>';\nforeach ($headers as $val) {\necho '<th>'.$val.'</th>';\n}\nwhile($row = mysqli_fetch_array($result))\n {\n echo '<tr>';\n foreach ($cells as $val) {\n echo '<td>'.$row[$val].'</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }", "public static function htmlTable ($array, $tableHeadingSubstitutions = array (), $class = 'lines', $keyAsFirstColumn = true, $uppercaseHeadings = false, $allowHtml = false /* true/false/array(field1,field2,..) */, $showColons = false, $addCellClasses = false, $addRowKeyClasses = false, $onlyFields = array (), $compress = false, $showHeadings = true, $encodeEmailAddress = true)\r\n\t{\r\n\t\t# Check that the data is an array\r\n\t\tif (!is_array ($array)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not an array.</p>';}\r\n\t\t\r\n\t\t# Return nothing if no data\r\n\t\tif (empty ($array)) {return '';}\r\n\t\t\r\n\t\t# Assemble the data cells\r\n\t\t$dataHtml = '';\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\tif (!$value || !is_array ($value)) {return $html = \"\\n\" . '<p class=\"warning\">Error: the supplied data was not a multi-dimensional array.</p>';}\r\n\t\t\t$headings = $value;\r\n\t\t\t$dataHtml .= \"\\n\\t\" . '<tr' . ($addRowKeyClasses ? ' class=\"' . htmlspecialchars ($key) . '\"' : '') . '>';\r\n\t\t\tif ($keyAsFirstColumn) {\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($key) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$key])) ? ' ' . $addCellClasses[$key] : '') : '') . ($keyAsFirstColumn ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . \"<strong>{$key}</strong></td>\";\r\n\t\t\t}\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($value as $valueKey => $valueData) {\r\n\t\t\t\tif ($onlyFields && !in_array ($valueKey, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$i++;\r\n\t\t\t\t$data = $array[$key][$valueKey];\r\n\t\t\t\t$thisCellClass = ($addCellClasses ? htmlspecialchars ($valueKey) . ((is_array ($addCellClasses) && isSet ($addCellClasses[$valueKey])) ? ' ' . $addCellClasses[$valueKey] : '') : '') . ((($i == 1) && !$keyAsFirstColumn) ? ($addCellClasses ? ' ' : '') . 'key' : '');\r\n\t\t\t\t$htmlAllowed = (is_array ($allowHtml) ? (in_array ($valueKey, $allowHtml)) : $allowHtml);\t// Either true/false or an array of permitted fields where HTML is allowed\r\n\t\t\t\t$cellContents = ($htmlAllowed ? $data : htmlspecialchars ($data));\r\n\t\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\\t\") . (strlen ($thisCellClass) ? \"<td class=\\\"{$thisCellClass}\\\">\" : '<td>') . ($encodeEmailAddress ? self::encodeEmailAddress ($cellContents) : $cellContents) . (($showColons && ($i == 1) && $data) ? ':' : '') . '</td>';\r\n\t\t\t}\r\n\t\t\t$dataHtml .= ($compress ? '' : \"\\n\\t\") . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the heading HTML\r\n\t\t$headingHtml = '';\r\n\t\tif ($tableHeadingSubstitutions !== false) {\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '<tr>';\r\n\t\t\tif ($keyAsFirstColumn) {$headingHtml .= \"\\n\\t\\t\" . '<th></th>';}\r\n\t\t\t$columns = array_keys ($headings);\r\n\t\t\tforeach ($columns as $column) {\r\n\t\t\t\tif ($onlyFields && !in_array ($column, $onlyFields)) {continue;}\t// Skip if not in the list of onlyFields if that is supplied\r\n\t\t\t\t$columnTitle = (empty ($tableHeadingSubstitutions) ? $column : (isSet ($tableHeadingSubstitutions[$column]) ? $tableHeadingSubstitutions[$column] : $column));\r\n\t\t\t\t$headingHtml .= \"\\n\\t\\t\" . ($addCellClasses ? '<th class=\"' . $column . ((is_array ($addCellClasses) && isSet ($addCellClasses[$column])) ? ' ' . $addCellClasses[$column] : '') . '\">' : '<th>') . ($uppercaseHeadings ? ucfirst ($columnTitle) : $columnTitle) . '</th>';\r\n\t\t\t}\r\n\t\t\t$headingHtml .= \"\\n\\t\" . '</tr>';\r\n\t\t}\r\n\t\t\r\n\t\t# Construct the overall heading\r\n\t\t$html = \"\\n\\n\" . \"<table class=\\\"{$class}\\\">\";\r\n\t\tif ($showHeadings) {$html .= $headingHtml;}\r\n\t\t$html .= $dataHtml;\r\n\t\t$html .= \"\\n\" . '</table>';\r\n\t\t\r\n\t\t# Return the HTML\r\n\t\treturn $html;\r\n\t}", "function renderTableRows($headers, $rows, $rowType= 2)\r\n{\r\n\tglobal $isArchive;\r\n\r\n\t$tr= '';\r\n\tif (!count($rows))// In case there is no registered row at all\r\n\t{\r\n\t\t$rows= array($headers);\r\n\t\tif ($rowType== 2) return '';\r\n\t}\r\n\tif ($rowType== 3) $rows= array($rows[0]);// Keep only one row to get the template for the last hidden empty row (used for js clone())\r\n\tforeach ($rows as $numRow => $row)\r\n\t{\r\n\t\t$td= '';\r\n\t\t$profit= 0;// Percentage\r\n\t\t$devtu= 0;// Theoretical\r\n\t\t$devtu_f= 0;// Final\r\n\t\t$completion= 0;\r\n\r\n\t\tforeach ($row as $cellNum => $cell)\r\n\t\t{\r\n $tdClass= isset($headers[$cellNum]->class)? $headers[$cellNum]->class : '';\r\n\r\n $cell= $rowType== 3? '' : $cell;\r\n $width= isset($headers[$cellNum]->width)? ' style=\"width:'.$headers[$cellNum]->width.'\"' : '';\r\n\r\n $td.= \"<td class=\\\"{$headers[$cellNum]->type} $tdClass\\\" $width><div>\";\r\n\r\n\t\t\tif ($tdClass== 'tasks') $td.= renderTaskCell($cell);\r\n\t\t\telse switch ($headers[$cellNum]->type)\r\n\t\t\t{\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\t$td.= '<input type=\"text\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'range':\r\n\t\t\t\t\t$val= $rowType== 3? '' : (int)$cell;\r\n\t\t\t\t\t$text= $rowType== 3? '-' : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"range\" value=\"'.$val.'\" min=\"'.$headers[$cellNum]->range->min.'\" max=\"'.$headers[$cellNum]->range->max.'\" step=\"'.$headers[$cellNum]->range->step.'\"/><span>'.$text.'</span>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\t$td.= '<input type=\"number\" min=\"'.$headers[$cellNum]->number->min.'\" value=\"'.$cell.'\" step=\"'.$headers[$cellNum]->number->step.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\t$cell= !$cell && $headers[$cellNum]->default== 'today'? date('Y-m-d') : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"date\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'textarea':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$td.= \"<textarea>$cell</textarea>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\t$options= $headers[$cellNum]->select->options;\r\n\t\t\t\t\t$select= '';\r\n\t\t\t\t\tforeach ($options as $val => $opt)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$select.= '<option value=\"'.$val.'\"'.($cell==$val? ' selected=\"selected\"' : '').'>'.$opt.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$td.= \"<select>$select</select>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$td.= '</div></td>';\r\n\r\n\t\t\tif ($tdClass== 'devtu') $devtu= floatval($cell);\r\n\t\t\tif ($tdClass== 'devtu_f') $devtu_f= floatval($cell);\r\n\t\t\telseif ($tdClass== 'completion') $completion= intval($cell);\r\n\r\n\t\t}\r\n\r\n\t\tif ($completion== 100 && $devtu && $devtu_f) $profit= round((1-$devtu_f/$devtu)*100);\r\n\r\n\t\t$tr.= \"<tr>\r\n\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\".($profit? ' profit i-tag' : '').\"\\\" data-profit=\\\"\".($profit> 0 ? '+'.$profit : $profit).\"%\\\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"/></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t$td\r\n\t\t\t\t</tr>\";\r\n\t}\r\n\tif ($rowType== 3) $tr.= \"<tr class=\\\"hidden\\\">\r\n\t\t\t\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\\\">\r\n\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"></button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t$td\r\n\t\t\t\t\t\t\t</tr>\";\r\n\treturn $tr;\r\n}", "public function addTable($style = null) {\n\t\t$table = new PHPWord_Section_Table('section', $this->_sectionCount, $style);\n\t\t$this->_elementCollection[] = $table;\n\t\treturn $table;\n\t}", "function displayTable($filename)\r\n\t\t{\r\n\t\t\t$myTable = \"\\n<table border='1'>\";\r\n\r\n\t\t\t$myTable .= \"<tr>\";\r\n\t\t\t$myTable .= \" <th>Last name</th>\";\r\n\t\t\t$myTable .= \" <th>First name</th>\";\r\n\t\t\t$myTable .= \"</tr>\\n\\n\";\r\n\r\n\t\t\t$line_ctr = 0;\r\n\r\n\t\t\t$fp = fopen($filename, 'r');\r\n\t\t\tif ($fp){\r\n\t\t\t\twhile(true){\r\n\t\t\t\t\t$line = fgets($fp);\r\n\t\t\t\t\tif (feof($fp)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$line_ctr++;\r\n\r\n\t\t\t\t\t$line_ctr_remainder = $line_ctr % 2;\r\n\t\t\t\t\tif ($line_ctr_remainder == 0){\r\n\t\t\t\t\t\t$style = \"style='background-color: #ffc;'\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$style = \"style='background-color: #fff;'\";\r\n\t\t\t\t\t} // if for line_ctr_remainder\r\n\t\t\t\t\tlist($lastname, $firstname) = explode('|',$line);\r\n\r\n\t\t\t\t\t$myTable .=\"<tr $style>\";\r\n\t\t\t\t\t\t$myTable .=\"<td>\".$lastname.\"</td>\";\r\n\t\t\t\t\t\t$myTable .=\"<td>\".$firstname.\"</td>\";\r\n\t\t\t\t\t$myTable .=\"</tr> \\n\"; // add new line fot html formating\r\n\t\t\t\t} // end while\r\n\t\t\t\tfclose($fp);\r\n\t\t\t\t$myTable .= \"</table>\";\r\n\t\t\t\t$rtn = array($line_ctr, $myTable);\r\n\t\t\t} else {\r\n\t\t\t\t$rtn = array(\"No file\",\"Dummy\");\r\n\t\t\t}\r\n\t\t\treturn $rtn;\r\n\t\t}", "public function render($data){\n $html = \"<html><body><table border = 1>\";\n\t $html .= \"<tr>\";\n\t foreach($data[0] as $header){\n\t $html .=\"<th>\" .$header. \"</th>\";\n\t }\n\t $html .= \"</tr>\";\n\t for ($i=1;$i<count($data);$i++){\n\t $html .= \"<tr>\";\n\t foreach ($data[$i] as $row) {\n\t $html .= \"<td>\" .$row. \"</td>\";\n\t }\n\t $html .=\"</tr>\";\n\t }\n\t $html .=\"</table>\";\n\t return $html; \n }", "function FancyTable($data, $type, $sortby) {\r\n $this->SetFillColor(255, 0, 0);\r\n $this->SetTextColor(255);\r\n // $this->SetDrawColor(128, 0, 0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial', 'B', 14);\r\n\r\n // Color and font restoration\r\n $this->SetFillColor(220, 220, 220);\r\n $this->SetTextColor(0);\r\n $this->SetFont('');\r\n\r\n $w = $GLOBALS[\"width\"];\r\n $fill = false;\r\n\r\n $eId = $_GET[\"eId\"];\r\n if (isset($_GET[\"printall\"]))\r\n $printall = $_GET[\"printall\"];\r\n else\r\n $printall = 0;\r\n\r\n\r\n if ($eId == 999999 && $printall != 0) {\r\n for ($counter = 0; $counter < sizeof($data[1]); $counter++) {\r\n $row = $data[1][$counter];\r\n $this->SetFont('Arial', '', 14);\r\n $this->Cell($w[0], 9, number_format($row[\"school_id\"]), 'LR', 0, 'L', $fill);\r\n $this->Cell($w[1], 9, $row[\"school_name\"], 'LR', 0, 'L', $fill);\r\n $this->Cell($w[2], 9, number_format($row[\"marks_sum\"]), 'LR', 0, 'L', $fill);\r\n $this->Ln();\r\n $fill = !$fill;\r\n }\r\n } else {\r\n for ($counter = 0; $counter < sizeof($data[0]); $counter++) {\r\n $row = $data[0][$counter];\r\n $this->SetFont('Arial', '', 14);\r\n $this->Cell($w[0], 9, number_format($row[\"regn_number\"]), 'LR', 0, 'L', $fill);\r\n $this->Cell($w[1], 9, $row[\"name\"], 'LR', 0, 'L', $fill);\r\n $this->Cell($w[2], 9, $row[\"school_name\"], 'LR', 0, 'L', $fill);\r\n $this->Cell($w[3], 9, $row[\"event_name\"], 'LR', 0, 'L', $fill);\r\n $this->Cell($w[4], 9, number_format($row[\"position\"]), 'LR', 0, 'L', $fill);\r\n $this->Ln();\r\n $fill = !$fill;\r\n }\r\n }\r\n }", "public function displayTableData($table, $format=\"html\")\n\t{\n\t\t$db = new mysql_db();\n\n\t\t$result = $db->query(\"SELECT * FROM {$table}\");\n\t\t\n\t\tif($db->num_rows($result) == 0)\n\t\t{\n\t\t\theader (\"Content-Type:text/html\");\n\t\t\tprint \"No records found.\";\n\t\t}\n\t\telseif($format == \"xml\")\n\t\t{\n\t\t\theader (\"Content-Type:text/xml\");\n\t\t\t$xml = $db->MYSQL2XML2($result, \"ThinkFunProject\", $table);\n\t\t\tprint $xml;\n\t\t}\n\t\telseif($format == \"html\")\n\t\t{\n\t\t\theader (\"Content-Type:text/html\");\n\t\t\tprint \"<HTML>\\n\";\n\t\t\tprint \"<BODY>\\n\";\n\t\t\t\t$html = $db->MYSQL2HTML($result, \"ThinkFunProject\", $table);\n\t\t\t\tprint $html;\n\t\t\tprint \"</BODY>\\n\";\n\t\t\tprint \"</HTML>\\n\";\n\t\t}\n\t\t\n\t\t$db->close_connection();\n\t}", "public function renderTables(array &$form, $form_state, int $tables) {\n $tables_return = [];\n $form['fieldset'][$tables] = [\n '#type' => 'fieldset',\n '#title' => $this->t('Table № @number',\n ['@number' => $tables]),\n ];\n $form['fieldset'][$tables]['table'] = [\n '#type' => 'table',\n '#header' => ['Year', 'Jan', 'Feb', 'Mar', 'Q1', 'Apr', 'May', 'Jun',\n 'Q2', 'Jul', 'Aug', 'Sep', 'Q3', 'Oct', 'Nov', 'Dec', 'Q4', 'YTD',\n ],\n ];\n $form['fieldset'][$tables]['actions'] = [\n '#type' => 'actions',\n '#weight' => -1,\n ];\n $form['fieldset'][$tables]['actions']['add_year'] = [\n '#name' => \"add_year_$tables\",\n '#type' => 'submit',\n '#value' => $this->t('Add Year'),\n '#submit' => ['::addYear'],\n '#ajax' => [\n 'callback' => '::addmoreCallback',\n 'wrapper' => $this->getFormId(),\n 'effect' => 'slide',\n 'speed' => 600,\n ],\n ];\n return $tables_return;\n }", "function makeHTMLTable($array){\n\t\t // start table\n\t\t $html = '<table>';\n\t\t // header row\n\t\t $html .= '<tr>';\n\t\t // foreach($array[0] as $key=>$value){\n\t\t // $html .= '<th>' . htmlspecialchars($key) . '</th>';\n\t\t // }\n\t\t // $html .= '</tr>';\n\t\t // data rows\n\t\t foreach( $array as $key=>$value){\n\t\t $html .= '<tr>';\n\t\t foreach($value as $key2=>$value2){\n\t\t $html .= '<td>' . htmlspecialchars($value2) . '</td>';\n\t\t }\n\t\t $html .= '</tr>';\n\t\t }\n\t\t // finish table and return it\n\t\t $html .= '</table>';\n\t\t return $html;\n\t\t\t}", "public function renderComponentsToTable(): void\n {\n $language = $this->getDefaultLanguage();\n $this->table->setHeaders(['Name', 'Language', 'File']);\n foreach ($this->components as $component) {\n $this->table->addRow([$component->name, $language, $component->filename]);\n }\n\n $this->table->render();\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->netto->FormValue == $this->netto->CurrentValue && is_numeric(ew_StrToFloat($this->netto->CurrentValue)))\n\t\t\t$this->netto->CurrentValue = ew_StrToFloat($this->netto->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->gross->FormValue == $this->gross->CurrentValue && is_numeric(ew_StrToFloat($this->gross->CurrentValue)))\n\t\t\t$this->gross->CurrentValue = ew_StrToFloat($this->gross->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->open_bid->FormValue == $this->open_bid->CurrentValue && is_numeric(ew_StrToFloat($this->open_bid->CurrentValue)))\n\t\t\t$this->open_bid->CurrentValue = ew_StrToFloat($this->open_bid->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->bid_step->FormValue == $this->bid_step->CurrentValue && is_numeric(ew_StrToFloat($this->bid_step->CurrentValue)))\n\t\t\t$this->bid_step->CurrentValue = ew_StrToFloat($this->bid_step->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->rate->FormValue == $this->rate->CurrentValue && is_numeric(ew_StrToFloat($this->rate->CurrentValue)))\n\t\t\t$this->rate->CurrentValue = ew_StrToFloat($this->rate->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->proforma_amount->FormValue == $this->proforma_amount->CurrentValue && is_numeric(ew_StrToFloat($this->proforma_amount->CurrentValue)))\n\t\t\t$this->proforma_amount->CurrentValue = ew_StrToFloat($this->proforma_amount->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// row_id\n\t\t// master_id\n\t\t// lot_number\n\t\t// chop\n\t\t// estate\n\t\t// grade\n\t\t// jenis\n\t\t// sack\n\t\t// netto\n\t\t// gross\n\t\t// open_bid\n\t\t// currency\n\t\t// bid_step\n\t\t// rate\n\t\t// winner_id\n\t\t// sold_bid\n\t\t// proforma_number\n\t\t// proforma_amount\n\t\t// proforma_status\n\t\t// auction_status\n\t\t// enter_bid\n\t\t// last_bid\n\t\t// highest_bid\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// lot_number\n\t\t$this->lot_number->ViewValue = $this->lot_number->CurrentValue;\n\t\t$this->lot_number->ViewCustomAttributes = \"\";\n\n\t\t// chop\n\t\t$this->chop->ViewValue = $this->chop->CurrentValue;\n\t\t$this->chop->ViewCustomAttributes = \"\";\n\n\t\t// estate\n\t\t$this->estate->ViewValue = $this->estate->CurrentValue;\n\t\t$this->estate->ViewCustomAttributes = \"\";\n\n\t\t// grade\n\t\t$this->grade->ViewValue = $this->grade->CurrentValue;\n\t\t$this->grade->ViewCustomAttributes = \"\";\n\n\t\t// jenis\n\t\t$this->jenis->ViewValue = $this->jenis->CurrentValue;\n\t\t$this->jenis->ViewCustomAttributes = \"\";\n\n\t\t// sack\n\t\t$this->sack->ViewValue = $this->sack->CurrentValue;\n\t\t$this->sack->ViewValue = ew_FormatNumber($this->sack->ViewValue, 0, -2, -2, -2);\n\t\t$this->sack->ViewCustomAttributes = \"\";\n\n\t\t// netto\n\t\t$this->netto->ViewValue = $this->netto->CurrentValue;\n\t\t$this->netto->ViewValue = ew_FormatNumber($this->netto->ViewValue, 2, -2, -2, -2);\n\t\t$this->netto->ViewCustomAttributes = \"\";\n\n\t\t// gross\n\t\t$this->gross->ViewValue = $this->gross->CurrentValue;\n\t\t$this->gross->ViewValue = ew_FormatNumber($this->gross->ViewValue, 2, -2, -2, -2);\n\t\t$this->gross->ViewCustomAttributes = \"\";\n\n\t\t// open_bid\n\t\t$this->open_bid->ViewValue = $this->open_bid->CurrentValue;\n\t\t$this->open_bid->ViewValue = ew_FormatNumber($this->open_bid->ViewValue, 2, -2, -2, -2);\n\t\t$this->open_bid->CellCssStyle .= \"text-align: right;\";\n\t\t$this->open_bid->ViewCustomAttributes = \"\";\n\n\t\t// currency\n\t\tif (strval($this->currency->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id_cur`\" . ew_SearchString(\"=\", $this->currency->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `id_cur`, `currency` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_currency`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->currency->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->currency, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->currency->ViewValue = $this->currency->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->currency->ViewValue = $this->currency->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->currency->ViewValue = NULL;\n\t\t}\n\t\t$this->currency->ViewCustomAttributes = \"\";\n\n\t\t// bid_step\n\t\t$this->bid_step->ViewValue = $this->bid_step->CurrentValue;\n\t\t$this->bid_step->ViewCustomAttributes = \"\";\n\n\t\t// rate\n\t\t$this->rate->ViewValue = $this->rate->CurrentValue;\n\t\t$this->rate->ViewCustomAttributes = \"\";\n\n\t\t// winner_id\n\t\t$this->winner_id->ViewValue = $this->winner_id->CurrentValue;\n\t\t$this->winner_id->ViewCustomAttributes = \"\";\n\n\t\t// sold_bid\n\t\t$this->sold_bid->ViewValue = $this->sold_bid->CurrentValue;\n\t\t$this->sold_bid->ViewCustomAttributes = \"\";\n\n\t\t// proforma_number\n\t\t$this->proforma_number->ViewValue = $this->proforma_number->CurrentValue;\n\t\t$this->proforma_number->ViewCustomAttributes = \"\";\n\n\t\t// proforma_amount\n\t\t$this->proforma_amount->ViewValue = $this->proforma_amount->CurrentValue;\n\t\t$this->proforma_amount->ViewCustomAttributes = \"\";\n\n\t\t// proforma_status\n\t\tif (strval($this->proforma_status->CurrentValue) <> \"\") {\n\t\t\t$this->proforma_status->ViewValue = \"\";\n\t\t\t$arwrk = explode(\",\", strval($this->proforma_status->CurrentValue));\n\t\t\t$cnt = count($arwrk);\n\t\t\tfor ($ari = 0; $ari < $cnt; $ari++) {\n\t\t\t\t$this->proforma_status->ViewValue .= $this->proforma_status->OptionCaption(trim($arwrk[$ari]));\n\t\t\t\tif ($ari < $cnt-1) $this->proforma_status->ViewValue .= ew_ViewOptionSeparator($ari);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->proforma_status->ViewValue = NULL;\n\t\t}\n\t\t$this->proforma_status->ViewCustomAttributes = \"\";\n\n\t\t// auction_status\n\t\tif (strval($this->auction_status->CurrentValue) <> \"\") {\n\t\t\t$this->auction_status->ViewValue = $this->auction_status->OptionCaption($this->auction_status->CurrentValue);\n\t\t} else {\n\t\t\t$this->auction_status->ViewValue = NULL;\n\t\t}\n\t\t$this->auction_status->ViewCustomAttributes = \"\";\n\n\t\t// enter_bid\n\t\t$this->enter_bid->ViewValue = $this->enter_bid->CurrentValue;\n\t\t$this->enter_bid->ViewCustomAttributes = \"\";\n\n\t\t// last_bid\n\t\t$this->last_bid->ViewValue = $this->last_bid->CurrentValue;\n\t\t$this->last_bid->ViewCustomAttributes = \"\";\n\n\t\t// highest_bid\n\t\t$this->highest_bid->ViewValue = $this->highest_bid->CurrentValue;\n\t\t$this->highest_bid->ViewCustomAttributes = \"\";\n\n\t\t\t// lot_number\n\t\t\t$this->lot_number->LinkCustomAttributes = \"\";\n\t\t\t$this->lot_number->HrefValue = \"\";\n\t\t\t$this->lot_number->TooltipValue = \"\";\n\n\t\t\t// chop\n\t\t\t$this->chop->LinkCustomAttributes = \"\";\n\t\t\t$this->chop->HrefValue = \"\";\n\t\t\t$this->chop->TooltipValue = \"\";\n\n\t\t\t// estate\n\t\t\t$this->estate->LinkCustomAttributes = \"\";\n\t\t\t$this->estate->HrefValue = \"\";\n\t\t\t$this->estate->TooltipValue = \"\";\n\n\t\t\t// grade\n\t\t\t$this->grade->LinkCustomAttributes = \"\";\n\t\t\t$this->grade->HrefValue = \"\";\n\t\t\t$this->grade->TooltipValue = \"\";\n\n\t\t\t// jenis\n\t\t\t$this->jenis->LinkCustomAttributes = \"\";\n\t\t\t$this->jenis->HrefValue = \"\";\n\t\t\t$this->jenis->TooltipValue = \"\";\n\n\t\t\t// sack\n\t\t\t$this->sack->LinkCustomAttributes = \"\";\n\t\t\t$this->sack->HrefValue = \"\";\n\t\t\t$this->sack->TooltipValue = \"\";\n\n\t\t\t// netto\n\t\t\t$this->netto->LinkCustomAttributes = \"\";\n\t\t\t$this->netto->HrefValue = \"\";\n\t\t\t$this->netto->TooltipValue = \"\";\n\n\t\t\t// gross\n\t\t\t$this->gross->LinkCustomAttributes = \"\";\n\t\t\t$this->gross->HrefValue = \"\";\n\t\t\t$this->gross->TooltipValue = \"\";\n\n\t\t\t// open_bid\n\t\t\t$this->open_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->open_bid->HrefValue = \"\";\n\t\t\t$this->open_bid->TooltipValue = \"\";\n\n\t\t\t// currency\n\t\t\t$this->currency->LinkCustomAttributes = \"\";\n\t\t\t$this->currency->HrefValue = \"\";\n\t\t\t$this->currency->TooltipValue = \"\";\n\n\t\t\t// bid_step\n\t\t\t$this->bid_step->LinkCustomAttributes = \"\";\n\t\t\t$this->bid_step->HrefValue = \"\";\n\t\t\t$this->bid_step->TooltipValue = \"\";\n\n\t\t\t// rate\n\t\t\t$this->rate->LinkCustomAttributes = \"\";\n\t\t\t$this->rate->HrefValue = \"\";\n\t\t\t$this->rate->TooltipValue = \"\";\n\n\t\t\t// proforma_number\n\t\t\t$this->proforma_number->LinkCustomAttributes = \"\";\n\t\t\t$this->proforma_number->HrefValue = \"\";\n\t\t\t$this->proforma_number->TooltipValue = \"\";\n\n\t\t\t// proforma_amount\n\t\t\t$this->proforma_amount->LinkCustomAttributes = \"\";\n\t\t\t$this->proforma_amount->HrefValue = \"\";\n\t\t\t$this->proforma_amount->TooltipValue = \"\";\n\n\t\t\t// auction_status\n\t\t\t$this->auction_status->LinkCustomAttributes = \"\";\n\t\t\t$this->auction_status->HrefValue = \"\";\n\t\t\t$this->auction_status->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// lot_number\n\t\t\t$this->lot_number->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->lot_number->EditCustomAttributes = \"\";\n\t\t\t$this->lot_number->EditValue = ew_HtmlEncode($this->lot_number->CurrentValue);\n\t\t\t$this->lot_number->PlaceHolder = ew_RemoveHtml($this->lot_number->FldCaption());\n\n\t\t\t// chop\n\t\t\t$this->chop->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->chop->EditCustomAttributes = \"\";\n\t\t\t$this->chop->EditValue = ew_HtmlEncode($this->chop->CurrentValue);\n\t\t\t$this->chop->PlaceHolder = ew_RemoveHtml($this->chop->FldCaption());\n\n\t\t\t// estate\n\t\t\t$this->estate->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->estate->EditCustomAttributes = \"\";\n\t\t\t$this->estate->EditValue = ew_HtmlEncode($this->estate->CurrentValue);\n\t\t\t$this->estate->PlaceHolder = ew_RemoveHtml($this->estate->FldCaption());\n\n\t\t\t// grade\n\t\t\t$this->grade->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->grade->EditCustomAttributes = \"\";\n\t\t\t$this->grade->EditValue = ew_HtmlEncode($this->grade->CurrentValue);\n\t\t\t$this->grade->PlaceHolder = ew_RemoveHtml($this->grade->FldCaption());\n\n\t\t\t// jenis\n\t\t\t$this->jenis->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->jenis->EditCustomAttributes = \"\";\n\t\t\t$this->jenis->EditValue = ew_HtmlEncode($this->jenis->CurrentValue);\n\t\t\t$this->jenis->PlaceHolder = ew_RemoveHtml($this->jenis->FldCaption());\n\n\t\t\t// sack\n\t\t\t$this->sack->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->sack->EditCustomAttributes = \"\";\n\t\t\t$this->sack->EditValue = ew_HtmlEncode($this->sack->CurrentValue);\n\t\t\t$this->sack->PlaceHolder = ew_RemoveHtml($this->sack->FldCaption());\n\n\t\t\t// netto\n\t\t\t$this->netto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->netto->EditCustomAttributes = \"\";\n\t\t\t$this->netto->EditValue = ew_HtmlEncode($this->netto->CurrentValue);\n\t\t\t$this->netto->PlaceHolder = ew_RemoveHtml($this->netto->FldCaption());\n\t\t\tif (strval($this->netto->EditValue) <> \"\" && is_numeric($this->netto->EditValue)) $this->netto->EditValue = ew_FormatNumber($this->netto->EditValue, -2, -2, -2, -2);\n\n\t\t\t// gross\n\t\t\t$this->gross->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->gross->EditCustomAttributes = \"\";\n\t\t\t$this->gross->EditValue = ew_HtmlEncode($this->gross->CurrentValue);\n\t\t\t$this->gross->PlaceHolder = ew_RemoveHtml($this->gross->FldCaption());\n\t\t\tif (strval($this->gross->EditValue) <> \"\" && is_numeric($this->gross->EditValue)) $this->gross->EditValue = ew_FormatNumber($this->gross->EditValue, -2, -2, -2, -2);\n\n\t\t\t// open_bid\n\t\t\t$this->open_bid->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->open_bid->EditCustomAttributes = \"\";\n\t\t\t$this->open_bid->EditValue = ew_HtmlEncode($this->open_bid->CurrentValue);\n\t\t\t$this->open_bid->PlaceHolder = ew_RemoveHtml($this->open_bid->FldCaption());\n\t\t\tif (strval($this->open_bid->EditValue) <> \"\" && is_numeric($this->open_bid->EditValue)) $this->open_bid->EditValue = ew_FormatNumber($this->open_bid->EditValue, -2, -2, -2, -2);\n\n\t\t\t// currency\n\t\t\t$this->currency->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->currency->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id_cur`\" . ew_SearchString(\"=\", $this->currency->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id_cur`, `currency` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tbl_currency`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->currency->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->currency, $sWhereWrk); // Call Lookup Selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\n\t\t\t\t$this->currency->ViewValue = $this->currency->DisplayValue($arwrk);\n\t\t\t} else {\n\t\t\t\t$this->currency->ViewValue = $Language->Phrase(\"PleaseSelect\");\n\t\t\t}\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->currency->EditValue = $arwrk;\n\n\t\t\t// bid_step\n\t\t\t$this->bid_step->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->bid_step->EditCustomAttributes = \"\";\n\t\t\t$this->bid_step->EditValue = ew_HtmlEncode($this->bid_step->CurrentValue);\n\t\t\t$this->bid_step->PlaceHolder = ew_RemoveHtml($this->bid_step->FldCaption());\n\t\t\tif (strval($this->bid_step->EditValue) <> \"\" && is_numeric($this->bid_step->EditValue)) $this->bid_step->EditValue = ew_FormatNumber($this->bid_step->EditValue, -2, -1, -2, 0);\n\n\t\t\t// rate\n\t\t\t$this->rate->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->rate->EditCustomAttributes = \"\";\n\t\t\t$this->rate->EditValue = ew_HtmlEncode($this->rate->CurrentValue);\n\t\t\t$this->rate->PlaceHolder = ew_RemoveHtml($this->rate->FldCaption());\n\t\t\tif (strval($this->rate->EditValue) <> \"\" && is_numeric($this->rate->EditValue)) $this->rate->EditValue = ew_FormatNumber($this->rate->EditValue, -2, -1, -2, 0);\n\n\t\t\t// proforma_number\n\t\t\t$this->proforma_number->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->proforma_number->EditCustomAttributes = \"\";\n\t\t\t$this->proforma_number->EditValue = ew_HtmlEncode($this->proforma_number->CurrentValue);\n\t\t\t$this->proforma_number->PlaceHolder = ew_RemoveHtml($this->proforma_number->FldCaption());\n\n\t\t\t// proforma_amount\n\t\t\t$this->proforma_amount->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->proforma_amount->EditCustomAttributes = \"\";\n\t\t\t$this->proforma_amount->EditValue = ew_HtmlEncode($this->proforma_amount->CurrentValue);\n\t\t\t$this->proforma_amount->PlaceHolder = ew_RemoveHtml($this->proforma_amount->FldCaption());\n\t\t\tif (strval($this->proforma_amount->EditValue) <> \"\" && is_numeric($this->proforma_amount->EditValue)) $this->proforma_amount->EditValue = ew_FormatNumber($this->proforma_amount->EditValue, -2, -1, -2, 0);\n\n\t\t\t// auction_status\n\t\t\t$this->auction_status->EditCustomAttributes = \"\";\n\t\t\t$this->auction_status->EditValue = $this->auction_status->Options(TRUE);\n\n\t\t\t// Add refer script\n\t\t\t// lot_number\n\n\t\t\t$this->lot_number->LinkCustomAttributes = \"\";\n\t\t\t$this->lot_number->HrefValue = \"\";\n\n\t\t\t// chop\n\t\t\t$this->chop->LinkCustomAttributes = \"\";\n\t\t\t$this->chop->HrefValue = \"\";\n\n\t\t\t// estate\n\t\t\t$this->estate->LinkCustomAttributes = \"\";\n\t\t\t$this->estate->HrefValue = \"\";\n\n\t\t\t// grade\n\t\t\t$this->grade->LinkCustomAttributes = \"\";\n\t\t\t$this->grade->HrefValue = \"\";\n\n\t\t\t// jenis\n\t\t\t$this->jenis->LinkCustomAttributes = \"\";\n\t\t\t$this->jenis->HrefValue = \"\";\n\n\t\t\t// sack\n\t\t\t$this->sack->LinkCustomAttributes = \"\";\n\t\t\t$this->sack->HrefValue = \"\";\n\n\t\t\t// netto\n\t\t\t$this->netto->LinkCustomAttributes = \"\";\n\t\t\t$this->netto->HrefValue = \"\";\n\n\t\t\t// gross\n\t\t\t$this->gross->LinkCustomAttributes = \"\";\n\t\t\t$this->gross->HrefValue = \"\";\n\n\t\t\t// open_bid\n\t\t\t$this->open_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->open_bid->HrefValue = \"\";\n\n\t\t\t// currency\n\t\t\t$this->currency->LinkCustomAttributes = \"\";\n\t\t\t$this->currency->HrefValue = \"\";\n\n\t\t\t// bid_step\n\t\t\t$this->bid_step->LinkCustomAttributes = \"\";\n\t\t\t$this->bid_step->HrefValue = \"\";\n\n\t\t\t// rate\n\t\t\t$this->rate->LinkCustomAttributes = \"\";\n\t\t\t$this->rate->HrefValue = \"\";\n\n\t\t\t// proforma_number\n\t\t\t$this->proforma_number->LinkCustomAttributes = \"\";\n\t\t\t$this->proforma_number->HrefValue = \"\";\n\n\t\t\t// proforma_amount\n\t\t\t$this->proforma_amount->LinkCustomAttributes = \"\";\n\t\t\t$this->proforma_amount->HrefValue = \"\";\n\n\t\t\t// auction_status\n\t\t\t$this->auction_status->LinkCustomAttributes = \"\";\n\t\t\t$this->auction_status->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function setBorders(&$borderFormat, $left = true, $top = true, $right = true, $bottom = true) {\t \r\n\t\tif (empty($this->bordered)) {\t\t \r\n\t\t \t$this->bordered = new Bordered();\r\n\t\t}\r\n\t\t\r\n\t\t$this->bordered->setBorders($borderFormat, $left, $top, $right, $bottom);\r\n\t\t\r\n\t\tif ($top && $this->table->CheckIfCellExists($this->row - 1, $this->column)) {\t\t \r\n\t\t\t$cell = &$this->table->getCell($this->row - 1, $this->column); \r\n\t\t\t\r\n\t\t\tif (empty($cell->bordered)) {\t\t \r\n\t\t\t \t$cell->bordered = new Bordered();\r\n\t\t\t}\r\n\r\n\t\t\t$cell->bordered->setBorders($borderFormat, 0, 0, 0, 1); \t\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif ($bottom && $this->table->CheckIfCellExists($this->row + 1, $this->column)) {\t\t \r\n\t\t\t$cell = &$this->table->getCell($this->row + 1, $this->column); \r\n\t\t\t\r\n\t\t\tif (empty($cell->bordered)) {\t\t \r\n\t\t\t \t$cell->bordered = new Bordered();\r\n\t\t\t}\r\n\r\n\t\t\t$cell->bordered->setBorders($borderFormat, 0, 1, 0, 0); \t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ($left && $this->table->checkIfCellExists($this->row, $this->column - 1)) {\t\t \r\n\t\t\t$cell = &$this->table->getCell($this->row, $this->column - 1); \r\n\r\n\t\t\tif (empty($cell->bordered)) {\t\t \r\n\t\t\t \t$cell->bordered = new Bordered();\r\n\t\t\t}\r\n\r\n\t\t\t$cell->bordered->setBorders($borderFormat, 0, 0, 1, 0); \t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif ($right && $this->table->checkIfCellExists($this->row, $this->column + 1)) {\t\t \r\n\t\t\t$cell = &$this->table->getCell($this->row, $this->column + 1); \r\n\r\n\t\t\tif (empty($cell->bordered)) {\t\t \r\n\t\t\t \t$cell->bordered = new Bordered();\r\n\t\t\t}\r\n\r\n\t\t\t$cell->bordered->setBorders($borderFormat, 1, 0, 0, 0); \t\t\t\t\r\n\t\t}\r\n\t}", "private function prepare_table()\n {\n global $g_dirs;\n\n $l_dao = new isys_cmdb_dao($this->database);\n $l_quicky = new isys_ajax_handler_quick_info();\n\n $l_table = \"<table width=\\\"100%\\\" class=\\\"report_listing\\\">\";\n\n foreach ($this->m_its_arr as $l_obj_id => $l_title) {\n unset($this->m_obj_arr);\n $l_table .= \"<tr style=\\\"\\\"><td onclick=\\\"collapse_it_service('\" . $l_obj_id . \"')\\\" id=\\\"\" . $l_obj_id . \"\\\" class=\\\"report_listing\\\"><img id=\\\"\" . $l_obj_id .\n \"_plusminus\\\" src=\\\"\" . $g_dirs[\"images\"] . \"dtree/nolines_plus.gif\\\" class=\\\"vam\\\">\";\n\n $l_table .= $l_quicky->get_quick_info($l_obj_id, $l_dao->get_obj_name_by_id_as_string($l_obj_id), C__LINK__OBJECT);\n\n $l_table .= \"<img src=\\\"\" . $g_dirs[\"images\"] . \"ajax-loading.gif\\\" id=\\\"ajax_loading_view_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\" class=\\\"vam\\\" /></td></tr>\";\n\n $l_table .= \"<tr id=\\\"childs_\" . $l_obj_id . \"\\\" style=\\\"display:none;\\\"><td><div id=\\\"childs_content_\" . $l_obj_id . \"\\\"></div>\";\n $l_table .= \"</td></tr>\";\n }\n\n $l_table .= \"</table>\";\n\n return $l_table;\n }", "protected function openTable($name, $form_id=null, $form_class=null,\n $table_id=null, $table_class=null){\n $form_attribs = '';\n $table_attribs = '';\n if($form_class != null){$form_attribs .= ' class=\"' . $form_class . '\"';}\n if($form_id != null){$form_attribs .= ' id=\"' . $form_id . '\"';}\n if($table_class != null){$table_attribs .= ' class=\"' . $table_class . '\"';}\n if($table_id != null){$table_attribs .= ' id=\"' . $table_id . '\"';}\n\n \n $output ='\n <form name=\"' . $name . '\"' . $form_attribs . ' method=\"post\">\n <table class=\"table table-hover\"' . $table_attribs . '>';\n \n return $output;\n }", "public function render(SymfonyStyle $io, array $viewsData)\n\t{\n\t\tif(empty($viewsData)) {\n\t\t\t$io->writeln('n/a');\n\t\t\treturn;\n }\n\n\t\t\t\t$table = new Table($io);\n\t\t\t\t\n\t\t\t\tif($this->getHeader()) {\n\t\t\t\t\t$table->setHeaders($this->getHeader());\n\t\t\t\t}\n \n foreach($viewsData as $viewData) \n {\n $table->addRow(\n\t\t\t\t$this->formatRow($viewData)\n\t\t\t);\n }\n\n $table->render();\n\t}", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'centry_exit_log.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cdiscount.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "private function render_css(): void {\r\n echo JKNCSS::tag('\r\n tr .'.self::cl_dropdown.' {\r\n display: inline-table;\r\n height: 80px;\r\n }\r\n\r\n tr .'.self::cl_dropdown.' th {\r\n width: auto;\r\n max-width: 180px;\r\n height: 40px;\r\n vertical-align: middle;\r\n padding-left: 10px;\r\n }\r\n\r\n .form-table tr {\r\n border-bottom: 1px dashed;\r\n margin-top: 0;\r\n }\r\n \r\n .'.self::cl_intro.' {\r\n background: #fdfdfd;\r\n border: 1px dashed #ddd;\r\n margin-bottom: 5px;\r\n }\r\n\r\n .'.self::cl_p_report.' {\r\n padding: 10px;\r\n }\r\n\r\n .'.self::cl_p_report.' .button {\r\n margin: 0 3px 0 3px;\r\n vertical-align: middle;\r\n }\r\n\r\n .'.self::cl_p_report.' .button:first-child {\r\n margin-left: 0;\r\n }\r\n\r\n .'.self::cl_p_report.' tr {\r\n height: 50px;\r\n vertical-align: middle;\r\n }\r\n\r\n .'.self::cl_p_report.' select {\r\n margin-left: 10px;\r\n margin-right: 25px;\r\n vertical-align: middle;\r\n }\r\n \r\n a.disabled, a.disabled:hover {\r\n color: #222;\r\n cursor: wait;\r\n }\r\n \r\n .'.self::cl_lg_report_true.' {\r\n color: #21a847;\r\n }\r\n \r\n .'.self::cl_lg_report_false.' {\r\n color: #ad0f0f;\r\n }\r\n \r\n #'.self::id_main.' {\r\n background: #dedede;\r\n }\r\n\r\n .'.self::cl_p_report_table.' {\r\n background: #fefefe;\r\n width: 100%;\r\n padding-bottom: 10px;\r\n padding-top: 10px;\r\n border-bottom: 5px solid #dedede;\r\n }\r\n\r\n #'.self::id_main.' {\r\n padding: 5px;\r\n }\r\n\r\n .'.self::cl_p_report.' tr:nth-child(3) td,\r\n .'.self::cl_p_report.' tr:nth-child(4) td {\r\n border-top: 1px dashed #555;\r\n padding-top: 10px;\r\n }\r\n\r\n .'.self::cl_p_report.' tr:nth-child(3) td {\r\n padding-bottom: 10px;\r\n }\r\n\r\n\r\n #'.self::id_main.' table:first-child {\r\n padding-top: 0;\r\n }\r\n\r\n .'.self::cl_p_report_table.':last-child {\r\n border-bottom: none;\r\n }\r\n .'.self::cl_preload_note.' {\r\n display: inline-block;\r\n padding: 10px;\r\n vertical-align: middle;\r\n border-left: 1px solid #ddd;\r\n }\r\n\r\n #'.self::id_main.' tr:first-child {\r\n height: 30px;\r\n }\r\n\r\n #'.self::id_main.' tr:first-child td {\r\n padding-top: 0;\r\n padding-bottom: 0;\r\n height: 15px;\r\n }\r\n\r\n #'.self::id_main.' h2 {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n }\r\n ');\r\n }", "public function renderTable()\n {\n $get = new GetBag();\n\n $type = $get->fetchEscape('type', $this->db);\n\n /**\n * Column order.\n */\n $order = $get->fetch('order');\n $order = $order[0]['column'];\n switch ($order) {\n case 0:\n $order = 'id';\n break;\n case 1:\n $order = 'date';\n break;\n default:\n $order = 'id';\n }\n\n $direction = $get->fetch('order');\n $direction = $direction[0]['dir'];\n\n /**\n * Total.\n */\n $total = 0;\n $queryTotal = \"SELECT COUNT(*) as `count` FROM `film_review` WHERE `status` = '{$type}'\";\n $result = $this->db->query($queryTotal);\n if ($row = $result->fetch_assoc()) {\n $total = $row['count'];\n }\n\n /**\n * Page offset.\n */\n $length = $get->fetchInt('length');\n $offset = $get->fetchInt('start');\n\n $order = $this->db->real_escape_string($order);\n $direction = $this->db->real_escape_string($direction);\n\n $query = \"SELECT t1.`id`, t1.`status`, t1.`filmId`, t1.`userId`, t1.`name`, t1.`text`, t1.`date`, t2.`login` \n FROM `film_review` as `t1` LEFT JOIN `user` as `t2` ON t1.`userId` = t2.`id` WHERE t1.`status` = '{$type}'\";\n $query .= \" ORDER BY t1.`{$order}` {$direction} LIMIT {$offset}, {$length}\";\n\n $data = [];\n $result = $this->db->query($query);\n while ($row = $result->fetch_assoc()) {\n $login = $row['login'];\n if (empty($login)) {\n $login = $row['name'];\n }\n \n $item[0] = $row['id'];\n $item[1] = $this->formatDate($row['date'], true);\n $item[2] = $row['userId'];\n $item[3] = $row['text'];\n $item[4] = $row['filmId'];\n $item[5] = $login;\n\n $data[] = $item;\n }\n\n $data = [\n 'draw' => $get->fetchInt('draw'),\n 'recordsTotal' => $total,\n 'recordsFiltered' => $total,\n 'data' => $data\n ];\n\n return json_encode($data);\n }", "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->tarif->FormValue == $this->tarif->CurrentValue && is_numeric(ew_StrToFloat($this->tarif->CurrentValue)))\n\t\t\t$this->tarif->CurrentValue = ew_StrToFloat($this->tarif->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->bhp->FormValue == $this->bhp->CurrentValue && is_numeric(ew_StrToFloat($this->bhp->CurrentValue)))\n\t\t\t$this->bhp->CurrentValue = ew_StrToFloat($this->bhp->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\t\t// id_admission\n\t\t// nomr\n\t\t// statusbayar\n\t\t// kelas\n\t\t// tanggal\n\t\t// kode_tindakan\n\t\t// qty\n\t\t// tarif\n\t\t// bhp\n\t\t// user\n\t\t// nama_tindakan\n\t\t// kelompok_tindakan\n\t\t// kelompok1\n\t\t// kelompok2\n\t\t// kode_dokter\n\t\t// no_ruang\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// id_admission\n\t\t$this->id_admission->ViewValue = $this->id_admission->CurrentValue;\n\t\t$this->id_admission->ViewCustomAttributes = \"\";\n\n\t\t// nomr\n\t\t$this->nomr->ViewValue = $this->nomr->CurrentValue;\n\t\t$this->nomr->ViewCustomAttributes = \"\";\n\n\t\t// statusbayar\n\t\t$this->statusbayar->ViewValue = $this->statusbayar->CurrentValue;\n\t\t$this->statusbayar->ViewCustomAttributes = \"\";\n\n\t\t// kelas\n\t\t$this->kelas->ViewValue = $this->kelas->CurrentValue;\n\t\t$this->kelas->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewValue = ew_FormatDateTime($this->tanggal->ViewValue, 7);\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// kode_tindakan\n\t\tif (strval($this->kode_tindakan->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->kode_tindakan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama_tindakan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vw_bill_ranap_data_tarif_tindakan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->kode_tindakan->LookupFilters = array();\n\t\t$lookuptblfilter = \"`kelompok_tindakan`='5'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->kode_tindakan, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->kode_tindakan->ViewValue = $this->kode_tindakan->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->kode_tindakan->ViewValue = $this->kode_tindakan->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->kode_tindakan->ViewValue = NULL;\n\t\t}\n\t\t$this->kode_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// qty\n\t\t$this->qty->ViewValue = $this->qty->CurrentValue;\n\t\t$this->qty->ViewCustomAttributes = \"\";\n\n\t\t// tarif\n\t\t$this->tarif->ViewValue = $this->tarif->CurrentValue;\n\t\t$this->tarif->ViewCustomAttributes = \"\";\n\n\t\t// bhp\n\t\t$this->bhp->ViewValue = $this->bhp->CurrentValue;\n\t\t$this->bhp->ViewCustomAttributes = \"\";\n\n\t\t// user\n\t\t$this->user->ViewValue = $this->user->CurrentValue;\n\t\t$this->user->ViewCustomAttributes = \"\";\n\n\t\t// nama_tindakan\n\t\t$this->nama_tindakan->ViewValue = $this->nama_tindakan->CurrentValue;\n\t\t$this->nama_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// kelompok_tindakan\n\t\t$this->kelompok_tindakan->ViewValue = $this->kelompok_tindakan->CurrentValue;\n\t\t$this->kelompok_tindakan->ViewCustomAttributes = \"\";\n\n\t\t// kelompok1\n\t\t$this->kelompok1->ViewValue = $this->kelompok1->CurrentValue;\n\t\t$this->kelompok1->ViewCustomAttributes = \"\";\n\n\t\t// kelompok2\n\t\t$this->kelompok2->ViewValue = $this->kelompok2->CurrentValue;\n\t\t$this->kelompok2->ViewCustomAttributes = \"\";\n\n\t\t// kode_dokter\n\t\t$this->kode_dokter->ViewValue = $this->kode_dokter->CurrentValue;\n\t\t$this->kode_dokter->ViewCustomAttributes = \"\";\n\n\t\t// no_ruang\n\t\t$this->no_ruang->ViewValue = $this->no_ruang->CurrentValue;\n\t\t$this->no_ruang->ViewCustomAttributes = \"\";\n\n\t\t\t// id_admission\n\t\t\t$this->id_admission->LinkCustomAttributes = \"\";\n\t\t\t$this->id_admission->HrefValue = \"\";\n\t\t\t$this->id_admission->TooltipValue = \"\";\n\n\t\t\t// nomr\n\t\t\t$this->nomr->LinkCustomAttributes = \"\";\n\t\t\t$this->nomr->HrefValue = \"\";\n\t\t\t$this->nomr->TooltipValue = \"\";\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->LinkCustomAttributes = \"\";\n\t\t\t$this->statusbayar->HrefValue = \"\";\n\t\t\t$this->statusbayar->TooltipValue = \"\";\n\n\t\t\t// kelas\n\t\t\t$this->kelas->LinkCustomAttributes = \"\";\n\t\t\t$this->kelas->HrefValue = \"\";\n\t\t\t$this->kelas->TooltipValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\t\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_tindakan->HrefValue = \"\";\n\t\t\t$this->kode_tindakan->TooltipValue = \"\";\n\n\t\t\t// qty\n\t\t\t$this->qty->LinkCustomAttributes = \"\";\n\t\t\t$this->qty->HrefValue = \"\";\n\t\t\t$this->qty->TooltipValue = \"\";\n\n\t\t\t// tarif\n\t\t\t$this->tarif->LinkCustomAttributes = \"\";\n\t\t\t$this->tarif->HrefValue = \"\";\n\t\t\t$this->tarif->TooltipValue = \"\";\n\n\t\t\t// bhp\n\t\t\t$this->bhp->LinkCustomAttributes = \"\";\n\t\t\t$this->bhp->HrefValue = \"\";\n\t\t\t$this->bhp->TooltipValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\t\t\t$this->user->TooltipValue = \"\";\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->HrefValue = \"\";\n\t\t\t$this->nama_tindakan->TooltipValue = \"\";\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->HrefValue = \"\";\n\t\t\t$this->kelompok_tindakan->TooltipValue = \"\";\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok1->HrefValue = \"\";\n\t\t\t$this->kelompok1->TooltipValue = \"\";\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok2->HrefValue = \"\";\n\t\t\t$this->kelompok2->TooltipValue = \"\";\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->HrefValue = \"\";\n\t\t\t$this->kode_dokter->TooltipValue = \"\";\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->LinkCustomAttributes = \"\";\n\t\t\t$this->no_ruang->HrefValue = \"\";\n\t\t\t$this->no_ruang->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// id_admission\n\t\t\t$this->id_admission->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_admission->EditCustomAttributes = \"\";\n\t\t\tif ($this->id_admission->getSessionValue() <> \"\") {\n\t\t\t\t$this->id_admission->CurrentValue = $this->id_admission->getSessionValue();\n\t\t\t$this->id_admission->ViewValue = $this->id_admission->CurrentValue;\n\t\t\t$this->id_admission->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->id_admission->EditValue = ew_HtmlEncode($this->id_admission->CurrentValue);\n\t\t\t$this->id_admission->PlaceHolder = ew_RemoveHtml($this->id_admission->FldCaption());\n\t\t\t}\n\n\t\t\t// nomr\n\t\t\t$this->nomr->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nomr->EditCustomAttributes = \"\";\n\t\t\tif ($this->nomr->getSessionValue() <> \"\") {\n\t\t\t\t$this->nomr->CurrentValue = $this->nomr->getSessionValue();\n\t\t\t$this->nomr->ViewValue = $this->nomr->CurrentValue;\n\t\t\t$this->nomr->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->nomr->EditValue = ew_HtmlEncode($this->nomr->CurrentValue);\n\t\t\t$this->nomr->PlaceHolder = ew_RemoveHtml($this->nomr->FldCaption());\n\t\t\t}\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->statusbayar->EditCustomAttributes = \"\";\n\t\t\tif ($this->statusbayar->getSessionValue() <> \"\") {\n\t\t\t\t$this->statusbayar->CurrentValue = $this->statusbayar->getSessionValue();\n\t\t\t$this->statusbayar->ViewValue = $this->statusbayar->CurrentValue;\n\t\t\t$this->statusbayar->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->statusbayar->EditValue = ew_HtmlEncode($this->statusbayar->CurrentValue);\n\t\t\t$this->statusbayar->PlaceHolder = ew_RemoveHtml($this->statusbayar->FldCaption());\n\t\t\t}\n\n\t\t\t// kelas\n\t\t\t$this->kelas->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelas->EditCustomAttributes = \"\";\n\t\t\tif ($this->kelas->getSessionValue() <> \"\") {\n\t\t\t\t$this->kelas->CurrentValue = $this->kelas->getSessionValue();\n\t\t\t$this->kelas->ViewValue = $this->kelas->CurrentValue;\n\t\t\t$this->kelas->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$this->kelas->EditValue = ew_HtmlEncode($this->kelas->CurrentValue);\n\t\t\t$this->kelas->PlaceHolder = ew_RemoveHtml($this->kelas->FldCaption());\n\t\t\t}\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t\t$this->tanggal->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->tanggal->CurrentValue, 7));\n\t\t\t$this->tanggal->PlaceHolder = ew_RemoveHtml($this->tanggal->FldCaption());\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kode_tindakan->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->kode_tindakan->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->kode_tindakan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `kode`, `nama_tindakan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vw_bill_ranap_data_tarif_tindakan`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->kode_tindakan->LookupFilters = array();\n\t\t\t$lookuptblfilter = \"`kelompok_tindakan`='5'\";\n\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->kode_tindakan, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->kode_tindakan->EditValue = $arwrk;\n\n\t\t\t// qty\n\t\t\t$this->qty->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->qty->EditCustomAttributes = \"\";\n\t\t\t$this->qty->EditValue = ew_HtmlEncode($this->qty->CurrentValue);\n\t\t\t$this->qty->PlaceHolder = ew_RemoveHtml($this->qty->FldCaption());\n\n\t\t\t// tarif\n\t\t\t$this->tarif->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tarif->EditCustomAttributes = \"\";\n\t\t\t$this->tarif->EditValue = ew_HtmlEncode($this->tarif->CurrentValue);\n\t\t\t$this->tarif->PlaceHolder = ew_RemoveHtml($this->tarif->FldCaption());\n\t\t\tif (strval($this->tarif->EditValue) <> \"\" && is_numeric($this->tarif->EditValue)) $this->tarif->EditValue = ew_FormatNumber($this->tarif->EditValue, -2, -1, -2, 0);\n\n\t\t\t// bhp\n\t\t\t$this->bhp->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->bhp->EditCustomAttributes = \"\";\n\t\t\t$this->bhp->EditValue = ew_HtmlEncode($this->bhp->CurrentValue);\n\t\t\t$this->bhp->PlaceHolder = ew_RemoveHtml($this->bhp->FldCaption());\n\t\t\tif (strval($this->bhp->EditValue) <> \"\" && is_numeric($this->bhp->EditValue)) $this->bhp->EditValue = ew_FormatNumber($this->bhp->EditValue, -2, -1, -2, 0);\n\n\t\t\t// user\n\t\t\t$this->user->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->user->EditCustomAttributes = \"\";\n\t\t\t$this->user->EditValue = ew_HtmlEncode($this->user->CurrentValue);\n\t\t\t$this->user->PlaceHolder = ew_RemoveHtml($this->user->FldCaption());\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nama_tindakan->EditCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->EditValue = ew_HtmlEncode($this->nama_tindakan->CurrentValue);\n\t\t\t$this->nama_tindakan->PlaceHolder = ew_RemoveHtml($this->nama_tindakan->FldCaption());\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok_tindakan->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->EditValue = ew_HtmlEncode($this->kelompok_tindakan->CurrentValue);\n\t\t\t$this->kelompok_tindakan->PlaceHolder = ew_RemoveHtml($this->kelompok_tindakan->FldCaption());\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok1->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok1->EditValue = ew_HtmlEncode($this->kelompok1->CurrentValue);\n\t\t\t$this->kelompok1->PlaceHolder = ew_RemoveHtml($this->kelompok1->FldCaption());\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kelompok2->EditCustomAttributes = \"\";\n\t\t\t$this->kelompok2->EditValue = ew_HtmlEncode($this->kelompok2->CurrentValue);\n\t\t\t$this->kelompok2->PlaceHolder = ew_RemoveHtml($this->kelompok2->FldCaption());\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->kode_dokter->EditCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->EditValue = ew_HtmlEncode($this->kode_dokter->CurrentValue);\n\t\t\t$this->kode_dokter->PlaceHolder = ew_RemoveHtml($this->kode_dokter->FldCaption());\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->no_ruang->EditCustomAttributes = \"\";\n\t\t\t$this->no_ruang->EditValue = ew_HtmlEncode($this->no_ruang->CurrentValue);\n\t\t\t$this->no_ruang->PlaceHolder = ew_RemoveHtml($this->no_ruang->FldCaption());\n\n\t\t\t// Add refer script\n\t\t\t// id_admission\n\n\t\t\t$this->id_admission->LinkCustomAttributes = \"\";\n\t\t\t$this->id_admission->HrefValue = \"\";\n\n\t\t\t// nomr\n\t\t\t$this->nomr->LinkCustomAttributes = \"\";\n\t\t\t$this->nomr->HrefValue = \"\";\n\n\t\t\t// statusbayar\n\t\t\t$this->statusbayar->LinkCustomAttributes = \"\";\n\t\t\t$this->statusbayar->HrefValue = \"\";\n\n\t\t\t// kelas\n\t\t\t$this->kelas->LinkCustomAttributes = \"\";\n\t\t\t$this->kelas->HrefValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\n\t\t\t// kode_tindakan\n\t\t\t$this->kode_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_tindakan->HrefValue = \"\";\n\n\t\t\t// qty\n\t\t\t$this->qty->LinkCustomAttributes = \"\";\n\t\t\t$this->qty->HrefValue = \"\";\n\n\t\t\t// tarif\n\t\t\t$this->tarif->LinkCustomAttributes = \"\";\n\t\t\t$this->tarif->HrefValue = \"\";\n\n\t\t\t// bhp\n\t\t\t$this->bhp->LinkCustomAttributes = \"\";\n\t\t\t$this->bhp->HrefValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\n\t\t\t// nama_tindakan\n\t\t\t$this->nama_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->nama_tindakan->HrefValue = \"\";\n\n\t\t\t// kelompok_tindakan\n\t\t\t$this->kelompok_tindakan->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok_tindakan->HrefValue = \"\";\n\n\t\t\t// kelompok1\n\t\t\t$this->kelompok1->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok1->HrefValue = \"\";\n\n\t\t\t// kelompok2\n\t\t\t$this->kelompok2->LinkCustomAttributes = \"\";\n\t\t\t$this->kelompok2->HrefValue = \"\";\n\n\t\t\t// kode_dokter\n\t\t\t$this->kode_dokter->LinkCustomAttributes = \"\";\n\t\t\t$this->kode_dokter->HrefValue = \"\";\n\n\t\t\t// no_ruang\n\t\t\t$this->no_ruang->LinkCustomAttributes = \"\";\n\t\t\t$this->no_ruang->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "public function render($conf = [])\n {\n $controlTable = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(TableRenderer::class);\n $tableParams = isset($conf['tableParams.']) ? $this->cObj->stdWrap($conf['tableParams'], $conf['tableParams.']) : $conf['tableParams'];\n if ($tableParams) {\n $controlTable->tableParams = $tableParams;\n }\n // loads the pagecontent\n $conf['cWidth'] = isset($conf['cWidth.']) ? $this->cObj->stdWrap($conf['cWidth'], $conf['cWidth.']) : $conf['cWidth'];\n $controlTable->contentW = $conf['cWidth'];\n // loads the menues if any\n if (is_array($conf['c.'])) {\n $controlTable->content = $this->cObj->cObjGet($conf['c.'], 'c.');\n $contentTDParams = isset($conf['c.']['TDParams.']) ? $this->cObj->stdWrap($conf['c.']['TDParams'], $conf['c.']['TDParams.']) : $conf['c.']['TDParams'];\n $controlTable->contentTDparams = isset($contentTDParams) ? $contentTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['lm.'])) {\n $controlTable->lm = $this->cObj->cObjGet($conf['lm.'], 'lm.');\n $lmTDParams = isset($conf['lm.']['TDParams.']) ? $this->cObj->stdWrap($conf['lm.']['TDParams'], $conf['lm.']['TDParams.']) : $conf['lm.']['TDParams'];\n $controlTable->lmTDparams = isset($lmTDParams) ? $lmTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['tm.'])) {\n $controlTable->tm = $this->cObj->cObjGet($conf['tm.'], 'tm.');\n $tmTDParams = isset($conf['tm.']['TDParams.']) ? $this->cObj->stdWrap($conf['tm.']['TDParams'], $conf['tm.']['TDParams.']) : $conf['tm.']['TDParams'];\n $controlTable->tmTDparams = isset($tmTDParams) ? $tmTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['rm.'])) {\n $controlTable->rm = $this->cObj->cObjGet($conf['rm.'], 'rm.');\n $rmTDParams = isset($conf['rm.']['TDParams.']) ? $this->cObj->stdWrap($conf['rm.']['TDParams'], $conf['rm.']['TDParams.']) : $conf['rm.']['TDParams'];\n $controlTable->rmTDparams = isset($rmTDParams) ? $rmTDParams : 'valign=\"top\"';\n }\n if (is_array($conf['bm.'])) {\n $controlTable->bm = $this->cObj->cObjGet($conf['bm.'], 'bm.');\n $bmTDParams = isset($conf['bm.']['TDParams.']) ? $this->cObj->stdWrap($conf['bm.']['TDParams'], $conf['bm.']['TDParams.']) : $conf['bm.']['TDParams'];\n $controlTable->bmTDparams = isset($bmTDParams) ? $bmTDParams : 'valign=\"top\"';\n }\n $conf['offset'] = isset($conf['offset.']) ? $this->cObj->stdWrap($conf['offset'], $conf['offset.']) : $conf['offset'];\n $conf['cMargins'] = isset($conf['cMargins.']) ? $this->cObj->stdWrap($conf['cMargins'], $conf['cMargins.']) : $conf['cMargins'];\n $theValue = $controlTable->start($conf['offset'], $conf['cMargins']);\n if (isset($conf['stdWrap.'])) {\n $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);\n }\n return $theValue;\n }", "function DrawForm($scrow=true,$close_table=false) {\n\t\tif ($scrow) {\n\t\t\t$this->SaveCancelRow();\n\t\t}\n\n\t\tif ($close_table) {\n\t\t\t$this->form.=\"</table>\\n\";\n\t\t}\n\n\t\treturn $this->form;\n\t}", "protected function tableBodyHTML()\r\n\t{\r\n\t\tglobal $wpdb;\r\n\t\tglobal $WPGMZA_TABLE_NAME_CUSTOM_FIELDS;\r\n\t\t\r\n\t\t$fields = $wpdb->get_results(\"SELECT * FROM $WPGMZA_TABLE_NAME_CUSTOM_FIELDS\");\r\n\t\t\r\n\t\tforeach($fields as $obj)\r\n\t\t{\r\n\t\t\t?>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input readonly name=\"ids[]\" value=\"<?php echo $obj->id; ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input name=\"names[]\" value=\"<?php echo addslashes($obj->name); ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<input class=\"wpgmza-fontawesome-iconpicker\" name=\"icons[]\" value=\"<?php echo $obj->icon; ?>\"/>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->attributeTableHTML($obj);\r\n\t\t\t\t\t\r\n\t\t\t\t\t?>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$options = array(\r\n\t\t\t\t\t\t'none'\t\t\t=> 'None',\r\n\t\t\t\t\t\t'text'\t\t\t=> 'Text',\r\n\t\t\t\t\t\t'dropdown'\t\t=> 'Dropdown',\r\n\t\t\t\t\t\t'checkboxes'\t=> 'Checkboxes'\r\n\t\t\t\t\t);\r\n\t\t\t\t\t?>\r\n\t\t\t\t\r\n\t\t\t\t\t<select name=\"widget_types[]\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\tforeach($options as $value => $text)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<option value=\"<?php echo $value; ?>\"\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tif($obj->widget_type == $value)\r\n\t\t\t\t\t\t\t\techo ' selected=\"selected\"';\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<?php echo __($text, 'wp-google-maps'); ?>\r\n\t\t\t\t\t\t\t</option>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Use this filter to add options to the dropdown\r\n\t\t\t\t\t\t$custom_options = apply_filters('wpgmza_custom_fields_widget_type_options', $obj);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(is_string($custom_options))\r\n\t\t\t\t\t\t\techo $custom_options;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td>\r\n\t\t\t\t\t<button type='button' class='button wpgmza-delete-custom-field'><i class='fa fa-trash-o' aria-hidden='true'></i></button>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<?php\r\n\t\t}\r\n\t}", "protected function table(array $headers, array $rows, $table_style = 'default', array $column_styles = [])\n {\n $table = new Table($this->output);\n $table->setHeaders($headers)->setRows($rows)->setStyle($table_style);\n foreach ($column_styles as $col => $style) {\n $table->setColumnStyle($col, $style);\n }\n $table->render();\n }", "private function render_table($table_header, $table_content)\n\t{\n\t\t$table = new Table($this->output);\n\t\t$table->setHeaders($table_header)\n\t\t\t->setRows($table_content)\n\t\t\t->render();\n\n\t\t$this->output->writeln('');\n\t}", "public function renderstyle() {\r\n\t\t$aff = '<style>';\r\n\t\t$aff .= 'td.center {text-align:center;}';\r\n\t\t$aff .= '</style>';\r\n\r\n\t\treturn $aff;\r\n\t}", "public function renderstyle() {\r\n\t\t$aff = '<style>';\r\n\t\t$aff .= 'td.center {text-align:center;}';\r\n\t\t$aff .= '</style>';\r\n\r\n\t\treturn $aff;\r\n\t}", "function showDataTable(){\n\t\t$output = \"\";\n\t\t// print the table\n\t\t$output .= \"<table summary=\\\"\".$this->summary.\"\\\">\\n\";\n\t\t// print the caption\n\t\t$output .= \"<caption>\".$this->caption.\"</caption>\\n\";\n\t\t$output .= $this->showHeader();\n\t\t// initialise variables\n\t\t$altCounter = 0;\n\t\t$altClass = \"\";\n\t\t$h = 1;\n\t\t// loop each row\n\t\tfor ($x=0; $x<count($this->rows); $x++) {\n\t\t\t// if it is time to show the header\n\t\t\tif ($h==$this->headerRepeat){\n\t\t\t\t// show the header\n\t\t\t\t$output .= $this->showHeader();\n\t\t\t\t$h = 1;\n\t\t\t}\n\t\t\t$row = $this->rows[$x];\n\t\t\t// alternate the row classes\n\t\t\tif ($this->altClasses){\n\t\t\t\tif ($this->altClasses[$altCounter]!=\"\"){ $altClass = \" class=\\\"\".$this->altClasses[$altCounter].\"\\\"\"; } else { $altClass=\"\"; }\n\t\t\t\tif ($altCounter==count($this->altClasses)-1){ $altCounter=0; } else { $altCounter++; }\n\t\t\t}\n\t\t\t// set the parameters to nothing\n\t\t\t$params = \"\";\n\t\t\t// if there are parameters for this row set\n\t\t\tif (count($this->rowParams[$x])>0){\n\t\t\t\t// loop the parameters\n\t\t\t\twhile (list($attribute, $parameter) = each($this->rowParams[$x])) {\n\t\t\t\t\t// if the parameter is 'class'\n\t\t\t\t\tif (strtolower($attribute)==\"class\"){\n\t\t\t\t\t\t// replace the altClass variable\n\t\t\t\t\t\t$altClass = \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t// otherwise build the parameters\n\t\t\t\t\t\t$params .= \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// print the row\n\t\t\t$output .= \"\t<tr$altClass$params>\\n\";\n\t\t\t\t// set the colSpan to 0\n\t\t\t\t$colSpan = 0;\n\t\t\t\t$colSpanAttribute = \"\";\n\t\t\t\t// if this row has less columns than the number of fields\n\t\t\t\tif (count($row)<count($this->fields)){\n\t\t\t\t\t$colSpan = (count($this->fields)-count($row))+1;\n\t\t\t\t}\n\t\t\t\t// loop each cell\n\t\t\t\tfor ($i=0; $i<count($row); $i++) {\n\t\t\t\t\t$value = $row[$i];\n\t\t\t\t\t$value = $this->formatField($i, $x);\n\t\t\t\t\t// make the colspan attribute\n\t\t\t\t\tif ($colSpan>0 && $i==(count($row)-1)){ $colSpanAttribute = \" colspan=\\\"$colSpan\\\"\"; }\n\t\t\t\t\t// print the cell\n\t\t\t\t\t$output .= \"\t\t<td$colSpanAttribute>\".$value.\"</td>\\n\";\n\t\t\t\t}\n\t\t\t// end the row\n\t\t\t$output .= \"\t</tr>\\n\";\n\t\t\t// increment the header repeat variable\n\t\t\t$h++;\n\t\t}\n\t\t// end the table\n\t\t$output .= \"</table>\\n\\n\";\n\t\tprint $output;\n\t}", "public function getTableBody()\n {\n $weeks = $this->calendarMonth->getAllWeeks();\n $tableBody = \"<tbody>\";\n foreach ($weeks as $week) {\n $tableBody .= \"<tr>\";\n $tableBody .= '<td>' . $week->getWeekNumber() . '</td>';\n $tableBody .= $this->getTableRowDays($week);\n $tableBody .= \"</tr>\";\n }\n $tableBody .= \"</tbody>\";\n\n return $tableBody;\n }", "public function show_tablefields()\n {\n $table_name = JFactory::getApplication()->input->get('table_name');\n\n if( ! $table_name)\n {\n return;\n }\n\n $db = JFactory::getDBO();\n\n $table_name = $db->getPrefix().$table_name;\n $fields = $db->getTableColumns($table_name);\n\n if( ! count($fields) || ! count($fields[$table_name]))\n {\n JFactory::getApplication()->enqueueMessage(jgettext('No table fields found'), 'error');\n }\n\n ?>\n<table>\n <tr>\n <th colspan=\"2\"><?php echo jgettext('Include')?></th>\n <th><?php echo jgettext('Editable'); ?></th>\n <th><?php echo jgettext('Type'); ?></th>\n </tr>\n <?php\n foreach($fields[$table_name] as $key => $value)\n {\n switch($value)\n {\n case 'int':\n case 'tinyint':\n $def = '0';\n break;\n\n default:\n $def = 'NULL';\n break;\n }\n\n $javascript1 = \"$('tblfield_edit_\".$key.\"').disabled=(this.checked)?false:true;\";\n $javascript2 = \"$('tblfield_type_\".$key.\"').disabled=(this.checked && $('tblfield_edit_\"\n .$key.\"').checked)?false:true;\";\n\n $javascript = $javascript1.$javascript2;\n ?>\n <tr>\n <td><input type=\"checkbox\" onchange=\"<?php echo $javascript; ?>\"\n name=\"table_fields[]\" checked=\"checked\"\n id=\"tblfield_<?php echo $key; ?>\"\n value=\"<?php echo $key; ?>\">\n </td>\n <td><label for=\"tblfield_<?php echo $key; ?>\">\n <?php echo $key.'<br />('.$value.')'; ?>\n </label></td>\n <td><input type=\"checkbox\" onchange=\"<?php echo $javascript2; ?>\"\n name=\"table_fields_edits[]\" checked=\"checked\"\n id=\"tblfield_edit_<?php echo $key; ?>\"\n value=\"<?php echo $key; ?>\"></td>\n <td><select name=\"table_fields_types[<?php echo $key; ?>]\"\n id=\"tblfield_type_<?php echo $key; ?>\">\n <option>text</option>\n <option>text area</option>\n <option>radio bool</option>\n <option>html</option>\n </select></td>\n </tr>\n <?php\n }\n ?>\n</table>\n <?php\n }", "function makeForm($frm) {\r\n\t\tif(!empty($frm)) preg_replace('/\\s+/', ' ', $frm);\r\n\r\n \t$html=\"<table>\";\r\n\r\n\t foreach ($frm AS $row) {\r\n\t\t\t$html.=\"<tr><td>\".$row['title'].\"</td><td>\".$row['field'].\"</td></tr>\";\r\n\t\t}\r\n\r\n \t$html.=\"</table>\";\r\n\r\n\t return $html;\r\n\t}", "static function table($content, $arguments=false) {\n\t\t$last_group = '';\n\n\t\tif (is_array($content)) {\n\t\t\t//no empty tables\n\t\t\tif (!count($content)) return null;\n\n\t\t\t//build header & cache slugs\n\t\t\t$header = $columns = array();\n\t\t\t$keys = array_keys($content[0]);\n\t\t\tforeach ($keys as $key) {\n\t\t\t\tif (!str::starts($key, '_')) {\n\t\t\t\t\t$columns[$key] = str::sanitize($key);\n\t\t\t\t\t$header[] = self::th($key, $columns[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$colspan = count($header);\n\n\t\t\t//format rows\n\t\t\tforeach ($content as &$row) {\n\t\t\t\t$cells = array();\n\t\t\t\tforeach ($columns as $key=>$slug) $cells[] = self::td($row[$key], $slug);\n\t\t\t\t\n\t\t\t\t$row_args = array();\n\t\t\t\tif (!empty($row['_class'])) $row_args['class']\t= $row['_class'];\n\t\t\t\tif (!empty($row['_id']))\t$row_args['id'] \t= $row['_id'];\n\t\t\t\tif (!empty($row['_group']) && ($row['_group'] != $last_group)) {\n\t\t\t\t\t$last_group = $row['_group'];\n\t\t\t\t\t$row['_group'] = self::tr(self::td($row['_group'], array('colspan'=>$colspan)), 'group');\n\t\t\t\t} else {\n\t\t\t\t\t$row['_group'] = '';\n\t\t\t\t}\n\n\t\t\t\t$row = $row['_group'] . self::tr(implode($cells), $row_args);\n\t\t\t}\n\n\t\t\t//assemble output\n\t\t\t$content = self::thead(self::tr(implode($header))) . self::tbody(implode($content));\n\t\t}\n\n\t\treturn self::tag('table', $arguments, $content);\n\t}", "public function build($action = null) {\n\t\t$attributes = $this->get_config ( 'form_attributes' );\n\t\tif ($action and ($this->fieldset_tag == 'form' or empty ( $this->fieldset_tag ))) {\n\t\t\t$attributes ['action'] = $action;\n\t\t}\n\t\t\n\t\t$open = ($this->fieldset_tag == 'form' or empty ( $this->fieldset_tag )) ? $this->form ()->open ( $attributes ) . PHP_EOL : $this->form ()->{$this->fieldset_tag . '_open'} ( $attributes );\n\t\t\n\t\t$fields_output = '';\n\t\t\n\t\t// construct the tabular form table header\n\t\tif ($this->tabular_form_relation) {\n\t\t\t$properties = call_user_func ( $this->tabular_form_model . '::properties' );\n\t\t\t$primary_keys = call_user_func ( $this->tabular_form_model . '::primary_key' );\n\t\t\t$fields_output .= '<thead><tr>' . PHP_EOL;\n\t\t\tforeach ( $properties as $field => $settings ) {\n\t\t\t\tif ((isset ( $settings ['skip'] ) and $settings ['skip']) or in_array ( $field, $primary_keys )) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (isset ( $settings ['form'] ['type'] ) and ($settings ['form'] ['type'] === false or $settings ['form'] ['type'] === 'hidden')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$fields_output .= \"\\t\" . '<th class=\"' . $this->tabular_form_relation . '_col_' . $field . '\">' . (isset ( $settings ['label'] ) ? \\Lang::get ( $settings ['label'], array (), $settings ['label'] ) : '') . '</th>' . PHP_EOL;\n\t\t\t}\n\t\t\t$fields_output .= \"\\t\" . '<th>' . \\Config::get ( 'form.tabular_delete_label', 'Delete?' ) . '</th>' . PHP_EOL;\n\t\t\t\n\t\t\t$fields_output .= '</tr></thead>' . PHP_EOL;\n\t\t}\n\t\t\n\t\tforeach ( $this->field () as $f ) {\n\t\t\tin_array ( $f->name, $this->disabled ) or $fields_output .= $f->build () . PHP_EOL;\n\t\t}\n\t\t\n\t\t$close = ($this->fieldset_tag == 'form' or empty ( $this->fieldset_tag )) ? $this->form ()->close ( $attributes ) . PHP_EOL : $this->form ()->{$this->fieldset_tag . '_close'} ( $attributes );\n\t\t\n\t\t$template = $this->form ()->get_config ( (empty ( $this->fieldset_tag ) ? 'form' : $this->fieldset_tag) . '_template', \"\\n\\t\\t{open}\\n\\t\\t<table>\\n{fields}\\n\\t\\t</table>\\n\\t\\t{close}\\n\" );\n\t\t\n\t\t$template = str_replace ( array (\n\t\t\t\t'{form_open}',\n\t\t\t\t'{open}',\n\t\t\t\t'{fields}',\n\t\t\t\t'{form_close}',\n\t\t\t\t'{close}' \n\t\t), array (\n\t\t\t\t$open,\n\t\t\t\t$open,\n\t\t\t\t$fields_output,\n\t\t\t\t$close,\n\t\t\t\t$close \n\t\t), $template );\n\t\t\n\t\treturn $template;\n\t}", "function getTable(){\n\t\t\tglobal $page, $tableContent, $tableHeadings;\n\t\t\t// reset current page content\n\t\t\t$page = \"\";\n\t\t\t\n\t\t\t$page = '<div class=\"tableContainer\"><table class=\"twoCol\">';\n\t\t\t\n\t\t\t// make sure we have a header row, else skip\n\t\t\t/*\n\t\t\t$headerSize = count($tableHeadings);\n\t\t\tif($headerSize > 0){\n\t\t\t\t\n\t\t\t\t$page = $page . '<tr class = \"tableHeader\">';\n\t\t\t\t\n\t\t\t\tforeach ($tableHeadings as $h){\n\t\t\t\t\t$page = $page . '<td class = \"headerCell\">' . $h . '</td>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t$page = $page . '<tr class = \"tableHeader\">';\n\t\t\t\t\n\t\t\t\tforeach (array_keys($tableContent[0]) as $h){\n\t\t\t\t\t\n\t\t\t\t\t$page = $page . '<th class = \"headerCell\">' . $h . '</th>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t\n\t\t\t\n\t\t\t// make sure we have table content to print\n\t\t\t\n\t\t\t$contentSize = count($tableContent);\n\t\t\t\n\t\t\tfor($i = 0; $i < $contentSize; $i++){\n\t\t\t\t$rowSize = count($tableContent[$i]);\n\t\t\t\t\n\t\t\t\t// vary row depending on odd/even\n\t\t\t\tif($i % 2){\n\t\t\t\t\t$page = $page . ('<tr class = \"odd\">');\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$page = $page . ('<tr class = \"even\">');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now build row content\n\t\t\t\t$oddevenCount = 0;\n\t\t\t\tforeach ($tableContent[$i] as $row){\n\t\t\t\t\t\n\t\t\t\t\t// vary cell tag depending on odd/even\n\t\t\t\t\tif($oddevenCount % 2){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$page = $page . '<td class = \"odd\">';\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$page = $page . '<td class = \"even\">';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// add content\n\t\t\t\t\t$page = $page . $row;\n\t\t\t\t\t\n\t\t\t\t\t// close cell tag\n\t\t\t\t\t$page = $page . '</td>';\n\t\t\t\t\t$oddevenCount += 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// close row tag\n\t\t\t\t$page = $page . '</tr>';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$page = $page . ('</table></div>');\n\t\t\t\n\t\t\treturn $page;\n\t\t}", "function TableShow($align,$LineFeedHeight)\r\n{\r\n\t// Le calcul ne l'est pas, lui ;-)\r\n\t$oldFontSizePt=$this->FontSizePt;\r\n\t$oldFontFamily=$this->FontFamily;\r\n\r\n\t$tableFontFamily='helvetica';\r\n\t$cellmargin=3.0;\t\t// pifomètre : un peu de marge sur la largeur de cellule\r\n\t$wrwi=$this->w - $this->lMargin - $this->rMargin;\r\n\t//-----------\r\n\t$tableFontSize=10;\r\n\t$TableWidth = 1.01*$wrwi;\r\n\t$max_width=0;\r\n\t$min_font_size=6.0; // mis à 6, 5 était vraiment petit\r\n\t$maxiter = 10;\r\n\tdo {\r\n\t\t$tableFontSize = $tableFontSize *min(1.0,$wrwi/$TableWidth)*0.99; // 0.99 pour converger plus vite\r\n\r\n\t\t$fixed_width= ($tableFontSize<$min_font_size) || ($maxiter==1) || ($TableWidth<=$wrwi);\r\n\t\tif ($fixed_width)\r\n\t\t\t$coeff=min(1.0,$wrwi/$TableWidth);\r\n\r\n\t\t$tableFontSize = max($min_font_size,$tableFontSize);\r\n\t\t// on boucle sur la taille de police tant que la largeur du tableau ne rentre pas dans la page\r\n\r\n\t\t// remise à zéro des largeurs de colonnes\r\n\t\tforeach ($this->columnProp as $i=>$cprop)\r\n\t\t\tif ($fixed_width)\t$this->columnProp[$i]['w']=$this->columnProp[$i]['w']*$coeff;// redimenssioner la largeur de la colonne\r\n\t\t\telse\t$this->columnProp[$i]['w']=0.0;\r\n\t\tforeach($this->tableContent as $j=>$row)\r\n\t\t\t$this->lineProp[$j]['h']=0.0;\r\n\r\n\t\t// on passe toutes les cellules du tableau en revue\r\n\t\t// de façon à calculer la largeur max de chaque colonne pour la taille de police courante\r\n\t\tforeach($this->tableContent as $j=>$row) {\r\n\t\t\tforeach($row as $i=>$cell) {\r\n\t\t\t\t$htmlContent = $cell['content'].\"<br />\";\r\n\t\t\t\tif ($this->tableContent[$j][$i]['TH']) {\r\n\t\t\t\t\t$htmlContent=\"<B>$htmlContent</B>\";\r\n\t\t\t\t}\r\n\t\t\t\tlist($width,$height)=$this->CellSize($htmlContent,$tableFontFamily,$tableFontSize,$LineFeedHeight,$cellmargin,$fixed_width?$this->columnProp[$i]['w']:0);\r\n\r\n\t\t\t\tif (!$fixed_width)\r\n\t\t\t\t\t$this->columnProp[$i]['w'] = max($this->columnProp[$i]['w'],$width);\r\n\t\t\t\t$this->lineProp[$j]['h'] = max($this->lineProp[$j]['h'],$height)+0.3;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Repris de CalcWidth : calcul de la largeur de la table\r\n\t\t$TableWidth=0.0;\r\n\t\tforeach($this->columnProp as $col) {\r\n\t\t\t$TableWidth += $col['w'];\r\n\t\t}\r\n\t} while (!$fixed_width && $maxiter--);\r\n\r\n\t//-----------\r\n\t//\tEnvoi du tableau dans le flux PDF\r\n\t//-----------\r\n\r\n\t$this->SetFont($tableFontFamily, '', $tableFontSize);\r\n\t//Calcule l'abscisse du tableau\r\n\tif($align=='C')\r\n\t\t$this->TableX=max(($this->w-$TableWidth)/2, 0);\r\n\telseif($align=='R')\r\n\t\t$this->TableX=max($this->w-$this->rMargin-$TableWidth, 0);\r\n\telse\r\n\t\t$this->TableX=$this->lMargin;\r\n\r\n\t$ci=0;\t# flip-flop pour couleur de fond de ligne\r\n\tforeach($this->tableContent as $j=>$row) {\r\n\t\t$this->SetX($this->TableX);\r\n\t\t$fill = !empty($this->RowColors[$ci]);\r\n\t\tif ($fill) {\r\n\t\t\t$this->SetFillColor($this->RowColors[$ci][0],\r\n\t\t\t\t\t\t\t\t$this->RowColors[$ci][1],\r\n\t\t\t\t\t\t\t\t$this->RowColors[$ci][2]);\r\n\t\t}\r\n\r\n\t\tforeach($this->tableContent[$j] as $i=>$cell) {\r\n\t\t\tif ($this->tableContent[$j][$i]['TH'] == true) {\r\n\t\t\t\t$this->SetFont($tableFontFamily, 'B', $tableFontSize);\r\n\t\t\t\t$this->SetFillColor(255, 255, 0);\t// jaune\r\n\t\t\t\t$fill=1;\r\n\t\t\t}\r\n\t\t\t$this->OutputCell(\r\n\t\t\t\t$this->columnProp[$i]['w'],\r\n\t\t\t\t$this->lineProp[$j]['h'],\r\n\t\t\t\t$cell['content'],\r\n\t\t\t\t1,\r\n\t\t\t\t$LineFeedHeight,\r\n\t\t\t\t$this->columnProp[$i]['a'],\r\n\t\t\t\t$fill,0);\r\n\r\n\t\t\tif ($this->tableContent[$j][$i]['TH']) {\r\n\t\t\t\t$this->SetFont('', '', $tableFontSize);\r\n\t\t\t\t$this->SetFillColor(255);\t// blanc\r\n\t\t\t}\r\n\t\t}\r\n\t\t$ci=1-$ci;\r\n\t\t$this->maxLineWidth = max($this->maxLineWidth,$this->x);\r\n\t\t$this->Ln($this->lineProp[$j]['h']);\r\n\t}\r\n\r\n\t$this->SetFont($oldFontFamily, '', $oldFontSizePt);\r\n\t$this->Ln($LineFeedHeight);\r\n}", "function render_subscriber_table($table) {\n $s = '<table>';\n $s .= '<tr><th>Id</th><th>Name</th><th>Email</th></tr>';\n foreach($table as $row) {\n $id = \"$row[id]\";\n $name = \"<b>$row[name]</b>\";\n $email = \"$row[email]\";\n $s .= \"<tr><td>$id</td><td>$name</td><td>$email</td></tr>\";\n }\n $s .= '</table>';\n return $s;\n }", "function RenderListRow() {\n\t\tglobal $conn, $Security;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// C_EVENT_ID\n\n\t\t$this->C_EVENT_ID->CellCssStyle = \"\"; $this->C_EVENT_ID->CellCssClass = \"\";\n\t\t$this->C_EVENT_ID->CellAttrs = array(); $this->C_EVENT_ID->ViewAttrs = array(); $this->C_EVENT_ID->EditAttrs = array();\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID->CellCssStyle = \"\"; $this->FK_CONGTY_ID->CellCssClass = \"\";\n\t\t$this->FK_CONGTY_ID->CellAttrs = array(); $this->FK_CONGTY_ID->ViewAttrs = array(); $this->FK_CONGTY_ID->EditAttrs = array();\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT->CellCssStyle = \"\"; $this->C_TYPE_EVENT->CellCssClass = \"\";\n\t\t$this->C_TYPE_EVENT->CellAttrs = array(); $this->C_TYPE_EVENT->ViewAttrs = array(); $this->C_TYPE_EVENT->EditAttrs = array();\n\n\t\t// C_POST\n\t\t$this->C_POST->CellCssStyle = \"\"; $this->C_POST->CellCssClass = \"\";\n\t\t$this->C_POST->CellAttrs = array(); $this->C_POST->ViewAttrs = array(); $this->C_POST->EditAttrs = array();\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->CellCssStyle = \"\"; $this->C_DATETIME_BEGIN->CellCssClass = \"\";\n\t\t$this->C_DATETIME_BEGIN->CellAttrs = array(); $this->C_DATETIME_BEGIN->ViewAttrs = array(); $this->C_DATETIME_BEGIN->EditAttrs = array();\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->CellCssStyle = \"\"; $this->C_DATETIME_END->CellCssClass = \"\";\n\t\t$this->C_DATETIME_END->CellAttrs = array(); $this->C_DATETIME_END->ViewAttrs = array(); $this->C_DATETIME_END->EditAttrs = array();\n\n\t\t// C_ODER\n\t\t$this->C_ODER->CellCssStyle = \"\"; $this->C_ODER->CellCssClass = \"\";\n\t\t$this->C_ODER->CellAttrs = array(); $this->C_ODER->ViewAttrs = array(); $this->C_ODER->EditAttrs = array();\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->CellCssStyle = \"\"; $this->C_USER_ADD->CellCssClass = \"\";\n\t\t$this->C_USER_ADD->CellAttrs = array(); $this->C_USER_ADD->ViewAttrs = array(); $this->C_USER_ADD->EditAttrs = array();\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->CellCssStyle = \"\"; $this->C_ADD_TIME->CellCssClass = \"\";\n\t\t$this->C_ADD_TIME->CellAttrs = array(); $this->C_ADD_TIME->ViewAttrs = array(); $this->C_ADD_TIME->EditAttrs = array();\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->CellCssStyle = \"\"; $this->C_USER_EDIT->CellCssClass = \"\";\n\t\t$this->C_USER_EDIT->CellAttrs = array(); $this->C_USER_EDIT->ViewAttrs = array(); $this->C_USER_EDIT->EditAttrs = array();\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->CellCssStyle = \"\"; $this->C_EDIT_TIME->CellCssClass = \"\";\n\t\t$this->C_EDIT_TIME->CellAttrs = array(); $this->C_EDIT_TIME->ViewAttrs = array(); $this->C_EDIT_TIME->EditAttrs = array();\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE->CellCssStyle = \"\"; $this->C_ACTIVE_LEVELSITE->CellCssClass = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->CellAttrs = array(); $this->C_ACTIVE_LEVELSITE->ViewAttrs = array(); $this->C_ACTIVE_LEVELSITE->EditAttrs = array();\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->CellCssStyle = \"\"; $this->C_TIME_ACTIVE->CellCssClass = \"\";\n\t\t$this->C_TIME_ACTIVE->CellAttrs = array(); $this->C_TIME_ACTIVE->ViewAttrs = array(); $this->C_TIME_ACTIVE->EditAttrs = array();\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL->CellCssStyle = \"\"; $this->C_SEND_MAIL->CellCssClass = \"\";\n\t\t$this->C_SEND_MAIL->CellAttrs = array(); $this->C_SEND_MAIL->ViewAttrs = array(); $this->C_SEND_MAIL->EditAttrs = array();\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE->CellCssStyle = \"\"; $this->C_FK_BROWSE->CellCssClass = \"\";\n\t\t$this->C_FK_BROWSE->CellAttrs = array(); $this->C_FK_BROWSE->ViewAttrs = array(); $this->C_FK_BROWSE->EditAttrs = array();\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI->CellCssStyle = \"\"; $this->FK_ARRAY_TINBAI->CellCssClass = \"\";\n\t\t$this->FK_ARRAY_TINBAI->CellAttrs = array(); $this->FK_ARRAY_TINBAI->ViewAttrs = array(); $this->FK_ARRAY_TINBAI->EditAttrs = array();\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY->CellCssStyle = \"\"; $this->FK_ARRAY_CONGTY->CellCssClass = \"\";\n\t\t$this->FK_ARRAY_CONGTY->CellAttrs = array(); $this->FK_ARRAY_CONGTY->ViewAttrs = array(); $this->FK_ARRAY_CONGTY->EditAttrs = array();\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID->ViewValue = $this->C_EVENT_ID->CurrentValue;\n\t\t$this->C_EVENT_ID->CssStyle = \"\";\n\t\t$this->C_EVENT_ID->CssClass = \"\";\n\t\t$this->C_EVENT_ID->ViewCustomAttributes = \"\";\n\n\t\t// FK_CONGTY_ID\n\t\tif (strval($this->FK_CONGTY_ID->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`PK_MACONGTY` = \" . ew_AdjustSql($this->FK_CONGTY_ID->CurrentValue) . \"\";\n\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_CONGTY_ID->ViewValue = $rswrk->fields('C_TENCONGTY');\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_CONGTY_ID->ViewValue = $this->FK_CONGTY_ID->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_CONGTY_ID->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_CONGTY_ID->CssStyle = \"\";\n\t\t$this->FK_CONGTY_ID->CssClass = \"\";\n\t\t$this->FK_CONGTY_ID->ViewCustomAttributes = \"\";\n\n\t\t// C_TYPE_EVENT\n\t\tif (strval($this->C_TYPE_EVENT->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_TYPE_EVENT->CurrentValue) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai Popup\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai su kien theo bai viet\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"3\":\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = \"Loai su kien lien ket\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_TYPE_EVENT->ViewValue = $this->C_TYPE_EVENT->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_TYPE_EVENT->ViewValue = NULL;\n\t\t}\n\t\t$this->C_TYPE_EVENT->CssStyle = \"\";\n\t\t$this->C_TYPE_EVENT->CssClass = \"\";\n\t\t$this->C_TYPE_EVENT->ViewCustomAttributes = \"\";\n\n\t\t// C_POST\n\t\tif (strval($this->C_POST->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_POST->CurrentValue) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"trang chu\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"trang tuyen sinh\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\":\n\t\t\t\t\t$this->C_POST->ViewValue = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_POST->ViewValue = $this->C_POST->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_POST->ViewValue = NULL;\n\t\t}\n\t\t$this->C_POST->CssStyle = \"\";\n\t\t$this->C_POST->CssClass = \"\";\n\t\t$this->C_POST->ViewCustomAttributes = \"\";\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->ViewValue = $this->C_DATETIME_BEGIN->CurrentValue;\n\t\t$this->C_DATETIME_BEGIN->ViewValue = ew_FormatDateTime($this->C_DATETIME_BEGIN->ViewValue, 7);\n\t\t$this->C_DATETIME_BEGIN->CssStyle = \"\";\n\t\t$this->C_DATETIME_BEGIN->CssClass = \"\";\n\t\t$this->C_DATETIME_BEGIN->ViewCustomAttributes = \"\";\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->ViewValue = $this->C_DATETIME_END->CurrentValue;\n\t\t$this->C_DATETIME_END->ViewValue = ew_FormatDateTime($this->C_DATETIME_END->ViewValue, 7);\n\t\t$this->C_DATETIME_END->CssStyle = \"\";\n\t\t$this->C_DATETIME_END->CssClass = \"\";\n\t\t$this->C_DATETIME_END->ViewCustomAttributes = \"\";\n\n\t\t// C_ODER\n\t\t$this->C_ODER->ViewValue = $this->C_ODER->CurrentValue;\n\t\t$this->C_ODER->ViewValue = ew_FormatDateTime($this->C_ODER->ViewValue, 7);\n\t\t$this->C_ODER->CssStyle = \"\";\n\t\t$this->C_ODER->CssClass = \"\";\n\t\t$this->C_ODER->ViewCustomAttributes = \"\";\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->ViewValue = $this->C_USER_ADD->CurrentValue;\n\t\t$this->C_USER_ADD->CssStyle = \"\";\n\t\t$this->C_USER_ADD->CssClass = \"\";\n\t\t$this->C_USER_ADD->ViewCustomAttributes = \"\";\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->ViewValue = $this->C_ADD_TIME->CurrentValue;\n\t\t$this->C_ADD_TIME->ViewValue = ew_FormatDateTime($this->C_ADD_TIME->ViewValue, 7);\n\t\t$this->C_ADD_TIME->CssStyle = \"\";\n\t\t$this->C_ADD_TIME->CssClass = \"\";\n\t\t$this->C_ADD_TIME->ViewCustomAttributes = \"\";\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->ViewValue = $this->C_USER_EDIT->CurrentValue;\n\t\t$this->C_USER_EDIT->CssStyle = \"\";\n\t\t$this->C_USER_EDIT->CssClass = \"\";\n\t\t$this->C_USER_EDIT->ViewCustomAttributes = \"\";\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->ViewValue = $this->C_EDIT_TIME->CurrentValue;\n\t\t$this->C_EDIT_TIME->ViewValue = ew_FormatDateTime($this->C_EDIT_TIME->ViewValue, 7);\n\t\t$this->C_EDIT_TIME->CssStyle = \"\";\n\t\t$this->C_EDIT_TIME->CssClass = \"\";\n\t\t$this->C_EDIT_TIME->ViewCustomAttributes = \"\";\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\tif (strval($this->C_ACTIVE_LEVELSITE->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_ACTIVE_LEVELSITE->CurrentValue) {\n\t\t\t\tcase \"0\":\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = \"khong kich hoat\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = \"Kich hoat\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = $this->C_ACTIVE_LEVELSITE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_ACTIVE_LEVELSITE->ViewValue = NULL;\n\t\t}\n\t\t$this->C_ACTIVE_LEVELSITE->CssStyle = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->CssClass = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->ViewCustomAttributes = \"\";\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->ViewValue = $this->C_TIME_ACTIVE->CurrentValue;\n\t\t$this->C_TIME_ACTIVE->ViewValue = ew_FormatDateTime($this->C_TIME_ACTIVE->ViewValue, 7);\n\t\t$this->C_TIME_ACTIVE->CssStyle = \"\";\n\t\t$this->C_TIME_ACTIVE->CssClass = \"\";\n\t\t$this->C_TIME_ACTIVE->ViewCustomAttributes = \"\";\n\n\t\t// C_SEND_MAIL\n\t\tif (strval($this->C_SEND_MAIL->CurrentValue) <> \"\") {\n\t\t\tswitch ($this->C_SEND_MAIL->CurrentValue) {\n\t\t\t\tcase \"0\":\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = \"khong gui mail\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = \"gui mail\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->C_SEND_MAIL->ViewValue = $this->C_SEND_MAIL->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_SEND_MAIL->ViewValue = NULL;\n\t\t}\n\t\t$this->C_SEND_MAIL->CssStyle = \"\";\n\t\t$this->C_SEND_MAIL->CssClass = \"\";\n\t\t$this->C_SEND_MAIL->ViewCustomAttributes = \"\";\n\n\t\t// C_FK_BROWSE\n\t\tif (strval($this->C_FK_BROWSE->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->C_FK_BROWSE->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`C_HOTEN` = '\" . ew_AdjustSql(trim($wrk)) . \"'\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_EMAIL` FROM `t_nguoidung`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->C_FK_BROWSE->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->C_FK_BROWSE->ViewValue .= $rswrk->fields('C_EMAIL');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->C_FK_BROWSE->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->C_FK_BROWSE->ViewValue = $this->C_FK_BROWSE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->C_FK_BROWSE->ViewValue = NULL;\n\t\t}\n\t\t$this->C_FK_BROWSE->CssStyle = \"\";\n\t\t$this->C_FK_BROWSE->CssClass = \"\";\n\t\t$this->C_FK_BROWSE->ViewCustomAttributes = \"\";\n\n\t\t// FK_ARRAY_TINBAI\n\t\tif (strval($this->FK_ARRAY_TINBAI->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->FK_ARRAY_TINBAI->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`PK_TINBAI_ID` = \" . ew_AdjustSql(trim($wrk)) . \"\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_TITLE` FROM `t_tinbai_levelsite`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue .= $rswrk->fields('C_TITLE');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->FK_ARRAY_TINBAI->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = $this->FK_ARRAY_TINBAI->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_ARRAY_TINBAI->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_ARRAY_TINBAI->CssStyle = \"\";\n\t\t$this->FK_ARRAY_TINBAI->CssClass = \"\";\n\t\t$this->FK_ARRAY_TINBAI->ViewCustomAttributes = \"\";\n\n\t\t// FK_ARRAY_CONGTY\n\t\tif (strval($this->FK_ARRAY_CONGTY->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->FK_ARRAY_CONGTY->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`PK_MACONGTY` = \" . ew_AdjustSql(trim($wrk)) . \"\";\n\t\t\t}\t\n\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t$sWhereWrk = \"\";\n\t\tif ($sFilterWrk <> \"\") {\n\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t}\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue .= $rswrk->fields('C_TENCONGTY');\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->FK_ARRAY_CONGTY->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = $this->FK_ARRAY_CONGTY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->FK_ARRAY_CONGTY->ViewValue = NULL;\n\t\t}\n\t\t$this->FK_ARRAY_CONGTY->CssStyle = \"\";\n\t\t$this->FK_ARRAY_CONGTY->CssClass = \"\";\n\t\t$this->FK_ARRAY_CONGTY->ViewCustomAttributes = \"\";\n\n\t\t// C_EVENT_ID\n\t\t$this->C_EVENT_ID->HrefValue = \"\";\n\t\t$this->C_EVENT_ID->TooltipValue = \"\";\n\n\t\t// FK_CONGTY_ID\n\t\t$this->FK_CONGTY_ID->HrefValue = \"\";\n\t\t$this->FK_CONGTY_ID->TooltipValue = \"\";\n\n\t\t// C_TYPE_EVENT\n\t\t$this->C_TYPE_EVENT->HrefValue = \"\";\n\t\t$this->C_TYPE_EVENT->TooltipValue = \"\";\n\n\t\t// C_POST\n\t\t$this->C_POST->HrefValue = \"\";\n\t\t$this->C_POST->TooltipValue = \"\";\n\n\t\t// C_DATETIME_BEGIN\n\t\t$this->C_DATETIME_BEGIN->HrefValue = \"\";\n\t\t$this->C_DATETIME_BEGIN->TooltipValue = \"\";\n\n\t\t// C_DATETIME_END\n\t\t$this->C_DATETIME_END->HrefValue = \"\";\n\t\t$this->C_DATETIME_END->TooltipValue = \"\";\n\n\t\t// C_ODER\n\t\t$this->C_ODER->HrefValue = \"\";\n\t\t$this->C_ODER->TooltipValue = \"\";\n\n\t\t// C_USER_ADD\n\t\t$this->C_USER_ADD->HrefValue = \"\";\n\t\t$this->C_USER_ADD->TooltipValue = \"\";\n\n\t\t// C_ADD_TIME\n\t\t$this->C_ADD_TIME->HrefValue = \"\";\n\t\t$this->C_ADD_TIME->TooltipValue = \"\";\n\n\t\t// C_USER_EDIT\n\t\t$this->C_USER_EDIT->HrefValue = \"\";\n\t\t$this->C_USER_EDIT->TooltipValue = \"\";\n\n\t\t// C_EDIT_TIME\n\t\t$this->C_EDIT_TIME->HrefValue = \"\";\n\t\t$this->C_EDIT_TIME->TooltipValue = \"\";\n\n\t\t// C_ACTIVE_LEVELSITE\n\t\t$this->C_ACTIVE_LEVELSITE->HrefValue = \"\";\n\t\t$this->C_ACTIVE_LEVELSITE->TooltipValue = \"\";\n\n\t\t// C_TIME_ACTIVE\n\t\t$this->C_TIME_ACTIVE->HrefValue = \"\";\n\t\t$this->C_TIME_ACTIVE->TooltipValue = \"\";\n\n\t\t// C_SEND_MAIL\n\t\t$this->C_SEND_MAIL->HrefValue = \"\";\n\t\t$this->C_SEND_MAIL->TooltipValue = \"\";\n\n\t\t// C_FK_BROWSE\n\t\t$this->C_FK_BROWSE->HrefValue = \"\";\n\t\t$this->C_FK_BROWSE->TooltipValue = \"\";\n\n\t\t// FK_ARRAY_TINBAI\n\t\t$this->FK_ARRAY_TINBAI->HrefValue = \"\";\n\t\t$this->FK_ARRAY_TINBAI->TooltipValue = \"\";\n\n\t\t// FK_ARRAY_CONGTY\n\t\t$this->FK_ARRAY_CONGTY->HrefValue = \"\";\n\t\t$this->FK_ARRAY_CONGTY->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function writeHTML()\n\t{\n\t\tglobal $_activeTree;\n\t\t\n\t\t$_activeTree= $this;\n\t\t\n\t\t$this->writeScript();\n\t\t$width = is_numeric($this->width) ? \"{$this->width}px\" : $this->width;\n\t\t$height = is_numeric($this->height) ? \"{$this->height}px\" : $this->height;\n\t\t\n\t\tif ($this->selectMode == \"single\")\n\t\t{\n?>\n<input type='hidden' name='<?echo $this->id ?>' id='<?echo $this->id?>' value='<?echo $this->value ?>'/>\n<? \n\t\t}\n?><table id=\"<?echo $this->id?>_table\" class=\"<? echo $this->style?>\" cellpadding=\"0\" cellspacing=\"0\" <? if ($this->width) echo \"style='width:{$width}'\"; ?>>\n\t\t <? \n\t\t if ($this->title)\n\t\t {\n\t\t ?>\t\t \n\t\t <tr>\n\t\t <th><? echo $this->title?></th>\n\t\t </tr>\n\t\t <?\n\t\t }\n\t\t ?>\n\t\t <tr>\n\t\t <td>\n\t\t <div style=\"padding: 0; margin: 0; width: 100%;<? if ($this->height > 0) { ?> height: <?echo $this->height?>px;<? } ?><?if ($this->scroll) echo \"overflow: auto\"?>\">\n<?\n\t\t$this->writeNodes();\n?>\n\t\t </div>\n\t\t </td>\n\t\t </tr>\n\t\t</table>\n<?\n\t\t$_activeTree = null;\n\t}", "public function buildTable()\n {\n\n $view = View::getActive();\n\n // Creating the Head\n $head = '<thead class=\"ui-widget-header\" >'.NL;\n $head .= '<tr>'.NL;\n\n $head .= '<th >Project Name</th>'.NL;\n //$head .= '<th>File</th>'.NL;\n $head .= '<th >Description</th>'.NL;\n $head .= '<th style=\"width:165px\" >Nav</th>'.NL;\n\n $head .= '</tr>'.NL;\n $head .= '</thead>'.NL;\n //\\ Creating the Head\n\n // Generieren des Bodys\n $body = '<tbody class=\"ui-widget-content\" >'.NL;\n\n $num = 1;\n foreach ($this->data as $key => $row) {\n $rowid = $this->name.\"_row_$key\";\n\n $body .= \"<tr class=\\\"row$num\\\" id=\\\"$rowid\\\" >\";\n\n $urlConf = 'index.php?c=Daidalos.Projects.genMask&amp;objid='.urlencode($key);\n $linkConf = '<a title=\"GenMask\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlConf.'\">'\n .Wgt::icon('daidalos/bdl_mask.png' , 'xsmall' , 'build').'</a>';\n\n $urlGenerate = 'index.php?c=Genf.Bdl.build&amp;objid='.urlencode($key);\n $linkGenerate = '<a title=\"Code generieren\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlGenerate.'\">'\n .Wgt::icon('daidalos/parser.png' , 'xsmall' , 'build').'</a>';\n\n\n $urlDeploy = 'index.php?c=Genf.Bdl.deploy&amp;objid='.urlencode($key);\n $linkDeploy = '<a title=\"Deploy the Project\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlDeploy.'\">'\n .Wgt::icon('genf/deploy.png' , 'xsmall' , 'deploy').'</a>';\n\n $urlRefreshDb = 'index.php?c=Genf.Bdl.refreshDatabase&amp;objid='.urlencode($key);\n $linkRefreshDb = '<a title=\"Refresh the database\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlRefreshDb.'\">'\n .Wgt::icon('daidalos/db_refresh.png' , 'xsmall' , 'sync db').'</a>';\n\n $urlSyncDb = 'index.php?c=Genf.Bdl.syncDatabase&amp;objid='.urlencode($key);\n $linkSyncDb = '<a title=\"Sync the database with the model\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlSyncDb.'\">'\n .Wgt::icon('daidalos/db_sync.png' , 'xsmall' , 'sync db').'</a>';\n\n $urlPatchDb = 'index.php?c=Genf.Bdl.createDbPatch&amp;objid='.urlencode($key);\n $linkPatchDb = '<a title=\"Create an SQL Patch to alter the database\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlPatchDb.'\" >'\n .Wgt::icon('genf/dump.png' , 'xsmall' , 'create alter patch').'</a>';\n\n $urlClean = 'index.php?c=Genf.Bdl.clean&amp;objid='.urlencode($key);\n $linkClean = '<a title=\"Projekt cleanen\" class=\"wcm wcm_req_ajax wgt_info\" href=\"'.$urlClean.'\">'\n .Wgt::icon('genf/clean.png' , 'xsmall' , 'clean').'</a>';\n\n $body .= '<td valign=\"top\" >'.$row[0].'</td>'.NL;\n //$body .= '<td valign=\"top\" >'.$row[1].'</td>'.NL;\n $body .= '<td valign=\"top\" >'.$row[2].'</td>'.NL;\n $body .= '<td valign=\"top\" align=\"center\" >'.$linkConf.' | '.$linkGenerate.$linkDeploy.' | '.$linkSyncDb.' '.$linkRefreshDb.' '.$linkPatchDb.' | '.$linkClean.'</td>'.NL;\n\n $body .= '</tr>'.NL;\n\n $num ++;\n if ($num > $this->numOfColors)\n $num = 1;\n\n }// ENDE FOREACH\n\n $body .= \"</tbody>\".NL;\n //\\ Generieren des Bodys\n\n $html ='<table id=\"table_'.$this->name.'\" class=\"full\" >'.NL;\n $html .= $head;\n $html .= $body;\n $html .= '</table>'.NL;\n\n return $html;\n\n }", "function draw_body(){\r\n\t\r\n\tglobal $PPT;\r\n\t\r\n\t\t$out='';\r\n\r\n\t\tif($this->total_items>0){\r\n\t\t\t$arr_width=explode(',',$this->width);\r\n\t\t\t\r\n\t\t\tfor($i=0; $i<count($this->data);$i++){$c=0;\r\n\t\t\t\t$out.='<tr'.($this->odd_even ? ($i%2==0 ? ' class=\"odd\"' : ' class=\"even\"') : '').'>';\r\n\t\t\t\tforeach($this->data[$i] as $key => $value){\r\n\t\t\t\t\r\n\t\t\t\t$arr_header=explode(',',$this->header);\r\n\t\t\t\t\r\n\t\t\t\t\tif($arr_header[$c] == \"ORDER ID\"){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').'>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<a href=\"javascript:void(0);\" onClick=\"document.getElementById(\\'delo\\').value =\\''.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'\\';document.DeleteOrder.submit();\" title=\"delete order\"><img src=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/images/premiumpress/led-ico/cross.png\" align=\"middle\"></a>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t<a href=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/admin/_invoice.php?id='.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'\" target=\"_blank\" title=\"view invoice\"><img src=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/images/premiumpress/led-ico/page.png\" align=\"middle\"></a>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<a href=\"admin.php?page=orders&id='.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'\" title=\"edit order\"><img src=\"../wp-content/themes/'.strtolower(constant('PREMIUMPRESS_SYSTEM')).'/images/admin/icon-edit.gif\" align=\"middle\"> '.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'</a></td>';\r\n\t\t\t\r\n\t\t\t\t\t}elseif($arr_header[$c] == \"TOTAL\"){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').'>'.number_format(str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])),2).'</td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}elseif($arr_header[$c] == \"STATUS\"){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tswitch(str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i]))){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase \"0\": { \t$O1 = \"Awaiting Payment\";\t$O2 = \"#0c95ff\";\t\t} break;\r\n\t\t\t\t\t\t\tcase \"3\": { \t$O1 = \"Paid & Completed \";\t$O2 = \"green\";\t\t} break;\t\r\n\t\t\t\t\t\t\tcase \"5\": { \t$O1 = \"Payment Received\";\t$O2 = \"green\";\t\t} break;\t\r\n\t\t\t\t\t\t\tcase \"6\": { \t$O1 = \"Payment Failed\";\t\t$O2 = \"red\";\t\t} break;\r\n\t\t\t\t\t\t\tcase \"7\": { \t$O1 = \"Payment Pending\";\t$O2 = \"orange\";\t\t} break;\t\r\n\t\t\t\t\t\t\tcase \"8\": { \t$O1 = \"Payment Refunded\";\t$O2 = \"black\";\t\t} break;\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').' style=\"background-color:'.$O2.'\"><span style=\"color:white;\">'.$O1.'</span></td>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t$out.='<td'.(($i==0 and $this->width!='' and $arr_width[$key]>0) ? ' width=\"'.$arr_width[$key].'\"' : '').'>'.str_replace('#ROW#',$i+1,$this->change_tag_col($this->change_tags($value),$this->data[$i])).'</td>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$c++; \r\n\t\t\t\t}\r\n\t\t\t\t$out.='</tr>'; \r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t\tif($this->no_results!==false)\r\n\t\t\t\t$out.='<tr id=\"'.$this->id.'_no_results\"><td colspan=\"'.count($arr_header).'\">'.$this->no_results.'</td></tr>';\r\n\t\t}\r\n\r\n\t\treturn $out;\r\n\t}", "function build_table($new,$array_cat){\n\t\t//de categorias de serviceo.\n\t\t//Hacemos las iniciaciones pertinentes para intentar\n\t\t//aclarar un poco el codigo\n\t\t$ini_fila=\"<tr>\";\n\t\t$fin_fila=\"</tr>\";\n\t\t$ini_col='<td valign=\"top\" nowrap>';\n\t\t$fin_col=\"</td>\";\n\t\t$NUM_MAX_COLS=1;\n\t\t//Por cada columna un padre y sus hijos.\n\t\t$cadena='<table border=\"0\">';\n\t\t$num_current_col=$NUM_MAX_COLS+1;\t\t\n\t\tfor ($i=0;$i<count($array_cat);$i++){\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$num_current_col=1;\n\t\t\t\t$cadena=$cadena.$ini_fila;\n\t\t\t}\n\t\t\t$cadena=$cadena.$ini_col;\n\t\t\t//Damos el padre para que empiece la recursividad\t\t\t\n\t\t\t\n\t\t\t$cadena=$cadena.$this->build_col($new,$array_cat[$i],0,\"services\");\t\t\n\t\t\t//0 es el numero de tabulaciones inicial.\n\t\t\t//\"services\" es el nombre que tendran los checkbox.\n\t\t\t$cadena=$cadena.$fin_col;\n\t\t\t$num_current_col++;\n\t\t\tif ($num_current_col==$NUM_MAX_COLS+1){\n\t\t\t\t$cadena=$cadena.$fin_fila;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Si el numero de la columna actual es menor\n\t\t//que el numero maximo de columnas +1 \n\t\t//restamos al maximo la actual para saber cuantas faltan. \n\t\tif ($num_current_col<$NUM_MAX_COLS+1){\t\t\t\n\t\t\t$cadena=$cadena.'<td colspan=\"'.($NUM_MAX_COLS+1-$num_current_col).'\">&nbsp;'.$fin_col.$fin_fila;\n\t\t}\n\t\t$cadena=$cadena.'</table>';\n\t\treturn $cadena;\n\t}", "public function table($data = null) {\n\t\t\tif ($data) {\n\t\t\t\tforeach ( $data as $key => $value ) {\n\t\t\t\t\t$this->{$key} = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// baut tabelle zusammen\n\t\t\techo \"<table>\";\n\t\t\techo \"<thead>\";\n\t\t\t// falls alias übergeben wurde\n\t\t\tif (isset ( $this->alias )) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\tforeach ( $this->alias [0] as $key => $value ) {\n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"</thead>\";\n\t\t\t} else {\n\t\t\t\t// falls keine alias übergeben, dann spaltenname\n\t\t\t\techo \"<tr>\";\n\t\t\t\tforeach ( $this->table [0] as $key => $value ) {\n\t\t\t\t\techo \"<td>\";\n\t\t\t\t\techo htmlentities ( $key );\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\techo \"</tr>\";\n\t\t\t\techo \"</thead>\";\n\t\t\t}\n\t\t\t// befüllt tabelle mit daten\n\t\t\techo \"<tbody>\";\n\t\t\techo \"<tr>\";\n\t\t\t$i = 0;\n\t\t\twhile ( $i < count ( $this->table ) ) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\tforeach ( $this->table [$i] as $key => $value ) {\n\t\t\t\t\tif ($i % 2 != 0) {\n\t\t\t\t\t\techo \"<td style=background:#A9DFFF; >\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<td>\";\n\t\t\t\t\t}\n\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\techo \"</td>\";\n\t\t\t\t}\n\t\t\t\t// falls link\n\t\t\t\tif (isset ( $this->link )) {\n\t\t\t\t\tforeach ( $this->link [0] as $key => $value ) {\n\t\t\t\t\t\t$submitName = $key;\n\t\t\t\t\t\techo \"<td align=center>\";\n\t\t\t\t\t\techo \"<form action=\\\"\";\n\t\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\t\techo \"\\\" method=\\\"post\\\">\";\n\t\t\t\t\t\tforeach ( $this->table [$i] as $key => $value ) {\n\t\t\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"\";\n\t\t\t\t\t\t\techo htmlentities ( $key );\n\t\t\t\t\t\t\techo \"\\\" value=\\\"\";\n\t\t\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\t\t\techo \"\\\">\";\n\t\t\t\t\t\t}\n\t/*\n\t * ===============================================\n\t * Start Sprint: 4\n\t * @author: Kilian Kraus\n\t * User Story: Als Admin/Verwalter möchte ich Rechte vergeben können.\n\t * ===============================================\n\t */\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// zusätzliche hidden values\n\t\t\t\t\t\t\tif(isset($this->hidden)){\n\t\t\t\t\t\t\t\tforeach ( $this->hidden[0] as $key => $value ) {\n\t\t\t\t\t\t\t\t\techo \"<input type=\\\"hidden\\\" name=\\\"\";\n\t\t\t\t\t\t\t\t\techo htmlentities ( $key );\n\t\t\t\t\t\t\t\t\techo \"\\\" value=\\\"\";\n\t\t\t\t\t\t\t\t\techo htmlentities ( $value );\n\t\t\t\t\t\t\t\t\techo \"\\\">\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n \t/**-----------------------------------------------------------------------------------------\n\t* START SPRINT 05\n\t* @author: Damian Wysocki\n\t* User Story (Nr.: 430a) Als Mitarbeiter möchte ich Noten von Veranstaltungen für die Teilnehmer eintragen können. (erneut)\n\t* Task: 430a/03 Beschreibung: Maske zum Eintragen\n\t* Zeitaufwand (in Stunden): 5\n\t* START SPRINT 05\t\n\t*/\n\t \n\t\t/**\n\t\t *\n\t\t * @author Damian Wysocki\n\t\t * \n\t\t * Nur Zahlen mit Schritten von 0,3 als Noteneintrag erlaubt\n\t\t **/ \n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo \"<select name=\\\"Note\\\" required=\\\"required\\\" style=\\\"max-width:45%\\\" >\n\t\t\t\t<option value=\\\"1.0\\\">1.0</option>\n\t\t\t\t<option value=\\\"1.3\\\">1.3</option>\n\t\t\t\t<option value=\\\"1.7\\\">1.7</option>\n\t\t\t\t<option value=\\\"2.0\\\">2.0</option>\n\t\t\t\t<option value=\\\"2.3\\\">2.3</option>\n\t\t\t\t<option value=\\\"2.7\\\">2.7</option>\n\t\t\t\t<option value=\\\"3.0\\\">3.0</option>\n\t\t\t\t<option value=\\\"3.3\\\">3.3</option>\n\t\t\t\t<option value=\\\"3.7\\\">3.7</option>\n\t\t\t\t<option value=\\\"4.0\\\">4.0</option>\n\t\t\t\t<option value=\\\"5.0\\\">5.0</option>\t\t\t\t\n\t\t\t\t<\\\"select>\";\n\t\t\t\t\t\n\t\t\t\t\t\techo \"<input class=\\\"button\\\" type=\\\"submit\\\" onClick=\\\"return confirm('Wollen Sie die Note wirklich ändern?')\\\" value=\\\"\";\n\t\t\t\t\t\t/**\n\t* ENDE SPRINT 05\n\t* @author: Damian Wysocki\n\t* User Story (Nr.: 430a) Als Mitarbeiter möchte ich Noten von Veranstaltungen für die Teilnehmer eintragen können. (erneut)\n\t* Task: 430a/03 Beschreibung: Maske zum Eintragen\n\t* Zeitaufwand (in Stunden): 5\n\t* ENDE SPRINT 05\n\t**-----------------------------------------------------------------------------------------*/\t\n\t\t\t\t\t\t\n\t\t\t\t\t\techo htmlentities ( $submitName );\n\t\t\t\t\t\techo \"\\\">\";\n\t\t\t\t\t\techo \"</form>\";\n\t\t\t\t\t\techo \"</td>\";\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\techo \"</tr>\";\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t\techo \"</tbody>\";\n\t\t\techo \"</table>\";\n\t\t}" ]
[ "0.6399164", "0.61847943", "0.60661876", "0.60565466", "0.6054906", "0.6051843", "0.6020196", "0.5928422", "0.59245217", "0.5892703", "0.5882187", "0.58610725", "0.58340937", "0.580906", "0.58048266", "0.57858014", "0.57260275", "0.5702808", "0.56300515", "0.56246614", "0.5620623", "0.5608752", "0.5603377", "0.55816615", "0.5576366", "0.55758333", "0.5554111", "0.5541067", "0.5538935", "0.55180955", "0.5503599", "0.55012304", "0.5498436", "0.5487298", "0.5483358", "0.5474897", "0.54742825", "0.54718494", "0.54714", "0.5463934", "0.54636955", "0.5455981", "0.5441536", "0.5438772", "0.5431574", "0.54313815", "0.5417463", "0.5392614", "0.5392017", "0.53896147", "0.5380684", "0.5378588", "0.5361271", "0.5355941", "0.53357023", "0.53335327", "0.5321636", "0.5304656", "0.5304603", "0.5287068", "0.5283374", "0.52805686", "0.52752036", "0.5261863", "0.5251619", "0.5250874", "0.5248476", "0.524505", "0.52435297", "0.52407753", "0.5229918", "0.5225279", "0.5217925", "0.5216477", "0.5214508", "0.5213051", "0.5212005", "0.52076334", "0.5197924", "0.5196947", "0.5192717", "0.5190691", "0.5184792", "0.5178884", "0.5178884", "0.5178276", "0.5177954", "0.51735646", "0.51608026", "0.5158271", "0.51513374", "0.51430726", "0.5139365", "0.51384395", "0.51335484", "0.51271814", "0.51260453", "0.51256156", "0.51250637", "0.5121953" ]
0.7178585
0
/ | | Default Home Controller | | | You may wish to use controllers instead of, or in addition to, Closure | based routes. That's great! Here is an example controller method to | get you started. To route to this controller, just add the route: |
public function view(){ print_r($_SERVER); return View::make('pwreset/reset'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function indexRoute()\n {\n }", "public function route_home() {\n\t\techo '<h1>It wurks!</h1>';\n\t}", "public function index() {\r\n\t\t\t\r\n\t\t\t$url = substr( $_SERVER['REQUEST_URI'], 1 );\r\n\t\t\t$requestParams = explode( '/', $url );\r\n\t\t\t$controller = $requestParams[0];\r\n\r\n\t\t\t// If the URL has a bad controller and more than 2 params redirect to 404 page;\r\n\t\t\tif(empty($controller) && count($requestParams) > 1){\r\n\t\t\t\trequire_once( './app/Views/RouteNotFound.php' );\r\n\t\t\t\tdie();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* If no controller is passed in the url, load home page */\r\n\t\t\tif ( empty( $controller ) ) {\r\n\t\t\t\t$homepage = new HomeController();\r\n\t\t\t\t$homepage->homepage();\r\n\t\t\t\tdie();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* If a controller is passed in the url, but no method is given, load view*/\r\n\t\t\tif ( count( $requestParams ) == 1 ) {\r\n\t\t\t\t$view = ucfirst( $requestParams[0] );\r\n\t\t\t\trequire_once( './app/Views/' . $view . '.php' );\r\n\t\t\t\tdie();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* If the url doesn't respect domain/controller/method?params logic, load 404 view*/\r\n\t\t\tif ( count( $requestParams ) > 2 ) {\r\n\t\t\t\trequire_once( './app/Views/RouteNotFound.php' );\r\n\t\t\t\tdie();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Get the method passed in the url */\r\n\t\t\t$requestAux = explode( '?', $requestParams[1] );\r\n\t\t\t$method = $requestAux[0];\r\n\t\t\t\r\n\t\t\t/* Check if params are passed through url */\r\n\t\t\tif ( isset( $requestAux[1] ) ) {\r\n\t\t\t\t$params = $requestAux[1];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* Create new instance of the controller given through url */\r\n\t\t\t$auxController = ucfirst( $controller ) . 'Controller';\r\n\t\t\t$appController = new $auxController();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t *\r\n\t\t\t * If method isset and exists in the controller\r\n\t\t\t * call the method ( with params optionally),\r\n\t\t\t * else render the view\r\n\t\t\t *\r\n\t\t\t * */\r\n\t\t\tif ( isset( $method ) && ! empty( $method ) && method_exists( $appController, $method ) ) {\r\n\t\t\t\tif ( isset( $params ) && ! empty( $params ) ) {\r\n\t\t\t\t\t$appController->$method( $params );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$appController->$method();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$appController->createView( $controller );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public function index() {\n\n\t\t$data['content'] = 'Homepage';\n\t\t$this->flexi->title('Homepage')\n\t\t\t\t\t->make('home', $data);\n\n\t}", "public function index() {\n $this->home(); \n }", "public function indexAction(){\n\t\techo \"Welcome malt api controller\";\n\t\texit;\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n //return view('home');\n }", "public function index()\n {\n return view('/home');\n }", "public function index()\n {\n return view('/home');\n }", "public function routeController()\n { }", "public function controller(){\n route('start')->onMessageText('/start');\n route('add')->onMessageText('/add');\n route('list')->onMessageText('/list');\n route('delete')->onMessageText('/delete');\n route('clear')->onMessageText('/clear');\n route('about')->onMessageText('/about');\n }", "public function index(){ return view('home'); }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n {\n return view(\"index\");\n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n {\n echo \"hola\";\n }", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function index()\n { \n \n return view('home');\n }", "public function home()\n\t{\n\n\t\tView::show(\"home.php\", \"Accueil Mon MVC !\");\n\t}", "public function indexAction() {\r\n\r\n// NSP::$app->registry->view->welcome = 'Welcome to NSP MVC';\r\n//\r\n// /*** load the index template ***/\r\n NSP::$app->view->viewVar = 'Rest controller';\r\n NSP::$app->registry->get('view')->show('index');\r\n }", "public function home(){\n \treturn view('welcome');\t\n }", "public function index()\n {\n return view('home'); \n }", "public function index()\n {\n return view('home'); \n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n { \n return view('home');\n }", "public function index()\n {\n\n \t\t\n return view('home');\n }", "public function index()\n {\n $route = Route::getFacadeRoot()->current()->uri();;\n\n return view(\"home\", compact('route'));\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n \n\n return view('home');\n }", "public function index()\n { \n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index() \n\t{\n\t\tredirect('home');\n\t}", "public function index()\n\t{\n return View::make('home');\n\t}", "public function index()\n {\n return \"hello world\";\n }", "public function home()\n {\n return view(\"home\");\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n\t{\n\t\treturn view('home' , ['setClass' => 'grayBody']);\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n echo 'hello';\n }", "public static function route()\n {\n return 'index';\n }", "public function index()\n {\n $this->breadcrumbs->add('Home', '/');\n $this->breadcrumbs->add('Dashboard', '/dashboard');\n $this->breadcrumbs->add('Customer', '/dashboard/customer');\n\n // Render the breadcrumbs and pass them to the view\n $data['breadcrumbs'] = $this->breadcrumbs->render();\n\n // Load the view and pass the data\n return view('home', $data);\n }", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }", "public function index()\n {\n return view('home');\n }" ]
[ "0.71267956", "0.6883817", "0.6859064", "0.6826801", "0.6820016", "0.6802855", "0.6788183", "0.6751722", "0.6751722", "0.67476475", "0.67449754", "0.67438", "0.67438", "0.67338693", "0.67161816", "0.6705416", "0.6666136", "0.66506016", "0.6649376", "0.6639972", "0.6593341", "0.6590847", "0.6588545", "0.6583368", "0.6582896", "0.6573547", "0.6573547", "0.6569191", "0.65634686", "0.6556132", "0.6556002", "0.65516514", "0.6545239", "0.6534126", "0.6530914", "0.65290296", "0.6519873", "0.65160865", "0.65145326", "0.6513177", "0.6504561", "0.6504384", "0.65033925", "0.6500121", "0.6493853", "0.649084", "0.64892066", "0.64872587", "0.6481804", "0.6472817", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007", "0.6471007" ]
0.0
-1
todo add a real db engine constructor adds a new Matcher, Linker and Importer
public function __construct($matcherParams, $dataSource, &$db){ $this->db = $db; $this->matcher = new Matcher($matcherParams,$db); $this->linker = new Linker($dataSource,$db); $this->importer = new Importer($db); $this->dataSource = $dataSource; $this->log("DLM created"); $this->log(print_r($this, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dbInstance();", "protected function getDatabase() {}", "private function __construct() {\n $connections = array(\n array(\n \"language\"=>\"de\",\n \"host\"=>\"\",\n \"db\"=>\"\",\n \"username\"=>\"\",\n \"password\"=>\"\"\n ),\n array(\n \"language\"=>\"en\",\n \"host\"=>\"\",\n \"db\"=>\"\",\n \"username\"=>\"\",\n \"password\"=>\"\"\n )\n );\n // Define Default Connection\n ORM::configure('mysql:host='.$connections[0][\"host\"].';dbname='.$connections[0][\"db\"]);\n ORM::configure('username', $connections[0][\"username\"]);\n ORM::configure('password', $connections[0][\"password\"]);\n ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n\n // Define Connections for Languages\n foreach($connections as $connection) {\n ORM::configure('mysql:host='.$connection[\"host\"].';dbname='.$connection[\"db\"], null, $connection[\"language\"]);\n ORM::configure('username', $connection[\"username\"], $connection[\"language\"]);\n ORM::configure('password', $connection[\"password\"], $connection[\"language\"]);\n ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), $connection[\"language\"]);\n }\n }", "public function getDb();", "abstract protected function initDB();", "function __construct($engine, $host, $database, $user, $password, $port = \"\") {\n\n $this->conn = $this->connect($engine, $host, $database, $user, $password, $port);\n\n $this->engine = $engine;\n $this->host = $host;\n $this->port = $port;\n $this->database = $database;\n $this->user = $user;\n $this->password = $password;\n\n }", "function augmentDatabase() {\r\n\t}", "public function database();", "public function initDatabaseStructure( );", "function MetaDatabases() {}", "protected function __construct()\n {\n try {\n \t\t$this->connection = new PDO('sqlite:database/LTWProj.db');\n \t\t$this->connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n \t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\tfunction my_sqlite_regexp($x, $y){\n\t\t\treturn (int)preg_match('/'.$y.'/', $x);\n\t\t}\n\t\t$this->connection->sqliteCreateFunction('regexp','my_sqlite_regexp',2);\n \t\t} catch (PDOException $e) {\n \t\t\tdie($e->getMessage());\n \t\t}\n }", "public function getDatabaseHandler();", "function __construct()\n {\n $this->_db = DB::getInstance();\n }", "public function __construct() {\r\n /* * * maybe set the db name here later ** */\r\n }", "public function Database() {\n\t\tglobal $database_dsn, $cache_dsn;\n\n\t\tif(substr($database_dsn, 0, 5) == \"mysql\") {\n\t\t\t$this->engine = new MySQL();\n\t\t}\n\t\telse if(substr($database_dsn, 0, 5) == \"pgsql\") {\n\t\t\t$this->engine = new PostgreSQL();\n\t\t}\n\t\telse if(substr($database_dsn, 0, 6) == \"sqlite\") {\n\t\t\t$this->engine = new SQLite();\n\t\t}\n\n\t\t$this->db = @NewADOConnection($database_dsn);\n\n\t\tif(isset($cache_dsn) && !empty($cache_dsn)) {\n\t\t\t$matches = array();\n\t\t\tpreg_match(\"#(memcache|apc)://(.*)#\", $cache_dsn, $matches);\n\t\t\tif($matches[1] == \"memcache\") {\n\t\t\t\t$this->cache = new MemcacheCache($matches[2]);\n\t\t\t}\n\t\t\telse if($matches[1] == \"apc\") {\n\t\t\t\t$this->cache = new APCCache($matches[2]);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$this->cache = new NoCache();\n\t\t}\n\n\t\tif($this->db) {\n\t\t\t$this->db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t\t$this->engine->init($this->db);\n\t\t}\n\t\telse {\n\t\t\t$version = VERSION;\n\t\t\tprint \"\n\t\t\t<html>\n\t\t\t\t<head>\n\t\t\t\t\t<title>Internal error - Shimmie-$version</title>\n\t\t\t\t</head>\n\t\t\t\t<body>\n\t\t\t\t\tInternal error: Could not connect to database\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\t\t\texit;\n\t\t}\n\t}", "public function __construct(string $database) {}", "function __construct (DatabaseEngine $db, $id = null) {\n $this->setDatabase($db);\n\n if ($id) {\n $this->id = $id;\n $this->load_from_database();\n }\n }", "public function __construct()\r\n {\r\n require_once 'libs/db.php';\r\n $this->db = Db::singleton();\r\n }", "private function initDatabase() {\n \n \n \n }", "function getDatabase();", "public function __construct() {\n $this->dbName = new DataBase($this->db);\n }", "public function __construct() {\n\t\t$this->db = getDatabase();\n\t}", "public function __construct() {\n $this->_db = DB::getInstance();\n }", "public function __construct()\n {\n /*\n * Since this is the trial project, I've used simple ORM redbean(https://github.com/gabordemooij/redbean). Instead we can use more standatfs & stable one like doctrine or Illuminate\n */\n R::setup(\"pgsql:dbname=hellofresh;host=postgres\", \"hellofresh\", \"hellofresh\");\n }", "public function __construct()\n {\n $this->_db = new \\DbHandler();\n }", "protected function createDatabaseStructure() {}", "public function __construct()\n\t{\n\t\t$this->db = IEM::getDatabase();\n\t}", "public function __construct( \\Aimeos\\MW\\DB\\Manager\\Iface $dbm, $rname, $dbname, $name );", "public function __construct()\n {\n\t$dibiConfig= dibi::getConnection()->getConfig();\n\t$dbname= isset($dibiConfig['dbname']) ? $dibiConfig['dbname'] : $dibiConfig['database'];\n\t$config= array(\n\t 'driver' => 'sqlite',\n\t 'profiler' => Environment::getConfig('perform')->storage_profiler,\n\t 'database' => realpath(Environment::getConfig('perform')->modelCache) . '/'. $dbname .'-storage.sdb',\n\t);\n\tparent::__construct($config, 'storage');\n\n\tif ( !$this->getDatabaseInfo()->hasTable('fields'))\n\t{\n\t $this->query('CREATE TABLE [fields] ([id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL, [table] VARCHAR(50) NOT NULL,\n\t\t[hash] VARCHAR(32) NOT NULL, [type] VARCHAR(50));\n\t\tCREATE UNIQUE INDEX [fields_idx] on [fields] ( [name], [table]);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('tables'))\n\t{\n\t $this->query('CREATE TABLE [tables] ( [id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL UNIQUE, [hash] VARCHAR(32) NOT NULL);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('views'))\n\t{\n\t $this->query('CREATE TABLE [views] ( [id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL UNIQUE, [hash] VARCHAR(32) NOT NULL);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('indexes'))\n\t{\n\t $this->query('CREATE TABLE [indexes] ([id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL, [table] VARCHAR(50) NOT NULL,\n\t\t[hash] VARCHAR(32) NOT NULL, [unique] BOOLEAN);\n\t\tCREATE UNIQUE INDEX [indexes_idx] on [indexes] ( [name], [table]);');\n\t}\n }", "public function __construct() {\n\t\t$this->db = DB::getInstance();\n\t}", "protected function _setupDatabaseAdapter()\n {\n $zl = Zend_Registry::get('Zend_Locale');\n $this->_db = Zend_Registry::get('db4');\n\n parent::_setupDatabaseAdapter();\n }", "public function __construct(){\n $this->_db = DB::getInstance();\n }", "public function __construct()\n {\n $this->db = Db::getInstance();\n }", "public function __construct() {\n $this->db = database::getInstance();\n }", "public function __construct(){\r\n \r\n $this->db = parent::getInstance(); \r\n }", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "public function __construct() {\r\n $this->db = new Database;\r\n }", "public function __construct()\n\t\t{\n\t\t\t$this->_db = new Database();\n\t\t}", "public function __construct()\n\t{\n\t\t$this->dbInfo = new DbInfo();\n\t}", "protected function initDatabaseRecord() {}", "public function __construct() {\n\t\t$this->_db = Database::getInstance();\n\t}", "function __construct($engine, $params)\n {\n }", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct()\n {\n $this->connection = \\DB::connection();\n $this->grammar = new Grammar;\n }", "public static function init() {\n\t\tself::$_db = Storage::get('objects.database');\n\t}", "public function __construct() {\r\n\t\t$this->_db = new DAL();\r\n\t}", "public function __construct()\n {\n // check if database exists, if not we create it\n try {\n $this->db = new PDO('sqlite:' . dirname(__FILE__) . '/engine.sqlite');\n $this->db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // ERRMODE_WARNING | ERRMODE_EXCEPTION | ERRMODE_SILENT\n } catch (Exception $e) {\n echo \"Cannot access to SQLite DB : \" . $e->getMessage();\n die();\n }\n }", "public function __construct()\n\t{\n\t\t$this->database = new Database();\n\t\t\n\t\tif ($this->trace)\n\t\t\t$this->database->activateTrace();\n\t}", "abstract protected function load(Connection $db);", "function __construct() {\n include_once '/var/www/engine/db_connect.php';\n // connecting to database\n $this->db = new DB_Connect();\n $this->db->connect();\n }", "function __construct()\n {\n $this->dataBase = new Database(\n Conf::get('pkg_db_host'),\n Conf::get('pkg_db_port'),\n Conf::get('pkg_db_user'),\n Conf::get('pkg_db_password'),\n Conf::get('pkg_db_name'),\n Conf::get('pkg_db_usefav_table'));\n }", "function class_ad(){\r\n // at the same time - db_user / db_password / db_name / db_host\r\n $this->db = new ezSQL_mysql(DATABASE_USER,DATABASE_PASSWORD, DATABASE_NAME, DATABASE_HOST);\r\n }", "public function __construct( )\n {\n if( defined( 'DB_USER' ) )\n {\n if( strlen( DB_USER ) > 0 && strlen( DB_PASS ) > 0 && strlen( SQLITE_FILE ) > 0 )\n {\n throw new Exception('You must specify at least one valid database type!');\n }\n \n if( ( strlen( DB_USER ) > 0 || strlen( DB_PASS ) > 0 ) && strlen( SQLITE_FILE ) > 0 )\n {\n throw new Exception('Only ONE database type can be specified!');\n }\n }\n try\n {\n if( strlen( DB_USER ) > 0 && strlen( DB_PASS ) > 0 )\n {\n $this->dbh = new PDO('mysql:dbname='. DB_NAME .';host='. DB_HOST,\n DB_USER, DB_PASS, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n }\n else\n {\n $sqlite_file = SYS_PATH . CHEV_SEP .'database'. CHEV_SEP . SQLITE_FILE .'.sdb';\n $this->dbh = new PDO('sqlite:'. $sqlite_file, '', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n }\n }\n catch(PDOException $e)\n {\n echo 'Database Error: '. $e->getMessage();\n exit();\n }\n }", "public function __construct(){\n $this->db = DB::getInstance();\n }", "function DbSimpleInstance($data = array())\n{\n if(!count($data)) {\n $data = systemConfig::$db['default'];\n }\n fileLoader::load(\"/libraries/DbSimple/Generic\");\n\n $db = DbSimple_Generic::connect(\"mysql://\" . $data['user'] . \":\" . $data['password'] . \"@\" . $data['host'] . \"/\" . $data['dbname']);\n if(!$db) {\n return false;\n }\n $db->query(\"SET NAMES `utf8`\");\n $db->setErrorHandler('databaseConsoleErrorHandler');\n return $db;\n}", "function Base(){\n\t\t$this->db = new Database($this->databaseHost,$this->database,$this->username,$this->password);\t\n\t}", "public function __construct() {\n $this->db = SPDO::singleton();\n }", "function __construct(){\n\t\t\t$this->db = new Database();\n\t\t}", "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "public function __construct()\n\t{\n\t\t$this->db = new Database();\n\t}", "function db($keyword, $reset = false) {\n $instant = $this->indexing($keyword);\n\n /*\n * init instant\n */\n if(!isset($this->instant[$instant])) {\n // check DB Files ready or not\n $createTable = false;\n if(!file_exists($this->path.DIRECTORY_SEPARATOR.\"db\".$instant) || $reset == true) {\n $createTable = true;\n }\n $PDO = new PDO(\"sqlite:\".$this->path.DIRECTORY_SEPARATOR.\"db\".$instant);\n $PDO->setAttribute(PDO::ATTR_ERRMODE,\n PDO::ERRMODE_EXCEPTION);\n\n if($createTable == true) {\n $this->initDB($PDO);\n }\n $this->instant[$instant] = $PDO;\n unset($PDO);\n }\n return $this->instant[$instant];\n }", "public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }", "public function __construct()\n\t{\n\t\t$this->db = MySQLdb::getInstance()->getDatabase();\n\t}", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }", "function GST_setClassDB()\n {\n if($this->DB !== FALSE)\n $this->DB->useDB('hej_G');\n }", "public function __construct()\n {\n $this->table = 'tag';\n\t\t$this->model = $db = DB::table($this->table);\n }", "public function __construct(){\n $this->db = new SQLite3(':memory:');\n //create table in db if it does now exist\n $this->db->exec('CREATE TABLE IF NOT EXISTS storage (name STRING, value INT);');\n }", "public function __construct() {\n\t\t$this->_app = Eden::i()->getActiveApp();\n\t\t$this->_database = $this->_app->getDatabase();\n\t}", "public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }", "public static function db($database);", "function __construct($db) {\r\n\t\t$this->db = $db;\r\n\t}", "public function __construct( Glossary_DB $db ) {\n\t\t$this->db = $db;\n\t}", "function __construct() {\n\t\t\t\n if ( Configurator::getField(Constants::MEGATRON_SECTION, 'usedb') == 1 ) {\n require (LIBRARIES . 'Database.php');\n\t\t\t\ttry {\n \t$this->db = new Database(Configurator::getField('Database', 'host'), Configurator::getField('Database', 'dbname'), Configurator::getField('Database', 'username'), Configurator::getField('Database', 'password'));\n\t\t\t\t}catch (PDOException $e) {\n\t\t\t\t\tthrow new MegatronException(\"Unable to find proper database. Check configuration file.\", 1);\n\t\t\t\t}\n }\n }", "public function __construct()\r\n\t{\r\n\t\t$this->db = SPDO::singleton();\r\n\t}", "private function initSqlite()\n {\n $this->connection->exec('PRAGMA foreign_keys = ON');\n\n $params = $this->connection->getParams();\n\n if (!isset($params['path'])) {\n return;\n }\n\n $this->connection->getWrappedConnection()->sqliteCreateFunction('regexp', function ($expr, $string) {\n return preg_match('{' . $expr . '}', $string);\n }, 2);\n }", "public function __construct()\n {\n $this->db = new Database;\n }", "public function __construct()\n {\n $this->db = new Database;\n }", "public function testDatabaseLoaded()\n {\n $this->assertInstanceOf('\\interview\\Database', new \\interview\\Database);\n }", "protected final function Teadaze_DBInterface($obj) {\n\t\t\n\t\tif(!$this->db)\n\t\t\t$this->db = DBO::init();\n\n\t\t$obj->setDatabase($this->db);\n\t}", "function __construct() {\n $root = realpath($_SERVER[\"DOCUMENT_ROOT\"]);\n include(\"$root/cagelovers/src/cfg/dbconfig.php\");\n parent::__construct($dbhost, $dbuser, $dbpass, $dbname);\n parent::select_db($dbname);\n }", "public function db()\n {\n if ($this->db!=='_' && $this->db!=='default')\n {\n\n if (!$this->_def_cnf)\n {\n// $this->_def_cnf=Mongo_Database::instance('default')->config();\n// $this->_def_cnf['database']=$this->db;\n\n }\n return engine::mongo($this->db);\n// return Mongo_Database::instance($this->db,$this->_def_cnf);\n }\n return engine::mongo($this->db);\n }", "public function __construct()\r\n {\r\n if (! extension_loaded('SQLite'))\r\n {\r\n throw new Exception(\"could not find SQLite extension\");\r\n }\r\n\r\n $this->_conn = new SQLiteDatabase(\":memory:\");\r\n\r\n $this->_conn->queryExec('PRAGMA short_column_names = ON');\r\n $this->_conn->createFunction('lpad', array($this, 'lpad'), 3);\r\n $this->_conn->createFunction('now', array($this, 'now'));\r\n $this->_conn->createFunction('field', array($this, 'field'));\r\n }", "public function __construct(){\n $this->db = new Database;\n }", "public function __construct()\n\t{\n\n\t\ttry {\n\n\t\t\t$dsn = sprintf(\n\t\t\t\t'mysql:dbname=%s;host=%s;charset=utf8;',\n\t\t\t\tself::$dsn['database'],\n\t\t\t\tself::$dsn['hostname']\n\t\t\t);\n\n\t\t\tparent::__construct(\n\t\t\t\t$dsn,\n\t\t\t\tself::$dsn['username'],\n\t\t\t\tself::$dsn['password'],\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t);\n\n\t\t} catch (PDOException $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}//end try\n\n\t\tif (array_key_exists('cachelvl', self::$dsn) === false) {\n\n\t\t\tself::$dsn['cachelvl'] = self::CACHE_NORMAL;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Legacy fallback to prevent old applications from crashing.\n\t\t\tif (class_exists('Cache') === false) {\n\n\t\t\t\tinclude_once __DIR__.'/Cache.class.php';\n\n\t\t\t}\n\n\t\t\t$this->_cache = Cache::loadEngine('Memcached');\n\t\t\t$this->connections++;\n\n\t\t} catch (Exception $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}\n\n\t}", "public static function init()\n {\n $connection = new Connection(\"mysql:host={$_ENV['DB_HOST']};dbname={$_ENV['DB_NAME']}\", $_ENV['DB_USER'], $_ENV['DB_PASS']);\n return new Database($connection);\n }", "private function initActiveRecord() {\n \n require_once (Quantum::QUANTUM_ROOT.'system/lib/activerecord/ActiveRecord.php');\n \n ActiveRecord\\Config::initialize(function($cfg)\n {\n $cfg->set_model_directory(Quantum::QUANTUM_ROOT.'system/models');\n $cfg->set_connections(array('development' => 'mysql://'.Quantum::DATABASE_USER.':'.Quantum::DATABASE_PASS.'@'.Quantum::DATABASE_HOST.'/'.Quantum::DATABASE_NAME.''));\n });\n \n \n }", "public function DBDriver()\n\t{\n\t\t$_SESSION['queries'] = 0; // for DEBUG ONLY and to be removed or handled more priopriate way!\n\t\t$this->loadDBProperties();\n\t\t$this->connect();\n\t}", "private function make_db() {\n ee()->load->dbforge();\n $fields = array(\n 'id' => array('type' => 'varchar', 'constraint' => '32'),\n 'access' => array('type' => 'integer', 'constraint' => '10', 'unsigned' => true),\n 'data' => array('type' => 'text')\n );\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n ee()->dbforge->create_table($this->table_name);\n\n return true;\n }", "public function __construct() {\n parent::__construct();\n\n //kapcsolódás a db-hez:\n $this->db = db_connect();\t//\\Config\\Database::connect();\n $this->builder = $this->db->table(\"feladatok\");\n\n }", "public function __construct(){\n //autoloading\n $this->db = new \\Konekta();\n\n }", "public static function connect() {\n $databaseConfig = Config::getDatabase();\n $databaseClass = $databaseConfig['class'];\n $databaseFile = SRC.'lib/db/databases/'.$databaseClass.'.php';\n if (!file_exists($databaseFile)) {\n throw new SynopsyException(\"Database class file '$databaseFile' doesn't exist!\");\n }\n require_once($databaseFile);\n $c = \"\\Synopsy\\Db\\Databases\\\\$databaseClass\";\n self::$instance = new $c();\n if (!self::$instance instanceof DatabaseInterface) {\n throw new SynopsyException(\"Database class '$databaseClass' doesn't implement DatabaseInterface interface!\");\n }\t\n self::$instance->connect($databaseConfig);\n }", "public function __construct()\n {\n $this->_idField = $this->getIdField();\n $this->_tableName = $this->getTableName();\n\n if (!static::$_db) {\n static::$_db = Database::getInstance();\n }\n\n if (!static::$_schema) {\n static::$_schema = new Cache();\n }\n }", "function __construct($db) {\n $this->db = $db;\n }", "public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }", "public function loadDatabase(){\n $table = new Table('Textarea_Widgets');\n $table->add_column('Title', 'text');\n $table->add_column('Content', 'text');\n $table->add_column('WidgetName', 'text');\n $table->create();\n }", "public function __construct() {\n $this->_db = DB::connect();\n }", "public function ormObject();", "private function openDb() {\n if(!$this->db) {\n $this->db = new Db();\n }\n }", "function __construct()\n {\n parent::__construct(self::$dbName);\n }" ]
[ "0.6931592", "0.64533186", "0.64312094", "0.6274264", "0.62727153", "0.6228688", "0.62284595", "0.6226049", "0.61347044", "0.6110398", "0.61015683", "0.6074148", "0.60604477", "0.60505843", "0.6035937", "0.600771", "0.599861", "0.5997057", "0.5980153", "0.59577036", "0.59572375", "0.59568834", "0.5952836", "0.594025", "0.5935258", "0.5915274", "0.59122014", "0.59050053", "0.59040284", "0.58985364", "0.5884759", "0.58763355", "0.5869698", "0.5869313", "0.5857979", "0.5852801", "0.5849466", "0.5839365", "0.58378786", "0.5835002", "0.5834423", "0.58320063", "0.5820389", "0.5814067", "0.58072543", "0.5806853", "0.58060765", "0.5801653", "0.5796997", "0.5791807", "0.5790694", "0.5790287", "0.5787662", "0.57821465", "0.5768254", "0.5766934", "0.5766523", "0.5758672", "0.57586646", "0.5747649", "0.5745401", "0.57403576", "0.57303727", "0.5730222", "0.5722656", "0.57192785", "0.57090765", "0.5705901", "0.5698874", "0.56967735", "0.5676979", "0.5676363", "0.567446", "0.56734276", "0.56687117", "0.56576407", "0.5652182", "0.5652182", "0.56513876", "0.56512123", "0.56477344", "0.56474257", "0.56451666", "0.5644935", "0.56436265", "0.56425595", "0.56368005", "0.5635497", "0.5630673", "0.56280136", "0.56260043", "0.5624598", "0.5618723", "0.56169885", "0.561333", "0.5611217", "0.56108034", "0.5603749", "0.5601448", "0.5600422" ]
0.5913206
26
Imports the reference list
public function importRefData($source){ //importing data into db $this->log("importing ref: $source..."); $res = $this->importer->importCsv($source); $this->log("import finished : \n".print_r($res, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function importReferences()\n {\n $queue = $this->head_responses;\n\n //while has items in the queue\n while (count($queue)) {\n $this->iterateQueue($queue);\n }\n }", "public function getImports();", "public function import();", "public function getImported();", "public function import()\n {\n \n }", "function imports($files = array(), &$data = array())\r\n\t{\r\n\t\t\r\n\t}", "function get_importers()\n {\n }", "protected function initializeImport() {}", "public function import(): void;", "protected function initializeCommonReferences() {}", "public function getReferencesList(){\n return $this->_get(1);\n }", "public function getReferences();", "private static function referenceAll() {\r\n\t\tforeach (self::$global as $type) {\r\n\t\t\t$type->reference();\r\n\t\t}\r\n\t}", "public function importedObjects()\n {\n $this->assertImportsSupport();\n if ($this->importedObjects === null) {\n $this->importedObjects = array();\n foreach ($this->imports()->listImportNames() as $import) {\n $this->importedObjects[$import] = $this->loadImportedObject($import);\n }\n }\n\n return $this->importedObjects;\n }", "private function getImportList($path)\n {\n $this->files = File::files($path);\n }", "protected function importInstructions()\n {\n return [];\n }", "public function populateAsReference()\n {\n\n $orm = $this->db->getOrm();\n\n // Reference Container zum befüllen der Referenz Datensätze\n $refContainers = array();\n\n // Sicher stelle, das keine unerwarteten Daten in der Tabelle sind\n $orm->cleanResource('WbfsysRoleGroup');\n\n // Leeren des Caches\n $orm->clearCache();\n\n // global\n $orm->import\n (\n 'WbfsysRoleGroup',\n array\n (\n array\n (\n 'name' => 'name_1',\n 'access_key' => 'access_key_1',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipisici elit,\nsed eiusmod tempor incidunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\naliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt\nmollit anim id est laborum.'\n ),\n )\n );\n\n }", "private function includes() {\n\t\trequire_once( PRODUCT_LIST_DIR . 'classes/class-product_list.php' );\n\t\t//require_once( PRODUCT_LIST_DIR . 'classes/class-yc_admin_cursos-settings.php' );\n\t}", "public static function getImports()\n\t{\n\t\t$db = get_db();\n\t\t$it = $db->getTable('CsvImport_Import');\n\t\t$s = $it->getSelect()->where('1')->order('added DESC');\n\t\t$imports = $it->fetchObjects($s, array());\n return $imports;\n\t}", "public function import()\n {\n $importer = app('importers-'.$this->type);\n\n // Delete events from previous imports.\n $this->events()->delete();\n\n // Retrieve and store events from calendar.\n $this->events()->saveMany($importer->get($this->url, $this->start_date, $this->end_date));\n }", "function import( $source, $back_url ) {\n\t\n\t}", "public function testImport()\n {\n \n $arrLists = array();\n \n $arrLists[]['name'] = \"Army\";\n $arrLists[]['name'] = \"Companies\";\n $arrLists[]['name'] = \"CEOs\";\n \n $ret =\\App\\Providers\\ListsServiceProvider::importData($arrLists);\n \n $this->assertNotEquals(0 ,$ret);\n }", "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "public function prepareImport();", "function loadImportString($refer_string)\r\n {\r\n if (is_string($refer_string))\r\n {\r\n\t\t $this->referString = explode(\"\\n\",$refer_string);\r\n\t\t $risArray = explode(\"\\r\", $refer_string);\r\n\t\t if (count($risArray) > count($this->referString))\r\n\t\t $this->referString = $risArray;\r\n }\r\n else\r\n {\r\n $this->referString = $refer_string;\r\n }\r\n $this->currentLine = 0;\r\n }", "public function imports()\n {\n return $this->hasMany(Import::class);\n }", "protected function getImports(): array\n\t{\n\t\t$imports = [];\n\n\t\tif ($model = $this->getModel()) {\n\t\t\t$imports[] = 'use ' . $this->qualifyModel($model) . ';';\n\t\t}\n\n\t\treturn $imports;\n\t}", "public function checkImportPrerequisites() {}", "public function resolveReferences($items);", "public function getImportLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\n\t\t\t\n return $links;\n }", "public static function import_process() {}", "private static function xrefs() {\n\t\t$modules = self::pw('modules');\n\t\t$xrefs = new WireData();\n\t\t$xrefs->cxm = $modules->get('XrefCxm');\n\t\t$xrefs->upcx = $modules->get('XrefUpc');\n\t\treturn $xrefs;\n\t}", "function bfImport() {\n\t\t$this->__construct();\n\t}", "public function importBranches()\n {\n // $Formulas->importFormulas();\n // $FormulaRows = new \\App\\SImportations\\SImportFormulaRows($this->sHost);\n // return $FormulaRows->importFormulaRows();\n $branch = new SImportBranches($this->sHost);\n return $branch->importBranches();\n }", "public function get_application_platform_import_links()\r\n {\r\n return array();\r\n }", "public function getImport()\n {\n // Display a view and let the Ajax-controller again handle the file collection\n $dummyRef = new Reference();\n return view('references.form', [\"types\" => $dummyRef->getTypes()]);\n }", "function import_libraries(){\n\t//require_once('xajax/xajax_core/xajax.inc.php');\n\t//require_once('ajax/ajax_functions.php');\n}", "public function import(\\RecursiveIteratorIterator $files, OutputInterface $output);", "abstract function export( array $references);", "public function import()\n {\n // Reorder importers\n usort($this->entityImporterMappings, function ($a, $b) {\n return $a[ORDER] <=> $b[ORDER];\n });\n\n // Import each entity type in turn\n foreach ($this->entityImporterMappings as $entityImporterMapping) {\n $files = $this->directoryReader->getFileNameMappings($entityImporterMapping[self::DIRECTORY]);\n foreach ($files as $filename => $slug) {\n $fileContents = file_get_contents($filename);\n $entityData = json_decode($fileContents, true);\n $entityImporterMapping[self::IMPORTER]->importEntity($slug, $entityData);\n }\n }\n }", "private function import_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Import/Export', 'formidable' ) . '</h3>'\n\t\t\t . '<p>' . __( 'Import and export forms and styles when copying from one site to another or sharing with someone else. Your entries can be exported to a CSV as well. The Premium version also includes the option to import entries to your site from a CSV.', 'formidable' ) . '</p>',\n\t\t\t'prev_page' => 'styles',\n\t\t\t'next_page' => 'settings',\n\t\t\t'selector' => '.inside.with_frm_style',\n\t\t\t'position' => array( 'edge' => 'bottom', 'align' => 'top' ),\n\t\t);\n\t}", "function provide_import() {\n return true;\n }", "function loadImportingData()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function includeLL() {}", "public function includeLL() {}", "function import_data() {\n\t\t$sync_tables = $this->config->item('sync_tables');\n\n\t\t$this->db_tools->import_data( $sync_tables );\n\t\t$this->db_tools->echo_import_data();\n\t}", "public function processSoftReferences() {}", "public function getDependenciesList();", "function _initial_import()\n {\n global $_CONF, $_TABLES, $LANG_SX00, $_SPX_CONF;\n\n if (ini_get('allow_url_fopen')) {\n $blacklist = file($_SPX_CONF['mtblacklist_url']);\n $count = $this->_do_import($blacklist);\n\n if ($count > 0) {\n $display = sprintf($LANG_SX00['import_success'], $count);\n SPAMX_log($LANG_SX00['uMTlist'] . $LANG_SX00['uMTlist2']\n . $count . $LANG_SX00['uMTlist3'] . '0'\n . $LANG_SX00['entries']);\n } else {\n $display = $LANG_SX00['import_failure'];\n }\n } else { // read blacklist from local file\n $fromfile = $_CONF['path_data'] . 'blacklist.txt';\n\n if (file_exists($fromfile)) {\n $blacklist = file($fromfile);\n $count = $this->_do_import($blacklist);\n\n if ($count > 0) {\n $display = sprintf($LANG_SX00['import_success'], $count);\n SPAMX_log($LANG_SX00['uMTlist'] . $LANG_SX00['uMTlist2']\n . $count . $LANG_SX00['uMTlist3'] . '0'\n . $LANG_SX00['entries']);\n } else {\n $display = $LANG_SX00['import_failure'];\n }\n } else {\n $display = sprintf($LANG_SX00['allow_url_fopen'],\n $_CONF['path_data']);\n $display .= '<p>'. COM_createLink($_SPX_CONF['mtblacklist_url'],\n $_SPX_CONF['mtblacklist_url']);\n }\n }\n\n // Import Personal Blacklist for existing users.\n $fromfile = $_CONF['path_html'] . 'spamx/blacklist.php';\n if (file_exists($fromfile)) {\n require_once $fromfile;\n $count = $this->_do_importp($SPAMX_BLACKLIST);\n $display .= $LANG_SX00['initial_Pimport'];\n if ($count > 0) {\n $display .= sprintf($LANG_SX00['import_success'], $count);\n SPAMX_log($LANG_SX00['uPlist'] . $LANG_SX00['uMTlist2']\n . $count . $LANG_SX00['uMTlist3'] . '0'\n . $LANG_SX00['entries']);\n } else {\n $display .= $LANG_SX00['import_failure'];\n }\n }\n\n return $display;\n }", "function w3tc_cdn_import_library() {\n\t\t$w3_plugin_cdn = Dispatcher::component( 'Cdn_Core_Admin' );\n\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\n\t\t$cdn = $common->get_cdn();\n\n\t\t$total = $w3_plugin_cdn->get_import_posts_count();\n\t\t$cdn_host = $cdn->get_domain();\n\n\t\t$title = __( 'Media Library import', 'w3-total-cache' );\n\n\t\tinclude W3TC_INC_DIR . '/popup/cdn_import_library.php';\n\t}", "public function getLocalMirrorListFile() {}", "public static function import_locations() {\n\t\t$data_to_import = FrmAppHelper::get_post_param( 'frm_import_files', '', 'sanitize_title' );\n\n\t\t$form = FrmForm::getOne( 'frm_loc_list' );\n\t\tif ( ! $form ) {\n\t\t\t$file = dirname( dirname( __FILE__ ) ) . '/templates/locations-forms.xml';\n\t\t\tFrmXMLHelper::import_xml( $file );\n\t\t}\n\n\t\t$opts = get_option( 'frm_usloc_options' );\n\t\t$remaining = self::remaining_count( $opts, $data_to_import );\n\n\t\tinclude dirname( dirname( __FILE__ ) ) . '/views/importing_page.php';\n\t}", "function _manually_load_importer() {\n\tif ( ! class_exists( 'WP_Import' ) ) {\n\t\trequire dirname( dirname( __FILE__ ) ) . '/src/wordpress-importer.php';\n\t}\n}", "public function getShortcutImports(): array\n {\n return $this->config['modelShortcut']['imports'];\n }", "protected function getReferences()\n {\n $extensions = $this->extensionRepository->findByHasSphinxDocumentation();\n $references = array();\n foreach ($extensions as $extension) {\n $typeLabel = $this->translate('extensionType_' . $extension->getInstallType());\n $references[$typeLabel]['EXT:' . $extension->getExtensionKey()] = sprintf('[%2$s] %1$s', $extension->getTitle(), $extension->getExtensionKey());\n }\n\n $this->signalSlotDispatcher->dispatch(\n __CLASS__,\n 'afterInitializeReferences',\n array(\n 'references' => &$references,\n )\n );\n\n foreach (array_keys($references) as $key) {\n asort($references[$key]);\n }\n\n return $references;\n }", "private function parse_references()\n {\n if($html = Functions::lookup_with_cache($this->page['taxa_refs'], $this->download_options)) {\n if(preg_match_all(\"/im_field_taxonomic_name%3A(.*?)\\\"/ims\", $html, $arr)) {\n $total = count($arr[1]); $i = 0;\n // print_r($arr[1]); exit;\n foreach($arr[1] as $taxon_id) {\n $i++; echo \"\\ntaxon [$taxon_id]: $i of $total\\n\";\n $taxon_refs = self::get_taxon_refs($taxon_id);\n self::write_taxon_refs($taxon_refs, $taxon_id);\n // print_r($refs); exit(\"\\nstopx 100\\n\");\n // if($i == 1) break; //debug only\n }\n }\n }\n }", "public function import($listId,$params,$file)\n {\n $this->endpoint = 'lists/'.$listId.'/import';\n return $this->call('POST',$this->endpoint,$params,$file);\n }", "function import(array $data);", "function import_front_end($import_type, $imports)\n{\n\n foreach ($imports as $key => $import) {\n switch ($import_type) {\n case 'css':\n drupal_add_css($import['path'], $import['options']);\n break;\n case 'js_inline':\n case 'js':\n drupal_add_js($import['path'], $import['options']);\n break;\n }\n }\n\n\n}", "protected function init_bulkactions(){\r\n\t\t\tif ( file_exists( $this->include_path . '/Bulk' ) ) {\r\n\t\t\t\t$Directory = new RecursiveDirectoryIterator( $this->include_path . '/Bulk' );\r\n\t\t\t\t$Iterator = new RecursiveIteratorIterator( $Directory );\r\n\t\t\t\t$Regex = new RegexIterator( $Iterator, '/^.+\\.php$/i', RecursiveRegexIterator::GET_MATCH );\r\n\t\t\t\t$include_array = array();\r\n\t\t\t\t$rc = new ReflectionClass( $this );\r\n\t\t\t\tforeach ( $Regex as $name => $obj ) {\r\n\t\t\t\t\t$name = str_replace($this->include_path . '/Bulk/', '', $name);\r\n\t\t\t\t\t$name = str_replace( ['.php', '/'], ['', '\\\\'], $name );\r\n\t\t\t\t\t$namespace = $rc->getNamespaceName();\r\n\t\t\t\t\tarray_push( $include_array, $namespace . '\\\\Bulk\\\\' . $name );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tforeach ( $include_array as $bulk ) {\r\n\t\t\t\t\tnew $bulk();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function import($value, $entry_id = null)\n {\n // Import reference link:\n // Get the correct ID of the related fields\n $related_field = Symphony::Database()->fetchVar('related_field_id', 0, 'SELECT `related_field_id` FROM `tbl_fields_referencelink` WHERE `field_id` = ' . $this->field->get('id'));\n $data = $this->field->processRawFieldData(explode(',', $value), $this->field->__OK__);\n $related_ids = array('relation_id'=>array());\n foreach ($data['relation_id'] as $key => $relationValue)\n {\n $related_ids['relation_id'][] = Symphony::Database()->fetchVar('entry_id', 0, 'SELECT `entry_id` FROM `tbl_entries_data_' . $related_field . '` WHERE `value` = \\'' . trim($relationValue) . '\\';');\n }\n return $related_ids;\n /*\n $entry->setData($associatedFieldID, $related_ids);\n $data = $this->field->processRawFieldData(explode(',', $value), $this->field->__OK__);\n return $data;\n */\n }", "public function importProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(00),\n\t\t\t\t\t'Languages' => array(11),\n\t\t\t\t\t'Messages' => array(22),\n\t\t\t\t\t'References' => array(33),\n\t\t\t\t\t'Translations' => array(44)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "protected function setupListOperation()\n {\n $this->crud->setFromDb();\n }", "protected function setupListOperation()\n {\n $this->crud->setFromDb();\n }", "public function importFrom(array $data);", "public function getModulesList();", "public function importList()\n {\n return view('backend.product.import');\n }", "public function __construct()\n {\n $this->references = new ArrayCollection();\n }", "private function load_dependencies() {\n\n\t\t$this->loader = new Service_Tracker_Loader();\n\n\t}", "protected function import(): void {\n\t\t\t$sections = $this->load_and_decode_file();\n\n\t\t\tif ( empty( $sections ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $sections as $section ) {\n\t\t\t\tLearnDash_Settings_Section::set_section_settings_all(\n\t\t\t\t\t$section['name'],\n\t\t\t\t\t$section['fields']\n\t\t\t\t);\n\n\t\t\t\t$this->processed_items_count++;\n\t\t\t\t$this->imported_items_count++;\n\t\t\t}\n\t\t}", "public function include_import_export(){\n\t\tglobal $import;\n\n\t\t// Load the Import class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-import.php' );\n\t\t$import = new VisualFormBuilder_Pro_Import();\n\t}", "function importSchema(){\n\t\t\t$this->exportsSchema = false;\n\t\t}", "public function getReferenceSetsList(){\n return $this->_get(1);\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "function register_importer() {\n\t\tglobal $wp_importers;\n\n\t\tif( ! isset( $wp_importers['wgobd_the_events_calendar'] ) ) {\n\t\t\t$wp_importers['wgobd_the_events_calendar'] = array(\n\t\t\t\t__( 'The Events Calendar → All-in-One Event Calendar', wgobd_PLUGIN_NAME ),\n\t\t\t\t__( 'Imports events created using The Events Calendar plugin into the All-in-One Event Calendar', wgobd_PLUGIN_NAME ),\n\t\t\t\tarray( &$this, 'import_the_events_calendar' )\n\t\t\t);\n\t\t}\n\t}", "function dk_speakup_loadimporter(){\n\t\tif(function_exists('dk_speakup_meta_links')){\n\t\t\tload_plugin_textdomain( 'speakupimport', false, 'speakup-email-petitions-importer/languages' );\n\t\t\tinclude_once( dirname( __FILE__ ) . '/class.importer.php' );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( 'dk_Speakup_Import', 'scripts'));\n\t\t\t\n\t\t\tadd_action('admin_menu', array( 'dk_Speakup_Import', 'menu'),1000);\n\t\t}\n\t}", "function get_urls(){\n\tglobal $urllist;\n\t$list = file($urllist);\n\t//print_r($list);\n\treturn $list;\n}", "public function include_entries(){\n\t\tglobal $entries_list, $entries_detail;\n\n\t\t// Load the Entries List class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-entries-list.php' );\n\t\t$entries_list = new VisualFormBuilder_Pro_Entries_List();\n\n\t\t// Load the Entries Details class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-entries-detail.php' );\n\t\t$entries_detail = new VisualFormBuilder_Pro_Entries_Detail();\n\t}", "public function getImportPaths()\n {\n return $this->importDirs;\n }", "public function getAllReferences()\n {\n\n return static::$references;\n\n }", "function PKG_loadPackagesList($listName,$arr)\n{\n\treturn(PKG_getClientPackages(PKG_getPackagesListMarker().$listName, \"\", $arr));\n}", "public function loadModules();", "public function register_importers() {\n include_once ( 'includes/wf_api_manager/wf-api-manager-config.php' );\n register_importer('coupon_csv', 'WooCommerce Coupons (CSV)', __('Import <strong>coupon</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_CpnImpExpCsv_Importer::coupon_importer');\n register_importer('coupon_csv_cron', 'WooCommerce Coupons (CSV)', __('Cron Import <strong>coupon</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_CpnImpExpCsv_ImportCron::coupon_importer');\n wp_enqueue_script('woocommerce-order-xml-importer', plugins_url(basename(plugin_dir_path(WF_OrderImpExpXML_FILE)) . '/js/hf_order_admin.js', basename(__FILE__)), array(), '1.0.0', true);\n }", "function import_module($import_key,$type,$imported,$install_mode){\r\n\t\t$this->import_key = $import_key;\r\n\t\t$this->type = $type;\r\n\t\t$this->imported = $imported;\r\n\t\t$this->install_mode = $install_mode;\r\n\t\t$this->mount_point = \"\";\r\n\t\t$this->mount_item = 0;\r\n\t}", "function pudla_ocdi_import_files() {\n return array(\n array(\n 'import_file_name' => 'Demo',\n 'import_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla.wordpress.xml',\n 'import_widget_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla-widgets.wie',\n 'import_customizer_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla-export.dat',\n 'preview_url' => 'http://demo.awaikenthemes.com/pudla/',\n ),\n );\n}", "public function import() {\n\n\t\t$output = array();\n\n\t\tif ($importUrl = Request::post('importUrl')) {\n\n\t\t\t// Resolve local URLs.\n\t\t\tif (strpos($importUrl, '/') === 0) {\n\n\t\t\t\tif (getenv('HTTPS') && getenv('HTTPS') !== 'off' && getenv('HTTP_HOST')) {\n\t\t\t\t\t$protocol = 'https://';\n\t\t\t\t} else {\n\t\t\t\t\t$protocol = 'http://';\n\t\t\t\t}\n\n\t\t\t\t$importUrl = $protocol . getenv('HTTP_HOST') . AM_BASE_URL . $importUrl;\n\t\t\t\tCore\\Debug::log($importUrl, 'Local URL');\n\n\t\t\t}\n\n\t\t\t$curl = curl_init(); \n \n\t\t\tcurl_setopt($curl, CURLOPT_HEADER, 0); \n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n\t\t\tcurl_setopt($curl, CURLOPT_URL, $importUrl); \n\n\t\t\t$data = curl_exec($curl); \n\t\t\t\n\t\t\tif (curl_getinfo($curl, CURLINFO_HTTP_CODE) != 200 || curl_errno($curl)) {\n\t\t\t\n\t\t\t\t$output['error'] = Text::get('error_import');\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\t$fileName = Core\\Str::sanitize(preg_replace('/\\?.*/', '', basename($importUrl)));\n\n\t\t\t\tif ($url = Request::post('url')) {\n\t\t\t\t\t$Page = $this->Automad->getPage($url);\n\t\t\t\t\t$path = AM_BASE_DIR . AM_DIR_PAGES . $Page->path . $fileName;\n\t\t\t\t} else {\n\t\t\t\t\t$path = AM_BASE_DIR . AM_DIR_SHARED . '/' . $fileName;\n\t\t\t\t}\n\n\t\t\t\tFileSystem::write($path, $data);\n\t\t\t\t$this->clearCache();\n\n\t\t\t} \n\n\t\t\tcurl_close($curl);\n\n\t\t\tif (!FileSystem::isAllowedFileType($path)) {\n\n\t\t\t\t$newPath = $path . FileSystem::getImageExtensionFromMimeType($path);\n\n\t\t\t\tif (FileSystem::isAllowedFileType($newPath)) {\n\t\t\t\t\tFileSystem::renameMedia($path, $newPath);\n\t\t\t\t} else {\n\t\t\t\t\tunlink($path);\n\t\t\t\t\t$output['error'] = Text::get('error_file_format');\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$output['error'] = Text::get('error_no_url'); \n\n\t\t}\n\n\t\treturn $output;\n\n\t}", "function provide_import() {\n return false;\n }", "public function import(string $filePath);", "public function loadCollectionReferences(Block $block): array;", "public static function ImportAll()\n {\n $logger = self::getLogger();\n\n $aErrors = array();\n // get list of import handler\n /** @var $oCsv2SqlList TdbPkgCsv2sqlList */\n $oCsv2SqlList = TdbPkgCsv2sqlList::GetList();\n $oCsv2SqlList->GoToStart();\n while ($oListItem = $oCsv2SqlList->Next()) {\n $logger->info('TPkgCsv2SqlManager: Import '.$oListItem->fieldName);\n\n $aItemErrors = $oListItem->Import();\n $aErrors = TPkgCsv2Sql::ArrayConcat($aErrors, $aItemErrors);\n }\n\n return $aErrors;\n }", "function import($files) {\n\t\tforeach ($files as $file) {\n\t\t\t$dest_dir = $this->destDir($file);\n\t\t\t$src_path = JOURNALS_FILES . $file;\n\t\t\t$dest_path = DOWNLOAD_PATH . $this->destDir($file);\n\t\t\t$this->unzip($src_path, $dest_path);\n\t\t\t$res[] = $dest_path . \"/journals.xml\";\n\t\t}\n\t\treturn $res;\n\t}", "public function importPass()\n {\n // Prepare list of objects for import\n $remoteObjects = $this->getImportableObjects();\n if ($remoteObjects === null) {\n return;\n }\n \n // Add all objects\n $updated = 0;\n $added = 0;\n $total = 0;\n $remoteCount = $remoteObjects->count();\n foreach ($remoteObjects as $remoteObject) {\n // Show progress indicator\n $this->task->progress(++$total, $remoteCount);\n\n // If allowed, detect updateable objects\n $localObject = null;\n if ($this->canUpdate() && ($localObject = $this->findMatchedLocalObject($remoteObject->ID))) {\n // Update existing object\n $this->updateLocalObject($localObject, $remoteObject);\n ++$updated;\n }\n\n // If allowed, create a new object\n // If this step has an add only strategy, then this step relies on getImportableObjects\n // to filter out objects that have already been added.\n if (empty($localObject) && $this->canAdd()) {\n // Make a new object\n $this->createLocalFromRemoteObject($remoteObject);\n ++$added;\n }\n }\n // Done!\n $this->task->message(\" * Result: {$added} added, {$updated} updated\");\n }", "function import_STE()\n{\n}", "function read_import_referentiel($lines) {\r\n // we just need it as one big string\r\n $text = implode($lines, \" \");\r\n unset( $lines );\r\n\r\n // this converts xml to big nasty data structure\r\n // the 0 means keep white space as it is (important for markdown format)\r\n // print_r it if you want to see what it looks like!\r\n $xml = xmlize( $text, 0 );\r\n\r\n\t\t// DEBUG\r\n\t\t// echo \"<br />DEBUG xml/format.php :: ligne 580<br />\\n\";\r\n\t\t// print_r($xml);\r\n\t\t// echo \"<br /><br />\\n\";\r\n\t\t// print_r($xml['referentiel']['domaine']['competence']);\r\n\t\t// print_r($xml['referentiel']['#']['domaine']['#']);\r\n\t\t// echo \"<br /><br />\\n\";\r\n\t\t// exit;\r\n\t\t$re=$this->import_referentiel($xml['referentiel']);\r\n // stick the result in the $treferentiel array\r\n \t\t// DEBUG\r\n\t\t// echo \"<br />DEBUG xml/format.php :: ligne 632\\n\";\r\n\t\t// print_r($re);\r\n return $re;\r\n }", "public function addOrderReferences(): OrderReferences\n {\n $orderReferences = new OrderReferences($this->getErrorRegistor());\n $this->orderReferences[] = $orderReferences;\n \\Logger::getLogger(\\get_class($this))->debug(\n __METHOD__.\"OrderReferences add to index \"\n );\n return $orderReferences;\n }", "function _assign_libraries($use_reference = TRUE)\n\t{\n\t\t$CI =& get_instance();\t\t\t\t\n\t\tforeach (array_keys(get_object_vars($CI)) as $key)\n\t\t{\n\t\t\tif ( ! isset($this->$key) AND $key != $this->_parent_name)\n\t\t\t{\t\t\t\n\t\t\t\t// In some cases using references can cause\n\t\t\t\t// problems so we'll conditionally use them\n\t\t\t\tif ($use_reference == TRUE)\n\t\t\t\t{\n\t\t\t\t\t$this->$key = NULL; // Needed to prevent reference errors with some configurations\n\t\t\t\t\t$this->$key =& $CI->$key;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->$key = $CI->$key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public static function loadAll();", "public function includes() {\n include_once('default/default-interface.php');\n include_once('default/default-model.php');\n include_once('default/customer-completed-order.php');\n include_once('default/customer-completed-pre-order.php');\n include_once('default/notify-import-finished.php');\n include_once('default/notify-low-balance.php');\n include_once('default/notify-preorder.php');\n include_once('default/order-error.php');\n \n include_once('prepare/class-wp-emaila-custom-post.php');\n include_once('prepare/class-wp-radio-taxonomy.php');\n include_once('prepare/class-wp-email-custom-post-generator.php');\n \n include_once('wp-send-code-mail.php');\n include_once('wp-admin-error-mail.php');\n include_once('wp-admin-general-error.php');\n include_once('wp-admin-import-finished.php');\n }", "function getModuleList($add_extravars = false)\n {\n $args->sort_index = \"module_srl\";\n $args->page = 1;\n $args->list_count = 200;\n $args->page_count = 10;\n $args->s_module_category_srl = Context::get('module_category_srl');\n\n $output = executeQueryArray('xedocs.getManualList', $args);\n ModuleModel::syncModuleToSite($output->data);\n\n if(!$add_extravars){\n return $output->data;\n }\n\n $oModuleModel = &getModel('module');\n\n foreach($output->data as $module_info){\n $extra_vars = $oModuleModel->getModuleExtraVars($module_info->module_srl);\n foreach($extra_vars[$module_info->module_srl] as $k=>$v){\n $module_info->{$k} = $v;\n }\n }\n\n return $output->data;\n }", "public function getReferences() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('references'));\n return (is_array($result)) ? reset($result) : $result;\n }" ]
[ "0.6704481", "0.6638163", "0.65488744", "0.6289623", "0.6288333", "0.6287285", "0.6109725", "0.6057138", "0.5964827", "0.58398014", "0.5793915", "0.5627003", "0.55531", "0.55467415", "0.55151784", "0.5409815", "0.53770584", "0.535747", "0.5353251", "0.5341121", "0.5325393", "0.5317226", "0.53143597", "0.5312343", "0.5307098", "0.5302609", "0.52969044", "0.5295627", "0.5283243", "0.5281503", "0.52797914", "0.5269954", "0.52695274", "0.52680516", "0.5249845", "0.52483", "0.5243903", "0.52285457", "0.5226527", "0.52250993", "0.52236843", "0.52207774", "0.5220389", "0.5189971", "0.5189971", "0.51596236", "0.51585436", "0.5133879", "0.5133006", "0.5103304", "0.50958157", "0.5089541", "0.5080917", "0.50762254", "0.50682527", "0.506488", "0.50472325", "0.5046092", "0.50399464", "0.50261337", "0.5008598", "0.50061667", "0.49816823", "0.49816823", "0.4976677", "0.49608725", "0.49595934", "0.49578792", "0.494097", "0.49375075", "0.49240908", "0.49212477", "0.491916", "0.49189678", "0.49161062", "0.49125618", "0.49007177", "0.48933947", "0.4891638", "0.48880178", "0.4886438", "0.48841485", "0.48738664", "0.48713043", "0.4869338", "0.4867793", "0.48656276", "0.4859997", "0.48586288", "0.4852624", "0.48514485", "0.48441342", "0.48428863", "0.48369393", "0.4836903", "0.48353016", "0.48318347", "0.48176482", "0.4810923", "0.48091984" ]
0.5094018
51
Imports the external list
public function importExternalData($source){ //importing data into db $this->log("importing external: $source..."); $res = $this->importer->importCsv($source); $this->log("import finished : \n".print_r($res, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function import();", "public function getImports();", "public function import()\n {\n \n }", "function get_importers()\n {\n }", "protected function initializeImport() {}", "public function getImported();", "function imports($files = array(), &$data = array())\r\n\t{\r\n\t\t\r\n\t}", "private function getImportList($path)\n {\n $this->files = File::files($path);\n }", "public function testImport()\n {\n \n $arrLists = array();\n \n $arrLists[]['name'] = \"Army\";\n $arrLists[]['name'] = \"Companies\";\n $arrLists[]['name'] = \"CEOs\";\n \n $ret =\\App\\Providers\\ListsServiceProvider::importData($arrLists);\n \n $this->assertNotEquals(0 ,$ret);\n }", "public function import(): void;", "function PKG_loadPackagesList($listName,$arr)\n{\n\treturn(PKG_getClientPackages(PKG_getPackagesListMarker().$listName, \"\", $arr));\n}", "function _initial_import()\n {\n global $_CONF, $_TABLES, $LANG_SX00, $_SPX_CONF;\n\n if (ini_get('allow_url_fopen')) {\n $blacklist = file($_SPX_CONF['mtblacklist_url']);\n $count = $this->_do_import($blacklist);\n\n if ($count > 0) {\n $display = sprintf($LANG_SX00['import_success'], $count);\n SPAMX_log($LANG_SX00['uMTlist'] . $LANG_SX00['uMTlist2']\n . $count . $LANG_SX00['uMTlist3'] . '0'\n . $LANG_SX00['entries']);\n } else {\n $display = $LANG_SX00['import_failure'];\n }\n } else { // read blacklist from local file\n $fromfile = $_CONF['path_data'] . 'blacklist.txt';\n\n if (file_exists($fromfile)) {\n $blacklist = file($fromfile);\n $count = $this->_do_import($blacklist);\n\n if ($count > 0) {\n $display = sprintf($LANG_SX00['import_success'], $count);\n SPAMX_log($LANG_SX00['uMTlist'] . $LANG_SX00['uMTlist2']\n . $count . $LANG_SX00['uMTlist3'] . '0'\n . $LANG_SX00['entries']);\n } else {\n $display = $LANG_SX00['import_failure'];\n }\n } else {\n $display = sprintf($LANG_SX00['allow_url_fopen'],\n $_CONF['path_data']);\n $display .= '<p>'. COM_createLink($_SPX_CONF['mtblacklist_url'],\n $_SPX_CONF['mtblacklist_url']);\n }\n }\n\n // Import Personal Blacklist for existing users.\n $fromfile = $_CONF['path_html'] . 'spamx/blacklist.php';\n if (file_exists($fromfile)) {\n require_once $fromfile;\n $count = $this->_do_importp($SPAMX_BLACKLIST);\n $display .= $LANG_SX00['initial_Pimport'];\n if ($count > 0) {\n $display .= sprintf($LANG_SX00['import_success'], $count);\n SPAMX_log($LANG_SX00['uPlist'] . $LANG_SX00['uMTlist2']\n . $count . $LANG_SX00['uMTlist3'] . '0'\n . $LANG_SX00['entries']);\n } else {\n $display .= $LANG_SX00['import_failure'];\n }\n }\n\n return $display;\n }", "function import(array $data);", "public static function import_process() {}", "function w3tc_cdn_import_library() {\n\t\t$w3_plugin_cdn = Dispatcher::component( 'Cdn_Core_Admin' );\n\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\n\t\t$cdn = $common->get_cdn();\n\n\t\t$total = $w3_plugin_cdn->get_import_posts_count();\n\t\t$cdn_host = $cdn->get_domain();\n\n\t\t$title = __( 'Media Library import', 'w3-total-cache' );\n\n\t\tinclude W3TC_INC_DIR . '/popup/cdn_import_library.php';\n\t}", "public function prepareImport();", "private function includes() {\n\t\trequire_once( PRODUCT_LIST_DIR . 'classes/class-product_list.php' );\n\t\t//require_once( PRODUCT_LIST_DIR . 'classes/class-yc_admin_cursos-settings.php' );\n\t}", "function w3tc_cdn_import_library_process() {\n\t\t$w3_plugin_cdn = Dispatcher::component( 'Cdn_Core_Admin' );\n\n\t\t$limit = Util_Request::get_integer( 'limit' );\n\t\t$offset = Util_Request::get_integer( 'offset' );\n\t\t$import_external = Util_Request::get_boolean( 'cdn_import_external' );\n\t\t$config_state = Dispatcher::config_state();\n\t\t$config_state->set( 'cdn.import.external', $import_external );\n\t\t$config_state->save();\n\n\t\t$count = null;\n\t\t$total = null;\n\t\t$results = array();\n\n\t\t@$w3_plugin_cdn->import_library( $limit, $offset, $count, $total, $results );\n\n\t\t$response = array(\n\t\t\t'limit' => $limit,\n\t\t\t'offset' => $offset,\n\t\t\t'count' => $count,\n\t\t\t'total' => $total,\n\t\t\t'results' => $results,\n\t\t);\n\n\t\techo json_encode( $response );\n\t}", "function import_data() {\n\t\t$sync_tables = $this->config->item('sync_tables');\n\n\t\t$this->db_tools->import_data( $sync_tables );\n\t\t$this->db_tools->echo_import_data();\n\t}", "public static function getImports()\n\t{\n\t\t$db = get_db();\n\t\t$it = $db->getTable('CsvImport_Import');\n\t\t$s = $it->getSelect()->where('1')->order('added DESC');\n\t\t$imports = $it->fetchObjects($s, array());\n return $imports;\n\t}", "function pudla_ocdi_import_files() {\n return array(\n array(\n 'import_file_name' => 'Demo',\n 'import_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla.wordpress.xml',\n 'import_widget_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla-widgets.wie',\n 'import_customizer_file_url' => 'http://demo.awaikenthemes.com/pudla/dummy-data/pudla-export.dat',\n 'preview_url' => 'http://demo.awaikenthemes.com/pudla/',\n ),\n );\n}", "public function import($listId,$params,$file)\n {\n $this->endpoint = 'lists/'.$listId.'/import';\n return $this->call('POST',$this->endpoint,$params,$file);\n }", "function import_front_end($import_type, $imports)\n{\n\n foreach ($imports as $key => $import) {\n switch ($import_type) {\n case 'css':\n drupal_add_css($import['path'], $import['options']);\n break;\n case 'js_inline':\n case 'js':\n drupal_add_js($import['path'], $import['options']);\n break;\n }\n }\n\n\n}", "function loadImportingData()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public static function ImportAll()\n {\n $logger = self::getLogger();\n\n $aErrors = array();\n // get list of import handler\n /** @var $oCsv2SqlList TdbPkgCsv2sqlList */\n $oCsv2SqlList = TdbPkgCsv2sqlList::GetList();\n $oCsv2SqlList->GoToStart();\n while ($oListItem = $oCsv2SqlList->Next()) {\n $logger->info('TPkgCsv2SqlManager: Import '.$oListItem->fieldName);\n\n $aItemErrors = $oListItem->Import();\n $aErrors = TPkgCsv2Sql::ArrayConcat($aErrors, $aItemErrors);\n }\n\n return $aErrors;\n }", "public function import()\n {\n // Reorder importers\n usort($this->entityImporterMappings, function ($a, $b) {\n return $a[ORDER] <=> $b[ORDER];\n });\n\n // Import each entity type in turn\n foreach ($this->entityImporterMappings as $entityImporterMapping) {\n $files = $this->directoryReader->getFileNameMappings($entityImporterMapping[self::DIRECTORY]);\n foreach ($files as $filename => $slug) {\n $fileContents = file_get_contents($filename);\n $entityData = json_decode($fileContents, true);\n $entityImporterMapping[self::IMPORTER]->importEntity($slug, $entityData);\n }\n }\n }", "public function getLocalExtListFile() {}", "public function importFrom(array $data);", "function spreadshop_article_list()\n{\ninclude(plugin_dir_path(__FILE__).'/spreadarticlelist.php');\n}", "public function importList()\n {\n return view('backend.product.import');\n }", "private function importReferences()\n {\n $queue = $this->head_responses;\n\n //while has items in the queue\n while (count($queue)) {\n $this->iterateQueue($queue);\n }\n }", "function import_libraries(){\n\t//require_once('xajax/xajax_core/xajax.inc.php');\n\t//require_once('ajax/ajax_functions.php');\n}", "public function import()\n {\n $importer = app('importers-'.$this->type);\n\n // Delete events from previous imports.\n $this->events()->delete();\n\n // Retrieve and store events from calendar.\n $this->events()->saveMany($importer->get($this->url, $this->start_date, $this->end_date));\n }", "protected function importInstructions()\n {\n return [];\n }", "public function importAll($listID, $importStep, $importID, $importType, $importData, $importFileName, $fieldTerminator, $fieldEncloser, $importMySQLHost, $importMySQLPort, $importMySQLUsername, $importMySQLPassword, $importMySQLDatabase, $importMySQLQuery, $addToGlobalSuppressionList, $addToSuppressionList, $mappedFields)\n\t{\n\n\t\t$command = \"Command=Subscribers.Import\";\n\t\t$listID = \"ListID=\".$listID;\n\t\t$importStep = \"ImportStep=\".$importStep;\n\t\t$importID = \"ImportID=\".$importID;\n\t\t$importType = \"ImportType=\".$importType;\n\t\t$importData = \"ImportData=\".$importData;\n\t\t$importFileName = \"ImportFileName=\".$importFileName;\n\t\t$fieldTerminator = \"FieldTerminator=\".$fieldTerminator;\n\t\t$fieldEncloser = \"FieldEncloser=\".$fieldEncloser;\n\t\t$importMySQLHost = \"ImportMySQLHost=\".$importMySQLHost;\n\t\t$importMySQLPort = \"ImportMySQLPort=\".$importMySQLPort;\n\t\t$importMySQLUsername = \"ImportMySQLUsername=\".$importMySQLUsername;\n\t\t$importMySQLPassword = \"ImportMySQLPassword=\".$importMySQLPassword;\n\t\t$importMySQLDatabase = \"ImportMySQLDatabase=\".$importMySQLDatabase;\n\t\t$importMySQLQuery = \"ImportMySQLQuery=\".$importMySQLQuery;\n\t\t$addToGlobalSuppressionList = \"AddToGlobalSuppressionList=\".$addToGlobalSuppressionList;\n\t\t$addToSuppressionList = \"AddToSuppressionList=\".$addToSuppressionList;\n\t\t$mappedFields = \"MappedFields=\".$mappedFields;\n\t\t\n\t\t$apiPath = $command\n\t\t\t\t\t\t.'&'.$listID\n\t\t\t\t\t\t.'&'.$importStep\n\t\t\t\t\t\t.'&'.$importID\n\t\t\t\t\t\t.'&'.$importType\n\t\t\t\t\t\t.'&'.$importData\n\t\t\t\t\t\t.'&'.$importFileName\n\t\t\t\t\t\t.'&'.$fieldTerminator\n\t\t\t\t\t\t.'&'.$fieldEncloser\n\t\t\t\t\t\t.'&'.$importMySQLHost\n\t\t\t\t\t\t.'&'.$importMySQLPort\n\t\t\t\t\t\t.'&'.$importMySQLUsername\n\t\t\t\t\t\t.'&'.$importMySQLPassword\n\t\t\t\t\t\t.'&'.$importMySQLDatabase\n\t\t\t\t\t\t.'&'.$importMySQLQuery\n\t\t\t\t\t\t.'&'.$addToGlobalSuppressionList\n\t\t\t\t\t\t.'&'.$addToSuppressionList\n\t\t\t\t\t\t.'&'.$mappedFields\n\t\t;\n\n\t\treturn SessionData::getSession()->getResponse($apiPath);\n\n\t}", "public function load()\n {\n\n /*\n $folder = new LibFilesystemFolder(PATH_GW.'data/bdl/');\n $files = $folder->getPlainFiles();\n\n $this->data = array();\n\n // Load als xmi Files\n foreach ($files as $file)\n if (substr($file, -3 , strlen($file)) == \"xml\")\n $this->data[] = $file;\n */\n\n $data = array();\n\n include PATH_GW.'conf/map/bdl/projects/projects.php';\n\n $this->data = $data;\n\n ksort($this->data);\n\n }", "public function importProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(00),\n\t\t\t\t\t'Languages' => array(11),\n\t\t\t\t\t'Messages' => array(22),\n\t\t\t\t\t'References' => array(33),\n\t\t\t\t\t'Translations' => array(44)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "function provide_import() {\n return true;\n }", "function _manually_load_importer() {\n\tif ( ! class_exists( 'WP_Import' ) ) {\n\t\trequire dirname( dirname( __FILE__ ) ) . '/src/wordpress-importer.php';\n\t}\n}", "public function get_application_platform_import_links()\r\n {\r\n return array();\r\n }", "function dk_speakup_loadimporter(){\n\t\tif(function_exists('dk_speakup_meta_links')){\n\t\t\tload_plugin_textdomain( 'speakupimport', false, 'speakup-email-petitions-importer/languages' );\n\t\t\tinclude_once( dirname( __FILE__ ) . '/class.importer.php' );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( 'dk_Speakup_Import', 'scripts'));\n\t\t\t\n\t\t\tadd_action('admin_menu', array( 'dk_Speakup_Import', 'menu'),1000);\n\t\t}\n\t}", "function import($files) {\n\t\tforeach ($files as $file) {\n\t\t\t$dest_dir = $this->destDir($file);\n\t\t\t$src_path = JOURNALS_FILES . $file;\n\t\t\t$dest_path = DOWNLOAD_PATH . $this->destDir($file);\n\t\t\t$this->unzip($src_path, $dest_path);\n\t\t\t$res[] = $dest_path . \"/journals.xml\";\n\t\t}\n\t\treturn $res;\n\t}", "function import( $source, $back_url ) {\n\t\n\t}", "public function includeLL() {}", "public function includeLL() {}", "public function importedObjects()\n {\n $this->assertImportsSupport();\n if ($this->importedObjects === null) {\n $this->importedObjects = array();\n foreach ($this->imports()->listImportNames() as $import) {\n $this->importedObjects[$import] = $this->loadImportedObject($import);\n }\n }\n\n return $this->importedObjects;\n }", "public static function import_locations() {\n\t\t$data_to_import = FrmAppHelper::get_post_param( 'frm_import_files', '', 'sanitize_title' );\n\n\t\t$form = FrmForm::getOne( 'frm_loc_list' );\n\t\tif ( ! $form ) {\n\t\t\t$file = dirname( dirname( __FILE__ ) ) . '/templates/locations-forms.xml';\n\t\t\tFrmXMLHelper::import_xml( $file );\n\t\t}\n\n\t\t$opts = get_option( 'frm_usloc_options' );\n\t\t$remaining = self::remaining_count( $opts, $data_to_import );\n\n\t\tinclude dirname( dirname( __FILE__ ) ) . '/views/importing_page.php';\n\t}", "function register_importer() {\n\t\tglobal $wp_importers;\n\n\t\tif( ! isset( $wp_importers['wgobd_the_events_calendar'] ) ) {\n\t\t\t$wp_importers['wgobd_the_events_calendar'] = array(\n\t\t\t\t__( 'The Events Calendar → All-in-One Event Calendar', wgobd_PLUGIN_NAME ),\n\t\t\t\t__( 'Imports events created using The Events Calendar plugin into the All-in-One Event Calendar', wgobd_PLUGIN_NAME ),\n\t\t\t\tarray( &$this, 'import_the_events_calendar' )\n\t\t\t);\n\t\t}\n\t}", "public function getImportLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\n\t\t\t\n return $links;\n }", "public function getLocalMirrorListFile() {}", "public function register_importers() {\n include_once ( 'includes/wf_api_manager/wf-api-manager-config.php' );\n register_importer('coupon_csv', 'WooCommerce Coupons (CSV)', __('Import <strong>coupon</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_CpnImpExpCsv_Importer::coupon_importer');\n register_importer('coupon_csv_cron', 'WooCommerce Coupons (CSV)', __('Cron Import <strong>coupon</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_CpnImpExpCsv_ImportCron::coupon_importer');\n wp_enqueue_script('woocommerce-order-xml-importer', plugins_url(basename(plugin_dir_path(WF_OrderImpExpXML_FILE)) . '/js/hf_order_admin.js', basename(__FILE__)), array(), '1.0.0', true);\n }", "function import_module($import_key,$type,$imported,$install_mode){\r\n\t\t$this->import_key = $import_key;\r\n\t\t$this->type = $type;\r\n\t\t$this->imported = $imported;\r\n\t\t$this->install_mode = $install_mode;\r\n\t\t$this->mount_point = \"\";\r\n\t\t$this->mount_item = 0;\r\n\t}", "private function loadData(): void\n {\n $modules = BackendExtensionsModel::getModules();\n\n // split the modules in 2 separate data grid sources\n foreach ($modules as $module) {\n if ($module['installed']) {\n $this->installedModules[] = $module;\n } else {\n $this->installableModules[] = $module;\n }\n }\n }", "private static function load_files() {\n\t\t\t// Classes.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/class-astra-ext-advanced-headers-data.php';\n\t\t\t// Load Astra Breadcrumbs.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/astra-breadcrumbs.php';\n\t\t}", "public static function loadAll();", "protected function getImports(): array\n\t{\n\t\t$imports = [];\n\n\t\tif ($model = $this->getModel()) {\n\t\t\t$imports[] = 'use ' . $this->qualifyModel($model) . ';';\n\t\t}\n\n\t\treturn $imports;\n\t}", "function _import()\n\t{\n\t\t$title=get_page_title('IMPORT');\n\n\t\t$xml=post_param('xml');\n\n\t\t$ops=import_from_xml($xml);\n\n\t\t$ops_nice=array();\n\t\tforeach ($ops as $op)\n\t\t{\n\t\t\t$ops_nice[]=array('OP'=>$op[0],'PARAM_A'=>$op[1],'PARAM_B'=>array_key_exists(2,$op)?$op[2]:'');\n\t\t}\n\n\t\t// Clear some cacheing\n\t\trequire_code('view_modes');\n\t\trequire_code('zones2');\n\t\trequire_code('zones3');\n\t\terase_comcode_page_cache();\n\t\trequire_code('view_modes');\n\t\terase_tempcode_cache();\n\t\tpersistant_cache_empty();\n\n\t\tbreadcrumb_set_self(do_lang_tempcode('_RESULTS'));\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('XML_DATA_MANAGEMENT'))));\n\n\t\treturn do_template('XML_STORAGE_IMPORT_RESULTS_SCREEN',array('TITLE'=>$title,'OPS'=>$ops_nice));\n\t}", "public function import() {\n\n\t\t$output = array();\n\n\t\tif ($importUrl = Request::post('importUrl')) {\n\n\t\t\t// Resolve local URLs.\n\t\t\tif (strpos($importUrl, '/') === 0) {\n\n\t\t\t\tif (getenv('HTTPS') && getenv('HTTPS') !== 'off' && getenv('HTTP_HOST')) {\n\t\t\t\t\t$protocol = 'https://';\n\t\t\t\t} else {\n\t\t\t\t\t$protocol = 'http://';\n\t\t\t\t}\n\n\t\t\t\t$importUrl = $protocol . getenv('HTTP_HOST') . AM_BASE_URL . $importUrl;\n\t\t\t\tCore\\Debug::log($importUrl, 'Local URL');\n\n\t\t\t}\n\n\t\t\t$curl = curl_init(); \n \n\t\t\tcurl_setopt($curl, CURLOPT_HEADER, 0); \n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); \n\t\t\tcurl_setopt($curl, CURLOPT_URL, $importUrl); \n\n\t\t\t$data = curl_exec($curl); \n\t\t\t\n\t\t\tif (curl_getinfo($curl, CURLINFO_HTTP_CODE) != 200 || curl_errno($curl)) {\n\t\t\t\n\t\t\t\t$output['error'] = Text::get('error_import');\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\t$fileName = Core\\Str::sanitize(preg_replace('/\\?.*/', '', basename($importUrl)));\n\n\t\t\t\tif ($url = Request::post('url')) {\n\t\t\t\t\t$Page = $this->Automad->getPage($url);\n\t\t\t\t\t$path = AM_BASE_DIR . AM_DIR_PAGES . $Page->path . $fileName;\n\t\t\t\t} else {\n\t\t\t\t\t$path = AM_BASE_DIR . AM_DIR_SHARED . '/' . $fileName;\n\t\t\t\t}\n\n\t\t\t\tFileSystem::write($path, $data);\n\t\t\t\t$this->clearCache();\n\n\t\t\t} \n\n\t\t\tcurl_close($curl);\n\n\t\t\tif (!FileSystem::isAllowedFileType($path)) {\n\n\t\t\t\t$newPath = $path . FileSystem::getImageExtensionFromMimeType($path);\n\n\t\t\t\tif (FileSystem::isAllowedFileType($newPath)) {\n\t\t\t\t\tFileSystem::renameMedia($path, $newPath);\n\t\t\t\t} else {\n\t\t\t\t\tunlink($path);\n\t\t\t\t\t$output['error'] = Text::get('error_file_format');\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$output['error'] = Text::get('error_no_url'); \n\n\t\t}\n\n\t\treturn $output;\n\n\t}", "public function lists();", "protected function loadExternalPackages(): void\n {\n $this->setProviders();\n }", "public function include_entries(){\n\t\tglobal $entries_list, $entries_detail;\n\n\t\t// Load the Entries List class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-entries-list.php' );\n\t\t$entries_list = new VisualFormBuilder_Pro_Entries_List();\n\n\t\t// Load the Entries Details class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-entries-detail.php' );\n\t\t$entries_detail = new VisualFormBuilder_Pro_Entries_Detail();\n\t}", "public function register_importers() {\n include_once ( 'includes/wf_api_manager/wf-api-manager-config.php' );\n register_importer('woocommerce_wf_order_csv', 'WooCommerce Order (CSV/XML)', __('Import <strong>Orders</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_OrderImpExpCsv_Importer::order_importer');\n register_importer('order_csv_cron', 'WooCommerce Orders (CSV/XML)', __('Cron Import <strong>order</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_OrdImpExpCsv_ImportCron::order_importer');\n }", "function listSources() {\n\t\n\t}", "public function import(array $data): void;", "function get_urls(){\n\tglobal $urllist;\n\t$list = file($urllist);\n\t//print_r($list);\n\treturn $list;\n}", "public function import_data()\r\n\t{\r\n\t\t$query = \"SELECT * FROM `#__wpl_addon_mls_queries` WHERE `enabled`>='1'\";\r\n\t\t$mls_queries = wpl_db::select($query);\r\n\t\t$rets_objects = array();\r\n\t\t$connection = 0;\r\n \r\n\t\tforeach($mls_queries as $mls_query)\r\n\t\t{\r\n\t\t\t$query = \"SELECT * FROM `#__wpl_addon_mls_data` WHERE `mls_query_id` = '{$mls_query->id}' AND `imported` = 0 ORDER BY `date` LIMIT {$mls_query->import_limit}\";\r\n\t\t\t$mls_data = wpl_db::select($query);\r\n\t\t\tif(!$mls_data) continue;\r\n\t\t\t$results = array();\r\n\t\t\t$ids = array();\r\n\r\n\t\t\tforeach($mls_data as $data)\r\n\t\t\t{\r\n\t\t\t\t$results[$data->unique_value] = (array)json_decode(base64_decode($data->content));\r\n\t\t\t\t$ids[] = $data->id;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/** load rets object **/\r\n\t\t\tif($rets_objects[$mls_query->mls_server_id]) $wplrets = $rets_objects[$mls_query->mls_server_id];\r\n\t\t\telse $wplrets = new wpl_addon_mls($mls_query->mls_server_id);\r\n\r\n\t\t\tif(trim($wplrets->mls_server_data->mls_unique_field) == '') continue;\r\n\t\t\t\r\n\t\t\t/** set to rets objects **/\r\n\t\t\t$rets_objects[$mls_query->mls_server_id] = $wplrets;\r\n\r\n\t\t\t/** connect **/\r\n\t\t\tif(!$connection) $connection = $wplrets->connect();\r\n\r\n\t\t\t/** map data **/\r\n\t\t\t$mapped = $wplrets->map($results, $mls_query->id);\r\n\t\t\t\r\n\t\t\t/** import properties **/\r\n\t\t\t$pids = $wplrets->import_mapped_data($mapped, $mls_query->id);\r\n\t\t\t\r\n\t\t\t/** download images **/\r\n\t\t\tif(trim($mls_query->images)) $wplrets->import_properties_images($pids, $mls_query->mls_server_id, $mls_query->images, false);\r\n\t\t\t\r\n\t\t\t/** finalizing properties **/\r\n\t\t\tforeach($pids as $pid) $wplrets->finalize($pid);\r\n\t\t\r\n\t\t\t/** update imported field **/\r\n\t\t\twpl_db::q(\"UPDATE `#__wpl_addon_mls_data` SET `imported` = '1' WHERE `id` IN ('\".implode(\"','\", $ids).\"')\");\r\n\t\t}\r\n\r\n\t\tif(wpl_request::getVar('rets_import_cron_job') == 1) exit;\r\n\t}", "abstract public function import(): bool;", "function provide_import() {\n return false;\n }", "protected abstract function fetchLists();", "protected function importDatabaseData() {}", "public function prepareImportContent();", "public function importAction()\n {\n $controller = $this->getRequest()->getControllerName();\n $importLoader = $this->loader->getImportLoader();\n $model = $this->getModel();\n\n $params = array();\n $params['defaultImportTranslator'] = $importLoader->getDefaultTranslator($controller);\n $params['formatBoxClass'] = 'browser table';\n $params['importer'] = $importLoader->getImporter($controller, $model);\n $params['model'] = $model;\n $params['tempDirectory'] = $importLoader->getTempDirectory();\n $params['importTranslators'] = $importLoader->getTranslators($controller);\n\n $this->addSnippets($this->importSnippets, $params);\n }", "function import_STE()\n{\n}", "public function updateExtList() {}", "public function importMaterialList()\n {\n set_time_limit(0);\n $input = Request::onlyLegacy('file', 'supplier_id');\n $validator = Validator::make($input, FinancialProduct::getMaterialImportFileRules());\n\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n $category = FinancialCategory::whereCompanyId($this->scope->id())\n ->whereName(FinancialCategory::MATERIALS)\n ->first();\n\n $supplierId = null;\n\n if (ine($input, 'supplier_id')) {\n $supplier = $this->supplierRepo->getById($input['supplier_id']);\n $supplierId = $supplier->id;\n }\n\n DB::beginTransaction();\n try {\n $this->service->import($category, $input['file'], $supplierId);\n DB::commit();\n\n return ApiResponse::success([\n\t\t\t\t'message' => trans('response.success.saved',['attribute'=>'Material list']),\n\t\t\t]);\n } catch(\\Exception $e) {\n DB::rollback();\n\n return ApiResponse::errorInternal(trans('response.error.something_wrong'), $e);\n }\n\n }", "public function register_importers() {\n include_once ( 'includes/wf_api_manager/wf-api-manager-config.php' );\n register_importer('woocommerce_wf_import_order_xml', 'WooCommerce Order XML', __('Import <strong>Orders</strong> details to your store via a xml file.', 'wf_order_import_export'), 'OrderImpExpXML_Importer::order_importer');\n register_importer('woocommerce_wf_import_order_xml_cron', 'WooCommerce Order XML Cron', __('Cron Import <strong>Orders</strong> details to your store via a xml file.', 'wf_order_import_export'), 'WF_OrderImpExpXML_ImportCron::orderxml_importer');\n }", "private static function loadLibs(){\n $file = Storange::getBaseWowPath().'wow/lib/readbeans/rb.php';\n if(file_exists($file)){\n include_once $file;\n }\n }", "public static function getListStatic() {\n\n\t\t$list = array();\n\t\t$d = dir(CGN_MODULE_PATH);\n\t\twhile ($entry = $d->read()){\n\t\t\tif (substr($entry,0,1) == '.' || substr($entry, -1) == '~') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$mod = new Cgn_Module_Info($entry, NULL, CGN_MODULE_PATH.'/'.$entry);\n\t\t\t$list[] = $mod;\n\t\t}\n\n\t\tif (defined('CGN_MODULE_LOCAL_PATH') && file_exists(CGN_MODULE_LOCAL_PATH)) {\n\t\t\t$d = dir(CGN_MODULE_LOCAL_PATH);\n\t\t\twhile ($entry = $d->read()){\n\t\t\t\tif (substr($entry,0,1) == '.' || substr($entry, -1) == '~') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$mod = new Cgn_Module_Info($entry, NULL, CGN_MODULE_LOCAL_PATH.'/'.$entry);\n\t\t\t\t$list[] = $mod;\n\t\t\t}\n\t\t}\n\n\t\t$d = dir(CGN_ADMIN_PATH);\n\t\twhile ($entry = $d->read()){\n\t\t\tif (substr($entry,0,1) == '.' || substr($entry, -1) == '~') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$mod = new Cgn_Module_Info($entry, TRUE, CGN_ADMIN_PATH.'/'.$entry);\n\t\t\t$list[] = $mod;\n\t\t}\n\n\t\tif (defined('CGN_ADMIN_LOCAL_PATH') && file_exists(CGN_ADMIN_LOCAL_PATH)) {\n\t\t\t$d = dir(CGN_ADMIN_LOCAL_PATH);\n\t\t\twhile ($entry = $d->read()){\n\t\t\t\tif (substr($entry,0,1) == '.' || substr($entry, -1) == '~') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$mod = new Cgn_Module_Info($entry, TRUE, CGN_ADMIN_LOCAL_PATH.'/'.$entry);\n\t\t\t\t$list[] = $mod;\n\t\t\t}\n\t\t}\n\t\treturn $list;\n\t}", "function bfImport() {\n\t\t$this->__construct();\n\t}", "public function register_importers() {\n include_once ( 'includes/wf_api_manager/wf-api-manager-config.php' );\n register_importer('woocommerce_wf_subscription_order_csv', 'WooCommerce Subscription Order (CSV)', __('Import <strong>Subcription Orders</strong> to your store via a csv file.', 'wf_order_import_export'), 'wf_subcription_orderImpExpCsv_Importer::subscription_order_importer');\n register_importer('woocommerce_subscription_csv_cron', 'WooCommerce Subscription Order Cron(CSV)', __('Cron Import <strong>subscription orders</strong> to your store via a csv file.', 'wf_order_import_export'), 'WF_SubscriptionOrderImpExpCsv_ImportCron::subcription_order_importer');\n }", "private function import_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Import/Export', 'formidable' ) . '</h3>'\n\t\t\t . '<p>' . __( 'Import and export forms and styles when copying from one site to another or sharing with someone else. Your entries can be exported to a CSV as well. The Premium version also includes the option to import entries to your site from a CSV.', 'formidable' ) . '</p>',\n\t\t\t'prev_page' => 'styles',\n\t\t\t'next_page' => 'settings',\n\t\t\t'selector' => '.inside.with_frm_style',\n\t\t\t'position' => array( 'edge' => 'bottom', 'align' => 'top' ),\n\t\t);\n\t}", "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "private function includes() {\n \t$includes = array(\n \t\t'/includes/event-custom-post-type.php',\n \t\t'/includes/shortcodes.php',\n \t\t'/includes/display-helper.php',\n \t\t'/includes/query-helper.php'\n \t);\n \t\n \t$admin_includes = array();\n \t\n \tif ( file_exists( dirname( __FILE__ ) . '/includes/cmb2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/cmb2/init.php';\n } elseif ( file_exists( dirname( __FILE__ ) . '/includes/CMB2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/CMB2/init.php';\n }\n \n \t// Load files\n \tforeach ( $includes as $file ) {\n \t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t}\n \t}\n \n \t// Load admin files\n \tif ( is_admin() ) {\n \t\tforeach ( $admin_includes as $file ) {\n \t\t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t\t}\n \t\t}\n \t}\n }", "public function testSchemaListCompletion()\n\t {\n\t\t$externals = new SchemaExternals();\n\t\t$externals->getID($this->_testsetfolder . \"/0.xsd\");\n\n\t\t$list = $externals->getSchemasList();\n\t\t$this->assertStringEndsWith(\"0.xsd\", $list[\"root\"][0][\"externalfile\"]);\n\t\t$this->assertStringEndsWith(\"dc.xsd\", $list[\"import\"][0][\"externalfile\"]);\n\t }", "public function getShortcutImports(): array\n {\n return $this->config['modelShortcut']['imports'];\n }", "protected function import(): void {\n\t\t\t$sections = $this->load_and_decode_file();\n\n\t\t\tif ( empty( $sections ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $sections as $section ) {\n\t\t\t\tLearnDash_Settings_Section::set_section_settings_all(\n\t\t\t\t\t$section['name'],\n\t\t\t\t\t$section['fields']\n\t\t\t\t);\n\n\t\t\t\t$this->processed_items_count++;\n\t\t\t\t$this->imported_items_count++;\n\t\t\t}\n\t\t}", "public function metaImport($data);", "public function checkImportPrerequisites() {}", "static function createJSList()\n {\n $result=\"\";\n if(!empty(self::$arr_js_list))\n foreach (self::$arr_js_list as $js_file => $file_location)\n {\n if ($file_location == \"common\")\n $result.='<script type=\"text/javascript\" src=\"js/'.$js_file.'.js\"> </script>';\n elseif ($file_location == \"component\")\n $result.='<script type=\"text/javascript\" src=\"components/'.$js_file.'/js/'.$js_file.'.js\"> </script>';\n }\n\n self::putData(\"js_list\",$result,\"L\");\n self::$js_list = $result;\n }", "function import($file , $load_time = 0, $on_init = false)\r\n\t{\r\n\t\treturn parent::import($file, $load_time);\r\n\t}", "public function load()\n\t\t{\n\t\t\t$data = array('config', 'form', 'generator', 'db', 'url', 'text', 'frontend', 'crypt', 'security', 'cache', 'img', \n\t\t\t\t'math', 'cookie', 'export');\n\n\t\t\tforeach($data as $library)\n\t\t\t{\n\t\t\t\t$library_path = SYSPATH . 'libraries/' . ucfirst($library) . '.php';\n\t\t\t\tif( file_exists($library_path) )\n\t\t\t\t\tinclude $library_path;\n\t\t\t\telse\n\t\t\t\t\texit('I can not find <b>' . $library . '</b> library at <b>' . $library_path . '</b>');\n\t\t\t}\n\t\t}", "function wp_get_popular_importers()\n {\n }", "public function import(\\RecursiveIteratorIterator $files, OutputInterface $output);", "public function getImportContent() {\n $this->loadTemplatePart('content-import');\n }", "public function importProvider() {\n\t\treturn array(\n\t\t\t//set #0\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tnull,\n\t\t\t\t//success\n\t\t\t\tnull,\n\t\t\t\t//message\n\t\t\t\t'Wrong or empty import file!'\n\t\t\t),\n\t\t\t//set #1\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(),\n\t\t\t\t//success\n\t\t\t\tnull,\n\t\t\t\t//message\n\t\t\t\t'Wrong or empty import file!'\n\t\t\t),\n\t\t\t//set #2\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(),\n\t\t\t\t),\n\t\t\t\t//success\n\t\t\t\tnull,\n\t\t\t\t//message\n\t\t\t\t'Wrong or empty import file!'\n\t\t\t),\n\t\t\t//set #3\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(),\n\t\t\t\t\t'Languages' => array(),\n\t\t\t\t),\n\t\t\t\t//success\n\t\t\t\tnull,\n\t\t\t\t//message\n\t\t\t\t'Wrong or empty import file!'\n\t\t\t),\n\t\t\t//set #4\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(),\n\t\t\t\t\t'Languages' => array(),\n\t\t\t\t\t'Messages' => array(),\n\t\t\t\t),\n\t\t\t\t//success\n\t\t\t\tnull,\n\t\t\t\t//message\n\t\t\t\t'Wrong or empty import file!'\n\t\t\t),\n\t\t\t//set #5\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(),\n\t\t\t\t\t'Languages' => array(),\n\t\t\t\t\t'Messages' => array(),\n\t\t\t\t\t'References' => array(),\n\t\t\t\t),\n\t\t\t\t//success\n\t\t\t\tnull,\n\t\t\t\t//message\n\t\t\t\t'Wrong or empty import file!'\n\t\t\t),\n\t\t\t//set #6\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(),\n\t\t\t\t\t'Languages' => array(),\n\t\t\t\t\t'Messages' => array(),\n\t\t\t\t\t'References' => array(),\n\t\t\t\t\t'Translations' => array()\n\t\t\t\t),\n\t\t\t\t//success\n\t\t\t\tfalse,\n\t\t\t\t//message\n\t\t\t\t'Import localization error!'\n\t\t\t),\n\t\t\t//set #7\n\t\t\tarray(\n\t\t\t\t//data\n\t\t\t\tarray(\n\t\t\t\t\t'Export' => array(),\n\t\t\t\t\t'Languages' => array(),\n\t\t\t\t\t'Messages' => array(),\n\t\t\t\t\t'References' => array(),\n\t\t\t\t\t'Translations' => array()\n\t\t\t\t),\n\t\t\t\t//success\n\t\t\t\ttrue,\n\t\t\t\t//message\n\t\t\t\t'Import localization success!'\n\t\t\t),\n\t\t);\n\t}", "protected function load_files() {\n\t\trequire_once __DIR__ . '/class-papi-admin-meta-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-option-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-post.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-taxonomy.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-columns.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-page-type-switcher.php';\n\t}", "public function listModules() {\n\t\t\t// to use languages\n\t\t\tglobal $language;\n\t\t\t$this->lang = $language[parse_lang()];\n\n\t\t\t// only open when directory really exists\n\t\t\t$handler = file_exists($this->dir) ? opendir($this->dir) : die($this->lang['nodirectory']);\n\n\t\t\twhile (false !== ($entry = readdir($handler))) {\n\t\t\t\tif(preg_match('/^[m][o][d][_][0-9][A-Za-z]{3,}[.][p][h][p]$/', $entry)) {\n\t\t\t\t\tinclude($this->dir.'/'.$entry);\n\t\t\t\t\tif($config['innav'] == true) $this->listArray[$entry] = $config;\n\t\t\t\t\t$this->listRequires[$config['name']] = $requires;\n\t\t\t\t\t$this->listAttributes[$config['name']] = $config;\n\t\t\t\t}\n\t\t\t\tksort($this->listArray);\n\t\t\t}\n\t\t}", "public function load_files() {\n\n\t\t// Load our admin-related functions.\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( GUPR_DIR . 'lib/admin.php' );\n\t\t}\n\t}", "function cil_manageLists_externalFileLoad()\n{\n\n\t//load javascript specific to this option menu.\n\tglobal $cilPluginURL;\n\n\t//load javascript\n\n\twp_enqueue_script('media-upload');\n\twp_enqueue_script('thickbox');\n\twp_register_script('imageUpload', $cilPluginURL.'/js/imageUpload.js', array('jquery','media-upload','thickbox'));\n\twp_enqueue_script('imageUpload');\n\twp_register_script('cil_optionScript', $cilPluginURL.'/js/cil_manageList.js',array('jquery','jquery-ui-sortable','jquery-ui-draggable', 'jquery-ui-droppable'));\n\twp_enqueue_script('cil_optionScript');\n\n\t//load styles\n\twp_enqueue_style('cil_optionStyle', $cilPluginURL.'/css/cil_admin_listOptions.css');\n\twp_enqueue_style('cil_listItemOptionStyle', $cilPluginURL.'/css/cil_admin_optionsMenu.css');\n\twp_enqueue_style('cil_optionHelpStyle', $cilPluginURL.'/css/cil_help_window.css');\n\twp_enqueue_style('thickbox');\n}", "function gdn_import($dat){\n if(is_string($dat)) return $this->gdn_imp_one($dat);\n if(is_array($dat)){\n foreach($dat as $key=>$val)\n\tif(is_string($val)) $dat[$key] = $this->gdn_imp_one($val);\n return array_filter($dat);\n }\n return NULL; \n }", "function btrClient_import() {\n return 'Not implemented yet.';\n}" ]
[ "0.7003414", "0.67355233", "0.6523375", "0.65166456", "0.6414552", "0.635934", "0.6281468", "0.62684166", "0.623523", "0.62126726", "0.6118493", "0.59700894", "0.59378576", "0.5937193", "0.59003496", "0.5871814", "0.58564126", "0.57943076", "0.57853067", "0.57650036", "0.57622933", "0.5736538", "0.5734206", "0.5729702", "0.5717336", "0.5688023", "0.5676915", "0.56759393", "0.5653348", "0.56370467", "0.56227165", "0.5621201", "0.5599537", "0.55985737", "0.55965936", "0.55790305", "0.557854", "0.55773735", "0.5565848", "0.5541334", "0.55202204", "0.5515186", "0.5506067", "0.54872525", "0.54872525", "0.5480467", "0.5477956", "0.5475204", "0.54698867", "0.5461849", "0.5454082", "0.5444299", "0.54328305", "0.5377165", "0.53734106", "0.5370988", "0.5370024", "0.5367874", "0.5360699", "0.53557676", "0.534732", "0.53471345", "0.5338005", "0.5336243", "0.53339523", "0.5332231", "0.5329772", "0.5324286", "0.53233653", "0.5320404", "0.5315943", "0.5298872", "0.5294569", "0.5292863", "0.5290308", "0.52597904", "0.5258062", "0.5257728", "0.52565324", "0.525464", "0.5250392", "0.52410865", "0.5236635", "0.52342355", "0.5232716", "0.52279353", "0.52268296", "0.5226605", "0.52203035", "0.5211603", "0.52070266", "0.51937413", "0.5192471", "0.51868033", "0.518261", "0.5176124", "0.5174755", "0.5169142", "0.5167745", "0.51556534", "0.51455873" ]
0.0
-1
Display the matches (in stdout)
public function displayMatches() { echo "<h1>List of matches found</h1>"; print_r($this->matches); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_matches(&$output, &$match)\n\t{\n\t\tif (sizeof($match) > 0)\n\t\t{\n\t\t\t$data = implode(\"\\n\", $match);\n\t\t\tarray_unshift($output, new vB_Text_Diff_Entry($data, $data));\n\t\t}\n\n\t\t$match = array();\n\t}", "public function getAllMatches() {\n return $this->matches;\n }", "public function getResultString()\n {\n return \"(match {$this->pattern})\" . ( $this->default !== null ? \" [{$this->default}]\" : \"\" );\n }", "public function showTestResults() {\n echo \"Tests: {$this->tests}\\n\";\n echo \"Pass: {$this->pass}\\n\";\n echo \"Fail: {$this->fail}\\n\";\n }", "public function getMatch();", "function GetAllMatches()\n {\n return $this->all_matches;\n }", "public function show(Match $match)\n {\n //\n }", "public function show(Match $match)\n {\n //\n }", "public function getMatches() {\n\n\t\treturn $this->_matches;\n\t}", "function macro_grep($args) {\n $regexp = getattr($args, 'regexp');\n $substr = getattr($args, 'substr');\n $page = getattr($args, 'page');\n\n if (!$substr && !$regexp) {\n return macro_error('Expecting parameter `substr` or `regexp`');\n }\n if ($substr && $regexp) {\n return macro_error(\"Parameters `substr` and `regexp` can't be used together\");\n }\n if (!$page) {\n return macro_error('Expecting parameter `page`');\n }\n\n if (!identity_can('macro-grep', $args)) {\n return macro_permission_error();\n }\n\n if ($substr) {\n $textblocks = textblock_grep($substr, $page, false);\n } else {\n $textblocks = textblock_grep($regexp, $page, true);\n }\n $textblocks_good = array();\n foreach ($textblocks as $textblock) {\n if (identity_can(\"textblock-view\", $textblock)) {\n $textblocks_good[] = $textblock;\n }\n }\n\n ob_start();\n?>\n<div class=\"macroToc\">\n<p><strong><?= count($textblocks_good) ?></strong> rezultate.</p>\n<ul>\n<?php foreach ($textblocks_good as $textblock) { ?>\n <li><?= format_link(url_textblock($textblock['name']), $textblock['title']) ?></li>\n<?php } ?>\n</ul>\n</div>\n<?php\n $buffer = ob_get_clean();\n\n return $buffer;\n}", "public function returnMatches()\n {\n $user = UserAccountController::getCurrentUser();\n if ($user === null) {\n return;\n }\n // get the q parameter from URL\n $q = $_GET['search'];\n if ($q === null) {\n $q = \"\";\n }\n $products = (new ProductListModel())->findProductsWithSimilarName($q, 100);\n $tableData = new View('productsTableBody');\n $tableData->addData('products', $products);\n echo $tableData->render();\n }", "public function getRawMatches()\n {\n return $this->rawMatches;\n }", "public function printResults() {\n $assertions = $this->getAssertions();\n $failures = $this->getFailures();\n $errors = $this->getErrors();\n return \"Assertions: \" . $assertions . \", Failures: \" . $failures . \" and \" . $errors . \" errors.\";\n }", "public function runMatch()\n {\n }", "public function getMatcher();", "protected function textMatch()\n {\n $string = 'matches expected JSON structure ';\n\n switch ($this->_matchType) {\n case self::MATCH_OR:\n $string .= 'at least in one element';\n break;\n case self::MATCH_EXACT:\n $string .= 'exactly';\n break;\n case self::MATCH_AND:\n default:\n $string .= 'in all expected elements';\n break;\n }\n\n return $string;\n }", "public function matchedDocs()\n {\n return $this->_resVector;\n }", "public function matches() {\n return response()->json($this->listMatches());\n }", "function print_results() {\r\n if ($list = $this->print_list()) {\r\n echo '<p>' . $this->print_count() . '</p>';\r\n echo $list;\r\n echo '<p class=\"more\">' . $this->print_more() . '</p>';\r\n }\r\n else {\r\n echo $this->zero_results;\r\n }\r\n }", "public function showResults()\n {\n $tracker = Tracker::getInstance();\n\n $tracker->outputStats();\n if (count($tracker->getFailures())) {\n $tracker->output(\"\\nFAILURES\\n\", null, null, true);\n $tracker->outputFailures();\n }\n\n if (count($tracker->getErrors())) {\n $tracker->output(\"\\nERRORS\\n\");\n $tracker->outputErrors();\n }\n\n $tracker->output(\"\\n\");\n\n if (count($tracker->getFailures())) {\n return;\n }\n\n if ($this->coverageDirectory()) {\n $tracker->output('Generating coverage report as html...' . \"\\n\");\n $this->_generateCoverageHtml();\n return $tracker->output('Done' . \"\\n\");\n }\n\n if ($this->showCoverage()) {\n $this->_generateCoverageCommandLine();\n return;\n }\n }", "public function seeOutput($regex)\n {\n if (empty($this->commandTester)) {\n throw new \\RuntimeException('You need to call runTheCommand() before checking the output');\n }\n\n $this->assertRegExp('/'.preg_quote($regex, '/').'/', $this->commandTester->getDisplay());\n }", "public function matches(): View\n {\n $matchList = Match::all();\n return view('admin/matches/index', compact('matchList'));\n }", "function test($banner, $pattern, $name)\n{\n\t$output = \"<table>\\n\";\t\n\t$output .= \"<tr><td colspan=3><i>$banner</i></td></tr>\\n\";\n\t$output .= '<tr>';\n\t$output .= '<td><u>Pattern</u> --></td>';\n\t$output .= '<td width=\"10px\">&nbsp;</td>';\n\t$output .= \"<th align=\\\"left\\\">$pattern</th></tr>\\n\";\n\tforeach($name as $item) {\n\t\tif (preg_match($pattern, $item)) {\n\t\t\t$match = 'MATCH';\n\t\t} else {\n\t\t\t$match = 'DOES NOT MATCH';\n\t\t}\n\t\t$output .= \"<tr><td width='50%'>$item</td><td width='10%'>&nbsp;</td><td>$match</td></tr>\\n\";\n\t}\n\t$output .= \"</table>\\n\";\n\t$output .= \"<hr />\\n\";\n\treturn $output;\n}", "public function ViewResults() {\n echo \"<pre>\" . print_r($this->rs, TRUE) . \"</pre>\";\n }", "public function getMatches() : array\n {\n return $this->getFilesystemLoader()->getMatches();\n }", "public function providerMatches()\n {\n return array(\n array('24 - 5x01 (HR.HDTV).avi', 5, 1),\n array('3rd Rock from the Sun - 1x01 - Brains and Eggs.avi', 1, 1),\n array('American Dad! - 1x01 - Pilot (pdtv).avi', 1, 1),\n array('The X Factor - 1x02 - Mooman (ll).avi',1,2),\n );\n }", "public function testExactMatchWithExpectationBeforeOutput() {\n\t\t$this->expectOutputContains( 'foobar' );\n\t\techo 'foobar';\n\t}", "public function getAllMatches()\n {\n return $this->_blocksMatch;\n }", "public function testExactMatchWithExpectationAfterOutput() {\n\t\techo 'foobar';\n\t\t$this->expectOutputContains( 'foobar' );\n\t}", "public function matches( Match_Target $target );", "public function getMatchList()\n {\n return $this->match_list;\n }", "public function getMatch(): string\n {\n return $this->match;\n }", "public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }", "function echoResultsQREE ($rows) \r{\r \techo \"<table cellpadding=7>\\n\";\r \tforeach ($rows as $row) {\r\t\techo \"\\n\\n\\n<tr>\\n<td valign=top>\\n\";\r\t\techoDocumentLink($row);\r\t\techo \"<td><font color=blue>\".$row[0].\"</font><br>\";\r\t\techoTwoSentences($row[3],$row[4],$row[5],$row[6],$row[7],false);\r \t}\r \techo \"</table>\\n\";\r}", "public function match( $data );", "public function getOutputVerbosity();", "function print_results() {\n global $dbh;\n print \"results:\\n\";\n $res = $dbh->query(\"SELECT * FROM phptest WHERE a = 72 ORDER BY b\");\n $i = 0;\n while ($row = $res->fetchRow(DB_FETCHMODE_ORDERED)) {\n print '|' . implode(\" - \", $row) . \"|\\n\";\n $i++;\n }\n if (!$i) {\n print \"The records were not found. Did they get inserted?\\n\";\n }\n}", "public function index()\n {\n $matches = $this->matchService->listMatches();\n return view('matches.index', compact('matches'));\n }", "public function showResults(){\n $this->extractQuestions();\n }", "function pewc_get_matches() {\n\t$matches = array(\n\t\t'all'\t\t=> __( 'All rules match', 'pewc' ),\n\t\t'any'\t\t=> __( 'Any rule matches', 'pewc' )\n\t);\n\treturn $matches;\n}", "public function getMatches() : array {\n if (!isset($this->Page_Matches['full'])) {\n $this->map_matches();\n }\n return $this->Page_Matches;\n }", "public function providerMatches()\n {\n return array(\n array('[DBNL] One Piece - 179 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 179,'format8'),\n array('12 Oz. Mouse - S2E01 - Bowtime.avi', 2, 1, 'format1'),\n array('fdsgdfgdfgdf s01E3', 1, 3,'format1'),\n array('s1e01 - Hired.avi', 1, 1, 'format1'),\n array('24 - 5x01 (HR.HDTV).avi', 5, 1,'format2'),\n array('24 s01e01 - 0000-0100 PAL DVD.mkv', 1, 1, 'format1'),\n array('24 S07E23 720p BluRay DTS x264-CtrlHD.mkv', 7, 23,'format1'),\n array('24.618.hr.hdtv.xvid-tvff.avi', 6, 18,'format5'),\n array('30 Rock S01E01 720p WEB-DL DD5.1 AVC-CtrlHD.mkv', 1, 01,'format1'),\n array('30 Rock S04E01 Season Four 720p WEB-DL H.264 DD5.1.mkv', 4, 1,'format1'),\n array('3rd Rock from the Sun - 1x01 - Brains and Eggs.avi', 1, 1,'format2'),\n array('at.s03e01.tvrip-miragetv.avi', 3,1,'format1'),\n array('Im Alan Partridge - S01E01 - A Room With An Alan [dd].avi', 1, 1,'format1'),\n array('american.dad.316.pdtv-0tv.avi', 3, 16,'format5'),\n array('American Dad! - 1x01 - Pilot (pdtv).avi', 1, 1,'format2'),\n array('astroboy.1980s.02.the.birth.of.astro.boy-dvdrip.xvid.avi', 1, 2,'format6'),\n array('Bakemonogatari_Ep02_[1080p,BluRay,x264]_-_qIIq-THORA.mkv', 1, 2,'format4'),\n array('[DBNL] One Piece - 079 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 79,'format8'),\n array('[DBNL] One Piece - 179 - A Raid! The Tin Tyrant and Tin Plate Wapol! [x264][D1F15206].mkv', 1, 179,'format8'),\n array('One Piece - 001 - I m Luffy! The Man Whos Gonna Be King of the Pirates! [x264][857DCFD6].mkv',1,1,'format8'),\n array('S02E03.mkv',2,3,'format1'),\n array('08 - A Pinky And The Brain Christmas.mpg',1,8,'format10'),\n array('Planetes.07.PSNR.mkv',1,7,'format6'),\n array('BUFFY THE VAMPIRE SLAYER - S01 E01 - WELCOME TO THE HELLMOUTH NTSC DVD DD2.0 x264 MMI.mkv',1,1,'format1'),\n array('408 - Manners.avi',4,8,'format5'),\n array('Carlos.2010.E03.720p.BluRay.x264-CiNEFiLE.mkv',1,3,'format4'),\n array('Episode 718 Whats Up Doc.avi',7,18,'format5'),\n array('Clannad_Ep05_[1080p,BluRay,x264]_-_THORA.mkv',1,5,'format4'),\n array('Code_Geass_R2_Picture_Drama_S00E13_0.923_[1080p,BluRay,x264]_-_THORA.mkv',0,13,'format1'),\n array('Shin Chan - Episode 06.avi',1,6,'format7'),\n array('2e06-Belief.mkv',2,6,'format1'),\n array('[moo-shi]_Desert_Punk_-_01[DVD][H264.AAC][17FC7F0C].mkv',1,1,'format8'),\n array('Dragons Den S07E01 - 2009-07-15 - 720p-h264-ac3-subs.mkv',7,1,'format1'),\n array('DragonsDen-2007ChristmasSpecial-S05E10.avi',5,10,'format1'),\n array('Dragons\\' Den - s6e1.avi',6,1,'format1'),\n array('EFC 0107 - Resurrection.avi',1,7,'format9'),\n array('Elfen Lied - 01 - A Chance Encounter.mkv',1,1,'format6'),\n array('E05.720p.BluRay.x264-fty.mkv',1,5,'format4'),\n array('Episode 7 - Bolognese sauce.jpg',1,7,'format7'),\n array('xpatriots.24.0815.720p.hdtv.x264-dimension.mkv',8,15,'format9'),\n array('king.of.the.hill.1306.pdtv-lol.avi',13,6,'format9'),\n array('TG1302.mkv',13,2,'format9'),\n array('EFC 0104 - Avatar.avi',1,4,'format9'),\n array('south.park.1202.dsr-0tv.avi',12,2,'format9'),\n array('Hellsing 04v2 [anime fin][6BD62B96].ogm',1,4,'format11'),\n array('Extras.2005.PAL.DVD.S02EE02.AC3.x264-sJR.mkv',2,2,'format14'),\n array('(W_B) SDF Macross 31(x264)(6BD62B96).mkv',1,31,'format12'),\n array('Star Trek Deep Space Nine s02extra03 - Sketchbook NTSC DVD x264 DD2.0-JCH.mkv',2,3,'format13'),\n );\n }", "public function GetMatch ();", "public function allMatches()\n {\n return $this->homeMatches->merge($this->awayMatches);\n }", "public function getIterator()\n {\n return $this->matches;\n }", "public function assertConsoleOutputContains($match)\r\n {\r\n $response = $this->getResponse();\r\n if (false === stripos($response->getContent(), $match)) {\r\n throw new PHPUnit_Framework_ExpectationFailedException(sprintf(\r\n 'Failed asserting output CONTAINS content \"%s\", actual content is \"%s\"',\r\n $match, $response->getContent()\r\n ));\r\n }\r\n $this->assertNotSame(false, stripos($response->getContent(), $match));\r\n }", "function findMatches($content){\n\n\t\t$videos = array();\n\t\t$data = \"\";\n\t\t$cdata = \"\";\n\t\t$xdata = \"\";\n\t\t$sig = \"\";\n\t\t$url = \"\";\n\t\t$type = \"\";\n\n\t\t// Break page into pieces and run regex's to find and build download links.\n\t\t// Note: $results is an array.\n\t\tif(preg_match('/url_encoded_fmt_stream_map(.*?);/', $content, $results)){\n\n\t\t\t$data = \"\";\n\n\t\t\t// $results[0]=the text that matched the full pattern\n\t\t\t// $results[1]=the text matching the first subpattern\n\t\t\t// $results[2]=the text matching the second subpattern (n/a)\n\t\t\t$data = $results[1];\n\n\t\t\t// Literally replace the characters '\\u0026' with an '&'.\n\t\t\t$data = str_replace('\\u0026', '&', $data);\n\t\t\t\n\t\t\t// Convert $data to an array by splitting on ','.\n\t\t\t$data = explode(',', $data);\n\n\t\t\tforeach($data As $cdata){\n\n\t\t\t\t// Break each element in the $data array into an array.\n\t\t\t\t$cdata = explode('&', $cdata);\n\n\t\t\t\t// The $cdata array should have exactly 5 elements if it is an applicable URL.\n\t\t\t\tif (sizeof($cdata) === 5) {\n\n\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\techo \"<b>\";\n\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\techo \"CDATA\" . \"<br>\";\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($cdata);\n\t\t\t\t\t\techo \"</pre>\";\n\t\t\t\t\t\techo \"</b>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// For each element in the $cdata array...\n\t\t\t\t\tforeach($cdata As $xdata){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Sometimes this is found as the first three characters of an element: \":\"\n\t\t\t\t\t\t// Check for it by seeing if first character is '\"'.\n\t\t\t\t\t\t// If so, remove those three characters.\n\t\t\t\t\t\tif ($xdata[0] === '\"') {\n\t\t\t\t\t\t\t$xdata = substr($xdata, 3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for signature.\n\t\t\t\t\t\tif(preg_match('/^sig/', $xdata)){\n\t\t\t\t\t\t\t$sig = substr($xdata, 4);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for URL.\n\t\t\t\t\t\tif(preg_match('/^url/', $xdata)){\n\t\t\t\t\t\t\t$url = substr($xdata, 4);\n\t\t\t\t\t\t\t$url = urldecode($url);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"URL: \" . $url . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Look for video type.\n\t\t\t\t\t\tif(preg_match('/^itag/', $xdata)){\n\t\t\t\t\t\t\t$type = substr($xdata, 5);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If $type is not a known video type, change it to type '0' (unknown)\n\t\t\t\t\t\t\tif (!array_key_exists($type, $this->videoMap)) {\n\t\t\t\t\t\t\t\t$type = \"0\";\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\tif (DEBUG === 1) {\n\t\t\t\t\t\t\t\techo \"<b>\" . \"<br>\" . \"TYPE: \" . $type . \"<br>\" . \"</b>\";\n\t\t\t\t\t\t\t\techo \"<br><br>\";\n\t\t\t\t\t\t\t\t//echo \"<hr>\";\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//$url = $url . '&signature=' . $sig;\n\t\t\t\t\t$videos[$this->videoMap[$type][0]][$this->videoMap[$type][1]] = $url;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $videos;\n\t}", "abstract function printOutput()", "public function getMatches() {\n\t\t$statement = $this->database->prepare(\"SELECT mt.*, ct.name AS team1_name, ct.name AS team2_name, ct.flag AS team1_flag, ct.flag AS team2_flag FROM matches mt JOIN country ct ON(mt.team1 = ct.id AND mt.team2 != mt.team1)\");\n\t\t$statement->execute();\n\t\t$results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $results ? $results : false;\n\t}", "function testDebugShow() {\n ob_start();\n Debug::out('Testing, testing, 123.');\n $output = ob_get_clean();\n $this->assertPattern('/<pre>Testing, testing, 123.<\\/pre>/is', $output);\n }", "private function _processPDFXref($matches)\r\n {\r\n //echo \"\\nPDF Xref\\n\";\r\n }", "function echoLinkSearch ($rows) \r{\r\t// columns, the first one has an image that links to a file, the\r\t// second has a sentence with events etc marked and some elements\r\t// highlighted.\r\r\t// NEED TO ADD EXTRA PARAMATERS THAT KEEP TRACK OF WHAT TIMEXES OR\r\t// EVENTS TO HIGHLIGHT, DO THIS THE SAME WAY AS echoResultsXXX\r\r \techo \"<table cellpadding=7>\\n\";\r \tforeach ($rows as $row) {\r\t\techo \"<tr><td valign=top>\\n\";\r\t\techoDocumentLink($row);\r\t\techo \"<td>\".$row['reltype'];\r\t\t$descr1 = implode(' ',array($row['str1'],$row['class1'],$row['tense1'],$row['aspect1'],$row['type1'],$row['value1']));\r\t\t$descr2 = implode(' ',array($row['str2'],$row['class2'],$row['tense2'],$row['aspect2'],$row['type2'],$row['value2']));\r\t\techo \" { $descr1 } { $descr2 }<br>\\n\";\r\t\techoTwoSentences($row['tmlfile'],$row['sentid1'],$row['sentid2'],\r\t\t\t\t\t\t $row['eid1'],$row['eid2'],true);\r \t}\r \techo \"</table>\\n\";\r}", "function match_results($keyword, $value){\n\t\t// matching the keyword with the result\n\t\tif(strncmp($keyword,strtolower(trim($value)),strlen($keyword)) == 0){\n\t\t\tif(trim($value)){\n\t\t\t\treturn trim(\"$value\\n\");\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t}", "public function get_matches_description(){\r\n\t\treturn elgg_echo(\"recommender:dataset:bloglikes:matchesdescription\");\r\n\t}", "public function index()\n\t{\n\t\t$matches = Match::all();\n\n\t\treturn View::make('matches.index', compact('matches'));\n\t}", "public function testScanFileWithMatchShouldReturnResult(): void\n {\n $processor = new Processor(self::$defaultOptions);\n $fileObject = new \\SplFileObject('vfs://match.php.dist');\n\n $scanResult = $processor->scan($fileObject);\n\n self::assertInstanceOf(ResultContainer::class, $scanResult);\n self::assertCount(1, $scanResult);\n self::assertEquals($fileObject->getPathname(), $scanResult->getPathName());\n self::assertArrayHasKey('test', $scanResult);\n\n $first = $scanResult['test'];\n\n self::assertCount(1, $scanResult);\n self::assertEquals(0, $first->lineNumber);\n self::assertEquals('Awesome {$test}', $first->lineContent);\n self::assertEquals('test', $first->name);\n }", "public function print_out()\n {\n echo \"id: \" . $this->id . \"<br/>\";\n echo $this->rewrite;\n echo $this->extension;\n echo $this->stranglerPattern;\n echo $this->continuousEvolution;\n echo $this->split;\n echo $this->processStrategyOthers;\n echo $this->ddd;\n echo $this->functionalDecomposition;\n echo $this->existingStructure;\n echo $this->decompositionStrategyOthers;\n echo $this->SCA;\n echo $this->MDA;\n echo $this->WDA;\n echo $this->DMC;\n echo $this->techniqueOthers;\n echo $this->GR;\n echo $this->MO;\n echo $this->sourceCode;\n echo $this->useCase;\n echo $this->systemSpecification;\n echo $this->API;\n echo $this->inputOthers;\n echo $this->list;\n echo $this->archi;\n echo $this->outputOthers;\n echo $this->experiment;\n echo $this->example;\n echo $this->caseStudy;\n echo $this->noValidation;\n echo $this->maintainability;\n echo $this->performance;\n echo $this->reliability;\n echo $this->scalability;\n echo $this->security;\n echo $this->qualityOthers;\n echo $this->score;\n echo $this->matchScore;\n echo $this->misMatch . \"<br/>\";\n }", "abstract public function getMatches(array $tokens, array $info = []): array;", "public function fullmatch()\n {\n return $this->fullmatch;\n }", "public function index()\n {\n $matches = Match::paginate(50);\n return view('match.index', compact('matches'));\n }", "public function doGetMatches() {\n\t\t$this->mlog->debug('['. __METHOD__ .']');\n\t\t$resp = new Response();\n\t\t$matches = MatchQuery::create()->find();\n\t\t$resp->data = array();\n\t\tforeach ($matches as $match) {\n\t\t\t$resp->data[] = $match->__toArray();\n\t\t}\n\t\treturn $resp->__toArray();\n\t}", "protected static function display_results() {\n $locale = self::$locale;\n self::$composevars = \"method=\".self::get_param('method').\"&amp;datelimit=\".self::get_param('datelimit').\"&amp;fields=\".self::get_param('fields').\"&amp;sort=\".self::get_param('sort').\"&amp;order=\".self::get_param('order').\"&amp;chars=\".self::get_param('chars').\"&amp;forum_id=\".self::get_param('forum_id').\"&amp;\";\n add_to_title($locale['global_201'].$locale['408']);\n\n $search_text = explode(' ', urldecode(self::$search_text));\n $qualified_search_text = [];\n $disqualified_search_text = [];\n\n /*\n * @todo: roadmap on author\n */\n self::$fields_count = self::get_param('fields') + 1;\n for ($i = 0, $k = 0; $i < count($search_text); $i++) {\n if (strlen($search_text[$i]) >= 3) {\n $qualified_search_text[] = $search_text[$i];\n for ($j = 0; $j < self::$fields_count; $j++) {\n // It is splitting to 2 parts.\n self::$search_param[':sword'.$k.$j] = '%'.$search_text[$i].'%';\n }\n $k++;\n } else {\n $disqualified_search_text[] = $search_text[$i];\n }\n }\n unset($search_text);\n self::$swords = $qualified_search_text;\n\n self::$c_swords = count($qualified_search_text) ?: redirect(FUSION_SELF);\n self::$i_swords = count($disqualified_search_text);\n\n self::$swords_keys_for_query = array_keys(self::$search_param);\n self::$swords_values_for_query = array_values(self::$search_param);\n\n // Highlight using Jquery the words. This, can actually parse as settings.\n $highlighted_text = \"\";\n $i = 1;\n foreach ($qualified_search_text as $value) {\n $highlighted_text .= \"'\".$value.\"'\";\n $highlighted_text .= ($i < self::$c_swords ? \",\" : \"\");\n $i++;\n }\n add_to_footer(\"<script type='text/javascript' src='\".INCLUDES.\"jquery/jquery.highlight.js'></script>\");\n add_to_jquery(\"$('.search_result').highlight([\".$highlighted_text.\"],{wordsOnly:true}); $('.highlight').css({backgroundColor:'#FFFF88'});\");\n\n /*\n * Run the drivers via include.. but this method need to change to simplify the kiss concept.\n */\n if (self::get_param('stype') == \"all\") {\n $search_deffiles = [];\n $search_includefiles = makefilelist(INCLUDES.'search/', '.|..|index.php|location.json.php|users.json.php|.DS_Store', TRUE, 'files');\n $search_infusionfiles = makefilelist(INFUSIONS, '.|..|index.php', TRUE, 'folders');\n if (!empty($search_infusionfiles)) {\n foreach ($search_infusionfiles as $files_to_check) {\n if (is_dir(INFUSIONS.$files_to_check.'/search/')) {\n $search_checkfiles = makefilelist(INFUSIONS.$files_to_check.'/search/', \".|..|index.php\", TRUE, \"files\");\n $search_deffiles = array_merge($search_deffiles, $search_checkfiles);\n }\n }\n }\n $search_files = array_merge($search_includefiles, $search_deffiles);\n\n foreach ($search_files as $key => $file_to_check) {\n if (preg_match(\"/include.php/i\", $file_to_check)) {\n if (file_exists(INCLUDES.\"search/\".$file_to_check)) {\n self::__Load(INCLUDES.\"search/\".$file_to_check);\n }\n\n foreach ($search_infusionfiles as $inf_files_to_check) {\n if (file_exists(INFUSIONS.$inf_files_to_check.'/search/'.$file_to_check)) {\n self::__Load(INFUSIONS.$inf_files_to_check.'/search/'.$file_to_check);\n }\n }\n }\n }\n } else {\n if (file_exists(INCLUDES.\"search/search_\".self::get_param('stype').\"_include.php\")) {\n self::__Load(INCLUDES.\"search/search_\".self::get_param('stype').\"_include.php\");\n }\n\n $search_infusionfiles = makefilelist(INFUSIONS, '.|..|index.php', TRUE, 'folders');\n foreach ($search_infusionfiles as $inf_files_to_check) {\n if (file_exists(INFUSIONS.$inf_files_to_check.'/search/search_'.self::get_param('stype').'_include.php')) {\n self::__Load(INFUSIONS.$inf_files_to_check.'/search/search_'.self::get_param('stype').'_include.php');\n }\n }\n }\n\n // Show how many disqualified search texts\n $c_iwords = count($disqualified_search_text);\n if ($c_iwords) {\n $txt = \"\";\n for ($i = 0; $i < $c_iwords; $i++) {\n $txt .= $disqualified_search_text[$i].($i < $c_iwords - 1 ? \", \" : \"\");\n }\n echo \"<div class='well m-t-10 text-center strong'>\".sprintf($locale['502'], $txt).\"</div><br />\";\n }\n\n /*$c_search_result_array = count(self::$search_result_array);\n\n if (self::get_param('stype') == \"all\") {\n $from = self::get_param('rowstart');\n $to = ($c_search_result_array - (self::get_param('rowstart') + 10)) <= 0 ? $c_search_result_array : self::get_param('rowstart') + 10;\n } else {\n $from = 0;\n $to = $c_search_result_array < 10 ? $c_search_result_array : 10;\n }*/\n\n /*\n * HTML output\n */\n if (self::get_param('stype') == \"all\") {\n parent::search_navigation(0);\n echo strtr(Search::render_search_count(), [\n '{%search_count%}' => self::$items_count,\n '{%result_text%}' => ((self::$site_search_count > 100 || parent::search_globalarray(\"\")) ? \"<br/>\".sprintf($locale['530'], self::$site_search_count) : \"<br/>\".self::$site_search_count.\" \".$locale['510'])\n ]);\n } else {\n echo strtr(Search::render_search_count(), [\n '{%search_count%}' => self::$items_count,\n '{%result_text%}' => ((self::$site_search_count > 100 || parent::search_globalarray(\"\")) ? \"<br/><strong>\".sprintf($locale['530'], self::$site_search_count).\"</strong>\" : (empty(self::$site_search_count) ? $locale['500'] : ''))\n ]);\n }\n\n echo \"<div class='search_result'>\\n\";\n echo \"<div class='block'>\\n\";\n foreach (self::$search_result_array as $results) {\n echo $results;\n }\n\n // Now it is by per module. Therefore rowstart does not apply\n //for ($i = $from; $i < $to; $i++) {\n // echo self::$search_result_array[$i];\n //}\n echo \"</div>\\n\";\n echo \"</div>\\n\";\n\n if (self::get_param('stype') != \"all\") {\n echo self::$navigation_result;\n }\n }", "public function infovn_markup($matches) {\n $vn = $matches[1];\n $ans = \"<span style='color:red;'>[vn $vn]</span>\";\n return $ans;\n }", "function echoResult($myarray){\n\t\t\t$ctr = 1;\n\t\t\tforeach($myarray as $entry){\n\t\t\t\techo \"<p>$ctr : $entry</p>\";\n\t\t\t\t$ctr += 1;\n\t\t\t}\n\t\t}", "public function show(Matchup $matchup)\n {\n //\n }", "private function findMatch(&$matches, $home, $guest)\n {\n $ret = [];\n for ($i = 0, $cnt = count($matches); $i < $cnt; ++$i) {\n if ($matches[$i]->getProperty('home') == $home && $matches[$i]->getProperty('guest') == $guest) {\n $ret[] = $matches[$i];\n }\n }\n // Die Paarung gibt es nicht.\n return count($ret) ? $ret : $this->noMatchStr;\n }", "function smart_search($filename, $search_term) {\n $last = tail($filename, NUM_LINES);\n $line_num = -sizeof($last);\n $match_count = 0;\n foreach($last as $line) {\n if (strstr($line, $search_term)) {\n echo \"Match on line \".$line_num.\": \".$line;\n ++$match_count;\n }\n ++$line_num;\n }\n echo \"Found $match_count \".(($match_count > 1)? \"matches\" : \"match\").\"\\n\";\n}", "public function all()\n {\n $sql = '\n SELECT \n t.name team1, \n t2.name team2, \n IF ( m.match_date_time > CURDATE(), \"-\", CONCAT_WS( \"-\", m.team1_goalcount, m.team2_goalcount) ) score, \n DATE_FORMAT(m.match_date_time, \"%d.%m.%Y %H:%i %W\") date\n FROM matches m\n LEFT JOIN teams t ON m.team1_id = t.id\n LEFT JOIN teams t2 ON m.team2_id = t2.id\n ORDER BY m.match_date_time ASC';\n \n return view( 'all', ['matches' => \\DB::select( $sql ) ] );\n }", "public function matchresultindex()\n {\n\n return view('matchresult');\n }", "public function matches()\n {\n return $this->routeObject->match;\n }", "public function getMatchFound()\n {\n return $this->get('MatchFound');\n }", "public function seachMatchAll(){\n\t\t $query = $this->getDbTable()->select()\n\t\t ->from(array('b' => 'tbteam'),array('home'=>'b.team'))\n ->joinInner(array('a' => 'tbmatch'),'a.idHomeTeam=b.id',array('a.id','a.goalHomeTeam','a.goalVisitorTeam','a.date','a.round'))\n ->joinInner(array('c' => 'tbteam'),'c.id=a.idVisitorTeam',array('visitor'=>'c.team'))\n ->order('a.round')\n ->setIntegrityCheck(false);\n return $this->getDbTable()->fetchAll($query);\n\t}", "public function show(Match $match)\n {\n return view('match.show', compact('match'));\n }", "public static function test(){\n\t\t//It takes in no arguments and doesn't return anything.\n\t\t//It prints out a bunch of permutations.\n\t\t$testArray = explode(' ', Adams::getTestString());\n\t\t$testArray = Adams::raiseAll($testArray);\n\t\t$permutations = Adams::getPermutations($testArray);\t\n\t\t//print_r($permutations);\n\t\tforeach($permutations as $permutation){\n\t\t\t$outputString .= implode(' ',$permutation).\"\\n\";\t\n\t\t}\n\t\tprint $outputString;\n\t}", "public function matchingJobs()\n {\n return view('pages/matches');\n }", "public function getMatch()\n {\n return $this->generalMatch;\n }", "public function toString()\n {\n $ret_val = 'matches expected Array (';\n\n foreach ($this->value as $key => $value) {\n $ret_val .= \"\\n\\t '\" . $key . \" => '\" . $value . \"'\";\n }\n\n $ret_val .= \"\\n]\";\n\n if (!empty($ret_val)) {\n $ret_val .= \"\\n\" . $this->failureMessage;\n }\n\n return $ret_val;\n }", "function showMe($output) {\r\n echo '<pre>';\r\n print_r($showMe);\r\n echo '</pre>';\r\n}", "public function testMatchingSingleSubstring() {\n\t\t$this->expectOutputContains( 'quick brown' );\n\t\techo 'The quick brown fox jumps over the lazy dog';\n\t}", "public function match_results($keyword, $value){\n\t\t// matching the keyword with the result\n\t\tif(strncmp($keyword,strtolower(trim($value)),strlen($keyword)) == 0){\n\t\t\tif(trim($value)){\n\t\t\t\treturn trim(\"$value\\n\");\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t}", "static public function match($line) {\n\t\tpreg_match(self::MATCH, $line['source'], $matches);\n\t\treturn $matches;\n\t}", "public function query($term) {\n $matches = $this->getMatchesService('vienna',$term,array('showSyn'=>false,'NearMatch'=>false,'includeCommonNames'=>true));\n return $matches;\n }", "public function index()\n {\n $sets = Set::all();\n $matches = Match::all();\n\n return view('match::index');\n }", "public function getMatchs(){\n return view('matchs.matchs',\n ['matchs' => Match::with('teams')->with('users')->orderBy('date', 'desc')->get(),\n 'referees' => User::all()]);\n }", "public function regexp( Application_Model_User $antaUser, $filters ){\r\t\t\r\t\t$orderBy = implode(\",\", empty($filters->orders)? array(\"date DESC\", \"id_document DESC\",\"position ASC\"):$filters->orders );\r\t\t\r\t\t# create result set object\r\t\t$matches = new Anta_Frog_Matches(); \r\t\t$whereClause = \"\";\r\t\t$binds = array();\r\t\t\r\t\t# 1. filter documents by documents id\r\t\tif( !(empty( $filters->docs ))){\r\t\t\t$whereClause .= \" id_document IN (\".implode(\",\",array_fill( 0, count($filters->docs), \"?\" )).\" ) \";\r\t\t\t$binds = array_merge( $binds, $filters->docs );\r\t\t}\r\t\t\r\t\t# 2. filter documents by document tags\r\t\tif( !(empty( $filters->tags ))){\r\t\t\t$whereClause .= (strlen($whereClause)>0?\"AND \":\"\").\" id_document IN ( \r\t\t\t\tSELECT id_document FROM anta_{$antaUser->username}.`documents_tags` \r\t\t\t\tNATURAL JOIN anta_{$antaUser->username}.`tags` \r\t\t\t\tWHERE id_tag IN (\".implode(\",\",array_fill( 0, count($filters->tags), \"?\" )).\" ) )\";\r\t\t\t$binds = array_merge( $binds, $filters->tags );\r\t\t}\r\t\t\r\t\t$startTime = microtime(true);\r\t\t# get a list of sentences that matches\r\t\t$query = \"\r\t\t\tSELECT SQL_CALC_FOUND_ROWS title, DATE_FORMAT( do.date,'%d/%m/%Y' ) as date, content, position, id_sentence, id_document \r\t\t\tFROM (\r\t\t\t\tSELECT id_document, title, date FROM anta_{$antaUser->username}.documents \r\t\t\t\t\".( strlen( $whereClause )>0?\"WHERE {$whereClause}\":\"\").\"\r\t\t\t\t\r\t\t\t) do\r\t\t\tINNER JOIN anta_{$antaUser->username}.sentences se USING( id_document ) \r\t\t\tWHERE se.content REGEXP ? ORDER BY {$orderBy} LIMIT {$filters->offset},{$filters->limit}\"\r\t\t;\r\t\t\r\t\t$mysqli = Anta_Core::getMysqliConnection();\r\t\t$stmt = $mysqli->query( $query, array_merge( $binds, array($filters->query) ) );\r\t\t\r\t\t\r\t\t\r\t\t// create a list of different document. size property is the number of sentences\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\tif( !isset( $matches->documents[ $row->id_document ] ) ){ \r\t\t\t\t$matches->documents[ $row->id_document ] = array(\r\t\t\t\t\t\"title\" => $row->title,\r\t\t\t\t\t\"date\" => $row->date,\r\t\t\t\t\t\"tags\" => Application_Model_DocumentsMapper::getTags( $antaUser, $row->id_document ),\r\t\t\t\t\t\"size\" => Application_Model_SentencesMapper::getNumberOfSentences( $antaUser, $row->id_document )\r\t\t\t\t);\r\t\t\t}\r\t\t\t\r\t\t\t$matches->sentences[ $row->id_sentence ] = new Application_Model_Sentence( $row->id_sentence, $row->content, $row->id_document, $row->position, $row->date );\r\t\t\t\r\t\t}\r\t\t\r\t\t// get total items\r\t\t$stmt = $mysqli->query(\"SELECT FOUND_ROWS() as totalItems\");\r\t\t$matches->totalItems = $stmt->fetchObject()->totalItems;\r\t\t\r\t\t$checkPointA = microtime(true) - $startTime;\r\t\t$startTime = microtime(true);\r\t\t\r\t\t// test, again... find all documents id containing that regexp\r\t\t$stmt = $mysqli->query(\r\t\t\t\"SELECT DISTINCT id_document FROM anta_{$antaUser->username}.documents do\r\t\t\t\tINNER JOIN anta_{$antaUser->username}.sentences se USING( id_document ) \r\t\t\tWHERE se.content REGEXP ? \", array($filters->query)\r\t\t);\r\t\t$ids = array();\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t$ids[] = $row->id_document;\r\t\t}\r\t\t\t\t\t\t\r\t\t\r\t\t// computate tags statistics, top FIVE for each category using filter in id_documents\r\t\tforeach( Application_Model_CategoriesMapper::getAll( $antaUser ) as $category ){\r\t\t\t\r\t\t\t$matches->categories[ $category->content ] = array();\r\t\t\t$query = \"SELECT dt.id_tag, dtd.content, count(distinct dt.`id_document`) AS `number_of_documents`\r\t\t\t\tFROM \r\t\t\t\t\tanta_{$antaUser->username}.documents_tags dt \r\t\t\t\t\t\r\t\t\t\tINNER JOIN\r\t\t\t\t\tanta_{$antaUser->username}.`tags` dtd\r\t\t\t\t\tUSING ( id_tag ) \r\t\t\t\tWHERE id_document IN(\".implode(\",\",$ids).\") AND {$whereClause} \".( strlen( $whereClause )>0? \"AND \":\"\" ).\" id_category = ? \r\t\t\t\tGROUP BY dtd.id_tag ORDER BY `number_of_documents` DESC LIMIT 0,5\";\r\t\t\t\t\r\t\t\t$stmt = $mysqli->query($query, array_merge( $binds,array( $category->id ) ) );\r\t\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t\t$matches->categories[ $category->content ][ $row->id_tag ] = $row;\r\t\t\t}\r\t\t\r\t\t};\r\t\t$checkPointB = microtime(true) - $startTime;\r\t\techo $checkPointA.\", \".$checkPointB;\r\t\treturn $matches;\r\t\t// \r\t\t\r\t\t\r\t}", "function verifyRegEx(){\n parent::doExpandAdvanceSection();\n $this->type(TEXT_EDITOR, \"\");\n $this->click(LINK_SEARCH);\n $this->type(TEXT_EDITOR, (TEXT_SAMPLE_REGEX));\n $this->type(INPUT_SEARCH, (TEXT_SEARCH_REGEX));\n $this->type(INPUT_REPLACE, (TEXT_REPLACE_REGEX));\n $this->click(CHK_REGEX);\n $this->click(BUTTON_REPLACEALL);\n $this->click(BUTTON_CANCEL);\n $this->click(BUTTON_PREVIEW);\n $this->waitForPageToLoad((WIKI_TEST_WAIT_TIME));\n try {\n $this->assertEquals((TEXT_REGEX_PREVIEW), $this->getText(TEXT_PREVIEW_TEXT1));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REGEX_PREVIEW), $this->getText(TEXT_PREVIEW_TEXT2));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n try {\n $this->assertEquals((TEXT_REGEX_PREVIEW), $this->getText(TEXT_PREVIEW_TEXT3));\n } catch (PHPUnit_Framework_AssertionFailedError $e) {\n parent::doCreateScreenShot(__FUNCTION__);\n array_push($this->verificationErrors, $e->toString());\n }\n }", "function showResults($filename, $searchterm){\n\tif(file_exists($filename)){\n\t\t$contents = file_get_contents($filename);\n\t\t$results = json_decode($contents);\n\n\t\t# check if error in decode and give error msg\n\t\tif(json_last_error() !== JSON_ERROR_NONE){\n\t\t\techo \"<p style=\\\"font-weight:bold; color:red;\\\">\";\n echo \"ERROR: <br> Error with JSON data <br></p>\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$winCount = 0;\n\t\t$totalGames = 0; # counters\n\t\t\n\t\t# create header\t\n\t\techo \"<h4>\";\n\t\tforeach($results->comments as $elem){\n\t\t\techo \"$elem<br>\";\t\n\t\t}\n echo '</h4>'; \n\n\t\t# iterate through each element in games\n\t\tforeach($results->games as $element){\n\t\t\t\n\t\t\t# then iterate through each key value pair\n\t\t\tforeach($element as $key => $value){\n $newValue = str_replace(\"_\", \" \", $value); # clean up team names\n\n if($key === $searchterm){ # check if search term, then bold if so\n echo \"<p style=\\\"font-weight:bold; color:blue;\\\">\";\n echo \"$key : $newValue </p>\";\n }\n else{ # otherwise print normally\n echo \"<p> $key : $newValue </p>\"; \n }\n\n\t\t\t\t# check if win and update count if necessary\n\t\t\t\tif($key === \"WinorLose\" && $value === \"W\")\n\t\t\t\t\t++$winCount;\n\t\t\t}\n\t\t\t++$totalGames;\t# increment game count regardless\n\t\t echo \"<br>\";\n \n }\n\n\t\t$winPercentage = ($winCount / $totalGames) * 100;\n\t\techo \"<br><p style=\\\"color:blue;\\\">\";\n echo \"Win percentage: $winPercentage % </p><br></body></html>\";\t\t\n\t\n\t}\n\telse{\t\t# give error if file not found\n\t\techo \"<p style=\\\"font-weight:bold; color:red;\\\">\";\n echo \"No results found for the specified input.</p></body></html>\";\n\t\t\n return;\n\t}\n}", "public function toString()\n {\n return 'Search preview is present in search results';\n }", "private function getResult(): void\n {\n $matches = $this->getNeedlesResult();\n foreach ($matches as $n_key => $match) {\n if (isset($match['matching_filters'])) {\n $match_count = count($match['matching_filters']);\n if ($match_count === 1) { // Save Matches\n $match = $this->getReturnValues($match);\n $match = $this->getLayerData($match);\n unset($match['matching_filters']);\n $this->SearchResult->matches[$n_key] = $match;\n continue;\n } elseif ($match_count > 1) { // Save Indecisive\n $result = [];\n $matching_filters = $match['matching_filters'];\n unset($match['matching_filters']);\n foreach ($matching_filters as $filter) {\n $result[] = $this->getReturnValues($match, $filter['filter_id']);\n }\n $match[$this->config->prefix . 'matching_filters'] = $result;\n $this->SearchResult->indecisive_matches[$n_key] = $match;\n continue;\n }\n }\n // Save no matches\n $this->SearchResult->no_matches[$n_key] = $match;\n }\n }", "function print_videoinfo_results($display_count, $count, $query_result) {\n // Get the total number of matches\n $count_row = pg_fetch_row($count);\n $total_count = $count_row[0];\n // Update the display count to be the minimum between display count and total count.\n $display_count = $total_count < $display_count ? $total_count : $display_count; \n\n // Print results table.\n echo \"<table class=\\\"pop-over-table pure-table pure-table-bordered\\\">\";\n echo \"<thead><tr>\";\n echo \"<td>VID</td>\";\n echo \"<td>Title</td>\";\n echo \"<td>Year</td>\";\n echo \"<td>Certification</td>\";\n echo \"</tr></thead><tbody>\";\n\n while ($row = pg_fetch_row($query_result)) {\n echo \"<tr>\";\n $num = pg_num_fields($query_result);\n\n for ($i = 0; $i < $num; $i++) {\n if ($i == 0) {\n echo '<td class=\"videoinfo_vid\">'.$row[$i].'</td>';\n } else if ($i == 1) {\n echo '<td class=\"videoinfo_title\">'.$row[$i].'</td>';\n } else if ($i == 2) {\n echo '<td class=\"videoinfo_year\">'.$row[$i].'</td>';\n } else if ($i == 3) {\n echo '<td class=\"videoinfo_certification\">'.$row[$i].'</td>';\n } else {\n echo\"<td>\".$row[$i].\"</td>\";\n }\n }\n echo \"<tr>\";\n }\n echo \"</tbody></table>\";\n\n // Echo display count summary.\n echo \"<p class=\\\"count_summary\\\">Showing: \".$display_count.\" of \".$total_count.\"</p>\";\n }", "public function display() {\n $string = $this->__toString();\n \n $string .= \"\\t\\tEstimate: $\" . number_format($this->estimate) . \"\\n\\n\"\n . \"\\t\\tSimilar Movies\\n\"\n . \"\\t\\t==============\\n\";\n \n foreach ($this->similarMovies as $m) {\n $string .= \"\\t\\t\" . $m->getTitle() .\" (\" . $m->getReleaseDate()->format('Y')\n . \")\\t\\t{Similarity: \" . $m->getSimilarity()\n . \"\\tRevenue: $\" . number_format($m->getOpeningRevenue()) . \"}\\n\";\n }\n \n $string .= \"\\n\\n\";\n \n return $string;\n }", "public function getMatch()\n {\n return $this->match;\n }", "private function getConjoinedResult(): void\n {\n $tot_match = 0;\n $tot_indecisive = 0;\n $tot_no_match = 0;\n $matches = $this->getNeedlesResult();\n foreach ($matches as $n_key => $match) {\n if (isset($match['matching_filters'])) {\n $match[$this->config->prefix . 'filter_match_count'] = count($match['matching_filters']);\n } else {\n $match[$this->config->prefix . 'filter_match_count'] = 0;\n }\n if ($match[$this->config->prefix . 'filter_match_count'] === 1) {\n $tot_match++;\n $match = $this->getReturnValues($match);\n $match = $this->getLayerData($match);\n unset($match['matching_filters']);\n } elseif ($match[$this->config->prefix . 'filter_match_count'] > 1) {\n unset($match['matching_filters']);\n $tot_indecisive++;\n } else {\n $tot_no_match++;\n }\n $this->SearchResult->matches[$n_key] = $match;\n }\n $this->SearchResult->total_matches = $tot_match;\n $this->SearchResult->total_indecisive_matches = $tot_indecisive;\n $this->SearchResult->total_no_matches = $tot_no_match;\n }", "public function generate_results($argv)\n {\n $this->stats->print_results($argv);\n }", "private function ts_getDisplayHits()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Short var\n $currFilterWrap = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'wrap.' ];\n\n // Get TS value\n $display_hits = $currFilterWrap[ 'item.' ][ 'display_hits' ];\n\n // RETURN TS value\n return $display_hits;\n }", "function show_results()\n\t{\n\t\tglobal $ibforums, $std;\n\n\t\t$this->result_type = $ibforums->input['result_type'];\n\t\t$this->search_in = $ibforums->input['search_in'];\n\n\t\t//------------------------------------------------\n\t\t// We have a search ID, so lets get the parsed results.\n\t\t//------------------------------------------------\n\n\t\t$this->unique_id = $ibforums->input['searchid'];\n\n\t\tif (!$this->unique_id)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$stmt = $ibforums->db->query(\"SELECT *\n\t\t\t\t FROM ibf_search_results\n\t\t\t\t WHERE id='{$this->unique_id}'\");\n\n\t\t$sr = $stmt->fetch();\n\n\t\t$tmp_topics = $sr['topic_id'];\n\t\t$topic_max_hits = \"\"; //$sr['topic_max'];\n\t\t$tmp_posts = $sr['post_id'];\n\t\t$post_max_hits = \"\"; //$sr['post_max'];\n\n\t\t$this->sort_order = $sr['sort_order'];\n\t\t$this->sort_key = $sr['sort_key'];\n\n\t\t//------------------------------------------------\n\t\t// Remove duplicates from the topic_id and post_id\n\t\t//------------------------------------------------\n\n\t\t$topic_max_hits = self::unique_string_items($tmp_topics);\n\t\t$post_max_hits = self::unique_string_items($tmp_posts);\n\n\t\t$topics = $tmp_topics;\n\t\t$posts = $tmp_posts;\n\n\t\t//-------------------------------------\n\n\t\tif (!$topics and !$posts)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$url_words = $this->convert_highlite_words($ibforums->input['highlite']);\n\n\t\t$count = 0;\n\n\t\tif ($this->result_type == 'topics')\n\t\t{\n\t\t\tif ($this->search_in == 'titles')\n\t\t\t{\n\t\t\t\t$this->fill_read_arrays($topics);\n\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits);\n\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t FROM\n\t\t\t\t\t\tibf_topics t, ibf_forums f\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tt.tid IN(\" . $topics . \")\n\t\t\t\t\t\tAND f.id=t.forum_id\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\t ORDER BY t.pinned DESC,\";\n\n\t\t\t\t// search new topics of user\n\t\t\t\tif ($ibforums->input['new'])\n\t\t\t\t{\n\t\t\t\t\t$query .= \"f.id ASC,\";\n\t\t\t\t}\n\n\t\t\t\t$query .= \"t.\" . $this->sort_key . \" \" . $this->sort_order . \" LIMIT \" . $this->first . \",25\";\n\n\t\t\t\t$stmt = $ibforums->db->query($query);\n\n\t\t\t} else // ( $this->search_in == 'posts' )\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t// we have tid and pid to sort out, woohoo NOT\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t// Array for forum id of each message\n\t\t\t\t$forum_posts = array();\n\n\t\t\t\tif ($posts)\n\t\t\t\t{\n\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tforum_id,\n\t\t\t\t\t\ttopic_id\n\t\t\t\t\tFROM ibf_posts\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tpid IN({$posts})\n\t\t\t\t\t\tAND queued != 1\");\n\n\t\t\t\t\tif ($topics)\n\t\t\t\t\t{\n\t\t\t\t\t\t$topics = explode(',', $topics);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$topics = array();\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ($pr = $stmt->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!in_array($pr['topic_id'], $topics))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$topics[] = $pr['topic_id'];\n\t\t\t\t\t\t\t$topic_max_hits++;\n\n\t\t\t\t\t\t\t$forum_posts[$pr['topic_id']] = $pr['forum_id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$topics = implode(',', $topics);\n\t\t\t\t}\n\t\t\t\t$this->fill_read_arrays($topics);\n\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits);\n\n\t\t\t\t$query = \"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t \t FROM ibf_topics t\n\t\t\t\t\t LEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=t.forum_id)\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tt.tid IN(\" . $topics . \")\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\t ORDER BY\n\t\t\t\t\t\tt.pinned DESC,\";\n\n\t\t\t\t// Search new topics of user\n\t\t\t\tif ($ibforums->input['new'])\n\t\t\t\t{\n\t\t\t\t\t$query .= \"f.id ASC,\";\n\t\t\t\t}\n\n\t\t\t\t$query .= \"t.\" . $this->sort_key . \" \" . $this->sort_order . \" LIMIT \" . $this->first . \",25\";\n\n\t\t\t\t$stmt = $ibforums->db->query($query);\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\n\t\t\tif ($stmt->rowCount())\n\t\t\t{\n\t\t\t\twhile ($row = $stmt->fetch())\n\t\t\t\t{\n\t\t\t\t\t// club tool\n\t\t\t\t\tif ($row['club'] and $std->check_perms($ibforums->member['club_perms']) == FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$count++;\n\n\t\t\t\t\t$row['keywords'] = $url_words;\n\n\t\t\t\t\tif ($row['pinned'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->output .= View::make(\"search.RenderPinnedRow\", ['Data' => $this->parse_entry($row)]);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->output .= View::make(\"search.RenderRow\", ['Data' => $this->parse_entry($row)]);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$std->Error(array(\n\t\t\t\t 'LEVEL' => 1,\n\t\t\t\t 'MSG' => 'no_search_results'\n\t\t\t\t ));\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\n\t\t\t$this->output .= View::make(\n\t\t\t\t\"search.end\",\n\t\t\t\t[\n\t\t\t\t\t'Data' => array(\n\t\t\t\t\t\t'SHOW_PAGES' => $this->links,\n\t\t\t\t\t\t'modform_close' => ($this->modfunctions)\n\t\t\t\t\t\t\t? View::make(\"search.modform_close\")\n\t\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} else // ( $this->result_type == 'posts' )\n\t\t{\n\n\t\t\t$this->parser = new PostParser();\n\n\t\t\tif ($this->search_in == 'titles')\n\t\t\t{\n\t\t\t\t$this->output .= $this->start_page($topic_max_hits, 1);\n\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tp.pid,\n\t\t\t\t\t\tp.author_id,\n\t\t\t\t\t\tp.author_name,\n\t\t\t\t\t\tp.post_date,\n\t\t\t\t\t\tp.post,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.name as forum_name\n\t\t\t\t\tFROM ibf_topics t\n\t\t\t\t\tLEFT JOIN ibf_posts p\n\t\t\t\t\t\tON (t.tid=p.topic_id\n\t\t\t\t\t\t AND p.new_topic=1\n\t\t\t\t\t\t AND p.use_sig=0)\n\t\t\t\t\tLEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=t.forum_id)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tt.tid IN({$topics})\n\t\t\t\t\t\tAND p.queued != 1\n\t\t\t\t\t\tAND t.approved=1\n\t\t\t\t\tORDER BY p.post_date DESC\n\t\t\t\t\tLIMIT {$this->first},25\");\n\n\t\t\t} else // ( $this->search_in == 'posts' )\n\t\t\t{\n\t\t\t\t$this->parser->prepareIcons();\n\n\t\t\t\tif ($topics)\n\t\t\t\t{\n\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tpid\n\t\t\t\t\tFROM\n\t\t\t\t\t\tibf_posts\n\t\t\t\t\tWHERE\n\t\t\t\t\t\ttopic_id IN({$topics}) AND\n\t\t\t\t\t\tnew_topic=1 AND\n\t\t\t\t\t\tqueued != 1\");\n\n\t\t\t\t\twhile ($pr = $stmt->fetch())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!preg_match(\"/,\" . $pr['pid'] . \",/\", $posts))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$posts .= $pr['pid'] . \",\";\n\t\t\t\t\t\t\t$post_max_hits++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$posts = str_replace(\",,\", \",\", $posts);\n\t\t\t\t}\n\n\t\t\t\t$this->output .= $this->start_page($post_max_hits, 1);\n\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tt.*,\n\t\t\t\t\t\tp.pid,\n\t\t\t\t\t\tp.author_id,\n\t\t\t\t\t\tp.author_name,\n\t\t\t\t\t\tp.post_date,\n\t\t\t\t\t\tp.post,\n\t\t\t\t\t\tp.use_emo,\n\t\t\t\t\t\tf.id as forum_id,\n\t\t\t\t\t\tf.forum_highlight,\n\t\t\t\t\t\tf.highlight_fid as hid,\n\t\t\t\t\t\tf.name as forum_name,\n\t\t\t\t\t\tf.use_html,\n\t\t\t\t\t\tg.g_dohtml,\n\t\t\t\t\t\tp.ip_address\n\t\t\t\t\tFROM ibf_posts p\n\t\t\t\t\tLEFT JOIN ibf_topics t\n\t\t\t\t\t\tON (t.tid=p.topic_id)\n\t\t\t\t\tLEFT JOIN ibf_forums f\n\t\t\t\t\t\tON (f.id=p.forum_id)\n\t\t\t\t\tLEFT JOIN ibf_members m\n\t\t\t\t\t\tON (m.id=p.author_id)\n\t\t\t\t\tLEFT JOIN ibf_groups g\n\t\t\t\t\t\tON (m.mgroup=g.g_id)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.pid IN({$posts}) AND\n\t\t\t\t\t\tp.use_sig=0 AND\n\t\t\t\t\t\tp.queued != 1 AND\n\t\t\t\t\t\tt.approved=1\n\t\t\t\t\tORDER BY p.post_date DESC\n\t\t\t\t\tLIMIT {$this->first},25\");\n\t\t\t}\n\n\t\t\twhile ($row = $stmt->fetch())\n\t\t\t{\n\t\t\t\tif ($ibforums->member['g_is_supmod'])\n\t\t\t\t{\n\t\t\t\t\t$row['ip_address'] = \"( <a href='{$ibforums->base_url}&act=modcp&CODE=ip&incoming={$row['ip_address']}' target='_blank'>{$row['ip_address']}</a> )\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$row['ip_address'] = \"\";\n\t\t\t\t}\n\n\t\t\t\tif ($row['club'] and\n\t\t\t\t $std->check_perms($ibforums->member['club_perms']) == FALSE\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$count++;\n\n\t\t\t\t$data = array(\n\t\t\t\t\t'TEXT' => $row['post'],\n\t\t\t\t\t'SMILIES' => $row['use_emo'],\n\t\t\t\t\t'CODE' => 1,\n\t\t\t\t\t'SIGNATURE' => 0,\n\t\t\t\t\t'HTML' => 1,\n\t\t\t\t\t'HID' => ($row['forum_highlight'])\n\t\t\t\t\t\t? $row['hid']\n\t\t\t\t\t\t: -1,\n\t\t\t\t\t'TID' => $row['topic_id'],\n\t\t\t\t\t'MID' => $row['author_id'],\n\t\t\t\t);\n\n\t\t\t\t$row['post'] = $this->parser->prepare($data);\n\n\t\t\t\tif (!trim($row['post']))\n\t\t\t\t{\n\t\t\t\t\t$count--;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$row['keywords'] = $url_words;\n\t\t\t\t$row['post_date'] = $std->get_date($row['post_date']);\n\n\t\t\t\t//--------------------------------------------------------------\n\t\t\t\t// Parse HTML tag on the fly\n\t\t\t\t//--------------------------------------------------------------\n\n\t\t\t\tif ($row['use_html'] == 1)\n\t\t\t\t{\n\t\t\t\t\t// So far, so good..\n\n\t\t\t\t\tif (stristr($row['post'], '[dohtml]'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// [doHTML] tag found..\n\n\t\t\t\t\t\t$parse = ($row['use_html'] AND $row['g_dohtml'])\n\t\t\t\t\t\t\t? 1\n\t\t\t\t\t\t\t: 0;\n\n\t\t\t\t\t\t$row['post'] = $this->parser->post_db_parse($row['post'], $parse);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------------------------\n\t\t\t\t// Do word wrap?\n\t\t\t\t//--------------------------------------------------------------\n\n\t\t\t\tif ($ibforums->vars['post_wordwrap'] > 0)\n\t\t\t\t{\n\t\t\t\t\t$row['post'] = $this->parser->my_wordwrap($row['post'], $ibforums->vars['post_wordwrap']);\n\t\t\t\t}\n\n\t\t\t\t$this->output .= View::make(\"search.RenderPostRow\", ['Data' => $this->parse_entry($row, 1)]);\n\t\t\t}\n\n\t\t\t$this->output .= View::make(\"search.end_as_post\", ['Data' => array('SHOW_PAGES' => $this->links)]);\n\t\t}\n\n\t\tif ($count <= 0)\n\t\t{\n\t\t\t$std->Error(array(\n\t\t\t 'LEVEL' => 1,\n\t\t\t 'MSG' => 'no_search_results'\n\t\t\t ));\n\t\t}\n\n\t\t$this->page_title = $ibforums->lang['search_results'];\n\n\t\tif ($ibforums->input['nav'] == 'lv')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_since_lv']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'my_lv')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['my_nav_since_lv']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'lt')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_lt']);\n\n\t\t} elseif ($ibforums->input['nav'] == 'au')\n\t\t{\n\t\t\t$this->nav = array($ibforums->lang['nav_au']);\n\t\t} else\n\t\t{\n\t\t\t$this->nav = array(\n\t\t\t\t\"<a href='{$this->base_url}&act=Search'>{$ibforums->lang['search_form']}</a>\",\n\t\t\t\t$ibforums->lang['search_title']\n\t\t\t);\n\t\t}\n\t}", "function phorum_api_diff_match($a, $b, $level=\"line\")\n{\n // set_time_limit(0); No, we don't like it.\n $answer = \"\";\n if ($level == \"line\" || $level == \"word\")\n {\n if ($level == \"line\") {\n $as = explode(\"\\n\", $a);\n $bs = explode(\"\\n\", $b);\n } else {\n $as = explode(\" \", $a);\n $bs = explode(\" \", $b);\n }\n\n $last = array();\n $next = array();\n $start = -1;\n $len = 0;\n $answer = \"\";\n for ($i = 0; $i < sizeof($as); $i++) {\n $start+= strlen($as[$i])+1;\n for ($j = 0; $j < sizeof($bs); $j++) {\n if ($as[$i] != $bs[$j]) {\n if (isset($next[$j])) unset($next[$j]);\n } else {\n if (!isset($last[$j-1]))\n $next[$j] = strlen($bs[$j]) + 1;\n else\n $next[$j] = strlen($bs[$j]) + $last[$j-1] + 1;\n if ($next[$j] > $len) {\n $len = $next[$j];\n $answer = substr($a, $start-$len+1, $len);\n }\n }\n }\n // If PHP ever copies pointers here instead of copying data,\n // this will fail. They better add array_copy() if that happens.\n $last = $next;\n }\n }\n else\n {\n $m = strlen($a);\n $n = strlen($b);\n $last = array();\n $next = array();\n $len = 0;\n $answer = \"\";\n for ($i = 0; $i < $m; $i++) {\n for ($j = 0; $j < $n; $j++) {\n if ($a[$i] != $b[$j]) {\n if (isset($next[$j])) unset($next[$j]);\n } else {\n if (!isset($last[$j-1]))\n $next[$j] = 1;\n else\n $next[$j] = 1 + $last[$j-1];\n if ($next[$j] > $len) {\n $len = $next[$j];\n $answer = substr($a, $i-$len+1, $len);\n }\n }\n }\n // If PHP ever copies pointers here instead of copying data,\n // this will fail. They better add array_copy() if that happens.\n $last = $next;\n }\n }\n\n if ($level == \"line\" && $answer == \"\") {\n return phorum_api_diff_match($a, $b, \"word\");\n } elseif ($level == \"word\" && $answer == \"\") {\n return phorum_api_diff_match($a, $b, \"letter\");\n } else {\n return $answer;\n }\n}", "public function countMatches() : int\n {\n return sizeof($this->getMatches());\n }", "public function display($pattern='xx xx xx xx xx') {\n\t\t$number = $this->number['number'];\n\t\tif (strpos($pattern, 'i')===false) {\n\t\t\t$number = '0'.$number;\n\t\t}\n\t\t$output = '';\n\t\t$pattern = str_split($pattern);\n\t\t$number = str_split($number);\n\t\t$j = 0;\n\t\tfor($i=0; $i < count($pattern) || $j<count($number) ; $i++ ) {\n\t\t\tif ($i<count($pattern) && $pattern[$i]==='i') {\n\t\t\t\t$output .= $this->number['ccc'];\n\t\t\t}\t\n\t\t\telse if ( ($i>=count($pattern) || 'x'=== $pattern[$i]) && $j<count($number)) {\n\t\t\t\t$output .= $number[$j];\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\telse if ($i < count($pattern) && 'x'!== $pattern[$i]) {\n\t\t\t\t$output .= $pattern[$i];\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "public function test_export_matching() {\n $qdata = new stdClass();\n $qdata->id = 123;\n $qdata->contextid = 0;\n $qdata->qtype = 'match';\n $qdata->name = 'Matching question';\n $qdata->questiontext = 'Match the upper and lower case letters.';\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = 'The answer is A -> a, B -> b and C -> c.';\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->defaultmark = 23;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n \n $qdata->options = new stdClass();\n $qdata->options->shuffleanswers = 1;\n $qdata->options->correctfeedback = 'Well done.';\n $qdata->options->correctfeedbackformat = FORMAT_HTML;\n $qdata->options->partiallycorrectfeedback = 'Not entirely.';\n $qdata->options->partiallycorrectfeedbackformat = FORMAT_HTML;\n $qdata->options->shownumcorrect = false;\n $qdata->options->incorrectfeedback = 'Completely wrong!';\n $qdata->options->incorrectfeedbackformat = FORMAT_HTML;\n \n $subq1 = new stdClass();\n $subq1->id = -4;\n $subq1->questiontext = 'A';\n $subq1->questiontextformat = FORMAT_HTML;\n $subq1->answertext = 'a';\n \n $subq2 = new stdClass();\n $subq2->id = -3;\n $subq2->questiontext = 'B';\n $subq2->questiontextformat = FORMAT_HTML;\n $subq2->answertext = 'b';\n \n $subq3 = new stdClass();\n $subq3->id = -2;\n $subq3->questiontext = 'C';\n $subq3->questiontextformat = FORMAT_HTML;\n $subq3->answertext = 'c';\n \n $subq4 = new stdClass();\n $subq4->id = -1;\n $subq4->questiontext = '';\n $subq4->questiontextformat = FORMAT_HTML;\n $subq4->answertext = 'd';\n \n $qdata->options->subquestions = array(\n $subq1, $subq2, $subq3, $subq4);\n \n $qdata->hints = array(\n new question_hint_with_parts(0, 'Hint 1', FORMAT_HTML, true, false),\n new question_hint_with_parts(0, '', FORMAT_HTML, true, true),\n );\n \n // Export the question.\n $exporter = new qformat_smart();\n $questions = array($qdata);\n $zipcontent = $exporter->export_questions($questions);\n \n // Open exported question as import_data.\n $import_data = $this->zip_to_import_data($zipcontent);\n \n /*\n * Test content of imsmanifest.xml\n */\n \n $imsmanifest = $import_data->imsmanifest;\n \n $expected = '<resource identifier=\"group0_pages\" href=\"page0.svg\" type=\"webcontent\" adlcp:scormType=\"asset\"><file href=\"page0.svg\"/><file href=\"page1.svg\"/><file href=\"page2.svg\"/></resource>';\n $actual = $imsmanifest->resources->resource[0]->asXML();\n $this->assert_same_xml($expected, $actual);\n \n $expected = '<resource identifier=\"pages\" href=\"page0.svg\" type=\"webcontent\" adlcp:scormType=\"asset\"><file href=\"page0.svg\"/><file href=\"page1.svg\"/><file href=\"page2.svg\"/></resource>';\n $actual = $imsmanifest->resources->resource[1]->asXML();\n $this->assert_same_xml($expected, $actual);\n \n /*\n * Test content of page.\n */\n \n // Test number of pages.\n $this->assertCount(3, $import_data->pages);\n \n // Test first page\n \n $page = $import_data->pages[0];\n \n // Test the number of question elements.\n $questions = $page->xpath('//g[@class=\"question\"]');\n $this->assertCount(1, $questions);\n \n // Test the question element.\n $question = $questions[0];\n $expectedvotemetadata1 = '<votemetadata><questiontext format=\"choice\" labelstyle=\"upper-alpha\"';\n $expectedvotemetadata2 = 'points=\"23\" tags=\"\" explanation=\"The answer is A -$gt; a, B -$gt; b and C -$gt; c.\" mathgradingoption=\"\" likert=\"false\"/></votemetadata>';\n $votemetadata = $question->votemetadata->asXML();\n //$this->assert_same_xml($expectedvotemetadata, $votemetadata);\n //$this->assertStringStartsWith($expectedvotemetadata1, $votemetadata);\n //$this->assertStringEndsWith($expectedvotemetadata2, $votemetadata);\n \n // Test the question number.\n $expectedquestionnumber = '1';\n $questionnumber = strip_tags($question->text[0]->asXML());\n //$this->assertEquals($expectedquestionnumber, $questionnumber);\n \n // Test the question text without formattings.\n $expectedquestiontext = 'Match the upper and lower case letters.';\n $questiontext = strip_tags($question->text[1]->asXML());\n $this->assertStringStartsWith($expectedquestiontext, $questiontext);\n \n // Test the number of choices.\n $choices = $page->xpath('//g[@class=\"questionchoice\"]');\n $this->assertCount(4, $choices);\n \n // Test the 1. choice element.\n $choice = $choices[0];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"1\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'A';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'a';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 2. choice element.\n $choice = $choices[1];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"2\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'B';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'b';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 3. choice element.\n $choice = $choices[2];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"3\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'C';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'c';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 4. choice element.\n $choice = $choices[3];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"4\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'D';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'd';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test second page\n \n $page = $import_data->pages[1];\n \n // Test the number of question elements.\n $questions = $page->xpath('//g[@class=\"question\"]');\n $this->assertCount(1, $questions);\n \n // Test the question element.\n $question = $questions[0];\n $expectedvotemetadata1 = '<votemetadata><questiontext format=\"choice\" labelstyle=\"upper-alpha\"';\n $expectedvotemetadata2 = 'points=\"23\" tags=\"\" explanation=\"The answer is A -$gt; a, B -$gt; b and C -$gt; c.\" mathgradingoption=\"\" likert=\"false\"/></votemetadata>';\n $votemetadata = $question->votemetadata->asXML();\n //$this->assert_same_xml($expectedvotemetadata, $votemetadata);\n //$this->assertStringStartsWith($expectedvotemetadata1, $votemetadata);\n //$this->assertStringEndsWith($expectedvotemetadata2, $votemetadata);\n \n // Test the question number.\n $expectedquestionnumber = '2';\n $questionnumber = strip_tags($question->text[0]->asXML());\n //$this->assertEquals($expectedquestionnumber, $questionnumber);\n \n // Test the question text without formattings.\n $expectedquestiontext = 'Match the upper and lower case letters.';\n $questiontext = strip_tags($question->text[1]->asXML());\n $this->assertStringStartsWith($expectedquestiontext, $questiontext);\n \n // Test the number of choices.\n $choices = $page->xpath('//g[@class=\"questionchoice\"]');\n $this->assertCount(4, $choices);\n \n // Test the 1. choice element.\n $choice = $choices[0];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"1\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'A';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'a';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 2. choice element.\n $choice = $choices[1];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"2\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'B';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'b';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 3. choice element.\n $choice = $choices[2];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"3\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'C';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'c';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 4. choice element.\n $choice = $choices[3];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"4\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'D';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'd';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test third page\n \n $page = $import_data->pages[2];\n \n // Test the number of question elements.\n $questions = $page->xpath('//g[@class=\"question\"]');\n $this->assertCount(1, $questions);\n \n // Test the question element.\n $question = $questions[0];\n $expectedvotemetadata1 = '<votemetadata><questiontext format=\"choice\" labelstyle=\"upper-alpha\"';\n $expectedvotemetadata2 = 'points=\"23\" tags=\"\" explanation=\"The answer is A -$gt; a, B -$gt; b and C -$gt; c.\" mathgradingoption=\"\" likert=\"false\"/></votemetadata>';\n $votemetadata = $question->votemetadata->asXML();\n //$this->assert_same_xml($expectedvotemetadata, $votemetadata);\n //$this->assertStringStartsWith($expectedvotemetadata1, $votemetadata);\n //$this->assertStringEndsWith($expectedvotemetadata2, $votemetadata);\n \n // Test the question number.\n $expectedquestionnumber = '3';\n $questionnumber = strip_tags($question->text[0]->asXML());\n //$this->assertEquals($expectedquestionnumber, $questionnumber);\n \n // Test the question text without formattings.\n $expectedquestiontext = 'Match the upper and lower case letters.';\n $questiontext = strip_tags($question->text[1]->asXML());\n $this->assertStringStartsWith($expectedquestiontext, $questiontext);\n \n // Test the number of choices.\n $choices = $page->xpath('//g[@class=\"questionchoice\"]');\n $this->assertCount(4, $choices);\n \n // Test the 1. choice element.\n $choice = $choices[0];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"1\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'A';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'a';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 2. choice element.\n $choice = $choices[1];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"2\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'B';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'b';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 3. choice element.\n $choice = $choices[2];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"3\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'C';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'c';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the 4. choice element.\n $choice = $choices[3];\n $expectedvotemetadata = '<votemetadata><choicetext label=\"4\" format=\"choice\"/></votemetadata>';\n $votemetadata = $choice->votemetadata->asXML();\n $this->assert_same_xml($expectedvotemetadata, $votemetadata);\n \n // Test the numbering of the choice text without formattings.\n $expectedchoicetext = 'D';\n $choicetext = strip_tags($choice->text[0]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n // Test the choice text without formattings.\n $expectedchoicetext = 'd';\n $choicetext = strip_tags($choice->text[1]->asXML());\n $this->assertEquals($expectedchoicetext, $choicetext);\n \n \n }" ]
[ "0.6026635", "0.58803254", "0.56374884", "0.55848897", "0.5584837", "0.5574421", "0.55723363", "0.55723363", "0.55261034", "0.5499175", "0.54970646", "0.5496352", "0.5451071", "0.54450196", "0.54265743", "0.54236233", "0.5394202", "0.53872496", "0.53837067", "0.53325796", "0.53261566", "0.53241044", "0.53181773", "0.53137165", "0.53064567", "0.530545", "0.5302906", "0.52977115", "0.52835256", "0.5235234", "0.5233068", "0.52328473", "0.52263665", "0.52120167", "0.52081406", "0.51487875", "0.51480234", "0.5134563", "0.51290274", "0.51276976", "0.5108702", "0.50997645", "0.5063913", "0.50603956", "0.5049705", "0.5044746", "0.49983355", "0.4992287", "0.49764842", "0.49572206", "0.4949843", "0.49340415", "0.49330902", "0.49296722", "0.4923318", "0.4920694", "0.4907188", "0.48994666", "0.48885867", "0.4877762", "0.48561257", "0.485157", "0.48470312", "0.4839408", "0.48244837", "0.4820546", "0.48198915", "0.48099202", "0.48073363", "0.47755826", "0.4756557", "0.4751008", "0.47432876", "0.47432724", "0.47376898", "0.47362167", "0.4721964", "0.4720148", "0.47186613", "0.47134832", "0.46803564", "0.46781483", "0.46763298", "0.4669647", "0.46559465", "0.46537247", "0.4647115", "0.46435198", "0.46386433", "0.46364772", "0.46298066", "0.46287307", "0.4623108", "0.46157694", "0.4608806", "0.46048164", "0.4601191", "0.4599907", "0.4596613", "0.45854497" ]
0.77459764
0
Creates data provider instance with search query applied
public function search($params) { $query = Emprestimo::find(); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'pageSize' => 10, ], 'sort' => ['defaultOrder' => ['idemprestimo' => SORT_DESC]], ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'idemprestimo' => $this->idemprestimo, 'dataemprestimo' => $this->dataemprestimo, 'dataprevisaodevolucao' => $this->dataprevisaodevolucao, 'datadevolucao' => $this->datadevolucao, 'usuario_idusuario' => $this->usuario_idusuario, ]); $query->andFilterWhere(['like', 'usuario_nome', $this->usuario_nome]) ->andFilterWhere(['like', 'usuario_rg', $this->usuario_rg]); 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
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function __construct() { parent::__construct(); $this->load->model("Gejala_model",'m_gejala'); $this->load->model("Pengetahuan_model",'m_pengetahuan'); $this->load->model("Penyakit_model",'m_penyakit'); $this->db_dp = $this->load->database('dp', TRUE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.765474", "0.74130577", "0.73950845", "0.7316426", "0.72267336", "0.72267336", "0.7188932", "0.71641964", "0.71506983", "0.7143705", "0.71064097", "0.70761514", "0.7074392", "0.7040164", "0.70277566", "0.70277566", "0.70277566", "0.70277566", "0.70277566", "0.69715184", "0.6967171", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.69467306", "0.6930143", "0.69249934", "0.6910722", "0.68989384", "0.6893409", "0.6873847", "0.6856649", "0.68554837", "0.68383443", "0.6801943", "0.6801943", "0.6801398", "0.67945987", "0.67887646", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.67664593", "0.6764506", "0.6763014", "0.67595977", "0.67595977", "0.67514503", "0.6750154", "0.6746792", "0.6741381", "0.673737", "0.67274755", "0.6716705", "0.6712698", "0.67104334", "0.6703541", "0.66981715", "0.66917276", "0.6673561", "0.66618454", "0.66593856", "0.66507924", "0.6629688", "0.66203475", "0.6612322", "0.6602961", "0.65978956", "0.6592892", "0.659181", "0.6584117", "0.65750426", "0.6573747", "0.65728444", "0.65532637", "0.65457416", "0.6544036", "0.6542768", "0.65418786", "0.6540533", "0.6516457", "0.6514384", "0.6514384", "0.6514384", "0.6514384" ]
0.0
-1
Run the database seeds.
public function run() { Type::insert([ "name" => "Cable" ]); Type::insert([ "name" => "Microphone" ]); Type::insert([ "name" => "Monitor" ]); Type::insert([ "name" => "Projector" ]); Type::insert([ "name" => "Speaker" ]); }
{ "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
Loads a given git command, or throws an informative exception if such a command cannot be loaded.
public static function loadCommand($command) { // Check to see if command has already been loaded; if not, do our checks. if (empty(self::$commands[$command])) { // Check to see if it is an excluded command; if so, throw an exception. if (in_array($command, self::$excludedCommands)) { throw new CLIGitExcludedCommandException($command); } if (!is_file(CLIGIT_SRC . "/commands/$command.inc")) { throw new CLIGitUnknownCommandException($command); } // Now ready to include the file. require_once CLIGIT_SRC . "/commands/$command.inc"; // Store a reflected copy of the class in our registry array for later // checking. self::$commands[$command] = new ReflectionClass($command); } return self::$commands[$command]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommand(string $command);", "abstract protected function getGitCommand(): string;", "private function runGitCommand($command)\n {\n $path = dirname($this->file);\n $process = new Process($command, $path);\n\n if (0 === $process->run()) {\n return trim($process->getOutput());\n }\n\n throw new RuntimeException(\n sprintf(\n 'The tag or commit hash could not be retrieved from \"%s\": %s',\n $path,\n $process->getErrorOutput()\n )\n );\n }", "private function executeGitCommand($command) {\n\n $args = func_get_args();\n $site = $this->site;\n\n $args[0] = $site['git binary'] . ' ' . $args[0];\n $command = call_user_func_array('sprintf', $args);\n $site['log']('Executing `' . $command . '`.');\n\n $process = $site['process']($command);\n $process->setWorkingDirectory($site['site.code_directory']);\n if (!$site['simulate']) {\n // Git operations can run long, set our timeout to an hour.\n $process->setTimeout(3600);\n $shortCommand = implode(' ', array_splice(explode(' ', $command), 0, 2));\n $process->run(function ($type, $buffer) use ($shortCommand) {\n if ($type === 'err') {\n fwrite(STDERR, ' ' . $shortCommand . ' stderr: ' . $buffer);\n }\n else {\n fwrite(STDOUT, ' ' . $shortCommand . ' stdout: ' . $buffer);\n }\n });\n\n if (!$process->isSuccessful()) {\n throw new \\Exception('Executing Git command failed: `' . $command . '`. Git responded with: ' . $process->getErrorOutput() . ' ' . $process->getOutput());\n }\n }\n\n return $process->isSuccessful();\n }", "function loadCommand($name) {\n $path = sprintf(\n '%s/php/Terminus/Commands/%sCommand.php',\n TERMINUS_ROOT,\n ucwords($name)\n );\n\n if (is_readable($path)) {\n include_once $path;\n }\n}", "public function exec($command)\n {\n try {\n return $this->git->exec($command);\n } catch (GitException $e) {\n throw new GitCommandException($this, $e->getMessage(), $e->getCode(), $e);\n }\n }", "private function runGitCommand($baseFile, $command)\n {\n $path = dirname($baseFile);\n $process = new Process($command, $path);\n\n if (0 === $process->run()) {\n return trim($process->getOutput());\n }\n\n throw new \\RuntimeException(\n sprintf(\n 'The tag or commit hash could not be retrieved from \"%s\": %s',\n $path,\n $process->getErrorOutput()\n )\n );\n }", "public function testCanRetrieveMainCommand()\n {\n $mainCommand = 'git';\n $command = $this->createInstance($mainCommand);\n $this->assertSame($mainCommand, $command->getMainCommand(), 'Main command must be retrievable');\n }", "public function command(Command $command);", "public static function get($commandName, Config $config)\n {\n $instance = null;\n $commandName = ucwords(str_replace('-', ' ', $commandName));\r\n $commandName = str_replace(' ', '', $commandName);\n\n $commandName = str_replace(' ', '_', ucwords(str_replace('/', ' ', $commandName)));\n $className = 'Mage\\\\Command\\\\BuiltIn\\\\' . $commandName . 'Command';\n if (Autoload::isLoadable($className)) {\n $instance = new $className;\n $instance->setConfig($config);\n } else {\n throw new Exception('Command not found.');\n }\n\n if(!($instance instanceOf AbstractCommand)) {\n throw new Exception('The command ' . $commandName . ' must be an instance of Mage\\Command\\AbstractCommand.');\n }\n\n return $instance;\n }", "public function execute($cmd)\n\t{\n\t\tif (!is_array($cmd))\n\t\t{\n\t\t\t$cmd = array($cmd);\n\t\t}\n\n\t\tarray_unshift($cmd, 'git');\n\t\t$cmd = self::processCommand($cmd);\n\n\t\t$this->begin();\n\t\texec($cmd . ' 2>&1', $output, $ret);\n\t\t$this->end();\n\n\t\tif ($ret !== 0)\n\t\t{\n\t\t\tthrow new ExtendedGitException(\"Command '$cmd' failed (exit-code $ret).\", $ret, NULL, $output); // ONLY THIS LINE IS MODIFIED\n\t\t}\n\n\t\treturn $output;\n\t}", "public function loadSubcommand($subcommand, $parent)\n {\n $parent_class = get_class($parent);\n $class = '\\\\' . $parent_class . '\\\\' . $this->translate($subcommand);\n return $this->loadClass($class);\n }", "public function resolve(Command $command);", "private function ensureCommandExists($command)\n {\n if (!$this->hasCommand($command)) {\n throw new CommandNotFound($command, $this->commands);\n }\n }", "private function prepareRepository($command)\n\t{\n\t\t$model = $this->getModel()->getApplication();\n\t\tif (preg_match('~([\\w-]+\\s+\\')([^\\']+)(\\'.*)~',\t$command, $matches)) {\n\t\t\treturn $model->getRepositoryPath() . '/' . trim($matches[2], ' \\\\/');\n\t\t}\n\t\tthrow new \\RuntimeException('V příkazu není uvedena cesta k repozitáři.');\n\t}", "protected function checkAndGet($command, $key, $required=TRUE) {\n if (!isset($command[$key]) and $required) {\n throw new Exception(\"Expected key '$key' does not exist within command.\");\n }\n return $command[$key];\n }", "public function load($cmd, $model = null, $args = array())\n\t{\n\t\t// If $model is null we use the default model\n\t\t$model = $this->getModel($model);\n\n\t\t// First check to make sure the model requested exists\n\t\tif (!$model)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t// Model exists, let's build the method name\n\t\t$method = 'get' . ucfirst($cmd);\n\n\t\t// Does the method exist?\n\t\tif (!method_exists($model, $method))\n\t\t{\n\t\t\t$method = 'load' . ucfirst($cmd);\n\t\t}\n\n\t\t// The method exists, let's call it and return what we get\n\t\t$result = call_user_func_array(array($model, $method), $args);\n\n\t\treturn $result;\n\t}", "public function loadCommand(string ...$commands): void\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands($commands);\n }", "public function __construct($command)\n {\n $this->command = $command;\n }", "private function git($command)\n {\n $current_directory = getcwd();\n chdir($this->base_path);\n $output = trim(shell_exec(sprintf('%s %s', 'git', $command)));\n chdir($current_directory);\n\n return $output;\n }", "public function resolveCommand(CommandContract|string $command, ?ResponseObject $update = null): ?CommandContract\n {\n if ($command instanceof CommandContract) {\n return $command;\n }\n\n $command = $this->commands[strtolower($command)] ?? $command;\n\n if (is_object($command)) {\n return $this->validateCommandClassInstance($command);\n }\n\n if (! class_exists($command)) {\n $this->dispatchCommandNotFoundEvent($command, $update);\n\n if (array_key_exists('help', $this->commands)) {\n $command = $this->commands['help'];\n } else {\n return null;\n }\n }\n\n try {\n $command = $this->bot->getContainer()->make($command);\n } catch (BindingResolutionException $e) {\n throw TelegramCommandException::commandNotInstantiable($command, $e);\n }\n\n return $this->validateCommandClassInstance($command);\n }", "public function cmd($commandName, $ctrArg = null) {\n\t\t$className = 'libhg_Command_'.ucfirst(strtolower($commandName)).'_Cmd';\n\n\t\tif (!class_exists($className)) {\n\t\t\tthrow new libhg_Exception('Could not find class \"'.$className.'\" for \"'.$commandName.'\" command.');\n\t\t}\n\n\t\tif ($ctrArg === null) {\n\t\t\t$cmd = new $className();\n\t\t}\n\t\telse {\n\t\t\t$cmd = new $className($ctrArg);\n\t\t}\n\n\t\t$client = $this->getClient()->setRepository($this);\n\n\t\treturn $cmd->setClient($client);\n\t}", "public function fastImport($commands, $options = array()) {\n $options = array_merge($this->default_options, $options);\n\n if (empty($options['export-marks'])) {\n $options['export-marks'] = tempnam(sys_get_temp_dir(), 'git-marks');\n }\n\n $command = $this->buildCommandLine($options);\n // The file descriptor array for the fast-import process. The read and write\n // specifications are from the view of git-fast-import.\n $descriptorspec = array(\n 0 => array(\"pipe\", \"r\"), // stdin\n 1 => array(\"pipe\", \"w\"), // stdout\n 2 => array(\"pipe\", \"w\"), // stderr\n );\n\n $proc = proc_open($command, $descriptorspec, $pipes, $this->path);\n if (!is_resource($proc)) {\n throw new Exception('Failed to open git process.');\n }\n\n $proc_in = $pipes[0];\n $proc_out = $pipes[1];\n $proc_err = $pipes[2];\n foreach ($commands as $command) {\n $cmd_type = $this->checkAndGet($command, 'command');\n $funcname = 'handle_'. $cmd_type .'_command';\n switch ($cmd_type) {\n case 'commit':\n case 'tag':\n case 'reset':\n case 'blob':\n case 'checkpoint':\n case 'progress': {\n fwrite($proc_in, call_user_func(array($this, $funcname), $command));\n fflush($proc_in);\n }\n break;\n default:\n throw new Exception(\"Unknown command type: \". $command['command']);\n }\n }\n fclose($proc_in);\n $stdout_result = stream_get_contents($proc_out);\n $stderr_result = stream_get_contents($proc_err);\n\n fclose($proc_out);\n fclose($proc_err);\n $ret_val = proc_close($proc);\n $marks = self::readMarksFile($options['export-marks']);\n\n // Clean up temporary file.\n unlink($options['export-marks']);\n\n return array($ret_val, $marks, $stdout_result, $stderr_result);\n }", "public function run($command) {\n\t\t\treturn shell_exec($this->command_prefix.Git::get_bin() . \" \" . $command . ' 2>&1');\n\t\t}", "public function addCommand($command);", "protected function load_extends( array $args = null, array $assoc_args = null ) {\n\t\tif ( null !== $args && null !== $assoc_args ) {\n\t\t\t$this->args = $args;\n\t\t\t$this->assoc_args = $assoc_args;\n\t\t}\n\n\t\tif ( empty( $this->args ) ) {\n\t\t\t// No sub command given.\n\t\t\t$this->call();\n\t\t\treturn;\n\t\t} else {\n\t\t\t// First, make sure that <command> exists.\n\t\t\t$command_string = array_shift( $this->args );\n\t\t\t$command_class_string = Utils::get_command_class_string( $command_string );\n\n\t\t\t// Instantiate command class.\n\t\t\ttry {\n\t\t\t\t// Command namespace.\n\t\t\t\t$command_fully_qualified_class = \"{$this->get_extended_namespace()}\\\\{$command_class_string}\";\n\n\t\t\t\t// AbstractCommands are inside their own directory.\n\t\t\t\tif ( ! ( $this instanceof AbstractSubCommand ) ) {\n\t\t\t\t\t$command_fully_qualified_class .= \"\\\\{$command_class_string}\";\n\t\t\t\t}\n\n\t\t\t\t// Dynamically call the class responsible for the command and sub command.\n\t\t\t\t$sub_command = new $command_fully_qualified_class();\n\n\t\t\t\tif ( $sub_command instanceof ExtensibleInterface ) {\n\t\t\t\t\t$sub_command->load_extends( $this->args, $this->assoc_args );\n\t\t\t\t} elseif ( $sub_command instanceof CallableInterface ) {\n\t\t\t\t\t$sub_command->call();\n\t\t\t\t} else {\n\t\t\t\t\tthrow new \\TypeError();\n\t\t\t\t}\n\t\t\t} catch ( \\TypeError $type_error ) {\n\t\t\t\t\\WP_CLI::error( $command_class_string . ' is not a command.' );\n\t\t\t} catch ( \\Throwable $throwable ) {\n\t\t\t\t/**\n\t\t\t\t * TODO Error logs can be improved.\n\t\t\t\t *\n\t\t\t\t * It should show something like.\n\t\t\t\t *\n\t\t\t\t * <non-existent-subcommand> sub command not found!\n\t\t\t\t * <non-existent-subcommand> <non-existent-arg> arg not found!\n\t\t\t\t */\n\t\t\t\t\\WP_CLI::error( \"'{$command_string}' sub command not found!\" );\n\t\t\t}\n\t\t}\n\t}", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "protected function resolveCommand($command)\n {\n if (! class_exists($command)) {\n return $this->getApplication()->find($command);\n }\n\n $command = $this->laravel->make($command);\n\n if ($command instanceof SymfonyCommand) {\n $command->setApplication($this->getApplication());\n }\n\n if ($command instanceof self) {\n $command->setLaravel($this->getLaravel());\n }\n\n return $command;\n }", "public function command($command)\n {\n return $this->exec(PHP_BINARY . ' ' . $this->yiiCliEntryPoint . ' ' . $command);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "protected function loadCommand()\r {\r $this->addCommandLine( 'lsb_release -a');\r\r }", "public function edit(command $command)\n {\n //\n }", "abstract protected function getCommand();", "public function getBinaryCommand()\n {\n if (! file_exists($this->libraryCommand)) {\n throw new \\Exception(\"{$this->libraryCommand} could not be found on the system\");\n }\n\n return $this->libraryCommand;\n }", "function testFindCommandThrowsException()\n {\n $console = new Console();\n\n $this->setExpectedException('App\\Core\\Console\\CommandNotFoundException');\n\n $console->findCommand(\"nonexistent-command-test\");\n\n }", "public static function runGitCommand($cmd)\n {\n $process = new Process($cmd, self::$repositoryDir);\n $process->run();\n return $process->getExitCode();\n }", "public function command($command)\n {\n return $this->exec(PHP_BINARY . ' yii ' . $command);\n }", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function resolve($command)\n {\n return $this->add($this->container[$command]);\n }", "public function extract($command)\n {\n if (!$command instanceof Command) {\n throw new InvalidCommandException(\\sprintf(\n 'Command must implement \"%s\" interface, \"%s\" given.',\n Command::class,\n \\is_object($command) ? \\get_class($command) : \\gettype($command)\n ));\n }\n\n return $command->getCommandType();\n }", "public function handle(Command $command);", "public function handle(Command $command);", "public function fetchCommit(string $hash) : string\n {\n $extensions = $this->extensionInDiff;\n\n if($returned = shell_exec($this->makeCmd(\"show $hash\" . ' ' . \"'$extensions'\"))) {\n return $returned;\n } else {\n throw new \\RuntimeException(\"No data for commit $hash\", 404);\n }\n }", "protected function run($cmd/*, $options = NULL*/)\n\t{\n\t\t$args = func_get_args();\n\t\t$cmd = self::processCommand($args);\n\t\texec($cmd . ' 2>&1', $output, $ret);\n\n\t\tif ($ret !== 0)\n\t\t{\n\t\t\tthrow new ExtendedGitException(\"Command '$cmd' failed (exit-code $ret).\", $ret, NULL, $output); // ONLY THIS LINE IS MODIFIED\n\t\t}\n\n\t\treturn $this;\n\t}", "abstract public function run($command);", "public function resolve($command)\r\n {\r\n return $this->add($this->yuga[$command]);\r\n }", "public function run($command);", "public function run($command);", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function run(string $command);", "public function testCanRunValidCommand()\n {\n $dir = __DIR__;\n $command = new Command(\"/bin/ls $dir/Command*\");\n\n $this->assertFalse($command->getExecuted());\n $this->assertTrue($command->execute());\n $this->assertTrue($command->getExecuted());\n $this->assertEquals(\"$dir/CommandTest.php\", $command->getOutput());\n $this->assertEquals(\"$dir/CommandTest.php\\n\", $command->getOutput(false));\n $this->assertEmpty($command->getError());\n $this->assertEmpty($command->getStdErr());\n $this->assertEquals(0, $command->getExitCode());\n }", "private function validateCommandClassInstance(object $command): CommandContract\n {\n if ($command instanceof CommandContract) {\n return $command;\n }\n\n throw TelegramCommandException::commandClassNotValid($command);\n }", "function commandProcessorGet($commandId)\n{\n\tglobal $ajax;\n\n\tswitch ((int)$commandId)\n\t{\n\t\tdefault:\n\t\t\t// If we get here, then the command is undefined.\n\t\t\t$ajax->sendCode(ajaxClass::CODE_NOTIMP,\n\t\t\t\t'The command ' . $_POST['COMMAND'] .\n\t\t\t\t' has not been implemented');\n\t\t\texit(1);\n\t\t\tbreak;\n\t}\n}", "public function gitPull() {\n $current_branch = exec('git rev-parse --abbrev-ref HEAD');\n\n $collection = $this->collectionBuilder();\n $collection->taskGitStack()\n ->pull()\n ->run();\n\n $name = $this->confirm(\"Run Composer Install?\");\n if ($name) {\n $this->composerInstall();\n }\n\n $name = $this->confirm(\"Run Config Import?\");\n if ($name) {\n $this->drushCim();\n }\n }", "public function add(Command $command);", "public function command($cmd)\n {\n $response = $this->protocol->opQuery(\"{$this->name}.\\$cmd\", $cmd, 0, -1, 0);\n return $response['result'][0];\n }", "public function testSetGetCommandFailure()\n {\n $command = new \\stdClass();\n\n $subject = $this->createInstance();\n $_subject = $this->reflect($subject);\n\n $this->setExpectedException('InvalidArgumentException');\n $_subject->_setCommand($command);\n }", "public function iCallCommand($command)\n {\n $this->executeCommand($command);\n }", "public function getCommand(): string\n {\n $command = 'git'\n . $this->getRootOption()\n . $this->getConfigParameterOptions()\n . ' '\n . $this->getGitCommand();\n return $command;\n }", "private function get_command_object( string $command_key ): ?Command {\n\t\tforeach ( $this->get_commands() as $command ) {\n\t\t\tif ( $command->get_key() == $command_key ) {\n\t\t\t\treturn $command;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function command($command)\n {\n return $this->connection->command($command);\n }", "public function getCommand() {}", "protected function runCustomCommand($command)\n {\n if (!CommandRegistry::hasCommand($command['command'])) {\n throw new BadMethodCallException('Command \"' . $command['command'] . '\" not found');\n }\n $customCommand = CommandRegistry::getCommand($command['command']);\n\n array_unshift($command['params'], $this->image);\n call_user_func_array($customCommand, $command['params']);\n\n return true;\n }", "public function command($command)\n {\n if (! $command instanceof Command) {\n $command = $this[$command];\n }\n\n $this['console']->add($command);\n }", "public function run(Command $command);", "public function git_init($dir)\n\t\t{\n\t\t\t$cmd=\"git init \".$dir;\n\t\t\t//printf(\"cmd:%s<br/>\",$cmd);//test\n\t\t\t$last_line=exec ($cmd , $output , $retval);\n\t\t\tcheck_error($cmd,$retval);\n\t\t}", "public function setCommand($command)\n {\n $this->command = $command;\n }", "public function getCommand();", "public function main()\n {\n if (null === $this->getRepository()) {\n throw new BuildException('\"repository\" is required parameter');\n }\n $client = $this->getGitClient(false, $this->getRepository());\n $command = $client->getCommand('tag');\n $command\n ->setOption('-l')\n ->setOption('--sort', '-v:refname');\n $result = $command->execute();\n var_dump($result);\n }", "public function show(command $command)\n {\n //\n }", "function do_clone_or_pull($key, $url, $path, $operation) {\n // Already a git repo there. Do a pull.\n if ((is_dir($path)) && (file_exists($path . \"/.git\"))) {\n\tif($operation==\"TAG\"){\n\t\treturn do_fetch($key,$url,$path);\n\t}\n\telse{\n\t\treturn do_pull($key,$url,$path);\n\t}\n }\n \n // Try a clone\n $out = do_clone($key,$url,$path);\n if (!is_dir($path)) {\n $out .= \"\\nClone appeared to fail.\\n\";\n }\n return $out;\n}", "protected function setCommand($command)\n {\n $this->command = $command;\n }", "public function inflect(ICommand $command);", "private function _runCommand($command = 'install')\r\n\t{\r\n // load the ID of the package to initialize and the package itself\r\n $id = $this->getRequest()->getParam('id');\r\n\t $package = Mage::getModel('manager/package');\r\n\t $package->load($id);\r\n // initialize the options for the PEAR installer\r\n $opts = array();\r\n // initialize the parameters for the PEAR installer\r\n\t $params = array(\r\n\t $config = Mage::helper('manager')->getChannelAsString(\r\n\t $package\r\n\t )\r\n\t );\r\n // check the passed command\r\n\t switch ($command) {\r\n\t case Faett_Core_Interfaces_Service::COMMAND_INSTALL:\r\n \t if ((boolean) Mage::getStoreConfig('manager/global/force')) {\r\n $opts['force'] = true;\r\n }\r\n\t $this->_service->install($opts, $params);\r\n\t break;\r\n\t case Faett_Core_Interfaces_Service::COMMAND_UPGRADE:\r\n \t if ((boolean) Mage::getStoreConfig('manager/global/force')) {\r\n $opts['force'] = true;\r\n }\r\n\t $this->_service->upgrade($opts, $params);\r\n\t break;\r\n\t case Faett_Core_Interfaces_Service::COMMAND_UNINSTALL:\r\n\t $this->_service->uninstall($opts, $params);\r\n\t break;\r\n\t default:\r\n\t throw Faett_Manager_Exception_InvalidCommandException::create(\r\n \t\t Mage::helper('manager')->__(\r\n \t\t '201.error.invalid-command',\r\n \t\t $command,\r\n $this->_getConfigUrl()\r\n \t\t )\r\n\t );\r\n\t }\r\n // load the package information\r\n $info = $this->_service->packageInfo(\r\n $package->getName(),\r\n $package->getChannel()->getAlias()\r\n );\r\n // load the installed version\r\n if (array_key_exists('installed', $info)) {\r\n $package->setVersionInstalled(\r\n $versionInstalled = $info['installed']\r\n );\r\n }\r\n // load the latest version\r\n if (is_array($info['releases'])) {\r\n $package->setVersionLatest(\r\n $versionLatest = reset(\r\n array_keys($info['releases'])\r\n )\r\n );\r\n }\r\n // set the package state\r\n $package->setState(\r\n Mage::helper('manager')->getPackageState($package)\r\n );\r\n // update the package\r\n $package->save();\r\n // log a message with the message logged by PEAR\r\n Mage::log($this->_service->getUI()->getLogText());\r\n // return the package name\r\n return $package->getName();\r\n\t}", "private function parse_commands_simple(&$package, $command)\n {\n $type = $command['@attributes']['type'];\n $cmd = isset($command['@attributes']['cmd']) ? $command['@attributes']['cmd'] : null;\n $include = isset($command['@attributes']['include']) ? $command['@attributes']['include'] : null;\n\n // Parse exits codes subarray\n $exits = null;\n if (isset($command['exit'])) {\n $exits = $this->parse_exits($command['exit']);\n }\n\n // Add command\n $package->withCommand($type, $cmd, $include, $exits);\n }", "private function __execute($command) {\n\t\ttry {\n\t\t\treturn $this->_client->execute($command);\n\t\t} catch (Guzzle\\Http\\Exception\\CurlException $e) {\n\t\t\tthrow new PredictionAPIException(__d('predictionIO', 'Unable to connect to the predictionIO server at %s', Configure::read('predictionIO.host')));\n\t\t} catch(Exception $e) {\n\t\t\t// Mute all other errors\n\t\t\t// Can't throw an exception here, since no recommendation is raising an exception\n\t\t\treturn array();\n\t\t}\n\t}", "public function setCommand($command)\n\t{\n\t\t$this->command = $command;\n\t}", "public function buildCommand(string $op): string\n {\n return $this->git.' '.$op;\n }", "public static function determineGit($arg, &$matches)\n {\n $reg0 = '#^\n (?:git|https|http|ssh|rsync|file?)(://|@).*?(/|\\:)\n (?P<package>[a-zA-Z0-9\\-_]+)\n (?:\n (?:\\.git|)\n (?:\\#(?P<reference>.*?)|)\n )?\n $#x';\n\n return self::match([$reg0], $arg, $matches);\n }", "public function runCommandAndIgnoreErrors($command)\n { $log = usingLog()->startAction(\"run command '{$command}' on host '{$this->args[0]}'\");\n\n // make sure we have valid host details\n $hostDetails = $this->getHostDetails();\n\n // get an object to talk to this host\n $host = OsLib::getHostAdapter($this->st, $hostDetails->osName);\n\n // run the command in the guest operating system\n $result = $host->runCommand($hostDetails, $command);\n\n // all done\n $log->endAction();\n return $result;\n }", "function do_fetch($key,$url,$path) {\n $cmd = \"ssh-agent bash -c 'cd $path; ssh-add $key; git fetch' 2>&1\";\n _log(\"Exec command: $cmd\\n\");\n return shell_exec($cmd);\n}", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function testNotPassingCommandName()\n {\n $this->expectException(RuntimeException::class);\n $this->tokenizer->tokenize([\n 'foo' => 'bar'\n ]);\n }", "private function loadCommands()\n {\n foreach($this->commands as $command => $class)\n {\n $this->app->bindShared($command, function($app) use ($class)\n {\n return $app->make($class);\n });\n\n $this->commands($command);\n }\n }", "protected function loadPipe()\n {\n if( NULL === $this->pipeName )\n {\n throw new Exception( 'You must specify a pipe with setPipe() first!' );\n }\n\n $pipe = $this->__get( 'definitionStorage' )->loadByName( $this->pipeName, $this->pipeVersion );\n if( !$pipe instanceof ymcPipe )\n {\n throw new Exception( \n sprintf( 'Could not load pipe %s, version %s with definitionStorage of type %s.',\n $this->pipeName,\n $this->pipeVersion ? $this->pipeVersion : '(undefined)',\n get_class( $this->__get( 'definitionStorage' ) ) )\n );\n }\n\n $nodeStates = $this->nodeStates;\n foreach( $pipe->nodes as $node )\n {\n $id = $node->id;\n if( array_key_exists( $id, $nodeStates ) )\n {\n $node->unserializeState( $nodeStates[$id] );\n }\n }\n\n $this->pipe = $pipe;\n $this->pipeVersion = $pipe->version;\n }", "protected function doToggleModules($command, $config_key) {\n if ($this->getConfig()->has($config_key)) {\n $modules = $this->getConfigValue($config_key);\n\n foreach ($modules as $module) {\n $result = $this->taskDrush()\n ->drush(\"$command $module\")\n ->assume(TRUE)\n ->run();\n $exit_code = $result->getExitCode();\n\n if ($exit_code) {\n throw new BltException(\"$module riknio.\");\n }\n }\n\n }\n else {\n $exit_code = 0;\n $this->logger->info(\"$config_key is not set.\");\n }\n\n if ($exit_code) {\n throw new BltException(\"Could not toggle modules listed in $config_key.\");\n }\n }", "protected function determineCommand()\n {\n if (mb_strlen($this->source) === 0) {\n $this->isInterrupted = true;\n\n return;\n }\n\n $this->command = mb_substr($this->source, 0, 1);\n }", "private function get_command(){\n if (!isset($_POST['command'])) {\n die(\"No command received, no result\");\n }\n $this->command = $_POST['command'];\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "private function createCommandLoader(\n ContainerInterface $container,\n array $commands\n ): CommandLoaderInterface {\n $commandMap = [];\n\n foreach ($commands as $name => $serviceKey) {\n if (is_int($name)) {\n // name is not defined\n /* @var $command Command */\n $command = $container->get($serviceKey);\n $name = $command->getName();\n }\n\n $commandMap[$name] = $serviceKey;\n }\n\n return new ContainerCommandLoader($container, $commandMap);\n }", "function handle_blob_command($command) {\n $mark = $this->checkAndGet($command, 'mark', FALSE);\n $data = $this->checkAndGet($command, 'data');\n $output = \"blob\\n\";\n $output .= $this->handleMark($mark);\n $output .= $this->handleData($data);\n return $output;\n }", "public function git($cmd, $replacements = [], $redacted = [])\n {\n return $this->execWithRedaction('git {dir}' . $cmd, ['dir' => \"-C {$this->dir} \"] + $replacements, ['dir' => ''] + $redacted);\n }", "static public function GetCommand() {\n if (isset(self::$command))\n return self::$command;\n else\n return false;\n }", "public function testSetGetCommand()\n {\n $string = uniqid('command-');\n $command = $this->createCommand($string);\n\n $subject = $this->createInstance();\n $_subject = $this->reflect($subject);\n\n $_subject->_setCommand($command);\n $result = $_subject->_getCommand();\n\n $this->assertEquals($command, $result, 'Assigned command is wrong');\n }", "public function testAddCommandNegative()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->calc->addCommand(null, $this->getCommandMock());\n }", "public function eval($command)\n {\n $commandEncoded = base64_encode($command);\n $this->run(\"eval -i {id} -- $commandEncoded\");\n }", "protected final function commandForToken($token)\n {\n if (isset($this->commandMap[$token])) return $this->commandMap[$token];\n return NULL;\n }", "function isGit($resource,$site) {\n\t\n //$error=[];\n //chdir(\"../../zone/\". $resource . \"/\" . $site);\n //exec('\"C:\\Program Files\\Git\\cmd\\git.exe\" rev-parse --verify master 2>&1', $output, $error[0]);\n //exec('\"C:\\Program Files\\Git\\cmd\\git.exe\" ls-remote -q --refs 2>&1', $output, $error[1]); \n\t$result = checkIsGit($resource,$site);\n\t\n if ($result == \"Y\")\n return TRUE;\n else \n return FALSE; \n}", "public function hasCommand(string $command = NULL): bool;", "protected function getGitCommand(): string\n {\n return 'diff-tree'\n . ' --diff-algorithm=myers'\n . ' --no-ext-diff'\n . ' --no-commit-id'\n . ' --name-only'\n . ' -r'\n . (!empty($this->filter) ? ' --diff-filter=' . implode('', $this->filter) : '')\n . ' ' . $this->getVersionsToCompare();\n }" ]
[ "0.6075108", "0.5926321", "0.587538", "0.5646386", "0.5596301", "0.5428948", "0.5323745", "0.5267764", "0.51087785", "0.50897366", "0.5089615", "0.5085852", "0.5067194", "0.5038133", "0.50078964", "0.4954108", "0.49481094", "0.49432927", "0.4932581", "0.4920479", "0.4911014", "0.48994106", "0.48452884", "0.48336744", "0.48265058", "0.4809848", "0.48040107", "0.48011422", "0.48009977", "0.4800244", "0.47741008", "0.47325814", "0.47304213", "0.46911907", "0.46843117", "0.4679733", "0.46350947", "0.46155635", "0.4615", "0.456739", "0.4543497", "0.4543497", "0.45421314", "0.4524485", "0.4516406", "0.45083874", "0.450532", "0.450532", "0.44949663", "0.44939777", "0.44878268", "0.4480002", "0.44763768", "0.44760358", "0.4474272", "0.44510618", "0.44357613", "0.44322303", "0.44284707", "0.4424121", "0.44047362", "0.43866682", "0.43854615", "0.43829295", "0.4382477", "0.4373944", "0.43571237", "0.43517688", "0.4334957", "0.43328375", "0.43261606", "0.43154925", "0.4313153", "0.43128514", "0.43087903", "0.42957938", "0.4291263", "0.4291234", "0.42888355", "0.4263334", "0.42582104", "0.42385215", "0.42359322", "0.42338997", "0.4233037", "0.42317003", "0.42130914", "0.41996697", "0.4194258", "0.41941085", "0.41923395", "0.41869366", "0.4185653", "0.41788405", "0.41764027", "0.41723225", "0.41722792", "0.41694203", "0.41638198", "0.4161941" ]
0.7034166
0
if bot dont need to defense then can place a random move on available coordinates
public function randomCoordinates($availableTurnOptions) { $totalAvailablePlaces = count($availableTurnOptions)-1; $place = rand(0, $totalAvailablePlaces); if (count($availableTurnOptions) == 0) { $botCoordinates = $this->generateCoordinatesResponse(null, null, $this->players[1], "Game Draw!"); } else { $botCoordinates = $this->generateCoordinatesResponse($availableTurnOptions[$place][0], $availableTurnOptions[$place][1], $this->players[1]); } return $botCoordinates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pick_move() {\r\n $fill = false;\r\n do {\r\n //picks a random \"-\" spot and will fill it with \"x\" to represent opponent's move\r\n $next = rand(0, 8);\r\n if ($this->position[$next] == '-') {\r\n $this->position[$next] = 'x';\r\n $fill = true;\r\n }\r\n //keep filling until winning condition is found\r\n } while (!$fill);\r\n }", "public static function getRandomMove()\n {\n return array_rand(Game::$moves);\n }", "public function randomPos() {\n $this->columna=rand(0,3);\n $this->fila=rand(0,3);\n }", "function movenpc() {\n\t$result = mysql_query (\"SELECT id FROM players WHERE user='phaos_npc' ORDER BY stamina_time LIMIT 1\");\n\tif ($row = mysql_fetch_array($result)) {\n\t\t$npc = new character($row[\"id\"]);\n\n\t\tdefined('DEBUG') and DEBUG and $GLOBALS['debugmsgs'][]= \" trying to relocate $npc->name($npc->id) at $npc->location with stamina_time=$npc->stamina_time\";\n\n\t\t// let NPC heal HP and stamina\n\t\tif ($npc->hit_points < $npc->max_hp) {\n\t\t\t$npc->hit_points += (int)($npc->max_hp / 5);\t// heal 20%\n\t\t\tif ($npc->hit_points > $npc->max_hp) { $npc->hit_points = $npc->max_hp; }\n\t\t}\n\t\tif ($npc->stamina_points < $npc->max_stamina) {\n\t\t\t$npc->stamina_points += 3; // 3 at a time -- perhaps this should be calc another way\n\t\t\tif ($npc->stamina_points > $npc->max_stamina) { $npc->stamina_points = $npc->max_stamina; }\n\t\t}\n\n\t\t// reset stamina and regen time\n\t\t$npc->stamina_time\t= time()+1000;\t// FIXME: using 1000 as temp amount\n\n\n\t\tif ($npc->location != 0) {\n\t\t\t$npc->relocate( (int)rand(1,8) );\n\t\t}\n\n\t\tif ($npc->location == 0) {\n\t\t\t$condition_pass = $npc->sql_may_pass();\n\t\t\t// how did he get here?? -- let's put him at a random location\n\t\t\tdefined('DEBUG') and DEBUG and $GLOBALS['debugmsgs'][]= \" trying to relocate $npc->name($npc->id) at $npc->location with stamina_time=$npc->stamina_time\";\n\n\t\t\t$result=mysql_query(\"SELECT `id` FROM tower_locations WHERE $condition_pass ORDER BY RAND() LIMIT 1\") or die(mysql_error());\n\t\t\tlist($newloc) = mysql_fetch_array($result);\n\t\t\t$npc->place($newloc);\n\t\t}\n\n\t\t// now we can update the DB\n\t\t$query= \"UPDATE players SET\n\t\t\t\n\t\t\tstamina\t\t=\".$npc->stamina_points.\",\n\t\t\tstamina_time\t=\".$npc->stamina_time.\"\n\t\t\tWHERE id\t='\".$npc->id.\"'\";\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {echo \"$query:<B>Error \".mysql_errno().\" :</B> \".mysql_error().\"\"; exit;}\n\n\t} else {\t// didn't set $row from sql query\n\t\tdie(\"why could we not select a creature to move?\");\n\t}\n}", "function makeOpponentMove($x,$y){\n if ($this->strategy == \"Random\"){\n $rand = new RandomStrategy();\n $place = $rand->pickPlace($x,$y);\n return $place;\n }\n $smart = new SmartStrategy();\n $place = $smart->pickPlace($x,$y);\n return $place;\n }", "public function chooseMove()\n {\n return $this->getMoveFactory()->getMove(array_rand($this->getMoveFactory()->getAvailableMoves()));\n }", "public static function find_move ()\n {\n // Initialize the default value functions. These apply starting values\n // to each position on the board. The starting values are then used\n // in calculating the overall value of moving in each direction.\n $my_color = Map::current('color');\n static::$_value_functions = [\n '^c.$' => config::SCORE_OTHER_BOTS,\n \"^.$my_color\\$\" => config::SCORE_OWN_COLOR,\n '^.*$' => config::SCORE_OTHER_COLOR,\n ];\n // Initialize a default value matrix.\n static::$_value_matrix = static::_generate_value_matrix();\n // Load the default available commands.\n $commands = config::VALID_MOVES;\n // Retrieve coordinates for available moves from the current map.\n // Any invalid moves will get set to null.\n $available_moves = [];\n foreach ($commands as $command) {\n $available_moves[$command] = Map::get(Map::translate($command, Map::current('x'), Map::current('y')));\n }\n // Remove invalid directions -- edges of map and any adjacent tiles\n // containing another bot (and, for now, the \"idle\" command too).\n unset($available_moves['idle']);\n $available_moves = array_filter($available_moves, function($move){\n if ( is_null($move) || substr($move, 0, 1) == 'c' ) {\n return false;\n }\n return true;\n });\n // For now, let's continue this helpful debugging output. TODO.\n print_r($available_moves);\n // Select a strategy.\n // If there is only one move (or no moves), fall back to the \"stuck\"\n // strategy. In the future this strategy might do something cool.\n if ( count($available_moves) < 2 ) {\n return static::stuck($available_moves);\n }\n // If the bot is surrounded by its own color and all moves have negative\n // values, try escaping.\n if ( count(preg_grep(\"/^.$my_color\\$/\", $available_moves)) == count($available_moves) ) {\n echo \"Yipes! Surrounded by own color...\\n\";\n $positive_scores = array_filter(static::evaluate_moves($available_moves), function($score){\n return $score > 0;\n });\n if ( count($positive_scores) == 0 ) {\n return static::escape($available_moves);\n }\n }\n // Now that urgent situations are resolved, look at nearby bots and\n // consider their behavior.\n $bots = Map::get_bots();\n $my_bot = $bots[Map::current('x') . '/' . Map::current('y')];\n foreach ($bots as $location => $bot) {\n if ( $bot->color != $my_color && Map::distance($bot->x, $bot->y, Map::current('x'), Map::current('y')) < 10 && $bot->status() != 'inactive' ) {\n echo \"Nearby active opponent: \" . $bot->name . \"\\n\";\n // Check their move history against this bot's move history;\n // if they share more than 5 moves out of the last 20...\n $my_moves = array_filter($my_bot->get_recent_moves(20));\n $their_moves = array_filter($bot->get_recent_moves(20));\n $my_overlap = array_intersect($my_moves, $their_moves);\n $their_overlap = array_intersect($their_moves, $my_moves);\n // ...then try to figure out who's following who, and if the\n // other bot is following this bot, then switch to the \"punish\"\n // strategy.\n if ( count($their_overlap) > 5 && array_sum(array_keys($my_overlap)) > array_sum(array_keys($their_overlap)) ) {\n // If this bot's matching movement indices are generally\n // higher than the other bot's, then that means they've made\n // matching moves more recently, so the other bot can be\n // assumed to be following this one.\n return static::punish($available_moves, $bot);\n }\n }\n }\n // If more than 20% of the tiles on the map are unclaimed, then select\n // a friendlier, less aggressive movement pattern.\n if ( Map::count('ux') > array_product(Map::size()) * .2 ) {\n return static::cruise($available_moves);\n }\n // Default strategy: best local move.\n return static::aggressive($available_moves);\n }", "function getNextAction($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses, $allObstacles, $allActions, $logger, $directionToAvoid = null)\n{\n\t$thereIsABomb = false;\n\t$coordinatesInfo = getCoordinatesInfo($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses);\n\t$typeOfObstacle = $coordinatesInfo[\"typeOfObstacle\"];\n\t$moveAvailable = $coordinatesInfo[\"moveAvailable\"];\n\n\tif(in_array($allObstacles[\"bomb\"], $typeOfObstacle) || $game->state->findActiveBombAt($myPositionX, $myPositionY)) //bomb discovered\n\t{\n\t\t$action = runFromBomb($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $game, $logger);\n\t\t$thereIsABomb = true;\n\t}\n\telseif(in_array($allObstacles[\"opponent\"], $typeOfObstacle)) //opponent discovered \n\t{\n\t\t$action = huntOpponent($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger);\n\t}\n\telseif(in_array($allObstacles[\"destroyable_block\"], $typeOfObstacle)) //destroyable block discovered\n\t{\n\t\t$action = destroyBlock($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger, $directionToAvoid);\n\t}\n\telse{ //just free path\n\t\t$action = runRandom($moveAvailable, $typeOfObstacle, $allActions, $allObstacles, $logger);\n\t}\n\n\treturn [\n\t\t'action' => $action,\n\t\t'thereIsABomb' => $thereIsABomb,\n\t\t'typeOfObstacle' => $typeOfObstacle,\n\t\t'moveAvailable' => $moveAvailable\n\t];\n}", "private function makeMachineMove(){\n\t\t$spaces = $this->getAvaibleSpaces();\n\t $space = $spaces[rand()%count($spaces)];\n\t\t$this->gato[$space[0]][$space[1]] = $this->jugador2;\n\t\treturn $space[0].\":\".$space[1];\n\t}", "function getDirection($howlong)\n{\n global $xd;\n global $yd;\n global $x;\n global $y;\n $xd = 0;\n $yd = 0;\n $howlongx = 8 - $howlong;\n $direction = rand(0,1);\n if(($x > $howlongx && $direction == 1) || ($y > $howlongx) && $direction == 0)\n {\n header(\"Refresh:0\");\n }\n switch($direction)\n {\n case 0 : $yd = 1;break;\n case 1 : $xd = 1;break;\n }\n}", "private function move() {\n if ($this->facing === 'N') {\n $this->y++;\n } else if ($this->facing === 'E') {\n $this->x++;\n } else if ($this->facing === 'S') {\n $this->y--;\n } else if ($this->facing === 'W') {\n $this->x--;\n }\n \n // Check if we are still on the planet.\n if (($this->x < 0 || $this->x > $this->maxX) || ($this->y < 0 || $this->y > $this->maxY)) {\n // Out of safe planet boundaries.\n $this->crash = true;\n }\n }", "protected function thinkBot() {\n $cellReturn = '';\n $markers = array($this->_botMark, $this->_userMark); //offense first, then defense\n while ($this->isValidMove($cellReturn) === FALSE) {\n //defense and offense\n foreach ($markers AS $marker) {\n foreach ($this->_winningCombination AS $cells) {\n $lineCells = explode(\",\", $cells); //separate the winning combination to 3\n $marked = 0;\n $noMark = 0;\n for ($x = 0; $x < 3; $x++) {\n if (in_array($lineCells[$x], $this->_markers[$marker]))\n $marked++;\n else\n $noMark = $lineCells[$x];\n }\n if ($marked == 2 && $this->isValidMove($noMark)) {\n $cellReturn = $noMark;\n break;\n }\n }\n if ($cellReturn != '')\n break;\n }\n //plan\n if ($cellReturn == '') {\n while (!$this->isValidMove($cellReturn)) {\n $combinationRandKey = rand(0, 7);\n //separate the winning combination to 3 elements\n $lineCells = explode(\",\", $this->_winningCombination[$combinationRandKey]);\n if ($this->isValidMove($lineCells[0]))\n $cellReturn = $lineCells[0];\n elseif ($this->isValidMove($lineCells[1]))\n $cellReturn = $lineCells[1];\n else\n $cellReturn = $lineCells[2];\n }\n }\n }\n return $cellReturn;\n }", "function sloodle_random_position_in_zone($size)\n {\n // Construct the half-size array\n $halfsize = array('x'=>($size['x'] / 2.0) - 2.0, 'y'=>($size['y'] / 2.0) - 2.0, 'z'=>($size['z'] / 2.0) - 2.0);\n \n $pos = array();\n $pos['x'] = mt_rand(0.0, $size['x'] - 4.0) - $halfsize['x'];\n $pos['y'] = mt_rand(0.0, $size['y'] - 4.0) - $halfsize['y'];\n $pos['z'] = mt_rand(0.0, $size['z'] - 4.0) - $halfsize['z'];\n return $pos;\n }", "function randomDeployment(){\r\n\t\t\t$this->ships = array( self::AIRCRAFT => Ship::withNameAndSize(\"Aircraft Carrier\",5),\r\n\t\t\t\t\t\t\t\t self::BATTLESHIP => Ship::withNameAndSize(\"Battleship\",4),\r\n\t\t\t\t\t\t\t\t self::FRIGATE => Ship::withNameAndSize(\"Frigate\",3),\r\n\t\t\t\t\t\t\t\t self::SUBMARINE => Ship::withNameAndSize(\"Submarine\",3),\r\n\t\t\t\t\t\t\t\t self::MINESWEEPER => Ship::withNameAndSize(\"Minesweeper\",2) );\r\n\t\t\t\t\r\n\t\t\tforeach ( $this->ships as $shipNumber => $ship ) {\r\n\t\t\t\t$result = false;\r\n\t\t\t\twhile( !$result ){\r\n\t\t\t\t\t$direction = rand(0,1);\r\n\t\t\t\t\tif($direction){\r\n\t\t\t\t\t\t$offset = self::COLUMNS - ($ship->getSize() - 1);\r\n\t\t\t\t\t\t$xPos = rand(1, $offset);\r\n\t\t\t\t\t\t$yPos = rand(1, intval(self::ROWS) );\r\n\t\t\t\t\t\t$result = $this->placeShip($xPos, $yPos, $direction, $xPos + ($ship->getSize() - 1), $shipNumber);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$offset = self::ROWS - ($ship->getSize() - 1);\r\n\t\t\t\t\t\t$xPos = rand(1, intval(self::COLUMNS) );\r\n\t\t\t\t\t\t$yPos = rand(1, $offset);\r\n\t\t\t\t\t\t$result = $this->placeShip($xPos, $yPos, $direction, $yPos + ($ship->getSize() - 1), $shipNumber);\r\n\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t//echo \"Ship: \" . $shipSize . \", x: \" . $yPos . \", y: \" . $xPos . \", direction: \" . (($direction == true)? \"horizontal, \": \"vertical, \") . \" result: \" .( $result ) . PHP_EOL ;\r\n\t\t\t\t}\r\n\t\t\t\t$ship->setPositionAndDirection($xPos, $yPos, $direction);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//print_r($this->ships);\r\n\t\t}", "protected function AIMove() {\n $botMove = $this->botMove();\n echo \"Computer's move is '\" . $this->_botMark . \"' at box \" . $botMove . PHP_EOL;\n $this->_markers[$this->_botMark][] = $botMove;\n $this->drawBoard($this->_markers);\n if ($this->isWon($this->_botMark) || $this->isBoardFull())\n return true;\n return false;\n }", "function move($place){\n $this->ship->setPositionFromPlace($place);\n $this->ship->hold->change($this->fuel(), -1 * $this->getFuelReqTo($place) );\n }", "function mark_robot( $socket, $data ) {\r\n\tif($socket->process == true) {\r\n\t\t$ip = $data;\r\n\t\tglobal $player_array;\r\n\t\tRobots::add($ip);\r\n\t\tforeach( $player_array as $player ) {\r\n\t\t\tif($player->ip == $ip) {\r\n\t\t\t\t$player->human = false;\r\n\t\t\t\t$player->hostage_exp_points = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function makeMove($x,$y,$player) {\n\t\tif(strcmp($player,\"\") == 0){\n\t\t\t$player = \"COMPU\";\n\t\t}\n\t\t$response = '';\n\t\t$matriz = \"\";\n\t\tforeach($this->gato as $row){\n\t\t\t$matriz = $matriz.\"[\";\n\t\t\tforeach($row as $e){\n\t\t\t\t\t$matriz = $matriz.$e.\",\";\n\t\t\t}\n\t\t\t$matriz = $matriz.\"],\";\n\t\t}\n\t\terror_log($matriz);\n\t\terror_log($player);\n\t\terror_log(\"x:\".$x);\n\t\terror_log(\"y:\".$y);\n\t\tif($x < 0 && $y < 0){\n\t\t\t$response = $this->makeMachineMove();\n\t\t}\n\t\telse{\n\t\t\tif(strcmp($this->gato[$x][$y],'') == 0){\n \t$this->gato[$x][$y] = $player;\n \t$response = 'COOL';\n \t}\n\t\t\telse{\n\t\t\t\t$response = 'NOT_COOL';\n\t\t\t}\n\t\t}\n\t\t$gato_state = $this->won($player);\n\t\tif(strcmp($gato_state,'WON') == 0){\n\t\t\t$response= $response.\":WON\";\n\t\t}\n\t\telse{\n\t\t\t$getAvaibleSpaces = count($this->getAvaibleSpaces());\n\t\t\tif($getAvaibleSpaces == 0){\n\t\t\t\t$response = $response.\":TIE\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$response = $response.\":NORMAL\";\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t}", "public function makeATrip()\n {\n $this->travelStrategy->move();\n echo \"This place is kewl\";\n $this->travelStrategy->move();\n }", "function pawn($original_position, $new_position){\n\t\t//if($vector == 1 move ahead\n\t\t//X movement\n\t\t//Y movement\n\t\t//E2 to E4\n\t\t//E minus the E\n\t\t//4 minus 2\n\t\n\t}", "public function testComplexMove(){\n $gm = new GamesManager();\n\n $game = $this->generateGameObjectWithTwoPlayers();\n\n\n $game->gameState->currentPlayer = 0;\n $game->gameState->isGameGoing = true;\n $game->gameState->selectChecker = false;\n $game->gameState->pickedChecker = [4, 3];\n $game->gameState->possibleGoChoices = [array(\"row\"=>2, \"col\"=>5), array(\"row\"=>4, \"col\"=>3)];\n $game->gameState->boardState = $this->getMultipleBeat();\n\n $gm->userMove(2, 5, 1, $game );\n $gm->userMove(0, 3, 1, $game );\n $gm->userMove(3, 0, 1, $game );\n $result = $gm->userMove(7, 4, 1, $game );\n\n\n $this->assertEquals(0, $result[\"gameState\"]->boardState[4][3]);//initial\n $this->assertEquals(0, $result[\"gameState\"]->boardState[3][4]);//beaten\n $this->assertEquals(-1, $result[\"gameState\"]->boardState[1][6]);//still there due to turkish turn rule\n $this->assertEquals(0, $result[\"gameState\"]->boardState[1][4]);//beaten\n $this->assertEquals(0, $result[\"gameState\"]->boardState[2][1]);//beaten\n $this->assertEquals(0, $result[\"gameState\"]->boardState[4][1]);//beaten\n $this->assertEquals(2, $result[\"gameState\"]->boardState[7][4]);//end position of the hero checker\n\n }", "public function move()\n {\n }", "public function generatePossibleMoves(){\r\n\t\t\t$this->possibleMoves = array();\r\n\t\t\t// Iterates through all the possible moves\r\n\t\t\tfor ($currCol = 0; $currCol < 10; $currCol++){\r\n\t\t\t\tfor ($currRow = 0; $currRow < 10; $currRow++){\r\n\t\t\t\t\t$this->possibleMoves[($currRow * 10) + $currCol] = new Shot($currRow+1, $currCol+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "function zg_move_ai() {\n\n // Turn off AI moves for now.\n return;\n\n global $game, $ai_output, $bt_skip;\n\n include drupal_get_path('module', 'zg') . '/includes/' . $game . '_defs.inc';\n $game_user = zg_fetch_user();\n\n // PRE failed? return.\n if (!zg_pre_move_ai($game, $game_user, $game_name_full, $ai_output)) {\n return $ai_output;\n };\n\n// $ai_goals = [\n// ['need_bots_num_type', 9, 'protester'],\n// 'protest',\n// 'build',\n// ];\n\n [$bot, $goals, $results] = zg_ai_get_bot_goals_results();\n zg_ai_out(zg_ai_show_bot_brief_stats($bot));\n zg_ai_out($goals, 'goals pre-do');\n $results[] = $result = zg_ai_do_goal($bot, reset($goals), end($results));\n zg_ai_out($result, 'result from zg_ai_do_goal');\n\n if (zg_ai_is_goals_type($result)) {\n $goals = zg_ai_expand_goals($result, $goals);\n }\n\n if (zg_ai_is_data_type($result)) {\n $goals = zg_ai_remove_successful_goal($goals);\n }\n\n if ($result['success'] === FALSE) {\n $goals = zg_ai_remove_failed_goal($goals);\n }\n\n// zg_ai_do_goal($bot, ['web request', 'home'], []);\n// $bot = zg_fetch_user_by_id($bot->phone_id);\n// zg_ai_out(zg_ai_show_bot_brief_stats($bot));\n zg_ai_out($goals, 'goals post-do');\n zg_ai_set_bot_goals_results($bot, $goals, $results);\n\n // zg_ai_do('have_num_interns', 21) && zg_ai_do('build');\n // zg_ai_do('have_num_members', 18) && zg_ai_do('build');\n // zg_ai_do('have_num_treasurers', 2) && zg_ai_do('build');\n // zg_ai_do('have_num_alders', 1) && zg_ai_do('build');.\n\n zg_post_move_ai($game, $game_user, $ai_output);\n return $ai_output;\n}", "function tryMove($place){\n if($this->goNoGoForLaunch($place)){\n $this->move($place);\n return TRUE;\n }else{\n return False;\n }\n }", "public function ability() {\n\n $this->startMove(3, 0.2);\n echo \"THE ENGINE IS OVERHEATED!\\n\";\n $this->switchEngine();\n\n\n\n\n }", "public function randomQuestionWithUserInStormMode(): void\n {\n QuestionUserHelper::removeAllQuestionsForUser($this->user);\n QuestionHelper::newQuestion();\n\n $questionsList = User::randomQuestions('storm', [], Question_user::DEFAULT_BAG_LIMIT ,$this->user);\n\n $this->assertFalse($this->user->questions()->get()->contains($questionsList));\n }", "protected function userMove() {\n echo \"Your move: \";\n $move = FALSE;\n while ($move === FALSE) {\n $move = $this->isValidMove();\n if ($move === FALSE)\n echo $this->promptMessage('invalid_move');\n }\n if (strtoupper($move) == self::QUIT_BUTTON)\n return TRUE;\n\n\n echo \"Your move is '\" . $this->_userMark . \"' at box \" . $move . PHP_EOL;\n $this->_markers[$this->_userMark][] = $move;\n $this->drawBoard($this->_markers);\n if ($this->isWon($this->_userMark) || $this->isBoardFull())\n return TRUE;\n return FALSE;\n }", "public function hit(){\n array_push($this->hand,mt_rand(1,11));\n $this->score = array_sum($this->hand);\n }", "function lightseek_move_yoast() {\n return 'low';\n}", "public function random();", "protected function botMove() {\n $key = $this->thinkBot();\n return $key;\n }", "function _test_attack($type, $i, $opponent_color, $try_move) {\n/*\nprintf(\"try_move['from']: %s\\n\", $try_move['from']);\nprintf(\"try_move['to']: %s\\n\", $try_move['to']);\nprintf(\"try_move['piece']: %s\\n\", $try_move['piece']);\nprintf(\"this->enpa: %s\\n\", $this->enpa);\n*/\n $p = null;\n if ($try_move) {\n\n if ($i === $try_move['from']) {\n $p = 0;\n } \n elseif ($i === $try_move['to']) {\n // The trial move takes the piece being considered\n $p = $try_move['piece'];\n } \n elseif ( $try_move['piece'] === 'p' \n && intval($this->enpa) === intval($try_move['to'])\n && intval($i) === intval($this->enpa) + 10\n ) {\n $p = 0;\n }\n elseif ( $try_move['piece'] === 'P' \n && intval($this->enpa) === intval($try_move['to'])\n && intval($i) === intval($this->enpa) - 10\n ) {\n $p = 0;\n }\n else {\n $p = $this->pos[$i];\n }\n } \n else {\n $p = $this->pos[$i];\n }\n \n if ($p === null) {\n//print(\"A\\n\");\n return 1;\n }\n\n if ($p && $this->piece_color($p) === $opponent_color && strpos($type, strtolower($p)) !== FALSE) {\n//printf(\"p:%s\\n\", $p);\n//print(\"B\\n\");\n return -1;\n }\n//print(\"C\\n\");\n return $p;\n }", "function do_robots()\n {\n }", "function eat() {\n while($this->map[$this->row - 1][$this->column] == '-' or\n $this->map[$this->row][$this->column + 1] == '-' or\n $this->map[$this->row + 1][$this->column] == '-' or\n $this->map[$this->row][$this->column - 1] == '-') {\n \n $step = rand(UP, LEFT);\n switch ($step) {\n case UP:\n if($this->map[$this->row - 1][$this->column] == '-') {\n $this->map[$this->row][$this->column] = '*';\n $this->row -= 1;\n $this->map[$this->row][$this->column] = '+';\n $this->showMap();\n break;\n }\n \n case RIGHT:\n if($this->map[$this->row][$this->column + 1] == '-') {\n $this->map[$this->row][$this->column] = '*';\n $this->column += 1;\n $this->map[$this->row][$this->column] = '+';\n $this->showMap();\n break;\n }\n \n case DOWN:\n if($this->map[$this->row + 1][$this->column] == '-') {\n $this->map[$this->row][$this->column] = '*';\n $this->row += 1;\n $this->map[$this->row][$this->column] = '+';\n $this->showMap();\n break;\n }\n \n case LEFT:\n if($this->map[$this->row][$this->column - 1] == '-') {\n $this->map[$this->row][$this->column] = '*';\n $this->column -= 1;\n $this->map[$this->row][$this->column] = '+';\n $this->showMap();\n break;\n }\n }\n }\n }", "public function findRandom();", "public function position();", "function makePlayerMove($x,$y){\n if (!$this->board->isEmpty($x,$y)){\n return False;\n } else {\n $this->board[$x][$y] = 2;\n }\n }", "protected function selectPlayer(){\r\n $this->currentPlayer = rand(1,2);\r\n selectRandPlayerMsg($this->currentPlayer);\r\n }", "abstract protected function play(array $move = array());", "function rand() {\n\n $next = $this->find('first', array('order'=>'position DESC'));\n\n $rand = rand(1, $next['Ringsite']['position']);\n\n $next = $this->find('first', array('conditions'=>array('position'=>$rand)));\n\n return $next;\n }", "private function get_next_move() {\n\t\t$move = $this->can_put_a_card_up();\n\t\tif($move !== false) return $move;\n\t\t\n\t\t// Test si une carte peut être déplacée\n\t\t$move = $this->can_move_cards();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Test si la carte du deck peut descendre\n\t\t$move2 = $this->can_put_deck_card_down();\n\t\tif($move !== false && $move2 !== false) {\n\t\t\tarray_push($move, $move2);\n\t\t\treturn $move;\n\t\t} \n\t\tif($move !== false) return $move;\n\t\tif($move2 !== false) return $move2;\n\t\t\n\t\t// Test si une carte peut être montée suite à un déplacement spécial\n\t\t//$move = $this->can_put_a_card_up_after_move();\n\t\t//if($move !== false) return $move;\n\t\t\n\t\t// Pioche\n\t\t$move = $this->can_turn_from_deck();\n\t\tif($this->infinite_move($move)) return false;\n\t\tif($move !== false) return $move;\n\t\t\n\t\treturn false;\n\t}", "function allot()\n{\n\t$dist = rand(5,10);\n\t$dir = rand(0,7);\n\t\n\t$conn = connect();\n\t$query=\"SELECT row_tail,col_tail FROM map_res WHERE faction=\".$_SESSION[\"faction\"].\";\";\n\t$op = mysqli_query($conn,$query);\n\tif (mysqli_num_rows($op) != 1)\n\t{\n\t\t$x = \"\";\n\t\t$y = \"\";\n\t\t\n\t\tif ($_SESSION[\"faction\"] === \"1\")\n\t\t{\n\t\t\t$x = 25;\n\t\t\t$y = 50;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$x = 75;\n\t\t\t$y = 50;\n\t\t}\n\t\t\n\t\t$query=\"INSERT INTO map_res (faction,row_tail,col_tail) VALUES (\".$_SESSION[\"faction\"].\",\".$x.\",\".$y.\");\";\n\t\t$op=mysqli_query($conn,$query);\n\t\t//alert($query);\n\t\t$res[\"row\"] = $x;\n\t\t$res[\"col\"] = $y;\n\t\t//alert(var_dump($res));\n\t\treturn($res);\n\t}\n\t$op = mysqli_fetch_assoc($op);\n\t\n\tswitch($dir)\n\t{\n\t\tcase 0: //up\n\t\t\t$res_row = $op[\"row_tail\"] - $dist;\n\t\t\t$res_col = $op[\"col_tail\"];\n\t\tbreak;\n\t\t\n\t\tcase 1: //up-right\n\t\t\t$res_row = $op[\"row_tail\"] - floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] + floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 2: //right\n\t\t\t$res_row = $op[\"row_tail\"];\n\t\t\t$res_col = $op[\"col_tail\"] + floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 3: //down-right\n\t\t\t$res_row = $op[\"row_tail\"] + floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] + floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 4: //down\n\t\t\t$res_row = $op[\"row_tail\"] + $dist;\n\t\t\t$res_col = $op[\"col_tail\"];\n\t\tbreak;\n\t\t\n\t\tcase 5: //down-left\n\t\t\t$res_row = $op[\"row_tail\"] + floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] - floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 6: //left\n\t\t\t$res_row = $op[\"row_tail\"];\n\t\t\t$res_col = $op[\"col_tail\"] - floor($dist/1.4142);\n\t\tbreak;\n\t\t\n\t\tcase 7: //up-left\n\t\t\t\n\t\t\t$res_row = $op[\"row_tail\"] + floor($dist/1.4142);\n\t\t\t$res_col = $op[\"col_tail\"] - floor($dist/1.4142);\n\t\tbreak;\n\t}\n\t\n\t$res=array();\n\t\n\tif ($res_row > 99 || $res_row < 0 || $res_col > 99 || $res_col < 0 || getSlot($res_row,$res_col)[\"occupied\"] !== \"0\" || getSlot($res_row,$res_col)[\"special\"] === \"3\" || getSlot($res_row,$res_col)[\"special\"] === \"4\")\n\t{\n\t\t//alert(\"$res_row , $res_col\");\n\t\treturn(false);\n\t}\n\telse\n\t{\n\t\t$res[\"row\"] = $res_row;\n\t\t$res[\"col\"] = $res_col;\n\t\t//alert(var_dump($res));\n\t\treturn($res);\n\t}\n\t\n\t//return($res);\n}", "public function moveFinger()\n {\n }", "public function moveFinger()\n {\n }", "private function generateAsteroids()\r\n {\r\n // find out how many asteroids are in the local area\r\n $asteroidCount = 0;\r\n foreach ($this->asteroids as $asteroidId => $asteroid) {\r\n if ($asteroid->getX() > $this->spaceShip->getX() - $this->asteroidPreloadRange &&\r\n $asteroid->getY() > $this->spaceShip->getY() - $this->asteroidPreloadRange &&\r\n $asteroid->getZ() > $this->spaceShip->getZ() - $this->asteroidPreloadRange &&\r\n $asteroid->getX() < $this->spaceShip->getX() + $this->asteroidPreloadRange &&\r\n $asteroid->getY() < $this->spaceShip->getY() + $this->asteroidPreloadRange &&\r\n $asteroid->getZ() < $this->spaceShip->getZ() + $this->asteroidPreloadRange) {\r\n $asteroidCount++;\r\n }\r\n // if any asteroid is now so far from the ship that it can't have an effect then destroy it...\r\n if (abs($asteroid->getX() - $this->spaceShip->getX()) > $this->asteroidUnloadRange ||\r\n abs($asteroid->getY() - $this->spaceShip->getY()) > $this->asteroidUnloadRange ||\r\n abs($asteroid->getZ() - $this->spaceShip->getZ()) > $this->asteroidUnloadRange) {\r\n unset($this->asteroids[$asteroidId]);\r\n } \r\n }\r\n // how many were we expecting?\r\n $expectedAsteroidCount = pow(((2 * $this->asteroidPreloadRange) + 1), 3) / $this->asteroidDensity;\r\n if ($asteroidCount < $expectedAsteroidCount) {\r\n // keep adding asteroids...\r\n do {\r\n // randomly choose where to place the new asteroid, if the location is too near to the ships current location then regenerate the asteroid spawn point\r\n do {\r\n $xRand = rand(-$this->asteroidPreloadRange, $this->asteroidPreloadRange) + $this->spaceShip->getX();\r\n $yRand = rand(-$this->asteroidPreloadRange, $this->asteroidPreloadRange) + $this->spaceShip->getY();\r\n $zRand = rand(-$this->asteroidPreloadRange, $this->asteroidPreloadRange) + $this->spaceShip->getZ();\r\n $dxRand = rand(-Asteroid::$maxComponentVelocity, Asteroid::$maxComponentVelocity);\r\n $dyRand = rand(-Asteroid::$maxComponentVelocity, Asteroid::$maxComponentVelocity);\r\n $dzRand = rand(-Asteroid::$maxComponentVelocity, Asteroid::$maxComponentVelocity);\r\n } while ( // check the location we just chose, if its too close to the ship then go round the loop again\r\n (abs($xRand - $this->spaceShip->getX()) < $this->asteroidScanningRange &&\r\n abs($yRand - $this->spaceShip->getY()) < $this->asteroidScanningRange &&\r\n abs($zRand - $this->spaceShip->getZ()) < $this->asteroidScanningRange)\r\n // also the asteroid must have some velocity...\r\n || abs($dxRand) + abs($dyRand) + abs($dzRand) == 0\r\n );\r\n // make the new asteroid\r\n $this->asteroids[] = new Asteroid($xRand, $yRand, $zRand, $dxRand, $dyRand, $dzRand);\r\n $asteroidCount++;\r\n } while ($asteroidCount < $expectedAsteroidCount); // keep adding asteroids until there are the number we were expecting\r\n }\r\n }", "public function initalize()\n {\n parent::initalize();\n\n $this->locations[\"Ganon's Tower - DMs Room - Top Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - DMs Room - Top Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - DMs Room - Bottom Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - DMs Room - Bottom Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Randomizer Room - Top Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Randomizer Room - Top Right\",\n \"Ganon's Tower - Randomizer Room - Bottom Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Right\",\n ])\n && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Randomizer Room - Top Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Randomizer Room - Top Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Right\",\n ])\n && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Randomizer Room - Bottom Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Randomizer Room - Top Right\",\n \"Ganon's Tower - Randomizer Room - Top Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Right\",\n ])\n && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Randomizer Room - Bottom Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Randomizer Room - Top Right\",\n \"Ganon's Tower - Randomizer Room - Top Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Left\",\n ])\n && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Firesnake Room\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && $items->has('Hookshot')\n && (\n (($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Randomizer Room - Top Right\",\n \"Ganon's Tower - Randomizer Room - Top Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Left\",\n \"Ganon's Tower - Randomizer Room - Bottom Right\",\n ])\n ||\n $locations[\"Ganon's Tower - Firesnake Room\"]->hasItem(Item::get('KeyA2', $this->world))) &&\n $items->has('KeyA2', 2)) || $items->has('KeyA2', 3)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Map Chest\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hammer')\n && ($items->has('Hookshot')\n || ($this->world->config('itemPlacement') !== 'basic'\n && $items->has('PegasusBoots'))) && (in_array(\n $locations[\"Ganon's Tower - Map Chest\"]->getItem(),\n [\n Item::get('BigKeyA2', $this->world),\n Item::get('KeyA2', $this->world)\n ]\n )\n ? $items->has('KeyA2', 3) : $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n })->setAlwaysAllow(function ($item, $items) {\n return $this->world->config('accessibility') !== 'locations'\n && $item == Item::get('KeyA2', $this->world)\n && $items->has('KeyA2', 3);\n })->setFillRules(function ($item, $locations, $items) {\n return $this->world->config('accessibility') !== 'locations'\n || $item != Item::get('KeyA2', $this->world);\n });\n\n $this->locations[\"Ganon's Tower - Big Chest\"]->setRequirements(function ($locations, $items) {\n return $items->has('BigKeyA2')\n && $items->has('KeyA2', 3)\n && (\n ($items->has('Hammer')\n && $items->has('Hookshot')) || ($items->has('FireRod')\n && $items->has('CaneOfSomaria'))) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n })->setFillRules(function ($item, $locations, $items) {\n return $item != Item::get('BigKeyA2', $this->world);\n });\n\n $this->locations[\"Ganon's Tower - Bob's Chest\"]->setRequirements(function ($locations, $items) {\n return (($items->has('Hammer')\n && $items->has('Hookshot')) || ($items->has('FireRod')\n && $items->has('CaneOfSomaria'))) && $items->has('KeyA2', 3)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Tile Room\"]->setRequirements(function ($locations, $items) {\n return $items->has('CaneOfSomaria')\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Compass Room - Top Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('FireRod')\n && $items->has('CaneOfSomaria')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Compass Room - Top Right\",\n \"Ganon's Tower - Compass Room - Bottom Left\",\n \"Ganon's Tower - Compass Room - Bottom Right\",\n ])\n && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Compass Room - Top Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('FireRod')\n && $items->has('CaneOfSomaria')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Compass Room - Top Left\",\n \"Ganon's Tower - Compass Room - Bottom Left\",\n \"Ganon's Tower - Compass Room - Bottom Right\",\n ])\n && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Compass Room - Bottom Left\"]->setRequirements(function ($locations, $items) {\n return $items->has('FireRod')\n && $items->has('CaneOfSomaria')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Compass Room - Top Right\",\n \"Ganon's Tower - Compass Room - Top Left\",\n \"Ganon's Tower - Compass Room - Bottom Right\",\n ]) && $items->has('KeyA2', 3)) || $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Compass Room - Bottom Right\"]->setRequirements(function ($locations, $items) {\n return $items->has('FireRod')\n && $items->has('CaneOfSomaria')\n && (\n ($locations->itemInLocations(Item::get('BigKeyA2', $this->world), [\n \"Ganon's Tower - Compass Room - Top Right\",\n \"Ganon's Tower - Compass Room - Top Left\",\n \"Ganon's Tower - Compass Room - Bottom Left\",\n ]) && $items->has('KeyA2', 3)) ||\n $items->has('KeyA2', 4)) && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Big Key Chest\"]->setRequirements(function ($locations, $items) {\n return (($items->has('Hammer')\n && $items->has('Hookshot')) || ($items->has('FireRod')\n && $items->has('CaneOfSomaria'))) && $items->has('KeyA2', 3)\n && $this->boss_bottom->canBeat($items, $locations)\n && ($items->has('MoonPearl')\n || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Big Key Room - Left\"]->setRequirements(function ($locations, $items) {\n return (($items->has('Hammer')\n && $items->has('Hookshot')) || ($items->has('FireRod')\n && $items->has('CaneOfSomaria'))) && $items->has('KeyA2', 3)\n && $this->boss_bottom->canBeat($items, $locations)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Big Key Room - Right\"]->setRequirements(function ($locations, $items) {\n return (($items->has('Hammer')\n && $items->has('Hookshot')) || ($items->has('FireRod')\n && $items->has('CaneOfSomaria'))) && $items->has('KeyA2', 3)\n && $this->boss_bottom->canBeat($items, $locations)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n });\n\n $this->locations[\"Ganon's Tower - Mini Helmasaur Room - Left\"]->setRequirements(function ($locations, $items) {\n return $items->canShootArrows($this->world)\n && $items->canLightTorches()\n && $items->has('BigKeyA2')\n && $items->has('KeyA2', 3)\n && $this->boss_middle->canBeat($items, $locations)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n })->setFillRules(function ($item, $locations, $items) {\n return $item != Item::get('BigKeyA2', $this->world);\n });\n\n $this->locations[\"Ganon's Tower - Mini Helmasaur Room - Right\"]->setRequirements(function ($locations, $items) {\n return $items->canShootArrows($this->world)\n && $items->canLightTorches()\n && $items->has('BigKeyA2')\n && $items->has('KeyA2', 3)\n && $this->boss_middle->canBeat($items, $locations)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n })->setFillRules(function ($item, $locations, $items) {\n return $item != Item::get('BigKeyA2', $this->world);\n });\n\n $this->locations[\"Ganon's Tower - Pre-Moldorm Chest\"]->setRequirements(function ($locations, $items) {\n return $items->canShootArrows($this->world)\n && $items->canLightTorches()\n && $items->has('BigKeyA2')\n && $items->has('KeyA2', 3)\n && $this->boss_middle->canBeat($items, $locations)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n })->setFillRules(function ($item, $locations, $items) {\n return $item != Item::get('BigKeyA2', $this->world);\n });\n\n $this->locations[\"Ganon's Tower - Moldorm Chest\"]->setRequirements(function ($locations, $items) {\n return $items->has('Hookshot')\n && $items->canShootArrows($this->world)\n && $items->canLightTorches()\n && $items->has('BigKeyA2')\n && $items->has('KeyA2', 4)\n && $this->boss_middle->canBeat($items, $locations)\n && $this->boss_top->canBeat($items, $locations)\n && ($items->has('MoonPearl') || $this->world->config('canDungeonRevive', false)\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle()))));\n })->setFillRules(function ($item, $locations, $items) {\n return $item != Item::get('KeyA2', $this->world)\n && $item != Item::get('BigKeyA2', $this->world);\n });\n\n $this->can_complete = function ($locations, $items) {\n return $this->canEnter($locations, $items)\n && $this->locations[\"Ganon's Tower - Moldorm Chest\"]->canAccess($items)\n && $this->boss->canBeat($items, $locations);\n };\n\n $this->prize_location->setRequirements($this->can_complete);\n\n $this->can_enter = function ($locations, $items) {\n return ($this->world->config('itemPlacement') !== 'basic'\n || (\n ($this->world->config('mode.weapons') === 'swordless'\n || $items->hasSword(2))\n && $items->hasHealth(12)\n && ($items->hasBottle(2)\n || $items->hasArmor()))) && ($this->world->config('canDungeonRevive', false)\n || ($this->world->config('canSuperBunny', false)\n && $items->has('MagicMirror')) ||\n $items->has('MoonPearl')\n || (\n ($this->world->config('canOneFrameClipOW', false)\n || ($this->world->config('canBootsClip', false)\n && $items->has('PegasusBoots'))) && (\n ($this->world->config('canBunnyRevive', false)\n && $items->canBunnyRevive($this->world)) || ($this->world->config('canOWYBA', false)\n && $items->hasABottle())))) && ($items->has('Crystal1')\n + $items->has('Crystal2')\n + $items->has('Crystal3')\n + $items->has('Crystal4')\n + $items->has('Crystal5')\n + $items->has('Crystal6')\n + $items->has('Crystal7')) >= $this->world->config('crystals.tower', 7)\n && $this->world->getRegion('North East Light World')->canEnter($locations, $items);\n };\n\n return $this;\n }", "function _randomSteps(){\n return rand(3000, 9000);\n }", "public static function randomPlaces()\n {\n $randomLength = 5;//How many different locations to get\n\n //Definetely not optimized\n $flag = true;\n\n //Get the number of records in DB:\n $maximum = Hotel::count();\n $randomNumber = rand(1, $maximum);\n //Trying to escape FIND RAND, because it is slow\n //Old:\n // $places[0] = Hotel::orderByRaw('RAND()')->take(1)->get();\n //New:\n $places[0] = Hotel::find($randomNumber);\n $places[0] = $places[0]->location;\n\n while(count($places) < $randomLength) {\n // $tempPlace = Hotel::orderByRaw('RAND()')->take(1)->get();\n $randomNumber = rand(1, $maximum); \n $tempPlace = Hotel::find($randomNumber);\n $tempPlace = $tempPlace->location;\n\n\n $flag = true;\n \n for($j = 0; $j < count($places); $j++){\n if($places[$j] === $tempPlace){\n $flag = false;\n }\n }\n\n if($flag) $places[count($places)] = $tempPlace;\n else continue;\n }\n\n return $places;\n }", "function fuzzloc_post_hook($a, &$item) {\n\n\n\tif(! local_channel()) /* non-zero if this is a logged in user of this system */\n\t\treturn;\n\n\tif(local_channel() != $item['uid']) /* Does this person own the post? */\n\t\treturn;\n\n\tif($item['parent']) /* If the item has a parent, this is a comment or something else, not a status post. */\n\t\treturn;\n\n\tif(! $item['coord'])\n\t\treturn;\n\n\t$active = get_pconfig(local_channel(), 'fuzzloc', 'enable');\n\tif(! $active)\n\t\treturn;\n\n\t$maxfuzz = intval(get_pconfig(local_channel(), 'fuzzloc', 'maxfuzz'));\n\tif(! intval($maxfuzz))\n\t\treturn;\n\n\n\t$minfuzz = intval(get_pconfig(local_channel(), 'fuzzloc', 'minfuzz', 0));\n\n\tif($maxfuzz < $minfuzz) {\n\t\t// I'm sorry Dave. I'm afraid I can't do that.\n\t\treturn;\n\t}\n\n\tlogger('fuzzloc invoked',LOGGER_DEBUG);\n\n\t$coord = trim($item['coord']);\n $coord = str_replace(array(',','/',' '),array(' ',' ',' '),$coord);\n\n\t$lat = (float) trim(substr($coord, 0, strpos($coord, ' ')));\n $lon = (float) trim(substr($coord, strpos($coord, ' ')+1));\n\n\t$dir1 = intval(mt_rand(0,1));\n\t$dir2 = intval(mt_rand(0,1));\n\n\t$offset1 = mt_rand($minfuzz,$maxfuzz);\n\tif($dir1)\n\t\t$offset1 = 0 - $offset1;\n\n\t$offset2 = mt_rand($minfuzz,$maxfuzz);\n\tif($dir2)\n\t\t$offset2 = 0 - $offset2;\n\n\t// $fuzz is in meters. \n\n\t$lat = $lat + fuzzloc_mtod($offset1,$lat);\n $lon = $lon + fuzzloc_mtod($offset2,$lat);\n\n\t$item['coord'] = $lat . ' ' . $lon;\n\n}", "private static function shoot()\n {\n }", "function prepareships(){\n\t\tglobal $Ships, $Gridsize, $LightBlue, $Black, $Gold, $black_amount, $gold_amount;\n\t\tfor ($y=1; $y<=$Gridsize; $y++){\n\t\t\tfor ($x=1; $x<=$Gridsize; $x++){\n\t\t\t\t$Ships[$x][$y]=$LightBlue;\n\t\t\t} # x loop\n\t\t} # y loop\n\t\t\n\t\t//Ship coordinates #1\n\t\t$y = rand(1, $Gridsize-2);\n\t\t$temp_y = $y;\n\t\tfor ($x = 1; $x<=rand(1, 5); $x++)\n\t\t\t$Ships[$x][$y]=$Gold;\n\t\t\n\t\t//Ship coordinates #2\n\t\t$done = 0;\n\t\twhile($done != 1){\n\t\t\t$y = rand(1, $Gridsize-2);\n\t\t\tif($temp_y != $y && $temp_y != $y+1 && $temp_y != $y-1){\n\t\t\t\tfor ($x = 1; $x<=rand(1, 5); $x++)\n\t\t\t\t\t$Ships[$x][$y]=$Black;\n\t\t\t\t$done = 1;\n\t\t\t}\n\t\t}\n\t}", "public function placeAndSettleBet();", "public function testAnnieShuffle(): void\n {\n $randomizer = new RandomizerService;\n for ($i = 0; $i < 20; ++$i) {\n $world = new World(new ItemCollection, [\n 'shuffleAnnie' => true,\n ]);\n\n $randomizer->shuffleAnnie($world);\n\n if ($world->getLocation('Annie')->getRoom() !== $world->getRoom('Room 4f')) {\n $this->assertTrue(true);\n\n return;\n }\n }\n\n $this->assertTrue(false, 'Failed to move Annie after 20 attempts');\n }", "private function setUserMapPlace() {\n\t\t$this->mapPlaceManager->unsetMapPlace($this->user->id);\n\n\t\t$count = $this->mapPlaceManager->getFreeMapPlaceCount();\n\t\tif($count < 10 || GlobalConfig::ALWAYS_EXTEND_MAP ) {\n\t\t\t$mapManager = new MapManager($this->db);\n\t\t\t$mapManager->extendMap();\n\t\t}\n\t\t\t\n\t\t$mapPlace = $this->mapPlaceManager->getRandomFreeMapPlace();\n\t\t$mapPlace->userid = $this->user->id;\n\t\tif(!$mapPlace) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\t$this->mapPlaceManager->updateMapPlace($mapPlace);\n\t\t\treturn true;\n\t\t}\n\t}", "function st_setupMinigame()\n {\n self::incGameStateValue('minigame', 1);\n $minigame = self::getGameStateValue('minigame');\n\n self::setGameStateValue('minigame_round', 1);\n self::setStat(1, \"rounds_{$minigame}\");\n self::setGameStateValue('points_winnable', 7);\n self::DbQuery(\"UPDATE `player` SET `player_solved_in_round` = NULL\");\n\n // Get all cards, sort into piles, shuffle piles.\n $this->cards->moveAllCardsInLocation(null, \"offtable\");\n $this->cards->moveCards(array_pluck($this->cards->getCardsOfType('evidence'), 'id'), 'deck');\n $this->cards->shuffle('deck');\n $this->cards->moveCards(array_pluck($this->cards->getCardsOfType('crime'), 'id'), 'crime_deck');\n $this->cards->shuffle('crime_deck');\n $this->cards->moveCards(array_pluck($this->cards->getCardsOfType('location'), 'id'), 'location_deck');\n $this->cards->shuffle('location_deck');\n $this->cards->moveCards(array_pluck($this->cards->getCardsOfType('suspect'), 'id'), 'suspect_deck');\n $this->cards->shuffle('suspect_deck');\n\n // Get all tiles, shuffle them in two decks, associate them with\n // location slots. Decks are called \"cri_tile_d\" (crime tile deck) and\n // \"sus_tile_d\" (suspect tile deck). VARCHAR(16) ftw!\n $this->cards->moveCards(array_pluck($this->cards->getCardsOfType('tile_crime'), 'id'), 'cri_tile_d');\n $this->cards->moveCards(array_pluck($this->cards->getCardsOfType('tile_suspect'), 'id'), 'sus_tile_d');\n $this->cards->shuffle('cri_tile_d');\n $this->cards->shuffle('sus_tile_d');\n foreach($this->locations as $loc_id => $loc) {\n $this->cards->pickCardForLocation('cri_tile_d', 'locslot', $loc['slots']['crime']['id']);\n $this->cards->pickCardForLocation('sus_tile_d', 'locslot', $loc['slots']['suspect']['id']);\n\n // Get the specific location tile (also currently 'offboard') and\n // put it into its fixed location slot.\n //\n // (28 + $loc_id) is the \"material id\" aka type_arg of the fake\n // location tile.\n $temp = $this->cards->getCardsOfType('tile_location', 28 + $loc_id); // required, as array_shift does not want a direct reference\n $location_tile = array_shift($temp);\n $this->cards->moveCard($location_tile['id'], 'locslot', $loc['slots']['location']['id']);\n }\n\n // Main display of evidence cards\n $this->cards->pickCardsForLocation($this->constants['EVIDENCE_DISPLAY_SIZE'], 'deck', 'evidence_display');\n\n // Investigators that have been used go back to the box.\n $used_investigators = $this->tokens->getTokensOfTypeInLocation('pi_%', 'agentarea_%');\n if ($used_investigators) {\n $this->tokens->moveTokens(array_pluck($used_investigators, 'key'), 'box');\n }\n\n // Set up a case for every player and distribute the case cards to their\n // right neighbor.\n $players = self::loadPlayersBasicInfos();\n foreach($players as $player_id => $player) {\n $this->cards->pickCard('crime_deck', $player_id);\n $this->cards->pickCard('location_deck', $player_id);\n $this->cards->pickCard('suspect_deck', $player_id);\n\n // Give their tokens\n $color = $this->constants['HEX2COLORNAME'][$player['player_color']];\n $this->tokens->moveTokens(\n array_pluck($this->tokens->getTokensOfTypeInLocation(\"cube_{$color}_%\"), 'key'),\n \"cubes_{$player_id}\");\n $this->tokens->moveTokens(\n array_pluck($this->tokens->getTokensOfTypeInLocation(\"disc_{$color}_%\"), 'key'),\n \"discs_{$player_id}\");\n }\n\n // Trigger clean up in frontend. Sending only tokens that are to be\n // moved away.\n self::notifyAllPlayers(\"cleanBoard\", \"\", array(\n 'tokens' => array_values(array_merge(\n $this->tokens->getTokensInLocation('box'),\n $this->tokens->getTokensInLocation('offtable'),\n $this->tokens->getTokensInLocation('cubes_%'),\n $this->tokens->getTokensInLocation('discs_%')\n ))\n ));\n $this->notifyAnimate();\n\n $this->gamestate->nextState(); // start minigame\n }", "abstract public function hasAvailableMoves(): bool;", "public static function punish ($available_moves, $target)\n {\n $target_color = $target->color;\n $scoring_functions = array_merge([\n '^u' . $target_color . '$' => abs(-1 * config::SCORE_OTHER_BOTS),\n '^c' . $target_color . '$' => abs(-2 * config::SCORE_OWN_COLOR),\n ], static::$_value_functions);\n static::$_value_matrix = static::_generate_value_matrix();\n // Hand off to the locally-aggressive strategy to find the move.\n $next_move = static::aggressive($available_moves);\n // Update the commit message.\n $next_move['logmsg'] = str_replace('aggressive;', 'punish(' . $target->name . ');', $next_move['logmsg']);\n return $next_move;\n }", "abstract protected function move($board);", "function move_list ( )\t\t\t\t\t\t\t\t\t\t\t\t// We're going to generate our move list (for generation I).\n\t{\n\t\tglobal $config;\n\t\t$moves1\t= \tarray(\n\t\t\t\"Pound\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Move name,\n\t\t\t\t\"type\"\t=>\t\"Normal\",\t\t\t\t\t\t\t\t\t// Move type, which will be used for type effectiveness,\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\t\t\t\t\t\t\t\t\t// Type of attack, which attack stat is used (Attack or Sp. Attack) and defense stat (Defense, Sp. Defense).\n\t\t\t\t\"pp\"\t=>\t35,\t\t\t\t\t\t\t\t\t\t\t// Power points, pp, how many times it can be used,\n\t\t\t\t\"pwr\"\t=>\t40,\t\t\t\t\t\t\t\t\t\t\t// Power, it's base damage,\n\t\t\t\t\"acc\"\t=>\t100,\t\t\t\t\t\t\t\t\t\t// Accuracy, the move's base accuracy.\n\t\t\t\t\"pri\"\t=>\t0,\t\t\t\t\t\t\t\t\t\t\t// Priority. Priority ignores the speed calcs.\n\t\t\t\t\"multi\"\t=>\t\"no\",\t\t\t\t\t\t\t\t\t\t// Will it multihit? \n\t\t\t\t\"recoil\"=>\t\"no\",\t\t\t\t\t\t\t\t\t\t// Will it cause Recoil?\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\t\t\t\t\t\t\t\t\t\t// Is there any effects the move has?\n\t\t\t),\n\t\t\t\"Karate Chop\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\t\t\t\t\t\t\t\t\t\t// Does it have a higher Critical hit ratio?\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Slap\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\" =>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Comet Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t18,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mega Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Pay Day\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Note: Drops money for the winner. Will add something for that later. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fire Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\t\t\t\t\t\t\t\t\t\t// 10% chance of burning.\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Ice Punch\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunder Punch\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Scratch\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Vice Grip\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t55,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Guillotine\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t0,\t\t\t\t\t\t\t\t\t\t\t// This move will kill in one hit if it lands.\n\t\t\t\t\"acc\"\t=>\t$lvl - $olvl + 30,\t\t\t\t\t\t\t// This move depends on the level of the user and opponent for its chance of hitting.\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Razor Wind\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes two turns to execute.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Swords Dance\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move affects the user.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Cut\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Gust\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\t\t\t\t\t\t\t\t\t// This move will affect users in stage one of Fly.\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Wing Attack\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Whirlwind\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\t\t\t\t\t\t\t\t\t// Will end the battle when used against wild pokemon. Otherwise, switch pokemon.\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"pri\"\t=>\t-6,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fly\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Takes two turns, one is invulnerable to *most* attacks.\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bind\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Trapping move. Goes for 4-5 turns doing 1/16th HP after original damage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Slam\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Vine Whip\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t45,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Stomp\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% flinch chance, and will never miss on minimized opponents.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Kick\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Move always hits twice. (damage calculated independantly).\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t30,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mega Kick\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Jump Kick\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Will cause recoil of 1/2 the user's MAX HP if it misses.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Rolling Kick\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has 30% Flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Sand Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Lowers the accuracy of target. Works on all pokemon.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Headbutt\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t70,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Horn Attack\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fury Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits 2-5 times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Horn Drill\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will take all current HP of target on connect.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Tackle\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Body Slam\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% chance of causing paralysis.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t85,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Wrap\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t\t// Trapping move, affects 4-5 turns, doing 1/16 max HP damage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Take Down\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move's recoil damage is 1/4th the damage they did.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Thrash\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move goes for 2 - 3 turns, confuses the user upon conclusion.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Edge\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes recoil of 1/3rd the damage done.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Tail Whip\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// Reduces target's defense by one level. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Poison Sting\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% Poison chance.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\"\t=> 30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Twineedle\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits twice, with two chances to poison.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\" => 20,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Pin Missile\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits two to five times.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t25,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Leer\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the target defense by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bite\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Dark\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Growl\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the target attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Roar\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will make your pokemon (or the wild opponent, run.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t-6,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Sing\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// If it lands, will always put the target to sleep.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t55,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=> 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Supersonic\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes confusion, if the target isn't already so.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t55,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sonic Boom\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move always causes 20 HP of damage, bypassing damage calcs, but misses ghost types.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Disable\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move disables a move that may currently be used. ( has PP left ).\n\t\t\t\t\"type\"\t=>\t\"Normal\",\t\t\t\t\t\t\t\t\t// This move lasts four to seven turns.\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Acid\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of lowering target's Special Defense by 1 stage.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Ember\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of burning the target.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Flamethrower\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of burning the target.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Mist\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move prevents stat altering moves from affecting, for five turns.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Water Gun\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hydro Pump\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Surf\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Ice Beam\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of freezing the target.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Blizzard\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of freezing the target.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t70,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Psybeam\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of confusing the target.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Bubble Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of dropping target's speed by one level.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Aurora Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of dropping target's attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hyper Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires two turns in most situations, with the second being recharge.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t150,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Peck\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t35,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Drill Peck\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Submission\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits the user with 25% of the damage done in recoil.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Low Kick\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move's damage varies by the weight of the target (20 - 120).\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\t\t\t\t\t\t\t\t\t\t\t// Weight calculations to be added later.\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Counter\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns double the damage of a physical attack done to the user.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t-5,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Seismic Toss\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move's power is equal to the level of the user, and receives no STAB.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Strength\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Absorb\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% of the damage dealt in HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mega Drain\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% of the damage dealt in HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Leech Seed\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes 1/8th the HP of the target and gives them to the user's current active pokemon.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\t\t\t\t\t\t\t\t\t// All grass type pokemon are immune to this move.\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Growth\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will increase both the attack and sp. attack of the user one stage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Razor Leaf\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a high critical hit ratio.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t55,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Solar Beam\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires a waiting turn before the attack.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Poison Powder\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Grass types are immune to this move.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\" => 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Stun Spore\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// Grass types are immune to this move.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\" => 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sleep Powder\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Petal Dance\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will go for two to three turns, and confuse the user afterwards.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t120,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Stringshot\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the speed of the target by two stages.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t95,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dragon Rage\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move always does 40HP of damage, regardless of stats.\n\t\t\t\t\"type\"\t=>\t\"Dragon\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Firespin\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move traps the target, lasts for four to five turns taking 1/16th of the target's HP.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t35,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Thunder Shock\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunderbolt\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunder Wave\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will paralyze the target. Electric types are immune.\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Thunder\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Electric\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t70,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=> 30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Rock Throw\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Rock\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Earthquake\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move affects users of dig by double.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fissure\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will have a one-hit kill.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dig\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires two turns to execute.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Toxic\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move badly poisons the target. It also never misses when a poison-type uses it.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison2\"\t=>\t100,\t\t\t\t\t\t\t\t// Poison2 will be badly poisoned, for the increasing damage algorithm holder.\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Confusion\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t25,\n\t\t\t\t\"pwr\"\t=>\t50, \n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Psychic\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of lowering Sp. Defense by one level.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t90,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hypnosis\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t60,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Meditate\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Agility\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move sharply raises the user's speed two levels.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Quick Attack\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t1,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Rage\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move gains attack bonus when the user is hit, as long as the move is used.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Teleport\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move only works on wild pokemon.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Night Shade\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will always do equal to the user's level in damage.\n\t\t\t\t\"type\"\t=>\t\"Ghost\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mimic\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will copy the last used move by the target, unless the user already knows it.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\t\t\t\t\t\t\t\t\t// The move will revert back to mimic following a switch or battle ending.\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Screech\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will sharply lower the target's defense two levels.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Double Team\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the evasion of the user by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Recover\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move recovers 50% of the user's HP. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Harden\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move increases the user's defense by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Minimize\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's evasiveness one level. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Smokescreen\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move reduces the target's accuracy one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Confuse Ray\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move confuses the victim for two to five turns. \n\t\t\t\t\"type\"\t=>\t\"Ghost\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Withdraw\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense one level. \n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Defense Curl\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense one level. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Barrier\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense two levels. \n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Light Screen\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move cuts special move damage in half for five turns. \n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Haze\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move removes all stat changes to the pokemon on the field. \n\t\t\t\t\"type\"\t=>\t\"Ice\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Reflect\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move cuts physical move damage in half for five turns. \n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Focus Energy\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move increases the user's critical hit ratio two levels. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bide\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move makes the user endure two rounds of damage, then returns double the damage.\t\t\t\t\t \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"pri\"\t=>\t1,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Metronome\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will call up any move at random, with all regular effects. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Mirror Move\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will copy the last move the opponent used. \n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Self-Destruct\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes the user to faint. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t200,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Egg Bomb\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Lick\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% chance of paralyzing targets.\n\t\t\t\t\"type\"\t=>\t\"Ghost\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Smog\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 40% chance of poisoning the target.\t\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t30,\n\t\t\t\t\"acc\"\t=>\t70,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\"\t=>\t40,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sludge\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% chance of poisoning the target.\t\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"poison\"\t=>\t30,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Bone Club\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t65,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fire Blast\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% burn chance, down from 30.\n\t\t\t\t\"type\"\t=>\t\"Fire\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t110,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Waterfall\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 20% Flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Clamp\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lasts four to five turns, and is trapping.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t35,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Swift\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move never misses.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t60,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Skull Bash\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move requires two turns to complete.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t130,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Spike Cannon\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lands two to five times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Constrict\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance of reducing speed.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t35,\n\t\t\t\t\"pwr\"\t=>\t10,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Amnesia\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's Sp. Defense by two levels.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Kinesis\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers the target's accuracy one level.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Soft-Boiled\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"High Jump Kick\"=>\tarray(\t\t\t\t\t\t\t\t\t// This move will take 50% HP in recoil if it misses.\n\t\t\t\t\"type\"\t=>\t\"Fighting\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t130,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Glare\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will paralyze the target.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Soft-Boiled\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dream Eater\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% damage in HP to the user, target must be sleeping.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Poison Gas\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move poisons the target.\n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"paralyze\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Barrage\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits the target two to five times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t15,\n\t\t\t\t\"acc\"\t=>\t85,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Leech Life\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move returns 50% of the damage in HP to the user.\n\t\t\t\t\"type\"\t=>\t\"Bug\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t20,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Lovely Kiss\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move puts the target to sleep.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t75,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Sky Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes two turns to execute, and has a 30% flinch opportunity.\n\t\t\t\t\"type\"\t=>\t\"Flying\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t140,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Transform\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move changes the user into the target pokemon entirely.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bubble\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% chance to lower the speed by one level.\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t40,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Dizzy Punch\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 20% chance of confusing the target.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t70,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"confuse\"\t=>\t20,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Spore\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will put the opponent to sleep, sans grass types.\n\t\t\t\t\"type\"\t=>\t\"Grass\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Flash\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move lowers to accuracy of the target by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Psywave\"\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Splash\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move does absolutely nothing.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t40,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Acid Armor\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's defense by two levels. \n\t\t\t\t\"type\"\t=>\t\"Poison\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Crabhammer\"\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Water\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t100,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Explosion\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will cause the user to faint.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t5,\n\t\t\t\t\"pwr\"\t=>\t250,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"yes\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Fury Swipes\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move hits two to five times.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t18,\n\t\t\t\t\"acc\"\t=>\t80,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Bonemerang\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will hit twice.\n\t\t\t\t\"type\"\t=>\t\"Ground\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"yes\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Rest\"\t\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move causes the user to sleep two turns, wipes all status ailments, and restores HP.\n\t\t\t\t\"type\"\t=>\t\"Psychic\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"sleep\"\t=>\t100,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Rockslide\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 30% flinch chance.\n\t\t\t\t\"type\"\t=>\t\"Rock\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t75,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Hyperfang\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move has a 10% flinch chance. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t15,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Sharpen\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move raises the user's attack by one level.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Conversion\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move changes the user's types into the target's. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t30,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Tri Attack\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move may burn, freeze, or paralyze the target. \n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Special\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t80,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\tarray(\n\t\t\t\t\t\"burn\"\t\t=>\t10,\n\t\t\t\t\t\"freeze\"\t=>\t10,\n\t\t\t\t\t\"paralyze\"\t=>\t10,\n\t\t\t\t),\n\t\t\t),\n\t\t\t\"Super Fang\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes half the target's HP.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t90,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Slash\"\t\t\t=>\tarray(\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t20,\n\t\t\t\t\"pwr\"\t=>\t70,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"yes\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Substitute\"\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move takes 25% of the user's HP and creates a decoy that absorbs damage.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Status\",\n\t\t\t\t\"pp\"\t=>\t10,\n\t\t\t\t\"pwr\"\t=>\t0,\n\t\t\t\t\"acc\"\t=>\t0,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t\t\"Struggle\"\t\t=>\tarray(\t\t\t\t\t\t\t\t\t// This move will be triggered automatically upon all moves having 0 PP.\n\t\t\t\t\"type\"\t=>\t\"Normal\",\n\t\t\t\t\"cat\"\t=>\t\"Physical\",\n\t\t\t\t\"pp\"\t=>\t0,\n\t\t\t\t\"pwr\"\t=>\t50,\n\t\t\t\t\"acc\"\t=>\t100,\n\t\t\t\t\"crit\"\t=>\t\"no\",\n\t\t\t\t\"multi\"\t=>\t\"no\",\n\t\t\t\t\"recoil\"=>\t\"no\",\n\t\t\t\t\"extra\"\t=>\t\"no\",\n\t\t\t),\n\t\t);\n\t\tforeach( $moves1 as $name => $stats )\n\t\t{\n\t\t\tif( !isset( $stats['pri'] ) )\n\t\t\t{\n\t\t\t\t$stats['pri'] = 0;\n\t\t\t}\n\t\t\t$sname = array(\n\t\t\t\t\"name\"\t=> $name,\n\t\t\t);\n\t\t\t$moves2[strtolower( $name )] = array_merge( $sname, $stats );\n\t\t}\n\t\t$config->df['pokemoves']['gen1'] = $moves2;\n\t\t$config->save_config( \"./config/pokemoves.df\", $config->df['pokemoves'] );\n\t}", "function turnfight($expgain,$goldgain,$action,$addres) \n{\n global $player;\n global $smarty;\n global $db;\n global $title;\n global $enemy;\n global $myczaro;\n global $zmeczenie;\n global $arrEquip;\n global $myunik;\n global $amount;\n global $myagility;\n global $intPoisoned;\n global $arrTags;\n\n $arrEquip = $player -> equipment();\n $player->curstats($arrEquip);\n $myczaro = $db -> Execute(\"SELECT * FROM czary WHERE status='E' AND gracz=\".$player -> id.\" AND typ='O'\");\n $fight = $db -> Execute(\"SELECT fight FROM players WHERE id=\".$player -> id);\n\n $player->user = $arrTags[$player->tribe][0].' '.$player->user.' '.$arrTags[$player->tribe][1];\n\n if ($fight -> fields['fight'] == 0 && $title == 'Arena Walk') \n {\n\terror (NO_ENEMY);\n }\n $premia = 0;\n $zmeczenie = 0;\n if (empty ($enemy['id'])) \n {\n $location = $db -> Execute(\"SELECT miejsce FROM players WHERE id=\".$player -> id);\n if ($location -> fields['miejsce'] == 'Góry') \n {\n\t $intRoll2 = rand(1, 100);\n\t if ($intRoll2 < 25)\n\t {\n\t\t$enemy1 = $db->SelectLimit(\"SELECT * FROM `monsters` WHERE `level`<=\".$player->level.\" AND `location`='Altara' ORDER BY RAND()\", 1);\n\t }\n\t elseif ($intRoll2 > 24 && $intRoll2 < 90)\n\t {\n\t\t$enemy1 = $db->SelectLimit(\"SELECT * FROM `monsters` WHERE `level`<=\".$player->level.\" AND `location`='Altara' ORDER BY `level` DESC\", 1);\n\t }\n\t else\n\t {\n\t\t$enemy1 = $db->SelectLimit(\"SELECT * FROM `monsters` WHERE `level`>=\".$player->level.\" AND `location`='Altara' ORDER BY RAND()\", 1);\n\t }\n $enemy = array(\"strength\" => $enemy1 -> fields['strength'], \"agility\" => $enemy1 -> fields['agility'], \"speed\" => $enemy1 -> fields['speed'], \"endurance\" => $enemy1 -> fields['endurance'], \"hp\" => $enemy1 -> fields['hp'], \"name\" => $enemy1 -> fields['name'], \"exp1\" => $enemy1 -> fields['exp1'], \"exp2\" => $enemy1 -> fields['exp2'], \"level\" => $enemy1 -> fields['level']);\n $enemy1 -> Close();\n }\n if ($location -> fields['miejsce'] == 'Las') \n {\n\t $intRoll2 = rand(1, 100);\n\t if ($intRoll2 < 25)\n\t {\n\t\t$enemy1 = $db->SelectLimit(\"SELECT * FROM `monsters` WHERE `level`<=\".$player->level.\" AND `location`='Ardulith' ORDER BY RAND()\", 1);\n\t }\n\t elseif ($intRoll2 > 24 && $intRoll2 < 90)\n\t {\n\t\t$enemy1 = $db->SelectLimit(\"SELECT * FROM `monsters` WHERE `level`<=\".$player->level.\" AND `location`='Ardulith' ORDER BY `level` DESC\", 1);\n\t }\n\t else\n\t {\n\t\t$enemy1 = $db->SelectLimit(\"SELECT * FROM `monsters` WHERE `level`>=\".$player->level.\" AND `location`='Ardulith' ORDER BY RAND()\", 1);\n\t }\n $enemy = array(\"strength\" => $enemy1 -> fields['strength'], \"agility\" => $enemy1 -> fields['agility'], \"speed\" => $enemy1 -> fields['speed'], \"endurance\" => $enemy1 -> fields['endurance'], \"hp\" => $enemy1 -> fields['hp'], \"name\" => $enemy1 -> fields['name'], \"exp1\" => $enemy1 -> fields['exp1'], \"exp2\" => $enemy1 -> fields['exp2'], \"level\" => $enemy1 -> fields['level']);\n $enemy1 -> Close();\n }\n }\n if ($title == 'Arena Walk') \n {\n $arrClass = array('Wojownik','Rzemieślnik', 'Złodziej', 'Barbarzyńca');\n if (in_array($player -> clas, $arrClass) && $myczaro -> fields['id']) \n {\n error (ONLY_MAGE);\n }\n }\n if ($arrEquip[2][0]) \n {\n $premia = ($premia + $arrEquip[2][2]);\n }\n if ($arrEquip[4][0]) \n {\n $premia = ($premia + $arrEquip[4][2]);\n }\n if ($arrEquip[5][0]) \n {\n $premia = ($premia + $arrEquip[5][2]);\n }\n if ($arrEquip[3][0]) \n {\n $premia = ($premia + $arrEquip[3][2]);\n }\n if ($player -> clas == 'Wojownik' || $player -> clas == 'Barbarzyńca') \n {\n $enemy['damage'] = ($enemy['strength'] - ($player -> level + $player -> cond + $premia));\n } \n else \n {\n $enemy['damage'] = ($enemy['strength'] - ($player -> cond + $premia));\n }\n if ($myczaro -> fields['id']) \n {\n $myczarobr = ($player -> wisdom * $myczaro -> fields['obr']) - (($myczaro -> fields['obr'] * $player -> wisdom) * ($arrEquip[3][4] / 100));\n if ($arrEquip[2][0]) \n {\n $myczarobr = ($myczarobr - (($myczaro -> fields['obr'] * $player -> wisdom) * ($arrEquip[2][4] / 100)));\n }\n if ($arrEquip[4][0]) \n {\n $myczarobr = ($myczarobr - (($myczaro -> fields['obr'] * $player -> wisdom) * ($arrEquip[4][4] / 100)));\n }\n if ($arrEquip[5][0]) \n {\n $myczarobr = ($myczarobr - (($myczaro -> fields['obr'] * $player -> wisdom) * ($arrEquip[5][4] / 100)));\n }\n if ($arrEquip[7][0]) \n {\n $intN = 6 - (int)($arrEquip[7][4] / 20);\n $intBonus = (10 / $intN) * $player -> level * rand(1, $intN);\n $myczarobr = ($myczarobr + $intBonus);\n }\n if ($myczarobr < 0) \n {\n $myczarobr = 0;\n }\n $myobrona = ($myczarobr + $player -> cond + $premia);\n $enemy['damage'] = ($enemy['strength'] - $myobrona);\n }\n if (!$arrEquip[3][0] && !$myczaro -> fields['id']) \n {\n $enemy['damage'] = ($enemy['strength'] - $player -> cond);\n }\n $gmagia = 0;\n if (!isset($_SESSION['round']))\n {\n $_SESSION['round'] = 1;\n }\n $smarty -> assign (\"Message\", \"<ul><li><b>\".$player -> user.\"</b> \".VERSUS.\" <b>\".$enemy['name'].\"</b><br />\");\n $smarty -> display ('error1.tpl');\n /**\n * Count points in fight\n */\n if (!isset($_SESSION['points']) || $_SESSION['points'] == 0)\n {\n $_SESSION['points'] = ceil($player->speed / $enemy['speed']);\n }\n /**\n * Count dodge - player and monster\n */\n if ($player -> clas == 'Wojownik' || $player -> clas == 'Barbarzyńca') \n {\n $myunik = (($player->agility - $enemy['agility']) + $player -> level + $player -> miss);\n $eunik = (($enemy['agility'] - $player->agility) - ($player -> attack + $player -> level));\n\tif ($arrEquip[11][0])\n\t {\n\t $eunik -= ($player->attack / 5);\n\t }\n }\n if ($player -> clas == 'Rzemieślnik' || $player -> clas == 'Złodziej' || $player -> clas == '') \n {\n $myunik = ($player->agility - $enemy['agility'] + $player -> miss);\n $eunik = (($enemy['agility'] - $player->agility) - $player -> attack);\n }\n if ($player -> clas == 'Mag') \n {\n $myunik = ($player->agility - $enemy['agility'] + $player -> miss);\n $eunik = (($enemy['agility'] - $player->agility) - ($player -> magic + $player -> level));\n }\n if (!isset($myunik)) \n {\n $myunik = 1;\n }\n if (!isset($eunik)) \n {\n $eunit = 1;\n }\n if ($eunik < 1) \n {\n $eunik = 1;\n }\n if ($_SESSION['points'] > 5) \n {\n $_SESSION['points'] = 5;\n }\n if (isset ($_SESSION['exhaust'])) \n {\n $zmeczenie = $_SESSION['exhaust'];\n }\n if (isset($_SESSION['miss']) && $_SESSION['miss'] > $myunik) \n {\n $myunik = $_SESSION['miss'];\n }\n $amount = 1;\n if (isset ($_SESSION['razy'])) \n {\n $amount = $_SESSION['razy'];\n }\n if (isset($_SESSION['mon0'])) \n {\n $temp = 0;\n for ($k = 0; $k < $amount; $k ++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n }\n else\n {\n $temp = $amount;\n $_SESSION['amount'] = $amount;\n for ($k = 0; $k < $amount; $k ++) \n {\n $strIndex = \"mon\".$k;\n $_SESSION[$strIndex] = $enemy['hp'];\n }\n }\n if (isset($temp)) \n {\n if ($temp < 6 && $temp > 0)\n {\n if ($myunik < 1)\n {\n $myunik = 1;\n }\n if (isset($myunik))\n {\n $myunik = ceil($myunik / $temp);\n }\n else\n {\n $myunik = 0;\n }\n }\n else\n {\n $myunik = 1;\n }\n }\n else\n {\n if ($amount < 6)\n {\n if (isset($myunik))\n {\n $myunik = ceil($myunik / $amount);\n }\n else\n {\n $myunik = 0;\n }\n }\n else\n {\n $myunik = 1;\n }\n }\n if ($myunik < 1) \n {\n $myunik = 1;\n }\n $attacks = ceil($enemy['speed'] / $player->speed);\n if ($attacks > 5) \n {\n $attacks = 5;\n }\n if (!isset($_POST['action'])) \n {\n $_POST['action'] = '';\n }\n /**\n * If fight is longer than 24 rounds\n */\n if (isset($_SESSION['round']) && $_SESSION['round'] > 24)\n {\n $db -> Execute(\"UPDATE `players` SET `fight`=0, `hp`=\".$player -> hp.\", `bless`='', `blessval`=0 WHERE `id`=\".$player -> id);\n unset($_SESSION['exhaust'], $_SESSION['round'], $_SESSION['points'], $_SESSION['dodge']);\n for ($k = 0; $k < $amount; $k ++) \n {\n $strIndex = \"mon\".$k;\n unset($_SESSION[$strIndex]);\n }\n if ($title == 'Arena Walk') \n {\n if (!$intPoisoned)\n {\n $smarty -> assign (\"Message\", \"</ul>\".NOT_DECIDE.\"...<br /><ul><li><b>\".B_OPTIONS.\"</a><br /></li></ul>\");\n }\n else\n {\n $smarty -> assign (\"Message\", \"</ul><br /><ul><li><b>\".B_OPTIONS.\"</a><br /></li></ul>\");\n }\n $smarty -> display ('error1.tpl');\n }\n\telseif (in_array($title, array('Portal', 'Astralny plan')))\n\t {\n\t $db->Execute(\"UPDATE `players` SET `miejsce`='Altara' WHERE `id`=\".$player->id);\n\t }\n return;\n }\n $fight -> Close();\n if ($_POST['action'] == 'drink' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 1;\n drink ($_POST['potion2']);\n $objMana = $db -> Execute(\"SELECT pm FROM players WHERE id=\".$player -> id);\n $player -> mana = $objMana -> fields['pm'];\n $objMana -> Close();\n if ($_SESSION['points'] >= $attacks && $player -> hp > 0) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'use' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 1;\n if (!isset($_POST['arrows']))\n {\n $_POST['arrows'] = 0;\n }\n equip ($_POST['arrows']);\n $arrEquip = $player -> equipment();\n if ($_SESSION['points'] >= $attacks) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'weapons' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 2;\n if (!isset($_POST['weapon']))\n {\n $_POST['weapon'] = 0;\n }\n equip ($_POST['weapon']);\n $arrEquip = $player -> equipment();\n if ($_SESSION['points'] >= $attacks) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'escape') \n {\n $chance = (rand(1, $player -> level * 100) + $player -> speed - $enemy['agility']);\n if ($chance > 0) \n {\n $expgain = rand($enemy['exp1'],$enemy['exp2']);\n $expgain = (ceil($expgain / 100));\n $smarty -> assign (\"Message\", ESCAPE_SUCC.\" \".$enemy['name'].YOU_GAIN1.\" \".$expgain.\" \".EXP_PTS.\"<br /></li></ul>\");\n $smarty -> display ('error1.tpl');\n checkexp($player -> exp,$expgain,$player -> level,$player -> race,$player -> user,$player -> id,0,0,$player -> id,'',0);\n $db -> Execute(\"UPDATE players SET fight=0, bless='', blessval=0 WHERE id=\".$player -> id);\n $points = $attacks * 2;\n $temp = 1;\n unset($_SESSION['exhaust'], $_SESSION['round'], $_SESSION['points'], $_SESSION['dodge']);\n for ($k = 0; $k < $amount; $k ++) \n {\n $strIndex = \"mon\".$k;\n unset($_SESSION[$strIndex]);\n }\n if ($title == \"Arena Walk\") \n {\n $smarty -> assign (\"Message\", \"</ul><ul><li><b>\".B_OPTIONS.\"</a><br /></li></ul>\");\n $smarty -> display ('error1.tpl');\n }\n if ($title == 'Astralny plan' || $title == 'Portal')\n {\n $db -> Execute(\"UPDATE `players` SET `fight`=9999 WHERE id=\".$player -> id);\n }\n\t if ($title == 'Przygoda')\n\t {\n\t\t$db -> Execute(\"UPDATE `players` SET `fight`=-1 WHERE id=\".$player -> id);\n\t }\n } \n else \n {\n $smarty -> assign (\"Message\", \"<br />\".ESCAPE_FAIL.\" \".$enemy['name'].\"!\");\n $smarty -> display ('error1.tpl');\n monsterattack($attacks,$enemy,$myunik,$amount);\n if ($player -> hp > 0) \n {\n $_SESSION['round'] = $_SESSION['round'] + 1;\n $_SESSION['points'] = ceil($player->speed / $enemy['speed']);\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n }\n if ($_POST['action'] == 'cast' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 1;\n if (!isset($_POST['castspell']))\n {\n $_POST['castspell'] = 0;\n }\n castspell($_POST['castspell'],0,$eunik);\n $temp = 0;\n for ($k=0;$k<$amount;$k++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n if ($temp > 0 && $attacks <= $_SESSION['points']) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n /**\n * Burst offensive spell\n */\n if ($_POST['action'] == 'bspell' && $_SESSION['points'] > 0) \n {\n if (intval($_POST['power']) < 1) \n {\n $smarty -> assign (\"Message\", ERROR);\n $smarty -> display ('error1.tpl');\n $_POST['power'] = 0;\n }\n else\n {\n if ($_POST['power'] > $player -> level)\n {\n $_POST['power'] = $player -> level;\n }\n\t checkvalue($_POST['bspellboost']);\n $intSpelllevel = $db -> Execute(\"SELECT `gracz, `poziom` FROM `czary` WHERE `id`=\".$_POST['bspellboost']);\n\t if ($intSpelllevel->fields['gracz'] != $player->id)\n\t {\n\t\t$intMaxburst = 0;\n\t }\n\t else\n\t {\n\t\t$intMaxburst = $player -> mana - $intSpelllevel -> fields['poziom'];\n\t }\n $intSpelllevel -> Close();\n if ($_POST['power'] > $intMaxburst)\n {\n $_POST['power'] = $intMaxburst;\n }\n $_SESSION['points'] = $_SESSION['points'] - 2;\n castspell($_POST['bspellboost'],$_POST['power'],$eunik);\n }\n $temp = 0;\n for ($k=0;$k<$amount;$k++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n if ($temp > 0 && $attacks <= $_SESSION['points']) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n /**\n * Burst defensive spell\n */\n if ($_POST['action'] == 'dspell') \n {\n if (intval($_POST['power1']) < 1) \n {\n $smarty -> assign (\"Message\", ERROR);\n $smarty -> display ('error1.tpl');\n $_POST['power1'] = 0;\n }\n if ($_POST['power1'] > $player -> level)\n {\n $_POST['power1'] = $player -> level;\n }\n $intMaxburst = $player -> mana - $myczaro -> fields['poziom'];\n if ($_POST['power1'] > $intMaxburst)\n {\n $_POST['power1'] = $intMaxburst;\n }\n $enemy['damage'] = $enemy['damage'] - $_POST['power1'];\n $player -> mana = $player -> mana - $_POST['power1'];\n monsterattack($attacks,$enemy,$myunik,$amount);\n if ($player -> hp > 0) \n {\n $_SESSION['round'] = $_SESSION['round'] + 1;\n $_SESSION['points'] = ceil($player->speed / $enemy['speed']);\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'nattack' && $_SESSION['points'] > 0) \n {\n attack($eunik,0);\n $temp = 0;\n for ($k=0;$k<$amount;$k++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n $_SESSION['points'] = $_SESSION['points'] - 1;\n if ($temp > 0 && $attacks <= $_SESSION['points']) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'dattack' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 1;\n attack($eunik,3);\n $temp = 0;\n for ($k=0;$k<$amount;$k++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n $myunik = $myunik + ($myunik / 2);\n if ($temp > 0 && $attacks <= $_SESSION['points']) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'aattack' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 1;\n attack($eunik,1);\n $temp = 0;\n for ($k=0;$k<$amount;$k++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n $myunik = $myunik / 2;\n if ($temp > 0 && $attacks <= $_SESSION['points']) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'battack' && $_SESSION['points'] > 0) \n {\n $_SESSION['points'] = $_SESSION['points'] - 2;\n attack($eunik,2);\n $temp = 0;\n for ($k=0;$k<$amount;$k++) \n {\n $strIndex = \"mon\".$k;\n if ($_SESSION[$strIndex] > 0) \n {\n $temp = $temp + 1;\n }\n }\n $myunik = 0;\n if ($temp > 0 && $attacks <= $_SESSION['points']) \n {\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if (!isset($_SESSION['points']))\n {\n $_SESSION['points'] = 0;\n }\n if($attacks > $_SESSION['points'] && $temp > 0 && $_POST['action'] != 'rest' && $_POST['action'] != 'escape') \n {\n monsterattack($attacks,$enemy,$myunik,$amount);\n if ($player -> hp > 0) \n {\n $_SESSION['round'] = $_SESSION['round'] + 1;\n $_SESSION['points'] = ceil($player->speed / $enemy['speed']);\n if ($_SESSION['points'] > 5) \n {\n $_SESSION['points'] = 5;\n }\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($_POST['action'] == 'rest') \n {\n monsterattack($attacks,$enemy,0,$amount);\n if ($player -> hp > 0) \n {\n $smarty -> assign (\"Message\", \"<br />\".REST_SUCC);\n $smarty -> display ('error1.tpl');\n $rest = ($player -> cond / 10);\n $zmeczenie = $zmeczenie - $rest;\n if ($zmeczenie < 0) \n {\n $zmeczenie = 0;\n }\n $_SESSION['exhaust'] = $zmeczenie;\n $_SESSION['round'] = $_SESSION['round'] + 1;\n $_SESSION['points'] = ceil($player->speed / $enemy['speed']);\n if ($_SESSION['points'] > 5) \n {\n $_SESSION['points'] = 5;\n }\n fightmenu($_SESSION['points'],$zmeczenie,$_SESSION['round'],$addres);\n }\n }\n if ($player -> hp <= 0) \n {\n if ($title != 'Arena Walk') \n\t {\n\t loststat($player -> id, $player->oldstats, 0, $enemy['name'], 0, $player->antidote);\n\t }\n\tif ($player->antidote == 'R')\n\t {\n\t $player->hp = 1;\n\t }\n if ($player -> hp < 0) \n {\n $player -> hp = 0;\n }\n\tif ($title == 'Przygoda')\n\t {\n\t $intFight = -1;\n\t }\n\telse\n\t {\n\t $intFight = 0;\n\t }\n $db -> Execute(\"INSERT INTO `events` (`text`) VALUES('Gracz \".$player -> user.\" \".DEFEATED_BY.$enemy['name'].\"')\");\n $db -> Execute(\"UPDATE `players` SET `fight`=\".$intFight.\", `hp`=\".$player -> hp.\", `bless`='', `blessval`=0, `antidote`='' WHERE `id`=\".$player -> id);\n unset($_SESSION['exhaust'], $_SESSION['round'], $_SESSION['points'], $_SESSION['dodge']);\n for ($k = 0; $k < $amount; $k ++) \n {\n $strIndex = \"mon\".$k;\n unset($_SESSION[$strIndex]);\n }\n if ($title == 'Arena Walk') \n {\n if (!$intPoisoned)\n {\n $smarty -> assign (\"Message\", \"</ul>\".LOST_FIGHT.\"...<br /><ul><li><b>\".B_OPTIONS.\"</a><br /></li></ul>\");\n }\n else\n {\n $smarty -> assign (\"Message\", \"</ul><br /><ul><li><b>\".B_OPTIONS.\"</a><br /></li></ul>\");\n }\n $smarty -> display ('error1.tpl');\n }\n }\n if (isset($_SESSION['points']))\n {\n $intPoints = $_SESSION['points'];\n }\n else\n {\n $intPoints = 0;\n }\n if (!$_POST['action'] && $attacks <= $intPoints) \n {\n fightmenu($_SESSION['points'],$zmeczenie,1,$addres);\n }\n if ($temp == 0 && $player -> fight > 0 && (isset($_SESSION['round']) && $_SESSION['round'] < 25)) \n {\n $db -> Execute(\"INSERT INTO `events` (`text`) VALUES('Gracz \".$player -> user.\" \".DEFEAT.\" \".$enemy['name'].\"')\");\n $db -> Execute(\"UPDATE `players` SET `credits`=`credits`+\".$goldgain.\" WHERE `id`=\".$player -> id);\n $smarty -> assign (\"Message\", \"<br /><li><b>\".YOU_DEFEAT.\" <b>\".$amount.\" \".$enemy['name'].\"</b>.\");\n $smarty -> display ('error1.tpl');\n $smarty -> assign (\"Message\", \"<li><b>\".REWARD.\" <b>\".$expgain.\"</b> \".EXP_PTS.\" \".AND_GAIN.\" <b>\".$goldgain.\"</b> \".COINS);\n $smarty -> display ('error1.tpl');\n\tmonsterloot($enemy['lootnames'], $enemy['lootchances'], $enemy['level'], $amount);\n\tbattlerecords($enemy['name'], $enemy['level'], $player->id);\n checkexp($player -> exp,$expgain,$player -> level,$player -> race,$player -> user,$player -> id,0,0,$player -> id,'',0);\n if ($player -> hp < 0) \n {\n $player -> hp = 0;\n }\n\tif (($player->hp > 0) && ($player->autodrink != 'N'))\n\t {\n\t if ($player->autodrink == 'A')\n\t {\n\t\tdrinkfew(0, 0, 'M');\n\t\tdrinkfew(0, 0, 'H');\n\t }\n\t else\n\t {\n\t\tdrinkfew(0, 0, $player->autodrink);\n\t }\n\t }\n if ($title == 'Arena Walk') \n {\n $smarty -> assign (\"Message\", \"</ul><ul><li><b>\".B_OPTIONS.\"</a><br /></li></ul>\");\n $smarty -> display ('error1.tpl');\n }\n $db -> Execute(\"UPDATE players SET hp=\".$player -> hp.\", fight=0, bless='', blessval=0 WHERE id=\".$player -> id);\n\tif (isset($_SESSION['razy']))\n\t {\n\t unset($_SESSION['razy']);\n\t }\n unset($_SESSION['exhaust'], $_SESSION['round'], $_SESSION['points'], $_SESSION['dodge']);\n for ($k = 0; $k < $amount; $k ++) \n {\n $strIndex = \"mon\".$k;\n unset($_SESSION[$strIndex]);\n }\n }\n $myczaro -> Close();\n}", "public function execute()\n {\n $this->slectPrioritis();\n\n Bots::getInstance()->clearNext();\n $ants = Bots::getInstance()->getList();\n foreach ($ants as $ant){\n\n $log = !empty($ant->gol) ? implode(Tools::createCoordinate($ant->gol), ':') : 'НЕТУ';\n// Tools::logger(\"Ant:[\" . implode(Tools::createCoordinate($ant->currentCoord ), ':'). \"] = EDA:$log\");\n $coordinats = Tools::createCoordinate($ant->currentCoord);\n if (empty($ant->gol)){\n// Tools::logger(\"У этого нет цели \" . $ant->currentCoord . \" Ставим ему дефолт\");\n// $ant->gol = $ant->currentCoord;\n// $ant->gol = Tools::createNum(28, 19);\n// $ant->gol = Tools::createNum(10, 67);\n// $ant->gol = Tools::createNum(14, 19);\n }\n// $golCoord = Tools::createCoordinate($ant->gol);\n// $dir = $this->createDirection($coordinats, $golCoord);\n// $dir = Tools::createDirection($coordinats, $golCoord);\n $dirArray = Tools::createDirection($ant);\n// Tools::logger(\"GO TO ВЫБОР ИЗ : \" . implode(':',$dirArray));\n $dir = Bots::getInstance()->selectMove($ant, $dirArray);\n// Bots::getInstance()->addNext($ant, $dir);\n// Tools::logger(\"GO TO ВЫБРАЛ $dir\");\n// Tools::logger(\"GO TO Этот выбрал - > \" . print_r($coordinats,true));\n\n $nextCoordinat = Tools::nextStep($ant->coordinatColRow['col'], $ant->coordinatColRow['row'], $dir);\n $nextNum = Tools::createNum($nextCoordinat['row'], $nextCoordinat['col']);\n \n Steamer::issueOrder($coordinats['row'], $coordinats['col'], $dir);\n// break;\n }\n\n }", "public function orderRandom();", "function PlayerPass( $pos )\r\n \t{\r\n\r\n\t\t$this->states[$pos] = 2;\r\n \t\tf_MQuery( \"UPDATE poker_draw_player SET state = 2 WHERE\r\n\t\t\t\tdraw_id = '{$this->draw_id}' AND seat = '$pos';\" );\r\n\r\n\t\t//2) next player and check ( for game end, next round, etc. )\r\n\r\n\t\t$this->MakeNextMove( );\r\n \t}", "public static function aggressive ($available_moves)\n {\n $scores = static::evaluate_moves($available_moves);\n return ['move' => array_keys($scores)[0], 'logmsg' => \"aggressive; \" . array_keys($scores)[0] . \"; xy:\" . Map::current('x') . \",\" . Map::current('y')];\n }", "public function test_normal()\n {\n $origin = [\n 'coordinates' => '1,5',\n 'direction' => Compass::EAST,\n ];\n\n $this->postJson('/api/set-coordinates', $origin);\n\n $command = [\n 'command' => Navigation::TEST_COMMAND,\n 'obstacles' => false,\n ];\n\n $response = $this->postJson('api/send-command', $command);\n\n $coordinates = Coordinate::all();\n\n $positions = [\n [1, 5],\n [2, 5],\n [3, 5],\n [3, 4],\n [3, 3],\n [4, 3],\n [5, 3],\n [6, 3],\n [6, 2],\n ];\n\n $error = false;\n foreach ($positions as $position) {\n $this->assertDatabaseHas(Coordinate::class, [Coordinate::X_AXIS=> $position[0] , Coordinate::Y_AXIS => $position[1]]);\n }\n\n $this->assertDatabaseCount(Movement::class, 10);\n\n $last_movement = Movement::orderBy('id', 'desc')->first();\n\n $last_movement_error_check = false;\n if ($last_movement->coordinates->position_x != 6 || $last_movement->coordinates->position_y != 3) {\n $last_movement_error_check = true;\n }\n\n $this->assertFalse($last_movement_error_check);\n\n $data = [\n 'movements' => Movement::orderBy('id', 'desc')->get()->toArray(),\n 'obstacles' => Coordinate::orderBy('id', 'asc')->where('has_obstacle', 1)->get()->toArray(),\n ];\n\n $response->assertJson($data);\n }", "public function setRandomTypeOfBattle()\n {\n switch(rand(0, 9)) {\n case 0: return 'Mountain';\n case 1: return 'Water';\n case 2: return 'Open land';\n case 3: return 'Water';\n case 4: return 'Open land';\n case 5: return 'Woods';\n case 6: return 'Woods';\n case 7: return 'Water';\n case 8: return 'Open land';\n case 9: return 'Open land';\n }\n }", "function getPosition() ;", "public function testMovementThroughPlayfield ()\n {\n $playfield = (new Canvas(2,2))->getPlayfield();\n $position = $playfield->getAnt()->getPosition();\n\n // Attempt to move in the allowed directions.\n if (0 === $position['y']) {\n $this->assertEquals($playfield->moveAnt('down'), true);\n $this->assertEquals($playfield->moveAnt('up'), true);\n } else {\n $this->assertEquals($playfield->moveAnt('up'), true);\n $this->assertEquals($playfield->moveAnt('down'), true);\n }\n\n if (0 === $position['x']) {\n $this->assertEquals($playfield->moveAnt('right'), true);\n $this->assertEquals($playfield->moveAnt('left'), true);\n } else {\n $this->assertEquals($playfield->moveAnt('left'), true);\n $this->assertEquals($playfield->moveAnt('right'), true);\n }\n\n // Now try to move in an illegal direction.\n $this->assertNotEquals($playfield->moveAnt('diagonal'), true);\n }", "public function startDuel(){\n $this->plugin->getScheduler()->cancelTask($this->countdownTaskHandler->getTaskId());\n\n /** @var Player $player1 */\n $player1 = $this->players[0];\n /** @var Player $player2 */\n $player2 = $this->players[1];\n var_dump($this->spawn1);\n var_dump($this->spawn2);\n $player1->teleport($this->spawn1);\n $player2->teleport($this->spawn2);\n $this->sparyParticle($player1);\n $this->sparyParticle($player2);\n $player1->setGamemode(0);\n $player2->setGamemode(0);\n\n // Give kit\n if(OneVsOne::getInstance()->getConfig()->get(\"force-kit\") === true){\n foreach($this->players as $player){\n $this->giveKit($player);\n }\n }\n // Fix start time\n $this->startTime = new DateTime('now');\n\n $player1->sendTip(OneVsOne::getMessage(\"duel_tip\"));\n $player1->sendMessage(str_replace(\"{roundtime}\", OneVsOne::getInstance()->getConfig()->get(\"time-limit\"), OneVsOne::getMessage(\"duel_start\")));\n\n $player2->sendTip(OneVsOne::getMessage(\"duel_tip\"));\n $player2->sendMessage(str_replace(\"{roundtime}\", OneVsOne::getInstance()->getConfig()->get(\"time-limit\"), OneVsOne::getMessage(\"duel_start\")));\n }", "private function place_loot_chest($x, $z, $y, $percent_dungeon_complete){\r\n\r\n $items = array();\r\n\r\n $num_slots_to_fill = rand(1, round((20 / 100) * $percent_dungeon_complete) + 5);\r\n// print \"filling chest with \" . $num_slots_to_fill . \" items\\n\";\r\n for ($slot_num = 1; $slot_num <= $num_slots_to_fill; $slot_num++){\r\n\r\n $types = array(\"weapon\", \"arrow\", \"armor\", \"potion\", \"tool\", \"food\", \"food\", \"food\", \"food\", \"food\");\r\n $type = $types[rand(0, count($types) - 1)];\r\n $item = null;\r\n $count = 0;\r\n switch($type){\r\n case \"weapon\":\r\n list($item, $count) = $this->generate_weapon($percent_dungeon_complete);\r\n break;\r\n\r\n case \"arrow\":\r\n list($item, $count) = $this->generate_arrow($percent_dungeon_complete);\r\n break;\r\n\r\n case \"armor\":\r\n list($item, $count) = $this->generate_armor($percent_dungeon_complete);\r\n break;\r\n\r\n case \"potion\":\r\n list($item, $count) = $this->generate_potion($percent_dungeon_complete);\r\n break;\r\n\r\n case \"tool\":\r\n list($item, $count) = $this->generate_tool($percent_dungeon_complete);\r\n break;\r\n\r\n case \"food\":\r\n list($item, $count) = $this->generate_food($percent_dungeon_complete);\r\n break;\r\n\r\n }\r\n\r\n $item[\"Slot\"] = $slot_num;\r\n $item[\"Count\"] = $count;\r\n $items[] = $item;\r\n }\r\n\r\n// /setblock ~1 ~ ~ chest 0 replace {Items:[{id:\"wooden_sword\",Slot:0,Count:1},{id:\"diamond_sword\",Slot:1,Count:1}]}\r\n\r\n $items = array(\r\n \"Items\" => $items,\r\n );\r\n// print \" items in chest: \" . print_r($items, true) . \"\\n\";\r\n $this->cmds[] = \"setblock ~\" . ($x + $this->x_offset) . \" \" . $this->get_relative_z($z) . \" ~\" . ($y + $this->y_offset)\r\n . \" chest 0\"\r\n . ' replace ' . json_encode($items);\r\n\r\n }", "public function randomItem();", "function getCoordinatesInfo($myPositionX, $myPositionY, $game, $map, $bombs, $opponents, $bonuses)\n{\n\t$oneUp = $myPositionY - 1;\n\t$oneDown = $myPositionY + 1;\n\t$oneLeft = $myPositionX - 1;\n\t$oneRight = $myPositionX + 1;\n\t\n\t$typeOfObstacle = [];\n\t$moveAvailable = [];\n\n\t//check four directions\n\t//up\n\t$moveAvailable[0] = 0;\n\tif(!empty($map[$myPositionX][$oneUp]))\n\t{\n\t\tfor($up = $oneUp; $up >= 0; $up--)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$myPositionX][$up];\n\t\t\t\n\t\t\t$isABomb = $bombs[$myPositionX][$up] === 1;\n\t\t\t$isAnOpponent = !empty($opponents[$myPositionX][$up]);\n\t\t\t$isABonus = !empty($bonuses[$myPositionX][$up]);\n\t\t\t\n\t\t\t$typeOfObstacle[0] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[0])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[0]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[0])){\n\t\t\t$typeOfObstacle[0] = 1; //end grid\n\t\t}\n\t}\n\t\n\t//right\n\t$moveAvailable[1] = 0;\n\tif(!empty( $map[$oneRight][$myPositionY]))\n\t{\n\t\tfor($right = $oneRight; $right < $game->state->width; $right++)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$right][$myPositionY];\n\t\t\t\n\t\t\t$isABomb = !empty($bombs[$right][$myPositionY]);\n\t\t\t$isAnOpponent = !empty($opponents[$right][$myPositionY]);\n\t\t\t$isABonus = !empty($bonuses[$right][$myPositionY]);\n\t\t\t\n\t\t\t$typeOfObstacle[1] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[1])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[1]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[1])){\n\t\t\t$typeOfObstacle[1] = 1; //end grid\n\t\t}\n\t}\n\n\t//down\n\t$moveAvailable[2] = 0;\n\tif(!empty($map[$myPositionX][$oneDown]))\n\t{\n\t\tfor($down = $oneDown; $down < $game->state->height; $down++)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$myPositionX][$down];\n\t\t\t\n\t\t\t$isABomb = !empty($bombs[$myPositionX][$down]);\n\t\t\t$isAnOpponent = !empty($opponents[$myPositionX][$down]);\n\t\t\t$isABonus = !empty($bonuses[$myPositionX][$down]);\n\t\t\t\n\t\t\t$typeOfObstacle[2] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[2])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[2]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[2])){\n\t\t\t$typeOfObstacle[2] = 1; //end grid\n\t\t}\n\t}\n\t\n\t//left\n\t$moveAvailable[3] = 0;\n\tif(!empty($map[$oneLeft][$myPositionY]))\n\t{\n\t\tfor($left = $oneLeft; $left >= 0; $left--)\n\t\t{\n\t\t\t$elementInPositionToEvaluate = $map[$left][$myPositionY];\n\t\t\t\n\t\t\t$isABomb = !empty($bombs[$left][$myPositionY]);\n\t\t\t$isAnOpponent = !empty($opponents[$left][$myPositionY]);\n\t\t\t$isABonus = !empty($bonuses[$left][$myPositionY]);\n\t\t\t\n\t\t\t$typeOfObstacle[3] = getTypeOfObstacle($elementInPositionToEvaluate, $isABomb, $isAnOpponent);\n\t\t\t\n\t\t\tif(!empty($typeOfObstacle[3])){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$moveAvailable[3]++;\n\t\t}\n\t\tif(empty($typeOfObstacle[3])){\n\t\t\t$typeOfObstacle[3] = 1; //end grid\n\t\t}\n\t}\n\n\treturn [\n\t\t\"moveAvailable\" => $moveAvailable,\n\t\t\"typeOfObstacle\" => $typeOfObstacle\n\t];\n}", "public function run() {\n\n $baseLat = 31.5031794;\n $baseLng = 74.3308091;\n\n for( $i = 1; $i<=100; $i++ ) {\n LatLng::create([\n 'lat' => $baseLat,\n 'lng' => $baseLng\n ]);\n $baseLat = $baseLat + (rand(0,5)/1000);\n $baseLng = $baseLng - (rand(0,5)/1000);\n }\n\n }", "private function set_card_visibility(&$move, $mode) {\n\t\t$iLastFrom = count($move['from']) - 1;\n\t\tif($iLastFrom >= 0) {\n\t\t\t$move['from'][$iLastFrom]->display = true;\n\t\t\t$this->currentScore += 20;\n\t\t}\n\t\t\n\t\t// La carte parente de l'emplacement de destination n'est plus visible si mouvement inversé\n\t\t$iLastTo = count($move['to']) - 2;\n\t\tif($iLastTo >= 0 && $mode == 'reverse') {\n\t\t\t$move['to'][$iLastTo]->display = false;\n\t\t\t$this->currentScore -= 20;\n\t\t}\n\t}", "public function random(bool $state): void\n {\n $this->client->execute('random ' . ($state ? 1 : 0));\n }", "function move_block($block_from, $block_to, $banner_id) {\n\n\t# reserve block_to\n\tif (!is_block_free($block_to, $banner_id)) {\n\t\techo \"<font color='red'>Cannot move the block - the space chosen is not empty!</font><br>\";\n\t\treturn false;\n\t}\n\n\n\t#load block_from\n\t$sql = \"SELECT * from blocks where block_id='$block_from' AND banner_id='$banner_id' \";\n\t//echo \"$sql<br>\";\n\t$result = mysql_query($sql) or die(mysql_error());\n\t$source_block = mysql_fetch_array($result);\n\n\n\t// get the position and check range, do not move if out of range\n\n\t$pos = get_block_position($block_to);\n\t//echo \"pos is ($block_to): \";print_r($pos); echo \"<br>\";\n\t\n\t$x = $pos['x'];\n\t$y = $pos['y'];\n\n\tif (($x==='') || ($x > (G_WIDTH*BLK_WIDTH)) || $x < 0) {\n\t\techo \"<b>x is $x</b><br>\";\n\t\treturn false;\n\n\t}\n\n\tif (($y==='') || ($y > (G_HEIGHT*BLK_HEIGHT)) || $y < 0) {\n\t\techo \"<b>y is $y</b><br>\";\n\t\treturn false;\n\t}\n\n\t\n\t$sql = \"REPLACE INTO `blocks` ( `block_id` , `user_id` , `status` , `x` , `y` , `image_data` , `url` , `alt_text`, `file_name`, `mime_type`, `approved`, `published`, `banner_id`, `currency`, `price`, `order_id`, `click_count`, `ad_id`) VALUES ('$block_to', '\".$source_block['user_id'].\"' , '\".$source_block['status'].\"' , '\".$x.\"' , '\".$y.\"' , '\".$source_block['image_data'].\"' , '\".addslashes($source_block['url']).\"' , '\".addslashes($source_block['alt_text']).\"', '\".$source_block['file_name'].\"', '\".$source_block['mime_type'].\"', '\".$source_block['approved'].\"', '\".$source_block['published'].\"', '\".$banner_id.\"', '\".$source_block['currency'].\"', '\".$source_block['price'].\"', '\".$source_block['order_id'].\"', '\".$source_block['click_count'].\"', '\".$source_block['ad_id'].\"')\";\n\n//echo \"<p>$sql</p>\";\n\n\tmds_log(\"Moved Block - \".$sql);\n\n\tmysql_query ($sql) or die(mysql_error());\n\n\t# delete 'from' block\n\n\t$sql = \"DELETE from blocks WHERE block_id='\".$block_from.\"' AND banner_id='\".$banner_id.\"' \";\n//echo \"<p>$sql</p>\";\n\tmysql_query ($sql) or die(mysql_error());\n\tmds_log(\"Deleted block_from - \".$sql);\n\n\t// Update the order record\n\n\t$sql = \"SELECT * from orders WHERE order_id='\".$source_block['order_id'].\"' AND banner_id='$banner_id' \";\n\t//echo \"$sql<br>\";\n\t$result = mysql_query($sql) or die(mysql_error());\n\t$order_row = mysql_fetch_array($result);\n\t$blocks = array();\n\t$new_blocks = array();\n\t$blocks = explode(',',$order_row['blocks']);\n\t//print_r($blocks);\n\tforeach ($blocks as $item) {\n\t\t//echo \"<b>$item - block from: $block_from</b><br>\";\n\t\tif ($block_from == $item) {\n\t\t\t$item = $block_to;//echo '<b>found!</b>';\n\t\t}\n\t\t$new_blocks[] = $item; \n\t}\n\n\t$sql = \"UPDATE orders set blocks='\".implode(',', $new_blocks).\"' WHERE order_id='\".$source_block['order_id'].\"' \";\n\t# update the customer's order\n\tmysql_query($sql) or die(mysql_error());\n\tmds_log(\"Updated order - \".$sql);\n\n\treturn true;\n\n\n}", "public function GenerateLegalPawnMoves($chesspiece, $x, $y){\n\t\t$from = array($x, $y);\n\t\t\n\t if ($chesspiece > 0){ // $chesspiece is a white pawn.\n\t \t$to = array($x, $y+1);\n\t \t\n\t \tif ($this->chessposition[$x][$y+1] == 0){\n\t \t\t$this->AddChessSquare($chesspiece, $from, $to);\n\t \tif ($y == 1){\n \t$to = array($x, $y+2);\n \tif ($this->chessposition[$x][$y+2] == 0)\n \t$this->AddChessSquare($chesspiece, $from, $to);\n\t \t}\n }\n \n if ($this->IsEnemyPiece(1, $x+1, $y+1)){\n \t$this->AddChessSquare(1, $from, array($x+1, $y+1));\n }\n if ($this->IsEnemyPiece(1, $x-1, $y+1)){\n \t$this->AddChessSquare(1, $from, array($x-1, $y+1));\n }\n }\n\n if ($chesspiece < 0){ // $chesspiece is a black pawn\n \t$to = array($x, $y-1);\n\t \t\n\t if($this->chessposition[$x][$y-1] == 0){\n\t \t$this->AddChessSquare($chesspiece, $from, $to);\n\t \tif ($y == 6){\n \t$to = array($x, $y-2);\n \tif ($this->chessposition[$x][$y-2] == 0)\n \t$this->AddChessSquare($chesspiece, $from, $to);\n\t }\n }\n \n if ($this->IsEnemyPiece(-1, $x+1, $y-1))\n \t$this->AddChessSquare(-1, $from, array($x+1, $y-1));\n if ($this->IsEnemyPiece(-1, $x-1, $y-1))\n \t$this->AddChessSquare(-1, $from, array($x-1, $y-1)); \n }\n \n //now do en-passant\n /***\n if ($LastMovePlayed[0] == ){ //if it is a pawn\n \t$fromsquare = $this->NumToCoordinate($LastMovePlayed[0]);\n \t$tosquare = $this->NumToCoordinate($LastMovePlayed[1]);\n \t\n \t$a = $tosquare[0] + 1;\n \tif ($this->IsEnemyPiece($this->chessposition[$tosquare[0]][$tosquare[1]]))\n }\n ***/\n \n return true;\n\t}", "public function nextPossibleMove()\n {\n $x = $this->snake['pos']['x'];\n $y = $this->snake['pos']['y'];\n \n $moves = [\n 'up' => [$x, $y - 1],\n 'right' => [$x + 1, $y],\n 'down' => [$x, $y + 1],\n 'left' => [$x - 1, $y],\n ];\n\n $moves = $this->removeDeadMoves($moves);\n\n if (empty($moves)) {\n return $moves;\n }\n\n $moves = $this->calcThresholds($moves);\n\n if (!empty($safe = array_diff_key($moves, $this->getDangerMoves($moves)))) {\n $danger = array_intersect_key($moves, $this->getDangerMoves($moves));\n\n $threshold = array_first($safe)[2];\n\n if ($threshold > 7 && !empty($danger)) {\n return $danger;\n }\n\n if ($threshold > 5) {\n if (!empty($tail = $this->getTailMoves($safe))) {\n return $tail;\n }\n }\n\n if ($threshold > 5 && $this->snake['health'] < 95) {\n $result = $this->getFoodMoves($safe);\n\n if (!empty($result)) {\n return $result;\n }\n }\n\n return $safe;\n }\n\n if (!empty($head = $this->getHeadMoves($moves))) {\n return $head;\n }\n\n if (!empty($tail = $this->getTailMoves($moves))) {\n return $tail;\n }\n\n return $moves;\n }", "function ship_pick()\n{\n\t//[02:14] <Exekutor4> Well if you punish the times stgc'ler want then you can tap the source type^^\n\t//[02:17] <Karnickl> @sci. no wonder that nothing is done *g* tap+source=makes+w.bush\n\tglobal $db;\n\tglobal $game,$ACTUAL_TICK;\n\n\t$game->out('<center><span class=\"sub_caption\">'.constant($game->sprache(\"TEXT247\")).' '.HelpPopup('ship_avis').' :</span></center><br>');\n\n\t$ships=isset($_POST['ship_auswahl'])?$_POST['ship_auswahl']:null;\n\n\tif(isset($_POST['plani_ziel'])) $_POST['plani_ziel']=(int)$_POST['plani_ziel'];\n\n\tif(isset($_REQUEST['handel']) && $_REQUEST['handel']=='ship_send' && $_POST['plani_ziel']!=null && $_REQUEST['step']=='2' && $ships[0]!=null)\n\t{\n\t\t$plani_id_a=$db->queryrow('SELECT planet_id,planet_name FROM `planets` WHERE planet_id='.$_POST['plani_ziel'].' AND planet_owner='.$game->player['user_id'].'');\n\t\tif($plani_id_a['planet_id']!=$_POST['plani_ziel'])\n\t\t{\n\t\t\t$game->out(constant($game->sprache(\"TEXT146\")));\n\t\t}else\n\t\t{\n\t\t\t$where_frage=\"\";\n\t\t\t$zaehler=0;\n\t\t\tfor($i=0; $i < count($ships); $i++) {\n\t\t\t\tif($i==0)\n\t\t\t\t{\n\t\t\t\t\t$where_frage.=\"( w.ship_id=\".$ships[$i].\" \";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$where_frage.=\" OR w.ship_id=\".$ships[$i].\" \";\n\t\t\t\t}\n\t\t\t\t$zaehler++;\n\t\t\t}\n\n\t\t\tif($_POST['transportsart']!=1 && $_POST['transportsart']!=2 && $_POST['transportsart']!=3) {$game->out('Cheat'); exit;}\n\t\t\tif($_POST['transportsart']==1) {$transportsatz=0.30;$tickzeit=20*6;}\n\t\t\tif($_POST['transportsart']==2) {$transportsatz=0.15;$tickzeit=20*12;}\n\t\t\tif($_POST['transportsart']==3) {$transportsatz=0;$tickzeit=20*36;}\n\t\t\t$Bot = $db->queryrow('SELECT planet_id FROM FHB_Bot');\n\t\t\t$db->lock('ships','ship_fleets','FHB_warteschlange w','FHB_logging_ship','scheduler_shipmovement','schulden_table s','FHB_warteschlange');\n\t\t\tif(($npc_ships_wait=$db->query('SELECT w.* FROM (FHB_warteschlange w) LEFT JOIN schulden_table s on s.ship_id=w.ship_id WHERE (s.status=1 OR s.status IS NULL) AND user_id='.$game->player['user_id'].' AND '.$where_frage.')'))==true)\n\t\t\t{\n\t\t\t\tif($db->query('INSERT INTO ship_fleets (fleet_name, user_id, owner_id, planet_id, move_id, n_ships)\n\t\t\t\t\tVALUES (\"'.constant($game->sprache(\"TEXT274\")).' '.((int)($ACTUAL_TICK/2)).'\", '.$game->player['user_id'].', '.$game->player['user_id'].', '.$Bot['planet_id'].', 0, '.$zaehler.')'))\n\t\t\t\t{\n\n\t\t\t\t\t$fleet_id=$db->insert_id();\n\t\t\t\t\t$xxx=0;\n\t\t\t\t\twhile($npc_ships_wait_t=$db->fetchrow($npc_ships_wait))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!$db->query('UPDATE ships SET fleet_id='.$fleet_id.',ship_untouchable=0,user_id='.$game->player['user_id'].' WHERE ship_id='.$npc_ships_wait_t['ship_id'].''))\n\t\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Could not insert new movement data');\n\t\t\t\t\t\t$xxx++;\n\t\t\t\t\t}\n\t\t\t\t\tif($xxx!=0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!$db->query('INSERT INTO scheduler_shipmovement (user_id, move_status, move_exec_started, start, dest, total_distance, remaining_distance, tick_speed, move_begin, move_finish, n_ships, action_code, action_data)\n\t\t\t\t\t\t\tVALUES ('.$game->player['user_id'].', 0, 0, '.$Bot['planet_id'].', '.$_POST['plani_ziel'].', 0, 0, 0, '.$ACTUAL_TICK.', '.($ACTUAL_TICK + $tickzeit).', '.$zaehler.', 11, \"\")'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Could not insert new movement data');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$new_move_id = $db->insert_id();\n\t\t\t\t\t\t\tif(!$db->query('UPDATE ship_fleets\n\t\t\t\t\t\t\t\tSET planet_id = 0,\n\t\t\t\t\t\t\t\tmove_id = '.$new_move_id.'\n\t\t\t\t\t\t\t\tWHERE fleet_id='.$fleet_id.''))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Could not update fleets position data');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* 06/03/08 - AC: No taxes on the ship shipping */\n\t\t\t\t\t\t\t$steuern = 0;\n\n\t\t\t\t\t\t\t$game->out('<table>\n\t\t\t\t\t\t\t\t<tr><td>'.constant($game->sprache(\"TEXT248\")).'</td></tr>\n\t\t\t\t\t\t\t\t<tr><td>'.constant($game->sprache(\"TEXT148\")).$plani_id_a['planet_name'].'</td></tr>\n\t\t\t\t\t\t\t\t<tr><td><!--'.constant($game->sprache(\"TEXT149\")).$steuern.'--></td></tr>\n\t\t\t\t\t\t\t\t<tr><td><form action=\"'.parse_link('a=trade&view='.$_REQUEST['view'].'&handel=kaufen_truppen').'\" method=\"post\">\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"'.constant($game->sprache(\"TEXT152\")).'\" name=\"submit\" class=\"Button_nosize\"></td></tr></table>');\n\t\t\t\t\t\t\tif(($npc_ships_wait=$db->query('SELECT w.* FROM (FHB_warteschlange w) LEFT JOIN schulden_table s on s.ship_id=w.ship_id WHERE (s.status=1 OR s.status IS NULL) AND user_id='.$game->player['user_id'].' AND '.$where_frage.')'))==false)\n\t\t\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Could select ships from Bot');\n\t\t\t\t\t\t\twhile($npc_ships_wait_t=$db->fetchrow($npc_ships_wait))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!$db->query('DELETE FROM FHB_warteschlange WHERE id='.$npc_ships_wait_t['id'].''))\n\t\t\t\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Could not Delete from Bot');\n\t\t\t\t\t\t\t\tif(!$db->query('INSERT INTO `FHB_logging_ship` (`tick` , `user_id` , `ship_id` ) VALUES ('.$ACTUAL_TICK.','.$game->player['user_id'].','.$npc_ships_wait_t['ship_id'].')'))\n\t\t\t\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Could not logging');\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$game->out(constant($game->sprache(\"TEXT249\")));\n\t\t\t\t\t\t$db->unlock('ships','ship_fleets','FHB_warteschlange w','FHB_logging_ship','scheduler_shipmovement','schulden_table s','FHB_warteschlange');\n\t\t\t\t\t\t$game->out('<table><form action=\"'.parse_link('a=trade&view='.$_REQUEST['view'].'&handel=ship_send').'\" method=\"post\"><tr><td>');\n\t\t\t\t\t\t$game->out('<input type=\"submit\" value=\"'.constant($game->sprache(\"TEXT152\")).'\" name=\"submit\" class=\"Button_nosize\"></td></tr></form></table>');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{message(DATABASE_ERROR, 'Internal database error');}\n\t\t\t}\n\t\t\telse{message(DATABASE_ERROR, 'Internal database error');}\n\t\t\t$db->unlock('ships','ship_fleets','FHB_warteschlange w','FHB_logging_ship','scheduler_shipmovement','schulden_table s','FHB_warteschlange');\n\t\t}\n\t}\n\telse\n\t{ \n\t\tif(($npc_ships_wait=$db->query('SELECT w.* FROM (FHB_warteschlange w) LEFT JOIN schulden_table s on s.ship_id=w.ship_id WHERE (s.status=1 OR s.status IS NULL) AND user_id='.$game->player['user_id'].''))==false)\n\t\t{\n\t\t\tmessage(DATABASE_ERROR, 'Could not open ship wait list');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($db->num_rows()<=0)\n\t\t\t{\n\t\t\t\t$game->out(constant($game->sprache(\"TEXT250\")));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$game->out('<table>');\n\n\t\t\t\t$game->out('<form action=\"'.parse_link('a=trade&view='.$_REQUEST['view'].'&handel=ship_send&step=2').'\" method=\"post\">');\n\n\t\t\t\t$game->out('<tr><td>'.constant($game->sprache(\"TEXT173\")).'</td><td><select size=\"1\" name=\"transportsart\">\n\t\t\t\t<option value=\"1\">'.constant($game->sprache(\"TEXT266\")).'</option>\n\t\t\t\t<!-- <option value=\"1\">'.constant($game->sprache(\"TEXT174\")).'</option>-->\n\t\t\t\t<!--<option value=\"2\">'.constant($game->sprache(\"TEXT175\")).'</option>-->\n\t\t\t\t<!--<option value=\"3\">'.constant($game->sprache(\"TEXT176\")).'</option>-->\n\t\t\t\t</select></td></tr><tr><td colspan=2><br>'.constant($game->sprache(\"TEXT177\")).'</td></tr>');\n\t\t\t\t$sql='SELECT planet_id,planet_name,building_11 FROM `planets` WHERE planet_owner='.$game->player['user_id'].' ORDER BY planet_name ASC';\n\t\t\t\tif(($planis=$db->query($sql))==false)\n\t\t\t\t{\n\t\t\t\t\t$game->out(constant($game->sprache(\"TEXT178\")));\n\t\t\t\t}else{\n\t\t\t\t\t$game->out('<tr><td>'.constant($game->sprache(\"TEXT251\")).'</td><td><select size=\"1\" name=\"plani_ziel\">');\n\t\t\t\t\twhile($planeten=$db->fetchrow($planis))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($planeten['building_11']>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($game->planet['planet_id'] == $planeten['planet_id'])\n\t\t\t\t\t\t\t\t$game->out('<option value=\"'.$planeten['planet_id'].'\" selected=\"selected\">'.$planeten['planet_name'].'</option>');\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$game->out('<option value=\"'.$planeten['planet_id'].'\">'.$planeten['planet_name'].'</option>');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$game->out('</select></td></tr>');\n\t\t\t\t}\n\t\t\t\t$game->out('<tr><td colspan=2><br>');\n\t\t\t\twhile($npc_ships_wait_t=$db->fetchrow($npc_ships_wait))\n\t\t\t\t{\n\t\t\t\t\t$sql = 'SELECT s.ship_id, s.hitpoints, \n\t\t\t\t\t\t\t\t s.unit_1, s.unit_2,\n\t\t\t\t\t\t\t\t s.unit_3,s.unit_4,\n\t\t\t\t\t\t\t\t st.max_unit_1,st.max_unit_2,\n\t\t\t\t\t\t\t\t st.max_unit_3,st.max_unit_4,\n\t\t\t\t\t\t\t\t st.name AS template_name,\n\t\t\t\t\t\t\t\t st.value_5 AS max_hitpoints\n\t\t\t\t\t\tFROM (ships s) INNER JOIN (ship_templates st) ON st.id = s.template_id\n\t\t\t\t\t\tWHERE s.ship_id='.$npc_ships_wait_t['ship_id'];\n\n\t\t\t\t\tif(($ship = $db->queryrow($sql)) === false) {\n\t\t\t\t\t\tmessage(DATABASE_ERROR, 'Cannot retrieve delivery ship data!');\n\t\t\t\t\t}\n\n\t\t\t\t\t$crew_perc = 100 / ($ship['max_unit_1'] + $ship['max_unit_2'] +\n\t\t\t\t\t\t\t\t\t\t$ship['max_unit_3'] + $ship['max_unit_4']) *\n\t\t\t\t\t\t\t\t\t ($ship['unit_1'] + $ship['unit_2'] + \n\t\t\t\t\t\t\t\t\t $ship['unit_3'] + $ship['unit_4']);\n\n\t\t\t\t\t$crew_title = $crew_perc!=100 ? ' B='.round($crew_perc,0).'%': '';\n\n\t\t\t\t\t$game->out('<input name=\"ship_auswahl[]\" type=\"checkbox\" id=\"ship_auswahl[]\" value=\"'.$npc_ships_wait_t['ship_id'].'\"> '.$ship['template_name'].' ('.$ship['hitpoints'].'/'.$ship['max_hitpoints'].')'.$crew_title.'<br>');\n\t\t\t\t}\n\t\t\t\t$game->out('<br><br><input type=\"submit\" value=\"'.constant($game->sprache(\"TEXT252\")).'\" name=\"submit\" class=\"Button_nosize\"></td></tr></form></table>');\n\t\t\t}\n\t\t}\n\t}\n}", "public function __construct()\r\n {\r\n $this->spaceShip = new Ship(\r\n rand(-$this->universeRadius, $this->universeRadius),\r\n rand(-$this->universeRadius, $this->universeRadius),\r\n rand(-$this->universeRadius, $this->universeRadius),\r\n $this\r\n );\r\n // decide where we're going to!\r\n $this->destination = array('x' => rand(-$this->universeRadius, $this->universeRadius), 'y' => rand(-$this->universeRadius, $this->universeRadius), 'z' => rand(-$this->universeRadius, $this->universeRadius));\r\n // generate the initial asteroids\r\n $this->generateAsteroids();\r\n // generate the wormholes\r\n $this->generateWormholes();\r\n }", "protected static function generatePositionToGround ()\n {\n $dataTree = Tree::getByUser()->getDataByTree();\n\n $treeCroneCenterPosX = $dataTree['crownCenterPosX'];\n\n $treeHalfWidth = $dataTree['halfCrownWidth'];\n\n $posX = rand(-$treeHalfWidth, $treeHalfWidth);\n\n return [\n 'y' => 0,\n 'x' => (int) ($treeCroneCenterPosX + $posX),\n ];\n }", "private function tryState()\n\t{\n\t\t$key = array_rand($this->weights);\n\n\t\t$this->workingOnSolution[$key] = !$this->workingOnSolution[$key]; // neighbour\n\t\tlist($better, $price) = $this->check();\n\t\tif ($better) {\n\t\t\t$this->maxPrice = $price;\n\t\t\t$this->solution = $this->workingOnSolution;\n\t\t\treturn;\n\t\t}\n\n\t\t// delta magic\n\t\t$delta = ($price - $this->maxPrice);\n\t\t$x = mt_rand() / mt_getrandmax();\n\t\tif (!($x < exp($delta / $this->temp))) {\n\t\t\t$this->workingOnSolution[$key] = !$this->workingOnSolution[$key];\n\t\t\t// return new\n\t\t}\n\t\t// else return state\n\t}", "public function spawn(Block $block = null) : bool {\n // check if the block to spawn is given\n if ($block) {\n // the given block is the new block falling down\n $this->block = $block;\n } else {\n // a random block is the new block falling down\n $this->block = BlockGroup::parse($this->map, self::BLOCKS[rand(0, count(self::BLOCKS) - 1)]);\n }\n\n // calculate the x-coordinate the block shall spawn\n $x = floor($this->map->getWidth() / 2 - $this->block->getWidth() / 2 + 1);\n // calculate the y-coordinate the block shall spwan\n $y = $this->map->getHeight();\n\n // check if there is enough space to spwan the block\n if ($this->map->canHave($this->block, $x, $y)) {\n // move the block to its starting position\n $this->block->setX($x);\n $this->block->setY($y);\n\n // the new block was spawned\n return true;\n } else {\n // there was not enough space to spawn the new block\n return false;\n }\n }", "public function onPlayerMove(ArenaEvent $event){\n return;\n }", "public function testComputerMove()\n {\n $this->assertFalse($this->game->computerMove(3));\n $this->game->startNextTurn();\n $this->assertTrue($this->game->computerMove(3));\n\n // Add points to currentPoints enough to pass treshhold\n // computerMove should return false\n $this->diceHand->addToSerie(6);\n $this->diceHand->addToSerie(6);\n $this->game->checkHand($this->diceHand);\n $this->game->checkHand($this->diceHand);\n $this->assertFalse($this->game->computerMove(3.5));\n }", "abstract public function shuffle(string $location);", "function TempCalculateDistances($postcode1, $postcode2,$maxDistance){\n\t$rand = rand(1,$maxDistance);\n\t$distance = rand(1,$maxDistance);\n\t$distance = $distance / $rand;\n\t$distance = round($distance, 2);\n\treturn $distance;\n}", "function legalMovesFromState(string $state): Generator\n{\n foreach (ROOMTOPS as $type => $pos) {\n if ($state[$pos] === $type && $state[$pos+1] === '.') {\n yield switchPositions($state, $pos, $pos+1) => COSTS[$type];\n }\n }\n\n // move 'em up should they not be in their room, and the top position is empty\n foreach (ROOMTOPS as $type => $pos) {\n if ($state[$pos+1] !== $type && $state[$pos+1] !== '.' && $state[$pos] === '.') {\n yield switchPositions($state, $pos, $pos+1) => COSTS[$state[$pos+1]];\n }\n }\n\n // go over things in the hallway and move them to the rooms -- only if the way is free.\n for ($i = 0; $i < 11; $i++) {\n if ($state[$i] === '.') { // empty tiles we can ignore\n continue;\n }\n\n $currentCritter = $state[$i];\n $targetTile = ROOMTOPS[$currentCritter];\n if ($state[$targetTile] !== '.') { // topmost tile in target room occupied -- can't move\n continue;\n }\n if ($state[$targetTile + 1] !== '.' && $state[$targetTile + 1] !== $currentCritter ) { // bottom part in target room occupied by different race\n continue;\n }\n\n $entrance = ENTRANCES[$currentCritter];\n if ($entrance > $i) {\n $checkAgainst = str_pad('.', ($entrance - $i), '.');\n if (substr($state, $i+1, $entrance - $i) === $checkAgainst) {\n yield switchPositions($state, $i, $targetTile) => (COSTS[$currentCritter] * ($entrance - $i + 1));\n }\n } elseif ($entrance < $i) {\n $checkAgainst = str_pad('.', ($i - $entrance), '.');\n $actual = substr($state, $entrance, $i - $entrance);\n if ($actual === $checkAgainst) {\n yield switchPositions($state, $i, $targetTile) => (COSTS[$currentCritter] * ($i - $entrance + 1));\n }\n }\n\n }\n\n // find all possible places to move into from the top of the room - only if top of room is occupied\n // and critter is not\n foreach (ROOMTOPS as $critterType => $position) {\n if ($state[$position] === '.') { // empty tiles we can ignore\n continue;\n }\n\n $currentCritter = $state[$position];\n $tileContentBelow = $state[$position+1];\n // making sure the things stay in their room when they are already in their target room and do not block something.\n if ($critterType === $currentCritter && ($tileContentBelow === '.' || $tileContentBelow === $critterType)) {\n continue;\n }\n\n // now we go left and right, skipping the roomtops and aborting the mission should we encounter an\n // occupied tile\n\n $entrance = ENTRANCES[$critterType];\n //left\n for ($pos = $entrance; $pos >= 0; $pos--) {\n if ($state[$pos] !== '.') { // topmost tile in target room occupied -- can't move\n break;\n }\n if (in_array($pos, ENTRANCES)) {\n continue;\n }\n yield switchPositions($state, $position, $pos) => (COSTS[$currentCritter] * ($entrance - $pos + 1));\n }\n\n //right\n for ($pos = $entrance; $pos < 11; $pos++) {\n if ($state[$pos] !== '.') { // topmost tile in target room occupied -- can't move\n break;\n }\n if (in_array($pos, ENTRANCES)) {\n continue;\n }\n yield switchPositions($state, $position, $pos) => (COSTS[$currentCritter] * ($pos - $entrance + 1));\n }\n }\n}", "public static function spawnMobs($oLevel, $nMoreOrLess = 0) {\n\t\tlist ($BLOCK_VOID, $BLOCK_MOB_LEVEL_0) = self::getBlockCodes('BLOCK_VOID', 'BLOCK_MOB_LEVEL_0');\n\t\t$oMap = $oLevel->getMap();\n\t\t$mw = $oLevel->getMapWidth();\n\t\t$mh = $oLevel->getMapHeight();\n\t\t$rw = $oLevel->getRoomWidth();\n\t\t$rh = $oLevel->getRoomHeight();\n\t\tif ($nMoreOrLess < -3) {\n\t\t\t$nMoreOrLess = -3;\n\t\t}\n\t\tif ($nMoreOrLess > 3) {\n\t\t\t$nMoreOrLess = 3;\n\t\t}\n\t\tfor ($y = 0; $y < $mh; $y++) {\n\t\t\tfor ($x = 0; $x < $mw; $x++) {\n\t\t\t\tif ($oMap->getCellKm($x, $y) > 1) {\n\t\t\t\t\tif (!($oMap->isExit($x, $y) || $oMap->isEntrance($x, $y))) {\n\t\t\t\t\t\t// 10% de km en plus pour avoir du boss vers la fin\n\t\t\t\t\t\t$n100 = min(100, max(0, ($oMap->getCellKm101($x, $y))));\n\t\t\t\t\t\t$nMobs = $oLevel->oRnd->getRandom(1, 4 + $nMoreOrLess);\n\t\t\t\t\t\t$nMaxLoop = 6;\n\t\t\t\t\t\t$xRoom = $x * ($rw - 1);\n\t\t\t\t\t\t$yRoom = $y * ($rh - 1);\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t$xRnd = $oLevel->oRnd->getRandom(0, $rw >> 1) + ($rw >> 2);\n\t\t\t\t\t\t\t$yRnd = $oLevel->oRnd->getRandom(0, $rh >> 1) + ($rh >> 2);\n\t\t\t\t\t\t\tif ($oLevel->getCell($xRnd + $xRoom, $yRnd + $yRoom) == $BLOCK_VOID) {\n\t\t\t\t\t\t\t\t$oLevel->setCell($xRnd + $xRoom, $yRnd + $yRoom, $BLOCK_MOB_LEVEL_0 + floor($n100 / 10));\n\t\t\t\t\t\t\t\t$nMobs--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$nMaxLoop--;\n\t\t\t\t\t\t} while ($nMobs > 0 && $nMaxLoop > 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function pick_move() {\n for ($cell = 0; $cell < 8; $cell++) {\n\n //if this the cell is a dash put an X in it\n if ($this->position[$cell] == '-') {\n\n //place X in the following cell\n $this->position[$cell] = 'x';\n break;\n }\n }\n }", "public function testPlacementYatzy()\n {\n $controller = new Computer(\"name\", \"computer\");\n $this->assertInstanceOf(\"\\Jeso20\\Game\\Computer\", $controller);\n\n $diceHand = $this->createStub(DiceHand::class);\n\n $diceHand->method('getLastRollArray')\n ->willReturn([2, 2, 2, 2, 2]);\n\n $controller->setDiceHand($diceHand);\n\n\n $score = $controller->place(\"Yatzy\");\n $exp = 50;\n $this->assertEquals($exp, $score[\"sum\"]);\n }", "public function onRun($currentTick) {\n\t\t$onlinePlayers = \\pocketmine\\Server::getInstance()->getOnlinePlayers();\n// \t\tforeach ($onlinePlayers as $player) {\n// \t\t\tif (self::needPetMessage($player)) {\n// \t\t\t\tPets::sendPetMessage($player, Pets::PET_LOBBY_RANDOM);\n// \t\t\t}\n// \t\t}\n\t}", "public function testGameOver() {\n// $interface = new InteractionInterface($map);\n $game = new Game();\n $game->execute('go east');\n $game->execute('go east');\n $game->execute('go east');\n $game->execute('go east');\n $game->execute('go east');\n $game->execute('go east');\n $this->assertEquals($game->execute('look'), 'You died');\n// $this->assertEquals($interface->goEast(), 'You died');\n// $this->assertEquals($interface->goNorth(), 'You died');\n// $this->assertEquals($interface->goSouth(), 'You died');\n// $this->assertEquals($interface->goWest(), 'You died');\n }", "function rand_warrior(){\n\t\t$list = array ('adversary', 'advocate', 'ally', 'antagonist', 'apache', 'assailant', 'attacker', 'backer', 'barbarian', 'battler', 'belligerent', 'centurion', 'challenger', 'champ', 'combatant', 'commando', 'conqueror', 'contender', 'contester', 'corsair', 'crusader', 'defender', 'disputant', 'enemy', 'entrant', 'expounder', 'foe', 'gladiator', 'goliath', 'guardian', 'gurkha', 'hero', 'horseman', 'immortal', 'knight', 'legionairre', 'marshall', 'medalist', 'mongol', 'musketeer', 'ninja', 'partisan', 'patron', 'pirate', 'player', 'proponent', 'protector', 'ranger', 'rifler', 'rival', 'rover', 'samurai', 'scrapper', 'serviceman', 'soldier', 'spartan', 'spoiler', 'upholder', 'vanquisher', 'victor', 'viking', 'vindicator', 'warrior', 'winner');\n\t\t$i = count($list);\n\t\treturn $list[mt_rand(0,$i-1)];\n\t}", "private function movement_check($data) {\n if ($this->SQL->GetPlayerData(Session::get('PlayerGUID'))->AP == 0){\n $data['location_err'] = true;\n }\n // Get Player Gameboard location\n $location = $this->SQL->GetPlayerLocation(Session::get('PlayerGUID'));\n // Look up Gameboard data\n $MapData = $this->SQL->GetMap($location->ID);\n // Check if desired destination is in GetMap (stop teleportation)\n $isTooFar = true;\n foreach ($MapData as $value) {\n if ($value->ID == $data['location']){$isTooFar = false;}\n }\n // Set error flag if an error was found\n $data['HAS_ERRORS'] = true;\n if (\n empty($data['location_err']) &&\n $isTooFar == false\n ) {\n $data['HAS_ERRORS'] = false;\n }\n // Return to the controller\n return($data);\n }", "function mark_human($socket, $data) {\r\n\tif($socket->process == true) {\r\n\t\t$ip = $data;\r\n\t\tglobal $player_array;\r\n\t\tforeach( $player_array as $player ) {\r\n\t\t\tif($player->ip == $ip && $player->human == false) {\r\n\t\t\t\t$player->human = true;\r\n\t\t\t\t$exp_gain = $player->hostage_exp_points + 250;\r\n\t\t\t\t$player->inc_exp($exp_gain);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function MoveFirst() {}", "function AbsolutePosition() {}", "function zg_post_move_ai($game, $game_user, $ai_output) {\n if ($game_user->meta == 'toxiboss' || $game_user->meta == 'admin') {\n firep($ai_output, 'ai output');\n }\n\n // From devel? send to dpm.\n if (arg(0) == 'devel') {\n dpm($ai_output, 'ai output');\n }\n\n // From cron? Send to Slack.\n if (arg(0) == 'node') {\n zg_slack($game_user, 'bots', 'output', $ai_output);\n }\n\n db_set_active();\n lock_release('ai_move');\n db_set_active('game_' . $game);\n}" ]
[ "0.69977546", "0.63501585", "0.6242837", "0.6108106", "0.6087885", "0.584625", "0.5796574", "0.57627606", "0.57255477", "0.5692642", "0.5673628", "0.56305313", "0.552883", "0.54926693", "0.54745686", "0.54279226", "0.54278004", "0.53266674", "0.532077", "0.5276736", "0.5271952", "0.52651536", "0.5248294", "0.51880467", "0.5178337", "0.51556796", "0.5153531", "0.51533407", "0.5109915", "0.50821716", "0.50224715", "0.50052416", "0.50034183", "0.49923462", "0.4937637", "0.49270844", "0.49241105", "0.49164057", "0.49144268", "0.49120796", "0.4896921", "0.4896076", "0.48934793", "0.48820603", "0.48820603", "0.48811114", "0.48740593", "0.4873618", "0.48731285", "0.4871496", "0.48702008", "0.48698378", "0.48416662", "0.48400825", "0.48189902", "0.48059842", "0.48058826", "0.4803607", "0.47960255", "0.47563213", "0.47435552", "0.4738545", "0.47309765", "0.47216272", "0.47046033", "0.47009423", "0.46996534", "0.46957827", "0.46813476", "0.46803993", "0.4672976", "0.4659605", "0.46522534", "0.46412444", "0.46280366", "0.4618499", "0.46098697", "0.4608745", "0.4607879", "0.4606004", "0.45983776", "0.45916006", "0.4591179", "0.4586494", "0.45791525", "0.4576093", "0.45723853", "0.45571998", "0.45465875", "0.45460477", "0.4540549", "0.45400998", "0.45307383", "0.45281005", "0.45230132", "0.45148128", "0.45146397", "0.4513889", "0.45125002", "0.45090136" ]
0.5784075
7
The basic welcome message
public function action_index() { /* SEO対策 */ $keyword = "ガンダム,フルブ,コンボ,exvsfb,ダメージ計算,ダメージ"; $description = "最近の更新履歴"; $title = "NEWS | ".HP_NAME; $this->template->meta_keyword = $keyword; $this->template->meta_description = $description; $this->template->title = $title; $this->template->content = View::forge('exvsfb/news/index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function welcome() {\n\t}", "static function welcome()\n\t{\n\t\techo 'wellcome to our project';\n\t}", "public function welcomeMessage()\n {\n $this->info('');\n $this->info('Welcome to Nigels Coffee Shop Robot Controller Simulator!');\n }", "protected function _welcome()\n {\n $this->out('\n __ ____ _ _______ __\n / |/ (_)_________(_)___ ____ _ / ____(_) /__ _____\n / /|_/ / / ___/ ___/ / __ \\/ __ `/ / /_ / / / _ \\/ ___/\n / / / / (__ |__ ) / / / / /_/ / / __/ / / / __(__ )\n/_/ /_/_/____/____/_/_/ /_/\\__, / /_/ /_/_/\\___/____/\n /____/ ');\n }", "public function sendWelcomeMsg()\n\t{\n\t}", "protected function welcome()\n\t{\n\t\t$welcome = ' __ __ _ ' . PHP_EOL;\n\t\t$welcome .= ' | \\/ | __ _| | _____ ' . PHP_EOL;\n\t\t$welcome .= ' | |\\/| |/ _` | |/ / _ \\ ' . PHP_EOL;\n\t\t$welcome .= ' | | | | (_| | < (_) |' . PHP_EOL;\n\t\t$welcome .= ' |_| |_|\\__,_|_|\\_\\___/ (' . MAKO_VERSION . ')' . PHP_EOL;\n\n\t\t$welcome .= PHP_EOL . PHP_EOL;\n\n\t\t$welcome .= 'Welcome to the ' . $this->cli->color('Mako', 'green') . ' interactive console!' . PHP_EOL;\n\n\t\t$welcome .= PHP_EOL;\n\n\t\t$welcome .= 'Type ' . $this->cli->color('exit', 'yellow') . ' or ' . $this->cli->color('quit', 'yellow') . ' to exit.' . PHP_EOL;\n\n\t\t$this->cli->stdout($welcome);\n\t}", "function welcome() {\r\n\r\n return $this->render('welcome', array());\r\n }", "public static function welcomeMessage() : void\n {\n if (!file_exists(__DIR__ . '/../../.env.php')) {\n echo \"Heya, we think you are new. Let us spin up the frame work for you!..\";\n $request = self::requestInput('Do you want to continue?', ['(Y)es', '(N)o']);\n if ($request == 'yes' || $request == 'y') {\n $start = new \\Framework\\Commands\\Start\\Start;\n $start->start();\n exit();\n }\n echo \"=====================================\\n\";\n }\n echo \"Welcome to the command environment. Choose what you want to do, you have the following options: \\n\";\n foreach (self::$options as $option) {\n echo \"- $option \\n\";\n }\n }", "protected function welcome() {\n echo \"*****************\" . PHP_EOL .\n \"*** TicTacToe ***\" . PHP_EOL .\n \"*****************\" . PHP_EOL;\n $this->drawBoard(array(), true);\n echo \"[\" . self::QUIT_BUTTON . \"] - End game\" . PHP_EOL . PHP_EOL;\n }", "function index(){\n\t\techo 'welcome';\n\t}", "function welcome()\n{\n outputString(PHP_EOL.'To set up your Craft install, from your project directory, run:', Console::FG_YELLOW);\n $script = './craft setup';\n outputString(PHP_EOL.' '.$script, Console::FG_GREEN);\n outputString(PHP_EOL.'Then to set up custom settings, run:', Console::FG_YELLOW);\n $script = './marlo';\n outputString(PHP_EOL.' '.$script, Console::FG_GREEN);\n outputString(PHP_EOL.'Your setup is not complete until you run these two commands.', Console::FG_YELLOW);\n}", "protected function _welcome(){\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "function greeting(){\n\t\t\techo \"Idol ni Noli si Pong\";\n\t\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('hello');\n\t}", "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function welcome()\n {\n return view(\"Participant::welcome\");\n }", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function run()\n {\n $this->welcome();\n }", "public function welcome()\n {\n return view(\"PlayerMatch::welcome\");\n }", "function welcome_message_login()\n{\n\tglobal $SITEURL;\n\t$Feul = new Feul;\n\tif(isset($_SESSION['LoggedIn']))\n\t{\n\t\t$name = $_SESSION['Username'];\n\t\t//Display Welcome Message\n\t\t$welcome_box = '<div class=\"user_login_welcome_box_container\"><span class=\\\"user-login-welcome-label\\\">Добро пожаловать: </span>'.$name.'</div>';\n\n\t\t//Display Logout Link\n\t\t$logout_link = '<a href=\"'.$SITEURL.'?logout=yes\" class=\"user-login-logout-link\">Выйти</a>';\n\t\techo $Feul->getData('welcomebox').$welcome_box.$logout_link ;\n\t}\n}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function action_hello()\r\n\t{\r\n\t\treturn Response::forge(Presenter::forge('welcome/hello'));\r\n\t}", "public function action_hello()\n\t{\n\t\treturn Response::forge(Presenter::forge('welcome/hello'));\n\t}", "protected function _welcome() {\n\n }", "function showWelcome(){\n\t\n\t//get the user\n\t$user = getUser();\n\tif($user !== false && is_array($user) && count($user) > 0){\n\t\t$output = 'Hello '. $user['userEmail'] .'<br>';\n\t\t$output .= 'Your account has '. ($user['activated'] == false ? 'not ' : '') .'been activated.<br>';\n\t\t$output .= 'Your last activity was: '. $user['lastActivity'];\n\t\treturn $output;\n\t}\n\telse{\n\t\treturn \"Welcome to the site. Your account could not be retreived at this time.\";\n\t}\n\t\n}", "public function welcome()\n {\n return view('welcome', ['check' => Auth::check()]);\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('home.index');\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function welcomeAction() {\n $user_session = new Container('user');\n $username = $user_session->username; // $username now contains 'Andy0708'\n }", "public function showWelcome() {\n return View::make('hello');\n }", "public function showWelcome()\n\t{\n \n\t\treturn View::make('home');\n\t}", "public function welcome() {\n return !empty($this->args['send_welcome']);\n }", "public function index()\n {\n require_once 'view/welcome.php';\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "function METHOD_hello()\n {\n $this->sendTerminal('This is a Hello World :)');\n\n }", "public function showWelcome(){\n\t\treturn View::make('hello');\n\t}", "function print_home() {\n\techo '\n\t<p class=\"alert alert-info\">\n\t\tWelcome <b>'.$_SESSION['username']. '</b> you can\n\t\t<a href=\"play_trivia.php\">play trivia</a> or <a href=\"insert_question.php\">insert questions</a>. \n\t\tUse the main menu above to select additional options or to logout.\n\t</p>\n\t';\t\n}", "public function welcome()\n {\n $user = User::find(auth()->user()->id);\n return view('front.welcome', compact('user'));\n }", "public function showWelcome()\n\t{\n\t\t$this->layout->content = View::make('home');\n\t}", "public function getWelcome(){\n // berguna untuk debugging\n return response(\"Welcome\");\n }", "public function welcome()\n {\n return view('welcome');\n }", "public function welcome()\n {\n return view('welcome');\n }", "public function welcome()\n {\n return view('welcome');\n }", "public function welcome()\n {\n return view('welcome');\n }", "public function welcome()\n {\n return view('welcome');\n }", "public function sayHello(){\n return \"Hello World!\"; // baru mengembalikan nilai\n }", "public function showWelcome()\n\t{\n\t\treturn View::make('welcome.form');\n\t}", "public function showWelcome()\n\t{\n\n\t\t$mensaje = Session::get('message', null);\n\n\t\t$tipos = $this->getTipos();\n\t\t$estados = $this->getEstados();\n\n\t\treturn View::make('index', array('tipos' => $tipos, 'estados' => $estados, 'mensaje' => $mensaje));\n\t}", "public function winespace_welcome_getting_started() {\n\t\trequire_once( get_template_directory() . '/inc/admin/welcome-screen/sections/getting-started.php' );\n\t}", "protected function sendWelcomeMessage($myWords, $name, $user, $email, $password)\n {\n $path = $this->_context->ContextValue(\"SCRIPT_NAME\");\n $path = substr($path, 0, strrpos($path, \"/\") + 1);\n $url = $this->_context->ContextValue(\"SERVER_NAME\") . $path;\n $body = $myWords->ValueArgs(\"WELCOMEMESSAGE\", array($name, $this->_context->ContextValue(\"SERVER_NAME\"), $user, $password, $url . $this->_context->bindModuleUrl(\"UserProfile\")));\n\n Debug::PrintValue($user . \" - \" . $email . \" - \" . $password);\n\n // MailUtil::getEmailFromID($this->_context, \"DEFAULT\")\n // Alterei Aqui - Envio de Confirmacao\n MailUtil::Mail($this->_context, PanteonEscolarConsts::Contato, MailUtil::getFullEmailName($name, $email), $myWords->Value(\"SUBJECTMESSAGE\", $this->_context->ContextValue(\"SERVER_NAME\")), \"\", \"\", $body);\n }", "public static function welcome()\n {\n $initEvent = ask(\"\", array(\"choices\" => \"[ANY]\"));\n\n if (preg_match('/[0-9]{5}/i', $initEvent->value)) {\n BreweryMapUI::userZipEntry($initEvent);\n return;\n }\n\n $askOptions = array(\n 'onChoice' => 'BreweryMapUI::userZipEntry',\n 'onBadChoice' => 'BreweryMapUI::userBadChoice',\n 'choices' => '[5 DIGITS]',\n 'timeout' => self::MESSAGE_TIMEOUT,\n 'mode' => self::MODE,\n 'attempts' => self::ATTEMPTS,\n );\n\n $prompt = 'Welcome to BreweryMap.com, powered by PintLabs. ';\n\n if (INCOMING_NETWORK == 'SMS') {\n $prompt .= 'To search breweries in an area, text back a zip code:';\n } else {\n $prompt .= 'To search breweries in an area, IM back a zip code:';\n }\n\n $event = ask($prompt, $askOptions);\n }", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function test_welcome()\n {\n $this->get('/admin/home')\n ->assertStatus(200)\n ->assertSee('INICIO en el lado del administrador.');\n }", "public function route_home() {\n\t\techo '<h1>It wurks!</h1>';\n\t}", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function actionIndex($message = 'hello world') {\n\t\techo $message . \"\\n\";\n\t}", "public function welcome()\n {\n return view('pages.welcome');\n }", "public function welcome(){\n return view ('pages.welcome');\n }", "public function showWelcome()\n {\n $user = Auth::user();\n return view('index')->with('user', $user);\n }", "public function sayHello()\n {\n }", "public function actionIndex()\n\t{\n\t\techo 'Hello World';\n\t}", "public function index()\n {\n return view('main.welcome');\n }", "public function index() {\n \n return view('welcome');\n }", "public function welcome()\n {\n return $this->getView();\n }", "public function index() {\n\t\t$adm_uid = $this->session->userdata('adm_uid') ?: 0;\n\t\tif ($adm_uid) {\n\t\t\t$this->load->view('header');\n\t\t\t$this->load->view('welcome_message');\n\t\t\t$this->load->view('footer');\n\n\t\t} else {\n\t\t\tredirect(HOSTDOMAIN . '/welcome/login');\n\n\t\t}\n\n\t}", "function vgt_ui_welcome_page()\r\n\t{\r\n\r\n\t\t\r\n\t\techo '\r\n\t\t\t<div id=\"vgt_main_page\" class=\"container\">\r\n\t\t\t\t<div id=\"thankyou\">\r\n\t\t\t\t\t<h2>Thanks for using WP Lead Plus</h2>\r\n\t\t\t\t\t<p>We hope you enjoy the plugin. If you have any suggestion, request, please click the support icon at the top right of your screen to send us messages.</p>\r\n\t\t\t\t\t<p>We will get back to you soon</p>\r\n\t\t\t\t\t<p>The best way to get support is to check out the video tutorials, which are available <a target= \"_blank\" href=\"http://www.youtube.com/playlist?list=PL6rw2AEN42Eoyq6_ht0TA-SM55jUWU8m5\"><strong>here</strong></a></p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>';\r\n\t\t\r\n\t\t//include common code into the page\r\n\t\t\r\n\t\tinclude_once 'code/common.txt';\r\n\t}", "public function showWelcome()\n\t{\n\t\treturn View::make('events.soon');\n\t}", "function index()\n\t{\n\t\techo 'Welcome to image';\n\t}", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n {\n if (auth()->check()) {\n $user = auth()->user();\n \\Mail::to($user)->send(new Welcome($user));\n }\n return view('welcome');\n }", "public function actionIndex($message = 'hello world')\n {\n echo $message . \"\\n\";\n }", "public function actionIndex($message = 'hello world')\n {\n echo $message . \"\\n\";\n }", "public function actionIndex($message = 'hello world')\n {\n echo $message . \"\\n\";\n }", "public function actionIndex($message = 'hello world')\n {\n echo $message . \"\\n\";\n }" ]
[ "0.8491409", "0.8490609", "0.83503336", "0.8256459", "0.8073202", "0.7898419", "0.78819644", "0.7877349", "0.7402752", "0.7397987", "0.7281065", "0.7187813", "0.7142057", "0.7100268", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.7033364", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69360405", "0.69192153", "0.691297", "0.68799335", "0.6863674", "0.6858105", "0.68526846", "0.6847309", "0.6847309", "0.6833121", "0.68218195", "0.6801411", "0.6790311", "0.6779153", "0.66967344", "0.6671398", "0.66501904", "0.66312593", "0.6629673", "0.6622328", "0.65969473", "0.6587369", "0.6569099", "0.6564826", "0.65562767", "0.65396327", "0.6529134", "0.65128297", "0.64897984", "0.64871746", "0.64871746", "0.64871746", "0.64871746", "0.64871746", "0.64864093", "0.6474577", "0.6463868", "0.64477324", "0.6441333", "0.6435762", "0.643012", "0.643012", "0.6419551", "0.64174396", "0.6387757", "0.6374193", "0.63613474", "0.63440293", "0.63379544", "0.633448", "0.6333481", "0.62841797", "0.6279885", "0.62695783", "0.62675226", "0.62617135", "0.6247235", "0.624568", "0.62439066", "0.6238777", "0.622232", "0.6212523", "0.6212523", "0.6212523", "0.6212523" ]
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $user=User::find(Auth::user()->id); if($user->type=='enseignant'){ $a=$user->id; $cours=Cour::where('user_id','=',$a )->get(); //user(enseignant) associate with cours return view('teachers.index',['cours'=>$cours]); } else{ $request->session()->flash('etat', 'cette section est pour enseignant!'); return redirect()->back(); } }
{ "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 createRecored(Request $request) { $users=User::where('type','=','enseignant')->get();//enseignan $cours=Cour::all(); return view('teachers.createRecored',['users'=>$users],['cours'=>$cours]); }
{ "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
Show the form for creating a new resource.
public function associe(Request $request) { $this ->validate($request,[ 'cour'=>'required', 'tech'=>'required', ]); $ids=$request->input('cour'); $cours=Cour::find($ids); $user=User::find($request->input('tech')); $cour= new Cour(); $cour->intitule=$cours->intitule; $cour->user_id=$user->id; $cour->formation_id=$cours->formation_id; $cour->save(); $request->session()->flash('etat' , 'associe succucful!'); return redirect('/admin/user/enseignant'); }
{ "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
Display the specified resource.
public function show() { $users=User::find(Auth::user()->id); $cours=Cour::where('user_id', $users->id)->get(); return view('teachers.show',['cours'=>$cours]); }
{ "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. Liste des cours par enseignant
public function ListeensEignant() { $users=User::where('type','=','enseignant')->get(); return view('admin.ListeensEignant',['users'=>$users]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "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 }", "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()\r\n {\r\n return view('petro::edit');\r\n }", "public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function editarAction () {\n // Título da tela (action)\n $this->view->telaTitle = 'Editar Exercício Orçamentário';\n\n // Instancia a regra de negócio\n $negocio = new Orcamento_Business_Negocio_Exercicio();\n\n // Fase\n $fase = new Orcamento_Model_DbTable_FaseAnoExercicio();\n\n $formulario = new $this->_formulario ();\n $this->view->formulario = $formulario;\n\n // Verifica o tipo de requisição Get / Post\n if ($this->getRequest()->isGet()) {\n // Busca dados para o preenchimento do formulário\n $cod = $this->_getParam('cod');\n\n if ($cod) {\n // Busca registro específico\n $registro = $negocio->retornaRegistro($cod);\n\n if ($registro) {\n // TODO Remover a linha a seguir\n // $contrato = $this->_CeoTbAnoExercicio->retornaRegistro($cod);\n\n $camposChave = $negocio->chavePrimaria();\n\n foreach ($camposChave as $chave) {\n $formulario->$chave->setAttrib('readonly', true);\n }\n $formulario->populate($registro);\n } else {\n $this->registroNaoEncontrado();\n }\n\n $this->view->fase = $dadosfase = $fase->fetchRow(\"FANE_NR_ANO = $cod\");\n } else {\n $this->codigoNaoInformado();\n }\n } else {\n // Busca dados do formulário\n $dados = $this->getRequest()->getPost();\n $chavePrimaria = $this->_getParam('cod');\n\n if ($formulario->isValid($dados)) {\n\n $dados = $formulario->getValues();\n\n $resultado = $negocio->editarExercicioFase($dados);\n\n if ($dados['FANE_ID_FASE_EXERCICIO'] == Trf1_Orcamento_Definicoes::FASE_EXERCICIO_EM_EXECUCAO) {\n\n $negocio->copiaValores($dados);\n }\n\n if( !$resultado [ 'sucesso' ] ) {\n // inclui na tabela de log do orçamento\n $this->_logdados->incluirLog( $dados[\"ANOE_AA_ANO\"] );\n // Mensagem sucesso\n $this->_helper->flashMessenger ( array ( message => Orcamento_Business_Dados::MSG_ALTERAR_ERRO . '<br />' . $resultado [ 'msgErro' ] ) );\n }\n\n // Salvo com sucesso\n $this->_helper->flashMessenger(array(message => Orcamento_Business_Dados::MSG_SUCESSO_EXERCICIO, 'status' => 'success'));\n\n // Limpa o cache para listagem na index\n $negocio->excluiCaches();\n\n // Redireciona para o modulo\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 edit()\n {\n return view('hirmvc::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $Filiere = Filiere::all();\n \n $etudiant = Etudiant::find($id);\n \n return view('Etudiants.ModifierEtudiant')->with('etudiant',$etudiant)->with('Filiere',$Filiere);\n\n\n \n }", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "public function edit()\n\t {\n\t return view('lecturer.edit');\n\t }", "public function editar()\n {\n //Pega o id a partir da URL\n $id = $this->uri->segment(3);\n\n //Se o id for nulo, redireciona para a página inicial\n if(is_null($id))\n redirect();\n\n //Utitiliza o método getById para obter as informações da empresa\n $resultado = $this->EmpresasModel->getById($id);\n\n $dados['empresaid'] = $resultado; \n\n //Carrega a tela passando os dados da consulta\n $this->load->view(\"Empresas/altera\", $dados);\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('common::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\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 editAction() {}", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function edit($id)\n {\n $Secteur = Secteur::all();\n \n $Entreprise = Entreprise::find($id);\n \n\n \n return view('Entreprise.ModifierEntreprise')->with('Entreprise',$Entreprise)->with('Secteur',$Secteur);\n \n }", "public function edit(Requierement $requierement)\n {\n //\n }", "public function edit(Resena $resena)\n {\n //\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function edit($id_peminjaman)\n {\n //\n\n\n }", "public function edit(Revisi $revisi)\n {\n //\n }", "public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\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()\n {\n return view('panel.materiales.edit');\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }", "public function edit(Procedencia $procedencia)\n {\n //\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function action_editar() {\r\n\t\tif(!Session::instance()->GetUsuario())\r\n \treturn $this->redirect(\"/\");\r\n $links = new Model_Link();\r\n $template = View::factory(\"base/menu\");\r\n $template->set(\"usuario\", Session::instance()->GetUsuario());\r\n $template->set(\"links\", $links->ObtenerLinks(Session::instance()->GetUsuario()));\r\n\t\t/***************************************/\r\n\t\t$template->body = View::factory(\"compromiso/editar\");\r\n\t\t\r\n\t\t$compromisoId = $this->request->param('id');\r\n\t\t$compromiso = new Model_Compromiso($compromisoId);\r\n\t\t$template->body->set(\"compromiso\", $compromiso);\r\n\t\t$template->set(\"scripts\", $this->scripts);\r\n\t \t$template->set(\"styles\", $this->styles);\r\n\t\t\r\n\t\t$this->response->body($template);\r\n\t}", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function editarmiperfil()\n {\n return view('formularios.formulariousuario');\n }", "public function editAction()\n {\n $curriculumdocId = $this->getRequest()->getParam('id');\n $curriculumdoc = $this->_initCurriculumdoc();\n if ($curriculumdocId && !$curriculumdoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_curriculumdoc')->__('This curriculum doc no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getCurriculumdocData(true);\n if (!empty($data)) {\n $curriculumdoc->setData($data);\n }\n Mage::register('curriculumdoc_data', $curriculumdoc);\n $this->loadLayout();\n\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Training List'))\n ->_title(Mage::helper('bs_curriculumdoc')->__('Curriculum Documents'));\n if ($curriculumdoc->getId()) {\n $this->_title($curriculumdoc->getCdocName());\n } else {\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Add curriculum doc'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit($id_cliente){}", "public function edit()\n {\n $user = Auth::user();\n $id = $user->id;\n $usuario = Usuario::find($id);\n\n // Conseguir id del estudiante\n $id_estudiante = $usuario->estudiante->id;\n $estudiante = Estudiante::find($id_estudiante);\n\n return view('estudiante.edit', [\n 'generos' => $this->generos,\n 'estudiante' => $estudiante\n ]);\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function edit(Entrenador $entrenador)\n {\n //\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(resumenclinico $resumenclinico)\n {\n //\n }", "function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}", "public function editar(){\n\t\t\n\t\t$this->form_validation->set_rules('resposta', 'RESPOSTA', 'trim');\n\t\tif ($this->form_validation->run()==TRUE):\n\t\t$dados = elements(array('resposta'), $this->input->post());\n\t\t$this->Comentarios->do_update($dados, array('id_comentario'=>$this->input->post('idcomentario')));\n\t\tendif;\n\t\tset_tema('titulo', 'Resposta de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'editar'));\n\t\tload_template();\n\t}", "public function edit(Pengeluaran $pengeluaran)\n {\n //\n }", "public function edit(Empresa $empresa)\n {\n \n }", "public function actionEdit($id) { }", "public function edit($id_empresa)\n {\n $empresa=empresa::find($id_empresa);\n return view ('admin.empresa.edit', compact ('empresa'));\n }", "public function edit(Pendaftaran $pendaftaran)\n {\n //\n }", "public function edit($id)\n {\n if(Auth::user()->can('modificar_empresa')){\n $pjuridica = Juridica::find($id);\n $pjuridica->fecha_fundacion = date('d-m-Y', strtotime($pjuridica->fecha_fundacion));\n $telefono_fijo = '';\n $telefono_celular = '';\n foreach ($pjuridica->persona->telefonos as $telefono) {\n if ($telefono->tipo_telefono == 'fijo') {\n $telefono_fijo = $telefono->nro_telefono;\n }\n if ($telefono->tipo_telefono == 'celular') {\n $telefono_celular = $telefono->nro_telefono;\n }\n }\n $rubros_empresariales = Rubro_Empresarial::orderBy('id','ASC')\n ->where('estado','activo')->lists('nombre_rubro_empresarial','id');\n\n return view('in.empresas.edit')\n ->with('pjuridica',$pjuridica)\n ->with('telefono_fijo',$telefono_fijo)\n ->with('telefono_celular',$telefono_celular)\n ->with('rubros_empresariales',$rubros_empresariales);\n }else{\n return redirect()->route('sinpermisos.sinpermisos');\n }\n }", "public function edit(Faltante $faltante)\n {\n //\n }", "public function edit()\n {\n \n \n }", "public function edit()\n {\n $id = $_GET['id'];\n $encargo = Encargo::where('id',$id)->first();\n\n return view('encargo.edit', compact('encargo'));\n }", "public function edit($id)\n {\n //\n $dataventa = DocumentoCabecera::find($id);\n\n $this->authorize('update', $dataventa);\n\n //$datadetalle = DocumentoDetalle::find();\n $dataclient = Client::select(['id', 'nombre'])->orderby('nombre')->get();\n $datacategory = Category::select()->orderby('name')->get();\n return view('admin.venta.edit')->with(compact('dataclient', 'datacategory', 'dataventa'));\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 edit()\n {\n $user = Auth::user();\n $perfil = Perfil::find($user->perfil_id);\n if($user->perfil_id == null || !$perfil){\n return redirect()->route('app.registro');\n }\n return view('aplicacion.registro.frmRegistro', compact('user', 'perfil'))->with(['URL' => route('app.perfil.put', $user->perfil_id), 'method' => 'PUT']);\n }", "public function edit(Filiere $filiere)\n {\n return view('filiere.edit', compact('filiere')) ; \n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit(Feriado $feriado)\n {\n //\n }", "public function edit()\n {\n // get resources for display \n $website = Website::where('name','flooflix')->first();\n if (!is_null($website) && !empty($website)) {\n $page = Page::where('website_id', $website->id)->where('name','modifier_carte')->first();\n if(!is_null($page) && !empty($page)){\n $datas = $page->getResourcesToDisplayPage($page);\n } \n }else{\n return view('errors.404');\n }\n return view('Flooflix.forms.editBankCard', compact('datas'));\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Recomendacao $recomendacao)\n {\n //\n }", "public function edit(FakturReturBeliDetail $fakturReturBeliDetail)\n {\n //\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit(Comida $comida)\n {\n //\n }", "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 edit( )\r\n {\r\n //\r\n }", "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function edit($id)\n {\n $cuestionario = Cuestionario::find($id);\n return view('admin.cuestionarios.edit',compact('cuestionario'));//muestra el formulario \n }", "public function edit(Formulario $formulario)\n {\n $listDistritos=distrito::pluck('id','nombre');\n\n return view('dashboard.formularios.edit',[\"formulario\"=>$formulario,'listDistritos'=>$listDistritos]);\n }", "public function edit($idFamilia)\n {\n \n $familias = Familia::all();\n $ordens = Orden::find($idOrden);\n return view('familia.edit',compact('familias','ordens'));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(Frequencia $frequencia)\n {\n //\n }", "public function edit($id)\n {\n $etudient = Etudient::findOrFail($id);\n $filiers = Filier::all();\n $modules = Module::all();\n\n return view('etudient.update', [\n 'object'=>$etudient,\n 'filiers'=>$filiers,\n 'modules'=>$modules,\n ]);\n }", "public function edit($id_ejercicio)\n\t{\n\t\t//\n\t\treturn view('admin.ejercicios.createUpdate')->with('ejercicios', \\App\\Ejercicios::find($id_ejercicio));\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Equipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Tecnologia\\Equipo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n \n $flag = FALSE;\n $asignacion = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Asignacion')->find($id);\n \n if ($asignacion) {\n $flag = TRUE;\n }\n\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:edit.html.twig', array(\n 'entity' => $entity,\n 'asignacion' => $flag,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(PermohonanLab $permohonanLab)\n {\n //\n }", "public function edit($id)\n {\n return view('atividadescomplementares::edit');\n }", "public function edit(prodi $prodi)\n {\n //\n $fk = Fakultas::all();\n return view('JurusanView.jurusan-edit', compact('fk','prodi')); \n }", "public function edit(Asignatura $asignatura)\n {\n //\n }", "public function edit() {\n }", "public function edit($id)\n {\n $Tramite=Tramite::find($id);\n $solicitantes= Solicitante::all(); \n $catalogos= CatalogoTramite::all();\n $empleados= Empleado::all();\n $dependencias= Dependencia::all();\n\n $encontrado=false;\n if($Tramite->idEmpleado == null){\n $encontrado=true;\n }\n return view('Cruds.Tramite.edit', compact('Tramite','solicitantes','catalogos','empleados','dependencias','encontrado'));\n }", "public function edit($id)\n {\n return view(\"List.form\")->with('lis',ListPerson::findOrFail($id));\n }", "public function edit()\n {\n return view('permission::edit');\n }", "public function edit(Planodetrabalho $planodetrabalho)\n {\n //\n }", "public function edit(Prueva $prueva)\n {\n //\n }", "public function edit(InstitutoProcedencia $institutos_procedencia)\n {\n //\n }", "public function showEdit()\n {\n\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function edit(Laboratoire $laboratoire)\n {\n //\n }" ]
[ "0.74698323", "0.72590667", "0.7256674", "0.7249103", "0.7244557", "0.72331005", "0.7218824", "0.7205021", "0.7183253", "0.7183253", "0.7173318", "0.71565706", "0.7149606", "0.71446383", "0.7142805", "0.71403563", "0.71292424", "0.7118199", "0.7111094", "0.708804", "0.7079086", "0.70610905", "0.70591223", "0.70449245", "0.70418936", "0.7041675", "0.70396674", "0.7039372", "0.7026624", "0.70207995", "0.7014612", "0.7014612", "0.7014287", "0.7010298", "0.7008271", "0.70075595", "0.7000775", "0.69979656", "0.69903666", "0.6988287", "0.6973367", "0.697317", "0.6971158", "0.6970206", "0.6966497", "0.6965017", "0.6963358", "0.6949903", "0.6948851", "0.6945542", "0.6941287", "0.6940052", "0.69388777", "0.69343114", "0.6932595", "0.69260806", "0.69213593", "0.69212604", "0.691076", "0.69067955", "0.689985", "0.6899372", "0.689395", "0.6893194", "0.6890133", "0.68888515", "0.6888111", "0.6887167", "0.68835706", "0.6882951", "0.6882951", "0.68827677", "0.68815637", "0.68806636", "0.68795484", "0.6876541", "0.6872648", "0.68717146", "0.68662983", "0.6857693", "0.68542445", "0.6841745", "0.6837433", "0.68347895", "0.6834429", "0.68327", "0.68321747", "0.683148", "0.6829424", "0.6828869", "0.68251157", "0.6818898", "0.68186665", "0.68172926", "0.6816048", "0.6815224", "0.68137974", "0.6813447", "0.6813044", "0.6810755", "0.68107086" ]
0.0
-1
Show the form for editing the specified resource. Liste des cours par enseignant
public function ListeensEignantA(Request $request){ $this ->validate($request,[ 'user'=>'required', ]); $uid=$request->input('user'); $cours=Cour::where('user_id','=',$uid )->get(); //user(enseignant) associate with cours return view('admin.show',['cours'=>$cours]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction() {\n $model = new Application_Model_Compromisso();\n //busco no banco o quem eu quero editar\n $comp = $model->find($this->_getParam('id'));\n // renderiso uma view com os dados\n $this->view->assign(\"compromisso\", $comp);\n }", "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 }", "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()\r\n {\r\n return view('petro::edit');\r\n }", "public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function editarAction () {\n // Título da tela (action)\n $this->view->telaTitle = 'Editar Exercício Orçamentário';\n\n // Instancia a regra de negócio\n $negocio = new Orcamento_Business_Negocio_Exercicio();\n\n // Fase\n $fase = new Orcamento_Model_DbTable_FaseAnoExercicio();\n\n $formulario = new $this->_formulario ();\n $this->view->formulario = $formulario;\n\n // Verifica o tipo de requisição Get / Post\n if ($this->getRequest()->isGet()) {\n // Busca dados para o preenchimento do formulário\n $cod = $this->_getParam('cod');\n\n if ($cod) {\n // Busca registro específico\n $registro = $negocio->retornaRegistro($cod);\n\n if ($registro) {\n // TODO Remover a linha a seguir\n // $contrato = $this->_CeoTbAnoExercicio->retornaRegistro($cod);\n\n $camposChave = $negocio->chavePrimaria();\n\n foreach ($camposChave as $chave) {\n $formulario->$chave->setAttrib('readonly', true);\n }\n $formulario->populate($registro);\n } else {\n $this->registroNaoEncontrado();\n }\n\n $this->view->fase = $dadosfase = $fase->fetchRow(\"FANE_NR_ANO = $cod\");\n } else {\n $this->codigoNaoInformado();\n }\n } else {\n // Busca dados do formulário\n $dados = $this->getRequest()->getPost();\n $chavePrimaria = $this->_getParam('cod');\n\n if ($formulario->isValid($dados)) {\n\n $dados = $formulario->getValues();\n\n $resultado = $negocio->editarExercicioFase($dados);\n\n if ($dados['FANE_ID_FASE_EXERCICIO'] == Trf1_Orcamento_Definicoes::FASE_EXERCICIO_EM_EXECUCAO) {\n\n $negocio->copiaValores($dados);\n }\n\n if( !$resultado [ 'sucesso' ] ) {\n // inclui na tabela de log do orçamento\n $this->_logdados->incluirLog( $dados[\"ANOE_AA_ANO\"] );\n // Mensagem sucesso\n $this->_helper->flashMessenger ( array ( message => Orcamento_Business_Dados::MSG_ALTERAR_ERRO . '<br />' . $resultado [ 'msgErro' ] ) );\n }\n\n // Salvo com sucesso\n $this->_helper->flashMessenger(array(message => Orcamento_Business_Dados::MSG_SUCESSO_EXERCICIO, 'status' => 'success'));\n\n // Limpa o cache para listagem na index\n $negocio->excluiCaches();\n\n // Redireciona para o modulo\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 edit()\n {\n return view('hirmvc::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $Filiere = Filiere::all();\n \n $etudiant = Etudiant::find($id);\n \n return view('Etudiants.ModifierEtudiant')->with('etudiant',$etudiant)->with('Filiere',$Filiere);\n\n\n \n }", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "public function edit()\n\t {\n\t return view('lecturer.edit');\n\t }", "public function editar()\n {\n //Pega o id a partir da URL\n $id = $this->uri->segment(3);\n\n //Se o id for nulo, redireciona para a página inicial\n if(is_null($id))\n redirect();\n\n //Utitiliza o método getById para obter as informações da empresa\n $resultado = $this->EmpresasModel->getById($id);\n\n $dados['empresaid'] = $resultado; \n\n //Carrega a tela passando os dados da consulta\n $this->load->view(\"Empresas/altera\", $dados);\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('common::edit');\n }", "public function edit()\n {\n return view('admincp::edit');\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 editAction() {}", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function edit($id)\n {\n $Secteur = Secteur::all();\n \n $Entreprise = Entreprise::find($id);\n \n\n \n return view('Entreprise.ModifierEntreprise')->with('Entreprise',$Entreprise)->with('Secteur',$Secteur);\n \n }", "public function edit(Requierement $requierement)\n {\n //\n }", "public function edit(Resena $resena)\n {\n //\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "public function edit($id_peminjaman)\n {\n //\n\n\n }", "public function edit(Revisi $revisi)\n {\n //\n }", "public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\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()\n {\n return view('panel.materiales.edit');\n }", "public function edit(incidencia $incidencia)\n {\n //\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }", "public function edit(Procedencia $procedencia)\n {\n //\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function action_editar() {\r\n\t\tif(!Session::instance()->GetUsuario())\r\n \treturn $this->redirect(\"/\");\r\n $links = new Model_Link();\r\n $template = View::factory(\"base/menu\");\r\n $template->set(\"usuario\", Session::instance()->GetUsuario());\r\n $template->set(\"links\", $links->ObtenerLinks(Session::instance()->GetUsuario()));\r\n\t\t/***************************************/\r\n\t\t$template->body = View::factory(\"compromiso/editar\");\r\n\t\t\r\n\t\t$compromisoId = $this->request->param('id');\r\n\t\t$compromiso = new Model_Compromiso($compromisoId);\r\n\t\t$template->body->set(\"compromiso\", $compromiso);\r\n\t\t$template->set(\"scripts\", $this->scripts);\r\n\t \t$template->set(\"styles\", $this->styles);\r\n\t\t\r\n\t\t$this->response->body($template);\r\n\t}", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function editarmiperfil()\n {\n return view('formularios.formulariousuario');\n }", "public function editAction()\n {\n $curriculumdocId = $this->getRequest()->getParam('id');\n $curriculumdoc = $this->_initCurriculumdoc();\n if ($curriculumdocId && !$curriculumdoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_curriculumdoc')->__('This curriculum doc no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getCurriculumdocData(true);\n if (!empty($data)) {\n $curriculumdoc->setData($data);\n }\n Mage::register('curriculumdoc_data', $curriculumdoc);\n $this->loadLayout();\n\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Training List'))\n ->_title(Mage::helper('bs_curriculumdoc')->__('Curriculum Documents'));\n if ($curriculumdoc->getId()) {\n $this->_title($curriculumdoc->getCdocName());\n } else {\n $this->_title(Mage::helper('bs_curriculumdoc')->__('Add curriculum doc'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit($id_cliente){}", "public function edit()\n {\n $user = Auth::user();\n $id = $user->id;\n $usuario = Usuario::find($id);\n\n // Conseguir id del estudiante\n $id_estudiante = $usuario->estudiante->id;\n $estudiante = Estudiante::find($id_estudiante);\n\n return view('estudiante.edit', [\n 'generos' => $this->generos,\n 'estudiante' => $estudiante\n ]);\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "public function edit(Entrenador $entrenador)\n {\n //\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(resumenclinico $resumenclinico)\n {\n //\n }", "function edit(){\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t$data['arr'] = $arr['id'];\n\t\t\n\t\t/* membuat value */\n\t\t$this->user->setID($arr['id']);\n\n\t\t/* fungsi ambil data */\n\t\t$result = $this->user->ambil_data();\n\n\t\t/* data dropdown */\n\t\t$data['role'] = role_dropdown();\n\t\t$data['result'] = $result;\n\n\t\t/* load view */\n\t\t$this->template->write_view('edit', $data);\n\t}", "public function editar(){\n\t\t\n\t\t$this->form_validation->set_rules('resposta', 'RESPOSTA', 'trim');\n\t\tif ($this->form_validation->run()==TRUE):\n\t\t$dados = elements(array('resposta'), $this->input->post());\n\t\t$this->Comentarios->do_update($dados, array('id_comentario'=>$this->input->post('idcomentario')));\n\t\tendif;\n\t\tset_tema('titulo', 'Resposta de Coment&aacute;rio');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'editar'));\n\t\tload_template();\n\t}", "public function edit(Pengeluaran $pengeluaran)\n {\n //\n }", "public function edit(Empresa $empresa)\n {\n \n }", "public function actionEdit($id) { }", "public function edit($id_empresa)\n {\n $empresa=empresa::find($id_empresa);\n return view ('admin.empresa.edit', compact ('empresa'));\n }", "public function edit(Pendaftaran $pendaftaran)\n {\n //\n }", "public function edit($id)\n {\n if(Auth::user()->can('modificar_empresa')){\n $pjuridica = Juridica::find($id);\n $pjuridica->fecha_fundacion = date('d-m-Y', strtotime($pjuridica->fecha_fundacion));\n $telefono_fijo = '';\n $telefono_celular = '';\n foreach ($pjuridica->persona->telefonos as $telefono) {\n if ($telefono->tipo_telefono == 'fijo') {\n $telefono_fijo = $telefono->nro_telefono;\n }\n if ($telefono->tipo_telefono == 'celular') {\n $telefono_celular = $telefono->nro_telefono;\n }\n }\n $rubros_empresariales = Rubro_Empresarial::orderBy('id','ASC')\n ->where('estado','activo')->lists('nombre_rubro_empresarial','id');\n\n return view('in.empresas.edit')\n ->with('pjuridica',$pjuridica)\n ->with('telefono_fijo',$telefono_fijo)\n ->with('telefono_celular',$telefono_celular)\n ->with('rubros_empresariales',$rubros_empresariales);\n }else{\n return redirect()->route('sinpermisos.sinpermisos');\n }\n }", "public function edit(Faltante $faltante)\n {\n //\n }", "public function edit()\n {\n \n \n }", "public function edit()\n {\n $id = $_GET['id'];\n $encargo = Encargo::where('id',$id)->first();\n\n return view('encargo.edit', compact('encargo'));\n }", "public function edit($id)\n {\n //\n $dataventa = DocumentoCabecera::find($id);\n\n $this->authorize('update', $dataventa);\n\n //$datadetalle = DocumentoDetalle::find();\n $dataclient = Client::select(['id', 'nombre'])->orderby('nombre')->get();\n $datacategory = Category::select()->orderby('name')->get();\n return view('admin.venta.edit')->with(compact('dataclient', 'datacategory', 'dataventa'));\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 edit()\n {\n $user = Auth::user();\n $perfil = Perfil::find($user->perfil_id);\n if($user->perfil_id == null || !$perfil){\n return redirect()->route('app.registro');\n }\n return view('aplicacion.registro.frmRegistro', compact('user', 'perfil'))->with(['URL' => route('app.perfil.put', $user->perfil_id), 'method' => 'PUT']);\n }", "public function edit(Filiere $filiere)\n {\n return view('filiere.edit', compact('filiere')) ; \n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit(Normativa $normativa)\n {\n //\n }", "public function edit(Feriado $feriado)\n {\n //\n }", "public function edit()\n {\n // get resources for display \n $website = Website::where('name','flooflix')->first();\n if (!is_null($website) && !empty($website)) {\n $page = Page::where('website_id', $website->id)->where('name','modifier_carte')->first();\n if(!is_null($page) && !empty($page)){\n $datas = $page->getResourcesToDisplayPage($page);\n } \n }else{\n return view('errors.404');\n }\n return view('Flooflix.forms.editBankCard', compact('datas'));\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Incidencia $incidencia)\n {\n //\n }", "public function edit(Recomendacao $recomendacao)\n {\n //\n }", "public function edit(FakturReturBeliDetail $fakturReturBeliDetail)\n {\n //\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit(Comida $comida)\n {\n //\n }", "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 edit( )\r\n {\r\n //\r\n }", "public function editar ()\n {\n try {\n // Define a ação de editar\n $acao = Orcamento_Business_Dados::ACTION_EDITAR;\n \n if ( $this->_requisicao->isGet () ) {\n // Retorna parâmetros informados via get, após validações\n $parametros = $this->trataParametroGet ( 'cod' );\n \n // Busca os dados a exibir, após validações\n $registro = $this->trataRegistro ( $acao, $parametros );\n \n // Cria o formulário populado com os dados\n $formulario = $this->popularFormulario ( $acao, $registro );\n \n // Faz transformações no formulário, se necessário\n $formulario = $this->transformaFormulario ( $formulario, $acao );\n \n // Bloqueia a edição de campos de chave primária (ou composta)\n $this->bloqueiaCamposChave ( $formulario );\n \n // Bloqueia todos os campos\n $this->bloqueiaCamposTodos ( $acao, $formulario, $registro );\n \n // Exibe o formulário\n $this->view->formulario = $formulario;\n } else {\n // Cria o formulário vazio\n $formulario = $this->retornaFormulario ( $acao );\n \n // Grava o novo registro\n $this->gravaDados ( $acao, $formulario );\n }\n } catch ( Exception $e ) {\n // Gera o erro\n throw new Zend_Exception ( $e->getMessage () );\n }\n }", "public function edit($id)\n {\n $cuestionario = Cuestionario::find($id);\n return view('admin.cuestionarios.edit',compact('cuestionario'));//muestra el formulario \n }", "public function edit(Formulario $formulario)\n {\n $listDistritos=distrito::pluck('id','nombre');\n\n return view('dashboard.formularios.edit',[\"formulario\"=>$formulario,'listDistritos'=>$listDistritos]);\n }", "public function edit($idFamilia)\n {\n \n $familias = Familia::all();\n $ordens = Orden::find($idOrden);\n return view('familia.edit',compact('familias','ordens'));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(Frequencia $frequencia)\n {\n //\n }", "public function edit($id)\n {\n $etudient = Etudient::findOrFail($id);\n $filiers = Filier::all();\n $modules = Module::all();\n\n return view('etudient.update', [\n 'object'=>$etudient,\n 'filiers'=>$filiers,\n 'modules'=>$modules,\n ]);\n }", "public function edit($id_ejercicio)\n\t{\n\t\t//\n\t\treturn view('admin.ejercicios.createUpdate')->with('ejercicios', \\App\\Ejercicios::find($id_ejercicio));\n\t}", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Equipo')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Tecnologia\\Equipo entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n \n $flag = FALSE;\n $asignacion = $em->getRepository('CorresponsaliaBundle:Tecnologia\\Asignacion')->find($id);\n \n if ($asignacion) {\n $flag = TRUE;\n }\n\n return $this->render('CorresponsaliaBundle:Tecnologia/Equipo:edit.html.twig', array(\n 'entity' => $entity,\n 'asignacion' => $flag,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit(PermohonanLab $permohonanLab)\n {\n //\n }", "public function edit($id)\n {\n return view('atividadescomplementares::edit');\n }", "public function edit(prodi $prodi)\n {\n //\n $fk = Fakultas::all();\n return view('JurusanView.jurusan-edit', compact('fk','prodi')); \n }", "public function edit(Asignatura $asignatura)\n {\n //\n }", "public function edit() {\n }", "public function edit($id)\n {\n $Tramite=Tramite::find($id);\n $solicitantes= Solicitante::all(); \n $catalogos= CatalogoTramite::all();\n $empleados= Empleado::all();\n $dependencias= Dependencia::all();\n\n $encontrado=false;\n if($Tramite->idEmpleado == null){\n $encontrado=true;\n }\n return view('Cruds.Tramite.edit', compact('Tramite','solicitantes','catalogos','empleados','dependencias','encontrado'));\n }", "public function edit($id)\n {\n return view(\"List.form\")->with('lis',ListPerson::findOrFail($id));\n }", "public function edit()\n {\n return view('permission::edit');\n }", "public function edit(Planodetrabalho $planodetrabalho)\n {\n //\n }", "public function edit(Prueva $prueva)\n {\n //\n }", "public function edit(InstitutoProcedencia $institutos_procedencia)\n {\n //\n }", "public function showEdit()\n {\n\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function edit(Laboratoire $laboratoire)\n {\n //\n }" ]
[ "0.74698323", "0.72590667", "0.7256674", "0.7249103", "0.7244557", "0.72331005", "0.7218824", "0.7205021", "0.7183253", "0.7183253", "0.7173318", "0.71565706", "0.7149606", "0.71446383", "0.7142805", "0.71403563", "0.71292424", "0.7118199", "0.7111094", "0.708804", "0.7079086", "0.70610905", "0.70591223", "0.70449245", "0.70418936", "0.7041675", "0.70396674", "0.7039372", "0.7026624", "0.70207995", "0.7014612", "0.7014612", "0.7014287", "0.7010298", "0.7008271", "0.70075595", "0.7000775", "0.69979656", "0.69903666", "0.6988287", "0.6973367", "0.697317", "0.6971158", "0.6970206", "0.6966497", "0.6965017", "0.6963358", "0.6949903", "0.6948851", "0.6945542", "0.6941287", "0.6940052", "0.69388777", "0.69343114", "0.6932595", "0.69260806", "0.69213593", "0.69212604", "0.691076", "0.69067955", "0.689985", "0.6899372", "0.689395", "0.6893194", "0.6890133", "0.68888515", "0.6888111", "0.6887167", "0.68835706", "0.6882951", "0.6882951", "0.68827677", "0.68815637", "0.68806636", "0.68795484", "0.6876541", "0.6872648", "0.68717146", "0.68662983", "0.6857693", "0.68542445", "0.6841745", "0.6837433", "0.68347895", "0.6834429", "0.68327", "0.68321747", "0.683148", "0.6829424", "0.6828869", "0.68251157", "0.6818898", "0.68186665", "0.68172926", "0.6816048", "0.6815224", "0.68137974", "0.6813447", "0.6813044", "0.6810755", "0.68107086" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\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 // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the application dashboard.
public function index() { $inventory = UserRoleModel::where('role_name','inventory')->get(); $accounts = UserRoleModel::where('role_name','account')->get(); $departments = UserRoleModel::where('role_name','department')->get(); $centers = UserRoleModel::where('role_name','center')->get(); $doctors = UserRoleModel::where('role_name','doctor')->get(); $roles_data = array( 'inventory' => $inventory, 'account' => $accounts, 'department' => $departments, 'center' => $centers, 'doctor' => $doctors, ); return view('globals.index',compact('roles_data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Builds the TemporaryVirtualFileSystem instance.
public function __construct() { $this->rootDir = '/tmp'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function createTempDir()\n {\n self::$root = vfsStream::setup('root');\n\n return vfsStream::url('root') . DIRECTORY_SEPARATOR;\n }", "function __construct()\n {\n $this->setTemporaryDirectory(sys_get_temp_dir());\n }", "private function createTemporaryFile()\n {\n return $this->temp[] = tempnam(sys_get_temp_dir(), 'sqon-');\n }", "protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }", "private function getTempDir()\n {\n if ($this->tempDir === false) {\n exec('mktemp -d', $output, $return);\n\n if ($return != 0 || count($output) == 0) {\n throw new RuntimeException('Unable to create temporary directory');\n }\n\n $this->tempDir = $output[0];\n\n if ($this->tempDir[-1] !== '/') {\n $this->tempDir .= '/';\n }\n\n // Copy the invoice into that directory\n copy(\n __DIR__ . '/../../dist/invoice.cls',\n $this->tempDir . 'invoice.cls'\n );\n }\n\n return $this->tempDir;\n }", "protected function createDirectoryForTemporaryFiles(): void\n\t{\n\t\tif (! $this->filesystem->isDirectory(storage_path('tmp'))) {\n\t\t\t$this->filesystem->makeDirectory(storage_path('tmp'));\n\t\t}\n\t}", "public static function getTempFolder() {\r\n\t\t// use tmp folder in document root by default\r\n\t\tif (!empty($_SERVER['DOCUMENT_ROOT'])) {\r\n\t\t\tif (strpos($_SERVER['DOCUMENT_ROOT'], 'strato') !== false) {\r\n\t\t\t\t// strato bugfix\r\n\t\t\t\t// create tmp folder in document root automatically\r\n\t\t\t\tif (!@file_exists($_SERVER['DOCUMENT_ROOT'].'/tmp')) {\r\n\t\t\t\t\t@mkdir($_SERVER['DOCUMENT_ROOT'].'/tmp/', 0777);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tself::makeWritable($_SERVER['DOCUMENT_ROOT'].'/tmp/');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (SystemException $e) {}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (@file_exists($_SERVER['DOCUMENT_ROOT'].'/tmp') && @is_writable($_SERVER['DOCUMENT_ROOT'].'/tmp')) {\r\n\t\t\t\treturn $_SERVER['DOCUMENT_ROOT'].'/tmp/';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($_ENV['TMP']) && @is_writable($_ENV['TMP'])) {\r\n\t\t\treturn $_ENV['TMP'] . '/';\r\n\t\t}\r\n\t\tif (isset($_ENV['TEMP']) && @is_writable($_ENV['TEMP'])) {\r\n\t\t\treturn $_ENV['TEMP'] . '/';\r\n\t\t}\r\n\t\tif (isset($_ENV['TMPDIR']) && @is_writable($_ENV['TMPDIR'])) {\r\n\t\t\treturn $_ENV['TMPDIR'] . '/';\r\n\t\t}\r\n\t\t\r\n\t\tif (($path = ini_get('upload_tmp_dir')) && @is_writable($path)) {\r\n\t\t\treturn $path . '/';\r\n\t\t}\r\n\t\tif (@file_exists('/tmp/') && @is_writable('/tmp/')) {\r\n\t\t\treturn '/tmp/';\r\n\t\t}\r\n\t\tif (function_exists('session_save_path') && ($path = session_save_path()) && @is_writable($path)) {\r\n\t\t\treturn $path . '/';\r\n\t\t}\r\n\t\t\r\n\t\t$path = INSTALL_SCRIPT_DIR.'tmp/';\r\n\t\tif (@file_exists($path) && @is_writable($path)) {\r\n\t\t\treturn $path;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new SystemException('There is no access to the system temporary folder due to an unknown reason and no user specific temporary folder exists in '.INSTALL_SCRIPT_DIR.'! This is a misconfiguration of your webserver software! Please create a folder called '.$path.' using your favorite ftp program, make it writable and then retry this installation.');\r\n\t\t}\r\n\t}", "protected function createTempFile()\n {\n $tempFile = GeneralUtility::tempnam($this->tempFilePrefix);\n\n if (!$this->isRegisteredShutdownFunction) {\n register_shutdown_function([$this, 'unlinkTempFiles']);\n $this->isRegisteredShutdownFunction = true;\n }\n\n return $tempFile;\n }", "public function temp()\n\t\t{\n\t\t\tif ($this->is_cached()) {\n\t\t\t\tself::put($this->get_path_temp(), $this->get_content());\n\t\t\t} else {\n\t\t\t\tif ($this->exists()) {\n\t\t\t\t\t$this->copy($this->get_path_temp());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->update_attrs(array(\n\t\t\t\t\"name\" => basename($this->get_path_temp()),\n\t\t\t\t\"path\" => dirname($this->get_path_temp()),\n\t\t\t\t\"temp\" => true,\n\t\t\t));\n\n\t\t\treturn $this;\n\t\t}", "public function __construct(Filesystem $filesystem){\n\t\t$this->filesystem = $filesystem;\n\t\t$this->createDirectoryForTemporaryFiles();\n\t\t$this->fpdi = new Fpdi();\n\t\t$this->tmpFiles = collect([]);\n\t\t$this->files = collect([]);\n\t}", "function getUploadedFilesTemporaryPath()\n\t{\n\t\tif (!Queues::$uploadsTempDir) {\n\t\t\tQueues::$uploadsTempDir = Environment::expand(\"%tempDir%\" . DIRECTORY_SEPARATOR . \"uploads-MFU\");\n\t\t}\n\n\t\tif (!file_exists(Queues::$uploadsTempDir)) {\n\t\t\tmkdir(Queues::$uploadsTempDir, 0777, true);\n\t\t}\n\n\t\tif (!is_writable(Queues::$uploadsTempDir)) {\n\t\t\tQueues::$uploadsTempDir = Environment::expand(\"%tempDir%\");\n\t\t}\n\n\t\tif (!is_writable(Queues::$uploadsTempDir)) {\n\t\t\tthrow new InvalidStateException(\"Directory for temp files is not writable!\");\n\t\t}\n\n\t\treturn Queues::$uploadsTempDir;\n\t}", "public static function getTemporaryPath()\n {\n if (is_gae_std() || env('GAE_CACHEFS')) {\n return 'cachefs://'.gae_project().'/'.gae_service().'/'.gae_version();\n } else {\n return '/tmp/laravel/storage';\n }\n }", "public static function getTempDir() {}", "public function getTemporaryFile()\n {\n return $this->files[] = new TemporaryFile($this);\n }", "private function createTemporaryFileManager($mode = 'w+')\n {\n return new File($this->createTemporaryFile(), $mode);\n }", "public static function temp(): Directory\n {\n $resource = tmpfile();\n $path = stream_get_meta_data($resource)['uri'];\n\n return new static(dirname($path));\n }", "private function createEnvironment() {\n\t\t$this->cache_folder = dirname(__FILE__) . \"/\" . $this->cache_folder;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($this->cache_folder))\n\t\t\tmkdir($this->cache_folder);\n\n\t\t// Get the index file path\n\t\t$indexFilepath = $this->cache_folder . \"/\" . $this->cache_index;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($indexFilepath))\n\t\t\ttouch($indexFilepath);\n\t}", "public function make()\n {\n return new FileStore(\n Paths::filePaths($this->paths, $this->names),\n $this->shortCircuit,\n $this->fileEncoding\n );\n }", "public function createContainer()\n\t{\n\t\tif ($cacheDir = $this->getCacheDirectory()) {\n\t\t\t$cache = new Cache(new Nette\\Caching\\Storages\\PhpFileStorage($cacheDir), 'Nette.Configurator');\n\t\t\t$cacheKey = array($this->parameters, $this->files);\n\t\t\t$cached = $cache->load($cacheKey);\n\t\t\tif (!$cached) {\n\t\t\t\t$code = $this->buildContainer($dependencies);\n\t\t\t\t$cache->save($cacheKey, $code, array(\n\t\t\t\t\tCache::FILES => $this->parameters['productionMode'] ? NULL : $dependencies,\n\t\t\t\t));\n\t\t\t\t$cached = $cache->load($cacheKey);\n\t\t\t}\n\t\t\tNette\\Utils\\LimitedScope::load($cached['file'], TRUE);\n\n\t\t} elseif ($this->files) {\n\t\t\tthrow new Nette\\InvalidStateException(\"Set path to temporary directory using setTempDirectory().\");\n\n\t\t} else {\n\t\t\tNette\\Utils\\LimitedScope::evaluate($this->buildContainer()); // back compatibility with Environment\n\t\t}\n\n\t\t$container = new $this->parameters['container']['class'];\n\t\t$container->initialize();\n\t\tNette\\Environment::setContext($container); // back compatibility\n\t\treturn $container;\n\t}", "protected function makeTemporaryFile(): string\n {\n return DIRECTORY_SEPARATOR . trim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) .\n DIRECTORY_SEPARATOR . ltrim(uniqid('epp', true), DIRECTORY_SEPARATOR);\n }", "public function __construct()\n {\n $this->tempDirectories = array(\n 'main' => PATH_site . 'typo3temp/razor/',\n 'cache' => PATH_site . 'typo3temp/razor/Temp/',\n );\n }", "static function _getTempDir()\n {\n }", "public function set_temp_dir() {\n\t\t$this->temp_dir = tempnam( $this->sys_temp_dir, \"RTV\" );\n\t\tunlink( $this->temp_dir );\n\t\tmkdir( $this->temp_dir );\n\t\techo \"Temporary dir: {$this->temp_dir}\" . PHP_EOL;\n\t}", "public static function GetSystemTmpDir ();", "public static function temporaryFilesDirectory() {\n if (!static::isInstalled()) {\n return static::temporaryFilesDirectoryFallback();\n }\n\n $status = static::parseStatus();\n $path = $status->get('temp');\n\n if (empty($path)) {\n throw new \\Exception(__CLASS__ . ' - Unable to determine temporary files directory.');\n }\n\n return $path;\n }", "function _initTmp()\n {\n $this->_tmpfile = @tempnam($this->_tmpdir, 'mailfilter' . preg_replace('/\\\\\\/', '_', get_class($this)) . '.');\n $this->_tmpfh = @fopen($this->_tmpfile, \"w\");\n if( !$this->_tmpfh ) {\n $msg = $php_errormsg;\n return $this->_pear->raiseError(sprintf(_(\"Error: Could not open %s for writing: %s\"),\n $this->_tmpfile, $msg),\n OUT_LOG | EX_IOERR);\n }\n\n register_shutdown_function(array($this, '_cleanupTmp'));\n }", "private static function tmpDir(){\n return HOMEPATH . TMP;\n }", "public function createFileSystemMock(MutationInterface2 $mutation);", "public function getTemporaryUploadRootDir()\n {\n return __DIR__.'/../../../../web/uploads/temporary';\n }", "protected function tempPath() {\n if ($nonce = $this->getNonce()) {\n return sys_get_temp_dir() . DIRECTORY_SEPARATOR . $nonce;\n }\n }", "protected static function createBaseTcaCacheFile() {}", "function _create_tmp_table()\n {\n //$this->tmp_search_table = (string)'_'.$GLOBALS['B']->util->unique_crc32();\n $this->tmp_search_table = \"earchvetmp\";\n $sql = \"CREATE TEMPORARY TABLE {$this->tmp_search_table} (mid INT NOT NULL default 0)\";\n \n $result = $GLOBALS['B']->db->query($sql);\n \n if (DB::isError($result)) \n {\n trigger_error($result->getMessage().\"\\n\\nSQL: \".$sql.\"\\n\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\n return FALSE;\n }\n }", "protected function writeTempFile(): string\n {\n $filepath = rtrim($this->getTempFolder(), DIRECTORY_SEPARATOR);\n\n if (!is_dir($filepath)) {\n if (false === @mkdir($filepath, 0777, true) && !is_dir($filepath)) {\n throw new RuntimeException(sprintf(\"Unable to create directory: %s\\n\", $filepath));\n }\n } elseif (!is_writable($filepath)) {\n throw new RuntimeException(sprintf(\"Unable to write in directory: %s\\n\", $filepath));\n }\n\n $filename = $filepath . DIRECTORY_SEPARATOR . uniqid('chrome2pdf_', true) . '.html';\n\n file_put_contents($filename, $this->content);\n\n return $filename;\n }", "protected function getTempFolderPath() {}", "protected function getSession_Storage_FilesystemService()\n {\n return $this->services['session.storage.filesystem'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage((__DIR__.'/sessions'), 'MOCKSESSID', ${($_ = isset($this->services['session.storage.metadata_bag']) ? $this->services['session.storage.metadata_bag'] : $this->getSession_Storage_MetadataBagService()) && false ?: '_'});\n }", "public function tmpDir(): string\n {\n return $this->root.'/var/tmp';\n }", "protected function createRealTestdir() {}", "protected function _initFilesystem() {\n $this->_createWriteableDir($this->getTargetDir());\n $this->_createWriteableDir($this->getQuoteTargetDir());\n\n // Directory listing and hotlink secure\n $io = new Varien_Io_File();\n $io->cd($this->getTargetDir());\n if (!$io->fileExists($this->getTargetDir() . DS . '.htaccess')) {\n $io->streamOpen($this->getTargetDir() . DS . '.htaccess');\n $io->streamLock(true);\n $io->streamWrite(\"Order deny,allow\\nAllow from all\");\n $io->streamUnlock();\n $io->streamClose();\n }\n }", "public function createFile()\n {\n if (!is_string($this->file) || !strlen($this->file)) {\n throw new \\RuntimeException(\"Cannot create file. Filename must be set to a non-empty string.\");\n }\n\n Cache::ensureWritable(dirname($this->file));\n\n // open with 'c+' (to create if missing, but not truncate if existing)\n $this->handle = @fopen($this->file, 'c+');\n if ($this->handle === false) {\n throw new \\RuntimeException(\"Unable to create file ('\" . $this->file . \"').\");\n }\n\n // if anything goes wrong past this point, make sure we close/unlock our file\n try {\n // write lock to ensure no one else reads/writes until we are done\n $locked = flock($this->handle, LOCK_EX);\n if ($locked === false) {\n throw new \\RuntimeException(\"Unable to lock file ('\" . $file . \"') for writing.\");\n }\n\n // now that we have acquired a write lock, we want to verify that the\n // file is empty or invalid - if we're indexing, we only validate the\n // index file (handled by our index instance), if we're not indexing\n // (or we are ourselves the index instance) we validate $this->file\n if ($this->index) {\n $this->index->createFile();\n } elseif (unserialize(file_get_contents($this->file)) !== false) {\n throw new \\RuntimeException(\"Unable to create file ('\" . $this->file . \"'). File has valid content.\");\n }\n\n // prime file for array entries - we don't know how many entries there are\n // so we write a zero-padded length for now and update it on close.\n // we ftrunctate in case the file already exists, but has bad content\n ftruncate($this->handle, 0);\n fwrite($this->handle, 'a:0000000000:{');\n } catch (\\Exception $e) {\n $this->closeFile();\n throw $e;\n }\n\n // if we get this far we are committed to writing the file\n // we need a flag for this so we can safely touch-up in close\n $this->writing = true;\n\n return $this;\n }", "public function getFileSystem() {}", "private function Build_FAT ( )\r\n\t{\r\n\t\t$seekPos\t\t\t\t= ftell ( $this -> fileStream );\r\n\t\t$fatObject\t\t\t\t= new FAT ( $this );\r\n\t\t$this -> fatArray\t\t= $fatObject -> Get_FAT ( );\r\n\t\tfseek ( $this -> fileStream, $seekPos );\r\n\t\treturn;\r\n\t}", "public function setUp()\n {\n $this->vfs = vfsStream::setup('root', null, array_fill_keys(['tmp', 'assets', 'etc', 'bin'], []));\n $this->vfs->getChild('bin')->chmod(0555); // Not writable\n vfsStream::newFile('php1234.tmp')->at($this->vfs->getChild('tmp'))->setContent(\"hello world\");\n vfsStream::newFile('bar.txt')->at($this->vfs->getChild('assets'))->setContent(\"the stars\");\n vfsStream::newFile('passwd')->at($this->vfs->getChild('etc'))->setContent(\"root:x:0:0:root:/root:/bin/bash\");\n \n $this->info = [\n 'name' => 'foo.txt',\n 'type' => 'text/plain',\n 'size' => 11,\n 'tmp_name' => 'vfs://root/tmp/php1234.tmp',\n 'error' => UPLOAD_ERR_OK\n ];\n \n $this->uploadedFile = new UploadedFile($this->info, 'qux');\n }", "function tmpdir(){\n $tmpdir = $_ENV['TMPDIR'] . $_SERVER['UNIQUE_ID'];\n if (!is_file($tmpdir) && !is_dir($tmpdir) && (mkdir($tmpdir))){\n return \"{$tmpdir}/\";\n }\n return null;\n}", "protected function tmpPath()\n {\n return Pi::path('upload/_tmp');\n }", "public function mktempdir()\n\t{\n\t\t$temp_path = tempnam('/tmp', '');\n\t\t@unlink($temp_path);\n\t\tmkdir($temp_path);\n\n\t\treturn $temp_path;\n\t}", "protected function makeUploadedFileByPath() {\n return (new UploadedFile($this->resource, basename($this->resource)));\n }", "public function getTemporaryFilesPathForExport() {}", "private static function createTempDirectory(): string\n {\n $tempFile = tempnam(sys_get_temp_dir(), 'LocaleTest');\n\n if (file_exists($tempFile)) {\n unlink($tempFile);\n }\n\n mkdir($tempFile);\n if (is_dir($tempFile)) {\n return $tempFile . DIRECTORY_SEPARATOR;\n }\n\n throw new \\RuntimeException(\"Unable to create temp directory\");\n }", "public function __construct() {\n\t\t@mkdir($this->storage, 0777, true);\n\t}", "public function createTmpRootDir() : string {\n $chk = $this->chkE;\n if(!file_exists($this->tmpRootDir)) {\n $status = mkdir($this->tmpRootDir);\n if (! $chk->checkNotFalse($status,\"mkdir failed.\")) { return \"\"; }\n $this->tmpDirsCreated[] = $this->tmpRootDir;\n }\n return $this->tmpRootDir;\n }", "public static function createTempFile($content) {}", "protected function outPutTmpFile() {\r\n\t\t$dir = XOOPS_TRUST_PATH.'/tmp';\r\n\t\t$path = $dir.'/'.mt_rand().\"_\".time().'_collabtrans.xml';\r\n\t\t$fp = fopen($path, \"w\");\r\n\t\tfwrite($fp, $this -> toXML());\r\n\t\tfclose($fp);\r\n\r\n\t\treturn $path;\r\n\t}", "protected static function temporaryFilesDirectoryFallback() {\n try {\n // Custom output capture to ensure no output at all.\n ob_start();\n\n /** @var \\Thunder\\Robo\\Utility\\Drush $drush */\n $drush = Robo::getContainer()->get('drush');\n $exec = $drush->exec()\n ->arg('php-eval')\n ->arg(escapeshellarg('return file_directory_os_temp();'))\n ->option('format=string')\n ->run();\n\n // End custom output capture.\n ob_end_clean();\n\n if ($exec->wasSuccessful()) {\n $path = $exec->getMessage();\n }\n }\n catch (\\Exception $e) {}\n\n if (!$path) {\n $path = ini_get('upload_tmp_dir');\n }\n\n if (!$path) {\n $path = sys_get_temp_dir();\n }\n\n if (!$path) {\n throw new \\Exception(__CLASS__ . ' - Unable to determine fallback temporary files directory path.');\n }\n\n return $path;\n }", "public function getTmpFileBaseDir()\r\n {\r\n return $this->_tmpFileBaseDir;\r\n }", "public function getDefaultUploadTemporaryFolder() {}", "public function setTmpFolder($value) {\n\t\t$this->_tmp = $this->_checkTemporaryDirectory($value);\n\t\treturn $this;\n\t}", "function get_temp_dir()\n {\n }", "public static function createTempDir()\n {\n self::removeTempDir();\n $tmpDir = self::getTempDir();\n @mkdir($tmpDir) or die('cannot create temp directory');\n }", "protected function getFilesystemService()\n {\n return $this->services['filesystem'] = new \\Symfony\\Component\\Filesystem\\Filesystem();\n }", "public static function setTempDir($tempDir) {}", "public function makeTmpFileFromUpload() {\r\n if (is_uploaded_file($_FILES[$this->_name]['tmp_name'])) {\r\n $this->_tmpFile = $this->_tmpDir . DS . date(\"YmdHis\") . $this->_name . uniqid() . $_FILES[$this->_name]['name'];\r\n move_uploaded_file($_FILES[$this->_name]['tmp_name'], $this->_tmpFile);\r\n } else {\r\n return false;\r\n }\r\n }", "public function temporary(Storage_Model_File $model)\n {\n if( substr($model->storage_path, 0, strlen($this->_bucket)) == $this->_bucket ) {\n $path = $model->storage_path;\n } else {\n $path = $this->_bucket . '/' . $model->storage_path;\n }\n \n try {\n $rfh = fopen($this->_streamWrapperName . '://' . $path, 'r');\n } catch( Exception $e ) {\n throw $e;\n }\n \n $tmp_file = APPLICATION_PATH . '/public/temporary/' . basename($model['storage_path']);\n $fp = fopen($tmp_file, \"w\");\n stream_copy_to_stream($rfh, $fp);\n fclose($fp);\n @chmod($tmp_file, 0777);\n return $tmp_file;\n }", "public function createFileSet() {\n $this->fileset = new TarFileSet();\n $this->filesets[] = $this->fileset;\n return $this->fileset;\n }", "public function __construct()\n {\n $this->fileSystem = new Filesystem();\n }", "function system_app_temp_dir($subfolder = '', $appendnc = true)\n{\n global $CONFIG;\n \n if($subfolder)\n {\n if(starts_with($subfolder, '/'))\n $subfolder = substr($subfolder, 1);\n if(!ends_with($subfolder, '/'))\n $subfolder .= '/';\n }\n $basedir = (avail($CONFIG, 'app_temp') ? $CONFIG['app_temp'] : sys_get_temp_dir().'/'.session_name().'/');\n if(!ends_with($basedir, '/'))\n $basedir .= '/';\n\n if (substr(sprintf('%o', @fileperms($basedir)), -3) != '777')\n @chmod($basedir, 0777);\n\n if($appendnc)\n $basedir .= getAppVersion('nc').'/';\n \n if( substr(sprintf('%o', @fileperms($basedir)), -3) != '777' )\n @chmod($basedir, 0777);\n \n $folder = $basedir.($subfolder ?: '');\n $folder = str_replace(['..'], [''], $folder);\n $folder = (stripos(PHP_OS, 'WIN') === 0)\n ?preg_replace('/[^0-9a-zA-Z\\/\\-\\_\\\\\\\\:]/', '', $folder) // accept \\ and : on windows\n :preg_replace('/[^0-9a-zA-Z\\/\\-\\_]/', '', $folder);\n while(strpos($folder, '//'))\n $folder = str_replace('//', '/', $folder);\n if( !file_exists($folder) )\n {\n if(!@mkdir($folder, 0777, true))\n WdfException::Raise('Unable to create app temp folder: '.$folder);\n }\n if( substr(sprintf('%o', @fileperms($folder)), -3) != '777' )\n {\n @chmod($folder, 0777);\n clearstatcache(true,$folder);\n if( substr(sprintf('%o', @fileperms($folder)), -3) != '777' )\n WdfException::Raise('App temp folder is not writable: '.$folder);\n }\n return $folder;\n}", "public static function getFileSystem()\n\t{\n\t\t//#! Set the permission constants if not already set.\n\t\tif ( ! defined( 'FS_CHMOD_DIR' ) ) {\n\t\t\tdefine( 'FS_CHMOD_DIR', ( fileperms( ABSPATH ) & 0777 | 0755 ) );\n\t\t}\n\t\tif ( ! defined( 'FS_CHMOD_FILE' ) ) {\n\t\t\tdefine( 'FS_CHMOD_FILE', ( fileperms( ABSPATH . 'index.php' ) & 0777 | 0644 ) );\n\t\t}\n\n\t\t//#! Setup a new instance of WP_Filesystem_Direct and use it\n\t\tglobal $wp_filesystem;\n\t\tif ( ! ( $wp_filesystem instanceof \\WP_Filesystem_Base ) ) {\n\t\t\tif ( ! class_exists( 'WP_Filesystem_Direct' ) ) {\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php' );\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php' );\n\t\t\t}\n\t\t\t$wp_filesystem = new \\WP_Filesystem_Direct( [] );\n\t\t}\n\t\treturn $wp_filesystem;\n\t}", "private function useTmpConfigDatabase() {\n\t\t$configFile = sprintf(\"%s/../data/config.xml\", getcwd());\n\t\t$tmpConfigFile = tempnam(\"/tmp\", \"cfg\");\n\t\tcopy($configFile, $tmpConfigFile);\n\t\t\\OMV\\Environment::set(\"OMV_CONFIG_FILE\", $tmpConfigFile);\n\t}", "public static function tmpdir()\n {\n if (OS_WINDOWS) {\n if ($var = isset($_ENV['TMP']) ? $_ENV['TMP'] : getenv('TMP')) {\n return $var;\n }\n if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP')) {\n return $var;\n }\n if ($var = isset($_ENV['USERPROFILE']) ? $_ENV['USERPROFILE'] : getenv('USERPROFILE')) {\n return $var;\n }\n if ($var = isset($_ENV['windir']) ? $_ENV['windir'] : getenv('windir')) {\n return $var;\n }\n return getenv('SystemRoot') . '\\temp';\n }\n if ($var = isset($_ENV['TMPDIR']) ? $_ENV['TMPDIR'] : getenv('TMPDIR')) {\n return $var;\n }\n return realpath('/tmp');\n }", "private function get_temp_dir()\n {\n if (function_exists('sys_get_temp_dir')) {\n $temp = sys_get_temp_dir();\n if (@is_dir($temp) && is_writable($temp)) {\n return rtrim($temp, '/\\\\') . '/';\n }\n }\n\n $temp = ini_get('upload_tmp_dir');\n if (@is_dir($temp) && is_writable($temp)) {\n return rtrim($temp, '/\\\\') . '/';\n }\n\n $temp = TEMP_FOLDER;\n if (is_dir($temp) && is_writable($temp)) {\n return $temp;\n }\n\n return '/tmp/';\n }", "protected function createFile() {}", "public function temp($path)\n {\n $this->storage = rtrim($path, '\\/');\n return $this;\n }", "public function getUserTemporaryUploadFolder(User $user = null)\n {\n if ($user === null) {\n // Default to the logged-in user, if there is one\n $user = Craft::$app->getUser()->getIdentity();\n }\n\n if ($user) {\n $folderName = 'user_' . $user->id;\n } else {\n // A little obfuscation never hurt anyone\n $folderName = 'user_' . sha1(Craft::$app->getSession()->id);\n }\n\n // Is there a designated temp uploads volume?\n $assetSettings = Craft::$app->getProjectConfig()->get('assets');\n if (isset($assetSettings['tempVolumeUid'])) {\n $volume = Craft::$app->getVolumes()->getVolumeByUid($assetSettings['tempVolumeUid']);\n if (!$volume) {\n throw new VolumeException(Craft::t('app', 'The volume set for temp asset storage is not valid.'));\n }\n /** @var Volume $volume */\n $path = (isset($assetSettings['tempSubpath']) ? $assetSettings['tempSubpath'] . '/' : '') .\n $folderName;\n $folderId = $this->ensureFolderByFullPathAndVolume($path, $volume, false);\n return $this->findFolder([\n 'volumeId' => $volume->id,\n 'id' => $folderId,\n ]);\n }\n\n $volumeTopFolder = $this->findFolder([\n 'volumeId' => ':empty:',\n 'parentId' => ':empty:'\n ]);\n\n // Unlikely, but would be very awkward if this happened without any contingency plans in place.\n if (!$volumeTopFolder) {\n $volumeTopFolder = new VolumeFolder();\n $tempVolume = new Temp();\n $volumeTopFolder->name = $tempVolume->name;\n $this->storeFolderRecord($volumeTopFolder);\n }\n\n $folder = $this->findFolder([\n 'name' => $folderName,\n 'parentId' => $volumeTopFolder->id\n ]);\n\n if (!$folder) {\n $folder = new VolumeFolder();\n $folder->parentId = $volumeTopFolder->id;\n $folder->name = $folderName;\n $folder->path = $folderName . '/';\n $this->storeFolderRecord($folder);\n }\n\n FileHelper::createDirectory(Craft::$app->getPath()->getTempAssetUploadsPath() . DIRECTORY_SEPARATOR . $folderName);\n\n return $folder;\n }", "protected function getFileFactory() {}", "public function getTmpDir()\n {\n if (!is_null($dir = &$this->staticKey('getTmpDir'))) {\n return $dir; // Already cached this.\n }\n $possible_dirs = []; // Initialize.\n\n if (defined('WP_TEMP_DIR')) {\n $possible_dirs[] = (string) WP_TEMP_DIR;\n }\n if ($this->functionIsPossible('sys_get_temp_dir')) {\n $possible_dirs[] = (string) sys_get_temp_dir();\n }\n $possible_dirs[] = (string) ini_get('upload_tmp_dir');\n\n if (!empty($_SERVER['TEMP'])) {\n $possible_dirs[] = (string) $_SERVER['TEMP'];\n }\n if (!empty($_SERVER['TMPDIR'])) {\n $possible_dirs[] = (string) $_SERVER['TMPDIR'];\n }\n if (!empty($_SERVER['TMP'])) {\n $possible_dirs[] = (string) $_SERVER['TMP'];\n }\n if (mb_stripos(PHP_OS, 'win') === 0) {\n $possible_dirs[] = 'C:/Temp';\n }\n if (mb_stripos(PHP_OS, 'win') !== 0) {\n $possible_dirs[] = '/tmp';\n }\n if (defined('WP_CONTENT_DIR')) {\n $possible_dirs[] = (string) WP_CONTENT_DIR;\n }\n foreach ($possible_dirs as $_key => $_dir) {\n if (($_dir = trim((string) $_dir)) && @is_dir($_dir) && @is_writable($_dir)) {\n return $dir = $this->nDirSeps($_dir);\n }\n }\n unset($_key, $_dir); // Housekeeping.\n\n return $dir = '';\n }", "public function __construct(MOXMAN_Vfs_FileSystem $fileSystem) {\n\t\t$this->fileSystem = $fileSystem;\n\t\t$this->metaFileCache = array();\n\t}", "public function create(array $config): FilesystemInterface;", "private function tempdir()\n {\n // create temp file\n $tempfile = tempnam(\n sys_get_temp_dir(),\n 'conversion'\n );\n\n // remove the file\n if (file_exists($tempfile)) {\n unlink($tempfile);\n }\n\n // create a directory with previous temp file name\n mkdir($tempfile);\n\n // check the folder has been created\n if (is_dir($tempfile)) {\n return $tempfile;\n }\n }", "private function createTempFile(){\n\n\t\t\ttry {\n\t\t \n\t\t\t // Undefined | Multiple Files | $_FILES Corruption Attack\n\t\t\t // If this request falls under any of them, treat it invalid.\n\t\t\t if (!isset($_FILES['file']['error']) ||\n\t\t\t is_array($_FILES['file']['error'])) {\n\t\t\t throw new RuntimeException('Invalid parameters.');\n\t\t\t }\n\n\t\t\t // Check $_FILES['upfile']['error'] value.\n\t\t\t switch ($_FILES['file']['error']) {\n\t\t\t case UPLOAD_ERR_OK:\n\t\t\t break;\n\t\t\t case UPLOAD_ERR_NO_FILE:\n\t\t\t throw new RuntimeException('No file sent.');\n\t\t\t case UPLOAD_ERR_INI_SIZE:\n\t\t\t case UPLOAD_ERR_FORM_SIZE:\n\t\t\t throw new RuntimeException('Exceeded filesize limit.');\n\t\t\t default:\n\t\t\t throw new RuntimeException('Unknown errors.');\n\t\t\t }\n\n\t\t\t // You should also check filesize here. \n\t\t\t if ($_FILES['file']['size'] > 1000000) {\n\t\t\t throw new RuntimeException('Exceeded filesize limit.');\n\t\t\t }\n\n\t\t\t // DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!\n\t\t\t // Check MIME Type by yourself.\n\t\t\t $finfo = new finfo(FILEINFO_MIME_TYPE);\n\t\t\t echo $finfo->file($_FILES['file']['tmp_name']).\"<br><br>\";\n\n\t\t\t if (false === $ext = array_search(\n\t\t\t $finfo->file($_FILES['file']['tmp_name']),\n\t\t\t array(\n\t\t\t 'csv' => 'text/plain',\n\t\t\t ),\n\t\t\t true\n\t\t\t )) {\n\t\t\t throw new RuntimeException('Invalid file format.');\n\t\t\t }\n\n\t\t\t} catch (RuntimeException $e) {\n\n\t\t \techo $e->getMessage();\n\t\t\t}\n\t\t}", "private function __construct()\n {\n \t$this->storage_dir = $_SERVER[\"DOCUMENT_ROOT\"] . '/storage';\n }", "public function __construct(){\n $this->cmd=WKPDF_PATH;\n if(!file_exists($this->cmd))throw new Exception('WKPDF static executable \"'.htmlspecialchars($this->cmd,ENT_QUOTES).'\" was not found.');\n do{\n $this->tmp=SITE_TEMPDIR.mt_rand().'.html';\n } while(file_exists($this->tmp));\n }", "function getTempFolder() {\n\t$cachefolder = \"silverstripe-cache\" . str_replace(array(\"/\",\":\", \"\\\\\"),\"-\", substr($_SERVER['SCRIPT_FILENAME'], 0, strlen($_SERVER['SCRIPT_FILENAME']) - strlen('/sapphire/main.php')));\n\t$ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . \"/silverstripe-cache\";\n if(@file_exists($ssTmp)) {\n \treturn $ssTmp;\n }\n\t\n if(function_exists('sys_get_temp_dir')) {\n $sysTmp = sys_get_temp_dir();\n } elseif(isset($_ENV['TMP'])) {\n\t\t$sysTmp = $_ENV['TMP']; \t\n } else {\n $tmpFile = tempnam('adfadsfdas','');\n unlink($tmpFile);\n $sysTmp = dirname($tmpFile);\n }\n\n $worked = true;\n $ssTmp = \"$sysTmp/$cachefolder\";\n if(!@file_exists($ssTmp)) {\n \t@$worked = mkdir($ssTmp);\n }\n if(!$worked) {\n \t$ssTmp = dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . \"/silverstripe-cache\";\n \t$worked = true;\n \tif(!@file_exists($ssTmp)) {\n \t\t@$worked = mkdir($ssTmp);\n \t}\n }\n if(!$worked) {\n \tuser_error(\"Permission problem gaining access to a temp folder. \" .\n \t\t\"Please create a folder named silverstripe-cache in the base folder \" .\n \t\t\"of the installation and ensure it has the correct permissions\", E_USER_ERROR);\n }\n \n return $ssTmp;\n}", "function buildTmpList($base){\r\n\t\t/*\r\n\t\t//$base->debugObj->printDebug($base->systemAry,1,'xxxf');\r\n\t\t$path=$base->systemAry['tmplocal'];\r\n\t\t$tmpFiles=$base->fileObj->retrieveFileNames($path,'',&$base);\t\r\n\t\t//$query=\"delete from variablepromptsprofile where variablepromptsname='tmpfilenames'\";\r\n\t\t//$base->dbObj->queryTable($query,'delete',&$base);\r\n\t\tforeach ($tmpFiles as $ctr=>$fileName){\r\n\t\t\t//$query=\"insert into variablepromptsprofile (variablepromptsname,variablepromptslabel,variablepromptsvalue) values ('tmpfilenames','$fileName','$fileName')\";\r\n\t\t\t//$base->dbObj->queryTable($query,'update',&$base);\r\n\t\t}\r\n\t\t*/\r\n\t}", "public static function getInstallTempFolder() {\r\n\t\t$dir = self::getTempFolder() . TMP_FILE_PREFIX . '/';\r\n\t\t@mkdir($dir);\r\n\t\tself::makeWritable($dir);\r\n\t\t\r\n\t\treturn $dir;\r\n\t}", "function writeTempDir() {\n umask(0);\n FileSystem::mkdirOrThrowExceptionOnFailure($this->getTestDir(), true);\n }", "public static function getSystemTempDir() {\n $dir = sys_get_temp_dir() . \"/\";\n return $dir;\n }", "static function temporary($filename,$data = ''){\r\n\t\t$filename = '/tmp/'.$filename;\r\n\t\tfile_put_contents($filename, $data);\r\n\t\treturn new static($filename);\r\n\t}", "public function buildIndexCreator()\n {\n $indexCreator = $this->createIndexCreator();\n $indexCreator->setPath($this->path);\n $indexCreator->setFileName($this->filenamePrefix);\n $indexCreator->setLimit($this->limit);\n $indexCreator->setSitemapsCount($this->sitemapsCount);\n $indexCreator->useFormatCustom($this->format, $this->extension);\n\n return $indexCreator;\n }", "function temporaryFile($name, $content)\n{\n $file = trim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) .\n DIRECTORY_SEPARATOR .\n ltrim($name, DIRECTORY_SEPARATOR);\n\n file_put_contents($file, $content);\n\n register_shutdown_function(function() use($file) {\n unlink($file);\n });\n\n return $file;\n}", "private function prepareVFSDirectoryStructure(): void\n {\n $structure = [\n 'single' => ['one_file.json' => ''],\n 'multi' => ['other_file.json' => '', 'j_s_o_n_file.json' => '', 'text.txt' => ''],\n 'container' => [\n 'first' => ['file_first.exe' => '', 'file_second.exe' => '', 'text.txt' => ''],\n 'second' => ['file_third.exe' => '', 'other.dat' => ''],\n 'third' => ['temp.tmp' => ''],\n 'some_ext.exe' => '',\n ],\n ];\n $this->addStructureToVFS($structure);\n }", "protected function setUp(): void\n {\n $root = vfsStream::setup();\n $this->largeFile = vfsStream::newFile('large.txt')\n ->withContent(LargeFileContent::withGigabytes(100))\n ->at($root);\n }", "public function filesystem(): Filesystem;", "protected function setTemporaryDbMounts()\n {\n $backendUser = $this->getBackendUser();\n\n // Clear temporary DB mounts\n $tmpMount = GeneralUtility::_GET('setTempDBmount');\n if (isset($tmpMount)) {\n $backendUser->setAndSaveSessionData('pageTree_temporaryMountPoint', (int)$tmpMount);\n }\n // Set temporary DB mounts\n $alternativeWebmountPoint = (int)$backendUser->getSessionData('pageTree_temporaryMountPoint');\n if ($alternativeWebmountPoint) {\n $alternativeWebmountPoint = GeneralUtility::intExplode(',', $alternativeWebmountPoint);\n $backendUser->setWebmounts($alternativeWebmountPoint);\n } else {\n // Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay \"read-only\")\n $alternativeWebmountPoints = trim($backendUser->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));\n $appendAlternativeWebmountPoints = $backendUser->getTSConfigVal('options.pageTree.altElementBrowserMountPoints.append');\n if ($alternativeWebmountPoints) {\n $alternativeWebmountPoints = GeneralUtility::intExplode(',', $alternativeWebmountPoints);\n $this->getBackendUser()->setWebmounts($alternativeWebmountPoints, $appendAlternativeWebmountPoints);\n }\n }\n }", "protected function buildTsfe() {\n\t\tif (!is_object($GLOBALS['TT'])) {\n\t\t\t$GLOBALS['TT'] = $this->getTimeTrackerInstance();\n\t\t\t$GLOBALS['TT']->start();\n\t\t}\n\t\t$GLOBALS['TSFE'] = $this->getTsfeInstance();\n\t\t$GLOBALS['TSFE']->initFEuser();\n\t\t$GLOBALS['TSFE']->fetch_the_id();\n\t\t$GLOBALS['TSFE']->getPageAndRootline();\n\t\t$GLOBALS['TSFE']->initTemplate();\n\t\t$GLOBALS['TSFE']->getConfigArray();\n\t}", "protected function createFilesystemDriver(): StoreContract\n {\n return $this->createCacheBased('filesystem');\n }", "public function createTorrentFile()\n {\n if (!$this->tracker) {\n echo 'Tracker is null.' . PHP_EOL;\n\n return;\n }\n\n\n if (!$this->source_folder) {\n echo 'Source folder is null.' . PHP_EOL;\n\n return;\n }\n\n if (!file_exists($this->source_folder)) {\n echo 'Source folder not exists.' . PHP_EOL;\n\n return;\n }\n\n if (!$this->outfile) {\n // No dir given, create a temporary one and add timestap to torrent's name\n $date = new \\DateTime();\n $this->outfile = tempnam('/tmp', 'torrent_' . $date->getTimestamp());\n }\n\n if (!is_writable(dirname($this->outfile))) {\n echo 'Output file is not writable.' . PHP_EOL;\n\n return;\n }\n\n $command = 'transmission-create';\n\n if ($this->private) {\n $command .= ' -p ';\n }\n\n if ($this->outfile) {\n $command .= ' -o ' . escapeshellarg($this->outfile);\n }\n\n if ($this->piecesize) {\n $command .= ' -s ' . (int)$this->piecesize;\n }\n\n if ($this->comment) {\n $command .= ' -c \"' . $this->comment . '\"';\n }\n\n if ($this->tracker) {\n $command .= ' -t ' . $this->tracker;\n }\n\n $command .= ' ' . escapeshellarg($this->source_folder);\n\n $process = new Process($command);\n $process->run();\n\n if (!$process->isSuccessful()) {\n throw new ProcessFailedException($process);\n }\n\n return $this->outfile;\n }", "public function testPathSizeForFile()\n {\n /** @var $temptation Icecave\\Temptation\\Temptation */\n $temptation = new Temptation;\n $file = $temptation->createFile();\n file_put_contents($file->path(), 'This is my temp file.');\n\n $this->pathClass = new Path( $file->path() );\n $this->assertEquals( $file->path(), $this->pathClass->getPath() );\n $this->assertEquals( 21, $this->pathClass->size() );\n }", "public function create()\n {\n if (! $this->adapter->fileExists($this->path, true)) {\n // ensure the parent directory exists\n new Directory(dirname($this->path), $this->adapter);\n\n if ($this->adapter->createFile($this->path) === false) {\n $this->throwUnableToCreate();\n }\n }\n\n return $this;\n }", "protected function initializeTemporaryDatabaseMount()\n {\n $backendUser = $this->getBackendUser();\n\n // Set/Cancel Temporary DB Mount:\n if (strlen($this->setTemporaryDatabaseMount)) {\n $set = max($this->setTemporaryDatabaseMount, 0);\n // Setting...:\n if ($set > 0 && $backendUser->isInWebMount($set)) {\n $this->settingTemporaryMountPoint($set);\n // Clear:\n } else {\n $this->settingTemporaryMountPoint(0);\n }\n }\n\n // Getting temporary mount point ID:\n $temporaryMountPoint = (int) $backendUser->getSessionData('pageTree_temporaryMountPoint_orders');\n\n // If mount point ID existed and is within users\n // real mount points, then set it temporarily:\n if ($temporaryMountPoint && $backendUser->isInWebMount($temporaryMountPoint)) {\n $this->pagetree->MOUNTS = array($temporaryMountPoint);\n $this->activeTemporaryMountPoint = BackendUtility::readPageAccess(\n $temporaryMountPoint,\n $backendUser->getPagePermsClause(1)\n );\n }\n }", "public function getFreshHash()\n {\n $currentDisk = $this->getDisk();\n\n $tmpFile = tempnam(sys_get_temp_dir(), 'asset');\n $handle = fopen($tmpFile, \"w\");\n\n $bh = $currentDisk->readStream($this->path);\n while(!feof($bh)) {\n fwrite($handle, fread($bh, 8192));\n }\n fclose($handle);\n\n $file = new UploadedFile($tmpFile, $this->name);\n\n $uploader = new AssetUploader();\n $hash = $uploader->getHash($file);\n\n // Remove temporary file\n unlink($tmpFile);\n\n return $hash;\n }", "function getSystemUploadDirectory() {\r\n return sys_get_temp_dir();\r\n }" ]
[ "0.582459", "0.57627463", "0.5684329", "0.567967", "0.54321426", "0.5414566", "0.5395737", "0.5365748", "0.53074205", "0.52613914", "0.5251006", "0.5224859", "0.5200456", "0.516497", "0.5132879", "0.5118245", "0.51081365", "0.51004124", "0.5045101", "0.5031289", "0.5015974", "0.49951887", "0.49789977", "0.49551165", "0.49353623", "0.49273303", "0.4919625", "0.4852085", "0.48404804", "0.48273173", "0.48246577", "0.48203394", "0.47089705", "0.46989065", "0.4664499", "0.46630687", "0.46609512", "0.46590805", "0.46568084", "0.46249697", "0.4621141", "0.46136978", "0.46079493", "0.4606039", "0.4605021", "0.4596052", "0.45926303", "0.45916212", "0.45840997", "0.4573425", "0.45726338", "0.45565647", "0.45505095", "0.45489326", "0.45450097", "0.4526826", "0.452155", "0.45021987", "0.449857", "0.44947577", "0.44892973", "0.44870746", "0.44858006", "0.44811347", "0.447968", "0.44796097", "0.44794685", "0.44783095", "0.44641528", "0.44611126", "0.44547462", "0.44442278", "0.44426358", "0.44384944", "0.44289115", "0.4421798", "0.44172388", "0.44034478", "0.4400706", "0.4400626", "0.4399053", "0.43984076", "0.43948343", "0.43914646", "0.43848458", "0.43811893", "0.43799838", "0.43715912", "0.4369086", "0.4366371", "0.43644816", "0.43640128", "0.43597966", "0.43522757", "0.43520054", "0.43425927", "0.4340511", "0.43318075", "0.43302545", "0.43230245" ]
0.51225054
15
Adds an entry to the operations.byml file of the given context, and returns the added entry. The options are (all optional): type: string. The possible values are: update: means that the operation is an update for a file that is not registered yet in the vfs (but probably exists on the real server) move: bool=false. Whether to move or copy the file from the given path to the destination.
protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []): array { if (null !== $path) { $path = $this->getRealPath($path); } $type = $options['type'] ?? 'add'; $useMove = (bool)($options['move'] ?? false); $opFile = $this->getContextDir($contextId) . "/operations.byml"; $ops = []; if (true === file_exists($opFile)) { $ops = BabyYamlUtil::readFile($opFile); } if (null !== $path) { $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta); $dst = $this->getContextDir($contextId) . "/files/" . $relPath; if ($path !== $dst) { if (true === $useMove) { FileSystemTool::move($path, $dst); } else { FileSystemTool::copyFile($path, $dst); } } } else { $relPath = null; $dst = null; } $addOperation = [ 'type' => $type, 'id' => $id, 'path' => $relPath, 'meta' => $meta, ]; //-------------------------------------------- // ADDING THE OPERATION (see heuristic notes for more details) //-------------------------------------------- $found = false; foreach ($ops as $k => $op) { if ($id === $op['id']) { $found = true; $type = $op['type']; switch ($type) { case "add": $ops[$k] = $addOperation; break; default: $this->error("Operation \"$type\" rejected. You cannot add this entry because it already exists with type=\"$type\" for id \"$id\"."); break; } } } if (false === $found) { $op = $addOperation; } $this->onFileAddedAfter($contextId, $op, $path, $dst, $options); if (false === $found) { $ops[] = $op; } else { $ops[$k] = $op; } BabyYamlUtil::writeFile($ops, $opFile); return $op; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function updateEntry(string $contextId, string $id, ?string $path, array $meta, array $options = [])\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n $useMove = (bool)($options['move'] ?? false);\n\n\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n\n\n $meta = array_merge($op[\"meta\"], $meta);\n\n\n if (null !== $path) {\n\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n case \"update\":\n $op['meta'] = $meta;\n\n\n /**\n * The bottom line is that in the vfs entry, the path must be set (i.e. not null).\n * We allow for the user to pass path=null for an \"update\" action, for performances reasons, which means that the user\n * didn't change the file but might have updated the meta; however we still need to set the path\n * in the vfs entry.\n *\n * Therefore if the user passes path=null, we don't update the path (we keep the existing one)\n */\n if (null !== $relPath) {\n $op['path'] = $relPath;\n }\n $ops[$k] = $op;\n break;\n case \"remove\":\n $ops[$k] = [\n \"type\" => \"update\",\n \"id\" => $id,\n \"path\" => $relPath,\n \"meta\" => $meta,\n ];\n break;\n }\n\n\n break;\n }\n }\n\n if (false === $found) {\n return $this->addEntry($contextId, $id, $path, $meta, array_merge($options, [\n \"type\" => \"update\",\n ]));\n } else {\n // we only call this when a file has been really added to our vfs\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n\n $ops[$k] = $op;\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n return $op;\n }\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 add(array $context): void;", "protected function _actionAdd($context)\n\t{\t\n\t\t$data = $context->data;\t\t\n\t\t$file = KRequest::get('files.file', 'raw');\n\t\t$content = @file_get_contents($file['tmp_name']);\n\t\t$filesize = strlen($content);\n\t\t$uploadlimit = $this->_max_upload_limit * 1024 * 1024; \n\t\t\n\t\t$exif = (function_exists('exif_read_data')) ? @exif_read_data($file['tmp_name']) : array();\n\n\t\tif($filesize == 0)\n\t\t{\n\t\t throw new LibBaseControllerExceptionBadRequest('File is missing');\t\n\t\t\t\n\t\t return;\n\t\t}\n\t\t\n\t\tif($filesize > $uploadlimit)\n\t\t{\n\t\t throw new LibBaseControllerExceptionBadRequest('Exceed maximum size');\t\n\n\t\t return;\n\t\t}\n\n\t\t$orientation = 0;\n\t\t\n\t\tif(!empty($exif) && isset($exif['Orientation']) )\n {\n $orientation = $exif['Orientation']; \n }\t\t\n\t\t\n\t\t$data['portrait'] = array('data'=>$content,'rotation'=>$orientation,'mimetype'=>isset($file['type']) ? $file['type'] : null);\t\t\t\t\n \n\t\t$photo = $this->actor->photos->addNew($data);\t\n\t\t\n\t\t$photo->setExifData($exif);\n\t\t\n\t\t$photo->save();\n\t\t\n\t\t$this->setItem($photo);\n\t\t\n\t\t$this->getResponse()->status = KHttpResponse::CREATED;\n\t\t\n if($photo->body && preg_match('/\\S/',$photo->body))\n {\n $context->append(array( \n 'story' => array('body'=>$photo->body)\n )); \n }\n\n\t\treturn $photo;\n\t}", "public function add(ContextInterface $context);", "public function add_entry($entry);", "public function gitAdd($path)\n\t{\n\t\t// #TODO: Doesn't support adding new directories along with files.\n\t\t// this only supports adding a single file at a time.\n\t\t$WorkingCopy = $this->gitWrapper->workingCopy($this->getPath()); // This \n\t\treturn $WorkingCopy->add($path);\n\t}", "public function addInput ( \\r8\\FileSys $input )\n {\n $input = clone $input;\n\n if ( $input->isFile() ) {\n $this->inputs->append( new \\ArrayIterator(array($input)) );\n }\n else if ( $input->isDir() ) {\n $input->setIncludeDots(FALSE);\n $this->inputs->append(\n new \\RecursiveIteratorIterator($input)\n );\n }\n else {\n throw new \\r8\\Exception\\Argument(0, 'Input', 'Path does not exist');\n }\n\n return $this;\n }", "protected function onFileAddedAfter(string $contextId, array &$operation, ?string $path, ?string $dst, array $options = [])\n {\n\n }", "public function addContext(GenericContext $context);", "public function add($child, $type = null, array $options = array());", "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 }", "protected function removeEntry(string $contextId, string $id)\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n\n\n /**\n * If the entry is found, we remove it directly from the operations.\n */\n $addTheDeleteEntry = true;\n $realpath = null;\n $op = null;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $addTheDeleteEntry = false;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n break;\n case \"update\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n $addTheDeleteEntry = true;\n break;\n }\n }\n }\n\n\n if (true === $addTheDeleteEntry) {\n $ops[] = [\n 'type' => \"remove\",\n 'id' => $id,\n ];\n }\n\n $this->onFileRemovedAfter($contextId, $id, $op, $realpath);\n\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n\n }", "function &addEntry($entry) {\n $reuslt = NULL;\n if (is_object($entry) && is_a($entry, 'papaya_atom_entry')) {\n $result = $this->add();\n $result->assign($entry);\n }\n return $result;\n }", "function add()\n\t{\n\t\t$CFG = $this->config->item('image_configure');\n\t\t$data[\"title\"] = _e(\"Image\");\n\t\t## for check admin or not ##\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\n\t\t$this->load->module('context/context_admin');\n\t\t$user_context = $this->context_admin->getContext();\n\t\t$data['var']['context_dd'] = ( array('' => _e('Choose Context') ) + $user_context );\n\t\t$data['var']['relation_dd'] = ( array('' => _e('Choose Relation') ) );\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"image\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"image_add\", $data, true, \"image\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function add(string $name, string $type = null, array $options = []);", "public function add(SplFileInfo $splFileInfo);", "function add_log_entry(log_op_move $entry) {\n array_unshift($this->log_op_list, $entry);\n }", "public function addEntry(DataStreamEntry $entry);", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "function add()\n\t{\n\t\t$data[\"title\"] = _e(\"Permission Modify\");\t\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\t## for check admin or not\t##\t\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\n\t\t\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\t\t\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"permission_modify\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"permission_modify_add\", $data, true, \"permission_modify\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function add(Operation $operation);", "public function add() {\n $this->usePostRequest();\n //$this->dbFileModel->add_file();\n }", "protected function add($name, $value){\r\n $this->file->{\"$this->command\"}($this->handler, $name, $value);\r\n }", "protected function add($type, $file, $options)\n {\n if ($file)\n {\n if (!isset($this->resources[$type]))\n {\n $this->resources[$type] = array();\n }\n \n $this->resources[$type][$file] = $options; \n }\n \n return $this;\n }", "public function addPath($path);", "public function addPath($path);", "public function add_entry($entry)\n {\n }", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'sort', 'descript'));\n\t\t$info = $this->_cookData($info);\n\t\t$series = Lock_Service_FileType::getFileTypeByName($info['name']);\n\t\tif($series) $this->output(-1, $info['name'].'已存在');\n\t\t$result = Lock_Service_FileType::addFileType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function add($key, $value = null)\n {\n if (is_null($value) && !isset($this->item[$key])) {\n is_file($config = root('config',$key.'.php')) && $this->set($key, require($config));\n is_file($config = runtime('config',$key.'.php')) && $this->set($key, require($config));\n } else if(is_string($value) && is_file($value)){\n return $this->set($key, require($value));\n }else{\n return $this->set($key, $value);\n }\n }", "public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "protected function action_add() {\n\n // Where in task list to add the task?\n $project_index = 0;\n $task = $this->request->value;\n\n if ($this->state->event == 'project') {\n $project_index = $this->state->value;\n } else {\n list($task, $project_index) = $this->_split_task_and_project($task);\n }\n $task_added = $this->_taskpaper->add($task, $project_index);\n\n return ($task_added ? self::UPDATED : false);\n }", "public function insert($path, $value, $createParents = false) {\n $this->commands[] = array(\n 'opcode' => COUCHBASE_SDCMD_DICT_ADD,\n 'path' => $path,\n 'value' => $value,\n 'createParents' => $createParents,\n );\n return $this;\n }", "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 add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}", "function add ($other) {\n $this->getTool();\n return ($this->tool->add(&$this, $other));\n }", "public function addToContext($context)\n {\n $context['menu'] = new Menu();\n $context['site'] = $this;\n return $context;\n }", "public function add() {\n\t\t\n\t\t$data = array(\n\t\t\t'user_id' => $this->_user_id,\n\t\t\t'date' => $this->_date,\n\t\t\t'time_of_day' => $this->_time_of_day,\n\t\t\t'type_id' => $this->_type_id,\n\t\t\t'route_id' => $this->_route_id,\n\t\t\t'distance' => $this->_distance,\n\t\t\t'time' => $this->_time,\n\t\t\t'shoe_id' => $this->_shoe_id,\n\t\t\t'quality' => $this->_quality,\n\t\t\t'effort' => $this->_effort,\n\t\t\t'weather_ids' => $this->_weather_ids,\n\t\t\t'temperature' => $this->_temperature,\n\t\t\t'notes' => $this->_notes,\n\t\t\t'field' => $this->_field,\n\t\t\t'placement' => $this->_placement,\n\t\t\t'group_min_age' => $this->_group_min_age,\n\t\t\t'group_max_age' => $this->_group_max_age,\n\t\t\t'group_age_size' => $this->_group_age_size,\n\t\t\t'group_age_placement' => $this->_group_age_placement,\n\t\t\t'group_gender_size' => $this->_group_gender_size,\n\t\t\t'group_gender_placement' => $this->_group_gender_placement,\n\t\t\t'active' => $this->_active\n\t\t);\n\t\t$this->db->insert($this->_table,$data);\n\t\t\n\t\treturn true;\n\t}", "public function addAddress($refId, $name, $link, $type, $confidentiality, $description)\n {\n\n $orm = $this->getOrm();\n\n $storageNode = $orm->newEntity(\"WbfsysFileAddress\");\n $storageNode->name = $name;\n $storageNode->link = $link;\n $storageNode->id_type = $type;\n $storageNode->id_confidentiality = $confidentiality;\n $storageNode->description = $description;\n $storageNode = $orm->insert($storageNode);\n\n\n $refNode = $orm->newEntity(\"WbfsysEntityFileAddress\");\n $refNode->vid = $refId;\n $refNode->id_storage = $storageNode;\n\n $refNode = $orm->insert($refNode);\n\n return $storageNode;\n\n }", "function addInstallAction(&$node) {\n\t\t$fileName = $node->getAttribute('file');\n\n\t\tif (!isset($fileName)) {\n\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => null, 'attr' => $node->getAttributes());\n\n\t\t} else if (strstr($fileName, '{$installedLocale}')) {\n\t\t\t// Filename substitution for locales\n\t\t\tforeach ($this->installedLocales as $thisLocale) {\n\t\t\t\t$newFileName = str_replace('{$installedLocale}', $thisLocale, $fileName);\n\t\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => $newFileName, 'attr' => $node->getAttributes());\n\t\t\t}\n\n\t\t} else {\n\t\t\t$newFileName = str_replace('{$locale}', $this->locale, $fileName);\n\t\t\tif (!file_exists($newFileName)) {\n\t\t\t\t// Use version from default locale if data file is not available in the selected locale\n\t\t\t\t$newFileName = str_replace('{$locale}', INSTALLER_DEFAULT_LOCALE, $fileName);\n\t\t\t}\n\n\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => $newFileName, 'attr' => $node->getAttributes());\n\t\t}\n\t}", "public function add(){\n $this->edit();\n }", "public function add($content);", "public function addContext($context)\n {\n if (!is_null($this->last_log)) {\n $this->last_log->addTechnicalContext($context);\n }\n\n return $this;\n }", "public function addAction()\n {\n return $this->editor($isEditAction=false);\n }", "protected function getEntry(string $contextId, string $id, array $options = []): array\n {\n\n $useRealpath = (bool)($options['realpath'] ?? false);\n\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n foreach ($ops as $op) {\n if ($id === $op['id']) {\n\n if (true === $useRealpath) {\n $op['realpath'] = $this->getEntryRealPathByOperation($contextId, $op, $options);\n }\n\n return $op;\n }\n }\n\n $this->error(\"Entry not found with id=\\\"$id\\\" and contextId=\\\"$contextId\\\".\");\n\n }", "public function addTaskFile($task_id){\n\n $err=\"\";\n $file=\"\";\n // Testons si le fichier n'est pas trop gros\n if ($_FILES['myfile']['error'] == 0){\n if ($_FILES['myfile']['size'] <= MAX_FILE_SIZE)\n {\n // On peut valider le fichier et le stocker définitivement\n if (!is_dir(REPOSITORY_PATH . '/'. $task_id .'/')) {\n mkdir(REPOSITORY_PATH . '/'. $task_id .'/', 0777, true);\n }\n //move file to 'uploads' repository\n $file=REPOSITORY_PATH . '/'. $task_id .'/'. basename($_FILES['myfile']['name']);\n move_uploaded_file($_FILES['myfile']['tmp_name'], $file);\n\n //retrieve the task team id\n $bdd = $this->connectDB();\n $req=$bdd->prepare('SELECT team from task WHERE id= ?');\n $req->execute(array($task_id));\n\n if ($req->rowCount()){\n $row = $req->fetch();\n $team=$row['team'];\n }\n\n //update history\n $history_manager=new historyManager();\n $history_manager->addEvent($team,'attach_file',$task_id);\n\n }else{\n $err=\"fichier trop volumineux\";\n }\n }else{\n $err=\"erreur lors de l'envoi du fichier\";\n }\n\n\n $file_add=array(\n 'error'=>$err,\n 'file'=>$file\n );\n\n return $file_add;\n }", "static private function _add($object) {\n $object->_className = get_class($object);\n $exists = self::doesExist($object);\n if ($exists) {\n return self::update($object);\n }\n $fileName = self::getFileNameByObject($object);\n if (!file_exists($fileName)) {\n @mkdir(dirname($fileName), '0755', TRUE);\n file_put_contents($fileName, NULL);\n }\n $data = json_encode($object);\n $data = $data . self::getConfig('delimiter') . PHP_EOL;\n if (file_put_contents($fileName, $data, FILE_APPEND)) {\n return $object->_id;\n }\n self::fail('Can not add ' . $object->_id);\n }", "public function addEntry ( $uri, $date = NULL, $save = TRUE, $is_url = FALSE )\n {\n if ( !$date )\n $date = date( 'Y-m-d' );\n \n $url = ( $is_url ) ? $uri : $this->pref . $uri; // make full path if it is not yet\n \n if ( ! $this->entryExists( $url ) )\n {\n try\n {\n // create the node and add the data.\n $new_url_node = $this->map->addChild( 'url' );\n $new_url_node->addChild( 'loc', $url );\n $new_url_node->addChild( 'lastmod', $date );\n\n if ( $save )\n $this->save();\n }\n catch (Exception $e)\n {\n Kohana::$log->add( LOG_ERR, $e->getMessage() );\n return FALSE;\n }\n }\n \n return TRUE;\n }", "public function add( $input )\n\t{\n\t\t$this->checkInput( $input, TRUE );\n\t\t\n\t\tif( !$this->m_form->m_error )\n\t\t{\n\t\t\t//only set upload_timestamp on add\n\t\t\t$input['setting_id'] = $this->m_common->m_db->insertBlank( 'common_Settings', 'setting_id' );\n\t\t\t$this->m_setting_id = (int) $input['setting_id'];\n\t\t\t$this->modify( $input, TRUE );\n\t\t\t$return = $this->m_setting_id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return = $this->m_form->m_error;\n\t\t}\n\t\treturn $return;\n\t}", "function addFile($path)\n {\n }", "function add_context_using(ContextInterface $context)\n {\n foil('context')->add($context);\n }", "public function add(string $path, string $namespace): self;", "public function addFile(string $path, string $entryName): Archive\n {\n $res = $this->zipArchive->addFile($path, $entryName);\n if ($res !== true) {\n throw new Package($this->zipArchive->getStatusString(), 66);\n }\n return $this;\n }", "function add()\n\t{\n\t\t$data[\"title\"] = _e(\"Language\");\t\n\t\t$CFG = $this->config->item('language_configure');\n\t\t\n\t\t ## for check admin or not\t ##\t\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\t\t\t\n\t\t\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\t\t\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"language\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"language_add\", $data, true, \"language\");\n\t\t$this->template->build_admin_output($data);\n\t}", "public function add() {\n\t\t$entry = $this->getEntryToAdd('clov_expense');\n\t\t\n\t\t// Default to the logged-in user.\n\t\t$loggedInUser = new User;\n\t\t$entry->setAttribute('clov_expense_payer', $loggedInUser->getUserID());\n\t\t\n\t\t// If the user got here from a project page, pre-fill the project \n\t\t// attribute.\n\t\tLoader::helper('clov_url', 'clov');\n\t\tif($project = ClovUrlHelper::loadReferrerPage('clov_project')) {\n\t\t\t$entry->setAttribute('clov_expense_project', $project->getCollectionID());\n\t\t}\n\t\t\n\t\t$this->set('entry', $entry);\n\t\t$this->set('showSaveDraft', true);\n\t\t$this->render('clov/default/add');\n\t}", "public function add(string $key, mixed $value, mixed $type = null): void;", "public function addOperation(string $operation): OperationInterface;", "public function add(Structure $structure)\n {\n // The the entry\n $this->map[$structure->getIdentifier()] = array(\n 'cTime' => $structure->getCTime(),\n 'identifier' => $structure->getIdentifier(),\n 'path' => $structure->getPath(),\n 'type' => $structure->getType(),\n 'hasAnnotations' => $structure->hasAnnotations(),\n 'enforced' => $structure->isEnforced()\n );\n\n // Persist the map\n return $this->save();\n }", "public function add()\n\t{\n\n\t\t$this->data['_pageview'] = $this->data[\"_directory\"] . \"edit\";\n\t\t$this->data['option'] \t\t= \"add\";\n\n\t\treturn view($this->constants[\"ADMINCMS_TEMPLATE_VIEW\"], $this->data);\n\t}", "public function addItem(){\r\n //角色或者权限名会在实例化这个model的时候load给该model\r\n $auth = \\Yii::$app->authManager;\r\n //如果添加的是角色\r\n if($this->type == self::T_ROLE){\r\n $item = $auth->createRole($this->name);\r\n $item->description = $this->description?:'创建['.$this->name.']角色';\r\n }else{\r\n $item = $auth->createPermission($this->name);\r\n $item->description = $this->description?:'创建['.$this->name.']权限';\r\n\r\n }\r\n return $auth->add($item);\r\n }", "public function add($entity);", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "public function add($item);", "public function add($item);", "private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }", "public function addAction() {\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t}", "public function addEntry($entry) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\t// TODO: convert author into authorid\n\t\t$authorId = 0;\n\t\t\n\t\tif ($entry->author) {\n\t\t\t$authorId = $this->_getAuthorId($entry->author);\n\t\t}\n\t\t\n\t\t$stm = $this->_prepareStatement('entry', 'add');\n\t\t$stm->execute(array(\n\t\t\t':url' => $entry->url,\n\t\t\t':title' => $entry->title,\n\t\t\t':id' => $entry->id,\n\t\t\t\n\t\t\t':author_id' => $authorId,\n\t\t\t':summary' => (!empty($entry->summary))?$entry->summary:'',\n\t\t\t':content' => (!empty($entry->content))?$entry->content:'',\n\t\t\t\n\t\t\t':published' => strtotime($entry->published),\n\t\t\t':updated' => (!empty($entry->updated))?strtotime($entry->updated):0\n\n\t\t));\n\n\t\tif ($this->_isPdoError($stm)) {\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\treturn true;\n\t}", "public function addResource(string $type, string $uri, $options = null, int $priority = self::PRIORITY_DEFAULT)\n {\n if(!empty($uri))\n {\n if(!isset($this->_store[$type]))\n {\n $this->_store[$type] = [$priority => []];\n }\n else if(!isset($this->_store[$type][$priority]))\n {\n $this->_store[$type][$priority] = [];\n }\n $this->_store[$type][$priority][$uri] = $options;\n }\n }", "protected function add(string $key, $value)\n { if ($value === Types::NO_VALUE && $this->file->directive('addValue')) {\n $value = $this->file->directive('addValue');\n }\n\n // Dont add nullish values: [], null, 0\n if (empty($value)) {\n return $this->file;\n }\n\n\n $existing = $this->get($key);\n\n if (is_array($existing)) {\n return $this->addToArray($key, $value, $existing);\n }\n\n if (is_string($existing)) {\n return $this->addToString($key, $value, $existing);\n }\n\n if (is_numeric($existing)) {\n return $this->addToNumeric($key, $value, $existing);\n }\n \n // Default\n if ($existing === null) {\n return $this->addToUnknownType($key, $value);\n }\n\n throw new Exception(\"Using 'add' on an existing type we cant handle! Current support: array/string/numeric/null\");\n }", "public function add(Path $item): void\n {\n $path = $item->getPath();\n $value = $item->getValue();\n $index = array_pop($path);\n $array = [];\n\n if (count($path) > 0) {\n if (false === is_int($index) && false === is_string($index)) {\n $index = (string) $index;\n }\n\n $this->insertIntoArray($array, $path, [$index => $value]);\n } elseif (null === $index) {\n $array = [$value];\n } else {\n $array = [$index => $value];\n }\n\n $this->data = array_replace_recursive($this->data, $array);\n }", "public function add($argument, $mode = self::POST_SOURCE, $index = self::APPEND, array $info = []) {\n $argument = [\n 'argument' => $argument,\n 'mode' => $mode,\n 'info' => $info,\n ];\n if ($index === self::APPEND) {\n $this->arguments[] = $argument;\n }\n elseif ($index === 0) {\n array_unshift($this->arguments, $argument);\n }\n else {\n array_splice($this->arguments, $index, 0, [$argument]);\n }\n return $this;\n }", "function addSource($type,$source){\n\t\t$return = array (\n\t\t\t'error' => false,\n\t\t\t'message' => ''\n\t\t);\n\t\t$src = new Source();\n\t\tswitch($type){\n\t\t\tcase 'file':\n\t\t\t\t$result = $src->addFile($source);\n\t\t\t\t$size = $source['size'];\n\t\t\t\tbreak;\n\t\t\tcase 'database':\n\t\t\t\t$result = $src->addDatabase($source);\n\t\t\t\tbreak;\n\t\t}//end switch\n\t\t//error checking\n\t\tif($result['error'] == true){\n\t\t\treturn $result;\n\t\t} else {\n\t\t\t$insert = array(\n\t\t\t\t\"name\" => $result['source_name'],\n\t\t\t\t\"parent_id\" => null,\n\t\t\t\t\"size\" => $size,\n\t\t\t\t\"description\" => \"File upload\",\n\t\t\t\t\"resource_type\" => \"source\",\n\t\t\t\t\"source_type\" => $type,\n\t\t\t\t'user_id' => $_SESSION['user_id'],\n\t\t\t\t'validation' => 'true',\n\t\t\t\t'location' => $result['location']\n\t\t\t);\n\t\t\t$db_result = $this->insertResource($insert);\n\t\t\tif($db_result['error'] == true){\n\t\t\t\treturn $db_result;\n\t\t\t}\n\t\t\t$return['message'] = 'Source '.$source['name'].' has been added successfully';\n\t\t\treturn $return;\n\t\t}\t\n\t}", "public function putExtraInfo($type, $value)\n\t{\n\t\tif (!isset($this->altStream)) {\n\t\t\tHTTP::header(\"$type: $value\", false);\n\t\t} else {\n\t\t\t$sxml = new SimpleXMLElement(xmlrpc_encode($value));\n\t\t\tfwrite($this->altStream, \"<extraInfo><type>\" . htmlentities($type) . \"</type>\" . $sxml->param->value->asXML() . \"</extraInfo>\"); \t\t\t\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "static function add($name,\n $clean = null,\n $url = null,\n $type = null,\n $user = null) {\n $type_id = ($type instanceof Type) ? $type->id : $type ;\n $user_id = ($user instanceof User) ? $user->id : $user ;\n\n $sql = SQL::current();\n $visitor = Visitor::current();\n $trigger = Trigger::current();\n\n $clean = oneof($clean, sanitize($name));\n\n $sql->insert(\n \"extensions\",\n array(\n \"name\" => $name,\n \"clean\" => $clean,\n \"url\" => oneof($url, self::check_url($clean)),\n \"type_id\" => $type_id,\n \"user_id\" => oneof($user_id, $visitor->id)\n )\n );\n\n $extension = new self($sql->latest());\n\n $trigger->call(\"add_extension\", $extension);\n\n\t\t\tif (module_enabled(\"cacher\"))\n\t\t\t Modules::$instances[\"cacher\"]->regenerate();\n\n return $extension;\n }", "public function add($type)\n {\n $rsp = new Response();\n\n if(!isAuthorized::isAdmin())\n {\n $rsp->setFailure(401, \"You are not authorized to do this action.\")\n ->send();\n\n return;\n }\n\n if($type === \"word\" && isset($_POST['word']))\n return $this->addWord();\n\n if($type === \"email\" && isset($_POST['email']))\n return $this->addEmail();\n\n $rsp->setFailure(400, \"Your request couldn't be executed. Check for wrong arguments or missing values.\")\n ->send();\n }", "public function addNewActivityType(\n $options\n ) {\n //check or get oauth token\n OAuthManager::getInstance()->checkAuthorization();\n\n //prepare query string for API call\n $_queryBuilder = '/activityTypes';\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl(Configuration::getBaseUri() . $_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => BaseController::USER_AGENT,\n 'Authorization' => sprintf('Bearer %1$s', Configuration::$oAuthToken->accessToken)\n );\n\n //prepare parameters\n $_parameters = array (\n 'name' => $this->val($options, 'name'),\n 'icon_key' => APIHelper::prepareFormFields($this->val($options, 'iconKey')),\n 'color' => $this->val($options, 'color')\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl, $_parameters);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::post($_queryUrl, $_headers, Request\\Body::Form($_parameters));\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n return CamelCaseHelper::keysToCamelCase($response->body);\n }", "public function add ($elType, $param = NULL, $place = 'head');", "private static function add_file($project, $entry, $base, $path_info) {\n if ($entry->attributes()->kind != 'file' )\n return;\n $path = (string) $entry->name;\n $link = $base . $path;\n $size = intval((string) $entry->size);\n\n $file = new File($path, $link, $size);\n $file->info = $path_info[$path];\n\n $project->files[] = $file;\n }", "public function actionAdd()\n\t{\n\t\t$tag = array(\n\t\t\t'tag_id' => 0\n\t\t);\n\n\t\treturn $this->_getTagAddEditResponse($tag);\n\t}", "public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}", "public function addFile($file);", "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "function travel_add($type) {\n $entity_type = travel_type_load_multiple($type);\n drupal_set_title(t('Create @name', array('@name' => entity_label('entity_type', $entity_type))));\n\n // Return form for the given entity bundle.\n $entity = entity_create('travel', array('type' => $type));\n $output = drupal_get_form('travel_form', $entity);\n return $output;\n}", "public function addAction() {\r\n\t\t$channel_id = intval($this->getInput('channel_id'));\r\n\t\t$this->assign('ad_types', $this->ad_types[$channel_id]);\r\n\t\t$this->assign('channel_id', $channel_id);\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t$this->assign('ad_type', $ad_type);\r\n\t\t\r\n\t\tif($channel_id == 2 || $channel_id == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t\tif($channel_id == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\t\t\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}", "public function add($path = '')\n\t{\n\t\tif (config_item('enable_hooks') !== FALSE) \n\t\t{\n\t\t\t$path = rtrim($path, '/');\n\n\t\t\tif (file_exists($path.'/config/hooks.php')) \n\t\t\t{\n\t\t\t\tinclude($path.'/config/hooks.php');\n\t\t\t}\t\n\t\t\tif (file_exists($path.'/config/'.ENVIRONMENT.'/hooks.php'))\n\t\t\t{\n\t\t\t\tinclude($path.'/config/'.ENVIRONMENT.'/hooks.php');\n\t\t\t}\n\t\t\t// If there are no hooks, we're done.\n\t\t\tif ( ! isset($hook) OR ! is_array($hook))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Name collisions\n\t\t\t$this->hooks = array_merge_recursive($hook, $this->hooks);\n\t\t\treturn $this->enabled = TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "static public function objectToAdd($type)\n\t{\n\t\treturn QuickBooks_Utilities::actionToObject($type) . 'Add';\n\t}", "protected function addOption($option, $value)\n\t{\n\t\treturn add_option($option,$value);\n\t}", "public function add();", "public function add();", "public function addPath($path, array $descriptions = null);", "public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }", "public function action_add()\r\n\t{\r\n\t\tif ( Request::current()->method() == Request::POST )\r\n\t\t{\r\n\t\t\treturn $this->_add();\r\n\t\t}\r\n\t\t\r\n\t\t$this->template->title = __('Add user');\r\n\t\t$this->breadcrumbs\r\n\t\t\t->add($this->template->title);\r\n\r\n\t\t// check if user have already enter something\r\n\t\t$data = Flash::get( 'post_data', array() );\r\n\r\n\t\t$user = new User( $data );\r\n\r\n\t\t$this->template->content = View::factory( 'user/edit', array(\r\n\t\t\t'action' => 'add',\r\n\t\t\t'user' => $user,\r\n\t\t\t'permissions' => Model_Permission::get_all()\r\n\t\t) );\r\n\t}", "abstract public function admin_add($type, $uri, Page $page);", "public function add()\n {\n //$this->log($this->request->data, 'debug');\n\n $humidity = $this->Humidities->newEntity();\n $humidity = $this->Humidities->patchEntity($humidity, [\n 'dt' => $this->request->data['datetime'],\n 'val' => $this->request->data['humidity']\n ]);\n\n $result = ['code' => 'S', 'message' => 'Success: humidity save is success.'];\n if (!$this->Humidities->save($humidity)) {\n $result = ['code' => 'E', 'message' => 'Error: unexpected error is occurred when save humidity data.'];\n }\n\n $this->set([\n 'result' => $result,\n '_serialize' => ['result']\n ]);\n }", "public function add(Command $command);", "public function addTrait($name, $path) {\n $source = $this->files->get($path);\n\n $pos = strpos($source, '{') + 1;\n\n $newSource = substr_replace($source, \"\\n use \\Baum\\NodeTrait;\\n\", $pos, 0);\n\n $this->files->put($path, $newSource);\n\n return $path;\n }", "protected function doGetEntryRealPathByOperation(string $contextId, array $operation, array $options = [])\n {\n return $this->getContextDir($contextId) . \"/files/\" . $operation['path'];\n }", "public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}", "public function appendOp($project_name, $source) {\n $source_path = $this->sourcePath($project_name, $source);\n return new AppendOp(NULL, $source_path);\n }", "function _options_push($option , $new_data, $group = null) {\n \n // si existe lo pone al dia\n if(_options_exist($option)){\n //echo \"$option \" ;\n _options_update($option , $new_data);\n \n \n }else{ // si no lo crea\n _options_add($option, $new_data, $group);\n\n }\n \n}" ]
[ "0.5631658", "0.5087558", "0.5044731", "0.49486068", "0.49457246", "0.49151456", "0.4877025", "0.48700997", "0.4814642", "0.48052913", "0.4791017", "0.47206935", "0.46757424", "0.4638905", "0.46332043", "0.45990634", "0.45632172", "0.45451874", "0.45377573", "0.4510024", "0.44786182", "0.44696727", "0.44489282", "0.44348058", "0.4425738", "0.44232473", "0.44232473", "0.44197625", "0.43169412", "0.43124053", "0.42961717", "0.42939204", "0.42818147", "0.4227989", "0.42255765", "0.42227936", "0.42212808", "0.42191395", "0.4213431", "0.41914412", "0.41839054", "0.41762388", "0.41760445", "0.41720217", "0.41637406", "0.41626477", "0.41537523", "0.41519967", "0.41481683", "0.4146381", "0.41406742", "0.41285393", "0.41271073", "0.41150108", "0.4104746", "0.41015273", "0.41010582", "0.40989593", "0.40971887", "0.40962023", "0.4088174", "0.4081261", "0.4079354", "0.4079354", "0.40740854", "0.40718827", "0.40675154", "0.40640536", "0.40556", "0.40537465", "0.40519398", "0.4049547", "0.4040126", "0.40299153", "0.4029133", "0.40261555", "0.40222105", "0.40209705", "0.4019884", "0.40175948", "0.400719", "0.40063816", "0.40048414", "0.4003753", "0.40020645", "0.4000901", "0.40005735", "0.39939407", "0.39939407", "0.39899126", "0.39888856", "0.39782238", "0.39736623", "0.39699152", "0.3969856", "0.39697787", "0.396714", "0.3965652", "0.3965163", "0.39650366" ]
0.6667624
0
Returns whether there is an nondeleted entry found in the the operations.byml file of the given context that matches the given id.
protected function hasEntry(string $contextId, string $id, array $allowedTypes = null): bool { $opFile = $this->getOperationsFile($contextId); $ops = BabyYamlUtil::readFile($opFile); $types = (null === $allowedTypes) ? ["add", "remove", "update"] : $allowedTypes; foreach ($ops as $k => $op) { if (false === in_array($op['type'], $types)) { continue; } if ($id === $op['id']) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isEntry($id) {\n\t\t$entry = $this->getEntry($id);\n\t\treturn !empty($entry->id);\n\t}", "public function hasEntry($id): bool {\n\t\treturn property_exists($this->stash, $id);\n\t}", "function exists($id)\n{\n\tif ($id && file_exists('datas/data')){\n\t\t$file = unserialize(file_get_contents('datas/data'));\n\t\tforeach ($file as $value){\n\t\t\tif(trim($value['nom']) === trim($id))\n\t\t\t\treturn true;\n\t\t}\n\t}\n return false;\n}", "function tflash_id_exits($id) {\n return TFLASH::id_exists($id);\n}", "protected function doContains($id)\n {\n return $this->yac->get($this->getHash($id)) !== false;\n }", "public function hasEntry($idEntry);", "private function ignoreDelRequest($id)\n {\n return $this->db_ignore_del_req($id);\n }", "public function exist( $data, $id ) {\n\t\t$query = $this->db->select( '*' )\n\t\t ->from( $this->_table )\n\t\t ->where( $this->name, $data )\n\t\t ->where_not_in( $this->primary_key, $id )\n\t\t ->get();\n\t\t$num = $query->num_rows();\n\t\tif ( $num == 0 ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkCanDelete($id){\r\n\t\t$sql = \"Select * From #languages Where id = $id\"; \r\n\t\t$rs = $this->_get($sql); \r\n\t\tif ($rs) {\r\n\t\t\tif ($rs->is_default == 0 && $rs->is_admin_default == 0 && $rs->is_developer_default == 0) return true; \r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected function doContains($id)\n {\n $filename = $this->getFilename($id);\n\n if (!is_file($filename)) {\n return false;\n }\n\n $cacheEntry = unserialize(file_get_contents($filename));\n\n return $cacheEntry['ttl'] === Cache::TTL_NO_EXPIRY || $cacheEntry['ttl'] > time();\n }", "public function offsetExists($id)\n {\n return parent::offsetExists(str_replace('_', '.', $id));\n }", "public function returnExists($id);", "public function isPerangkatDeleted($id)\n {\n $result = $this->getPerangkatById($id);\n if ($result[\"delete_at\"] === null) {\n return true;\n }\n return false;\n }", "function exists() {\n\t return !empty($this->id);\n\t}", "public static function checkId($id) {\n\n $session = Yii::$app->session;\n\n if (isset($session['order']) && array_search($id, $session['order']) !== false) {\n return 'true';\n } else {\n return 'false';\n }\n }", "static function exists($id) {\n $result = self::get($id);\n if (count($result) > 0) return true;\n return false;\n }", "public function has($id) {\n return array_key_exists($id, $this->definitions)\n || array_key_exists($id, $this->entries);\n }", "public function exists($id);", "public function exists($id);", "protected function entry_exists ($idXml)\r\n\t{\r\n\t\tglobal $xname;\r\n\t\t$query\t= \"SELECT id,id_xml FROM {$xname}_viviendas WHERE id_xml = {$idXml}\";\r\n\t\t$sql\t= $this->db->query($query);\r\n\t\tif ($sql) {\r\n\t\t\t$row\t= $sql->fetch_object();\r\n\t\t\tif (!empty($row->id_xml)) {\r\n\t\t\t\treturn $row->id;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function exists()\r\n\t{\r\n\t\treturn ( ! empty($this->id));\r\n\t}", "public function exists() {\n\t\treturn !is_null($this->id);\n\t}", "public function exist($id) {\n $entity = $this->entityTypeManager->getStorage('social_media_feed_twitter')->getQuery()\n ->condition('id', $id)\n ->execute();\n return (bool) $entity;\n }", "public static function exists(int $id): bool;", "public function has(string $id) : bool\n {\n return Filesystem::has($this->_file_location($id));\n }", "public function check_data_existence( $id, $action = '' ) {\n global $wpdb;\n\n // check if id is empty\n if ( empty( $id ) ) {\n return false;\n }\n\n $sql = <<<__SQL\nSELECT\n COUNT(*) as cnt\n , title\nFROM\n hc_file\nWHERE\n ID = %d\n AND deleteflg = %d\n__SQL;\n\n // parameter for the query\n $param = array( (int)$id, 0 );\n\n // prepare the sql\n $prepare = $wpdb->prepare( $sql, $param );\n\n // get the result\n $res = $wpdb->get_results( $prepare );\n\n // check if data exists\n if ( (int)$res[0]->cnt > 0 ) {\n return $res[0]->title;\n }\n\n return false;\n }", "private function isFileOwner($id){\n $query = \\Drupal::database()->select('ol_file', 'fr');\n $query->addField('fr', 'user_id');\n $query->condition('fr.id', $id);\n $uid = $query->execute()->fetchField();\n return ($uid == $this->current_user->id());\n }", "public function exists($id) {\n $path = $this->options['resource'];\n $path .= '/exists?data.' . $this->options['id_field'] . '=' . $id;\n $response = $this->get($path);\n return !!$response['body']['_id'];\n }", "public function isExistById($id){\n//\t\tprint_r(\"##Count=##\");\n//\t\tprint_r($this->find($id)->count());\n return $this->find($id)->count() ;\n }", "public function hasId()\n {\n return $this->id !== null;\n }", "public function has(string $id): bool;", "public static function delete($id){\n return false;\n }", "function isThreadDeleted($id){\n return (getSingleValue(\"SELECT COUNT(`id`) FROM `public_forums_threads` WHERE `deleted` = '1' AND `id` = '\" . escape(intval($id)) . \"'\") >= 1);\n }", "function exists($id);", "public function checkMovimentExists($id) {\n \n $moviment = $this->entityManager->getRepository(Moviment::class)\n ->findOneById($id);\n \n return $moviment !== null;\n }", "public function exists()\n {\n return ($this->id) ? true : false;\n }", "public function exists()\n {\n return ($this->id > 0) ? true : false;\n }", "public function isDeletable($id)\n\t{\n\t\t// TODO: Implement isDeletable() method.\n\t}", "public function exists()\n {\n return !empty($this->ID);\n }", "protected function fileExists($id) {\n\t\treturn !!$this->db->querySingle('SELECT COUNT(*) FROM image WHERE id = \"'.SQLite3::escapeString($id).'\"');\n\t}", "private function isIdExist($id) {\n\t\tif(!$id){\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$stmt = $this->dbh->prepare(\"SELECT * FROM candidates WHERE id=:id \");\n\t\t$stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t\t$stmt->execute(array(\":id\"=>$id));\n\t\t$row = $stmt->fetch();\n\t\n\t\treturn !empty($row);\n\t}", "protected function removeEntry(string $contextId, string $id)\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n\n\n /**\n * If the entry is found, we remove it directly from the operations.\n */\n $addTheDeleteEntry = true;\n $realpath = null;\n $op = null;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $addTheDeleteEntry = false;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n break;\n case \"update\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n $addTheDeleteEntry = true;\n break;\n }\n }\n }\n\n\n if (true === $addTheDeleteEntry) {\n $ops[] = [\n 'type' => \"remove\",\n 'id' => $id,\n ];\n }\n\n $this->onFileRemovedAfter($contextId, $id, $op, $realpath);\n\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n\n }", "function permissionIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id FROM permissions WHERE id = ? LIMIT 1\",array($id));\n\t$num_returns = $query->count();\n\n\tif ($num_returns > 0) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public static function exists($id) {\n $result = \\Drupal::database()->select('client', 'e')\n ->fields('e', ['id'])\n ->condition('id', $id, '=')\n ->execute()\n ->fetchField();\n return (bool) $result;\n }", "public function offsetExists($id)\n {\n return $this->offsetGet($id) !== null;\n }", "public function offsetExists($id)\n {\n return parent::offsetExists($id) ?: $this->parentBag->has($id) ?: $this->sharedBag->has($id);\n }", "public function existsIndirizzo($idAssociato){\n try{\n $query = \"SELECT ID FROM \".$this->table.\" WHERE id_associato = \".$idAssociato;\n if($this->wpdb->get_var($query) != null){\n return true;\n }\n return false;\n } catch (Exception $ex) {\n _e($ex);\n return false;\n }\n }", "public static function routeExistInCurrentLanguageById($id)\n {\n if (!is_numeric($id))\n return false;\n\n $route = ModelRoutes::findFirst([\n 'conditions' => 'id=:id: AND language_iso=:lang:',\n 'bind' => [\n 'id' => $id,\n 'lang' => ModelLanguage::getCurrentLanguage()\n ]\n ]);\n\n if($route)\n {\n return true;\n }\n\n return false;\n }", "public function checkCaseId($id)\n {\n try {\n $prepared_query = $this->conn->prepare(\"SELECT * FROM CASES WHERE deleted = 0 AND ID = :id\");\n $prepared_query->bindParam(\":id\", $id, PDO::PARAM_INT);\n $prepared_query->execute();\n $res = $prepared_query->fetchAll(PDO::FETCH_ASSOC);\n\n return sizeof($res) > 0;\n\n } catch (PDOException $ex) {\n }\n }", "public function isExisting($user, $id) {\n if (is_array($user->child) && !empty($user->child)) {\n foreach ($user->child as $key => $value) {\n if ($value->user_child_id == $id)\n return true;\n }\n }\n return false;\n }", "public function hasId()\n {\n $id = $this->getId();\n\n if (is_array($id)) {\n foreach ($id as $k => $v) {\n if (\"\" == \"$v\") {\n return false;\n }\n }\n }\n else if (\"\" == \"$id\") {\n return false;\n }\n\n return true;\n }", "public function hasId(){\n return $this->_has(17);\n }", "public function exists(string $id): bool\n {\n return isset($this->data[$id]);\n }", "public function has($id): bool\n {\n return isset($this->stack[$id]);\n }", "public function element_is_used($id) {\n if ($this->element_get_entries($id) > 0)\n return true;\n return false;\n }", "public static function existePorId($id)\n\t{\n\t\treturn CADModelo::existePorId($id);\n\t}", "public function hasDeletedAt() : bool;", "public function checkIsIdAvailable($id)\n {\n $condition = ['id' => $id];\n $response = $this->model->where($condition);\n \n return $response->count() > 0 ? false : true;\n }", "public function checkExits($spot_id) {\n return $this->_model->where('id', $spot_id)->exists();\n }", "protected function _exists( $id ) {\n\t\tif ( isset( $this->cache[ $id ] ) || array_key_exists( $id, $this->cache ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn $this->redis->exists( $id );\n\t\t}\n\t}", "public function exist($id){\n $rq = \"SELECT * FROM Objets WHERE id = :id\";\n $stmt = $this->pdo->prepare($rq);\n $data = array(\":id\" => $id);\n if(!$stmt->execute($data)){\n throw new Exception($pdo->errorInfo());\n }\n if($stmt->rowCount() > 0){\n return true;\n } else {\n $this->erreur = \"Objet inexistant\";\n return false;\n }\n }", "public function contain($id) {\n if (isset($this->properties()[$id])) {\n return true;\n }\n\n return $this->hasFallback();\n }", "private function _ownedByCurrentUser($id) {\n if (empty($id)) {\n return false;\n }\n $queryResult = $this->Entries->findById($id)->limit(1);\n foreach ($queryResult as $entry) {\n if ($entry['user_id'] === $this->Auth->user('id')) {\n return true;\n }\n }\n return false;\n }", "public function isGameExistant($id) \n {\n $sql = \"select * from game where game_id=? limit 1\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return true;\n else\n return false;\n }", "public function impliesExistingContentDeletion()\n {\n return $this->base == 'w';\n }", "public function hasId(): bool\n {\n return $this->id !== null;\n }", "public function isUnsigned($id)\n {\n $participant = Participant::where('id',$id)->first();\n return (count ($participant->teams) < 2);\n }", "public function deleteById($id) : bool\n {\n return false;\n }", "public function childExists($id) {\n\t\treturn ($this->getChild($id) !== null);\n\t}", "private function check_ID($id){\r\n\r\n $query = \"SELECT FROM users WHERE oauth_uid = ?\";\r\n $data = $this->_db->get_Row($query, $id);\r\n\r\n return ($this->_db->count_Rows($data) > 0) ? true : false;\r\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function hasId(){\n return $this->_has(1);\n }", "public function isDeleted()\n {\n return !empty($this->source['deleted']);\n }", "function check_id($id) {\n\tif ( !preg_match( '/^[A-z0-9]+$/', $id ) ) {\n\t\treturn false;\n\t}\n\t# Check\tif the directory actually exists\n\tglobal $basedir;\n\tif ( !file_exists( $basedir . \"/\" . $id . \"/\" ) ) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "function existe_tracker( $id ) {\n\treturn false !== obt_tracker($id);\n}", "public function __isset($id)\n {\n return $this->offsetExists($id);\n }", "protected function _hasIdentity($id) {\r\n \treturn array_key_exists($id, $this->_identityMap);\r\n }", "public function hasId(){\r\n return $this->_has(5);\r\n }", "abstract public function isUndeleting();", "abstract public function isUndeleting();", "public static function exists($id) {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::findOne(db::table($table), \" id = :id \", array(\":id\" => $id));\n\t\treturn (!(is_null($instance)));\n\t}", "public function has($id)\n {\n return !is_null($models = $this->all()) && array_key_exists($id, $models);\n }", "public function hasDeviceFileById()\n {\n return FALSE;\n }", "public function exists( $id ) {\r\r\n if ($this->refresh) {\r\r\n $this->init();\r\r\n $this->refresh = false;\r\r\n }\r\r\n return isset($this->instances[$id]);\r\r\n }", "public function exists($id) {\n\t\treturn boolval($this->getQueryClass()->filterById($id)->count());\n\t}", "public function has($id)\n {\n return $this->getContainer()->has($id);\n }", "protected function isDeleted(){\n return parent::isStatusOf(STATUS_TYPE_SSS_COMMENT_DELETED);\n }", "public static function isEmpty($id)\n {\n $count = 0;\n $carts = Cartt::all();\n foreach($carts as $cart)\n {\n if($cart->user_id == $id)\n $count++;\n }\n \n if($count > 0)\n $b = true;\n else\n $b = false;\n\n return $b;\n }", "public function hasId()\n {\n $attributes = $this->getAttributes();\n\n if ( ! isset($attributes['id'])) return false;\n\n return true;\n }", "public function isDeleted($a_node_id)\n\t{\n\t\treturn $this->isSaved($a_node_id);\n\t}", "public function isTransactionPartOf($id)\n {\n if ( $this->isTransactionPart() ) {\n return $id == $this->_transaction->id;\n } else {\n return false;\n }\n }", "public function has($id)\n {\n return (bool)$this->_engine->read($id);\n }" ]
[ "0.59771097", "0.5841355", "0.58016205", "0.57910895", "0.5771304", "0.5748312", "0.5742887", "0.57339513", "0.5707286", "0.57064027", "0.5701425", "0.5683903", "0.56824553", "0.5666182", "0.56511384", "0.56422174", "0.56095576", "0.5564062", "0.5564062", "0.55112636", "0.5498688", "0.5497766", "0.5469929", "0.5459215", "0.54552025", "0.5446226", "0.54055536", "0.5404729", "0.53982264", "0.53859645", "0.53843814", "0.5381049", "0.5374333", "0.53719264", "0.5341399", "0.5340161", "0.5337812", "0.53051054", "0.5300918", "0.52976453", "0.5287974", "0.52833074", "0.5253785", "0.5243635", "0.5238868", "0.52354", "0.5227793", "0.5227327", "0.5221122", "0.5217432", "0.52035856", "0.5201584", "0.51946056", "0.51917815", "0.51906806", "0.5184734", "0.51817214", "0.5181016", "0.517495", "0.51722586", "0.51622885", "0.515744", "0.5146055", "0.5137452", "0.51319784", "0.513155", "0.5130067", "0.51299405", "0.51205933", "0.5112238", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.5105794", "0.51024425", "0.5100085", "0.5088127", "0.5085945", "0.5082932", "0.50829077", "0.5074629", "0.5074629", "0.50725967", "0.5071311", "0.50663424", "0.50650835", "0.50544035", "0.5053123", "0.5045803", "0.50457525", "0.5044006", "0.5043552", "0.50433165", "0.50422025" ]
0.6014485
0
Removes the entry from the operations.byml file of the given context that matches the given id. If the entry didn't exist, the method will be silent.
protected function removeEntry(string $contextId, string $id) { $opFile = $this->getOperationsFile($contextId); $ops = BabyYamlUtil::readFile($opFile); /** * If the entry is found, we remove it directly from the operations. */ $addTheDeleteEntry = true; $realpath = null; $op = null; foreach ($ops as $k => $op) { if ($id === $op['id']) { $addTheDeleteEntry = false; $type = $op['type']; switch ($type) { case "add": $realpath = $this->getEntryRealPathByOperation($contextId, $op); if (file_exists($realpath)) { unlink($realpath); } unset($ops[$k]); break; case "update": $realpath = $this->getEntryRealPathByOperation($contextId, $op); if (file_exists($realpath)) { unlink($realpath); } unset($ops[$k]); $addTheDeleteEntry = true; break; } } } if (true === $addTheDeleteEntry) { $ops[] = [ 'type' => "remove", 'id' => $id, ]; } $this->onFileRemovedAfter($contextId, $id, $op, $realpath); $ops = array_merge($ops); BabyYamlUtil::writeFile($ops, $opFile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($id);", "public function remove($id);", "public static function remove($id)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('main', 'main. = ' . $id);\n }", "public function remove($id)\n\t{\n\t}", "abstract public function remove($id);", "public function destory($id)\n {\n }", "public static function delete(\\Scrivo\\Context $context, $id) {\n\t\t\\Scrivo\\ArgumentCheck::assertArgs(func_get_args(), array(\n\t\t\tnull,\n\t\t\tarray(\\Scrivo\\ArgumentCheck::TYPE_INTEGER)\n\t\t));\n\t\ttry {\n\t\t\tself::validateDelete($context, $id);\n\n\t\t\t$tmp = self::fetch($context, $id);\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM parent_list_item_definitions\n\t\t\t\tWHERE instance_id = :instId AND\n\t\t\t\t(list_item_definition_id = :id OR parent_list_item_definition_id = :id)\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\t$sth = $context->connection->prepare(\n\t\t\t\t\"DELETE FROM list_item_definition\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($context->cache[$id]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "public function destroy($id)\n { \n modelMst::where((new modelMst)->getKeyName(), $id)->update(['sys_status_aktif'=>'N']); \n }", "public function delete_by_id($id) {\n // We need to make sure we delete the item and all related files, which can be done with solr_filegroupingid.\n $this->get_search_client()->deleteByQuery('solr_filegroupingid:' . $id);\n $this->commit();\n }", "function deleteConf($id, $file=CONFERENCES){\n\t$confs = getJSON($file);\n\t$index = searchIndex($confs, $id);\n\tarray_splice($confs, $index, 1);\n\t\n\texport($confs, $file);\n}", "public function excluirLocalizacao($id){\n global $app;\n $sth = $this->PDO->prepare(\"DELETE FROM localizacao WHERE id = :id\");\n $sth ->bindValue(':id',$id);\n $app->render('default.php',[\"data\"=>['status'=>$sth->execute()==1]],200);\n }", "public function removeKeywordMMSFile($id)\n {\n\n $appStage = app_config('AppStage');\n if ($appStage == 'Demo') {\n return redirect('user/keywords')->with([\n 'message' => language_data('This Option is Disable In Demo Mode'),\n 'message_important' => true\n ]);\n }\n\n $keyword_id = explode('_', $id);\n if (isset($keyword_id) && is_array($keyword_id) && array_key_exists('1', $keyword_id)) {\n $keyword = Keywords::where('user_id', Auth::guard('client')->user()->id)->find($keyword_id['1']);\n\n if ($keyword) {\n $keyword->reply_mms = null;\n $keyword->save();\n\n return redirect('user/keywords')->with([\n 'message' => 'MMS file remove successfully'\n ]);\n }\n\n return redirect('user/keywords')->with([\n 'message' => 'Keyword information not found',\n 'message_important' => true\n ]);\n }\n\n return redirect('user/keywords')->with([\n 'message' => 'Invalid request',\n 'message_important' => true\n ]);\n }", "public function remove($id)\n {\n //please rely on SQL CASCADING ON DELETE\n return $this->resource\n ->model()\n ->setHistoryId($id)\n ->remove('history');\n }", "public function remove($id)\n {\n //please rely on SQL CASCADING ON DELETE\n return $this->resource\n ->model()\n ->setActionId($id)\n ->remove('action');\n }", "protected function eliminar($id)\n {\n }", "private function removeInformation($entryid){\n\t\t$query = Queries::removeinformation($entryid);\n\t\treturn $this->query($query);\n\t}", "protected function _deleteEntity( $id )\n\t\t{\n\t\t\t$data = explode( '__', $id );\n\t\t\t$template = array_pop( $data );\n\t\t\t$type = str_replace( '.phtml', '', $template );\n\t\t\t// Delete a file.\n\t\t\tif ( count( $data ) > 1 ) {\n\t\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\t\tif ( is_file( $directory . $id ) ) {\n\t\t\t\t\tunlink( $directory . $id );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function excluir($id){\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"DELETE FROM sedecchamados WHERE _id = :id\");\n\t\t\t$sth ->bindValue(':id',$id);\n\t\t\t$app->render('default.php',[\"data\"=>['status'=>$sth->execute()==1]],200); \n\t\t}", "public function remove($id)\n {\n $this->items->reject(function($value, $key) use ($id){\n return $value[$this->id] != $id;\n });\n }", "public function destroy($id)\n {\n //me dijieron que tengo que modificar un archivo, pero no se acuerdan cual para que funcione el delete, pero este funciona si lo pruebo sin el postman\n $habitacions = Habitacion::findOrFail($id); \n $habitacions->delete();\n return 'eliminado';\n }", "public function remove_information($i_id=0)\r\n {}", "public function remove_information($i_id=0)\r\n {}", "public function remove(string $id): bool;", "public function eliminar($id)\n {\n //\n }", "public function eliminar($id)\n {\n //\n }", "public function delete($id) {\n\t\t$file = $this->init['path']['data'] . $id . $this->init['data']['ext'];\n\t\t// If the file doesn't exist\n\t\tif (!file_exists($file)) {\n\t\t\t// Ooops, the file didn't exist\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Delete the file\n\t\t\tunlink($file);\n\t\t\treturn true;\n\t\t}\n\t}", "public static function remove ($id) {\n\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('orte', 'orte.plz = ' . $id);\n\n }", "public function deleteById($id) {\r\n \t$obj = $this->find($id)->current();\r\n \tif (!empty($obj)) {\r\n \t\t$obj->delete();\r\n \t}\r\n }", "public function delete($id) \r\n {\r\n $this->load(array('id=?',$id));\r\n $this->erase();\r\n }", "public function del($id)\n {\n }", "public function eliminarPorId($id)\n {\n }", "protected function updateEntry(string $contextId, string $id, ?string $path, array $meta, array $options = [])\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n $useMove = (bool)($options['move'] ?? false);\n\n\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n\n\n $meta = array_merge($op[\"meta\"], $meta);\n\n\n if (null !== $path) {\n\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n case \"update\":\n $op['meta'] = $meta;\n\n\n /**\n * The bottom line is that in the vfs entry, the path must be set (i.e. not null).\n * We allow for the user to pass path=null for an \"update\" action, for performances reasons, which means that the user\n * didn't change the file but might have updated the meta; however we still need to set the path\n * in the vfs entry.\n *\n * Therefore if the user passes path=null, we don't update the path (we keep the existing one)\n */\n if (null !== $relPath) {\n $op['path'] = $relPath;\n }\n $ops[$k] = $op;\n break;\n case \"remove\":\n $ops[$k] = [\n \"type\" => \"update\",\n \"id\" => $id,\n \"path\" => $relPath,\n \"meta\" => $meta,\n ];\n break;\n }\n\n\n break;\n }\n }\n\n if (false === $found) {\n return $this->addEntry($contextId, $id, $path, $meta, array_merge($options, [\n \"type\" => \"update\",\n ]));\n } else {\n // we only call this when a file has been really added to our vfs\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n\n $ops[$k] = $op;\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n return $op;\n }\n }", "public function destroy($id)\n {\n try {\n $entity = Dictionary::with('attached_file')->get()->find($id);\n $attached_file = AttachedFile::find($entity->getRelation('attached_file')->first()->id);\n $attached_file->delete();\n $entity->delete();\n $result_code = 'ok';\n }catch(\\Exception $e){\n $res = $e->getMessage();\n $result_code = 'error';\n }\n $form_type= 'operationa_result';\n return view('vendor.dictionary.settings', ['form_type' => $form_type, 'result' => $res, 'result_code' => $result_code]);\n }", "public function removeAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $levelStudy = $em->getRepository('SOStandardBundle:StdLevelStudy')->find($id); \n if(is_object($levelStudy) && $levelStudy->getId()){\n $em->remove($levelStudy);\n $em->flush(); // clear cached nodes\n return $this->redirect($this->generateUrl('bo_level_study_index')); \n }else{\n return $this->redirect($this->generateUrl('bo_level_study_index',array('error'=>'Invalid Argument'))); \n } \n }", "function removeUsedKeyByid($id) {\r\n\t\t$query = \"DELETE FROM \".TBL_USED_KEYS.\" WHERE key_id = :key_id\";\r\n\t\t$stmt = $this->connection->prepare($query);\r\n\t\t$stmt->execute(array(':key_id' => $id));\r\n\t}", "public function remove($id)\n {\n unset(static::$basket[$this->id][$id]);\n }", "public function destroy($id)\n {\n $line = Line::where('status', '=', 1)->findOrFail($id); \n $user = Auth::User();\n $lineUpdate[\"user_modified\"] = $user->id;\n $lineUpdate[\"status\"] = 0;\n \n $line->fill($lineUpdate)->save();\n\n return redirect()->route('lines.index')\n ->with('flash_message',\n 'Linea eliminada!');\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "protected function onFileRemovedAfter(string $contextId, string $id, ?array $op, ?string $realpath)\n {\n\n }", "public function remove($id)\n {\n $this->loadItems();\n if (array_key_exists($id, $this->items)) {\n unset($this->items[$id]);\n }\n $this->saveItems();\n }", "private function removeItem($id){\n $this->totalQty -= $this->items[$id]['qty'];\n $this->totalPrice -= $this->items[$id]['price'];\n unset($this->items[$id]);\n }", "function remove_meta_box($id, $screen, $context)\n {\n }", "function photo_cache_cleanup_by_id($id)\n{\n\t$result=$GLOBALS['db']->Execute(\"SELECT filename FROM \".PREFIX.\"photo_cache WHERE photo_id='\".linpha_addslashes($id).\"'\");\n\n\twhile($row=$result->FetchRow())\n\t{\n\t\t$file2del = get_full_path($row[0]);\n\t\tif(!@unlink($file2del)) {\n\t\t\tif(file_exists($file2del)) {\n\t\t\t\terror_log(\"photo_cache_cleanup_by_id unable to delete file: \".$file2del);\n\t\t\t}\n\t\t}\n\t}\n\t$GLOBALS['db']->Execute(\"DELETE FROM \".PREFIX.\"photo_cache WHERE photo_id='\".linpha_addslashes($id).\"'\");\n}", "public function destroy($id)\n\t{\n\t\techo 'edited song';\n\t}", "public function deleteEntry($id){\n\t\tif(!isset($id))return false;\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"]))return false;\n\n\t\t$entry = $this->getEntry($id);\n\t\t// check if the user is allowed to delete the entry\n\t\t// if not admin\n\t\tif(!$user[\"status\"]==DBConfig::$userStatus[\"admin\"]){\n\t\t\tif(!isset($entry[\"userid\"])\n\t\t\t\t|| $entry[\"userid\"]!=$user[\"id\"]){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif(!$this->removeIndex($id))return false;\n\t\tif(!$this->removeTags($id))return false;\n\t\tif(!$this->removeComments($id))return false;\n\t\tif(!$this->removeRatings($id))return false;\n\t\tif(!$this->removeReports($id))return false;\n\t\tif(!$this->removeImages($id))return false;\n\t\tif(!$this->removeInformation($id))return false;\n\t\tif(!$this->removeViews($id))return false;\n\n\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") deletes #\".$id.\" (\".$entry[\"title\"].\")\");\n\n\t\t$query = Queries::deleteentry($id);\n\t\treturn $this->query($query);\n\t}", "public function remove($id)\n {\n if (is_null($this->schema)) {\n throw SystemException::forNoSchema();\n }\n\n $table = $this->schema->getName();\n $primary = $this->schema->getPrimaryFieldName();\n //please rely on SQL CASCADING ON DELETE\n $model = $this->resource->model();\n $model[$primary] = $id;\n return $model->remove($table);\n }", "public function remove($data, array $context = [])\n {\n $data->setArchivage(true);\n $this->em->remove($data);\n $this->em->persist($data);\n //$this->em->remove($data);\n $this->em->flush();\n }", "public function actionExcluir($id)\n {\n $model = $this->findModel($id);\n\n self::deleteDir($model->localSalvarImagens());\n\n Yii::$app->session->setFlash('success', 'Produto excluído com sucesso');\n $model->delete();\n\n return $this->redirect(['index']);\n }", "function remove($id)\n {\n unset($this->collection[$id]);\n }", "function deleteContext($id)\n {\n \n $this->db->where('Id', $id);\n $this->db->delete('contextdetails');\n\n \n return $this->db->affected_rows();\n }", "public function actionRemove() {\n if (!isset($_POST['id']))\n die(\"what?\");\n $id = (int) $_POST['id'];\n if ($id < 1)\n die(\"unknown file\");\n CUserfiles::model()->RemoveFile($this->user_id, $id);\n\n echo \"OK\";\n }", "private function _remove($id)\n\t{\n\t\t$amuco_details_request_office = (array)$this->model_amuco_details_request_office->find($id);\n\t\t$this->insert_logs($amuco_details_request_office,'deleted');\n\t\n\t\t\n\t\t\n\t\treturn $this->model_amuco_details_request_office->remove($id);\n\t}", "public function delete($id)\n {\n $package = $this->find($id);\n $this->em->remove($package);\n $this->em->flush();\n }", "function delete($id) {\n\t\t$this->db->where('information_id', $id);\n\t\t$this->db->delete('information');\n\t}", "function remove_tag($id) {\n global $CFG;\n if (!is_numeric($id)) {\n return false;\n }\n\n $tag = get_record('helpdesk_ticket_tag', 'id', $id);\n\n $result = delete_records('helpdesk_ticket_tag', 'id', $id);\n if (!$result) {\n return false;\n }\n // Lets make an update!\n\n $dat = new stdClass;\n $dat->ticketid = $this->id;\n $dat->notes = get_string('tagremovewithnameof', 'block_helpdesk') . $tag->name;\n $dat->status = HELPDESK_NATIVE_UPDATE_UNTAG;\n $dat->type = HELPDESK_UPDATE_TYPE_DETAILED;\n\n if(!$this->add_update($dat)) {\n notify(get_string('cantaddupdate', 'block_helpdesk'));\n }\n\n $this->store();\n return true;\n }", "public function delete($id) {\n entity_delete($this->entityType, $id);\n }", "public function remove( $id ) {\n\t\tif ( file_exists( $this->cache_directory . $this->encode_id( $id ) ) && is_file( $this->cache_directory . $this->encode_id( $id ) ) ) {\n\t\t\treturn unlink( $this->cache_directory . $this->encode_id( $id ) );\n\t\t}\n\n\t\treturn false;\n\t}", "public function remove($id)\n\t{\n\t\treturn $this->_parent->entities->remove($id);\n\t}", "public function destroy($id){\n\t\t//\n\t}", "public function destroy($id){\n\t\t//\n\t}", "public function remove(int $id): void\n {\n $this->db->query(\"DELETE FROM pois WHERE id=\" . $id);\n // $this->db->query(\"DELETE FROM assoc_pois_missions WHERE poi=$id\");\n }", "public function deleteSet($id) {\n return parent::delete($id);\n }", "public function remove($id)\n {\n $this->offsetUnset($id);\n }", "public function removeFile(int $id): void\n {\n $stmt = $this->db->prepare(\"DELETE FROM comments WHERE file_id=:id_bind\");\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_INT);\n $stmt->execute();\n\n $stmt = $this->db->prepare(\"DELETE FROM files WHERE id=:id_bind\");\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_INT);\n $stmt->execute();\n }", "public function destroy($id)\n\t{\n\t\t \n\n\t\tif ($id == null)\n\t\t{\n\t\t\treturn Redirect::route('ProductIndex')->with('error_message', Lang::get('core.msg_error_getting_entry'));\n\t\t}\n\n\t\t$entry = ProductService::getEntries($id, null);\n\n\t\tif ($entry['status'] == 0)\n\t\t{\n\t\t\treturn Redirect::back()->with('error_message', Lang::get('core.msg_error_getting_entry'));\n\t\t}\n\n\t\tif (!is_object($entry['entry']))\n\t\t{\n\t\t\treturn Redirect::route('ProductIndex')->with('error_message', Lang::get('core.msg_error_getting_entry'));\n\t\t}\n\t\t$destroy = $this->repo->destroy($id);\n\n\t\tif ($destroy['status'] == 1)\n\t\t{\n\t\t\treturn Redirect::route('ProductIndex')->with('success_message', Lang::get('core.msg_success_entry_deleted'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Redirect::route('ProductIndex')->with('error_message', Lang::get('core.msg_error_deleting_entry'));\n\t\t}\n\t}", "public function remove($id)\n {\n return $this->delete('/images/' . $this->encodePath($id));\n }", "public function delete($id)\n\t {\n\t //\n\t }", "public function delete($id = null)\n\t{\n\t\t//\n\t}", "public function delete($id = null)\n\t{\n\t\t//\n\t}", "public function destroy($id)\n {\n // return ($lid);\n }", "public static function del(string $id): void\n\t{\n\t\t\\unset(static::$config[$id]);\n\t}", "function delete($objectID, $xmlFile = null){\r\n\t\tif($xmlFile == null)\r\n\t\t\t$xmlFile = constant(\"OBJECT_XML\");\r\n\t\t\t\r\n\t\t$xml = simplexml_load_file($xmlFile);\r\n\t\t$sxe = new SimpleXMLElement($xml->asXML());\r\n\t\t\r\n\t\tforeach($this->objectTyps as $typName => $typ){\r\n\t\t\t$nodes = $sxe->xpath(\"$typ/id[. = '$objectID']/parent::*\");\r\n\t\t\t$node = $nodes[0];\r\n\t\t\tif($node != null){\r\n\t\t\t\tunset($nodes[0][0]);\r\n\t\t\t\t$sxe->saveXML($xmlFile);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function deleteIni($id)\r\n\t{\r\n\t\tif(is_array($this->table) && count($this->table) == 2\r\n\t\t&& $this->table[0] == 'ini' && file_exists(INI_FILES.$this->table[1].'.ini'))\r\n\t\t{\r\n\t\t\t$ini = parse_ini_file(INI_FILES.$this->table[1].'.ini', true);\r\n\t\t\t\r\n\t\t\tforeach($ini as $key => $values)\r\n\t\t\t{\r\n\t\t\t\tif($key == strval($id))\r\n\t\t\t\t\tunset($ini[$key]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->writeIni(INI_FILES.$this->table[1].'.ini', $ini);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function deleteInfo($id)\r\n\t{\r\n\t\tif($id === null) { $this->errors[] = 'id-not-set'; }\r\n\r\n\t\tif(!preg_match('/^[0-9]+$/', $id)) { $this->errors[] = 'id-not-int'; }\r\n\r\n\t\t// Sanitize wit a triming so theid cant contain any tags etc. Also we ensure it is converted to an interger\r\n\t\t$sanId = (int)trim(strip_tags($id));\r\n\r\n\t\t// Escape the vaue and ensure that it cant touch the database\r\n\t\t$noneTaintedId = $this->db->escape_str($sanId);\r\n\r\n\t\tif(count($this->errors) === 0) {\r\n\r\n\t\t\t$sth = sprintf(\"UPDATE informations SET mode = 'deleted' WHERE informationid = %d\", $noneTaintedId);\r\n\r\n\t\t\tif($this->db->query($sth)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->errors[] = 'information-not-delete' . $id;\r\n\t\treturn false;\r\n\t}", "function edithistory_delete()\n{\n\tglobal $db, $mybb, $user;\n\t$db->update_query(\"edithistory\", array('uid' => 0), \"uid='{$user['uid']}'\");\n}", "public function remove($id) \n {\n $log = FezLog::get();\n \n if (array_key_exists($id, $this->_ids)) {\n $this->_ids[$id] = self::ACTION_REMOVE;\n $log->debug(\"Removed $id from queue\");\n }\n }", "public function delete( $id ) {\n\t\treturn delete_metadata( $this->type(), $id, $this->key );\n\t}", "public function destroy($id)\n {\n $line = Line::find($id);\n if ($line->fileentry_id !== 0) {\n if (Storage::exists('uploads/' . $line->fileentry->filename))\n Storage::delete('uploads/' . $line->fileentry->filename);\n $line->fileentry->delete();\n }\n $line->delete();\n return redirect('line');\n }", "protected function delete($id) {\n\t\t@unlink(self::getPath($id));\n\t\t$this->db->exec(\"DELETE FROM image WHERE id = '\".SQLite3::escapeString($id).\"'\");\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id) {\n\t\t//\n\t}", "public function destroy($id)\n\t{\n\t\t$this->context->find($id)->delete();\n\n\t\treturn Redirect::route('contexts.index');\n\t}", "private function excluir($id=false){\n\t\tif(!$id){return FALSE;}\n\t\t\n\t\t$pecas = $this->get_peca($id);\n\t\tif($pecas){\n\t\t\tforeach($pecas as $peca){\n\t\t\t\tif(!$this->excluir_peca($peca['id'])){ return FALSE;}\n\t\t\t}\n\t\t}\n\t\t$cronogramas = $this->get_cronograma($id);\n\t\t//var_dump($cronogramas); exit('55');\n\t\tif($cronogramas){\n\t\t\tforeach($cronogramas as\t$cronograma){\n\t\t\t\tif(!$this->excluir_cronograma($cronograma['id'])){ return FALSE;}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$referencias = $this->get_referencias($id);\n\t\t//var_dump($referencias); exit('55');\n\t\tif($referencias){\n\t\t\tforeach($referencias as\t$referencia){\n\t\t\t\tif(!$this->excluir_referencia($referencia['id'])){ return FALSE;}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sql='DELETE FROM briefing WHERE id='.$id;\n\t\t\n\t\t\n\t\t$this->db->query($sql);\n\t\tif($this->db->query($sql)){\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t\t//echo $this->db->errorCode();\n\t\t\t//$errorcode = $this->db->errorCode();\n\t\t}\n\t}", "public function destroy($id) // ta bort bokning\n\t{\n\t\t//\n\t}", "public function destroy($id)\n { // remove category and all listings associated?\n //\n }", "public function remove(ContextInterface $context);" ]
[ "0.5948843", "0.5948843", "0.5900992", "0.583733", "0.5799797", "0.56758916", "0.562627", "0.5555392", "0.5544114", "0.55012566", "0.5489974", "0.54875785", "0.54822344", "0.5481346", "0.5436856", "0.54347503", "0.5412185", "0.54042006", "0.53996235", "0.534955", "0.53168017", "0.53168017", "0.5310211", "0.53025186", "0.53025186", "0.5288038", "0.52791446", "0.5275526", "0.5273537", "0.52735007", "0.5270454", "0.52701056", "0.52535677", "0.5243244", "0.52396", "0.523106", "0.5225925", "0.5218964", "0.51969147", "0.51969147", "0.51969147", "0.51962924", "0.5190497", "0.5178656", "0.5177983", "0.51693857", "0.5158937", "0.5158843", "0.51587504", "0.51549685", "0.5147331", "0.5133792", "0.5125472", "0.51165706", "0.5112173", "0.5109096", "0.51075965", "0.5104283", "0.5102959", "0.5102627", "0.51025563", "0.50956225", "0.50956225", "0.50936544", "0.50936043", "0.5093493", "0.50909436", "0.50893104", "0.50851226", "0.5084704", "0.5083714", "0.5083714", "0.5081324", "0.5078262", "0.5077875", "0.50771445", "0.50675386", "0.5066609", "0.50656134", "0.506183", "0.50591826", "0.50545096", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50528604", "0.50466216", "0.5041225", "0.5040037", "0.5039754", "0.5036994" ]
0.76414067
0
Updates the entry in the operations.byml file of the given context that matches the given id. Throws an exception if the file wasn't found, or in case of problems. The options are: move: bool=false. Whether to move or copy the file from the given path to the destination.
protected function updateEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []) { if (null !== $path) { $path = $this->getRealPath($path); } $opFile = $this->getOperationsFile($contextId); $ops = BabyYamlUtil::readFile($opFile); $useMove = (bool)($options['move'] ?? false); $found = false; foreach ($ops as $k => $op) { if ($id === $op['id']) { $found = true; $meta = array_merge($op["meta"], $meta); if (null !== $path) { $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta); $dst = $this->getContextDir($contextId) . "/files/" . $relPath; if ($path !== $dst) { if (true === $useMove) { FileSystemTool::move($path, $dst); } else { FileSystemTool::copyFile($path, $dst); } } } else { $relPath = null; $dst = null; } $type = $op['type']; switch ($type) { case "add": case "update": $op['meta'] = $meta; /** * The bottom line is that in the vfs entry, the path must be set (i.e. not null). * We allow for the user to pass path=null for an "update" action, for performances reasons, which means that the user * didn't change the file but might have updated the meta; however we still need to set the path * in the vfs entry. * * Therefore if the user passes path=null, we don't update the path (we keep the existing one) */ if (null !== $relPath) { $op['path'] = $relPath; } $ops[$k] = $op; break; case "remove": $ops[$k] = [ "type" => "update", "id" => $id, "path" => $relPath, "meta" => $meta, ]; break; } break; } } if (false === $found) { return $this->addEntry($contextId, $id, $path, $meta, array_merge($options, [ "type" => "update", ])); } else { // we only call this when a file has been really added to our vfs $this->onFileAddedAfter($contextId, $op, $path, $dst, $options); $ops[$k] = $op; $ops = array_merge($ops); BabyYamlUtil::writeFile($ops, $opFile); return $op; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []): array\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $type = $options['type'] ?? 'add';\n $useMove = (bool)($options['move'] ?? false);\n\n\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n $ops = [];\n if (true === file_exists($opFile)) {\n $ops = BabyYamlUtil::readFile($opFile);\n }\n\n\n if (null !== $path) {\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $addOperation = [\n 'type' => $type,\n 'id' => $id,\n 'path' => $relPath,\n 'meta' => $meta,\n ];\n\n\n //--------------------------------------------\n // ADDING THE OPERATION (see heuristic notes for more details)\n //--------------------------------------------\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $ops[$k] = $addOperation;\n break;\n default:\n $this->error(\"Operation \\\"$type\\\" rejected. You cannot add this entry because it already exists with type=\\\"$type\\\" for id \\\"$id\\\".\");\n break;\n }\n }\n }\n\n\n if (false === $found) {\n $op = $addOperation;\n }\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n if (false === $found) {\n $ops[] = $op;\n } else {\n $ops[$k] = $op;\n }\n\n\n BabyYamlUtil::writeFile($ops, $opFile);\n\n\n return $op;\n }", "protected function removeEntry(string $contextId, string $id)\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n\n\n /**\n * If the entry is found, we remove it directly from the operations.\n */\n $addTheDeleteEntry = true;\n $realpath = null;\n $op = null;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $addTheDeleteEntry = false;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n break;\n case \"update\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n $addTheDeleteEntry = true;\n break;\n }\n }\n }\n\n\n if (true === $addTheDeleteEntry) {\n $ops[] = [\n 'type' => \"remove\",\n 'id' => $id,\n ];\n }\n\n $this->onFileRemovedAfter($contextId, $id, $op, $realpath);\n\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n\n }", "public function update($id, $data) {\n\t\t$file = $this->init['path']['data'] . $id . $this->init['data']['ext'];\n\t\t// If the file doesn't exist\n\t\tif (!file_exists($file)) {\n\t\t\t// Ooops, the file didn't exist\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Replace the existing contents with the data\n\t\t\treturn file_put_contents($file, $data);\n\t\t}\n\t}", "public function update($id) {\n\t\t//\n\t}", "public function update($id) {\n\t\t//\n\t}", "public function update($id) {\n\t\t//\n\t}", "public function update($id) {\n\t\t//\n\t}", "public function update($id) //Ändra befintlig boking\n\t{\n\t\t//\n\t}", "public function update($id){\n\t\t//\n\t}", "public function update($id){\n\t\t//\n\t}", "public function update($id = null)\n\t{\n\t\t//\n\t}", "public function update($id);", "public function update($id);", "public function update($id) {\r\n //\r\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->scenario = 'update';\n $request = Yii::$app->request;\n $fileSuccess = NULL;\n $photoPathOld = NULL;\n\n if ($request->isPost) {\n\n $modelLoaded = $model->load($request->post());\n\n if($model->photo){\n $photoPathOld = Yii::$app->basePath.'/web/'.$model->photo; //get the path to the existing file\n }\n\n if (!$modelLoaded) {\n return $this->render('update', [\n 'model' => $model,\n 'errorMessage' => \"Missing parameters!\",\n ]);\n }\n\n $files = UploadedFile::getInstances($model, 'files');\n\n if($files){\n foreach ($files as $file) {\n $photoPath = 'Uploads/' . $model->city->name . '---' . $file->name;\n if(file_exists($photoPathOld)){\n if(strcmp($photoPath, $photoPathOld) !== 0){\n @unlink($photoPathOld);\n }\n }\n $fileSuccess = $file->saveAs($photoPath);\n }\n }\n\n if ($files && !$fileSuccess) {\n return $this->render('update', [\n 'model' => $model,\n 'errorMessage' => \"Cannot update file to disk!\",\n ]);\n }\n\n if ($files && $fileSuccess){\n // save the path in the db column\n $model->setAttribute('photo', $photoPath);\n }\n\n if ($model->validate() && $model->save()) {\n return $this->redirect(['view', 'id' => $model->city_photo_id]);\n }\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public function update($id) {\n //\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n \n $model->imageFileName_Fl = UploadedFile::getInstance($model, 'imageFileName_Fl');\n if ($model->imageFileName_Fl && $model->validate()) { \n $s2=$model->id . '_' . $model->imageFileName_Fl->baseName . '.' . $model->imageFileName_Fl->extension; \n $model->imageFileName_Fl->saveAs(Yii::getAlias('@frontend').'/web/uploads/' . $s2);\n $model->imageFileName=$s2;\n }\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function update($id)\n\t{\n\t}", "public function update($id)\r\n {\r\n //\r\n }", "public function update($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function update($id)\n\t{\n\n\t}", "public function update($id)\n\t{\n\n\t}", "public function update($id)\n\t{\n\n\t}", "public function update($id)\n\t{\n\t\t\n\t}", "public function update($id)\n\t{\n\t\t\n\t}", "public function update($id = null)\n {\n //\n }", "public function update($id = null)\n {\n //\n }", "public function update($id)\r\n\t{\r\n\t\t//\r\n\t}", "public function update($id)\r\n\t{\r\n\t\t//\r\n\t}", "public function update($id)\r\n\t{\r\n\t\t//\r\n\t}", "public function update($id)\n {\n \n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }", "public function update($id)\n {\n //\n }" ]
[ "0.5894428", "0.58074415", "0.552832", "0.54824644", "0.54824644", "0.54824644", "0.54824644", "0.5441531", "0.5419202", "0.5419202", "0.5387602", "0.538625", "0.538625", "0.53787184", "0.53642166", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53495616", "0.5347719", "0.53297603", "0.53257316", "0.5324877", "0.53198344", "0.53198344", "0.53198344", "0.53109753", "0.53109753", "0.530996", "0.530996", "0.53096706", "0.53096706", "0.53096706", "0.5308327", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919", "0.5303919" ]
0.72480106
0
Returns the entry in the operations.byml file of the given context that matches the given id. The options are: realpath: bool=false. If true, the realpath entry is added to the returned array, and contains the realpath to the file. This only works if the operation type allows it (i.e. not remove).
protected function getEntry(string $contextId, string $id, array $options = []): array { $useRealpath = (bool)($options['realpath'] ?? false); $opFile = $this->getOperationsFile($contextId); $ops = BabyYamlUtil::readFile($opFile); foreach ($ops as $op) { if ($id === $op['id']) { if (true === $useRealpath) { $op['realpath'] = $this->getEntryRealPathByOperation($contextId, $op, $options); } return $op; } } $this->error("Entry not found with id=\"$id\" and contextId=\"$contextId\"."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []): array\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $type = $options['type'] ?? 'add';\n $useMove = (bool)($options['move'] ?? false);\n\n\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n $ops = [];\n if (true === file_exists($opFile)) {\n $ops = BabyYamlUtil::readFile($opFile);\n }\n\n\n if (null !== $path) {\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $addOperation = [\n 'type' => $type,\n 'id' => $id,\n 'path' => $relPath,\n 'meta' => $meta,\n ];\n\n\n //--------------------------------------------\n // ADDING THE OPERATION (see heuristic notes for more details)\n //--------------------------------------------\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $ops[$k] = $addOperation;\n break;\n default:\n $this->error(\"Operation \\\"$type\\\" rejected. You cannot add this entry because it already exists with type=\\\"$type\\\" for id \\\"$id\\\".\");\n break;\n }\n }\n }\n\n\n if (false === $found) {\n $op = $addOperation;\n }\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n if (false === $found) {\n $ops[] = $op;\n } else {\n $ops[$k] = $op;\n }\n\n\n BabyYamlUtil::writeFile($ops, $opFile);\n\n\n return $op;\n }", "private function getEntryRealPathByOperation(string $contextId, array $operation, array $options = []): string\n {\n if ('remove' === $operation['type']) {\n $id = $operation['id'];\n $this->error(\"Cannot get realpath from a remove operation, with contextId=\\\"$contextId\\\" and id=\\\"$id\\\".\");\n }\n\n return $this->doGetEntryRealPathByOperation($contextId, $operation, $options);\n }", "protected function getRawOperations(string $contextId): array\n {\n\n $ret = [];\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n if (true === file_exists($opFile)) {\n return BabyYamlUtil::readFile($opFile);\n }\n return $ret;\n }", "public function get($id, $contents = false)\n {\n $data = $this->db->one(\n \"SELECT id, name, location, hash, bytesize, settings FROM {$this->table} WHERE id = ?\",\n $id\n );\n if (!$data) {\n throw new FileNotFoundException('File not found', 404);\n }\n if (!is_file($this->baseDirectory . $data['location'])) {\n throw new FileNotFoundException('File not found', 404);\n }\n return [\n 'id' => $data['id'],\n 'name' => $data['name'],\n 'path' => $contents ? $this->baseDirectory . $data['location'] : null,\n 'complete' => true,\n 'hash' => $data['hash'],\n 'size' => $data['bytesize'],\n 'settings' => json_decode($data['settings'], true)\n ];\n }", "protected function getOperationsFile(string $contextId): string\n {\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n if (false === file_exists($opFile)) {\n $ops = [];\n BabyYamlUtil::writeFile($ops, $opFile);\n }\n return $opFile;\n }", "protected function updateEntry(string $contextId, string $id, ?string $path, array $meta, array $options = [])\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n $useMove = (bool)($options['move'] ?? false);\n\n\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n\n\n $meta = array_merge($op[\"meta\"], $meta);\n\n\n if (null !== $path) {\n\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n case \"update\":\n $op['meta'] = $meta;\n\n\n /**\n * The bottom line is that in the vfs entry, the path must be set (i.e. not null).\n * We allow for the user to pass path=null for an \"update\" action, for performances reasons, which means that the user\n * didn't change the file but might have updated the meta; however we still need to set the path\n * in the vfs entry.\n *\n * Therefore if the user passes path=null, we don't update the path (we keep the existing one)\n */\n if (null !== $relPath) {\n $op['path'] = $relPath;\n }\n $ops[$k] = $op;\n break;\n case \"remove\":\n $ops[$k] = [\n \"type\" => \"update\",\n \"id\" => $id,\n \"path\" => $relPath,\n \"meta\" => $meta,\n ];\n break;\n }\n\n\n break;\n }\n }\n\n if (false === $found) {\n return $this->addEntry($contextId, $id, $path, $meta, array_merge($options, [\n \"type\" => \"update\",\n ]));\n } else {\n // we only call this when a file has been really added to our vfs\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n\n $ops[$k] = $op;\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n return $op;\n }\n }", "protected function doGetEntryRealPathByOperation(string $contextId, array $operation, array $options = [])\n {\n return $this->getContextDir($contextId) . \"/files/\" . $operation['path'];\n }", "public function getPath($id);", "protected function removeEntry(string $contextId, string $id)\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n\n\n /**\n * If the entry is found, we remove it directly from the operations.\n */\n $addTheDeleteEntry = true;\n $realpath = null;\n $op = null;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $addTheDeleteEntry = false;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n break;\n case \"update\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n $addTheDeleteEntry = true;\n break;\n }\n }\n }\n\n\n if (true === $addTheDeleteEntry) {\n $ops[] = [\n 'type' => \"remove\",\n 'id' => $id,\n ];\n }\n\n $this->onFileRemovedAfter($contextId, $id, $op, $realpath);\n\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n\n }", "public static function find($id)\n {\n $results = parent::find($id);\n return empty($results) ? null : new File ($results);\n }", "public function get_file_detail( $id ) {\n global $wpdb;\n\n // check if id is not empty\n if ( empty( $id ) ) {\n return false;\n }\n\n $sql = <<<__SQL\nSELECT\n ID\n , title\n , content\n , date_data as date\n , tag\n , file\n , image_id\n , dtcreate\n , dtupdate\n , deleteflg\nFROM\n hc_file\nWHERE\n ID = %d\n AND deleteflg = %d\n__SQL;\n // get the param for the sql\n $param = array( (int)$id, 0 );\n\n // prepare the sql\n $prepare = $wpdb->prepare( $sql, $param );\n\n // get the result\n $res = $wpdb->get_results( $prepare );\n\n // check if result is empty\n if ( empty( $res ) ) {\n return false;\n }\n\n return $res[0];\n }", "protected function getFile($id) {\n\t\t/* load from database */\n\t\t$data = $this->db->querySingle('SELECT * FROM image WHERE id = \"'.SQLite3::escapeString($id).'\"', true);\n\t\t$path = self::getPath($id);\n\t\tif (!$data || !is_file($path)) {\n\t\t\t/* delete leftovers */\n\t\t\t$this->delete($id);\n\t\t\tthrow new QuicksandException(\"The file you are looking for does not exist (anymore).\");\n\t\t}\n\t\treturn $data + array('path' => $path);\n\t}", "public static function fetchContent($id)\n {\n $file = static::data($id);\n $path = Configure::read('FileApi.basePath') . $file->category . DS . $file->tag . DS . $file->filename;\n\n return file_exists($path) ? file_get_contents($path) : false;\n }", "public function get_file_file($id)\n\t{\n\t\tif (!$this->is_allowed('dokumentasi_tol_update', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => 'Image not loaded, you do not have permission to access'\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$dokumentasi_tol = $this->model_dokumentasi_tol->find($id);\n\n\t\techo $this->get_file([\n 'uuid' => $id, \n 'delete_by' => 'id', \n 'field_name' => 'file', \n 'table_name' => 'dokumentasi_tol',\n 'primary_key' => 'kode_dtl',\n 'upload_path' => 'uploads/dokumentasi_tol/',\n 'delete_endpoint' => 'administrator/dokumentasi_tol/delete_file_file'\n ]);\n\t}", "public function getPathFile($id){\n $sql = \"SELECT pathFile FROM fanart WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $path = mysqli_fetch_all($res)[0][0];\n return $path;\n }", "function get($file_id) {\r\n\r\n $f3 = \\Base::instance();\r\n\r\n $files_db=new DB\\SQL\\Mapper($f3->get('DB'),'files');\r\n $file=$files_db->load(array('file_id=?',$file_id));\r\n\r\n $out = array(\r\n \"file_id\"=>$file->file_id,\r\n \"version_id\"=>$file->version_id,\r\n \"quality\"=>$file->quality,\r\n \"complete\"=>$file->complete,\r\n \"is_master\"=>$file->is_master,\r\n \"hidden\"=>$file->hidden,\r\n \"filename\"=>$file->filename,\r\n \"path\"=>$file->path, // todo check full_path still exists, is sanitized\r\n \"width\"=>$file->width,\r\n \"height\"=>$file->height,\r\n \"filesize\"=>$file->filesize,\r\n \"filesize_h\"=>format_bytes($file->filesize,0)\r\n );\r\n\r\n return $out;\r\n }", "public static function getPath($id);", "public static function get($id, $contents = false)\n {\n $file = static::data($id);\n $file->path = Configure::read('FileApi.basePath') . $file->category . DS . $file->tag . DS . $file->filename;\n if ($contents !== false) {\n $file->contents = file_get_contents(Configure::read('FileApi.basePath') . $file->category . DS . $file->tag . DS . $file->filename);\n }\n\n return $file;\n }", "function get_detail_files_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE data_id = ? AND ref_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function getFile($id, array $options = [])\n {\n $path = $this->buildPath(static::FILE_ENDPOINT, [$id]);\n $request = $this->performRequest('GET', $path, ['query' => $options]);\n return $request->data;\n }", "public function getPath($id)\n {\n $sql = \"SELECT p.id, p.\" . $this->descriptor\n . \" FROM \" . $this->table . \" n, \" . $this->table . \" p \"\n . \" WHERE n.lft BETWEEN p.lft AND p.rgt AND n.id = ? ORDER BY p.lft;\";\n\n $sth = $this->db->prepare($sql);\n $sth->setFetchMode(\\PDO::FETCH_OBJ);\n $sth->execute([$id]);\n return $sth->fetch();\n }", "public function getFileById(int $id)\n {\n $sql = \"SELECT files.*, users.name as user_name, users.avatar as user_avatar FROM files LEFT JOIN users on files.user_id = users.id WHERE files.id=:id_bind\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_STR);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_CLASS, 'Filehosting\\Entity\\File');\n return !empty($result) ? $result[0] : null;\n }", "public function getFullFolderInfoById ($id)\n {\n $fieldMap = $this->getMappableFields(\n array('f' => 'folder_data' , 'ft' => 'folder_type_data'));\n $query = array(\n 'table' => 'folder_data f JOIN folder_type_data ft ON ft.id=f.folder_type_id' ,\n 'fields' => $this->getFieldListFromMap($fieldMap) ,\n 'where' => 'f.id=' . (int) $id);\n $data = $this->getRowFromMappedFields($fieldMap, $this->conn->selectFirst($query));\n if (! count($data)) {\n return array();\n }\n $data['f']['FolderType'] = $data['ft'];\n $data = $data['f'];\n $otData = $this->conn->select(\n array(\n 'table' => 'folder_type_object_type_rel r JOIN object_type_data ot ON ot.id=r.object_type_id' ,\n 'fields' => 'ot.*' ,\n 'where' => 'r.folder_type_id ='.$data['FolderType']['id'],\n ));\n $otIds = array();\n foreach ($otData as $row) {\n $otIds[] = $row['id'];\n }\n if (count($otIds)) {\n $otIds = implode(', ', $otIds);\n $tmp = $this->conn->select(\n array('table' => 'object_type_column_data' ,\n 'where' => \"object_type_id IN ($otIds)\",\n 'orderBy'=>'column_number ASC'));\n } else {\n $tmp = array();\n }\n $columnData = array();\n foreach ($tmp as $row) {\n if (! isset($columnData[$row['object_type_id']])) {\n $columnData[$row['object_type_id']] = array(\n $row);\n } else {\n $columnData[$row['object_type_id']][] = $row;\n }\n }\n foreach($otData as $key=>$row) {\n if (isset($columnData[$row['id']])) {\n $otData[$key]['Columns'] = $columnData[$row['id']];\n } else {\n $otData[$key]['Columns'] = array();\n }\n }\n $data['FolderType']['ObjectTypes'] = $otData;\n return $data;\n }", "public function getOperationsFile($path) {\n\n $operations = array();\n if (isset($this->filesOperations[$path])) {\n foreach ($this->filesOperations[$path] as $operationPath) {\n $operations = array_merge($operations, $this->getOperation($operationPath));\n }\n }\n\n return $operations;\n }", "public static function data($id)\n {\n $filesTable = static::_setupFilesTable();\n $file = $filesTable->get($id);\n if (!empty($file) && is_object($file)) {\n return $file;\n }\n throw new NotFoundException('The Panda was unable to retrieve the requested file.');\n }", "abstract protected function getFileId(string $contextId, string $path, array $meta): string;", "public function getPhotoWithActions($id)\n {\n $queue = $this->getBatchRequest();\n $this->db->batch($queue)->select(\"SELECT * FROM `{$this->domainPhoto}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->db->batch($queue)->select(\"SELECT * FROM `{$this->domainAction}` WHERE targetType='photo' AND targetId='{$id}'\", array('ConsistentRead' => 'true'));\n $responses = $this->db->batch($queue)->send();\n $this->logErrors($responses);\n if(!$responses->areOk())\n return false;\n\n\n if(isset($responses[0]->body->SelectResult->Item))\n $photo = self::normalizePhoto($responses[0]->body->SelectResult->Item);\n\n $photo['actions'] = array();\n foreach($responses[1]->body->SelectResult->Item as $action)\n $photo['actions'][] = $this->normalizeAction($action);\n\n return $photo;\n }", "public static function get($id = null) {\r\n if ($resp = static::external($path)) return $resp;\r\n // get data at node\r\n $data = static::getNodeData();\r\n // get data at id\r\n return static::getDataAtPath($data, $id);\r\n }", "public function getFileById($conn, $id){\n\t\t//preparo lo statement che mi ricava tutti i dati di una determinata informazione \t\t\t\n\t\t$sth = $conn->prepare(\"select * from Filmato_Presentazione where id = :id\");\n\t\t$sth->bindParam(':id', $id, PDO::PARAM_INT);\n\t\t$sth->execute();\n\t\t//voglio solo 1 record\n\t\t$result = $sth->fetch(PDO::FETCH_ASSOC);\n\t\treturn $result;\n\t}", "function fetchModuleFile($id)\n{\n if (!empty($id)) {\n $sql = \"SELECT file FROM modules WHERE id = \";\n $sql .= sql_escape($id);\n $sql .= \" LIMIT 1 \";\n $row = fetchOne($sql);\n }\n return !empty($row) ? $row['file'] : null;\n}", "function loadConf($id, $file=CONFERENCES)\n{\n\t$confs = getJSON($file);\n\t$index = searchIndex($confs, $id);\n\t$result = NULL;\n\t\n\tif($index >= 0){\n\t\t$result = $confs[$index];\n\t}\n\treturn $result;\n}", "public function readFile($id){\n\n if(!is_string($id) || StringUtils::isEmpty($id)){\n\n throw new UnexpectedValueException('id must be a non empty string');\n }\n\n return $this->_filesManager->readFile($this->_rootPath.DIRECTORY_SEPARATOR.$id);\n }", "public static function getPath($id) {\n\t\treturn self::$defaultInstance->getPath($id);\n\t}", "public static function get($id)\n\t{\n\t\treturn (array) BackendModel::getDB()->getRecord('SELECT i.*, UNIX_TIMESTAMP(i.created_on) AS created_on, UNIX_TIMESTAMP(i.edited_on) AS edited_on\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM content_blocks AS i\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE i.id = ? AND i.status = ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray((int) $id, 'active'));\n\t}", "public function edit( $id )\n {\n return [\n 'cores' => $this->cores,\n 'result' => $this->repository->findById( $id ),\n 'route' => ( $this->prefix( Route::currentRouteName() ) ),\n 'temas' => $this->temas\n ];\n }", "public function getFile(string $id) : string {\n return file_get_contents($this->end_point, false, stream_context_create([\n 'http' => [\n 'method' => 'POST',\n 'header' => \"Content-Type: application/json\\r\\n\",\n 'content' => json_encode([\n 'action' => 'file_file_by_id',\n 'id' => $id,\n 'session' => $this->session\n ])\n ]\n ]));\n }", "public static function find(int $id)\n {\n return self::findIn(File::class, $id);\n }", "public static function get($id, $ruta = ''){\n\t\t\tif( empty($ruta) && !empty(self::$cachedir) ) $ruta = self::$cachedir;\n\t\t\t$archivo = glob(\"{$ruta}/{$id}_*\");\n\t\t\tif( $archivo ){\n\t\t\t\t$archivo = explode('/', $archivo[0]);\n\t\t\t\t$archivo = $archivo[count($archivo)-1];\n\t\t\t\t$caducidad = explode('_', $archivo)[1];\n\t\t\t\tif( $caducidad > date('U') )\n\t\t\t\t\treturn file_get_contents(\"{$ruta}/{$id}_{$caducidad}\");\n\t\t\t\telse self::delete($id, $ruta, $caducidad);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "function get_file($hash_id = null)\r\n\t{\r\n\t\t\r\n\t}", "function getAnyHandleById($id) {\n return $this->getHandleById($id, FALSE, 'ASC', TRUE);\n }", "public static function getLocalPath($id)\n {\n $file = static::data($id);\n $path = Configure::read('FileApi.basePath') . $file->category . DS . $file->tag . DS . $file->filename;\n\n return file_exists($path) ? $path : false;\n }", "public function edit($id)\n {\n\n $permission = Permission::where('id',$id)->first();\n return [$permission];\n }", "public function getObjectByPath($path, OperationContextInterface $context = NULL);", "public function read($id) {\n\t\treturn file_get_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}", "public function findPath($id)\n {\n $entry = $this->find($id, ['path']);\n return $entry ? $entry->getRawOriginal('path') : '';\n }", "public function access($op, $id = NULL) {\n return entity_access($op, $this->entityType, isset($id) ? $this->wrapper($id)->value() : NULL);\n }", "public function get_foto_file($id)\n\t{\n\t\tif (!$this->is_allowed('m_ads_update', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => 'Image not loaded, you do not have permission to access'\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$m_ads = $this->model_m_ads->find($id);\n\n\t\techo $this->get_file([\n 'uuid' => $id, \n 'delete_by' => 'id', \n 'field_name' => 'foto', \n 'table_name' => 'm_ads',\n 'primary_key' => 'id',\n 'upload_path' => 'uploads/m_ads/',\n 'delete_endpoint' => 'administrator/m_ads/delete_foto_file'\n ]);\n\t}", "public function get($id)\n {\n return $this->_driver->get(\"/security/folder/$id\");\n }", "public function read($id)\n {\n $file = $this->path . '/' . $id;\n\n file_exists($file) && $this->data = file_get_contents($file);\n\n return $this->data;\n }", "public function get_file_file($id)\n\t{\n\t\tif (!$this->is_allowed('dokumentasi_bendungan_update', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => 'Image not loaded, you do not have permission to access'\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$dokumentasi_bendungan = $this->model_dokumentasi_bendungan->find($id);\n\n\t\techo $this->get_file([\n 'uuid' => $id, \n 'delete_by' => 'id', \n 'field_name' => 'file', \n 'table_name' => 'dokumentasi_bendungan',\n 'primary_key' => 'kode_dbd',\n 'upload_path' => 'uploads/dokumentasi_bendungan/',\n 'delete_endpoint' => 'administrator/dokumentasi_bendungan/delete_file_file'\n ]);\n\t}", "function getAccessEntry($id);", "function files_id_get($resource=\".files_meta\", $uuid) { // read one\n return resource_id_get($resource, $uuid);\n}", "public function getDeviceFileById()\n {\n return null;\n }", "protected function onFileRemovedAfter(string $contextId, string $id, ?array $op, ?string $realpath)\n {\n\n }", "public static function GetPath($id){\n\t\treturn Yii::getPathOfAlias('application.GBlocks.'.$id);\n\t}", "function cot_pfs_filepath($id)\n{\n\tglobal $db, $db_pfs_folders, $db_pfs, $cfg;\n\n\t$sql = $db->query(\"SELECT p.pfs_file AS file, f.pff_path AS path FROM $db_pfs AS p LEFT JOIN $db_pfs_folders AS f ON p.pfs_folderid=f.pff_id WHERE p.pfs_id=\".(int)$id.\" LIMIT 1\");\n\tif($row = $sql->fetch())\n\t{\n\t\treturn ($cfg['pfs']['pfsuserfolder'] && $row['path']!='') ? $row['path'].'/'.$row['file'] : $row['file'];\n\t}\n\telse\n\t{\n\t\treturn '';\n\t}\n}", "public function find($id)\n {\n return $this->medicalComposite->assemble($id);\n \n }", "public function getFileInfo()\n {\n $info = $this->getProduct()->getPreconfiguredValues()->getData('options/' . $this->getOption()->getId());\n if (empty($info)) {\n $info = new Varien_Object();\n } else if (is_array($info)) {\n $info = new Varien_Object($info);\n }\n return $info;\n }", "public function read($id = null)\n {\n if (is_null($id)) {\n $repository = $this->getEntityManager()->getRepository($this->getTargetEntity());\n $results = $repository->findAll();\n } else {\n $results = $this->getEntityManager()->find($this->getTargetEntity(), $id);\n\n }\n\n // sanitize output\n if (is_null($results)) {\n $results = array();\n }\n\n // return what we got\n return $results;\n }", "public static function fresnsFileInfoById(int|string $fileIdOrFid): ?array\n {\n if (StrHelper::isPureInt($fileIdOrFid)) {\n $file = File::whereId($fileIdOrFid)->first();\n } else {\n $file = File::whereFid($fileIdOrFid)->first();\n }\n\n if (empty($file)) {\n return null;\n }\n\n $storageConfig = FileHelper::fresnsFileStorageConfigByType($file->type);\n\n if ($storageConfig['antiLinkStatus']) {\n $fresnsResponse = \\FresnsCmdWord::plugin($storageConfig['service'])->getAntiLinkFileInfo([\n 'type' => $file->type,\n 'fileIdOrFid' => strval($file->id),\n ]);\n\n return $fresnsResponse->getData() ?? null;\n }\n\n return $file->getFileInfo();\n }", "function getAddEditFile($db, $tabledefid, $addedit=\"edit\"){\r\n\r\n\t$querystatement = \"\r\n SELECT\r\n \".$addedit.\"file AS thefile\r\n FROM\r\n tabledefs\r\n WHERE uuid = '\".mysqli_real_escape_string($db->db_link,$tabledefid).\"'\";\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$therecord = $db->fetchArray($queryresult);\r\n\r\n return APP_PATH.$therecord[\"thefile\"];\r\n\r\n}", "public function getPhoto($id);", "function get_detail_files_download_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE file_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function getFileOfArticle($id)\n {\n return Db::queryOne('\n SELECT `file`.`id`, `file`.`filename`, `file`.`filetype`, `file`.`filesize`, `file`.`file` FROM `file`\n INNER JOIN `article` ON `file`.`id` = `article`.`file`\n WHERE `article`.`id` = ?', array($id));\n }", "public function getEditData($id) {\n $findspotdata = $this->getAdapter();\n $select = $findspotdata->select()\n ->from($this->_name)\n ->where('findspots.id = ?', (int)$id)\n ->group($this->_primary)\n ->limit('1');\n return $findspotdata->fetchAll($select);\n }", "function datasets(string $id): array {\n if (!isset($this->features[$id]))\n return [];\n else\n return array_keys($this->features[$id]['files']);\n }", "public function get( $id ) {\n\t\treturn get_metadata( $this->type(), $id, $this->key, true );\n\t}", "public function fetch($id, $ref = null, $mode = '')\n {\n\t\tglobal $conf;\n\n\t\tdol_syslog(__METHOD__, LOG_DEBUG);\n\n\t\t$sql = 'SELECT';\n\t\t$sql .= ' t.rowid,';\n\t\t$sql .= \" t.doc_date,\";\n\t\t$sql .= \" t.date_lim_reglement,\";\n\t\t$sql .= \" t.doc_type,\";\n\t\t$sql .= \" t.doc_ref,\";\n\t\t$sql .= \" t.fk_doc,\";\n\t\t$sql .= \" t.fk_docdet,\";\n\t\t$sql .= \" t.thirdparty_code,\";\n\t\t$sql .= \" t.subledger_account,\";\n\t\t$sql .= \" t.subledger_label,\";\n\t\t$sql .= \" t.numero_compte,\";\n\t\t$sql .= \" t.label_compte,\";\n\t\t$sql .= \" t.label_operation,\";\n\t\t$sql .= \" t.debit,\";\n\t\t$sql .= \" t.credit,\";\n\t\t$sql .= \" t.montant,\";\n\t\t$sql .= \" t.sens,\";\n\t\t$sql .= \" t.fk_user_author,\";\n\t\t$sql .= \" t.import_key,\";\n\t\t$sql .= \" t.code_journal,\";\n\t\t$sql .= \" t.journal_label,\";\n\t\t$sql .= \" t.piece_num,\";\n\t\t$sql .= \" t.date_creation\";\n\t\t$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode. ' as t';\n\t\t$sql .= ' WHERE 1 = 1';\n\t\t$sql .= \" AND entity IN (\" . getEntity('accountancy') . \")\";\n\t\tif (null !== $ref) {\n\t\t\t$sql .= ' AND t.ref = ' . '\\'' . $ref . '\\'';\n\t\t} else {\n\t\t\t$sql .= ' AND t.rowid = ' . $id;\n\t\t}\n\n\t\t$resql = $this->db->query($sql);\n\t\tif ($resql) {\n\t\t\t$numrows = $this->db->num_rows($resql);\n\t\t\tif ($numrows) {\n\t\t\t\t$obj = $this->db->fetch_object($resql);\n\n\t\t\t\t$this->id = $obj->rowid;\n\n\t\t\t\t$this->doc_date = $this->db->jdate($obj->doc_date);\n\t\t\t\t$this->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement);\n\t\t\t\t$this->doc_type = $obj->doc_type;\n\t\t\t\t$this->doc_ref = $obj->doc_ref;\n\t\t\t\t$this->fk_doc = $obj->fk_doc;\n\t\t\t\t$this->fk_docdet = $obj->fk_docdet;\n\t\t\t\t$this->thirdparty_code = $obj->thirdparty_code;\n\t\t\t\t$this->subledger_account = $obj->subledger_account;\n\t\t\t\t$this->subledger_label = $obj->subledger_label;\n\t\t\t\t$this->numero_compte = $obj->numero_compte;\n\t\t\t\t$this->label_compte = $obj->label_compte;\n\t\t\t\t$this->label_operation = $obj->label_operation;\n\t\t\t\t$this->debit = $obj->debit;\n\t\t\t\t$this->credit = $obj->credit;\n\t\t\t\t$this->montant = $obj->montant;\n\t\t\t\t$this->sens = $obj->sens;\n\t\t\t\t$this->fk_user_author = $obj->fk_user_author;\n\t\t\t\t$this->import_key = $obj->import_key;\n\t\t\t\t$this->code_journal = $obj->code_journal;\n\t\t\t\t$this->journal_label = $obj->journal_label;\n\t\t\t\t$this->piece_num = $obj->piece_num;\n\t\t\t\t$this->date_creation = $this->db->jdate($obj->date_creation);\n\t\t\t}\n\t\t\t$this->db->free($resql);\n\n\t\t\tif ($numrows) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->errors[] = 'Error ' . $this->db->lasterror();\n\t\t\tdol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);\n\n\t\t\treturn - 1;\n\t\t}\n\t}", "public function edit($id)\n {\n $edit_data = EventLogistic::find($id);\n return [\n 'id' => $edit_data->id,\n 'title' => $edit_data->title,\n 'photo' => $edit_data->photo,\n ];\n }", "protected function hasEntry(string $contextId, string $id, array $allowedTypes = null): bool\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n $types = (null === $allowedTypes) ? [\"add\", \"remove\", \"update\"] : $allowedTypes;\n\n foreach ($ops as $k => $op) {\n if (false === in_array($op['type'], $types)) {\n continue;\n }\n if ($id === $op['id']) {\n return true;\n }\n }\n return false;\n }", "public function getPictureById($id)\n\t{\n\t\t$sql = \"SELECT id,file FROM photo WHERE id=:id LIMIT 1\";\n\t\t$query = $this->db->prepare($sql);\n\t\t$query->execute(array(\":id\"=>$id));\n\t\treturn $query->fetchAll();\n\t}", "public function get($id)\n {\n $file_name = $this->getFileName($id);\n\n if (!is_file($file_name) || !is_readable($file_name)) {\n return false;\n }\n\n $lines = file($file_name);\n $lifetime = array_shift($lines);\n $lifetime = (int) trim($lifetime);\n\n if ($lifetime !== 0 && $lifetime < time()) {\n @unlink($file_name);\n return false;\n }\n $serialized = join('', $lines);\n $data = unserialize($serialized);\n return $data;\n }", "public static function getAccionModulos(int $id):array{\n $consulta=\"SELECT a.id AS idAccion, a.codigo AS codigoAcc, a.nombre AS nombreAcc,m.* \n FROM acciones a \n INNER JOIN modulos_acciones md ON a.id=md.idAccion\n RIGHT JOIN modulos m ON idModulo= m.id\n WHERE a.id= $id\"; //preparar la consulta\n return DB::selectAll($consulta,'Modulo');\n }", "function exeGetTransactToEdit($id) {\n $exeGetTransactToEdit = $this->db->query(\"SELECT *\n FROM transactions \n WHERE id = \".$this->db->escape($id).\" \");\n \n if($exeGetTransactToEdit->num_rows() > 0) {\n return $exeGetTransactToEdit->result_array();\n } else {\n return false;\n } \n }", "protected function doGet($id)\n {\n $filename = $this->getFilename($id);\n\n if (!is_file($filename)) {\n return false;\n }\n\n $cacheEntry = unserialize(file_get_contents($filename));\n\n if ($cacheEntry['ttl'] !== Cache::TTL_NO_EXPIRY && $cacheEntry['ttl'] < time()) {\n return false;\n }\n\n return $cacheEntry['data'];\n }", "public static function getPath($id)\n\t{\n\t\t$sql = \"SELECT c.*, p.level, p.order \"\n\t\t\t. \"FROM \" . self::$PathTable . \" p \"\n\t\t\t. \"JOIN \" . self::$ClientTable . \" c ON c.`id`=p.`parent` \"\n\t\t\t. \"WHERE p.`id`={$id} ORDER BY p.`order`\";\n\t\treturn self::query($sql);\n\t}", "function turnitintooltwo_getfiles($moduleid) {\n global $DB, $CFG, $OUTPUT;\n\n $secho = optional_param('sEcho', 1, PARAM_INT);\n $moduleid = (int)$moduleid;\n\n $queryparams = array();\n\n $query = \"SELECT fl.id AS id, cm.id AS cmid, tu.id AS activityid, tu.name AS activity, tu.anon AS anon_enabled, \".\n \"sb.submission_unanon AS unanon, sb.id AS submission_id, us.firstname AS firstname, us.lastname AS lastname, \".\n \"us.email AS email, us.id AS userid, fl.mimetype AS mimetype, fl.filesize AS filesize, fl.timecreated AS created, \".\n \"fl.pathnamehash AS hash, fl.filename AS rawfilename, fl.itemid AS itemid, fl.contextid AS contextid, \".\n \"cs.fullname AS coursetitle, cs.shortname AS courseshort, cs.id AS course, sb.submission_filename AS filename, \".\n \"sb.submission_objectid AS objectid \".\n \"FROM {files} fl \".\n \"LEFT JOIN {turnitintooltwo_submissions} sb ON fl.itemid = sb.id \".\n \"LEFT JOIN {user} us ON sb.userid = us.id \".\n \"LEFT JOIN {context} cx ON fl.contextid = cx.id \".\n \"LEFT JOIN {course_modules} cm ON cx.instanceid = cm.id \".\n \"LEFT JOIN {turnitintooltwo} tu ON cm.instance = tu.id \".\n \"LEFT JOIN {course} cs ON tu.course = cs.id \".\n \"WHERE fl.component = 'mod_turnitintooltwo' AND fl.filesize != 0 AND cm.module = :moduleid \";\n\n $params = array_merge(array('moduleid' => $moduleid), $queryparams);\n $files = $DB->get_records_sql($query, $params);\n $totalfiles = count($files);\n\n $return = array(\"sEcho\" => $secho, \"iTotalRecords\" => count($files), \"iTotalDisplayRecords\" => $totalfiles,\n \"aaData\" => array());\n\n foreach ($files as $file) {\n\n if (!empty($ssearch) AND ($file->anon_enabled == 1 AND !is_null($file->unanon) AND !$file->unanon)) {\n $return['iTotalDisplayRecords'] = $return['iTotalDisplayRecords'] - 1;\n continue; // If these are search results and this is anonymised skip it.\n }\n\n if (is_null($file->activityid)) {\n $assignment = html_writer::tag(\"span\", get_string('assigngeterror', 'turnitintooltwo'),\n array(\"class\" => \"italic bold\"));\n } else {\n $assignment = html_writer::link($CFG->wwwroot.'/mod/turnitintooltwo/view.php?id='.$file->cmid,\n $file->coursetitle . ' (' . $file->courseshort . ') - ' . $file->activity);\n }\n\n $filenametodisplay = (empty($file->filename) ? $file->rawfilename : $file->filename);\n $submission = html_writer::link($CFG->wwwroot.'/pluginfile.php/'.$file->contextid.'/mod_turnitintooltwo/submissions/'.\n $file->itemid.'/'.$file->rawfilename,\n $OUTPUT->pix_icon('fileicon', 'open '.$filenametodisplay, 'mod_turnitintooltwo').\" \".\n $filenametodisplay);\n\n if (($file->anon_enabled == 1 && $file->unanon == 1) ||\n ($file->anon_enabled == 0 && (!empty($file->firstname) || !empty($file->lastname)))) {\n $user = html_writer::link($CFG->wwwroot.'/user/view.php?id='.$file->userid,\n fullname($file) . '</a> (' . $file->email . ')');\n } else if ($file->anon_enabled == 1 && empty($file->unanon)) {\n $user = get_string('anonenabled', 'turnitintooltwo');\n } else {\n $user = get_string('nosubmissiondataavailable', 'turnitintooltwo');\n }\n\n $delete = '';\n if (!empty($file->objectid) OR empty($file->filename)) {\n $fnd = array(\"\\n\", \"\\r\");\n $rep = array('\\n', '\\r');\n $attributes[\"onclick\"] = \"return confirm('\".str_replace($fnd, $rep,\n get_string('filedeleteconfirm', 'turnitintooltwo')).\"');\";\n $delete = html_writer::link($CFG->wwwroot.'/mod/turnitintooltwo/settings_extras.php?cmd=files&file='.\n $file->id.'&filehash='.$file->hash,\n html_writer::tag('i', '', array('title' => get_string('deletesubmission', 'turnitintooltwo'),\n 'class' => 'fa fa-trash-o fa-lg')), $attributes);\n }\n\n $return[\"aaData\"][] = array($assignment, $file->courseshort, $file->coursetitle, $submission,\n \" \", $user, \" \", userdate($file->created), $delete);\n }\n\n return $return;\n}", "public function getUploadWithFiles($id)\n {\n return $quote = Upload::with('clientFiles')->findOrFail($id);\n }", "public function edit($id)\n {\n $editOperation = Operacoes::find($id);\n return response()->json($editOperation);\n }", "public function getFilePath() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filepath\", NULL);\n\t}", "abstract public function getPathImage($id, $filename);", "public function getArrayTree($idEntry = 0);", "public function getById($id)\n\t{\n\t\treturn $this->model->with('add_on_options')->find($id);\n\t}", "public function getEdit($id)\n\t{\n\t\t//\n\t}", "public function getAction(int $id): array\n\t{\n\t\tif (\n\t\t\t!Loader::includeModule('crm')\n\t\t\t|| !class_exists('\\Bitrix\\Crm\\Activity\\Provider\\CallTracker')\n\t\t)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif (\\Bitrix\\Crm\\Settings\\LeadSettings::isEnabled())\n\t\t{\n\t\t\treturn $this->getErrorResult('Wrong crm mode. Only simple crm is supported');\n\t\t}\n\n\t\t$filter = [\n\t\t\t'IS_RECURRING' => 'N',\n\t\t\t'STAGE_SEMANTIC_ID' => [\\Bitrix\\Crm\\PhaseSemantics::PROCESS],\n\t\t\t'CHECK_PERMISSIONS' => 'Y',\n\t\t\t'ID' => $id,\n\t\t];\n\n\t\t$deal = \\CCrmDeal::GetListEx([], $filter, false, false, ['ID'])->Fetch();\n\t\tif (!$deal)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\t$result = $this->getItemsById([$deal['ID']]);\n\t\tif (!empty($result))\n\t\t{\n\t\t\treturn array_pop($result);\n\t\t}\n\n\t\treturn [];\n\t}", "public function getFileInfo($file_id)\n {\n return $this->_process('file/info', ['file_id' => $file_id])->file;\n }", "function fetchPermissionDetails($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, name FROM permissions WHERE id = ? LIMIT 1\",array($id));\n\t$results = $query->first();\n\t$row = array('id' => $results->id, 'name' => $results->name);\n\treturn ($row);\n}", "public function getFile($file_id)\n {\n return $this->make_http_request(__FUNCTION__,(object) get_defined_vars());\n }", "public function getFile($id) {\n $response = $this->call('https://spreadsheets.google.com/feeds/worksheets/' . $id . '/private/values');\n $xml = new SimpleXMLElement($response->getResponseBody());\n $file = array(\n 'id' => (string) preg_replace('/^.+full\\//', '', $xml->id),\n 'title' => (string) $xml->title,\n 'updated' => (string) $xml->updated,\n 'author' => array(\n 'name' => (string) $xml->author->name,\n 'email' => (string) $xml->author->email,\n ),\n 'pages' => array(),\n 'self' => (string) $xml->id,\n );\n foreach ($xml->entry as $entry) {\n $pageId = preg_replace('/^.+values\\//', '', $entry->id);\n $file['pages'][] = $pageId;\n }\n return $file;\n }", "public function edit($id)\n {\n \treturn response()->json(File::find($id), 200);\n }", "protected function getPhoto($id){\n try{\n $query = \"Select users.photo From users Where users.id = ?\";\n $stmt = $this->getConnection($query);\n $stmt -> bind_param('i', $id);\n $stmt -> execute();\n $stmt -> bind_result($photo);\n $stmt->fetch();\n $userPhoto[] = array(\n 'photo' => $photo\n );\n $stmt -> close();\n\n return $userPhoto;\n }catch (Exception $e){\n die('Error - cannot get user photo: ' . $e -> getMessage());\n }\n }", "public function getFileInfo();", "public static function rpc_downloadFile($fileid)\r\n\t{\r\n\t\tSERIA_RPCHost::requireAuthentication();\r\n\t\t$file = SERIA_File::createObject($fileid);\r\n\t\tif (!$file)\r\n\t\t\tthrow new SERIA_Exception(_t('File not found.'));\r\n\t\t$localPath = $file->get('localPath');\r\n\t\tif (!$localPath)\r\n\t\t\tthrow new SERIA_Exception(_t('File is not local.'));\r\n\t\t$contents = file_get_contents($localPath);\r\n\t\treturn array(\r\n\t\t\t'contents' => &$contents,\r\n\t\t\t'sha1' => sha1($contents),\r\n\t\t\t'filename' => $file->get('filename')\r\n\t\t);\r\n\t}", "final public function getBackendById($id) {\n\t\t$result = NULL;\n\t\t$enums = $this->enumerate();\n\t\tforeach ($enums as $enumk => $enumv) {\n\t\t\t$found = FALSE;\n\t\t\tif (is_devicefile($id)) {\n\t\t\t\t// Compare the device file name. Use the canonical device\n\t\t\t\t// files for an additional check.\n\t\t\t\tif ($id == $enumv['devicefile'])\n\t\t\t\t\t$found = TRUE;\n\t\t\t\telse if (realpath($id) == realpath($enumv['devicefile']))\n\t\t\t\t\t$found = TRUE;\n\t\t\t} else if (is_fs_uuid($id)) {\n\t\t\t\t// Compare the filesystem UUID.\n\t\t\t\t$found = ($id == $enumv['uuid']);\n\t\t\t} else {\n\t\t\t\t$found = ($id == $enumv['label']);\n\t\t\t}\n\t\t\tif (TRUE === $found) {\n\t\t\t\t$result = $this->getBackendByType($enumv['type']);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function getMetadata( $id ) {\n if( empty( $id ) ){\n return array();\n }\n\n $row = $this->find( $id )->current();\n if( count( $row )) {\n return $row->toArray();\n }\n return array();\n\n }", "public function getPhoto($id)\n {\n $res = $this->db->select(\"SELECT * FROM `{$this->domainPhoto}` WHERE itemName()='{$id}'\", array('ConsistentRead' => 'true'));\n $this->logErrors($res);\n if(isset($res->body->SelectResult->Item))\n return self::normalizePhoto($res->body->SelectResult->Item);\n else\n return false;\n }", "public function fetchContext(string $id): ?Context;", "public static function load(string $id)\n\t{\n\t\tif (\\file_exists($config = static::$prefix . \\str_replace('.', DIRECTORY_SEPARATOR, $id) . '.config.php')) {\n\n\t\t\treturn require($config);\n\t\t}\n\n\t\treturn null;\n\t}", "static function getPhotoTemp($id)\r\n\t{\r\n\t\t$id = funcs::check_input($id);\r\n\r\n\t\t$sql = \"select p.*,\r\n\t\t\t\tm.username as username\r\n\t\t\t\tfrom phototemp as p,member as m\r\n\t\t\t\tWHERE m.id=p.userid\r\n\t\t\t\torder by p.id desc\";\r\n\t\t$result = DBconnect::assoc_query_2D($sql);\r\n\t\t$photoresult = $returnResult = array();\r\n\t\tif(count($result)>0){\r\n\t\t\tforeach($result as $key=>$value){\r\n\t\t\t\t$photoresult[\"id\"] = $value[\"id\"];\r\n\t\t\t\t$photoresult[\"userid\"] = $value[\"userid\"];\r\n\t\t\t\t$photoresult[\"username\"] = $value[\"username\"];\r\n\t\t\t\t$photoresult[\"picturepath\"] = $value[\"picturepath\"];\r\n\t\t\t\t$photoresult[\"datetime\"] = $value[\"datetime\"];\r\n\t\t\t\t$photoresult[\"status\"] = $value[\"status\"];\r\n\t\t\t\t$photoresult[\"site\"] = $id;\r\n\t\t\t\t$returnResult[] = $photoresult;\r\n\t\t\t}//end foreach\r\n\t\t}//end if\r\n\t\treturn $returnResult;\r\n\t}", "protected function doFetch($id)\n {\n return $this->yac->get($this->getHash($id));\n }" ]
[ "0.6122912", "0.57899487", "0.5669956", "0.56414443", "0.5429236", "0.5341085", "0.5148214", "0.50810665", "0.50503695", "0.5038502", "0.5021061", "0.5015197", "0.49868196", "0.4977295", "0.49487996", "0.49038512", "0.48988613", "0.48793733", "0.48779297", "0.482138", "0.48142946", "0.47469887", "0.47266197", "0.47211304", "0.47101945", "0.47099316", "0.4706921", "0.4696223", "0.4695595", "0.46822754", "0.46729422", "0.46629345", "0.46627533", "0.46592987", "0.45976004", "0.4558747", "0.4553768", "0.45359606", "0.45311904", "0.45309556", "0.45296982", "0.45277464", "0.45225933", "0.4517333", "0.45147276", "0.4502303", "0.44950542", "0.44925576", "0.44918728", "0.44703853", "0.44688106", "0.44646358", "0.44630116", "0.44619748", "0.44604933", "0.44596213", "0.44414878", "0.44364947", "0.44343743", "0.44336885", "0.44331422", "0.44283906", "0.44220808", "0.4421078", "0.44056368", "0.44024956", "0.43827546", "0.4370696", "0.4354099", "0.43447706", "0.43220764", "0.43216324", "0.43066964", "0.4305044", "0.43044275", "0.42952347", "0.42951986", "0.42888087", "0.42884496", "0.42826185", "0.42794576", "0.42793548", "0.4277335", "0.42602423", "0.42536703", "0.42445385", "0.42444375", "0.42405373", "0.42320386", "0.4231764", "0.42287508", "0.422763", "0.42266285", "0.4226198", "0.42226347", "0.4218887", "0.4215094", "0.4210866", "0.42068857", "0.42067918" ]
0.6971008
0
Returns the context dir for the given context id.
protected function getContextDir(string $contextId): string { return $this->rootDir . "/" . CaseTool::toPortableFilename($contextId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDirectory($id)\n {\n $hash = sha1($id, false);\n $dirs = array(\n $this->getCacheDirectory(),\n substr($hash, 0, 2),\n substr($hash, 2, 2)\n );\n return join(DIRECTORY_SEPARATOR, $dirs);\n }", "protected function getDirectory($id)\n {\n $hash = sha1($id, false);\n $dirs = array(\n $this->getCacheDirectory(),\n substr($hash, 0, 2),\n substr($hash, 2, 2)\n );\n return join(DIRECTORY_SEPARATOR, $dirs);\n }", "public function contextsGet($context_id = '') {\n\t\t// Build the MindTouch API URL to get the contexts.\n\t\t$url = \"contexts\";\n\t\tif (!empty($context_id)) {\n\t\t\t$url .= '/' . $context_id;\n\t\t}\n\n\t\t// Get output from API.\n\t\t$output = $this->get($url);\n\n\t\t// Parse the output.\n\t\t$output = $this->parseOutput($output);\n\n\t\treturn $output;\n\t}", "private function get_category_tree_path($id)\n {\n if ($id === 0)\n {\n $category = Element::get($this->modx, 'modCategory', $id);\n $path = $category->get_property('name');\n }\n\n while ($id !== 0)\n {\n $category = Element::get($this->modx, 'modCategory', $id);\n $path = (isset($path) ? $category->get_property('name') . '/' . $path : $category->get_property('name') . '/');\n $id = $category->get_property('parent');\n }\n\n return $path;\n }", "public function getDirectoryPath($id){\n\n if(!is_string($id) || StringUtils::isEmpty($id)){\n\n throw new UnexpectedValueException('id must be a non empty string');\n }\n\n if(!is_dir($this->_rootPath.DIRECTORY_SEPARATOR.$id)){\n\n throw new UnexpectedValueException('Tmp dir not found : '.$id);\n }\n\n // Get the full path\n return $this->_rootPath.DIRECTORY_SEPARATOR.$id;\n }", "public\n function getContext(\n int $id,\n string $type\n ) {\n $level = \"CONTEXT_\" . strtoupper($type);\n\n return DB::connection('moodle')->table('context')->where('instanceid', $id)->where('contextlevel',\n $this->getConstant($level))->pluck('id')->first();\n }", "public static function getDeviceDirectory($devid)\n\t{\n\t\t$firstLevel = substr(strtolower($devid), -1, 1);\n\t\t$secondLevel = substr(strtolower($devid), -2, 1);\n\n\t\treturn $GLOBALS['egw_info']['server']['files_dir'] . '/activesync/' . $firstLevel . \"/\" . $secondLevel;\n\t}", "public function getContextPath() {\n\t\treturn NodePaths::generateContextPath($this->path, $this->workspace->getName(), $this->getDimensionValues());\n\t}", "private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }", "public function get_image_dir($id)\n {\n $id = abs(intval($id));\n $id = sprintf('%\\'09d', $id);\n $dir1 = substr($id, 0, 3);\n $dir2 = substr($id, 3, 2);\n $dir3 = substr($id, 5, 2);\n\n return $dir1 . '/' . $dir2 . '/' . $dir3 . '/';\n }", "public function fetchContext(string $id): ?Context;", "protected function _dir(): string\n {\n if ($container = $this->_container()) {\n assert($container->hasId());\n return \"{$container}/\" . static::DIR;\n }\n return static::DIR;\n }", "public function getDir() {\n return Yii::getAlias('@static').'/'.$this->module.'/'. $this->parent_id .'/';\n }", "public function getDir();", "function getContextId() {\n\t\treturn $this->_contextId;\n\t}", "protected function get_context() {\n $contextclass = '\\local_elisprogram\\context\\\\'.$this->contextlevel;\n if ($this->contextlevel !== 'system' && class_exists($contextclass)) {\n $id = $this->required_param('id', PARAM_INT);\n return $contextclass::instance($id);\n } else {\n return context_system::instance();\n }\n }", "public static function getPath($id) {\n\t\treturn self::$defaultInstance->getPath($id);\n\t}", "public function getModuleDir()\n {\n return dirname(Mage::getModuleDir('etc', 'Ts_Phpids')) . DS;\n }", "public function retornaCaminhoDoDiretorioPeloId($id) {\n\t\treturn (string) implode(DIRECTORY_SEPARATOR, str_split($id));\n\t}", "protected function getDir()\n {\n $reflectionClass = new \\ReflectionClass(get_class($this));\n return dirname($reflectionClass->getFileName());\n }", "private function get_course_from_context($context_id)\n {\n global $DB;\n\n //retrieve the context from the database, and extract its course ID\n $context = $DB->get_record('context', array('id' => $context_id, 'contextlevel' => CONTEXT_COURSE), 'instanceid');\n\n //return the course ID\n return $context->instanceid;\n }", "public function get_context_id()\n {\n return $this->get_default_property(self::PROPERTY_CONTEXT_ID);\n }", "public function contextsDelete($context_id) {\n\t\t// Build the MindTouch API URL to get the contexts.\n\t\t$url = \"contexts\";\n\t\tif (!empty($context_id)) {\n\t\t\t$url .= '/' . $context_id;\n\t\t}\n\n\t\t// Get output from API.\n\t\t$output = $this->delete($url);\n\n\t\treturn $output;\n\t}", "protected function getTemplateDir(): string\n {\n $dirParts = [\n AutoloaderInterface::MODULES_PATHNAME,\n $this->getModuleContext(),\n 'tpl'\n ];\n\n return implode(DIRECTORY_SEPARATOR, $dirParts);\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "public function getDir()\n {\n return $this->dir;\n }", "function getPluginsDirectory($parentId) {\n $plugins_dir = config('main.plugins_dir');\n\n $dir_name = '';\n if (isset($plugins_dir[$parentId])) {\n $dir_name = $plugins_dir[$parentId];\n }\n\n return $dir_name;\n }", "protected function _getCacheDir()\n\t{\n\t\treturn $this->_cacheDir;\n\t}", "public function getDir(): string;", "function dirPath () { return (\"../../\"); }", "public function getDirectoryScopeId()\n {\n if (array_key_exists(\"directoryScopeId\", $this->_propDict)) {\n return $this->_propDict[\"directoryScopeId\"];\n } else {\n return null;\n }\n }", "private function getBaseModuleDir($type, $id)\n {\n $this->checkInit();\n $type = SanitizerTool::sanitizeFileName($type);\n $id = SanitizerTool::sanitizeFileName($id);\n return $this->rootDir . \"/$type/$id\";\n }", "function dirPath() { return (\"../\"); }", "public function getDir() {\n\t\treturn $this->_dir;\n\t}", "public function getTemplateDir()\n {\n return WP::applyFilters('wpmvc_template_dir', $this->templateDir);\n }", "public function getIDContext()\n {\n return $this->iDContext;\n }", "protected static function getPath($id) {\n\t\treturn self::FILES_DIR.DIRECTORY_SEPARATOR.$id;\n\t}", "function fm_get_user_dir_space($userid = NULL) {\r\n\tglobal $USER;\r\n\t\r\n\tif ($userid == NULL) {\r\n\t\t$userid = $USER->id;\r\n\t}\r\n\t\r\n\treturn \"file_manager/users/$userid\";\r\n}", "public function getDirectory()\n {\n return $this->_path['dirname'];\n }", "public function getDirname();", "function dirPath() {return (\"../../../../\"); }", "public function getChrootDir()\n {\n return $this->chrootDir;\n }", "protected function get_templates_dir() {\n\t\treturn untrailingslashit( wct_get_templates_dir() );\n\t}", "public function getCacheDir(){\r\n return $this->_cache->getDir();\r\n }", "public function getDirectory();", "public function getDirectory();", "public function getLogDir(): string\n {\n return __DIR__ . '/../../../../../../var/logs';\n }", "public function adminPath($id)\n {\n return 'admins/' . $id;\n }", "function getContextPath() {\r\n\t$url = $_SERVER['REQUEST_URI']; // \"/myfolder/sub1/page.php\"\r\n\t$url = substr($url, 0, strpos($url, \".php\", 0) );\r\n\treturn substr($url, 0, strrpos($url, \"/\", 0)); // \"/myfolder/sub1\"\r\n}", "private function getFullWHPath($id)\r\n {\r\n \t$warehouse = Factory::service(\"Warehouse\")->getWarehouse($id);\r\n \tif($warehouse instanceof Warehouse ){\r\n \t\treturn Factory::service(\"Warehouse\")->getWarehouseBreadCrumbs($warehouse,TRUE,\"/\");\r\n \t}else{\r\n \t\treturn $id;\r\n \t}\r\n }", "function kilman_get_context($cmid) {\n static $context;\n\n if (isset($context)) {\n return $context;\n }\n\n if (!$context = context_module::instance($cmid)) {\n print_error('badcontext');\n }\n return $context;\n}", "public function get_category_context_path() {\n if ($categorycontext = $this->get_category_context()) {\n return $categorycontext->path;\n }\n return null;\n }", "public static function GetPath($id){\n\t\treturn Yii::getPathOfAlias('application.GBlocks.'.$id);\n\t}", "public function getPath($id)\n {\n $sql = \"SELECT p.id, p.\" . $this->descriptor\n . \" FROM \" . $this->table . \" n, \" . $this->table . \" p \"\n . \" WHERE n.lft BETWEEN p.lft AND p.rgt AND n.id = ? ORDER BY p.lft;\";\n\n $sth = $this->db->prepare($sql);\n $sth->setFetchMode(\\PDO::FETCH_OBJ);\n $sth->execute([$id]);\n return $sth->fetch();\n }", "public function getDirectory() {\n return $this->dir;\n }", "public function getCurrentDirectory()\n {\n return $this->currentDirectory;\n }", "private function get_reports_dir(Application $app) : string {\n\n\t\t//Generate path directory\n\t\treturn $this->config->item(\"data_directory\").\"reports/\".$app->id.\"/\";\n\n\t}", "function get_dir_path() {\n\n\t\treturn $this->dir_path;\n\n\t}", "public function getFileDir($fileId) {\n $file = File::get()->byID($fileId);\n if(!$file) {\n return false;\n }\n $filename = explode($file->Name, $file->getURL())[0];\n $shortPath = explode('assets', $filename)[1];\n\n return 'assets' . $shortPath;\n }", "public function getCategoryPath($id){\n\t\t\t$cat = $this->getNodeById($id);\t\n\t\t\t$return = array();\n\t\t\tif($cat != null){\n\t\t\t\twhile(!$cat->getCategory()->isServiceRoot()){\n\t\t\t\t\t$return[] = $cat->getCategory();\n\t\t\t\t\t$cat = $this->getNodeById($cat->getParentId());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $return;\n\t\t}", "public function dir() {\n\t\treturn dirname($this->_path) . '/';\n\t}", "protected function _evalPath($id = 0){\n\t\t$db = new DB_WE();\n\t\t$path = '';\n\t\tif($id == 0){\n\t\t\t$id = $this->ParentID;\n\t\t\t$path = $this->Text;\n\t\t}\n\n\t\t$result = getHash('SELECT Text,ParentID FROM ' . $this->_table . ' WHERE ' . $this->_primaryKey . '=' . intval($id), $db);\n\t\t$path = '/' . (isset($result['Text']) ? $result['Text'] : '') . $path;\n\t\t$pid = isset($result['ParentID']) ? intval($result['ParentID']) : 0;\n\t\twhile($pid > 0){\n\t\t\t$result = getHash('SELECT Text,ParentID FROM ' . $this->_table . ' WHERE ' . $this->_primaryKey . '=' . $pid, $db);\n\t\t\t$path = '/' . $result['Text'] . $path;\n\t\t\t$pid = intval($result['ParentID']);\n\t\t}\n\t\treturn $path;\n\t}", "public function get($id)\n {\n return $this->_driver->get(\"/security/folder/$id\");\n }", "public static function getPath($id);", "public function getContextPath()\n {\n return $this->getRequest()->getContextPath();\n }", "function getTemplateDir()\n {\n return $this->_objectPool[$this->_lastUsedObjectKey]->getOption('templateDir');\n }", "public function getCourseStructure ($id) {\n return $this->makeCall($id, $this->base . 'api/public/courses/' . $id . '/structure', true);\n }", "public function getTemplateDir()\n\t{\n\t\treturn $this->_tplDir;\n\t}", "public function getTemplatesDirectory(): string\n {\n return __DIR__ . '/../' . $this->config->value('templates', 'templates');\n }", "public function getCacheDir()\n {\n return $this->rootDir . '/../cache/'.$this->getEnvironment();\n }", "protected function getCacheDirectory()\n {\n return $this->cache_dir;\n }", "protected function getCacheDirectory()\n {\n return $this->cache_dir;\n }", "protected function get_cache_dir()\n\t{\n\t\treturn $this->cache_dir ?: $this->phpbb_root_path . 'cache/' . $this->get_environment() . '/';\n\t}", "public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}", "function getdirections_location_id_path($direction, $lid) {\n if (module_exists('location') && is_numeric($lid) && ($direction == 'to' || $direction == 'from')) {\n return \"getdirections/location_id/$direction/$lid\";\n }\n}", "public function getDirectoryKey();", "public function getLogDir();", "protected function getResourceDir(): string\n {\n $dirParts = [\n AutoloaderInterface::MODULES_PATHNAME,\n $this->getModuleContext(),\n 'res'\n ];\n\n return implode(DIRECTORY_SEPARATOR, $dirParts);\n }", "public function getCampaignFolder($id){\n return CampaignFolder::find($id);\n\t\t\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getDirectory()\n {\n return dirname($this->file);\n }", "public function getLogDir()\n {\n return $this->rootDir . '/../logs';\n }", "protected function get_dir() {\r\n return dirname( ( new \\ReflectionClass( static::class ) )->getFileName());\r\n }", "public static function getLocalPath($id)\n {\n $file = static::data($id);\n $path = Configure::read('FileApi.basePath') . $file->category . DS . $file->tag . DS . $file->filename;\n\n return file_exists($path) ? $path : false;\n }", "public function directoryOf($file){\n $path_parts = pathinfo($file);\n return $path_parts['dirname'];\n }", "public static function get_contexts_for_userid(int $userid) : contextlist {\n return (new contextlist)->add_from_sql(\n \"SELECT ctx.id\n FROM {course_modules} cm\n JOIN {modules} m ON cm.module = m.id AND m.name = :modulename\n JOIN {reengagement} r ON cm.instance = r.id\n JOIN {reengagement_inprogress} rip ON rip.reengagement = r.id\n JOIN {context} ctx ON cm.id = ctx.instanceid AND ctx.contextlevel = :contextlevel\n WHERE rip.userid = :userid\",\n [\n 'modulename' => 'reengagement',\n 'contextlevel' => CONTEXT_MODULE,\n 'userid' => $userid\n ]\n );\n }", "public function getContext() {\n\t\treturn $this->getPrivateSetting('context');\n\t}", "public function getCacheDir()\n {\n return __DIR__ . '/../var/cache/' . $this->getEnvironment();\n }", "public static function get_tpl_dir()\n {\n return __DIR__ . DS . 'templates' . DS;\n }", "function get_context_instance_by_id($id) {\n\n global $context_cache, $context_cache_id;\n\n if (isset($context_cache_id[$id])) { // Already cached\n return $context_cache_id[$id];\n }\n\n if ($context = get_record('context', 'id', $id)) { // Update the cache and return\n $context_cache[$context->contextlevel][$context->instanceid] = $context;\n $context_cache_id[$context->id] = $context;\n return $context;\n }\n\n return false;\n}", "function generate_directory($id){\n $filename = \"intranet/usuarios/\" . $id . \"/uploads/\";\n if (!file_exists($filename)) {\n mkdir($filename, 0777, true);\n }\n }", "protected function getDir($key)\n {\n $dir = sha1($key);\n $dir = substr($dir, 0, 3) . '/'\n . substr($dir, 3, 3) . '/';\n\n return $dir;\n }", "public function get_contextname() {\n return $this->contextname;\n }" ]
[ "0.6628162", "0.6628162", "0.56003535", "0.55993193", "0.5515558", "0.54561937", "0.5429322", "0.5415443", "0.5316108", "0.5307999", "0.5287511", "0.5282807", "0.52705836", "0.5263187", "0.5242585", "0.52309644", "0.5218218", "0.5201452", "0.51810694", "0.5169915", "0.5129694", "0.51106673", "0.5110209", "0.50883293", "0.5058193", "0.5058193", "0.5058193", "0.5058193", "0.5058193", "0.5058193", "0.5045434", "0.5032701", "0.5031642", "0.5026722", "0.500643", "0.4996886", "0.49557203", "0.494844", "0.4943452", "0.49421418", "0.49351484", "0.49292028", "0.49001548", "0.48993573", "0.488675", "0.48846322", "0.4882584", "0.48810205", "0.48677745", "0.48677745", "0.48219755", "0.48134097", "0.48129594", "0.47977763", "0.47932145", "0.47919554", "0.47812888", "0.47764832", "0.475799", "0.47516838", "0.4730743", "0.47215584", "0.4720791", "0.47173038", "0.47053912", "0.47021887", "0.46994", "0.46899682", "0.4688033", "0.46869236", "0.46852225", "0.46839747", "0.466499", "0.46588588", "0.46518776", "0.46518776", "0.46476948", "0.4643853", "0.46396202", "0.4637867", "0.46368912", "0.46306664", "0.46305817", "0.4625908", "0.4625908", "0.4625908", "0.4625908", "0.4623741", "0.46233538", "0.4614423", "0.46126306", "0.46106863", "0.46102887", "0.4607501", "0.46004662", "0.46003547", "0.45981026", "0.45973423", "0.45938173", "0.45929435" ]
0.7305059
0
Creates the operations.byml file if necessary (for the given context id) and returns its path.
protected function getOperationsFile(string $contextId): string { $opFile = $this->getContextDir($contextId) . "/operations.byml"; if (false === file_exists($opFile)) { $ops = []; BabyYamlUtil::writeFile($ops, $opFile); } return $opFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doGetEntryRealPathByOperation(string $contextId, array $operation, array $options = [])\n {\n return $this->getContextDir($contextId) . \"/files/\" . $operation['path'];\n }", "protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []): array\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $type = $options['type'] ?? 'add';\n $useMove = (bool)($options['move'] ?? false);\n\n\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n $ops = [];\n if (true === file_exists($opFile)) {\n $ops = BabyYamlUtil::readFile($opFile);\n }\n\n\n if (null !== $path) {\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $addOperation = [\n 'type' => $type,\n 'id' => $id,\n 'path' => $relPath,\n 'meta' => $meta,\n ];\n\n\n //--------------------------------------------\n // ADDING THE OPERATION (see heuristic notes for more details)\n //--------------------------------------------\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $ops[$k] = $addOperation;\n break;\n default:\n $this->error(\"Operation \\\"$type\\\" rejected. You cannot add this entry because it already exists with type=\\\"$type\\\" for id \\\"$id\\\".\");\n break;\n }\n }\n }\n\n\n if (false === $found) {\n $op = $addOperation;\n }\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n if (false === $found) {\n $ops[] = $op;\n } else {\n $ops[$k] = $op;\n }\n\n\n BabyYamlUtil::writeFile($ops, $opFile);\n\n\n return $op;\n }", "abstract protected function getFileId(string $contextId, string $path, array $meta): string;", "protected function createFile() {}", "protected function createPathIfNeeded() {}", "protected function getRawOperations(string $contextId): array\n {\n\n $ret = [];\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n if (true === file_exists($opFile)) {\n return BabyYamlUtil::readFile($opFile);\n }\n return $ret;\n }", "function get_new_file($id_progetto) {\n return sys_get_temp_dir() . DIRECTORY_SEPARATOR . \"ReportQuestionariProgetto-\" . str_pad($id_progetto, 4, '0', STR_PAD_LEFT) . \".xlsx\";\n }", "function createXMLFile($obj, $elementContent)\r\n {\r\n global $DB, $CFG;\r\n\r\n $msmRecord = $DB->get_record(\"msm\", array(\"id\" => $obj->msmid));\r\n $msmtrimName = preg_replace(\"/\\s+/\", '', $msmRecord->name);\r\n $CompDir = $CFG->dataroot . \"/temp/msmtempfiles/$msmtrimName$msmRecord->id/standalones/\";\r\n\r\n $elementType = '';\r\n switch (get_class($obj))\r\n {\r\n case \"ExportDefinition\":\r\n $elementType = \"definition\";\r\n break;\r\n case \"ExportTheorem\":\r\n $elementType = \"theorem\";\r\n break;\r\n case \"ExportComment\":\r\n $elementType = \"comment\";\r\n break;\r\n }\r\n\r\n // standalone folder already exists\r\n if (file_exists($CompDir))\r\n {\r\n // if the directory exists, there is a possibility that the same reference\r\n // was already exported --> so check if XML file with same content exists\r\n $existingCompid = $this->checkForSameFile($CompDir, $obj);\r\n\r\n if (!empty($existingCompid))\r\n {\r\n return $existingCompid;\r\n }\r\n if (!empty($obj->caption))\r\n {\r\n $captionTrim = strip_tags($obj->caption);\r\n $captionTrim = preg_replace(\"/\\s+/\", '', $captionTrim);\r\n // need to remove any non-alphanumeric characters from caption\r\n $captionmod = preg_replace(\"/[^A-Za-z0-9]/\", '', $captionTrim);\r\n $filename = $CompDir . $captionmod . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n else if (!empty($obj->type))\r\n {\r\n $filename = $CompDir . $obj->type . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n }\r\n else\r\n {\r\n // need to make a standalone folder\r\n if (mkdir($CompDir))\r\n {\r\n if (!empty($obj->caption))\r\n {\r\n $captionTrim = strip_tags($obj->caption);\r\n $captionTrim = preg_replace(\"/\\s+/\", '', $captionTrim);\r\n $captionmod = preg_replace(\"/[^A-Za-z0-9]/\", '', $captionTrim);\r\n $filename = $CompDir . $captionmod . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n else if (!empty($obj->type))\r\n {\r\n $filename = $CompDir . $obj->type . \"-$elementType-\" . $obj->compid . \".xml\";\r\n }\r\n }\r\n else\r\n {\r\n echo \"error with creating standalone folder\";\r\n }\r\n }\r\n\r\n if ($xmlfile = fopen($filename, \"w\"))\r\n {\r\n fwrite($xmlfile, $elementContent);\r\n fclose($xmlfile);\r\n return false;\r\n }\r\n else\r\n {\r\n echo json_encode(\"error\");\r\n }\r\n }", "function __getModelFile($modelId)\n {\n $modelDir = dirname(dirname(dirname(__FILE__))) . DS . 'models';\n return $modelDir . DS . $modelId . '_service.php';\n }", "protected function onFileAddedAfter(string $contextId, array &$operation, ?string $path, ?string $dst, array $options = [])\n {\n\n }", "protected function _generateFilePath() {\n\t\treturn self::normalPaths(\n\t\t\tMage::getBaseDir(),\n\t\t\tMage::helper('pepperjam_network/config', $this->getStore())->getExportFilePath(),\n\t\t\t$this->_getFileName()\n\t\t);\n\t}", "public function getWritePath();", "public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}", "public function getOperationContext();", "public function createFile()\n {\n return $this->addExcludesNameEntry($this->files);\n }", "public function save()\n {\n if (file_exists($this->_filePath)) {\n $existingFile = file_get_contents($this->_filePath, FILE_USE_INCLUDE_PATH);\n $this->_template = str_replace(\"</routes>\", $this->_template, $existingFile);\n } else {\n $atTheStart = '<?xml version=\"1.0\"?>\n<routes xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:module:Magento_Webapi:etc/webapi.xsd\">';\n $this->_template = $atTheStart . $this->_template;\n }\n\n parent::save();\n return $this;\n }", "protected function outPutTmpFile() {\r\n\t\t$dir = XOOPS_TRUST_PATH.'/tmp';\r\n\t\t$path = $dir.'/'.mt_rand().\"_\".time().'_collabtrans.xml';\r\n\t\t$fp = fopen($path, \"w\");\r\n\t\tfwrite($fp, $this -> toXML());\r\n\t\tfclose($fp);\r\n\r\n\t\treturn $path;\r\n\t}", "private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }", "public function getPath($id);", "protected static function getPath($id) {\n\t\treturn self::FILES_DIR.DIRECTORY_SEPARATOR.$id;\n\t}", "public function getPath(){\n $ext = $this->getExt();\n $filename = $this->id.'.'.$ext;\n return str_replace( $filename, '', $this->filename ); \n }", "public static function getLocalPath($id)\n {\n $file = static::data($id);\n $path = Configure::read('FileApi.basePath') . $file->category . DS . $file->tag . DS . $file->filename;\n\n return file_exists($path) ? $path : false;\n }", "public function generate() {\n if (!$this->filePath) {\n throw new Exception('Trying to save file without path');\n }\n \n $tempDir = codemonkey_pathTempDir;\n \n $content = $this->generateCode();\n \n $this->checkIfTempFolderExists();\n $this->checkIfFoldersExist();\n \n try {\n $fp = fopen($tempDir.$this->filePath, 'w');\n fputs($fp, $content);\n fclose($fp);\n chmod($tempDir.$this->filePath, 0775);\n } catch (Exception $e) {\n echo \"Could not generate file \".$this->filePath.\"<br />\\n\"\n . $e->getMessage().\"<br />\\n\";\n }\n }", "protected function updateEntry(string $contextId, string $id, ?string $path, array $meta, array $options = [])\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n $useMove = (bool)($options['move'] ?? false);\n\n\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n\n\n $meta = array_merge($op[\"meta\"], $meta);\n\n\n if (null !== $path) {\n\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n case \"update\":\n $op['meta'] = $meta;\n\n\n /**\n * The bottom line is that in the vfs entry, the path must be set (i.e. not null).\n * We allow for the user to pass path=null for an \"update\" action, for performances reasons, which means that the user\n * didn't change the file but might have updated the meta; however we still need to set the path\n * in the vfs entry.\n *\n * Therefore if the user passes path=null, we don't update the path (we keep the existing one)\n */\n if (null !== $relPath) {\n $op['path'] = $relPath;\n }\n $ops[$k] = $op;\n break;\n case \"remove\":\n $ops[$k] = [\n \"type\" => \"update\",\n \"id\" => $id,\n \"path\" => $relPath,\n \"meta\" => $meta,\n ];\n break;\n }\n\n\n break;\n }\n }\n\n if (false === $found) {\n return $this->addEntry($contextId, $id, $path, $meta, array_merge($options, [\n \"type\" => \"update\",\n ]));\n } else {\n // we only call this when a file has been really added to our vfs\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n\n $ops[$k] = $op;\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n return $op;\n }\n }", "protected function _getPath()\n {\n if (!empty($this->_path)) {\n return $this->_path;\n }\n\n $id = $this->_config['id'];\n $dir0 = $id % 10000;\n $dir1 = $dir0 % 100;\n $dir2 = $dir0 - $dir1 * 100;\n if ($dir2 < 0) {\n $dir2 = 0;\n }\n $path = 'apps/';\n\n switch ($this->_config['section']) {\n case 1 :\n $path .= 'scripteditor/' . $dir2 . '/' . $dir1 . '/';\n break;\n \tcase 2 :\n $path .= 'slave/' . $dir2 . '/' . $dir1 . '/';\n break;\n default :\n $path .= 'tmp/';\n break;\n }\n $this->_path = $path;\n return $this->_path;\n }", "public function createFile(string $typeOfLayer, string $fileName, String $content, bool $isContract = false) : bool;", "function features_command_export() {\n $args = func_get_args();\n\n if (count($args) == 1) {\n // Assume that the user intends to create a module with the same name as the\n // \"value\" of the context.\n $context = array_shift($args);\n _features_command_export(array($context));\n }\n elseif (count($args) > 1) {\n // Assume that the user intends to create a new module based on a list of \n // contexts. First argument is assumed to be the name.\n $name = array_shift($args);\n _features_command_export($args, $name);\n }\n else {\n // By default just show contexts that are available.\n $rows = array(array(dt('Available contexts')));\n foreach (context_enabled_contexts() as $k => $c) {\n $rows[] = array(\"{$c->namespace}-{$c->attribute}-{$c->value}\");\n }\n drush_print_table($rows, 2, true);\n }\n}", "public function setOperationId($var)\n {\n GPBUtil::checkString($var, True);\n $this->operation_id = $var;\n\n return $this;\n }", "private function mk_paths(string $id) {\n\t\t$this->dir_path = LIBRESIGNAGE_ROOT.SLIDES_DIR.'/'.$id;\n\t\t$this->conf_path = $this->dir_path.'/conf.json';\n\t\t$this->asset_path = $this->dir_path.'/assets';\n\t}", "public function save()\r\n {\r\n $module = Yii::$app->controller->module;\r\n if ($this->operation === self::OP_OVERWRITE) {\r\n $dir = dirname($this->path);\r\n if (!is_dir($dir)) {\r\n $mask = @umask(0);\r\n $result = @mkdir($dir, $module->newDirMode, true);\r\n @umask($mask);\r\n if (!$result) {\r\n return \"Unable to create the directory '$dir'.\";\r\n }\r\n }\r\n }\r\n if (@file_put_contents($this->path, $this->content) === false) {\r\n return \"Unable to write the file '{$this->path}'.\";\r\n }\r\n\r\n return true;\r\n }", "public static function getPath($id);", "protected function getFileGenerationPath()\n {\n $path = $this->getPathByOptionOrConfig('path', 'migration_target_path');\n $fileName = $this->getDatePrefix() . '_' . $this->argument('migrationName') . '.php';\n\n return \"{$path}/{$fileName}\";\n }", "function createImage($idName) { //TODO: Add parameter for passing image files to use instead \n echo '<img src=\"/php/cms-img/file2.png\" id=\"' . $idName . '\" class=\"nested\"/>';\n }", "function dest_path_and_file()\r\n{ \r\n global $xoopsDB, $xoopsUser;\r\n \r\n // Initialize magic_number. This number is used to create unique file names in order to guarantee that 2 file names\r\n // will not be identical if 2 users upload a file at the exact same time. 100000 will allow almost 100000 users to use\r\n // this system. Ok, the odds of this happening are slim; but, I want the odds to be zero.\r\n $magic_number = 100000; \r\n \r\n // Get the location of the document repository\r\n $query = \"SELECT data from \".$xoopsDB->prefix(\"dms_config\").\" WHERE name='doc_path'\";\r\n $file_sys_root = mysql_result(mysql_query($query),'data');\r\n \r\n // Get the current value of max_file_sys_counter\r\n $query = \"SELECT data from \".$xoopsDB->prefix(\"dms_config\").\" WHERE name='max_file_sys_counter'\";\r\n $max_file_sys_counter = (integer) mysql_result(mysql_query($query),'data');\r\n \r\n // Determine the path and filename of the new file\r\n $query = \"SELECT * from \".$xoopsDB->prefix(\"dms_file_sys_counters\");\r\n $dms_file_sys_counters = mysql_fetch_array(mysql_query($query));\r\n \r\n $file_sys_dir_1 = $dms_file_sys_counters['layer_1'];\r\n $file_sys_dir_2 = $dms_file_sys_counters['layer_2'];\r\n $file_sys_dir_3 = $dms_file_sys_counters['layer_3'];\r\n $file_sys_file = $dms_file_sys_counters['file'];\r\n $file_sys_file_name = ($file_sys_file * $magic_number) + $xoopsUser->getVar('uid');\r\n \r\n $dir_path_1 = $file_sys_root.\"/\".$file_sys_dir_1;\r\n $dir_path_2 = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2;\r\n $dir_path_3 = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3;\r\n \r\n //$doc_path = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3;\r\n $path_and_file = $file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3.\"/\".$file_sys_file_name;\r\n //$dest_path_and_file = $doc_path.\"/\".$file_sys_file_name;\r\n \r\n //print $path_and_file;\r\n //exit(0);\r\n \r\n // Determine the next file system counter values and save them for future use.\r\n $file_sys_file++;\r\n if ($file_sys_file > $max_file_sys_counter) \r\n {\r\n\t$file_sys_file = 1;\r\n\t$file_sys_dir_3++;\r\n\t} \r\n \r\n if ($file_sys_dir_3 > $max_file_sys_counter)\r\n {\r\n\t$file_sys_dir_3 = 1;\r\n\t$file_sys_dir_2++;\r\n\t}\r\n\t\r\n if ($file_sys_dir_2 > $max_file_sys_counter)\r\n {\r\n\t$file_sys_dir_2 = 1;\r\n\t$file_sys_dir_1++;\r\n\t}\r\n\t\r\n $query = \"UPDATE \".$xoopsDB->prefix(\"dms_file_sys_counters\").\" SET \";\r\n $query .= \"layer_1 = '\".(integer) $file_sys_dir_1.\"', \";\r\n $query .= \"layer_2 = '\".(integer) $file_sys_dir_2.\"', \";\r\n $query .= \"layer_3 = '\".(integer) $file_sys_dir_3.\"', \";\r\n $query .= \"file = '\".(integer) $file_sys_file. \"' \";\r\n \r\n mysql_query($query); \r\n\r\n // Ensure that the final destination directories exist...if not, then create the directory or directories.\r\n if (!is_dir($dir_path_1)) \r\n {\r\n\tmkdir($dir_path_1,0775);\r\n chmod($dir_path_1,0777);\r\n\t}\r\n \r\n if (!is_dir($dir_path_2))\r\n {\r\n\tmkdir($dir_path_2,0775); \r\n chmod($dir_path_2,0777);\r\n }\r\n\t\r\n if (!is_dir($dir_path_3)) \r\n {\r\n\tmkdir($dir_path_3,0775);\r\n chmod($dir_path_3,0777);\r\n\t}\r\n\t\r\n return($path_and_file);\r\n}", "private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }", "private function getFullWHPath($id)\r\n {\r\n \t$warehouse = Factory::service(\"Warehouse\")->getWarehouse($id);\r\n \tif($warehouse instanceof Warehouse ){\r\n \t\treturn Factory::service(\"Warehouse\")->getWarehouseBreadCrumbs($warehouse,TRUE,\"/\");\r\n \t}else{\r\n \t\treturn $id;\r\n \t}\r\n }", "public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }", "public function handle(Context $context)\n {\n // Get current user\n $userID = $context->user()->getID();\n $context->local()->addval('userid', $userID);\n\n $test = R::getAll(\"SELECT DISTINCT uploaddetail.id, upload.filename, uploaddetail.upload_id, uploaddetail.file_name, uploaddetail.file_description, upload.user_id, module.code as module_code, module.name as module_name, lecture.start_time as lecture_time, lecture.date as date FROM uploaddetail INNER JOIN lecture ON lecture.id = uploaddetail.lecture_id INNER JOIN module ON lecture.module_code = module.code INNER JOIN upload ON upload.id = uploaddetail.upload_id\");\n $context->local()->addval('uploads', $test);\n\n $modules = R::getAll(\"SELECT * FROM module\");\n $context->local()->addval('modules', $modules);\n\n $lectures = R::getAll(\"SELECT * FROM lecture\");\n $context->local()->addval('lectures', $lectures);\n\n $fd = $context->formdata();\n\n if ($fd->haspost('documentid'))\n {\n // Increment download counter\n $document = R::findOne('uploaddetail', 'upload_id=?', [$fd->post('documentid')]);\n $document->downloads = $document->downloads + 1;\n $update = R::store($document);\n\n // Find file\n $file = R::findOne('upload', 'id=?', [$fd->post('documentid')]);\n\n if ($file->canaccess($context->user())) \n {\n // Download file\n $this->file = substr($file->fname, 1);\n $context->web()->sendfile($this->file,$file->fname);\n }\n }\n\n if ($fd->haspost('module'))\n {\n $moduleCode = $fd->post('moduleCode');\n\n $lecturesMod = R::getAll('SELECT * FROM lecture WHERE module_code=\"'.$moduleCode.'\"');\n $context->local()->addval('lectureSelect', $lecturesMod);\n\n $details = R::getAll(\"SELECT DISTINCT uploaddetail.id, upload.filename, uploaddetail.upload_id, uploaddetail.file_name, uploaddetail.file_description, upload.user_id, module.code as module_code, module.name as module_name, lecture.start_time as lecture_time, lecture.date as date FROM uploaddetail INNER JOIN lecture ON lecture.id = uploaddetail.lecture_id INNER JOIN module ON lecture.module_code = module.code INNER JOIN upload ON upload.id = uploaddetail.upload_id WHERE lecture.module_code ='\" . $moduleCode . \"'\");\n $context->local()->addval('uploads', $details);\n }\n\n if ($fd->haspost('lecture'))\n {\n $lectureId = $fd->post('lectureId');\n\n $details = R::getAll(\"SELECT DISTINCT uploaddetail.id, upload.filename, uploaddetail.upload_id, uploaddetail.file_name, uploaddetail.file_description, upload.user_id, module.code as module_code, module.name as module_name, lecture.start_time as lecture_time, lecture.date as date FROM uploaddetail INNER JOIN lecture ON lecture.id = uploaddetail.lecture_id INNER JOIN module ON lecture.module_code = module.code INNER JOIN upload ON upload.id = uploaddetail.upload_id WHERE lecture.id = '\" . $lectureId . \"'\");\n $context->local()->addval('uploads', $details);\n }\n\n if ($fd->haspost('deleteb'))\n {\n // Delete note\n $delete = R::exec(\"DELETE FROM uploaddetail WHERE upload_id='\".$fd->post('deleteb').\"'\");\n $delete1 = R::exec(\"DELETE FROM upload WHERE id='\" . $fd->post('deleteb') . \"'\");\n }\n\n return '@content/documents.twig';\n }", "function generarArchivo($id, $decision){\n\t\t$this->db->where('NUMERO',$id);\n\t\t$nombre_Proy=$this->db->get('PROYECTO');\n\t\tforeach ($nombre_Proy->result() as $row){\n\t\t\t$nombre_Proyecto= $row->TITULO;\n\t\t}\n\t\t//se consulta el id y el nombre del investigador\n\t\t$this->db->where('FK_PROYECTO', $id);\n\t\t$idInvest=$this->db->get('PROYECTO_INVESTIGADOR');\n\t\tforeach ($idInvest->result() as $row){\n\t\t\t$id_Investigador= $row->FK_INVESTIGADOR;\n\t\t}\n\t\t$this->db->where('DOCUMENTO', $id_Investigador);\n\t\t$nombreInves=$this->db->get('INVESTIGADOR');\n\t\tforeach ($nombreInves->result() as $row){\n\t\t\t$nombre_Investigador= $row->NOMBRE;\n\t\t}\n\t\t\n\t\t$f1= fopen(\"respuesta_vicerrectoria.txt\", \"a\") or die (\"problemas al crear archivo\");\n\t\t\n\t\tif($decision==\"Aprobado\"){\n\t\t\n\t\tfwrite($f1, \"Vicerrectoria de Investigaciones\");\n\t\tfwrite($f1,\"\\n\".\"\\n\");\n\t\tfwrite($f1,\"Estimado \".$nombre_Investigador.\" con identificación: \".$id_Investigador.\"\\n\");\n\t\tfwrite($f1,\" le informamos que el proyecto \".$nombre_Proyecto.\" tuvo una calificación satisfactoria, por favor acercarse a esta dependencia para dar inicio al proyecto.\");\n\t\tfwrite($f1, \"\\n\".\"\\n\".\"\\n\". \"PATRICIA LANDAZURI MSc PHD.\");\n\t\t\n\t\tfclose($f1);\n\t\t}\n\t\telse{\n\t\t\tif($decision==\"No Aprobado\"){\n\t\t\t\tfwrite($f1, \"Vicerrectoria de Investigaciones\");\n\t\t\t\tfwrite($f1,\"\\n\".\"\\n\");\n\t\t\t\tfwrite($f1,\"Estimado \".$nombre_Investigador.\" con identificación: \".$id.\"\\n\");\n\t\t\t\tfwrite($f1,\" le informamos que el proyecto \".$nombre_Proyecto.\" no tuvo una calificación satisfactoria, puede acogerse al art.37 del Estatuto de investigaciones.\");\n\t\t\t\tfwrite($f1, \"\\n\".\"\\n\".\"\\n\". \"PATRICIA LANDAZURI MSc PHD.\");\n\t\t\t\tfclose($f1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function generatePath($filename);", "abstract public function getPathImage($id, $filename);", "private function load_OSF_OntologiesManagementTool()\n {\n // Get package info\n $dataPath = \"{$this->data_folder}\";\n $cwdPath = rtrim($this->currentWorkingDirectory, '/');\n $tmpPath = \"/tmp/osf/omt\";\n\n // Download\n $this->span(\"Downloading the core OSF ontologies...\", 'info');\n $this->mkdir(\"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/aggr/aggr.owl\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/iron/iron.owl\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/owl/owl.rdf\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/rdf/rdf.xml\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/rdf/rdfs.xml\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/sco/sco.owl\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/wgs84/wgs84.owl\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/wsf/wsf.owl\", \"{$tmpPath}/\");\n $this->wget(\"https://raw.github.com/structureddynamics/Ontologies-Open-Semantic-Framework/master/drupal/drupal.owl\", \"{$tmpPath}/\");\n\n // Install\n $this->span(\"Installing the core OSF ontologies...\", 'info');\n $this->cp(\"{$tmpPath}/.\", \"{$dataPath}/ontologies/files/\", TRUE);\n $this->cp(\"{$cwdPath}/resources/osf-web-services/classHierarchySerialized.srz\", \"{$dataPath}/ontologies/structure/\");\n $this->cp(\"{$cwdPath}/resources/osf-web-services/propertyHierarchySerialized.srz\", \"{$dataPath}/ontologies/structure/\");\n $this->cp(\"{$cwdPath}/resources/osf-web-services/ontologies.lst\", \"{$dataPath}/ontologies/\");\n $this->sed(\"file://localhost/data\", \"file://localhost/\".trim($dataPath, '/').\"/\",\n \"{$dataPath}/ontologies/ontologies.lst\", \"g\");\n $this->span(\"Loading the core OSF ontologies...\", 'info');\n $this->exec(\"omt --load-advanced-index=\\\"true\\\" --load-all --load-list=\\\"{$dataPath}/ontologies/ontologies.lst\\\" --osf-web-services=\\\"http://{$this->osf_web_services_domain}/ws/\\\"\");\n $this->span(\"Creating underlying ontological structures...\", 'info');\n $this->exec(\"omt --generate-structures=\\\"{$dataPath}/ontologies/structure/\\\" --osf-web-services=\\\"http://{$this->osf_web_services_domain}/ws/\\\"\");\n\n // Cleanup\n $this->span(\"Cleaning...\", 'info');\n $this->rm(\"{$tmpPath}/\", TRUE);\n }", "private function generateOpml() {\n\t\t$list = array();\n\t\tforeach ($this->catDAO->listCategories() as $key => $cat) {\n\t\t\t$list[$key]['name'] = $cat->name();\n\t\t\t$list[$key]['feeds'] = $this->feedDAO->listByCategory($cat->id());\n\t\t}\n\n\t\t$this->view->categories = $list;\n\t\treturn $this->view->helperToString('export/opml');\n\t}", "private function createAppModelFolder(){\n \n // Return a boolean to process completed\n return Storage::disk('models')->makeDirectory($this->appNamePath);\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 }", "protected function build_node_path($id, $name = '', $root = '') {\n $path = $id;\n if (!empty($name)) {\n $path .= '|' . urlencode($name);\n }\n if (!empty($root)) {\n $path = trim($root, '/') . '/' . $path;\n }\n return $path;\n }", "public function getContextPath() {\n\t\treturn NodePaths::generateContextPath($this->path, $this->workspace->getName(), $this->getDimensionValues());\n\t}", "protected function getPath()\n {\n\n $module = $this->option('module');\n if (is_null($module))\n {\n return $this->option('path') . '/' . ucwords($this->argument('name')) . '.php'; \n }\n else\n {\n $this->generator->getCache()->moduleName($module);\n $aux = '{Modulename}/Models/';\n $aux = str_replace('{Modulename}',ucwords($module),$aux); \n return $this->getModuleTargetPath() . $aux . ucwords($this->argument('name')) . '.php'; \n }\n\t\n\t}", "private function createCoreXmlFile()\n {\n $createdDate = (new \\DateTime())->format(\\DateTime::W3C);\n $coreXmlFileContents = <<<EOD\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<cp:coreProperties xmlns:cp=\"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <dcterms:created xsi:type=\"dcterms:W3CDTF\">$createdDate</dcterms:created>\n <dcterms:modified xsi:type=\"dcterms:W3CDTF\">$createdDate</dcterms:modified>\n <cp:revision>0</cp:revision>\n</cp:coreProperties>\nEOD;\n\n $this->createFileWithContents($this->docPropsFolder, self::CORE_XML_FILE_NAME, $coreXmlFileContents);\n\n return $this;\n }", "protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }", "public function getPathToFile(): string;", "private function makeDirectory(): void\n {\n $this->directory = $this->simulation->fileAbsolutePath('correlations/' . $this->id);\n Utils::createDirectory($this->directory);\n }", "function sccp_create_device_XML($dev_id = '') {\n\n if (empty($dev_id)) {\n return false;\n }\n\n $dev_config = $this->dbinterface->get_db_SccpTableData(\"get_sccpdevice_byid\", array('id' => $dev_id));\n\n foreach ($this->sccpvalues as $key => $value) {\n $data_value[$key] = $value['data'];\n }\n $data_value['ntp_timezone_id'] = $this->extconfigs->getextConfig('sccp_timezone', $data_value['ntp_timezone']);\n $data_value['server_if_list'] = $this->getIP_information();\n $dev_config['tftp_path'] = $this->sccppath[\"tftp_path\"];\n \n $dev_config['addon_info'] = array();\n if (!empty($dev_config['addon'])) {\n $hw_addon = explode(',', $dev_config['addon']);\n foreach ($hw_addon as $key) {\n $hw_data = $this->getSccp_model_information('byid', false, \"all\", array('model' => $key));\n $dev_config['addon_info'][$key] = $hw_data[0]['loadimage'];\n }\n }\n $lang_data = $this->extconfigs->getextConfig('sccp_lang');\n// return $this->sccppath[\"tftp_path_store\"];\n \n return $this->xmlinterface->create_SEP_XML($this->sccppath[\"tftp_path_store\"], $data_value, $dev_config, $dev_id, $lang_data);\n\n\n /*\n\n $var_xml_general_fields = array('authenticationURL' => 'dev_authenticationURL', 'informationURL' => 'dev_informationURL', 'messagesURL' => 'dev_messagesURL',\n 'servicesURL' => 'dev_servicesURL', 'directoryURL' => 'dev_directoryURL', 'proxyServerURL' => 'dev_proxyServerURL', 'idleTimeout' => 'dev_idleTimeout',\n 'idleURL' => 'dev_idleURL', 'sshUserId' => 'dev_sshUserId', 'sshPassword' => 'dev_sshPassword', 'deviceProtocol' => 'dev_deviceProtocol'\n );\n $var_xml_general_vars = array('capfAuthMode' => 'null', 'capfList'=> 'null', 'mobility' => 'null',\n 'phoneServices' =>'null', 'certHash' =>'null',\n 'deviceSecurityMode' => '1');\n\n if (empty($dev_id)) {\n return false;\n }\n $var_hw_config = $this->dbinterface->get_db_SccpTableData(\"get_sccpdevice_byid\", array('id' => $dev_id));\n\n if (empty($var_hw_config)) {\n return false;\n }\n\n if (!empty($var_hw_config['nametemplate'])) {\n $xml_template = $this->sccppath[\"tftp_templates\"] . '/' . $var_hw_config['nametemplate'];\n } else {\n $xml_template = $this->sccppath[\"tftp_templates\"] . '/SEP0000000000.cnf.xml_79df_template';\n }\n $xml_name = $this->sccppath[\"tftp_path\"] . '/' . $dev_id . '.cnf.xml';\n if (file_exists($xml_template)) {\n $xml_work = simplexml_load_file($xml_template);\n\n foreach ($var_xml_general_vars as $key => $data) {\n if (isset($xml_work->$key)) {\n if ($data != 'null') {\n $xml_work->$key = $data;\n } else {\n $node = $xml_work->$key;\n unset($node[0][0]);\n }\n }\n }\n\n foreach ($xml_work as $key => $data) {\n // Set System global Values\n if (!empty($var_xml_general_fields[$key])) {\n $xml_work->$key = $this->sccpvalues[$var_xml_general_fields[$key]]['data'];\n }\n // Set section Values\n $xml_node = $xml_work->$key;\n switch ($key) {\n case 'devicePool':\n $xml_node = $xml_work->$key;\n foreach ($xml_work->$key->children() as $dkey => $ddata) {\n switch ($dkey) {\n case 'dateTimeSetting':\n $xnode = &$xml_node->$dkey;\n $tz_id = $this->sccpvalues['ntp_timezone']['data'];\n $TZdata = $this-> extconfigs->getextConfig('sccp_timezone',$tz_id);\n if (empty($TZdata)){\n $TZdata = array('offset' => '0', 'daylight' => '');\n }\n $xnode->name = $tz_id;\n $xnode->dateTemplate = $this->sccpvalues['dateformat']['data'];\n $xnode->timeZone = $tz_id.((empty($TZdata['daylight']))? '': '/'.$TZdata['daylight']);\n\n if ($this->sccpvalues['ntp_config_enabled']['data'] == 'yes') {\n $xnode->ntps->ntp->name = $this->sccpvalues['ntp_server']['data'];\n $xnode->ntps->ntp->ntpMode = $this->sccpvalues['ntp_server_mode']['data'];\n } else {\n $xnode->ntps = '';\n }\n // Ntp Config\n break;\n case 'srstInfo':\n if ($this->sccpvalues['srst_Option']['data'] == 'user') {\n break;\n }\n $xnode = &$xml_node->$dkey;\n $xnode -> name = $this->sccpvalues['srst_Name']['data'];\n $xnode -> srstOption = $this->sccpvalues['srst_Option']['data'];\n $xnode -> userModifiable = $this->sccpvalues['srst_userModifiable']['data'];\n $xnode -> isSecure = $this->sccpvalues['srst_isSecure']['data'];\n\n $srst_fld = array('srst_ip' => array('ipAddr','port') );\n // $srst_fld = array('srst_ip' => array('ipAddr','port') , 'srst_sip' => array('sipIpAddr','sipPort') );\n foreach ($srst_fld as $srst_pro => $srs_put){\n $srst_data = explode(';', $this->sccpvalues[$srst_pro]['data']);\n $si = 1;\n // $xnode['test'] = $srst_data[0];\n foreach ($srst_data as $value) {\n $srs_val = explode('/',$value);\n $nod = $srs_put[0].$si;\n $xnode -> $nod = $srs_val[0];\n $nod = $srs_put[1].$si;\n $xnode -> $nod = $srs_val[1];\n $si ++;\n }\n while ($si < 4) {\n $nod = $srs_put[0].$si;\n $xnode -> $nod = '';\n $nod = $srs_put[1].$si;\n $xnode -> $nod = '';\n $si ++;\n }\n }\n break;\n case 'connectionMonitorDuration':\n $xml_node->$dkey = strval(intval(intval($this->sccpvalues['keepalive']['data'])* 0.75));\n break;\n case 'callManagerGroup':\n $xnode = &$xml_node->$dkey->members;\n if ($this->sccpvalues['bindaddr']['data'] == '0.0.0.0') {\n $ifc = 0;\n foreach ($this->getIP_information() as $value) {\n if (!empty($value[0])) {\n if (!in_array($value[0], array('0.0.0.0', '127.0.0.1'), true)) {\n $xnode_obj = clone $xnode->member;\n // $xnode_obj = $xnode -> member;\n // $xnode_obj = $xnode -> addChild($xnode->member);\n $xnode_obj['priority'] = $ifc;\n //$xnode_obj = &$xnode -> member -> callManager;\n $xnode_obj->callManager->name = $this->sccpvalues['servername']['data'];\n $xnode_obj->callManager->ports->ethernetPhonePort = $this->sccpvalues['port']['data'];\n $xnode_obj->callManager->processNodeName = $value[0];\n if ($ifc === 0) {\n $this->replaceSimpleXmlNode($xnode->member, $xnode_obj);\n } else {\n $this->appendSimpleXmlNode($xnode->member, $xnode_obj);\n }\n $ifc ++;\n }\n }\n }\n } else {\n $xnode->member['priority'] = '0';\n $xnode_obj = &$xnode->member->callManager;\n $xnode_obj->name = $this->sccpvalues['servername']['data'];\n $xnode_obj->ports->ethernetPhonePort = $this->sccpvalues['port']['data'];\n $xnode_obj->processNodeName = $this->sccpvalues['bindaddr']['data'];\n }\n break;\n }\n }\n $this->replaceSimpleXmlNode($xml_work->$key, $xml_node);\n break;\n case 'versionStamp':\n $xml_work->$key = time();\n break;\n case 'loadInformation':\n $xml_work->$key = $var_hw_config[\"loadimage\"];\n if (!empty($var_hw_config['addon'])) {\n $hw_addon = explode(',', $var_hw_config['addon']);\n $xnode = $xml_work->addChild('addOnModules');\n $ti = 1;\n foreach ($hw_addon as $key) {\n $hw_inf = $this->getSccp_model_information('byid', false, \"all\", array('model' => $key));\n $xnode_obj = $xnode->addChild('addOnModule');\n // if $hw_inf['loadimage']\n $xnode_obj->addAttribute('idx', $ti);\n $xnode_obj->addChild('loadInformation', $hw_inf[0]['loadimage']);\n $ti ++;\n }\n // $this->appendSimpleXmlNode($xml_work , $xnode_obj);\n }\n break;\n case 'userLocale':\n case 'networkLocaleInfo':\n case 'networkLocale':\n $hwlang = '';\n $lang = '';\n if (!empty($var_hw_config[\"_hwlang\"])) {\n $hwlang = explode(':', $var_hw_config[\"_hwlang\"]);\n }\n if (($key == 'networkLocaleInfo') || ($key == 'networkLocale')) {\n // $lang=$this->sccpvalues['netlang']['data'];\n $lang = (empty($hwlang[0])) ? $this->sccpvalues['netlang']['data'] : $hwlang[0];\n } else {\n $lang = (empty($hwlang[1])) ? $this->sccpvalues['devlang']['data'] : $hwlang[1];\n // $lang=$this->sccpvalues['devlang']['data'];\n }\n if (($lang !='null') && (!empty(trim($lang)))) {\n if ($key == 'networkLocale') {\n $xml_work->$key = $lang;\n } else {\n $lang_arr = $this->extconfigs->getextConfig('sccp_lang',$lang);\n if (!empty($lang_arr)) {\n $xml_node->name = $lang_arr['locale'];\n $xml_node->langCode = $lang_arr['code'];\n $this->replaceSimpleXmlNode($xml_work->$key, $xml_node);\n }\n }\n } else {\n $xml_work->$key ='';\n }\n break;\n // Move all set to $var_xml_general_vars\n // case 'mobility':\n // case 'capfList':\n // break;\n // case 'phoneServices':\n // break;\n // $xml_work->$key = '';\n default:\n break;\n }\n }\n\n // print_r($xml_work);\n $xml_work->asXml($xml_name); // Save\n } else {\n die('Error Hardware template :' . $xml_template . ' not found');\n }\n return time();\n * \n */\n }", "function cot_pfs_filepath($id)\n{\n\tglobal $db, $db_pfs_folders, $db_pfs, $cfg;\n\n\t$sql = $db->query(\"SELECT p.pfs_file AS file, f.pff_path AS path FROM $db_pfs AS p LEFT JOIN $db_pfs_folders AS f ON p.pfs_folderid=f.pff_id WHERE p.pfs_id=\".(int)$id.\" LIMIT 1\");\n\tif($row = $sql->fetch())\n\t{\n\t\treturn ($cfg['pfs']['pfsuserfolder'] && $row['path']!='') ? $row['path'].'/'.$row['file'] : $row['file'];\n\t}\n\telse\n\t{\n\t\treturn '';\n\t}\n}", "public function getObjectByPath($path, OperationContextInterface $context = NULL);", "public function actionCreate($title) {\n $path = $this->module->create($title);\n if(!$path) {\n $this->stdout(\"Unable to create file\", Console::FG_RED);\n return 1;\n }\n\n $this->stdout(\"The file \", Console::FG_GREEN);\n $this->stdout($path, Console::FG_GREEN, Console::BOLD);\n $this->stdout(\" has been generated.\", Console::FG_GREEN);\n return 0;\n }", "public function create($path);", "protected function _buildTree($id)\n {\n return '';\n }", "protected function removeEntry(string $contextId, string $id)\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n\n\n /**\n * If the entry is found, we remove it directly from the operations.\n */\n $addTheDeleteEntry = true;\n $realpath = null;\n $op = null;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $addTheDeleteEntry = false;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n break;\n case \"update\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n $addTheDeleteEntry = true;\n break;\n }\n }\n }\n\n\n if (true === $addTheDeleteEntry) {\n $ops[] = [\n 'type' => \"remove\",\n 'id' => $id,\n ];\n }\n\n $this->onFileRemovedAfter($contextId, $id, $op, $realpath);\n\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n\n }", "public function open($path, $id)\n {\n $file = (string) $path . '/' . $id;\n\n $this->path = (string) $path;\n\n is_dir($path) || mkdir($path, 777);\n\n file_exists($file) || touch($file);\n\n return true;\n }", "function generate_directory($id){\n $filename = \"intranet/usuarios/\" . $id . \"/uploads/\";\n if (!file_exists($filename)) {\n mkdir($filename, 0777, true);\n }\n }", "function createFile($user_id, $path) {\r\n\t\t$sql = '\r\n INSERT INTO\r\n files\r\n (\r\n regdate,\r\n path,\r\n user_id\r\n )\r\n VALUES (\r\n NOW(), ?, ?\r\n )\r\n ';\r\n\r\n\t\treturn $this->query_exec($sql, array($path, $user_id));\r\n\t}", "public function createFileSystemMock(MutationInterface2 $mutation);", "function getPatchFileName($id)\n\t{\n\t\treturn 'p' . $id . '.patch.txt';\n\t}", "function createFileInterface($filePath)\n{\n //$sxe=simplexml_load_file( $filePath );//Default file type\n if (file_exists($filePath)) \n {\n $xml = simplexml_load_file($filePath);\n createSaveForm($filePath);\n dispFile( $xml);\n }\n else \n {\n exit('Failed to open' . $filePath);\n }\n}", "public function new_file()\n {\n $input = JFactory::getApplication()->input;\n\n $ecr_project = $input->get('ecr_project');\n\n if($input->get('do_action') == 'new_file')\n {\n $reqPath = $input->getPath('act_path');\n $reqName = $input->getPath('act_name');\n\n $path = JPath::clean(JPATH_ROOT.DS.$reqPath.DS.$reqName);\n\n if(is_dir($path))\n {\n EcrHtml::message(array(jgettext('This is a folder'), $path), 'error');\n\n return;\n }\n\n if(is_file($path))\n {\n EcrHtml::message(array(jgettext('The file already exists'), $path), 'error');\n\n return;\n }\n\n //-- @todo file from template\n $template = 'new file';\n\n if( ! is_int(file_put_contents($path, $template)))\n {\n EcrHtml::message(array(jgettext('Unable to create file'), $path), 'error');\n\n return;\n }\n\n //-- Clean the cache\n JFactory::getCache('EasyCreator_'.$ecr_project)->clean();\n\n echo '*OK*';\n\n return;\n }\n\n $this->actForm(jgettext('New file'), 'add', jgettext('Create'));\n $this->processForm('new_file', $ecr_project, 'file', 'new', true, true);\n }", "public function getOperation();", "protected function _evalPath($id = 0){\n\t\t$db = new DB_WE();\n\t\t$path = '';\n\t\tif($id == 0){\n\t\t\t$id = $this->ParentID;\n\t\t\t$path = $this->Text;\n\t\t}\n\n\t\t$result = getHash('SELECT Text,ParentID FROM ' . $this->_table . ' WHERE ' . $this->_primaryKey . '=' . intval($id), $db);\n\t\t$path = '/' . (isset($result['Text']) ? $result['Text'] : '') . $path;\n\t\t$pid = isset($result['ParentID']) ? intval($result['ParentID']) : 0;\n\t\twhile($pid > 0){\n\t\t\t$result = getHash('SELECT Text,ParentID FROM ' . $this->_table . ' WHERE ' . $this->_primaryKey . '=' . $pid, $db);\n\t\t\t$path = '/' . $result['Text'] . $path;\n\t\t\t$pid = intval($result['ParentID']);\n\t\t}\n\t\treturn $path;\n\t}", "function create_file($file_path, $content=''){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "public function create(array $config): FilesystemInterface;", "function mdl_io_create_writer(string $path, $mode = 'r', $include_path = false, $context = null)\n{\n try {\n $descriptor = @fopen($path, $mode, $include_path, $context);\n clearstatcache(true, $path);\n if (false === $descriptor) {\n throw new \\RuntimeException(sprintf('Error opening stream at path: %s. %s', $path, error_get_last()['message'] ?? ''));\n }\n return new class($descriptor)\n {\n /**\n * @var int|resource\n */\n private $descriptor;\n\n /**\n * Creates a read writer instance.\n *\n * @param mixed $descriptor\n *\n * @return void\n */\n public function __construct($descriptor)\n {\n $this->descriptor = $descriptor;\n }\n\n public function __destruct()\n {\n $this->close();\n }\n\n public function write(string $data, ?int $length = null, $operation = \\LOCK_EX | \\LOCK_NB)\n {\n // Case the read writer is not a resource, we simply return false\n if (!is_resource($this->descriptor)) {\n return false;\n }\n $bytes = false;\n if ($this->descriptor && @flock($this->descriptor, $operation)) {\n $bytes = @fwrite($this->descriptor, $data, $length);\n @flock($this->descriptor, \\LOCK_UN);\n }\n return $bytes;\n }\n\n public function close()\n {\n if (null !== $this->descriptor && is_resource($this->descriptor)) {\n fclose($this->descriptor);\n $this->descriptor = null;\n }\n }\n };\n } catch (\\Throwable $e) {\n throw new \\RuntimeException(\"Error while opening file: \" . $e->getMessage());\n }\n}", "public function copyFiles() {\n\n $customAction = File::get(__DIR__.'/../Services/stub/config/customAction.php.stub');\n\n $dbexporter = File::get(__DIR__.'/../Services/stub/config/dbexporter.php.stub');\n\n $pathCustom = config_path().'/customAction.php';\n\n $pathDbExporter = config_path().'/dbexporter.php';\n\n $this->createFile($pathCustom,$customAction);\n\n $this->createFile($pathDbExporter,$dbexporter);\n\n }", "private function createNewTmpICal()\n\t{\n\n\t\t$config = Factory::getConfig();\n\t\t$path = $config->get('config.tmp_path') ? $config->get('config.tmp_path') : $config->get('tmp_path');\n\t\techo \"create temp CSV conversion file in \" . $path . \"<br/>\";\n\t\t$this->tmpFileName = tempnam($path, \"phpJE\");\n\t\t//$this->tmpFileName = tempnam(\"/tmp\", \"phpJE\");\n\t\t$this->tmpfile = fopen($this->tmpFileName, \"w\");\n\t\tfwrite($this->tmpfile, \"BEGIN:VCALENDAR\\n\");\n\t\tfwrite($this->tmpfile, \"VERSION:2.0\\n\");\n\t\tfwrite($this->tmpfile, \"PRODID:-//jEvents 2.0 for Joomla//EN\\n\");\n\t\tfwrite($this->tmpfile, \"CALSCALE:GREGORIAN\\n\");\n\t\tfwrite($this->tmpfile, \"METHOD:PUBLISH\\n\");\n\n\t}", "public static function GetPath($id){\n\t\treturn Yii::getPathOfAlias('application.GBlocks.'.$id);\n\t}", "private function getEntryRealPathByOperation(string $contextId, array $operation, array $options = []): string\n {\n if ('remove' === $operation['type']) {\n $id = $operation['id'];\n $this->error(\"Cannot get realpath from a remove operation, with contextId=\\\"$contextId\\\" and id=\\\"$id\\\".\");\n }\n\n return $this->doGetEntryRealPathByOperation($contextId, $operation, $options);\n }", "public function createPath(string $path): string;", "abstract public function getCurrentPath();", "private function createFile(array $options): void\n {\n if (class_exists($options['className'])) {\n Console::fatal($options['entityName'] . ' ' . $options['fileKind'] . ' file already exists.');\n }\n\n Console::write('Generating ' . $options['entityName'] . ' ' . $options['fileKind'] . ' file..');\n\n $templateContent = $this->getFileTemplate($options['fileKind']);\n $fileContent = str_replace($options['replace']['tags'], $options['replace']['values'], $templateContent);\n\n if (file_put_contents(Config::get('BaseDir') . 'app/' . $options['filePath'], $fileContent)) {\n Console::success('[OK]' . PHP_EOL);\n } else {\n Console::error('[FAIL]' . PHP_EOL);\n }\n }", "protected function handleOperation($op) {\n $output = '';\n $op_type = $this->checkAndGet($op, 'operation');\n switch ($op_type) {\n case 'filemodify':\n $mode = $this->convertMode($this->checkAndGet($op, 'mode'));\n $output .= sprintf(\"M %s inline %s\\n\",\n $mode,\n $this->checkAndGet($op, 'path'));\n $output .= $this->handleData($this->checkAndGet($op, 'data'));\n break;\n\n case 'filedelete':\n $output .= sprintf(\"D %s\\n\", $this->checkAndGet($op, 'path'));\n break;\n\n case 'filecopy':\n $output .= sprintf(\"C %s %s\\n\",\n $this->checkAndGet($op, 'src'),\n $this->checkAndGet($op, 'dst'));\n break;\n\n case 'filerename':\n $output .= sprintf(\"R %s %s\\n\",\n $this->checkAndGet($op, 'src'),\n $this->checkAndGet($op, 'dst'));\n break;\n case 'filedeleteall':\n $output .= \"deleteall\\n\";\n break;\n default:\n throw new Exception(\"Unknown operation type '$op_type'.\");\n }\n\n return $output;\n }", "public function createPath()\n {\n return config('maxolex.config.views').'/'.$this->parser->singular().'/'.'create.blade.php';\n }", "function getPath(): string;", "public function createPath($fs, $file): string\n {\n $path = '';\n\n if (!isset($file['parId'])) {\n return $file['id'];\n }\n\n $parId = $file['parId'];\n while (isset($fs[$parId])) {\n $path = $fs[$parId]['id'].'/'.$path;\n $parId = isset($fs[$parId]['parId']) ? $fs[$parId]['parId'] : null;\n }\n return $path.$file['id'];\n }", "public function actionGenerateAndDownloadDatasetCreationFile() {\n $fileColumns[] = DatasetController::AGRONOMICAL_OBJECT_URI;\n $fileColumns[] = DatasetController::DATE;\n $variables = Yii::$app->request->post('variables');\n foreach ($variables as $variableAlias) {\n $fileColumns[] = $variableAlias;\n }\n\n $file = fopen('./documents/DatasetFiles/datasetTemplate.csv', 'w');\n fputcsv($file, $fileColumns, $delimiter = \";\"); \n fclose($file);\n }", "public function createCCF($intModelId) {\r\n if (!self::ccf_key_10) {\r\n return $this->addError(\"(createCCF) CCF Keyfile is not defined\");\r\n }\r\n\t\t\tif (!isset($this->arrModel[$intModelId])) {\r\n\t\t\t\treturn $this->addError('(createDLC) Data model with Id '.$intModelId.' not exists');\r\n\t\t\t}\r\n # Create XML\r\n\t\t\t$strXML = '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\r\n\t\t\t$strXML.= '<CryptLoad>';\r\n\t\t\tfor ($a=0; $a<count($this->arrModel[$intModelId]['packages']); $a++) {\r\n $strXML.= '<Package service=\"\" name=\"'.$this->ccfDataEncode($this->arrModel[$intModelId]['packages'][$a]['name']).'\" url=\"Directlinks\">';\r\n\t\t\t\t$strXML.= '<Options>';\r\n\t\t\t\t\t$strTmp = $this->arrModel[$intModelId]['packages'][$a]['comment'];\r\n\t\t\t\t\tif (!trim($strTmp)) $strTmp = 'create by DLCAPI';\r\n\t\t\t\t\t$strXML.= ($strTmp) ? '<Kommentar>'.$this->ccfDataEncode($strTmp).'</Kommentar>' : '<Kommentar />';\r\n\t\t\t\t\t$strTmp = $this->arrModel[$intModelId]['packages'][$a]['passwords'];\r\n\t\t\t\t\tif (is_array($strTmp)) {\r\n\t\t\t\t\t\t$strTmp = implode(',',$strTmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$strXML.= ($strTmp) ? '<Passwort>'.$this->ccfDataEncode($strTmp).'</Passwort>' : '<Passwort />';\r\n\t\t\t\t$strXML.= '</Options>';\r\n\t\t\t\tfor ($b=0; $b<count($this->arrModel[$intModelId]['packages'][$a]['links']); $b++) {\r\n \t\t\t\t$strXML.= '<Download Url=\"'.$this->ccfDataEncode($this->arrModel[$intModelId]['packages'][$a]['links'][$b]['url']).'\">';\r\n $strTmp = $this->arrModel[$intModelId]['packages'][$a]['links'][$b]['size'];\r\n \t\t\t\t$strXML.= '<FileSize>'.$this->ccfDataEncode(($strTmp ? $strTmp : 0)).'</FileSize>';\r\n \t\t\t\t$strXML.= '<Url>'.$this->ccfDataEncode($this->arrModel[$intModelId]['packages'][$a]['links'][$b]['url']).'</Url>';\r\n \t\t\t\t$strTmp = $this->arrModel[$intModelId]['packages'][$a]['links'][$b]['filename'];\r\n $strXML.= ($strTmp) ? '<FileName>'.$this->ccfDataEncode($strTmp).'</FileName>' : '<FileName/>';\r\n \t\t\t\t$strXML.= '</Download>';\r\n \t\t\t}\r\n\t\t\t\t$strXML.= '</Package>';\r\n\t\t\t}\r\n\t\t\t$strXML.= '</CryptLoad>';\r\n \r\n\t\t\t# Build CCF stream\r\n \t\t$strXML = utf8_encode($strXML);\r\n \t\t$arrKeyList = array(self::ccf_key_10,self::ccf_key_08,self::ccf_key_07);\r\n \t\t$arrIVList = array(self::ccf_iv_10,self::ccf_iv_08,self::ccf_iv_07);\r\n \t\t$hdlCCFCrypt = mcrypt_module_open(MCRYPT_RIJNDAEL_128,'',MCRYPT_MODE_CBC,'');\r\n \t\tmcrypt_generic_init($hdlCCFCrypt,$this->base16Decode($arrKeyList[0]),$this->base16Decode($arrIVList[0]));\r\n \t\t$strStream = mcrypt_generic($hdlCCFCrypt,$strXML);\r\n \t\tmcrypt_generic_deinit($hdlCCFCrypt);\r\n \t\tmcrypt_module_close($hdlCCFCrypt);\r\n \t\tunset($hdlCCFCrypt);\r\n \t\treturn $strStream;\r\n }", "public function getOperationId()\n {\n return $this->operation_id;\n }", "public function path();", "public function writeContentControllerFile($file){\n /*sample file*/ \n $sampleFile = self::SAMPLE_PATH.DS.'Action.php'; \n $sampleAbstractFile = self::SAMPLE_PATH.DS.'Abstract.php';\n $sampleExport = self::SAMPLE_PATH.DS.'ExportData.php';\n /* */ \n $class_name = Mage::helper('magento2challenge')->getClassName($file);\n $explodeClass = explode('_',$class_name);\n $namespace = $explodeClass[0];\n $modulename = $explodeClass[1];\n $exController = explode('Controller',end($explodeClass));\n $className = $exController[0];\n $exFile = explode('Controller.php',$file);\n $controllerPath = $exFile[0];\n if(strpos($file,'Adminhtml') !== false) { \n $class = $namespace.DS.$modulename.DS.'Controller'.DS.'Adminhtml'.DS.$className; \n $absClass = $namespace.DS.$modulename.DS.'Controller'.DS.'Adminhtml';\n }\n else{\n $class = $namespace.DS.$modulename.DS.'Controller'.DS.$className; \n $absClass = $namespace.DS.$modulename.DS.'Controller';\n }\n $abstractClass = $controllerPath.'.php';\n if(!file_exists($controllerPath))\n mkdir($controllerPath,0777,true);\t\n // write content file\n $functionNames = $this->getFunctionsName(file_get_contents($file),$class_name);\t\n $funcArray = array();\n $functionContent = '';\n foreach($functionNames as $func){\n //create abstract action\n $abstractContent = file_get_contents($sampleAbstractFile);\n if(substr_count(file_get_contents($file),$func) > 1){\n if(!in_array($func,$funcArray)){\n $functionContent .= \t$this->replaceContentFunction($file,$func,$class_name,true);\n $sampleContent = file_get_contents($sampleAbstractFile);\n $action = $className;\n $fileContent = $this->replaceAbstractContent($sampleContent,$absClass,$action,$functionContent);\n $fileContent = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'other');\n $filePath = $abstractClass;\n $handle = fopen ($filePath, 'w');\n fputs($handle, $fileContent); \n }\n $funcArray[] = $func; \n }\n //\n //create action file and write content \n $sampleContent = file_get_contents($sampleFile);\n $funcEx = explode('Action',$func);\n $action = ucwords($funcEx[0]);\n $newContent = $this->replaceContentFunction($file,$func,$class_name,false);\n $fileContent = $this->replacePhp($sampleContent,$class,$action,$class,$newContent);\n if($action == 'New') $action = 'NewAction';\n $filePath = $controllerPath.DS.$action.'.php';\n $handle = fopen ($filePath, 'w');\n // replace export csv/excel\n if(strpos($fileContent,'_prepareDownloadResponse') !== false){\n $funcEx = explode('Action',$func);\n $actionName = ucwords($funcEx[0]);\n $fileName = strtolower($modulename);\n if(strpos($fileContent,'getCsv()')){\n $fileName = $fileName.'.csv';\n $fileName = \"'\".$fileName.\"'\";\n $functionName = 'getCsvFile';\n }\n if(strpos($fileContent,'getXml()')){\n $fileName = $fileName.'.xml';\n $fileName = \"'\".$fileName.\"'\";\n $functionName = 'getExcelFile';\n }\n if(!isset($functionName)) continue; \n $blockclassName = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'export'); \n $fileContent = $this->replaceExport(file_get_contents($sampleExport),$class,$actionName,$fileName,$blockclassName,$functionName);\n }\n else{\n $fileContent = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'other');\n }\n //\n fputs($handle, $fileContent); \n fclose($handle);\n //\n }\n // delete file\n unlink($file);\n //\n return true;\t\n }", "protected function fullpath( $id, $archived )\n {\n $path = $this->path;\n if ( $archived )\n {\n $path .= 'archived/';\n }\n $path .= $id . $this->extension;\n return $path;\n }", "private function getXmlFile() {\n if (!$this->xmlFileCreated) {\n $this->createXmlDataFile();\n }\n return DOKU_INC . $this->command->getConf(\"processingXmlFile\");\n }", "protected function onFileRemovedAfter(string $contextId, string $id, ?array $op, ?string $realpath)\n {\n\n }", "public function path(): string\n {\n return 'files/' . $this->model->filename();\n }", "public function getFilePath(): string\n {\n return oas_path(\n $this->version . '/components/schemas/' . $this->getFileName() . '.json'\n );\n }", "private function getFile(string $id, bool $mkdir = false, string $directory = null): string\n {\n $hash = str_replace('/', '-', base64_encode(hash('xxh128', static::class.$id, true)));\n $dir = ($directory ?? $this->directory).strtoupper($hash[0].\\DIRECTORY_SEPARATOR.$hash[1].\\DIRECTORY_SEPARATOR);\n\n if ($mkdir && !is_dir($dir)) {\n @mkdir($dir, 0777, true);\n }\n\n return $dir.substr($hash, 2, 20);\n }", "public function createContext(): IContext;", "function tep_get_path($current_category_id = '') {\n\tglobal $cPath_array, $obj_categories;\n\tif (tep_not_null($current_category_id)) {\n\t\t$cp_size = sizeof($cPath_array);\n\t\tif ($cp_size == 0) {\n\t\t\t$cPath_new = $current_category_id;\n\t\t} else {\n\t\t\t$cPath_new = '';\n\n\t\t\t$last_category_parent_id = $obj_categories->get_parent_id((int)$cPath_array[($cp_size-1)]);\n\t\t $current_category_parent_id = $obj_categories->get_parent_id((int)$current_category_id);\n\n\t\t\tif ($last_category_parent_id == $current_category_parent_id) {\n\t\t\t\tfor ($i=0; $i<($cp_size-1); $i++) {\n\t\t\t\t\t$cPath_new .= '_' . $cPath_array[$i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ($i=0; $i<$cp_size; $i++) {\n\t\t\t\t\t$cPath_new .= '_' . $cPath_array[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cPath_new .= '_' . $current_category_id;\n\t\t\tif (substr($cPath_new, 0, 1) == '_') {\n\t\t\t\t$cPath_new = substr($cPath_new, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$cPath_new = implode('_', $cPath_array);\n\t}\n\treturn 'cPath=' . $cPath_new;\n}", "public function getOutputPath(): string;", "function create_temp_xml($file_path, $protection_options){\n $path_info = pathinfo($file_path);\n $dir_name = realpath($path_info[\"dirname\"]);\n\n $xml = new SimpleXMLElement(\"<project></project>\");\n\n $xml->addAttribute(\"outputDir\", $dir_name . \"\\obfuscated\");\n $xml->addAttribute(\"baseDir\", $dir_name);\n $xml->addAttribute(\"xmlns\", \"http://confuser.codeplex.com\"); // <- i dont think thats needed\n\n $rules = $xml->addChild(\"rule\");\n $rules->addAttribute(\"pattern\", \"true\");\n $rules->addAttribute(\"inherit\", \"false\");\n\n foreach ($protection_options as &$opt) {\n $protections = $rules->addChild(\"protection\");\n $protections->addAttribute(\"id\", $opt);\n }\n\n $mdl = $xml->addChild(\"module\");\n $mdl->addAttribute(\"path\", $path_info[\"basename\"]);\n\n $xml_output_path = \"projects/\" . uniqid() . \".crproj\";\n\n $output = fopen($xml_output_path, \"w\");\n fwrite($output, explode(\"\\n\", $xml->asXML(), 2)[1]);\n fclose($output);\n\n return realpath($xml_output_path);\n}", "private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }", "protected function getCurrentFilename($id) {\n\n\t\tif (!$id) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ($this->getPropertyDefinition('storeExternally')) {\n\t\t\t$tableName = $this->getPropertyDefinition('foreignTableName');\n\t\t\t$key = $this->getPropertyDefinition('foreignTableKey');\n\t\t}\n\t\telse {\n\t\t\t$tableName = $this->model->getTableName();\n\t\t\t$key = $this->model->getTableKey();\n\t\t}\n\n\t\t$db = KenedoPlatform::getDb();\n\t\t$query = \"SELECT `\".$this->propertyName.\"` FROM `\".$tableName.\"` WHERE `\".$key.\"` = '\".$db->getEscaped($id).\"'\";\n\t\t$db->setQuery($query);\n\t\t$filename = (string)$db->loadResult();\n\n\t\treturn $filename;\n\n\t}", "protected function getCreatedFilesWorldWritableStatus() {}" ]
[ "0.54305196", "0.53098416", "0.5243714", "0.51919615", "0.49407333", "0.48862344", "0.4839997", "0.48362857", "0.4762411", "0.46823785", "0.46757445", "0.46458334", "0.463639", "0.4614914", "0.4492277", "0.44777828", "0.44698673", "0.44611558", "0.44294965", "0.4426375", "0.44233593", "0.4405015", "0.44013035", "0.4392272", "0.43851838", "0.43826988", "0.43736583", "0.43705046", "0.43496162", "0.434683", "0.43375194", "0.4337102", "0.43360612", "0.43268502", "0.432177", "0.43212253", "0.43186137", "0.43028542", "0.42983267", "0.4293891", "0.4280571", "0.4279465", "0.42735088", "0.42619228", "0.42564094", "0.42527327", "0.42523104", "0.42521554", "0.4248924", "0.42448968", "0.42240667", "0.42170045", "0.42137727", "0.42136008", "0.42127988", "0.42120045", "0.42112324", "0.4205657", "0.42043108", "0.41995677", "0.41977495", "0.4195766", "0.4192643", "0.4188909", "0.41844466", "0.418066", "0.41737607", "0.4173056", "0.41725254", "0.41720724", "0.41707426", "0.4169921", "0.41671032", "0.41657668", "0.41569272", "0.4156193", "0.41557077", "0.41502765", "0.41472417", "0.41422793", "0.4132629", "0.41322824", "0.4129358", "0.4126253", "0.4123862", "0.4119836", "0.41161382", "0.41133702", "0.41084686", "0.41076645", "0.41031358", "0.410306", "0.41021308", "0.40998852", "0.40993074", "0.40970835", "0.40951473", "0.40897226", "0.4076451", "0.40757385" ]
0.7465523
0
Returns the array of operations, as stored in the operations file.
protected function getRawOperations(string $contextId): array { $ret = []; $opFile = $this->getContextDir($contextId) . "/operations.byml"; if (true === file_exists($opFile)) { return BabyYamlUtil::readFile($opFile); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOps(): array\n {\n return $this->ops;\n }", "public function getOperations()\n {\n return $this->operations;\n }", "public function getOperations()\r\n {\r\n return $this->operations;\r\n }", "public function getOperations() {\n return $this->__getFunctions();\n }", "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 getOperationsFile($path) {\n\n $operations = array();\n if (isset($this->filesOperations[$path])) {\n foreach ($this->filesOperations[$path] as $operationPath) {\n $operations = array_merge($operations, $this->getOperation($operationPath));\n }\n }\n\n return $operations;\n }", "private function getOperations($className)\n {\n $classInfos = $this->getClassInfos($className);\n\n return $classInfos->{'hydra:supportedOperation'} ?? [];\n }", "public function getOperation()\n {\n $objDataBase = $this->_connectSuperDataBase();\n\n $objDataBase->executeQueryStoreProcedure('get_Operations');\n\n\t $row = $objDataBase->exploreAllArraySelect();\n\n if (!isset($row)) {\n $row[0]['Pk_operation'] = 1;\n $row[0]['name'] = Class_Config::get('operation');\n $row[0]['domain'] = Class_Config::get('domain');\n }\n\t\n\n return $row;\n }", "public function getOperators()\n {\n return array();\n }", "public function getOperators()\n {\n return array();\n }", "function _getCommands()\n\t{\n\t\t$commands = array();\n\t\t$commands[] = array( 'permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show', 'default' => true );\n//\t\t$commands[] = array('permission' => 'read', 'cmd' => 'render', 'lang_var' => 'show', 'default' => true);\n//\t\t$commands[] = array('permission' => 'write', 'cmd' => 'enableAdministrationPanel', 'lang_var' => 'edit_content');\n//\t\t$commands[] = array( 'permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'settings' );\n\n\t\treturn $commands;\n\t}", "public function operations();", "public function _getCommands()\n\t{\n\t\t$commands\t= array();\n\t\t$commands[] = array(\"permission\" => \"read\", \"cmd\" => \"view\", \"lang_var\" => \"enter\", \"default\" => true);\n\t\t$commands[] = array(\"permission\" => \"write\", \"cmd\" => \"settings-general\", \"lang_var\" => \"settings\");\n\t\t\n\t\t// alex 3 Oct 2012: this leads to a blank screen, i guess it is a copy/paste bug from files\n\t\t//$commands[] = array(\"permission\" => \"write\", \"cmd\" => \"versions\", \"lang_var\" => \"versions\");\n\n\t\treturn $commands;\n\t}", "public function getCommands()\n {\n return array();\n }", "public function getCommands()\n {\n return [\n ];\n }", "public function getCommands(): array;", "function _getCommands()\n\t{\n\t\treturn array();\n\t}", "public function getOperators();", "public function getCommands(): array\n\t{\n\t\treturn $this->commands;\n\t}", "protected function getCommands()\n {\n\t$commands[] = new DeployCommand();\n\t$commands[] = new RollbackCommand();\n\t$commands[] = new UpdateCommand();\n\t$commands[] = new DiffCommand();\n\t$commands[] = new CleanupCommand();\n\t$commands[] = new CheckCommand();\n\t$commands[] = new JsonCommand();\n\t$commands[] = new SetupCommand();\n\t$commands[] = new InstallCommand();\n\n\treturn $commands;\n }", "public function getCommands(): array\n {\n return $this->commands;\n }", "public function getCommands(): array\n {\n return $this->commands;\n }", "public function getAllowedOperations()\n {\n return [\n self::OPERATION_REQUEST,\n self::OPERATION_CANCEL,\n self::OPERATION_APPROVE,\n self::OPERATION_REJECT,\n self::OPERATION_QUERY,\n ];\n }", "public static function getOperators()\n {\n return self::$OPERATORS;\n }", "public function getOperation();", "public function getCommands()\n {\n return $this->data['commands'];\n }", "public function getExplicitVersionOperations()\n {\n $ret = [];\n foreach ($this->versionOperations as $className => $instances) {\n foreach ($instances as $id => $operationDetails) {\n $ret[]= array_merge(\n [$className, $id],\n $operationDetails\n );\n }\n }\n\n return $ret;\n }", "public function getCommands()\n\t{\n\t\treturn $this->commands;\t\n\t}", "public function getCommands();", "public function getBinaryOperators()\n {\n if (!$this->extensionInitialized) {\n $this->initExtensions();\n }\n return $this->binaryOperators;\n }", "public function getOperationsAt($offset)\n {\n return $this->get(self::_OPERATIONS, $offset);\n }", "public function get_availableOperators(): array\n {\n // $cops is a str;\n // $idx is a int;\n // $slen is a int;\n $res = []; // strArr;\n\n $cops = $this->_AT('+COPS=?');\n $slen = strlen($cops);\n while (sizeof($res) > 0) {\n array_pop($res);\n };\n $idx = YAPI::Ystrpos($cops,'(');\n while ($idx >= 0) {\n $slen = $slen - ($idx+1);\n $cops = substr($cops, $idx+1, $slen);\n $idx = YAPI::Ystrpos($cops,'\"');\n if ($idx > 0) {\n $slen = $slen - ($idx+1);\n $cops = substr($cops, $idx+1, $slen);\n $idx = YAPI::Ystrpos($cops,'\"');\n if ($idx > 0) {\n $res[] = substr($cops, 0, $idx);\n }\n }\n $idx = YAPI::Ystrpos($cops,'(');\n }\n return $res;\n }", "protected function getOpcoes() \r\n\t{\r\n\t\treturn $this->aOpcoes;\r\n\t}", "public function getCommands()\n {\n return $this->commands;\n }", "public function getCommands()\n {\n return $this->commands;\n }", "public function getCommands()\n {\n return $this->commands;\n }", "public function getCommandMap(): array\n {\n return [\n 'GetProducts' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductList',\n 'GetProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductGet',\n 'CreateProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductCreate',\n 'UpdateProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductUpdate',\n 'DeleteProduct' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\ProductDelete',\n 'GetLicenses' => '\\\\Serato\\\\SwsSdk\\\\License\\\\Command\\\\LicenseList'\n ];\n }", "public function getRegisteredMappingOperations(): array;", "public static function commands() {\n return self::$_commands;\n }", "public function getExecutableOperations($runTest = true);", "public function getCommands()\n {\n return array(\n 'mautic:leadlists:update' => array('title' => 'Update lists', 'description' => 'Updates the leads in the lists. This command is required for basic Mautic functions.'),\n 'mautic:campaigns:update' => array('title' => 'Update campaigns', 'description' => 'Adds/removes leads from campaigns. This command is required for basic Mautic functions.'),\n 'mautic:campaigns:trigger' => array('title' => 'Trigger campaigns', 'description' => 'Triggers the campaign events. This command is required for basic Mautic functions.'),\n 'mautic:email:process' => array('title' => 'Process emails', 'description' => 'Processes the emails in the queue. This command is needed if you configure the emails to be processed in a queue.'),\n 'mautic:fetch:email' => array('title' => 'Fetch emails', 'description' => 'Reads emails from a inbox defined in the Monitored Inbox setting.'),\n 'mautic:iplookup:download' => array('title' => 'Update geoIP', 'description' => 'Downloads/updates the MaxMind GeoIp2 City database. This command is needed only if you use the \"MaxMind - GeoIp2 City Download\" IP lookup service.')\n );\n }", "public function getActions() {\n $translator = $this->getTranslator();\n\n $actions = array();\n if (!$this->isReadOnly) {\n $actions[self::ACTION_ADD] = $translator->translate($this->translationAdd);\n }\n $actions[''] = $translator->translate($this->translationOverview);\n\n return $actions;\n }", "function operatorList()\r\n {\r\n return $this->Operators;\r\n }", "public function operatorList() {\n return $this->Operators;\n }", "private function registeredCommands(): array\n {\n return [\n $this->container->get(SpinUpCommand::class),\n $this->container->get(RemoveCommand::class),\n $this->container->get(InitConfigCommand::class),\n $this->container->get(ReplaceParametersCommand::class),\n $this->container->get(GetFileGroupCommand::class),\n $this->container->get(RunWebhookGroupCommand::class),\n ];\n }", "public function getOperators()\n {\n return array_keys( $this->getOperatorData() );\n }", "protected function getScanCommands()\n {\n $files = Finder::create()\n ->in($this->app['path.commands'])\n ->name('*Command.php');\n\n $commands = [];\n\n foreach ($files as $file) {\n if ($command = $this->getCommandFromSource($file)) {\n $commands = array_merge($commands, $command);\n }\n }\n\n return $commands;\n }", "public function getIops()\n {\n return $this->iops;\n }", "public function get(): array\n {\n return $this->actions->toArray();\n }", "public function listOperations($project, $optParams = array()) {\n $params = array('project' => $project);\n $params = array_merge($params, $optParams);\n $data = $this->__call('list', array($params));\n if ($this->useObjects()) {\n return new Google_OperationList($data);\n } else {\n return $data;\n }\n }", "public function index()\n {\n return Operation::all();\n }", "protected function getSupportedOperators(): array\n {\n return Arr::only(static::OPERATORS, [\n ComparisonOperator::EQ,\n ComparisonOperator::LE,\n ComparisonOperator::LT,\n ComparisonOperator::GE,\n ComparisonOperator::GT,\n ComparisonOperator::BEGINS_WITH,\n ComparisonOperator::BETWEEN,\n ]);\n }", "public function getUserOperationsAction()\n {\n $operation = new Workapp_Operation();\n $this->_helper->json($operation->getOperationList(array('user_id' => $this->getDeviceSession()->getUserId())));\n }", "public function getActions(): array\n {\n return $this->actions;\n }", "public function getCommands(): array\n {\n $fieldCommands = $this->getFieldNodes();\n $constraintCommands = \\array_map(function ($constraint) {\n return $constraint->getCommand();\n }, $this->getConstraintNodes());\n $indexCommands = \\array_map(function ($index) {\n return $index->getCommand();\n }, $this->getIndexNodes());\n\n $commands = [\n 'drop_indexes' => [],\n 'drop_constraints' => [],\n 'drop_fields' => [],\n 'fields' => [],\n 'constraints' => [],\n 'indexes' => [],\n 'self_constraints' => [],\n ];\n\n foreach ($fieldCommands as $command) {\n $commands[($command instanceof IsADropCommand ? 'drop_fields' : 'fields')][] = $command;\n }\n\n foreach ($constraintCommands as $command) {\n if (! ($command instanceof IsADropCommand) && $command->getTableName() === $command->getProperties()['on']) {\n $commands['self_constraints'][] = $command;\n } else {\n $commands[($command instanceof IsADropCommand ? 'drop_constraints' : 'constraints')][] = $command;\n }\n }\n\n foreach ($indexCommands as $command) {\n $commands[($command instanceof IsADropCommand ? 'drop_indexes' : 'indexes')][] = $command;\n }\n\n // Avoid duplications and empty values.\n foreach ($commands as $key => $value) {\n if (\\count($value) > 0) {\n $commands[$key] = \\array_filter($value);\n } else {\n unset($commands[$key]);\n }\n }\n\n return $commands;\n }", "public function getCmdList()\n {\n return $this->get(self::CMDLIST);\n }", "public function getActions(): array;", "public function getCommands()\n {\n $application = new Application($this->kernel);\n $application->setAutoExit(false);\n\n $input = new ArrayInput([\n 'command' => 'list',\n '--format' => 'xml'\n ]);\n\n $output = new StreamOutput(fopen('php://memory', 'w+'));\n $application->run($input, $output);\n rewind($output->getStream());\n\n return $this->extractCommandsFromXML(stream_get_contents($output->getStream()));\n }", "public function getCommands(): array {\n return [\n new PreloadCommand(),\n ];\n }", "public function getCommands()\n {\n return $this->getCommandBus()->getCommands();\n }", "public function getCommands()\n {\n $diContainer = EngineBlock_ApplicationSingleton::getInstance()->getDiContainer();\n $logger = EngineBlock_ApplicationSingleton::getLog();\n\n return array(\n // If EngineBlock is in Processing mode (redirecting to it's self)\n // Then don't continue with the rest of the modifications\n new EngineBlock_Corto_Filter_Command_RejectProcessingMode(),\n\n // Run custom attribute manipulations\n new EngineBlock_Corto_Filter_Command_RunAttributeManipulations(\n EngineBlock_Corto_Filter_Command_RunAttributeManipulations::TYPE_SP\n ),\n\n // Run custom attribute manipulations in case we are behind a trusted proxy.\n new EngineBlock_Corto_Filter_Command_RunAttributeManipulations(\n EngineBlock_Corto_Filter_Command_RunAttributeManipulations::TYPE_REQUESTER_SP\n ),\n\n new EngineBlock_Corto_Filter_Command_ApplyTrustedProxyBehavior($logger),\n\n // Add the appropriate NameID to the 'eduPeronTargetedID' and the Assertions NameId.\n new EngineBlock_Corto_Filter_Command_AddIdentityAttributes($logger),\n\n // Convert all attributes to their OID format (if known) and add these.\n new EngineBlock_Corto_Filter_Command_DenormalizeAttributes(),\n\n // Log the login\n new EngineBlock_Corto_Filter_Command_LogLogin($diContainer->getAuthenticationLogger()),\n );\n }", "public function getCommands($mode);", "public function getCommandList(): array\n {\n $commandConfig = $this->getCommandConfig();\n $result = [];\n\n foreach ($commandConfig as $command) {\n try {\n $this->checkCommandConfig($command);\n $result[] = $this->makeCommandObject($command);\n } catch (\\Exception $exception) {\n $this->writeData($exception->getMessage());\n exit();\n }\n }\n\n return $result;\n }", "public static function GET_COMMANDS(): array\n\t{\n\t\treturn self::$commands::GET_COMMANDS();\n\t}", "public function getOpinions()\n {\n return $this->hasMany(Opinions::class, ['task_id' => 'id']);\n }", "public function getCommand()\n {\n\n return [\n\n // Usage of the command\n 'usage' => \"Command reads a file and output it in upper or lower case\",\n\n // Options for only this command\n 'options' => [\n '--up' => 'Will put string in uppercase',\n '--low' => 'Will put string in lowercase'\n ],\n\n // 'cast' => [\n // 'up' => 'int', // Cast to int, bool, float. Default is string\n // ],\n\n // Main options, which other commands may have access to\n 'main_options' => [\n '--main' => 'Test with a main option'\n ],\n\n // Are there any arguments and what are they used for.\n // This is only for displaying help. Any number of arguments can be\n 'arguments' => [\n 'File' => 'Read from a file and output to stdout. You can also pipe input to the command',\n ],\n \n // Set a default command if none if given\n // php demos/example --up README.md\n // Instead of:\n // php demos/example echo --up README.md\n // Then set 'is_default' to true\n // 'is_default' => true, \n ];\n }", "public function getFunctions()\n {\n return array();\n }", "public function getBatchActions(): array;", "public function getMiscCommands()\n {\n return $this->getCommandList(3);\n }", "public function get_actions(): array;", "public function operators() {\n $operators = [\n 'in' => [\n 'title' => $this->t('Is one of'),\n 'short' => $this->t('in'),\n 'short_single' => $this->t('='),\n 'method' => 'opSimple',\n 'values' => 1,\n ],\n 'not in' => [\n 'title' => $this->t('Is not one of'),\n 'short' => $this->t('not in'),\n 'short_single' => $this->t('<>'),\n 'method' => 'opSimple',\n 'values' => 1,\n ],\n ];\n // if the definition allows for the empty operator, add it.\n if (!empty($this->definition['allow empty'])) {\n $operators += [\n 'empty' => [\n 'title' => $this->t('Is empty (NULL)'),\n 'method' => 'opEmpty',\n 'short' => $this->t('empty'),\n 'values' => 0,\n ],\n 'not empty' => [\n 'title' => $this->t('Is not empty (NOT NULL)'),\n 'method' => 'opEmpty',\n 'short' => $this->t('not empty'),\n 'values' => 0,\n ],\n ];\n }\n\n return $operators;\n }", "public static function getSupportedOperators()\n {\n return \\array_keys(self::$transOpStr);\n }", "private function _getAllSectionOperations($userOperations)\n {\n $operations = [];\n\n $operationList = App::getInstance()\n ->getOperation()\n ->getSectionOperations(true);\n asort($operationList);\n\n $type = Operation::TYPE_SECTIONS;\n\n foreach ($operationList as $key => $label) {\n $value = false;\n $hasSections = array_key_exists(\n $type,\n $userOperations\n );\n if ($hasSections === true) {\n $hasAll = array_key_exists(\n Operation::ALL,\n $userOperations[$type]\n );\n if ($hasAll === true) {\n $value = in_array(\n $key,\n $userOperations[$type][Operation::ALL]\n );\n }\n }\n\n $operations[] = [\n 'label' => $label,\n 'name' => sprintf(\n 'operations.%s.%s.%s',\n $type,\n Operation::ALL,\n $key\n ),\n 'value' => $value\n ];\n }\n\n return $operations;\n }", "public function index()\n {\n $infAll = Operacoes::all()->toArray();\n return array_reverse($infAll);\n }", "public function getBatchActions()\n {\n return array();\n }", "public function actions(): array\n {\n /**\n * @var string\n */\n $cmd = request('cmd', '');\n\n return [\n // new Actions\\FullcalendarAction(),\n // new Actions\\TestAction(),\n new ArtisanAction($cmd),\n ];\n }", "public function userCommands(): array\n {\n if (!array_key_exists('commands', $this->config)) {\n //Legacy config support\n return [];\n }\n\n return $this->config['commands'];\n }", "function getOperation() {\n\t\treturn $this->get('_operation', $this->get('operation'));\n\t}", "public function getActions() {\n\n\t}", "public function getActions(){\r\n\t\t\r\n\t\t\treturn $this->_actions;\r\n\t\t}", "public function getOpis()\n {\n return $this->opis;\n }", "public function transactions()\n {\n return [\n 'default' => self::OP_ALL,\n ];\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "function get_bulk_actions() {\n\n\t\treturn $actions = array(\n\t\t\t'delete'\t=> 'Delete'\n\t\t);\n\t}", "public static function getCronCommandArray()\n {\n $data = array(\n 'minutes' => '*/1',\n 'hours' => '*',\n 'days' => '*',\n 'months' => '*',\n 'weekdays' => '*',\n 'command' => self::getConsoleCommand(),\n 'output' => '/dev/null 2 > /dev/null'\n );\n \n return $data;\n }", "public function getOperation() {\n\t\treturn $this->operation;\n\t}", "public static function getAll(): array\n {\n return [\n self::GET,\n self::HEAD,\n self::POST,\n self::PUT,\n self::DELETE,\n self::CONNECT,\n self::OPTIONS,\n self::TRACE,\n self::PATCH,\n ];\n }", "public function getCommandInfo(): array\n {\n return [\n new BuiltInCommandInfo('alias', 'Add a bash-style alias', true),\n new BuiltInCommandInfo('unalias', 'Remove a bash-style alias', true)\n ];\n }", "public function operationDefinitions(): Collection\n {\n return $this->definitionsByType(OperationDefinitionNode::class);\n }", "protected function getRawDescriptionFromFile(array $operations) : array\r\n {\r\n $descriptionData = [\r\n 'baseUri' => $this->config['base_uri'],\r\n 'operations' => $operations,\r\n 'models' => [\r\n 'getResponse' => [\r\n 'type' => 'object',\r\n 'additionalProperties' => [\r\n 'location' => 'json',\r\n ],\r\n ],\r\n ],\r\n ];\r\n\r\n if (empty($descriptionData['baseUri'])) {\r\n throw new Exception('Api description does not contain a baseUrl.');\r\n }\r\n\r\n if (empty($descriptionData['operations'])) {\r\n throw new Exception('Api description does not contain any operation definition.');\r\n }\r\n\r\n return $descriptionData;\r\n }", "public Function getActions(){\n\t\treturn $this->actions;\n\t}", "public function actionOperations()\n\t{\n\t\tYii::app()->user->rightsReturnUrl = array('authItem/operations');\n\t\t\n\t\t$dataProvider = new RAuthItemDataProvider('operations', array(\n\t\t\t'type'=>CAuthItem::TYPE_OPERATION,\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsOperationTableSort',\n\t\t\t\t'element'=>'.operation-table',\n\t\t\t\t'url'=>$this->createUrl('authItem/sortable'),\n\t\t\t\t'pagination'=>array(\n\t\t\t\t\t\t'pageSize'=>5,\n\t\t\t\t),\n\t\t\t),\n\t\t));\n\t\t\n\t\t// Render the view\n\t\t$this->render('operations', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->module->enableBizRuleData,\n\t\t));\n\t}", "public function Actions()\n {\n return $this->actions;\n }", "function get_bulk_actions() {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "public function enumCommands()\n {\n $rVal = [];\n foreach ($this->xml->xpath('command') as $node) {\n $rVal[] = (string)$node[0]->attributes()->name;\n }\n\n return $rVal;\n }", "function get_bulk_actions() {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }" ]
[ "0.7763409", "0.7754083", "0.7706689", "0.753247", "0.7383205", "0.70444185", "0.6847402", "0.6553792", "0.6541558", "0.6541558", "0.6538039", "0.6523873", "0.6467685", "0.64473945", "0.63850975", "0.6374836", "0.63592875", "0.62680256", "0.6258496", "0.6239744", "0.623934", "0.623934", "0.6234786", "0.6232004", "0.622128", "0.61660254", "0.61467075", "0.6097979", "0.6095333", "0.60436064", "0.60338235", "0.6027339", "0.6004334", "0.59797686", "0.59797686", "0.59797686", "0.5978477", "0.59765947", "0.5969879", "0.595989", "0.593137", "0.59248525", "0.5921701", "0.59191847", "0.59177166", "0.59172094", "0.5916321", "0.5904373", "0.5870831", "0.58607805", "0.58127993", "0.5802473", "0.57894486", "0.5777881", "0.57703763", "0.5756868", "0.5748798", "0.5745508", "0.57203424", "0.5698389", "0.5685304", "0.5682478", "0.5667265", "0.56619984", "0.56523776", "0.56521547", "0.56519336", "0.5651381", "0.5650943", "0.56432295", "0.56429887", "0.5640546", "0.56242716", "0.5623612", "0.5620568", "0.5607971", "0.560106", "0.55957747", "0.55878985", "0.55785936", "0.5576794", "0.55758476", "0.5573869", "0.5573869", "0.5573869", "0.5573869", "0.5573869", "0.5561385", "0.555995", "0.5559067", "0.5552075", "0.55499697", "0.5548113", "0.5546723", "0.5543946", "0.55413246", "0.55363655", "0.55361706", "0.55354786", "0.5534333" ]
0.6641221
7
EXTEND Returns the relative path (from the contextDir's files directory) of the uploaded file located by the given path.
protected function getFileRelativePath(string $contextId, string $id, string $path, array $meta): string { return trim($path, '/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelativeUploadPath(): string;", "function _wp_relative_upload_path($path)\n {\n }", "public function uploadPath();", "public function getUploadPath()\n {\n return Yii::$app->params['upload_dir'] . DIRECTORY_SEPARATOR . $this->path;\n }", "public function getUploadedPath()\n {\n return $this->getUploadsFolder() . '/' . $this->getRootUploadedPath();\n }", "public function getFilesPath() {\n\t\treturn $this->uploadPath;\n\t}", "public function getUploadedPath()\n {\n return $this->uploadedPath;\n }", "public function uploadPath()\n {\n return call_user_func($this->savePath, $this->basePath);\n }", "function upload_path(string $path = null)\n { \n return public_path(\n trim_path(config('armin.path.file', 'files').DS.$path)\n );\n }", "protected function getFullPathToUploadFile()\n {\n return $this->fullPathToUploadFile;\n }", "public function uploadPath($path)\n {\n return rtrim(config('media.driver.' . config('filesystems.default') . '.path'), '/') . '/' . ltrim($path, '/');\n }", "public function getUploadPath()\n\t{\n\t\t// return Yii::app()->params->upload.'/';\n\t\treturn Yii::app()->config->fixedValues['upload_path'];\n\t}", "public function get_full_uploaded_file_path()\n {\n return $this->full_uploaded_file_path;\n }", "public function basePathUpload() {\n\t\t\t\t\t\t$this->redirectToIndex();\n\t\t\t\t\t\t$pathupload = realpath ( APPLICATION_PATH . '/../public/data/uploads' );\n\t\t\t\t\t\treturn $pathupload;\n\t\t\t\t\t}", "public function getUploadedFilePath()\n {\n return !empty($this->filepath) ? $this->filepath : \n (!empty($this->filename) ? (Yii::$app->params['uploadPath'] . $this->filename) : null);\n }", "public function getAbsolutePath($path)\n {\n return $this->getPrefixedPath($path, $this->uploadDir);\n }", "function getuploaddir ( $path , $uploadpath = 'files' ) {\n\t\tdo {\n\t\t\tif (file_exists ( $path . 'config.php' ) && file_exists ( $path . 'start.php' )) {\n\t\t\t\t$root_path = $path ;\n\t\t\t} else {\n\t\t\t\t// On windows, it is not / but \\ in our path.\n\t\t\t\t$pos = (strrpos ( $path, '/' )) ? strrpos ( $path, '/' ) : strrpos ( $path, '\\\\' ) ; // We need to escape this\n\t\t\t\t$path = substr ( $path, 0, $pos - 1 ) ;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t} while ( empty ( $root_path ) ) ;\n\t\t\n\t\treturn $root_path . '/' . $uploadpath . '/' ;\n\t}", "public static function getUploadPath()\n {\n return '';\n }", "public function getUploaderPath($path) {\n if (strlen($path) > 0 && substr($path, -1) !== '/') {\n $path = $path . '/';\n }\n return $path;\n }", "public function getPath(): string\n {\n return asset('storage/upload/'.$this->path);\n }", "protected function getUploadDir()\n {\n return 'upload/files';\n }", "private function publicImagesUploadPath($path)\n {\n return public_path(\"uploads/images/$path\");\n }", "private function storageRelativePath(string $path) : string {\n return str_replace(\n $this->absolutePathPrefix(),\n '',\n $path\n );\n }", "protected function getUploadPath()\n {\n return 'uploads/achtergrondfotos';\n }", "function uploads_path($path = '')\n {\n return app('path.uploads').($path ? '/'.$path : $path);\n }", "function upload_path($field) {\n\t\tif (!defined('UPLOAD_PATH')) {\n\t\t\ttrigger_error(\"UPLOAD_PATH is not defined in the config file\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\n\t\t$path = UPLOAD_PATH.$this->type().'/'.$field.'/';\n\n\t\tif (!file_exists($path)) {\n\t\t\ttrigger_error(\"Upload path '$path' doesn't exist\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $path;\n\t}", "public function filePath() {\n return $this->baseDir() . '/' . $this->fileName();\n }", "public function getFilepath()\n {\n $filepath = $this->_path['dirname'].DIRECTORY_SEPARATOR.$this->_path['filename'];\n\n if ($this->_path['extension'])\n $filepath .= '.'.$this->_path['extension'];\n\n return $filepath;\n }", "public function getFilepath();", "function file_upload_path($original_filename, $upload_subfolder_name = 'uploads') \n\t {\n\t $current_folder = dirname(__FILE__);\n\t \n\t $path_segments = [$current_folder, $upload_subfolder_name, basename($original_filename)];\n\n\t return join(DIRECTORY_SEPARATOR, $path_segments);\n\t }", "public function getUploadedsPath()\n {\n return $this->uploadedsPath;\n }", "public static function uploadPath(): string {\n\t\treturn config('filesystems.upload_folder_name') . DIRECTORY_SEPARATOR . self::UPLOAD_FOLDER_NAME;\n\t}", "public function getUploadPath()\n {\n $reflect = new ReflectionClass($this);\n return $this->uploadPath . $reflect->getShortName() . '/' . $this->id . '/';\n }", "public static function getFilesPath() {\n return Site::getRelativePath() . Config::get('media.files_dir');\n }", "protected function getUploadDir()\n {\n return __DIR__ . '/../../../../web' . $this->getFilesPath();\n }", "public function getPath() {\r\n\t\t\treturn $this->filePath;\r\n\t\t}", "public function getAbsolutePath()\r\n {\r\n return null === $this->getPath() ? null : $this->getUploadRootDir().'/'.$this->getPath();\r\n }", "public function getPath(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }", "protected function generateFullPathToUploadFile()\n {\n // $this->fullPathToUploadFile = str_replace(\"/\", \"\\\\\", storage_path('app/' . $this->pathToFile));\n $this->fullPathToUploadFile = storage_path('app/' . $this->pathToFile);\n }", "public function getPath()\n {\n return 'bundles/jobhub/'.$this->getUploadDir().'/'.$this->path;\n }", "public function path(): string\n {\n return 'files/' . $this->model->filename();\n }", "public function getRootUploadedPath()\n {\n return \"{$this->uploaded_filename}\";\n }", "public function getAbsolutePath()\n {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public function getRelativePath($path)\n {\n return str_replace($this->baseDir . '/', '', $path);\n }", "function _wp_get_attachment_relative_path($file)\n {\n }", "public function uploadPath()\n {\n return config('quikservice.user.upload.profile-picture.path');\n }", "public function getFullFilePath()\n {\n return $this->basePath . $this->mediaFile->getFileName();\n }", "public function getPath() {\n return FILES_LOCATION . DS . $this->getType() . DS . $this->getId();\n }", "public function relativePath() : string {\n $path = empty($this->path) ? '' : Path::toRelative($this->path, true);\n return $path; \n }", "public function getUploadRootDir(){\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "private function upload_file_and_get_path(): string\n {\n $this->load->library('upload');\n $image_path = \"\";\n $config['upload_path'] = './static/images/';\n $config['allowed_types'] = 'jpg|jpeg|png|gif|pdf';\n $config['encrypt_name'] = TRUE;\n $this->upload->initialize($config);\n if ($this->upload->do_upload('image_path')) {\n $info = $this->upload->data();\n $image_path = $info['file_name'];\n // delete the images present in table or else with every new upload unwanted files will keep on increasing\n } else {\n echo $this->upload->display_errors();\n return \"\";\n }\n return $image_path;\n }", "public function get_uploadBasePath()\n {\n return $this->_uploadBasePath;\n }", "public function getAbsolutePath() {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public function path(): string\n {\n return realpath($this->file);\n }", "public function getPath()\n {\n return $this->directory->getRealPath();\n }", "public function getPath($file_path = null)\n {\n if (!$file_path) {\n return $this->base_path;\n }\n\n return $this->base_path.'/'.$file_path;\n }", "private function getUploadRootDir(){\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "public function getRelativePath() {\n $str = str_replace(Storage::disk('public')->url(''), '', $this->url);\n $str = str_replace($this->file_name, '', $str);\n return $str;\n }", "protected function getUploadDir()\n\t{\n\t\t// get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image\n\t\t// in the view.\n\t\treturn 'uploads/mybudget';\n\t}", "protected function getAbsolutePath()\n {\n return '/var/www/html/ColdkitchenSymfony/web/'.$this->getUploadPath();\n }", "public function getUploadPath($uploadpath) {\n\t\treturn true;\n\t}", "protected function getUploadDir() {\n return '/uploads';\n }", "protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . self::UPLOAD_ROOT;\n }", "private function getPath()\n {\n $path = $this->getDirName().$this->getFilename();\n if (strlen($this->getMime()->getExt())>0) {\n $path .= '.'.$this->getMime()->getExt();\n }\n return $path;\n }", "public function getUploadDir(){\n return dirname(_FILE_). \"/img/\";\n }", "public function imagePath(){\n return $this->upload_directory.DS.$this->filename;\n }", "protected function getUploadDir()\n {\n return 'uploads';\n }", "public function getPath(){\n $ext = $this->getExt();\n $filename = $this->id.'.'.$ext;\n return str_replace( $filename, '', $this->filename ); \n }", "abstract protected function getUploadDir(): string;", "protected function getUploadDir()\n {\n return 'uploads/products';\n }", "public static function get_media_base_dir_path() {\n return self::make_path('cm_root_upload');\n }", "public function path( $relative_path = '/' ) {\n\t\treturn plugin_dir_path( $this->main_file ) . ltrim( $relative_path, '/' );\n\t}", "protected function getUploadDir() {\r\n return 'uploads/documents';\r\n }", "protected function getUploadDir() {\n // when displaying uploaded doc/image in the view.\n return 'uploads/';\n }", "protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/products';\n }", "function path($path='') {\n return $this->base_dir . $path;\n }", "public function getUploadDir()\n {\n return 'import/fichier/licencies';\n }", "private function makeTwigPathRelative($path, $configPath)\n {\n return trim(str_replace($configPath, '', $path), '/');\n }", "public function getFilepath()\n {\n return $this->filepath;\n }", "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../'.$this->getUploadDir();\n }", "public function getBasePathAttribute() {\n return public_path('images/uploads/'.$this->id.'/');\n }", "public function getUploadDir()\n {\n return storage_path($this->getUploadUri());\n }", "public function getUploadRootDir() {\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "protected function getFilePath($src) : string\n {\n return str_after($src, env('APP_URL') . '/uploads/');\n }", "public static function & replacePath ($path)\n {\n\n if (!Toolkit::isPathAbsolute($path))\n {\n\n // not an absolute path so we'll prepend to it\n $path = MO_WEBAPP_DIR . '/' . $path;\n\n }\n\n return $path;\n\n }", "public function getFilePath()\n {\n return $this->file_path;\n }", "protected function getUploadDir()\r\n {\r\n // when displaying uploaded doc/image in the view.\r\n return 'uploads/images';\r\n }", "protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/user';\n }", "protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/documents/images/profile';\n }", "protected function getUploadRootDir() {\r\n return __DIR__ . '/../../../../web/' . $this->getUploadDir()\r\n\r\n ;\r\n }", "public function get_uploaded_file_url()\n {\n return App::getBaseURL() . $this->uploaded_file_path;\n }", "public function get_thumb_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_thumb_name();\n\t}", "protected function getUploadDir() {\n // al mostrar el documento/imagen cargada en la vista.\n return 'bundles/mascotasmascotas/uploaded';\n }", "public function getPath()\n {\n $path = Yii::getAlias('@webroot') .\n DIRECTORY_SEPARATOR . \"uploads\" .\n DIRECTORY_SEPARATOR . $this->folder_uploads .\n DIRECTORY_SEPARATOR . $this->guid;\n\n if (!is_dir($path)) {\n mkdir($path);\n }\n\n return $path;\n }", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath() {\n return $this->path;\n }", "protected function getUploadDir()\n {\n \t// when displaying uploaded doc/image in the view.\n \treturn 'uploads/imagen';\n }" ]
[ "0.78100884", "0.73128533", "0.71821046", "0.7174837", "0.705144", "0.6995803", "0.6956899", "0.69363713", "0.69186956", "0.6912689", "0.68984383", "0.6844527", "0.6767519", "0.6743066", "0.6616777", "0.65471697", "0.6522624", "0.6500881", "0.6454191", "0.6416426", "0.6406462", "0.6394525", "0.63571656", "0.63496083", "0.63455284", "0.63155067", "0.63114446", "0.63052845", "0.6275262", "0.62743837", "0.6264309", "0.62632376", "0.622547", "0.6203949", "0.61854243", "0.61704165", "0.615362", "0.61517304", "0.6144373", "0.61232567", "0.6121214", "0.61152893", "0.6111348", "0.61085373", "0.6103486", "0.60933083", "0.6090142", "0.6078267", "0.6067066", "0.60489726", "0.60463715", "0.6040679", "0.60399085", "0.6036372", "0.60153276", "0.6014372", "0.5975649", "0.5975175", "0.59751326", "0.5961351", "0.5956897", "0.595155", "0.5949848", "0.59491724", "0.5947483", "0.59455806", "0.59407294", "0.5922227", "0.59177846", "0.59126645", "0.5908931", "0.59051734", "0.5898875", "0.5897335", "0.58941436", "0.5890505", "0.58884615", "0.5881311", "0.58745486", "0.58649004", "0.58648825", "0.5864722", "0.5858485", "0.58550537", "0.584805", "0.5847267", "0.58461046", "0.58431566", "0.5842911", "0.5837553", "0.5833216", "0.5826348", "0.5825529", "0.5817986", "0.58162653", "0.58162653", "0.58162653", "0.58162653", "0.58034134", "0.57982385" ]
0.5811553
98
Returns the realpath of the file associated with the given operation entry.
protected function doGetEntryRealPathByOperation(string $contextId, array $operation, array $options = []) { return $this->getContextDir($contextId) . "/files/" . $operation['path']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getEntryRealPathByOperation(string $contextId, array $operation, array $options = []): string\n {\n if ('remove' === $operation['type']) {\n $id = $operation['id'];\n $this->error(\"Cannot get realpath from a remove operation, with contextId=\\\"$contextId\\\" and id=\\\"$id\\\".\");\n }\n\n return $this->doGetEntryRealPathByOperation($contextId, $operation, $options);\n }", "public function realpath($file);", "function getAtomEntryFilePath() {\n\t\treturn $this->_outPath .'/'. $this->_fileDir .'/'. $this->_atomEntryFileName;\n\t}", "public function getAbsolutePathOfRelativeReferencedFileOrPathResolvesFileCorrectlyDataProvider() {}", "public function getFileAbsolutePath($file);", "public function path(): string\n {\n return realpath($this->file);\n }", "public function filePath($file) {\r\n $file = $this->fileLoad($file);\r\n return drupal_realpath($file->uri);\r\n }", "function realpath($path)\n{\n return $path;\n}", "public function getAbsolutePath()\n {\n return null === $this->photoId\n ? null\n : $this->getUploadRootDir().'/'.$this->photoId;\n }", "function phpbb_realpath($path)\n\t{\n\t\treturn phpbb_own_realpath($path);\n\t}", "function phpbb_realpath($path)\n\t{\n\t\treturn phpbb_own_realpath($path);\n\t}", "function tdc_get_filepath($filenode){\n return $filenode->path[0];\n}", "function getAbsolutePath() ;", "private function _getFullPathToCommand() {\n\t\treturn realpath($this->getCommandPath() . DIRECTORY_SEPARATOR . $this->getCommand());\n\t}", "public function getAbsolutePath()\n {\n return null === $this->image\n ? null\n : $this->getUploadRootDir() . '/' . $this->image;\n }", "public function getCaminhoReal()\n {\n return $this->arquivo->getRealPath();\n }", "public function getAbsolutePath() {}", "public function getAbsolutePath() {}", "function phpbb_realpath($path)\n\t{\n\t\t$realpath = realpath($path);\n\n\t\t// Strangely there are provider not disabling realpath but returning strange values. :o\n\t\t// We at least try to cope with them.\n\t\tif ($realpath === $path || $realpath === false)\n\t\t{\n\t\t\treturn phpbb_own_realpath($path);\n\t\t}\n\n\t\t// Check for DIRECTORY_SEPARATOR at the end (and remove it!)\n\t\tif (substr($realpath, -1) == DIRECTORY_SEPARATOR)\n\t\t{\n\t\t\t$realpath = substr($realpath, 0, -1);\n\t\t}\n\n\t\treturn $realpath;\n\t}", "function phpbb_realpath($path)\n\t{\n\t\t$realpath = realpath($path);\n\n\t\t// Strangely there are provider not disabling realpath but returning strange values. :o\n\t\t// We at least try to cope with them.\n\t\tif ($realpath === $path || $realpath === false)\n\t\t{\n\t\t\treturn phpbb_own_realpath($path);\n\t\t}\n\n\t\t// Check for DIRECTORY_SEPARATOR at the end (and remove it!)\n\t\tif (substr($realpath, -1) == DIRECTORY_SEPARATOR)\n\t\t{\n\t\t\t$realpath = substr($realpath, 0, -1);\n\t\t}\n\n\t\treturn $realpath;\n\t}", "public function realpath($path, $relative = FileSystem::NONE);", "public function getEntryPath($reference);", "public function getAbsolutePath()\n {\n return null === $this->avatar ? null : $this->getUploadRootDir().'/'.$this->avatar;\n }", "function realPath($path, $relative_to = NULL, $resolve_symlink = TRUE);", "public static function getFullPath($fileResource)\n {\n $extensionManager = OntoWiki::getInstance()->extensionManager;\n $privateConfig = $extensionManager->getPrivateConfig('files');\n $path = $privateConfig->path;\n\n return _OWROOT . $path . DIRECTORY_SEPARATOR . md5($fileResource);\n }", "public function getFullPath(): string;", "public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }", "public function getFile()\n {\n return $this->getAbsolutePath($this->avatarName);\n }", "protected function getFile($urn) {\n\t\t$resolved = $this->systemUtil->resolvePath($urn, array('onError'=>'return'));\n\t\tif( $resolved !== null and file_exists($resolved) ) return $resolved;\n\t\t\n\t\t$blob = $this->blobRepository->getBlob($urn);\n\t\tif( $blob === null ) {\n\t\t\tthrow new Exception(\"'$urn' could not be found\");\n\t\t} else if( $blob instanceof Nife_FileBlob ) {\n\t\t\treturn $blob->getFile();\n\t\t} else {\n\t\t\t$file = $this->primaryBlobRepository->newTempFile();\n\t\t\tfile_put_contents($file, (string)$blob);\n\t\t\treturn $file;\n\t\t}\n\t}", "public function getAbsolutePath()\n {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public function getAbsolutePath() {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "protected function getFullPathToUploadFile()\n {\n return $this->fullPathToUploadFile;\n }", "public function getAbsolutePath();", "public function getAbsolutePath()\r\n {\r\n return null === $this->getPath() ? null : $this->getUploadRootDir().'/'.$this->getPath();\r\n }", "public function get_path()\n\t\t{\n\t\t\tif ($this->path) {\n\t\t\t\treturn $this->path.'/'.$this->get_full_name();\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\t$hash = $this->hash();\n\t\t\t\t} catch(\\System\\Error\\File $e) {\n\t\t\t\t\t$hash = null;\n\t\t\t\t}\n\n\t\t\t\tif ($hash) {\n\t\t\t\t\treturn $this->get_path_hashed();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public function getAbsolutePath()\n\t{\n\t\treturn ($this->filename === null) ? null : ($this->getUploadRootDir() . '/' . $this->filename);\n\t}", "public function realpath($path): string\n {\n return $this->_realpath($this->_getPath($path));\n }", "public function getCanonicalDeviceFile()\n {\n return $this->getDeviceFile();\n }", "private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}", "public function getFile_path() {\n return $this->_file_path ? $this->_file_path : null;\n }", "public function getFullpath()\n\t{\n\t\treturn $this->filesystem->getAdapter()->root . $this->path;\n\t}", "public function getFullPath();", "public function absPath(string $path): string;", "public function realpath($path)\n\t{\n\t\treturn realpath($path);\n\t}", "public function getAbsolutePath()\n {\n return $this->getUploadRootDir().'/'.$this->name;\n }", "public function getFileExec()\n {\n return $this->readOneof(6);\n }", "protected function usingRealPath()\n {\n return CommandManager::getInstance()->getOpt('realpath', false);\n }", "static public function getFilePath($file, $base_path = null)\n {\n // If this is already a correct path, return it\n if (@is_file($file) && @is_readable($file)) {\n return realpath($file);\n }\n\n // Determine the application path\n $app = JRequest::getInt('app', JFactory::getApplication()->getClientId());\n if ($app == 1) {\n $app_path = JPATH_ADMINISTRATOR;\n } else {\n $app_path = JPATH_SITE;\n }\n\n // Make sure the basepath is not a file\n if (@is_file($base_path)) {\n $base_path = dirname($base_path);\n }\n\n // Determine the basepath\n if (empty($base_path)) {\n if (substr($file, 0, 1) == '/') {\n $base_path = JPATH_SITE;\n } else {\n $base_path = $app_path;\n }\n }\n\n // Append the base_path\n if (strstr($file, $base_path) == false && !empty($base_path)) {\n $file = $base_path.'/'.$file;\n }\n\n // Detect the right application-path\n if (JFactory::getApplication()->isAdmin()) {\n if (strstr($file, JPATH_ADMINISTRATOR) == false && @is_file(JPATH_ADMINISTRATOR.'/'.$file)) {\n $file = JPATH_ADMINISTRATOR.'/'.$file;\n } else if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n } else {\n if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n }\n\n // If this is not a file, return empty\n if (@is_file($file) == false || @is_readable($file) == false) {\n return null;\n }\n\n // Return the file\n return realpath($file);\n }", "public function getFilePath() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filepath\", NULL);\n\t}", "private function getRealPath(string $path): string\n {\n if (false === ($ret = realpath($path))) {\n $this->error(\"File does not exist: \\\"$path\\\".\");\n }\n return $ret;\n }", "private function getThumbFilepath() {\n\t\t$filename = $this->getThumbFilename();\n\t\t$filepath = $this->pathCache . $filename;\n\t\treturn($filepath);\n\t}", "function cot_pfs_filepath($id)\n{\n\tglobal $db, $db_pfs_folders, $db_pfs, $cfg;\n\n\t$sql = $db->query(\"SELECT p.pfs_file AS file, f.pff_path AS path FROM $db_pfs AS p LEFT JOIN $db_pfs_folders AS f ON p.pfs_folderid=f.pff_id WHERE p.pfs_id=\".(int)$id.\" LIMIT 1\");\n\tif($row = $sql->fetch())\n\t{\n\t\treturn ($cfg['pfs']['pfsuserfolder'] && $row['path']!='') ? $row['path'].'/'.$row['file'] : $row['file'];\n\t}\n\telse\n\t{\n\t\treturn '';\n\t}\n}", "public function getFilename()\n {\n $file = basename($this->srcPath);\n\n $ops = str_replace(array('&', ':', ';', '?', '.', ','), '-', $this->operations);\n return trim($ops . '-' . $file, './');\n }", "protected function fullPath()\n {\n\n if ( $this->is_external )\n {\n if ( $this->path )\n {\n $ph = '/' . $this->path;\n } else {\n $ph = null;\n }\n\n return $this->external_url . $ph;\n } else {\n\n // switch the disk\n switch ( $this->disk )\n {\n case 'local':\n\n return Config::get('app.url') . '/' . $this->path;\n break;\n\n case 's3':\n return Config::get('photos.storage_path') . '/' . $this->path;\n break;\n }\n }\n }", "public static function fullPath ($relPath) {\n\t\treturn (\\realpath($relPath) ?: null);\n\t}", "public function getRelativePathToFile($file)\n {\n return $this->getBucketUrl().$file;\n }", "private function realpath(string $path): string\n {\n $last_char = substr($path, -1);\n $path = realpath($path);\n if (DIRECTORY_SEPARATOR === $last_char) {\n $path .= DIRECTORY_SEPARATOR;\n }\n return $path;\n }", "public function getAbsolutePath(): string\n {\n return sprintf('%s/%s', $this->baseDirectory, $this->relativePath);\n }", "public function getOriginalFileResource() {\n\t\treturn $this->originalFileResource;\n\t}", "public function getAbsolutePath()\n\t{\n\t\treturn rtrim($this->UploadDestination->server_path, '/') . '/_' . $this->short_name . '/';\n\t}", "function getFileFullPath($fileName) {\n\tglobal $GrunPath;\n\treturn $GrunPath.\"/\".$fileName;\n}", "protected function get_file() {\n\n\t\treturn __FILE__;\n\t}", "protected function getRealPath($path)\n {\n return realpath($path);\n }", "function phpbb_realpath($path)\n{\n\tglobal $phpbb_root_path, $phpEx;\n\n\treturn (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path);\n}", "function phpbb_realpath($path)\n{\n\tglobal $phpbb_root_path, $phpEx;\n\n\treturn (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path);\n}", "protected abstract function getAbsolutePath(): string;", "function get_real_file_to_edit($file)\n {\n }", "private function getPath(string $resourceShortName, array $operation, string $operationType): string\n {\n $path = $this->operationPathResolver->resolveOperationPath($resourceShortName, $operation, $operationType);\n if ('.{_format}' === substr($path, -10)) {\n $path = substr($path, 0, -10);\n }\n\n return $path;\n }", "function __realpath($path) {\n\t$path = str_replace('\\\\','/',realpath($path));\n\tif ($path{1} == ':') {\n\t\t// We can't just check for C:/, because windows users may have the IIS webroot on X: or F:, etc.\n\t\t$path = substr($path,2);\n\t}\n\treturn $path;\n}", "public function getFile() {\n return $this->getFiles()->getFirst();\n }", "public function getAbsolutePath(){\n\t \treturn $this->getAbsoluteDirname().'/'.$this->filename.'.'.$this->extension;\n\t }", "private function get_file_link(): string {\n $fs = get_file_storage();\n\n // Get all the files.\n $files = $fs->get_area_files(\n $this->context->id,\n 'mod_onlyoffice',\n onlyoffice::FILEAREA_INITIAL,\n false,\n '',\n false,\n 0,\n 0,\n 1\n );\n\n // Try get the first file.\n if (!$file = reset($files)) {\n return get_string('missingfile', 'mod_onlyoffice'); // File doesn't exist.\n }\n\n // Build the URL.\n $url = moodle_url::make_pluginfile_url(\n $file->get_contextid(),\n $file->get_component(),\n $file->get_filearea(),\n $file->get_itemid(),\n $file->get_filepath(),\n $file->get_filename(),\n true\n );\n\n return html_writer::link($url, $file->get_filename());\n }", "function getAbsolutePath(): string\n {\n $path = $this->folder()->getAbsolutePath();\n return \"$path\";\n }", "public function getFullPath()\n\t{\n\t\treturn Generic::getCompletePath($this->getPath(), $this->getBasename());\n\t}", "private function get_real_filename( $file_url )\n {\n $path = $this->getConfig( 'content_dir' ) . $file_url . $this->getConfig( 'content_ext' );\n return realpath( $path );\n }", "public function getAbsolutePath()\n {\n }", "public function getFullPath(): string\n {\n return $this->getRoot() . $this->getPathExt();\n }", "public function file()\n {\n return rtrim($this->destinationPath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$this->fileName;\n }", "final function getFile();", "public function get_full_uploaded_file_path()\n {\n return $this->full_uploaded_file_path;\n }", "function absPath($value){\r\n\treturn realpath(dirname(__dir__, $value));\r\n}", "function absPath($value){\r\n\treturn realpath(dirname(__dir__, $value));\r\n}", "public static function fresnsFileOriginalUrlById(int|string $fileIdOrFid): ?string\n {\n if (StrHelper::isPureInt($fileIdOrFid)) {\n $file = File::whereId($fileIdOrFid)->first();\n } else {\n $file = File::whereFid($fileIdOrFid)->first();\n }\n\n if (empty($file)) {\n return null;\n }\n\n $storageConfig = FileHelper::fresnsFileStorageConfigByType($file->type);\n\n if ($storageConfig['antiLinkStatus']) {\n $fresnsResponse = \\FresnsCmdWord::plugin($storageConfig['service'])->getAntiLinkFileOriginalUrl([\n 'type' => $file->type,\n 'fileIdOrFid' => strval($file->id),\n ]);\n\n return $fresnsResponse->getData('originalUrl') ?? null;\n }\n\n return $file->getFileOriginalUrl();\n }", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function get_file() {\n\t\treturn __FILE__;\n\t}", "public function get_full_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_full_name();\n\t}", "function getAddEditFile($db, $tabledefid, $addedit=\"edit\"){\r\n\r\n\t$querystatement = \"\r\n SELECT\r\n \".$addedit.\"file AS thefile\r\n FROM\r\n tabledefs\r\n WHERE uuid = '\".mysqli_real_escape_string($db->db_link,$tabledefid).\"'\";\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$therecord = $db->fetchArray($queryresult);\r\n\r\n return APP_PATH.$therecord[\"thefile\"];\r\n\r\n}", "function fa_get_path( $rel_path ){\n\t$path = path_join( FA_PATH, $rel_path );\n\treturn wp_normalize_path( $path );\n}", "public function getImageFile()\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? null : \\Yii::getAlias(\n '@storage/' . $this->directory . '/' . $this->owner->$link\n );\n }", "public function getFilename()\n {\n return $this->target->getUri();\n }", "public function get_thumb_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_thumb_name();\n\t}", "public function getPathFile($id){\n $sql = \"SELECT pathFile FROM fanart WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $path = mysqli_fetch_all($res)[0][0];\n return $path;\n }", "public function getBasePath()\n {\n if (isset($this->raw->{'base-path'})) {\n if (false === is_dir($this->raw->{'base-path'})) {\n throw new InvalidArgumentException(\n sprintf(\n 'The base path \"%s\" is not a directory or does not exist.',\n $this->raw->{'base-path'}\n )\n );\n }\n\n return realpath($this->raw->{'base-path'});\n }\n\n return realpath(dirname($this->file));\n }", "abstract public function getLocalPath(File $file);", "public function getFile(): string\n {\n return $this->filePath;\n }", "public function getRealPath()\n\t{\n\t\t// Unfortunately we'd need to store the fake directory hierarchy\n\t\t// in the database, too...\n\t\tthrow new DatabaseFileException('Obtaining the real path is not supported for database files.');\n\t}", "public function getFilePath($file) {\n return $this->path . '/' . $file . $this->extension;\n }" ]
[ "0.6644951", "0.65819395", "0.591816", "0.5813719", "0.58062387", "0.5716179", "0.558348", "0.55684257", "0.54981303", "0.54645973", "0.54645973", "0.53758544", "0.5294827", "0.52908176", "0.52448696", "0.5207178", "0.5177677", "0.5177677", "0.51565564", "0.51565564", "0.5143534", "0.5129693", "0.51201606", "0.5109641", "0.5105622", "0.5099479", "0.5095121", "0.5093424", "0.50920105", "0.5089085", "0.5084437", "0.50687426", "0.506735", "0.50588423", "0.5051619", "0.50136995", "0.50130814", "0.5006523", "0.49907443", "0.4967739", "0.49430496", "0.49374056", "0.4925449", "0.49199155", "0.49114636", "0.49076706", "0.48837122", "0.48783478", "0.48584503", "0.4844041", "0.48305196", "0.4829488", "0.48254877", "0.4822312", "0.48156267", "0.48125395", "0.48081872", "0.48072717", "0.4798658", "0.4783765", "0.47652248", "0.47638413", "0.47623116", "0.4760393", "0.4760393", "0.47563902", "0.47552335", "0.4753943", "0.47537133", "0.4751", "0.47500166", "0.4748085", "0.47392705", "0.47386372", "0.47270483", "0.47236916", "0.47206038", "0.4715624", "0.47145498", "0.47106132", "0.4703753", "0.4703753", "0.4691572", "0.46752465", "0.46752465", "0.46752465", "0.46752465", "0.46749818", "0.46725163", "0.46628425", "0.46582723", "0.46560457", "0.46527937", "0.465133", "0.4648458", "0.46468708", "0.46425754", "0.46379542", "0.46354616", "0.46321967" ]
0.55635417
8
Hook called after the file has been added to the virtual file system. operation is the entry representing the file operation. path is the absolute path to the source file being copied; dst is the absolute path to the copied file.
protected function onFileAddedAfter(string $contextId, array &$operation, ?string $path, ?string $dst, array $options = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function onFileRemovedAfter(string $contextId, string $id, ?array $op, ?string $realpath)\n {\n\n }", "function addFile($path)\n {\n }", "protected function _after_save(){\n if(file_exists($this->_path))\n $this->_path_infos = pathinfo($this->_path);\n }", "function _stageFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_stagePath, $this->_claimedFilename);\n\t}", "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}", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "private static function add_file($project, $entry, $base, $path_info) {\n if ($entry->attributes()->kind != 'file' )\n return;\n $path = (string) $entry->name;\n $link = $base . $path;\n $size = intval((string) $entry->size);\n\n $file = new File($path, $link, $size);\n $file->info = $path_info[$path];\n\n $project->files[] = $file;\n }", "function hook_file_operations() {\n $operations = array(\n 'delete' => array(\n 'label' => t('Delete selected files'),\n 'callback' => NULL,\n ),\n );\n return $operations;\n}", "function addFile($path, $whitespace = true) {\n\t\t$this->_items[] = array('file', $path, $whitespace);\n\n\t\t$mtime = @filemtime($path);\n\n\t\tif ($mtime > $this->_lastUpdate)\n\t\t\t$this->_lastUpdate = $mtime;\n\t}", "function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)\n {\n }", "function privAddFile($p_filedescr, &$p_header, &$p_options)\n {\n }", "public function copy($path, $newpath)\n {\n }", "function insertFile ($filename, $origname='', $extraData='')\n{\n if (!$filename)\n v4b_exit ('Invalid filename passed to IbUtil::insertFile ...');\n\n if ($origname)\n $ext = FileUtil::getExtension ($origname);\n else\n $ext = FileUtil::getExtension ($filename);\n\n $data = '';\n $err = '';\n $cmd = '';\n global $v4bConfig;\n $txtFile = $v4bConfig['V4B_FILE_TMP_PATH'] . '/' . FileUtil::getBasename($filename) . '.txt';\n if ($ext == 'txt')\n $txtFile = $filename;\n else if ($ext == 'doc')\n $cmd = \"/usr/local/bin/antiword \\\"$filename\\\" > \\\"$txtFile\\\"\";\n else if ($ext == 'pdf')\n $cmd = \"pdftotext \\\"$filename\\\" \\\"$txtFile\\\"\";\n else if ($ext == 'ps')\n $cmd = \"ps2ascii \\\"$filename\\\" \\\"$txtFile\\\"\";\n else \n return -1;\n\n $rc = system ($cmd, $err);\n if ($err)\n return -1;\n\n $fp = fopen ($txtFile, \"a\");\n $swrite = \"\\nextraData\\n\";\n @fwrite ($fp, $swrite);\n fclose ($fp);\n\n $data = FileUtil::readFile ($txtFile);\n @unlink ($txtFile);\n\n if ($data)\n return IbUtil::insert ($data);\n\n return -1;\n}", "private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }", "function _archiveFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_archivePath, $this->_claimedFilename);\n\t}", "public function copy($path, $target)\n {\n \n }", "public function addFile($file);", "public function addFile($path)\n {\n $this->files[] = $path;\n }", "private function writeFile($stub)\n {\n $this->files->put($this->path, $stub);\n }", "public function addPath($path);", "public function addPath($path);", "private function setFileUsage($migration_id, $uri, $operation) {\n $files = $this->entityTypeManager()\n ->getStorage('file')\n ->loadByProperties(['uri' => $uri]);\n foreach ($files as $file) {\n $this->fileUsage->{$operation}(\n $file,\n 'jcc_migrate_source_ui',\n 'migration',\n $migration_id\n );\n }\n }", "protected function add($name, $value){\r\n $this->file->{\"$this->command\"}($this->handler, $name, $value);\r\n }", "function _addFile( $isVirtual, &$sourceNameOrData, $targetName )\n\t{\n\t\t// Are we connected to a server?\n\t\tif(!is_resource($this->_ftphandle))\n\t\t{\n\t\t\tif(!$this->_connectFTP()) return false;\n\t\t}\n\n\t\t// See if it's a directory\n\t\t$isDir = $isVirtual ? false : is_dir($sourceNameOrData);\n\n\t\tif($isDir)\n\t\t{\n\t\t\t// Just try to create the remote directory\n\t\t\treturn $this->_makeDirectory($targetName);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// We have a file we need to upload\n\t\t\tif($isVirtual)\n\t\t\t{\n\t\t\t\t// Create a temporary file, upload, rename it\n\t\t\t\t$tempFileName = JoomlapackCUBETempfiles::createRegisterTempFile();\n\t\t\t\tif(function_exists('file_put_contents'))\n\t\t\t\t{\n\t\t\t\t\tif(@file_put_contents($tempFileName, $sourceNameOrData) === false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setError('Could not upload virtual file '.$targetName);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$res = $this->_upload($tempFileName, $targetName);\n\t\t\t\t\tJoomlapackCUBETempfiles::unregisterAndDeleteTempFile($tempFileName, true);\n\t\t\t\t\treturn $res;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Upload a file\n\t\t\t\treturn $this->_upload($sourceNameOrData, $targetName);\n\t\t\t}\n\t\t}\n\t}", "public function copy($targetPath, $handlerObj = NULL, $handlerMethod = NULL) {\n $this->fileService->copyFile( $this->path, $targetPath, $handlerObj, $handlerMethod );\n }", "protected function processChangedAndNewFiles() {}", "private function add_to_uploaded_files($filearea, $path, $filename) {\n $this->uploaded_files[$filearea][] = [\n 'path' => $path,\n 'filename' => $filename,\n ];\n }", "function tc_file_system_copy($source, $destination, $overwrite = false, $mode = false){\r\n\t\r\n\t//initialize processed files object\r\n\t$processed_files = WPTC_Factory::get('processed-restoredfiles',true);\r\n\t$current_processed_files = array();\r\n\t\r\n\tglobal $wp_filesystem;\r\n\tif($wp_filesystem->method == 'direct'){\r\n\t\t// check if already processed ; if so dont copy\r\n\t\t$processed_file = $processed_files->get_file($source);\r\n\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----processed_file obj------- \".var_export($processed_file,true).\"\\n\",FILE_APPEND);\r\n\t\tif ( !($processed_file) ) {\r\n\t\t\t$copy_result = $wp_filesystem->move($source, $destination, $overwrite, $mode);\r\n\t\t\tif($copy_result)\r\n\t\t\t{\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ----adding details--------\\n\",FILE_APPEND);\r\n\t\t\t\t//if copied then add the details to DB\r\n\t\t\t\t$this_file_detail['file'] = $source;\r\n\t\t\t\t$this_file_detail['copy_status'] = true;\r\n\t\t\t\t$this_file_detail['revision_number'] = null;\r\n\t\t\t\t$this_file_detail['revision_id'] = null;\r\n\t\t\t\t$this_file_detail['mtime_during_upload'] = null;\r\n\t\t\t\t\r\n\t\t\t\t$current_processed_files[] = $this_file_detail;\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----current_processed_files------- \".var_export($current_processed_files,true).\"\\n\",FILE_APPEND);\r\n\t\t\t\t$processed_files->add_files($current_processed_files);\t\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ---any sql error------ \".var_export(mysql_error(),true).\"\\n\",FILE_APPEND);\r\n\t\t\t\t//set the in_progress option to false on final file copy\r\n\t\t\t}\r\n\t\t\treturn $copy_result;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\telseif($wp_filesystem->method == 'ftpext' || $wp_filesystem->method == 'ftpsockets'){\r\n\t\tif ( ! $overwrite && $wp_filesystem->exists($destination) )\r\n\t\t\treturn false;\r\n\t\t//$content = $this->get_contents($source);\r\n//\t\tif ( false === $content)\r\n//\t\t\treturn false;\r\n\t\t\t\r\n\t\t//put content\t\r\n\t\t//$tempfile = wp_tempnam($file);\r\n\t\t$source_handle = fopen($source, 'r');\r\n\t\tif ( ! $source_handle )\r\n\t\t\treturn false;\r\n\r\n\t\t//fwrite($temp, $contents);\r\n\t\t//fseek($temp, 0); //Skip back to the start of the file being written to\r\n\t\t\r\n\t\t$sample_content = fread($source_handle, (1024 * 1024 * 2));//1024 * 1024 * 2 => 2MB\r\n\t\tfseek($source_handle, 0); //Skip back to the start of the file being written to\r\n\r\n\t\t$type = $wp_filesystem->is_binary($sample_content) ? FTP_BINARY : FTP_ASCII;\r\n\t\tunset($sample_content);\r\n\t\tif($wp_filesystem->method == 'ftpext'){\r\n\t\t\t$ret = @ftp_fput($wp_filesystem->link, $destination, $source_handle, $type);\r\n\t\t}\r\n\t\telseif($wp_filesystem->method == 'ftpsockets'){\r\n\t\t\t$wp_filesystem->ftp->SetType($type);\r\n\t\t\t$ret = $wp_filesystem->ftp->fput($destination, $source_handle);\r\n\t\t}\r\n\r\n\t\tfclose($source_handle);\r\n\t\tunlink($source);//to immediately save system space\r\n\t\t//unlink($tempfile);\r\n\r\n\t\t$wp_filesystem->chmod($destination, $mode);\r\n\r\n\t\treturn $ret;\r\n\t\t\r\n\t\t//return $this->put_contents($destination, $content, $mode);\r\n\t}\r\n}", "function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)\n {\n }", "public function afterSave()\n {\n if (!$this->files) {\n return;\n } else if ($this->contentAttribute) {\n $this->owner->updateAttributes([$this->contentAttribute => $this->processContentFiles(true)['content']]);\n } else {\n /** @var UploadedFile $file */\n foreach ($this->files as $key => $file) {\n $this->files[$key] = $this->saveFile($file->tempName, $file->name);\n }\n }\n $this->setAttributeValue(\\array_map(function($v){ return basename($v); }, array_filter($this->files)));\n }", "function OnAfterCopy($original_id, $copy_id){\n }", "function dest_path_and_file()\r\n{ \r\n global $xoopsDB, $xoopsUser;\r\n \r\n // Initialize magic_number. This number is used to create unique file names in order to guarantee that 2 file names\r\n // will not be identical if 2 users upload a file at the exact same time. 100000 will allow almost 100000 users to use\r\n // this system. Ok, the odds of this happening are slim; but, I want the odds to be zero.\r\n $magic_number = 100000; \r\n \r\n // Get the location of the document repository\r\n $query = \"SELECT data from \".$xoopsDB->prefix(\"dms_config\").\" WHERE name='doc_path'\";\r\n $file_sys_root = mysql_result(mysql_query($query),'data');\r\n \r\n // Get the current value of max_file_sys_counter\r\n $query = \"SELECT data from \".$xoopsDB->prefix(\"dms_config\").\" WHERE name='max_file_sys_counter'\";\r\n $max_file_sys_counter = (integer) mysql_result(mysql_query($query),'data');\r\n \r\n // Determine the path and filename of the new file\r\n $query = \"SELECT * from \".$xoopsDB->prefix(\"dms_file_sys_counters\");\r\n $dms_file_sys_counters = mysql_fetch_array(mysql_query($query));\r\n \r\n $file_sys_dir_1 = $dms_file_sys_counters['layer_1'];\r\n $file_sys_dir_2 = $dms_file_sys_counters['layer_2'];\r\n $file_sys_dir_3 = $dms_file_sys_counters['layer_3'];\r\n $file_sys_file = $dms_file_sys_counters['file'];\r\n $file_sys_file_name = ($file_sys_file * $magic_number) + $xoopsUser->getVar('uid');\r\n \r\n $dir_path_1 = $file_sys_root.\"/\".$file_sys_dir_1;\r\n $dir_path_2 = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2;\r\n $dir_path_3 = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3;\r\n \r\n //$doc_path = $file_sys_root.\"/\".$file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3;\r\n $path_and_file = $file_sys_dir_1.\"/\".$file_sys_dir_2.\"/\".$file_sys_dir_3.\"/\".$file_sys_file_name;\r\n //$dest_path_and_file = $doc_path.\"/\".$file_sys_file_name;\r\n \r\n //print $path_and_file;\r\n //exit(0);\r\n \r\n // Determine the next file system counter values and save them for future use.\r\n $file_sys_file++;\r\n if ($file_sys_file > $max_file_sys_counter) \r\n {\r\n\t$file_sys_file = 1;\r\n\t$file_sys_dir_3++;\r\n\t} \r\n \r\n if ($file_sys_dir_3 > $max_file_sys_counter)\r\n {\r\n\t$file_sys_dir_3 = 1;\r\n\t$file_sys_dir_2++;\r\n\t}\r\n\t\r\n if ($file_sys_dir_2 > $max_file_sys_counter)\r\n {\r\n\t$file_sys_dir_2 = 1;\r\n\t$file_sys_dir_1++;\r\n\t}\r\n\t\r\n $query = \"UPDATE \".$xoopsDB->prefix(\"dms_file_sys_counters\").\" SET \";\r\n $query .= \"layer_1 = '\".(integer) $file_sys_dir_1.\"', \";\r\n $query .= \"layer_2 = '\".(integer) $file_sys_dir_2.\"', \";\r\n $query .= \"layer_3 = '\".(integer) $file_sys_dir_3.\"', \";\r\n $query .= \"file = '\".(integer) $file_sys_file. \"' \";\r\n \r\n mysql_query($query); \r\n\r\n // Ensure that the final destination directories exist...if not, then create the directory or directories.\r\n if (!is_dir($dir_path_1)) \r\n {\r\n\tmkdir($dir_path_1,0775);\r\n chmod($dir_path_1,0777);\r\n\t}\r\n \r\n if (!is_dir($dir_path_2))\r\n {\r\n\tmkdir($dir_path_2,0775); \r\n chmod($dir_path_2,0777);\r\n }\r\n\t\r\n if (!is_dir($dir_path_3)) \r\n {\r\n\tmkdir($dir_path_3,0775);\r\n chmod($dir_path_3,0777);\r\n\t}\r\n\t\r\n return($path_and_file);\r\n}", "protected function handleOperation($op) {\n $output = '';\n $op_type = $this->checkAndGet($op, 'operation');\n switch ($op_type) {\n case 'filemodify':\n $mode = $this->convertMode($this->checkAndGet($op, 'mode'));\n $output .= sprintf(\"M %s inline %s\\n\",\n $mode,\n $this->checkAndGet($op, 'path'));\n $output .= $this->handleData($this->checkAndGet($op, 'data'));\n break;\n\n case 'filedelete':\n $output .= sprintf(\"D %s\\n\", $this->checkAndGet($op, 'path'));\n break;\n\n case 'filecopy':\n $output .= sprintf(\"C %s %s\\n\",\n $this->checkAndGet($op, 'src'),\n $this->checkAndGet($op, 'dst'));\n break;\n\n case 'filerename':\n $output .= sprintf(\"R %s %s\\n\",\n $this->checkAndGet($op, 'src'),\n $this->checkAndGet($op, 'dst'));\n break;\n case 'filedeleteall':\n $output .= \"deleteall\\n\";\n break;\n default:\n throw new Exception(\"Unknown operation type '$op_type'.\");\n }\n\n return $output;\n }", "public function afterSave($insert, $changedAttributes)\n {\n if ($this->uploadedFile !== null && $this->uploadedFile instanceof UploadedFile) {\n $newFilename = $this->getPath() . DIRECTORY_SEPARATOR . $this->getFilename();\n\n if (is_uploaded_file($this->uploadedFile->tempName)) {\n move_uploaded_file($this->uploadedFile->tempName, $newFilename);\n @chmod($newFilename, 0744);\n }\n\n }\n\n // Set file by given contents\n if ($this->newFileContent != null) {\n $newFilename = $this->getPath() . DIRECTORY_SEPARATOR . $this->getFilename();\n file_put_contents($newFilename, $this->newFileContent);\n @chmod($newFilename, 0744);\n }\n\n return parent::afterSave($insert, $changedAttributes);\n }", "function AFTERPUT(&$options)\r\n {\r\n \t\t// should add a few checks such as md5 checksum of file ...\r\n \t\t// Just to be sure file was transferred correctly\r\n \t\t\r\n \t\t// Maybe log file transfers ???\r\n \t\t\r\n \t\t\t$this->tx_cbywebdav_devlog(7,\"=== AFTER PUT START : \".serialize($options),\"cby_webdav\",\"PUT\");\r\n\t\t\t\t$t3io=$this->CFG->t3io;\r\n $virtualFilePath = $this->base .$options[\"path\"];\r\n if (!@$t3io->T3IsDir(dirname($virtualFilePath))) {\r\n \t\t\t\t\t$this->tx_cbywebdav_devlog(7,\"!!! ERROR AFTER PUT END, webdav path :\".$virtualFilePath.\", file path : \".$physicalFilePath ,\"cby_webdav\",\"PUT\");\r\n return \"409 Conflict\";\r\n }\r\n\r\n //$options[\"new\"] = !$t3io->T3FileExists($virtualFilePath);\r\n\t \t\t\t$virtualFilePath=$t3io->T3MakeFilePath($virtualFilePath);\r\n\t \t\t\t$info=$t3io->T3IsFileUpload($options[\"path\"]);\r\n \t\t\t $this->tx_cbywebdav_devlog(7,\"AFTER PUT info : \".serialize($info),\"cby_webdav\",\"PUT\");\r\n\t \t\t\tif ($info['isWebmount']) {\r\n\t\t\t\t\t$info['ufile']=$virtualFilePath;\r\n \t\t\t $this->tx_cbywebdav_devlog(7,\"afterput info : \".serialize($info),\"cby_webdav\",\"PUT\");\r\n\t\t\t\t\t$t3io->T3LinkFileUpload($info);\t\t\t\t\t//$GLOBALS['data']='';\r\n\t\t\t\t\t$physicalFilePath=$t3io->T3CleanFilePath($this->CFG->T3PHYSICALROOTDIR.$info['filepath']);\r\n\t\t\t\t\tunlink($physicalFilePath);\r\n\r\n \t \t\t\t} else $physicalFilePath=$virtualFilePath;\r\n \t \t\t\t\r\n \t\t\t$this->tx_cbywebdav_devlog(7,\"=== AFTER PUT END, webdav path :\".$virtualFilePath.\", file path : \".$physicalFilePath ,\"cby_webdav\",\"PUT\");\r\n return true;\r\n }", "private function backupHook(string $hook): void\n {\n // no hook to move just leave\n if (!$this->repository->hookExists($hook)) {\n return;\n }\n\n $hookFileOrig = $this->repository->getHooksDir() . DIRECTORY_SEPARATOR . $hook;\n $hookCmd = rtrim($this->moveExistingTo, '/\\\\') . DIRECTORY_SEPARATOR . $hook;\n $hookCmdArgs = $hookCmd . Hooks::getOriginalHookArguments($hook);\n $hookFileTarget = !Check::isAbsolutePath($this->moveExistingTo)\n ? dirname($this->config->getPath()) . DIRECTORY_SEPARATOR . $hookCmd\n : $hookCmd;\n\n $this->moveExistingHook($hookFileOrig, $hookFileTarget);\n\n $this->io->write(\n [\n ' Moved existing ' . $hook . ' hook to ' . $hookCmd,\n ' Add <comment>\\'' . $hookCmdArgs . '\\'</comment> to your '\n . $hook . ' configuration to execute it.'\n ]\n );\n }", "function privExtractFileInOutput(&$p_entry, &$p_options)\n {\n }", "public function copyOtherFiles(): void;", "function onInsertFile(&$man, &$file) {\r\n\t\treturn true;\r\n\t}", "private function logFileUpload($subAction, $valueAction, $newFilename, $uploadPath, $fullUploadPath)\n\t{\n\n\t\t$hMyLayout = new SystemLayout();\n\n\t\t// Typ ID ermitteln\n\t\t$getSourceTypeData = $hMyLayout->getActiveSourceTypeDataByX('fileUploadDirName', $subAction);\n\t\t$sourceTypeID = $getSourceTypeData['sourceTypeID'];\n\n\t\t// System ID ermitteln\n\t\t$getSourceSystemData = $hMyLayout->getActiveSourceSystemDataByX('sourceSystemName', $valueAction);\n\t\t$sourceSystemID = $getSourceSystemData['sourceSystemID'];\n\n\n\t\t// DownloadLink erstellen\n\t\t$pre_search = preg_replace('/\\//', '\\/', $_SESSION['Cfg']['Default']['WebsiteSettings']['MainDownloadPath']);\n\t\t$search = '/(' . $pre_search . ')(.*)/';\n\t\tpreg_match($search, $uploadPath, $matches);\n\t\t$downloadLink = $_SESSION['Cfg']['Default']['WebsiteSettings']['MainDownloadPath'] . $matches[2] . '/' . $newFilename;\n\n\n\t\t// Parameter - Liste für die Query\n\t\t$paramArray = array('sourceTypeID' => $sourceTypeID,\n\t\t\t\t\t\t\t'sourceSystemID' => $sourceSystemID,\n\t\t\t\t\t\t\t'userID' => $_SESSION['Login']['userID'],\n\t\t\t\t\t\t\t'file_name' => $_FILES['file']['name'],\n\t\t\t\t\t\t\t'file_tmp_name' => $_FILES['file']['tmp_name'],\n\t\t\t\t\t\t\t'newFilename' => $newFilename,\n\t\t\t\t\t\t\t'uploadPath' => $uploadPath,\n\t\t\t\t\t\t\t'fullUploadPath' => $fullUploadPath,\n\t\t\t\t\t\t\t'file_size' => $_FILES['file']['size'],\n\t\t\t\t\t\t\t'downloadLink' => $downloadLink\n\t\t);\n\n\t\t// Query holen\n\t\t$query = $this->getQuery('getlogFileUpload', $paramArray);\n\n\t\t// Query ausführen\n\t\t$this->query($query);\n\n\t\treturn true;\n\n\t}", "function ft_hook_fileextras($file, $dir) {}", "function ft_hook_upload($dir, $file) {}", "public function add() {\n $this->usePostRequest();\n //$this->dbFileModel->add_file();\n }", "public function load($path)\n {\n // copy file and get thumb\n \\Acelle\\Library\\Tool::xcopy($path, $this->getUploadDir());\n $this->image = $this->getUploadDir().'/thumb.png';\n $this->replaceHtmlUrl('/'.$this->getUploadUri().'/');\n $this->untransform();\n $this->save();\n }", "public function copy($file, $new_file);", "public function addOperation(ckWsdlOperation $operation)\r\n {\r\n $this->operations[] = $operation;\r\n }", "public function storeFileFromLocalPath($type, $path, $newFilename = null, $unlinkAfterStore = false);", "abstract public function copyLocalFile($from, $to);", "public function applyServer(TextOperation $operation)\n {\n $this->revision += 1;\n $this->state = $this->state->applyServer($this, $operation);\n }", "public function addMethodToFile(SplFileInfo $fileInfo, $method, $content)\n {\n if ($this->classHasMethod($fileInfo, $method)) {\n Console::warn(\"The {$method} method exists on {$fileInfo->getRealPath()}\");\n\n return;\n }\n\n $file_contents = file_get_contents($fileInfo->getRealPath());\n $content_parts = explode('}', $file_contents);\n array_pop($content_parts);\n $content_parts[count($content_parts) -1] .= $content;\n array_push($content_parts, '');\n\n file_put_contents($fileInfo->getRealPath(), implode('}', $content_parts));\n }", "public function addFileTask(string $fileName, $_globals = NULL): void {}", "public function upload($target_path, $file_data, $mode = 'add')\n {\n $endpoint = 'https://content.dropboxapi.com/2/files/upload';\n $headers = [\n 'Content-Type: application/octet-stream',\n \"Dropbox-API-Arg: {\\\"path\\\": \\\"$target_path\\\", \\\"mode\\\": \\\"$mode\\\"}\"\n ];\n if (file_exists($file_data)) {\n $postdata = file_get_contents($file_data);\n } else {\n $postdata = $file_data;\n }\n return Dropbox::postRequest($endpoint, $headers, $postdata)['path_display'];\n }", "function my_pre_add_callback($p_event, &$p_header)\r\n{\r\n\tglobal $files;\r\n\r\n\t$p_header['stored_filename']=$files[$p_header['stored_filename']]['title'];\r\n\treturn 1;\r\n}", "function onFile($file) {\r\n\t\t$this->_filesystemList [] = $file;\r\n\t}", "public function add(Operation $operation);", "public function addFile($path, $name, $content_type, $content_disposition);", "public function copyFiles() {\n\n $customAction = File::get(__DIR__.'/../Services/stub/config/customAction.php.stub');\n\n $dbexporter = File::get(__DIR__.'/../Services/stub/config/dbexporter.php.stub');\n\n $pathCustom = config_path().'/customAction.php';\n\n $pathDbExporter = config_path().'/dbexporter.php';\n\n $this->createFile($pathCustom,$customAction);\n\n $this->createFile($pathDbExporter,$dbexporter);\n\n }", "abstract protected function extract($file, $path);", "function privAddFile($p_filedescr, &$p_header, &$p_options)\n {\n $v_result=1;\n\n // ----- Working variable\n $p_filename = $p_filedescr['filename'];\n\n // TBC : Already done in the fileAtt check ... ?\n if ($p_filename == \"\") {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, \"Invalid file list parameter (invalid or empty list)\");\n\n // ----- Return\n return PclZip::errorCode();\n }\n\n // ----- Look for a stored different filename\n /* TBC : Removed\n if (isset($p_filedescr['stored_filename'])) {\n $v_stored_filename = $p_filedescr['stored_filename'];\n }\n else {\n $v_stored_filename = $p_filedescr['stored_filename'];\n }\n */\n\n // ----- Set the file properties\n clearstatcache();\n $p_header['version'] = 20;\n $p_header['version_extracted'] = 10;\n $p_header['flag'] = 0;\n $p_header['compression'] = 0;\n $p_header['crc'] = 0;\n $p_header['compressed_size'] = 0;\n $p_header['filename_len'] = strlen($p_filename);\n $p_header['extra_len'] = 0;\n $p_header['disk'] = 0;\n $p_header['internal'] = 0;\n $p_header['offset'] = 0;\n $p_header['filename'] = $p_filename;\n// TBC : Removed $p_header['stored_filename'] = $v_stored_filename;\n $p_header['stored_filename'] = $p_filedescr['stored_filename'];\n $p_header['extra'] = '';\n $p_header['status'] = 'ok';\n $p_header['index'] = -1;\n\n // ----- Look for regular file\n if ($p_filedescr['type']=='file') {\n $p_header['external'] = 0x00000000;\n $p_header['size'] = filesize($p_filename);\n }\n\n // ----- Look for regular folder\n else if ($p_filedescr['type']=='folder') {\n $p_header['external'] = 0x00000010;\n $p_header['mtime'] = filemtime($p_filename);\n $p_header['size'] = filesize($p_filename);\n }\n\n // ----- Look for virtual file\n else if ($p_filedescr['type'] == 'virtual_file') {\n $p_header['external'] = 0x00000000;\n $p_header['size'] = strlen($p_filedescr['content']);\n }\n\n\n // ----- Look for filetime\n if (isset($p_filedescr['mtime'])) {\n $p_header['mtime'] = $p_filedescr['mtime'];\n }\n else if ($p_filedescr['type'] == 'virtual_file') {\n $p_header['mtime'] = time();\n }\n else {\n $p_header['mtime'] = filemtime($p_filename);\n }\n\n // ------ Look for file comment\n if (isset($p_filedescr['comment'])) {\n $p_header['comment_len'] = strlen($p_filedescr['comment']);\n $p_header['comment'] = $p_filedescr['comment'];\n }\n else {\n $p_header['comment_len'] = 0;\n $p_header['comment'] = '';\n }\n\n // ----- Look for pre-add callback\n if (isset($p_options[PCLZIP_CB_PRE_ADD])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_header, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header);\n if ($v_result == 0) {\n // ----- Change the file status\n $p_header['status'] = \"skipped\";\n $v_result = 1;\n }\n\n // ----- Update the informations\n // Only some fields can be modified\n if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {\n $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);\n }\n }\n\n // ----- Look for empty stored filename\n if ($p_header['stored_filename'] == \"\") {\n $p_header['status'] = \"filtered\";\n }\n\n // ----- Check the path length\n if (strlen($p_header['stored_filename']) > 0xFF) {\n $p_header['status'] = 'filename_too_long';\n }\n\n // ----- Look if no error, or file not skipped\n if ($p_header['status'] == 'ok') {\n\n // ----- Look for a file\n if ($p_filedescr['type'] == 'file') {\n // ----- Look for using temporary file to zip\n if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))\n && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])\n || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])\n && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) {\n $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options);\n if ($v_result < PCLZIP_ERR_NO_ERROR) {\n return $v_result;\n }\n }\n\n // ----- Use \"in memory\" zip algo\n else {\n\n // ----- Open the source file\n if (($v_file = @fopen($p_filename, \"rb\")) == 0) {\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, \"Unable to open file '$p_filename' in binary read mode\");\n return PclZip::errorCode();\n }\n\n // ----- Read the file content\n $v_content = @fread($v_file, $p_header['size']);\n\n // ----- Close the file\n @fclose($v_file);\n\n // ----- Calculate the CRC\n $p_header['crc'] = @crc32($v_content);\n\n // ----- Look for no compression\n if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {\n // ----- Set header parameters\n $p_header['compressed_size'] = $p_header['size'];\n $p_header['compression'] = 0;\n }\n\n // ----- Look for normal compression\n else {\n // ----- Compress the content\n $v_content = @gzdeflate($v_content);\n\n // ----- Set header parameters\n $p_header['compressed_size'] = strlen($v_content);\n $p_header['compression'] = 8;\n }\n\n // ----- Call the header generation\n if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {\n @fclose($v_file);\n return $v_result;\n }\n\n // ----- Write the compressed (or not) content\n @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);\n\n }\n\n }\n\n // ----- Look for a virtual file (a file from string)\n else if ($p_filedescr['type'] == 'virtual_file') {\n\n $v_content = $p_filedescr['content'];\n\n // ----- Calculate the CRC\n $p_header['crc'] = @crc32($v_content);\n\n // ----- Look for no compression\n if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {\n // ----- Set header parameters\n $p_header['compressed_size'] = $p_header['size'];\n $p_header['compression'] = 0;\n }\n\n // ----- Look for normal compression\n else {\n // ----- Compress the content\n $v_content = @gzdeflate($v_content);\n\n // ----- Set header parameters\n $p_header['compressed_size'] = strlen($v_content);\n $p_header['compression'] = 8;\n }\n\n // ----- Call the header generation\n if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {\n @fclose($v_file);\n return $v_result;\n }\n\n // ----- Write the compressed (or not) content\n @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);\n }\n\n // ----- Look for a directory\n else if ($p_filedescr['type'] == 'folder') {\n // ----- Look for directory last '/'\n if (@substr($p_header['stored_filename'], -1) != '/') {\n $p_header['stored_filename'] .= '/';\n }\n\n // ----- Set the file properties\n $p_header['size'] = 0;\n //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked\n $p_header['external'] = 0x00000010; // Value for a folder : to be checked\n\n // ----- Call the header generation\n if (($v_result = $this->privWriteFileHeader($p_header)) != 1)\n {\n return $v_result;\n }\n }\n }\n\n // ----- Look for post-add callback\n if (isset($p_options[PCLZIP_CB_POST_ADD])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_header, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header);\n if ($v_result == 0) {\n // ----- Ignored\n $v_result = 1;\n }\n\n // ----- Update the informations\n // Nothing can be modified\n }\n\n // ----- Return\n return $v_result;\n }", "protected function after_execute() {\n $this->add_related_files('block_file', 'intro', null);\n $this->add_related_files('block_file', 'file', null);\n }", "public function onAfterSkippedWrite()\n {\n $this->updateChildFilesystem();\n }", "public function p_add_text(){\n\t\t$_POST['uploaded_by'] = $this->user->user_id;\t\t\n\t\t# Create created and modified timestamps\n\t\t$_POST['date_uploaded'] = Time::now();\n\t\t$time_added = $_POST['date_uploaded'];\n\t\t$ext = $_POST['extension'];\n\t\tDB::instance(DB_NAME)->insert('photos', $_POST);\t\t\n\t\t$where_condition = \"SELECT photo_id FROM photos WHERE date_uploaded =\".$time_added;\n\t\t\n\t\t$last_photo = DB::instance(DB_NAME)->select_field($where_condition);\n\t\t$old_name = \"uploads/images/temp.\".$ext;\n\t\t$new_name = \"uploads/images/\".$last_photo.\".\".$ext;\t\n\t\trename($old_name, $new_name);\t\t\t\t\n\t\tunlink(\"uploads/images/temp.\".$ext);\n\t\t/*$thumb_nail = \"uploads/thumbnails/\".$last_photo.\".\".$ext;\n\t\tcopy($new_name, $thumb_nail);\n\t\tsave_image($thumb_nail, \"10\");*/\n\t\t\n\t}", "function privExtractFileInOutput(&$p_entry, &$p_options)\n {\n $v_result=1;\n\n // ----- Read the file header\n if (($v_result = $this->privReadFileHeader($v_header)) != 1) {\n return $v_result;\n }\n\n\n // ----- Check that the file header is coherent with $p_entry info\n if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {\n // TBC\n }\n\n // ----- Look for pre-extract callback\n if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_entry, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');\n $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);\n if ($v_result == 0) {\n // ----- Change the file status\n $p_entry['status'] = \"skipped\";\n $v_result = 1;\n }\n\n // ----- Look for abort result\n if ($v_result == 2) {\n // ----- This status is internal and will be changed in 'skipped'\n $p_entry['status'] = \"aborted\";\n \t$v_result = PCLZIP_ERR_USER_ABORTED;\n }\n\n // ----- Update the informations\n // Only some fields can be modified\n $p_entry['filename'] = $v_local_header['filename'];\n }\n\n // ----- Trace\n\n // ----- Look if extraction should be done\n if ($p_entry['status'] == 'ok') {\n\n // ----- Do the extraction (if not a folder)\n if (!(($p_entry['external']&0x00000010)==0x00000010)) {\n // ----- Look for not compressed file\n if ($p_entry['compressed_size'] == $p_entry['size']) {\n\n // ----- Read the file in a buffer (one shot)\n $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);\n\n // ----- Send the file to the output\n echo $v_buffer;\n unset($v_buffer);\n }\n else {\n\n // ----- Read the compressed file in a buffer (one shot)\n $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);\n\n // ----- Decompress the file\n $v_file_content = gzinflate($v_buffer);\n unset($v_buffer);\n\n // ----- Send the file to the output\n echo $v_file_content;\n unset($v_file_content);\n }\n }\n }\n\n\t// ----- Change abort status\n\tif ($p_entry['status'] == \"aborted\") {\n $p_entry['status'] = \"skipped\";\n\t}\n\n // ----- Look for post-extract callback\n elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_entry, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);\n\n // ----- Look for abort result\n if ($v_result == 2) {\n \t$v_result = PCLZIP_ERR_USER_ABORTED;\n }\n }\n\n return $v_result;\n }", "function fileNeedsProcessing() ;", "public function addFile($data, $name) {\r\n\r\n $name = str_replace(\"\\\\\", \"/\", $name);\r\n\r\n $fr = \"\\x50\\x4b\\x03\\x04\";\r\n $fr .= \"\\x14\\x00\"; // version needed to extract\r\n $fr .= \"\\x00\\x00\"; // general purpose bit flag\r\n $fr .= \"\\x08\\x00\"; // compression method\r\n $fr .= \"\\x00\\x00\\x00\\x00\"; // last mod time and date\r\n\r\n $unc_len = strlen($data);\r\n $crc = crc32($data);\r\n $zdata = gzcompress($data);\r\n $zdata = substr($zdata, 2, -4); // fix crc bug\r\n $c_len = strlen($zdata);\r\n $fr .= pack(\"V\",$crc); // crc32\r\n $fr .= pack(\"V\",$c_len); //compressed filesize\r\n $fr .= pack(\"V\",$unc_len); //uncompressed filesize\r\n $fr .= pack(\"v\", strlen($name) ); //length of filename\r\n $fr .= pack(\"v\", 0 ); //extra field length\r\n $fr .= $name;\r\n // end of \"local file header\" segment\r\n\r\n // \"file data\" segment\r\n $fr .= $zdata;\r\n\r\n // \"data descriptor\" segment (optional but necessary if archive is not served as file)\r\n $fr .= pack(\"V\",$crc); // crc32\r\n $fr .= pack(\"V\",$c_len); // compressed filesize\r\n $fr .= pack(\"V\",$unc_len); // uncompressed filesize\r\n\r\n // add this entry to array\r\n $this->datasec[] = $fr;\r\n\r\n $newOffset = strlen(implode(\"\", $this->datasec));\r\n\r\n // now add to central directory record\r\n $cdrec = \"\\x50\\x4b\\x01\\x02\";\r\n $cdrec .=\"\\x00\\x00\"; // version made by\r\n $cdrec .=\"\\x14\\x00\"; // version needed to extract\r\n $cdrec .=\"\\x00\\x00\"; // general purpose bit flag\r\n $cdrec .=\"\\x08\\x00\"; // compression method\r\n $cdrec .=\"\\x00\\x00\\x00\\x00\"; // last mod time & date\r\n $cdrec .= pack(\"V\",$crc); // crc32\r\n $cdrec .= pack(\"V\",$c_len); //compressed filesize\r\n $cdrec .= pack(\"V\",$unc_len); //uncompressed filesize\r\n $cdrec .= pack(\"v\", strlen($name) ); //length of filename\r\n $cdrec .= pack(\"v\", 0 ); //extra field length\r\n $cdrec .= pack(\"v\", 0 ); //file comment length\r\n $cdrec .= pack(\"v\", 0 ); //disk number start\r\n $cdrec .= pack(\"v\", 0 ); //internal file attributes\r\n $cdrec .= pack(\"V\", 32 ); //external file attributes - 'archive' bit set\r\n\r\n $cdrec .= pack(\"V\", $this->oldOffset); //relative offset of local header\r\n $this->oldOffset = $newOffset;\r\n\r\n $cdrec .= $name;\r\n // optional extra field, file comment goes here\r\n // save to central directory\r\n $this->ctrlDir[] = $cdrec;\r\n }", "protected function afterUpload()\n {\n $this->owner->trigger(self::EVENT_AFTER_UPLOAD);\n }", "public function addOperation($operation)\n {\n if (!in_array($operation, $this->operations, true)) {\n $this->operations[] = $operation;\n }\n }", "public function addFile($path, $fileOrStream)\n {\n if (!$this->_done) {\n $this->_done = true;\n if (is_resource($fileOrStream)) {\n stream_copy_to_stream($fileOrStream, $this->_path);\n } else {\n fwrite($this->_path, $fileOrStream);\n }\n }\n }", "public function silo_put($path, $filedata)\n\t{\n\t}", "public function extract_to ($path, $error_callback = null)\n {\n $url = new FILE_URL ($path);\n $url->append ($this->normalized_name);\n ensure_path_exists ($url->path ());\n $this->extracted_name = $url->as_text ();\n\n $this->_extract_to ($this->extracted_name, $error_callback);\n }", "public function silo_put($path, $filedata)\r\n\t{\r\n\t}", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n\n $filePath = md5(uniqid($this->getIdUser().\"_profil\",true)).\".\".\n $this->getFile()->guessClientExtension();\n\n $this->getFile()->move(\n $this->getUploadRootDir(),$filePath\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filePath;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "function T3COPY($source,$dest,&$filearray,$level) {\r\n\t\t\t$this->tx_cbywebdav_devlog(3,\"=== T3COPY > \".$dest.\" \".$source,\"cby_webdav\",\"COPY\");\r\n\t\t\t$t3io=$this->CFG->t3io;\r\n\t\t\t$source=$this->_slashify($source);\r\n \t$filearray[$level][$source][]=$source;\r\n\t\t\t$sourceinfo=$t3io->T3IsFile($source); \r\n\t\t\t$lvl=$level;\r\n\t\t\t$destinfo=$t3io->T3IsFile($dest);\r\n\t\t\t$file = $this->_slashify($source);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t$fileinfo=$t3io->T3IsFile($file); \r\n\t\t\t$new=!$destinfo['exists']; \t\t\t\t\t\t\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY file \".serialize($fileinfo).\" files : \".serialize($files),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t//if ($fileinfo['isWebmount'] && $fileinfo['isDir']) { // Répertoire Webmount\r\n\r\n\t\t\t// we handle copy root rename here ....\r\n\t\t\t$page['title']=basename($file);\r\n\t\t\t// we handle copy root rename here ....\r\n\t\t\t$this->tx_cbywebdav_devlog(3,\"=== T3COPY fs \".$file.\" \".$source,\"cby_webdav\",\"COPY\");\r\n\t\t\t// if we are first dir to copy we take dest dir name\r\n\t\t\tif ($file==$source && $level==0 && $new){\r\n\t\t\t\t$this->tx_cbywebdav_devlog(3,\"=== T3COPY f=s \".$file.\" \".$source,\"cby_webdav\",\"COPY\");\r\n\t\t\t\t$page['title']=basename($dest);\r\n\t\t\t}\r\n\r\n\t\t\t$page['pid']=$destinfo['pid'];\r\n\t\t\tif ($destinfo['isWebmount']) $page['title']=$t3io->T3ExtractPageTitle($destinfo['uid'],$page['title']);\r\n\t\t\t//$where=\" uid='$sourceinfo[uid]' \";\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY \".$this->CFG->T3DB->INSERTquery('pages',$page),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\r\n\t\t\t$this->CFG->T3DB->exec_INSERTquery('pages',$page); \t\t// copie récursive à mettre en place ici ...???\t\t\t\t\t\r\n\t\t\t$pid=$this->CFG->T3DB->sql_insert_id();\t\r\n\r\n\t\t\t// we copy the page content ...\r\n\t\t\t\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY $source sinfo : \".serialize($sourceinfo).\" #######################\",\"cby_webdav\",\"COPY\");\r\n\t\t\t\r\n\t\t\t// We add the tt_content, could also be tt_news, users (vcf ...)\r\n\t\t\t$content['pid']=$pid;\r\n\t\t\t\r\n\t\t\t$enable=$GLOBALS['TSFE']->sys_page->enableFields('tt_content',-1,array('fe_group'=>1));\r\n\t\t\t$res=$this->CFG->T3DB->exec_SELECTquery('header','tt_content','pid='.intval($sourceinfo['uid']).$enable );\r\n\t\t\tif ($res) {\r\n\t\t\t\twhile ($row=$this->CFG->T3DB->sql_fetch_assoc($res)) {\r\n\t\t\t\t\t$file=$source.$row['header'];\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$fileinfo=$t3io->T3IsFile($file);\r\n\t\t\t\t\t$destinfo=$t3io->T3IsFile($dest.'/'.$row['header']);\t\t\t\t\t\r\n\t\t\t\t\t//TODO handle upload file rename ...\r\n\t\t\t\t\t//$content['header']=basename($file);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$where=\" uid='$destinfo[uid]' \";\r\n\t\t\t\t\tif ($destinfo['isWebmount']) {\r\n\t\t\t\t\t\tif ($destinfo['uid']) {\r\n\t\t\t\t\t\t\t$this->CFG->T3DB->exec_UPDATEquery('tt_content',$where,$content); \r\n\t\t\t\t\t\t \t$this->tx_cbywebdav_devlog(2,\"=== COPY \".$this->CFG->T3DB->UPDATEquery('tt_content',$where,$content),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\t} else {\t\r\n \t\t\t\t\t\t\t$content['header']=basename($file); \r\n\t\t\t\t\t\t\t$this->CFG->T3DB->exec_INSERTquery('tt_content',$content); \t\r\n\t\t\t\t\t\t \t$this->tx_cbywebdav_devlog(2,\"=== COPY \".$this->CFG->T3DB->INSERTquery('tt_content',$content),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// We get the directories (pages)....(should be a recursive call here ...\r\n\t\t\t$enable=$GLOBALS['TSFE']->sys_page->enableFields('pages',-1,array('fe_group'=>1));\r\n\t\t\t$res=$this->CFG->T3DB->exec_SELECTquery('title','pages','pid='.intval($sourceinfo['uid']).$enable );\r\n\t\t\tif ($res) {\r\n\t\t\t\twhile ($row=$this->CFG->T3DB->sql_fetch_assoc($res)) {\r\n\t\t\t\t\t$this->T3COPY($source.$row['title'].'/',$dest.'/'.$page['title'],$filearray,$level+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY files:\" .serialize($filearray).\" #######################\",\"cby_webdav\",\"COPY\");\r\n }", "public function addTaskFile($task_id){\n\n $err=\"\";\n $file=\"\";\n // Testons si le fichier n'est pas trop gros\n if ($_FILES['myfile']['error'] == 0){\n if ($_FILES['myfile']['size'] <= MAX_FILE_SIZE)\n {\n // On peut valider le fichier et le stocker définitivement\n if (!is_dir(REPOSITORY_PATH . '/'. $task_id .'/')) {\n mkdir(REPOSITORY_PATH . '/'. $task_id .'/', 0777, true);\n }\n //move file to 'uploads' repository\n $file=REPOSITORY_PATH . '/'. $task_id .'/'. basename($_FILES['myfile']['name']);\n move_uploaded_file($_FILES['myfile']['tmp_name'], $file);\n\n //retrieve the task team id\n $bdd = $this->connectDB();\n $req=$bdd->prepare('SELECT team from task WHERE id= ?');\n $req->execute(array($task_id));\n\n if ($req->rowCount()){\n $row = $req->fetch();\n $team=$row['team'];\n }\n\n //update history\n $history_manager=new historyManager();\n $history_manager->addEvent($team,'attach_file',$task_id);\n\n }else{\n $err=\"fichier trop volumineux\";\n }\n }else{\n $err=\"erreur lors de l'envoi du fichier\";\n }\n\n\n $file_add=array(\n 'error'=>$err,\n 'file'=>$file\n );\n\n return $file_add;\n }", "abstract public function saveOperation(OperationInterface $op);", "function _copyFile($filePath) {\n\t\t$usageStatsFiles = $this->_usageStatsFiles;\n\t\t$usageStatsDir = $this->_usageStatsDir;\n\t\t$tmpDir = $this->_tmpDir;\n\t\t$fileName = pathinfo($filePath, PATHINFO_BASENAME);\n\t\t$fileMgr = new FileManager();\n\n\t\t$isCompressed = false;\n\t\t$uncompressedFileName = $fileName;\n\t\tif (pathinfo($filePath, PATHINFO_EXTENSION) == 'gz') {\n\t\t\t$isCompressed = true;\n\t\t\t$uncompressedFileName = substr($fileName, 0, -3);\n\t\t}\n\n\t\tif (in_array($uncompressedFileName, $usageStatsFiles)) {\n\t\t\tprintf(__('admin.copyAccessLogFileTool.warning.fileAlreadyExists', array('filePath' => $filePath)) . \"\\n\");\n\t\t\treturn;\n\t\t}\n\n\t\t$tmpFilePath = $tmpDir . DIRECTORY_SEPARATOR . $fileName;\n\n\t\t// Copy the file to a temporary directory.\n\t\tif (!$fileMgr->copyFile($filePath, $tmpFilePath)) {\n\t\t\tprintf(__('admin.copyAccessLogFileTool.error.copyingFile', array('filePath' => $filePath, 'tmpFilePath' => $tmpFilePath)) . \"\\n\");\n\t\t\texit(1);\n\t\t}\n\n\t\t// Uncompress it, if needed.\n\t\t$gunzipPath = escapeshellarg(Config::getVar('cli', 'gunzip'));\n\t\tif ($isCompressed) {\n\t\t\texec($gunzipPath . ' ' . $tmpFilePath);\n\t\t\t$tmpFilePath = substr($tmpFilePath, 0, -3);\n\t\t}\n\n\t\t// Filter only entries that contains journal paths.\n\t\t$egrepPath = escapeshellarg(Config::getVar('cli', 'egrep'));\n\t\t$destinationPath = $usageStatsDir . DIRECTORY_SEPARATOR .\n\t\tFILE_LOADER_PATH_STAGING . DIRECTORY_SEPARATOR .\n\t\tpathinfo($tmpFilePath, PATHINFO_BASENAME);\n\t\t// Each journal path is already escaped, see the constructor.\n\t\texec($egrepPath . \" -i '\" . $this->_journalPaths . \"' \" . escapeshellarg($tmpFilePath) . \" > \" . escapeshellarg($destinationPath));\n\n\t\tif (!$fileMgr->deleteFile($tmpFilePath)) {\n\t\t\tprintf(__('admin.copyAccessLogFileTool.error.deletingFile', array('tmpFilePath' => $tmpFilePath)) . \"\\n\");\n\t\t\texit(1);\n\t\t}\n\n\t\tprintf(__('admin.copyAccessLogFileTool.success', array('filePath' => $filePath, 'destinationPath' => $destinationPath)) . \"\\n\");\n\t}", "function onAfterUpload(&$man, $cmd, $input) {\r\n\t\treturn true;\r\n\t}", "public static function doFileUpdate($path,$datas)\n\t{\n\t\t$_xml=isTable($datas)?self::toTableXML($datas):self::toTreeXCML($datas);\n\t\t//debugx($path);\n\t\t//debugvc($_xml);\n\t\tutilFile::doFileWrite($path,$_xml);\n\t\tunset($_xml);\n\t}", "public function test_basic_file_manipulations() {\n /**\n * Test creating a file\n */\n $filename = 'testfile.txt';\n $uri = 'test://'.$filename;\n $path = $this->test_dir.'/'.$filename;\n $expected_contents = $this->sample_content;\n\n // Make sure the file doesn't exist to start with\n $this->assertFileNotExists($path);\n\n // Touch the file\n wp_touch($uri);\n $this->assertFileExists($path);\n\n // Unlink the file\n unlink($uri);\n $this->assertFileNotExists($path);\n\n // Open and write to the file\n $fh = fopen($uri, 'w');\n fwrite($fh, $expected_contents);\n fclose($fh);\n $this->assertFileExists($path);\n $this->assertEquals(filesize($uri), filesize($path));\n\n // Open and read from the file\n $fh = fopen($uri, 'r');\n $actual_contents = fread($fh, filesize($uri));\n fclose($fh);\n $this->assertEquals($expected_contents, $actual_contents);\n\n // Copy the file\n $second_filename = 'testfile2.txt';\n $second_uri = 'test://'.$second_filename;\n $second_path = $this->test_dir.'/'.$second_filename;\n\n copy($uri, $second_uri);\n $this->assertFileExists($this->test_dir.'/'.$second_filename);\n $this->assertEquals(filesize($uri), filesize($second_uri));\n\n // Unlink original file\n unlink($uri);\n $this->assertFileNotExists($path);\n\n // Rename second file to first file\n rename($second_uri, $uri);\n $this->assertFileNotExists($second_path);\n $this->assertfileExists($path);\n\n // Cleanup\n unlink($uri);\n $this->assertfileNotExists($path);\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function onCommit()\n {\n switch ($this->mode) {\n case 'new':\n if ($this->imageResource) {\n $realPath = Yii::getAlias('@app/web/profile-images') . '/' . $this->filename;\n FileHelper::createDirectory(dirname($realPath));\n imagepng($this->imageResource, $realPath, 9, PNG_ALL_FILTERS);\n imagedestroy($this->imageResource);\n $this->imageResource = null;\n }\n break;\n\n case 'delete':\n if ($this->filename) {\n $realPath = Yii::getAlias('@app/web/profile-images') . '/' . $this->filename;\n if (file_exists($realPath)) {\n @unlink($realPath);\n }\n }\n break;\n }\n }", "protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []): array\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $type = $options['type'] ?? 'add';\n $useMove = (bool)($options['move'] ?? false);\n\n\n $opFile = $this->getContextDir($contextId) . \"/operations.byml\";\n $ops = [];\n if (true === file_exists($opFile)) {\n $ops = BabyYamlUtil::readFile($opFile);\n }\n\n\n if (null !== $path) {\n\n $relPath = $this->getFileRelativePath($contextId, $id, $path, $meta);\n $dst = $this->getContextDir($contextId) . \"/files/\" . $relPath;\n if ($path !== $dst) {\n if (true === $useMove) {\n FileSystemTool::move($path, $dst);\n } else {\n FileSystemTool::copyFile($path, $dst);\n }\n }\n } else {\n $relPath = null;\n $dst = null;\n }\n\n\n $addOperation = [\n 'type' => $type,\n 'id' => $id,\n 'path' => $relPath,\n 'meta' => $meta,\n ];\n\n\n //--------------------------------------------\n // ADDING THE OPERATION (see heuristic notes for more details)\n //--------------------------------------------\n $found = false;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $found = true;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $ops[$k] = $addOperation;\n break;\n default:\n $this->error(\"Operation \\\"$type\\\" rejected. You cannot add this entry because it already exists with type=\\\"$type\\\" for id \\\"$id\\\".\");\n break;\n }\n }\n }\n\n\n if (false === $found) {\n $op = $addOperation;\n }\n $this->onFileAddedAfter($contextId, $op, $path, $dst, $options);\n if (false === $found) {\n $ops[] = $op;\n } else {\n $ops[$k] = $op;\n }\n\n\n BabyYamlUtil::writeFile($ops, $opFile);\n\n\n return $op;\n }", "function addFile(File $newFile)\r\n\t{\r\n\t\tif( file_exists( $this->path . '/' . $newFile->getName( ) ) )\r\n\t\t{\r\n\t\t\t$this->filesCollection->add( $newFile );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error( \"arquivo inexistente! não foi possível adicionar\" );\r\n\t\t}\r\n\t}", "protected function _extract_to ($path, $error_callback)\n {\n if (zip_entry_open ($this->_zip_handle, $this->_handle))\n {\n $f = @fopen ($path, 'wb');\n if ($f === false)\n {\n $this->_report_error ($error_callback, \"Could not open destination file [$path].\");\n }\n else\n {\n while (($data = zip_entry_read ($this->_handle, $this->read_block_size)) != false)\n {\n fwrite ($f, $data);\n }\n fclose ($f);\n }\n zip_entry_close ($this->_handle);\n }\n else\n {\n $this->_report_error ($error_callback, \"Could not open zip entry [$this->name].\");\n }\n }", "function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)\n {\n $v_result=1;\n\n // ----- Read the file header\n if (($v_result = $this->privReadFileHeader($v_header)) != 1)\n {\n // ----- Return\n return $v_result;\n }\n\n\n // ----- Check that the file header is coherent with $p_entry info\n if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {\n // TBC\n }\n\n // ----- Look for all path to remove\n if ($p_remove_all_path == true) {\n // ----- Look for folder entry that not need to be extracted\n if (($p_entry['external']&0x00000010)==0x00000010) {\n\n $p_entry['status'] = \"filtered\";\n\n return $v_result;\n }\n\n // ----- Get the basename of the path\n $p_entry['filename'] = basename($p_entry['filename']);\n }\n\n // ----- Look for path to remove\n else if ($p_remove_path != \"\")\n {\n if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)\n {\n\n // ----- Change the file status\n $p_entry['status'] = \"filtered\";\n\n // ----- Return\n return $v_result;\n }\n\n $p_remove_path_size = strlen($p_remove_path);\n if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)\n {\n\n // ----- Remove the path\n $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);\n\n }\n }\n\n // ----- Add the path\n if ($p_path != '') {\n $p_entry['filename'] = $p_path.\"/\".$p_entry['filename'];\n }\n\n // ----- Check a base_dir_restriction\n if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {\n $v_inclusion\n = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],\n $p_entry['filename']);\n if ($v_inclusion == 0) {\n\n PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION,\n\t\t\t \"Filename '\".$p_entry['filename'].\"' is \"\n\t\t\t\t\t\t\t\t .\"outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION\");\n\n return PclZip::errorCode();\n }\n }\n\n // ----- Look for pre-extract callback\n if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_entry, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);\n if ($v_result == 0) {\n // ----- Change the file status\n $p_entry['status'] = \"skipped\";\n $v_result = 1;\n }\n\n // ----- Look for abort result\n if ($v_result == 2) {\n // ----- This status is internal and will be changed in 'skipped'\n $p_entry['status'] = \"aborted\";\n \t$v_result = PCLZIP_ERR_USER_ABORTED;\n }\n\n // ----- Update the informations\n // Only some fields can be modified\n $p_entry['filename'] = $v_local_header['filename'];\n }\n\n\n // ----- Look if extraction should be done\n if ($p_entry['status'] == 'ok') {\n\n // ----- Look for specific actions while the file exist\n if (file_exists($p_entry['filename']))\n {\n\n // ----- Look if file is a directory\n if (is_dir($p_entry['filename']))\n {\n\n // ----- Change the file status\n $p_entry['status'] = \"already_a_directory\";\n\n // ----- Look for PCLZIP_OPT_STOP_ON_ERROR\n // For historical reason first PclZip implementation does not stop\n // when this kind of error occurs.\n if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))\n\t\t && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {\n\n PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY,\n\t\t\t \"Filename '\".$p_entry['filename'].\"' is \"\n\t\t\t\t\t\t\t\t .\"already used by an existing directory\");\n\n return PclZip::errorCode();\n\t\t }\n }\n // ----- Look if file is write protected\n else if (!is_writeable($p_entry['filename']))\n {\n\n // ----- Change the file status\n $p_entry['status'] = \"write_protected\";\n\n // ----- Look for PCLZIP_OPT_STOP_ON_ERROR\n // For historical reason first PclZip implementation does not stop\n // when this kind of error occurs.\n if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))\n\t\t && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {\n\n PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,\n\t\t\t \"Filename '\".$p_entry['filename'].\"' exists \"\n\t\t\t\t\t\t\t\t .\"and is write protected\");\n\n return PclZip::errorCode();\n\t\t }\n }\n\n // ----- Look if the extracted file is older\n else if (filemtime($p_entry['filename']) > $p_entry['mtime'])\n {\n // ----- Change the file status\n if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER]))\n\t\t && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) {\n\t \t }\n\t\t else {\n $p_entry['status'] = \"newer_exist\";\n\n // ----- Look for PCLZIP_OPT_STOP_ON_ERROR\n // For historical reason first PclZip implementation does not stop\n // when this kind of error occurs.\n if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))\n\t\t && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {\n\n PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,\n\t\t\t \"Newer version of '\".$p_entry['filename'].\"' exists \"\n\t\t\t\t\t .\"and option PCLZIP_OPT_REPLACE_NEWER is not selected\");\n\n return PclZip::errorCode();\n\t\t }\n\t\t }\n }\n else {\n }\n }\n\n // ----- Check the directory availability and create it if necessary\n else {\n if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))\n $v_dir_to_check = $p_entry['filename'];\n else if (!strstr($p_entry['filename'], \"/\"))\n $v_dir_to_check = \"\";\n else\n $v_dir_to_check = dirname($p_entry['filename']);\n\n if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {\n\n // ----- Change the file status\n $p_entry['status'] = \"path_creation_fail\";\n\n // ----- Return\n //return $v_result;\n $v_result = 1;\n }\n }\n }\n\n // ----- Look if extraction should be done\n if ($p_entry['status'] == 'ok') {\n\n // ----- Do the extraction (if not a folder)\n if (!(($p_entry['external']&0x00000010)==0x00000010))\n {\n // ----- Look for not compressed file\n if ($p_entry['compression'] == 0) {\n\n \t\t // ----- Opening destination file\n if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)\n {\n\n // ----- Change the file status\n $p_entry['status'] = \"write_error\";\n\n // ----- Return\n return $v_result;\n }\n\n\n // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks\n $v_size = $p_entry['compressed_size'];\n while ($v_size != 0)\n {\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\n $v_buffer = @fread($this->zip_fd, $v_read_size);\n /* Try to speed up the code\n $v_binary_data = pack('a'.$v_read_size, $v_buffer);\n @fwrite($v_dest_file, $v_binary_data, $v_read_size);\n */\n @fwrite($v_dest_file, $v_buffer, $v_read_size);\n $v_size -= $v_read_size;\n }\n\n // ----- Closing the destination file\n fclose($v_dest_file);\n\n // ----- Change the file mtime\n touch($p_entry['filename'], $p_entry['mtime']);\n\n\n }\n else {\n // ----- TBC\n // Need to be finished\n if (($p_entry['flag'] & 1) == 1) {\n PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \\''.$p_entry['filename'].'\\' is encrypted. Encrypted files are not supported.');\n return PclZip::errorCode();\n }\n\n\n // ----- Look for using temporary file to unzip\n if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))\n && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])\n || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])\n && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) {\n $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options);\n if ($v_result < PCLZIP_ERR_NO_ERROR) {\n return $v_result;\n }\n }\n\n // ----- Look for extract in memory\n else {\n\n\n // ----- Read the compressed file in a buffer (one shot)\n $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);\n\n // ----- Decompress the file\n $v_file_content = @gzinflate($v_buffer);\n unset($v_buffer);\n if ($v_file_content === FALSE) {\n\n // ----- Change the file status\n // TBC\n $p_entry['status'] = \"error\";\n\n return $v_result;\n }\n\n // ----- Opening destination file\n if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {\n\n // ----- Change the file status\n $p_entry['status'] = \"write_error\";\n\n return $v_result;\n }\n\n // ----- Write the uncompressed data\n @fwrite($v_dest_file, $v_file_content, $p_entry['size']);\n unset($v_file_content);\n\n // ----- Closing the destination file\n @fclose($v_dest_file);\n\n }\n\n // ----- Change the file mtime\n @touch($p_entry['filename'], $p_entry['mtime']);\n }\n\n // ----- Look for chmod option\n if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {\n\n // ----- Change the mode of the file\n @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);\n }\n\n }\n }\n\n \t// ----- Change abort status\n \tif ($p_entry['status'] == \"aborted\") {\n $p_entry['status'] = \"skipped\";\n \t}\n\n // ----- Look for post-extract callback\n elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_entry, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);\n\n // ----- Look for abort result\n if ($v_result == 2) {\n \t$v_result = PCLZIP_ERR_USER_ABORTED;\n }\n }\n\n // ----- Return\n return $v_result;\n }", "public function copyFile($clientPath, $targetPath, $handlerObj = NULL, $handlerMethod = NULL) {\n $this->_handlersCopyFile[$clientPath] = ($handlerObj&&$handlerMethod ? array( $handlerObj, $handlerMethod ) : NULL);\n $this->callMethod( 'copyFile', array($clientPath, $targetPath));\n }", "function rex_com_mediaccess_copyfile($file, $source, $target)\n{\n global $REX;\n\n if(!rex_is_writable($target))\n {\n echo rex_warning('Keine Schreibrechte für das Verzeichnis \"'.$target.'\" !');\n return false;\n }\n\n if(!is_file($source.$file))\n {\n echo rex_warning('Datei \"'.$source.$file.'\" ist nicht vorhanden und kann nicht kopiert werden!');\n return false;\n }\n\n if(is_file($target.$file))\n {\n if(!rename($target.$file,$target.date(\"d.m.y_H.i.s_\").$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht umbenannt werden!');\n return false;\n }\n }\n\n if(!copy($source.$file,$target.$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht geschrieben werden!');\n return false;\n }\n\n if(!chmod($target.$file,$REX['FILEPERM']))\n {\n echo rex_warning('Rechte für \"'.$target.$file.'\" konnten nicht gesetzt werden!');\n return false;\n }\n\n echo rex_info('Datei \"'.$target.$file.'\" wurde erfolgreich angelegt.');\n return true;\n}", "public function gitAdd($path)\n\t{\n\t\t// #TODO: Doesn't support adding new directories along with files.\n\t\t// this only supports adding a single file at a time.\n\t\t$WorkingCopy = $this->gitWrapper->workingCopy($this->getPath()); // This \n\t\treturn $WorkingCopy->add($path);\n\t}", "public function add_postAction() {\n\t\t$info = $this->getPost(array('name', 'sort', 'descript'));\n\t\t$info = $this->_cookData($info);\n\t\t$series = Lock_Service_FileType::getFileTypeByName($info['name']);\n\t\tif($series) $this->output(-1, $info['name'].'已存在');\n\t\t$result = Lock_Service_FileType::addFileType($info);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "function target_add_attachment($att)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $att['original_name']);\n\n\tif (!@file_exists($att['file'])) {\n\t\tif (@file_exists($GLOBALS['CONVERT_FROM_DIR'] .'/'. $att['file'])) {\n\t\t\t$att['file'] = $GLOBALS['CONVERT_FROM_DIR'] .'/'. $att['file'];\n\t\t} else {\n\t\t\tpf('WARNING: Skip file attachment ['. $att['file'] .']. File doesn\\'t exist.');\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif ($att['user_id'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$att['user_id'] = $GLOBALS['hack_id'];\n\t}\n\n\t$mime = q_singleval('SELECT id FROM '. $GLOBALS['DBHOST_TBL_PREFIX'] .'mime WHERE fl_ext='. _esc(substr(strrchr($att['original_name'], '.'), 1)));\n\n\t$att_id = db_qid('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'attach \n\t\t(original_name, owner, message_id, dlcount, mime_type, fsize\n\t) VALUES (\n\t\t'. _esc($att['original_name']) .',\n\t\t'. (int)$att['user_id'] .',\n\t\t'. (int)$att['post_id'] .',\n\t\t'. (int)$att['download_count'] .',\n\t\t'. (int)$mime .',\n\t\t'. (int)filesize($att['file']) .')'\n\t);\n\n\t$old_umask = umask(0111);\n\tif (!copy($att['file'], $GLOBALS['FILE_STORE'] . $att_id .'.atch')) {\n\t\tpf('WARNING: Cannot copy attachment ['. $att['file'] .'] to ['. $GLOBALS['FILE_STORE']. $att_id .'.atch]!');\n\t\treturn;\n\t}\n\tumask($old_umask);\n}", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function setPathAttribute($path){ //modificaremos el atributo path, estamos recibiendo path de la BD\n\n if(! empty($path)){ //El campo path no debe estar vacio para que ejecute toda esa accion\n $name = Carbon::now()->second.$path->getClientOriginalName();//CON CARBON LE ESPECIFICAMOS LA FECHA DE HOY, TOMAMOS EL SEGUNDOEN QUE ES SUBIDO Y LO CONCATENAMOS AL NOMBRE ORIGINAL DEL ARCHIVO, creamos una variable que contatenara el nombre con los segundos\n $this->attributes['path'] = $name; //hacemos referencia a path y vamos a cambiarlo el nombre\n \\Storage::disk('local')->put($name, \\File::get($path)); //ACA SE HACE LA SUBIDA DEL ARCHIVO, especificamos el local y mediante el metodo put vamos a almacenar nuestro archivo, recibe el nombre y el archivo que vamos a subir que es el path\n }\n }", "public function addOperation(string $operation): OperationInterface;", "public function export_addFilesFromSysFilesRecords() {}", "function addFile(FileUpload $file)\n\t{\n\t\t$file->move($this->getUniqueFilePath());\n\t\t$this->query('INSERT INTO files (queueID, created, data, name) VALUES (\"' . sqlite_escape_string($this->getQueueID()) . '\",' . time() . ',\\'' . sqlite_escape_string(serialize($file)) . '\\', \\'' . sqlite_escape_string($file->getName()) . '\\')');\n\t}", "public function copyPath($filePath, $newPath);", "function copy_fichier($file, $path) {\n\t\t if (!$id_erreur=copy(\"vide.htm\", $path . $file . \".htm\")) echo(\"Erreur d'ouverture du fichier\");\n\t\t else return(1);\n}", "public function save($file, $path);", "function add_log_entry(log_op_move $entry) {\n array_unshift($this->log_op_list, $entry);\n }", "private function addUndo()\n\t{\n\t\t// Check, if the undo function was called (so no new entry to the undo array must be added) and if there were changes\n\t\tif ((!$this->undoCalled) && ($this->undoMd5 != $this->getUndoMd5()))\n\t\t{\n\t\t\t// Build a new entry\n\t\t\t$undoStep = array();\n\t\t\t$undoStep['wp'] = $this->wantedPartitioning;\n\t\t\t$undoStep['ps'] = $this->partitionSteps;\n\n\t\t\t// and add it\n\t\t\tarray_push($this->undoArray, $undoStep);\n\t\t\t$this->updateUndoMd5();\n\t\t}\n\t}" ]
[ "0.561931", "0.5439367", "0.5304523", "0.51962525", "0.5189412", "0.51107407", "0.5094557", "0.50640947", "0.5060068", "0.5046373", "0.4997068", "0.4968944", "0.49438724", "0.49374127", "0.49186742", "0.4867372", "0.4864451", "0.48184586", "0.47963086", "0.47740966", "0.47740966", "0.47729197", "0.4771095", "0.4721762", "0.4716923", "0.47158498", "0.4706279", "0.47019076", "0.4694898", "0.4692461", "0.46898028", "0.46897596", "0.46860105", "0.46808997", "0.4679626", "0.46678755", "0.4667694", "0.4666952", "0.46423686", "0.46422204", "0.4637217", "0.4613147", "0.45989445", "0.45976534", "0.45833275", "0.45671725", "0.456395", "0.45633557", "0.45632407", "0.4560794", "0.45464006", "0.4540098", "0.45390528", "0.45288432", "0.45280018", "0.45275596", "0.45192268", "0.4514496", "0.4507366", "0.44979313", "0.4496921", "0.4484176", "0.44838804", "0.44800135", "0.44603756", "0.44571406", "0.44513106", "0.44499755", "0.4443179", "0.44350675", "0.4433847", "0.4428858", "0.44236806", "0.44217867", "0.44186118", "0.44155347", "0.44114718", "0.44087625", "0.44012305", "0.43973777", "0.43898246", "0.4387842", "0.43848142", "0.43800426", "0.4374986", "0.43643108", "0.43624073", "0.43598002", "0.43589437", "0.43581718", "0.43527925", "0.43454513", "0.434397", "0.4342571", "0.43377194", "0.433578", "0.4333205", "0.4323297", "0.43212348", "0.43211594" ]
0.6951877
0
Hook called after the file has been removed from the virtual file system. id: the file identifier op: the operation if one was deleted, or null otherwise realpath: the realpath of the deleted file if one was deleted, or null otherwise
protected function onFileRemovedAfter(string $contextId, string $id, ?array $op, ?string $realpath) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeFile(int $id): void\n {\n $stmt = $this->db->prepare(\"DELETE FROM comments WHERE file_id=:id_bind\");\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_INT);\n $stmt->execute();\n\n $stmt = $this->db->prepare(\"DELETE FROM files WHERE id=:id_bind\");\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_INT);\n $stmt->execute();\n }", "function photo_cache_cleanup_by_id($id)\n{\n\t$result=$GLOBALS['db']->Execute(\"SELECT filename FROM \".PREFIX.\"photo_cache WHERE photo_id='\".linpha_addslashes($id).\"'\");\n\n\twhile($row=$result->FetchRow())\n\t{\n\t\t$file2del = get_full_path($row[0]);\n\t\tif(!@unlink($file2del)) {\n\t\t\tif(file_exists($file2del)) {\n\t\t\t\terror_log(\"photo_cache_cleanup_by_id unable to delete file: \".$file2del);\n\t\t\t}\n\t\t}\n\t}\n\t$GLOBALS['db']->Execute(\"DELETE FROM \".PREFIX.\"photo_cache WHERE photo_id='\".linpha_addslashes($id).\"'\");\n}", "public function delete($id) {\n try {\n $this->pdo->beginTransaction();\n // select the file data from the database\n $stmt = $this->pdo->prepare('SELECT file_data '\n . 'FROM company_files '\n . 'WHERE id=:id');\n $stmt->execute([$id]);\n $stmt->bindColumn('file_data', $fileData, \\PDO::PARAM_STR);\n $stmt->closeCursor();\n \n // delete the large object\n $this->pdo->pgsqlLOBUnlink($fileData);\n $stmt = $this->pdo->prepare(\"DELETE FROM company_files WHERE id = :id\");\n $stmt->execute([$id]);\n \n $this->pdo->commit();\n } catch (\\Exception $e) {\n $this->pdo->rollBack();\n throw $e;\n }\n }", "protected function delete($id) {\n\t\t@unlink(self::getPath($id));\n\t\t$this->db->exec(\"DELETE FROM image WHERE id = '\".SQLite3::escapeString($id).\"'\");\n\t}", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function hook_after_delete($id)\n\t{\n\t\t//Your code here\n\n\t}", "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "public static function delete($id)\n {\n DB::StartTrans();\n if (!is_numeric($id)) {\n $id = self::get_storage_id_by_link($id, false);\n }\n if ($id) {\n DB::Execute('UPDATE utils_filestorage SET deleted=1 WHERE id=%d', array($id));\n }\n DB::CompleteTrans();\n }", "public static function delete_photo($id){\n global $db;\n $row = static::find_photo($id);\n $k78sql = \"DELETE FROM photos WHERE photo_id = '\".$id.\"'\";\n try {\n //check if photo is present in database\n if($db->query($sql)){\n //$row = static::find_photo($id);\n //deletes file in image path\n unlink(IMG_PATH.DS.$row['file_name']);\n //deleting photo from database table\n $db->exec($sql);\n return 'Photo with ID '.$id.' deleted from DB';\n }else{\n throw new Exception(\"File could not be deleteed\");\n }\n } catch (Exception $e) {\n return $e;\n }\n }", "public function hook_after_delete($id) {\n\n }", "public function delete($id)\n\t{\n\n\t\t $document = Efile::where('id',$id)->first();\n //delete the file from the server\n\n // Storage::delete($document->path);\n $storagePath = Storage::disk('public')->getDriver()->getAdapter()->getPathPrefix();\n\t\tif(file_exists($storagePath.$document->path)){\n\t\t unlink($storagePath.$document->path);\n\t\t}\n\t\t\n $document->delete($id);\n\n\t}", "public function removeFile($id,$filelocation) {\n $this->deleteFile($id,$filelocation);\n }", "public function delete($id) \n\t{\n \t$tot = $this->Model_photo->photo_check($id);\n \tif(!$tot) {\n \t\tredirect(base_url().'admin/photo');\n \texit;\n \t}\n\n $data['photo'] = $this->Model_photo->getData($id);\n if($data['photo']) {\n unlink('./public/uploads/'.$data['photo']['photo_name']);\n }\n\n $this->Model_photo->delete($id);\n redirect(base_url().'admin/photo');\n }", "function fileRemove($fileId){\n\tinclude '../../database.php';\n\n\t$stmt = $conn->prepare(\"SELECT * FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n\t$filelocation = $stmt->fetch(PDO::FETCH_ASSOC);\n\t$filelocation = $_SERVER[\"DOCUMENT_ROOT\"] . $filelocation;\n\n\tunlink($filelocation);\n\n\t$stmt = $conn->prepare(\"DELETE FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n}", "function removeFile($iaf_id)\n {\n $iaf_id = Misc::escapeInteger($iaf_id);\n $stmt = \"DELETE FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment_file\n WHERE\n iaf_id=\" . $iaf_id;\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return -1;\n }\n }", "public function on_delete() {\n $this->remove_dir();\n }", "public function delete($id) {\n\t\t$fileName= $this->Partner->field('image',$id);\n\t\t//create and new file varalbe to be used by the file utility for deletion\n\t\t$file = new File(WWW_ROOT . $fileName, false, 0777);\n if ($this->request->is('get')) {\n throw new MethodNotAllowedException();\n }\n //deleted the field then run the record delection from the database\n if($this->Partner->delete($id)) {\n\t\t$file->delete();\n\t\t return $this->redirect(array('action' => 'index'));\n \n }\n}", "protected function deleteFile($id, $filelocation){\n $sql = \"DELETE FROM satdatameta WHERE idSatDataMeta = ?;\n DELETE FROM satdata WHERE idSatMetaData = ?\";\n $stmt = $this->connect()->prepare($sql);\n \n if ($stmt->execute([$id,$id])) {\n unlink($filelocation);\n header('Location:../pages/dashboard.php?status=filedeletesuccess');\n exit();\n } else {\n header('Location:../pages/dashboard.php?status=filedeletefailed');\n exit();\n }\n }", "function delete_file() {\n $is_logged_in = $this->common_lib->is_logged_in();\n if ($is_logged_in == FALSE) {\n\t\t\t$this->session->set_userdata('sess_post_login_redirect_url', current_url());\n if($this->data['is_admin'] === TRUE){\n redirect($this->router->directory.'admin/login');\n }else{\n redirect($this->router->directory.'user/login');\n }\n }\n\n $id = $this->input->get_post('id');\n $file_path = $this->input->get_post('file_path');\n if ($id) {\n $where_array = array('id' => $id);\n $res = $this->user_model->delete($where_array, 'uploads');\n if ($res) {\n $this->common_lib->unlink_file(array(FCPATH . $file_path));\n }\n echo json_encode(\"success\");\n } else {\n echo json_encode(\"error\");\n }\n }", "function Trigger_FileDelete2(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo3\");\r\r\n return $deleteObj->Execute();\r\r\n}", "public function deleteFile($id)\n {\n $row = DB::table('uploaded_files')\n ->where('id',$id)\n ->select('id', 'upload_path')->get()->first();\n \n /**\n * NOTE: There was a problem using File::delete() as well as Storage::delete()\n * Also file_exists() fails unless basePath() is used.\n */\n $file = app()->basePath(). '/storage/app/'.$row->upload_path;\n\n if(file_exists($file))\n {\n \n unlink($file);\n // delete record from the table \n DB::table('uploaded_files')->delete($id);\n return back()\n ->with('success','You have successfully delete the file ' );\n }\n else\n {\n return back()\n ->with('Error','Error Deleting the file ' );\n }\n \n }", "function cot_pfs_deletefile($userid, $id)\n{\n\tglobal $db, $db_pfs, $cfg;\n\n\t$sql = $db->query(\"SELECT pfs_id FROM $db_pfs WHERE pfs_userid=\".(int)$userid.\" AND pfs_id=\".(int)$id.\" LIMIT 1\");\n\n\tif ($sql->rowCount()>0)\n\t{\n\t\t$fpath = cot_pfs_filepath($id);\n\n\t\tif (file_exists($thumbs_dir_user.$fpath))\n\t\t{\n\t\t\t@unlink($thumbs_dir_user.$fpath);\n\t\t}\n\t\tif (file_exists($pfs_dir_user.$fpath))\n\t\t{\n\t\t\t@unlink($pfs_dir_user.$fpath);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t$sql = $db->delete($db_pfs, \"pfs_id='\".(int)$id.\"'\");\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t}\n}", "public function deleteFileById($conn, $id){\n\t\t//Preparo lo statement che permette di eliminare\n\t\t//una determinata record dalla tabella Filmato_Presentazione\n\t\t$sth = $conn->prepare('delete from Filmato_Presentazione where id = :id');\n\t\t//Inserisco i dati\n\t\t$sth->bindParam(':id', $id, PDO::PARAM_INT);\n\t\t$sth->execute();\n\t}", "public function admin_remove_file($id=null, $fileId=null) {\n\t\t$response = array('success' => false);\n\t\tif(empty($id) || empty($fileId)) {\n\t\t\treturn $this->render(array('json' => $response));\n\t\t}\n\t\t\n\t\t// A good check to make...Ensure the content document actually exists.\n\t\t$document = Content::find('first', array('fields' => array('_id', '_files'), 'conditions' => array('_id' => $id)));\n\t\tif(empty($document)) {\n\t\t\treturn $this->render(array('json' => $response));\n\t\t}\n\t\t\n\t\tif(substr($fileId, -5) == '.json') {\n\t\t\t$fileId = substr($fileId, 0, -5);\n\t\t}\n\t\t$fileId = new MongoId($fileId);\n\t\t\n\t\t// Also ensure the asset actually exists.\n\t\t$asset = Asset::find('first', array('conditions' => array('_id' => $fileId)));\n\t\tif(!empty($asset)) {\n\t\t\tif(Asset::remove(array('_id' => $asset->_id))) {\n\t\t\t\t// Remove any thumbnails if this was an image asset (or other types of children files).\n\t\t\t\tAsset::remove(array('_parent' => $asset->_id));\n\n\t\t\t\t// Update the document to remove associations.\n\t\t\t\tContent::update(\n\t\t\t\t\tarray('$unset' => array('_files.' . (string)$asset->_id => true)),\n\t\t\t\t\tarray('_id' => $document->_id)\n\t\t\t\t);\n\t\t\t\t$response['success'] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->render(array('json' => $response));\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}", "function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}", "public function delete($id) {\n\t\t# Delete the picture and all its versions\n\t\t$this->Picture->_deletePicture($id);\n\n\t\t$this->render(false, false);\n\t}", "public function deleteFile(){\n\t\t$db = $this->db;\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t$file = $db->fetchRow($db->select()->from(array(\"tbf\"=>\"tb_applicant_files\"))->where(\"id = ?\", $id));\n\t\tif ($file){\n\t\t\tif ($file[\"userid\"]!=$_SESSION[\"userid\"]){\n\t\t\t\treturn array(\"success\"=>false);\n\t\t\t}\n\t\t\t//$db->delete(\"tb_applicant_files\", $db->quoteInto(\"id = ?\", $id));\n\t\t\t$db->update(\"tb_applicant_files\", array(\"is_deleted\" => 1), $db->quoteInto(\"id = ?\", $id));\n $db->delete(\"solr_candidates\", $db -> quoteInto(\"userid=?\",$_SESSION[\"userid\"]));\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/solr-index/sync-candidates/\");\n\t\t\t\n\t\t\tif (file_exists(getcwd().\"/../applicants_files/\".$file[\"name\"])){\n\t\t\t\tunlink(getcwd().\"/../applicants_files/\".$file[\"name\"]);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $_SESSION[\"userid\"]);\n\t\t\t\n\t\t\t\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function delete($id) {\n\t\t$file = $this->init['path']['data'] . $id . $this->init['data']['ext'];\n\t\t// If the file doesn't exist\n\t\tif (!file_exists($file)) {\n\t\t\t// Ooops, the file didn't exist\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Delete the file\n\t\t\tunlink($file);\n\t\t\treturn true;\n\t\t}\n\t}", "public function actionRemove() {\n if (!isset($_POST['id']))\n die(\"what?\");\n $id = (int) $_POST['id'];\n if ($id < 1)\n die(\"unknown file\");\n CUserfiles::model()->RemoveFile($this->user_id, $id);\n\n echo \"OK\";\n }", "protected function removeEntry(string $contextId, string $id)\n {\n $opFile = $this->getOperationsFile($contextId);\n $ops = BabyYamlUtil::readFile($opFile);\n\n\n /**\n * If the entry is found, we remove it directly from the operations.\n */\n $addTheDeleteEntry = true;\n $realpath = null;\n $op = null;\n foreach ($ops as $k => $op) {\n if ($id === $op['id']) {\n $addTheDeleteEntry = false;\n $type = $op['type'];\n switch ($type) {\n case \"add\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n break;\n case \"update\":\n $realpath = $this->getEntryRealPathByOperation($contextId, $op);\n if (file_exists($realpath)) {\n unlink($realpath);\n }\n unset($ops[$k]);\n $addTheDeleteEntry = true;\n break;\n }\n }\n }\n\n\n if (true === $addTheDeleteEntry) {\n $ops[] = [\n 'type' => \"remove\",\n 'id' => $id,\n ];\n }\n\n $this->onFileRemovedAfter($contextId, $id, $op, $realpath);\n\n $ops = array_merge($ops);\n BabyYamlUtil::writeFile($ops, $opFile);\n\n }", "public function delete_file() {\n $post_data = $_POST;\n $where_cond = array(\n \"id\" => $post_data['id'],\n );\n $update_data = array(\n \"row_status\" => 0\n );\n $status = $this->fileupload_model->update_fileupload_data($where_cond, $update_data);\n if ($status) {\n echo json_encode(array(\n \"status\" => \"success\",\n \"message\" => \"File delted successfully.\"\n ));\n exit;\n }\n echo json_encode(array(\n \"status\" => \"success\",\n \"message\" => \"File deltion failed.\"\n ));\n exit;\n }", "public function destroy($id)\n {\n\n try {\n $this->response = $this->http_client->request('POST',\n \"http://{$_SERVER['REMOTE_ADDR']}:9091/api/file/delete.php\",\n [\n 'json' => [\n 'id' => $id,\n ],\n 'headers' => [\n 'Content-Type' => 'application/json',\n 'X-HTTP-Method-Override' => \"DELETE\"\n ],\n 'verify' => false,\n ]);\n\n $this->status_code = $this->response->getStatusCode();\n return $this->response->getBody();\n\n } catch (Exception $e) {\n echo \"Exception: \" . $e;\n }\n\n }", "public function destroy($id)\n {\n \tFile::destroy($id);\n }", "function Trigger_FileDelete(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo1\");\r\r\n return $deleteObj->Execute();\r\r\n}", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function delete($id)\n {\n $file_name = $this->getFileName($id);\n return unlink($file_name);\n }", "public function delete($id)\n {\n $file_name = $this->getFileName($id);\n return unlink($file_name);\n }", "public function delete(Request $request,Response $response,Int $id){\n //corroboro que sea el autor el que lo esta borrando\n if(Auth::user()->id==File::find($id)->user_id){\n $path_file= File::find($id)->path;\n\n $path_final=str_replace('storage/','public/',$path_file);\n\n Storage::disk('local')->delete($path_final);\n\n File::destroy($id);\n }\n }", "function Trigger_FileDelete1(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo2\");\r\r\n return $deleteObj->Execute();\r\r\n}", "public function deletefile($id)\n\t{\n\t\t//\n $paths = Config::get('uploads');\n\n $file = McFile::find($id);\n $product = ProductCategory::find(Input::get('product_category_id'));\n\n\n\n\n //$full = $filepath.\"/\".$file->file_name;\n //echo $full;\n\n //Delete from Files Table\n $file->delete();\n\n //Delete from Files/Product Table\n $product->files()->where('file_id','=',$id)->delete();\n\n //Delete Files\n foreach($paths as $path) {\n $filepath = $path .\"/\".$file->file_name;\n if(File::exists($filepath)) {\n\n File::delete($filepath);\n\n // echo \"Deleted: \".$filepath.\"<br>\";\n }\n }\n\n Session::flash('message', 'Successfully deleted files for ' .$product->title );\n\n return Redirect::to('admin/products/'.Input::get('product_category_id').'/files');\n\n\t}", "public function deletePicture($id){\n $picName = null;\n $images = new Images();\n $dataPic = $images->get_image($id);\n foreach ($dataPic as $key => $value) {\n $picName = $value->img_url;\n }\n $checkFile = file_exists(public_path() . '/' . $picName);\n if ($checkFile){\n unlink(public_path() . '/' . $picName);\n }\n }", "public function hapus_foto_thumb($id)\n\t{\n\t\t$this->db->where('id_file_foto', $id);\n\t\t$this->db->delete('file_foto');\n\t}", "public function delete($id)\n {\n\n $file = File::find($id);\n\n if(auth()->user()->id !== $file->user_id){\n return redirect('/home')->with('error', 'Unauthorized Page');\n }else{\n $file->isDeleted = 1;\n $file->deleted_at = Carbon::now();\n $file->save();\n\n return redirect('/uploads')->with('success', 'File Deleted');\n }\n }", "public function destroy($id)\n {\n $getFile = Files::find($id);\n\n\n // find if there is any node connected\n $getPost = Posts::where(['image'=>$getFile->file]);\n if ($getPost->count() > 0) {\n $getPost = Posts::where(['image'=>$getFile->file])->update([\n 'image' => 'img/blogImage.png'\n ]);\n }\n\n\n $remove = File::delete($getFile->file);\n $del = Files::destroy($id);\n\n Session::flash('Success', 'File removed succesfully.');\n return redirect()->back();\n }", "public function destroy($id)\n {\n $line = Line::find($id);\n if ($line->fileentry_id !== 0) {\n if (Storage::exists('uploads/' . $line->fileentry->filename))\n Storage::delete('uploads/' . $line->fileentry->filename);\n $line->fileentry->delete();\n }\n $line->delete();\n return redirect('line');\n }", "public function deleteFileByID($ID){\n return parent::deleteObjectByID($ID);\n }", "function local_avatars_delete_image($user_id){\n\tlocal_avatars_get_plugin()->file_handler->delete_image($user_id);\n}", "public function delete($id = null)\n {\n $attachment = $this->Attachments->get($id);\n \n if (!@unlink(UPLOADS . $attachment->path)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n \n if ($this->request->is(['delete', 'post'])) {\n if (!$this->Attachments->delete($attachment)) {\n $this->set('error', 'An unexpected error occured');\n $this->set('_serialize', [ 'error' ]);\n return;\n }\n }\n \n $this->set('attachment', $attachment);\n $this->set('_serialize', 'attachment');\n }", "public function deletefiles($id)\n {\n if (!Gate::allows('Owner')) return redirect('/home')->with('warning', __('Somehow you the system tried to let you do something which is not allowed. So you are sent home!'));\n $this->checkAccess($id);\n\n $uploaddir = [];\n $uploaddir['Housegraphics'] = public_path().'/housegraphics/' . $id . '/';\n $uploaddir['Housedocuments'] = public_path().'/housedocuments/' . $id . '/';\n $uploaddir['Gallery'] = public_path().'/housegraphics/' . $id . '/gallery1/';\n\n //We delete if asked for\n $file = Input::get('file', []);\n foreach ($file as $key => $value)\n {\n $filecomponents = explode(';', $value);\n $filename = $uploaddir[$filecomponents[0]].$filecomponents[1];\n unlink($filename);\n }\n\n return redirect('house/browse/'.$id)->with('success', $filename.' '.__('deleted'));\n }", "public function destroy($id)\n {\n $prev_search = Producto::where(\"familia_id\",$id)->get();\n if(!empty($prev_search))\n return -1;\n\n $data = self::edit($id);\n $filename = public_path() . \"/\" . $data[\"img\"];\n if (file_exists($filename))\n unlink($filename);\n\n Familia::destroy($id);\n return 0;\n }", "function hook_file_operations() {\n $operations = array(\n 'delete' => array(\n 'label' => t('Delete selected files'),\n 'callback' => NULL,\n ),\n );\n return $operations;\n}", "function DeleteFile($class, $key, $id)\r\n\t{\r\n\t\tswitch($this->MyClasses[$class]['db'][$key])\r\n\t\t{\r\n\t\t\tcase \"img\":\r\n\t\t\t{\r\n\t\t\t\t$Reek = $this->GetRecord($class, $id);\r\n\t\t\t\t$Reek = $Reek[0];\r\n\t\t\t\t \r\n\t\t\t\t$upload_dir = ROOT_DIR.$this->GetImg($Reek[$key], \"raw\");\r\n\t\t\t $upload_dir_thumb = ROOT_DIR.$this->GetImgThumb($Reek[$key], \"raw\");\r\n\t\t\t\tif(file_exists($upload_dir))\r\n\t\t\t {\r\n\t\t\t\t\tunlink($upload_dir);\r\n\t\t\t\t}\r\n\t\t\t\tif(file_exists($upload_dir_thumb))\r\n\t\t\t {\r\n\t\t\t\t\tunlink($upload_dir_thumb);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcase \"unlimg\":\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function _deleteEntity( $id )\n\t\t{\n\t\t\t$data = explode( '__', $id );\n\t\t\t$template = array_pop( $data );\n\t\t\t$type = str_replace( '.phtml', '', $template );\n\t\t\t// Delete a file.\n\t\t\tif ( count( $data ) > 1 ) {\n\t\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\t\tif ( is_file( $directory . $id ) ) {\n\t\t\t\t\tunlink( $directory . $id );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function destroy($id)\n {\n $file = File::find($id);\n if ($file->user_id == auth()->user()->id)\n {\n $file->delete();\n Storage::delete('public/BrightDrive/user_'.auth()->user()->id.'/'.$file->filename);\n return redirect('/BrightDrive')->with('success', $file->filename.' removed');\n }\n else\n {\n return redirect('/BrightDrive')->with('error', 'Access Denied');\n }\n }", "public function deleteUserFile($id, $delete_code) {\n\t\t$num = $this->db->querySingle('SELECT COUNT(*) FROM image\n\t\t\tWHERE id = \"'.SQLite3::escapeString($id).'\"\n\t\t\t\tAND delete_code = \"'.SQLite3::escapeString($delete_code).'\"');\n\t\tif (!$num) {\n\t\t\tthrow new QuicksandException(\"Found nothing to delete.\");\n\t\t}\n\t\t$this->delete($id);\n\t\t$this->checkUserDelcode($delete_code);\n\t\theader(\"Location: \".$this->server.$this->url, true, 303);\n\t\texit;\n\t}", "public function deleteFile($id){\n\n if(!is_string($id) || StringUtils::isEmpty($id)){\n\n throw new UnexpectedValueException('id must be a non empty string');\n }\n\n return $this->_filesManager->deleteFile($this->_rootPath.DIRECTORY_SEPARATOR.$id);\n }", "function delete($_data, $id= null)\n\t{\n\t\tif($_data['real_delete']){\n\t\t\treturn $this->remove($_data, $id);\n\t\t}else{\n\t\t\treturn $this->invisible_remove($_data, $id);\n\t\t}\n\t\t\n\t}", "public static function delete($id, $ruta = ''){\n\t\t\tif( empty($ruta) && !empty(self::$cachedir) ) $ruta = self::$cachedir;\n\t\t\t$archivo = glob(\"{$ruta}/{$id}_*\");\n\t\t\tif( $archivo ) foreach($archivo as $v) unlink($v);\n\t\t}", "abstract protected function _doDelete($id);", "public function delImg($item_id, $imgfile)\n {\n $this->db->update(array('id'=>$item_id), array('$pull'=>array('imgs'=>$imgfile)));\n \n // if this img is defimg, remove it, and replace with next img if still exists\n if ( $this->db->getOne(array('id'=>$item_id, 'defimg'=>$imgfile)) )\n {\n $defimg = ( $imgs = $this->db->getOne(array('id'=>$item_id, array('imgs'))) ) ? $imgs[0] : null;\n $this->db->update(array('id'=>$item_id), array('defimg'=>null));\n }\n }", "public function remove($table = NULL, $id_field = NULL) {\n\t\t$file_remove = $this->value();\n\t\t$file_remove = $file_remove['removed'];\n\n\t\t$ids = Array();\n\t\t$files = Array();\n\t\tforeach ($file_remove as $file_IN) {\n\t\t\tif (@unlink($file_IN->dir.$file_IN->filename)) {\n\t\t\t\t$ids []= (int)$file_IN->id;\n\t\t\t}\n\t\t}\n\t\tif ($table !== NULL && $ids) {\n\t\t\t$sql = 'DELETE FROM '.$table.' WHERE '.$id_field.' IN ('.join(', ', $ids).')';\n\t\t\ttep_db_query($sql);\n\t\t}\n\t}", "function Trigger_FileDelete(&$tNG) {\n $deleteObj = new tNG_FileDelete($tNG);\n $deleteObj->setFolder(\"../images/quangcao/\");\n $deleteObj->setDbFieldName(\"taptinquangcao\");\n return $deleteObj->Execute();\n}", "function OnDeleteFile($md5){\n\tDeleteFileFromDatabase($md5);\n}", "public function destroy($id)\n {\n $brn = Branch::find($id);\n $fname = $brn->br_img;\n File::delete('images/branch/'.$fname);\n $brn->delete();\n \n \n return $fname;\n }", "abstract public function remove($id);", "public function deleteFile($id, $filename)\n {\n if ($this->authHelper->checkUserValidation($id)) {\n $this->fileHelper->deleteStoryMediaFile($id, $filename);\n\n $this->story->changeFinalStatus($id, false);\n }\n }", "public function destroy_photo($id)\n {\n //\n if(File::exists(public_path('files/products_img/'.Photo::find($id)->name)))\n {\n File::delete(public_path('files/products_img/'.Photo::find($id)->name));\n Photo::find($id)->delete();\n return redirect()->back();\n }\n }", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "function fileDelete(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tmysql_query(deleteObject($GLOBALS['objectId']));\n\t\t\tmysql_query(deleteFile($GLOBALS['fileId']));\n\t\t\tdie();\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"filesURL\")));\n\t}", "public function DeleteFile()\r\n\t{\r\n\t\t$queryDeleteFile = \"UPDATE files SET status=\\\"DELETED\\\" WHERE file_id=\".$this->fileId;\r\n\t\t$this->sqlDataBase->nonSelectQuery($queryDeleteFile);\r\n\t\tunlink(UPLOAD_PATH. DIRECTORY_SEPARATOR .$this->fileId);\r\n\t}", "public function remove(): void\n {\n if (!$this->trashed) {\n throw new LogicException;\n }\n\n $this->record(new FileWasRemoved($this->identity));\n }", "public function delete($id)\n\t{\n\t\tif(!($this -> isOfficer($id) || $this -> isLace()))\n\t\t\t$this -> redirectHome();\n\t\tif (!$id)\n\t\t{\n\t\t\t$this -> Session -> setFlash(__('Invalid ID for document', true));\n\t\t\t$this -> redirect(array('action' => 'index'));\n\t\t}\n\t\t\n\t\t// Find the document to be deleted.\n\t\t$doc = $this -> Document -> findById($id);\n\t\t$org_id = $doc['Document']['org_id'];\n\t\t\n\t\t// Create a file object and delete the actual file.\n\t\t$filepath = Document::getFilepathWithIdAndName($org_id, $doc['Document']['name']);\n\t\t$file = new File($filepath);\n\t\t$file -> delete();\n\n\t\t// Delete the record in the database for the above file\n\t\tif ($this -> Document -> delete($id))\n\t\t{\n\t\t\t$this -> Session -> setFlash(__('Document deleted.', true));\n\t\t\t$this -> redirect(array(\n\t\t\t\t'controller' => 'documents',\n\t\t\t\t'action' => 'index',\n\t\t\t\t$org_id\n\t\t\t));\n\t\t}\n\t\t$this -> Session -> setFlash(__('Document was not deleted.', true));\n\t\t//$this -> redirect(array('action' => 'index'));\n\t}", "public function remove($id)\n\t{\n\t}", "function delete($id_img)\r\n\t{\r\n\t\tglobal $nuked, $user, $language, $repertoire, $niveau_upload, $galerie_adm, $nb_quotas;\r\n\r\n\t\tif($user[1] >= $niveau_upload)\r\n\t\t{\r\n\t\t\t$sql=mysql_query(\"SELECT fichier FROM \".ESPACE_MEMBRE_TABLE.\" WHERE id = '\".$id_img.\"' \");\r\n\t\t\tlist($fichier) = mysql_fetch_array($sql);\r\n\r\n\t\t\t$img = $repertoire.\"/\".$user[0].\"/\".$fichier;\r\n\r\n\t\t\t$del=mysql_query(\"DELETE FROM \".ESPACE_MEMBRE_TABLE.\" WHERE id='\".$id_img.\"' \");\r\n\t\t\t@unlink($img);\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\"._IMGDELETE.\"</b><br /><br /></div>\";\r\n\r\n\t\t\tredirect(\"index.php?file=Espace_membre&op=compte\",3);\r\n\t\t}else{\r\n\t\t\techo\"\t<div style=\\\"text-align: center;\\\"><br /><br /><b>\" . _NOTACCES . \"</b><br /><br /></div>\";\r\n\t\t\tredirect(\"index.php?file=Espace_membre\", 3);\r\n\t\t}\r\n\t}", "public function delete($id = null) {\n $this->layout = 'admin';\n \n $id = $_GET['id']; \n if($this->ContentPiece->delete($id)){ \n Controller::loadModel('ContentPiecesFiles'); \n $file_ids = $this->ContentPiece->query('select file_id from content_pieces_files where content_piece_id ='.$id);\n \n foreach($file_ids as $file){\n $fids[] = $file['content_pieces_files']['file_id'];\n \n $paths = $this->ContentPiece->query('select file_path from files where id ='.$file['content_pieces_files']['file_id']);\n $html ='';\n foreach($paths as $path){\n $f = new File(WWW_ROOT.$path['files']['file_path']); \n if($f->delete()){\n $html .= '<br/><h2>'.$path['files']['file_path'].' deleted</h2>';\n }\n }\n }\n $this->set('result',$html); \n \n } \n}", "function Trigger_FileDelete(&$tNG) {\n $deleteObj = new tNG_FileDelete($tNG);\n $deleteObj->setFolder(\"uploads/fotos/\");\n $deleteObj->setDbFieldName(\"foto1\");\n return $deleteObj->Execute();\n}", "public function destroy($id)\n {\n $file = File::find($id);\n if ($file->sender_id === Auth::id() || Auth::user()->isAdmin()) {\n $file->update(['parent_id' => 0]);\n\n return $this->respond([\n 'success' => true\n ]);\n }\n\n return $this->respondWithError();\n }", "public function actionDeleteimg($id) {\n $model = $this->loadModel($id);\n $imagefile = $model->image;\n if ($imagefile <> '') {\n CommonFunctions::deleteFile(Yii::app()->params['blogImagePath'], $imagefile, true);\n CommonFunctions::updateFileField('', $id, 'blog_id', 'image', $model->tableName(), 'image_name_date');\n }\n EUserFlash::setSuccessMessage(CommonFunctions::getText(MSG_IMAGE_DELETE_SUCCESS));\n $this->redirect(array('update', 'id' => $model->blog_id));\n }", "public function destroy($id)\n {\n $input = HeaderPhoto::find($id);\n\n if (file_exists($filename = public_path() . '/images/' .$input->path)) {\n unlink($filename);\n }\n $input->delete();\n\n return redirect()->back();\n }", "public static function delete($id)\n {\n if($file = Media::m('file')->find($id))\n {\n $filePath = ROOT . self::getFilesPath() . $file->path . $file->name;\n\n if(file_exists($filePath))\n @unlink($filePath);\n\n self::clearCache($file);\n\n if(Media::m('file')->delete($id))\n return true;\n }\n\n return false;\n }", "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }", "function AfterDelete($where, &$deleted_values, &$message, &$pageObject)\n{\n\n\t\t$delete_jobfile_sql = \"DELETE FROM jobfile WHERE \".$where;\n//unlink($_SESSION[\"output_dir\"].\"\\\\test_alex\\\\\");\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "public function destroy($id)\n {\n $subject = $this->loadSubjectWithTrash($id);\n if($subject->img!=null){\n $img = $subject->img;\n $path = public_path('upload/' . $img);\n if(file_exists($path)){\n unlink(public_path('upload/' . $img));\n }\n }\n $this->checkDataInTransaction($subject,__FUNCTION__);\n }", "public function destroy($id)\n {\n $photo = Photo::where('user_id', '=', Auth()->user()->id)->findOrFail($id);\n\n File::delete(public_path(UPLOADS_PIC_FOLDER . $photo->file));\n File::delete(public_path(ORIGINAL_PICS_FOLDER . $photo->file));\n File::delete(public_path(UPLOADS_THUMB_FOLDER . $photo->file));\n\n $photo->delete();\n Session::flash('message', 'Photo supprimée avec succès.');\n\n return redirect()->route('user.event.show', $photo->event_id);\n }", "public function destroy_file($id)\n\t{\n\n $message = ( $this->file->delete($id) ? array('status' => 'success','message' => 'Le fichier a été supprimé') : array('status' => 'error','message' => 'Problème avec la suppression') );\n\n return Redirect::back()->with( $message );\n\n\t}", "public static function delete_file_on_disk($file_id)\n {\n $hash = self::get_hash_by_file_id($file_id);\n if (!$hash) {\n return;\n }\n\n $filepath = self::get_storage_file_path($hash);\n @unlink($filepath);\n // remove leftover dirs if empty\n for ($i = 0; $i <= 4; $i++) {\n $filepath = dirname($filepath);\n if (!@rmdir($filepath)) {\n break;\n }\n }\n DB::Execute('UPDATE utils_filestorage_files SET deleted=1 WHERE id=%d', array($file_id));\n DB::Execute('UPDATE utils_filestorage SET deleted=1 WHERE file_id=%d', array($file_id));\n }", "function deleteUserImage($id)\n {\n $connect = new Config();\n $sql = \"SELECT user_info FROM user_db WHERE id = :id\";\n $query = $connect->connectPDO()->prepare($sql);\n $query->bindParam(':id', $id, \\PDO::PARAM_INT);\n $query->execute();\n $delImage = $query->fetch();\n\n $decoded = json_decode($delImage['user_info'], true);\n $image = $decoded['user_image'];\n\n if ($delImage != DEFAULT_IMAGE) {\n unlink($_SERVER['DOCUMENT_ROOT'] . $image);\n }\n }", "public function delete($id) {\n $filecalc = dechex(intval($id / 1000)) . DS . dechex($id % 1000);\n\n $theroot = \"/sites/bvstemmen.nl/\";\n\n $data = $this->Media->find('first', array(\n 'conditions' => array('Media.id' => $id),\n 'recursive' => -1));\n\n $orgfile = $theroot . 'media/' . $filecalc . '.' . $data['Media']['extensie'];\n if (is_file($orgfile)) {\n\n unlink($orgfile);\n echo('Deleting ' . $orgfile);\n } else {\n echo ('no file found ' . $orgfile );\n }\n\n $datamo = $this->Mediaaboutobjects->find('first', array(\n 'conditions' => array('Mediaaboutobjects.media_id' => $id),\n 'recursive' => -1));\n $maoid = $datamo['Mediaaboutobjects']['id'];\n\n $this->Mediaaboutobjects->delete($maoid);\n\n\n $datamn = $this->Nameswithmedium->find('first', array(\n 'conditions' => array('Nameswithmedium.media_id' => $id),\n 'recursive' => -1));\n $nwmid = $datamn['Nameswithmedium']['id'];\n\n $this->Nameswithmedium->delete($nwmid);\n\n $this->Media->delete($id);\n\n\n exit;\n\n// echo imagetypes();\n// echo('<br><br><br>');\n// $theinfo = gd_info();\n// debug($theinfo);\n// exit;\n $this->set('data', $data);\n }", "public function delete($id, $ignored=null) {\n\t\t$file = $this->fetchEntry($id);\n \t\t$user = Model_User::retrieve()->fetchEntry($file['USER_ID'], array('LOGIN'));\n\t\t\n \t\tunlink(ROOT_PATH . '/content/userdata/' . $user['LOGIN'] . '/' . $file['FILE_NAME']);\n \t\t\n \t\treturn parent::delete($id, $ignored);\n }", "public function deleted(File $file)\n {\n //\n }", "function unlink_file($bean_id,$file_name) {\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering unlink_file(\".$bean_id.\",\".$file_name.\") method ...\");\n\t\t$log->debug(\"Exiting unlink_file method ...\");\n\t\treturn unlink($root_directory.\"/\".$upload_dir.$bean_id.$file_name);\n\t}", "public function borrarImagen($id)\n {\n DAOVideojuegos::getInstance()->borrarImagen($id);\n if($this->imagen!=$this->carpeta.\"default.jpg\")\n unlink(\"./\".$this->imagen);\n }", "public function trash($id) {\n\t\t$old = $this->init['path']['data'] . $id . $this->init['data']['ext'];\n\t\t$new = $this->init['path']['trash'] . $id . $this->init['data']['ext'];\n\t\t// If the file doesn't exist\n\t\tif (!file_exists($file)) {\n\t\t\t// Ooops, the file didn't exist\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Move the file by renaming it\n\t\t\treturn rename($old, $new);\n\t\t}\n\t}", "public function destroy( $id )\n {\n\n $file = File::findOrFail( $id );\n\n if( Storage::disk( 'local' )->exists( $file->getName( $file->type, $file->name, $file->extension ) ) ){\n\n if( Storage::disk( 'local' )->delete( $file->getName( $file->type, $file->name, $file->extension ) ) ){\n\n return response()->json( $file->delete() );\n }\n\n return response()->json( false );\n }\n }", "function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}", "public static function delete($id)\n {\n //pegando nome da imagem a ser deletada do db\n $prod = Product::selectWhere($id);\n $prodImageName = $prod['prod_image'];\n\n //pegando caminho (path) para a imagem\n $filePath = 'img/prods/' . $prodImageName;\n\n //se o arquivo existir, deletar o mesmo\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }", "public function delete_old_files($user_id){\n\t\t$user=$this->get_by_id('id', $user_id);\n\t\t$avatar_path=$user->avatar;\n\t\t$thumb_path=$user->thumb;\n\t\tif($avatar_path != NULL)\n\t\t\tunlink($avatar_path);\n\t\tif($thumb_path != NULL)\n\t\t\tunlink($thumb_path);// ( BUGFIX zapravio ne pravi koppiju u drugom folderu)\n\t}" ]
[ "0.6655746", "0.6428937", "0.626395", "0.6247531", "0.6220674", "0.61671746", "0.610972", "0.610972", "0.610972", "0.60971606", "0.60802203", "0.6078053", "0.6057658", "0.6020345", "0.59970385", "0.5994904", "0.597039", "0.5922993", "0.59033406", "0.58998823", "0.5888017", "0.5874221", "0.5858544", "0.58534735", "0.5850321", "0.5848145", "0.58308136", "0.58300704", "0.58112", "0.5807001", "0.5806685", "0.58062214", "0.5779145", "0.57752717", "0.5768908", "0.5760714", "0.5744109", "0.57428867", "0.57396543", "0.57396543", "0.57334614", "0.5725412", "0.57184786", "0.57156044", "0.5713178", "0.57084084", "0.57014567", "0.57004946", "0.56989235", "0.56966317", "0.56912756", "0.56795365", "0.5673832", "0.5673786", "0.5663069", "0.56626", "0.5656936", "0.56522775", "0.5652255", "0.5649162", "0.5643873", "0.5641851", "0.5625703", "0.56228524", "0.56225795", "0.5619859", "0.56181276", "0.5614631", "0.56130403", "0.5605141", "0.56014013", "0.5599351", "0.55967563", "0.5587769", "0.5586258", "0.5583928", "0.5583764", "0.55779195", "0.55700237", "0.55637294", "0.5563481", "0.555302", "0.55500233", "0.5549553", "0.5547135", "0.5545807", "0.55426544", "0.55424255", "0.55362344", "0.55347884", "0.5520698", "0.55140316", "0.550926", "0.5507631", "0.5507366", "0.5503502", "0.55018777", "0.5497479", "0.54905474", "0.5487774" ]
0.82158256
0
Returns the file id for the file identified by the given parameters.
abstract protected function getFileId(string $contextId, string $path, array $meta): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFileId() {\n\t\treturn $this->getData('fileId');\n\t}", "public function getFileId()\n\t{\n\t\treturn $this->fileId; \n\n\t}", "public function getFileId()\n {\n return $this->fileId;\n }", "public function getFileId(): string\n {\n return $this->file_id;\n }", "public function getFileID()\n {\n return $this->get('FileID');\n }", "public function getFile_id() {\n return (int) $this->_file_id;\n }", "public function getId()\n {\n return $this->file->get('id');\n }", "static public function generateFileID($surround = true)\n\t{\n\t\treturn QuickBooks_QWC::fileID($surround);\n\t}", "function files_id_get($resource=\".files_meta\", $uuid) { // read one\n return resource_id_get($resource, $uuid);\n}", "public function getFileId(): ?string\n {\n return $this->fileId;\n }", "public function getFileId(string $user, string $spaceName, string $fileName): string {\n\t\t$fileData = $this->getFileData($user, $spaceName, $fileName)->getHeaders();\n\t\treturn $fileData[\"Oc-Fileid\"][0];\n\t}", "public function getId()\n\t{\n\t\treturn $this->googleDriveFile->getId();\n\t}", "function get_file($hash_id = null)\r\n\t{\r\n\t\t\r\n\t}", "public function getDataWithTypeFileReturnsUidOfFileObject() {}", "public function getFileIdentifier($permanent = false, $create = true) {}", "function getFileId($file_id) {\n global $pdo;\n $statement = $pdo->prepare('SELECT `sid` FROM `file` WHERE `id` = :id');\n $statement->bindParam(\":id\", $file_id);\n $statement->execute();\n return $statement->fetch(PDO::FETCH_ASSOC);\n}", "public static function getFileId(DbInterface $db) \r\n {\r\n $table = TABLE_SYSTEM;\r\n \r\n $id = 0;\r\n $error = '';\r\n $error_tmp = '';\r\n \r\n $sql = 'LOCK TABLES `'.$table.'` WRITE';\r\n $db->executeSql($sql,$error_tmp);\r\n if($error_tmp != '') $error .= 'Could NOT lock system table for FILE counter!'; \r\n \r\n if($error == '') { \r\n $sql = 'SELECT `sys_count` FROM `'.$table.'` WHERE `system_id` = \"FILES\" ';\r\n $id = $db->readSqlValue($sql,0);\r\n if($id == 0) {\r\n $error .= 'Could not read System table FILES value!';\r\n } else {\r\n $id = $id+1; \r\n }\r\n }\r\n \r\n if($error == '') { \r\n $sql = 'UPDATE `'.$table.'` SET `sys_count` = `sys_count` + 1 WHERE `system_id` = \"FILES\" ';\r\n $db->executeSql($sql,$error_tmp);\r\n if($error_tmp != '') $error .= 'Could not update system FILES value';\r\n }\r\n \r\n $sql = 'UNLOCK TABLES';\r\n $db->executeSql($sql,$error_tmp);\r\n if($error_tmp != '') $error .= 'Could NOT UNlock system table for FILE counter!';\r\n \r\n if($error !== '') {\r\n throw new Exception('SYSTEM_FILE_ID_ERROR['.$error.']');\r\n } \r\n \r\n return $id;\r\n }", "function _getfilename($id)\n{\n\tif ( !isset($_GET['file']) )\n\t\tthrow new Exception('Empty filename');\n\n\t$file = $_GET['file']; // file name\n\t\n\t\n\t$path = '';\n\t\n\tswitch($file)\n\t{\n\t\tcase 'nfksetup.ini':\t\n\t\tcase 'maplist.txt':\n\t\t\t$path = DIRECTORY_SEPARATOR . 'BASENFK' . DIRECTORY_SEPARATOR;\n\t\t\tbreak;\n\n\t\tcase 'autoexec.cfg':\n\t\tcase 'message.cfg':\n\t\tcase 'server.cfg':\n\t\tcase 'startup.cfg':\n\t\tcase 'nfkconfig.cfg':\t\t\n\t\tcase 'realtime.log':\n\t\tcase 'scc.cfg':\n\t\tcase 'ipban.txt':\n\t\t\t$path = DIRECTORY_SEPARATOR . 'SERVER' . DIRECTORY_SEPARATOR;\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new Exception('Bad filename ' . $file);\n\t}\n\n\t$filename = Config::$ServerPath . _getportbyid($id) . $path . $file;\n\n\treturn $filename;\n}", "protected function _getMigrationIdFromFilename($filename) {\n \n $parts = explode('_', $filename);\n return $parts[0];\n }", "function get_fid_by_fileid($sid,$file_id)\r\n\t{\r\n\t\t$file=$this->get_file_by_id($sid,$file_id);\r\n\t\t\r\n\t\tif($file){\r\n\t\t\treturn $file['id'];\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function titleFile($id, $file);", "private function getFileId($viewName, $extraParam) {\n\t\t// calculate based on md5\n\t\tif (isset($extraParam)) return md5($viewName.$extraParam);\n\t\treturn md5($viewName);\n\t}", "public function storeFilename($file)\n {\n assert(is_string($file), 'Wrong argument type argument 1. String expected');\n if (!is_file($file)) {\n $message = \"File was not found '{$file}'.\";\n $code = \\Yana\\Log\\TypeEnumeration::ERROR;\n $error = new \\Yana\\Core\\Exceptions\\Files\\NotFoundException($message, $code);\n $error->setFilename($file);\n throw $error;\n }\n\n $cache = $this->_getCache();\n $ids = $cache->getIds();\n $id = !empty($ids) ? \\max($ids) + 1 : 0;\n $cache[$id] = (string) $file;\n return $id;\n }", "protected function _updateFileIdentifier() {}", "function get_detail_files_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE data_id = ? AND ref_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "function getImageId();", "public function getFilePath($fileid)\n {\n $file = R::findOne('upload', 'id = ?', [$fileid]);\n return $file->fname;\n }", "public function getFile($params)\n {\n return $this->send('/getFile', $params);\n }", "protected function getCurrentFilename($id) {\n\n\t\tif (!$id) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ($this->getPropertyDefinition('storeExternally')) {\n\t\t\t$tableName = $this->getPropertyDefinition('foreignTableName');\n\t\t\t$key = $this->getPropertyDefinition('foreignTableKey');\n\t\t}\n\t\telse {\n\t\t\t$tableName = $this->model->getTableName();\n\t\t\t$key = $this->model->getTableKey();\n\t\t}\n\n\t\t$db = KenedoPlatform::getDb();\n\t\t$query = \"SELECT `\".$this->propertyName.\"` FROM `\".$tableName.\"` WHERE `\".$key.\"` = '\".$db->getEscaped($id).\"'\";\n\t\t$db->setQuery($query);\n\t\t$filename = (string)$db->loadResult();\n\n\t\treturn $filename;\n\n\t}", "public function getFileNameById($fileid) {\n\n\t\t$this->pdo = config_db::getConnected();\n\n\t\t$stmt = $this->pdo->prepare(\"SELECT filename FROM `files` WHERE id = :id\");\n\t\t$stmt->bindParam(':id', $fileid);\n\t\t$stmt->execute();\n\n\t\t$file = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\treturn $file['filename'];\n\t}", "function find($client_short=NULL,$project_short=NULL,$version_id,$quality) {\r\n $f3 = \\Base::instance();\r\n $files_db=new DB\\SQL\\Mapper($f3->get('DB'),'files');\r\n $files=$files_db->load(array('version_id=? AND quality=?',$version_id,$quality));\r\n $file_id = $files->file_id;\r\n return $file_id;\r\n }", "function get_detail_files_download_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE file_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function get_itemid($params) {\n global $DB;\n\n $item = $DB->get_record_sql('SELECT id FROM {workshop_submissions}\n WHERE workshopid = ?\n AND authorid = ?\n AND content = ?',\n array($params->moduleid, $params->userid, $params->onlinetext)\n );\n\n return ($item) ? $item->id : 0;\n }", "public function GetRealFileName()\n {\n $oFileType = $this->GetFileType();\n\n return $this->id.'.'.$oFileType->sqlData['file_extension'];\n }", "public function getFileNumber()\n {\n return $this->fileNumber;\n }", "function getSaveFile($params){\n\t\tif(!isset($params['appid'],$params['dir']))\n\t\t\tthrow $e=new Exception(\"open file params is not enough\");\n\t\t//echo $params['site_id'].$params['Y'].$params['m'].$params['d'].$params['index'];\n\t\t$hour=intval(date('H'));\n\t\t$minute=intval(date('i'));\n\t\t$index=$hour*12+(int)($minute/5);\n\t\t\n\t\t$temp=sprintf(\"%s/%s/%04s/%02s/ea_data_%02s/%s.log\",\n\t\t\t$params['dir'],$params['appid'],date('Y'),date('m'),date('d'),$index);\n\t\t$filepath=APP_ROOT.'/'.$temp;\n\t\treturn $filepath;\n\t}", "function Tables_FileID(){\n\t\t$File_ID = array();\n\t\t$count=0;\n\t\t$tables=Table_Names();\n\t\t$arrlength=count($tables);\n\t\tfor($x=0;$x<$arrlength;$x++){\n\t\t\tif($tables[$x]!='uploadinfo' && $tables[$x]!='users'){\n\t\t\t\t$File_ID[$count]= substr(\"$tables[$x]\", -1);\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t return $File_ID;\n\t}", "public function getFileName(int $storeId): string;", "function xmlrpc_find_file( $params ) {\n\tglobal $FILE_FOUND;\n\tglobal $FILE_LISTEN_URL;\n\tglobal $FILE_LENGTH;\n\tglobal $FILE_ENCODING;\t\n\tglobal $FILE_DURATION;\n\t\n\t$p0 = $params->getParam(0)->scalarval(); // server ID\n\t$p1 = $params->getParam(1)->scalarval(); // Asterisk call ID\n\t$p2 = $params->getParam(2)->scalarval(); // QM User ID\n\t$p3 = $params->getParam(3)->scalarval(); // Qm user name\n\t\n\tfind_file( $p0, $p1, $p2, $p3 ); \t\t\n\t\n\t$response = new xmlrpcval(array(\n new xmlrpcval( $FILE_FOUND, 'boolean' ),\n new xmlrpcval( $FILE_LISTEN_URL ),\n new xmlrpcval( $FILE_LENGTH ),\n new xmlrpcval( $FILE_ENCODING ),\n new xmlrpcval( $FILE_DURATION ), \n ), \"array\");\n\t\n\treturn new xmlrpcresp($response);\n}", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function setFileID($value)\n {\n return $this->set('FileID', $value);\n }", "public function external_link_id( $params ) {\n\t\treturn @$params['id'];\n\t}", "private function _get_assets_id()\n\t{\n\t\t$filemtime = $this->_get_most_recent_filemtime($this->_get_view_path() . $this->_ci->config->item('bucket_assets_path'));\n\t\n\t\tif($this->_ci->config->item('bucket_obfuscate_assets_timestamp'))\n\t\t{\n\t\t\t$unique_id = md5($filemtime);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$unique_id = $filemtime.'';\n\t\t}\n\t\n\t\treturn $unique_id;\n\t}", "function getMAHOSONewFile()\r\n{\r\n\t$sql = sprintf(\"select ID_PART as ID from adapter_files where IS_GET = 0 lIMIT 1\");\r\n\t\r\n\t$re = query($sql);\r\n\t$row = mysql_fetch_assoc($re);\t\r\n\treturn $row['ID'];\r\n}", "function getPointId($point) {\n\t\tif($this->sql(\"SELECT id FROM \".UT_ACC_POI.\" WHERE file = '$point'\")) {\n\t\t\treturn $this->getQueryResult(0, \"id\");\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "function getFilename();", "public function getFileKey()\n {\n return isset($this->FileKey) ? $this->FileKey : null;\n }", "function get_fileid_by_varid($sid,$vid)\r\n {\r\n\t\tthrow new exception(\"deprecated::use Data_file_model->get_fid_varid\");\r\n\t\t$this->db->select(\"file_id\");\r\n\t\t$this->db->join('data_files','data_files.id=variables.fid');\r\n $this->db->where(\"variables.sid\",$sid);\r\n $this->db->where(\"variables.vid\",$vid);\r\n\t\t$result= $this->db->get(\"variables\")->row_array();\r\n\t\t\r\n\t\tif($result){\r\n\t\t\treturn $result['file_id'];\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "protected function _getFilenameFromCache($id)\n {\n assert(is_int($id), 'Wrong type for argument 1. Integer expected');\n\n $fileId = (int) $id;\n\n $cache = $this->_getCache();\n /* check arguments */\n if (!isset($cache[$fileId])) {\n $message = \"The requested file was not found.\";\n $code = \\Yana\\Log\\TypeEnumeration::WARNING;\n $error = new \\Yana\\Core\\Exceptions\\Files\\NotFoundException($message, $code);\n $error->setFilename((string) $id);\n throw $error;\n }\n\n return (string) $cache[$fileId];\n }", "public static function getId() {\n return isset(self::$id)\n ? self::$id\n : (self::$id = base_convert(crc32(self::getBaseDir()),16,32));\n\t}", "public function getFileName($fileid)\n {\n $file = R::findOne('upload', 'id = ?', [$fileid]);\n return $file->filename;\n }", "function getLastID(): int\n{\n $lastID = file_get_contents(__DIR__ . '/' . LAST_ID_FILE);\n return $lastID == false ? 0 : $lastID;\n}", "public function create_attachment_id(){\n\t\tglobal $con;\n\t\t$result=array();\n\t\t$id=0;\n\t\t$query=\"SELECT attach_id FROM referral_attachments ORDER BY attach_id DESC limit 1\";\n\t\t$result=$this->select($con,$query);\n\t\tforeach ($result as $key => $value) {\n\t\t\t$id=$value['attach_id'];\n\t\t}\n\t\t$id=$id+1;\n\t\treturn $id;\n\t}", "public function setIdentifier(){\n\n \t$this->fileIdentifier = $this->getIdentifier();\n }", "function GetFileFromId($fid)\n{\n\t//Query the user database and see if the user already has an account\n\t$result = mysql_query(\"SELECT file_name FROM files WHERE id = '$fid'\") or die();\n\tif(mysql_num_rows($result) == 0) {\n\t\treturn false;\n\t}\n\treturn mysql_result($result, 0);\n}", "public function getMediaId();", "public function getFileName() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filename\", FALSE);\n\t}", "public function file($parameters = NULL) {\n $accepted_params = ['fileName'];\n $params = array();\n for ($i = 0; $i < sizeof($accepted_params); $i++) {\n if (!isset($parameters[$i])) {\n break;\n }\n $arraytopush = array(\n $accepted_params[$i] => $parameters[$i]\n );\n $params = array_merge($params, $arraytopush);\n }\n unset($params['']);\n require_once './Models/tasks_model.php';\n $model = new Tasks_Model;\n //loads the page with the header and footer already included, set to FALSE to control the full page\n $this->view->render('./Views/downloader',FALSE,$params);\n }", "public function getUserId()\n {\n return $this->fileStructure->uid;\n }", "public function determineId() {}", "function SetItemfileid($value) { $this->itemFileId=$value; }", "public function pathId($path);", "public function getFilename();", "public function getFilename();", "public function get_id();", "public function get_id();", "function get_file_info( $fn ) {\n // Prepare SELECT statement to search for the file.\n $select = \"SELECT * FROM files WHERE\n filename = :filename\";\n $stmt = $this->pdo->prepare($select);\n\n // Bind parameters\n $stmt->bindParam(':filename', $fn);\n\n // Execute statement\n $stmt->execute();\n\n // Count results from SELECT\n $row = $stmt->fetch();\n\n return $row;\n }", "abstract public function get_id();", "public function getCurrentId() {\r\n\t\t\r\n\t\t$query = \"SELECT attachment_id FROM $this->att ORDER BY attachment_id DESC LIMIT 0,1\";\r\n\t\t\r\n\t\t$Resultset = $this->executeQuery($query);\r\n\t\t\t\t\r\n\t\t$data = $Resultset->fetchRow();\r\n\t\t\r\n\t\treturn $data[0];\r\n\t\t\r\n\t}", "function getid3()\n\t{\n\t\tif ($this->investigated)\n\t\t{\n\t\t\tif ($this->id3 == false)\n\t\t\t\t$this->id3 = gen_file_info_sid($this->origrow);\n\t\t}\n\t\treturn $this->id3;\n\t}", "function getFile($file_id) {\n global $pdo;\n $statement = $pdo->prepare('SELECT * FROM `file` WHERE `sid` = :id');\n $statement->bindParam(\":id\", $file_id);\n $statement->execute();\n return $statement->fetch(PDO::FETCH_ASSOC);\n}" ]
[ "0.7443767", "0.73341346", "0.72113", "0.7152763", "0.71450096", "0.6994143", "0.6906814", "0.6422703", "0.63746464", "0.6291513", "0.6247335", "0.6080749", "0.6067643", "0.6035348", "0.6031926", "0.5988047", "0.59361047", "0.5904602", "0.58313346", "0.5773909", "0.57708", "0.57472366", "0.57381684", "0.5725597", "0.5701066", "0.5695077", "0.55691946", "0.55519235", "0.55410624", "0.5528367", "0.55231476", "0.5523042", "0.5501025", "0.5488583", "0.54539764", "0.54113954", "0.53836334", "0.53667784", "0.53640085", "0.53536594", "0.53536594", "0.5353634", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.5353374", "0.53533524", "0.53533524", "0.53533524", "0.53533524", "0.53533524", "0.53533524", "0.53530943", "0.53530943", "0.5351502", "0.53468305", "0.534202", "0.5339808", "0.53352517", "0.5318206", "0.5316782", "0.5305719", "0.52945685", "0.52755225", "0.52727", "0.5271713", "0.5270399", "0.52618563", "0.523031", "0.52285755", "0.5227244", "0.5214238", "0.52141434", "0.5201837", "0.52016485", "0.519894", "0.5197595", "0.5197595", "0.5188291", "0.5188291", "0.5186113", "0.51857024", "0.5184931", "0.51778895", "0.5176903" ]
0.6081486
11
Returns the realpath of the given path. If the file doesn't exist, an exception is thrown.
private function getRealPath(string $path): string { if (false === ($ret = realpath($path))) { $this->error("File does not exist: \"$path\"."); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function realpath($path)\n\t{\n\t\treturn realpath($path);\n\t}", "public function realpath($path): string\n {\n return $this->_realpath($this->_getPath($path));\n }", "protected function getRealPath($path)\n {\n return realpath($path);\n }", "public function realpath($file);", "public function realpath($path, $relative = FileSystem::NONE);", "function realpath($path)\n{\n return $path;\n}", "function phpbb_realpath($path)\n\t{\n\t\treturn phpbb_own_realpath($path);\n\t}", "function phpbb_realpath($path)\n\t{\n\t\treturn phpbb_own_realpath($path);\n\t}", "function phpbb_realpath($path)\n\t{\n\t\t$realpath = realpath($path);\n\n\t\t// Strangely there are provider not disabling realpath but returning strange values. :o\n\t\t// We at least try to cope with them.\n\t\tif ($realpath === $path || $realpath === false)\n\t\t{\n\t\t\treturn phpbb_own_realpath($path);\n\t\t}\n\n\t\t// Check for DIRECTORY_SEPARATOR at the end (and remove it!)\n\t\tif (substr($realpath, -1) == DIRECTORY_SEPARATOR)\n\t\t{\n\t\t\t$realpath = substr($realpath, 0, -1);\n\t\t}\n\n\t\treturn $realpath;\n\t}", "function phpbb_realpath($path)\n\t{\n\t\t$realpath = realpath($path);\n\n\t\t// Strangely there are provider not disabling realpath but returning strange values. :o\n\t\t// We at least try to cope with them.\n\t\tif ($realpath === $path || $realpath === false)\n\t\t{\n\t\t\treturn phpbb_own_realpath($path);\n\t\t}\n\n\t\t// Check for DIRECTORY_SEPARATOR at the end (and remove it!)\n\t\tif (substr($realpath, -1) == DIRECTORY_SEPARATOR)\n\t\t{\n\t\t\t$realpath = substr($realpath, 0, -1);\n\t\t}\n\n\t\treturn $realpath;\n\t}", "private function getCleanPath($path)\n {\n return realpath($path);\n }", "private function realpath(string $path): string\n {\n $last_char = substr($path, -1);\n $path = realpath($path);\n if (DIRECTORY_SEPARATOR === $last_char) {\n $path .= DIRECTORY_SEPARATOR;\n }\n return $path;\n }", "protected function absolutePath($path)\n\t{\n\t return realpath(dirname(__FILE__) . '/../../../../' . $path);\n\t}", "public static function normalize($path) {\n return realpath($path);\n }", "public function absPath(string $path): string;", "public static function resolvePath($path, $relative_to = null) {\n $is_absolute = self::isAbsolutePath($path);\n\n if (!$is_absolute) {\n if (!$relative_to) {\n $relative_to = getcwd();\n }\n $path = $relative_to.DIRECTORY_SEPARATOR.$path;\n }\n\n if (is_link($path)) {\n $parent_realpath = realpath(dirname($path));\n if ($parent_realpath !== false) {\n return $parent_realpath.DIRECTORY_SEPARATOR.basename($path);\n }\n }\n\n $realpath = realpath($path);\n if ($realpath !== false) {\n return $realpath;\n }\n\n\n // This won't work if the file doesn't exist or is on an unreadable mount\n // or something crazy like that. Try to resolve a parent so we at least\n // cover the nonexistent file case.\n $parts = explode(DIRECTORY_SEPARATOR, trim($path, DIRECTORY_SEPARATOR));\n while (end($parts) !== false) {\n array_pop($parts);\n if (phutil_is_windows()) {\n $attempt = implode(DIRECTORY_SEPARATOR, $parts);\n } else {\n $attempt = DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts);\n }\n $realpath = realpath($attempt);\n if ($realpath !== false) {\n $path = $realpath.substr($path, strlen($attempt));\n break;\n }\n }\n\n return $path;\n }", "public static function resolvePath($path, $relative_to = null) {\n $is_absolute = self::isAbsolutePath($path);\n\n if (!$is_absolute) {\n if (!$relative_to) {\n $relative_to = getcwd();\n }\n $path = $relative_to.DIRECTORY_SEPARATOR.$path;\n }\n\n if (is_link($path)) {\n $parent_realpath = realpath(dirname($path));\n if ($parent_realpath !== false) {\n return $parent_realpath.DIRECTORY_SEPARATOR.basename($path);\n }\n }\n\n $realpath = realpath($path);\n if ($realpath !== false) {\n return $realpath;\n }\n\n\n // This won't work if the file doesn't exist or is on an unreadable mount\n // or something crazy like that. Try to resolve a parent so we at least\n // cover the nonexistent file case.\n\n // We're also normalizing path separators to whatever is normal for the\n // environment.\n\n if (phutil_is_windows()) {\n $parts = trim($path, '/\\\\');\n $parts = preg_split('([/\\\\\\\\])', $parts);\n\n // Normalize the directory separators in the path. If we find a parent\n // below, we'll overwrite this with a better resolved path.\n $path = str_replace('/', '\\\\', $path);\n } else {\n $parts = trim($path, '/');\n $parts = explode('/', $parts);\n }\n\n while ($parts) {\n array_pop($parts);\n if (phutil_is_windows()) {\n $attempt = implode(DIRECTORY_SEPARATOR, $parts);\n } else {\n $attempt = DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts);\n }\n $realpath = realpath($attempt);\n if ($realpath !== false) {\n $path = $realpath.substr($path, strlen($attempt));\n break;\n }\n }\n\n return $path;\n }", "function phpbb_realpath($path)\n{\n\tglobal $phpbb_root_path, $phpEx;\n\n\treturn (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path);\n}", "function phpbb_realpath($path)\n{\n\tglobal $phpbb_root_path, $phpEx;\n\n\treturn (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path);\n}", "function get_real_path(string $path, string|bool $check = null): string|null\n{\n if (trim($path) == '') {\n return null;\n }\n\n // NULL-bytes issue.\n if (str_contains($path, \"\\0\")) {\n $path = str_replace(\"\\0\", \"\\\\0\", $path);\n }\n\n // Validate existence of file/directory or file only.\n static $check_path; $check_path ??= fn($c, $p) => (\n $c === true ? file_exists($p) : ($c === 'file' ? is_file($p) : is_dir($p))\n );\n\n if ($ret = realpath($path)) {\n if ($check && !$check_path($check, $ret)) {\n return null;\n }\n return $ret;\n }\n\n $ret = '';\n $sep = DIRECTORY_SEPARATOR;\n $win = DIRECTORY_SEPARATOR == '\\\\';\n\n // Make path \"foo\" => \"./foo\" so prevent invalid returns.\n if (!str_contains($path, $sep) || ($win && substr($path, 1, 2) != ':\\\\')) {\n $path = '.' . $sep . $path;\n }\n\n foreach (explode($sep, $path) as $i => $cur) {\n if ($i == 0) {\n if ($cur == '~') { // Home path (eg: ~/Desktop).\n $ret = getenv('HOME') ?: '';\n continue;\n } elseif ($cur == '.' || $cur == '..') {\n if ($ret == '') {\n // @cancel\n // $file = getcwd(); // Fallback.\n // foreach (debug_backtrace(0) as $trace) {\n // // Search until finding the right path argument (sadly seems no way else\n // // for that when call stack is chaining from a function to another function).\n // if (empty($trace['args'][0]) || $trace['args'][0] != $path) {\n // break;\n // }\n // $file = $trace['file'];\n // }\n\n $tmp = getcwd() . $sep . basename($path);\n $ret = ($cur == '.') ? dirname($tmp) : dirname(dirname($tmp));\n }\n continue;\n }\n }\n\n if ($cur == '' || $cur == '.') {\n continue;\n } elseif ($cur == '..') {\n $ret = dirname($ret); // Up.\n continue;\n }\n\n // Prepend separator current.\n $ret .= $sep . $cur;\n }\n\n if ($check && !$check_path($check, $ret)) {\n return null;\n }\n\n // Normalize.\n if ($ret) {\n // Drop repeating separators.\n $ret = preg_replace(\n '~(['. preg_quote(PATH_SEPARATOR . DIRECTORY_SEPARATOR) .'])\\1+~',\n '\\1', $ret\n );\n\n // Drop ending slashes.\n if ($ret != PATH_SEPARATOR && $ret != DIRECTORY_SEPARATOR) {\n $ret = chop($ret, PATH_SEPARATOR . DIRECTORY_SEPARATOR);\n }\n\n // Fix leading slash for win.\n if ($win && $ret[0] == $sep) {\n $ret = substr($ret, 1);\n }\n }\n\n return $ret;\n}", "public static function getAbsolutePath(string $path) : string\n {\n return (new File($path))->getAbsolutePath();\n }", "public function file($path) {\n return exists($path) ? file($path) : null;\n }", "public static function realpath($path, $cwd = '')\n {\n if(empty($cwd)) {\n $cwd = getcwd();\n }\n if($path[0] == '/') {\n return $path;\n }\n\n if(preg_match('/^[a-z]:\\\\\\//i', $path)) {\n return $path;\n }\n\n $relative = rtrim($cwd, DIRECTORY_SEPARATOR);\n return $relative . DIRECTORY_SEPARATOR . $path;\n }", "public function path(): string\n {\n return realpath($this->file);\n }", "public function getAbsolutePath($path)\n {\n return $this->getPrefixedPath($path, $this->uploadDir);\n }", "protected function getFileRealPath($filePath)\n {\n if ($this->isSupportedStreamWrapper($filePath)) {\n return $filePath;\n }\n\n // Need to use realpath to fix \"Can't open file\" on some Windows setup\n return \\realpath($filePath);\n }", "public static function fullPath ($relPath) {\n\t\treturn (\\realpath($relPath) ?: null);\n\t}", "protected function getFullPath($path, $verify = false) {\n $full_path = $this->cleanPath($this->path_to_files . '/' . $path);\n\n if ($verify === true) {\n if (!file_exists($full_path) || !$this->is_valid_path($full_path)) {\n $langKey = is_dir($full_path) ? 'DIRECTORY_NOT_EXIST' : 'FILE_DOES_NOT_EXIST';\n $this->error($langKey, [$path]);\n }\n }\n return $full_path;\n }", "function __realpath($path) {\n\t$path = str_replace('\\\\','/',realpath($path));\n\tif ($path{1} == ':') {\n\t\t// We can't just check for C:/, because windows users may have the IIS webroot on X: or F:, etc.\n\t\t$path = substr($path,2);\n\t}\n\treturn $path;\n}", "public function getSourcePath($path) {\n\t\tif (Filesystem::isFileBlacklisted($path)) {\n\t\t\tthrow new ForbiddenException('Invalid path', false);\n\t\t}\n\n\t\t$fullPath = $this->datadir . $path;\n\t\t$currentPath = $path;\n\t\tif ($this->allowSymlinks || $currentPath === '') {\n\t\t\treturn $fullPath;\n\t\t}\n\t\t$pathToResolve = $fullPath;\n\t\t$realPath = realpath($pathToResolve);\n\t\twhile ($realPath === false) { // for non existing files check the parent directory\n\t\t\t$currentPath = dirname($currentPath);\n\t\t\tif ($currentPath === '' || $currentPath === '.') {\n\t\t\t\treturn $fullPath;\n\t\t\t}\n\t\t\t$realPath = realpath($this->datadir . $currentPath);\n\t\t}\n\t\tif ($realPath) {\n\t\t\t$realPath = $realPath . '/';\n\t\t}\n\t\tif (substr($realPath, 0, $this->dataDirLength) === $this->realDataDir) {\n\t\t\treturn $fullPath;\n\t\t}\n\n\t\t\\OCP\\Util::writeLog('core', \"Following symlinks is not allowed ('$fullPath' -> '$realPath' not inside '{$this->realDataDir}')\", ILogger::ERROR);\n\t\tthrow new ForbiddenException('Following symlinks is not allowed', false);\n\t}", "function realPath($path, $relative_to = NULL, $resolve_symlink = TRUE);", "static public function getFilePath($file, $base_path = null)\n {\n // If this is already a correct path, return it\n if (@is_file($file) && @is_readable($file)) {\n return realpath($file);\n }\n\n // Determine the application path\n $app = JRequest::getInt('app', JFactory::getApplication()->getClientId());\n if ($app == 1) {\n $app_path = JPATH_ADMINISTRATOR;\n } else {\n $app_path = JPATH_SITE;\n }\n\n // Make sure the basepath is not a file\n if (@is_file($base_path)) {\n $base_path = dirname($base_path);\n }\n\n // Determine the basepath\n if (empty($base_path)) {\n if (substr($file, 0, 1) == '/') {\n $base_path = JPATH_SITE;\n } else {\n $base_path = $app_path;\n }\n }\n\n // Append the base_path\n if (strstr($file, $base_path) == false && !empty($base_path)) {\n $file = $base_path.'/'.$file;\n }\n\n // Detect the right application-path\n if (JFactory::getApplication()->isAdmin()) {\n if (strstr($file, JPATH_ADMINISTRATOR) == false && @is_file(JPATH_ADMINISTRATOR.'/'.$file)) {\n $file = JPATH_ADMINISTRATOR.'/'.$file;\n } else if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n } else {\n if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n }\n\n // If this is not a file, return empty\n if (@is_file($file) == false || @is_readable($file) == false) {\n return null;\n }\n\n // Return the file\n return realpath($file);\n }", "public static function getFullPath($path)\r\n\t{\r\n\t\tif (self::isPathRooted($path)) return self::_normalizeDirectorySeparators($path);\r\n\t\telse\r\n\t\t{\r\n\t\t\t$currentDir=getcwd();\r\n\t\t\treturn self::combine($currentDir, $path);\r\n\t\t}\r\n\t}", "function get_absolute_path($path) {\n\t$path = str_replace(array('/', '\\\\'), DIRECTORY_SEPARATOR, $path);\n\t$parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');\n\t$absolutes = array();\n\tforeach ($parts as $part) {\n\t\tif ('.' == $part) continue;\n\t\tif ('..' == $part) {\n\t\t\tarray_pop($absolutes);\n\t\t}\n\t\telse {\n\t\t\t$absolutes[] = $part;\n\t\t}\n\t}\n\treturn implode(DIRECTORY_SEPARATOR, $absolutes);\n}", "public function getAbsolutePathOfRelativeReferencedFileOrPathResolvesFileCorrectlyDataProvider() {}", "function resolve_relative_path($path = false, $relative_path = false) {\r\n\t\tif($path === false) {\r\n\t\t\tprint('Path: ' . $path . ' or relative path: ' . $relative_path . ' for function resolve_relative_path was imporperly specifed.');\r\n\t\t}\r\n\t\t//$exploded_file_path = explode('/', $this->file);\r\n\t\t$exploded_path = explode('/', $path);\r\n\t\t$exploded_relative_path = explode('/', $relative_path);\r\n\t\t$path_counter = 0;\r\n\t\twhile($exploded_path[$path_counter] === '..') {\r\n\t\t\t$path_counter++;\r\n\t\t}\r\n\t\t$part_to_keep = '';\r\n\t\t$path_counter2 = $path_counter;\r\n\t\twhile($path_counter2 < sizeof($exploded_path)) {\r\n\t\t\t$part_to_keep .= '/' . $exploded_path[$path_counter2];\r\n\t\t\t$path_counter2++;\r\n\t\t}\r\n\t\t$relative_path_counter = sizeof($exploded_relative_path);\r\n\t\twhile($path_counter > -1) {\r\n\t\t\t$relative_path_counter--;\r\n\t\t\t$path_counter--;\r\n\t\t}\r\n\t\t$part_to_keep2 = '';\r\n\t\t$relative_path_counter2 = 0;\r\n\t\twhile($relative_path_counter > 0) {\r\n\t\t\t$part_to_keep2 .= $exploded_relative_path[$relative_path_counter2] . '/';\r\n\t\t\t$relative_path_counter2++;\r\n\t\t\t$relative_path_counter--;\r\n\t\t}\r\n\t\t$resolved_path = substr($part_to_keep2, 0, strlen($part_to_keep2) - 1) . $part_to_keep;\r\n\t\t//print('$path, $relative_path, $resolved_path: ');var_dump($path, $relative_path, $resolved_path);\r\n\t\treturn $resolved_path;\r\n\t}", "public function getFileAbsolutePath($file);", "public static function findFile($path)\n {\n if (file_exists($path)) {\n return $path;\n } else if (file_exists(Settings::get(\"TEMPLATE_DIR\") . \"/\" . $path)) {\n return Settings::get(\"TEMPLATE_DIR\") . \"/\" . $path;\n } else {\n throw new Exception(\"Il file $path non puo essere trovato\");\n }\n }", "public function getSafePath($path, $root){\n\t\tif(!file_exists($root)){\n\t\t\t//= The specified root ({0}) does not exist as either an absolute path or a relative path to the module directory.\n\t\t\tthrow new \\Exception(ExternalModules::tt(\"em_errors_103\", $root));\n\t\t}\n\n\t\t$root = realpath($root);\n\n\t\tif(strpos($path, $root) === 0){\n\t\t\t// The root is already included inthe path.\n\t\t\t$fullPath = $path;\n\t\t}\n\t\telse{\n\t\t\t$fullPath = \"$root/$path\";\n\t\t}\n\n\t\tif(file_exists($fullPath)){\n\t\t\t$fullPath = realpath($fullPath);\n\t\t}\n\t\telse{\n\t\t\t// Also support the case where this is a path to a new file that doesn't exist yet and check it's parents.\n\t\t\t$dirname = dirname($fullPath);\n\t\t\t\t\n\t\t\tif(!file_exists($dirname)){\n\t\t\t\t//= The parent directory ({0}) does not exist. Please create it before calling getSafePath() since the realpath() function only works on directories that exist.\n\t\t\t\tthrow new \\Exception(ExternalModules::tt(\"em_errors_104\", $dirname));\n\t\t\t}\n\n\t\t\t$fullPath = realpath($dirname) . DIRECTORY_SEPARATOR . basename($fullPath);\n\t\t}\n\n\t\tif(strpos($fullPath, $root) !== 0){\n\t\t\t//= You referenced a path ({0}) that is outside of your allowed parent directory ({1}).\n\t\t\tthrow new \\Exception(ExternalModules::tt(\"em_errors_105\", $fullPath, $root));\n\t\t}\n\n\t\treturn $fullPath;\n\t}", "public function getRelativePath($path)\n {\n return str_replace($this->baseDir . '/', '', $path);\n }", "public static function path(string $path = ''): string\n {\n $current = dirname(__DIR__, 2);\n\n return realpath($current.($path ? DIRECTORY_SEPARATOR.$path : $path));\n }", "public function get($path)\n {\n if ($this->check($path)) return File::get($path);\n }", "public function getResource(string $relativePath): string {\n return (new \\SplFileObject($relativePath, 'rb', true))->getRealPath();\n }", "public function get_path()\n\t\t{\n\t\t\tif ($this->path) {\n\t\t\t\treturn $this->path.'/'.$this->get_full_name();\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\t$hash = $this->hash();\n\t\t\t\t} catch(\\System\\Error\\File $e) {\n\t\t\t\t\t$hash = null;\n\t\t\t\t}\n\n\t\t\t\tif ($hash) {\n\t\t\t\t\treturn $this->get_path_hashed();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "function absolute_to_relative_path($path)\n{\n $pathParts = explode(DIRECTORY_SEPARATOR, $path);\n $pathParts = array_reverse($pathParts);\n array_splice($pathParts, 5);\n $pathParts = array_reverse($pathParts);\n $returnPath = CCTVALIASPATH . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $pathParts);\n $returnPath = str_replace('\\\\', '/', $returnPath);\n return $returnPath;\n}", "public function filePath($file) {\r\n $file = $this->fileLoad($file);\r\n return drupal_realpath($file->uri);\r\n }", "function grappinGetAbsolutePath($path)\n {\n $path = str_replace(array('/', '\\\\'), DIRECTORY_SEPARATOR, $path);\n $startSlash = false;\n if (DIRECTORY_SEPARATOR === substr($path, 0, 1)) {\n $startSlash = true;\n }\n $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');\n $absolutes = array();\n foreach ($parts as $part) {\n if ('.' == $part) continue;\n if ('..' == $part) {\n array_pop($absolutes);\n }\n else {\n $absolutes[] = $part;\n }\n }\n $ret = implode(DIRECTORY_SEPARATOR, $absolutes);\n if (true === $startSlash) {\n $ret = DIRECTORY_SEPARATOR . $ret;\n }\n return $ret;\n }", "static function getLocalPath(string $path): ?string;", "public static function getRealPath($path) {\n\t\t$path = self::unifyDirSeperator($path);\n\t\t\n\t\t$result = array();\n\t\t$pathA = explode('/', $path);\n\t\tif ($pathA[0] === '') {\n\t\t\t$result[] = '';\n\t\t}\n\n\t\tforeach ($pathA as $key => $dir) {\n\t\t\tif ($dir == '..') {\n\t\t\t\tif (end($result) == '..') {\n\t\t\t\t\t$result[] = '..';\n\t\t\t\t} \n\t\t\t\telse { \n\t\t\t\t\t$lastValue = array_pop($result);\n\t\t\t\t\tif ($lastValue === '' || $lastValue === null) {\n\t\t\t\t\t\t$result[] = '..';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\telse if ($dir !== '' && $dir != '.') {\n\t\t\t\t$result[] = $dir;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$lastValue = end($pathA);\n\t\tif ($lastValue === '' || $lastValue === false) {\n\t\t\t$result[] = '';\n\t\t}\n\t\t\n\t\treturn implode('/', $result);\n\t}", "private function getRealPath(string $relativePath): string\n {\n return str_replace(\" \", \"\\ \", realpath($relativePath));\n }", "public function resolvePath(string $relativePath): string;", "public function resolvePath($path, $relative_to = null);", "protected function find($path, FileInfo $currentFileInfo)\n {\n if (Util::isPathAbsolute($path) && is_readable($path)) {\n return realpath($path);\n } elseif (is_readable($currentFileInfo->currentDirectory . $path)) {\n return realpath($currentFileInfo->currentDirectory . $path);\n }\n\n // try import dirs\n foreach ($this->importDirs as $importDir) {\n if (is_readable($importDir . '/' . $path)) {\n return realpath($importDir . '/' . $path);\n }\n }\n\n return false;\n }", "public function getPath($file_path = null)\n {\n if (!$file_path) {\n return $this->base_path;\n }\n\n return $this->base_path.'/'.$file_path;\n }", "public function resolvePath($path)\n\t{\n\t\t$path = trim($path, '/\\\\');\n\t\treturn $this->base_path . DIRECTORY_SEPARATOR . $path;\n\t}", "public function get(Path $path, Path $parentPath = null): ?File\n {\n $pagePath = $path->getDirectory();\n $filePath = $path->getFile();\n if (null === $filePath) {\n return null;\n }\n $parentPath = $parentPath ? clone $parentPath : new Path('');\n\n $fullPath = $parentPath->appendPath($pagePath);\n $fullPath->normalize();\n $searchPath = $fullPath->getDirectory();\n\n $page = $this->contentRepository->getPage('/'.trim($searchPath->toString(), '/'));\n $subPath = '';\n while (null === $page && count($searchPath->getElements()) > 1) {\n $subPath = $searchPath->getLastElement().'/'.$subPath;\n $searchPath->dropLastElement();\n $page = $this->contentRepository->getPage('/'.trim($searchPath->toString(), '/'));\n }\n\n if (null === $page) {\n return null;\n }\n\n return $page->getFile($subPath.$filePath->toString());\n }", "static public function getLocalFile($path) {\n\t\treturn self::$defaultInstance->getLocalFile($path);\n\t}", "public function getFilePath() {\n\t\t$path = SPREADSHEET_FILES_DIR . \"/\" . $this->file_name;\n\t\tif (file_exists($path)) {\n\t\t\treturn $path;\n\t\t}\n\t}", "public function getFixtureAbsolutePath(string $path): string\n {\n return dirname(__FILE__, 4) . DIRECTORY_SEPARATOR . $path;\n }", "public function getFullPath();", "public function getAbsolutePath()\n {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public function getFileByPath(string $path)\n {\n if ($this->fileExists($path)) {\n return Storage::get($this->filePath . '/' . $path);\n }\n\n return false;\n }", "public function getAbsolutePath() {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public static function relpath($abs_path, $root = NULL) {\n $abs_path = self::abspath($abs_path);\n// self::logmsg('Source path: \"' . $abs_path . '\"');\n if (!isset($root)) {\n $root = $_SERVER['DOCUMENT_ROOT'];\n }\n// self::logmsg('root: \"' . $root . '\"');\n $source_rel = self::get_rel_dir($root, $abs_path);\n // self::logmsg('Relative path of source (calculated): \"' . $source_rel . '\"');\n if (preg_match('/\\.\\.\\//', $source_rel)) {\n // self::logmsg('<b>Note</b>: path is outside document root. You are allowed to, but its unusual setup. When used to calculate destination folder, the \"../\"s will be removed');\n }\n return $source_rel;\n }", "public function getFullPath(): string;", "public function getFile($path = '/'){\n\t\t$path = preg_replace($this->__config['pb.regexp.path'], '', $path);\n\n\t\tif ($path) $file = $this->__config['pb.contents.dir'].$path;\n\t\telse $file = $this->__config['pb.contents.dir'].'index';\n\t\t\n\t\tif (is_dir($file)) $file .= '/index';\n\t\t$file .= $this->__config['pb.contents.extension'];\n\n\t\tif (file_exists($file)) return $file;\n\t\treturn null;\n\t}", "private function _getFullPath($path)\n {\n return $this->_directory . DIRECTORY_SEPARATOR . $path;\n }", "public function realPath($relativeFilename) { \n // Check for absolute path \n if (realpath($relativeFilename) == $relativeFilename) return $relativeFilename; \n \n // Otherwise, treat as relative path \n $paths = explode(PATH_SEPARATOR, get_include_path()); \n foreach ($paths as $path) { \n $path = str_replace('\\\\', '/', $path); \n $path = rtrim($path, '/') . '/'; \n $fullpath = realpath($path . $relativeFilename); \n if ($fullpath) return $fullpath; \n } \n \n return false; \n }", "public function getAbsolutePath()\r\n {\r\n return null === $this->getPath() ? null : $this->getUploadRootDir().'/'.$this->getPath();\r\n }", "public static function contents($path)\n {\n if (self::exists($path)) return trim(file_get_contents($path));\n\n throw new FileDoesNotExistException(sprintf('%s is not a valid file', $path));\n }", "public function absolutePath() : string {\n return empty($this->path) ? '' : $this->path;\n }", "public function readFile(Path $path): File;", "public function get(string $path): ?string\n {\n return $this->filesystem->read($this->relativeToRoot($path));\n }", "function truepath($path){\n $unipath=strlen($path)==0 || $path[0]!='/';\n // attempts to detect if path is relative in which case, add cwd\n if(strpos($path,':')===false && $unipath)\n $path=getcwd().DIRECTORY_SEPARATOR.$path;\n // resolve path parts (single dot, double dot and double delimiters)\n $path = str_replace(array('/', '\\\\'), DIRECTORY_SEPARATOR, $path);\n $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');\n $absolutes = array();\n foreach ($parts as $part) {\n if ('.' == $part) continue;\n if ('..' == $part) {\n array_pop($absolutes);\n } else {\n $absolutes[] = $part;\n }\n }\n $path=implode(DIRECTORY_SEPARATOR, $absolutes);\n // resolve any symlinks\n if(file_exists($path) && linkinfo($path)>0)$path=readlink($path);\n // put initial separator that could have been lost\n $path=!$unipath ? '/'.$path : $path;\n return $path;\n}", "private static function absolutize( $path, $base ) {\n\t\tif ( ! empty( $path ) && ! \\WP_CLI\\Utils\\is_path_absolute( $path ) ) {\n\t\t\t$path = $base . DIRECTORY_SEPARATOR . $path;\n\t\t}\n\t\treturn $path;\n\t}", "function absPath($value){\r\n\treturn realpath(dirname(__dir__, $value));\r\n}", "function absPath($value){\r\n\treturn realpath(dirname(__dir__, $value));\r\n}", "function getFullPath( $file, $relative = NULL, $check = true )\n\t{\n\t\t$inConfigDir\t=\tfalse;\n\t\t//\tis it a relative path\n\t\tif( strncmp( $file, '/', 1 ) != 0 )\n\t\t{\n\t\t\tif( $relative !== NULL )\n\t\t\t{\n\t\t\t\t$path\t\t=\tdirname( $relative ) . '/' . $file;\n\t\t\t}\n\t\t\t//\tno other file and no absolute path => the file should be located in config Dir\n\t\t\telse\n\t\t\t{\n\t\t\t\t$path\t\t\t=\t$file;\n\t\t\t\t$inConfigDir\t=\ttrue;\n\t\t\t}\n\t\t}\n\t\t//\tabsolute path\n\t\telse\n\t\t{\n\t\t\t$path\t\t\t=\tsubstr( $file, 1 );\n\t\t\t$inConfigDir\t=\ttrue;\n\t\t}\n\t\tif( $inConfigDir )\n\t\t{\n\t\t\tif( !empty( $this->configDir ) )\n\t\t\t\t$fullPath\t=\t$this->configDir.'/'. $path;\n\t\t\telse\n\t\t\t\t$fullPath\t=\t$path;\n\t\t}\n\t\telse\n\t\t\t$fullPath\t=\t$path;\n\n\t\tif( $check )\n\t\t{\n\t\t\t$realPath\t=\trealpath( $fullPath );\n\t\t\tif( empty( $realPath ) )\n\t\t\t{\n\t\t\t\treturn patErrorManager::raiseError(\n\t\t\t\t\t\t\t\t\t\t\tPATCONFIGURATION_ERROR_FILE_NOT_FOUND,\n\t\t\t\t\t\t\t\t\t\t\t'Could not resolve full path for path: \\''.$file.'\\' (relative to \\''.$relative.'\\') - please check the path syntax.'\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t}\n\n\t\t\tif( !is_readable( $realPath ) )\n\t\t\t{\n\t\t\t\treturn patErrorManager::raiseError(\n\t\t\t\t\t\t\t\t\t\t\tPATCONFIGURATION_ERROR_FILE_NOT_READABLE,\n\t\t\t\t\t\t\t\t\t\t\t$file.' is not readable'\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\treturn\t$realPath;\n\t\t}\n\n\t\treturn\t$fullPath;\n\t}", "public static function root($path = null, $find = \"composer.json\") {\n $path = is_null($path) ?: getcwd();\n while(!file_exists(\"$path/$find\")) {\n $path = \"$path/..\";\n }\n return realpath($path);\n }", "public static function getFileAbsolutePath($dir, $path)\n {\n return Str::replaceArray('/storage/'.$dir.'/', [''], $path);\n }", "public function absolutePath(string $path) : string\n {\n return StringHelper::path([$this->folder(), $path]);\n }", "public function absolutePath($path = '') {\n $abs_path = str_replace('system/', $path, BASEPATH);\n //Add a trailing slash if it doesn't exist.\n $abs_path = preg_replace(\"#([^/])/*$#\", \"\\\\1/\", $abs_path);\n $error = $this->db->_error_message();\n $error_number = $this->db->_error_number();\n if ($error) {\n $controller = $this->router->fetch_class();\n $method = $this->router->fetch_method();\n $error_details = array(\n 'error_name' => $error,\n 'error_number' => $error_number,\n 'model_name' => 'Common_Model',\n 'model_method_name' => 'absolutePath',\n 'controller_name' => $controller,\n 'controller_method_name' => $method\n );\n $this->common_model->errorSendEmail($error_details);\n redirect(base_url() . 'page-not-found'); //create this route\n }\n return $abs_path;\n }", "protected function resolvePath($path)\n {\n $rootPath = defined('ROOT_PATH') ? ROOT_PATH : getcwd();\n\n return mb_substr($path, 0, 1) == '/' ? $path : $rootPath.'/'.$path;\n }", "public function get($path, $lock = false)\n {\n if ($this->exists($path)) {\n return $this->files[$path];\n }\n\n throw new FileNotFoundException(\"File does not exist at path {$path}.\");\n }", "public function get(string $path, bool $lock = false): string\n {\n if ($this->isFile($path)) {\n return $lock ? $this->sharedGet($path) : file_get_contents($path);\n }\n\n throw new FileNotFoundException(\"File does not exist at path $path.\");\n }", "protected function relativePath($path)\n {\n return preg_replace('/'.preg_quote(str_replace(DIRECTORY_SEPARATOR, '/', $this['system']->path), '/').'/i', '', str_replace(DIRECTORY_SEPARATOR, '/', $path), 1).'/';\n }", "function resolve($path)\n {\n if (preg_match('{^\\.(/|\\\\\\\\)}', $path)) {\n $path = dirname($this->path) . DIRECTORY_SEPARATOR . $path;\n }\n\n # When resolving a directory either look for a file named\n # \"$dir/index.$ext\" or return the path to the directory (e.g.\n # for \"require_tree\").\n if (is_dir($path)) {\n $index = Path::join(array($path, \"index{$this->getExtension()}\"));\n\n if (file_exists($index)) {\n $path = $index;\n } else {\n $pathinfo = new PathInfo($path);\n\n if ($pathinfo->isAbsolute()) {\n return $path;\n }\n\n return $this->environment->loadPaths->find($path);\n }\n }\n\n $pathinfo = new PathInfo($path);\n\n if ($pathinfo->isAbsolute()) {\n return $path;\n }\n\n return $this->environment->loadPaths->find($path);\n }", "protected function get_path()\n {\n $path_found = false;\n $found_path = null;\n foreach ($this->get_paths() as $path) {\n if ($path_found) {\n continue;\n }\n $path = wp_normalize_path($path);\n if (file_exists($path)) {\n $path_found = true;\n $found_path = $path;\n }\n }\n\n return $found_path;\n\n }", "private function storageAbsolutePath(string $path) : string {\n return $this->absolutePathPrefix() . DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR);\n }", "public function getAbsoluteURL($path)\n\t{\n\t\treturn $path;\n\t}", "public static function readablePath($path, $pwd = null) {\n if ($pwd === null) {\n $pwd = getcwd();\n }\n\n foreach (array($pwd, self::resolvePath($pwd)) as $parent) {\n $parent = rtrim($parent, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n $len = strlen($parent);\n if (!strncmp($parent, $path, $len)) {\n $path = substr($path, $len);\n return $path;\n }\n }\n\n return $path;\n }", "protected function _checkTemporaryDirectory($path = null) {\n\t\tif (null === $path)\n\t\t\t$path = $this->getTmpFolder();\n\n\t\tif (!is_writeable(realpath($path)))\n\t\t\tthrow new App_Pdf_Adapter_Exception('Temporary directory not set or is not writeable');\n\n\t\treturn realpath($path);\n\t}", "public function getRequireOnce(string $path)\n {\n if ($this->isFile($path)) {\n return require_once $path;\n }\n throw new Exception(\"File does not exist at path {$path}\");\n }", "function getRealpath( $_path )\n{\n $__path = $_path;\n if ( isRelative( $_path ) ) {\n $__curdir = unifyPath( realpath( \".\" ) . _PL_OS_SEP );\n $__path = $__curdir . $__path;\n }\n $__startPoint = \"\";\n if ( checkCurrentOS( \"Win\" ) ) {\n list( $__startPoint, $__path ) = explode( \":\", $__path, 2 );\n $__startPoint .= \":\";\n }\n # From now processing is the same for WIndows and Unix, and hopefully for others.\n $__realparts = array( );\n $__parts = explode( _PL_OS_SEP, $__path );\n for ( $i = 0; $i < count( $__parts ); $i++ ) {\n if ( strlen( $__parts[ $i ] ) == 0 || $__parts[ $i ] == \".\" ) {\n continue;\n }\n if ( $__parts[ $i ] == \"..\" ) {\n if ( count( $__realparts ) > 0 ) {\n array_pop( $__realparts );\n }\n }\n else {\n array_push( $__realparts, $__parts[ $i ] );\n }\n }\n return $__startPoint . _PL_OS_SEP . implode( _PL_OS_SEP, $__realparts );\n}", "public function getAbsolutePath();", "public function getRealPath()\n\t{\n\t\t// Unfortunately we'd need to store the fake directory hierarchy\n\t\t// in the database, too...\n\t\tthrow new DatabaseFileException('Obtaining the real path is not supported for database files.');\n\t}", "public function getAbsolutePath()\n {\n return null === $this->avatar ? null : $this->getUploadRootDir().'/'.$this->avatar;\n }", "protected function getFilePath($path, $file)\n {\n if (!is_string($file)) {\n $file = 'env.yaml';\n }\n $filePath = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file;\n\n return $filePath;\n }", "public static function relativePath( $path )\n {\n if( !empty( $path ) && is_string( $path ) )\n {\n $path = Sanitize::toPath( $path );\n $root = Server::getScriptPath();\n $levels = array(\n $root,\n dirname( $root ),\n dirname( dirname( $root ) ),\n dirname( dirname( dirname( $root ) ) )\n );\n foreach( $levels as $level )\n {\n if( empty( $level ) || $levels === \"/\" ) continue;\n $path = str_replace( $level, \"\", $path );\n }\n }\n return $path;\n }", "function __compatFile($path) {\n\t\t$path = array();\n\n\t\tforeach (func_get_args() as $arg) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tif (isset($arg['dirname'])) {\n\t\t\t\t\t$path[] = rtrim($arg['dirname'], '/\\\\');\n\t\t\t\t}\n\t\t\t\tif (isset($arg['basename'])) {\n\t\t\t\t\t$path[] = $arg['basename'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$path[] = rtrim($arg, '/\\\\');\n\t\t\t}\n\t\t}\n\t\t$path = implode(DS, $path);\n\t\t$path = str_replace(array('/', '\\\\'), DS, $path);\n\n\t\tif (isset($this->__cached[$path])) {\n\t\t\treturn $this->__cached[$path];\n\t\t}\n\t\tif (Folder::isAbsolute($path)) {\n\t\t\treturn file_exists($path) ? $path : false;\n\t\t}\n\n\t\t$parts = explode(DS, $path);\n\n\t\tif (in_array($parts[0], $this->_versions)) {\n\t\t\tarray_unshift($parts, basename(key($this->_map['filter'])));\n\t\t}\n\t\tif (!in_array($parts[0], array_keys($this->_directories))) {\n\t\t\tarray_unshift($parts, basename(key($this->_map['static'])));\n\t\t}\n\t\tif (in_array($parts[1], $this->_versions)\n\t\t&& !in_array($parts[2], array_keys($this->_directories))) {\n\t\t\tarray_splice($parts, 2, 0, basename(key($this->_map['static'])));\n\t\t}\n\n\t\t$path = implode(DS, $parts);\n\n\t\tif (isset($this->__cached[$path])) {\n\t\t\treturn $this->__cached[$path];\n\t\t}\n\n\t\t$file = $this->_directories[array_shift($parts)] . implode(DS, $parts);\n\n\t\tif (file_exists($file)) {\n\t\t\treturn $this->__cached[$path] = $file;\n\t\t}\n\n\t\t$short = current(array_intersect(Media::short(), $parts));\n\n\t\tif (!$short) {\n\t\t\t$message = \"MediaHelper::file - \";\n\t\t\t$message .= \"You've provided a partial path without a media directory (e.g. img) \";\n\t\t\t$message .= \"which is required to resolve the path.\";\n\t\t\ttrigger_error($message, E_USER_NOTICE);\n\t\t\treturn false;\n\t\t}\n\n\t\t$extension = null;\n\t\textract(pathinfo($file), EXTR_OVERWRITE);\n\n\t\tif (!isset($filename)) { /* PHP < 5.2.0 */\n\t\t\t$filename = substr($basename, 0, isset($extension) ? - (strlen($extension) + 1) : 0);\n\t\t}\n\n\t\tfor ($i = 0; $i < 2; $i++) {\n\t\t\t$file = $i ? $dirname . DS . $filename : $dirname . DS . $basename;\n\n\t\t\tforeach ($this->_extensions[$short] as $extension) {\n\t\t\t\t$try = $file . '.' . $extension;\n\t\t\t\tif (file_exists($try)) {\n\t\t\t\t\treturn $this->__cached[$path] = $try;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.8257498", "0.77913916", "0.76792306", "0.76521474", "0.75283355", "0.74968207", "0.73284245", "0.73284245", "0.72205377", "0.72205377", "0.7157704", "0.7095711", "0.6845225", "0.6596507", "0.6547274", "0.6538593", "0.65278405", "0.6511357", "0.6511357", "0.64979994", "0.6480933", "0.63587666", "0.6317075", "0.62677836", "0.6253529", "0.6220488", "0.6202793", "0.6175058", "0.6153058", "0.6005926", "0.59978896", "0.598445", "0.59690094", "0.5958204", "0.59339714", "0.5929876", "0.5895434", "0.5885221", "0.588072", "0.58638746", "0.58620316", "0.58213395", "0.57759476", "0.5761724", "0.57496023", "0.57454073", "0.57175", "0.57141834", "0.5674414", "0.5659254", "0.56551814", "0.5633251", "0.562875", "0.5608327", "0.5597557", "0.55740625", "0.5560421", "0.5557851", "0.55523574", "0.555093", "0.55502075", "0.55429155", "0.55355537", "0.5529039", "0.55255884", "0.55247885", "0.5518363", "0.54853106", "0.54764044", "0.5470632", "0.54569155", "0.54525226", "0.5441575", "0.54385936", "0.5424857", "0.5417356", "0.5417356", "0.5400855", "0.5397421", "0.53951335", "0.5377376", "0.5369821", "0.53644806", "0.5363432", "0.53625864", "0.53616214", "0.5361212", "0.53533846", "0.53335804", "0.5329281", "0.5323825", "0.5321311", "0.5319517", "0.5314789", "0.531311", "0.5291465", "0.52850944", "0.52740544", "0.5269318", "0.52594894" ]
0.7496682
6
Returns the realpath of the file associated with the given operation entry. Throws an exception if the operation doesn't have a file associated with it (i.e. remove operation).
private function getEntryRealPathByOperation(string $contextId, array $operation, array $options = []): string { if ('remove' === $operation['type']) { $id = $operation['id']; $this->error("Cannot get realpath from a remove operation, with contextId=\"$contextId\" and id=\"$id\"."); } return $this->doGetEntryRealPathByOperation($contextId, $operation, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function realpath($file);", "protected function doGetEntryRealPathByOperation(string $contextId, array $operation, array $options = [])\n {\n return $this->getContextDir($contextId) . \"/files/\" . $operation['path'];\n }", "public function getAbsolutePathOfRelativeReferencedFileOrPathResolvesFileCorrectlyDataProvider() {}", "function getAtomEntryFilePath() {\n\t\treturn $this->_outPath .'/'. $this->_fileDir .'/'. $this->_atomEntryFileName;\n\t}", "public function path(): string\n {\n return realpath($this->file);\n }", "protected function getFile($urn) {\n\t\t$resolved = $this->systemUtil->resolvePath($urn, array('onError'=>'return'));\n\t\tif( $resolved !== null and file_exists($resolved) ) return $resolved;\n\t\t\n\t\t$blob = $this->blobRepository->getBlob($urn);\n\t\tif( $blob === null ) {\n\t\t\tthrow new Exception(\"'$urn' could not be found\");\n\t\t} else if( $blob instanceof Nife_FileBlob ) {\n\t\t\treturn $blob->getFile();\n\t\t} else {\n\t\t\t$file = $this->primaryBlobRepository->newTempFile();\n\t\t\tfile_put_contents($file, (string)$blob);\n\t\t\treturn $file;\n\t\t}\n\t}", "public function getAbsolutePath()\n {\n return null === $this->photoId\n ? null\n : $this->getUploadRootDir().'/'.$this->photoId;\n }", "public function getFileAbsolutePath($file);", "function tdc_get_filepath($filenode){\n return $filenode->path[0];\n}", "public function get_path()\n\t\t{\n\t\t\tif ($this->path) {\n\t\t\t\treturn $this->path.'/'.$this->get_full_name();\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\t$hash = $this->hash();\n\t\t\t\t} catch(\\System\\Error\\File $e) {\n\t\t\t\t\t$hash = null;\n\t\t\t\t}\n\n\t\t\t\tif ($hash) {\n\t\t\t\t\treturn $this->get_path_hashed();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "public function getAbsolutePath()\n {\n return null === $this->image\n ? null\n : $this->getUploadRootDir() . '/' . $this->image;\n }", "function realpath($path)\n{\n return $path;\n}", "public function getFile()\n {\n return $this->getAbsolutePath($this->avatarName);\n }", "public function filePath($file) {\r\n $file = $this->fileLoad($file);\r\n return drupal_realpath($file->uri);\r\n }", "public function getCaminhoReal()\n {\n return $this->arquivo->getRealPath();\n }", "public function getAbsolutePath()\n {\n return null === $this->avatar ? null : $this->getUploadRootDir().'/'.$this->avatar;\n }", "protected function handleOperation($op) {\n $output = '';\n $op_type = $this->checkAndGet($op, 'operation');\n switch ($op_type) {\n case 'filemodify':\n $mode = $this->convertMode($this->checkAndGet($op, 'mode'));\n $output .= sprintf(\"M %s inline %s\\n\",\n $mode,\n $this->checkAndGet($op, 'path'));\n $output .= $this->handleData($this->checkAndGet($op, 'data'));\n break;\n\n case 'filedelete':\n $output .= sprintf(\"D %s\\n\", $this->checkAndGet($op, 'path'));\n break;\n\n case 'filecopy':\n $output .= sprintf(\"C %s %s\\n\",\n $this->checkAndGet($op, 'src'),\n $this->checkAndGet($op, 'dst'));\n break;\n\n case 'filerename':\n $output .= sprintf(\"R %s %s\\n\",\n $this->checkAndGet($op, 'src'),\n $this->checkAndGet($op, 'dst'));\n break;\n case 'filedeleteall':\n $output .= \"deleteall\\n\";\n break;\n default:\n throw new Exception(\"Unknown operation type '$op_type'.\");\n }\n\n return $output;\n }", "public function getFile_path() {\n return $this->_file_path ? $this->_file_path : null;\n }", "protected function getFullPathToUploadFile()\n {\n return $this->fullPathToUploadFile;\n }", "public function getAbsolutePath()\r\n {\r\n return null === $this->getPath() ? null : $this->getUploadRootDir().'/'.$this->getPath();\r\n }", "public function getAbsolutePath()\n {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public function getAbsolutePath() {\n return null === $this->path ? null : $this->getUploadRootDir() . '/' . $this->path;\n }", "public function realpath($path, $relative = FileSystem::NONE);", "function phpbb_realpath($path)\n\t{\n\t\treturn phpbb_own_realpath($path);\n\t}", "function phpbb_realpath($path)\n\t{\n\t\treturn phpbb_own_realpath($path);\n\t}", "public function getFullPath(): string;", "public function getFileExec()\n {\n return $this->readOneof(6);\n }", "public function getEntryPath($reference);", "public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }", "protected function getResource()\n {\n if (is_resource($this->path)) {\n return $this->path;\n }\n\n if (!$this->isRemoteFile() && !is_readable($this->path)) {\n throw new TelegramSDKException('Failed to create InputFile entity. Unable to read resource: '.$this->path.'.');\n }\n\n return Psr7\\Utils::tryFopen($this->path, 'rb');\n }", "public function getAbsolutePath()\n\t{\n\t\treturn ($this->filename === null) ? null : ($this->getUploadRootDir() . '/' . $this->filename);\n\t}", "public function getImageFile()\n {\n return isset($this->filetask) ? $this->filetask : null;\n }", "public function getFile() {\n return $this->getFiles()->getFirst();\n }", "public function getAbsolutePath() {}", "public function getAbsolutePath() {}", "public function getOriginalFileResource() {\n\t\treturn $this->originalFileResource;\n\t}", "function phpbb_realpath($path)\n\t{\n\t\t$realpath = realpath($path);\n\n\t\t// Strangely there are provider not disabling realpath but returning strange values. :o\n\t\t// We at least try to cope with them.\n\t\tif ($realpath === $path || $realpath === false)\n\t\t{\n\t\t\treturn phpbb_own_realpath($path);\n\t\t}\n\n\t\t// Check for DIRECTORY_SEPARATOR at the end (and remove it!)\n\t\tif (substr($realpath, -1) == DIRECTORY_SEPARATOR)\n\t\t{\n\t\t\t$realpath = substr($realpath, 0, -1);\n\t\t}\n\n\t\treturn $realpath;\n\t}", "function phpbb_realpath($path)\n\t{\n\t\t$realpath = realpath($path);\n\n\t\t// Strangely there are provider not disabling realpath but returning strange values. :o\n\t\t// We at least try to cope with them.\n\t\tif ($realpath === $path || $realpath === false)\n\t\t{\n\t\t\treturn phpbb_own_realpath($path);\n\t\t}\n\n\t\t// Check for DIRECTORY_SEPARATOR at the end (and remove it!)\n\t\tif (substr($realpath, -1) == DIRECTORY_SEPARATOR)\n\t\t{\n\t\t\t$realpath = substr($realpath, 0, -1);\n\t\t}\n\n\t\treturn $realpath;\n\t}", "public function getImageFile()\n {\n $link = $this->link;\n return empty( $this->owner->$link ) ? null : \\Yii::getAlias(\n '@storage/' . $this->directory . '/' . $this->owner->$link\n );\n }", "public function getAbsolutePath($key = '')\n {\n if ($this->supportsAbsolutePaths()) {\n return $this->getDriver()->getAbsolutePath($key);\n }\n throw new StorageException(StorageException::DRIVER_DOES_NOT_SUPPORT_ABSOLUTE_PATHS, [\n get_class($this->getDriver()\n )\n ]\n );\n }", "private function _getFullPathToCommand() {\n\t\treturn realpath($this->getCommandPath() . DIRECTORY_SEPARATOR . $this->getCommand());\n\t}", "public function hasConvert($operation)\n {\n $row = $this->where('operation', $operation)->where('original_id', $this->getKey())->first();\n if($row && $row->getFile())\n return $row;\n return false;\n }", "private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}", "private function getRealPath(string $path): string\n {\n if (false === ($ret = realpath($path))) {\n $this->error(\"File does not exist: \\\"$path\\\".\");\n }\n return $ret;\n }", "function getAbsolutePath() ;", "private function getPath(string $resourceShortName, array $operation, string $operationType): string\n {\n $path = $this->operationPathResolver->resolveOperationPath($resourceShortName, $operation, $operationType);\n if ('.{_format}' === substr($path, -10)) {\n $path = substr($path, 0, -10);\n }\n\n return $path;\n }", "public static function getFullPath($fileResource)\n {\n $extensionManager = OntoWiki::getInstance()->extensionManager;\n $privateConfig = $extensionManager->getPrivateConfig('files');\n $path = $privateConfig->path;\n\n return _OWROOT . $path . DIRECTORY_SEPARATOR . md5($fileResource);\n }", "public function getFullPath();", "public function getFilePath() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filepath\", NULL);\n\t}", "public function getFilePath()\n {\n if (array_key_exists(\"filePath\", $this->_propDict)) {\n return $this->_propDict[\"filePath\"];\n } else {\n return null;\n }\n }", "final function getFile();", "public function getAbsolutePath();", "public static function fresnsFileOriginalUrlById(int|string $fileIdOrFid): ?string\n {\n if (StrHelper::isPureInt($fileIdOrFid)) {\n $file = File::whereId($fileIdOrFid)->first();\n } else {\n $file = File::whereFid($fileIdOrFid)->first();\n }\n\n if (empty($file)) {\n return null;\n }\n\n $storageConfig = FileHelper::fresnsFileStorageConfigByType($file->type);\n\n if ($storageConfig['antiLinkStatus']) {\n $fresnsResponse = \\FresnsCmdWord::plugin($storageConfig['service'])->getAntiLinkFileOriginalUrl([\n 'type' => $file->type,\n 'fileIdOrFid' => strval($file->id),\n ]);\n\n return $fresnsResponse->getData('originalUrl') ?? null;\n }\n\n return $file->getFileOriginalUrl();\n }", "private function get_file_link(): string {\n $fs = get_file_storage();\n\n // Get all the files.\n $files = $fs->get_area_files(\n $this->context->id,\n 'mod_onlyoffice',\n onlyoffice::FILEAREA_INITIAL,\n false,\n '',\n false,\n 0,\n 0,\n 1\n );\n\n // Try get the first file.\n if (!$file = reset($files)) {\n return get_string('missingfile', 'mod_onlyoffice'); // File doesn't exist.\n }\n\n // Build the URL.\n $url = moodle_url::make_pluginfile_url(\n $file->get_contextid(),\n $file->get_component(),\n $file->get_filearea(),\n $file->get_itemid(),\n $file->get_filepath(),\n $file->get_filename(),\n true\n );\n\n return html_writer::link($url, $file->get_filename());\n }", "public function getFilename()\n {\n $file = basename($this->srcPath);\n\n $ops = str_replace(array('&', ':', ';', '?', '.', ','), '-', $this->operations);\n return trim($ops . '-' . $file, './');\n }", "function realPath($path, $relative_to = NULL, $resolve_symlink = TRUE);", "public function getOperationsFile($path) {\n\n $operations = array();\n if (isset($this->filesOperations[$path])) {\n foreach ($this->filesOperations[$path] as $operationPath) {\n $operations = array_merge($operations, $this->getOperation($operationPath));\n }\n }\n\n return $operations;\n }", "private function getThumbFilepath() {\n\t\t$filename = $this->getThumbFilename();\n\t\t$filepath = $this->pathCache . $filename;\n\t\treturn($filepath);\n\t}", "public function absPath(string $path): string;", "protected function get_file() {\r\n\t\t$file = '';\r\n\r\n\t\tif ( @file_exists( $this->file ) ) {\r\n\t\t\tif ( ! is_writeable( $this->file ) ) {\r\n\t\t\t\t$this->is_writable = false;\r\n\t\t\t}\r\n\r\n\t\t\t$file = @file_get_contents( $this->file );\r\n\t\t} else {\r\n\t\t\t@file_put_contents( $this->file, '' );\r\n\t\t\t@chmod( $this->file, 0664 );\r\n\t\t}\r\n\r\n\t\treturn $file;\r\n\t}", "function cot_pfs_filepath($id)\n{\n\tglobal $db, $db_pfs_folders, $db_pfs, $cfg;\n\n\t$sql = $db->query(\"SELECT p.pfs_file AS file, f.pff_path AS path FROM $db_pfs AS p LEFT JOIN $db_pfs_folders AS f ON p.pfs_folderid=f.pff_id WHERE p.pfs_id=\".(int)$id.\" LIMIT 1\");\n\tif($row = $sql->fetch())\n\t{\n\t\treturn ($cfg['pfs']['pfsuserfolder'] && $row['path']!='') ? $row['path'].'/'.$row['file'] : $row['file'];\n\t}\n\telse\n\t{\n\t\treturn '';\n\t}\n}", "public function getAbsolutePath()\n {\n return $this->getUploadRootDir().'/'.$this->name;\n }", "public function getRealPath()\n\t{\n\t\t// Unfortunately we'd need to store the fake directory hierarchy\n\t\t// in the database, too...\n\t\tthrow new DatabaseFileException('Obtaining the real path is not supported for database files.');\n\t}", "public function getFullpath()\n\t{\n\t\treturn $this->filesystem->getAdapter()->root . $this->path;\n\t}", "static public function getFilePath($file, $base_path = null)\n {\n // If this is already a correct path, return it\n if (@is_file($file) && @is_readable($file)) {\n return realpath($file);\n }\n\n // Determine the application path\n $app = JRequest::getInt('app', JFactory::getApplication()->getClientId());\n if ($app == 1) {\n $app_path = JPATH_ADMINISTRATOR;\n } else {\n $app_path = JPATH_SITE;\n }\n\n // Make sure the basepath is not a file\n if (@is_file($base_path)) {\n $base_path = dirname($base_path);\n }\n\n // Determine the basepath\n if (empty($base_path)) {\n if (substr($file, 0, 1) == '/') {\n $base_path = JPATH_SITE;\n } else {\n $base_path = $app_path;\n }\n }\n\n // Append the base_path\n if (strstr($file, $base_path) == false && !empty($base_path)) {\n $file = $base_path.'/'.$file;\n }\n\n // Detect the right application-path\n if (JFactory::getApplication()->isAdmin()) {\n if (strstr($file, JPATH_ADMINISTRATOR) == false && @is_file(JPATH_ADMINISTRATOR.'/'.$file)) {\n $file = JPATH_ADMINISTRATOR.'/'.$file;\n } else if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n } else {\n if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n }\n\n // If this is not a file, return empty\n if (@is_file($file) == false || @is_readable($file) == false) {\n return null;\n }\n\n // Return the file\n return realpath($file);\n }", "public function getFile(): string\n {\n return $this->filePath;\n }", "protected function getUploadedResource()\n {\n if ($this->getMappingResultsForProperty()->hasErrors()) {\n return null;\n }\n if (is_callable([$this, 'getValueAttribute'])) {\n $resource = $this->getValueAttribute();\n } else {\n // @deprecated since 7.6 will be removed once 6.2 support is removed\n $resource = $this->getValue(false);\n }\n if ($resource instanceof FileReference) {\n return $resource;\n }\n return $this->propertyMapper->convert($resource, FileReference::class);\n }", "public function realpath($path): string\n {\n return $this->_realpath($this->_getPath($path));\n }", "public function file()\n {\n return rtrim($this->destinationPath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$this->fileName;\n }", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "protected function fullPath()\n {\n\n if ( $this->is_external )\n {\n if ( $this->path )\n {\n $ph = '/' . $this->path;\n } else {\n $ph = null;\n }\n\n return $this->external_url . $ph;\n } else {\n\n // switch the disk\n switch ( $this->disk )\n {\n case 'local':\n\n return Config::get('app.url') . '/' . $this->path;\n break;\n\n case 's3':\n return Config::get('photos.storage_path') . '/' . $this->path;\n break;\n }\n }\n }", "private function findOperation(RequestInterface $request): OperationAddress\n {\n $pathFinder = new PathFinder(\n $this->adapted->getSchema(),\n $request->getUri(),\n $request->getMethod()\n );\n\n $operations = $pathFinder->search();\n if (\\count($operations) === 0) {\n throw new OperationNotFoundException($request);\n }\n\n foreach ($operations as $operation) {\n //If we got an exact path match, we use the current Operation\n if ($operation->path() === $request->getUri()->getPath()) {\n return $operation;\n }\n }\n\n //If we haven't an exact match, use the first in the list\n return $operations[0];\n }", "private function buildFilePath(): string\n\t{\n\t\tif ($this->taskName === null) {\n\t\t\tthrow new EmptyTaskNameException('Task name was not set.');\n\t\t}\n\n\t\treturn SafeStream::PROTOCOL . '://' . $this->directory . '/' . sha1($this->taskName);\n\t}", "public function getCleanFile()\n {\n return $this->_getCleanProperty('file');\n }", "private function realpath(string $path): string\n {\n $last_char = substr($path, -1);\n $path = realpath($path);\n if (DIRECTORY_SEPARATOR === $last_char) {\n $path .= DIRECTORY_SEPARATOR;\n }\n return $path;\n }", "abstract public function getRemoteFile($path, $ref = 'master');", "public function resolvePath(string $element, array $token): ?string;", "protected function get_file() {\n\n\t\t$file = '';\n\n\t\tif ( @file_exists( $this->file ) ) {\n\n\t\t\tif ( ! is_writeable( $this->file ) ) {\n\t\t\t\t$this->is_writable = false;\n\t\t\t}\n\n\t\t\t$file = @file_get_contents( $this->file );\n\n\t\t} else {\n\n\t\t\t@file_put_contents( $this->file, '' );\n\t\t\t@chmod( $this->file, 0664 );\n\n\t\t}\n\n\t\treturn $file;\n\t}", "function privExtractFileUsingTempFile(&$p_entry, &$p_options)\n {\n }", "public function getFile(): FileInterface\n {\n $file = parent::getFile() ?? $this->getParent()->getFile();\n\n Assert::notNull($file);\n\n return $file;\n }", "function getPath(): string;", "public function getFilepath() : string\n {\n if (is_null($this->filePath)) {\n throw new \\Error(__(\"Not valid value for filePath.\"));\n }\n\n return (string)$this->getConfigValue($this->filePath);\n }", "function getFile() {\n\t\treturn ArtifactStorage::instance()->get($this->getID());\n\t}", "protected function _getRemoteStoredPath() {\r\n $value = null;\r\n\r\n if (is_uploaded_file($_FILES[$this->_name]['tmp_name']) || file_exists($this->_tmpFile)) {\r\n\r\n $isStorageModEnabled = Engine_Api::_()->zulu()->isModEnabled('storage');\r\n\r\n if ($isStorageModEnabled &&\r\n ($service = Engine_Api::_()->getDbtable('services', 'storage')->getService()) instanceof Storage_Service_S3) {\r\n\r\n $path = $this->_generatePath();\r\n\r\n $value = $path;\r\n }\r\n } else {\r\n if (($item = $this->_item) instanceof Core_Model_Item_Abstract) {\r\n $values = Engine_Api::_()->fields()->getFieldsValues($item);\r\n $field_id = $this->{'data-field-id'};\r\n\r\n $valueRow = $values->getRowMatching(array(\r\n 'field_id' => $field_id,\r\n 'item_id' => $item->getIdentity(),\r\n 'index' => 0\r\n ));\r\n\r\n if ($valueRow) {\r\n $value = $valueRow->value;\r\n }\r\n }\r\n }\r\n\r\n return $value;\r\n }", "public function getCanonicalDeviceFile()\n {\n return $this->getDeviceFile();\n }", "public function get_file() {\n\t\treturn $this->file;\n\t}", "public function realpath($path)\n\t{\n\t\treturn realpath($path);\n\t}", "public static function fullPath ($relPath) {\n\t\treturn (\\realpath($relPath) ?: null);\n\t}", "public function getFilename()\n {\n return $this->target->getUri();\n }", "public function getFile()\n {\n return $this->readOneof(1);\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getOperation()\n {\n return $this->operation;\n }", "public function getPathFile($id){\n $sql = \"SELECT pathFile FROM fanart WHERE id=\".intval($id).\";\";\n $res = mysqli_query($this->link, $sql);\n $path = mysqli_fetch_all($res)[0][0];\n return $path;\n }", "public function getEditUrl()\r\n {\r\n if (empty(parent::getEditUrl())) {\r\n return \"\";\r\n }\r\n\r\n if ($this->contentObject instanceof File) {\r\n return $this->contentObject->content->container->createUrl($this->editRoute, ['id' => $this->contentObject->getItemId(), 'fromWall' => true]);\r\n }\r\n\r\n return \"\";\r\n }" ]
[ "0.596546", "0.57632303", "0.5605034", "0.5433832", "0.53794706", "0.53050315", "0.52940404", "0.5255092", "0.5161836", "0.5150619", "0.5124858", "0.5083605", "0.5063754", "0.5005847", "0.5000892", "0.49723014", "0.4949741", "0.4938642", "0.49377012", "0.4909026", "0.490807", "0.49042958", "0.48710737", "0.4864927", "0.4864927", "0.48607424", "0.48371354", "0.48297176", "0.48220733", "0.4816916", "0.4810113", "0.48051116", "0.4800879", "0.4767371", "0.4767371", "0.47571096", "0.4756574", "0.4756574", "0.4736892", "0.47111756", "0.47082645", "0.4704035", "0.47017956", "0.4698739", "0.46906966", "0.4688283", "0.4679144", "0.467872", "0.46770328", "0.46701404", "0.4651112", "0.46481597", "0.46432695", "0.46431962", "0.46408677", "0.46311882", "0.46243253", "0.46172896", "0.46138877", "0.46131185", "0.4609285", "0.46060228", "0.45990744", "0.4594905", "0.45926982", "0.4590295", "0.45895103", "0.45725864", "0.4560746", "0.45467708", "0.45467708", "0.45467708", "0.45467708", "0.45466584", "0.45376047", "0.45349917", "0.45295268", "0.45218477", "0.4518179", "0.45180357", "0.45172995", "0.45129082", "0.45121962", "0.45107606", "0.45102373", "0.45002297", "0.44846267", "0.44845307", "0.44838387", "0.44805184", "0.44784814", "0.4476368", "0.44754672", "0.44733667", "0.44733667", "0.44733667", "0.44733667", "0.44733667", "0.44721705", "0.447156" ]
0.68746996
0
Run the database seeds.
public function run() { $clientes = Cliente::all(); foreach($clientes as $cliente){ $peso=$cliente->peso_inicial; $fecha=$cliente->created_at; $limit=52; while($limit){ $consulta = new Consulta(); $consulta->cliente_id = $cliente->id; $consulta->fecha = $fecha->addWeek(); $consulta->start = $consulta->fecha->timestamp*1000; $consulta->variacion = (rand(-30,20)/10); $peso += $consulta->variacion; $consulta->peso = $peso; $consulta->asistio = 1; $consulta->save(); $limit--; } echo $cliente->full_name."\n"; } /* $limit=5; $cliente=Cliente::find(2); $peso=$cliente->peso_inicial; $consultas = Consulta::where('asistio',0)->orderby('fecha')->get(); foreach($consultas as $consulta){ if($limit<5*7){ $limit++; }else{ $consulta->cliente_id = $cliente->id; $consulta->variacion = (rand(-30,20)/10); $peso += $consulta->variacion; $consulta->peso = $peso; $consulta->asistio = 1; $consulta->save(); $limit=1; } } $cliente=Cliente::find(7); for($i=0;$i<100;$i++){ $consulta = Consulta::where('asistio',0)->orderby('fecha')->first(); $consulta->cliente_id = $cliente->id; $consulta->variacion = (rand(-30,20)/10); $peso += $consulta->variacion; $consulta->peso = $peso; $consulta->asistio = 1; $consulta->save(); } /* foreach($clientes as $cliente){ $consulta0 = Consulta::where('asistio',0)->orderByDesc('fecha')->first(); $consulta0->cliente_id = $cliente->id; $consulta0->peso = $cliente->peso_saludable; $consulta0->comentario = 'consulta final'; $consulta0->asistio = 1; $consulta0->save(); } $dias=range(1,28); $horas = range(10,14)+range(16,20); $minutos=range(0,59,10); foreach ($meses as $mes){ foreach ($dias as $dia){ foreach ($horas as $hora){ foreach ($minutos as $min){ \DB::table('consultas')->insert([ 'fecha' => new DateTime("$ano-$mes-$dia $hora:$min:0"), 'created_at' => NOW(), 'updated_at' => NOW(), ]); } } } } * $consultas = Consulta::where('asistio',0)->get(); foreach($consultas as $consulta){ $consulta ->delete(); } */ }
{ "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
Create User Profile for newly registered User with given columns With User Model.
public function create(array $columns, $type, UserModelInterface $user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function created(User $user)\n {\n Userprofile::create([\n 'users_id' => $user->id,\n 'address' => 'Your Address',\n 'phone_number' => 'Your Number',\n 'city' => 'Your City',\n 'country' => 'Your Country',\n 'body' => 'Something About Yourself',\n 'user_img' => 'Your image here'\n ]);\n }", "public function actionCreate()\n {\n $model = new User();\n\n $profile = new UserProfile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $userProfile = Yii::$app->request->post('UserProfile');\n $profile->user_id = $model->id;\n $profile->phone = $userProfile['phone'];\n $profile->firstname = $userProfile['firstname'];\n $profile->lastname = $userProfile['lastname'];\n $profile->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'profile' => $profile,\n ]);\n }", "public function createUser(){\n \n $password = DbrLib::rand_string(8);\n \n /**\n * create username \n */\n $firstName = strtolower(self::translitStringToAscii($this->pprs_first_name));\n $secondName = strtolower(self::translitStringToAscii($this->pprs_second_name));\n $username = $firstName . substr($secondName, 0, 1);\n $i = 1;\n while(User::model()->findByAttributes(['username'=>$username])){\n $i ++;\n if($i> strlen($secondName)){\n $username = $firstName . DbrLib::rand_string(2);\n }\n $username = $firstName . substr($secondName, 0, $i); \n }\n \n /**\n * get email from person contacts\n */\n $contacts = $this->ppcnPersonContacts;\n $email = '';\n foreach($contacts as $contact){\n if($contact->ppcn_pcnt_type == PcntContactType::TYPE_EMAIL ){\n $email = trim($contact->ppcn_value);\n }\n }\n \n /**\n * create user record\n */\n $user = new User();\n $user->username = $username;\n $user->password = $password;\n $user->email = $email;\n $user->status = User::STATUS_ACTIVE;\n \n if(!$user->validate()){\n return CHtml::errorSummary($user);\n }\n \n $user->save();\n \n /**\n * create profile record\n */\n $profile=new Profile;\n $profile->user_id=$user->id;\n $profile->first_name = $this->pprs_first_name;\n $profile->last_name = $this->pprs_second_name;\n $profile->sys_ccmp_id = Yii::app()->sysCompany->getActiveCompany();\n $profile->person_id=$this->primaryKey;\n\t\t$profile->save(); \n \n return true;\n \n \n }", "protected function create(array $data)\n {\n\n /** @var User $user */\n $user = User::query()->make([\n 'username' => $data['username'],\n 'first_name' => $data['first_name'],\n 'father_name' => $data['father_name'],\n 'grandfather_name' => $data['grandfather_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'official_id' => $data['official_id'],\n 'mobile' => $data['mobile'],\n ]);\n\n $this->storeAvatar($user, $data);\n\n $user->save();\n\n $data['preferred_times'] = implode(',', $data['preferred_times']);\n $data['languages'] = implode(',', $data['languages']);\n // skills filed is optional, we have to check if it exists in the $data array.\n $data['skills'] = isset($data['skills']) ? implode(',', $data['skills']) : null;\n\n $profile = Profile::query()->make($data);\n $user->profile()->save($profile);\n\n return $user;\n }", "public static function create($attributes = [], $exists = false) {\n $user = User::create(array_merge($attributes, ['type' => 'admin']));\n return $user->profile;\n }", "private function _createNewUser($params)\n {\n $table = new User();\n $user = $table->fetchNew();\n\n $user->lang = Globals::getTranslate()->getLocale();\n $user->activationKey = $this->_generateActivationKey();\n\n $user->{User::COLUMN_USERNAME} = $params[User::COLUMN_USERNAME];\n $user->{User::COLUMN_EMAIL} = $params[User::COLUMN_EMAIL];\n $user->{User::COLUMN_STATUS} = User::STATUS_PENDING;\n\n //if($params[User::INPUT_AUTH_METHOD] == User::LOGIN_AUTHMETHOD_PASSWORD){\n $user->{User::COLUMN_PASSWORD} = md5($params[User::COLUMN_PASSWORD]);\n //} else {\n //$user->{User::COLUMN_OPENID_IDENTITY} = $params[User::INPUT_OPENID_IDENTITY];\n //}\n\n $user->save();\n return $user;\n }", "public function findOrCreateUser($user, $provider)\n {\n\n $userCreated = User::with('user')->where('email', $user->email)->first();\n $fileContents = file_get_contents($user->getAvatar());\n\n $uploadedFolder = public_path() . '/profile_image';\n\n File::put($uploadedFolder . '/profile_image' . $user->getId() . \".jpg\", $fileContents);\n\n $picture ='/profile_image' . $user->getId() . \".jpg\";\n\n if($userCreated)\n {\n if($userCreated->activated != 2)\n {\n $userCreated->provider = $provider;\n $userCreated->provider_id = $user->id;\n\n $userCreated->image=$picture;\n\n if($userCreated->type === 1)\n {\n $userCreated->activation_code = '';\n $userCreated->activated = 1;\n }\n \n if(is_null($userCreated->name))\n {\n $userCreated->name = $user->name;\n }\n\n $appUser = AppUser::where('email' , $user->email)->first();\n\n if($appUser->account_activated === 0 && $appUser->account_type === 1)\n {\n $freePosts = FreePostModel::where('id', 1)->first();\n $appUser->free_post = is_null($freePosts)?0:$freePosts->free_post_no;\n }\n\n if(is_null($appUser->first_name) && is_null($appUser->last_name))\n {\n\n $splitName = explode(' ', $userCreated->name, 2); // Restricts it to only 2 values, for names like Billy Bob Jones\n $first_name = $splitName[0];\n $last_name = !empty($splitName[1]) ? $splitName[1] : '';\n \n $appUser->first_name = $first_name;\n $appUser->last_name = $last_name;\n }\n $appUser->facebook_id = $userCreated->provider_id;\n $appUser->user_status = 1;\n\n $userCreated->save();\n $appUser->save();\n\n if($userCreated->type !== 1 && $userCreated->activated === 0)\n {\n return 0;\n }\n }\n else\n {\n return -1;\n }\n }\n else\n {\n $userCreated = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'provider' => $provider,\n 'provider_id' => $user->id,\n 'activated' => 1,\n 'activation_code' => '',\n 'type' => 1,\n 'image'=>$picture,\n ]);\n \n $splitName = explode(' ', $userCreated->name, 2); // Restricts it to only 2 values, for names like Billy Bob Jones\n $first_name = $splitName[0];\n $last_name = !empty($splitName[1]) ? $splitName[1] : '';\n\n $freePosts = FreePostModel::where('id', 1)->first();\n\n AppUser::create([\n 'user_id' => $userCreated->id,\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $user->email,\n 'user_status' => 1,\n 'email_activated' => 1,\n 'facebook_id' => $userCreated->provider_id,\n 'free_post' => is_null($freePosts)?0:$freePosts->free_post_no,\n 'account_type' => 1,\n 'account_activated' => 1,\n ]);\n }\n\n return $userCreated;\n }", "public function store(StoreUserRequest $request)\n {\n // echo '<pre>'; // user profile\n // print_r($request->all()); exit();\n if ($request->hasFile('profile_pic')) {\n $file = $request->file('profile_pic');\n $image = $file->getClientOriginalExtension();\n $newfile = time().'_'.rand().'_'.'user-profile'.'.'.$image;\n $fmove = $file->move(public_path().'/user/image/',$newfile);\n $user_pic = $newfile;\n }\n\n $user = User::create([\n 'role_id' => 2,\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'avatar_type' => 'profile-image',\n 'avatar_location' =>isset($user_pic)?$user_pic:'',\n 'password' => $request->password,\n 'active' => isset($request->active) && $request->active === '1',\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n 'confirmed' => isset($request->confirmed) && $request->confirmed === '1',\n ]);\n //Send confirmation email if requested and account approval is off\n if ($user->confirmed === false && ! config('access.users.requires_approval')) {\n $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n }\n if (!empty($user->id)) {\n //echo $user->id; exit();\n $userProfile = new UserProfile; \n $userProfile->user_id = $user->id; \n $userProfile->gender = $request->gender; \n $userProfile->date_of_birth = $request->date_of_birth;\n $userProfile->interests = isset($request->interests)? implode(\",\",$request->interests):''; \n $userProfile->contact_numbers = $request->contact_numbers; \n $userProfile->country = $request->country; \n $userProfile->state = $request->state; \n $userProfile->city = $request->city; \n $userProfile->address = $request->address; \n $userProfile->interested_in = $request->interested_in;\n $userProfile->summery = $request->summery;\n $userProfile->profile_pic = isset($user_pic)?$user_pic:'';\n $userProfile->save(); \n } \n return redirect()->route('admin.user')->withFlashSuccess(__('alerts.backend.users.created'));\n }", "public function actionCreate()\n {\n $user = new User(['scenario' => 'create']);\n $profile = new Profile();\n\n if ($user->load(Yii::$app->request->post()) && $profile->load(Yii::$app->request->post())) {\n if ($user->validate() && $profile->validate()) {\n //$user->populateRelation('profile', $profile);\n if ($user->save(false)) {\n $user->link('profile', $profile);\n Yii::$app->session->setFlash('success', Module::t('users', 'User has been successfully created.'));\n return $this->redirect(['update', 'id' => $user->id]);\n } else {\n Yii::$app->session->setFlash('danger', Module::t('users', 'User has not been saved. Please try again!'));\n return $this->refresh();\n }\n }\n }\n\n return $this->render('create', [\n 'user' => $user,\n 'profile' => $profile\n ]);\n }", "protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'username' => $data['username'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'status' => $data['role'] === 'customer' ? 'verifiedByAdmin' : \"-\" \n ]);\n \n $address = [];\n \n array_push($address, json_encode([\n 'name' => $data['addressName'],\n 'province_id' => $data['provinceId'],\n 'city_id' => $data['cityId'],\n 'subdistrict_id' => $data['subdistrictId'],\n 'province_name' => $data['provinceName'],\n 'city_name' => $data['cityName'],\n 'subdistrict_name' => $data['subdistrictName'],\n 'postal_code' => $data['postalCode'],\n 'detail' => $data['addressDetail']\n ]));\n \n $user->profile()->save(Profile::create([\n 'user_id' => $user->id,\n 'name' => $data['name'],\n 'address' => json_encode($address),\n 'phone' => $data['phone'],\n 'photo' =>'no-image.jpg',\n 'gender' => $data['gender'],\n 'birthday' => $data['birthday'],\n ]));\n \n if($data['role'] === 'merchant'){\n $user->assignRole('merchant');\n } else {\n $user->assignRole('customer');\n }\n \n return $user;\n }", "protected function create(array $data)\n {\n return User::create([\n 'membType'=>$data['membType'],\n 'businessNature'=>$data['businessNature'],\n 'specNature'=>$data['specNature'],\n 'repBy'=>$data['repBy'],\n 'memberName' => $data['memberName'],\n 'image' => $data['image'],\n 'ComName'=>$data['ComName'],\n 'Desg'=>$data['Desg'],\n 'StrNo1'=>$data['StrNo1'],\n 'Zipcode1'=>$data['Zipcode1'],\n 'city1'=>$data['city1'],\n 'country1'=>$data['country1'],\n 'StrNo2'=>$data['StrNo2'],\n 'Zipcode2'=>$data['Zipcode2'],\n 'city2'=>$data['city2'],\n 'country2'=>$data['country2'],\n 'PhnOffice'=>$data['PhnOffice'],\n 'PhnRes'=>$data['PhnRes'],\n 'fax'=>$data['fax'],\n 'email' => $data['email'],\n 'skype'=> $data['skype'],\n 'web' => $data['web'],\n 'mobile' => $data['mobile'],\n 'password' => Hash::make($data['password']),\n 'confpass' => Hash::make($data['password']),\n 'proposerName'=>$data['proposerName'],\n 'proposerNo'=>$data['propserNo'],\n 'seconderName'=>$data['seconderName'],\n 'seconderNo'=>$data['seconderNo'],\n 'qualification'=>$data['qualification'],\n 'JoinDate'=>$data['JoinDate'],\n 'association'=>$data['association'],\n ]);\n }", "public function actionCreate()\n {\n $model = new User();\n\n if (isset($_POST['User']))\n {\n\n $transaction = Yii::app()->db->beginTransaction();\n\n try\n {\n $model->setAttributes($_POST['User']);\n $model->salt = Registration::model()->generateSalt();\n $model->password = Registration::model()->hashPassword($model->password, $model->salt);\n $model->registrationIp = Yii::app()->request->userHostAddress;\n\n if ($model->save())\n {\n $profile = new Profile();\n $profile->user_id = $model->id;\n if ($profile->save())\n {\n $transaction->commit();\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Новый пользователь добавлен!'));\n $this->redirect(array('view', 'id' => $model->id));\n }\n else\n {\n throw new CDbException(Yii::t('user', 'При создании пользователя произошла ошибка! Подробности в журнале исполнения.'));\n }\n }\n\n }\n catch (CDbException $e)\n {\n $transaction->rollback();\n Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, UserModule::$logCategory);\n Yii::app()->user->setFlash(YFlashMessages::ERROR_MESSAGE, $e->getMessage());\n $this->redirect(array('create'));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function creating(User $user)\n {\n if(!isset($user->profile_image)) {\n $user->profile_image = config('images.default_user_avatar');\n }\n }", "public function createUserProfile($data) {\n\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT COUNT(*)\n FROM users AS u\n JOIN profiles AS p ON p.userID = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n $result = $stmt->fetch(PDO::FETCH_COLUMN);\n\n if ($result) {\n $sql = 'UPDATE profiles\n SET firstName=?, lastName=?, dob=?, addressFirst=?, addressSecond=?, city=?, postcode=?, mobile=?, bio=?\n WHERE userID = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio'],\n $userID\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n else {\n $sql = 'INSERT INTO profiles (userID, firstName, lastName, dob, addressFirst, addressSecond, city, postcode, mobile, bio)\n VALUES (?,?,?,?,?,?,?,?,?,?)';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $userID,\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio']\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n }\n }", "public function creating(User $user)\n {\n\n $user->user_creator_id = \\Auth::id();\n //$user->user_updater_id = \\Auth::id();\n }", "public function actionCreate()\n {\n $model = new UserProfile();\n\n $model->user_id = Yii::$app->user->identity->id;\n\n\n $POST_VARIABLE = Yii::$app->request->post('Place');\n echo $POST_VARIABLE['first_name'];\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } elseif ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash(\"success\", Yii::t('app', 'Profile successfully created!'));\n return $this->redirect(['view']);\n\n } else {\n// echo $model->user_id;\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }", "public function createUser($name, $pass, $profile, array $extra = []);", "public function profileAction(){\n /** @var Object_User $user */\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['phone'])){\n $user->setPhone($data['phone']);\n }\n if(isset($data['email'])){\n $user->setPhone($data['email']);\n }\n if(isset($data['workphone'])){\n $user->setWorkPhone($data['workphone']);\n }\n if(isset($data['workemail'])){\n $user->setWorkEmail($data['workemail']);\n }\n if(!$user->save()){\n $this->setErrorResponse('Cannot update user profile');\n }\n $this->_helper->json($user);\n }", "protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}", "public function updated(User $user)\n {\n Userprofile::create([\n 'users_id' => $user->id,\n 'address' => 'Your Address',\n 'phone_number' => 'Your Number',\n 'city' => 'Your City',\n 'country' => 'Your Country',\n 'body' => 'Something About Yourself',\n 'user_img' => 'Your image here'\n ]);\n }", "public function create_profile(Request $request)\n {\n //validate incoming request \n $this->validate($request, [\n 'first_name' => 'required|string',\n 'last_name' => 'required|string',\n 'phone_number'=>'required',\n 'date_of_birth'=>'required'\n \n ]);\n\n try \n {\n $profile = new User_profile();\n \n $profile->user_id = $request->input('user_id');\n $profile->first_name = $request->input('first_name');\n $profile->last_name = $request->input('last_name');\n $profile->phone_number = $request->input('phone_number');\n $profile->date_of_birth = $request->input('date_of_birth');\n\n $profile->save();\n\n return response()->json( [\n 'entity' => 'profile', \n 'action' => 'create', \n 'result' => 'success'\n ], 201);\n\n } \n catch (\\Exception $e) \n {\n return response()->json( [\n 'entity' => 'profile', \n 'action' => 'create', \n 'result' => 'failed'\n ], 409);\n }\n }", "public function createNewUserInfo($payload){\n $fieldArray = array();\n $valueArray = array();\n $weight = 0;\n $height = 0;\n $UID = User::getID($payload['username']);\n array_push($fieldArray, \"UID\");\n array_push($valueArray, $UID);\n foreach ($payload as $key => $value) {\n if($key !== \"username\"){\n array_push($fieldArray, $key);\n array_push($valueArray, $value);\n }\n if($key == \"Weight\"){\n $weight = $payload[$key];\n }\n if($key == \"Height\"){\n $height = $payload[$key];\n }\n }\n User::insert($fieldArray, $valueArray);\n User::setTable(\"usertable\");\n User::update([\"NewUser\"], [0], $UID);\n\n User::setTable(\"userdata\");\n $BMI = round(703 * ($weight) / ($height**2), 1);\n User::update([\"BMI\"], [$BMI], \"'\".base64_encode($payload[\"username\"]).\"'\");\n return true;\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $input['password'] = bcrypt('password');\n $input['api_token'] = str_random(60);\n\n $profile = $input['profile'];\n $profile['driver_id'] = strtoupper(uniqid());\n unset($input['profile']);\n\n if ($request->hasFile('file')) {\n $file = $request->file('file');\n $path = $file->store('documents');\n\n $profile['document_file'] = $path;\n }\n\n\n if ($request->hasFile('picture')) {\n $file = $request->file('picture');\n $path = $file->store('documents');\n\n $profile['profile_picture'] = $path;\n }\n unset($input['file']);\n unset($input['picture']);\n\n $user = User::create($input);\n $user->profile()->create($profile);\n\n return redirect('/users');\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n\t\t\t 'email_token' => bin2hex(openssl_random_pseudo_bytes(30)),\n 'unix_timestamp' => time(),\n 'verified' => 0\n ]);\n\n Profile::create(['user_id' => $user->id]);\n\n return $user;\n }", "public function created(User $user)\n {\n\n // Assign a profile Image\n if($user->sex == 'male'){\n $user->avatar = 'blue.png';\n }\n elseif ($user->sex == 'female') {\n $user->avatar = 'pink.png';\n }\n else{\n $user->avatar = 'gray.png';\n }\n\n // Assign Name\n if($user->lastname !== null){\n $user->name = $user->firstname . ' ' . $user->lastname;\n }else{\n $user->name = $user->firstname;\n }\n\n /*Create Default Settings*/\n $user->settings()->create([]);\n \n\n $user->save();\n }", "protected function create(array $data)\n {\n $file = $this->request->file('profile_picture');\n $file_name = uniqid() . \"-\" . $file->getClientOriginalName();\n $file->move(public_path('/images'),$file_name);\n\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'gender' => $data['gender'],\n 'address' => $data['address'],\n 'dob' => $data['dob'],\n 'profile_image' => $file_name,\n ]);\n }", "protected function create(array $data)\n {\n\n define('UPLOAD_DIR', 'uploads/profiles/');\n $img = $data['profilePictureEncoded'];\n $newImage = str_replace('data:image/png;base64,', '', $img);\n $image = explode(\",\",$img);\n $test = base64_decode($image[1]);\n $fileName = UPLOAD_DIR . uniqid() . '.jpeg';\n file_put_contents($fileName, $test);\n\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'profile_picture' => '/' . $fileName,\n 'type' => 1,\n ]);\n }", "function d4os_io_db_070_users_add_extra_fields(&$user) {\n if (module_exists('d4os_io_services_profile')) {\n $properties = d4os_io_db_070_os_profile_services_avatar_properties_request(array('avatar_id' => $user->UUID));\n if (isset($properties['data'][0])) {\n $user->profileURL = $properties['data'][0]['ProfileUrl'];\n $user->profileImage = $properties['data'][0]['Image'];\n $user->profileAboutText = $properties['data'][0]['AboutText'];\n $user->profileFirstImage = $properties['data'][0]['FirstLifeImage'];\n $user->profileFirstText = $properties['data'][0]['FirstLifeAboutText'];\n $user->profilePartner = $properties['data'][0]['Partner'];\n\n //$user->profileAllowPublish = $properties['data'][0]['profileAllowPublish'];\n //$user->profileMaturePublish = $properties['data'][0]['profileMaturePublish'];\n\n // interests\n $user->profileWantDoMask = $properties['data'][0]['wantmask'];\n $user->profileWantToText = $properties['data'][0]['wanttext'];\n $user->profileSkillsMask = $properties['data'][0]['skillsmask'];\n $user->profileSkillsText = $properties['data'][0]['skillstext'];\n $user->profileLanguages = $properties['data'][0]['languages'];\n }\n }\n}", "public function saveProfile()\n {\n if ($this->validate()) {\n $user = $this->user;\n\n $graph = Yii::$container\n ->get(\\common\\components\\Graph::class, [$this->user]);\n\n if ($this->timezone) {\n $user->timezone = $this->timezone;\n }\n if ($this->expose_graph) {\n $user->expose_graph = true;\n\n // generate behaviors graph image\n $checkins_last_month = (Yii::$container->get(\\common\\interfaces\\UserBehaviorInterface::class))\n ->getCheckInBreakdown();\n\n // if they haven't done a check-in in the last month this will explode\n // because $checkins_last_month is an empty array\n if ($checkins_last_month) {\n $graph->create($checkins_last_month, true);\n }\n } else {\n $user->expose_graph = false;\n // remove behaviors graph image\n $graph->destroy();\n }\n\n if ($this->send_email) {\n $user->send_email = true;\n $user->email_category = $this->email_category;\n $user->partner_email1 = $this->partner_email1;\n $user->partner_email2 = $this->partner_email2;\n $user->partner_email3 = $this->partner_email3;\n } else {\n $user->send_email = false;\n $user->email_category = 4; // default to \"Speeding Up\"\n $user->partner_email1 = null;\n $user->partner_email2 = null;\n $user->partner_email3 = null;\n }\n $user->save();\n return $user;\n }\n\n return null;\n }", "public function newUser(Request $request)\n {\n\n //validations\n $this->validate($request, [\n 'first_name' => 'required|max:60',\n 'last_name' => 'required|max:60',\n 'phone' => 'required|max:60',\n 'gender' => 'required|max:60',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|min:4'\n\n ]);\n $userData['first_name'] = $request['first_name'];\n $userData['last_name'] = $request['last_name'];\n $userData['phone'] = $request['phone'];\n $userData['gender'] = $request['gender'];\n\n\n $objModeltest = new User_Meta(); //model name\n $result = $objModeltest->insertData($userData);\n //print_r($result);\n //die;\n\n\n if ($result) {\n $userMetaData['id'] = $result;\n\n //validations\n $this->validate($request, [\n 'email' => 'required',\n 'password' => 'required'\n ]);\n\n //taking value from form and storing in array\n $userMetaData['email'] = $request->input(\"email\");\n // $userMetaData['password'] = bcrypt($request['password']);\n $userMetaData['password'] = Hash::make($request['password']);\n\n\n $userMetaData['first_name'] = $request['first_name'];\n $userMetaData['last_name'] = $request['last_name'];\n $userMetaData['gender'] = $request['gender'];\n $userMetaData['phone'] = $request['phone'];\n\n $userMetaData['roll'] = '0';\n $userMetaData['status'] = 'USER';\n $message = 'There was an error!!!';\n\n //fetch data from user model\n if ($objModelUserMeta = new User())\n $result1 = $objModelUserMeta->InsertUserMeta($userMetaData);\n\n\n return redirect()->route('/admin/dashboard');\n\n }\n\n }", "protected function create(array $data)\n {\n $personalimageName = time() . '.' . $data['personalimage']->getClientOriginalExtension();\n\n $data['personalimage']->move(\n base_path() . '/public/storage/images/users',\n $personalimageName\n );\n\n $nationalimageName = time() . '.' . $data['nationalimage']->getClientOriginalExtension();\n\n $data['nationalimage']->move(\n base_path() . '/public/storage/images/users',\n $nationalimageName\n );\n\n return User::create([\n 'fisrtname' => $data['fisrtname'],\n 'secondtname' => $data['secondname'],\n 'thirdtname' => $data['thirdname'],\n 'momname' => $data['momname'],\n 'national' => $data['national'],\n 'nationalid' => $data['nationalid'],\n 'mobile' => $data['mobile'],\n 'gender' => $data['gender'],\n 'blood' => $data['blood'],\n 'idtype' => $data['idtype'],\n 'personalimage' => $personalimageName,\n 'nationalimage' => $nationalimageName,\n\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n ]);\n }", "function userRegister($userDetails){\n\ttry {\n\t\t$user = new MangoPay\\UserNatural();\n\t\t$user->FirstName \t\t\t= $userDetails['FirstName'];\n\t\t$user->LastName \t\t\t= $userDetails['LastName'];\n\t\t$user->Email \t\t\t\t= $userDetails['Email'];\n\t\t$user->Address \t\t\t\t= $userDetails['Address'];\n\t\t$user->Birthday \t\t\t= strtotime($userDetails['Birthday']);\n\t\t$user->Nationality \t\t\t= $userDetails['Nationality'];\n\t\t$user->CountryOfResidence \t= $userDetails['CountryOfResidence'];\n\t\t$user->Occupation \t\t\t= $userDetails['Occupation'];\n\t\t$user->IncomeRange \t\t\t= $userDetails['IncomeRange'];\n\t\t//call create function\n\t\t$createdUser \t\t\t\t= $mangoPayApi->Users->Create($user);\n\t\tif(isset($createdUser->Id)) {\n\t\t\treturn $createdUser->Id;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}\n\tcatch(Exception $e) {\n\t\treturn $e;//error in field values\n\t\t\n\t}\n}", "public function actionProfilecreate()\n {\n $model = new Profile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('profilecreate', [\n 'model' => $model,\n ]);\n }\n }", "protected function create(array $data)\n {\n return User::create([\n 'user_image' => $data['user_image'],\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'birth_date' => $data['birth_date'],\n 'user_gender' => $data['user_gender'],\n 'password' => Hash::make($data['password']),\n 'user_card_id' => $data['user_card_id'],\n 'user_mobile' => $data['user_mobile'],\n 'user_phone' => $data['user_phone'],\n 'country' => $data['country'],\n 'governorate' => $data['governorate'],\n 'work_sector' => $data['work_sector'],\n 'graduate_year' => $data['graduate_year'],\n 'experience_years' => $data['experience_years'],\n 'information' => $data['information'],\n 'user_card_image' => $data['user_card_image'],\n 'user_type' => $data['user_type'],\n ]);\n }", "public function createProfile(array $data);", "private function _registerUser($attributes, $providerHandle, $token)\n\t{\n\t\t// get social plugin settings\n\n\t\t$socialPlugin = craft()->plugins->getPlugin('social');\n\t\t$settings = $socialPlugin->getSettings();\n\n\t\tif (!$settings['enableSocialRegistration'])\n\t\t{\n\t\t\tthrow new Exception(\"Social registration is disabled.\");\n\t\t}\n\n\n\t\t// Fire an 'onBeforeRegister' event\n\n\t\t$event = new Event($this, [\n\t\t\t'account' => $attributes,\n\t\t]);\n\n\t\t$this->onBeforeRegister($event);\n\n\t\tif ($event->performAction)\n\t\t{\n\t\t\t$variables = $attributes;\n\n\t\t\t$newUser = new UserModel();\n\t\t\t$newUser->username = $attributes['email'];\n\t\t\t$newUser->email = $attributes['email'];\n\n\n\t\t\tif($settings['autoFillProfile'])\n\t\t\t{\n\t\t\t\t// fill user from attributes\n\n\t\t\t\t$userMapping = craft()->config->get('userMapping', 'social');\n\n\t\t\t\tif(is_array($userMapping))\n\t\t\t\t{\n\t\t\t\t\tforeach($userMapping as $attribute => $template)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Check to make sure custom field exists for user profile\n\t\t\t\t\t\tif (array_key_exists($attribute, $newUser->getAttributes()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$newUser->{$attribute} = craft()->templates->renderString($template, $variables);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t// fill user fields from attributes\n\n\t\t\t\t$profileFieldsMapping = craft()->config->get('profileFieldsMapping', 'social');\n\n\t\t\t\tif(isset($profileFieldsMapping[$providerHandle]) && is_array($profileFieldsMapping[$providerHandle]))\n\t\t\t\t{\n\t\t\t\t\tforeach($profileFieldsMapping[$providerHandle] as $field => $template)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Check to make sure custom field exists for user profile\n\t\t\t\t\t\tif (isset($newUser->getContent()[$field]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$newUser->getContent()->{$field} = craft()->templates->renderString($template, $variables);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch(\\Exception $e)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSocialPlugin::log('Could not map:'.print_r([$template, $variables, $e->getMessage()], true), LogLevel::Error);\n\t\t\t\t\t\t\t\t// error with template string rendering ? just don't fill the user field\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// save user\n\n\t\t\tcraft()->users->saveUser($newUser);\n\t\t\tcraft()->db->getSchema()->refresh();\n\t\t\t$user = craft()->users->getUserByUsernameOrEmail($attributes['email']);\n\n\n\t\t\t// save remote photo\n\n\t\t\tif($settings['autoFillProfile'])\n\t\t\t{\n\t\t\t\tif (!empty($attributes['imageUrl']))\n\t\t\t\t{\n\t\t\t\t\tcraft()->social->saveRemotePhoto($attributes['imageUrl'], $user);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// save groups\n\n\t\t\tif (!empty($settings['defaultGroup']))\n\t\t\t{\n\t\t\t\tcraft()->userGroups->assignUserToGroups($user->id, [$settings['defaultGroup']]);\n\t\t\t}\n\n\t\t\tcraft()->users->saveUser($user);\n\n\t\t\treturn $user;\n\t\t}\n\n\t\treturn false;\n\t}", "function _create_user($user_data){\n \n $person_id=$this->model->insert($user_data);\n return $person_id;\n \n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function creating(User $user)\n {\n if (empty($user->login)) {\n $user->login = $user->email;\n }\n\n if (null === $user->my_id || empty($user->my_id)) {\n $user->my_id = generateMyId();\n }\n }", "public function create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }", "public function store()\n {\n\n request()->validate([\n 'uname'=> 'required',\n 'useremail'=> 'required',\n 'fname'=>'required',\n 'lname'=> 'required',\n 'pasword' => 'required',\n 'userroll' => 'required'\n\n ]);\n\n $user = new userprofiles();\n\n $user->uname = request('uname');\n $user->useremail = request('useremail');\n $user->fname = request('fname');\n $user->lname = request('lname');\n $user->pasword = request('pasword');\n $user->userroll = request('userroll');\n\n $user->save();\n\n redirect('/add-new');\n\n\n }", "private function findOrCreateUser($socialUser,$provider)\n {\n $authUser = User::where('email', $socialUser->email)->first();\n if ($authUser){\n $providerExist = UserProvider::where('provider_id', $socialUser->id)->first();\n if(!$providerExist){\n UserProvider::create([\n 'user_id'=>$authUser->id,\n 'provider'=>$provider,\n 'provider_id'=>!empty($socialUser->id)?$socialUser->id:'',\n 'provider_token'=>!empty($socialUser->token)?$socialUser->token:'',\n 'avatar' => !empty($socialUser->avatar)?$socialUser->avatar:'',\n ]);\n } \n return $authUser;\n }\n $authUser = User::create([\n 'firstname' => !empty($socialUser->user->first_name)?$socialUser->user->first_name:$socialUser->name,\n 'name' => !empty($socialUser->name)?$socialUser->name:'',\n 'email' => !empty($socialUser->email)?$socialUser->email:'',\n ]);\n $userProvider = [\n 'user_id'=>$authUser->id,\n 'provider'=>$provider,\n 'provider_id'=>!empty($socialUser->id)?$socialUser->id:'',\n 'provider_token'=>!empty($socialUser->token)?$socialUser->token:'',\n 'avatar' => !empty($socialUser->avatar)?$socialUser->avatar:'',\n ]; \n UserProvider::firstOrCreate($userProvider);\n \n return $authUser;\n }", "public function store(Request $request)\n {\n //\n\n $request->validate([\n 'name'=>'required',\n 'email'=>'required|unique:users,email',\n 'school_id'=>'required',\n 'class_id'=>'required',\n 'subject_id'=>'required',\n 'short_image'=>'required',\n 'full_image'=>'required',\n 'gender'=>'required',\n 'interests'=>'required',\n 'password'=>'required',\n ]);\n\n $Profile = new User();\n $Profile->short_image = $this->uploadImage($request->short_image);\n $Profile->full_image = $this->uploadImages($request->full_image);\n $Profile->name = $request->name;\n $Profile->email = $request->email;\n $Profile->school_id = $request->school_id;\n $Profile->class_id = $request->class_id;\n $Profile->subject_id = $request->subject_id;\n $Profile->gender = $request->gender;\n $Profile->interests = json_encode($request->interests);\n $Profile->password = Hash::make($request->password);\n $Profile->created_at = date('Y-m-d h:i:s');\n $Profile->updated_at = date('Y-m-d h:i:s');\n\n if( $Profile->save())\n {\n return redirect()->route('user.index')->with('success','User details added successfully!');\n }\n\n }", "public function registerUser( \n $email, \n $name, \n $password, \n $surname, \n $cell_phone_number, \n $gender, \n $province, \n $type_of_study,\n $institution,\n $field_of_study\n ) {\n\n \theader( \"Access-Control-Allow-Origin: *\" ) ;\n\n $user = User::create([\n 'name' => $name,\n 'email' => $email,\n 'password' => Hash::make( $password ),\n ]);\n\n $details = new UserDetail ;\n\n $details->surname = $surname ;\n $details->age = \"0\" ;\n $details->cell_phone_number = $cell_phone_number ;\n $details->gender = $gender ;\n $details->province = $province ;\n $details->type_of_study = $type_of_study ;\n $details->institution = $institution ;\n $details->field_of_study = $field_of_study ;\n\n $details->save() ;\n\n\n $user->roles()->attach( Role::where( 'name', 'student' )->first() ) ;\n\n if ( $user ) {\n \treturn [ 'message' => 'success' ] ;\n } else {\n \treturn [ 'message' => 'failed' ] ;\n }\n\n }", "public function make($userArray):User\n {\n $user = new User();\n\n // If user exists, assign the id, households, and current household\n if(isset($userArray['id'])){\n $user->setId($userArray['id']);\n $households = $this->householdRepository->allForUser($user);\n $user->setHouseholds($households);\n\n $currHousehold = $this->householdRepository->find($userArray['currHouseholdId']);\n $user->setCurrHousehold($currHousehold);\n }\n else{\n $user->setHouseholds(array());\n }\n $user->setUsername($userArray['username']);\n $user->setPassword($userArray['password']);\n $user->setEmail($userArray['email']);\n $user->setJoined($userArray['joined']);\n $user->setFirstName($userArray['namefirst']);\n $user->setLastName($userArray['namelast']);\n $user->setActivated($userArray['activated']);\n $user->setPassTemp($userArray['passTemp']);\n $user->setProfilePic($userArray['profilePic']);\n\n return $user;\n }", "public function createUnifiedUserPropertiesTable () {\n\n\t\t$this->output( \"\\n# Creating unified user_properties table. \\n\" );\n\n\t\t$this->newUserPropsForInsert = array();\n\t\twhile( $row = array_pop( $this->newUserProps ) ) {\n\t\t\t$this->newUserPropsForInsert[] = array(\n\t\t\t\t'up_user' => $row['up_user'],\n\t\t\t\t'up_property' => $row['up_property'],\n\t\t\t\t'up_value' => $row['up_value'],\n\t\t\t);\n\t\t}\n\n\t\t$db = $this->wikiDBs[$this->primeWiki];\n\t\t$db->query( 'DELETE FROM user_properties' );\n\t\t$db->insert(\n\t\t\t'user_properties',\n\t\t\t$this->newUserPropsForInsert,\n\t\t\t__METHOD__,\n\t\t\tarray( 'IGNORE' ) // IGNORE or ON DUPLICATE KEY UPDATE ???\n\t\t);\n\n\t}", "public function profile (request $request) {\n\t\t$userInfo = resolve('userInfo');\n\n\t\tif ($request->isMethod('post') && $request->tab == \"profile\") {\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\t$usr_role = $request->usr_role;\n\t\t\t} else {\n\t\t\t\t$usr_role = 'CP';\n\t\t\t}\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\t$dataProfile = array(\n\t\t\t\t\t'usr_employment_id' => $request->usr_employment_id,\n\t\t\t\t\t'usr_role' \t\t\t\t\t=> $usr_role,\n\t\t\t\t\t'usr_firstname' \t\t=> $request->usr_firstname,\n\t\t\t\t\t'usr_lastname' \t\t\t=> $request->usr_lastname,\n\t\t\t\t\t'usr_nric' \t\t\t\t\t=> $request->usr_nric,\n\t\t\t\t\t'usr_dob' \t\t\t\t\t=> $request->usr_dob,\n\t\t\t\t\t'usr_citizen' \t\t\t=> $request->usr_citizen,\n\t\t\t\t\t'usr_add1' \t\t\t\t\t=> $request->usr_add1,\n\t\t\t\t\t'usr_add2' \t\t\t\t\t=> $request->usr_add2,\n\t\t\t\t\t'usr_postcode' \t\t\t=> $request->usr_postcode,\n\t\t\t\t\t'usr_state' \t\t\t\t=> $request->usr_state,\n\t\t\t\t\t'usr_country' \t\t\t=> $request->usr_country,\n\t\t\t\t\t'usr_education' \t\t=> $request->usr_education,\n\t\t\t\t\t'usr_qualification' => $request->usr_qualification,\n\t\t\t\t\t'usr_jobtitle' \t\t\t=> $request->usr_jobtitle,\n\t\t\t\t\t'usr_division' \t\t\t=> $request->usr_division,\n\t\t\t\t\t'usr_employment' \t\t=> $request->usr_employment,\n\t\t\t\t\t'usr_mobile' \t\t\t\t=> $request->usr_mobile,\n\t\t\t\t\t'usr_email' \t\t\t\t=> $request->usr_email,\n\t\t\t\t\t'usr_bank_name' \t\t=> $request->usr_bank_name,\n\t\t\t\t\t'usr_bank_acc_no' \t=> $request->usr_bank_acc_no,\n\t\t\t\t\t'usr_kwsp_no' \t\t\t=> $request->usr_kwsp_no,\n\t\t\t\t\t'usr_updated' \t\t\t=> Carbon::now()\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$dataProfile = array(\n\t\t\t\t\t'usr_firstname' \t\t=> $request->usr_firstname,\n\t\t\t\t\t'usr_lastname' \t\t\t=> $request->usr_lastname,\n\t\t\t\t\t'usr_nric' \t\t\t\t\t=> $request->usr_nric,\n\t\t\t\t\t'usr_dob' \t\t\t\t\t=> $request->usr_dob,\n\t\t\t\t\t'usr_citizen' \t\t\t=> $request->usr_citizen,\n\t\t\t\t\t'usr_add1' \t\t\t\t\t=> $request->usr_add1,\n\t\t\t\t\t'usr_add2' \t\t\t\t\t=> $request->usr_add2,\n\t\t\t\t\t'usr_postcode' \t\t\t=> $request->usr_postcode,\n\t\t\t\t\t'usr_state' \t\t\t\t=> $request->usr_state,\n\t\t\t\t\t'usr_country' \t\t\t=> $request->usr_country,\n\t\t\t\t\t'usr_education' \t\t=> $request->usr_education,\n\t\t\t\t\t'usr_qualification' => $request->usr_qualification,\n\t\t\t\t\t'usr_jobtitle' \t\t\t=> $request->usr_jobtitle,\n\t\t\t\t\t'usr_mobile' \t\t\t\t=> $request->usr_mobile,\n\t\t\t\t\t'usr_email' \t\t\t\t=> $request->usr_email,\n\t\t\t\t\t'usr_bank_name' \t\t=> $request->usr_bank_name,\n\t\t\t\t\t'usr_bank_acc_no' \t=> $request->usr_bank_acc_no,\n\t\t\t\t\t'usr_kwsp_no' \t\t\t=> $request->usr_kwsp_no,\n\t\t\t\t\t'usr_updated' \t\t\t=> Carbon::now()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// echo '<pre>'; print_r($request->usr_role); die();\n\t\t\t$updateProfile = DB::table('users')->where('usr_id', $request->usr_id)->update($dataProfile);\n\n\t\t\tLog::doAddLog (\"Update profile\", $request->usr_id, $request->usr_firstname.' '.$request->usr_lastname);\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\treturn redirect('view-profile/'.$request->usr_id)->with('success', \"Successfully update user profile.\");\n\t\t\t} else {\n\t\t\t\treturn redirect('profile')->with('success', \"Successfully update user profile.\");\n\t\t\t}\n\n\n\t\t} else if ($request->isMethod('post') && $request->tab == \"password\"){\n\n\t\t\t// echo $request->password2; die();\n\t\t\tif($request->password1 != $request->password2){\n\t\t\t\treturn redirect('profile')->with('error', \"Password confirmation didnt match. Please try again.\");\n\t\t\t} else {\n\t\t\t\t$pass = hash('sha256', $request->password1);\n\n\t\t\t\t$dataPassword = array (\n\t\t\t\t\t'usr_pword' => $pass\n\t\t\t\t);\n\t\t\t\t$updatePassword = DB::table('users')->where('usr_id', $request->usr_id)->update($dataPassword);\n\t\t\t\tLog::doAddLog (\"Update password\", $request->usr_id);\n\t\t\t\treturn redirect('profile#t02')->with('success', \"Successfully update new password.\");\n\t\t\t}\n\t\t} else if ($request->isMethod('post') && $request->tab == \"bank\"){\n\n\t\t\t$dataBank = array (\n\t\t\t\t'usr_bank_name' \t=> $request->usr_bank_name,\n\t\t\t\t'usr_bank_acc_no' => $request->usr_bank_acc_no,\n\t\t\t\t'usr_kwsp_no' \t\t=> $request->usr_kwsp_no\n\t\t\t);\n\n\t\t\t$updateBank = DB::table('users')->where('usr_id', $request->usr_id)->update($dataBank);\n\t\t\treturn redirect('profile#t04')->with('success', \"Successfully update Bank & KWSP info.\");\n\t\t}\n\n return view('profile')->with('user',$userInfo);\n }", "public function create_user()\n {\n $this->data['title'] = $this->lang->line('create_user_heading');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n {\n redirect('auth', 'refresh');\n }\n\n $tables = $this->config->item('tables','ion_auth');\n $identity_column = $this->config->item('identity','ion_auth');\n $this->data['identity_column'] = $identity_column;\n\n // validate form input\n $this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'required');\n $this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'required');\n if($identity_column!=='email')\n {\n $this->form_validation->set_rules('identity',$this->lang->line('create_user_validation_identity_label'),'required|is_unique['.$tables['users'].'.'.$identity_column.']');\n $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'required|valid_email');\n }\n else\n {\n $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'required|valid_email|is_unique[' . $tables['users'] . '.email]');\n }\n $this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n $this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n $this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n $this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n if ($this->form_validation->run() == true)\n {\n $email = strtolower($this->input->post('email'));\n $identity = ($identity_column==='email') ? $email : $this->input->post('identity');\n $password = $this->input->post('password');\n\n $additional_data = array(\n 'first_name' => $this->input->post('first_name'),\n 'last_name' => $this->input->post('last_name'),\n 'company' => $this->input->post('company'),\n 'phone' => $this->input->post('phone'),\n );\n }\n if ($this->form_validation->run() == true && $this->ion_auth->register($identity, $password, $email, $additional_data))\n {\n // check to see if we are creating the user\n $this->emailNotification($identity, $email, $password);\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"auth\", 'refresh');\n }\n else\n {\n\t\t\t\n\t\t\t//var_dump($ss);exit;\n // display the create user form\n // set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['first_name'] = array(\n 'name' => 'first_name',\n 'id' => 'first_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('first_name'),\n );\n $this->data['last_name'] = array(\n 'name' => 'last_name',\n 'id' => 'last_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('last_name'),\n );\n $this->data['identity'] = array(\n 'name' => 'identity',\n 'id' => 'identity',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('identity'),\n );\n $this->data['email'] = array(\n 'name' => 'email',\n 'id' => 'email',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('email'),\n );\n $this->data['organisation'] = array(\n 'name' => 'company',\n 'id' => 'organisation',\n 'type' => 'select',\n 'options' => $this->get_options(),\n );\n $this->data['company'] = array(\n 'name' => 'company',\n 'id' => 'company',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('company'),\n );\n $this->data['phone'] = array(\n 'name' => 'phone',\n 'id' => 'phone',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('phone'),\n );\n $this->data['password'] = array(\n 'name' => 'password',\n 'id' => 'password',\n 'type' => 'password',\n 'value' => $this->form_validation->set_value('password'),\n );\n $this->data['password_confirm'] = array(\n 'name' => 'password_confirm',\n 'id' => 'password_confirm',\n 'type' => 'password',\n 'value' => $this->form_validation->set_value('password_confirm'),\n );\n\n $this->_render_page('auth/create_user', $this->data);\n }\n }", "public function api_entry_setprofile() {\n parent::validateParams(array('user'));\n\n $user = $this->Mdl_Users->get($_POST[\"user\"]);\n\n if ($user == null)\n parent::returnWithErr(\"User id is not valid.\");\n\n $arg = $this->safeArray(array('fullname', 'avatar', 'church', 'city', 'province', 'bday', 'mood'), $_POST);\n\n $arg['id'] = $_POST[\"user\"];\n\n if (count($arg) == 1)\n parent::returnWithErr(\"You should pass the profile 1 entry at least to update.\");\n\n $user = $this->Mdl_Users->update($arg);\n\n if ($user == null)\n parent::returnWithErr(\"Profile has not been updated.\");\n\n parent::returnWithoutErr(\"Profile has been updated successfully.\", $user);\n }", "public function create_user()\n\t{\n\t\tif (!$this->ion_auth->logged_in())\n\t\t{\n\t\t\t// redirect them to the login page\n\t\t\tredirect('/admin/login', 'refresh');\n\t\t}\n\t\t$this->data['title'] = $this->lang->line('create_user_heading');\n\n\t\t//See the ion_auth config to check if allow_user_registration is TRUE\n\t\tif( ! $this->config->item('allow_user_registration', 'ion_auth')){\n\n\t\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t\t{\n\t\t\t\tredirect('/admin', 'refresh');\n\t\t\t}\n\n\t\t}\n\n\n\t\t$tables = $this->config->item('tables', 'ion_auth');\n\t\t$identity_column = $this->config->item('identity', 'ion_auth');\n\t\t$this->data['identity_column'] = $identity_column;\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'trim|required');\n\t\t$this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'trim|required');\n\t\tif ($identity_column !== 'email')\n\t\t{\n\t\t\t$this->form_validation->set_rules('identity', $this->lang->line('create_user_validation_identity_label'), 'trim|required|is_unique[' . $tables['users'] . '.' . $identity_column . ']');\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'trim|required|valid_email|is_unique[' . $tables['users'] . '.email]');\n\t\t}\n\t\t$this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\n\t\t$this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\n\t\t$this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t$this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$email = strtolower($this->input->post('email'));\n\t\t\t$identity = ($identity_column === 'email') ? $email : $this->input->post('identity');\n\t\t\t$password = $this->input->post('password');\n\n\t\t\t$additional_data = array(\n\t\t\t\t'first_name' => $this->input->post('first_name'),\n\t\t\t\t'last_name' => $this->input->post('last_name'),\n\t\t\t\t'company' => $this->input->post('company'),\n\t\t\t\t'phone' => $this->input->post('phone'),\n\t\t\t);\n\t\t}\n\t\tif ($this->form_validation->run() === TRUE && $this->ion_auth->register($identity, $password, $email, $additional_data))\n\t\t{\n\t\t\t// check to see if we are creating the user\n\t\t\t// redirect them back to the admin page\n\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\tredirect(\"auth\", 'refresh');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create user form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['first_name'] = array(\n\t\t\t\t'name' => 'first_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'first_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('first_name'),\n\t\t\t);\n\t\t\t$this->data['last_name'] = array(\n\t\t\t\t'name' => 'last_name',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'last_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('last_name'),\n\t\t\t);\n\t\t\t$this->data['identity'] = array(\n\t\t\t\t'name' => 'identity',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t);\n\t\t\t$this->data['email'] = array(\n\t\t\t\t'name' => 'email',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'email',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('email'),\n\t\t\t);\n\t\t\t$this->data['company'] = array(\n\t\t\t\t'name' => 'company',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'company',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('company'),\n\t\t\t);\n\t\t\t$this->data['phone'] = array(\n\t\t\t\t'name' => 'phone',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'phone',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('phone'),\n\t\t\t);\n\t\t\t$this->data['password'] = array(\n\t\t\t\t'name' => 'password',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password'),\n\t\t\t);\n\t\t\t$this->data['password_confirm'] = array(\n\t\t\t\t'name' => 'password_confirm',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'id' => 'password_confirm',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'value' => $this->form_validation->set_value('password_confirm'),\n\t\t\t);\n\n\n\t\t\t$this->load->view('templates/header',$this->data);\n\t\t\t$this->load->view('/admin/create_user');\n\t\t\t$this->load->view('templates/footer');\n\t\t}\n\t}", "protected function create(array $data)\n {\n \\DB::beginTransaction();\n\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'socket_token' => str_random(60),\n 'api_token' => str_random(60),\n 'last_online' => date('Y-m-d H:i:s'),\n ]);\n\n $profileData = $this->getProfileData($data);\n $profileData['user_id'] = $user->id;\n\n $profile = UserProfile::create($profileData);\n\n $user->addProfilePicture($data['image']);\n\n \\DB::commit();\n\n return $user;\n }", "public function createProfile($gender, $name, $surname, $birthday, $state, $city, $phoneNumber, $hobby, $description, $idUser)\n {\n // make query\n $query = \"INSERT INTO \".$this->profileTable.\" (gender, name, surname, birthday, state, city, phone_number, hobby, description, id_user) VALUES ('$gender', '$name', '$surname', '$birthday', '$state', '$city', '$phoneNumber', '$hobby', '$description', '$idUser')\"; \n $result = mysqli_query($this->db->getDb(), $query);\n \n // set json response\n if($result == 1)\n {\n $idProfile = $this->db->getDb()->insert_id;\n $json['id_profile'] = $idProfile;\n $json['success'] = 1;\n $json['message'] = \"Wirtualny profil został utworzony!\";\n }\n else\n {\n $json['success'] = 0;\n $json['message'] = \"Nie udało się utworzyć wirtualnego profilu\";\n }\n \n return $json;\n }", "public static function user_from_row($row) {\r\n $result = new User(UserService::get_key($row,\"UserId\"),UserService::get_key($row,\"Email\"),UserService::get_key($row,\"UserType\"));\r\n $result->set_first_name(UserService::get_key($row,\"FirstName\"));\r\n $result->set_last_name(UserService::get_key($row,\"LastName\"));\r\n $result->set_home_phone(UserService::get_key($row,\"HomePhone\"));\r\n $result->set_mobile_phone(UserService::get_key($row,\"MobilePhone\"));\r\n $result->set_address_1(UserService::get_key($row,\"Address1\"));\r\n $result->set_address_2(UserService::get_key($row,\"Address2\"));\r\n $result->set_city(UserService::get_key($row,\"City\"));\r\n $result->set_state(UserService::get_key($row,\"State\"));\r\n $result->set_zip(UserService::get_key($row,\"ZipCode\"));\r\n $result->set_organization_id(UserService::get_key($row,\"OrganizationId\"));\r\n return $result;\r\n }", "protected function create(Request $request)\n {\n $validator = $this->validator($request->all());\n\n if ($validator->fails()) {\n return response()->json(['status'=>500,'error'=>$validator->errors()]);\n }\n\n try{\n $user = User::create([\n 'name' => $request['name'],\n 'surname' => $request['surname'],\n 'email' => $request['email'],\n 'password' => Hash::make($request['password']),\n 'country_id' => $request['country_id'],\n 'role' => 'USER',\n 'deleted' => false\n ]);\n\n $this->createSettings($user->id);\n\n $image = $this->createStandardProfileImage();\n\n $userInformation = [\n 'profile_picture_id' => $image['id'],\n 'bio' => \"My bio text\",\n 'search_job' => true,\n ];\n\n $user->information()->create($userInformation);\n\n return $user;\n }catch(QueryException $queryException){\n return response()->json(['error'=>$queryException]);\n }\n }", "protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }", "protected function create(array $data)\n {\n return User::create([\n 'name' => $data['lastName'] .$data['firstName'],\n 'name_kana' => $data['lastNameKana'] .$data['firstNameKana'],\n 'zip_code' => $data['zipCodeOne'] .$data['zipCodeTwo'],\n 'pref_id' => $data['prefecture'],\n 'address1' => $data['addressOne'],\n 'address2' => $data['addressTwo']||'',\n 'tel' => $data['mobileOne'] .$data['mobileTwo'] .$data['mobileThree'],\n 'fax' => $data['telOne'] .$data['telTwo'] .$data['telThree'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n ]);\n }", "protected function create(array $data)\n {\n if(array_key_exists('q', $data)) {\n unset($data['q']);\n }\n \n $avatar = null;\n if(array_key_exists('avatar', $data)) {\n $avatar = $data['avatar'];\n unset($data['avatar']);\n }\n \n $data['password'] = Hash::make($data['password']);\n // $data['birthday'] = DateTime::createFromFormat('d/m/Y', $data['birthday'])->format('Y-m-d');\n \n // remove null fields\n $data = array_filter($data);\n\n $user = User::create($data);\n\n // save avatar\n // can luu user truoc de lay duoc user_id \n if(is_file($avatar)) {\n $extension = $avatar->getClientOriginalExtension();\n $filename = (string) time().uniqid().'.'.$extension;\n $path = 'storage/app/user'.$user->id.'/avatar/'.$filename;\n $avatar->storeAs('user'.$user->id.'/avatar', $filename);\n $user->avatar = $path;\n $user->save();\n\n // store user photo\n \\App\\UserPhoto::create([\n 'user_id' => $user->id,\n 'source' => $user->avatar,\n 'type' => 'featured',\n 'is_avatar' => 1\n ]);\n } else if(is_string($avatar)) {\n $user->avatar = $avatar;\n $user->save();\n }\n \n \\App\\UserConfiguration::create([\n 'user_id' => $user->id,\n 'notify_receive_message' => 1,\n 'notify_profile_visited' => 1,\n 'notify_liked' => 1,\n 'notify_loved' => 1\n ]);\n\n return $user;\n }", "public function create_user()\r\n {\r\n $this->data['title'] = $this->lang->line('create_user_heading');\r\n\r\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\r\n {\r\n //redirect('auth', 'refresh');\r\n }\r\n\r\n $tables = $this->config->item('tables','ion_auth');\r\n $identity_column = $this->config->item('identity','ion_auth');\r\n $this->data['identity_column'] = $identity_column;\r\n\r\n // validate form input\r\n $this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'required');\r\n $this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'required');\r\n if($identity_column!=='email')\r\n {\r\n $this->form_validation->set_rules('identity',$this->lang->line('create_user_validation_identity_label'),'required|is_unique['.$tables['users'].'.'.$identity_column.']');\r\n $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'required|valid_email');\r\n }\r\n else\r\n {\r\n $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'required|valid_email|is_unique[' . $tables['users'] . '.email]');\r\n }\r\n $this->form_validation->set_rules('phone', $this->lang->line('create_user_validation_phone_label'), 'trim');\r\n $this->form_validation->set_rules('company', $this->lang->line('create_user_validation_company_label'), 'trim');\r\n $this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\r\n $this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\r\n\r\n if ($this->form_validation->run() == true)\r\n {\r\n $email = strtolower($this->input->post('email'));\r\n $identity = ($identity_column==='email') ? $email : $this->input->post('identity');\r\n $password = $this->input->post('password');\r\n\r\n $additional_data = array(\r\n 'first_name' => $this->input->post('first_name'),\r\n 'last_name' => $this->input->post('last_name'),\r\n 'company' => $this->input->post('company'),\r\n 'phone' => $this->input->post('phone'),\r\n );\r\n }\r\n if ($this->form_validation->run() == true && $this->ion_auth->register($identity, $password, $email, $additional_data))\r\n {\r\n // check to see if we are creating the user\r\n // redirect them back to the admin page\r\n $this->session->set_flashdata('message', $this->ion_auth->messages());\r\n redirect(\"auth\", 'refresh');\r\n }\r\n else\r\n {\r\n // display the create user form\r\n // set the flash data error message if there is one\r\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\r\n\r\n $this->data['first_name'] = array(\r\n 'name' => 'first_name',\r\n 'id' => 'first_name',\r\n 'type' => 'text',\r\n 'value' => $this->form_validation->set_value('first_name'),\r\n );\r\n $this->data['last_name'] = array(\r\n 'name' => 'last_name',\r\n 'id' => 'last_name',\r\n 'type' => 'text',\r\n 'value' => $this->form_validation->set_value('last_name'),\r\n );\r\n $this->data['identity'] = array(\r\n 'name' => 'identity',\r\n 'id' => 'identity',\r\n 'type' => 'text',\r\n 'value' => $this->form_validation->set_value('identity'),\r\n );\r\n $this->data['email'] = array(\r\n 'name' => 'email',\r\n 'id' => 'email',\r\n 'type' => 'text',\r\n 'value' => $this->form_validation->set_value('email'),\r\n );\r\n $this->data['company'] = array(\r\n 'name' => 'company',\r\n 'id' => 'company',\r\n 'type' => 'text',\r\n 'value' => $this->form_validation->set_value('company'),\r\n );\r\n $this->data['phone'] = array(\r\n 'name' => 'phone',\r\n 'id' => 'phone',\r\n 'type' => 'text',\r\n 'value' => $this->form_validation->set_value('phone'),\r\n );\r\n $this->data['password'] = array(\r\n 'name' => 'password',\r\n 'id' => 'password',\r\n 'type' => 'password',\r\n 'value' => $this->form_validation->set_value('password'),\r\n );\r\n $this->data['password_confirm'] = array(\r\n 'name' => 'password_confirm',\r\n 'id' => 'password_confirm',\r\n 'type' => 'password',\r\n 'value' => $this->form_validation->set_value('password_confirm'),\r\n );\r\n\t\t\t\r\n\t\t\t$this->_render_page('auth/create_user', $this->data);\r\n }\r\n }", "public function create()\n {\n /** get the id of user */\n $id = Auth::user()->id;\n // dd($id);\n\n /** get the collection of user details */\n $profiles = User::find($id)->user_details;\n // dd($profiles);\n\n return view('shared.form_profiles')->with('id',$id);\n }", "public function testUserCreate() {\n $createUser = PromisePay::User()->create($this->userData);\n \n // Second, fetch its data\n $getUser = PromisePay::User()->get($createUser['id']);\n \n $this->assertNotNull($createUser['created_at']);\n $this->assertNotNull($createUser['updated_at']);\n $this->assertEquals($createUser['id'], $getUser['id']);\n $this->assertEquals($this->userData['first_name'] . ' ' . $this->userData['last_name'], $getUser['full_name']);\n }", "protected function create(array $data)\n {\n $data['photo_src'];\n return User::create([\n 'last_name' => $data['last_name'],\n 'first_name' => $data['first_name'],\n 'last_name_kana' => $data['last_name_kana'],\n 'first_name_kana' => $data['first_name_kana'],\n 'nickname' => $data['nickname'],\n 'photo_path' => $data['photo_path'],\n 'birth_date' => $data['birthday'],\n 'gender' => $data['gender'],\n 'zip_code' => $data['zipcode'],\n 'prefecture' => $data['prefecture'],\n 'address' => $data['address'],\n 'small_address' => $data['small_address'],\n 'tel' => $data['tel'],\n 'tel2' => $data['tel2'],\n 'tel3' => $data['tel3'],\n 'email' => $data['email'],\n 'pachislot_flag' => $data['pachislot_flag'],\n 'password' => $this->storePassword($data['password']),\n 'email_magazine_flag' => $data['email_magazine_flag'],\n ]);\n }", "public function store(Request $request)\n {\n //\n $this->validate($request,[\n 'name'=>'required',\n 'email'=>'required',\n\n ]);\n $user = User::create([\n 'name'=>$request->name,\n 'email'=>$request->email,\n 'password'=>bcrypt('password123'),\n ]);\n\n\n\n Profile::create([\n 'user_id'=>$user->id,\n 'avatar'=>'uploads/avatars/1.jpg'\n ]);\n\n session()->flash(\"success\",\"User created successfully\");\n\n return redirect(route(\"users.index\"));\n\n\n }", "public function create()\n {\n $user = $this->userProfileService->findUser()->getUser();\n \n return redirect()->route('user_profile.edit', $user->id);\n }", "protected function create(array $data) : User\n {\n\n $user = null;\n\n DB::transaction(function () use (&$user, $data) {\n\n $user = User::create([\n \"first_name\" => $data[\"first_name\"],\n \"last_name\" => $data[\"last_name\"],\n \"email\" => $data[\"email\"],\n \"password\" => bcrypt($data[\"password\"]),\n \"role\" => $data[\"role\"],\n ]);\n\n // If a student user is created, the related student model is created.\n if ($user->role === User::ROLE_STUDENT) {\n $student = new Student;\n $student->identification_number = $data[\"identification_number\"];\n $student->gender = $data[\"gender\"];\n $student->nationality = $data[\"nationality\"];\n $student->user()->associate($user);\n $student->save();\n }\n\n });\n\n return $user;\n }", "private function addIdentityFieldsToUser()\n {\n\n /** @var CrudService $service */\n $service = $this->container->get('shopware_attribute.crud_service');\n\n foreach (self::PROVIDERS as $provider) {\n $service->update('s_user_attributes', strtolower($provider) . '_identity', 'string', [\n 'label' => 'Identity ' . $provider,\n\n //user has the opportunity to translate the attribute field for each shop\n 'translatable' => false,\n\n //attribute will be displayed in the backend module\n 'displayInBackend' => true,\n\n //in case of multi_selection or single_selection type, article entities can be selected,\n 'entity' => Customer::class,\n\n //numeric position for the backend view, sorted ascending\n 'position' => 100,\n\n //user can modify the attribute in the free text field module\n 'custom' => false,\n ]);\n }\n\n $models = $this->container->get('models');\n $metaDataCache = $models->getConfiguration()->getMetadataCacheImpl();\n $metaDataCache->deleteAll();\n $models->generateAttributeModels(['s_user_attributes']);\n }", "protected function create(array $data)\n {\n $token = $this->generate_token($data['verified_by']);\n\n $user = User::create([\n 'name' => $data['first_name'].' '.$data['last_name'],\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => isset($data['email'])?$data['email']:'',\n 'username' => '',\n 'home_contact_ext' => $data['home_contact_ext'],\n 'verified_by' => $data['verified_by'],\n 'platform' => isset($data['company_name'])?$data['company_name']:'art-of-elysium',\n 'home_contact_num' => $data['home_contact_num'],\n 'verified' => '0',\n 'customer_id' => isset($data['customer_id'])?$data['customer_id']:'0',\n 'email_token' => $token,\n ]);\n $user->attachRole('2');\n return $user;\n }", "protected function _fcpoCreatePayPalUser($aResponse) \n {\n $oUser = $this->_oFcpoHelper->getFactoryObject(\"oxUser\");\n\n $sUserId = $this->_fcpoGetIdByUserName($aResponse['add_paydata[email]']);\n if ($sUserId) {\n $oUser->load($sUserId);\n }\n\n list($sStreet, $sStreetNr) = $this->_fcpoSplitAddress($aResponse['add_paydata[shipping_street]']);\n $sAddInfo = '';\n if(array_key_exists('add_paydata[shipping_addressaddition]', $aResponse)) {\n $sAddInfo = $aResponse['add_paydata[shipping_addressaddition]'];\n }\n \n $oUser->oxuser__oxactive = new oxField(1);\n $oUser->oxuser__oxusername = new oxField($aResponse['add_paydata[email]']);\n $oUser->oxuser__oxfname = new oxField($aResponse['add_paydata[shipping_firstname]']);\n $oUser->oxuser__oxlname = new oxField($aResponse['add_paydata[shipping_lastname]']);\n $oUser->oxuser__oxfon = new oxField('');\n $oUser->oxuser__oxsal = new oxField($this->_fcpoGetSal($aResponse['add_paydata[shipping_firstname]']));\n $oUser->oxuser__oxcompany = new oxField('');\n $oUser->oxuser__oxstreet = new oxField($sStreet);\n $oUser->oxuser__oxstreetnr = new oxField($sStreetNr);\n $oUser->oxuser__oxaddinfo = new oxField($sAddInfo);\n $oUser->oxuser__oxcity = new oxField($aResponse['add_paydata[shipping_city]']);\n $oUser->oxuser__oxzip = new oxField($aResponse['add_paydata[shipping_zip]']);\n $oUser->oxuser__oxcountryid = new oxField($this->_fcpoGetIdByCode($aResponse['add_paydata[shipping_country]'])); \n $oUser->oxuser__oxstateid = new oxField('');\n\n if ($oUser->save()) {\n $oUser->addToGroup(\"oxidnotyetordered\");\n $oUser->fcpoUnsetGroups();\n }\n return $oUser;\n }", "public function creating(User $user)\n {\n $user->type = strlen($user->cpf_cnpj) == 14 ? 'personal' : 'business';\n }", "protected function create(array $data)\n {\n $basic = GeneralSettings::first();\n\n\n $email_verify = ($basic->email_verification == 1) ? 0 : 1;\n $phone_verify = ($basic->sms_verification == 1) ? 0 : 1;\n\n $verification_code = mt_rand(100000, 999999);\n $sms_code = mt_rand(100000, 999999);\n $email_time = Carbon::parse()->addMinutes(2);\n $phone_time = Carbon::parse()->addMinutes(2);\n\n $user = User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'username' => strtolower(trim($data['username'])),\n 'email' => strtolower(trim($data['email'])),\n 'phone' => $data['phone'],\n 'country' => $data['country'],\n 'email_verify' => $email_verify,\n 'verification_code' => $verification_code,\n 'sms_code' => $sms_code,\n 'email_time' => $email_time,\n 'phone_verify' => $phone_verify,\n 'phone_time' => $phone_time,\n 'password' => Hash::make($data['password']),\n ]);\n \n \n return $user;\n\n }", "public function createuserprofileAction(Request $request)\n {\n\t\tif (!$this->get('security.context')->isGranted('IS_AUTHENTICATED_FULLY')) {\n\t\t\t throw new AccessDeniedException();\n\t\t}\n\t\t// get loged in user Id\t\n\t\t$userId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t\t\t\n\t\t$em = $this->getDoctrine()->getManager();\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\t$entity = $em->getRepository('WebsolutioDemoBundle:UserProfile')->findOneByUser($userId);\n\t\t}\n \n\t\tif (!$entity) {\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$entity = new UserProfile('UTF-8');\n\t\t\t$entity->setUser($this->getDoctrine()->getManager()->getReference('WebsolutioDemoBundle:User',$userId));\n\t\t\t\t\t\t\t\n\t\t\t$em->persist($entity);\n\t\t\t$em->flush();\n\t\t\t$em->clear();\n\t\t}\n\t\t\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_show', array('id' => $userId)));\n\t\t}\t\n\t}", "function createOrUpdateProfile(User $user) {\n Util::throwExceptionIfNullOrBlank($user, \"User\");\n Util::throwExceptionIfNullOrBlank($user->getUserName(), \"User Name\");\n Util::throwExceptionIfNullOrBlank($user->getProfile(), \"Profile Data\");\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n\n $profile = $user->getProfile();\n\n try {\n\t\t $params = null;\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $body = null;\n $body = '{\"app42\":{\"user\":{\"userName\":\"' . $user->getUserName() . '\", \"profileData\":{\"firstName\":\"' . $profile->getFirstName() . '\",\"lastName\":\"' . $profile->getLastName() . '\",\"sex\":\"' . $profile->getSex() . '\",\"mobile\":\"' . $profile->getMobile() . '\",\"line1\":\"' . $profile->getLine1() . '\",\"line2\":\"' . $profile->getLine2() . '\",\"city\":\"' . $profile->getCity() . '\",\"state\":\"' . $profile->getState() . '\",\"country\":\"' . $profile->getCountry() . '\",\"pincode\":\"' . $profile->getPincode() . '\",\"homeLandLine\":\"' . $profile->getHomeLandLine() . '\",\"officeLandLine\":\"' . $profile->getOfficeLandLine() . '\",\"dateOfBirth\":\"' . (date(\"Y-m-d\\TG:i:s\", strtotime($profile->getDateOfBirth())) . substr((string) microtime(), 1, 4) . \"Z\") . '\"}}}}';\n\n $signParams['body'] = $body;\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type; //CONTENT_TYPE;\n $accept = $this->accept; //ACCEPT;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/profile\";\n $response = RestClient::put($baseURL, $params, null, null, $contentType, $accept, $body, $headerParams);\n $userResponseObj = new UserResponseBuilder();\n $userObj = $userResponseObj->buildResponse($response->getResponse());\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "public function createUserDetail($userName,$password,$email,$about,$onlineStatus,$maxContacts,$maxFavorites,$birthday,$gender,$avatarFile,$thumbFile,$go_id,$reg_status,$invite_user_id,$create_id,$desired_team_title='',$signup_team_id=null)\r\n {\r\n \r\n $now = time();\r\n \r\n $valueArray = array();\r\n $valueArray['name'] = $userName;\r\n $valueArray['email'] = $email;\r\n $valueArray['password'] = $password;\r\n $valueArray['about'] = $about;\r\n $valueArray['online_status'] =$onlineStatus;\r\n $valueArray['max_contact_count'] = $maxContacts;\r\n $valueArray['max_favorite_count'] = $maxFavorites;\r\n $valueArray['birthday'] = $birthday;\r\n $valueArray['gender'] = $gender;\r\n $valueArray['avatar_file_id'] = $avatarFile;\r\n $valueArray['avatar_thumb_file_id'] = $thumbFile;\r\n $valueArray['created'] = $now;\r\n $valueArray['modified'] = $now;\r\n $valueArray['go_id'] = $go_id; \r\n $valueArray['reg_status'] = $reg_status; \r\n $valueArray['invite_user_id'] = $invite_user_id; \r\n $valueArray['create_id'] = $create_id; \r\n $valueArray['desired_team_title'] = $desired_team_title; \r\n $valueArray['signup_team_id'] = $signup_team_id;\r\n if($this->DB->insert('user',$valueArray)){\r\n return $this->DB->lastInsertId(\"_id\");\r\n }else{\r\n return null;\r\n }\r\n \r\n }", "function createUsers(){\n\n\t\t\n\t\t\n\t\t$this->copyFrom('POST');\n\t\t$this->save(); // execute\n\t}", "public function profile(Request $request ){\n $user = User::with('profile')->find(Auth()->user()->id) ;\n if( $request->get('name') !== 'undefined' ){\n $user->name =$request->get('name') ; \n }\n \n $user->save() ;\n foreach ($request->except('name') as $key => $value) {\n if( $value !== 'undefined' ){\n $user->profile->$key = $value; \n }\n } \n $user->profile->membre_date = date_format(date_create( $user->created_at ), \"F d, Y \") ;\n $user->profile->save() ; \n return response()->json([ 'success' => $user ], $this->successStatus);\n\n }", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "protected function create(array $data)\n {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'profile_image' => 'https://res.cloudinary.com/dbpbpokhx/image/upload/v1558610104/tmdw3qdx5f5t1itnmz7l.png',\n 'status' => '1',\n ]);\n }", "public function create_user()\n {\n $this->data['title'] = $this->lang->line('create_user_heading');\n\n if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n {\n redirect('admin', 'refresh');\n }\n\n $tables = $this->config->item('tables','ion_auth');\n $identity_column = $this->config->item('identity','ion_auth');\n $this->data['identity_column'] = $identity_column;\n\n // validate form input\n $this->form_validation->set_rules('first_name', $this->lang->line('create_user_validation_fname_label'), 'required');\n $this->form_validation->set_rules('last_name', $this->lang->line('create_user_validation_lname_label'), 'required');\n if($identity_column!=='email')\n {\n $this->form_validation->set_rules('identity',$this->lang->line('create_user_validation_identity_label'),'required|is_unique['.$tables['users'].'.'.$identity_column.']');\n $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'required|valid_email');\n }\n else\n {\n $this->form_validation->set_rules('email', $this->lang->line('create_user_validation_email_label'), 'required|valid_email|is_unique[' . $tables['users'] . '.email]');\n }\n\n $this->form_validation->set_rules('password', $this->lang->line('create_user_validation_password_label'), 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n $this->form_validation->set_rules('password_confirm', $this->lang->line('create_user_validation_password_confirm_label'), 'required');\n\n if ($this->form_validation->run() == true)\n {\n $email = strtolower($this->input->post('email'));\n $identity = ($identity_column==='email') ? $email : $this->input->post('identity');\n $password = $this->input->post('password');\n\n $additional_data = array(\n 'first_name' => $this->input->post('first_name'),\n 'last_name' => $this->input->post('last_name'),\n 'company' => $this->input->post('company'),\n 'phone' => $this->input->post('phone'),\n );\n }\n if ($this->form_validation->run() == true && $this->ion_auth->register($identity, $password, $email, $additional_data))\n {\n // check to see if we are creating the user\n // redirect them back to the admin page\n $this->session->set_flashdata('message', $this->ion_auth->messages());\n redirect(\"/admin/users\", 'refresh');\n }\n else\n {\n // display the create user form\n // set the flash data error message if there is one\n $this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n $this->data['first_name'] = array(\n 'name' => 'first_name',\n 'id' => 'first_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('first_name'),\n );\n $this->data['last_name'] = array(\n 'name' => 'last_name',\n 'id' => 'last_name',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('last_name'),\n );\n $this->data['identity'] = array(\n 'name' => 'identity',\n 'id' => 'identity',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('identity'),\n );\n $this->data['email'] = array(\n 'name' => 'email',\n 'id' => 'email',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('email'),\n );\n $this->data['company'] = array(\n 'name' => 'company',\n 'id' => 'company',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('company'),\n );\n $this->data['phone'] = array(\n 'name' => 'phone',\n 'id' => 'phone',\n 'type' => 'text',\n 'value' => $this->form_validation->set_value('phone'),\n );\n $this->data['password'] = array(\n 'name' => 'password',\n 'id' => 'password',\n 'type' => 'password',\n 'value' => $this->form_validation->set_value('password'),\n );\n $this->data['password_confirm'] = array(\n 'name' => 'password_confirm',\n 'id' => 'password_confirm',\n 'type' => 'password',\n 'value' => $this->form_validation->set_value('password_confirm'),\n );\n\n\t\t\t$this->template->set('title', 'Users - Create');\n\t\t\t$this->template->load('admin/default_layout', 'contents' , 'admin/create_user', $this->data);\n }\n }", "protected function create(array $data)\n {\n\n if($data['address'] ==\"\")\n {\n $address = \"\";\n\n }else{\n\n $address = $data['address'];\n } \n\n if($data['original_address'] ==\"\")\n {\n $oriaddress = \"\";\n\n }else{\n\n $oriaddress = $data['original_address'];\n } \n\n\n\n\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'term_co' => $data['term_co'],\n 'brithday' => $data['brithday'],\n 'address' => $address,\n 'original_address' => $oriaddress,\n 'type' => $data['type'],\n 'credit-card-number' => $data['credit-card-number'],\n 'credit-card-date' => $data['credit-card-date'],\n 'credit-validation-code' => $data['credit-validation-code'],\n 'password' => bcrypt($data['password'])\n ]);\n\n \n \n\n }", "public static function makeComProfileUser($userId, $profileImage, $userImage, $userProfile)\n {\n $db = JFactory::getDBO();\n $query = \"SHOW TABLES LIKE '%__comprofiler'\";\n $db->setQuery($query);\n $cbTableExists = $db->loadResult();\n if (isset($cbTableExists)) {\n $firstName = self::removeUnescapedChar($userProfile['fname']);\n $lastName = self::removeUnescapedChar($userProfile['lname']);\n $path = JPATH_ROOT . DS . 'images' . DS . 'comprofiler' . DS;\n plgSystemSocialLoginTools::insertUserPicture($path, $profileImage, $userImage);\n $query = \"SELECT id FROM #__comprofiler WHERE id=\" . $db->Quote($userId);\n $db->setQuery($query);\n $updateId = $db->loadResult();\n if (!empty($updateId)) {\n $cbQuery = \"UPDATE #__comprofiler SET `firstname` = \" . $db->Quote($firstName) . \",`lastname` = \" . $db->Quote($lastName) . \",`avatar` = \" . $db->Quote($userImage) . \" WHERE id=\" . $db->Quote($userId);\n } else {\n $cbQuery = \"INSERT IGNORE INTO #__comprofiler (`id`,`user_id`,`firstname`,`lastname`,`avatar`) VALUES (\" . $db->Quote($userId) . \",\" . $db->Quote($userId) . \",\" . $db->Quote($firstName) . \",\" . $db->Quote($lastName) . \",\" . $db->Quote($userImage) . \")\";\n }\n $db->setQuery($cbQuery);\n $db->query();\n }\n }", "public function createUnifiedUserTable () {\n\n\t\t$this->output( \"\\n# Creating unified user table. \\n\" );\n\n\t\t$this->userArrayForInsert = array();\n\t\twhile( $row = array_pop( $this->userArray ) ) {\n\n\t\t\t$i = count( $this->userArrayForInsert );\n\t\t\tforeach( $this->userTableRows as $key ) {\n\n\t\t\t\t// if $key doesn't start with \"user_\" then skip it (it's not a valid field name)\n\t\t\t\tif ( strpos( $key, \"user_\" ) !== 0 ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->userArrayForInsert[$i][$key] = $row[$key];\n\t\t\t}\n\n\t\t}\n\n\t\t$db = $this->wikiDBs[$this->primeWiki];\n\t\t$db->query( 'DELETE FROM user' );\n\t\t$db->insert(\n\t\t\t'user',\n\t\t\t$this->userArrayForInsert,\n\t\t\t__METHOD__\n\t\t);\n\t\t$autoInc = count( $this->userArrayForInsert ) + 1;\n\t\t$db->query( \"ALTER TABLE user AUTO_INCREMENT = $autoInc;\" );\n\n\t}", "protected function create(array $data)\n { \n if ($data['tipo_user_id'] == 1) {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'universidade_id'=>$data['universidade_id'],\n 'cursos_id'=>$data['cursos_id'],\n 'departamento_id'=>$data['departamento_id'],\n 'tipo_user_id'=>$data['tipo_user_id'],\n 'biografia'=>$data['biografia']\n ]);\n }\n else{\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'universidade_id'=>$data['universidade_id'],\n 'departamento_id'=>$data['departamento_id'],\n 'tipo_user_id'=>$data['tipo_user_id'],\n 'biografia'=>$data['biografia']\n ]);\n }\n }", "private function parse_facebook_profile($user_info)\n {\n $user_profile = new SocialProfile();\n\n foreach($user_info as $key => $field)\n {\n switch ($key)\n {\n case 'id':\n $user_profile->id = $field;\n break;\n case 'first_name':\n $user_profile->given_name = $field;\n break;\n case 'last_name':\n $user_profile->last_name = $field;\n break;\n case 'gender':\n $user_profile->gender = $field;\n break;\n case 'email':\n $user_profile->email = $field;\n break;\n default:\n break;\n }\n }\n\n return $user_profile;\n }", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'gender'=>$data['gender'],\n 'tel_mobile'=>$data['tel_mobile'],\n 'country_code'=>$data['country_code'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activated' => !config('settings.send_activation_email')\n ]);\n }", "public function createUser( UserDataInf $user )\n {\n \n $userName = $user->getName();\n \n if( $this->userExists( $userName ) )\n {\n $this->protocol->info( \"Systemuser {$userName} allready exists.\" ); \n return;\n }\n \n $sqlPerson = <<<SQL\nINSERT INTO core_person\n( firstname, lastname )\nVALUES\n( '{$user->getFirstname()}', '{$user->getLastname()}' );\nSQL;\n\n $idPerson = $this->db->insert( $sqlPerson );\n $passwd = Password::passwordHash( $user->getPasswd() );\n \n $sqlUser = <<<SQL\nINSERT INTO wbfsys_role_user\n( \n name, \n id_person, \n inactive, \n non_cert_login,\n profile,\n level,\n password\n)\nVALUES\n( \n '{$userName}', \n {$idPerson}, \n FALSE, \n TRUE, \n '{$user->getProfile()}', \n '{$user->getLevel()}',\n '{$passwd}'\n);\nSQL;\n\n $idUser = $this->db->insert( $sqlUser );\n \n }", "static function constructUserFromDB($id){\n $userDetails = getCurrentUserDB($id);\n $userName = $userDetails[1];\n $userEmail = $userDetails[2];\n $userJapanSkill = $userDetails[3]; \n $userEnglishSkill = $userDetails[4];\n $userImageRef = $userDetails[5];\n $userCustomInfo = $userDetails[6];\n $isOrganiser = $userDetails[7];\n $userCreated = $userDetails[8];\n $user = new User($id, $userName, $userEmail, $userJapanSkill, $userEnglishSkill); \n $user->isOrganiser = $isOrganiser;\n $user->userCustomInfo = $userCustomInfo;\n \n if (strlen($userImageRef) > 2) {\n $user->userImageRef = $userImageRef;\n } else {\n $user->userImageRef = \"profiledefault.jpg\";\n }\n \n $user->userCreated = $userCreated;\n return $user;\n }", "public function store($user_data)\n\t{\n\t\t$new_user = new User;\n\t\t$new_user->role_id \t\t\t= $user_data['role_id'];\n\t\t$new_user->first_name \t\t= (isset($user_data['first_name']) && !empty($user_data['first_name'])) \t\t? $user_data['first_name'] \t: null;\n\t\t$new_user->last_name \t\t= (isset($user_data['last_name']) && !empty($user_data['last_name'])) \t\t\t? $user_data['last_name'] \t: null;\n\t\t$new_user->username \t\t= $user_data['username'];\n\t\t$new_user->password \t\t= (Hash::needsRehash($user_data['password'])) ? Hash::make($user_data['password']) : $user_data['password'];\n\t\t$new_user->email \t\t\t= $user_data['email'];\n\t\t$new_user->birthdate \t\t= (isset($user_data['birthdate']) && !empty($user_data['birthdate'])) \t\t\t? $user_data['birthdate'] \t\t: null;\n\t\t$new_user->phone \t\t\t= (isset($user_data['phone']) && !empty($user_data['phone'])) \t\t\t\t\t? $user_data['phone'] \t\t\t: null;\n\t\t$new_user->facebook \t\t= (isset($user_data['facebook']) && !empty($user_data['facebook']))\t\t\t\t? $user_data['facebook'] \t\t: null;\n\t\t$new_user->twitter \t\t\t= (isset($user_data['twitter']) && !empty($user_data['twitter'])) \t\t\t\t? $user_data['twitter'] \t\t: null;\n\t\t$new_user->profile_image \t= (isset($user_data['profile_image']) && !empty($user_data['profile_image'])) \t? $user_data['profile_image'] \t: null;\n\t\t$new_user->cover_image \t\t= (isset($user_data['cover_image']) && !empty($user_data['cover_image'])) \t\t? $user_data['cover_image'] \t: null;\n\t\t$new_user->cover_text \t\t= (isset($user_data['cover_text']) && !empty($user_data['cover_text']))\t\t\t? $user_data['cover_text'] \t\t: null;\n\t\tif($new_user->save())\n\t\t\treturn $new_user;\n\t\telse\n\t\t\treturn false;\n\t}", "public function createUser(array $config = []);", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['firstname'],\n 'last_name' => $data['lastname'],\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'profile_id' => $this->generateRandomID(5),\n 'hobbies_id' => $this->generateRandomID(5)\n ]);\n }", "private function findOrCreateUser($facebookUser)\n {\n $authUser = User::where('facebook', $facebookUser->id)->first();\n \t\t\n if ($authUser){\n return $authUser;\n }\n \n return User::create([\n 'name' => $facebookUser->name,\n 'email' => $facebookUser->email,\n 'facebook' => $facebookUser->id,\n 'avatar' => $facebookUser->avatar\n ]);\n }", "protected function create(array $data)\n {\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'username' => preg_replace('/[^\\da-z]/i','',str_replace(' ','',$data['username'])),\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'imgpath'=> 'uploads/default.png',\n 'namespi'=>'default',\n 'status'=>'1',\n 'code'=>mt_rand(1000,9999),\n 'type'=>'basic',\n 'nfiles'=>'100',\n 'tsize'=>'100',\n 'gender'=>$data['gender'],\n 'bio'=>'',\n 'followers'=>'',\n\n ]);\n }", "private function fillCreationDetails(User $user) {\n $user->CreatedBy = Auth::user()->UserName;\n $user->CreatedDate = date(\"y-m-d h:i:s\");\n }", "public function createUserFromSocialite($user);", "protected function create(array $data)\n {\n $pp = new User();\n $pp->refresh();\n $num = $pp->generateAccountCode();\n\n $customer_role = Role::query()->where('name', 'customer')->firstOrFail();\n\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'account_code' => $num,\n 'mobile' => $data['mobile'],\n 'cnic' => $data['cnic'],\n 'address' => $data['address'],\n 'role_id' => $customer_role->id , // 2 is for customer for now\n 'originality_verified' => 0, // 0 means not verified by the admin\n 'password' => Hash::make($data['password']),\n ]);\n }", "protected function create(array $data)\n {\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'country_id' => $data['country_id'],\n 'email' => $data['email'],\n //'activation_code' => $data['activation_code'],\n 'password' => bcrypt($data['password']),\n ]);\n }", "public function getUserProfile() {\n\n\t\t$data = $this->api->get( 'people/~:('. implode(',', $this->config['fields']) .')?format=json' );\n\n\t\t// if the provider identifier is not received, we assume the auth has failed\n\t\tif ( ! isset( $data->id ) ) {\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response: \" . Hybrid_Logger::dumpData( $data ), 6 );\n\t\t}\n\n\t\t// # store the user profile.\n\t\t$this->user->profile->identifier = ( property_exists ( $data, 'id' ) ) ? $data->id : '';\n\t\t$this->user->profile->firstName = ( property_exists ( $data, 'firstName' ) ) ? $data->firstName : '';\n\t\t$this->user->profile->lastName = ( property_exists ( $data, 'lastName' ) ) ? $data->lastName : '';\n\t\t$this->user->profile->profileURL = ( property_exists ( $data, 'publicProfileUrl' ) ) ? $data->publicProfileUrl : '';\n\t\t$this->user->profile->email = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->emailVerified = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->photoURL = ( property_exists ( $data, 'pictureUrl' ) ) ? $data->pictureUrl : '';\n\t\t$this->user->profile->description = ( property_exists ( $data, 'summary' ) ) ? $data->summary : '';\n\t\t$this->user->profile->country = ( property_exists ( $data, 'country' ) ) ? strtoupper( $data->country ) : '';\n\t\t$this->user->profile->displayName = trim( $this->user->profile->firstName . ' ' . $this->user->profile->lastName );\n\n\t\tif ( property_exists( $data, 'phoneNumbers' ) && property_exists( $data->phoneNumbers, 'phoneNumber' ) ) {\n\t\t\t$this->user->profile->phone = (string) $data->phoneNumbers->phoneNumber;\n\t\t} else {\n\t\t\t$this->user->profile->phone = null;\n\t\t}\n\n\t\tif ( property_exists( $data, 'dateOfBirth' ) ) {\n\t\t\t$this->user->profile->birthDay = (string) $data->dateOfBirth->day;\n\t\t\t$this->user->profile->birthMonth = (string) $data->dateOfBirth->month;\n\t\t\t$this->user->profile->birthYear = (string) $data->dateOfBirth->year;\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }" ]
[ "0.632334", "0.6116325", "0.6043701", "0.59704643", "0.59675735", "0.59269094", "0.5902332", "0.58426166", "0.58307564", "0.5787559", "0.5766224", "0.5762231", "0.57604074", "0.57460773", "0.5745956", "0.5742068", "0.5740418", "0.57384783", "0.5728681", "0.57059616", "0.5690376", "0.56877375", "0.5685367", "0.5675826", "0.56477714", "0.56438994", "0.5639966", "0.5625153", "0.5623558", "0.5616267", "0.56155956", "0.56040823", "0.55994725", "0.55949694", "0.5590456", "0.5586069", "0.5576839", "0.55739653", "0.5565704", "0.5565704", "0.5565704", "0.5565704", "0.5561559", "0.5548316", "0.5547274", "0.55472165", "0.5545777", "0.5538075", "0.55349505", "0.5534209", "0.5530296", "0.55301845", "0.55149627", "0.5511748", "0.55106455", "0.5507029", "0.55040216", "0.5496783", "0.54923654", "0.54917455", "0.5491269", "0.5488497", "0.547936", "0.5468559", "0.54634655", "0.5458727", "0.54553765", "0.5448121", "0.5446153", "0.5446027", "0.5445525", "0.544497", "0.543946", "0.5439172", "0.5438638", "0.54357344", "0.54313993", "0.5431026", "0.54299295", "0.5427143", "0.54266155", "0.5423239", "0.5423035", "0.54153985", "0.5415122", "0.5412445", "0.5407269", "0.54036874", "0.5402585", "0.54000413", "0.53969496", "0.5396822", "0.53893185", "0.53868794", "0.538646", "0.538446", "0.53785145", "0.5375553", "0.5375378", "0.5374355" ]
0.6320776
1
Make new User Profile without User Model
public function make(array $columns, $type);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionProfilecreate()\n {\n $model = new Profile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('profilecreate', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $user = new User(['scenario' => 'create']);\n $profile = new Profile();\n\n if ($user->load(Yii::$app->request->post()) && $profile->load(Yii::$app->request->post())) {\n if ($user->validate() && $profile->validate()) {\n //$user->populateRelation('profile', $profile);\n if ($user->save(false)) {\n $user->link('profile', $profile);\n Yii::$app->session->setFlash('success', Module::t('users', 'User has been successfully created.'));\n return $this->redirect(['update', 'id' => $user->id]);\n } else {\n Yii::$app->session->setFlash('danger', Module::t('users', 'User has not been saved. Please try again!'));\n return $this->refresh();\n }\n }\n }\n\n return $this->render('create', [\n 'user' => $user,\n 'profile' => $profile\n ]);\n }", "public function actionCreate()\n {\n $model = new User();\n\n $profile = new UserProfile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $userProfile = Yii::$app->request->post('UserProfile');\n $profile->user_id = $model->id;\n $profile->phone = $userProfile['phone'];\n $profile->firstname = $userProfile['firstname'];\n $profile->lastname = $userProfile['lastname'];\n $profile->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'profile' => $profile,\n ]);\n }", "public function create()\n\t{\n\t\t//\n\t\t$user = Auth::user();\n\t\tif($user->profiles()->first()){\n\t\treturn Redirect::to('/profiles/');\n\t\t}else{\n\t\treturn View::make('profiles.create');\t\n\t\t}\n\t\t\n\t}", "public function create()\n {\n $user = $this->userProfileService->findUser()->getUser();\n \n return redirect()->route('user_profile.edit', $user->id);\n }", "public function createuserprofileAction(Request $request)\n {\n\t\tif (!$this->get('security.context')->isGranted('IS_AUTHENTICATED_FULLY')) {\n\t\t\t throw new AccessDeniedException();\n\t\t}\n\t\t// get loged in user Id\t\n\t\t$userId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t\t\t\n\t\t$em = $this->getDoctrine()->getManager();\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\t$entity = $em->getRepository('WebsolutioDemoBundle:UserProfile')->findOneByUser($userId);\n\t\t}\n \n\t\tif (!$entity) {\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$entity = new UserProfile('UTF-8');\n\t\t\t$entity->setUser($this->getDoctrine()->getManager()->getReference('WebsolutioDemoBundle:User',$userId));\n\t\t\t\t\t\t\t\n\t\t\t$em->persist($entity);\n\t\t\t$em->flush();\n\t\t\t$em->clear();\n\t\t}\n\t\t\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_show', array('id' => $userId)));\n\t\t}\t\n\t}", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "public function actionCreate()\n {\n $model = new User();\n\n if (isset($_POST['User']))\n {\n\n $transaction = Yii::app()->db->beginTransaction();\n\n try\n {\n $model->setAttributes($_POST['User']);\n $model->salt = Registration::model()->generateSalt();\n $model->password = Registration::model()->hashPassword($model->password, $model->salt);\n $model->registrationIp = Yii::app()->request->userHostAddress;\n\n if ($model->save())\n {\n $profile = new Profile();\n $profile->user_id = $model->id;\n if ($profile->save())\n {\n $transaction->commit();\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Новый пользователь добавлен!'));\n $this->redirect(array('view', 'id' => $model->id));\n }\n else\n {\n throw new CDbException(Yii::t('user', 'При создании пользователя произошла ошибка! Подробности в журнале исполнения.'));\n }\n }\n\n }\n catch (CDbException $e)\n {\n $transaction->rollback();\n Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, UserModule::$logCategory);\n Yii::app()->user->setFlash(YFlashMessages::ERROR_MESSAGE, $e->getMessage());\n $this->redirect(array('create'));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function actionCreate()\n\t{\n\t\t$model=new Profile;\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['Profile']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Profile'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->user_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n {\n /** get the id of user */\n $id = Auth::user()->id;\n // dd($id);\n\n /** get the collection of user details */\n $profiles = User::find($id)->user_details;\n // dd($profiles);\n\n return view('shared.form_profiles')->with('id',$id);\n }", "public function profileAction(){\n /** @var Object_User $user */\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['phone'])){\n $user->setPhone($data['phone']);\n }\n if(isset($data['email'])){\n $user->setPhone($data['email']);\n }\n if(isset($data['workphone'])){\n $user->setWorkPhone($data['workphone']);\n }\n if(isset($data['workemail'])){\n $user->setWorkEmail($data['workemail']);\n }\n if(!$user->save()){\n $this->setErrorResponse('Cannot update user profile');\n }\n $this->_helper->json($user);\n }", "public function create()\n\t{\n\t\t$profile = Profile::first();\n\t\treturn view('admin.profile.create', compact('profile'));\n\t}", "public function create()\n {\n //\n return View('profile.createprofile');\n }", "public function actionCreate()\n {\n $model = new ProfileModel();\n $model->scenario = Constants::SCENARIO_SIGNUP;\n\n $db = \\Yii::$app->db;\n $transaction = $db->beginTransaction();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //now insert the login credentials into teh authentication model\n $authModel = new AuthenticationModel();\n $authModel->isNewRecord = true;\n\n $authModel->USER_ID = $model->USER_ID;\n $authModel->PASSWORD = $model->PASSWORD;\n $authModel->ACCOUNT_AUTH_KEY = $model->ACCOUNT_AUTH_KEY;\n if ($authModel->save()) {\n //commit transaction\n $transaction->commit();\n //$this->redirect(['view', 'id' => $model->USER_ID]);\n $this->redirect(['//site/login']);\n } else {\n //roll back the transaction\n $model->PASSWORD = null; //clear the password field\n $model->REPEAT_PASSWORD = null; //clear the repeat password field\n $model->ACCOUNT_AUTH_KEY = null;\n $transaction->rollback();\n }\n }\n return $this->render('create', ['model' => $model,]);\n }", "public function create()\n {\n // With Auth::user find the current user\n $user = User::with('profile')->find(Auth::user()->id);\n // Saves the profile from the current user in variable \n $profile = $user->profile;\n // Returns the view and gives two different variables for the view ($profile), ($user)\n return view('jobExperience.create')->with('profile', $profile)->with('user', $user);\n\n }", "public function store(CreateUserRequest $request)\n {\n $input = $request->all();\n\n $input['password'] = bcrypt('password');\n $input['api_token'] = str_random(60);\n\n $profile = $input['profile'];\n $profile['driver_id'] = strtoupper(uniqid());\n unset($input['profile']);\n\n if ($request->hasFile('file')) {\n $file = $request->file('file');\n $path = $file->store('documents');\n\n $profile['document_file'] = $path;\n }\n\n\n if ($request->hasFile('picture')) {\n $file = $request->file('picture');\n $path = $file->store('documents');\n\n $profile['profile_picture'] = $path;\n }\n unset($input['file']);\n unset($input['picture']);\n\n $user = User::create($input);\n $user->profile()->create($profile);\n\n return redirect('/users');\n }", "public function create()\n {\n return redirect('profile');\n }", "public function store(StoreUserRequest $request)\n {\n // echo '<pre>'; // user profile\n // print_r($request->all()); exit();\n if ($request->hasFile('profile_pic')) {\n $file = $request->file('profile_pic');\n $image = $file->getClientOriginalExtension();\n $newfile = time().'_'.rand().'_'.'user-profile'.'.'.$image;\n $fmove = $file->move(public_path().'/user/image/',$newfile);\n $user_pic = $newfile;\n }\n\n $user = User::create([\n 'role_id' => 2,\n 'first_name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'avatar_type' => 'profile-image',\n 'avatar_location' =>isset($user_pic)?$user_pic:'',\n 'password' => $request->password,\n 'active' => isset($request->active) && $request->active === '1',\n 'confirmation_code' => md5(uniqid(mt_rand(), true)),\n 'confirmed' => isset($request->confirmed) && $request->confirmed === '1',\n ]);\n //Send confirmation email if requested and account approval is off\n if ($user->confirmed === false && ! config('access.users.requires_approval')) {\n $user->notify(new UserNeedsConfirmation($user->confirmation_code));\n }\n if (!empty($user->id)) {\n //echo $user->id; exit();\n $userProfile = new UserProfile; \n $userProfile->user_id = $user->id; \n $userProfile->gender = $request->gender; \n $userProfile->date_of_birth = $request->date_of_birth;\n $userProfile->interests = isset($request->interests)? implode(\",\",$request->interests):''; \n $userProfile->contact_numbers = $request->contact_numbers; \n $userProfile->country = $request->country; \n $userProfile->state = $request->state; \n $userProfile->city = $request->city; \n $userProfile->address = $request->address; \n $userProfile->interested_in = $request->interested_in;\n $userProfile->summery = $request->summery;\n $userProfile->profile_pic = isset($user_pic)?$user_pic:'';\n $userProfile->save(); \n } \n return redirect()->route('admin.user')->withFlashSuccess(__('alerts.backend.users.created'));\n }", "public function create()\n {\n $user = Auth::user();\n return view('admin.profile.create', compact('user'));\n }", "public function createProfile(array $data);", "public function actionCreate()\n {\n $model = new UserProfile();\n\n $model->user_id = Yii::$app->user->identity->id;\n\n\n $POST_VARIABLE = Yii::$app->request->post('Place');\n echo $POST_VARIABLE['first_name'];\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } elseif ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash(\"success\", Yii::t('app', 'Profile successfully created!'));\n return $this->redirect(['view']);\n\n } else {\n// echo $model->user_id;\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }", "public function create()\n {\n $user = Auth::user();\n $roleName = $user->usersRoles->first()->role->name;\n $user_id = $this->usersRepository->findWhere(['id' => $user->id])->first();\n\n return view('profiles.create')->with('user_id',$user_id)->with('roleName',$roleName);\n }", "public function creating(User $user)\n {\n if(!isset($user->profile_image)) {\n $user->profile_image = config('images.default_user_avatar');\n }\n }", "public function create(Request $request)\n {\n $user = Auth::user();\n $profile = $user->profile; \n return view('profile.create',compact('profile'));\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public function index()\n {\n $user = Auth::user();\n $id = Auth::id();\n if ($user->profile == null) {\n $profile = Profile::create([\n 'age' => 1,\n 'user_id' => $id,\n 'city' => 'input_city',\n 'gender' => 'input_gender',\n 'job' => 'input_job',\n 'bio' => 'input_bio_haer'\n\n ]);\n return view('users.profile')->with('user',$user);\n }else{\n return view('users.profile')->with('user',$user);\n }\n }", "public function store()\n\t{\n\n\t\t// get current user\n\t\t$user = Auth::user();\n\n\t\t// get data\n\t\t$input = Input::get();\n\n\t\t// create record\n\t\t$profile = new Profile;\n\t\t$profile->business = $input['business'];\n\t\t$profile->name = $input['name'];\n\t\t$profile->last = $input['last'];\n\t\t$profile->contact = $input['contact'];\n\t\t$profile->address = $input['address'];\n\t\t$profile->address2 = $input['address2'];\n\t\t$profile->city = $input['city'];\n\t\t$profile->state = $input['state'];\n\t\t$profile->zip = $input['zip'];\n\t\t$profile->country = $input['country'];\n\t\t$profile->save();\n\n\t\t// Link it to user\n\t\t$user->profiles()->attach($profile->id);\n\n\t\treturn Redirect::back();\n\t\t\n\t}", "public function createAction()\n {\n $profileForm = new Application_Form_Profile(['id' => 'create-profile']);\n $this->view->profileForm = $profileForm;\n\n /**\n * GET handler request\n */\n $requestShowProfileFormOnly = !$this->getRequest()->isPost();\n if ($requestShowProfileFormOnly) {\n return; //show profile form now\n }\n\n /**\n * POST handler request\n */\n $invalidProfileSubmited = !$profileForm->isValid($this->getRequest()->getPost());\n if ($invalidProfileSubmited) {\n return; //show profile form with errors messages\n }\n\n /**\n * Persit valid profile after filtered\n */\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileModelFactory = new Application_Factory_ProfileModel();\n\n $profileEntity = $profileModelFactory->createService($profileForm->getValues());\n $profileRepo = $profileRepoFactory->createService();\n $profileRepo->save($profileEntity);\n\n return $this->_helper->redirector('index', 'profile', 'default');\n }", "public function creating(Profile $profile)\n {\n $profile->avatar = 'https://www.gravatar.com/avatar/'.md5($profile->gravatar_email);\n }", "public function actionCreate()\n {\n $model = new User();\n $employee=new UserProfile();\n if ($model->load(Yii::$app->request->post()) && $employee->load(Yii::$app->request->post())) {\n $model->password=Yii::$app->getSecurity()->generatePasswordHash($model->password);\n if($model->save()){\n $employee->user_id=$model->id;\n $employee->photo = UploadedFile::getInstance($employee, 'photo');\n if ($employee->photo){ \n $photo_name='profile_'.date('Ymdhis').'.' . $employee->photo->extension; \n $employee->photo->saveAs(\\Yii::$app->basePath.'/web/images/' . $photo_name);\n $employee->photo=$photo_name;\n }\n if($employee->save())\n {\n return $this->redirect(['index']);\n }\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'employee'=>$employee\n ]);\n }", "public function createUser($name, $pass, $profile, array $extra = []);", "public function create()\n\t{\n\t\treturn view('admin.profiles.create');\n\t}", "public function create_profile(Request $request)\n {\n //validate incoming request \n $this->validate($request, [\n 'first_name' => 'required|string',\n 'last_name' => 'required|string',\n 'phone_number'=>'required',\n 'date_of_birth'=>'required'\n \n ]);\n\n try \n {\n $profile = new User_profile();\n \n $profile->user_id = $request->input('user_id');\n $profile->first_name = $request->input('first_name');\n $profile->last_name = $request->input('last_name');\n $profile->phone_number = $request->input('phone_number');\n $profile->date_of_birth = $request->input('date_of_birth');\n\n $profile->save();\n\n return response()->json( [\n 'entity' => 'profile', \n 'action' => 'create', \n 'result' => 'success'\n ], 201);\n\n } \n catch (\\Exception $e) \n {\n return response()->json( [\n 'entity' => 'profile', \n 'action' => 'create', \n 'result' => 'failed'\n ], 409);\n }\n }", "public function store(ProfileCreateRequest $request)\n {\n $profile = new Profile([\n 'nombre' => $request['nombre'],\n 'apP' => $request['apP'],\n 'apM' => $request['apM'],\n 'telefono' => $request['telefono'],\n 'fechaNac' => $request['telefono'],\n 'user_id' =>$request['id'],\n ]);\n $profile->save();\n $user = User::find($request['id']);\n\n Session::flash('message','Datos ingresados Correctamente');\n return view('profileUsr.profile',compact('user','profile'));\n\n }", "public function create()\n {\n return view('user.profile', ['admin' => true]);\n }", "public function create()\n {\n\n return view('profiles.profile.create');\n\n }", "public function store(Request $request)\n {\n //\n $this->validate($request,[\n 'name'=>'required',\n 'email'=>'required',\n\n ]);\n $user = User::create([\n 'name'=>$request->name,\n 'email'=>$request->email,\n 'password'=>bcrypt('password123'),\n ]);\n\n\n\n Profile::create([\n 'user_id'=>$user->id,\n 'avatar'=>'uploads/avatars/1.jpg'\n ]);\n\n session()->flash(\"success\",\"User created successfully\");\n\n return redirect(route(\"users.index\"));\n\n\n }", "public function createUser(){\n \n $password = DbrLib::rand_string(8);\n \n /**\n * create username \n */\n $firstName = strtolower(self::translitStringToAscii($this->pprs_first_name));\n $secondName = strtolower(self::translitStringToAscii($this->pprs_second_name));\n $username = $firstName . substr($secondName, 0, 1);\n $i = 1;\n while(User::model()->findByAttributes(['username'=>$username])){\n $i ++;\n if($i> strlen($secondName)){\n $username = $firstName . DbrLib::rand_string(2);\n }\n $username = $firstName . substr($secondName, 0, $i); \n }\n \n /**\n * get email from person contacts\n */\n $contacts = $this->ppcnPersonContacts;\n $email = '';\n foreach($contacts as $contact){\n if($contact->ppcn_pcnt_type == PcntContactType::TYPE_EMAIL ){\n $email = trim($contact->ppcn_value);\n }\n }\n \n /**\n * create user record\n */\n $user = new User();\n $user->username = $username;\n $user->password = $password;\n $user->email = $email;\n $user->status = User::STATUS_ACTIVE;\n \n if(!$user->validate()){\n return CHtml::errorSummary($user);\n }\n \n $user->save();\n \n /**\n * create profile record\n */\n $profile=new Profile;\n $profile->user_id=$user->id;\n $profile->first_name = $this->pprs_first_name;\n $profile->last_name = $this->pprs_second_name;\n $profile->sys_ccmp_id = Yii::app()->sysCompany->getActiveCompany();\n $profile->person_id=$this->primaryKey;\n\t\t$profile->save(); \n \n return true;\n \n \n }", "public function createProfile($user_id)\n {\n return $this->makeRequest('POST', false, [\n 'method' => 'profile.create',\n 'user_id' => $user_id,\n ]);\n }", "protected function createNewUserProfile($data)\n {\n $userProfile = new UserProfile();\n $persistedUserProfile = $this->processForm($userProfile, $data, 'POST');\n return $persistedUserProfile;\n }", "protected function create(array $data)\n {\n\n define('UPLOAD_DIR', 'uploads/profiles/');\n $img = $data['profilePictureEncoded'];\n $newImage = str_replace('data:image/png;base64,', '', $img);\n $image = explode(\",\",$img);\n $test = base64_decode($image[1]);\n $fileName = UPLOAD_DIR . uniqid() . '.jpeg';\n file_put_contents($fileName, $test);\n\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'profile_picture' => '/' . $fileName,\n 'type' => 1,\n ]);\n }", "public function store(Request $request)\n {\n $this->validate($request , [\n 'name' => 'required',\n 'email' => 'required'\n \n ]);\n \n $user=User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' => bcrypt('password')\n \n ]);\n \n $profiles = profile::create([\n 'user_id' => $user->id,\n 'avatar' => 'upload\\avatar\\1.png',\n ]);\n \n return redirect() -> route('users.index');\n }", "public static function create($attributes = [], $exists = false) {\n $user = User::create(array_merge($attributes, ['type' => 'admin']));\n return $user->profile;\n }", "public function __construct()\n\t\t{\n\t\t\tparent::__construct('app/models/profiles/resource/user');\n\t\t}", "public static function profile($profile){\n $pro = Profile::where('user_id',Auth::id())->first();\n if ($pro){\n $pro->update($profile);\n }else{\n Profile::create($profile);\n }\n }", "public function create()\n {\n $skills = Skill::all();\n $locations = Location::all();\n\n return view('profile.create')->with('skills', $skills)->with('locations', $locations);\n }", "public function create()\n {\n $userid=Auth::user()->id;\n $profile=UsersProfile::where('user_id','=',$userid)->count();\n if($profile != 0 )\n return redirect('app/');\n $relations = [\n 'users' => \\App\\User::get()->pluck('name', 'id')->prepend('Please select', ''),\n\n ];\n $countres = Country::get(); \n $spicals = Spical::get(); \n\n \n return view('apps.creatprofile', compact('countres','spicals') + $relations);\n }", "public function profile(Request $request ){\n $user = User::with('profile')->find(Auth()->user()->id) ;\n if( $request->get('name') !== 'undefined' ){\n $user->name =$request->get('name') ; \n }\n \n $user->save() ;\n foreach ($request->except('name') as $key => $value) {\n if( $value !== 'undefined' ){\n $user->profile->$key = $value; \n }\n } \n $user->profile->membre_date = date_format(date_create( $user->created_at ), \"F d, Y \") ;\n $user->profile->save() ; \n return response()->json([ 'success' => $user ], $this->successStatus);\n\n }", "public function profileAction() {\n $user = User::getCurrent();\n if (!$user instanceOf BaseUser) {\n throw new \\Exception (\"No current user in Profile action\");\n }\n $data = array();\n $user = $this->processPost($user);\n $formElements = array(\n 'uname'=>array('label'=>'User Name', 'name_segment'=>'uname',\n 'placeholder'=>'User Name',),\n 'email'=>array('label'=>'Email?', 'name_segment'=>'email',\n 'placeholder'=>'Email',),\n 'fname'=>array('label'=>'First Name', 'name_segment'=>'fname',\n 'placeholder'=>'Your First Name',),\n 'lname'=>array('label'=>'Last Name', 'name_segment'=>'lname',\n 'placeholder'=>'Your Last Name', ),\n 'profiles'=>array('input'=>'formset','subform'=>'profiles',\n 'name_segment'=>'profiles', 'class'=> 'doggy','create_label'=>'Create New',\n 'elements'=> array(\n 'profile_description'=>array('name_segment'=>'profile_description', \n 'data-stuff'=>'fromUserController', 'label' => 'Prof Desc',\n 'placeholder'=>\"Describe your profile\", ),\n 'profile_name'=>array('type'=>'text', 'name_segment'=>'profile_name',\n 'data-stuff'=>'fromUserController', 'label'=>'Prof Name',\n 'placeholder'=>\"Profile Name of Blue Blazer\", )\n ),\n ),\n );\n $formArgs = array('base_object'=>$user, 'elements'=>$formElements,\n 'name_segment'=>'user');\n $form = new BaseForm($formArgs);\n $form->bind($user);\n $data['form'] = $form;\n return $data;\n }", "public function created(User $user)\n {\n Userprofile::create([\n 'users_id' => $user->id,\n 'address' => 'Your Address',\n 'phone_number' => 'Your Number',\n 'city' => 'Your City',\n 'country' => 'Your Country',\n 'body' => 'Something About Yourself',\n 'user_img' => 'Your image here'\n ]);\n }", "public function create()\n {\n return view('admin.profile.create');\n }", "public function create()\n {\n date_default_timezone_set('Asia/Kuala_Lumpur');\n $profiles = new Profiles;\n $profiles->profile_id = $request->input('data.profile_id');\n $profiles->profile_name = $request->input('data.profile_name');\n $profiles->profile_email = $request->input('data.profile_email');\n $profiles->save();\n return 'Data Created';\n }", "public function createProfile($admin = false);", "public function create()\n {\n return view('admin.profiles.create');\n }", "public function create()\n {\n return view('profile.create');\n }", "public function create()\n {\n return view('profile.create');\n }", "public function create()\n {\n return view('profile.create');\n }", "public function saveProfile()\n {\n if ($this->validate()) {\n $user = $this->user;\n\n $graph = Yii::$container\n ->get(\\common\\components\\Graph::class, [$this->user]);\n\n if ($this->timezone) {\n $user->timezone = $this->timezone;\n }\n if ($this->expose_graph) {\n $user->expose_graph = true;\n\n // generate behaviors graph image\n $checkins_last_month = (Yii::$container->get(\\common\\interfaces\\UserBehaviorInterface::class))\n ->getCheckInBreakdown();\n\n // if they haven't done a check-in in the last month this will explode\n // because $checkins_last_month is an empty array\n if ($checkins_last_month) {\n $graph->create($checkins_last_month, true);\n }\n } else {\n $user->expose_graph = false;\n // remove behaviors graph image\n $graph->destroy();\n }\n\n if ($this->send_email) {\n $user->send_email = true;\n $user->email_category = $this->email_category;\n $user->partner_email1 = $this->partner_email1;\n $user->partner_email2 = $this->partner_email2;\n $user->partner_email3 = $this->partner_email3;\n } else {\n $user->send_email = false;\n $user->email_category = 4; // default to \"Speeding Up\"\n $user->partner_email1 = null;\n $user->partner_email2 = null;\n $user->partner_email3 = null;\n }\n $user->save();\n return $user;\n }\n\n return null;\n }", "public function create(){\n\t\tif(isset($id)){\n\t\t\t$userprofile=Usersprofile::find($id);\n\t\t\treturn view('usersprofile.form',compact('userprofile'));\n\t\t}else{\n\t\t\t$userprofile=array();\n\t\t\treturn view('usersprofile.form',$userprofile);\n\t\t}\n\t}", "public function store(StoreProfile $request)\n {\n //dd($request->all());\n $name = 'images/no-thumbnail.jpeg';\n $path = 'images/no-thumbnail.jpeg';\n if($request->has('thumbnail')){\n $extension = \".\".$request->thumbnail->getClientOriginalExtension();\n $name = round(1111,9999999).'_'.time();\n $name = $name.$extension;\n $path = $request->thumbnail->storeAs('profiles',$name,'public');\n }\n $user = User::create([\n 'name'=>$request->name,\n 'email'=>$request->email,\n 'password'=> bcrypt($request->password),\n 'status'=>$request->status,\n ]);\n\n if($user){\n $profile = Profile::create([\n 'user_id' => $user->id,\n 'name' => $request->email,\n 'slug' => $request->slug,\n 'phone' => $request->phone,\n 'address' => $request->address,\n 'thumbnail' => 'profiles/'.$name,\n ]);\n }\n if ($user && $profile) {\n return Redirect::to('admin/profile')\n ->with('success', 'User Created Successfully');\n } else {\n return back()->with('message', 'Error Inserting new User');\n }\n }", "protected function _createUser()\n {\n $data = [\n 'email' => '[email protected]',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "public function createBlankUser()\r\n {\r\n $user = CrugeFactory::get()->getICrugeStoredUserNewModel();\r\n if ($user != null) {\r\n // asegura que no falle al validar por terminos y condiciones\r\n $user->terminosYCondiciones = true;\r\n // asegura que no falle al validar por captcha\r\n //\tcruge\\models\\data\\CrugeStoredUser.php (bypassCaptcha y _getCaptchaRule)\r\n $user->bypassCaptcha = true;\r\n return $user;\r\n } else {\r\n return null;\r\n }\r\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function store()\n {\n\n request()->validate([\n 'uname'=> 'required',\n 'useremail'=> 'required',\n 'fname'=>'required',\n 'lname'=> 'required',\n 'pasword' => 'required',\n 'userroll' => 'required'\n\n ]);\n\n $user = new userprofiles();\n\n $user->uname = request('uname');\n $user->useremail = request('useremail');\n $user->fname = request('fname');\n $user->lname = request('lname');\n $user->pasword = request('pasword');\n $user->userroll = request('userroll');\n\n $user->save();\n\n redirect('/add-new');\n\n\n }", "public function actionProfile()\r\n\t{\r\n\t\t//disable jquery autoload\r\n\t\tYii::app()->clientScript->scriptMap=array(\r\n\t\t\t'jquery.js'=>false,\r\n\t\t);\r\n\t\t$model = $this->loadUser();\r\n\t $this->render('profile',array(\r\n\t \t'model'=>$model,\r\n\t\t\t'profile'=>$model->profile,\r\n\t ));\r\n\t}", "function createOrUpdateProfile(User $user) {\n Util::throwExceptionIfNullOrBlank($user, \"User\");\n Util::throwExceptionIfNullOrBlank($user->getUserName(), \"User Name\");\n Util::throwExceptionIfNullOrBlank($user->getProfile(), \"Profile Data\");\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n\n $profile = $user->getProfile();\n\n try {\n\t\t $params = null;\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $body = null;\n $body = '{\"app42\":{\"user\":{\"userName\":\"' . $user->getUserName() . '\", \"profileData\":{\"firstName\":\"' . $profile->getFirstName() . '\",\"lastName\":\"' . $profile->getLastName() . '\",\"sex\":\"' . $profile->getSex() . '\",\"mobile\":\"' . $profile->getMobile() . '\",\"line1\":\"' . $profile->getLine1() . '\",\"line2\":\"' . $profile->getLine2() . '\",\"city\":\"' . $profile->getCity() . '\",\"state\":\"' . $profile->getState() . '\",\"country\":\"' . $profile->getCountry() . '\",\"pincode\":\"' . $profile->getPincode() . '\",\"homeLandLine\":\"' . $profile->getHomeLandLine() . '\",\"officeLandLine\":\"' . $profile->getOfficeLandLine() . '\",\"dateOfBirth\":\"' . (date(\"Y-m-d\\TG:i:s\", strtotime($profile->getDateOfBirth())) . substr((string) microtime(), 1, 4) . \"Z\") . '\"}}}}';\n\n $signParams['body'] = $body;\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type; //CONTENT_TYPE;\n $accept = $this->accept; //ACCEPT;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/profile\";\n $response = RestClient::put($baseURL, $params, null, null, $contentType, $accept, $body, $headerParams);\n $userResponseObj = new UserResponseBuilder();\n $userObj = $userResponseObj->buildResponse($response->getResponse());\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }", "public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "public function getCreateProfile()\n\t{\n\t\t$deals = Deal::all();\n\t\t$user = Auth::user();\n\t\treturn View::make('pages.edit_profile')\n\t\t\t->with('user', $user)\n\t\t\t->with('deals', $deals);\n\t}", "protected function create(array $data)\n {\n\n /** @var User $user */\n $user = User::query()->make([\n 'username' => $data['username'],\n 'first_name' => $data['first_name'],\n 'father_name' => $data['father_name'],\n 'grandfather_name' => $data['grandfather_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'official_id' => $data['official_id'],\n 'mobile' => $data['mobile'],\n ]);\n\n $this->storeAvatar($user, $data);\n\n $user->save();\n\n $data['preferred_times'] = implode(',', $data['preferred_times']);\n $data['languages'] = implode(',', $data['languages']);\n // skills filed is optional, we have to check if it exists in the $data array.\n $data['skills'] = isset($data['skills']) ? implode(',', $data['skills']) : null;\n\n $profile = Profile::query()->make($data);\n $user->profile()->save($profile);\n\n return $user;\n }", "protected function create(Request $request)\n {\n\n // return ($request);\n\n // For Image submission \n $image = $request->file('profile');\n $profile = time().'.'.$image->getClientOriginalExtension();\n $destinationpath = public_path('/images');\n $image->move($destinationpath,$profile);\n\n $member = new User();\n $member ->fname=$request->fname;\n $member ->lname=$request->lname;\n $member ->email=$request->email;\n $member ->password=Hash::make($request['password']);\n $member ->phone=$request->phone;\n $member ->pincode=$request->pincode;\n $member ->city=$request->city;\n $member ->state=$request->state;\n $member ->country=$request->country;\n $member ->profile=$profile;\n $member ->save();\n echo \"Data Submitted\";\n }", "public function create()\n {\n return view('profiles.create');\n }", "public function create()\n {\n return view('profiles.create');\n }", "public function create()\n {\n return view('profiles.create');\n }", "public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}", "public function CreateProfile(){\n $username = $this->session->userdata('username');\n\n if($username != ''){\n $this->load->model('Users','us');\n $listusers = $this->us->showPublicProfile($username); \n\n if (count($listusers) > 0) {\n $counter = 1;\n foreach ($listusers as $m) {\n $email = $m->getUserEmail();\n $avatar = $m->getUserAvatar();\n $fullname = $m->getUserFullname();\n $genres = $m->getGenre();\n $userid = $m->getId();\n $counter++;\n }\n }\n else {\n // echo \"No users found\";\n }\n\n if($avatar != ''){ \n $this->load->helper('url');\n redirect(base_url().'index.php/UserController/Enter');\n } else {\n $profileImageName = time() . '-' . $_FILES[\"profileImage\"][\"name\"]; \n $fullname = $this->input->post('fullname');\n $genres = $this->input->post('genres[]');\n $check_array = implode(',',$genres);\n $profileImageSize = $_FILES['profileImage']['size'];\n $profileImageTmp = $_FILES[\"profileImage\"][\"tmp_name\"];\n\n $this->load->model('Users','us');\n $createUserProfile = $this->us->createUserProfile($profileImageName,$fullname,$check_array,$profileImageSize,$profileImageTmp);\n $this->load->helper('url');\n redirect(base_url().'index.php/UserController/Enter');\n }\n } else {\n $this->load->helper('url');\n redirect(base_url().'index.php/UserController/LoginButton');\n } \n }", "public function store(Request $request)\n {\n $path = 'images/profile/no-thumbnail.jpeg';\n if ($request->has('thumbnail')) {\n $extension = \".\" . $request->thumbnail->getClientOriginalExtension();\n $name = basename($request->thumbnail->getClientOriginalName(), $extension) . time();\n $name = $name . $extension;\n $path = $request->thumbnail->storeAs('images/profile', $name, 'public');\n }\n $user = User::create([\n 'email' => $request->email,\n 'password' => bcrypt($request->password),\n 'status' => $request->status,\n ]);\n if ($user) {\n $profile = Profile::create([\n 'user_id' => $user->id,\n 'name' => $request->name,\n 'thumbnail' => $path,\n 'country_id' => $request->country_id,\n 'state_id' => $request->state_id,\n 'city_id' => $request->city_id,\n 'phone' => $request->phone,\n 'slug' => $request->slug,\n ]);\n }\n if ($user && $profile) {\n return redirect(route('admin.profile.index'))->with('message', 'User Created Successfully');\n } else {\n return back()->with('message', 'Error Inserting new User');\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Users;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n $path= realpath(Yii::app()->basePath . '/../images/profile/'); \n $thumbpath=realpath(Yii::app()->basePath . '/../images/profile/thumb/');\n\t\tif(isset($_POST['Users'])){\n\t\t\t$model->attributes=$_POST['Users'];\n if ($_FILES[\"Users\"][\"name\"][\"profile_image\"] != \"\"){\n // Upload doctor image\n $uploadedFile=CUploadedFile::getInstance($model,'profile_image');\n $filename=explode(\".\", $uploadedFile);\n $fileext = $filename[count($filename) - 1];\n $newfilename = time() . \".\" . $fileext;\n $model->profile_image = $newfilename;\n $_POST['Users'][\"profile_image\"] = $newfilename;\n if(!empty($uploadedFile)){\n $uploadedFile->saveAs($path.\"/\".$newfilename);\n $image = new EasyImage($path.\"/\".$newfilename);\n $image->resize(100, 100);\n $image->save($thumbpath.\"/\".$newfilename);\n /**\n * @desc : Delete existing images\n */\n if (file_exists($path . $old_image)) {\n @unlink($path . $old_image);\n }\n }\n }\n $model->password = base64_encode($_POST['Users'][\"password\"]);\n if($model->save()){\n $this->redirect(array('view','id'=>$model->user_id));\n }\n\t\t}\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n\t\t\t 'email_token' => bin2hex(openssl_random_pseudo_bytes(30)),\n 'unix_timestamp' => time(),\n 'verified' => 0\n ]);\n\n Profile::create(['user_id' => $user->id]);\n\n return $user;\n }", "public function create()\n\t{\n $key = Input::get('key', '');\n if(!password_verify(Config::get('app.key'), $key)){\n return new Response('Forbidden', 403, ['Content-Type' => 'application/json']);\n }\n\t\t$user = json_decode(Input::get('user', ''));\n if(empty($user)){\n return new Response('No data specified for new user or it was an invalid JSON', 409, ['Content-Type' => 'application/json']);\n }\n if(!filter_var($user->email, FILTER_VALIDATE_EMAIL)){\n return new Response('Invalid email specified', 409, ['Content-Type' => 'application/json']);\n }\n if(!in_array($user->account, ['email', 'facebook', 'linkedin'])){\n return new Response('Invalid account type specified', 409, ['Content-Type' => 'application/json']);\n }\n if(strtolower($user->account) === 'email' && (!isset($user->password) || empty($user->password))){\n return new Response('For account type email password should be specified', 409, ['Content-Type' => 'application/json']);\n }\n if(User::where('email', '=', $user->email)->count() > 0){\n return new Response('The user with such email already exists', 409, ['Content-Type' => 'application/json']);\n }\n //Creating user table record\n $profile = new User();\n $profile->email = strtolower(trim($user->email));\n $profile->password = password_hash($user->password, PASSWORD_DEFAULT);\n $profile->account = $user->account;\n $profile->first_name = isset($user->first_name) ? $user->first_name : '';\n $profile->second_name = isset($user->second_name) ? $user->second_name : '';\n $profile->save();\n if(!$profile->id){\n return new Response('Failed creating new user', 409, ['Content-Type' => 'application/json']);\n }\n $user->id = $profile->id;\n //Creating additional optional user's settings\n foreach ($user as $setting_name => $setting_value){\n if(is_array($setting_value)){\n foreach ($setting_value as $values){\n if(is_object($values)){\n foreach ($values as $sub_value_key => $sub_value){\n if(is_array($sub_value) || is_object($sub_value)){\n continue;\n }\n $setting = new Setting();\n $setting->user_id = $profile->id;\n $setting->name = implode(\":\", [$setting_name, $sub_value_key]);\n $setting->value = strip_tags(trim($sub_value));\n $setting->save();\n if(!$setting->id){\n $profile->delete();\n return new Response('Failed creating new user settings', 409, ['Content-Type' => 'application/json']);\n }\n }\n }\n else\n {\n $setting = new Setting();\n $setting->user_id = $profile->id;\n $setting->name = $setting_name;\n $setting->value = strip_tags(trim($values));\n $setting->save();\n if(!$setting->id){\n $profile->delete();\n return new Response('Failed creating new user settings', 409, ['Content-Type' => 'application/json']);\n }\n }\n }\n }\n }\n \n $client_id = md5(Config::get('app.key') . $profile->id . $profile->created_at);\n $client_secret = md5(Config::get('app.key') . $profile->email . $profile->created_at);\n DB::table('oauth_clients')->insert(\n ['id' => $client_id, 'secret' => $client_secret, 'name' => implode('-', [$profile->id, $profile->email]),\n 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s'),]\n );\n $user->client_id = $client_id;\n $user->client_secret = $client_secret;\n \n return (array)$user;\n\t}", "public function createUserProfile($data) {\n\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT COUNT(*)\n FROM users AS u\n JOIN profiles AS p ON p.userID = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n $result = $stmt->fetch(PDO::FETCH_COLUMN);\n\n if ($result) {\n $sql = 'UPDATE profiles\n SET firstName=?, lastName=?, dob=?, addressFirst=?, addressSecond=?, city=?, postcode=?, mobile=?, bio=?\n WHERE userID = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio'],\n $userID\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n else {\n $sql = 'INSERT INTO profiles (userID, firstName, lastName, dob, addressFirst, addressSecond, city, postcode, mobile, bio)\n VALUES (?,?,?,?,?,?,?,?,?,?)';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $userID,\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio']\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n }\n }", "public function store(Request $request)\n {\n $rules = [\n 'username' => 'required | min:4 | unique:users',\n 'name' => 'required | min:4',\n 'last_name' => 'required | min:2',\n 'email' => 'required | email | unique:users',\n 'password' => 'required | min:4 | confirmed',\n 'identification' => 'required',\n 'root' => 'required | int',\n 'user_profile_id' => 'required | int',\n 'zone_id' => 'int'\n ];\n\n $this->validate($request,$rules);\n if($request->zone_id){\n $zone = Zone::where('id',$request->zone_id)->firstOrFail(); \n }\n $userProfile = UserProfile::where('id',$request->user_profile_id)->firstOrFail();\n\n $user = new User();\n $user->username = $request->username;\n $user->name = $request->name;\n $user->last_name = $request->last_name;\n $user->email = $request->email;\n //$user->password = bcrypt($request->password);\n $user->password = $request->password;\n $user->identification = $request->identification;\n $user->root = $request->root;\n $user->user_profile_id = $request->user_profile_id;\n $user->zone_id = $request->zone_id;\n $user->save();\n\n return $this->showOne($user);\n\n }", "public function store(Request $request)\n {\n $input = $request->all();\n $input['password'] = Hash::make($input['password']);\n $user = $this->users->create($input);\n\n //create Blank profile\n $profile = Profile::create([\n 'user_id' => $user->id,\n 'bio' => '',\n ]);\n $profile->save();\n\n return \\Redirect::route('admin.users.index', [\n ])->withMessage(trans('acl::user.users-controller-successfully_created'));\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'username' => $data['username'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'status' => $data['role'] === 'customer' ? 'verifiedByAdmin' : \"-\" \n ]);\n \n $address = [];\n \n array_push($address, json_encode([\n 'name' => $data['addressName'],\n 'province_id' => $data['provinceId'],\n 'city_id' => $data['cityId'],\n 'subdistrict_id' => $data['subdistrictId'],\n 'province_name' => $data['provinceName'],\n 'city_name' => $data['cityName'],\n 'subdistrict_name' => $data['subdistrictName'],\n 'postal_code' => $data['postalCode'],\n 'detail' => $data['addressDetail']\n ]));\n \n $user->profile()->save(Profile::create([\n 'user_id' => $user->id,\n 'name' => $data['name'],\n 'address' => json_encode($address),\n 'phone' => $data['phone'],\n 'photo' =>'no-image.jpg',\n 'gender' => $data['gender'],\n 'birthday' => $data['birthday'],\n ]));\n \n if($data['role'] === 'merchant'){\n $user->assignRole('merchant');\n } else {\n $user->assignRole('customer');\n }\n \n return $user;\n }", "public function __invoke(CreateProfileRequest $request)\n {\n }", "protected function create(array $data)\n {\n $file = $this->request->file('profile_picture');\n $file_name = uniqid() . \"-\" . $file->getClientOriginalName();\n $file->move(public_path('/images'),$file_name);\n\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'gender' => $data['gender'],\n 'address' => $data['address'],\n 'dob' => $data['dob'],\n 'profile_image' => $file_name,\n ]);\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function create()\n {\n return $this->edit(new User);\n }", "public function create()\n {\n return view('admin.admin_profile'); \n }", "public function createUserFromSocialite($user);", "protected function create(Request $request)\n {\n $validator = $this->validator($request->all());\n\n if ($validator->fails()) {\n return response()->json(['status'=>500,'error'=>$validator->errors()]);\n }\n\n try{\n $user = User::create([\n 'name' => $request['name'],\n 'surname' => $request['surname'],\n 'email' => $request['email'],\n 'password' => Hash::make($request['password']),\n 'country_id' => $request['country_id'],\n 'role' => 'USER',\n 'deleted' => false\n ]);\n\n $this->createSettings($user->id);\n\n $image = $this->createStandardProfileImage();\n\n $userInformation = [\n 'profile_picture_id' => $image['id'],\n 'bio' => \"My bio text\",\n 'search_job' => true,\n ];\n\n $user->information()->create($userInformation);\n\n return $user;\n }catch(QueryException $queryException){\n return response()->json(['error'=>$queryException]);\n }\n }", "function create_newuser($data){\n\tglobal $DB, $CFG, $USER;\n\t$atalvariables = get_atalvariables();\n\t$roleid = theme_get_roleidbyname('student');\n\t$schoolname = '';\n\t$city = '';\n\tif ($data->flag == 'add') {\n\t\t// Creating new user.\n\t\t$usertype = $data->usertype;\n\t\tif($usertype=='student'){\n\t\t\t//Can only be created by incharge login [logged in user id used to fetch the school id]\n\t\t\t$schooldata = $DB->get_record('user_school', array('userid'=>$USER->id), '*', MUST_EXIST);\n\t\t\t$schoolid = (isset($schooldata->schoolid))?$schooldata->schoolid:0;\n\t\t\t$roleid = theme_get_roleidbyname('student');\n\t\t} else{\n\t\t\t$schoolid = $data->school;\n\t\t\t$roleid = theme_get_roleidbyname($usertype);\n\t\t}\n\t\t$state = \"0\";\n\t\t$sql = \"SELECT s.name,c.name as city,ss.name as state FROM {school} s JOIN {city} c ON s.cityid = c.id LEFT JOIN {state} ss ON c.stateid=ss.id WHERE s.id=\".$schoolid;\n\t\t$result = $DB->get_record_sql($sql);\n\t\tif(isset($result->name)){\n\t\t\t$schoolname = $result->name;\n\t\t $city = $result->city;\n\t\t\t$state = (!empty($result->state))?$result->state:'0';\n\t\t}\n\t\t$user = new stdClass();\n\t\t$user->auth = 'manual';\n\t\t$user->confirmed = 1;\n\t\t$user->deleted = 0;\n\t\t$user->timezone = '99';\n\t\t$user->mnethostid = 1;\n\t\tif(isset($data->username)){\n\t\t\t$user->username = $data->username;\n\t\t}\n\t\telse\n\t\t\t$user->username = trim($data->email);\n\t\t//$user->password = hash_internal_user_password($data->newpassword);\n\t\t$ran = generate_randomstring();\n\t\t$user->passraw = $ran;\n\t\t$user->password=hash_internal_user_password($ran);\n\t\t$user->firstname = $data->firstname;\n\t\t$user->lastname = $data->lastname;\n\t\t$user->email = $data->email;\n\t\t$user->icq = \"newuser\";\n\t\t$user->msn = $roleid;\n\t\t$user->institution = $schoolname;\n\t\t$user->city = $city;\n\t\t/* if(isset($data->state)){\n\t\t\t$user->aim = $data->state;\n\t\t} */\n\t\t$user->aim = (isset($data->state) && !empty($data->state))?$data->state:$state;\n\t\t$user->country = 'IN';\n\t\t$user->timecreated = time();\n\t\t$user->timemodified = time();\n\t\tif(isset($data->gender)){\n\t\t\t$user->gender = $data->gender;\n\t\t}\n\t\tif(isset($data->phone1)){\n\t\t\t$user->phone1 = $data->phone1;\n\t\t}\n\t\t// Insert the user into the database.\n\t\t$newuserid = $DB->insert_record('user', $user);\n\t\t$usercontext = context_user::instance($newuserid);\n\t\t$cm = new stdClass();\n\t\t$cm->userid = $newuserid;\n\t\t$cm->schoolid = $schoolid;\n\t\t$cm->role = $usertype;\n\t\tif(isset($data->studentclass)){\n\t\t\t$cm->studentclass = $data->studentclass;\n\t\t}\n\t\t$DB->insert_record('user_school', $cm);\n\t}\n\t$name = $user->firstname.' '.$user->lastname;\n\tsend_welcomemail($roleid,$newuserid,$name,$data->email,$user->username,$ran);\n\treturn true;\n}", "protected function saveProfile($user)\n\t{\n\t}", "protected function create(array $data) {\n\t\tif ($data['target'] == 1) {\n\t\t\t$role = Role::make(Role::ADOPTEE);\n\t\t} else {\n\t\t\t$role = Role::make(Role::ADOPTER);\n\t\t}\n\n\t\t$user = User::create([\n\t\t\t'email' => $data['email'],\n\t\t\t'name' => $data['name'],\n\t\t\t'phone_number' => $data['phone_number'],\n\t\t\t'password' => Hash::make($data['password']),\n\t\t\t'role_id' => $role->id,\n\t\t]);\n\n\t\tif ($user->hasRole(Role::ADOPTER)) {\n\t\t\t$profile = new Profile();\n\t\t\t$profile->user_id = $user->id;\n\n\t\t\t$user->profile()->save($profile);\n\t\t} else {\n\t\t\t$bio = new AdopteeBio();\n\t\t\t$bio->user_id = $user->id;\n\n\t\t\t$user->bio()->save($bio);\n\t\t}\n\n\t\treturn $user;\n\t}", "public function profile (request $request) {\n\t\t$userInfo = resolve('userInfo');\n\n\t\tif ($request->isMethod('post') && $request->tab == \"profile\") {\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\t$usr_role = $request->usr_role;\n\t\t\t} else {\n\t\t\t\t$usr_role = 'CP';\n\t\t\t}\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\t$dataProfile = array(\n\t\t\t\t\t'usr_employment_id' => $request->usr_employment_id,\n\t\t\t\t\t'usr_role' \t\t\t\t\t=> $usr_role,\n\t\t\t\t\t'usr_firstname' \t\t=> $request->usr_firstname,\n\t\t\t\t\t'usr_lastname' \t\t\t=> $request->usr_lastname,\n\t\t\t\t\t'usr_nric' \t\t\t\t\t=> $request->usr_nric,\n\t\t\t\t\t'usr_dob' \t\t\t\t\t=> $request->usr_dob,\n\t\t\t\t\t'usr_citizen' \t\t\t=> $request->usr_citizen,\n\t\t\t\t\t'usr_add1' \t\t\t\t\t=> $request->usr_add1,\n\t\t\t\t\t'usr_add2' \t\t\t\t\t=> $request->usr_add2,\n\t\t\t\t\t'usr_postcode' \t\t\t=> $request->usr_postcode,\n\t\t\t\t\t'usr_state' \t\t\t\t=> $request->usr_state,\n\t\t\t\t\t'usr_country' \t\t\t=> $request->usr_country,\n\t\t\t\t\t'usr_education' \t\t=> $request->usr_education,\n\t\t\t\t\t'usr_qualification' => $request->usr_qualification,\n\t\t\t\t\t'usr_jobtitle' \t\t\t=> $request->usr_jobtitle,\n\t\t\t\t\t'usr_division' \t\t\t=> $request->usr_division,\n\t\t\t\t\t'usr_employment' \t\t=> $request->usr_employment,\n\t\t\t\t\t'usr_mobile' \t\t\t\t=> $request->usr_mobile,\n\t\t\t\t\t'usr_email' \t\t\t\t=> $request->usr_email,\n\t\t\t\t\t'usr_bank_name' \t\t=> $request->usr_bank_name,\n\t\t\t\t\t'usr_bank_acc_no' \t=> $request->usr_bank_acc_no,\n\t\t\t\t\t'usr_kwsp_no' \t\t\t=> $request->usr_kwsp_no,\n\t\t\t\t\t'usr_updated' \t\t\t=> Carbon::now()\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$dataProfile = array(\n\t\t\t\t\t'usr_firstname' \t\t=> $request->usr_firstname,\n\t\t\t\t\t'usr_lastname' \t\t\t=> $request->usr_lastname,\n\t\t\t\t\t'usr_nric' \t\t\t\t\t=> $request->usr_nric,\n\t\t\t\t\t'usr_dob' \t\t\t\t\t=> $request->usr_dob,\n\t\t\t\t\t'usr_citizen' \t\t\t=> $request->usr_citizen,\n\t\t\t\t\t'usr_add1' \t\t\t\t\t=> $request->usr_add1,\n\t\t\t\t\t'usr_add2' \t\t\t\t\t=> $request->usr_add2,\n\t\t\t\t\t'usr_postcode' \t\t\t=> $request->usr_postcode,\n\t\t\t\t\t'usr_state' \t\t\t\t=> $request->usr_state,\n\t\t\t\t\t'usr_country' \t\t\t=> $request->usr_country,\n\t\t\t\t\t'usr_education' \t\t=> $request->usr_education,\n\t\t\t\t\t'usr_qualification' => $request->usr_qualification,\n\t\t\t\t\t'usr_jobtitle' \t\t\t=> $request->usr_jobtitle,\n\t\t\t\t\t'usr_mobile' \t\t\t\t=> $request->usr_mobile,\n\t\t\t\t\t'usr_email' \t\t\t\t=> $request->usr_email,\n\t\t\t\t\t'usr_bank_name' \t\t=> $request->usr_bank_name,\n\t\t\t\t\t'usr_bank_acc_no' \t=> $request->usr_bank_acc_no,\n\t\t\t\t\t'usr_kwsp_no' \t\t\t=> $request->usr_kwsp_no,\n\t\t\t\t\t'usr_updated' \t\t\t=> Carbon::now()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// echo '<pre>'; print_r($request->usr_role); die();\n\t\t\t$updateProfile = DB::table('users')->where('usr_id', $request->usr_id)->update($dataProfile);\n\n\t\t\tLog::doAddLog (\"Update profile\", $request->usr_id, $request->usr_firstname.' '.$request->usr_lastname);\n\n\t\t\tif ($userInfo->usr_role == 'AD') {\n\t\t\t\treturn redirect('view-profile/'.$request->usr_id)->with('success', \"Successfully update user profile.\");\n\t\t\t} else {\n\t\t\t\treturn redirect('profile')->with('success', \"Successfully update user profile.\");\n\t\t\t}\n\n\n\t\t} else if ($request->isMethod('post') && $request->tab == \"password\"){\n\n\t\t\t// echo $request->password2; die();\n\t\t\tif($request->password1 != $request->password2){\n\t\t\t\treturn redirect('profile')->with('error', \"Password confirmation didnt match. Please try again.\");\n\t\t\t} else {\n\t\t\t\t$pass = hash('sha256', $request->password1);\n\n\t\t\t\t$dataPassword = array (\n\t\t\t\t\t'usr_pword' => $pass\n\t\t\t\t);\n\t\t\t\t$updatePassword = DB::table('users')->where('usr_id', $request->usr_id)->update($dataPassword);\n\t\t\t\tLog::doAddLog (\"Update password\", $request->usr_id);\n\t\t\t\treturn redirect('profile#t02')->with('success', \"Successfully update new password.\");\n\t\t\t}\n\t\t} else if ($request->isMethod('post') && $request->tab == \"bank\"){\n\n\t\t\t$dataBank = array (\n\t\t\t\t'usr_bank_name' \t=> $request->usr_bank_name,\n\t\t\t\t'usr_bank_acc_no' => $request->usr_bank_acc_no,\n\t\t\t\t'usr_kwsp_no' \t\t=> $request->usr_kwsp_no\n\t\t\t);\n\n\t\t\t$updateBank = DB::table('users')->where('usr_id', $request->usr_id)->update($dataBank);\n\t\t\treturn redirect('profile#t04')->with('success', \"Successfully update Bank & KWSP info.\");\n\t\t}\n\n return view('profile')->with('user',$userInfo);\n }", "public function createProfile($profile){\n $this->createProfileFiles($profile);\n $this->createProfileScript($profile);\n $this->createConfigIni($profile);\n }", "public function create()\n {\n return view('user.profile_form_create');\n }", "public function userNew()\n\t{\n\t\t// $student = Profile::find($id);\n\t\t$data = Input::all();\n\t\t\n\t\t$rules = array(\n\t\t\t'first_name' \t=> 'required',\n\t\t\t'control' \t=> 'required',\n\t\t\t'email' \t\t=> 'required',\n\t\t\t'password' \t=> 'required'\n\t\t);\n\t\t\n\t\t$validator = Validator::make($data, $rules);\n\t\t// dd($validator);\n\t\treturn Response::json($validator->messages());\n\t\t\n\t\t// return View::make('administrator/userNew');\n\t}" ]
[ "0.7259511", "0.7192672", "0.71315765", "0.7072739", "0.6797734", "0.6710256", "0.6709919", "0.6692479", "0.66904384", "0.6689493", "0.6642324", "0.6614817", "0.6607954", "0.6591571", "0.6583692", "0.6562887", "0.65623164", "0.65567976", "0.6553903", "0.65402126", "0.65343726", "0.65219414", "0.65110695", "0.6491297", "0.64826524", "0.64730084", "0.6468313", "0.6467787", "0.6464294", "0.64432085", "0.6435742", "0.6424086", "0.6423696", "0.64154893", "0.6411744", "0.6395408", "0.63896215", "0.6331867", "0.6330402", "0.6329097", "0.631071", "0.63093686", "0.63088566", "0.6281531", "0.62760276", "0.62670785", "0.6265598", "0.6255926", "0.6233987", "0.6233513", "0.6223269", "0.62223", "0.620604", "0.62008274", "0.619744", "0.619744", "0.619744", "0.61945623", "0.61709434", "0.6151625", "0.6150141", "0.61490816", "0.6134507", "0.6134507", "0.6134507", "0.6134507", "0.61334854", "0.61311156", "0.612835", "0.61132675", "0.61130035", "0.610371", "0.60978407", "0.6095034", "0.6095034", "0.6095034", "0.60926455", "0.6090531", "0.60822165", "0.6079732", "0.60791254", "0.6077071", "0.60745925", "0.60561186", "0.605394", "0.60489106", "0.6047823", "0.6047609", "0.6047489", "0.6047489", "0.6047341", "0.60433716", "0.60417455", "0.60402864", "0.6040012", "0.6039449", "0.6036775", "0.6029858", "0.6024177", "0.6015628", "0.6006769" ]
0.0
-1
Returns Counts of email records where the given email matches.
public function emailCounts($email);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsersByEmail($email) {\n $sql = \"SELECT count(*) as total FROM \" . DB_PREFIX . \"wkpos_user WHERE email = '\" . $email . \"' AND user_id != '\" . $this->session->data['user_login_id'] . \"'\";\n $query = $this->db->query($sql);\n\n return $query->row['total'];\n }", "protected function getRecByEmail(string $email) {\n $sql = \"SELECT COUNT(*) FROM \" . $this->formsTableName . \" WHERE email = ?\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->bindParam(1, $email, \\PDO::PARAM_STR);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return $res[0]['COUNT(*)'];\n }", "function CountCustomerEmail($argWhere = '')\n {\n $arrNum = $this->getNumRows(TABLE_CUSTOMER, 'CustomerEmail', $argWhere);\n return $arrNum;\n }", "public static function countEmails()\r\n {\r\n $number = count(self::$emailArray);\r\n return $number;\r\n }", "function numberOfSameEmailAddress($email) {\n $sql = \"SELECT * FROM member WHERE email = '\" . $email . \"'\";\n $result = getAll($sql);\n\n return count($result);\n}", "public function findEmail($email = \"[email protected]\") {\n\t\t$users = $this->em->createQuery ( \" SELECT PARTIAL u.{id} FROM App\\Entity\\User u WHERE u.email = ?1 \" )->setParameter ( 1, $email )->execute ();\n\t\treturn count ( $users );\n\t}", "public function buscaEmail($email)\n {\n \n $query = $this->db\n ->where('email', $email)\n ->get('clientes');\n\n return $query->num_rows();\n }", "function sql_nemails($email)\n{\n global $connection, $trace, $tblmembre;\n $select = \"$tblmembre\";\n $tables = explode(\",\",$select);\n $where = \"\";\n for ($i=0;$i<count($tables);$i++) {\n $fields_array = sql_fields($tables[$i],'array');\n for ($j=0;$j<sql_fields($tables[$i],'');$j++) {\n if (strstr($fields_array[$j], \"email\")) {\n if\t($where !== '')\t$where .= \"OR\"\t;\n $where .= \" $fields_array[$j]='$email' \";\n }\n }\n }\n $sql = mysqli_query($connection, \"SELECT * FROM $select WHERE $where\");\n $row = mysqli_num_rows($sql);\n return $row;\n}", "public function verifyEmailExists($email)\r\n\t{\r\n\t\t$emailFull = $email['email'];\r\n\t\t\r\n\t\t$consult = $this->dbAdapter->query(\"SELECT count(email) as count FROM users WHERE email='$emailFull'\",Adapter::QUERY_MODE_EXECUTE);\r\n\t\t\r\n\t\t$result = $consult->toArray();\r\n\r\n\t\treturn $result;\r\n\t}", "public function getTotalCustomersByEmail($email, $app_id = '') {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n\n if ($app_id != '') {\n $query = $db->query(\"SELECT COUNT(*) AS total FROM \" . DB_PREFIX . \"customer WHERE LOWER(email) = '\" . $db->escape(utf8_strtolower($email)) . \"' AND app_id='\" . $app_id . \"'\");\n } else {\n $query = $db->query(\"SELECT COUNT(*) AS total FROM \" . DB_PREFIX . \"customer WHERE LOWER(email) = '\" . $db->escape(utf8_strtolower($email)) . \"'\");\n }\n\n return $query->row['total'];\n }", "public function searchIfMailExists($email)\n {\n $reqmail = $this->db->prepare(\"SELECT * FROM users WHERE email = ?\");\n $reqmail->execute(array($email));\n $mailexist = $reqmail->rowCount();\n\n return $mailexist;\n }", "public function validate_email_user_reset($email)\n {\n return $this->db->from('ec_client')->where('email', $email)->count_all_results();\n }", "public static function CekAkunByEmail() {\n \t$mail = self::model()->countByAttributes(array(\"EMAIL\" => $_POST['email'], \"PELANGGAN_STATUS\" => self::PUNYA_AKUN));\n return $mail;\n }", "public function getMailCount()\n {\n return $this->count(self::MAIL);\n }", "public function checkDuplicateEmail( $email )\n {\n include(\"config/database.php\");\n try {\n $sql = \"SELECT email FROM students where email='$email'\";\n $result = $pdoCon->prepare($sql);\n $result->execute();\n $rows = $result->rowCount();\n } catch (Exception $e) {\n echo \"Unable to retrieved results\";\n exit;\n }\n return $rows;\n }", "function emailTaken($email) {\n\t$db = connectDB();\n $sql = <<<SQL\n \tSELECT userID\n \tFROM users\n \tWHERE email = ?\nSQL;\n\n $statement = $db->prepare($sql);\n $statement->bind_param(\"s\", $email);\n $statement->execute();\n $statement->store_result();\n\t$res = $statement->num_rows;\n\n\t$statement->close();\n\t$db->close();\n\n return $res;\n}", "function find_hotel_user_by_email($hotel_email)\n\t{\n\t $this->db->select('COUNT(`sb_hotel_useremail`) as hotelusercount',false);\n\t\t$this->db->where('sb_hotel_useremail',$hotel_email);\n\t\t$query=$this->db->get('sb_hotel_users');\n\t\treturn $query->result_array();\n\t}", "function get_customer_purchase_count( $email = \"\" ) {\n\t\t$this->db->cache_off();\n\t\t$query = $this->db->query('SELECT count( id ) as total\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM orders \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE email = \"'.$email.'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND active = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND status = 0');\n\t\t$count = $query->result_array();\n\t\t\n\t\t$total = 0;\n\t\t\n\t\tif( $count[0]['total'] == 1 ) {\n\t\t\t$total = \"New Customer ( first order using this email address )\";\n\t\t}\n\t\t\n\t\tif( $count[0]['total'] > 1 ) {\n\t\t\t$total = \"There are \".$count[0]['total'] .\" orders using this email address\";\n\t\t}\n\n\t\treturn $total;\t\t\n\t\t\n\t}", "static function email_available($email) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"';\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "protected function getRecByNameEmail(string $name, string $email) {\n $sql = \"SELECT COUNT(*) FROM \" . $this->formsTableName . \" WHERE name = ? AND email = ?\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->bindParam(1, $name, \\PDO::PARAM_STR);\n $stmt->bindParam(2, $email, \\PDO::PARAM_STR);\n $stmt->execute();\n $res = $stmt->fetchAll();\n return $res[0]['COUNT(*)'];\n }", "function isEmailPresent($email = NULL){\t\t\t\n\t\t$query = \" SELECT id\";\n\t\t$query .= \" FROM \" . $this->config->item('ems_organisers','dbtables');\n\t\t$query .= \" WHERE email = ? \";\t\t\n\t\t$dataBindArr = array($email);\n\t\t$res = $this->db->query($query, $dataBindArr);\n\t\t$resArr = $res->result();\t\t\n\t\treturn count($resArr);\n\t}", "public function check_email($email)\r\n\t{\r\n\t\t$query=$this->db->query(\"SELECT * FROM users WHERE emailid='\".$email.\"'\");\r\n\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t$storeid=$row->storeid;\r\n\t\t}\r\n\t\t$rows=$query->num_rows();\r\n\t\t$result=array('afftected_rows'=>$rows,'storeid'=>$storeid);\r\n\t\treturn $result;\r\n\t}", "public function customerHasSameEmail(string $email)\n {\n return Customer::where('email', $email)->select('email')->count('email');\n }", "public function countAllMails()\n {\n try{\n //init the catching\n $this->exceptionThrower->start();\n $count = imap_num_msg($this->mailbox);\n $this->exceptionThrower->stop();\n return $count;\n }catch (\\Exception $e)\n {\n throw new SimpleMailReceiverException(\"Error getting the number of mails\" . $e->getMessage(), $e->getCode());\n }\n }", "public function check_mail($email) {\n\n\n\t\treturn (mysql_result($this->query(\"SELECT COUNT(`id`) FROM `users` WHERE `email` = '$email'\"), 0) ? true: false);\n\n\t}", "public function availableEmail($email)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT COUNT(id) FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetchColumn();\n\n if ($result > 0) {\n return false;\n } else {\n return true;\n }\n }", "public function emailExists($email)\r\n {\r\n return (bool) $this->countByColumn('email', $email);\r\n }", "protected function emailAlreadyInUse($email)\n {\n return (bool)self::select(['id'])->\n where('email', '=', $email)->\n count();\n }", "public function emailExists ($email){\n $con = connectPDO();\n $query = $con->prepare(\"SELECT COUNT(id) FROM users WHERE email = ?\");\n $query->execute(array($email));\n $rowcount = $query->fetchColumn();\n if ($rowcount > 0) {\n return true;\n }else{\n return false;\n }\n }", "public function existsByEmail($email) {\n\t\t\n\t\t$row = $this->createQueryBuilder()\n\t\t\t->select('count(id) as total')\n\t\t\t->from($this->getTableName(), 'u')\n\t\t\t->andWhere('u.email = :email')\n\t\t\t->setParameter(':email', $email)\n\t\t\t->execute()\n\t\t\t->fetch($this->getFetchMode());\n\n\t\treturn $row['total'] > 0;\n\t}", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t/*echo $count;\n\t\tdie;*/\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "function check_if_email_is_in_use($email){\n\n $query = $this->db->get_where('tbl_doctor_account', array('dacc_email' => $email));\n return $query->num_rows();\n\n }", "public function countUserByMail($mail)\n {\n $request = $this->bdd->prepare('SELECT COUNT(*) as nb_user FROM users WHERE mail = :mail');\n $request->execute([\n 'mail' => $mail\n ]);\n return $request->fetch()['nb_user'];\n }", "function get_mail($data) {\n $sql = \"SELECT\n *\n FROM\n logins\n WHERE \n email\n LIKE \n '$data'\n \";\n\n $query = $this->data->prepare($sql);\n $query->execute();\n\n $result = $query->rowCount();\n return $result;\n }", "function count_participants($search_string = null, $order = null)\n {\n $this->db->select('*');\n $this->db->from('users');\n if ($search_string) {\n $this->db->like('email', $search_string);\n }\n if ($order) {\n $this->db->order_by($order, 'Asc');\n } else {\n $this->db->order_by('id', 'Asc');\n }\n $query = $this->db->get();\n return $query->num_rows();\n }", "function emailExist($dbx, string $targetEmail){\n // debug($dbx->count(\"SELECT * FROM user WHERE email = ?\",[$targetEmail]));\n return $dbx->count(\"SELECT * FROM user WHERE email = ?\",[$targetEmail]);\n}", "public function getCount($user_mail) {\n\n $query = \\Drupal::database()->select('am_registration_login_count', 'am');\n $query->addField('am', 'logincount');\n $query->condition('am.mail', $user_mail);\n $query->range(0, 1);\n $count = $query->execute()->fetchField();\n\n return $count;\n\n }", "private function check_for_email($email)\r\n\t{\r\n\t\t//We make use of the global dbCon that we've created in the config file\r\n\t\tglobal $dbCon;\r\n\r\n\t\t//SQL statement where we Count the occurances (it's faster!)\r\n\t\t$sql = \"SELECT COUNT(id) AS students FROM student WHERE email = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $email);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($students); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($students > 0)\r\n\t\t{\r\n\t\t\treturn \"Email is already in system. Try to log in!\";\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "private function check_email( $email, $password = '' ) {\n\t\t$email = addslashes( $email );\n\t\t$password = ( $password == '' ? '' : \"AND PASSWORD = '\".md5( addslashes( $password ) ).\"'\" );\n\t\t$query = collect( \\DB::select( \"\n\t\t\tSELECT \n\t\t\t\tCOUNT( 1 ) AS COUNT\n\t\t\tFROM \n\t\t\t\tTM_USER \n\t\t\tWHERE \n\t\t\t\tEMAIL = '{$email}'\n\t\t\t\t{$password}\n\t\t\" ) )->first();\n\t\treturn $query;\n\t}", "public function check_email_existence() {\n\t\t$email = $_GET['email'];\n\t\t$checkExistEmail = $this->User->find('count', array('conditions'=>array('User.email' => $email)));\n\t\techo $checkExistEmail;\n\t\texit();\n\t}", "public static function checkDuplicateUser($email)\n\t{\n\t\t$cnt = Doctrine_Query::create()\n\t\t->from(\"User\")->select()->where('email= ?', $email)->andWhere(\"deleted= 0\")->fetchArray();\n\t\t// ->findBy('email', $email)->count();\n\t\t\n\t\treturn count($cnt);\n\t}", "function getHistory($email){\n $db = databaseConnection();\n $db -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $email = $db -> quote($email);\n $query = \"SELECT *, COUNT(*) as quant FROM Transazione, Prodotto WHERE Transazione.id_prodotto=Prodotto.ID AND email=$email GROUP BY email, Prodotto.ID;\";\n $rows = $db -> query($query);\n return $rows -> fetchAll(PDO::FETCH_ASSOC);\n}", "function userExist($email){\n $users = json_decode($this->getAll());\n foreach ($users as &$user) {\n if($user->email == $email){\n return $user->counter;\n }\n }\n return NULL;\n }", "public function getEmailBySignUp($email) {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n $query = $db->query(\"SELECT count(*) as total FROM `\" . DB_PREFIX . \"user` WHERE email = '\" . $db->escape($email) . \"'\");\n return $query->row['total'];\n }", "function active_notifications_count($cond=array())\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\t$query = 'select count(*) as active_notification_count \r\n\t\t\t\tfrom timeline TL \r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\twhere TL.event_origin=TLE.origin and TEU.viewed_datetime IS NULL '. $c_filter.' group by TEU.user_id';\r\n\t\t$total_records = $this->CI->db->query($query)->row_array();\r\n\t\treturn intval(@$total_records['active_notification_count']);\r\n\t}", "public function existsByEmail($email)\n {\n $row = $this->_conn->createQueryBuilder()\n ->select('count(id) as total')\n ->from($this->getTableName(), 'n')\n ->andWhere('n.email = :email')\n ->setParameter(':email', $email)\n ->execute()\n ->fetch($this->getFetchMode());\n\n return $row['total'] > 0;\n }", "public function findDuplicatesByEmail(string $email): QueryResultInterface\n {\n $query = $this->createQuery();\n $query->getQuerySettings()->setIgnoreEnableFields(true);\n $query->matching($query->logicalAnd($query->equals('deleted', false), $query->equals('email', $email)));\n $query->setOrderings(['crdate' => QueryInterface::ORDER_ASCENDING]);\n return $query->execute();\n }", "public static function isExist($email)\r\n {\r\n return User::where('email', '=', $email)->count();\r\n }", "public function checkEmail(Request $request){\n $data = $request->all();\n $usersCount = User::where('email',$data['email'])->count();\n if($usersCount>0){\n echo \"false\";\n } else {\n echo \"true\"; die;\n }\n }", "function isEmailInList($email) {\n\t\tglobal $polarbear_db;\n\t\t$emailSafe = $polarbear_db->escape($email);\n\t\t$sql = \"SELECT count(id) AS antal FROM \" . POLARBEAR_DB_PREFIX . \"_emaillist_emails WHERE listID = '{$this->id}' AND email = '$emailSafe'\";\n\t\tglobal $polarbear_db;\n\t\t$antal = $polarbear_db->get_var($sql);\n\t\treturn (bool) $antal;\n\t}", "public function count_MyInvitationList($post_data){\n $userId = $post_data['userId'];\n $keyword = $post_data['keyword'];\n\n if(!empty($keyword)){\n $keyword = \"AND (s.searchName LIKE '%$keyword%' OR u.firstName LIKE '%$keyword%' OR s.searchId LIKE '%$keyword%' OR u.userId LIKE '%$keyword%' OR t.inviteEmail LIKE '%$keyword%' OR u.email LIKE '%$keyword%')\";\n }\n\n $sql = \"SELECT t.*,u.userId,u.firstName,u.email,s.searchName FROM tribe t\n LEFT JOIN users u ON t.fromuserId = u.userId AND u.deleteFlag !=1\n LEFT JOIN searchcriteria s on t.searchId = s.searchId \n WHERE t.touserId = $userId $keyword AND t.deleteFlag !=1 AND (t.status = '' OR t.status IS NULL) AND s.deleteFlag !=1 ORDER BY t.createdAt DESC\";\n $record = $this->db->query($sql);\n if($record->num_rows()>0){\n return $record->num_rows();\n }else{\n return false;\n }\n }", "public function emailVerify($mail)\n {\n $dbName = $this->dbConnect();\n $user = $dbName->prepare(\"SELECT mail FROM user WHERE mail = :mail\");\n $user->bindValue(\":mail\", $mail, PDO::PARAM_STR);\n $user->execute();\n $result = $user->rowCount();\n return $result;\n }", "function found($criteria=NULL) {\n\t\t$result=$this->exec(\n\t\t\tarray(\n\t\t\t\t'method'=>'count',\n\t\t\t\t'criteria'=>$criteria\n\t\t\t)\n\t\t);\n\t\treturn $result['count'];\n\t}", "public function exist_email()\r\n {\r\n $email = $this->input->post('email');\r\n \r\n $this->load->model('frontend/user_model');\r\n \r\n $record = $this->user_model->select('COUNT(id) as total')->find_by(array('email' => $email));\r\n \r\n if ($record->total == 0)\r\n echo false;\r\n else\r\n echo true; \r\n }", "private function countMails($text)\n {\n preg_match_all(\n '#[a-z0-9._-]+@[a-z0-9._-]{2,}\\.[a-z]{2,4}#i',\n $text,\n $matches);\n\n return count($matches[0]);\n }", "public function getMaillistContactsCount($filter = false)\r\n {\r\n $select = $this->_db->select()\r\n ->from(array('zume' => 'zanby_users__maillist_entries'), new Zend_Db_Expr('COUNT(maillist_id)'))\r\n ->where('zume.maillist_id = ?', $this->id)\r\n ->joininner(array('zuae' => 'zanby_users__addressbook_entries'), \"zume.addressbook_entry_id = zuae.id\");\r\n if ($filter) {\r\n $select->where('UPPER(SUBSTRING(zuae.first_name, 1, 1)) = ?', $filter);\r\n }\r\n return $this->_db->fetchOne($select);\r\n }", "public function emailExist($email){\n\t\t$query = $this->_db->prepare('SELECT COUNT(*) FROM utilisateur WHERE email=:email');\n\t\t$query->execute(array(':email' => $email));\n\t\t//get result\n\t\treturn (bool) $query->fetchColumn();\n\t}", "public function findUserByEmail($email) {\n\n\t\t$this->db->query('SELECT COUNT(*) AS emailChek\n\t\t\t\t\t\tFROM users\n\t\t\t\t\t\tWHERE email = :email');\n\t\t$this->db->bind(':email', $email);\n\t\t$row = $this->db->single();\n\n\t\tif ($row->emailChek > 0) {\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}", "public function FetchTotalRowsSearch($qSearch) {\n\t\n\t\t$encTxt = Encryption::Encrypt($qSearch);\n\t\n\t\t$query = \"SELECT Count(*) AS total FROM \" . $this->mTableName .\n\t\t\" WHERE username LIKE '%$qSearch%' OR date_create LIKE '%$qSearch%' OR email = '$encTxt' ;\";\n\t\t$objects = $this->SelectWithQuery($query);\n\t\treturn $objects[0]->total;\n\t}", "public function user_if_email_exists($email)\n\t{\n\t\t$sql = \"SELECT id FROM \".$this->table.\" WHERE email = ?\";\n\t\t$data = array($email);\n\t\t$query = $this->db->query($sql, $data);\n\t\treturn $query->num_rows();\n\t}", "public function find_all_memberships_by_email( $email ) {\n if ( $this->is_valid_email( $email ) ) {\n $f = $this->call( \"membershipFindAllByEmail\", [ \"email\" => $email ] );\n }\n return ( isset( $f ) && $f != false ) ? $this->sanitize_memberships_array( $f->memberships ) : false;\n }", "public function consultaEmail($email){\n \n if (filter_var($email, FILTER_VALIDATE_EMAIL)){\n \n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios \n WHERE email_usuario = :email_usuario',array(\n ':email_usuario'=>$email));\n \n if(count($res)>0){\n return 1001;//caso SIM email ja esta em uso\n }else{\n return 0;//tudo certo email NAO ESTA em uso\n }\n\n }else{\n return 1002;//email informado nao e valido\n }\n \n }", "private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }", "public function countUnreadMails()\n {\n try\n {\n //init the catching\n $this->exceptionThrower->start();\n $info = imap_mailboxmsginfo($this->mailbox);\n $this->exceptionThrower->stop();\n return ( property_exists($info,'unread') ? (int) $info->unread : null);\n }catch (\\Exception $e)\n {\n throw new SimpleMailReceiverException(\"Error getting the number of unread mails\" . $e->getMessage(), $e->getCode());\n }\n }", "public static function checkIfUserPost($attractionName,$email=null)\n\t{\n\t\t$countReviews = Review::where('AttractionName','=',$attractionName)->where('email','=',$email)->count();\n\n\t\treturn $countReviews;\n\t}", "function emailExists($email){\r\n $sql = \"SELECT email FROM users WHERE email = '$email'\";\r\n $count = $this->q($sql)->num_rows;\r\n if ($count > 0 ){ return true; } else{ return false; }\r\n }", "public function select_email_exist($email)\n {\n $query = new Query;\n $count = $query->select('COUNT(*) as count')->from('core_users')->where(\"email = '$email'\")->All();\n if($count[0]['count']>0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function getByEmail($email) {\n if (isset($this->contacts[$email])) {\n echo $this->formatContact($email, $this->contacts[$email]);\n\n return 1;\n } else {\n echo 'Error: Contact does not exist';\n return 0;\n }\n }", "public function getAllUsersCountAttendees()\n {\n $query = 'select attendees.userID as userID, count(attendeeID) as countAtt from users right join attendees on users.userID = attendees.userID group by attendees.userID;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n $arrayCounts = array(0 => 0); //grantees function won't return false\n while ($row = $this->connectedModel->getResultsAssoc())\n {\n $arrayCounts[$row['userID']] = $row['countAtt'];\n }\n return $arrayCounts;\n }\n else\n {\n return false;\n }\n }", "private function isUserExists($email) {\n \n $result = $this->con->query(\"SELECT iduser from user WHERE email = '\".$email.\"';\");\n $num_rows=$result->num_rows;\n \n \n return $num_rows;\n }", "function search_by_email($tableName,$email) // searching employee by email\r\n {\r\n $conn = self::build_connection();\r\n $sql = \"select * from \".$tableName .\" WHERE email='{$email}'\";\r\n $result = $conn->query($sql);\r\n self::close_connection($conn);\r\n if($result->num_rows > 0){ //if value >0 true\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "public function countOldPendingEmail()\n {\n $qb = $this->createQueryBuilder('tn')\n ->select('count(tn)')\n ->where('tn.dtStart <= :dt')\n ->andWhere('tn.status = :status')\n ->andWhere('tn.type != :typeA')\n ->andWhere('tn.type != :typeB')\n ->setParameter('dt', new DateTime('now'))\n ->setParameter('status', TraineeNotif::PENDING)\n ->setParameter('typeA', TraineeNotif::TYPE_TXT_SURVEYBEGIN)\n ->setParameter('typeB', TraineeNotif::TYPE_TXT_SURVEYEND);\n\n $query = $qb->getQuery();\n\n return $query->getSingleScalarResult();\n }", "public function checkIfEmailExists($email);", "private function getNumberOfBadAttempts($email)\n {\n try {\n $db_query = $this->db->prepare('SELECT count(*) AS count FROM login_attempts WHERE email=:email');\n $db_query->bindParam(':email', $email);\n $db_query->execute();\n if ($db_query->rowCount()) {\n $res = $db_query->fetch(PDO::FETCH_ASSOC);\n return $res['count'];\n } else {\n return null;\n }\n } catch (PDOException $e) {\n DBErrorLog::loggingErrors($e);\n }\n }", "static function customerCount( )\n {\n $db = eZDB::instance();\n $countArray = $db->arrayQuery( \"SELECT count( DISTINCT email) AS count FROM ezorder WHERE is_temporary='0'\" );\n return $countArray[0]['count'];\n }", "public function count(array $criteria = array()) {\n\t\t$record_count = $this->getCollection()->count($criteria);\n\t\treturn $record_count;\n\t}", "public function CounterMail(){\n\n $CantidadMails = ($this->ConfigModelo->select('rowCountWhere', 'Mensajes', 'estado', '0', 'Id', 'Id'));\n\n return $CantidadMails;\n\n }", "public function get_counts() {\n\n\t\t$this->counts = [];\n\n\t\t// Base params with applied filters.\n\t\t$base_params = $this->get_filters_query_params();\n\n\t\t$total_params = $base_params;\n\t\tunset( $total_params['status'] );\n\t\t$this->counts['total'] = ( new EmailsCollection( $total_params ) )->get_count();\n\n\t\tforeach ( $this->get_statuses() as $status => $name ) {\n\t\t\t$collection = new EmailsCollection( array_merge( $base_params, [ 'status' => $status ] ) );\n\n\t\t\t$this->counts[ 'status_' . $status ] = $collection->get_count();\n\t\t}\n\n\t\t/**\n\t\t * Filters items counts by various statuses of email log.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param array $counts {\n\t\t * Items counts by statuses.\n\t\t *\n\t\t * @type integer $total Total items count.\n\t\t * @type integer $status_{$status_key} Items count by status.\n\t\t * }\n\t\t */\n\t\t$this->counts = apply_filters( 'wp_mail_smtp_pro_emails_logs_admin_table_get_counts', $this->counts );\n\t}", "public function exists($user_mail) {\n\n $query = \\Drupal::database()->select('am_registration_login_count', 'am');\n $query->fields('am', ['mail']);\n $query->condition('am.mail', $user_mail);\n $query->range(0, 1);\n $result = $query->execute()->fetchAssoc();\n\n return $result;\n\n }", "public function checkIfEmailExist(Request $request)\n {\n\t\t$data = $request->post();\n\t\t$condition = [['email','=',$data['email']]] ;\n\t\t$conditionWithId = [['email','=',$data['email']],['id','!=',$data['id']]] ;\n\t\t$count = 0;\n\t\tif($data['id'] == 0){\n\t\t\t$count = $count + User::where($condition)->count();\n\t\t\t$count = $count + AdminUser::where($condition)->count();\n\t\t\t\n\t\t} elseif($data['role'] == \"user\"){\n\t\t\t$count = $count + User::where($conditionWithId)->count();\n\t\t\t$count = $count + AdminUser::where($condition)->count();\n\t\t\t\n\t\t} elseif($data['role'] == \"admin\"){\n\t\t\t$count = $count + User::where($condition)->count();\n\t\t\t$count = $count + AdminUser::where($conditionWithId)->count();\n\t\t}\t\t\n\t\t\n\t\treturn new Response($count);\n }", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "public function validate_group_member_email()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$email = $this->input->get('fieldValue', '', 'string');\n\t\t$validateId = $this->input->get('fieldId', '', 'string');\n\t\t$query->select('COUNT(*)')\n\t\t\t->from('#__users')\n\t\t\t->where('email = ' . $db->quote($email));\n\t\t$db->setQuery($query);\n\t\t$total = $db->loadResult();\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\n\t\tif (!$total)\n\t\t{\n\t\t\t$arrayToJs[1] = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrayToJs[1] = false;\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}", "function howManyTries($email, $passDate)\n {\n $bdd = connexMedoo();\n $total = $bdd->count('connexions', '*', [\n 'login' => $email,\n 'date[>]' => $passDate\n ]);\n if(!empty($total)) {\n return $total;\n } else {\n return false;\n }\n }", "function getUsersCount() {\n $company_id = $this->getId(); \n \treturn Users::count(\"company_id LIKE $company_id\");\n }", "public function hasByEmail(Email $email): bool\n {\n }", "public function searchUser($email) {\r\n\r\n\t\t//TODO: Look at bookmark class for sample try/catch block around DB code\r\n\t\t$sqlObj = new DataBase();\r\n\t\t$found = FALSE;\r\n\r\n\t\t$query = \"SELECT * FROM `user_credentials` WHERE `email`='$email'\";\r\n\r\n\t\ttry {\r\n\t\t\t$sqlObj->DoQuery($query);\r\n\t\t\t$resultset = $sqlObj->GetData();\r\n\r\n\t\t\t$num = $sqlObj->getNumberOfRecords();\r\n\t\t} catch (MyException $e) {\r\n\t\t\t$e->getMyExceptionMessage();\r\n\t\t}\r\n\t\tif ($num == 1) {\r\n\t\t\t$id = $resultset[0]['id'];\r\n\t\t\t$found = $id;\r\n\t\t} else {\r\n\t\t\t$found = -1;\r\n\t\t}\r\n\t\t$sqlObj->destroy();\r\n\r\n\t\treturn $found;\r\n\t}", "private function isMail($email)\n {\n $db = $this->dbConnect();\n\n $req = $db->prepare('SELECT email FROM user WHERE email = :email');\n\n $req->bindParam(':email',$email, \\PDO::PARAM_STR);\n\n $req->execute();\n\n $checkMail = $req->rowCount();\n\n return $checkMail;\n }", "public static function ifEmail($emails)\n\t\t{\n\t\t\t$pattern = \"/^([a-zA-Z0-9-_\\.]{3,})@([a-zA-Z0-9-_]{4,})\\.([a-zA-Z]{2,6})$/\";\n\t\t\tif(is_array($emails))\n\t\t\t{\n\t\t\t\tforeach ($emails as $email) \n\t\t\t\t{\n\t\t\t\t\tif(!preg_match($pattern, $email))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(preg_match($pattern, $emails))\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "public function getUserRequests($email) {\n $this->noNullParameters($email);\n\n $response = $this->client->getConnection()->get(Url::build(self::PATH.'s','list-by-email',['email'=>$email]));\n return $response->getBody()->getContents();\n }", "public function lookForUserByEmail($email)\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT email FROM users WHERE email = ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n $this->query->execute(array($email));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n return $this->result;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }", "public function searchUserByEmail($email)\n {\n\n $pdo = DB::connect();\n $stmt = $pdo->prepare(\"SELECT id FROM users WHERE email = :email\");\n $stmt->bindParam(':email', $email);\n $stmt->execute();\n $result = $stmt->fetchColumn();\n return $result;\n }", "public function fetchReportByEmail($email)\n {\n $rsm = new ResultSetMapping;\n $rsm->addScalarResult('event_type', 'event_type');\n $rsm->addScalarResult('event_time', 'event_time');\n\n $query = $this->getEntityManager()\n ->createNativeQuery(\n 'select j.event_type as event_type, j.event_time as event_time from journey j LEFT JOIN user_auth u on u.id = j.user_id WHERE u.ua_email_address = :email ORDER by j.event_time ASC',\n $rsm\n )\n ->setParameter('email', $email);\n\n return $query->getArrayResult();\n }", "public function checkEmail($email)\n\t {\n\t \t$sql = \"SELECT email\n\t\t\tFROM tbl_users WHERE email = :email\";\n\n\t\t\t$pre = $this->pdo->prepare($sql);\n\t\t\t$pre->bindParam(':email', $email, PDO::PARAM_STR);\n\n\t\t\t$pre->execute();\n\t\t\treturn $pre->rowCount(); // Returns the number of rows affected.\n\t }", "function existsByEmail( $email, $oid=null);", "public function getUsersByEmail($email)\n\t{\n\t\tself::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * \n \t\t\tFROM users\n \t\t\tWHERE users.email LIKE ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n\t\t\t\n $this->query->execute(array('%' . $email . '%'));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n\t}", "public function email_exists($email){\n\t\t$query = $this->db->prepare(\"SELECT count(`user_email`) FROM `nw_users` WHERE `user_email`= ?\");\n\t\t$query->bindValue(1, $email);\n\n\t\ttry{\n\t\t\t$query->execute();\n\t\t\t$rows = $query->fetchColumn();\n\n\t\t\tif($rows == 1){\n\n\t\t\t\treturn true;\n\n\t\t\t}else{\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}catch(PDOException $e){\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "public function email_exists($email) {\n\n\t\t\t$query = $this->db->prepare(\"SELECT COUNT(`user_id`) FROM `users` WHERE `email`= ?\");\n\t\t\t$query->bindValue(1, $email);\n\t\t\n\t\t\ttry{\n\n\t\t\t\t$query->execute();\n\t\t\t\t$rows = $query->fetchColumn();\n\n\t\t\t\tif($rows == 1){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t} catch (PDOException $e){\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\n\t\t}", "public function getAllUsersCountConfirmedAttendees()\n {\n $query = 'select attendees.userID as userID, count(attendeeID) as countAtt from users right join attendees on users.userID = attendees.userID where attendees.isAttending = 1 group by attendees.userID;';\n // echo ' * query = ' . $query . ' * ';\n if ($this->connectedModel->runQuery($query)) //query\n {\n $arrayCounts = array(0 => 0); //grantees function won't return false\n while ($row = $this->connectedModel->getResultsAssoc())\n {\n $arrayCounts[$row['userID']] = $row['countAtt'];\n // echo '<br />' . $row['userID'] . '-' . $row['countAtt'] . '<br />';\n }\n // echo ' * loop fin * ';\n return $arrayCounts;\n }\n else\n {\n // echo ' * query false * ';\n return false;\n }\n }", "public function Appointment_count($where = array())\n\t{\n\t\treturn $this->db->where($where)\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->count_all_results();\n\t}", "public function findCount($cond = null) {\n $res = $this->findFirst(array(\n 'fields'=>array('count('.$this->primaryKey.') as count'),\n 'conditions'=>$cond,\n ));\n return $res->count;\n }" ]
[ "0.71565586", "0.7053754", "0.7026054", "0.695855", "0.6875584", "0.6798478", "0.679187", "0.6596043", "0.65268284", "0.64507735", "0.6441059", "0.64250684", "0.63942015", "0.6330408", "0.6326498", "0.63171285", "0.6182561", "0.6180031", "0.6162699", "0.61534566", "0.61496484", "0.61189795", "0.6097551", "0.6086295", "0.60550374", "0.6054793", "0.60461795", "0.60296637", "0.60220045", "0.60129005", "0.60057616", "0.6000297", "0.59995437", "0.59995365", "0.5995399", "0.59663135", "0.59409475", "0.59400946", "0.59285563", "0.5905385", "0.5898882", "0.58898216", "0.580273", "0.5777539", "0.5775904", "0.5764157", "0.5761095", "0.5745178", "0.5722166", "0.5701547", "0.56518936", "0.56370467", "0.5636021", "0.5634329", "0.5611059", "0.56108147", "0.5608883", "0.5605987", "0.56046134", "0.5602988", "0.5602173", "0.55747247", "0.556319", "0.5559525", "0.55572444", "0.55537486", "0.5547893", "0.5531631", "0.5521145", "0.552099", "0.55117875", "0.55003667", "0.54970056", "0.5494541", "0.5494306", "0.5489081", "0.54834104", "0.54812646", "0.5475443", "0.5469723", "0.5469031", "0.5468527", "0.54625785", "0.5460424", "0.54601973", "0.54534763", "0.54412365", "0.54333353", "0.5432415", "0.54268134", "0.5407394", "0.5406747", "0.53992957", "0.5393671", "0.5392822", "0.53738374", "0.53723526", "0.53688896", "0.5364207", "0.53632313" ]
0.8394017
0
Prepare Curl for download page
static function createDownload($url) { $curl = new CUrl($url); $curl->setOptions(array( CURLOPT_HEADER => FALSE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_SSL_VERIFYHOST => FALSE) ); return $curl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpc_curl_download( $url ) { if( !function_exists( 'curl_init' ) )\r\n die( 'Sorry cURL is not installed!' );\r\n\r\n // OK cool - then let's create a new cURL resource handle\r\n $ch = curl_init();\r\n\r\n // Now set some options (most are optional)\r\n\r\n // Set URL to download\r\n curl_setopt( $ch, CURLOPT_URL, $url );\r\n // Set a referer\r\n curl_setopt( $ch, CURLOPT_REFERER, $_SERVER['SERVER_NAME'] );\r\n // User agent\r\n curl_setopt( $ch, CURLOPT_USERAGENT, 'MozillaXYZ/1.0' );\r\n // Include header in result? (0 = yes, 1 = no)\r\n curl_setopt( $ch, CURLOPT_HEADER, 0 );\r\n // Should cURL return or print out the data? (true = return, false = print)\r\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\r\n // Timeout in seconds\r\n curl_setopt( $ch, CURLOPT_TIMEOUT, 10 );\r\n\r\n // Download the given URL, and return output\r\n $output = curl_exec( $ch );\r\n\r\n // Close the cURL resource, and free system resources\r\n curl_close( $ch );\r\n\r\n return $output;\r\n}", "function curl_download($Url){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n \n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $Url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n\n return $output;\n}", "function curl_download($Url){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n // ###Now set some options (most are optional)###\n // Set URL to download\n curl_setopt($ch, CURLOPT_URL, $Url);\n // Set a referer\n curl_setopt($ch, CURLOPT_REFERER, \"http://www.example.org/yay.htm\");\n // User agent\n curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n // Include header in result? (0 = yes, 1 = no)\n curl_setopt($ch, CURLOPT_HEADER, 0);\n // Should cURL return or print out the data? (true = return, false = print)\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // Timeout in seconds\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n // Download the given URL, and return output\n $output = curl_exec($ch);\n // Close the cURL resource, and free system resources\n curl_close($ch);\n return $output;\n}", "function curl_download($Url){ if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n\n // OK cool - then let's create a new cURL resource handle\n $ch = curl_init();\n\n // Now set some options (most are optional)\n\n // Set URL to download\n curl_setopt($ch, CURLOPT_URL, $Url);\n\n // Set a referer\n //curl_setopt($ch, CURLOPT_REFERER, \"http://www.example.org/yay.htm\");\n\n // User agent\n //curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n\n // Include header in result? (0 = yes, 1 = no)\n curl_setopt($ch, CURLOPT_HEADER, 0);\n\n // Should cURL return or print out the data? (true = return, false = print)\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Timeout in seconds\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\n // Download the given URL, and return output\n $output = curl_exec($ch);\n\n // Close the cURL resource, and free system resources\n curl_close($ch);\n\n return $output;\n}", "function downloadUrl($url)\r\n{\r\n\r\n $ch = curl_init ($url);\r\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER,0);\r\n\tcurl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);\r\n\r\n\t$rawdata=curl_exec($ch);\r\n\tcurl_close ($ch);\r\n /*$LogHandler->addRecord(\r\n Logger::NOTICE,\r\n \"Finished downloading \".$url,\r\n array('url' => $url)\r\n );\r\n*/\r\n\treturn $rawdata;\r\n}", "private function DownloadParsePage() {\n $this->Log(\"Debridage du lien : \".$this->url);\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, DOWNLOAD_STATION_USER_AGENT);\n\t\tcurl_setopt($curl, CURLOPT_COOKIEFILE, $this->TOUTDEBRID_COOKIE);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_URL, $this->TOUTDEBRID_DEBRID_URL);\n curl_setopt($curl, CURLOPT_POST, TRUE);\n curl_setopt($curl, CURLOPT_POSTFIELDS, 'urllist='.urlencode($this->url).'&captcha=none&');\n\t\t$ret = curl_exec($curl);\n\t\t$this->Log(\"Reponse tout-debrid : \".$ret);\n\t\tcurl_close($curl);\n\t\treturn $ret;\n\t}", "protected function _ProcessDataCurl(){\n\t\t$url = $this->_url;\n\t\t$args = $this->_args;\n\t\t$encod = isset($args['encod']) ? $args['encod'] : \"gzip\";\n\t\t$timeout_con = isset($args['timeout_con']) ? $args['timeout_con'] : 5;\n\t\t$timeout_res = isset($args['timeout_res']) ? $args['timeout_res'] : 10;\n\t\t$max_redir = isset($args['max_redir']) ? $args['max_redir'] : 3;\n\n\t\tif($url == false){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\t$options = array(\n\t\t\t\tCURLOPT_RETURNTRANSFER => true, // return web page\n\t\t\t\tCURLOPT_HEADER => false, // don't return headers\n\t\t\t\tCURLOPT_FOLLOWLOCATION => true, // follow redirects\n\t\t\t\tCURLOPT_ENCODING => $encod, // handle all encodings\n\t\t\t\tCURLOPT_AUTOREFERER => true, // set referer on redirect\n\t\t\t\tCURLOPT_CONNECTTIMEOUT => $timeout_con, // timeout on connect\n\t\t\t\tCURLOPT_TIMEOUT => $timeout_res, // timeout on response\n\t\t\t\tCURLOPT_MAXREDIRS => $max_redir, // stop after 10 redirects\n\t\t\t\tCURLOPT_SSL_VERIFYHOST => 0, // disable SSL verification host\n\t\t\t\tCURLOPT_SSL_VERIFYPEER => false, // skip SSL verifier\n\t\t\t);\n\n\t\t\t$curl = curl_init();\n\t\t\t\n\t\t\tif(isset($args['uAgent'])){\n\t\t\t\t$options[CURLOPT_USERAGENT] = $args['uAgent']; // who am i\n\t\t\t}\n\n\t\t\tif(isset($args['refer'])){\n\t\t\t\t$options[CURLOPT_REFERER] = $args['refer']; // detect domain come from request\n\t\t\t}\n\n\t\t\tif(isset($args['auth'])){\n\t\t\t\t$options[CURLOPT_USERPWD] = $args['auth']; // detect domain come from request\n\t\t\t\t$options[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC; // set HTTP authorization\n\t\t\t}\n\n\t\t\t$options[CURLOPT_URL] = $url; \n\t\t\tcurl_setopt_array($curl, $options);\n\n\t\t\t$result = curl_exec($curl);\n\n\t\t\tif($result !== false){\n\n\t\t\t\t$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); \n\n\t\t\t\tif( in_array($statusCode, range(200,306)) ){\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tcurl_close($curl);\n\t\t}\n\t}", "protected function getPageCurl()\n\t{\n\t\t// initiate curl with our url\n\t\t$this->curl = curl_init($this->url);\n\n\t\t// set curl options\n\t\tcurl_setopt($this->curl, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);\n\n\t\t// execute the call to google+\n\t\t$this->html = curl_exec($this->curl);\n\n\t\tcurl_close($this->curl);\n\t}", "function getPageContent($url) {\r\n // create curl variable\r\n $curl = curl_init(); \r\n // set the url\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n // return the transfer as a resource\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n // $output contains the output string\r\n $output = curl_exec($curl);\r\n // close curl resource to free up system memory\r\n curl_close($curl);\r\n // return the output of the curl\r\n return $output;\r\n}", "private static function PrepareRequest($url = \"\")\n\t{\n\t\t$request = curl_init();\n\t\tcurl_setopt($request, CURLOPT_URL,\t\t\t\tempty($url) ? self::URL : $url);\n\t\tcurl_setopt($request, CURLOPT_HEADER,\t\t\ttrue);\n\t\tcurl_setopt($request, CURLOPT_RETURNTRANSFER,\ttrue);\n\t\tcurl_setopt($request, CURLOPT_ENCODING,\t\t\t\"gzip\");\n\t\tcurl_setopt($request, CURLOPT_USERAGENT,\t\tself::UserAgent);\n\t\tif ( !empty(self::$cookie) )\n\t\t\tcurl_setopt($request, CURLOPT_COOKIE,\t\tself::$cookie);\n\t\treturn $request;\n\t}", "public function completeRequest($url) {\n\t\t//thanks to: http://www.hashbangcode.com/blog/quickest-way-download-web-page-php\n\t\t // create curl resource \n $ch = curl_init(); \n\n // set url \n curl_setopt($ch, CURLOPT_URL, $url); \n\n //return the transfer as a string \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n // $output contains the output string \n $output = curl_exec($ch); \n\t\t\n // close curl resource to free up system resources \n curl_close($ch); \n \n //return file_get_contents($url);\n \n\treturn $output;\n\t}", "private static function downloadUrl($url, $timeout = 3)\n {\n $ch = curl_init();\n $data = '';\n\n if (substr($url, -3) == 'zip') {\n $temp_dir = storage_path('tmp/' . self::getUniqueCode() . '/');\n if (!is_dir($temp_dir)) {\n mkdir($temp_dir, 0777, true);\n }\n $temp_dir = realpath($temp_dir);\n $temp_file = $temp_dir . '/data.zip';\n\n $fp = fopen($temp_file, 'w+');//This is the file where we save the information\n $ch = curl_init($url);//Here is the file we are downloading\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_exec($ch);\n curl_close($ch);\n fclose($fp);\n // PHP Bug\n if (is_resource($fp)) {\n fclose($fp);\n }\n\n $temp_file = realpath($temp_file);\n\n $zip = zip_open($temp_file);\n if (is_resource($zip)) {\n while ($zip_entry = zip_read($zip)) {\n $fp = fopen($temp_dir. \"/\" .zip_entry_name($zip_entry), \"w\");\n if (zip_entry_open($zip, $zip_entry, \"r\")) {\n $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));\n fwrite($fp, \"$buf\");\n zip_entry_close($zip_entry);\n fclose($fp);\n }\n }\n zip_close($zip);\n }\n if (is_file($temp_dir . '/en.xml')) {\n $data = file_get_contents($temp_dir . '/en.xml');\n }\n File::deleteDirectory($temp_dir);\n } else {\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); // times out after 4s\n //Dit lost problemen op voor episodes, maar waarom weet ik niet.\n //Gzip lijkt wel default in de header te staan\n //Waar curl niet niet herkende en me de gecodeerde content gaf\n curl_setopt($ch, CURLOPT_ENCODING, 'gzip');\n $data = curl_exec($ch);\n\n }\n\n return $data;\n }", "private function _curlDownload($Url) {\n if (!function_exists('curl_init')) {\n die('Sorry cURL is not installed!');\n }\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $Url);\n curl_setopt($ch, CURLOPT_REFERER, \"http://www.example.org/yay.htm\");\n curl_setopt($ch, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n $output = curl_exec($ch);\n curl_close($ch);\n\n return $output;\n }", "function getWebPage($url){\n $options = array( \n\t \tCURLOPT_RETURNTRANSFER => true, // to return web page\n CURLOPT_HEADER => true, // to return headers in addition to content\n CURLOPT_FOLLOWLOCATION => true, // to follow redirects\n CURLOPT_ENCODING => \"\", // to handle all encodings\n CURLOPT_AUTOREFERER => true, // to set referer on redirect\n CURLOPT_CONNECTTIMEOUT => 120, // set a timeout on connect\n CURLOPT_TIMEOUT => 120, // set a timeout on response\n CURLOPT_MAXREDIRS => 10, // to stop after 10 redirects\n CURLINFO_HEADER_OUT => true, // no header out\n CURLOPT_SSL_VERIFYPEER => false,// to disable SSL Cert checks\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n );\n\n $handle = curl_init( $url );\n curl_setopt_array( $handle, $options );\n \n \t// additional for storing cookie \n $tmpfname = dirname(__FILE__).'/cookie.txt';\n curl_setopt($handle, CURLOPT_COOKIEJAR, $tmpfname);\n curl_setopt($handle, CURLOPT_COOKIEFILE, $tmpfname);\n\n $raw_content = curl_exec( $handle );\n $err = curl_errno( $handle );\n $errmsg = curl_error( $handle );\n $header = curl_getinfo( $handle ); \n curl_close( $handle );\n \n $header_content = substr($raw_content, 0, $header['header_size']);\n $body_content = trim(str_replace($header_content, '', $raw_content));\n \n \t// extract cookie from raw content for the viewing purpose \n $cookiepattern = \"#Set-Cookie:\\\\s+(?<cookie>[^=]+=[^;]+)#m\"; \n preg_match_all($cookiepattern, $header_content, $matches); \n $cookiesOut = implode(\"; \", $matches['cookie']);\n\n $header['errno'] = $err;\n $header['errmsg'] = $errmsg;\n $header['headers'] = $header_content;\n $header['content'] = $body_content;\n $header['cookies'] = $cookiesOut;\n \treturn $header['content'];\n}", "function file_get_curl($url, $post_params = '') \r\n\t{\r\n\t\t$interfaces = array('10.1.77.47');\r\n\t\t$interface = $interfaces[mt_rand(0, count($interfaces) - 1)];\r\n\t\t\r\n\t\t$ch = curl_init();\r\n\t\t\r\n\t\tcurl_setopt($ch, CURLOPT_AUTOREFERER, true);\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); \r\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36\");\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 15);\r\n\t\t\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, (__DIR__).'/cookies.txt');\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, (__DIR__).'/cookies.txt');\r\n\t\t\r\n\t\tif(!empty($post_params))\r\n\t\t{\r\n\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\r\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);\r\n\t\t}\r\n\t\t\r\n\t\tif(!empty($interface))\r\n\t\t{\r\n\t\t\tcurl_setopt($ch, CURLOPT_INTERFACE, $interface);\r\n\t\t}\r\n\t\t\r\n\t\t$data = curl_exec($ch);\r\n\t\tcurl_close($ch);\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "public function curlInit() {\n parent::curlInit();\n curl_setopt($this->curl, CURLOPT_HEADER, true);\n curl_setopt($this->curl, CURLOPT_ACCEPT_ENCODING, 'identity');\n }", "private function download_page($path){\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$path);\n\tcurl_setopt($ch, CURLOPT_FAILONERROR,1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 15);\n\t$retValue = curl_exec($ch);\t\t\t \n\tcurl_close($ch);\n\treturn $retValue;\n}", "function download_image2($image_url){\n $ch = curl_init($image_url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 40);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');\n curl_setopt($ch, CURLOPT_WRITEFUNCTION, \"curl_callback\");\n // curl_setopt($ch, CURLOPT_VERBOSE, true); // Enable this line to see debug prints\n curl_exec($ch);\n curl_close($ch); \n}", "function funInitCurl(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 20);\n\n return $ch;\n}", "function get_stock_price_url($curl_user_pass) {\r\n $url = $curl_user_pass['url'];\r\n\r\n $ch = curl_init();\r\n\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n// curl_setopt($ch, CURLOPT_FILE, $out);\r\n curl_setopt($ch, CURLOPT_HEADER, 0);\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_USERPWD, $curl_user_pass['user_pass']);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\r\n $xml = curl_exec($ch);\r\n return $xml;\r\n}", "protected function curlDownload ($source_url, $target_path, &$info = array())\n {\n try {\n\n // first try to get the redirected URL\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $source_url);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERAGENT, self::USERAGENT);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_USERPWD, self::$auth);\n if (!is_null(self::$proxy)) {\n curl_setopt($ch, CURLOPT_PROXYAUTH, self::$proxy_auth);\n curl_setopt($ch, CURLOPT_PROXY, self::$proxy);\n curl_setopt($ch, CURLOPT_PROXYPORT, self::$proxy_port);\n curl_setopt($ch, CURLOPT_PROXYUSERPWD, self::$proxy_usrpwd);\n }\n $header = curl_exec($ch);\n curl_close($ch);\n if (preg_match('#Location: (.*)#', $header, $redirect)) {\n // this is the redirected URL\n $source_url = trim($redirect[1]);\n }\n\n // init cURL\n $ch = curl_init();\n // set the cURL options\n curl_setopt($ch, CURLOPT_URL, $source_url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FAILONERROR, true);\n curl_setopt($ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 1000);\n curl_setopt($ch, CURLOPT_USERAGENT, self::USERAGENT);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n // curl_setopt($ch, CURLOPT_USERPWD, self::$auth);\n if (!is_null(self::$proxy)) {\n curl_setopt($ch, CURLOPT_PROXYAUTH, self::$proxy_auth);\n curl_setopt($ch, CURLOPT_PROXY, self::$proxy);\n curl_setopt($ch, CURLOPT_PROXYPORT, self::$proxy_port);\n curl_setopt($ch, CURLOPT_PROXYUSERPWD, self::$proxy_usrpwd);\n }\n // exec cURL and get the file content\n if (false === ($file_content = curl_exec($ch))) {\n throw new \\Exception(sprintf('cURL Error: [%d] - %s', curl_errno($ch), curl_error($ch)));\n }\n if (! curl_errno($ch)) {\n $info = curl_getinfo($ch);\n }\n // close the connection\n curl_close($ch);\n\n if (isset($info['http_code']) && ($info['http_code'] != '200')) {\n return false;\n }\n\n // create the target file\n if (false === ($downloaded_file = @fopen($target_path, 'w')))\n throw new \\Exception('fopen() fails!');\n // write the content to the target file\n if (false === ($bytes = fwrite($downloaded_file, $file_content)))\n throw new \\Exception('fwrite() fails!');\n // close the target file\n fclose($downloaded_file);\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage());\n }\n }", "private function initCurl()\n\t{\n\t\t$this->_curl = curl_init();\n\t\t//TODO: delete useless lines\n\t\tcurl_setopt ($this->_curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\t\tcurl_setopt ($this->_curl, CURLOPT_TIMEOUT, 4000);\n\t\tcurl_setopt ($this->_curl, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt ($this->_curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt ($this->_curl, CURLOPT_COOKIEJAR, self::$_COOKIE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_COOKIEFILE, self::$_COOKIE);\n\t\tcurl_setopt ($this->_curl, CURLOPT_POST, 1);\n\t}", "public function download() {\t\t}", "function fetch_into_file($url, $file)\n{\n $SSL_fopen = false;\n if(in_array('https', stream_get_wrappers())) {\n $SSL_fopen = true;\n }\n\n // Open URL for reading\n if($SSL_fopen) {\n $source = @fopen($url, \"r\");\n if (!$source) {\n return;\n }\n } else {\n $source = popen(\"curl -s '$url'\", 'r');\n }\n\n // Open temporary file for writing\n $dest = @fopen(\"$file~\", \"w\");\n if (!$dest) {\n echo \"failed to open '$file~' for writing\\n\";\n return;\n }\n\n // Read until $source provides data, and write\n // out the chunk to the output file if possible\n while (!feof($source)) {\n $chunk = fread($source, 4096);\n if (fwrite($dest, $chunk) < 0) {\n fclose($source);\n fclose($dest);\n unlink(\"$file~\");\n echo \"failed writing to '$file~'\\n\";\n return;\n }\n }\n fclose($source);\n fclose($dest);\n\n // If we don't have new data, delete file\n if (!@filesize(\"$file~\")) {\n echo \"'$file~' was empty, skipping\\n\";\n unlink(\"$file~\");\n return;\n }\n\n // Replace real file with temporary file\n return rename(\"$file~\", $file);\n}", "public static function\n download_html_page(\n $page_url\n )\n {\n $cookie = tempnam (\"/tmp\", \"CURLCOOKIE\");\n $timeout = 5;\n $curl_handle=curl_init();\n curl_setopt($curl_handle,CURLOPT_URL, $page_url);\n ////curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n\n\n curl_setopt( $curl_handle, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1\" );\n curl_setopt( $curl_handle, CURLOPT_COOKIEJAR, $cookie );\n curl_setopt( $curl_handle, CURLOPT_FOLLOWLOCATION, true );\n curl_setopt( $curl_handle, CURLOPT_ENCODING, \"\" );\n curl_setopt( $curl_handle, CURLOPT_RETURNTRANSFER, true );\n curl_setopt( $curl_handle, CURLOPT_AUTOREFERER, true );\n curl_setopt( $curl_handle, CURLOPT_CONNECTTIMEOUT, $timeout );\n curl_setopt( $curl_handle, CURLOPT_TIMEOUT, $timeout );\n curl_setopt( $curl_handle, CURLOPT_MAXREDIRS, 10 );\n\n\n $buffer = curl_exec($curl_handle);\n curl_close($curl_handle);\n // print_r($page_url);exit;\n // print_r($buffer);exit;\n\n\n if (empty($buffer)) {\n throw new VideoLibrary_DownloadUnsuccessfulException();\n } else {\n return $buffer;\n }\n }", "function copy_file($url_origem, $arquivo_destino){\r\n\t$minha_curl = curl_init($url_origem);\r\n\t$fs_arquivo = fopen($arquivo_destino, \"w\");\r\n\tcurl_setopt($minha_curl, CURLOPT_FILE, $fs_arquivo);\r\n\tcurl_setopt($minha_curl, CURLOPT_HEADER, 0);\r\n\tcurl_exec($minha_curl);\r\n\tcurl_close($minha_curl);\r\n\treturn fclose($fs_arquivo);\r\n}", "function fetch($url){\n curl_setopt($this-> ch,CURLOPT_URL, $url);\n curl_setopt($this-> ch,CURLOPT_COOKIE, \"./cookie.txt\"); \n curl_setopt($this-> ch,CURLOPT_FOLLOWLOCATION, true);\n return $this-> html = curl_exec($this-> ch);\n }", "public function curl_scrap() {\n\t\tif (!isset($this->url)) return false;\n\n\t\t$curl_session = curl_init($this->url);\n\n\t\t// CURLOPT_RETURNTRANSFER this option means that the curl_exec must put the output in a var instead of only printing it.\n\t\tcurl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true);\n\n\t\t// CURLOPT_FILETIME this option means that the scraping will occur whilst retrieving the modification time of the remote file scrapped\n\t\tcurl_setopt($curl_session, CURLINFO_FILETIME, true);\n\t\t\n\t\t$scrapped_page = curl_exec($curl_session);\n\t\tif (curl_errno($curl_session))\n\t\t\t//kill the script and throw an error if there is an error in curl_exec;\n\t\t\tdie('An error occured while scraping: '.$this->url.' ERROR::'. curl_error($curl_session).\"\\n\");\n\n\t\t$filetime = curl_getinfo($curl_session, CURLINFO_FILETIME); //unix time or -1 if undef\n\t\tcurl_close($curl_session);\n\n\t\treturn $scrapped_page? array(\n\t\t\t\t\t'scrapped_page' => $scrapped_page,\n\t\t\t\t\t'filetime' => $filetime,\n\t\t\t\t):\n\t\t\t\tfalse;\n\t}", "public function __construct() {\n $this->_handle = curl_init();\n $this->_opt(CURLOPT_HEADER, false);\n $this->_opt(CURLOPT_RETURNTRANSFER, true);\n }", "function bacaHTML($url) {\r\n $ip = $url;\r\n $data = curl_init();\r\n // setting CURL\r\n curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($data, CURLOPT_URL, $ip);\r\n\r\n // menjalankan CURL untuk membaca isi file\r\n $hasil = curl_exec($data);\r\n curl_close($data);\r\n return $hasil;\r\n}", "function cs_curl_contents($url)\n{\n\t$timeout = 3; // set to zero for no timeout\n\t$maxredirects = 5; // set to zero for no redirects\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, false);\n\t$noredirect = false;\r\n\t$bd = ini_get('open_basedir');\r\n\t$sm = ini_get('safe_mode');\r\n\tif (!empty($bd) || !empty($sm) || $maxredirects == 0)\r\n\t{\r\n\t\t$noredirect = true;\r\n\t}\n\tif ($noredirect)\n\t{\r\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\t\t$mr = $maxredirects;\n\t\tif ($mr > 0)\n\t\t{\n\t\t\t$newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\r\n\t\t\t// curl_copy_handle crashes in php < 5.2.11\r\n\t\t\t// $rch = curl_copy_handle($ch);\n\t\t\t$rch = curl_init();\r\n\t\t\tcurl_setopt($rch, CURLOPT_URL, $url);\r\n\t\t\tcurl_setopt($rch, CURLOPT_RETURNTRANSFER, true);\r\n\t\t\tcurl_setopt($rch, CURLOPT_CONNECTTIMEOUT, $timeout);\r\n\t\t\tcurl_setopt($rch, CURLOPT_TIMEOUT, $timeout);\r\n\t\t\tcurl_setopt($rch, CURLOPT_FORBID_REUSE, false);\r\n\t\t\tcurl_setopt($rch, CURLOPT_HEADER, true);\n\t\t\tcurl_setopt($rch, CURLOPT_NOBODY, true);\n\t\t\tcurl_setopt($rch, CURLOPT_FOLLOWLOCATION, false);\r\n\t\t\tdo {\n\t\t\t\tcurl_setopt($rch, CURLOPT_URL, $newurl);\n\t\t\t\t$header = curl_exec($rch);\n\t\t\t\tif (curl_errno($rch))\n\t\t\t\t\t$code = -1;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code = curl_getinfo($rch, CURLINFO_HTTP_CODE);\n\t\t\t\t\tif (in_array($code, array(300, 301, 302, 303, 305, 307)))\n\t\t\t\t\t{\n\t\t\t\t\t\tpreg_match('/Location:(.*?)\\n/', $header, $matches);\n\t\t\t\t\t\t$newurl = trim(array_pop($matches));\n\t\t\t\t\t}\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($code == 200) // only ok code\r\n\t\t\t\t\t\t $code = 0;\r\n\t\t\t\t\t\telse if ($code >= 400)\r\n\t\t\t\t\t\t\t$code = -1;\r\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while ($code > 0 && --$mr);\n\t\t\tcurl_close($rch);\r\n\t\t\tif (!$mr || $code == -1)\n\t\t\t{\n\t\t\t\tcurl_close($ch);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $newurl); \n\t\t}\n\t}\n\telse\n\t{\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 2);\r\n\t}\n\t$file_contents = curl_exec($ch);\n\tif ($file_contents === false || empty($file_contents))\n\t{\n\t\t$file_contents = false;\n\t\t// echo 'CURL #'.curl_errno($ch).': '.curl_error($ch).'<br />';\n\t}\n\tcurl_close($ch);\n\treturn $file_contents;\n}", "private function configureCurl ()\n {\n curl_setopt_array($this->cURL, [\n CURLOPT_URL => $this->url,\n CURLOPT_RETURNTRANSFER => true\n ]);\n }", "function basicCurl($curlURL) {\n $url = $curlURL;\n $cURL = curl_init();\n curl_setopt($cURL, CURLOPT_URL, $url);\n curl_setopt($cURL, CURLOPT_HTTPGET, true);\n curl_setopt($cURL, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Accept: application/json'\n ));\n curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cURL, CURLOPT_USERAGENT, \"spider\");\n $result = curl_exec($cURL);\n \nif ($result === FALSE) {\n return \"cURL Error: \" . curl_error($cURL);\n} else {\n\treturn $result;\n}\n curl_close($cURL);\n \n}", "function CurlGetContents($sUrl, & $sOutContent, $nRecursion = 1) \n{\t\n\tif($nRecursion > 10)\n\t{\t\n\t\t$sOutContent = false;\n\t\treturn false;\n\t}\n\n\t$lssHttpHeaders = array();\n\tif(isset($_REQUEST['header']) === true && isset($_REQUEST['header'][0]) === true)\n\t{\n\t\tfor($i = 0;; ++$i)\n\t\t{\n\t\t\tif(isset($_REQUEST['header'][$i]) === false)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$lssHttpHeaders[] = $_REQUEST['header'][$i];\n\t\t}\n\t\t\n\t\tshuffle($lssHttpHeaders);\n\t}\n\t\n\tif(isset($_REQUEST['referer']) === true)\n\t{\t\n\t\t$sRefererUrl = '';\n\t\t$sRefererUrl = AddHttpToLine(trim($_REQUEST['referer']));\n\n\t\t\n\t\t$lssHttpHeaders[] = 'Referer: '.$sRefererUrl;\n\t\t\n\t\tif(count($lssHttpHeaders) > 1)\n\t\t{\n\t\t\tshuffle($lssHttpHeaders);\n\t\t}\n\t}\n\n\n\t$stCurlHandle = NULL;\n\t$stCurlHandle = @curl_init();\n\t\n\tif($stCurlHandle === false)\n\t{\n\t\t$sOutContent = false;\n\t\treturn false;\n\t}\n\t\n\t\n\t\n\tcurl_setopt($stCurlHandle, CURLOPT_URL, $sUrl);\n\tcurl_setopt($stCurlHandle, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($stCurlHandle, CURLOPT_CONNECTTIMEOUT, 60);\n\tcurl_setopt($stCurlHandle, CURLOPT_TIMEOUT, 60);\n\t//curl_setopt($stCurlHandle, CURLOPT_FOLLOWLOCATION, true);\n\t//curl_setopt($stCurlHandle, CURLOPT_MAXREDIRS, 10);\n\tcurl_setopt($stCurlHandle, CURLOPT_HEADER, true);\n\t\n\t\n\tif(count($lssHttpHeaders) > 0)\n\t{\n\t\tcurl_setopt($stCurlHandle, CURLOPT_HTTPHEADER, $lssHttpHeaders);\n\t}\n\t\n\t$sResult = false; // Execution result\t\n\t$sResult = curl_exec($stCurlHandle);\n\t\n\t\n\tif($sResult === false || strlen($sResult) == 0) // Empty or bad answer\n\t{\n\t\t$sOutContent = false;\n\t\treturn false;\n\t}\n\t\n\t$nHttpResponceCode = '';\n\t$nHttpResponceCode = curl_getinfo($stCurlHandle, CURLINFO_HTTP_CODE);\n\t\t\n\tcurl_close($stCurlHandle);\n\t\n\t\n\t\n\t$sHeaders = '';\n\t$sHeaders = substr($sResult, 0, strpos($sResult, \"\\r\\n\\r\\n\"));\n\t$sHeaders = trim($sHeaders);\n\t\n\t\n\t$sBody = '';\n\t$sBody = substr($sResult, strpos($sResult, \"\\r\\n\\r\\n\"));\n\t$sBody = trim($sBody);\n\t\n\t\n\tif($nHttpResponceCode == 301 || $nHttpResponceCode == 302)\n\t{\n\t\t$lssMatches = array();\n\t\tpreg_match('/(Location:|URI:)(.*?)(?:\\n|$)/', $sHeaders, $lssMatches);\n\t\t\n\t\tif (isset($lssMatches[2]) === true) \n\t\t{\n\t\t\t$lssMatches[2] = trim($lssMatches[2]);\n\t\t\tCurlGetContents($lssMatches[2], $sOutContent, ++$nRecursion);\n\t\t\treturn true;\n\t\t}\n\t} \n\t\n\t\n\t$sOutContent = $sBody;\n\treturn true;\n}", "function curl_get_file($url)\n {\n $c = curl_init(); //Initialize curl session \n \n //Setting curl option\n curl_setopt($c,CURLOPT_RETURNTRANSFER,TRUE);\n curl_setopt($c,CURLOPT_URL,$url);\n \n $result = curl_exec($c); //Executing curl session\n curl_close($c); //Closing curl session\n \n return $result;\n }", "private function DownloadPageWithAuth()\n {\n $ret = false;\n \n $url = $this->Url.'&auth=1';\n \n //Permet de recuperer la vrai url directement pour les comptes premium\n if($this->ACCOUNT_TYPE == USER_IS_PREMIUM)\n {\n $url = $url.'&e=1';\n }\n \n $option = array(CURL_OPTION_FOLLOWLOCATION =>false);\n $curl = GenerateCurl($url,$option);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n curl_setopt($curl, CURLOPT_USERPWD, $this->Username.':'.$this->Password);\n $ret = curl_exec($curl);\n curl_close($curl);\n \n return $ret;\n }", "public function download(string $url);", "function ccweb_downloadText($url, &$outResponse) { \r\n\t$response = file_get_contents($url);\t\r\n\t\r\n\tif ($response === false) {return FALSE;} \r\n\tif ($response ==\"\") {return FALSE;} \r\n\t\r\n\t$outResponse = $response;\r\n\treturn TRUE;\t\r\n}", "public function downloadFile();", "public function __construct()\n {\n $this->curl = curl_init();\n\n curl_setopt_array(\n $this->curl,\n array(\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 60,\n CURLOPT_CONNECTTIMEOUT => 10,\n CURLOPT_VERBOSE => true,\n CURLOPT_HEADERFUNCTION => array($this, 'header'),\n CURLOPT_ENCODING => 'gzip,deflate',\n CURLOPT_USERAGENT => 'doi-index/0.1 (+http://goo.gl/AejefJ)',\n CURLOPT_COOKIEFILE => '/tmp/cookies.txt',\n CURLOPT_COOKIEJAR => '/tmp/cookies.txt',\n )\n );\n }", "protected function compile()\n\t{\n#\t\t$objArchive = new \\ZipWriter('system/tmp/'. $strTmp);\n\t\tif(\\Input::Get('download') && FE_USER_LOGGED_IN)\n\t\t{\n\t\t\t$objDownload = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE id=?\")->execute(\\Input::Get('download'));\n\t\t\t$objFile = \\FilesModel::findByUuid($objDownload->fileSRC);\n\n\t\t\t$this->sendFileToBrowser($objFile->path);\n\t\t}\n\n\t\t$objPage = \\PageModel::findById($GLOBALS['objPage']->id);\n\t\t$strUrl = $this->generateFrontendUrl($objPage->row(), '/download/%s');\n\n\t\t$objCategory = $this->Database->prepare(\"SELECT * FROM tl_download_category WHERE alias=?\")->execute(\\Input::Get('category'));\n\t\t$objArchiv = $this->Database->prepare(\"SELECT * FROM tl_download_archiv WHERE id=?\")->execute($objCategory->pid);\n\n\t\t$objData = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE pid=? && published=1 ORDER BY sorting ASC\")->execute($objCategory->id);\n\t\twhile($objData->next())\n\t\t{\n\t\t\t$objItem = (object) $objData->row();\n\n#\t\t\t$objItem->archiv = $objArchiv->title;\n#\n#\t\t\tif($objCategory->singleSRC)\n#\t\t\t{\n#\t\t\t\t$objItem->archivIcon = \\FilesModel::findByUuid($objCategory->singleSRC)->path;\n#\t\t\t}\n#\n#\t\t\t$objItem->category = $objCategory->title;\n#\t\t\t$objItem->singleSRC = deserialize($objItem->singleSRC);\n#\n#\t\t\t$arrImages = array();\n#\t\t\tif(is_array($objItem->singleSRC))\n#\t\t\t{\n#\t\t\t\tforeach($objItem->singleSRC as $image)\n#\t\t\t\t{\n#\t\t\t\t\t$arrImages[] = (object) array\n#\t\t\t\t\t(\n#\t\t\t\t\t\t'css' => '',\n#\t\t\t\t\t\t'path' => \\FilesModel::findByUuid($image)->path\n#\t\t\t\t\t);\n#\t\t\t\t}\n#\n#\t\t\t\t$arrImages[0]->css = 'first';\n#\t\t\t}\n#\n#\n#\t\t\tif(FE_USER_LOGGED_IN)\n#\t\t\t{\n#\t\t\t\t$objItem->url = sprintf($strUrl, $objItem->id);\n#\t\t\t\t$objItem->css = 'active';\n#\t\t\t\t$objItem->preview = $arrImages;\n#\t\t\t}\n#\t\t\telse\n#\t\t\t{\n#\t\t\t\t$objItem->css = 'inactive';\n#\t\t\t\t$objItem->preview = array($arrImages[0]);\n#\n#\t\t\t}\n\n\t\t\t$arrData[] = $objItem;\n\t\t}\n\n#\t\tif(!count($arrDaata)) { $arrData = array(); }\n\n\t\t$this->Template->items = $arrData;\n\t}", "function http_get($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //curl_setopt($ch,CURLOPT_HEADER, false); \n $output = curl_exec($ch);\n curl_close($ch);\n return $output;\n}", "function fetch_url ($url, $post_options = []) {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION\t,0);\n curl_setopt($ch, CURLOPT_HEADER\t\t\t,0); // DO NOT RETURN HTTP HEADERS\n curl_setopt($ch, CURLOPT_RETURNTRANSFER\t,1); // RETURN THE CONTENTS OF THE CALL\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_TIMEOUT, 9);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 3);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 9);\n curl_setopt($ch, CURLOPT_ENCODING, '');\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n}", "protected function file_pvs_get_contents_curl($urltofetch, $ext, $savepathfilename = '') {\n\t\tif (($this->selectedpics < $this->conf['attachments.']['webpagePreviewNumberOfImages']) || ($this->logofound == FALSE)) {\n\t\t\t$this->timepoint(TRUE, '');\n\t\t\t$extorig=$ext;\n\t\t\t$ext= strtolower($ext);\n\t\t\t$urlarr=explode('//', $urltofetch);\n\t\t\t$urlstr='';\n\t\t\tif (strtolower(substr($urlarr[0], 0, 3)=='htt')) {\n\t\t\t\t$urlstr=$urlarr[0] . '/';\n\t\t\t\t$urlarr[0]='';\n\t\t\t}\n\t\t\t$toctoccommentsuseragent = 'TocTocCommentsExternalhit/1.1 (+https://www.toctoc.ch/en/home/toctoc-comments/)';\n\n\t\t\t$urlstr.=implode('//', $urlarr);\n\t\t\t$urlstr=str_replace('///', '//', $urlstr);\n\t\t\t$urltofetch=$urlstr;\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $toctoccommentsuseragent);\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $urltofetch);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_FAILONERROR, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n\t\t\tcurl_setopt($ch, CURLOPT_FILETIME, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\t\tif (($ext=='html') || ($ext== 'css')) {\n\t\t\t\tcurl_setopt($ch, CURLOPT_TRANSFERTEXT, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_NOSIGNAL, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, intval(($this->conf['attachments.']['webpagePreviewCurlTimeout'])/1000));\n\n\t\t\t} elseif (($ext=='jpg') || ($ext== 'gif') || ($ext=='png') || ($ext== 'bmp') || ($ext== 'jpeg')) {\n\t\t\t\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);\n\t\t\t\t$curl_errno=0;\n\t\t\t}\n\n\t\t\t$data = curl_exec($ch);\n\t\t\t$curl_errno = curl_errno($ch);\n\n\t\t\tif ($curl_errno > 0) {\n\t\t\t\t$curl_errmsg = curl_error($ch);\n\t\t\t\tcurl_close($ch);\n\t\t\t\tif (($ext=='html')) {\n\n\t\t\t\t\t$this->timepoint(FALSE, 'file_pvs_get_contents_curl, error reading: ' . $curl_errmsg);\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['working'] = 2;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['description'] = 'CURL, ' . $curl_errno . ', ' . $curl_errmsg;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['title'] = '';\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urlfound'] = '';\n\t\t\t\t\treturn FALSE;\n\t\t\t\t\t//session_write_close();\n\t\t\t\t\t//exit;\n\n\t\t\t\t} else {\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (($ext=='html')) {\n\t\t\t\t\tif (strpos(strtolower($data), '</head>')==0) {\n\t\t\t\t\t\t$urltofetch = str_replace('http:', 'https:', $urltofetch);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $urltofetch);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\t\t\t\t\t$data = curl_exec($ch);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$infohttpcode = intval(curl_getinfo($ch, CURLINFO_HTTP_CODE));\n\t\t\t// checking mime types\n\t\t\tif ($infohttpcode< 400) {\n\t\t\t\t $this->returnurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n\t\t\t\tif (($ext=='html') || ($ext== 'css')) {\n\t\t\t\t\tcurl_close($ch);\n\t\t\t\t\t$this->timepoint(FALSE, '<b>+ file_pvs_get_contents_curl, text: </b>' . $urltofetch);\n\t\t\t\t\treturn $data;\n\t\t\t\t} elseif (($ext=='jpg') || ($ext== 'gif') || ($ext=='png') || ($ext== 'bmp') || ($ext== 'jpeg')) {\n\t\t\t\t\t$infofiletype = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n\t\t\t\t\t$infofiletime = curl_getinfo($ch, CURLINFO_FILETIME);\n\t\t\t\t\t$infofilesize = curl_getinfo($ch, CURLINFO_SIZE_DOWNLOAD);\n\t\t\t\t\tif ($infofiletype == 'image/gif') {\n\t\t\t\t\t\t$newext= 'gif';\n\n\t\t\t\t\t} elseif (($infofiletype == 'image/jpeg') || ($infofiletype == 'image/pjpeg')) {\n\t\t\t\t\t\t$newext= 'jpg';\n\n\t\t\t\t\t} elseif ($infofiletype == 'image/png') {\n\t\t\t\t\t\t$newext= 'png';\n\n\t\t\t\t\t} elseif (($infofiletype == 'image/bmp') || ($infofiletype == 'image/x-windows-bmp')){\n\t\t\t\t\t\t$newext= 'bmp';\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$newheader = '';\n\t\t\t\t\t\tif ($ext=='jpg') {\n\t\t\t\t\t\t\t$newheader = 'Content-Type: image/jpeg';\n\t\t\t\t\t\t} elseif ($ext=='png') {\n\t\t\t\t\t\t\t$newheader = 'Content-Type: image/png';\n\t\t\t\t\t\t} elseif ($ext=='gif') {\n\t\t\t\t\t\t\t$newheader = 'Content-Type: image/gif';\n\t\t\t\t\t\t} elseif ($ext=='bmp') {\n\t\t\t\t\t\t\t$newheader = 'Content-Type: image/bmp';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$data = $data;\n\t\t\t\t\t\t$newext= $ext;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurl_close($ch);\n\t\t\t\t\t$savepathfilename=str_replace ('.'.$extorig, '.'.$newext, $savepathfilename);\n\t\t\t\t\t$this->wrkext=$newext;\n\t\t\t\t\tif (intval($infofilesize) > $this->conf['attachments.']['webpagePreviewScanMinimalImageFileSize']) {\n\t\t\t\t\t\tif(file_exists($savepathfilename)){\n\t\t\t\t\t\t\tunlink($savepathfilename);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfile_put_contents($savepathfilename, $data);\n\t\t\t\t\t\t$this->timepoint(FALSE, '<b>+ file_pvs_get_contents_curl, pic:</b> ' . $urltofetch);\n\t\t\t\t\t\treturn $savepathfilename;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->timepoint(FALSE, '- file_pvs_get_contents_curl, filesize failed: ' . $urltofetch . ' (' . intval($infofilesize) . ')');\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->timepoint(FALSE, '- file_pvs_get_contents_curl, FALSE: ' . $urltofetch);\n\t\t\t\t\tcurl_close($ch);\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (($ext=='html')) {\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['working'] = 2;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['description'] = 'CURL, ' . $infohttpcode . ', ' . $curl_errmsg;\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['title'] = '';\n\t\t\t\t\t$_SESSION[$this->cid][$this->commentid]['urlfound'] = '';\n\t\t\t\t\tsession_write_close();\n\t\t\t\t\tsession_start();\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t\t$this->timepoint(FALSE, '<b>- file_pvs_get_contents_curl, 4xx-999: </b>' . $urltofetch . ' (returned HTML-Code:) ' . $infohttpcode);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$this->timepoint(FALSE, 'file_pvs_get_contents_curl, FALSE: ' . $urltofetch);\n\n\t\t\treturn FALSE;\n\t\t}\n\n\t}", "function fread_all_url($data = array()) {\n\t$data = array_filter($data);\n\t$data = array_values($data);\n\t//print_r($data);\n\t$user_agent = \"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\";\n\t$ch = array();\n\t$jml = count($data);\n\tif ($jml>0) {\n\t\t$mh = curl_multi_init();\n\t\tfor ($i=0; $i<$jml; $i++) {\n\t\t\t$ch[$i] = curl_init();\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_USERAGENT, $user_agent);\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_ENCODING,'gzip,deflate'); // for faster loading\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_HTTPGET, 1 );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_RETURNTRANSFER, 1 );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_FOLLOWLOCATION , 1 );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_URL, $data[$i] );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_REFERER, \"\" );\n\t\t\tif (preg_match(\"/https/is\", $data[$i])) curl_setopt( $ch[$i], CURLOPT_SSL_VERIFYPEER, false);\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_CONNECTTIMEOUT,20); // timeout on connect\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_MAXREDIRS,10);\n\t\t\tcurl_multi_add_handle($mh,$ch[$i]);\n\t\t}\n\t\t$running = NULL;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\t$mrc = curl_multi_exec($mh,$running);\n\t\t\t} catch (Exception $e) {\n\t\t\t\tif (curl_errno()) {\n\t\t\t\t\t$hasil = false;\n\t\t\t\t\t$running = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} while($running > 0 || $mrc == CURLM_CALL_MULTI_PERFORM);\n\t\twhile ($running && $mrc == CURLM_OK) {\n\t\t\tif (curl_multi_select($mh) != -1) {\n\t\t\t\tdo {\n\t\t\t\t\t//usleep(10000);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$mrc = curl_multi_exec($mh, $running);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tif (curl_errno()) {\n\t\t\t\t\t\t\t$hasil = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t} while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\t\t\t}\n\t\t}\n\t\tif (!isset($hasil))\t {\n\t\t\t$hasil = array();\n\t\t\tfor ($i=0; $i<$jml; $i++) {\n\t\t\t\t$hasil[$i] = curl_multi_getcontent($ch[$i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// REMOVE single handle\n\t\tfor ($i=0; $i<$jml; $i++) {\n\t\t\tcurl_multi_remove_handle($mh, $ch[$i]);\n\t\t}\n\t\tcurl_multi_close($mh);\n\t\treturn $hasil;\n\t}\n}", "function urldl(){\n\n // folder to save downloaded files to. must end with slash\n $destination_folder = 'downloads/';\n\n $url = $_POST['url'];\n $newfname = $destination_folder . basename($url);\n\n $file = fopen ($url, \"rb\");\n if ($file) {\n $newf = fopen ($newfname, \"wb\");\n\n if ($newf)\n while(!feof($file)) {\n fwrite($newf, fread($file, 1024 * 8 ), 1024 * 8 );\n }\n }\n\n if ($file) {\n fclose($file);\n }\n\n if ($newf) {\n fclose($newf);\n }\n\n}", "function get_content_curl($url) {\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_COOKIEJAR, \"cookies.txt\");\n\tcurl_setopt($ch, CURLOPT_COOKIEFILE, \"cookies.txt\");\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_REFERER, \"\");\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n}", "function geturl($url){\n if($url==\"\"){\n $url = \"http://www.36kr.com/\";\n }\n \n $ch = curl_init();\n\n // set the url to fetch \n curl_setopt($ch, CURLOPT_URL, $url);\n\n //return the transfer (the result of curl_exec()) as a string instead of outputing directly\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n //return the HTTP Response header using the callback function readHeader\n //curl_setopt($ch, CURLOPT_HEADERFUNCTION, 'readHeader');\n\n // execute the curl session\n $output = curl_exec($ch);\n\n // close curl resource to free up system resources \n curl_close($ch);\n\n //the callback function used to retreive the header info\n function readHeader($ch, $string) {\n $length = strlen($string);\n //only display the headers with content\n if (trim($string) != '')\n echo \"<center>Header: $string</center><br />\\n\";\n return $length;\n }\n\n //echo \"<br /><center><b><u>BELOW this line is the content fetched from www.example.com:</u></b></center><br />\";\n return $output;\n}", "private function initCurl() {\r\n\t\tif (isset($this->curl)) { return $this->curl; }\r\n\r\n\t\t$this->curl = curl_init();\r\n\r\n\t\tcurl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($this->curl, CURLOPT_TIMEOUT, $this->request_timeout);\r\n\r\n\t\tif (isset($this->cookie_jar)) {\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookie_jar);\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookie_jar);\r\n\t\t}\r\n\r\n\t\tcurl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, $this->is_multiple);\r\n\r\n\t\t# If a User Agent has been set, set the curl option\r\n\t\tif (isset($this->user_agent)) {\r\n\t\t\tcurl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\r\n\t\t}\r\n\r\n\t\t# We are not too concerned about the strictness of SSL when finding redirects\r\n\t\t# Without these, some SSL links just fail to return anything\r\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 0); \r\n\t\tcurl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 0); \r\n\r\n\t\t# We want the headers returned to us to follow redirects\r\n\t\tcurl_setopt($this->curl, CURLOPT_HEADER, true); \r\n\t\t$this->code = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);\r\n\t\treturn $this->curl;\r\n\t}", "protected function createCurlHandle()\n {\n $ch = curl_init();\n\n $bdurl = $this->request->getUrl();\n $config = $this->request->getConfig();\n\n \t$curl_opts = array(\n \t\t// request url\n \t\tCURLOPT_URL\t\t\t\t=> $this->requestUrl,\n \t\t// setup write callbacks\n \t\tCURLOPT_HEADERFUNCTION\t=> array($this, 'onWriteHeader'),\n \t\tCURLOPT_WRITEFUNCTION\t=> array($this, 'onWriteBody'),\n \t\t// buffer size\n \t\tCURLOPT_BUFFERSIZE\t\t=> $config['buffer_size'],\n \t\t// save full outgoing headers, in case someone is interested\n CURLINFO_HEADER_OUT\t\t=> true,\n CURLOPT_NOSIGNAL => 1,\n );\n\n // setup connection timeout\n\t\tif (defined('CURLOPT_CONNECTTIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT_MS] = $config['connect_timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_CONNECTTIMEOUT] = ceil($config['connect_timeout'] / 1000);\n\t\t}\n\n // setup request timeout\n\t\tif (defined('CURLOPT_TIMEOUT_MS')) {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT_MS] = $config['timeout'];\n\t\t} else {\n\t\t\t$curl_opts[CURLOPT_TIMEOUT] = ceil($config['timeout'] / 1000);\n\t\t}\n\n // setup redirects\n if ($config['follow_redirects']) {\n \t$curl_opts[CURLOPT_FOLLOWLOCATION] = true;\n $curl_opts[CURLOPT_MAXREDIRS] = $config['max_redirects'];\n // limit redirects to http(s), works in 5.2.10+\n if (defined('CURLOPT_REDIR_PROTOCOLS')) {\n $curl_opts[CURLOPT_REDIR_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;\n }\n // works sometime after 5.3.0, http://bugs.php.net/bug.php?id=49571\n if ($config['strict_redirects'] && defined('CURLOPT_POSTREDIR ')) {\n $curl_opts[CURLOPT_POSTREDIR] = 3;\n }\n } else {\n $curl_opts[CURLOPT_FOLLOWLOCATION] = false;\n }\n\n // set HTTP version\n switch ($config['protocol_version']) {\n case '1.0':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;\n break;\n case '1.1':\n $curl_opts[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;\n }\n\n // set request method\n switch ($this->request->getMethod()) {\n case bdHttpRequest::METHOD_GET:\n $curl_opts[CURLOPT_HTTPGET] = true;\n break;\n case bdHttpRequest::METHOD_POST:\n $curl_opts[CURLOPT_POST] = true;\n break;\n case bdHttpRequest::METHOD_HEAD:\n $curl_opts[CURLOPT_NOBODY] = true;\n break;\n default:\n $curl_opts[CURLOPT_CUSTOMREQUEST] = $this->request->getMethod();\n }\n\n // set proxy, if needed\n if ($config['proxy_host']) {\n if (!$config['proxy_port']) {\n throw new bdHttpException('Proxy port not provided');\n }\n $curl_opts[CURLOPT_PROXY] = $config['proxy_host'] . ':' . $config['proxy_port'];\n if ($config['proxy_user']) {\n $curl_opts[CURLOPT_PROXYUSERPWD] = $config['proxy_user'] . ':' . $config['proxy_password'];\n switch ($config['proxy_auth_scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_PROXYAUTH] = CURLAUTH_DIGEST;\n }\n }\n }\n\n // set authentication data\n $auth = $this->request->getAuth();\n if ($auth) {\n $curl_opts[CURLOPT_USERPWD] = $auth['user'] . ':' . $auth['password'];\n switch ($auth['scheme']) {\n case bdHttpRequest::AUTH_BASIC:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;\n break;\n case bdHttpRequest::AUTH_DIGEST:\n $curl_opts[CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;\n }\n }\n\n // set SSL options\n if (0 == strcasecmp($bdurl->getScheme(), 'https')) {\n \tif (isset($config['ssl_verify_host'])) {\n \t\t$curl_opts[CURLOPT_SSL_VERIFYHOST] = $config['ssl_verify_host'] ? 2 : 0;\n \t}\n \tforeach (self::$sslContextMap as $name => $option) {\n \t\tif (isset($config[$name])) {\n \t\t\t$curl_opts[$option] = $config[$name];\n \t\t}\n \t}\n }\n\n $headers = $this->request->getHeaders();\n // make cURL automagically send proper header\n if (!isset($headers['accept-encoding'])) {\n $headers['accept-encoding'] = '';\n }\n\n // set headers having special cURL keys\n foreach (self::$headerMap as $name => $option) {\n if (isset($headers[$name])) {\n $curl_opts[$option] = $headers[$name];\n unset($headers[$name]);\n }\n }\n\n $this->calculateRequestLength($headers);\n if (isset($headers['content-length'])) {\n $this->workaroundPhpBug47204($curl_opts, $headers);\n }\n\n // set headers not having special keys\n $headersFmt = array();\n foreach ($headers as $name => $value) {\n $canonicalName = implode('-', array_map('ucfirst', explode('-', $name)));\n $headersFmt[] = $canonicalName . ': ' . $value;\n }\n $curl_opts[CURLOPT_HTTPHEADER] = $headersFmt;\n\n curl_setopt_array($ch, $curl_opts);\n\n return $ch;\n }", "protected function init()\n {\n $this->curl = curl_init();\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n // this line makes it work under https\n curl_setopt($this->curl, CURLOPT_USERAGENT, $this->user_agent);\n curl_setopt($this->curl, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookiejar);\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, $this->cookiejar);\n curl_setopt($this->curl, CURLOPT_REFERER, $this->referer);\n if (isset($this->encoding)) {\n curl_setopt($this->curl, CURLOPT_ENCODING, $this->encoding);\n }\n if ($this->omitSSLVerification) {\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, false);\n }\n if (isset($this->userAuthData)) {\n curl_setopt($this->curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($this->curl, CURLOPT_USERPWD, $this->userAuthData);\n }\n if ($this->proxy != '') {\n curl_setopt($this->curl, CURLOPT_PROXY, $this->proxy);\n if ($this->proxyType == self::PROXY_TYPE_SOCKS4) {\n curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);\n } else if ($this->proxyType == self::PROXY_TYPE_SOCKS5) {\n curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);\n }\n }\n $this->errorno = false;\n $this->error = false;\n }", "function fetch_url($url, $expiry = CACHE_EXPIRY_TIMESPAN, $post_params = null) {\n global $cookie;\n global $calendar_url;\n\n if ($post_params) {\n $post = array();\n foreach ($post_params as $key => $value) {\n $post []= $key.'='.htmlentities($value);\n }\n $post = implode('&', $post);\n } else {\n $post = '';\n }\n\n $cache_path = CACHE_PATH.md5($calendar_url).md5($url.$post);\n echo 'Fetching '.$url.'...memory: '.memory_get_usage().'...';\n if (file_exists($cache_path) &&\n filemtime($cache_path) >= time() - $expiry) {\n echo 'from cache.'.\"\\n\";\n $data = file_get_contents($cache_path);\n } else {\n echo 'from web...';\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n //curl_setopt($ch, CURLOPT_VERBOSE, true);\n curl_setopt($ch, CURLOPT_COOKIE, $cookie);\n curl_setopt($ch, CURLOPT_USERAGENT, 'UWDataSpider/1.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7)');\n if ($post_params) {\n curl_setopt($ch, CURLOPT_POST, count($post_params));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n }\n $data = curl_exec($ch);\n\n/*\n $context = stream_context_create(array(\n 'http' => array(\n 'method'=>\"GET\",\n 'header'=>\"Accept-language: en-us,en;q=0.5\\r\\n\".\n \"Referrer: http://uwdata.ca\\r\\n\".\n \"User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7\\r\\n\"\n )\n ));\n $data = file_get_contents($url, 0, $context);*/\n if ($data) {\n file_put_contents($cache_path, $data);\n }\n echo 'done.'.\"\\n\";\n }\n return $data;\n}", "public static function _download_file($file_url){\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_POST, 0); \n\tcurl_setopt($ch,CURLOPT_URL,$file_url); \n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t$file_content = curl_exec($ch);\n\tcurl_close($ch);\n //return file content \n return $file_content;\n }", "function hb_curl($link_url)\r\n\t{\r\n\t\t$ch = curl_init(\"$link_url\");\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\t\t\r\n\t\t$output = curl_exec($ch);\r\n\t\tcurl_error($ch);\r\n\t\tcurl_close($ch);\r\n\t\treturn $output;\r\n\t}", "function init_curl()\n\t{\n\t\t$this->ch = curl_init();\n\t\t$user_agent = $this->user_agent;\n\t\t$header[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header[] = \"Accept-Language: en-US\";\n\t\t$header[] = \"User-Agent: \" . $user_agent;\n\t\t$header[] = \"Connection: Keep-Alive\";\n\t\t$header[] = \"Pragma:\";\n\t\t$header[] = \"Expect:\";\n\t\t$header[] = \"Content-Type:\";\n\n\t\t$this->header = $header;\n\n\t\t$header2[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header2[] = \"Accept-Language: en-US\";\n\t\t$header2[] = \"User-Agent: \" . $user_agent;\n\t\t$header2[] = \"Connection: Keep-Alive\";\n\t\t$header2[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header2[] = \"Pragma:\";\n\t\t$header2[] = \"Expect:\";\n\n\t\t$this->header_post = $header2;\n\n\t\t$header3[] = \"Accept: application/json, text/javascript, */*\";\n\t\t$header3[] = \"Accept-Language: en-US\";\n\t\t$header3[] = \"User-Agent: \" . $user_agent;\n\t\t$header3[] = \"Content-Type: application/x-www-form-urlencoded\";\n\t\t$header3[] = \"x-requested-with: XMLHttpRequest\";\n\t\t$header3[] = \"Connection: Keep-Alive\";\n\t\t$header3[] = \"Pragma:\";\n\t\t$header3[] = \"Expect:\";\n\n\t\t$this->header_json = $header3;\n\n\t\t$header4[] = \"Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/jpeg, application/x-ms-xbap, application/x-shockwave-flash, */*\";\n\t\t$header4[] = \"Accept-Language: en-US\";\n\t\t$header4[] = \"User-Agent: \" . $user_agent;\n\t\t$header4[] = \"Connection: Keep-Alive\";\n\t\t$header4[] = \"Content-Type: multipart/form-data\";\n\t\t$header4[] = \"Pragma:\";\n\t\t$header4[] = \"Expect:\";\n\n\t\t$this->header_multipart = $header4;\n\n\t\tcurl_setopt($this->ch, CURLOPT_USERAGENT, $user_agent);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEJAR, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\tcurl_setopt($this->ch, CURLOPT_COOKIEFILE, $this->opt[\"cookie_dir\"].\"/\".$this->id);\n\t\t//curl_setopt($this->ch, CURLOPT_ENCODING, 'gzip, deflate');\n\t\tcurl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_HEADER, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($this->ch, CURLOPT_VERBOSE, $this->opt[\"verbose\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_TIMEOUT, $this->opt[\"timeout\"]);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tif ($this->opt[\"use_proxy\"] && isset($proxy))\n\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $proxy);\n\t\t//print \"Set Curl Proxy $proxy\\n\";\n\t\t//curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, \"ocbeta:echo11ra\");\n\n\t\t//if ($this->opt[\"use_ips\"])\n\t\t//curl_setopt($this->ch, CURLOPT_INTERFACE, $this->get_ip());\n\t}", "function getsrc($url)\n{\n $c = curl_init();\n $user_agent = \"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36\";\n curl_setopt($c, CURLOPT_URL, $url);\n curl_setopt($c, CURLOPT_USERAGENT, $user_agent);\n curl_setopt($c, CURLOPT_POST, 0);\n curl_setopt($c, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($c, CURLOPT_FRESH_CONNECT, true);\n $html = curl_exec($c);\n\tcurl_close($c);\n \n return $html;\n}", "protected function transferDeprecatedCurlSettings() {}", "function downloadURL($url, $useragent){\n\t$ch = curl_init($url);\n\n\tcurl_setopt($ch, CURLOPT_USERAGENT, $useragent);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n\tcurl_setopt($ch, CURLOPT_ENCODING , \"\");\n\n\t$ret = curl_exec($ch);\n\t$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\tlist($headers, $response) = explode(\"\\r\\n\\r\\n\", $ret, 2);\n\n\tcurl_close($ch);\n\n\treturn array('statusCode' => $httpCode, 'response' => $response, 'headers' => $headers );\n}", "function initCurl() {\n\t$ch = curl_init();\n\tcurl_setopt( $ch, CURLOPT_MAXCONNECTS, 100 );\n\tcurl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );\n\tcurl_setopt( $ch, CURLOPT_ENCODING, 'gzip' );\n\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 100 );\n\tcurl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 10 );\n\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );\n\tcurl_setopt( $ch, CURLOPT_URL, \"https://en.wikipedia.org/w/api.php\" );\n\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\tcurl_setopt( $ch, CURLOPT_HTTPGET, 0 );\n\tcurl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );\t//For reasons that escape me, CURL fails without this.\n\treturn $ch;\n}", "function reset(){\n curl_setopt($this-> ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; InfoPath.3; rv:11.0) like Gecko\"); //\"kind spider\"\n curl_setopt($this-> ch, CURLOPT_COOKIEJAR, \"./cookie.txt\");\n curl_setopt($this-> ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this-> ch, CURLOPT_TIMEOUT, 120);\n }", "private function setUpCurl()\n {\n $this->curl = $this->get('app.curl.connector');\n $this->curl->setEndPointBaseUrl($this->getParameter('themoviedb_endpoint_url'));\n $this->curl->setExtraHeaders([\n CURLOPT_HEADER => false,\n CURLOPT_HTTPHEADER => [\"Accept: application/json\"],\n CURLOPT_SSL_VERIFYPEER => false\n ]);\n }", "function download_attachment($key, $filename)\n {\n global $standard_headers;\n global $cookie;\n\n $fp = fopen($filename, 'w');\n\n $ch = curl_init('https://www.tadpoles.com/remote/v1/attachment?key=' . $key);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $standard_headers);\n curl_setopt($ch, CURLOPT_COOKIE, $cookie);\n curl_setopt($ch, CURLOPT_FILE, $fp);\n\n $response = curl_exec($ch);\n curl_close($ch);\n fclose($fp);\n }", "private function initCurl()\n {\n $this->curlObj = curl_init();\n curl_setopt_array($this->curlObj, array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_FORBID_REUSE => true,\n CURLOPT_HEADER => false,\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 2,\n CURLOPT_HTTPHEADER => [\"Connection: Keep-Alive\", \"Keep-Alive: 120\"]\n ));\n }", "function curl($url) {\n // Assigning cURL options to an array\n $options = Array(\n CURLOPT_RETURNTRANSFER => TRUE, // Setting cURL's option to return the webpage data\n CURLOPT_FOLLOWLOCATION => TRUE, // Setting cURL to follow 'location' HTTP headers\n CURLOPT_AUTOREFERER => TRUE, // Automatically set the referer where following 'location' HTTP headers\n CURLOPT_CONNECTTIMEOUT => 120, // Setting the amount of time (in seconds) before the request times out\n CURLOPT_TIMEOUT => 120, // Setting the maximum amount of time for cURL to execute queries\n CURLOPT_MAXREDIRS => 10, // Setting the maximum number of redirections to follow\n CURLOPT_USERAGENT => \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a2pre) Gecko/2008073000 Shredder/3.0a2pre ThunderBrowse/3.2.1.8\", // Setting the useragent\n CURLOPT_URL => $url, // Setting cURL's URL option with the $url variable passed into the function\n CURLOPT_SSL_VERIFYPEER => false,\n //CURLOPT_HTTPHEADER => array('Content-type: \"text/plain; charset=UTF-8\"'),\n );\n\n $ch = curl_init(); // Initialising cURL\n curl_setopt_array($ch, $options); // Setting cURL's options using the previously assigned array data in $options\n $data = curl_exec($ch); // Executing the cURL request and assigning the returned data to the $data variable\n curl_close($ch); // Closing cURL\n return $data; // Returning the data from the function\n }", "public function __construct($url)\n {\n $this->url = $url;\n $this->curl = curl_init($this->url);\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl, CURLINFO_HEADER_OUT, true);\n curl_setopt($this->curl, CURLOPT_HEADER, 1);\n }", "public static function descargar($url) {\n if(!\\foxtrot::esCli()) echo json_encode([\n 'd'=>$url\n ]);\n \\foxtrot::detener();\n }", "function getHTTPCurl($url, $save_file = false, $file_name = false){\n\t$ch = curl_init();\n\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t//skip verifying SSL peers and hosts, so the request does not fail\n\t//because of SSL warnings\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t//returns the HTTP header along with the HTTP response\n\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\tcurl_setopt($ch, CURLOPT_BUFFERSIZE, SOCKET_CHUNK_SIZE);\n\tif($save_file !== false && $file_name !== false){\n\t\t$fp = fopen($file_name.\".tmp\", \"w\");\n\t\tif($fp){\n\t\t\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\t\t\tcurl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, -1);\n\t\t\tcurl_setopt($ch, CURLOPT_NOPROGRESS, false);\n\t\t\tcurl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 'progressCallBack');\n\n\t\t\tcurl_exec($ch);\n\n\t\t\tfclose($fp);\n\n\t\t\t//get the HTTP header size\n\t\t\t$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n\t\t\t//strip the HTTP header from the file\n\t\t\treturn stripHeaderFromFile($file_name, $header_size);\n\t\t}\n\t\telse{\n\t\t\t_log(\"getHTTPCurl: unable to open file \".$file_name, true);\n\t\t}\n\t}\n\telse{\n\n\t\t$response = curl_exec($ch);\n\n\t\tcurl_close($ch);\n\n\t\treturn $response;\n\t}\n}", "function _kala_migrate_curl($url) {\n // Many tries and headaches but this curl gets em all\n $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n curl_setopt($ch, CURLOPT_ENCODING, '');\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_TIMEOUT_MS, 5000);\n curl_setopt($ch, CURLOPT_USERAGENT, $agent);\n $check = curl_exec($ch);\n $info = curl_getinfo($ch);\n curl_close($ch);\n\n $result = array($check, $info);\n return $result;\n}", "function CurlInit() {\n $url = 'https://www.otaus.com.au/find-an-ot';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $result = (curl_exec($ch));\n curl_close($ch);\n return $result;\n}", "public function download() {\n $this->autoRender = false;\n $filename = $this->request->params['pass'][3];\n $orgfilename = $this->request->params['pass'][4];\n// pr($this->request->params); exit;\n $this->response->file(\n 'webroot/uploads/post/files/' . $filename, array(\n 'download' => true,\n 'name' => $orgfilename\n )\n );\n// return $this->response;\n }", "function getCurlData($url)\n{\n$curl = curl_init();\ncurl_setopt($curl, CURLOPT_URL, $url);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($curl, CURLOPT_TIMEOUT, 10);\ncurl_setopt($curl, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16\");\n$curlData = curl_exec($curl);\ncurl_close($curl);\nreturn $curlData;\n}", "function curl($url) {\n // Assigning cURL options to an array\n $options = Array(\n CURLOPT_RETURNTRANSFER => TRUE, // Setting cURL's option to return the webpage data\n CURLOPT_FOLLOWLOCATION => TRUE, // Setting cURL to follow 'location' HTTP headers\n CURLOPT_AUTOREFERER => TRUE, // Automatically set the referer where following 'location' HTTP headers\n CURLOPT_CONNECTTIMEOUT => 120, // Setting the amount of time (in seconds) before the request times out\n CURLOPT_TIMEOUT => 120, // Setting the maximum amount of time for cURL to execute queries\n CURLOPT_MAXREDIRS => 10, // Setting the maximum number of redirections to follow\n CURLOPT_USERAGENT => \"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a2pre) Gecko/2008073000 Shredder/3.0a2pre ThunderBrowse/3.2.1.8\", // Setting the useragent\n CURLOPT_URL => $url, // Setting cURL's URL option with the $url variable passed into the function\n );\n \n $ch = curl_init(); // Initialising cURL \n curl_setopt_array($ch, $options); // Setting cURL's options using the previously assigned array data in $options\n $data = curl_exec($ch); // Executing the cURL request and assigning the returned data to the $data variable\n curl_close($ch); // Closing cURL \n return $data; // Returning the data from the function \n }", "function __construct($parserType = null){\n $this->ch = curl_init();\n curl_setopt($this->ch, CURLOPT_USERAGENT, \"PGBrowser/0.0.1 (http://github.com/monkeysuffrage/pgbrowser/)\");\n curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($this->ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($this->ch, CURLOPT_MAXREDIRS, 10);\n curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($this->ch, CURLOPT_ENCODING, 'gzip,deflate,identity');\n curl_setopt($this->ch, CURLOPT_HTTPHEADER, array(\n \"Accept-Charset:\tISO-8859-1,utf-8;q=0.7,*;q=0.7\",\n \"Accept-Language:\ten-us,en;q=0.5\",\n \"Connection: keep-alive\",\n \"Keep-Alive: 300\",\n \"Expect:\"\n ));\n curl_setopt($this->ch, CURLOPT_COOKIEJAR, '');\n curl_setopt($this->ch, CURLOPT_HEADER, true);\n $this->parserType = $parserType;\n if(function_exists('gc_enable')) gc_enable();\n }", "public function sendPrroductDownloadToBrowser() {\n $transaction = getTransaction($_GET['id']);\n if ($transaction['status'] == \"valid\") {\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Transfer-Encoding: binary\");\n header(\"Content-Description: File Transfer\");\n if ($_GET[\"oto\"] && $transaction['oto']) {\n $fparts = explode(\"/\", $sys_oto_location);\n $filename = $fparts[count($fparts)-1];\n header(\"Content-Disposition: attachment; filename=$filename\");\n @readfile($sys_oto_location);\n } else {\n $fparts = explode(\"/\", $sys_item_location);\n $filename = $fparts[count($fparts)-1];\n header(\"Content-Disposition: attachment; filename=$filename\");\n @readfile($sys_item_location);\n }\n exit;\n } elseif ($transaction['status'] == \"expired\") {\n $filename = \"downloadexpired.html\";\n } else {\n $filename = \"invalid.html\";\n }\n showTemplate($filename);\n }", "function get_chapter_content($url) {\n $data = null;\n $html = curl($url);\n if(strlen($html) > 0) {\n //echo '<br/>if(strlen($html) > 0)';\n $scripts = explode('<script>var nChaptId = ', $html);\n if(isset($scripts[1]) && strlen($scripts[1]) > 0) {\n //echo '<br/>if(isset($scripts[1]) && strlen($scripts[1]) > 0)';\n $ss = explode('\";var szChapterTime = szChapterTime', $scripts[1]);\n if($ss[0] != null && strlen($ss[1]) > 0) {\n //echo '<br/>if($ss[0] != null && strlen($ss[1]) > 0)';\n $sss = explode(';var szChapterTime = \"', $ss[0]);\n if ($sss[0] != null && strlen($sss[1]) > 0 && isset($sss[1])) {\n //echo '<br/>if ($sss[0] != null && strlen($sss[1]) > 0 && isset($sss[1]))';\n $time = str_replace('-', '', $sss[1]);\n $time = str_replace(' ', '', $time);\n $time = str_replace(':', '', $time);\n $urlAjax = 'http://sstruyen.com/doc-truyen/index.php?ajax=ct&id=' . $sss[0] . '&t=' . $time;\n //echo '<br />' . $urlAjax;\n $data = curl($urlAjax);\n }\n }\n }\n }\n return $data;\n}", "public function downloadFileByUrl($url)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array(get_class($this), 'progressCallback'));\n curl_setopt($ch, CURLOPT_NOPROGRESS, false);\n\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n $response = curl_exec($ch);\n curl_close($ch);\n\n return $response;\n }", "function getData($link = \"\"){\n $mainURL = \"http://zakon4.rada.gov.ua\";\n $curl = curl_init();\n\n curl_setopt($curl,CURLOPT_URL,$mainURL . $link);\n curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);\n\n $data = curl_exec($curl);\n $data = iconv('cp1251','utf-8',$data);\n // If error with access denied - retry in 1 sec\n if(strpos($data,\"Доступ тимчасово обмежено!\") > 0){\n sleep(1);\n $data = getData($link);\n }\n // If error with JS redirect - get data from link\n if( strpos($data,\"conv?test=\") > 0 ){\n preg_match('/location\\.href=\\\"(.+?)\\\"/',$data,$redirect);\n $data = getData($redirect[1]);\n }\n // If error with permalink\n if( strpos($data,\"Натисніть, будь-ласка, на це\") ){\n preg_match('/<a href=\"(.+?)\" target=_top><b>посилання<\\/b><\\/a>/',$data,$redirect);\n $data = getData($redirect[1]);\n }\n\n $result = cropMainText($data);\n\n // Check we have paginator.\n if( strpos($data,'наступна сторінка') > 0 ){\n preg_match('/<a href=\"(.*?)\\s?\" title=\"наступна сторінка\">наступна сторінка<\\/a>/',$data,$page);\n print_r(\"Get next page ...\");\n $result .= getData($page[1]);\n }\n\n return $result;\n}", "function __construct() {\n\n $this->curl = curl_init();\n\n curl_setopt_array($this->curl, [\n CURLOPT_USERAGENT => 'FeedImport',\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_ENCODING => 'UTF-8'\n ]);\n\n }", "function download_suket_021()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_021/template_surat_recomendasi_usaha_mikro_kecil.docx', NULL);\n\t}", "function viewSource($folderpath, $page){\n chdir($folderpath); // go to the dir\n // define the URL to load\n $url = 'http://localhost:8888/mockup/app/'. $folderpath . '/' . $page;\n $url = str_replace('\\\\', '/',$url);\n //echo $url;\n //start cURL\n $ch = curl_init();\n // tell cURL what the URL is\n curl_setopt($ch, CURLOPT_URL, $url);\n // tell cURL that you want the data back from that URL\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // run cURL\n $output = curl_exec($ch);\n // end the cURL call (this also cleans up memory so it is\n // important)\n curl_close($ch);\n // display the output\n //echo \"$output -> converting\";\n $outputfile = str_replace(\".php\", \"\", \"{$page}.html\");\n\n file_put_contents($outputfile, $output);\n // go back to the right levels\n if (substr_count($folderpath, DIRECTORY_SEPARATOR) == 1){\n chdir(\"../../\");\n } else{\n chdir(\"../\");\n }\n\n}", "function file_get_contents_curl($url) {\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\n $data = curl_exec($ch);\n curl_close($ch);\n\n return $data;\n }", "public function start() {\t\t$resumeFromBytes = $this->resumeFrom();\n\t\tif($resumeFromBytes == false) { // create new temporary file\n\t\t\t$this->fileHandle = $this->tmpFileIn($this->getBaseDirectory(), \"xb\");\n\t\t\tif($this->fileHandle == false) {\n\t\t\t\tthrow new RuntimeException(\"Could not create temporary download file\");\n\t\t\t}\n\t\t} else { // reuse old temporary file\n\t\t\t// beware: server may not support resuming\n\t\t\t// use hasCorrectSize() to check a finished download after resuming\n\t\t\t$this->fileHandle = $this->tmpFileIn($this->getBaseDirectory(), \"ab\");\n\t\t\tif($this->fileHandle == false) {\n\t\t\t\tthrow new RuntimeException(\"Could not open temporary download file for writing\");\n\t\t\t}\n\t\t}\n\t\t// set up and call cURL\n\t\t$curl = curl_init($this->getURL());\n\t\tcurl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);\n\t\tcurl_setopt($curl, CURLOPT_FILE, $this->fileHandle);\n\t\tif($resumeFromBytes != false) {\n\t\t\tcurl_setopt($curl, CURLOPT_RANGE, $resumeFromBytes . \"-\");\n\t\t}\n\t\tcurl_setopt($curl, CURLOPT_HEADER, false);\n\t\tcurl_setopt($curl, CURLOPT_NOPROGRESS, false);\n\t\tcurl_setopt($curl, CURLOPT_PROGRESSFUNCTION, \"Download::setProgress\");\n\t\t$response = curl_exec($curl);\n\t\t/*\n\t\t * Would be nice to have that, but the current cURL API in PHP does not\n\t\t * allow this to be implemented in a proper way due to the fact that\n\t\t * the HTTP request header cannot be retrieved seperatly from the data.\n\t\t * Stripping the header from the data while writing if using\n\t\t * CURLOPT_WRITEFUNCTION also isn't possible, as this would require the\n\t\t * header size to be available when writing, but curl_getinfo does not\n\t\t * report the corret value when the download has not finished yet.\n\t\t *\n\t\t * So just use the URL path basename as the filename.\n\t\t *\n\t\t// try to extract the filename from the HTTP header \n\t\t$this->requestHeaderSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n\t\t$this->requestHeader = substr($response, 0, $this->requestHeaderSize);\n\t\techo \"header: \" . $this->requestHeader . \"\\n\";\n\t\t$filename = null;\n\t\tif(preg_match(\"/^Content-Disposition: attachment; filename=(.+)$/\", $this->requestHeader, $matches)) {\n\t\t\t$filename = $matches[0];\n\t\t} else { // fall back to the URL path basename\n\t\t\t$filename = basename($this->getURL());\n\t\t}\n\t\t*/\n\t\t$filename = basename($this->getURL());\n\t\tcurl_close($curl);\n\t\t// rename the temporary file\n\t\t$metadata = stream_get_meta_data($this->fileHandle);\n\t\tfclose($this->fileHandle);\n\t\trename($metadata['uri'], $this->getDownloadDirectoryIn($this->getBaseDirectory()) . \"/\" . $filename);\n\t}", "function parseDocument($url)\n{\n $array = array();\n $data = str_get_html(downloadPage(str_replace('&amp;', '&', $url)));\n\n // Log\n logger('FETCH DOC: ' . $url);\n\n $info = $data->find('.wpthemeOverflowAuto form table tr');\n foreach ($info as $key => $item) {\n if (stripos($item->text(), 'Polni nazi') !== false) {\n $array['session'] = html_entity_decode($info[$key]->find('td', 1)->text());\n }\n if (stripos($item->text(), 'Naslov dokumenta') !== false) {\n $array['title'] = html_entity_decode($info[$key]->find('td', 1)->text());\n }\n if (stripos($item->text(), 'Datum dokumenta') !== false) {\n $array['date'] = DateTime::createFromFormat('d.m.Y', trim($info[$key]->find('td', 1)->text()))->format('Y-m-d');\n }\n }\n if (empty($array['title'])) $array['title'] = 'Brez naziva';\n\n if ($files = $data->find('.panelGrid', 1)) {\n foreach ($files->find('tr') as $row) {\n foreach ($row->find('td a') as $td) {\n $tdinfo = trim($td->text());\n\n if (preg_match('/\\'(http:.*?)\\'/s', (string)$td->onclick, $matches)) {\n\n $filet = downloadPage($matches[1]);\n if (preg_match('/url=(.*?)\"/s', trim($filet), $matches2)) {\n $array['filename_orig'] = $tdinfo;\n $array['link'] = $matches2[1];\n $array['filename'] = substr($array['link'], strrpos($array['link'], '/') + 1);\n }\n }\n\n }\n }\n } else {\n $array['filename'] = '';\n $array['link'] = '';\n }\n\n return $array;\n}", "public function setupCurl()\n {\n $ch = curl_init();\n curl_setopt($ch,CURLOPT_URL,\"https://jsonplaceholder.typicode.com/posts\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n return $ch;\n }", "private function UrlFileFree($strUrl)\n {\n $ret = false;\n $data = array('submit'=>'Download');\n \n $option = array(CURL_OPTION_POSTDATA => $data, \n CURL_OPTION_HEADER => false);\n \n $curl = GenerateCurl($strUrl,$option);\n $ret = curl_exec($curl);\n curl_close($curl);\n return $ret;\n }", "function get_data_with_curl($url){\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.\n curl_setopt($ch, CURLOPT_URL, $url);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n }", "public function __construct() {\n $this->curl_handle = curl_init();\n curl_setopt($this->curl_handle, CURLOPT_TIMEOUT, $this->time_out);\n curl_setopt($this->curl_handle, CURLOPT_CONNECTTIMEOUT, $this->connect_time_out);\n curl_setopt($this->curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl_handle, CURLOPT_AUTOREFERER, true);\n curl_setopt($this->curl_handle, CURLOPT_FOLLOWLOCATION, true);\n }", "function get_remote_html($url) {\r\n\r\n\t$ch = curl_init($url);\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n\tcurl_setopt($ch, CURLOPT_VERBOSE, true); \r\n\tcurl_setopt($ch, CURLOPT_HEADER, true);\r\n\r\n\t$response = curl_exec($ch);\r\n\r\n\tlist($header, $body) = explode(\"\\r\\n\\r\\n\", $response, 2);\r\n\r\n\treturn array( 'header' => $header, 'body' => $body );\r\n\r\n}", "public function Download($comic)\n {\n if (!($comic['url'] && ($comic['active'] == 1)))\n return;\n\n $this->DebugMsg(\"Downloading {$comic['name']} (id: {$comic['comic_id']}; mode: {$comic['fetch_mode']})...\");\n\n switch($comic['fetch_mode'])\n {\n // generic comic fetch: download page, then find strip files.\n case 1:\n if (!$this->GetComic($comic['comic_id'], $comic['url'], $comic['file_path'], $comic['num_files'], $comic['min_size']))\n $this->NotFound($comic);\n\n break;\n\n // this is for comics where the main page has a bunch of links, and each link must be accessed separately. Never more than two pages deep.\n // the file_path field in the DB can contain 2 parts:\n // - match pattern for the script/image URLs (including one set of parens that denote the url to execute, prefixed by the base url) from the main page retrieved\n // - (optional) match pattern for any images that are to be retrieved from the second document retrieved (absolute or relative URLs)\n case 2:\n $script = $this->GetFile($comic['url']);\n\t$searchParams = explode('|',$comic['file_path']);\n $count = 0;\n\n // match against the first level regexp\n if (preg_match_all($searchParams[0], $script, $match))\n {\n // fetch each of these urls (to a limit), and retrieve all images from that page.\n foreach($match[1] as $m)\n {\n // prepend the base of the script URL if there was no http in the target (also below). assumes $m starts with a /\n $internalReferer = BuildURL($comic['url'], $m);\n $internalScript = $this->GetFile($internalReferer, $comic['url']);\n\n // if there was an internal search specified, retrieve internal images. there could be more than one.\n if (isset($searchParams[1]))\n {\n if(preg_match_all($searchParams[1], $internalScript, $internalMatch))\n {\n foreach($internalMatch[1] as $im)\n {\n $imUrl = BuildURL($comic['url'], $im);\n if (!$this->ProcessComic($this->GetFile($imUrl, $internalReferer), $comic['comic_id'], FindTitleTag($im, $internalScript), md5($comic['comic_id'].$imUrl)))\n $this->NotFound($comic);\n }\n }\n }\n else\n {\n if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer)))\n $this->NotFound($comic);\n }\n\n // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return.\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n }\n else\n $this->NotFound($comic);\n\n break;\n\n // the Cheezburger sites. These pages have lots of images and lots of structure so it's not easy to haul stuff out without DOM manipulation.\n case 3:\n $url = $comic['url'];\n $stopImage = $comic['file_path'];\n $newStopImage = null;\n $foundStopImage = false;\n $count = 0;\n $page = 1;\n\n while((!$foundStopImage) && $count < $comic['num_files'])\n {\n if ($this->testing)\n $this->DebugMsg(\" - Loading {$url}...\");\n\n $dom = @DOMDocument::loadHTML($this->GetFile($url));\n $xp = new DOMXpath($dom);\n\n $item = $xp->evaluate(\"//div[@class = 'post-asset-inner']\");\n foreach($item as $i)\n {\n $srcArray = $title = $id = $src = null;\n\n $data = $i->getElementsByTagName('img');\n if ($data->length > 0)\n {\n $d = $data->item(0);\n $id = $d->getAttribute('id');\n $src = $d->getAttribute('src');\n $title = $d->getAttribute('title');\n\n // if we've handled this image before for this site, then stop.\n if ($id == $stopImage)\n {\n $foundStopImage = true;\n break;\n }\n\n // set the new \"last seen image\" id so the script knows where to stop\n if (!$newStopImage)\n $newStopImage = $id;\n\n // add this image to the database\n if (!$this->ProcessComic($this->GetFile($src, $url), $comic['comic_id'], $title))\n $this->NotFound($comic);\n\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n\n // if there wasn't an image in the div, then handle video.\n else\n {\n $data = $i->getElementsByTagName('div');\n if ($data->length > 0)\n {\n $id = $data->item(0)->getAttribute('id');\n $iframe = $i->getElementsByTagName('iframe');\n\n // if there was no iframe, then go to the next one.\n if (!$iframe->length)\n continue;\n\n $title = $i->parentNode->parentNode->parentNode->getElementsByTagName('h2')->item(0)->getElementsByTagName('a')->item(0)->nodeValue;\n\n // pass the video init stuff to the video class framework\n $src = $iframe->item(0)->getAttribute('src');\n if ($videoObj = Video::init($src, $this))\n {\n // some videos have no functionality; if that's the case, continue.\n if ($videoObj->noData())\n continue;\n\n // don't add when testing...\n if ($this->testing)\n $this->DebugMsg(\" - Iframe link found: {$src} - {$title} - {$videoObj->getLink()} - {$videoObj->getMode(true)}\");\n else\n {\n if($fileName = $this->SaveFile($videoObj->getThumbfile(), $videoObj->getMd5()))\n {\n $this->DebugMsg(\" - Adding iframe link: {$src} - {$title} - {$videoObj->getLink()}\");\n $this->db->Execute(\"CALL ADDCOMIC({$comic['comic_id']}, '{$videoObj->getMd5()}', '{$videoObj->getImageMimeType()}', '{$this->db->escape($title)}', '{$videoObj->getLink()}', {$videoObj->getMode()})\");\n }\n }\n }\n // if there was no thumbnail, the next part will fail horribly, so notify my and skip this.\n else\n {\n $this->DebugMsg(\" - No thumbFile found, skipping this video: Source: {$src}, Title: {$title}, ID: {$id}, URL: {$comic['url']}\");\n $this->AddError($comic, '- No thumbFile found');\n $this->AddError($comic, \" * Source: {$src}\");\n $this->AddError($comic, \" * Title: {$title}\");\n $this->AddError($comic, \" * ID: {$id}\");\n $this->AddError($comic, \" * URL: {$comic['url']}\");\n continue;\n }\n }\n }\n }\n\n // if we haven't found the last image yet, then go to the next page.\n if (!$foundStopImage)\n $url = $comic['url'].'page/'.++$page;\n }\n\n // we save the id of the first image we saw so the script knows where to stop next time.\n if ((!$this->testing) && $newStopImage)\n $this->db->Execute(\"update comics set file_path = '{$newStopImage}' where comic_id = {$comic['comic_id']}\");\n\n break;\n\n // Baby Blues. From their site, not the King Features syndicated newspaper sites, which are nearly impossible to navigate (nb: not currently used)\n case 4:\n $this->GetComic($comic['comic_id'], $comic['url']);\n $searchParams = explode('|', $comic['file_path']);\n\n if (!(grep($this->DOWNLOAD_DIR.\"/{$comic['comic_id']}/{$searchParams[0]}\", $searchParams[1], $matches) && $this->ProcessComic($this->GetFile($matches[0], $comic['url']), $comic['comic_id'])))\n $this->NotFound($comic);\n\n break;\n\n // Oglaf.com. Another weird structure: main page refers to first page of a story, but there could be more, have to follow links.\n case 5:\n // hit the page first to create the session cookie, and to accept the \"over 18\" thing.\n $cookie = $this->DOWNLOAD_DIR.'/oglaf.cookie.txt';\n $this->GetComic($comic['comic_id'], $comic['url'], null, null, null, true, null, $cookie, \"--post-data 'over18=%C2%A0'\");\n\n $parsed_url = parse_url($comic['url']);\n $url = $parsed_url['host'].'/';\n $searchParams = explode('|', $comic['file_path']);\n do\n {\n $this->GetComic($comic['comic_id'], 'http://'.$url, null, null, null, true, null, $cookie);\n if (preg_match($searchParams[0], file_get_contents($this->DOWNLOAD_DIR.\"/{$comic['comic_id']}/{$url}index.html\"), $newUrl))\n $url = preg_filter($searchParams[1], $parsed_url['host'].'/$1', $newUrl[0]);\n else\n $url = '';\n } while ($url);\n\n if (!$this->GetComic($comic['comic_id'], null, $searchParams[2]))\n $this->NotFound($comic);\n\n break;\n\n // - this is identical to case 2, except the next level of matching occurs on the result of the first level of matching (allowing nested regexp processing\n // - levels of regexps must be separated by a pipe.\n case 6:\n $script = $this->GetFile($comic['url']);\n $searchParams = explode('|',$comic['file_path']);\n $count = 0;\n\n // match against the first level regexp\n if (preg_match_all($searchParams[0], $script, $match))\n {\n // each of these will be regexp'ed again for the actual URLs.fetch each of these urls (to a limit), and retrieve all images from that page.\n foreach($match[1] as $m)\n {\n // if there was an internal search specified, retrieve internal images. there could be more than one.\n if (isset($searchParams[1]))\n {\n if(preg_match_all($searchParams[1], $m, $internalMatch))\n {\n foreach($internalMatch[1] as $im)\n {\n $imUrl = BuildURL($comic['url'], $im);\n if (!$this->ProcessComic($this->GetFile($imUrl, $comic['url']), $comic['comic_id'], FindTitleTag($im, $script), md5($comic['comic_id'].$imUrl)))\n $this->NotFound($comic);\n }\n }\n }\n else\n {\n // this should work like case 2 if no second search param is provided.\n $internalReferer = BuildURL($comic['url'], $m);\n $internalScript = $this->GetFile($internalReferer, $comic['url']);\n\n if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer)))\n $this->NotFound($comic);\n }\n\n // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return.\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n }\n else\n $this->NotFound($comic);\n\n break;\n\n }\n\n $this->DebugMsg(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n }", "function https_request($url, $post = null)\n {\n $cookieFile = NULL;\n $hCURL = curl_init();\n curl_setopt($hCURL, CURLOPT_URL, $url);\n curl_setopt($hCURL, CURLOPT_TIMEOUT, 30);\n curl_setopt($hCURL, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($hCURL, CURLOPT_USERAGENT, $userAgent);\n curl_setopt($hCURL, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($hCURL, CURLOPT_AUTOREFERER, TRUE);\n curl_setopt($hCURL, CURLOPT_ENCODING, \"gzip,deflate\");\n //curl_setopt($hCURL, CURLOPT_HTTPHEADER,$host);\n if ($post) {\n curl_setopt($hCURL, CURLOPT_POST, 1);\n curl_setopt($hCURL, CURLOPT_POSTFIELDS, $post);\n }\n $sContent = curl_exec($hCURL);\n var_dump(curl_error($hCURL));\n if ($sContent === FALSE) {\n $error = curl_error($hCURL);\n curl_close($hCURL);\n\n throw new \\Exception($error . ' Url : ' . $url);\n } else {\n curl_close($hCURL);\n return $sContent;\n }\n }", "private function Get_URL()\n {\n $url = $this->CURL->GET_SERVER_URL();\n $download_url = $url.\"/application/download/download.php\";\n $view_url = $url.\"/application/pdf/view.php\";\n $this->DOWNLOAD_URL = $download_url;\n $this->VIEW_URL = $view_url;\n }", "function httpGet($url){\n $ch = curl_init();\n\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n// curl_setopt($ch,CURLOPT_HEADER, false);\n\n $output=curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}", "function load_url($url, $options = array('method' => 'get', 'return_info' => false))\r\n{\r\n\r\n // added 04-28-08 EG added a default timeout of 15 seconds\r\n if (!isset($options['timeout']))\r\n $options['timeout'] = 15;\r\n\r\n $url_parts = parse_url($url);\r\n if (!array_key_exists('port', $url_parts))\r\n $url_parts['port'] = ($url_parts['scheme'] == \"https\") ? 443 : 80;\r\n $info = array( //Currently only supported by curl.\r\n 'http_code' => 200\r\n );\r\n $response = '';\r\n\r\n $send_header = array(\r\n 'Accept' => 'text/*',\r\n 'User-Agent' => 'BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)'\r\n );\r\n\r\n ///////////////////////////// Curl /////////////////////////////////////\r\n //If curl is available, use curl to get the data.\r\n if (function_exists(\"curl_init\")\r\n and (!(isset($options['use']) and $options['use'] == 'fsocketopen'))\r\n ) { //Don't user curl if it is specifically stated to user fsocketopen in the options\r\n if (isset($options['method']) and $options['method'] == 'post') {\r\n $page = $url_parts['scheme'] . '://' . $url_parts['host'] . \":\" . $url_parts['port'] . $url_parts['path'];\r\n } else {\r\n $page = $url;\r\n }\r\n\r\n $ch = curl_init($url_parts['host'] . \":\" . $url_parts['port']);\r\n\r\n // added 04-28-08 EG set a timeout\r\n if (isset($options['timeout']))\r\n curl_setopt($ch, CURLOPT_TIMEOUT, $options['timeout']);\r\n\r\n\r\n curl_setopt($ch, CURLOPT_URL, $page);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //Just return the data - not print the whole thing.\r\n curl_setopt($ch, CURLOPT_HEADER, true); //We need the headers\r\n curl_setopt($ch, CURLOPT_NOBODY, false); //The content - if true, will not download the contents\r\n if (isset($options['method']) and $options['method'] == 'post' and $url_parts['query']) {\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $url_parts['query']);\r\n }\r\n //Set the headers our spiders sends\r\n curl_setopt($ch, CURLOPT_USERAGENT, $send_header['User-Agent']); //The Name of the UserAgent we will be using ;)\r\n $custom_headers = array(\"Accept: \" . $send_header['Accept']);\r\n if (isset($options['modified_since']))\r\n array_push($custom_headers, \"If-Modified-Since: \" . gmdate('D, d M Y H:i:s \\G\\M\\T', strtotime($options['modified_since'])));\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $custom_headers);\r\n\r\n curl_setopt($ch, CURLOPT_COOKIEJAR, \"cookie.txt\"); //If ever needed...\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\r\n\r\n\r\n if (isset($url_parts['user']) and isset($url_parts['pass'])) {\r\n $custom_headers = array(\"Authorization: Basic \" . base64_encode($url_parts['user'] . ':' . $url_parts['pass']));\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $custom_headers);\r\n }\r\n\r\n $response = curl_exec($ch);\r\n $info = curl_getinfo($ch); //Some information on the fetch\r\n\r\n curl_close($ch);\r\n\r\n //////////////////////////////////////////// FSockOpen //////////////////////////////\r\n } else { //If there is no curl, use fsocketopen\r\n if (isset($url_parts['query'])) {\r\n if (isset($options['method']) and $options['method'] == 'post')\r\n $page = $url_parts['path'];\r\n else\r\n $page = $url_parts['path'] . '?' . $url_parts['query'];\r\n } else {\r\n $page = $url_parts['path'];\r\n }\r\n\r\n $fp = fsockopen($url_parts['host'], 80, $errno, $errstr, 30);\r\n if ($fp) {\r\n\r\n // added 04-28-08 EG set a timeout\r\n if (isset($options['timeout']))\r\n stream_set_timeout($fp, $options['timeout']);\r\n\r\n $out = '';\r\n if (isset($options['method']) and $options['method'] == 'post' and isset($url_parts['query'])) {\r\n $out .= \"POST $page HTTP/1.1\\r\\n\";\r\n } else {\r\n $out .= \"GET $page HTTP/1.0\\r\\n\"; //HTTP/1.0 is much easier to handle than HTTP/1.1\r\n }\r\n $out .= \"Host: $url_parts[host]\\r\\n\";\r\n $out .= \"Accept: $send_header[Accept]\\r\\n\";\r\n $out .= \"User-Agent: {$send_header['User-Agent']}\\r\\n\";\r\n if (isset($options['modified_since']))\r\n $out .= \"If-Modified-Since: \" . gmdate('D, d M Y H:i:s \\G\\M\\T', strtotime($options['modified_since'])) . \"\\r\\n\";\r\n\r\n $out .= \"Connection: Close\\r\\n\";\r\n\r\n //HTTP Basic Authorization support\r\n if (isset($url_parts['user']) and isset($url_parts['pass'])) {\r\n $out .= \"Authorization: Basic \" . base64_encode($url_parts['user'] . ':' . $url_parts['pass']) . \"\\r\\n\";\r\n }\r\n\r\n //If the request is post - pass the data in a special way.\r\n if (isset($options['method']) and $options['method'] == 'post' and $url_parts['query']) {\r\n $out .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\r\n $out .= 'Content-Length: ' . strlen($url_parts['query']) . \"\\r\\n\";\r\n $out .= \"\\r\\n\" . $url_parts['query'];\r\n }\r\n $out .= \"\\r\\n\";\r\n\r\n fwrite($fp, $out);\r\n while (!feof($fp)) {\r\n $response .= fgets($fp, 128);\r\n }\r\n fclose($fp);\r\n }\r\n }\r\n\r\n //Get the headers in an associative array\r\n $headers = array();\r\n\r\n if ($info['http_code'] == 404) {\r\n $body = \"\";\r\n $headers['Status'] = 404;\r\n } else {\r\n //Seperate header and content\r\n //echo \"RESPONSE: \".$response.\"<BR><BR>\\n\";\r\n //exit();\r\n $separator_position = strpos($response, \"\\r\\n\\r\\n\");\r\n $header_text = substr($response, 0, $separator_position);\r\n\r\n $body = substr($response, $separator_position + 4);\r\n\r\n // added 04-28-2008 EG if we get a 301 (moved), another set of headers is received,\r\n if (substr($body, 0, 5) == \"HTTP/\") {\r\n $separator_position = strpos($body, \"\\r\\n\\r\\n\");\r\n $header_text = substr($body, 0, $separator_position);\r\n $body = substr($body, $separator_position + 4);\r\n }\r\n\r\n //echo \"SEP: \".$separator_position.\"<BR><BR>\\n\";\r\n //echo \"HEADER: \".$header_text.\"<BR><BR>\\n\";\r\n //echo \"BODY: \".$body.\"<BR><BR>\\n\";\r\n\r\n foreach (explode(\"\\n\", $header_text) as $line) {\r\n $parts = explode(\": \", $line);\r\n if (count($parts) == 2) $headers[$parts[0]] = chop($parts[1]);\r\n }\r\n }\r\n\r\n if ($options['return_info'])\r\n return array('headers' => $headers, 'body' => $body, 'info' => $info);\r\n return $body;\r\n}", "function updateCurl($url,$method){\r\n \r\n $curl = curl_init();\r\n // Set some options - we are passing in a useragent too here\r\n curl_setopt_array($curl, array(\r\n CURLOPT_RETURNTRANSFER => 1,\r\n CURLOPT_URL => $url,\r\n CURLOPT_USERAGENT => 'Codular Sample cURL Request'\r\n ));\r\n // Send the request & save response to $resp\r\n $resp = curl_exec($curl);\r\n // Close request to clear up some resources\r\n curl_close($curl);\r\n return $resp;\r\n \r\n \r\n}", "function disguise_curl($url)\n{\n $curl = curl_init();\n\n // Setup headers - I used the same headers from Firefox version 2.0.0.6\n // below was split up because php.net said the line was too long. :/\n $header[0] = \"Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5,\";\n $header[] = \"Cache-Control: max-age=0\";\n $header[] = \"Connection: keep-alive\";\n $header[] = \"Keep-Alive: 300\";\n $header[] = \"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\";\n $header[] = \"Accept-Language: en-us,en;q=0.5\";\n $header[] = \"Pragma: \"; // browsers keep this blank.\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)');\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n curl_setopt($curl, CURLOPT_REFERER, 'http://www.google.com');\n curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');\n curl_setopt($curl, CURLOPT_AUTOREFERER, true);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_TIMEOUT, 10);\n\n $html = curl_exec($curl); // execute the curl command\n curl_close($curl); // close the connection\n\n return $html; // and finally, return $html\n}", "function file_get_contents_curl($url){\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n}", "private function setCurl($is_https = false)\n {\n // Init\n $this->curl = curl_init();\n // Sets basic parameters\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($this->curl, CURLOPT_TIMEOUT, isset($this->request->settings['timeout']) ? $this->request->settings['timeout'] : 100);\n // Set parameters to maintain cookies across sessions\n curl_setopt($this->curl, CURLOPT_COOKIESESSION, true);\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, sys_get_temp_dir() . '/cookies_file');\n curl_setopt($this->curl, CURLOPT_COOKIEJAR, sys_get_temp_dir() . '/cookies_file');\n curl_setopt($this->curl, CURLOPT_USERAGENT, 'OLEGNAX-PURCHASE-VERIFY');\n if ($is_https) {\n $this->setSSL();\n }\n }", "function download_suket_019()\n\t{\n\t\tforce_download('assets/uploads/warga/suket_019/template_surat_pernyataan_penyerahan_tanah.docx', NULL);\n\t}", "function url_get_contents ($url) {\n if (!function_exists('curl_init')){ \n die('CURL is not installed!'); //Curl will return a false bool and die here if CURL is not enabled.\n }\n $ch = curl_init(); //Return curl handle\n curl_setopt($ch, CURLOPT_URL, $url); //The URL to fetch\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //Return curl contents as opposed to dumping\n\tcurl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate,sdch'); //set encoding\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); //follow redirects\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 0); //I don't know some shit\n\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0\");\n\n $output = curl_exec($ch);\n\t\n\tif (FALSE === $output)\n throw new Exception(curl_error($ch), curl_errno($ch));\n\t\n curl_close($ch); //Close handle\n return $output; //Return contents\n}", "function getURL($url, $companyFileUsername = '[email protected]', $companyFilePassword = 'lm2225ehO&pM*Q4y0tT5G') {\n\n\t// if we have a username we need to base64_encode it - so lets check if it's set\n\tif( isset( $companyFileUsername ) ) {\n\t\t$companyFileToken = base64_encode( $companyFileUsername.':'.$companyFilePassword );\n\t} else {\n\t\t$companyFileToken = '';\n\t}\n\n\t// we setup some headers to tell the API some information like the company file token and api version\n\t$headers = array(\n\t\t'x-myobapi-cftoken: '.$companyFileToken,\n\t\t'x-myobapi-version: v2',\n\t);\n\n\t// setup the CURL session & pass it the URL we will call\n\t$session = curl_init( $url );\n\t// curl options\n\tcurl_setopt( $session, CURLOPT_HTTPHEADER, $headers ); // set the headers\n\tcurl_setopt( $session, CURLOPT_HEADER, false ); // tell curl NOT to return the headers (set to true to debug)\n\tcurl_setopt( $session, CURLOPT_RETURNTRANSFER, true );\n\n\t// lets fire this off & get the response\n\t$response = curl_exec( $session );\n print '<pre>debug: '.$response.'</pre>';\n\tcurl_close( $session ); // close the curl session to free up memory\n\n\t// okay, lets pass the response back\n\treturn( $response );\n}" ]
[ "0.62248415", "0.6218593", "0.61700666", "0.61061066", "0.60526276", "0.60047233", "0.58479095", "0.57914495", "0.57028055", "0.5679405", "0.5653955", "0.5606418", "0.5582725", "0.5556458", "0.5556057", "0.55399334", "0.55096275", "0.54755217", "0.54701644", "0.54674494", "0.5421359", "0.54166687", "0.53898555", "0.5389755", "0.53785", "0.5366923", "0.53631717", "0.5359008", "0.5353365", "0.533161", "0.5311351", "0.53071576", "0.53069335", "0.5302718", "0.52872264", "0.52810687", "0.52729183", "0.52605194", "0.525877", "0.5251886", "0.52427864", "0.5226494", "0.52256966", "0.52239496", "0.52172613", "0.5216481", "0.5213939", "0.52136713", "0.5203232", "0.5201096", "0.5199012", "0.51987875", "0.519468", "0.51889586", "0.51801", "0.5177399", "0.5177032", "0.51768136", "0.51603997", "0.5149122", "0.5141863", "0.513612", "0.51194173", "0.5118654", "0.51176697", "0.51141924", "0.51029587", "0.51026046", "0.5101523", "0.5092852", "0.5083133", "0.5081542", "0.50800145", "0.5076714", "0.5073135", "0.50701076", "0.5050606", "0.5044872", "0.5042699", "0.50204176", "0.50174326", "0.50160563", "0.5011478", "0.50046146", "0.50044817", "0.5002782", "0.5001607", "0.50014955", "0.49743235", "0.49737385", "0.49720535", "0.49668962", "0.4954252", "0.49427938", "0.49378985", "0.49346086", "0.49294567", "0.49287605", "0.4928629", "0.49285302" ]
0.57824177
8
validate the info, create rules for the inputs
public function login() { $rules = array( 'email' => 'required|email', // make sure the email is an actual email 'password' => 'required|alphaNum|min:3' // password can only be alphanumeric and has to be greater than 3 characters ); // run the validation rules on the inputs from the form $validator = \Validator::make(\Input::all(), $rules); // if the validator fails, redirect back to the form if ($validator->fails()) { return \Redirect::to('/') ->withErrors($validator)// send back all errors to the login form ->withInput(\Input::except('password')); // send back the input (not the password) so that we can repopulate the form } else { // create our user data for the authentication $userdata = array( 'email' => \Input::get('email'), 'password' => \Input::get('password') ); // attempt to do the login if (\Auth::attempt($userdata)) { // validation successful! // redirect them to the secure section or whatever // return Redirect::to('secure'); // for now we'll just echo success (even though echoing in a controller is bad) //echo 'SUCCESS!'; Session::put('login', '1'); Session::put('email', \Input::get('email')); return \Redirect::to('/notes'); } else { // validation not successful, send back to form return \Redirect::to('/') ->withErrors(['Email or Password is incorrect', 'The Message']) ->withInput(\Input::except('password')); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function proccess()\n {\n foreach ($this->validate as $name => $value) {\n $rules = $this->rules[$name];\n \n /* Let's see is this value a required, e.g not empty */\n if (preg_match('~req~', $rules)) {\n if ($this->isEmpty($value)) {\n $this->errors[] = $this->filterName($name) . ' can\\'t be empty, please enter required data.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be integer\n */\n if (preg_match('~int~', $rules)) {\n if (!$this->isInt($value)) {\n $this->errors[] = $this->filterName($name) . ' is not number, please enter number.';\n continue; // We will display only one error per input\n }\n }\n \n /**\n * Let's see is this value needs to be text\n */\n if (preg_match('~text~', $rules)) {\n if (!$this->isText($value)) {\n $this->errors[] = $this->filterName($name) . ' is not text, please enter only letters.';\n continue; // We will display only one error per input\n }\n }\n \n /* This is good input */\n $this->data[$name] = $value;\n }\n }", "public abstract function validation();", "abstract public function validate();", "abstract public function validate();", "public function validateRules();", "abstract public function validateData();", "public function validation();", "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 function run() {\n \n foreach( $this->validation_rules as $var=>$opt) {\n \n /*\n $default_opt = [\n 'min' => false,\n 'max' => false,\n 'required' => false,\n ];\n $opt = array_merge($default_opt,$opt);\n */\n \n //if compulsary field is not set then no point validating further\n if(isset($opt['set']) && !$this->is_set($var)) {\n continue;\n } \n \n /* Trim whitespace from beginning and end of variable */\n if( array_key_exists('trim', $opt) ) {\n $this->source[$var] = trim( $this->source[$var] );\n }\n \n $is_required = false;\n \n //if required field is empty then no point validating further\n if( isset($opt['required']) && !$this->not_empty($var) ) {\n continue;\n }\n \n if( isset($opt['required']) ) {\n unset($opt['required']);\n $is_required = true;\n }\n \n if( isset($opt['set']) )\n unset($opt['set']);\n \n if( isset($opt['trim']) )\n unset($opt['trim']);\n \n foreach( $opt as $rule_type=>$rule_val ) {\n $raw_field_value = isset($this->source[$var]) ? $this->source[$var] : false;\n \n /*\n if(is_string($raw_field_value) && strlen($raw_field_value) == 0 && !$is_required)\n continue;\n */\n $result = true;\n if( method_exists($this, 'validate_'.$rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$var], $rule_val) : [$var, $rule_val];\n //$result = call_user_func_array([$this, 'validate_'.$rule_type], [$var, $rule_val]);\n $result = call_user_func_array([$this, 'validate_'.$rule_type], $t_params);\n }\n elseif( method_exists($this->caller_obj, $rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array([$this->caller_obj, $rule_type], $t_params);\n }\n elseif( function_exists($rule_type) ) {\n $t_params = is_array($rule_val) ? array_merge([$this, $raw_field_value], $rule_val) : [$this, $raw_field_value, $rule_val];\n $result = call_user_func_array($rule_type, $t_params);\n }\n \n if($result === false)\n break;\n }\n }\n }", "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 }", "protected function _validate() {\n\t}", "function addValidationRules(){\n\t\t$this->registerRule('validDate','function','validDate');\n\t\t$this->registerRule('validPeriod','function','validPeriod');\n\t\t$this->registerRule('existe','function','existe');\n\t\t$this->registerRule('number_range','function','number_range');\n\t\t$this->registerRule('validInterval','function','validInterval');\n\t\t$this->registerRule('couple_not_null','function','couple_not_null');\n\t\t$this->registerRule('validParam','function','validParam');\n\t\t$this->registerRule('validUnit_existe','function','validUnit_existe');\n\t\t$this->registerRule('validUnit_required','function','validUnit_required');\n\t\t$this->addRule('dats_title','Data description: Metadata informative title is required','required');\n\t\t$this->addRule('dats_title','Data description: Dataset name exceeds the maximum length allowed (100 characters)','maxlength',100);\t\n\t\t$this->addRule('dats_date_begin','Temporal coverage: Date begin is not a date','validDate');\n\t\t$this->addRule('dats_date_end','Temporal coverage: Date end is not a date','validDate');\n\t\t$this->addRule(array('dats_date_begin','dats_date_end'),'Temporal coverage: Date end must be after date begin','validPeriod');\n\t\tif ($this->dataset->dats_id == 0){\n\t\t\t$this->addRule('dats_title','Data description: A dataset with the same title exists in the database','existe',array('dataset','dats_title'));\n\t\t}\n\t\t\n\t\tif (isset($this->dataset->data_policy) && !empty($this->dataset->data_policy) && $this->dataset->data_policy->data_policy_id > 0){\n\t\t\t$this->getElement('new_data_policy')->setAttribute('onfocus','blur()');\n\t\t}\n\t\t$this->addRule('new_data_policy','Data use information: Data policy exceeds the maximum length allowed (100 characters)','maxlength',100);\t\n\t\t$attrs = array();\n\t\tif (isset($this->dataset->database) && !empty($this->dataset->database) && $this->dataset->database->database_id > 0){\n\t\t\t//$this->getElement('new_database')->setAttribute('onfocus','blur()');\n\t\t\t//$this->getElement('new_db_url')->setAttribute('onfocus','blur()');\n\t\t\t$this->disableElement('new_database');\n\t\t\t$this->disableElement('new_db_url');\n\t\t}\n\t\t/*else {\n\t\t\t//$this->addRule('new_database','A database with the same title already exists','existe',array('database','database_name'));\n\t\t}*/\n\t\t$this->addRule('new_database','Data use information: Database name exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t$this->addRule('new_db_url','Data use information: Database url exceeds the maximum length allowed (250 characters)','maxlength',250);\t\n\t\t//Formats\n\t\tfor ($i = 0; $i < $this->dataset->nbFormats; $i++){\n\t\t\t$this->addRule('data_format_'.$i,'Data use information: Format name '.($i+1).' exceeds the maximum length allowed (100 characters)','maxlength',100);\n\t\t\tif (isset($this->dataset->data_formats[$i]) && !empty($this->dataset->data_formats[$i]) && $this->dataset->data_formats[$i]->data_format_id > 0){\n\t\t\t\t//$this->getElement('new_data_format_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t$this->disableElement('new_data_format_'.$i);\n\t\t\t}\n\t\t\t/*else{\n\t\t\t\t//$this->addRule('new_data_format_'.$i,'Data format '.($i+1).': This format already exists in the database','existe',array('data_format','data_format_name'));\n\t\t\t}*/\n\t\t}\n\t\t//Contacts\n\t\t$this->addRule('pi_0','Contact 1 is required','couple_not_null',array($this,'pi_name_0'));\n\t\t$this->addRule('organism_0','Contact 1: organism is required','couple_not_null',array($this,'org_sname_0'));\n\t\t$this->addRule('email1_0','Contact 1: email1 is required','required');\t\n\t\tfor ($i = 0; $i < $this->dataset->nbPis; $i++){\n\t\t\t$this->addRule('pi_name_'.$i,'Contact '.($i+1).': Name exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('email1_'.$i,'Contact '.($i+1).': email1 is incorrect','email');\n\t\t\t$this->addRule('email2_'.$i,'Contact '.($i+1).': email2 is incorrect','email');\n\t\t\t$this->addRule('org_fname_'.$i,'Contact '.($i+1).': Organism full name exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('org_sname_'.$i,'Contact '.($i+1).': Organism short name exceeds the maximum length allowed (50 characters)','maxlength',50);\n\t\t\t$this->addRule('org_url_'.$i,'Contact '.($i+1).': Organism url exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('email1_'.$i,'Contact '.($i+1).': email1 exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\t$this->addRule('email2_'.$i,'Contact '.($i+1).': email2 exceeds the maximum length allowed (250 characters)','maxlength',250);\n\t\t\tif (isset($this->dataset->originators[$i]) && !empty($this->dataset->originators[$i]) && $this->dataset->originators[$i]->pers_id > 0){\n\t\t\t\t//$this->getElement('pi_name_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('email1_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('email2_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('organism_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t$this->disableElement('pi_name_'.$i);\n\t\t\t\t$this->disableElement('email1_'.$i);\n\t\t\t\t$this->disableElement('email2_'.$i);\n\t\t\t\t$this->disableElement('organism_'.$i);\n\t\t\t}\n\t\t\t/*else{\n\t\t\t\t//$this->addRule('pi_name_'.$i,'Contact '.($i+1).': A contact with the same name is already present in the database. Select it in the drop-down list.','existe',array('personne','pers_name'));\n\t\t\t}*/\n\t\t\tif (isset($this->dataset->originators[$i]->organism) && !empty($this->dataset->originators[$i]->organism) && $this->dataset->originators[$i]->organism->org_id > 0){\n\t\t\t\t//$this->getElement('org_sname_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('org_fname_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t//$this->getElement('org_url_'.$i)->setAttribute('onfocus','blur()');\n\t\t\t\t$this->disableElement('org_sname_'.$i);\n\t\t\t\t$this->disableElement('org_fname_'.$i);\n\t\t\t\t$this->disableElement('org_url_'.$i);\n\t\t\t}\n\t\t\tif ($i != 0){\n\t\t\t\t$this->addRule('pi_name_'.$i,'Contact '.($i+1).': email1 is required','contact_email_required',array($this,$i));\n\t\t\t\t$this->addRule('pi_name_'.$i,'Contact '.($i+1).': organism is required','contact_organism_required',array($this,$i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Add validation rules\n\t\t$this->AddModValidationRules();\n\t\t$this->AddSatValidationRules();\n\t\t$this->AddInstruValidationRules();\n\n\t\t//$this->addRule('grid_type','Coverage: Grid type exceeds the maximum length allowed (100 characters)','maxlength',100);\n\t\t$this->addVaValidationRulesResolution('Coverage');\n\t\t//$this->addRule('sensor_resol_temp','Coverage: Temporal resolution is incorrect','validDate');\n\t\t$this->addRule('sensor_resol_tmp','Coverage: temporal resolution is incorrect','regex',\"/^[0-9]{2}[:][0-9]{2}[:][0-9]{2}$/\");\n\t\t$this->addValidationRulesGeoCoverage();\n\t\t//PARAMETER\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->addValidationRulesVariable($i,$i,'Parameter '.($i+1));\n\t\t}\n\t\t\n\t}", "public function rules()\n {\n $rules = [\n 'required_date' => 'required',\n 'item_id' => 'required',\n 'approval_to' => 'required'\n ];\n\n // checking reason edit\n if (\\Input::get('action') == 'edit') {\n $rules['edit_notes'] = 'required';\n }\n // checking supplier\n if (\\Input::get('supplier_checking') == 'required') {\n if (\\Input::get('supplier_id') == '') {\n $rules['supplier_id'] = 'accepted';\n }\n }\n\n // checking employee\n if (\\Input::get('employee_checking') == 'required') {\n if (\\Input::get('employee_id') == '') {\n $rules['employee_id'] = 'accepted';\n }\n }\n // item_id\n for ($i=0 ; $i<count(\\Input::get('item_id')) ; $i++) {\n $rules['item_id.'.$i] = 'required';\n $rules['item_quantity.'.$i] = 'required';\n\n if (number_format_db(\\Input::get('item_quantity.'.$i)) < 1) {\n $rules['item_quantity.'.$i] = 'accepted';\n }\n\n if (number_format_db(\\Input::get('item_price.'.$i)) < 1) {\n $rules['item_price.'.$i] = 'accepted';\n }\n }\n\n return $rules ;\n }", "public static function validate() {}", "public function validated();", "function Validation()\n {\n $validate1 = array(\n 'FIRST_NAME' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'First name could not be blank',\n 'last' => true)\n ),\n \n 'DOB' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Date Of Birth could not be blank',\n 'last' => true)\n ),\n 'FATHER_NAME' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Father Name could not be blank',\n 'last' => true)\n ),\n 'RELIGION' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Religion could not be blank',\n 'last' => true)\n ),\n 'CAST' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Cast could not be blank',\n 'last' => true)\n ),\n 'SUB_CAST' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Sub Cast could not be blank',\n 'last' => true)\n ),\n 'CAST_CAT_ID' => array(\n 'mustNotEmpty' => array(\n 'rule' => array('comparison', '!=', 0),\n 'message' => 'Please select Cast Category',\n 'last' => true)\n ),\n 'CLASS_ID' => array(\n 'mustNotEmpty' => array(\n 'rule' => array('comparison', '!=', 0),\n 'message' => 'Please select Class',\n 'last' => true)\n ),\n 'MEDIUM_ID' => array(\n 'mustNotEmpty' => array(\n 'rule' => array('comparison', '!=', 0),\n 'message' => 'Please select Medium',\n 'last' => true)\n ),\n 'PASSWORD' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Please enter password',\n 'allowEmpty' => true,\n 'on' => 'create',\n 'last' => true),\n 'between' => array(\n 'rule' => array('between', 6, 25),\n 'message' => 'Password between 6 and 25 chars',\n 'required' => false,\n 'allowEmpty' => true,\n ),\n ),\n 'CONFIRM_PASSWORD' => array(\n 'mustMatch' => array(\n 'rule' => array('verifies'),\n 'message' => 'Both passwords must match',\n 'last' => true),\n ),\n 'COUNTRY_ID' => array(\n 'mustNotEmpty' => array(\n 'rule' => array('comparison', '!=', 0),\n 'message' => 'Please select Country',\n 'last' => true)\n ),\n\t\t\t 'GROUP' => array(\n 'mustNotEmpty' => array(\n 'rule' => 'notEmpty',\n 'message' => 'Group could not be blank',\n 'last' => true),\n\t\t\t 'mustNotEmpty' => array(\n 'rule' => array('comparison', '!=', 0),\n 'message' => 'Please select Group',\n 'last' => true)\n \t\t ),\n \n \n \n );\n $this->validate = $validate1;\n return $this->validates();\n }", "abstract public function runValidation();", "protected function prepareValidations() {}", "private function validate_input() {\n\t\t$fields = array_merge( array( $this->range_field ), $this->key_fields, $this->checksum_fields );\n\n\t\t$this->validate_fields( $fields );\n\t\t$this->validate_fields_against_table( $fields );\n\t}", "public function validation()\n {\n $data = [\n 'username' => null,\n 'password' => 'password',\n ];\n $rules = new Rules( $data );\n\n /* Add source */\n $rules->addSource( 'phone', '081234' );\n $rules->addSource( 'address', 'Lorem ipsum dolor sit.' );\n\n /* Add validation rule */\n $rules->addRule(\n 'username',\n 'Username',\n 'minLength[2]',\n [ 'minLength' => ':attribute Should Be More Than :params', 'required' => ':attribute Required' ]\n );\n $rules->addRule( 'password', 'Password', 'maxLength[2]', ':attribute should be less than :params' );\n\n /* Add multiple rules */\n $rules->addRules(\n [\n [\n 'field' => 'phone',\n 'label' => 'Phone',\n 'rules' => 'required',\n 'messages' => 'Phone Required',\n ],\n [\n 'field' => 'address',\n 'label' => 'Address',\n 'rules' => 'required',\n 'messages' => 'Address Required',\n ],\n ]\n );\n\n /* Validate rules */\n $validate = $rules->validate();\n\n print_out(\n [\n 'validate' => ( $validate == true ? 1 : 0 ),\n 'errors' => $rules->getErrors(),\n ]\n );\n }", "public function validate()\n {\n foreach ( $this->rules as $key => $rules ) {\n foreach ( $rules as $type => $rule ) {\n if ( $this->hasErrors( $key ) )\n break;\n $this->validateRule( $key, $type, $rule );\n }\n }\n }", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "function validateInput()\r\n\t{\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->name) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in name $this->name. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(preg_match('/^[a-zA-Z ]*$/', $this->desg) != 1)\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in designation $this->desg. Only alphabets allowed.<br>\";\r\n\t\t}\r\n\r\n\t\tif(empty($this->addr))\r\n\t\t{\r\n\t\t\t$this->err = true;\r\n\t\t\t$this->errMsgBeg .= \"-> Error in address entered. Please fill correct address field as per gender: Office address for Male user, and Residential address for Female user.<br>\";\t\r\n\t\t}\r\n\r\n\t\tforeach($this->emails as $ele)\r\n\t\t{\r\n\t\t\tif(!filter_var($ele, FILTER_VALIDATE_EMAIL))\r\n\t\t\t{\r\n\t\t\t\t$this->err = true;\r\n\t\t\t\t$this->errMsgBeg .= \"-> Invalid email-id $ele. Enter correctly.<br>\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public function validationRules( array $input );", "abstract protected function getValidationRules();", "public function rules()\r\n {\r\n return [\r\n 'planId' => 'required|exists:plans,id',\r\n 'buildingId' => 'required|exists:buildings,id',\r\n 'checkIn' => 'required|date_format:Y-m-d',\r\n 'checkOut' => 'required|date_format:Y-m-d',\r\n 'numOf' => 'required|in:1,2',\r\n 'gender' => 'required|in:1,2',\r\n 'term' => 'required'\r\n ];\r\n }", "public function validate_fields() {\n \n\t\t//...\n \n }", "abstract protected function validate($data);", "public function rules()\n {\n\t\t$validation = [\n\t\t\t'description' => 'required|max:140|string',\n\t\t\t'points' => 'required|numeric',\n\t\t\t'deadline'=> 'required',\n 'for_newcomer' => 'boolean'\n\t\t];\n\t\tif(isset($this->challengeId)) {\n\t\t\t$validation['name'] = 'required|unique:challenges,id,'.$this->challengeId;\n\t\t} else {\n\t\t\t$validation['name'] = 'required|unique:challenges';\n\t\t}\n return $validation;\n }", "public function rules()\n {\n\t\t\n\t\t $rules = [\n 'name' => 'required',\n 'describe' => 'required',\n 'category' => 'required',\n \n ];\n\n foreach($this->request->get('brandAndStorage') as $key => $val)\n {\n $rules['brandAndStorage.'.$key] = 'required';\n }\n\n foreach($this->request->get('propertyId') as $key => $val)\n {\n $rules['propertyId.'.$key] = 'required';\n }\n return [\n //\n ];\n }", "public function rules()\r\n {\r\n $this->sanitize();\r\n $data = [\r\n 'id' => 'required',\r\n 'type' => 'required',\r\n 'report_whom' => 'required',\r\n 'path' => 'required',\r\n 'adv_type' => 'required',\r\n 'plan_id' => 'required',\r\n // 'link' => 'required',\r\n ];\r\n\r\n if($type == 'home'){\r\n $data['slider_order'] = 'required';\r\n }\r\n\r\n if($adv_type == 2){\r\n $data['start'] = 'required';\r\n $data['end'] = 'required';\r\n }\r\n return $data;\r\n\r\n }", "public function rules()\n {\n //$data(Input::request->all());\n /*\n return [\n 'enarszam' =>['bail','required','regex:/^[0-9]/','between:10,10',new Enarszam_check],\n 'neve' =>'required',\n 'neme' =>'required',\n 'szuletes_datuma' =>'required',\n 'bekerult' =>'required',\n 'fajta' =>'required',\n 'szine' =>'required',\n 'anya_enarszam' =>'required',\n 'anya_neve' =>'required',\n 'jarlat_sorszam' =>'required',\n 'jarlat_kiadasa' =>'required',\n 'szarmazas_tenyeszet' =>'required',\n ];\n //print_r($data);exit;\n */\n return [\n 'enarszam' =>['required','regex:/^[0-9]/','between:10,10',new Enarszam_check], \n 'neve' => ['bail','nullable','max:255','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/',],\n \n 'neme' => ['required',Rule::in(['noivaru', 'himivaru']),],\n 'szuletes_datuma' => 'required|date',\n 'bekerult' => ['required','date',new MarhaDatumBekerultcheck,],\n 'fajta' => ['required',Rule::in(['magyartarka', 'limousin', 'lapaly', 'feher_kek', 'hereford', 'hersey', 'magyarszurke', 'egyebbhushasznu','nullable',]),],\n\n 'szine' => ['required',Rule::in(['vorostarka', 'feketetarka', 'zsemletarka', 'fekete', 'voros', 'feketevoros', 'egyebbtarka', 'egyebb','nullable',]),\n ],\n 'anya_enarszam' => ['required','regex:/^[0-9]/','between:10,10','different:enarszam',], \n\n 'anya_neve' =>['nullable','max:255','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/',],\n\n 'jarlat_sorszam' =>['nullable','max:100','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/'],\n\n 'jarlat_kiadasa' => ['required','date',new MarhaDatumJarlatcheck,],\n\n 'szarmazas_tenyeszet' => ['required','max:255','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/',],\n\n \n ]; \n \n \n \n\n\n }", "public function rules()\n {\n $doctors = Physican::select()->where( 'status', 1)->get();\n $i = 0;\n $available_doctors_id = [];\n foreach ($doctors as $doctor) {\n $available_doctors_id[$i] = $doctor->id;\n $i++;\n }\n return [\n 'value' => 'required|min:1|max:5|integer',\n 'physican_id' =>[ 'required',Rule::in($available_doctors_id),'exists:physicans,id'],\n 'title' => 'required|max:70|string',\n 'comment' => 'required|max:255|string',\n 'accept' => ['required', Rule::in([1]),],\n ];\n }", "function RegisterValidate() {\n\t\t\n\t\n\t\t$validate1 = array(\n\t\t\t'username'=> array(\n\t\t\t\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t\t\t'message'=> 'Please enter name')\n\t\t\t\t\t\t\t\t\t),\t\n\t\t\t'candidate_fname'=> array(\n\t\t\t\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t\t\t'message'=> 'Please enter first name')\n\t\t\t\t\t\t\t\t\t),\n\t\t\t'terms' => array(\n\t\t\t\t\t\t 'rule' => array('comparison', 'equal to', 1),\n\t\t\t\t\t\t 'required' => true,\n\t\t\t\t\t\t 'allowEmpty' => false,\n\t\t\t\t\t\t 'on' => 'index',\n\t\t\t\t\t\t 'message' => 'You have to agree terms & conditions'\n ),\n\t\t\t'candidate_lname'=> array(\n\t\t\t\t\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t\t\t\t'message'=> 'Please enter last name')\n\t\t\t\t\t\t\t\t\t),\t\t\n\t\t\t/*'candidate_title' => array(\n\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t'message' => 'Please enter title'\n\t\t\t\t),*/\n\t\t\t'candidate_phone' => array(\n\t\t\t\t\t'notEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter phone number',\n\t\t\t\t\t\t'last'=>true)\t\t\t\n\t\t\t\t),\n\t\t\t'candidate_city' => array(\n\t\t\t\t\t'rule' \t => 'notEmpty',\n\t\t\t\t\t'message' => 'Please enter city'\n\t\t\t\t),\n\t\t\t'candidate_address' => array(\n\t\t\t\t\t'rule' \t => 'notEmpty',\n\t\t\t\t\t'message' => 'Please enter address'\n\t\t\t\t),\n\t\t\t'candidate_zip'=> array(\n\t\t\t\t\t'notEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter zip Code',\n\t\t\t\t\t\t'last'=>true),\n\t\t\t\t\t'mustBeEmail'=> array(\n\t\t\t\t\t\t'rule' => 'numeric',\n\t\t\t\t\t\t'message' => 'Please enter valid zip Code',\n\t\t\t\t\t\t'last'=>true),\n\t\t\t\t\t'mustBeLonger' => array(\n\t\t\t\t\t\t'rule' => array('minLength', 5),\n\t\t\t\t\t\t'message' => 'Please enter valid zip Code'\n\t\t\t\t\t),\n\t\t\t\t\t'maxlength' => array(\n\t\t\t\t\t\t'rule' => array('maxLength', 5),\n\t\t\t\t\t\t'message' => 'Please enter valid zip Code'\n\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t'candidate_email'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter email',\n\t\t\t\t\t\t'last'=>true),\n\t\t\t\t\t'mustBeEmail'=> array(\n\t\t\t\t\t\t'rule' => array('email'),\n\t\t\t\t\t\t'message' => 'Please enter valid email',\n\t\t\t\t\t\t'last'=>true),\n\t\t\t\t\t'mustUnique'=>array(\n\t\t\t\t\t\t'rule' =>'isUnique',\n\t\t\t\t\t\t'message' =>'This email is already registered',\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t'candidate_secondary_email'=> array(\n\t\t\t\t\t'allowEmpty'=> array(\n\t\t\t\t\t\t'rule' => 'email',\n\t\t\t\t\t\t'allowEmpty' => true,\n\t\t\t\t\t\t'message' => 'Please enter valid email',\n\t\t\t\t\t\t'last'=>true)\n\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->validate=$validate1;\n\t\t\treturn $this->validates();\n\t}", "public function rules()\n {\n $rules = array();\n\n if($this->exists('name')){\n $rules['name'] = $this->validarName();\n }\n\n if($this->exists('lastName')) {\n $rules['lastName'] = $this->validarName();\n }\n\n if($this->exists('userName')) {\n $rules['userName'] = $this->validarUserName();\n }\n\n if($this->exists('email')) {\n $rules['email'] = $this->validarEmail();\n }\n\n if($this->exists('especialidad')) {\n $rules['especialidad'] = $this->validarEspecialidad();\n }\n\n if($this->exists('movil')) {\n $rules['movil'] = $this->validarMovil();\n }\n\n if($this->exists('num_colegiado')) {\n $rules['num_colegiado'] = $this->validarNumColegiado();\n }\n\n if($this->exists('num_sanitario')) {\n $rules['num_sanitario'] = $this->validarNumSanitario();\n }\n\n if($this->exists('birthdate')) {\n $rules['birthdate'] = $this->validarBirthdate();\n }\n\n if($this->exists('dni')) {\n $rules['dni'] = $this->validarDnidni();\n }\n\n if($this->exists('password')) {\n $rules['password'] = $this->validarPassword();\n }\n\n if($this->exists('password_confirmation')) {\n $rules['password_confirmation'] = $this->validarPasswordConfirmation();\n }\n\n return $rules;\n }", "function validation_rules()\n\t{\n\t\t// validation rules for create\n\t\t$this->create_validation_rules = array(\n\t\t\tarray(\n\t \t'field' => 'product_id',\n\t \t'rules' => 'required'\n\t ),\n\t array(\n\t \t'field' => 'user_id',\n\t \t'rules' => 'required'\n\t )\n );\n\n\t}", "function homeValidate() {\n\t\t$validate1 = array(\n\t\t\n\t\t/*'stock'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Stock Number')\n\t\t\t\t\t),\n\t\t\t\t\n\t\t 'name'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter name')\n\t\t\t\t\t),*/\n\t\t 'email'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Email')\n\t\t\t\t\t),\n\n\t\t 'contact'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Contact Number')\n\t\t\t\t\t),\n\t\t/*'make'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Make')\n\t\t\t\t\t),\n\t\t'model'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter Model')\n\t\t\t\t\t),\n\t\t'part'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter part')\n\t\t\t\t\t),\n\t\t'year'=> array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please choose year')\n\t\t\t\t\t),\n\t\t'country' => array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please choose country')\n\t\t\t\t\t),\n\t\t'comment' => array(\n\t\t\t\t\t'mustNotEmpty'=>array(\n\t\t\t\t\t\t'rule' => 'notEmpty',\n\t\t\t\t\t\t'message'=> 'Please enter comment')\n\t\t\t\t\t),*/\n\t\t\n\t\t\t);\n\t\t$this->validate=$validate1;\n\t\treturn $this->validates();\n\t}", "public function getRules() {\n return [\n 'complex_id' => 'required|exists:complexes,id',\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required',\n 'price_type' => 'required',\n 'price_unit' => 'required',\n ];\n }", "public function rules()\n {\n $rules = ['data' => 'required|array', 'keys' => 'required|array'];\n $data = $this->request->get('data');\n $keys = $this->request->get('keys');\n\n if (isset($data)) {\n foreach ($data as $key => $val) {\n $rules['data.' . $key] = 'required|array';\n $rules['data.' . $key . '.name'] = 'required|string';\n $rules['data.' . $key . '.added_at'] = 'required|date';\n $rules['data.' . $key . '.weight'] = 'required|numeric';\n $rules['data.' . $key . '.code'] = 'required|string';\n $rules['data.' . $key . '.success'] = 'required|boolean';\n }\n }\n\n if (isset($keys)) {\n foreach ($keys as $key => $val) {\n $rules['keys.' .$key] = 'required|array';\n $rules['keys.' .$key.'.id'] = 'required|integer|min:0';\n }\n }\n\n return $rules;\n }", "public function rules()\n {\n return [\n 'info_nombre' => [\n 'required', 'min:5','max:100'\n ],\n 'info_direccion' => [\n 'required', 'min:5','max:100'\n ],\n 'info_telefono' => [\n 'required'\n ],\n 'info_correo' => [\n 'required', 'min:5','max:50'\n ],\n 'info_nit' => [\n 'required', 'size:17'\n ],\n 'info_nrc' => [\n 'required', 'min:5','max:50'\n ],\n ];\n }", "public function rules()\n {\n $sale_price = $this->request->get('sale_price', 0);\n \n $rules = [\n 'name' => 'required',\n 'price' => 'required|numeric|min:0',\n 'sale_price' => 'numeric|min:0',\n 'image' => ['regex:'.$this->image_regex],\n 'category_id' => 'required|exists:categories,id',\n 'supplier_id' => 'required|exists:suppliers,id',\n 'unit_id' => 'required|exists:units,id',\n 'sale_unit_id' => ($sale_price > 0 ? 'required_with:sale_price|' : '').'exists:units,id',\n \n 'additional_parameter' => 'exists:parameters,id',\n \n 'nutritional_values.*.id' => 'exists:nutritional_values,id',\n 'nutritional_values.*.value' => 'numeric',\n ];\n \n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'birth' => 'required|date_format:d.m.Y',\n 'sex' => 'required|string',\n ];\n\n switch ($this->user_type) {\n case 'student':\n return [\n 'entry' => 'required|date_format:d.m.Y',\n 'grade' => 'integer|required|min:1|max:11',\n 'parallel' => 'required|size:1|string',\n 'user_id' => 'required|integer|exists:users,id|unique:pupils,user_id|unique:workers,user_id',\n ] + $rules;\n\n case 'teacher':\n return [\n\n 'employment_date' => 'required|date_format:d.m.Y',\n 'layoff_date' => 'required|date_format:d.m.Y',\n 'user_id' => 'required|integer|exists:users,id|unique:workers,user_id|unique:pupils,user_id',\n ] + $rules;\n }\n }", "abstract protected function validationRules() : array;", "public function rules()\n {\n $rules = [\n\n 'asset_id'=>'required|integer|exists:assets_tb,id',\n 'type'=>'required|string|in:internal,external',\n 'receive_date' => 'required|date',\n 'delivery_date' => 'required|date',\n 'receive_time' => 'required',\n 'delivery_time' => 'required',\n 'note' => 'nullable|string|max:1000',\n ];\n\n if (authIsSuperAdmin()) {\n $rules['branch_id'] = 'required|integer|exists:branches,id';\n }\n\n if (request()['type'] == 'external') {\n $rules['maintenance_center_id'] = 'required|integer|exists:maintenance_centers,id';\n }\n\n return $rules;\n }", "public function rules()\n {\n return [\n 'name' => 'required|min:5',\n 'info' => 'required',\n 'type' => 'required'\n ];\n }", "public function rules()\n {\n return [\n //\n\n 'name'=>'required',\n 'presentation'=>'required',\n 'description'=>'required',\n 'existence'=>'required|numeric',\n 'reference'=>'required',\n 'provider_id'=>'required',\n 'laboratory_id'=>'required',\n 'category_id'=>'required',\n \n ];\n }", "protected abstract function rules();", "protected function validate()\n {\n }", "private function process()\n {\n foreach ($this->rules as $key => $rule)\n {\n $exp = explode('|', $rule);\n\n foreach ($exp as $method)\n {\n if (strstr($method, ':')) list($method, $param) = explode(':', $method, 2);\n else $param = '';\n \n $input = array_get($this->input, $key);\n\n if (method_exists($this, \"process_$method\") === false)\n {\n if (!$input) continue;\n \n if (array_key_exists($method, self::$custom))\n {\n if (call_user_func(self::$custom[$method], $input, $param, $this) !== true) $this->set_error($key, $method);\n } else {\n throw new ValidatorNotFound(\"No validator exists for [$method]\");\n }\n } else {\n if (($input || $method == 'required') && $this->{\"process_$method\"}($input, $param, $this) !== true) $this->set_error($key, $method);\n }\n }\n }\n }", "public function rules()\n {\n if(!empty($this->lists) && $this->editable == false){\n $rules = [\n 'type' => 'required|string',\n ];\n foreach($this->lists as $key => $staff) {\n // just check if the email it's not unique\n $rules = array_merge($rules, ['lists.'.$key.'.name' => 'required|string|unique:inventories,name']);\n $rules = array_merge($rules, ['lists.'.$key.'.quantity' => 'required|integer']);\n \n }\n }else{\n $rules = [\n 'name' => 'required|string|unique:inventories,name,'.$this->id,\n 'type' => 'required|string',\n ];\n }\n\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n $rules = [\n 'alias' => 'required',\n 'title' => ['required', 'string', 'between:2,255'],\n 'description' => ['required', 'string'],\n 'question' => ['required', 'string', 'between:2,255'],\n 'answer1' => ['required', 'string', 'between:2,255'],\n 'answer2' => ['required', 'string', 'between:2,255'],\n 'answer3' => ['required', 'string', 'between:2,255'],\n 'answer4' => ['required', 'string', 'between:2,255'],\n 'answer5' => ['required', 'string', 'between:2,255'],\n\n 'img' => 'mimes:jpg,bmp,png,jpeg|max:5120',\n 'alt' => ['nullable', 'string', 'between:2,255'],\n 'imgtitle' => ['nullable', 'string', 'between:2,255'],\n\n\n 'confirmed' => 'boolean|nullable',\n 'outputtime' => 'date_format:\"Y-m-d H:i\"|nullable',\n 'cessation' => 'date_format:\"Y-m-d H:i\"|nullable',\n ];\n\n\n return $rules;\n\n } else {\n $rules = [\n 'value' => ['nullable', 'string', 'between:1,255', 'regex:#^[a-zA-zа-яА-ЯІіЇіЄєёЁ0-9\\-\\s\\,\\:\\?\\!\\.]+$#u'],\n 'param' => 'nullable|digits:1',\n ];\n return $rules;\n }\n }", "public function rules()\n {\n return [\n 'f_name' => 'required',\n 'l_name' => 'required',\n 'dob' => 'required|date_format:\"d/m/Y\"',\n 'entry_date' => 'required|date_format:\"d/m/Y\"|after:dob',\n 'position' => 'required|string',\n 'post' => 'required|string',\n 'passed_date' => 'required|date_format:\"d/m/Y\"|after:entry_date',\n 'note' => 'max:500',\n 'team_id' => 'required|exists:teams,id'\n ];\n }", "public function rules()\n {\n\t\t$item = $this->route('id');\n\t\treturn [\n\t\t\t'name' => ['required'],\n\t\t\t'description' => ['required', 'max:255'],\n\t\t\t'stock' => ['required', 'integer', 'min:0'],\n ];\n }", "public function rules()\n {\n if ($this->input('pustaha_type') == 'BUKU')\n {\n $rules = [\n 'title' => 'required',\n 'pustaha_date' => 'required',\n 'city' => 'required|max:100',\n 'country' => 'required|max:100',\n 'publisher' => 'required|max:191',\n 'editor' => 'required|max:191',\n 'issue' => 'required|max:191',\n 'isbn_issn' => 'required|max:191',\n ];\n } elseif ($this->input('pustaha_type') == 'JURNAL-N' || $this->input('pustaha_type') == 'JURNAL-I')\n {\n $rules = [\n 'title' => 'required',\n 'name' => 'required',\n 'pustaha_date' => 'required',\n 'pages' => 'required|integer|max:99999',\n 'volume' => 'required|max:191',\n 'issue' => 'required|max:191',\n 'isbn_issn' => 'required|max:191',\n 'url_address' => 'required|max:191',\n ];\n } elseif ($this->input('pustaha_type') == 'PROSIDING-N' || $this->input('pustaha_type') == 'PROSIDING-I')\n {\n $rules = [\n 'publisher' => 'required|max:191',\n 'title' => 'required',\n 'name' => 'required',\n 'pustaha_date' => 'required',\n 'city' => 'required|max:100',\n 'country' => 'required|max:100',\n 'pages' => 'required|integer|max:99999',\n 'isbn_issn' => 'required|max:191',\n 'url_address' => 'required|max:191',\n ];\n } elseif ($this->input('pustaha_type') == 'HKI' || $this->input('pustaha_type') == 'PATEN')\n {\n $rules = [\n 'propose_no' => 'required|max:191',\n 'pustaha_date' => 'required',\n 'creator_name' => 'required|max:191',\n 'creator_address' => 'required',\n 'creator_citizenship' => 'required|max:191',\n 'owner_name' => 'required|max:191',\n 'owner_address' => 'required',\n 'owner_citizenship' => 'required|max:191',\n 'creation_type' => 'required|max:191',\n 'title' => 'required',\n 'announcement_date' => 'required',\n 'announcement_place' => 'required|max:191',\n 'protection_period' => 'required|max:191',\n 'registration_no' => 'required|max:191',\n ];\n }\n\n if(!$this->input('_method')){\n $rules = array_add($rules, 'file_name_ori', 'required|mimetypes:application/pdf');\n // $rules = array_add($rules, 'file_claim_request_ori', 'required|mimetypes:application/pdf');\n // $rules = array_add($rules, 'file_claim_accomodation_ori', 'required|mimetypes:application/pdf');\n // $rules = array_add($rules, 'file_certification_ori', 'required|mimetypes:application/pdf');\n }\n\n if(!empty($this->input('is_simpel'))) {\n if($this->input('research_id')==0){\n $rules = array_add($rules, 'research_full', 'required'); \n }\n }\n return $rules;\n }", "public function rules()\n {\n $rules = [\n /* General Details */\n 'org_name' => 'required',\n 'org_type' => 'required',\n 'estab_year' => 'required|numeric|digits:4',\n 'landline' => 'nullable|numeric',\n 'website' => ['nullable','regex:/^((https?|ftp|smtp):\\/\\/)?(www.)?[a-z0-9]+\\.[a-z]+(\\/[a-zA-Z0-9#]+\\/?)*$/'],\n /* End General Details */\n \n /* CEO/MD/Head of the Organization Details */\n 'ceo_name' => 'nullable',\n 'ceo_email' => 'nullable|email',\n 'ceo_mobile' => 'nullable|numeric|min:10',\n /* End CEO/MD/Head of the Organization Details */\n \n /* Authorized Signatory Info */\n 'signatory_name' => 'nullable',\n 'signatory_email' => 'nullable|email',\n 'signatory_mobile' => 'nullable|numeric|min:10',\n /* End Authorized Signatory Info */\n \n /* Address of the Organization */\n 'org_address' => 'required',\n 'landmark' => 'required',\n 'addr_proof' => 'required',\n 'addr_doc' => 'nullable|mimes:jpeg,jpg,png,pdf',\n 'city' => 'required',\n 'block' => 'required',\n 'pin' => 'required|numeric|digits:6',\n 'state_district' => 'required',\n 'parliament' => 'required',\n /* End Address of the Organization */\n\n /* Financial Information */\n 'pan' => ['required','regex:/^[A-Z]{5}\\d{4}[A-Z]{1}$/'],\n 'pan_doc' => 'required|mimes:jpeg,jpg,png,pdf',\n 'gst' => ['nullable','regex:/^([0-9]{2}[A-Z]{4}([A-Z]{1}|[0-9]{1})[0-9]{4}[A-Z]{1}([A-Z]|[0-9]){3}){0,15}$/'],\n 'gst_doc' => 'nullable|mimes:jpeg,jpg,png,pdf',\n 'ca1_doc' => 'nullable|mimes:jpeg,jpg,png,pdf',\n 'ca2_doc' => 'nullable|mimes:jpeg,jpg,png,pdf',\n 'ca3_doc' => 'nullable|mimes:jpeg,jpg,png,pdf',\n 'ca4_doc' => 'nullable|mimes:jpeg,jpg,png,pdf',\n /* End Financial Information */\n\n /* Proposal Informatoin */\n 'offer' => 'required',\n 'offer_date' => 'required',\n 'offer_doc' => 'required|mimes:jpeg,jpg,png,pdf',\n 'sanction' => 'required',\n 'sanction_date' => 'required',\n 'sanction_doc' => 'required|mimes:jpeg,jpg,png,pdf',\n /* End Proposal Informatoin */\n \n ];\n return $rules;\n }", "public function rules()\n {\n $id = $this->get('sellerId');\n switch (request()->method()) {\n case 'PUT':\n return [\n 'name' => ['required', Rule::unique('seller')->ignore($id)],\n 'typeid' => 'required',\n 'logo' => 'required',\n 'wx' => 'required',\n 'telphone' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'email' => ['required','email', Rule::unique('seller')->ignore($id)]\n ];\n break;\n case 'POST':\n $data= [\n 'typeid' => 'required',\n 'name'=>'required|unique:seller',\n 'logo' => 'required',\n 'wx' => 'required',\n 'telphone' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'email' => 'required|email|unique:seller'\n ];\n\n return $data;\n break;\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function rules()\n {\n return [\n 'name' => 'required|string|min:3|regex:/(^[A-Z][A-Z,a-z, ]+)/',\n 'description' => 'required|string|min:5|regex:/(^[A-Z][A-Z,a-z,0-9, ]+)/',\n 'initial_date' => 'required|date',\n 'final_date' => 'required|date',\n 'employee_id' => 'required|numeric',\n 'job_id' => 'required|numeric',\n 'planning_id' => 'required|numeric'\n ];\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 rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['org_id']\t= ['required', 'integer', 'exists:'. app()->make(\\App\\Org::class)->getTable() . ',id'];\n\t\t$rules['name']\t\t= ['required', 'string', Rule::unique($this->getTable())->ignore($this->id)->where(function($q) { $q->where('org_id', '=', $this->org_id ? $this->org_id : -1); } ) ];\n\t\t$rules['code']\t\t= ['required', 'string', Rule::unique($this->getTable())->ignore($this->id)->where(function($q) { $q->where('org_id', '=', $this->org_id ? $this->org_id : -1); } ) ];\n\t\t// $rules['group']\t\t\t\t\t= ['required', 'string', 'in:'.implode(',', SELF::GROUP)];\n\t\t$rules['group']\t\t\t\t\t= ['required', 'string'];\n\t\t$rules['description']\t\t\t= ['nullable', 'string'];\n\t\t$rules['threshold']\t\t\t\t= ['nullable', 'numeric', 'min:0'];\n\t\t$rules['unit']\t\t\t\t\t= ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n return [\n 'dir' => 'required',\n 'data' => 'required',\n 'name' => 'required',\n 'type' => 'required',\n 'offset' => 'required',\n 'eof' => 'required'\n ];\n }", "public function rules()\n {\n //echo $this->scenario;\n $rules[] = array('last_name,first_name,company_id,email,companyrole_id', 'required', 'on'=>'create');\n $rules[] = array('id,companyrole_id', 'required', 'on'=>'update');\n $rules[] = array('personalphones', 'checkpersonalPhones', 'on'=>'crate');\n $rules[] = array('email', 'uniqueemail','on'=>'create');\n $rules[] = array('companyuser_id,company_id,position,tagstitles,tagsids,personalphones', 'safe');\n return $rules;\n }", "abstract public function validateData($data);", "public function createRules()\n {\n return [\n 'name' => 'sometimes|required|min:3|regex:/^([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\\s*)+([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-]*)*)+$/|max:40',\n 'lastname' => 'sometimes|required|regex:/^([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\\s*)+([0-9a-zA-ZñÑáéíóúÁÉÍÓÚ_-]*)*)+$/|min:3|max:40',\n 'username' => 'required|string|max:40|min:6|unique:users,username',\n 'email' => 'required|unique:users,email',\n 'password' => 'required|min:6',\n 'type' => 'required|in:admin,coordinador,docente,secretaria',\n ];\n }", "private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }", "protected function mainValidation()\n {\n $this->validator->add(\n 'title',\n new StringLength([\n 'max' => 50\n ])\n );\n\n $this->validator->add(\n 'description',\n new StringLength([\n 'max' => 200,\n 'allowEmpty' => true\n ])\n );\n }", "public function rules()\n {\n $whs = new SWarehouse();\n $location = new SLocation();\n\n return [\n 'code' => 'required',\n 'name' => 'required',\n 'whs_id' => 'required|exists:siie.'.$whs->getTable().',id_whs',\n ];\n }", "public function commonRules() {\n $this->sanitize();\n $rules = [\n 'first_name' => 'required|min:2|max:40|regex:/' . only_alpha_valid,\n 'last_name' => 'required|min:2|max:40|regex:/' . only_alpha_valid,\n 'date_of_birth' => 'required',\n 'telephone_no' => 'required|min:5|max:20|regex:/' . numeric_space_valid,\n 'address' => 'required|min:5|max:100',\n 'city' => 'required|min:2|max:40',\n 'postal_code' => 'required|min:4|max:7|regex:/'.alpha_numeric_valid,\n 'county' => 'required',\n 'country' => 'required',\n 'howfinds_id' => 'required',\n 'howfinds_other' => 'required',\n 'image' => 'image|max:' . img_maxsize\n ];\n if (!empty(Request::all())) {\n if (Request::get('howfinds_id') != '-1') {\n unset($rules['howfinds_other']);\n }\n }\n return $rules;\n }", "private function _rules()\n\t{\n\t\t$this->form_validation->set_rules('plate_number','plate_number','required',['required' => 'Plat Nomor Wajib Diisi']);\n\t\t$this->form_validation->set_rules('catId','Kategori/Kapasitas','required',['required' => '%s Wajib Diisi']);\n\t\t$this->form_validation->set_rules('brandId','Merek','required',['required' => '%s Wajib Diisi']);\n\t\t$this->form_validation->set_rules('active','active','required',['required' => 'Status Aktif Wajib Diisi']);\n\t}", "public function rules($data);", "abstract function validator();", "public function rules()\n {\n return [\n\n 'data' => ['required', 'array'],\n 'data.type' => ['required'],\n 'data.attributes' => ['required', 'array'],\n 'data.attributes.producer_id' => ['required', 'exists:producers,id', 'unique:shops,producer_id'],\n 'data.attributes.whatsapp' => ['required', 'string', 'max:255'],\n 'data.attributes.phone' => ['required', 'string', 'max:255'],\n 'data.attributes.email' => ['required', 'string', 'email', 'max:255'],\n 'data.attributes.addr_id' => ['required', 'exists:addrs,id'],\n 'data.attributes.price_per_km' => ['required', 'numeric'],\n 'data.attributes.max_shipping_distance' => ['required', 'numeric']\n ];\n }", "public function rules()\n {\n $id = $this->route('id');\n $rules = [\n 'company_name' => 'required|max:191|unique:employers,company_name,'.$id,\n 'company_name_bn' => 'required|max:350',\n 'country_id' => 'required',\n 'industry_type_id' => 'required',\n 'contact_person_name' => 'nullable|string|min:0|max:250',\n 'contact_person_designation' => 'required',\n 'contact_person_email' => 'required|unique:employers,contact_person_email,'.$id,\n 'contact_person_mobile' => 'max:20',\n 'contact_person_email' => 'max:100',\n 'contact_person_designation' => 'max:100',\n ];\n if ($this->input('country_id')==19){\n $rules['division_id'] = 'required';\n $rules['district_id'] = 'required';\n $rules['upazila_id'] = 'required';\n }else{\n $rules['state'] = 'required|max:100';\n $rules['city'] = 'required';\n }\n return $rules;\n }", "public function rules()\n {\n $validate['citizen'] = 'required';\n\n if($this->citizen == 1)\n {\n $validate['usernamecitizen'] = 'required|numeric|digits:12|unique:users,username';\n $validate['emailcitizen'] = 'required|email|unique:users,email';\n }\n else\n {\n $validate['usernamenoncitizen'] = 'required|between:8,10|unique:users,username';\n $validate['emailnoncitizen'] = 'required|email|unique:users,email';\n }\n\n $validate['fullname'] = 'required|regex:/^[\\pL\\s\\-]+$/u';\n $validate['birthday'] = 'required';\n $validate['age'] = 'required';\n $validate['phonecode'] = 'required';\n $validate['phone'] = 'required';\n $validate['address'] = 'required';\n $validate['agreement'] = 'required';\n $validate['postcode'] = 'required';\n $validate['city'] = 'required';\n if($this->country == '130')\n {\n $validate['state'] = 'required';\n }\n $validate['country'] = 'required';\n $validate['captcha'] = 'required|captcha';\n $this->session()->flash('check', 'ok');\n\n return $validate;\n // return [\n // 'username' => 'required|unique:users,username,',\n // 'email' => 'required|unique:users,email',\n // 'agreement' => 'required'\n // ];\n }", "public static function getFormValidationRules(): array {\n return [\n 'title' => ['required', 'string', 'max:' . AppConstants::INDEXED_STRINGS_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'startDate' => ['required', 'date', 'after_or_equal:today'],\n 'endDate' => ['required', 'date', 'after_or_equal:startDate'],\n 'price' => ['required', 'numeric', 'max:' . AppConstants::INTEGER_MAXIMUM_VALUE],\n // 'major_id' => ['required', 'exists:majors,id'],\n 'city_id' => ['required', 'exists:cities,id'],\n 'cityExistImportance' => ['required', 'in:' . implode(\",\", CompanyTask::CITY_EXIST_IMPORTANCE)],\n// 'major' => ['nullable', 'string', 'max:' . AppConstants::STRINGS_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'price' => ['required', 'numeric', 'gte:50'],\n 'pricePaymentType' => ['required', 'in:' . implode(\",\", CompanyTask::PRICE_PAYMENT_TYPE)],\n 'type' => ['required', 'in:' . implode(\",\", CompanyTask::TYPE)],\n // 'workHoursCount' => ['required_if:type,==,part_time' . ((request()->all('workHoursCount') !== null) ? \", 'numeric', 'gte:1', 'lte:24'\" : \"\")],\n 'workHoursFrom' => ['required_if:type,==,part_time' . ((request()->all('workHoursFrom') !== null) ? \", 'date_format:H:i:s a'\" : \"\")],\n 'workHoursTo' => ['required_if:type,==,part_time' . ((request()->all('workHoursTo') !== null) ? \", 'date_format:H:i:s a', 'after:workHoursFrom'\" : \"\")],\n 'workDaysCount' => ['required_if:type,==,part_time' . ((request()->all('workDaysCount') !== null) ? ', in:' . implode(',', range(1, 5)) : '')],\n 'location' => ['required_if:type,==,part_time' . ((request()->all('location') !== null) ? ', string' : '')],\n 'requiredNumberOfUsers' => ['nullable', 'numeric', 'gte:1', 'max:' . AppConstants::SMALL_INTEGER_MAXIMUM_VALUE],\n 'briefDescription' => ['required', 'string', 'max:' . AppConstants::TEXT_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'fullDescription' => ['required', 'string', 'max:' . AppConstants::TEXT_MAXIMUM_LENGTH, 'min:' . AppConstants::STRINGS_MINIMUM_LENGTH],\n 'language' => ['required', 'array', 'min:1', 'in:' . implode(\",\", CompanyTask::LANGUAGE)],\n// 'language.*' => ['required', 'string', 'in:' . implode(\",\", CompanyTask::LANGUAGE)],\n 'willTakeCertificate' => ['required', 'in:' . implode(\",\", array_keys(\\App\\AppConstants::getYesNoOptions()))],\n 'majors' => 'required|array|min:1',\n 'majors.*' => 'exists:majors,id',\n ];\n }", "private function updateRules()\n {\n return [\n 'data.type' => 'required|in:events',\n 'data.attributes.name' => 'max:30|min:5',\n 'data.attributes.description' => 'min:1|max:255',\n 'data.attributes.date' => 'date',\n 'data.relationships.users' => 'required_with:data.relationships',\n 'data.relationships.users.data.*.type' => 'required_with:data.relationships|in:users',\n 'data.relationships.users.data.*.id' => 'required_with:data.relationships|numeric'\n ];\n }", "public function rules()\n {\n return [\n 'title' => ['required', 'string', 'max:64'],\n 'contents' => ['required', 'string'],\n 'user_id' => ['required', 'integer', new UserExists],\n 'status_id' => ['required', 'integer', new ValidArticleStatus],\n 'publication_date' => ['sometimes', 'required', 'date']\n ];\n }", "public function post_rules()\n {\n if($this->is($this->api_base)){\n return [\n 'sort_order' => 'integer',\n 'playfield_type' => 'required|string',\n 'playfield_id' => 'required|integer',\n 'game_type' => 'required|string',\n 'game_id' => 'required|integer'\n ];\n }\n }", "public function rules() {\n\t\t$validation = [ ];\n\t\tswitch ($this->method ()) {\n\t\t\tcase 'POST' :\n\t\t\t\t$validation = [ \n\t\t\t\t\t\t'name' => 'required|max:255',\n\t\t\t\t\t\t'slug' => 'required|unique:games,slug|max:255',\n\t\t\t\t\t\t'logo' => 'required|image',\n\t\t\t\t\t\t'image' => 'required|image',\n\t\t\t\t\t\t'banner_image' => 'required|image',\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'PUT' :\n\t\t\t\t$validation = [\n\t\t\t\t\t\t'name' => 'required|max:255',\n\t\t\t\t\t\t'slug' => 'sometimes|required||max:255|unique:games,id,'. $this->route()->getParameter('gameId'),\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\tif($this->hasFile('logo')) {\n\t\t\t\t\t$validation[\"logo\"] = 'required|image';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->hasFile('image')) {\n\t\t\t\t\t$validation[\"image\"] = 'required|image';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->hasFile('banner_image')) {\n\t\t\t\t\t$validation[\"banner_image\"] = 'required|image';\n\t\t\t\t}\n\t\t\t\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $validation;\n\t}", "public function rules()\n {\n $rules = [];\n $this->request = json_decode($this->content);\n $content = $this->request;\n\n foreach($content->conditions as $key => $val)\n {\n $rules['conditions.'.$key.'.id'] = 'required|integer';\n $rules['conditions.'.$key.'.disease_model_id'] = 'required|integer';\n $rules['conditions.'.$key.'.clsf_weather_parameter'] = 'required|integer';\n $rules['conditions.'.$key.'.date_range'] = 'required|boolean';\n\n if (isset($val->date_range))\n if ($val->date_range) {\n $rules['conditions.'.$key.'.start_range'] = 'required|numeric';\n $rules['conditions.'.$key.'.end_range'] = 'required|numeric';\n } else {\n $rules['conditions.'.$key.'.constant'] = 'required|numeric';\n $rules['conditions.'.$key.'.operator'] = 'required|boolean';\n }\n\n $rules['conditions.'.$key.'.time'] = 'required|integer';\n }\n return $rules;\n }", "public function rules()\n {\n $rules = [];\n $cat = null;\n \n // CREATE\n if (in_array($this->method(), ['POST', 'CREATE'])) {\n $rules = [\n 'parent' => 'required|not_in:0',\n 'category' => 'required|not_in:0',\n 'post_type' => 'required|not_in:0',\n 'company_name' => 'required|mb_between:2,200|whitelist_word_title',\n 'company_description' => 'required|mb_between:5,1000|whitelist_word',\n 'title' => 'required|mb_between:2,200|whitelist_word_title',\n 'description' => 'required|mb_between:5,2000|whitelist_word',\n 'salary_type' => 'required|not_in:0',\n 'contact_name' => 'required|mb_between:2,200',\n 'email' => 'max:100|whitelist_email|whitelist_domain',\n 'phone' => 'max:20',\n 'city' => 'required|not_in:0',\n ];\n \n // Check 'logo' is required\n if ($this->file('logo')) {\n $rules['logo'] = 'required|image|mimes:' . getUploadFileTypes('image') . '|max:' . (int)config('settings.upload_max_file_size', 1000);\n }\n \n // Recaptcha\n if (config('settings.activation_recaptcha')) {\n $rules['g-recaptcha-response'] = 'required';\n }\n }\n \n // UPDATE\n if (in_array($this->method(), ['PUT', 'PATCH', 'UPDATE'])) {\n $rules = [\n 'category' => 'required|not_in:0',\n 'post_type' => 'required|not_in:0',\n 'company_name' => 'required|mb_between:2,200|whitelist_word_title',\n 'company_description' => 'required|mb_between:50,1000|whitelist_word',\n 'title' => 'required|mb_between:10,200|whitelist_word_title',\n 'description' => 'required|mb_between:50,2000|whitelist_word',\n 'salary_type' => 'required|not_in:0',\n 'contact_name' => 'required|mb_between:2,200',\n 'email' => 'max:100|whitelist_email|whitelist_domain',\n 'phone' => 'max:20',\n 'city' => 'required|not_in:0',\n ];\n \n // Check 'logo' is required\n if ($this->file('logo')) {\n $rules['logo'] = 'required|image|mimes:' . getUploadFileTypes('image') . '|max:' . (int)config('settings.upload_max_file_size', 1000);\n }\n }\n \n // COMMON\n \n // Location\n if (in_array(config('country.admin_type'), ['1', '2']) && config('country.admin_field_active') == 1) {\n $rules['admin_code'] = 'required|not_in:0';\n }\n \n // Email\n if ($this->filled('email')) {\n $rules['email'] = 'email|' . $rules['email'];\n }\n if (isEnabledField('email')) {\n if (isEnabledField('phone') && isEnabledField('email')) {\n if (Auth::check()) {\n $rules['email'] = 'required_without:phone|' . $rules['email'];\n } else {\n // Email address is required for Guests\n $rules['email'] = 'required|' . $rules['email'];\n }\n } else {\n $rules['email'] = 'required|' . $rules['email'];\n }\n }\n \n // Phone\n if ($this->filled('phone')) {\n $rules['phone'] = 'phone:' . $this->input('country', config('country.code')) . ',mobile|' . $rules['phone'];\n }\n if (isEnabledField('phone')) {\n if (isEnabledField('phone') && isEnabledField('email')) {\n $rules['phone'] = 'required_without:email|' . $rules['phone'];\n } else {\n $rules['phone'] = 'required|' . $rules['phone'];\n }\n }\n \n return $rules;\n }", "public function rules()\n\t{\n\t\treturn [\n\t\t\t'fistname' => 'required|min:3',\n\t\t\t'lastname' => 'required|min:3',\n\t\t\t'gender' => 'required',\n\t\t\t'age' => 'required|numeric',\n\t\t\t'district' => 'required',\n\t\t\t'sub_county' => 'required',\n\t\t\t'village' => 'required',\n\t\t\t'no_in_household' => 'required|numeric',\n\t\t\t'voucher_serial_no' => 'required',\n\t\t];\n\t}", "public function rules()\n {\n return [\n 'plant_name' => 'required',\n 'planted_date' => 'required|date',\n 'height' => 'required',\n 'update_frequency' => 'required',\n 'long' => 'required',\n 'lat' => 'required',\n 'description' => 'required',\n //'image' => 'required',\n ];\n }", "private function addValidation($inData){\r\n // the size indicator -> if the size radio is not selected -> refuse\r\n $sizeIndicator = false;\r\n // if the quantity are all 0 -> refuse\r\n $quantityIndicator = false;\r\n // indicates the food's category for further price query\r\n $data['category'] = $inData['category'];\r\n // item array prepared in the return array $data for setting items\r\n $data['item'] = array();\r\n // first loop for striping useless $_GET entries and valid whether\r\n // Necessary fileds are being selected by user\r\n foreach($inData as $key => $value){\r\n // for finding size $key , and find which index it is \r\n if(preg_match('/s(\\d)(.*)/',$value,$match) ){\r\n $sizeIndicator = true;\r\n $data['item'][$match[1]]['size'] = $match[2];\r\n }\r\n // same as size $key, it fins out which index the item is\r\n if(preg_match('/q(\\d)/',$key,$match) && $value != 0){\r\n $quantityIndicator = true;\r\n $data['item'][$match[1]]['quantity'] = $value;\r\n }\r\n }\r\n // if the size or the quantity is not filled in by user, refuse him\r\n if(!($sizeIndicator && $quantityIndicator))\r\n return array('error' => 'You have to select at least 1) Size 2) Quantity for the SAME food~');\r\n // the indicator for seeing whether same food's both size and quantity\r\n // are correctly input by user\r\n $matchIndicator = true;\r\n // second foreach runs a size check on the data['item']'s each elements\r\n // it will refuse the user if the element is not sized two\r\n $outData = array();\r\n foreach($data['item'] as $key => $item){\r\n if((count($item))!= 1){\r\n $matchIndicator = false;\r\n }\r\n $name = $this -> model -> getName($data['category'])[$key - 1]; \r\n $size = $item['size'];\r\n $quantity = $item['quantity'];\r\n $price_for_one = $this -> model -> getPrice($data['category'],$name)[$size]; \r\n array_push($outData,compact('name','size','quantity','price_for_one'));\r\n }\r\n // if wrong filed is inserted by user, refuse him\r\n if($matchIndicator)\r\n return array('error' => 'You sure sure you input the correct thing?');\r\n // outdata that will be finally returned.\r\n // totally 4 fields are going to be included for each row\r\n // 1) name 2) size 3) quantity 4) price for one\r\n //return the data that should be passed to the controller method\r\n //that actually renders the views\r\n return $outData;\r\n }", "public function rules()\n {\n $rules = [];\n $rules = [\n 'phase_name' => 'required|max:255'\n ,'amount' => 'required|numeric|min:0.000000001'\n ,'start_date' => 'required|date|before:end_date'\n ,'end_date' => 'required|date|after:start_date'\n ,'rate' => 'required|numeric|min:0.000000001'\n ,'affiliation_level' => 'required|numeric|min:1|max:3'\n // ,'affiliation_percentage' => 'required|numeric|min:0.000000001|max:100'\n // ,'fees' => 'required|numeric|min:0.000000001|max:100'\n ,'bonus' => 'required|numeric|min:0.000000001|max:100'\n ,'status' => 'required'\n ];\n\n return $rules;\n }", "public function validate($input);", "protected function setupValidation()\n {\n }", "public function rules()\n {\n $id = $this->route('id');\n $rules = [\n 'id' => 'required|exists:voucher,id',\n 'name' => 'required|min:1',\n 'code' => 'required|min:1|max:255|unique:voucher,code,'.$id.',id,deleted_at,NULL',\n 'description' => 'min:1',\n 'effective_start_date' => 'required|date|date_format:Y-m-d|after_or_equal:today',\n 'effective_end_date' => 'required|date|date_format:Y-m-d|after:start_date',\n 'value' => 'required|numeric',\n 'unit' => 'required|in:percentage,decimal',\n 'image' => 'is_base64_or_url',\n 'minimum_payment' => 'numeric',\n 'limit_per_user' => 'numeric',\n 'limit_per_user_per_day' => 'numeric',\n 'status' => 'in:draft,publish'\n ];\n if($this->input('unit') === 'percentage'){\n $rules['value'] = 'required|numeric|max:100';\n $rules['max_discount'] = 'required|numeric';\n }\n return $rules;\n }", "public function rules()\n {\n $rule = [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'birthday' =>'required|before:today',\n 'email' => 'required|regex:/(.+)@(.+)\\.(.+)/i|email|unique:customers',\n 'phone' =>'required|regex:/(0)[0-9]/|digits_between:10,15',\n ];\n \n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n \n $rule['email'] = 'required|regex:/(.+)@(.+)\\.(.+)/i|unique:customers,email,'.$this->customer['id'];\n }\n\n return $rule;\n \n }" ]
[ "0.73323655", "0.7119764", "0.707765", "0.707765", "0.7032376", "0.6977673", "0.6951368", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6810461", "0.6792948", "0.6778235", "0.676787", "0.6744302", "0.6726297", "0.6657708", "0.6650248", "0.6641019", "0.6630646", "0.66300374", "0.6621508", "0.66120034", "0.6580124", "0.6569943", "0.6558787", "0.6556037", "0.65438366", "0.6533791", "0.6524531", "0.64836335", "0.64768016", "0.64763266", "0.6473747", "0.64682853", "0.6454576", "0.6440954", "0.6437484", "0.6437421", "0.6428173", "0.64159864", "0.6412388", "0.64078796", "0.63992906", "0.6387435", "0.6385196", "0.63850117", "0.63847655", "0.638299", "0.6372279", "0.63689816", "0.63426054", "0.633689", "0.6327668", "0.631823", "0.6317094", "0.63115424", "0.63049453", "0.63025373", "0.63012785", "0.6300571", "0.6300473", "0.6300252", "0.62917536", "0.6288386", "0.62851316", "0.6279915", "0.6278982", "0.6275969", "0.62736046", "0.6268968", "0.6267097", "0.6264082", "0.6262029", "0.6259059", "0.62562776", "0.6253752", "0.625215", "0.62504107", "0.62495077", "0.6249246", "0.6248844", "0.6247054", "0.62466085", "0.62463355", "0.62432337", "0.62432307", "0.62414545", "0.6241238", "0.6237841", "0.62340397", "0.62334996", "0.62333035" ]
0.0
-1
To extract Http Code. HTTP Batch Response can be in one of the two formats 1. HTTP/1.1 100 Continue [newline][newline] HTTP/1.1 Code Message In this case the actual code is the code part of HTTP string in second line 2. HTTP/1.1 Code Message
public function GetCode() { if($this->_correctHttpLine != null) { preg_match("|^HTTP/[\d\.x]+ (\d+)|", $this->_correctHttpLine, $m); if (isset($m[1])) { return (int)$m[1]; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCode()\n\t{\n\t\t$matches = array();\n\t\tif (isset($this->headers) && isset($this->headers[0]))\n\t\t\tpreg_match('|HTTP/\\d\\.\\d\\s+(\\d+)\\s+.*|', $this->headers[0], $matches);\n\t\treturn isset($matches[1]) ? (int)$matches[1] : 0;\n\t}", "function getHttpCode();", "function get_http_response_code()\n\t{\n\t\t//最后一个收到的HTTP代码\n\t\treturn curl_getinfo($this->ch, CURLINFO_HTTP_CODE);\n\t}", "protected function _getCode()\n {\n // filter code from response\n return (int)substr($this->_getServerResponse(), 0, 3);\n }", "function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}", "public function getResponseCode();", "public function getResponseCode();", "public function code() {\n return $this->info['http_code'];\n }", "function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n\t}", "public function getCode()\n {\n return $this->response_code;\n }", "protected function _extractHttpCode($header) {\n\t\tpreg_match(\n\t\t\t'#^HTTP/[0-9\\.]+\\s(?P<code>[0-9]+)#i',\n\t\t\t$header,\n\t\t\t$matches\n\t\t);\n\n\t\treturn isset($matches['code'])\n\t\t\t? $matches['code']\n\t\t\t: $this->_defaultCode;\n\t}", "function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n}", "public function getHttpCode()\n {\n return $this->information[ self::INFORMATION_HTTP_CODE ];\n }", "function http_headers_get_response_code() {\n\t\treturn $this->http_response_code;\n\t}", "function getStatusCode($response){\n\tif(preg_match(\"~HTTP/1\\.1 (\\d+)~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getStatusCode: invalid response from server\", true);\n\treturn false;\n}", "public function getResponseHTTPCode()\n {\n return $this->httpCode;\n }", "private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }", "public function getCode()\n {\n return curl_getinfo($this->handler)['http_code'];\n }", "function getHttpResponseCode_using_getheaders($url, $followredirects = true){\n // NOTE: could potentially take up to 0-30 seconds , blocking further code execution (more or less depending on connection, target site, and local timeout settings))\n // if $followredirects == false: return the FIRST known httpcode (ignore redirects)\n // if $followredirects == true : return the LAST known httpcode (when redirected)\n if(! $url || ! is_string($url)){\n return false;\n }\n $headers = @get_headers($url);\n if($headers && is_array($headers)){\n if($followredirects){\n // we want the the last errorcode, reverse array so we start at the end:\n $headers = array_reverse($headers);\n }\n foreach($headers as $hline){\n // search for things like \"HTTP/1.1 200 OK\" , \"HTTP/1.0 200 OK\" , \"HTTP/1.1 301 PERMANENTLY MOVED\" , \"HTTP/1.1 400 Not Found\" , etc.\n // note that the exact syntax/version/output differs, so there is some string magic involved here\n if(preg_match('/^HTTP\\/\\S+\\s+([1-9][0-9][0-9])\\s+.*/', $hline, $matches) ){// \"HTTP/*** ### ***\"\n $code = $matches[1];\n return $code;\n }\n }\n // no HTTP/xxx found in headers:\n return false;\n }\n // no headers :\n return false;\n }", "public static function getStatusCode(): int;", "private function getHttpCode() {\n return $this->httpCode;\n }", "public function getResponseCode(){\n\t\treturn $this->response->getCode();\n\t}", "private function get_http_response_code($url)\n {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n }", "protected function getHTTPResponceTextByCode($code) {\n $text = '';\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default: break;\n }\n return $text;\n }", "public function getHttpCode()\n {\n return $this->code;\n }", "function getStatusCode();", "public function GetMessage()\n {\n if($this->_correctHttpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ \\d+ ([^\\r\\n]+)|\",\n $this->_correctHttpLine, $m);\n if (isset($m[1])) { return $m[1]; }\n }\n return false;\n }", "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 getResponseCode()\n {\n return $this->response_code;\n }", "private function responseCode($line) {\n // Expecting \"HTTP/1.1 200 OK\", \"HTTP/1.1 404 NOT FOUND\", etc.\n $this->code = (int) substr($line, 9, 3);\n // Consider 200 to be success and all else to be failure\n // but there are other return codes that may be acceptable\n if ($this->code !== 200) {\n $this->currentState = self::FAIL_STATE;\n throw new \\Exception(\"Received code {$this->code} from the server. ($line)\");\n }\n else {\n $this->currentState = self::RECEIVE_HEADER;\n }\n }", "public function getResponseCode() {\n return $this->response_code;\n }", "public function httpCode($code=null){\n\t\t// FIXME: this doesn't take care to differentiate which codes are\n\t\t// in HTTP/1.0 vs HTTP/1.1; should it?\n\t\t$phrases = array(\n\t\t\t100 => \"Continue\",\n\t\t\t101 => \"Switching Protocols\",\n\n\t\t\t200 => \"OK\",\n\t\t\t201 => \"Created\",\n\t\t\t202 => \"Accepted\",\n\t\t\t203 => \"Non-Authoritative Information\",\n\t\t\t204 => \"No Content\",\n\t\t\t205 => \"Reset Content\",\n\t\t\t206 => \"Partial Content\",\n\n\t\t\t300 => \"Multiple Choices\", // useful for disambiguation?\n\t\t\t301 => \"Moved Permanently\",\n\t\t\t302 => \"Found\",\n\t\t\t303 => \"See Other\",\n\t\t\t304 => \"Not Modified\",\n\t\t\t305 => \"Use Proxy\",\n\t\t\t307 => \"Temporary Redirect\",\n\n\t\t\t400 => \"Bad Request\",\n\t\t\t401 => \"Unauthorized\", // use when auth'ing will make a request valid\n\t\t\t403 => \"Forbidden\", // use when auth'ing won't make a difference\n\t\t\t404 => \"Not Found\",\n\t\t\t405 => \"Method Not Allowed\", // HTTP method, e.g. using GET when only POST is valid\n\t\t\t406 => \"Not Acceptable\",\n\t\t\t407 => \"Proxy Authentication Required\",\n\t\t\t408 => \"Request Timeout\",\n\t\t\t409 => \"Conflict\",\n\t\t\t410 => \"Gone\", // something existed but was intentionally removed\n\t\t\t411 => \"Length Required\",\n\t\t\t412 => \"Precondition Failed\",\n\t\t\t413 => \"Request Entity Too Large\",\n\t\t\t414 => \"Request-URI Too Long\",\n\t\t\t415 => \"Unsupported Media Type\",\n\t\t\t416 => \"Requested Range Not Satisfiable\",\n\t\t\t417 => \"Expectation Failed\",\n\n\t\t\t500 => \"Internal Server Error\",\n\t\t\t501 => \"Not Implemented\",\n\t\t\t502 => \"Bad Gateway\",\n\t\t\t503 => \"Service Unavailable\",\n\t\t\t504 => \"Gateway Timeout\",\n\t\t);\n\n\t\tif(!is_null($code)){\n\t\t\tif(!array_key_exists($code, $phrases)){\n\t\t\t\t$code = 404;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 $code {$phrases[$code]}\");\n\t\t\t$this->httpResponseCode = $code;\n\t\t}\n\n\t\treturn \"HTTP/1.1 $this->httpResponseCode {$phrases[$this->httpResponseCode]}\";\n\t}", "public function getResponseCode()\r\n {\r\n return $this->responseCode;\r\n }", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getResponseCode()\n {\n return $this->responseCode;\n }", "public function getHttpCode()\r\n {\r\n return $this->http_code;\r\n }", "public function getResponseCode()\r\n {\r\n return $this->getData('response_code');\r\n }", "public function getCode()\n\t{\n\t\treturn (int)$this->statusCode;\n\t}", "public function getResponseCode()\n {\n }", "public function getHttpCode()\n {\n return $this->http_code;\n }", "public function getHttpCode()\n {\n return $this->_httpCode;\n }", "public function getHttpCode() {\n return $this->httpCode;\n }", "public function getStatusCode(){\n return $this->httpResponseCode;\n }", "public function getHttpCode(): int\n {\n return $this->httpCode;\n }", "public function get_response_code() {\n return $this->response_code;\n }", "public function getHttpCode()\n {\n return $this->httpCode;\n }", "public function getLastResponseCode() {\n $last = $this->getLastResponse();\n if (!empty($last['code'])) {\n return $last['code'];\n }\n }", "public function getHttpCode() {\n return $this->httpCode;\n }", "static function Response($code) {\n\t\treturn 'HTTP/' . Http::VERSION . ' ' . Http::$codes[$code];\n\t}", "public function getStatusCode() {}", "function get_headers_from_curl_response($response) {\n $headers = array();\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if ($i === 0)\n $headers['http_code'] = $line;\n else {\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n return $headers;\n}", "function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}", "function getResponseCodeMessage($code) {\n $code = is_string($code) ? intval($code) : $code;\n switch ($code) {\n case 100: $text = 'Continue';\n break;\n case 101: $text = 'Switching Protocols';\n break;\n case 200: $text = 'OK';\n break;\n case 201: $text = 'Created';\n break;\n case 202: $text = 'Accepted';\n break;\n case 203: $text = 'Non-Authoritative Information';\n break;\n case 204: $text = 'No Content';\n break;\n case 205: $text = 'Reset Content';\n break;\n case 206: $text = 'Partial Content';\n break;\n case 300: $text = 'Multiple Choices';\n break;\n case 301: $text = 'Moved Permanently';\n break;\n case 302: $text = 'Moved Temporarily';\n break;\n case 303: $text = 'See Other';\n break;\n case 304: $text = 'Not Modified';\n break;\n case 305: $text = 'Use Proxy';\n break;\n case 400: $text = 'Bad Request';\n break;\n case 401: $text = 'Unauthorized';\n break;\n case 402: $text = 'Payment Required';\n break;\n case 403: $text = 'Forbidden';\n break;\n case 404: $text = 'Not Found';\n break;\n case 405: $text = 'Method Not Allowed';\n break;\n case 406: $text = 'Not Acceptable';\n break;\n case 407: $text = 'Proxy Authentication Required';\n break;\n case 408: $text = 'Request Time-out';\n break;\n case 409: $text = 'Conflict';\n break;\n case 410: $text = 'Gone';\n break;\n case 411: $text = 'Length Required';\n break;\n case 412: $text = 'Precondition Failed';\n break;\n case 413: $text = 'Request Entity Too Large';\n break;\n case 414: $text = 'Request-URI Too Large';\n break;\n case 415: $text = 'Unsupported Media Type';\n break;\n case 500: $text = 'Internal Server Error';\n break;\n case 501: $text = 'Not Implemented';\n break;\n case 502: $text = 'Bad Gateway';\n break;\n case 503: $text = 'Service Unavailable';\n break;\n case 504: $text = 'Gateway Time-out';\n break;\n case 505: $text = 'HTTP Version not supported';\n break;\n default:\n $text = \"Unknown http status code\";\n break;\n }\n return $text;\n}", "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "protected function getAccessCode()\n {\n return $_GET[self::RESPONSE_CODE_PARAM];\n }", "public function getResponseCode() {\n return $this->response->getResponseCode();\n }", "function getHttpCode() {\n return $this->httpCode;\n }", "function http_response_code($newcode = NULL)\n\t\t{\n\t\t\tstatic $code = 200;\n\t\t\tif($newcode !== NULL)\n\t\t\t{\n\t\t\t\theader('X-PHP-Response-Code: '.$newcode, true, $newcode);\n\t\t\t\tif(!headers_sent())\n\t\t\t\t\t$code = $newcode;\n\t\t\t}\n\t\t\treturn $code;\n\t }", "public function getStatusCode()\n {\n preg_match(\"/(\\d\\d\\d)/\", $this->_status, $matches);\n return isset($matches[1]) ? (int) $matches[1] : 0;\n }", "function http_response_code($response_code = 0) { \r\n \r\n if($response_code)\r\n Pancake\\vars::$Pancake_request->answerCode = $response_code;\r\n return Pancake\\vars::$Pancake_request->answerCode;\r\n }", "public function code()\n {\n // API Response Code\n return $this->agent->code();\n }", "public static function http__request__get_response_code($url ){\n return static::http__request( $url, array(), 'get_code');\n }", "public function getHttpResponseCode()\n {\n return $this->_httpResponseCode;\n }", "public function getStatus()\n {\n return (int)substr($this->response, 9, 3);\n }", "public static function httpStatus($_code) {\n\t\tif (!defined('self::HTTP_'.$_code)) {\n\t\t\t// Invalid status code\n\t\t\tself::$global['CONTEXT']=$_code;\n\t\t\ttrigger_error(self::TEXT_HTTP);\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Get description\n\t\t$_response=constant('self::HTTP_'.$_code);\n\t\t// Send raw HTTP header\n\t\tif (PHP_SAPI!='cli' && !self::$global['QUIET'] && !headers_sent())\n\t\t\theader('HTTP/1.1 '.$_code.' '.$_response);\n\t\treturn $_response;\n\t}", "private function parseHttpLine(&$response, $line){\n $splittedLine = explode(' ', $line);\n $protocolAndVersion = explode('/', array_shift($splittedLine));\n $response['protocol'] = trim(array_shift($protocolAndVersion));\n $response['protocol_version'] = trim(array_shift($protocolAndVersion));\n $httpCode = trim(array_shift($splittedLine));\n $response['http_code'] = $httpCode;\n $response['http_message'] = trim(array_shift($splittedLine));\n $response['status'] = 200 <= $httpCode && $httpCode <= 299?'success':'failure';\n }", "public function getResponseCode() {\n return $this->client->getHttpStatusCode();\n }", "public static function getHTTPStatusCode($header) {\n $first_line = strtok($header, \"\\n\");\n\n preg_match(\"# [0-9]{3}#\", $first_line, $match);\n\n if (isset($match[0]))\n return (int) trim($match[0]);\n else\n return null;\n }", "function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = substr($respHeaders, 0, strpos($respHeaders, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $headerText) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n}", "function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}", "protected function getHttpResponseCodes() {\n return array (\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Switch Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'I\\'m a teapot',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 425 => 'Unordered Collection',\n 426 => 'Upgrade Required',\n 449 => 'Retry With',\n 450 => 'Blocked by Windows Parental Controls',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n 510 => 'Not Extended'\n );\n }", "function responseCode() {\n return $this->responseCode;\n }", "public function getStatusCode(): int\n {\n return $this->code ;\n }", "public function _getStatusCodeMessage($status) {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Oops! Something has gone wrong and the page you were looking for could not be found! Try the <a href=\"\" class=\"color-blue\">home page.</a>',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => \"We're sorry because something went wrong, please try again!\",\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n );\n return (isset($codes[$status])) ? $codes[$status] : 'Unknown Result';\n }", "public function getStatusCode()\n {\n return curl_getinfo($this->ch, CURLINFO_HTTP_CODE);\n }", "public function getStatusCode()\r\n\t{\r\n\t\treturn $this->m_code;\r\n\t}", "public function getResponseStatusCode()\n {\n return $this->responseCode;\n }", "protected final function responseCode(): int\n {\n return $this->responseCode;\n }", "protected static function statusCode($code=null) {\r\n\t\tstatic $current_status;\r\n\t\t\r\n\t\tif ($code) {\r\n $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';\r\n\t\t\t$current_status = $code;\r\n\t\t\theader($protocol. ' ' . static::$messages[$code]);\r\n\t\t}\r\n\t\treturn $current_status?:200;\r\n\t}", "public static function getStatus() {\n\t\treturn http_response_code();\n\t}", "function http_status_code($code, $message = \"\") {\n\n if (!empty($code)) {\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n \n // Append the content if not empty\n if (!empty($message)) $message = \" - \" . $message;\n\n header($protocol . ' ' . $code . ' ' . $text . \"$message\");\n\n $GLOBALS['http_status_code'] = $code;\n\n } else {\n\n $code = (isset($GLOBALS['http_status_code']) ? $GLOBALS['http_status_code'] : 200);\n\n }\n\n // We must kill the requisition\n die($code);\n }", "public function getStatusCode()\n {\n }", "private function _getStatusCodeMessage($status)\n{\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public function getFirstResponseStatus(): string\n {\n $responseStatus = $this->getAllHeaders()[0] ?? '';\n\n //200 OK, protocol signature varies, HTTP 1.1/1.0, etc.\n if (preg_match('/200 OK/i', $responseStatus) === 1) {\n return self::STATUS_OK;\n }\n\n if (preg_match('/404 Not Found/i', $responseStatus) === 1) {\n return self::STATUS_NOT_FOUND;\n }\n\n return self::STATUS_OTHER;\n }", "function get_status_header_desc($code) {\n\t$codes_to_desc = array(\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\t\t\t102 => 'Processing',\n\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\t\t\t207 => 'Multi-Status',\n\t\t\t226 => 'IM Used',\n\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t306 => 'Reserved',\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t423 => 'Locked',\n\t\t\t424 => 'Failed Dependency',\n\t\t\t426 => 'Upgrade Required',\n\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t507 => 'Insufficient Storage',\n\t\t\t510 => 'Not Extended'\n\t);\n\t\n\tif(check_value($codes_to_desc[$code])) {\n\t\treturn $codes_to_desc[$code];\t\n\t}\n\t\n}", "public function getStatusCode() {\n\t\treturn $this->status['code'];\n\t}", "function curl_code($curl) {\n return curl_info($curl, CURLINFO_HTTP_CODE);\n}", "private function _status_parse( $header, $code ) {\n\t\tif ( $code == 201 ) {\n\t\t\treturn 'H';\n\t\t}\n\n\t\tif ( stripos( $header, 'X-Litespeed-Cache-Control: no-cache' ) !== false ) {\n\t\t\treturn 'N'; // Blacklist\n\t\t}\n\n\t\t$_cache_headers = array(\n\t\t\t'x-litespeed-cache',\n\t\t\t'x-lsadc-cache',\n\t\t\t'x-qc-cache',\n\t\t);\n\n\t\tforeach ( $_cache_headers as $_header ) {\n\t\t\tif ( stripos( $header, $_header ) !== false ) {\n\t\t\t\tif ( stripos( $header, $_header . ': miss' ) !== false ) {\n\t\t\t\t\treturn 'M'; // Miss\n\t\t\t\t}\n\t\t\t\treturn 'H'; // Hit\n\t\t\t}\n\t\t}\n\n\t\treturn 'B'; // Blacklist\n\t}" ]
[ "0.73053265", "0.7160599", "0.71346563", "0.70290184", "0.69969416", "0.6822589", "0.6822589", "0.678162", "0.6726381", "0.67052615", "0.67023355", "0.66821796", "0.6654358", "0.65762746", "0.6560805", "0.6540516", "0.64696616", "0.64683145", "0.6461401", "0.6444074", "0.64386886", "0.64209366", "0.64192295", "0.64116865", "0.6406764", "0.63984686", "0.6389409", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.63760906", "0.6371517", "0.63685066", "0.63644165", "0.63482887", "0.63313717", "0.63068354", "0.63068354", "0.63068354", "0.63068354", "0.6292838", "0.62894046", "0.6268735", "0.62487096", "0.6246508", "0.6240784", "0.6221976", "0.6218133", "0.6208355", "0.62072486", "0.6206272", "0.61963975", "0.61678606", "0.6158712", "0.6148627", "0.61335534", "0.6133064", "0.61252534", "0.61152375", "0.6109797", "0.61044455", "0.6082699", "0.60611105", "0.6057965", "0.6039915", "0.603554", "0.6025271", "0.60193574", "0.6016531", "0.6013041", "0.59982586", "0.5982142", "0.5962516", "0.59609705", "0.59571236", "0.5948615", "0.59457666", "0.5926095", "0.5919391", "0.5900709", "0.5893248", "0.5885406", "0.5883208", "0.5871564", "0.58638173", "0.58630997", "0.58518434", "0.5837256", "0.5829645", "0.58294344", "0.58285385", "0.58240354", "0.58223253", "0.58141536" ]
0.74401766
0
To extract Http message. HTTP Batch Response can be in one of the two formats 1. HTTP/1.1 100 Continue [newline][newline] HTTP/1.1 Code Message In this case the actual code is the Message part of HTTP string in second line 2. HTTP/1.1 Code Message
public function GetMessage() { if($this->_correctHttpLine != null) { preg_match("|^HTTP/[\d\.x]+ \d+ ([^\r\n]+)|", $this->_correctHttpLine, $m); if (isset($m[1])) { return $m[1]; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}", "public function getResponseMessage();", "protected function getHTTPResponceTextByCode($code) {\n $text = '';\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default: break;\n }\n return $text;\n }", "public function GetCode()\n {\n if($this->_correctHttpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ (\\d+)|\", $this->_correctHttpLine, $m);\n if (isset($m[1])) { return (int)$m[1]; }\n }\n\n return false;\n }", "function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}", "function get_http_response_code()\n\t{\n\t\t//最后一个收到的HTTP代码\n\t\treturn curl_getinfo($this->ch, CURLINFO_HTTP_CODE);\n\t}", "private function parseHttpLine(&$response, $line){\n $splittedLine = explode(' ', $line);\n $protocolAndVersion = explode('/', array_shift($splittedLine));\n $response['protocol'] = trim(array_shift($protocolAndVersion));\n $response['protocol_version'] = trim(array_shift($protocolAndVersion));\n $httpCode = trim(array_shift($splittedLine));\n $response['http_code'] = $httpCode;\n $response['http_message'] = trim(array_shift($splittedLine));\n $response['status'] = 200 <= $httpCode && $httpCode <= 299?'success':'failure';\n }", "public function getCode()\n\t{\n\t\t$matches = array();\n\t\tif (isset($this->headers) && isset($this->headers[0]))\n\t\t\tpreg_match('|HTTP/\\d\\.\\d\\s+(\\d+)\\s+.*|', $this->headers[0], $matches);\n\t\treturn isset($matches[1]) ? (int)$matches[1] : 0;\n\t}", "function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}", "function getHttpCode();", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "private function readHead() {\n\t\t$matches = array();\n\n\t\t// Read and parse status line\n\t\t$status = $this->readLine();\n\t\tif (!preg_match('!^(?:HTTP/(\\d\\.\\d)) (\\d{3})(?: (.+))?!', $status, $matches)) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Malformed status line: \" . $status);\n\t\t}\n\n\t\t// Debug status line\n\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t$this->client->log(\"< \" . trim($status));\n\t\t}\n\n\t\t$this->version = $matches[1];\n\t\t$this->code = intval($matches[2]);\n\t\t$this->message = $matches[3];\n\n\t\t// Read and parse headers\n\t\tdo {\n\t\t\t$line = $this->readLine();\n\n\t\t\t// Debug header line\n\t\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t\t$this->client->log(\"< \" . trim($line));\n\t\t\t}\n\n\t\t\tif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $line, $matches)) {\n\t\t\t\t$name = strtolower($matches[1]);\n\t\t\t\t$value = trim($matches[2]);\n\n\t\t\t\t// Put multiple headers with the same name into an array\n\t\t\t\tif (isset($this->headers[$name])) {\n\t\t\t\t\tif (is_array($this->headers[$name])) {\n\t\t\t\t\t\t$this->headers[$name][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->headers[$name] = array($this->headers[$name], $value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->headers[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($line !== \"\");\n\t}", "function parse_response($message)\n{\n $data = _parse_message($message);\n // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space\n // between status-code and reason-phrase is required. But browsers accept\n // responses without space and reason as well.\n if (!preg_match('/^HTTP\\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {\n throw new \\InvalidArgumentException('Invalid response string: ' . $data['start-line']);\n }\n $parts = explode(' ', $data['start-line'], 3);\n\n return new Response(\n $parts[1],\n $data['headers'],\n $data['body'],\n explode('/', $parts[0])[1],\n isset($parts[2]) ? $parts[2] : null\n );\n}", "public function parseResponse($message);", "public function _parseResponce()\n\t\t{\n\t\t\t$pattern = \"/(link_cropped_no\\\" target=\\\"_blank\\\" href=\\\")(.{0,255})(\\\" )/i\";\n\t\t\tpreg_match_all($pattern, $this->responce, $out);\n\t\t\t$this->content = (!empty($out['2'])) ? array_splice($out['2'], false, AMOUNT_OF_RESULTS) : array();\n\t\t}", "function get_headers_from_curl_response($response) {\n $headers = array();\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if ($i === 0)\n $headers['http_code'] = $line;\n else {\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n return $headers;\n}", "#[Pure]\nfunction http_parse_message($message) {}", "protected function _extractHttpCode($header) {\n\t\tpreg_match(\n\t\t\t'#^HTTP/[0-9\\.]+\\s(?P<code>[0-9]+)#i',\n\t\t\t$header,\n\t\t\t$matches\n\t\t);\n\n\t\treturn isset($matches['code'])\n\t\t\t? $matches['code']\n\t\t\t: $this->_defaultCode;\n\t}", "function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = substr($respHeaders, 0, strpos($respHeaders, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $headerText) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n}", "public function GetAsHttpResponse()\n {\n $parts = explode(\"--\" . $this->_changesetBoundary,\n $this->_rawHttpBatchResponse, 2);\n return new Microsoft_Http_Response($this->GetCode(),\n HttpResponse::extractHeaders($parts[0]),\n (count($parts) == 2) ?\n ('--' . $this->_changesetBoundary . \"\\n\" . $parts[1]) :\n $parts[0]);\n }", "protected static function ExtractCorrectHttpLine($rawHttpBatchResponse)\n {\n if(preg_match_all(\"|HTTP/[\\d\\.x]+ \\d+ [^\\r\\n]+|\", $rawHttpBatchResponse,\n $multiArray, PREG_OFFSET_CAPTURE))\n {\n if (isset($multiArray[0]))\n {\n if (!(isset($multiArray[0][0]) &&\n isset($multiArray[0][0][0])))\n {\n return null;\n }\n\n $prevHeader = $multiArray[0][0][0];\n $index = self::ExtractBatchBoundaryIndex($rawHttpBatchResponse);\n unset($multiArray[0][0]);\n //If BatchBoundry tag is not present, then return the last HTTP\n //line from the collection.\n if($index == -1)\n {\n $count = count($multiArray[0]);\n if($count > 0)\n {\n $prevHeader = $multiArray[0][$count][0];\n }\n }\n else\n {\n foreach($multiArray[0] as $array)\n {\n if ($array[1] > $index)\n {\n break;\n }\n\n $prevHeader = $array[0];\n }\n }\n\n return $prevHeader;\n }\n }\n\n return null;\n }", "function http_parse_headers($headers) {\n\t\t$replace = ($this->http_linebreak == \"\\n\" ? \"\\r\\n\" : \"\\n\");\n\t\t$headers = str_replace($replace, $this->http_linebreak, trim($headers));\n\t\t$headers = explode($this->http_linebreak, $headers);\n\t\t$this->http_response_headers = array();\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d (\\d{3})/', $headers[0], $matches)) {\n\t\t $this->http_response_code = intval($matches[1]);\n\t\t array_shift($headers);\n\t\t}\n\t\tif($headers):\n\t\t\tforeach ($headers as $string) {\n\t\t\t list($header, $value) = explode(': ', $string, 2);\n\t\t\t $this->http_response_headers[$header] = trim($value);\n\t\t\t}\n\t\tendif;\n\t}", "function getResponseCodeMessage($code) {\n $code = is_string($code) ? intval($code) : $code;\n switch ($code) {\n case 100: $text = 'Continue';\n break;\n case 101: $text = 'Switching Protocols';\n break;\n case 200: $text = 'OK';\n break;\n case 201: $text = 'Created';\n break;\n case 202: $text = 'Accepted';\n break;\n case 203: $text = 'Non-Authoritative Information';\n break;\n case 204: $text = 'No Content';\n break;\n case 205: $text = 'Reset Content';\n break;\n case 206: $text = 'Partial Content';\n break;\n case 300: $text = 'Multiple Choices';\n break;\n case 301: $text = 'Moved Permanently';\n break;\n case 302: $text = 'Moved Temporarily';\n break;\n case 303: $text = 'See Other';\n break;\n case 304: $text = 'Not Modified';\n break;\n case 305: $text = 'Use Proxy';\n break;\n case 400: $text = 'Bad Request';\n break;\n case 401: $text = 'Unauthorized';\n break;\n case 402: $text = 'Payment Required';\n break;\n case 403: $text = 'Forbidden';\n break;\n case 404: $text = 'Not Found';\n break;\n case 405: $text = 'Method Not Allowed';\n break;\n case 406: $text = 'Not Acceptable';\n break;\n case 407: $text = 'Proxy Authentication Required';\n break;\n case 408: $text = 'Request Time-out';\n break;\n case 409: $text = 'Conflict';\n break;\n case 410: $text = 'Gone';\n break;\n case 411: $text = 'Length Required';\n break;\n case 412: $text = 'Precondition Failed';\n break;\n case 413: $text = 'Request Entity Too Large';\n break;\n case 414: $text = 'Request-URI Too Large';\n break;\n case 415: $text = 'Unsupported Media Type';\n break;\n case 500: $text = 'Internal Server Error';\n break;\n case 501: $text = 'Not Implemented';\n break;\n case 502: $text = 'Bad Gateway';\n break;\n case 503: $text = 'Service Unavailable';\n break;\n case 504: $text = 'Gateway Time-out';\n break;\n case 505: $text = 'HTTP Version not supported';\n break;\n default:\n $text = \"Unknown http status code\";\n break;\n }\n return $text;\n}", "public function getResponseCode();", "public function getResponseCode();", "function http_response_header_lines($hdr_str) {\n\t$lines = explode(\"\\n\", $hdr_str);\n\t$hdr_arr['status_line'] = trim(array_shift($lines));\n\tforeach ($lines as $line) {\n\t\tlist($key, $val) = explode(':', $line, 2);\n\t\t$hdr_arr[trim($key)] = trim($val);\n\t}\n\treturn $hdr_arr;\n}", "function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n\t}", "function http_headers_get_response_code() {\n\t\treturn $this->http_response_code;\n\t}", "public static function getHttpStatusMessage(object $errorCode): string\n {\n $httpMessages = [\n // 1xx informational response\n 100 => 'HTTP_CONTINUE',\n 101 => 'HTTP_SWITCHING_PROTOCOLS',\n 102 => 'HTTP_PROCESSING',\n 103 => 'HTTP_EARLY_HINTS',\n // 2xx success\n 200 => 'HTTP_OK',\n 201 => 'HTTP_CREATED',\n 202 => 'HTTP_ACCEPTED',\n 203 => 'HTTP_NON_AUTHORITATIVE_INFORMATION',\n 204 => 'HTTP_NO_CONTENT',\n 205 => 'HTTP_RESET_CONTENT',\n 206 => 'HTTP_PARTIAL_CONTENT',\n 207 => 'HTTP_MULTI_STATUS',\n 208 => 'HTTP_ALREADY_REPORTED',\n 226 => 'HTTP_IM_USED',\n // 3xx redirection\n 300 => 'HTTP_MULTIPLE_CHOICES',\n 301 => 'HTTP_MOVED_PERMANENTLY',\n 302 => 'HTTP_FOUND',\n 303 => 'HTTP_SEE_OTHER',\n 304 => 'HTTP_NOT_MODIFIED',\n 305 => 'HTTP_USE_PROXY',\n 306 => 'HTTP_SWITCH_PROXY',\n 307 => 'HTTP_TEMPORARY_REDIRECT',\n 308 => 'HTTP_PERMANENT_REDIRECT',\n // 4xx client errors\n 400 => 'HTTP_BAD_REQUEST',\n 401 => 'HTTP_UNAUTHORIZED',\n 402 => 'HTTP_PAYMENT_REQUIRED',\n 403 => 'HTTP_FORBIDDEN',\n 404 => 'HTTP_NOT_FOUND',\n 405 => 'HTTP_METHOD_NOT_ALLOWED',\n 406 => 'HTTP_NOT_ACCEPTABLE',\n 407 => 'HTTP_PROXY_AUTHENTICATION_REQUIRED',\n 408 => 'HTTP_REQUEST_TIMEOUT',\n 409 => 'HTTP_CONFLICT',\n 410 => 'HTTP_GONE',\n 411 => 'HTTP_LENGTH_REQUIRED',\n 412 => 'HTTP_PRECONDITION_FAILED',\n 413 => 'HTTP_PAYLOAD_TOO_LARGE',\n 414 => 'HTTP_URI_TOO_LONG',\n 415 => 'HTTP_UNSUPPORTED_MEDIA_TYPE',\n 416 => 'HTTP_RANGE_NOT_SATISFIABLE',\n 417 => 'HTTP_EXPECTATION_FAILED',\n 418 => 'HTTP_IM_A_TEAPOT',\n 421 => 'HTTP_MISIDRECTED_REQUEST',\n 422 => 'HTTP_UNPROCESSABLE_ENTITY',\n 423 => 'HTTP_LOCKED',\n 424 => 'HTTP_FAILED_DEPENDENCY',\n 425 => 'HTTP_TOO_EARLY',\n 426 => 'HTTP_UPGRADE_REQUIRED',\n 428 => 'HTTP_PRECONDITION_REQUIRED',\n 429 => 'HTTP_TOO_MANY_REQUESTS',\n 431 => 'HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE',\n 451 => 'HTTP_UNAVIALBLE_FOR_LEGAL_REASONS',\n // 5xx server errors\n 500 => 'HTTP_INTERNAL_SERVER_ERROR',\n 501 => 'HTTP_NOT_IMPLEMENTED',\n 502 => 'HTTP_BAD_GATEWAY',\n 503 => 'HTTP_SERVICE_UNAVAILABLE',\n 504 => 'HTTP_GATEWAY_TIMEOUT',\n 505 => 'HTTP_VERSION_NOT_SUPPORTED',\n 506 => 'HTTP_VARIANT_ALSO_NEGOTIATES',\n 507 => 'HTTP_INSUFFICIENT_STORAGE',\n 508 => 'HTTP_LOOP_DETECTED',\n 510 => 'HTTP_NOT_EXTENDED',\n 511 => 'HTTP_NETWORK_AUTHENTICATION_REQUIRED',\n // 9xx fallback\n 999 => 'HTTP_UNKNOWN_STATUS',\n ];\n\n if (array_key_exists($errorCode->getStatusCode(), $httpMessages)) {\n return $httpMessages[$errorCode->getStatusCode()];\n }\n\n return '';\n }", "private function parse_curl_response()\n {\n $this->status_code = curl_getinfo($this->curl_handle, CURLINFO_HTTP_CODE);\n #$this->http_info = array_merge($this->http_info, curl_getinfo($this->curl_handle));\n\n $header_size = curl_getinfo($this->curl_handle, CURLINFO_HEADER_SIZE);\n\n // Capture the HTTP response headers\n $this->http_response_headers = substr($this->curl_response, 0, $header_size);\n\n // Capture the HTTP response body\n $this->http_body = substr($this->curl_response, $header_size);\n\n if(!$this->do_not_exit)\n {\n $this->_check_valid_response($this->http_body);\n }\n //close connection\n curl_close($this->curl_handle);\n }", "function getHttpResponseCode_using_getheaders($url, $followredirects = true){\n // NOTE: could potentially take up to 0-30 seconds , blocking further code execution (more or less depending on connection, target site, and local timeout settings))\n // if $followredirects == false: return the FIRST known httpcode (ignore redirects)\n // if $followredirects == true : return the LAST known httpcode (when redirected)\n if(! $url || ! is_string($url)){\n return false;\n }\n $headers = @get_headers($url);\n if($headers && is_array($headers)){\n if($followredirects){\n // we want the the last errorcode, reverse array so we start at the end:\n $headers = array_reverse($headers);\n }\n foreach($headers as $hline){\n // search for things like \"HTTP/1.1 200 OK\" , \"HTTP/1.0 200 OK\" , \"HTTP/1.1 301 PERMANENTLY MOVED\" , \"HTTP/1.1 400 Not Found\" , etc.\n // note that the exact syntax/version/output differs, so there is some string magic involved here\n if(preg_match('/^HTTP\\/\\S+\\s+([1-9][0-9][0-9])\\s+.*/', $hline, $matches) ){// \"HTTP/*** ### ***\"\n $code = $matches[1];\n return $code;\n }\n }\n // no HTTP/xxx found in headers:\n return false;\n }\n // no headers :\n return false;\n }", "function getStatusCode($response){\n\tif(preg_match(\"~HTTP/1\\.1 (\\d+)~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getStatusCode: invalid response from server\", true);\n\treturn false;\n}", "function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n}", "protected function _getCode()\n {\n // filter code from response\n return (int)substr($this->_getServerResponse(), 0, 3);\n }", "#[Pure]\n public function getRawResponseMessage() {}", "static function Response($code) {\n\t\treturn 'HTTP/' . Http::VERSION . ' ' . Http::$codes[$code];\n\t}", "function wspra_get_status_message($code=200){\n $status = array(\n 100 => 'Continue', \n 101 => 'Switching Protocols', \n 200 => 'OK',\n 201 => 'Created', \n 202 => 'Accepted', \n 203 => 'Non-Authoritative Information', \n 204 => 'No Content', \n 205 => 'Reset Content', \n 206 => 'Partial Content', \n 300 => 'Multiple Choices', \n 301 => 'Moved Permanently', \n 302 => 'Found', \n 303 => 'See Other', \n 304 => 'Not Modified', \n 305 => 'Use Proxy', \n 306 => '(Unused)', \n 307 => 'Temporary Redirect', \n 400 => 'Bad Request', \n 401 => 'Unauthorized', \n 402 => 'Payment Required', \n 403 => 'Forbidden', \n 404 => 'Not Found', \n 405 => 'Method Not Allowed', \n 406 => 'Not Acceptable', \n 407 => 'Proxy Authentication Required', \n 408 => 'Request Timeout', \n 409 => 'Conflict', \n 410 => 'Gone', \n 411 => 'Length Required', \n 412 => 'Precondition Failed', \n 413 => 'Request Entity Too Large', \n 414 => 'Request-URI Too Long', \n 415 => 'Unsupported Media Type', \n 416 => 'Requested Range Not Satisfiable', \n 417 => 'Expectation Failed', \n 500 => 'Internal Server Error', \n 501 => 'Not Implemented', \n 502 => 'Bad Gateway', \n 503 => 'Service Unavailable', \n 504 => 'Gateway Timeout', \n 505 => 'HTTP Version Not Supported',\n 1001 => 'Parameters required!',\n 1002 => 'No Results Found'\n );\n return $status[$code];\n}", "public function getContent()\r\n\t{\r\n\t\t$return = $this->response !== false ? preg_replace('#.+(\\r\\n){2}(.+)$#s', '$2', $this->response) : false;\r\n\t\treturn $return;\r\n\t}", "public function testRetrieveChunkedHttpResponse()\n {\n $client = new HttpClient();\n $response = $client->send(\n HttpRequestMethod::GET,\n 'https://postman-echo.com/stream/5'\n );\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('OK', $response->getReasonPhrase());\n $this->assertNotEmpty($response->getBody());\n $this->assertNotEmpty($response->getHeaders());\n }", "public function _getStatusCodeMessage($status) {\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Oops! Something has gone wrong and the page you were looking for could not be found! Try the <a href=\"\" class=\"color-blue\">home page.</a>',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => \"We're sorry because something went wrong, please try again!\",\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n );\n return (isset($codes[$status])) ? $codes[$status] : 'Unknown Result';\n }", "private function getStatusMessage(){\n\t\t$status = array(\n\t\t\t\t100 => 'Continue', \n\t\t\t\t101 => 'Switching Protocols', \n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created', \n\t\t\t\t202 => 'Accepted', \n\t\t\t\t203 => 'Non-Authoritative Information', \n\t\t\t\t204 => 'No Content', \n\t\t\t\t205 => 'Reset Content', \n\t\t\t\t206 => 'Partial Content', \n\t\t\t\t300 => 'Multiple Choices', \n\t\t\t\t301 => 'Moved Permanently', \n\t\t\t\t302 => 'Found', \n\t\t\t\t303 => 'See Other', \n\t\t\t\t304 => 'Not Modified', \n\t\t\t\t305 => 'Use Proxy', \n\t\t\t\t306 => '(Unused)', \n\t\t\t\t307 => 'Temporary Redirect', \n\t\t\t\t400 => 'Bad Request', \n\t\t\t\t401 => 'Unauthorized', \n\t\t\t\t402 => 'Payment Required', \n\t\t\t\t403 => 'Forbidden', \n\t\t\t\t404 => 'Not Found', \n\t\t\t\t405 => 'Method Not Allowed', \n\t\t\t\t406 => 'Not Acceptable', \n\t\t\t\t407 => 'Proxy Authentication Required', \n\t\t\t\t408 => 'Request Timeout', \n\t\t\t\t409 => 'Conflict', \n\t\t\t\t410 => 'Gone', \n\t\t\t\t411 => 'Length Required', \n\t\t\t\t412 => 'Precondition Failed', \n\t\t\t\t413 => 'Request Entity Too Large', \n\t\t\t\t414 => 'Request-URI Too Long', \n\t\t\t\t415 => 'Unsupported Media Type', \n\t\t\t\t416 => 'Requested Range Not Satisfiable', \n\t\t\t\t417 => 'Expectation Failed', \n\t\t\t\t500 => 'Internal Server Error', \n\t\t\t\t501 => 'Not Implemented', \n\t\t\t\t502 => 'Bad Gateway', \n\t\t\t\t503 => 'Service Unavailable', \n\t\t\t\t504 => 'Gateway Timeout', \n\t\t\t\t505 => 'HTTP Version Not Supported');\n\t\treturn ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n\t}", "function httpStatusMessage ( $status )\n {\n # rfc2616-sec10\n $messages = array(\n // [Informational 1xx]\n 100=>'100 Continue',\n 101=>'101 Switching Protocols',\n // [Successful 2xx]\n 200=>'200 OK',\n 201=>'201 Created',\n 202=>'202 Accepted',\n 203=>'203 Non-Authoritative Information',\n 204=>'204 No Content',\n 205=>'205 Reset Content',\n 206=>'206 Partial Content',\n // [Redirection 3xx]\n 300=>'300 Multiple Choices',\n 301=>'301 Moved Permanently',\n 302=>'302 Found',\n 303=>'303 See Other',\n 304=>'304 Not Modified',\n 305=>'305 Use Proxy',\n 306=>'306 (Unused)',\n 307=>'307 Temporary Redirect',\n // [Client Error 4xx]\n 400=>'400 Bad Request',\n 401=>'401 Unauthorized',\n 402=>'402 Payment Required',\n 403=>'403 Forbidden',\n 404=>'404 Not Found',\n 405=>'405 Method Not Allowed',\n 406=>'406 Not Acceptable',\n 407=>'407 Proxy Authentication Required',\n 408=>'408 Request Timeout',\n 409=>'409 Conflict',\n 410=>'410 Gone',\n 411=>'411 Length Required',\n 412=>'412 Precondition Failed',\n 413=>'413 Request Entity Too Large',\n 414=>'414 Request-URI Too Long',\n 415=>'415 Unsupported Media Type',\n 416=>'416 Requested Range Not Satisfiable',\n 417=>'417 Expectation Failed',\n // [Server Error 5xx]\n 500=>'500 Internal Server Error',\n 501=>'501 Not Implemented',\n 502=>'502 Bad Gateway',\n 503=>'503 Service Unavailable',\n 504=>'504 Gateway Timeout',\n 505=>'505 HTTP Version Not Supported'\n );\n return isset($messages[$status])? $messages[$status] : null;\n }", "public function getHttpCode()\n {\n return $this->information[ self::INFORMATION_HTTP_CODE ];\n }", "public function getResponseHTTPCode()\n {\n return $this->httpCode;\n }", "private function responseCode($line) {\n // Expecting \"HTTP/1.1 200 OK\", \"HTTP/1.1 404 NOT FOUND\", etc.\n $this->code = (int) substr($line, 9, 3);\n // Consider 200 to be success and all else to be failure\n // but there are other return codes that may be acceptable\n if ($this->code !== 200) {\n $this->currentState = self::FAIL_STATE;\n throw new \\Exception(\"Received code {$this->code} from the server. ($line)\");\n }\n else {\n $this->currentState = self::RECEIVE_HEADER;\n }\n }", "function _parse_message($message)\n{\n if (!$message) {\n throw new \\InvalidArgumentException('Invalid message');\n }\n\n $message = ltrim($message, \"\\r\\n\");\n\n $messageParts = preg_split(\"/\\r?\\n\\r?\\n/\", $message, 2);\n\n if ($messageParts === false || count($messageParts) !== 2) {\n throw new \\InvalidArgumentException('Invalid message: Missing header delimiter');\n }\n\n list($rawHeaders, $body) = $messageParts;\n $rawHeaders .= \"\\r\\n\"; // Put back the delimiter we split previously\n $headerParts = preg_split(\"/\\r?\\n/\", $rawHeaders, 2);\n\n if ($headerParts === false || count($headerParts) !== 2) {\n throw new \\InvalidArgumentException('Invalid message: Missing status line');\n }\n\n list($startLine, $rawHeaders) = $headerParts;\n\n if (preg_match(\"/(?:^HTTP\\/|^[A-Z]+ \\S+ HTTP\\/)(\\d+(?:\\.\\d+)?)/i\",\n $startLine, $matches) && $matches[1] === '1.0') {\n // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0\n $rawHeaders = preg_replace(HEADER_FOLD_REGEX, ' ',\n $rawHeaders);\n }\n\n /** @var array[] $headerLines */\n $count = preg_match_all(HEADER_REGEX, $rawHeaders, $headerLines,\n PREG_SET_ORDER);\n\n // If these aren't the same, then one line didn't match and there's an invalid header.\n if ($count !== substr_count($rawHeaders, \"\\n\")) {\n // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4\n if (preg_match(HEADER_FOLD_REGEX, $rawHeaders)) {\n throw new \\InvalidArgumentException('Invalid header syntax: Obsolete line folding');\n }\n\n throw new \\InvalidArgumentException('Invalid header syntax');\n }\n\n $headers = [];\n\n foreach ($headerLines as $headerLine) {\n $headers[$headerLine[1]][] = $headerLine[2];\n }\n\n return [\n 'start-line' => $startLine,\n 'headers' => $headers,\n 'body' => $body,\n ];\n}", "public function testImportRawHttpResponseWithADifferentStatusCode()\n {\n $this->testImportingRawHttpResponseString(array('status' => 201));\n }", "private function getHttpCode() {\n return $this->httpCode;\n }", "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "public function getCode()\n {\n return $this->response_code;\n }", "public function code() {\n return $this->info['http_code'];\n }", "protected function responseMessage()\n {\n return isset($this->codes[$this->code]) ? $this->codes[$this->code] : '';\n }", "public function httpCode($code=null){\n\t\t// FIXME: this doesn't take care to differentiate which codes are\n\t\t// in HTTP/1.0 vs HTTP/1.1; should it?\n\t\t$phrases = array(\n\t\t\t100 => \"Continue\",\n\t\t\t101 => \"Switching Protocols\",\n\n\t\t\t200 => \"OK\",\n\t\t\t201 => \"Created\",\n\t\t\t202 => \"Accepted\",\n\t\t\t203 => \"Non-Authoritative Information\",\n\t\t\t204 => \"No Content\",\n\t\t\t205 => \"Reset Content\",\n\t\t\t206 => \"Partial Content\",\n\n\t\t\t300 => \"Multiple Choices\", // useful for disambiguation?\n\t\t\t301 => \"Moved Permanently\",\n\t\t\t302 => \"Found\",\n\t\t\t303 => \"See Other\",\n\t\t\t304 => \"Not Modified\",\n\t\t\t305 => \"Use Proxy\",\n\t\t\t307 => \"Temporary Redirect\",\n\n\t\t\t400 => \"Bad Request\",\n\t\t\t401 => \"Unauthorized\", // use when auth'ing will make a request valid\n\t\t\t403 => \"Forbidden\", // use when auth'ing won't make a difference\n\t\t\t404 => \"Not Found\",\n\t\t\t405 => \"Method Not Allowed\", // HTTP method, e.g. using GET when only POST is valid\n\t\t\t406 => \"Not Acceptable\",\n\t\t\t407 => \"Proxy Authentication Required\",\n\t\t\t408 => \"Request Timeout\",\n\t\t\t409 => \"Conflict\",\n\t\t\t410 => \"Gone\", // something existed but was intentionally removed\n\t\t\t411 => \"Length Required\",\n\t\t\t412 => \"Precondition Failed\",\n\t\t\t413 => \"Request Entity Too Large\",\n\t\t\t414 => \"Request-URI Too Long\",\n\t\t\t415 => \"Unsupported Media Type\",\n\t\t\t416 => \"Requested Range Not Satisfiable\",\n\t\t\t417 => \"Expectation Failed\",\n\n\t\t\t500 => \"Internal Server Error\",\n\t\t\t501 => \"Not Implemented\",\n\t\t\t502 => \"Bad Gateway\",\n\t\t\t503 => \"Service Unavailable\",\n\t\t\t504 => \"Gateway Timeout\",\n\t\t);\n\n\t\tif(!is_null($code)){\n\t\t\tif(!array_key_exists($code, $phrases)){\n\t\t\t\t$code = 404;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 $code {$phrases[$code]}\");\n\t\t\t$this->httpResponseCode = $code;\n\t\t}\n\n\t\treturn \"HTTP/1.1 $this->httpResponseCode {$phrases[$this->httpResponseCode]}\";\n\t}", "function http_status_code($code, $message = \"\") {\n\n if (!empty($code)) {\n\n switch ($code) {\n case 100: $text = 'Continue'; break;\n case 101: $text = 'Switching Protocols'; break;\n case 200: $text = 'OK'; break;\n case 201: $text = 'Created'; break;\n case 202: $text = 'Accepted'; break;\n case 203: $text = 'Non-Authoritative Information'; break;\n case 204: $text = 'No Content'; break;\n case 205: $text = 'Reset Content'; break;\n case 206: $text = 'Partial Content'; break;\n case 300: $text = 'Multiple Choices'; break;\n case 301: $text = 'Moved Permanently'; break;\n case 302: $text = 'Moved Temporarily'; break;\n case 303: $text = 'See Other'; break;\n case 304: $text = 'Not Modified'; break;\n case 305: $text = 'Use Proxy'; break;\n case 400: $text = 'Bad Request'; break;\n case 401: $text = 'Unauthorized'; break;\n case 402: $text = 'Payment Required'; break;\n case 403: $text = 'Forbidden'; break;\n case 404: $text = 'Not Found'; break;\n case 405: $text = 'Method Not Allowed'; break;\n case 406: $text = 'Not Acceptable'; break;\n case 407: $text = 'Proxy Authentication Required'; break;\n case 408: $text = 'Request Time-out'; break;\n case 409: $text = 'Conflict'; break;\n case 410: $text = 'Gone'; break;\n case 411: $text = 'Length Required'; break;\n case 412: $text = 'Precondition Failed'; break;\n case 413: $text = 'Request Entity Too Large'; break;\n case 414: $text = 'Request-URI Too Large'; break;\n case 415: $text = 'Unsupported Media Type'; break;\n case 500: $text = 'Internal Server Error'; break;\n case 501: $text = 'Not Implemented'; break;\n case 502: $text = 'Bad Gateway'; break;\n case 503: $text = 'Service Unavailable'; break;\n case 504: $text = 'Gateway Time-out'; break;\n case 505: $text = 'HTTP Version not supported'; break;\n default:\n exit('Unknown http status code \"' . htmlentities($code) . '\"');\n break;\n }\n\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n \n // Append the content if not empty\n if (!empty($message)) $message = \" - \" . $message;\n\n header($protocol . ' ' . $code . ' ' . $text . \"$message\");\n\n $GLOBALS['http_status_code'] = $code;\n\n } else {\n\n $code = (isset($GLOBALS['http_status_code']) ? $GLOBALS['http_status_code'] : 200);\n\n }\n\n // We must kill the requisition\n die($code);\n }", "public function getFirstResponseStatus(): string\n {\n $responseStatus = $this->getAllHeaders()[0] ?? '';\n\n //200 OK, protocol signature varies, HTTP 1.1/1.0, etc.\n if (preg_match('/200 OK/i', $responseStatus) === 1) {\n return self::STATUS_OK;\n }\n\n if (preg_match('/404 Not Found/i', $responseStatus) === 1) {\n return self::STATUS_NOT_FOUND;\n }\n\n return self::STATUS_OTHER;\n }", "function getStatusCode();", "private function read_reply() {\n\t\t\t$reply = fgets($this->connection);\n\t\t\t$status = substr($reply, 0, 1);\n\t\t\t$reply = trim(substr($reply, 1));\n\t\t\tswitch ($status) {\n\t\t\t\tcase '-': // error\n\t\t\t\t\tthrow new Exception($reply);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+': // single line\n\t\t\t\t\tif ($reply == 'OK') return true;\n\t\t\t\t\treturn $reply;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ':': // integer\n\t\t\t\t\treturn (integer)$reply;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '$': // bulk\n\t\t\t\t\treturn $this->bulk_reply($reply);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\t$resp = array();\n\t\t\t\t\tfor ($i=0; $i < $reply; $i++) { \n\t\t\t\t\t\t$resp[$i] = $this->read_reply();\n\t\t\t\t\t}\n\t\t\t\t\treturn $resp;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Exception('Unexpected response');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "private static function _getStatusCodeMessage($status)\n {\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n }", "function processResponse($strResponse) {\n\t\tlist($theHeaders, $theBody) = explode(\"\\r\\n\\r\\n\", $strResponse, 2);\n\t\treturn array('headers' => $theHeaders, 'body' => $theBody);\n\t}", "public static function getStatusCode(): int;", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "protected function analyzeResponse() {\n\t\tvar_dump($this->curlResponse);\n\t\t$parts = explode(\"\\r\\n\\r\\n\", $this->curlResponse);\n\n\t\t$response_body = array_pop($parts);\n\t\t$response_headers = implode('', $parts);\n\t\t$http_status_code = $this->curl->getinfo(CURLINFO_HTTP_CODE); \n\n\t\treturn array(trim($response_headers), trim($response_body), $http_status_code);\n\t}", "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 getStatus()\n {\n return (int)substr($this->response, 9, 3);\n }", "public function getHttpCode()\n {\n return $this->code;\n }", "public function getResponseCode()\n {\n return $this->response_code;\n }", "public function getResponseCode() {\n return $this->response_code;\n }", "function get_status_header_desc($code) {\n\t$codes_to_desc = array(\n\t\t\t100 => 'Continue',\n\t\t\t101 => 'Switching Protocols',\n\t\t\t102 => 'Processing',\n\n\t\t\t200 => 'OK',\n\t\t\t201 => 'Created',\n\t\t\t202 => 'Accepted',\n\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content',\n\t\t\t205 => 'Reset Content',\n\t\t\t206 => 'Partial Content',\n\t\t\t207 => 'Multi-Status',\n\t\t\t226 => 'IM Used',\n\n\t\t\t300 => 'Multiple Choices',\n\t\t\t301 => 'Moved Permanently',\n\t\t\t302 => 'Found',\n\t\t\t303 => 'See Other',\n\t\t\t304 => 'Not Modified',\n\t\t\t305 => 'Use Proxy',\n\t\t\t306 => 'Reserved',\n\t\t\t307 => 'Temporary Redirect',\n\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t405 => 'Method Not Allowed',\n\t\t\t406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t408 => 'Request Timeout',\n\t\t\t409 => 'Conflict',\n\t\t\t410 => 'Gone',\n\t\t\t411 => 'Length Required',\n\t\t\t412 => 'Precondition Failed',\n\t\t\t413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long',\n\t\t\t415 => 'Unsupported Media Type',\n\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\t\t\t422 => 'Unprocessable Entity',\n\t\t\t423 => 'Locked',\n\t\t\t424 => 'Failed Dependency',\n\t\t\t426 => 'Upgrade Required',\n\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t\t502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable',\n\t\t\t504 => 'Gateway Timeout',\n\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t506 => 'Variant Also Negotiates',\n\t\t\t507 => 'Insufficient Storage',\n\t\t\t510 => 'Not Extended'\n\t);\n\t\n\tif(check_value($codes_to_desc[$code])) {\n\t\treturn $codes_to_desc[$code];\t\n\t}\n\t\n}", "private function get_http_response_code($url)\n {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n }", "public function getStatusCodeMsg(): string\r\n {\r\n return $this->_statusCodeMsg;\r\n }", "public function getResponseCode()\r\n {\r\n return $this->responseCode;\r\n }", "private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }", "public static function httpStatus($_code) {\n\t\tif (!defined('self::HTTP_'.$_code)) {\n\t\t\t// Invalid status code\n\t\t\tself::$global['CONTEXT']=$_code;\n\t\t\ttrigger_error(self::TEXT_HTTP);\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Get description\n\t\t$_response=constant('self::HTTP_'.$_code);\n\t\t// Send raw HTTP header\n\t\tif (PHP_SAPI!='cli' && !self::$global['QUIET'] && !headers_sent())\n\t\t\theader('HTTP/1.1 '.$_code.' '.$_response);\n\t\treturn $_response;\n\t}", "private function _getStatusCodeMessage($status)\n{\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 200 => 'OK',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 500 => 'Internal Server Error',\n\n 501 => 'Not Implemented',\n );\n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public static function getStatusCodeMessage($status)\n {\n// via parse_ini_file()... however, this will suffice\n// for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\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 }", "private function parseResult(string $result): HttpClientResponseInterface\n {\n $resultParts = explode(\"\\r\\n\\r\\n\", $result, 2);\n\n $headers = explode(\"\\r\\n\", $resultParts[0]);\n $statusLine = array_shift($headers);\n $statusLineParts = explode(' ', $statusLine);\n $httpCode = intval($statusLineParts[1]);\n if (in_array($httpCode, [100, 103])) {\n return $this->parseResult($resultParts[1]);\n }\n\n $content = '';\n if (count($resultParts) > 1) {\n $content = $resultParts[1];\n }\n\n $response = new HttpClientResponse($httpCode, $content);\n foreach ($headers as $header) {\n $response->addHeader(trim($header));\n }\n\n return $response;\n }", "public function getResponseMessage()\n {\n if($this->last_response && strpos($this->last_response->getHeaders()[\"Content-Type\"][0], 'application/json') !== false)\n return json_decode($this->last_response->getBody())->message;\n\n return false;\n }", "public function getStatusCode(){\n return $this->httpResponseCode;\n }", "function getStatusMessage() \r\n\t{\r\n\t\treturn $this->replyString;\r\n\t}", "private function _status_parse( $header, $code ) {\n\t\tif ( $code == 201 ) {\n\t\t\treturn 'H';\n\t\t}\n\n\t\tif ( stripos( $header, 'X-Litespeed-Cache-Control: no-cache' ) !== false ) {\n\t\t\treturn 'N'; // Blacklist\n\t\t}\n\n\t\t$_cache_headers = array(\n\t\t\t'x-litespeed-cache',\n\t\t\t'x-lsadc-cache',\n\t\t\t'x-qc-cache',\n\t\t);\n\n\t\tforeach ( $_cache_headers as $_header ) {\n\t\t\tif ( stripos( $header, $_header ) !== false ) {\n\t\t\t\tif ( stripos( $header, $_header . ': miss' ) !== false ) {\n\t\t\t\t\treturn 'M'; // Miss\n\t\t\t\t}\n\t\t\t\treturn 'H'; // Hit\n\t\t\t}\n\t\t}\n\n\t\treturn 'B'; // Blacklist\n\t}", "function fetchURL ($url, $param) {\n $return = array();\n\n $ch = curl_init();\n\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch,CURLOPT_TIMEOUT, 0);\n curl_setopt($ch,CURLOPT_FORBID_REUSE, 1);\n curl_setopt($ch,CURLOPT_FRESH_CONNECT, 1);\n curl_setopt($ch,CURLOPT_HEADER, 1);\n curl_setopt($ch,CURLOPT_URL,$url);\n if ($this->disableSslVerify) {\n $this->log('Caution: Request being sent without SSL verification.', 'Warning');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n }\n if (!empty($param)){\n if (!empty($param['Header'])){\n curl_setopt($ch,CURLOPT_HTTPHEADER, $param['Header']);\n }\n if (!empty($param['Post'])){\n curl_setopt($ch,CURLOPT_POSTFIELDS, $param['Post']);\n }\n }\n \n $data = curl_exec($ch);\n if ( curl_errno($ch) ) {\n $return['ok'] = -1;\n $return['error'] = curl_error($ch);\n return $return;\n }\n \n if (is_numeric(strpos($data, 'HTTP/1.1 100 Continue'))) {\n $data=str_replace('HTTP/1.1 100 Continue', '', $data);\n }\n $data = preg_split(\"/\\r\\n\\r\\n/\",$data, 2, PREG_SPLIT_NO_EMPTY);\n if (!empty($data)) {\n $return['head'] = ( isset($data[0]) ? $data[0] : null );\n $return['body'] = ( isset($data[1]) ? $data[1] : null );\n } else {\n $return['head'] = null;\n $return['body'] = null;\n }\n \n $matches = array();\n $data = preg_match(\"/HTTP\\/[0-9.]+ ([0-9]+) (.+)\\r\\n/\",$return['head'], $matches);\n if (!empty($matches)) {\n $return['code'] = $matches[1];\n $return['answer'] = $matches[2];\n }\n \n $data = preg_match(\"/meta http-equiv=.refresh. +content=.[0-9]*;url=([^'\\\"]*)/i\",$return['body'], $matches);\n if (!empty($matches)) {\n $return['location'] = $matches[1];\n $return['code'] = '301';\n }\n\n if ( $return['code'] == '200' || $return['code'] == '302' ) {\n $return['ok'] = 1;\n } else {\n $return['error'] = (($return['answer'] and $return['answer'] != 'OK') ? $return['answer'] : 'Something wrong!');\n $return['ok'] = 0;\n }\n\n foreach (preg_split('/\\n/', $return['head'], -1, PREG_SPLIT_NO_EMPTY) as $value) {\n $data = preg_split('/:/', $value, 2, PREG_SPLIT_NO_EMPTY);\n if (is_array($data) and isset($data['1'])) {\n $return['headarray'][$data['0']] = trim($data['1']);\n }\n }\n\n curl_close($ch);\n\n return $return;\n }", "public function getBuffer()\n {\n return rtrim(preg_replace(array('/'.$this->_failure_boundary.'/', '/'.$this->_completion_boundary.'/', '/'.$this->_error_code_boundary.(self::$_is_windows === false ? '([0-9]+)' : '').'/'), '', $this->getRawBuffer()));\n }", "private function _getStatusCodeMessage($status){\n\t\t// via parse_ini_file()... however, this will suffice\n\t\t// for an example\n\t\t$codes = Array(\n\t\t\t200 => 'OK',\n\t\t\t400 => 'Bad Request',\n\t\t\t401 => 'Unauthorized',\n\t\t\t402 => 'Payment Required',\n\t\t\t403 => 'Forbidden',\n\t\t\t404 => 'Not Found',\n\t\t\t500 => 'Internal Server Error',\n\t\t\t501 => 'Not Implemented',\n\t\t);\n\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t}", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getStatusCode(): int;", "public function getResponseCode()\n {\n }", "protected static function ExtractCorrectHttpLine($rawHttpResponse, &$index = 0)\n {\n if(preg_match_all (\"|HTTP/[\\d\\.x]+ \\d+ [^\\r\\n]+|\", $rawHttpResponse,\n $multiArray, PREG_OFFSET_CAPTURE))\n {\n if (isset($multiArray[0]))\n {\n if (!(isset($multiArray[0][0]) &&\n isset($multiArray[0][0][0])))\n {\n return null;\n }\n\n $correctHeaderIndex = count($multiArray[0]) - 1;\n $index = $multiArray[0][$correctHeaderIndex][1];\n return $multiArray[0][$correctHeaderIndex][0];\n }\n }\n\n return null;\n }", "public function getHttpCode()\r\n {\r\n return $this->http_code;\r\n }" ]
[ "0.61140066", "0.60528487", "0.604479", "0.60415494", "0.60112804", "0.59928155", "0.5948045", "0.59302336", "0.59050107", "0.58951384", "0.58209425", "0.58068085", "0.575463", "0.57237875", "0.57131153", "0.5710398", "0.570705", "0.5674795", "0.5674207", "0.56716305", "0.5651491", "0.5649278", "0.5639042", "0.56080806", "0.56080806", "0.5600276", "0.55568653", "0.55255145", "0.5524014", "0.5519719", "0.54874873", "0.54828215", "0.54800534", "0.5479354", "0.54683834", "0.5459759", "0.54503876", "0.5425435", "0.5422097", "0.54155195", "0.5415045", "0.54114497", "0.5409866", "0.54018164", "0.53745097", "0.5344026", "0.5341876", "0.53378385", "0.5291651", "0.5289502", "0.52770925", "0.52668285", "0.52545774", "0.5249985", "0.5245567", "0.5233757", "0.5232896", "0.5224666", "0.5220867", "0.521809", "0.521623", "0.52138036", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.52118355", "0.5205957", "0.5202945", "0.52000475", "0.51988745", "0.51973075", "0.51906705", "0.5190558", "0.51899636", "0.51877034", "0.51871514", "0.5181756", "0.5179722", "0.5174642", "0.51714724", "0.5166509", "0.51599985", "0.5158926", "0.5155116", "0.5151928", "0.51480585", "0.5143747", "0.5140266", "0.5140266", "0.5140266", "0.5140266", "0.5136702", "0.51363057", "0.5132334" ]
0.6855275
0
This function return true if batch header contains any error else false Note that this is the error returned by webserver[IIS], not by OData service. If any data service error happened then there will be only one changeset and HTTP header of that changeset contains actual error and HTTP status message of batch response will be 'Accepted'
public function IsError() { if($this->_correctHttpLine != null) { preg_match("|^HTTP/[\d\.x]+ (\d+)|", $this->_correctHttpLine, $m); if (isset($m[1])) { $floorVal = floor((int)$m[1] / 100); return ($floorVal == 4 || $floorVal == 5); } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasError()\n {\n return $this->info['http_code'] != '200';\n }", "public function clientError()\n {\n return $this->status() >= 400 && $this->status() < 500;\n }", "public function hasError() {\n return ($this->getStatus() != 1);\n }", "public function clientErrorOccurred(): bool\n {\n return $this->getStatusCode() >= 400 && $this->getStatusCode() < 500;\n }", "protected static function CheckIsError($rawHttpBatchResponse)\n {\n $httpLine = self::ExtractCorrectHttpLine($rawHttpBatchResponse);\n if($httpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ (\\d+)|\", $httpLine, $m);\n if (isset($m[1]))\n {\n $floorVal = floor((int)$m[1] / 100);\n return ($floorVal == 4 || $floorVal == 5);\n }\n }\n\n return false;\n }", "public function isClientError(): bool\n {\n return $this->code >= 400 && $this->code < 500;\n }", "public function isClientError() {\n return (4 === $this->getStatusClass());\n }", "public function isSuccessful()\n {\n return 400 > $this->statusCode;\n }", "public function isError()\n {\n return $this->getStatus() !== $this->config()->get('status_ok');\n }", "public function hasErrors()\n {\n if (isset($this->_response->ERROR)) {\n return true;\n }\n return false;\n }", "public function isError(): bool\n {\n return $this->isClientError() || $this->isServerError();\n }", "public function isError()\n {\n return isset($this->decodedBody['error']) || isset($this->decodedBody['errors']);\n }", "public function canHaveBody() {\n return ( $this->status < 100 || $this->status >= 200 ) &&\n (!in_array($this->status, array(201, 204, 304)));\n }", "public function is_error() \n\t\t{\n\t\t\t\t$json = json_decode( $this->response );\n\t\t\t\tif( $json->faultstring )\n\t\t\t\t{\n\t\t\t\t\t\t$this->error = $json->faultstring;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\treturn false;\n\n\t\t}", "public function isClientError(): bool\n {\n return $this->code >= CODE_BAD_REQUEST &&\n $this->code < CODE_INTERNAL_SERVER_ERROR;\n }", "protected function isApplyProcessError()\n {\n return in_array($this->reader->getStatusCode(), self::APPLY_PROCESS_ERROR, true);\n }", "public function isError()\n {\n return ($this->error_count > 0);\n }", "public function isSuccessful(): bool\n {\n return \\in_array($this->getStatusCode(), [200, 201, 202, 204, 205]);\n }", "public function isServerError() {\n return (5 === $this->getStatusClass());\n }", "public function isError(): bool\n {\n return !$this->isOk();\n }", "protected function isFailedGroupTransaction()\n {\n return $this->hasPostData(\n 'brq_transaction_type',\n self::BUCK_PUSH_GROUPTRANSACTION_TYPE\n ) &&\n $this->hasPostData(\n 'brq_statuscode',\n $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_FAILED')\n );\n }", "public function isError(): bool\n {\n return $this->get('json', 'error') === true;\n }", "public function IsError() {\n\t return ($this->error_count > 0);\n\t}", "public function isError() {\r\n\t return ($this->intCountErrors) ? true : false;\r\n\t }", "public function isFailed()\r\n {\r\n return $this->status < 0;\r\n }", "public function isRequestSuccess(): bool\n {\n return count($this->errors) === 0;\n }", "public function has_http_error($response) {\n if(!$response || !isset($response['response']['code']) || !preg_match('/20*/', $response['response']['code']) || !isset($response['body'])) {\n return true;\n }\n return false;\n }", "public function serverError()\n {\n return $this->status() >= 500;\n }", "public function getStatus() {\r\n if ($this->status === \"error\") {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "public function hasError()\n {\n return $this->_detectFailureBoundaryInOutput(true);\n }", "public function isSuccessful() {\n\t\treturn isset($this->data['status']) && $this->data['status'] >= 200 && $this->data['status'] < 300;\n\t}", "private function detectHeadersValidity()\n\t{\n\n\t\tif (isset($this->colsOrder[\"CATEGORIES\"]) &&\n\t\t\tisset($this->colsOrder[\"SUMMARY\"]) &&\n\t\t\tisset($this->colsOrder[\"DTSTART\"]) &&\n\t\t\tisset($this->colsOrder[\"DTEND\"]) &&\n\t\t\tisset($this->colsOrder[\"TIMEZONE\"]))\n\t\t\treturn true;\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function check()\n {\n if ($this->getResponse()->status == 'error') {\n return true;\n }\n\n return false;\n }", "public function isClientError();", "public function serverErrorOccurred(): bool\n {\n return $this->getStatusCode() >= 500;\n }", "public function isServerError(): bool\n {\n return $this->code >= 500 && $this->code < 600;\n }", "public function isValid()\n {\n $valid = TRUE;\n\n if ($this->body && !$this->hasHeader('Content-Length')) {\n $valid = 400;\n }\n\n return $valid;\n }", "public function hasError()\n {\n return $this->errors === 0;\n }", "public function isSuccessful(): bool\n {\n return $this->getStatusCode() >= 200 && $this->getStatusCode() < 300;\n }", "public function isSuccessful()\n {\n if (isset($this->data['result'])\n && empty($this->data['result']['parameterErrors'])\n && $this->getCode() < 400) {\n if (!empty($this->data['result']['code'])) {\n $code = $this->data['result']['code'];\n $success = false;\n switch ($code) {\n case (preg_match('/^(000\\.200)/', $code) ? true : false):\n case (preg_match('/^(000\\.000\\.|000\\.100\\.1|000\\.[36])/', $code) ? true : false):\n case (preg_match('/^(000\\.400\\.0|000\\.400\\.100)/', $code) ? true : false):\n $success = true;\n break;\n default:\n $success = false;\n }\n\n return $success;\n }\n\n return false;\n }\n\n return false;\n }", "public function isSuccessful()\n {\n return in_array($this->getCode(), ['300', '301', '302', '400']);\n }", "public function hasErrors() {\n return (boolean) $this->_getErrorNumber();\n }", "public function isSuccessful(): bool\n {\n $statusCode = $this->getStatusCode();\n\n return ($statusCode >= 200 && $statusCode < 300) || $statusCode == 304;\n }", "public function successful()\n {\n return $this->status() >= 200 && $this->status() < 300;\n }", "public function hadError() :bool {\n\t\treturn (($this->errNum < -1) or $this->shouldThrow);\n\t}", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "protected function verifyHeaders()\r\n\t{\r\n\t\tif(!array_key_exists(SONIC_HEADER__TARGET_API, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__TARGET_API . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__DATE, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__DATE . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__SIGNATURE, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__SIGNATURE . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__RANDOM, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__RANDOM . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__SOURCE_GID, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__SOURCE_GID . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__PLATFORM_GID, $this->headers))\r\n\t\t\tthrow new MalformedRequestHeaderException(\"Malformed response: Header \" . SONIC_HEADER__PLATFORM_GID . \" missing\");\r\n\t\telse return true;\r\n\t}", "public function hasErrors();", "function isError(){\n\t\tif (sizeof($this->_errorList) > 0){\n\t\t\treturn true;\n\t\t\t}else{\n\t\t\treturn false;\n\t\t\t}\n\t}", "public function isServerError();", "protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}", "public function isOk()\n {\n if ($this->statusCode >= 200 && $this->statusCode < 400) {\n return true;\n }\n\n return false;\n }", "public function hasError()\n {\n if ( curl_errno($this->handler) ) {\n return true;\n }\n return false;\n }", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasErrors()\n {\n return count($this->get(self::ERRORS)) !== 0;\n }", "function sizeLimitExceeded()\n {\n return ($this->getErrorCode() == 4);\n }", "public function hasSuccessHTTPStatus() { return ($this->status == 200); }", "public function hasError()\n\t{\n\t\treturn $this->error || $this->error_code;\n\t}", "public function caused_error() : bool {\n return !empty($this->error);\n }", "public function errorOccurred(): bool\n {\n return $this->serverErrorOccurred() || $this->clientErrorOccurred();\n }", "public function hasError() { return $this->error; }", "function had_error() {\n return (bool) $this->error_msg;\n }", "function is_valid_header ($header, $headers_found) {\n $is_valid_header = true;\n if (in_array($header, $headers_found)) {\n $is_valid_header = false;\n error_log(\"ERROR: order found with existing header: ${header}\"); \n }\n return $is_valid_header;\n}", "public function canSendHeaders($throw = false)\r\n\t{\r\n\t\t$ok = headers_sent($file, $line);\r\n\t\tif ($ok && $throw) {\r\n\t\t\tthrow new Syx_Response_Exception('Cannot send headers; headers already sent in ' . $file . ', line ' . $line);\r\n\t\t}\r\n\t\treturn !$ok;\r\n\t}", "public function isError()\n {\n return count($this->errors) > 0;\n }", "public function isSuccessful()\n {\n return $this->response->getStatusCode() >= 200 && $this->response->getStatusCode() < 300;\n }", "public function isError(): bool\n {\n return $this->error === true;\n }", "function Error(){\n header('Content-Type: application/json');\n echo ('false');\n http_response_code(200);\n }", "public function hdr($c = '200', $h = null) {\n\t\t$message = array_key_exists($c, $this->codes) ? $this->codes[$c] : 'Internal error';\n\t\t\n\t\tif ($this->sentHeaders) return true;\n\t\telse $this->sentHeaders = 1;\n\t\t\n\t\t$v = defined('SERVICE_VERSION') ? SERVICE_VERSION : PRESTO_VERSION;\n\t\theader(\"HTTP/1.0 {$c} {$message}\");\n\t\theader(VERSION_HEADER . ': ' . $v);\n\t\theader('Cache-Control: no-cache');\n\n\t\tif (in_array($c, array('201', '204'), true))\n\t\t\treturn false; // no body allowed\n\n\t\theader('Content-type: ' . $this->content_type());\n\n\t\tif (!empty($this->call->modified))\n\t\t\theader('Last-Modified: '.$this->call->modified);\n\n\t\t// include custom headers\n\t\tif ($h) foreach($h as $k => $v) header(\"$k: $v\");\n\n\t\treturn true;\n\t}", "public function is_error()\n {\n }", "public function isSuccessful()\n {\n return ($this->statusCode >= 200) && ($this->statusCode < 300);\n }", "public function isServerError(): bool\n {\n return $this->code >= CODE_INTERNAL_SERVER_ERROR;\n }", "public function hasError(): bool;", "public function hasError(): bool;", "public function isError()\n {\n return !$this->errorSet->isEmpty();\n }", "public function failed()\n {\n return $this->serverError() || $this->clientError();\n }", "public function hasRequestHeadersList()\n {\n return $this->request_headers !== null;\n }", "public function headers_sent()\n {\n return false;\n }", "public function isError () {\n return $this->c2mysql->isError();\n }", "public function hasError()\n {\n return $this->has_error;\n }", "public function isSuccessful()\n {\n return count($this->errors) === 0;\n }", "private function _hasErrors()\n {\n if(count($this->_rules->errors) > 0)\n {\n $encoded_message = \\GuzzleHttp\\json_encode($this->_rules->errors);\n throw new ValidationException($encoded_message, 422);\n }\n\n return true;\n }", "public function isSuccessful(): bool\n {\n return ($this->statusCode >= 200 && $this->statusCode <= 299);\n }", "private function hasError($data){\n //anything other than 0 is an error\n return $data[\"error\"] != 0;\n }", "public function isError()\n {\n return !empty($this->exception);\n }", "public function isSuccess(): bool\n {\n return $this->code >= 200 && $this->code < 300;\n }", "public function isValid() : bool\n {\n return in_array($this->getStatusCode(), Response::CODE_LIST);\n }", "public function isError(): bool\n {\n return $this->error;\n }", "public function request_succeeded()\n {\n return curl_errno($this->ch) === 0;\n }", "public function hasError() {\r\n\t\treturn ($this->errorNumber ? true : false);\r\n\t}", "public function isError()\n {\n return $this->getName() === 'error';\n }", "public function HasError() {\n\n return !in_array($this->Error, array(UPLOAD_ERR_OK, UPLOAD_ERR_NO_FILE));\n }", "private function _checkOutputHeaders(&$outputheaders) {\n //Not implemented in this example\n return true;\n }", "public function hasError() {\n return 0 < count($this->errors);\n }", "public function haveErrors() :bool\n {\n return count($this->error) > 0;\n }", "protected function _hasErrors() {\n return (bool) count($this->_getSession()->getMessages()->getItemsByType('error'));\n }", "public function isError(): bool\n {\n return !empty($this->errors);\n }" ]
[ "0.67185307", "0.6553767", "0.6331841", "0.6174733", "0.61486775", "0.61351705", "0.6056991", "0.60486203", "0.60110414", "0.59856755", "0.59797215", "0.5935342", "0.58791685", "0.58730465", "0.58685774", "0.585406", "0.5827374", "0.58235306", "0.57859915", "0.5777936", "0.5776774", "0.5764109", "0.5762786", "0.57572", "0.5736444", "0.57283396", "0.5718123", "0.5716131", "0.571404", "0.57005453", "0.5692085", "0.5691082", "0.56893784", "0.5671212", "0.56706184", "0.56693876", "0.5667431", "0.56589913", "0.5642969", "0.5634849", "0.56326145", "0.56073296", "0.56054676", "0.56016773", "0.56011355", "0.55990726", "0.55970854", "0.55899364", "0.5568856", "0.5567231", "0.5562554", "0.5560065", "0.55504435", "0.55443853", "0.55443853", "0.55443853", "0.55443853", "0.55414534", "0.5540132", "0.5530727", "0.5529268", "0.5526409", "0.5523091", "0.5514657", "0.54952425", "0.54929984", "0.54785645", "0.54761916", "0.5471817", "0.5462023", "0.54587877", "0.5455481", "0.5450159", "0.5448144", "0.54455906", "0.5442075", "0.5442075", "0.54353267", "0.5434168", "0.54323274", "0.54321015", "0.5417981", "0.54131275", "0.54077804", "0.5404905", "0.5401689", "0.5401649", "0.5401296", "0.5400076", "0.53930885", "0.5392195", "0.53909296", "0.53894025", "0.5383878", "0.53827083", "0.53545225", "0.5345989", "0.5340736", "0.5333104", "0.53331" ]
0.60836536
6
To extract toplevel headers of batchresponse.
public function GetHeaders() { return HttpResponse::extractHeaders($this->_rawHttpBatchResponse); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getHeaders();", "public abstract function getHeaders();", "private static function getHeaderAndBody($response) {\n\n $header = self::http_parse_headers(substr($response, 0, strrpos($response,\"\\r\\n\\r\\n\")));\n $body = substr($response, strrpos($response,\"\\r\\n\\r\\n\")+4);\n\n return array($header,$body);\n }", "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 }", "function getresponseheader($header = false){\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head){\n if ( is_integer(strpos ($head, $header) )){\n $hstart = strpos ($head, \": \");\n $head = trim(substr($head,$hstart+2,100));\n return $head;\n }\n }\n }", "function http_response_header_lines($hdr_str) {\n\t$lines = explode(\"\\n\", $hdr_str);\n\t$hdr_arr['status_line'] = trim(array_shift($lines));\n\tforeach ($lines as $line) {\n\t\tlist($key, $val) = explode(':', $line, 2);\n\t\t$hdr_arr[trim($key)] = trim($val);\n\t}\n\treturn $hdr_arr;\n}", "public function getHeaders() {}", "public function getHeaders ();", "protected function getLastResponseHeaders()\n {\n return ParserRegistry::getInstance()->getParser('message')\n ->parseResponse($this->client->__getLastResponseHeaders());\n }", "protected static function get_response_headers()\n {\n }", "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 getOutputHeaders()\n {\n }", "function getHeaders(){ return $this->_Headers; }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "function get_headers_from_curl_response($response) {\n $headers = array();\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if ($i === 0)\n $headers['http_code'] = $line;\n else {\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n return $headers;\n}", "protected function _parseHeader() {}", "protected function fetchHeader($response)\r\n {\r\n $headers = [];\r\n $headerSize = 0;\r\n $headerParts = explode(PHP_EOL, $response);\r\n\r\n foreach ($headerParts as $headerString) {\r\n\r\n $headerSize += strlen($headerString);\r\n\r\n $headerString = trim($headerString);\r\n if (empty($headerString)) {\r\n break;\r\n }\r\n\r\n if (strpos($headerString, ':') !== false) {\r\n $headerSize += strlen(PHP_EOL);\r\n $headerString = str_replace('\"', '', $headerString);\r\n $headerStringParts = explode(':', $headerString);\r\n $headerStringParts = array_map('trim', $headerStringParts);\r\n\r\n $headers[ $headerStringParts[ 0 ] ] = $headerStringParts[ 1 ];\r\n } elseif (preg_match(\"/(HTTP\\/[0-9].[0-9])\\s([0-9]+)\\s([a-zA-Z]+)/\", $headerString, $matches)) {\r\n $headerSize += strlen(PHP_EOL);\r\n\r\n $this->info->httpVersion = $matches[ 1 ];\r\n $this->info->httpCode = $matches[ 2 ];\r\n $this->info->httpCodeDescription = $matches[ 3 ];\r\n }\r\n }\r\n\r\n $this->headers = new Headers($headers);\r\n\r\n // Update info\r\n if ($this->headers->offsetExists('contentType')) {\r\n $this->info->contentType = $this->headers->offsetGet('contentType');\r\n }\r\n\r\n $this->info->headerSize = $headerSize;\r\n }", "private function returnImapHeadersArr(){\n\t\treturn imap_headers($this->stream);\n\t}", "function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}", "public function getResponseHeaders();", "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 __getLastRequestHeaders() {\n\t\tif ($this->useCurl) {\n\t\t\treturn $this->lastRequestHeaders;\n\t\t}\n\t\treturn parent::__getLastResponseHeaders();\n\t}", "function getHeaders()\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaders()\\n\";\r\n\t\tif( $this->debug & DBGINDATA ) { \r\n\t\t\techo \"DBG.INDATA responseHeaders=\"; print_r( $this->responseHeaders );\r\n\t\t}\r\n\t\treturn $this->responseHeaders;\r\n\t}", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n }", "public function getHeaders() {\n\t\treturn $this->response_headers;\n\t}", "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 getLastResponseHeaders() {}", "public function getRawResponseHeaders() {\n\t}", "function getResponseHeaders();", "public function __getLastResponseHeaders() {\n\t\tif ($this->useCurl) {\n\t\t\treturn $this->lastResponseHeaders;\n\t\t}\n\t\treturn parent::__getLastResponseHeaders();\n\t}", "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 getLastHeaders()\n {\n return $this->getRequest()->getHeadersFromLastResponse();\n }", "public function getFullHeader()\n {\n }", "function get_header_entries() {\n return array();\n }", "public function headers()\r\n\t\t\t {\r\n return self::headersToArray(explode( \"\\r\\n\", $this->headers ));\r\n\t\t\t }", "public function getHeaders()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response headers for a pending request.';\n\t\t}\n\t\treturn $this->response_headers;\n\t}", "protected function extractFileName(){\n foreach (explode(\"\\r\\n\", $this->headers) as $header)\n {\n if (strpos($header, 'filename') !== false && strpos($header, 'Content-Disposition') !== false)\n {\n $fileName = substr($header, (strpos($header, \"=\")+1));\n $this->setFileName($fileName);\n break;\n }\n }\n }", "public function getRequestHeaders()\n {\n return curl_getinfo($this->res, CURLINFO_HEADER_OUT);\n }", "public function getHeaders() {\n\t\treturn $this->getHeader();\n\t}", "public function printHeaders() {\n\t}", "#[Pure]\n public function getHeaders() {}", "#[Pure]\n public function getHeaders() {}", "private function getBodyAndHeaders($body, &$response)\n {\n $headers = array();\n\n $data = explode(\"\\n\",$body);\n\n $flag = 1;\n\n foreach ($data as $part) {\n if ($flag == 1) {\n $headers['Protocol'] = explode(' ', $part)[0];\n } else if(count($data) == $flag) {\n $response->body = trim($part);\n break;\n } else {\n $aux = explode(': ', $part);\n\n if (count($aux) >= 2) {\n $headers[$aux[0]] = trim($aux[1]);\n }\n }\n\n $flag++;\n }\n\n $response->headers = $headers;\n }", "public function getHeaders()\n {\n \treturn getallheaders();\n }", "public function getHeadersRaw(): array;", "public function headers() {\n\t\treturn $this->getAllHeaders();\n\t}", "public final function headers()\n {\n return $this->_header;\n }", "public function getAllHeaders()\n {\n return $this->headers;\n }", "public function getRawRequestHeaders() {\n\t}", "public static function allHeaders()\n {\n return self::$__headers;\n }", "public function MetadataHeaders() {\n\t $headers = array();\n\t $prefix = $this->Prefix();\n\n\t // only build if we have metadata\n\t if (is_object($this->metadata)) {\n\t foreach($this->metadata as $key => $value)\n\t $headers[$prefix.$key] = $value;\n\t }\n\n\t return $headers;\n\t}", "function getHeaders() {\n\t\treturn $this->getData('headers');\n\t}", "public function getHeaders()\r\n {\r\n return isset($this->data[self::HEADER_INDEX]) ? $this->data[self::HEADER_INDEX] : null;\r\n }", "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}", "public function headers()\n {\n return $this->header_fields;\n }", "protected function _getExportHeaders()\n {\n return Mage::helper('storelocator')->getHeaderFile();\n }", "public function getHeaders()\n {\n return $this->source['headers'];\n }", "public function getHeaders(){\n return $this->headers;\n }", "function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = substr($respHeaders, 0, strpos($respHeaders, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $headerText) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n}", "public function getHeaderList()\n {\n return $this->headers;\n }", "#[Pure]\nfunction http_get_request_headers() {}", "public function getResponseHeaders()\r\r\n {\r\r\n return $this->responseHeaders;\r\r\n }", "public function getRespHeaders()\n {\n $headerSize = curl_getinfo($this->res, CURLINFO_HEADER_SIZE);\n\n return substr($this->lastResponse, 0, $headerSize);\n }", "private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}", "public function headers() {\n return $this->headers;\n }", "function GetHeader() {\n return ($this->ses['response']['header']);\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "protected function getInitHeaders(): array\n {\n // Initial payload consists of required headers for Wildfire\n return array_merge(\n $this->createHeader(['Protocol', 1], static::PROTOCOL_URI),\n $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI),\n $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI)\n );\n }", "public static function getRequestHeaders() {}", "public function __getLastResponseHeaders()\n {\n return $this->lastResponseHeaders;\n }", "public function headers(): Collection;", "public function getLastRequestHeaders()\n {\n return $this->__getLastRequestHeaders();\n }", "function getHTTPHeaders(Server $server) {\n\n return [];\n\n }", "static public function getHeadersFromCurlResponse($response) {\n $headers = array();\n $response = str_replace(\"HTTP/1.1 100 Continue\\r\\n\\r\\n\", '', $response);\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list ($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n }", "protected function get_headers($has_files = false)\n {\n $final_headers = [\n \"User-Agent\" => \"Python Veryfi-Python/0.1\",\n \"Accept\" => \"application/json\",\n \"Content-Type\" => \"application/json\",\n \"Client-Id\" => $this->client_id,\n ]; \n\n if ($this->username) {\n $final_headers[\"Authorization\"] = \"apikey {$this->username}: {$this->api_key}\";\n }\n\n if ($has_files) {\n unset($final_headers[\"Content-Type\"]); \n }\n\n return $final_headers;\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 }", "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 }", "protected function mainHeaders(): array\n {\n $token = session('api_token') ?: null;\n return [\n 'Authorization: Bearer ' . $token,\n 'Content-Type: application/json',\n \"Cache-Control: no-cache\",\n ];\n }", "function getallheaders()\n{\n if (array_key_exists('getallheaders_return', $GLOBALS)) {\n return $GLOBALS['getallheaders_return'];\n }\n\n return \\getallheaders();\n}", "public function getLastRequestHeaders()\n {\n return null;\n }", "public function getHeaders()\n {\n return empty($this->headers) ? $this->parseHeaders($this->rawResponseHeaders) : $this->headers;\n }" ]
[ "0.64137524", "0.63815874", "0.63623816", "0.6295206", "0.62773776", "0.6242707", "0.6233439", "0.622414", "0.6211469", "0.6156794", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6149198", "0.6133443", "0.61085224", "0.6059486", "0.6059486", "0.6058573", "0.60550547", "0.6037471", "0.6002308", "0.5992232", "0.59858406", "0.59831434", "0.5975303", "0.59634894", "0.59504056", "0.5943572", "0.5943572", "0.5936023", "0.5934703", "0.59315825", "0.5903955", "0.58972657", "0.5858345", "0.58560646", "0.58560646", "0.58560646", "0.58560646", "0.58560646", "0.58560646", "0.58560646", "0.585132", "0.58432955", "0.58402604", "0.5830397", "0.5824748", "0.5814376", "0.5810486", "0.5799384", "0.57875395", "0.5782295", "0.5782295", "0.5772323", "0.5758887", "0.5754691", "0.5754062", "0.57433736", "0.57427704", "0.574161", "0.5728042", "0.5726422", "0.571029", "0.57079166", "0.57061875", "0.5696915", "0.5689604", "0.5681627", "0.5674768", "0.5671911", "0.566297", "0.565848", "0.56541795", "0.5635952", "0.56312305", "0.5624369", "0.5620247", "0.56199396", "0.56199396", "0.561755", "0.5612285", "0.56072575", "0.56012416", "0.55945027", "0.55937594", "0.55889094", "0.5576838", "0.5571585", "0.5568698", "0.55639815", "0.5560206", "0.55589277", "0.5558275" ]
0.696579
0
To get the batch response body.
public function GetRawHttpResponse() { return $this->_rawHttpBatchResponse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBody()\n {\n return $this->response;\n }", "public function getBody() {\n\t\treturn $this->response_body;\n\t}", "public function getBody()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response body for a pending request.';\n\t\t}\n\t\treturn $this->response_body;\n\t}", "public function get_response_body()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\tthrow new \\Exception( _t( 'Unable to fetch response body for a pending request.' ) );\n\t\t}\n\n\t\treturn $this->response_body;\n\t}", "public function getBody()\n {\n return $this->invokeWrappedIfEntityEnclosed(__FUNCTION__, func_get_args());\n }", "public function getRawBody()\n {\n return array_key_exists('Body', $this->job) ? $this->job['Body'] : $this->job['body'];\n }", "public function getResponseBody() {\n return $this->body;\n }", "public function GetSubBatchHttpResponses()\n {\n return $this->_httpResponses;\n }", "function getBody()\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getBody()\\n\";\r\n\t\treturn $this->responseBody;\r\n\t}", "public function getResponseBody(){\n\t\treturn $this->response->getBody();\n\t}", "public function getResponseBody()\r\n\t{\r\n\t\treturn $this->body;\r\n\t}", "public function getResultBody();", "public function getBody() {}", "public function getHttpBody()\n {\n return $this->httpBody;\n }", "private function body()\n {\n return json_decode($this->request->all()[\"job\"], true);\n }", "function getHttpBody() {\n return $this->httpBody;\n }", "public function body()\n {\n return (string)$this->response->getBody();\n }", "public function getRawBody()\n {\n return (string) $this->job->getBody();\n }", "public function getBatch()\n {\n return $this->_batch;\n }", "public function getBody()\n {\n return $this->rawBody;\n }", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "public function getBody() : array\r\n {\r\n return $this->body;\r\n }", "public function getRawBody()\n {\n return $this->job->getMessageBody();\n }", "public function getBody()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "protected function getBody()\n {\n return $this->getRequest()->getBody();\n }", "public function getDecodedBody()\r\n\t{\r\n\t\treturn ResponseObjectBuilder::buildFromJSON($this->body);\r\n\t}", "public function getRawBody()\n\t{\n\t\treturn $this->rawJob;\n\t}", "public function getBody() \r\n { \r\n return $this->_bagBody; \r\n }", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function getBody();", "public function body() {\n\t\treturn $this->getBody();\n\t}", "public function getBody()\n {\n return $this->values[\"body\"];\n }", "public function getBatch()\n {\n return isset($this->batch) ? $this->batch : null;\n }", "public function getBody(): string\n {\n return (string) $this->response->getBody();\n }", "function getBatchObj()\n\t\t{\n\t\t\treturn $this->BatchObj;\n\t\t}", "public function getResponseBody()\n {\n return $this->responseBody; \n }", "public function body()\n {\n return $this->connection->protocol()->body($this);\n }", "public function getBody()\n {\n $this->set('returnTransfer', 1);\n\n return $this->send();\n }", "public function getRawResponse()\n {\n return $this->response->getBody();\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody()\n {\n return $this->body;\n }", "public function getBody() {\n\t\treturn $this->body;\n }", "public function getBody() {\n\t\treturn $this->body;\n }", "public function getRawBody();", "public function getBody() {\n\t\treturn $this->body;\n\t}", "public function getGuzzleBody()\n {\n return $this->guzzleBody;\n }", "public function getBody()\n\t{\n\t\treturn $this->body;\n\t}", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody()\r\n {\r\n return $this->body;\r\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getBody() {\n return $this->body;\n }", "public function getResponseBody()\n {\n return $this->responseBody;\n }", "public function getResponseBody()\n {\n return $this->responseBody;\n }", "public function getResponseBody()\n {\n return $this->responseBody;\n }", "public function getResult()\n {\n return $this->getBody()->getResult();\n }", "public function getBody()\n {\n if (!isset($this->body)) {\n $this->body = $this->createDefaultBody();\n }\n \n return $this->body;\n }", "public function getBody()\n {\n // TODO: Implement getBody() method.\n }", "public function getBody()\n {\n $body = json_decode($this->body, true);\n\n dd($body);\n }", "public function getResponseBody()\n\t{\n\t\treturn isset($this->_response['body']) ? $this->_response['body'] : '';\n\t}", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->_body;\n }", "public function getBody()\n {\n return $this->Body;\n }", "public function getBodyContent() {}", "public function getBodyLast()\n {\n return $this->bodyLast;\n }" ]
[ "0.70280373", "0.69828504", "0.6885645", "0.67350686", "0.6679059", "0.6639184", "0.6616117", "0.65745234", "0.6566801", "0.65563506", "0.653732", "0.6512043", "0.6510335", "0.6507144", "0.6502652", "0.6501219", "0.6482957", "0.6481892", "0.6472658", "0.64680064", "0.64672595", "0.64672595", "0.6465773", "0.6450744", "0.6449827", "0.643283", "0.6411011", "0.63939214", "0.6392562", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.63876265", "0.6384206", "0.63829654", "0.63634306", "0.6335158", "0.63216835", "0.6312667", "0.630589", "0.6303212", "0.6302689", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629579", "0.629349", "0.629349", "0.6291909", "0.6274599", "0.62635696", "0.62589514", "0.6258279", "0.6258279", "0.6258279", "0.6258279", "0.62489504", "0.62489504", "0.62489504", "0.62406784", "0.62406784", "0.62406784", "0.62249124", "0.6223114", "0.62192005", "0.62166667", "0.62138575", "0.6209858", "0.6209858", "0.6209858", "0.6209858", "0.6202769", "0.61902165", "0.6187268" ]
0.7176031
0
Create an HttpResponse object from batchRepsonse.
public function GetAsHttpResponse() { $parts = explode("--" . $this->_changesetBoundary, $this->_rawHttpBatchResponse, 2); return new Microsoft_Http_Response($this->GetCode(), HttpResponse::extractHeaders($parts[0]), (count($parts) == 2) ? ('--' . $this->_changesetBoundary . "\n" . $parts[1]) : $parts[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function Create($httpBatchResponse)\n {\n $changesetBoundary = null;\n $httpResponses = array();\n if (!self::CheckIsError($httpBatchResponse))\n {\n $changesetBoundary = HttpBatchResponse::ExtractChangesetBoundary($httpBatchResponse);\n if (!isset($changesetBoundary))\n {\n throw new InvalidOperation(Resource::InvalidBatchResponseNoCSBoundary);\n }\n\n $httpResponses = HttpBatchResponse::ExtractHttpResponses($httpBatchResponse,\n $changesetBoundary);\n }\n\n return new HttpBatchResponse($httpResponses, $httpBatchResponse,\n $changesetBoundary);\n }", "protected function createHttpResponse()\n {\n return new Response();\n }", "protected static function ExtractHttpResponses($httpBatchResponse, $changesetBoundary)\n {\n $httpResponses = array();\n $parts = explode( \"--\" . $changesetBoundary, $httpBatchResponse);\n $count = count($parts);\n if($count < 2)\n {\n return $httpResponses;\n }\n\n unset($parts[0]);\n unset($parts[$count-1]);\n foreach ($parts as $changeSet)\n {\n $subParts = preg_split('|(?:\\r?\\n){2}|m', $changeSet, 2);\n $httpResponses[] = Microsoft_Http_Response::fromString($subParts[1]);\n }\n\n return $httpResponses;\n }", "protected function handleBatch()\n {\n if (!($requests = $this->router->getVariable('requests'))) {\n throw new \\ApiException(\\Phork::language()->translate('Missing batch definitions'), 400);\n }\n \n if (!(is_string($requests) && $requests = json_decode($requests, true))) {\n throw new \\ApiException(\\Phork::language()->translate('Invalid batch definitions'), 400);\n }\n \n foreach ($requests as $key => $request) {\n $key = isset($request['key']) ? $request['key'] : $key;\n if (!empty($request['method']) && !empty($request['url'])) {\n switch (strtolower($request['method'])) {\n case 'get':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::get($request['url'], false);\n break;\n\n case 'post':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::post($request['url'], !empty($request['args']) ? $request['args'] : array(), false);\n break;\n\n case 'put':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::put($request['url'], false);\n break;\n\n case 'delete':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::delete($request['url'], false);\n break;\n }\n } else {\n throw new \\ApiException(\\Phork::language()->translate('Missing request type and/or URL'), 400);\n }\n }\n\n $this->success = true;\n $this->result = array(\n 'batched' => isset($result) ? $result : array()\n );\n }", "public function prepareResponse();", "abstract public function createResponse(AbstractRequestClient $request);", "public function GetRawHttpResponse()\n {\n return $this->_rawHttpBatchResponse;\n }", "public function __construct(array $batch)\n\t{\n\t\tif(Tivoka::$version == Tivoka::VER_1_0) throw new Tivoka_exception('Batch requests are not supported by JSON-RPC 1.0 spec', Tivoka::ERR_SPEC_INCOMPATIBLE);\n\t\t$this->id = array();\n\t\n\t\t//prepare requests...\n\t\tforeach($batch as $request)\n\t\t{\n\t\t\tif(!($request instanceof Tivoka_Request) && !($request instanceof Tivoka_Notification))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t//request...\n\t\t\tif($request instanceof Tivoka_Request)\n\t\t\t{\n\t\t\t\tif(in_array($request->id,$this->id,true)) continue;\n\t\t\t\t$this->id[$request->id] = $request;\n\t\t\t}\n\t\t\t\n\t\t\t$this->request[] = $request->request;\n\t\t}\n\t}", "public function GetSubBatchHttpResponses()\n {\n return $this->_httpResponses;\n }", "public function batch_purchaseorders($limit = 0, $ponbr = '') {\n\t\t\t$original_limit = $limit;\n\t\t\t$responses = array('created' => array(), 'updated' => array());\n\t\t\t$nbr_new = count_dbpurchaseordernbrsnotinsendlog($ponbr);\n\t\t\t$nbr_existing = count_dbpurchaseordernbrsinsendlog($ponbr);\n\t\t\t\n\t\t\t$responses['created'] = $this->create_purchaseorders($limit, $ponbr);\n\t\t\t$limit = max($limit - $nbr_new, 0);\n\t\t\t\n\t\t\tif ($limit > 0 || $original_limit == 0) {\n\t\t\t\t$responses['updated'] = $this->update_purchaseorders($limit, $ponbr);\n\t\t\t}\n\t\t\t\n\t\t\t$this->response = $responses;\n\t\t\treturn $this->response;\n\t\t}", "public function interpretResponse($resparr) {\n\t\t//validate\n\t\tif(count($resparr) < 1 || !is_array($resparr)) {\n\t\t\tthrow new Tivoka_Exception('Expected batch response, but none was received', Tivoka::ERR_INVALID_RESPONSE);\n\t\t}\n\t\n\t\t$requests = $this->id;\n\t\t$nullresps = array();\n\t\t$responses = array();\n\t\n\t\t//split..\n\t\tforeach($resparr as $resp)\n\t\t{\n\t\t\tif(!is_array($resp)) throw new Tivoka_Exception('Expected batch response, but no array was received', Tivoka::ERR_INVALID_RESPONSE);\n\t\t\t\t\n\t\t\t//is jsonrpc protocol?\n\t\t\tif(!isset($resp['jsonrpc']) && !isset($resp['id'])) throw new Tivoka_Exception('The received reponse doesn\\'t implement the JSON-RPC prototcol.', Tivoka::ERR_INVALID_RESPONSE);\n\t\t\t\t\n\t\t\t//responds to an existing request?\n\t\t\tif(!array_key_exists($resp['id'], $requests))\n\t\t\t{\n\t\t\t\tif($resp['id'] != null) continue;\n\t\n\t\t\t\t$nullresps[] = $resp;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t//normal response...\n\t\t\t$requests[ $resp['id'] ]->setResponse(json_encode($resp));\n\t\t\tunset($requests[ $resp['id'] ]);\n\t\t}\n\t\n\t\t//handle id:null responses...\n\t\tforeach($requests as $req)\n\t\t{\n\t\t\t$resp = array_shift($nullresps);\n\t\t\t$requests[ $req->id ]->setResponse(json_encode($resp));\n\t\t}\n\t}", "public function createBatchUpdater()\n {\n return new Util\\BatchUpdater($this->conn->getClient(), $this);\n }", "function get_item_batch()\n\t{\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n\t\t\t// $tableName = \"london_stock\";\n\t\t\t// $condition = array();\n\t\t\t$result = $this->CustomModel->get_batch_number();\n\t\t\tif ($result > 0) {\n\t\t\t\techo $response = json_encode($result, true);\n\t\t\t} else {\n\t\t\t\techo $response = json_encode(array('message' => 'No batch', 'type' => 'danger'), true);\n\t\t\t}\n\t\t}\n\t}", "public function executeBatch() {\n if (!$this->isBatch) {\n throw new JsonRpcException('Client is not in batch mode, start a batch operation by calling startBatch() first');\n }\n\n if (empty($this->batchRequests)) {\n throw new JsonRpcException('No batch requests are attached. Use call() first');\n }\n\n $batchRequests = $this->batchRequests;\n $this->discardBatch();\n\n return $this->parseBatchResponse($this->performRequest($batchRequests));\n }", "private function processResponse(Request $request, int $status, array $body): Iterator\n {\n if ($status < 200 || $status >= 300) {\n throw new BatchRequestException(sprintf(\n 'Unexpected status \"%d\" for request \"%s\": %s, %s',\n $status,\n $request->getUri(),\n $body['error']['code'] ?? '',\n $body['error']['message'] ?? '',\n ), $body['error']['message'], $body, $status);\n }\n\n // Map response body (eg. to files)\n /** @var iterable $values */\n $values = $request->hasResponseMapper() ? $request->getResponseMapper()($body) : [$body];\n foreach ($values as $key => $value) {\n // End if over limit (eg. last page has 10 items, but we need only 4)\n if ($this->limit && $this->processedCount >= $this->limit) {\n break;\n }\n\n // It is needed to specify key, otherwise it would be overwritten\n // ... because method is called multiple times, and without specifications are keys: 0, 1, 2 ...\n yield $this->processedCount => $value;\n\n // Increase processed\n $this->processedCount++;\n }\n }", "public function serve_batch_request_v1(\\WP_REST_Request $batch_request)\n {\n }", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "public function build(): BatchRetrieveInventoryCountsResponse\n {\n return CoreHelper::clone($this->instance);\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 getHttpResponse();", "private function createResponse($request)\n {\n return json_decode($request->getBody()->getContents());\n }", "public function store(CreateBatchRequest $request)\n {\n try {\n $batch = new Batch($request->all());\n $batch->save();\n activity()->causedBy(Auth::user())->performedOn($batch)->withProperties($batch)->log('Created Successfully');\n } catch (JWTException $e) {\n throw new HttpException(500);\n }\n return response()->json($batch);\n }", "public function testRetrieveChunkedHttpResponse()\n {\n $client = new HttpClient();\n $response = $client->send(\n HttpRequestMethod::GET,\n 'https://postman-echo.com/stream/5'\n );\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('OK', $response->getReasonPhrase());\n $this->assertNotEmpty($response->getBody());\n $this->assertNotEmpty($response->getHeaders());\n }", "public function setHttpResponse($httpResponse);", "public function chunk(string $content): ResponseInterface;", "public static function batchDelete() {\n $result = array();\n $copied = lC_Products_Admin::batchDelete($_GET['batch']);\n if ($copied) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "private function _setReponseArray() {\n try {\n $this->RESP = array(\n 'MSG' => $this->MSG,\n 'STATUS' => $this->STATUS\n );\n } catch (Exception $ex) {\n throw new Exception('Crud Model : Error in _setReponseArray function - ' . $ex);\n }\n }", "public function actionBatchCreate()\n\t{\n\t\t//batch inicio\n\t\t$models=array();\n\t\t$user=User::model()->getUserActualModel();\n\t\t$unidades=null;\n\t\t// batch fin\n\t\tfor ($i=1; $i <= 34 ; $i++) { \n\t\t\t$idunidad=$i;\n\t\t\tif(strlen((string)$i)==1){\n\t\t\t\t$idunidad='0'.$i;\n\t\t\t}\n\t\t\t$unidades=Contacto::model()->load2($user->nick,$idunidad);\n\t\t\tif(!empty($unidades))\n\t\t\t\tbreak;\n\t\t}\n\t\tif(empty($unidades)){\n\t\t\t$this->redirect(array('mensajefinal'));\n\t\t}\n\t\tforeach ($unidades as $key => $value) {\n\t\t\t$models[$key]=new Respuestas;\n\t\t\t$models[$key]->id_con=$value->id_con;\n\t\t\t$models[$key]->_contacto=Contacto::model()->load3($value->id_con);\n\t\t}\n\t\tif(isset($_POST['Respuestas']))\n\t\t{\n\n\t\t\tforeach($models as $key=>$value)\n\t\t\t{\n\t\t\t\t$value->attributes=$_POST['Respuestas'][$key];\n\t\t\t\t$value->save();\n\t\t\t}\n\t\t\t$this->redirect(array('router'));\n\n\t\t}\n\n\t\t$this->render('batchCreate',array(\n\t\t\t'models'=>$models,\n\t\t\t));\n\t}", "protected function Transform_Response($response)\n\t{\n\t\t\n\t\tif (is_string($response))\n\t\t{\n\t\t\t$response = new OLP_Response($response);\n\t\t}\n\t\t\n\t\t// we want the merged result so we have tokens for promo_id, etc.\n\t\t$data = array_merge($response->Signature()->To_Array(), $response->Collection()->To_Array());\n\t\t\n\t\t$proxy = new stdClass();\n\t\t$proxy->session_id = $response->Unique_ID();\n\t\t$proxy->page = $response->Page();\n\t\t$proxy->data = $data;\n\t\t$proxy->errors = $response->Errors()->To_Array();\n\t\t$proxy->event = array();\n\t\t\n\t\t// if we have a <section> element, turn it into\n\t\t// the eds_page in the response, using XSLT\n\t\tif (count($response->Content()->Sections()))\n\t\t{\n\t\t\t\n\t\t\t// which style-sheet?\n\t\t\t$xslt = DIR_SHARED.\"/xsl/{$response->Page()}.xsl\";\n\t\t\t\n\t\t\tif (is_file($xslt))\n\t\t\t{\n\t\t\t\t// transform our response\n\t\t\t\t$content = Transform_XML($xslt, $response->Received());\n\t\t\t\t$proxy->eds_page = array('content'=>$content, 'type'=>'text/html');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $proxy;\n\t\t\n\t}", "public function createResponse()\n {\n return new Response;\n }", "abstract protected function createResponse(GuzzleResponse $response);", "function get_batches($batch_id=0){\n\t\tglobal $mysqli;\n\n\t\t$query=\"SELECT courses.*,batches.* FROM courses_mas courses, batches WHERE courses.course_id=batches.course_id\";\n\t\tif($batch_id != 0)\n\t\t{\n\t\t\t$query.=\" AND batch_id=\".$batch_id.\" LIMIT 1\";\n\t\t}\n\t\t$result=$mysqli->query($query);\n\t\twhile($row=$result->fetch_assoc())\n\t\t{\n\t\t\t$response[]=$row;\n\t\t}\n\t\theader('Content-Type: application/json');\n\t\techo json_encode($response, JSON_UNESCAPED_SLASHES);\n\t}", "private function _loadResponse()\n {\n $sroObjects = Mage::getModel('pedroteixeira_correios/sro_object_collection');\n $trackList = $this->getRequestCollection();\n $response = $this->getResponse();\n \n if (isset($response->return) && $response->return->qtd > 0) {\n foreach ((array)$response->return->objeto as $obj) {\n $track = $trackList->getItemByColumnValue('number', $obj->numero);\n if ($track) {\n $item = Mage::getModel('pedroteixeira_correios/sro_object');\n $item->setTrack($track)\n ->setInfo($obj);\n $sroObjects->addItem($item);\n } else {\n Mage::log(\"Cant locate track for {$obj->numero}\");\n }\n }\n }\n \n $this->setLog(\"{$sroObjects->count()} identified of {$this->getLog()}\");\n \n return $this->setResponseCollection($sroObjects);\n }", "private function setMultiArray($responseContent)\n {\n $jsonResponseContent = json_decode($responseContent, true);\n $error = json_last_error();\n if ($error) {\n print_r($responseContent);\n throw new InvalidArgumentException('Invalid json provided');\n }\n $this->responseBody = new MultiArray($jsonResponseContent);\n }", "abstract public function processResponse($response);", "public function process() : Response\n {\n \t$this->parseRequestParameter();\n\n $this->baseDirectorySaveFile = $this->getSetting('baseDirectorySaveFile');\n $this->baseDirectorySaveTemporaryFile = $this->getSetting('baseDirectorySaveTemporaryFile');\n\n $uploadHandler = new UploadHandler(\n $this->baseDirectorySaveTemporaryFile,\n $this->baseDirectorySaveFile,\n $this->indentifier,\n $this->fileName,\n $this->numberChunkedOfFile\n );\n\n $this->callEventListener('onload');\n\n // handle multi upload\n foreach ($this->request->getUploadedFiles() as $uploadedFile) {\n $uploadHandler->receiveUploadChunked($uploadedFile, $this->chunkedNumber);\n\n $uploadHandler->addEventListener('onprogress', function() {\n $this->callEventListener('onprogress');\n $this->response = $this->response->withStatus(202);\n });\n\n $uploadHandler->addEventListener('onerror', function($error) {\n $this->callEventListener('onerror', $error);\n $this->response = $this->response->withStatus(500);\n });\n\n $uploadHandler->addEventListener('onfinished', function() {\n $this->callEventListener('onfinished');\n $this->response = $this->response->withStatus(200);\n });\n\n $uploadHandler->process();\n }\n\n\t\treturn $this->response;\n }", "private function parseResponse($response, $requestLog = null, $responseLog = null)\n {\n $rawResponse = new RawResponse($this->client, $response);\n $contentId = isset($rawResponse->headers['content-id']) ? $rawResponse->headers['content-id'] : null;\n $this->lastParsedContentId = $contentId;\n if (!isset($contentId) && count($this->cache) == 1) {\n $contentId = key($this->cache);\n }\n if ($this->client->cache && isset($contentId)) {\n if (isset($this->cache[$contentId])) {\n if ($rawResponse->statusCode == Http::STATUS_NOT_MODIFIED) {\n $response = $this->cache[$contentId]->getContent();\n $rawResponse = new RawResponse($this->client, $response);\n $rawResponse->headers['content-id'] = $contentId;\n $log = \"--------------------------------\\r\\nCached response\\r\\n--------------------------------\\r\\n\";\n $log .= $rawResponse->statusCode . \"\\r\\n\";\n foreach ($rawResponse->headers as $header => $value) {\n $log .= $header . ': ' . $value . \"\\r\\n\";\n }\n $log .= $rawResponse->body;\n $this->client->log(LOG_INFO, $log);\n } else {\n $this->cache[$contentId]->delete();\n }\n }\n if ($rawResponse->statusCode != Http::STATUS_NOT_MODIFIED && $rawResponse->statusCode < Http::STATUS_INTERNAL_SERVER_ERROR && isset($rawResponse->headers['etag'])) {\n $this->cache[$contentId]->set($rawResponse->headers['etag'], $rawResponse->message);\n }\n }\n $method = 'parse' . ApiHelper::camelize($rawResponse->type) . 'response';\n if ($rawResponse->type === '' || !method_exists($this, $method)) {\n $method = 'parseDefaultResponse';\n }\n try {\n return $this->$method($rawResponse);\n } catch (\\Exception $ex) {\n $this->client->dumpService->setPrefix($contentId);\n $this->client->dumpService->save($requestLog, DumpServiceInterface::DUMPTYPE_REQUEST);\n $this->client->dumpService->save($responseLog, DumpServiceInterface::DUMPTYPE_RESPONSE);\n $this->client->dumpService->saveException($ex);\n throw $ex;\n }\n }", "public function prepare_response_for_collection($response)\n {\n }", "public function process() {\n $response = new AjaxResponse();\n $entity = $this->getEntityFromStorage();\n\n try {\n $api_response = $this->exportStory();\n $response->addCommand(new RedirectCommand(Url::fromRoute('entity.node.canonical', ['node' => $entity->id()])\n ->toString()));\n }\n catch (\\Exception $e) {\n $this->messenger()->addError($e->getMessage());\n $content = $this->chooseDestination($entity->getEntityTypeId(), $entity);\n $response->addCommand(new OpenModalDialogCommand(t('Pageplanner Export: Choose destination'), $content, ['width' => '80%']));\n }\n\n return $response;\n }", "function BatchResult($id, $testPath)\r\n{\r\n header ('Content-type: text/xml');\r\n echo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\r\n echo \"<response>\\n\";\r\n if( strlen($_REQUEST['r']) )\r\n echo \"<requestId>{$_REQUEST['r']}</requestId>\\n\";\r\n\r\n if( gz_is_file(\"$testPath/tests.json\") )\r\n {\r\n echo \"<statusCode>200</statusCode>\\n\";\r\n echo \"<statusText>Ok</statusText>\\n\";\r\n if( strlen($_REQUEST['r']) )\r\n echo \"<requestId>{$_REQUEST['r']}</requestId>\\n\";\r\n $tests = json_decode(gz_file_get_contents(\"$testPath/tests.json\"), true);\r\n if( count($tests) )\r\n {\r\n $host = $_SERVER['HTTP_HOST'];\r\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\r\n\r\n echo \"<data>\\n\";\r\n foreach( $tests as &$test )\r\n {\r\n echo \"<test>\\n\";\r\n echo \"<testId>{$test['id']}</testId>\\n\";\r\n echo \"<testUrl>\" . htmlentities($test['url']) . \"</testUrl>\\n\";\r\n echo \"<xmlUrl>http://$host$uri/xmlResult/{$test['id']}/</xmlUrl>\\n\";\r\n echo \"<userUrl>http://$host$uri/result/{$test['id']}/</userUrl>\\n\";\r\n echo \"<summaryCSV>http://$host$uri/result/{$test['id']}/page_data.csv</summaryCSV>\\n\";\r\n echo \"<detailCSV>http://$host$uri/result/{$test['id']}/requests.csv</detailCSV>\\n\";\r\n echo \"</test>\\n\";\r\n }\r\n echo \"</data>\\n\";\r\n }\r\n else\r\n {\r\n echo \"<statusCode>403</statusCode>\\n\";\r\n echo \"<statusText>No test data for test ID: $id</statusText>\\n\";\r\n echo \"<data>\\n\";\r\n echo \"</data>\\n\";\r\n }\r\n }\r\n else\r\n {\r\n echo \"<statusCode>404</statusCode>\\n\";\r\n echo \"<statusText>Invalid Test ID: $id</statusText>\\n\";\r\n echo \"<data>\\n\";\r\n echo \"</data>\\n\";\r\n }\r\n\r\n echo \"</response>\\n\";\r\n}", "function processResponse($strResponse) {\n\t\tlist($theHeaders, $theBody) = explode(\"\\r\\n\\r\\n\", $strResponse, 2);\n\t\treturn array('headers' => $theHeaders, 'body' => $theBody);\n\t}", "public function withHttpResponse(ResponseInterface $response) : ResultSet\n {\n $data = Json::decodeObject((string) $response->getBody());\n\n return $this->withJsonObject($data);\n }", "public function finalize()\n {\n // Prepare response\n if (in_array($this->status, array(204, 304))) {\n $this->headers->remove('Content-Type');\n $this->headers->remove('Content-Length');\n $this->setBody('');\n }\n\n return array($this->status, $this->headers, $this->body);\n }", "private function fetch() {\n if ($this->curl instanceof MultiCurl) {\n $this->curl->complete(function($instance) {\n if ($instance->error) {\n $this->errors[] = [\n 'errorCode' => $instance->getErrorCode(),\n 'errorMessage' => $instance->getErrorMessage()\n ];\n } else {\n $this->headers[] = $instance->getResponseHeaders();\n $this->body[] = $instance->getResponse();\n }\n });\n } else {\n if ($this->curl->error) {\n $this->errors[] = [\n 'errorCode' => $this->curl->getErrorCode(),\n 'errorMessage' => $this->curl->getErrorMessage()\n ];\n } else {\n $this->headers = $this->curl->getResponseHeaders();\n $this->body = $this->curl->getResponse();\n }\n }\n\n return $this;\n }", "public function execute(): Iterator\n {\n if ($this->requests) {\n $this->processedCount = 0;\n $retryProxy = $this->api->createRetry($this->api->logger(), $this->api->maxAttempts());\n yield from $retryProxy->call(function (): iterator {\n try {\n foreach ($this->runBatchRequest() as $response) {\n do {\n yield from $this->processBatchResponse($response);\n $response = $this->getNextPage($response);\n } while ($response !== null);\n }\n } catch (BatchRequestException $e) {\n Helpers::processRequestException($e);\n }\n });\n }\n }", "public function response () \n {\n //if entries is empty,it means user want to delete all task entries\n if ($this->entries->isEmpty()) return $this->deleteAll();\n\n //General validation of incomming entries\n $this->validateEntries();\n\n //update the entries of the task\n $new_entries = $this->saveBundleEntries();\n\n //change task status depending on the last entry\n $this->changeRecordStatus($new_entries);\n\n return $this->buildResponse($new_entries);\n }", "abstract public function prepare_response( $object, $context );", "public static function process_batch_request() {\n\t\t// Batch ID.\n\t\t$batch_id = isset( $_REQUEST['batch_id'] ) ? sanitize_key( $_REQUEST['batch_id'] ) : false;\n\n\t\tif ( ! $batch_id ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'A batch process ID must be present to continue.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Nonce.\n\t\tif ( ! isset( $_REQUEST['nonce'] ) || ( isset( $_REQUEST['nonce'] ) && false === wp_verify_nonce( $_REQUEST['nonce'], \"{$batch_id}_step_nonce\" ) ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => __( 'You do not have permission to initiate this request. Contact an administrator for more information.', 'popup-maker' ),\n\t\t\t) );\n\t\t}\n\n\t\t// Attempt to retrieve the batch attributes from memory.\n\t\t$batch = PUM_Batch_Process_Registry::instance()->get( $batch_id );\n\n\t\tif ( $batch === false ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%s is an invalid batch process ID.', 'popup-maker' ), esc_html( $_REQUEST['batch_id'] ) ),\n\t\t\t) );\n\t\t}\n\n\t\t$class = isset( $batch['class'] ) ? sanitize_text_field( $batch['class'] ) : '';\n\t\t$class_file = isset( $batch['file'] ) ? $batch['file'] : '';\n\n\t\tif ( empty( $class_file ) || ! file_exists( $class_file ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( 'An invalid file path is registered for the %1$s batch process handler.', 'popup-maker' ), \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t} else {\n\t\t\trequire_once $class_file;\n\t\t}\n\n\t\tif ( empty( $class ) || ! class_exists( $class ) ) {\n\t\t\twp_send_json_error( array(\n\t\t\t\t'error' => sprintf( __( '%1$s is an invalid handler for the %2$s batch process. Please try again.', 'popup-maker' ), \"<code>{$class}</code>\", \"<code>{$batch_id}</code>\" ),\n\t\t\t) );\n\t\t}\n\n\t\t$step = sanitize_text_field( $_REQUEST['step'] );\n\n\t\t/**\n\t\t * Instantiate the batch class.\n\t\t *\n\t\t * @var PUM_Interface_Batch_Exporter|PUM_Interface_Batch_Process|PUM_Interface_Batch_PrefetchProcess $process\n\t\t */\n\t\tif ( isset( $_REQUEST['data']['upload']['file'] ) ) {\n\n\t\t\t// If this is an import, instantiate with the file and step.\n\t\t\t$file = sanitize_text_field( $_REQUEST['data']['upload']['file'] );\n\t\t\t$process = new $class( $file, $step );\n\n\t\t} else {\n\n\t\t\t// Otherwise just the step.\n\t\t\t$process = new $class( $step );\n\n\t\t}\n\n\t\t// Garbage collect any old temporary data.\n\t\t// TODO Should this be here? Likely here to prevent case ajax passes step 1 without resetting process counts?\n\t\tif ( $step < 2 ) {\n\t\t\t$process->finish();\n\t\t}\n\n\t\t$using_prefetch = ( $process instanceof PUM_Interface_Batch_PrefetchProcess );\n\n\t\t// Handle pre-fetching data.\n\t\tif ( $using_prefetch ) {\n\t\t\t// Initialize any data needed to process a step.\n\t\t\t$data = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : array();\n\n\t\t\t$process->init( $data );\n\t\t\t$process->pre_fetch();\n\t\t}\n\n\t\t/** @var int|string|WP_Error $step */\n\t\t$step = $process->process_step();\n\n\t\tif ( is_wp_error( $step ) ) {\n\t\t\twp_send_json_error( $step );\n\t\t} else {\n\t\t\t$response_data = array( 'step' => $step );\n\n\t\t\t// Map fields if this is an import.\n\t\t\tif ( isset( $process->field_mapping ) && ( $process instanceof PUM_Interface_CSV_Importer ) ) {\n\t\t\t\t$response_data['columns'] = $process->get_columns();\n\t\t\t\t$response_data['mapping'] = $process->field_mapping;\n\t\t\t}\n\n\t\t\t// Finish and set the status flag if done.\n\t\t\tif ( 'done' === $step ) {\n\t\t\t\t$response_data['done'] = true;\n\t\t\t\t$response_data['message'] = $process->get_message( 'done' );\n\n\t\t\t\t// If this is an export class and not an empty export, send the download URL.\n\t\t\t\tif ( method_exists( $process, 'can_export' ) ) {\n\n\t\t\t\t\tif ( ! $process->is_empty ) {\n\t\t\t\t\t\t$response_data['url'] = pum_admin_url( 'tools', array(\n\t\t\t\t\t\t\t'step' => $step,\n\t\t\t\t\t\t\t'nonce' => wp_create_nonce( 'pum-batch-export' ),\n\t\t\t\t\t\t\t'batch_id' => $batch_id,\n\t\t\t\t\t\t\t'pum_action' => 'download_batch_export',\n\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Once all calculations have finished, run cleanup.\n\t\t\t\t$process->finish();\n\t\t\t} else {\n\t\t\t\t$response_data['done'] = false;\n\t\t\t\t$response_data['percentage'] = $process->get_percentage_complete();\n\t\t\t}\n\n\t\t\twp_send_json_success( $response_data );\n\t\t}\n\n\t}", "private function parse()\n {\n if ($this->isError()) {\n // error parsing\n if (empty($this->body) || !isset($this->body['errors'])) {\n // response body isn't an error object, return a custom one\n $error = new Entity\\Error();\n $error->message = \"Error $this->http_status\";\n $error->name = \"INVALID REQUEST\";\n $error->at = \"\";\n $this->objects[] = $error;\n } else {\n // parse error\n $errors = $this->body['errors'];\n foreach ($errors as $error) {\n $this->objects[] = Entity\\Error::parse($error);\n }\n }\n } else if (isset($this->body['card'])) {\n // card parsing\n $cards = $this->body['card'];\n foreach ($cards as $card) {\n $this->objects[] = Entity\\Card::parse($card);\n }\n } else if (isset($this->body['paymentmethod'])) {\n // payment parsing\n $this->objects[] = Entity\\Payment::parse($this->body);\n if (isset($this->body['subscription_plan'])) {\n // subscription also found, payment is a subscription\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n }\n } else if (isset($this->body['vendor'])) {\n // vendor parsing\n $this->objects[] = Entity\\Vendor::parse($this->body['vendor']);\n } else if (isset($this->body['item'])) {\n // item parsing\n $this->objects[] = Entity\\Item::parse($this->body['item']);\n } else if (isset($this->body['refunded'])) {\n // refund parsing, same as payment\n $this->objects[] = Entity\\Payment::parse($this->body);\n } else if (isset($this->body['subscription_plan'])) {\n // subscription parsing\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n } else if (isset($this->body['deleted'])) {\n // nothing to return\n } else {\n throw new \\RuntimeException('Could not recognize response type');\n }\n }", "function response() {\n return new Response;\n }", "public function create(): ResponseInterface\n\t{\n\t\t$this->content = [];\n\t}", "function concatenate($http_response){\n\t\t// Output buffer\n\t\t$this->_OutputBuffer->addStringBuffer($http_response->_OutputBuffer);\n\t\tif($http_response->_OutputBuffer_Flush_Started){\n\t\t\t$this->_OutputBuffer_Flush_Started = true;\n\t\t}\n\n\t\t// Redirection\n\t\t$_location = $http_response->getLocation();\n\t\tif(isset($_location) && strlen($_location)>0){\n\t\t\t$this->setLocation($_location,array(\"moved_permanently\" => $http_response->_LocationMovedPermanently, \"status\" => $this->_LocationMovedWithStatus));\n\t\t}\n\n\t\t// HTTP status code\n\t\tif($http_response->_StatusCode_Redefined){\n\t\t\t$this->setStatusCode($http_response->getStatusCode(),$http_response->_StatusMessage);\n\t\t}\n\n\t\t// Content-Type\n\t\tif($http_response->_ContentType_Redefined){\n\t\t\t$this->setContentType($http_response->getContentType());\n\t\t}\n\n\t\t// Charset\n\t\tif($http_response->_ContentCharset_Redefined){\n\t\t\t$this->setContentCharset($http_response->getContentCharset());\n\t\t}\n\n\t\t// HTTP headers\n\t\tforeach($http_response->getHeaders() as $_key => $_value){\n\t\t\t$this->setHeader($_key,$_value);\n\t\t}\n\n\t\t// Cookies\n\t\tforeach($http_response->getCookies() as $c){\n\t\t\t$this->addCookie($c);\n\t\t}\n\t}", "public function create(): array\n {\n $url = sprintf(\n '%s%s/sobjects/%s/',\n static::getApiPrefix(),\n config('salesforce.api_version'),\n static::$objectApiName\n );\n $record = $this->encode($this->raw());\n $response = self::guzzleRequest('post', $url, [\n 'json' => $record,\n ]);\n if ($response['success']) {\n $this->Id = $response['id'];\n }\n return $response;\n }", "protected function parseResponse()\n {\n // get the status code from response.\n $statusCode = $this->httpResponse->getStatusCode();\n\n // set as error, if http status code is not between 200 and 299 (inclusive).\n $this->networkError = !($statusCode >= 200 && $statusCode <= 299);\n\n // decode the response body.\n $body = $this->decodeBody();\n\n // stop when no body is present.\n if ($body) {\n // parse the response id from the body.\n $this->id = (int) array_get($body, 'id', null);\n\n // set as error when there is a an error key and it's not null.\n $this->isError = array_get($body, 'error', null) !== null;\n\n // parse the response data, from result or error.\n $this->data = collect(array_get($body, $this->isError ? 'error' : 'result', []));\n }\n\n // just return the response body.\n return $this->body;\n }", "public function getMultipart()\n {\n\n if (empty($this->multipartTransactions)) {\n\n $this->multipartTransactions = array();\n\n if (!$this->isContentType('multipart/mixed')) {\n throw new Exception('Response is not multipart');\n }\n\n // Step 1. Get boundary\n\n preg_match('/boundary=([^\";]+)/i', $this->getContentType(), $matches);\n\n if (empty($matches[1])) {\n throw new Exception('Boundary not found');\n }\n\n $boundary = $matches[1];\n\n // Step 2. Split by boundary and remove first and last parts if needed\n\n $parts = explode('--' . $boundary . '', (string)$this->response->getBody()); //TODO Handle as stream\n\n if (empty($parts[0])) {\n array_shift($parts);\n }\n\n if (trim($parts[count($parts) - 1]) == '--') {\n array_pop($parts);\n }\n\n if (count($parts) == 0) {\n throw new Exception('No parts found');\n }\n\n // Step 3. Create status info object\n\n $statusInfoPart = array_shift($parts);\n $statusInfoObj = new self(null, trim($statusInfoPart), $this->response->getStatusCode());\n $statusInfo = $statusInfoObj->getJson()->response;\n\n // Step 4. Parse all parts into Response objects\n\n foreach ($parts as $i => $part) {\n\n $partInfo = $statusInfo[$i];\n\n $this->multipartTransactions[] = new self(null, trim($part), $partInfo->status);\n\n }\n\n }\n\n return $this->multipartTransactions;\n\n }", "public function process($response) {\n return $response;\n }", "function makeResponse($response)\n {\n $result = current(Util::toArray($response));\n\n $response = new Response([\n 'raw_body' => $result,\n\n ## get response message as array\n 'default_expected' => function($rawBody) use ($result) {\n return $result;\n }\n ]);\n // TODO handle exceptions\n\n /** @var iResponse $response */\n $response = $this->exceptionHandler($response);\n \n\n return $response;\n }", "public function executeAsync(): BatchInterface;", "public function createResponse()\n {\n return new GuzzleResponse();\n }", "protected static function buildBatch(ViewExecutable $view) {\n // Get total number of items.\n $view->get_total_rows = TRUE;\n $export_limit = $view->getDisplay()->getOption('export_limit');\n\n $view->build();\n $view->get_total_rows = TRUE;\n // Don't load and instantiate so many entities.\n $view->query->setLimit(1);\n $view->execute();\n $total_rows = $view->total_rows;\n\n // Get available number of downloads.\n $uid = \\Drupal::currentUser()->id();\n $available_downloads = \\Drupal::service('pmmi_sales_agent.downloads_quota')\n ->availableDownloadsNumber($uid);\n\n // Set the total to number of available downloads, if the number of\n // available records less than total number.\n if ($total_rows > $available_downloads) {\n $total_rows = $available_downloads;\n }\n\n // If export limit is set and the number of rows is greater than the\n // limit, then set the total to limit.\n if ($export_limit && $export_limit < $total_rows) {\n $total_rows = $export_limit;\n }\n\n $batch_definition = [\n 'operations' => [\n [\n [static::class, 'processBatch'],\n [\n $view->id(),\n $view->current_display,\n $view->args,\n $view->getExposedInput(),\n $total_rows,\n ],\n ],\n ],\n 'title' => t('Exporting data...'),\n 'progressive' => TRUE,\n 'progress_message' => '@percentage% complete. Time elapsed: @elapsed',\n 'finished' => [static::class, 'finishBatch'],\n 'type' => 'favorites',\n ];\n batch_set($batch_definition);\n\n // Fall back to favourites page.\n $favourites_url = Url::fromUserInput('/sales-agent-directory/favorites')->toString();\n return batch_process($favourites_url);\n }", "public static function batchCopy() {\n $result = array();\n $copied = lC_Products_Admin::batchCopy($_GET['batch'], $_GET['new_category_id'], $_GET['copy_as']);\n if ($copied) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "function createResponse ( $from, $action=\"Process Request\", $api_key=null )\n {\n $response = new SyndicationResponse();\n $response->raw = $from;\n\n /// an exception was thrown\n if ( is_subclass_of($from,'Exception') )\n {\n $response->success = false;\n $response->status = $from->getCode();\n $response->format = 'Exception';\n $response->addMessage(array(\n 'errorCode' => $from->getCode(),\n 'errorMessage' => $from->getMessage(),\n 'errorDetail' => \"{$action} Exception\"\n ));\n return $response;\n\n /// we got a response from the server\n } else if ( is_array($from)\n && !empty($from['http'])\n && !empty($from['format']) )\n {\n $status = isset($from['http']['http_code']) ? intval($from['http']['http_code']) : null;\n $response->status = $status;\n /// SUCCESS\n if ( $status>=200 && $status<=299 )\n {\n $response->success = true;\n /// CLIENT SIDE ERROR\n } else if ( $status>=400 && $status<=499 ) {\n /// BAD API KEY\n if ( $status == 401 ) {\n $errorDetail = \"Unauthorized. Check API Key.\";\n /// VALID URL but specific id given does not exist\n } else if ( $status == 404 && !empty($api_key) ) {\n $errorDetail = \"Failed to {$action}. {$api_key} Not Found.\";\n /// Error in the request\n } else {\n $errorDetail = \"Failed to {$action}. Request Error.\";\n }\n $response->success = false;\n $response->addMessage(array(\n 'errorCode' => $status,\n 'errorMessage' => $this->httpStatusMessage($status),\n 'errorDetail' => $errorDetail\n ));\n /// SERVER SIDE ERROR\n } else if ( $status>=500 && $status<=599 ) {\n $response->success = false;\n $response->addMessage(array(\n 'errorCode' => $status,\n 'errorMessage' => $this->httpStatusMessage($status),\n 'errorDetail' => \"Failed to {$action}. Server Error.\"\n ));\n }\n\n if ( $from['format']=='json' )\n {\n /// for any json response\n /// [meta] and [results] expected back from api\n /// [meta][messages] should be consumed if found\n /// [meta][pagination] should be consumed if found\n /// [message] was changed to plural, check for both for now just incase\n\n /// look for meta\n if ( isset($from['meta']) )\n {\n if ( isset($from['meta']['pagination']) )\n {\n $response->addPagination($from['meta']['pagination']);\n }\n if ( isset($from['meta']['messages']) )\n {\n $response->addMessage($from['content']['meta']['messages']);\n }\n if ( isset($from['meta']['message']) )\n {\n $response->addMessage($from['content']['meta']['message']);\n }\n } else if ( isset($from['content']) && isset($from['content']['meta']) ) {\n if ( isset($from['content']['meta']['pagination']) )\n {\n $response->addPagination($from['content']['meta']['pagination']);\n }\n if ( isset($from['content']['meta']['messages']) )\n {\n $response->addMessage($from['content']['meta']['messages']);\n }\n if ( isset($from['content']['meta']['message']) )\n {\n $response->addMessage($from['content']['meta']['message']);\n }\n }\n /// look for results\n if ( isset($from['content']) )\n {\n if ( isset($from['content']['results']) )\n {\n $response->results = (array)$from['content']['results'];\n } else {\n $response->results = (array)$from['content'];\n }\n }\n $response->format = 'json';\n return $response;\n } else if ( $from['format']=='image' ) {\n $response->format = 'image';\n\n /// a single string: base64 encoded image : imagecreatefromstring?\n $response->results = $from['content'];\n return $response;\n /// unknown format\n } else {\n $response->format = $from['format'];\n /// a single string : html : filtered_html?\n $response->results = $from['content'];\n return $response;\n }\n }\n /// we got something weird - can't deal with this\n $response->success = false;\n $status = null;\n if ( is_array($from) && !empty($from['http']) && isset($from['http']['http_status']) )\n {\n $status = $from['http']['http_status'];\n }\n $response->addMessage(array(\n 'errorCode' => $status,\n 'errorMessage' => $this->httpStatusMessage($status),\n 'errorDetail' => \"Unknown response from Server.\"\n ));\n return $response;\n }", "public function convertResponse($values)\n {\n\t}", "protected function getContentObject()\n {\n return json_decode($this->response->getContent());\n }", "protected function _getResponse() {\n\t\treturn new Response;\n\t}", "public function exportData(ServerRequestInterface $request, ResponseInterface $response, $args) {\n $output = [];\n\n // Get request parameter\n $route = $request->getAttribute('route');\n $request_campaign_id = $route->getArgument('id'); // Request campaign'id\n $request_stage_id = $route->getArgument('stage_id'); // Request campaign's Stage id\n $request_auth_token = $route->getArgument('auth_token'); // User auth token\n $campaign_id \t\t= StringComponent::decodeRowId($request_campaign_id);\n $stage_id \t\t= StringComponent::decodeRowId($request_stage_id);\n $current_time \t\t\t= \\App\\Components\\DateTimeComponent::getDateTime();\n $track_reply \t\t= 0;\n $track_click \t\t= 0;\n $csv_payload \t\t\t= null;\n $timezone \t\t= \\DEFAULT_TIMEZONE;\n $server_timezone\t\t= \\DEFAULT_TIMEZONE;\n\n // Validate request\n if (empty($campaign_id) || empty($stage_id) ) {\n // Fetch error code & message and return the response\n return ErrorComponent::outputError($response, \"api_messages/BAD_REQUEST\");\n }\n\n $model_campaign_master = new CampaignMaster();\n $model_campaign_sequences = new CampaignSequences();\n\n // Get user id and account id from auth token\n try {\n \t$model = new \\App\\Models\\UserAuthenticationTokens();\n\n $condition = [\n \"fields\" => [\n \"uat.user_id\",\n \"um.account_id\",\n \"uat.expires_at\"\n ],\n \"where\" => [\n [\"where\" => [\"uat.token\", \"=\", $request_auth_token]],\n [\"where\" => [\"um.status\", \"<>\", SHAppComponent::getValue(\"app_constant/STATUS_DELETE\")]]\n ],\n \"join\" => [\n \"user_master\"\n ]\n ];\n $row = $model->fetch($condition);\n\n if (!empty($row)) {\n\t \n\t if ($row[\"expires_at\"] < $current_time) {\n\t // Fetch error code & message and return the response\n\t return \\App\\Components\\ErrorComponent::outputError($response, \"api_messages/AUTH_TOKEN_EXPIRED\");\n\t }\n\n\t // Other values for condition\n\t $other_values = [\n\t \"user_id\" => $row[\"user_id\"],\n\t \"account_id\" => $row[\"account_id\"],\n\t \"deleted\" => SHAppComponent::getValue(\"app_constant/STATUS_DELETE\")\n\t ];\n\t $valid = $model_campaign_master->checkRowValidity($campaign_id, $other_values);\n\n\t if (!$valid) {\n\t // Fetch error code & message and return the response\n\t return ErrorComponent::outputError($response, \"api_messages/RECORD_NOT_FOUND\");\n\t }\n\t } else {\n\t \treturn \\App\\Components\\ErrorComponent::outputError($response, \"api_messages/AUTH_TOKEN_EXPIRED\");\n\t } \n } catch(\\Exception $e) {\n // Fetch error code & message and return the response\n return ErrorComponent::outputError($response, \"api_messages/DB_OPERATION_FAIL\");\n }\n \n try {\n // Get data from campaign master table\n $condition = [\n \"fields\" => [\n \"cm.id\",\n \"cm.title\",\n \"cm.timezone\",\n \"cm.track_reply\",\n \"cm.track_click\",\n \"cst.stage\", \n ],\n \"where\" => [\n [\"where\" => [\"cm.id\",\"=\",$campaign_id]],\n [\"where\" => [\"cst.id\",\"=\",$stage_id]],\n [\"where\" => [\"cm.status\",\"<>\",SHAppComponent::getValue(\"app_constant/STATUS_DELETE\")]],\n [\"where\" => [\"cst.progress\",\"=\",SHAppComponent::getValue(\"app_constant/CAMP_PROGRESS_FINISH\")]],\n ],\n \"join\" => [\n \"campaign_stages\"\n ]\n ]; \n\n $campaign_master_data = $model_campaign_master->fetchAll($condition);\n\n if (!empty($campaign_master_data)) {\n $track_reply = $campaign_master_data[0][\"track_reply\"];\n $track_click = $campaign_master_data[0][\"track_click\"];\n $timezone = $campaign_master_data[0][\"timezone\"];\n }\n\n // Get data from campaign sequence table\n $condition = [\n \"fields\" => [\n \"csv_payload\",\n \"is_bounce\",\n \"sent_at\",\n \"progress\",\n \"open_count\",\n \"last_opened\",\n \"replied\",\n \"last_replied\",\n \"click_count\",\n \"last_clicked\" ,\n \"status\" \n ],\n \"where\" => [\n [\"where\" => [\"campaign_id\",\"=\",$campaign_id]],\n [\"where\" => [\"campaign_stage_id\",\"=\",$stage_id]],\n [\"where\" => [\"status\",\"<>\",SHAppComponent::getValue(\"app_constant/STATUS_DELETE\")]],\n ],\n ];\n\n $sequence_data = $model_campaign_sequences->fetchAll($condition);\n\n if (!empty($sequence_data)) {\n // Prepare CSV data\n $data_array = [];\n\n for ($i = 0; $i < count($sequence_data); $i++) {\n $csv_payload = json_decode($sequence_data[$i][\"csv_payload\"], true);\n $temp_arr = [];\n\n if ($i == 0) {\n foreach ($csv_payload as $key => $val) {\n $temp_arr[] = preg_replace( '/^\\W*(.*?)\\W*$/','$1',($key));\n }\n $temp_arr[] = \"Sent Date\";\n $temp_arr[] = \"Falied\";\n $temp_arr[] = \"Bounce\";\n $temp_arr[] = \"Open Count\";\n $temp_arr[] = \"Last Open Date\";\n if ($track_reply == 1) {\n $temp_arr[] = \"Replied\"; \n $temp_arr[] = \"Replied Date\"; \n }\n if ($track_click == 1) {\n $temp_arr[] = \"Click Count\"; \n $temp_arr[] = \"Last Click Date\"; \n }\n $temp_arr[] = \"Remove From Stage\";\n $data_array[] = $temp_arr;\n $temp_arr = [];\n }\n\n foreach ($csv_payload as $key => $val) {\n $temp_arr[] = $val;\n }\n $temp_arr[] = DateTimeComponent::convertDateTimeCampaign($sequence_data[$i][\"sent_at\"], true, $server_timezone, $timezone, \\CAMPAIGN_DATE_FORMAT).\"(\".$timezone.\")\";\n\n if ($sequence_data[$i][\"progress\"] == 1) {\n $temp_arr[] = 0;\n } else if ($sequence_data[$i][\"progress\"] == 2) {\n $temp_arr[] = 1; \n } \n\n $temp_arr[] = $sequence_data[$i][\"is_bounce\"];\n\n $temp_arr[] = $sequence_data[$i][\"open_count\"];\n\n if ($sequence_data[$i][\"last_opened\"] == 0) {\n $temp_arr[] = \"-\";\n } else {\n $temp_arr[] = DateTimeComponent::convertDateTimeCampaign($sequence_data[$i][\"last_opened\"], true, $server_timezone, $timezone, \\CAMPAIGN_DATE_FORMAT).\"(\".$timezone.\")\";\n }\n\n if ($track_reply == 1) {\n $temp_arr[] = $sequence_data[$i][\"replied\"];\n\n if ($sequence_data[$i][\"last_replied\"] == 0) {\n $temp_arr[] = \"-\";\n } else {\n $temp_arr[] = DateTimeComponent::convertDateTimeCampaign($sequence_data[$i][\"last_replied\"], true, $server_timezone, $timezone, \\CAMPAIGN_DATE_FORMAT).\"(\".$timezone.\")\";\n }\n }\n\n if ($track_click == 1) {\n $temp_arr[] = $sequence_data[$i][\"click_count\"];\n\n if ($sequence_data[$i][\"last_clicked\"] == 0) {\n $temp_arr[] = \"-\";\n } else {\n $temp_arr[] = DateTimeComponent::convertDateTimeCampaign($sequence_data[$i][\"last_clicked\"], true, $server_timezone, $timezone, \\CAMPAIGN_DATE_FORMAT).\"(\".$timezone.\")\";\n }\n }\n\n if ($sequence_data[$i][\"status\"] == 1) {\n $temp_arr[] = 0;\n } else {\n $temp_arr[] = 1;\n }\n\n $data_array[] = $temp_arr;\n }\n\n //This code is used to create csv file name using title and stage\n if(!empty($campaign_master_data[0]['title']) && !empty($campaign_master_data[0]['stage'])){\n $final_title = preg_replace('/[^A-Za-z0-9\\-]/','', $campaign_master_data[0]['title']); \n $title = $final_title.\"_Stage\".$campaign_master_data[0]['stage'].\"_export\";\n }\n }\n } catch(\\Exception $e) {\n // Fetch error code & message and return the response\n return ErrorComponent::outputError($response, \"api_messages/DB_OPERATION_FAIL\");\n }\n \n $file = fopen(\"php://output\",'w') or die(\"Can't open php://output\");\n foreach($data_array as $list) {\n\t\t\t\tfputcsv($file, $list);\n\t\t}\n \n return $response->withHeader('Content-Description', 'File Transfer')\n\t\t\t\t ->withHeader('Content-Type', 'application/csv')\n\t\t\t\t ->withHeader('Content-Disposition: attachment; filename='.$title.\".csv\")\n\t\t\t\t ->withHeader('Expires', '0')\n\t\t\t\t ->withHeader('Cache-Control', 'must-revalidate')\n\t\t\t\t ->withHeader('Pragma', 'public')\n\t\t\t\t ->withHeader('Content-Length', filesize($file));\n }", "protected function getReponseData() {}", "protected function getReponseData() {}", "protected function getReponseData() {}", "protected function getReponseData() {}", "protected function getReponseData() {}", "private function createResponse(){\r\n #scraping metatag to get IMAGE TITLE and FULL PATH INC FILE NAME \r\n $metaTag = get_meta_tags($this->url);\r\n\r\n \r\n $this->setImageTitle($metaTag[\"sailthru_title\"]); #setting up title\r\n $this->setFileName($metaTag[\"sailthru_image_full\"]); #setting up full file name\r\n $this->setDimensions(); #setting up image dimensions\r\n \r\n $this->setFileSize(); #setting up file size in kB\r\n \r\n #create response array based on properties\r\n $array = array('title' => $this->imageTitle,\r\n 'dimensions' => $this->imageDimensions,\r\n 'filename' => $this->getPlainFileName(),\r\n 'file size in kB' => $this->fileSize\r\n );\r\n \r\n return $array;\r\n }", "public function prepare()\n {\n $this->status = $this->response->getStatusCode();\n\n $rawResponseData = $this->response->getBody()->getContents();\n\n $this->body = $rawResponseData ? \\GuzzleHttp\\json_decode($rawResponseData, true) : '';\n\n $this->errors = isset($this->body['errors']) ? $this->body['errors'] : [];\n\n if ($this->throwException && (substr($this->status, 0, 1) != 2)) {\n $this->throwException($this->status, $this->errors);\n }\n\n //Set data\n if ($this->body) {\n //This happens when array was expected but it is empty\n if (empty($this->body['data'])) {\n $this->data = collect([]);\n } else {\n $document = Document::createFromArray($this->body);\n $hydrator = new ClassHydrator();\n $hydrated = $hydrator->hydrate($document);\n $this->data = is_array($hydrated) ? collect($hydrated) : $hydrated;\n }\n }\n\n //Set meta\n if (isset($this->body['meta'])) {\n $this->meta = $this->body['meta'];\n }\n }", "public function startBatch() {\n if ($this->isBatch) {\n throw new JsonRpcException('Batch operation already in progress, execute it by calling executeBatch() or cancel it by calling discardBatch()');\n }\n\n $this->batchRequests = [];\n $this->isBatch = true;\n\n return $this;\n }", "public function bulk(array $batch): array\n {\n $params['batch'] = $batch;\n return $this->client->post(\"transferrecipient/bulk\", $params);\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 convertResponse($values)\n {\n\n\t}", "public function prepareResponse($response)\n\t{\n\t\tif ($response instanceof modProcessorResponse) {\n\t\t\t$output = $response->getResponse();\n\t\t} else {\n\t\t\t$message = $response;\n\t\t\tif (empty($message)) {\n\t\t\t\t$message = $this->lexicon('err_unknown');\n\t\t\t}\n\t\t\t$output = $this->failure($message);\n\t\t}\n\t\tif ($this->config['jsonResponse'] AND is_array($output)) {\n\t\t\t$output = $this->modx->toJSON($output);\n\t\t} elseif (!$this->config['jsonResponse'] AND !is_array($output)) {\n\t\t\t$output = $this->modx->fromJSON($output);\n\t\t}\n\n\t\treturn $output;\n\t}", "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}", "public static function sendBatch($class, array $responses)\n {\n $data = [];\n foreach ($responses as $res) {\n $data[] = [\n $res->getStatusCode(),\n $res->getStatusText(),\n $res->getHeaders(),\n $res->getData()\n ];\n }\n\n $response = new $class(200);\n $response->addHeader(\"X-Response-Count\", count($data));\n $response->setData($data);\n $response->send();\n }", "protected function _handleResponse(){\n $this->_results[] = array(\n 'http_code' => $this->getInfoHTTPCode(),\n 'response' => $this->getResponse(),\n 'server' => $this->getUrl()\n );\n }", "private function create() {\r\n $input = (array) json_decode(file_get_contents('php://input'), TRUE);\r\n\r\n // If the row is not valid the response can't be processed\r\n if(!$this->validator->validate($input)) {\r\n return $this->unprocessableResponse();\r\n }\r\n\r\n $result = $this->tableGateway->insert($input);\r\n\r\n $response['status_code_header'] = HTTP_CREATED;\r\n $response['body'] = json_encode($result);\r\n return $response;\r\n }", "function batch($batch) {\n if(!$batch['total']) return false;\n $batch['size'] = $batch['size'] ? $batch['size'] : 1;\n $batch['start'] = $batch['start'] ? $batch['start'] : 0;\n $batch['end'] =min($batch['total']-1, $batch['start'] + $batch['size'] - 1);\n $ret = array('status'=> $batch['end']>=$batch['total']-1 ? 'end' : 'next') ;\n $batch['next'] = $batch['end'] + 1;\n return xpAS::merge($batch, $ret);\n }", "abstract protected function getReponseData() ;", "protected function queryTaskMultiResultsRequest($query_task_ids)\n {\n // verify the required parameter 'query_task_ids' is set\n if ($query_task_ids === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $query_task_ids when calling queryTaskMultiResults'\n );\n }\n\n $resourcePath = '/query_tasks/multi_results';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($query_task_ids)) {\n $query_task_ids = ObjectSerializer::serializeCollection($query_task_ids, 'csv', true);\n }\n if ($query_task_ids !== null) {\n $queryParams['query_task_ids'] = ObjectSerializer::toQueryValue($query_task_ids);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "protected static function ExtractChangesetBoundary($httpBatchResponse)\n {\n preg_match(\"|boundary=(changesetresponse_[^\\r\\n]+)|\",\n $httpBatchResponse, $m);\n if (isset($m[1])) { return $m[1]; }\n return null;\n }", "private function set_response_rows($result) { \n $rows = [];\n foreach ($result as $r) {\n $cell = [];\n foreach ($r as $column => $value) {\n $cell[] = call_user_func($this->format, $column, $value, $r);\n }\n\n $rows[] = [\n 'id' => $r->id,\n 'cell' => $cell\n ];\n }\n return $rows;\n }", "public function toResponse(): Response\n {\n $response = clone RequestContext::getResponse();\n return $response->setException($this->getException())->auto($this->handleBody(), $this->getStatusCode());\n }", "protected function response()\n {\n return new Response('php://memory');\n }", "public static function processBatch($view_id, $display_id, array $args, array $exposed_input, $total_rows, &$context) {\n // Load the View we're working with and set it's display ID so we get the\n // content we expect.\n $view = Views::getView($view_id);\n $view->setDisplay($display_id);\n $view->setArguments($args);\n $view->setExposedInput($exposed_input);\n\n if (isset($context['sandbox']['progress'])) {\n $view->setOffset($context['sandbox']['progress']);\n }\n\n $display_handler = $view->display_handler;\n\n // Build the View so the query parameters and offset get applied.\n // This is necessary for the total to be calculated accurately and the call\n // to $view->render() to return the items we expect to process in the\n // current batch (i.e. not the same set of N, where N is the number of\n // items per page, over and over).\n $view->build();\n\n // First time through - create an output file to write to, set our\n // current item to zero and our total number of items we'll be processing.\n if (empty($context['sandbox'])) {\n // Initialize progress counter, which will keep track of how many items\n // we've processed.\n $context['sandbox']['progress'] = 0;\n\n // Initialize file we'll write our output results to.\n // This file will be written to with each batch iteration until all\n // batches have been processed.\n // This is a private file because some use cases will want to restrict\n // access to the file. The View display's permissions will govern access\n // to the file.\n $filename = \\Drupal::token()->replace($view->getDisplay()->options['filename'], array('view' => $view));\n $destination = 'private://' . $filename;\n $file = file_save_data('', $destination, FILE_EXISTS_REPLACE);\n if (!$file) {\n // Failed to create the file, abort the batch.\n unset($context['sandbox']);\n $context['success'] = FALSE;\n return;\n }\n\n $file->setTemporary();\n $file->save();\n // Create sandbox variable from filename that can be referenced\n // throughout the batch processing.\n $context['sandbox']['vde_file'] = $file->getFileUri();\n }\n\n // Render the current batch of rows - these will then be appended to the\n // output file we write to each batch iteration.\n // Make sure that if limit is set the last batch will output the remaining\n // amount of rows and not more.\n $items_this_batch = $display_handler->getOption('export_batch_size');\n if ($total_rows && $context['sandbox']['progress'] + $items_this_batch > $total_rows) {\n $items_this_batch = $total_rows - $context['sandbox']['progress'];\n }\n\n // Set the limit directly on the query.\n $view->query->setLimit((int) $items_this_batch);\n $rendered_rows = $view->render();\n $string = (string) $rendered_rows['#markup'];\n\n // Workaround for CSV headers, remove the first line.\n if ($context['sandbox']['progress'] != 0 && reset($view->getStyle()->options['formats']) == 'csv') {\n $string = preg_replace('/^[^\\n]+/', '', $string);\n }\n\n // Write rendered rows to output file.\n if (file_put_contents($context['sandbox']['vde_file'], $string, FILE_APPEND) === FALSE) {\n // Write to output file failed - log in logger and in ResponseText on\n // batch execution page user will end up on if write to file fails.\n $message = \\Drupal::service('config.factory')\n ->getEditable('pmmi_sales_agent.reporting_settings')\n ->get('write_failed_message');\n\n $rendered_message = Markup::create($message);\n \\Drupal::logger('views_data_export')->error($rendered_message);\n throw new ServiceUnavailableHttpException(NULL, $rendered_message);\n };\n\n // Update the progress of our batch export operation (i.e. number of\n // items we've processed). Note can exceed the number of total rows we're\n // processing, but that's considered in the if/else to determine when we're\n // finished below.\n $context['sandbox']['progress'] += $items_this_batch;\n\n // If our progress is less than the total number of items we expect to\n // process, we updated the \"finished\" variable to show the user how much\n // progress we've made via the progress bar.\n if ($context['sandbox']['progress'] < $total_rows) {\n $context['finished'] = $context['sandbox']['progress'] / $total_rows;\n }\n else {\n // We're finished processing, set progress bar to 100%.\n $context['finished'] = 1;\n // Store URI of export file in results array because it can be accessed\n // in our callback_batch_finished (finishBatch) callback. Better to do\n // this than use a SESSION variable. Also, we're not returning any\n // results so the $context['results'] array is unused.\n $context['results'] = [\n 'vde_file' => $context['sandbox']['vde_file'],\n 'automatic_download' => $view->display_handler->options['automatic_download'],\n 'total' => $total_rows,\n ];\n }\n }", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "public function popolate_full_response($response){\n\t\t\n\t\tif(!is_array($response)){\n\t\t\t$response = json_decode(json_encode($response), true);\n\t\t}\n\t\t\n\t\tif(!is_array($response)){\n\t\t\tthrow new \\Exception(\"\\$response type must be iterable\");\n\t\t}\n\t\t\n\t\tforeach($response as $key => $value){\n\t\t\t\n\t\t\tif(!property_exists(self::class, $key)){\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "public function getPostsChunk( $user_id, $pagination){\n $posts = Post::all();\n return response()->json(['status' => 'success','page' => $pagination, 'posts' => $posts ]);\n }", "public function execute()\n {\n try {\n $this->cart->removeAllFailed();\n } catch (\\Exception $e) {\n $this->logger->critical($e);\n $this->messageManager->addError(__('Exception occurred during update quote'));\n }\n $data = [];\n $response = $this->resultRawFactory->create();\n $response->setHeader('Content-type', 'text/json');\n $response->setContents($this->jsonEncoder->encode($data));\n return $response;\n }", "public function createFromResponse(): Article\n {\n return new Article((array) $this);\n }", "public function getResponseContent($request): array\n {\n return $this->wrap(\n $this->resource->resolve($request),\n $this->resource->with($request),\n $this->resource->additional\n );\n }", "private function getContent()\n {\n return $this->serializer->deserialize($this->client->getResponse()->getContent(), 'array', 'json');\n }", "public function exportAction(Request $request)\n {\n $categoryDescription = $request->query->get('categoryDescription');\n $sku = $request->query->get('sku');\n $description = $request->query->get('description');\n\n $response = new StreamedResponse();\n $response->setCallback(function() use (&$categoryDescription, &$sku, &$description) {\n $fc = fopen('php://output', 'w+');\n fputcsv($fc, array('Category', 'Sku', 'Description', 'Actual Stock', 'Reserved Stock', 'Unavailable', 'Available', 'Allocated', 'Total Goods In', 'Total WIP', 'Finished Goods', 'Min','In Transit','On Order','Min Order Qty','Min Order Required'),',');\n $qb = $this->getDoctrine()->getRepository('MirsaMirsaBundle:Stock');\n $qb = $qb->createQueryBuilder('s');\n $qb = $qb->select('s.categoryDescription,s.sku,s.description,s.actualStock,s.reservedStock,s.bayUnavailableQty,s.availableStock,s.allocatedStock,s.totalGoodsIn,s.totalWIP,s.totalFinishedGoods,s.minStock,s.totalInTransit,s.onOrderStock,s.minOrderQuantityStock,s.minOrderRequiredStock');\n if ($categoryDescription != \"\" ) {\n $qb = $qb->andWhere('LOWER(s.categoryDescription) LIKE :categorydescription');\n $qb = $qb->setParameter('categorydescription', '%' . strtolower($categoryDescription) . '%');\n } \n if ($sku != \"\" ) {\n $qb = $qb->andWhere('LOWER(s.sku) LIKE :sku');\n $qb = $qb->setParameter('sku', '%' . strtolower($sku) . '%');\n }\n if ($description != \"\" ) {\n $qb = $qb->andWhere('LOWER(s.description) LIKE :description');\n $qb = $qb->setParameter('description', '%' . strtolower($description) . '%');\n }\n\n /* Only export the items for the currently logged in client*/\n if (!is_null($this->getUser()->getContact())) { \n if ($this->getUser()->getContact()->getClient()) {\n $qb = $qb->andWhere('s.client = :client');\n $qb = $qb->setParameter('client', $this->getUser()->getContact()->getClient());\n }\n }\n $qb = $qb->getQuery();\n $stock = $qb->getResult();\n\n foreach ($stock as $item) {\n fputcsv($fc, array(\n $item['categoryDescription'],\n $item['sku'],\n $item['description'],\n $item['actualStock'],\n $item['reservedStock'],\n $item['bayUnavailableQty'],\n $item['availableStock'],\n $item['allocatedStock'],\n $item['totalGoodsIn'],\n $item['totalWIP'],\n $item['totalFinishedGoods'],\n $item['minStock'],\n $item['totalInTransit'],\n $item['onOrderStock'],\n $item['minOrderQuantityStock'],\n $item['minOrderRequiredStock']),\n ',');\n }\n fclose($fc);\n });\n\n $filename = \"inventory_export_\".date(\"m_d_Y_His\").\".csv\";\n $response->setStatusCode(200);\n $response->headers->set('Content-Type', 'text/csv; charset=utf-8');\n $response->headers->set('Content-Disposition','attachment; filename=' . $filename);\n return $response;\n }", "protected static function ExtractBatchBoundaryIndex($httpBatchResponse)\n {\n preg_match(\"|boundary=(batchresponse_[^\\r\\n]+)|\", $httpBatchResponse,\n $m, PREG_OFFSET_CAPTURE);\n if (isset($m[1]) && isset($m[1][1])) { return $m[1][1]; }\n\n return -1;\n }", "public function getBatch()\n {\n return Controllers\\BatchController::getInstance();\n }" ]
[ "0.64113384", "0.56899434", "0.56572616", "0.54901344", "0.5431552", "0.5372023", "0.5323436", "0.52802426", "0.52423775", "0.5124832", "0.51198983", "0.50455624", "0.49501958", "0.49172592", "0.48963156", "0.48269325", "0.4823379", "0.48204407", "0.48143843", "0.481249", "0.48080623", "0.47948244", "0.47838122", "0.47802046", "0.47733167", "0.47627613", "0.47600403", "0.4736692", "0.47319868", "0.4723826", "0.47023064", "0.47010317", "0.46862763", "0.46842343", "0.4664807", "0.4664715", "0.46637428", "0.46559605", "0.46504462", "0.46422777", "0.4639626", "0.46345627", "0.4631372", "0.46253124", "0.46121135", "0.46081212", "0.45991653", "0.45989016", "0.4597995", "0.45698598", "0.45642933", "0.45277694", "0.45201814", "0.451644", "0.4512359", "0.45082226", "0.45050827", "0.45015472", "0.45008", "0.45006803", "0.44992068", "0.44953892", "0.4494541", "0.44929045", "0.44879323", "0.447936", "0.4468025", "0.4468025", "0.4468025", "0.4468025", "0.4468025", "0.44637638", "0.44612408", "0.4457639", "0.4457507", "0.44541118", "0.44518676", "0.44510892", "0.44498375", "0.44459644", "0.4445678", "0.44453675", "0.44379118", "0.44290346", "0.44257644", "0.44212857", "0.4414581", "0.44111273", "0.44106993", "0.4404257", "0.44041285", "0.44008654", "0.439813", "0.4397904", "0.43949556", "0.43936497", "0.4392779", "0.43922913", "0.43911892", "0.43869418" ]
0.5994857
1
To get array of Microsoft_Http_Response, each represents a changeset.
public function GetSubBatchHttpResponses() { return $this->_httpResponses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function ExtractHttpResponses($httpBatchResponse, $changesetBoundary)\n {\n $httpResponses = array();\n $parts = explode( \"--\" . $changesetBoundary, $httpBatchResponse);\n $count = count($parts);\n if($count < 2)\n {\n return $httpResponses;\n }\n\n unset($parts[0]);\n unset($parts[$count-1]);\n foreach ($parts as $changeSet)\n {\n $subParts = preg_split('|(?:\\r?\\n){2}|m', $changeSet, 2);\n $httpResponses[] = Microsoft_Http_Response::fromString($subParts[1]);\n }\n\n return $httpResponses;\n }", "public function GetAsHttpResponse()\n {\n $parts = explode(\"--\" . $this->_changesetBoundary,\n $this->_rawHttpBatchResponse, 2);\n return new Microsoft_Http_Response($this->GetCode(),\n HttpResponse::extractHeaders($parts[0]),\n (count($parts) == 2) ?\n ('--' . $this->_changesetBoundary . \"\\n\" . $parts[1]) :\n $parts[0]);\n }", "public function getChanges()\n {\n $this->conn->initialize();\n $response = $this->conn->getClient()->request(\"/{$this->name}/_changes\");\n\n if (false === $response->isSuccessful()) {\n throw new \\RuntimeException('Request wasn\\'t successfull');\n }\n\n return JSONEncoder::decode($response->getContent());\n }", "public function list() : array\n {\n $raw = $this->connection->get($this->url(self::ENDPOINT));\n $this->response = json_decode($raw, true);\n $this->triggerErrorIfAny();\n\n return $this->response;\n }", "public function getChanges();", "public function getChanges();", "public static function getHmpoResponseArray()\n {\n return self::getAll(true);\n }", "public function getResponses() {\r\n\t\t\treturn $this->_arrResponses;\r\n\t\t}", "public function getResponse(): array;", "public function toArray(): array\n {\n $this->buildResponse();\n\n return json_decode($this->response->getBody()->getContents(), true);\n }", "public function getVersions():array\n {\n return json_decode(\n copy_to_string($this->request('GET', '/unoconv/versions')->getBody()),\n true\n );\n }", "public function getResponse() : array;", "public function toArray() {\n\t\treturn $this->response;\n\t}", "protected function asArray()\n\t{\n\t\treturn \\json_decode($this->response, true);\n\t}", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function toArray()\n {\n return $this->response;\n }", "public function response(): array\n {\n return [\n 'error' => $this->hasError(),\n 'exists' => $this->exists(),\n 'code' => $this->code,\n 'data' => $this->data,\n 'awb' => $this->awb,\n 'status' => $this->status,\n 'updateOn' => $this->updateOn,\n 'message' => $this->message,\n ];\n }", "public function getRevisions(): array;", "public function getStatus(): array\n {\n $this->parseResponse();\n return $this->getData();\n }", "public function getResponseArray() {\n return [\n 'error' => $this->error,\n 'code' => $this->code,\n 'msg' => $this->msg\n ];\n }", "public function toArray(): array\n {\n $body = (string) $this->response->getBody();\n\n return json_decode($body, true) ?? [];\n }", "function getChangeRequests($surferId) {\n $sql = \"SELECT surferchangerequest_data, surferchangerequest_type\n FROM %s\n WHERE surferchangerequest_surferid='%s'\n ORDER BY surferchangerequest_time DESC\";\n $params = array($this->tableChangeRequests, $surferId);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $params)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n if (!isset($result[ $row['surferchangerequest_type' ]])) {\n $result[ $row['surferchangerequest_type'] ] = $row['surferchangerequest_data'];\n }\n }\n return $result;\n }\n return FALSE;\n }", "public function getCurrentResponseArray()\n {\n return $this->responseArray;\n }", "public function getResponseData(): array\n {\n $this->build();\n\n return $this->responseData;\n }", "public function toCollection(): \\Illuminate\\Support\\Collection\n {\n $this->buildResponse();\n\n return collect(json_decode($this->response->getBody()->getContents(), true));\n }", "public function getChangeset(): array\n\t{\n\t\t$changes = [];\n\n\t\tforeach ($this->getNonMetadataFields() as $key => $value) {\n\t\t\tif (! isset($this->initialFieldValues[$key]) || $value !== $this->initialFieldValues[$key]) {\n\t\t\t\t$changes[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $changes;\n\t}", "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function getChanges(): ?array {\n $val = $this->getBackingStore()->get('changes');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, WorkbookDocumentTaskChange::class);\n /** @var array<WorkbookDocumentTaskChange>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'changes'\");\n }", "public function toLoguxResponse() : array\n {\n // Handle internal server error\n if (isset($this->_log['error'])) {\n return [[\n 'answer' => 'error',\n 'details' => $this->_log['error'],\n 'id' => $this->getId()\n ]];\n }\n\n $response = [];\n if ($this->_recepients) {\n $response[] = array_merge([\n 'answer' => 'resend',\n 'id' => $this->getId()\n ], $this->_recepients);\n }\n\n $response = array_merge($response, array_map(function ($logType) {\n return [\n 'answer' => $logType,\n 'id' => $this->getId()\n ];\n }, $this->_log));\n\n return $response;\n }", "public function listsChangereasonByIdget($changereason_id)\r\n {\r\n $response = ChangeReason::findOrFail($changereason_id);\r\n return response()->json($response, 200);\r\n }", "public function getDataChangesList() {\n return DataChangeRecord::get()->filter([\n 'ChangeRecordID' => $this->owner->ID,\n 'ChangeRecordClass' => $this->owner->ClassName\n ]);\n }", "private function getResponse($e) : array\n {\n $response = $e->getResponse();\n $response_array = json_decode($response->getBody()->getContents(), true);\n return [\n 'Status' => HTTPResponse::ERROR,\n 'Status_Code' => $response->getStatusCode(),\n 'Message' => $response_array['message'],\n 'Error' => $response_array['error'],\n ];\n }", "public function getResponses()\n\t{\n\t\t$prefix = $this->Db->TablePrefix;\n\n\t\t$query = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM {$prefix}surveys_response\n\t\t\t\tWHERE\n\t\t\t\t\tsurveys_id = {$this->id}\n\t\t\t\tORDER BY\n\t\t\t\t\tdatetime\n\t\t\t\t;\";\n\n\t\t$result = $this->Db->Query($query);\n\n\t\t$return = array();\n\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t$return[] = $row;\n\t\t}\n\n\t\t// get a list of responses\n\t\treturn $return;\n\t}", "public function getNewChangelogs(string $url): array\n {\n $baseUrl = $this->getBaseUrl($url);\n\n $html = file_get_contents($url);\n $crawler = new Crawler($html);\n\n foreach ($this->changes as $type => $values) {\n\n $filter = $crawler->filter('#' . $values['id'] . ' > div > ul > li > a');\n $this->changes[$type] = [\n 'title' => $type,\n 'changelogs' => []\n ];\n\n foreach ($filter as $domElement) {\n\n $title = $this->escapeTitleFromChangelog($domElement->nodeValue);\n\n $url = $domElement->getAttribute('href');\n $url = $baseUrl . '/' . $url;\n\n if (!($this->changesInIssue[$type]['changelogs'][$title] ?? false)) {\n $line = \"* [ ] [$title]($url)\";\n $this->changes[$type]['changelogs'][$title] = [\n 'title' => $title,\n 'url' => $url,\n 'line' => $line\n ];\n }\n }\n }\n\n return $this->changes;\n }", "public function toArray() {\r\n \treturn array(\"response\"=>$this->_response);\r\n }", "public function getRevisions(): array\n {\n return $this->revs;\n }", "protected function analyzeResponse() {\n\t\tvar_dump($this->curlResponse);\n\t\t$parts = explode(\"\\r\\n\\r\\n\", $this->curlResponse);\n\n\t\t$response_body = array_pop($parts);\n\t\t$response_headers = implode('', $parts);\n\t\t$http_status_code = $this->curl->getinfo(CURLINFO_HTTP_CODE); \n\n\t\treturn array(trim($response_headers), trim($response_body), $http_status_code);\n\t}", "public function testCanReturnAnArrayOfStatusUpdates()\n {\n $t = M::mock('Example\\FacebookFeedReader');\n $t->shouldReceive('getMessages')\n ->once()\n ->andReturn(array('foo', 'bar', 'baz', 'boo', 'bop'));\n $s = new SocialFeed($t);\n $v = $s->getArray();\n $this->assertCount(5, $v);\n $this->assertEquals($v[0], 'foo');\n $this->assertEquals($v[1], 'bar');\n $this->assertEquals($v[2], 'baz');\n $this->assertEquals($v[3], 'boo');\n $this->assertEquals($v[4], 'bop');\n }", "public function getVerboseResponse() \n {\n $this->execute();\n \n if ($this->error) {\n return $this->error;\n }\n \n $contentType = $this->getContentType();\n \n $body = ($this->def['dataType'] == 'array' || strpos($contentType, 'json') !== false) ? static::data2json($this->responseText) : $this->responseText;\n \n return [\n 'status' => $this->status,\n 'body' => $body, \n 'info' => $this->responseInfo,\n 'header' => $this->responseHeaders,\n 'request_header' => $this->getRequestHeaders(),\n 'content_type' => $contentType\n ];\n }", "public function changes()\r\n\t{\r\n\t\t$Change = App::make('Change');\r\n\r\n\t\treturn $Change::where('fmodel', 'GalleryItem')\r\n\t\t\t\t \t ->where('fid', $this->id)\r\n\t\t\t\t \t ->with('user')\r\n\t\t\t\t \t ->orderBy('created_at', 'DESC')\r\n\t\t\t\t \t ->get();\r\n\t}", "public function getAllVersions(): Collection\n {\n $guzzleClient = new Client(['base_uri' => config('bitbucket.api_base_url')]);\n $response = $guzzleClient\n ->get(\"2.0/repositories/\" . config('bitbucket.vendor') . \"/\" . config('bitbucket.repo') . \"/refs/tags\", [\n 'auth' => [config('bitbucket.username'), config('bitbucket.password')]\n ])->getBody();\n\n return collect(\\GuzzleHttp\\json_decode($response)->values);\n }", "public function getLastResponse()\r\n\t{\r\n\t\treturn array('headers' => $this->response_headers[count($this->response_headers)-1],\r\n\t\t'content' => $this->response_content);\r\n\t}", "private function make_response_array($response) {\n $myarray = array();\n $data = explode(\"\\n\", $response);\n if (strpos($data[0], 'HTTP') === 0) {\n // the first line is a status code\n $myarray['status'] = $data[0];\n array_shift($data);\n }\n foreach ($data as $part) {\n if (json_decode($part)) {\n $myarray[] = json_decode($part);\n continue;\n }\n $middle = explode(\": \", $part, 2);\n $myarray[trim($middle[0])] = trim($middle[1]);\n }\n return $myarray;\n }", "public function getResponses()\n {\n return $this->data['responses'];\n }", "public function getErrorResponses();", "public function testReadChangeset()\n\t{\n\t\t$id = '14153708';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleXml;\n\t\t$returnData->changeset = new SimpleXMLElement($this->sampleXml);\n\n\t\t$path = 'changeset/' . $id;\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t\t$this->object->readChangeset($id),\n\t\t\t\t$this->equalTo(new SimpleXMLElement($this->sampleXml))\n\t\t);\n\t}", "public function testDownloadChangeset()\n\t{\n\t\t$id = '123';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleXml;\n\t\t$returnData->create = new SimpleXMLElement($this->sampleXml);\n\n\t\t$path = 'changeset/' . $id . '/download';\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t\t$this->object->downloadChangeset($id),\n\t\t\t\t$this->equalTo(new SimpleXMLElement($this->sampleXml))\n\t\t);\n\t}", "public function getChangedEntries();", "public function detectChanges()\n {\n return [];\n }", "public function getResponses(): ?array\n {\n return $this->responses;\n }", "public function getResponses(): ?array\n {\n return $this->responses;\n }", "function get_comments( $id ) {\n\t\ttry {\n\t\t\t$response = $this->api( 'ticket.changeLog', [ $id ] );\n\t\t} catch( \\Exception $e ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $response as $i => $c ) {\n\t\t\t$response[ $i ] = [\n\t\t\t\t'time' => $c[0],\n\t\t\t\t'author' => $c[1],\n\t\t\t\t'field' => $c[2],\n\t\t\t\t'oldvalue' => $c[3],\n\t\t\t\t'newvalue' => $c[4],\n\t\t\t\t'permanent' => $c[5],\n\t\t\t];\n\t\t}\n\n\t\treturn $response;\n\t}", "protected function getArrayResponse($response) {\n $content = $response->getContent();\n return json_decode($content, true);\n }", "private function obtainResponseContent(string $contents): array\n {\n if (strlen($contents) > 1) {\n $contents = json_decode($contents, 1);\n return is_array($contents) ? $contents : [];\n }\n\n return [];\n }", "private function getLastResponseBodyAsArray(): array\n {\n $body = $this->client->getLastResponseBody();\n $contentType = $this->client->getLastResponseContentType();\n $returnData = null;\n\n // parse XML\n if (0 === strpos($contentType, 'application/xml')) {\n $returnData = XmlSerializer::createFromString($body)->getNormalized();\n } elseif (0 === strpos($contentType, 'application/json')) {\n $returnData = JsonSerializer::createFromString($body)->getNormalized();\n }\n\n if (!is_array($returnData)) {\n throw new SerializerException('Could not convert response body into array: '.$body);\n }\n\n return $returnData;\n }", "public function getDocumentChangeSet($document)\n {\n $oid = spl_object_hash($document);\n if (isset($this->documentChangeSets[$oid])) {\n return $this->documentChangeSets[$oid];\n }\n return array();\n }", "public function getAllResponses()\n {\n return SimpleForumResponse::fetchList(array('topic_id'=>$this->attribute('id')));\n }", "public function getArrayResp()\n {\n return json_decode(Yii::$app->request->post(), false);\n }", "public function getEvents()\n {\n return json_decode((string) $this->response->getBody())->events;\n }", "public function getResponseContent($request): array\n {\n return $this->wrap(\n $this->resource->resolve($request),\n $this->resource->with($request),\n $this->resource->additional\n );\n }", "public function getAllByTask($task_id){\n $changes = $this->find('all', array(\n 'conditions'=>array(\n 'Change.task_id'=>$task_id),\n 'order'=>array(\n 'Change.created DESC')));\n return $changes; \n }", "public function toArray(): array\n {\n $content = $this->getContent();\n\n if (\\is_array($content)) {\n return $this instanceof Filterable\n ? (array) $this->filterResponse($content)\n : $content;\n }\n\n return [];\n }", "public function toArray($request)\n {\n $data = [\n 'id' => $this->id,\n 'model' => $this->name,\n ];\n\n $data['changes'] = [];\n\n foreach ($this->releases as $release)\n {\n $data['changes'][] = [\n 'id' => $release->id,\n 'description' => $release->change_description,\n 'details' => ReleaseChange::collection($release->changes),\n 'updated_at' => $release->updated_at->format('Y-m-d H:i:s')\n ];\n }\n\n return $data;\n }", "public function getAjaxResponse()\n {\n $changes = $this->_eltdiff;\n $this->_resetEltDiff();\n if ($changes != $this->_eltdiff) {\n $this->_changed = true;\n }\n\n $poll = $result = array();\n\n if (!empty($changes['a'])) {\n $result['a'] = array();\n foreach (array_keys($changes['a']) as $val) {\n $result['a'][] = $this->_ajaxElt($val);\n $poll[] = $val;\n }\n }\n\n if (!empty($changes['c'])) {\n $result['c'] = array();\n // Skip the base element, since any change there won't ever be\n // updated on-screen.\n foreach (array_diff(array_keys($changes['c']), array(self::BASE_ELT)) as $val) {\n $result['c'][] = $this->_ajaxElt($val);\n $poll[] = $val;\n }\n }\n\n if (!empty($changes['d'])) {\n $result['d'] = array();\n foreach (array_reverse(array_keys($changes['d'])) as $val) {\n $result['d'][] = IMP_Mailbox::get($val)->form_to;\n }\n }\n\n $GLOBALS['injector']->getInstance('IMP_Ajax_Queue')->poll($poll);\n\n return $result;\n }", "public function listRequests()\r\n {\r\n return $this->BunqClient->getHttpService()->get(\r\n $this->getResourceEndpoint()\r\n );\r\n }", "public function getAsArray(): array\n {\n return \\GuzzleHttp\\json_decode(\\GuzzleHttp\\json_encode($this->values), true);\n }", "public function getResponses()\n {\n return $this->hasMany(Response::className(), ['task_id' => 'id']);\n }", "public function getChanges(): array\n {\n $changes = [];\n\n foreach ($this->changedAttributesName() as $key) {\n $changes[$key] = $this->originals[$key];\n }\n\n return $changes;\n }", "public function retrieveAll() {\n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n\n $sql = \"SELECT * FROM response\";\n $stmt = $conn->prepare($sql);\n \n $status = $stmt->execute();\n\n $responses = [];\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n while( $row = $stmt->fetch() ) {\n $responses[] = new Response(\n $row[\"name\"], \n $row[\"classLength\"],\n $row[\"semLength\"]\n );\n }\n\n $stmt = null;\n $conn = null;\n\n return $responses;\n }", "private function _setReponseArray() {\n try {\n $this->RESP = array(\n 'MSG' => $this->MSG,\n 'STATUS' => $this->STATUS\n );\n } catch (Exception $ex) {\n throw new Exception('Crud Model : Error in _setReponseArray function - ' . $ex);\n }\n }", "protected function getMockedResponseBody(): array\n {\n return json_decode($this->mockedResponse->getBody(), true);\n }", "public function getEntityResponses()\n {\n return $this->bulkEntitiesResponse;\n }", "public function getChange(): array\n {\n $change = array();\n $coinsToPayBack = array();\n $amountToReturn = (ceil(($this->purchaseTransaction->getPaidAmount()*100)) - $this->getTotalAmount()*100)/100;\n $coins = array_reverse(self::$coins);\n foreach ($coins as $coin)\n {\n\n // multiplying by 100 to avoid computing floating numbers\n while (($coin*100 <= $amountToReturn*100))\n {\n $amountToReturn = ($amountToReturn*100 - $coin*100)/100;\n $coinsToPayBack [] = sprintf('%.2f', $coin);\n }\n }\n //count occurrences and map them as key => value\n $keyValueChange = array_count_values($coinsToPayBack);\n foreach ($keyValueChange as $value => $count){\n $change [] = [$value, $count];\n }\n return $change;\n }", "public function getComponents()\n {\n $this->parseResponse();\n\n return $this->components;\n }", "protected function getChangedRemoteObjects()\n {\n $query = $this->getRemoteObjectsQuery();\n $table = $this->getRemoteBaseTable();\n $query->addWhere(\"\\\"{$table}\\\".\\\"_ImportedID\\\" > 0\");\n $query->addWhereAny(array(\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" IS NULL\",\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" < \\\"{$table}\\\".\\\"LastEdited\\\"\"\n ));\n $items = iterator_to_array($this->task->query($query));\n return new ArrayList($items);\n }", "public function testQueryChangeset()\n\t{\n\t\t$param = 'open';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleXml;\n\t\t$returnData->osm = new SimpleXMLElement($this->sampleXml);\n\n\t\t$path = 'changesets/' . $param;\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t\t$this->object->queryChangeset($param),\n\t\t\t\t$this->equalTo(new SimpleXMLElement($this->sampleXml))\n\t\t);\n\t}", "public function getReplies(): array\n\t{\n\n\t}", "public function getControlListchanges($risk_id) \n\t{\n\t\t$sql = \"select a.*\n\t\t\t\tfrom t_risk_control_change a\n\t\t\t\twhere a.risk_id = ? and switch_flag='P' \";\n\t\t$par = array('uid' => $risk_id);\n\t\t\n\t\t$query = $this->db->query($sql, $par);\n\t\t$res = array();\n\t\tforeach($query->result_array() as $row) {\n\t\t\t$res[] = $row;\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public function toArray(): array\n {\n return iterator_to_array($this->getItemsWithChanges());\n }", "private function _loadResponse()\n {\n $sroObjects = Mage::getModel('pedroteixeira_correios/sro_object_collection');\n $trackList = $this->getRequestCollection();\n $response = $this->getResponse();\n \n if (isset($response->return) && $response->return->qtd > 0) {\n foreach ((array)$response->return->objeto as $obj) {\n $track = $trackList->getItemByColumnValue('number', $obj->numero);\n if ($track) {\n $item = Mage::getModel('pedroteixeira_correios/sro_object');\n $item->setTrack($track)\n ->setInfo($obj);\n $sroObjects->addItem($item);\n } else {\n Mage::log(\"Cant locate track for {$obj->numero}\");\n }\n }\n }\n \n $this->setLog(\"{$sroObjects->count()} identified of {$this->getLog()}\");\n \n return $this->setResponseCollection($sroObjects);\n }", "private function parseResponseAddUpdateMultipleRecords($xml)\n {\n $records = [];\n foreach ($xml->result->row as $row) {\n $no = (string) $row['no'];\n if (isset($row->success)) {\n $success = new Result((int) $no, (string) $row->success->code);\n $data = [];\n foreach ($row->success->details->children() as $field) {\n $data[(string) $field['val']] = (string) $field;\n }\n $records[$no] = $success->setData($data);\n } else {\n $error = new Result((int) $no, (string) $row->error->code);\n $error->setError(\n new ZohoRecruitError((string) $row->error->code, (string) $row->error->details)\n );\n $records[$no] = $error;\n }\n }\n\n return $records;\n }", "public function records() {\n if( ! property_exists($this->response(), 'records') ) return [];\n\n return $this->response()->records;\n }", "private function get_links( WP_REST_Response $response ) {\n\n\t\t$server = rest_get_server();\n\n\t\tforeach ( [ 'get_compact_response_links', 'get_response_links' ] as $method ) {\n\t\t\tif ( is_callable( [ $server, $method ] ) ) {\n\t\t\t\treturn (array) call_user_func( [ $server, $method ], $response );\n\t\t\t}\n\t\t}\n\n\t\treturn [];\n\t}", "private function getContent()\n {\n return $this->serializer->deserialize($this->client->getResponse()->getContent(), 'array', 'json');\n }", "public function fetchAllZf2Changelogs()\n {\n $data = array();\n $this->console->writeLine(\"Fetching list of all tags\");\n\n if ($this->githubToken) {\n $httpRequest = $this->httpClient->getRequest();\n $httpRequest->getHeaders()->addHeaderLine('Authorization', 'token ' . $this->githubToken);\n }\n\n $uri = sprintf(self::GITHUB_TAGS, 'zf2');\n $this->httpClient->setUri($uri);\n\n $response = $this->httpClient->send();\n\n if (!$response->isOk()) {\n $this->emitError(sprintf('Received response code %d with body %s', $response->getStatusCode(), $response->getBody()));\n return;\n }\n\n $tags = json_decode($response->getBody());\n foreach ($tags as $info) {\n $tag = $info->name;\n if (preg_match('/dev(?:el)?(?:\\d+(?:[a-z]+)?)?$/', $tag)) {\n // skip development tags\n continue;\n }\n \n $tagData = $this->fetchGithubChangelog('zf2', $tag);\n\n if (!$tagData) {\n return;\n }\n\n $tag = str_replace('release-', '', $tag);\n $data[$tag] = $tagData;\n }\n \n $fileContent = \"<\" . \"?php\\n\\$tags = \" \n . var_export($data, 1) \n . \";\\nreturn \\$tags;\";\n \n $this->console->writeLine(\"Writing to {$this->zf2DataFile}\");\n file_put_contents($this->zf2DataFile, $fileContent);\n\n $this->console->writeLine('[DONE]', Color::GREEN);\n }", "public function getStatusArray()\n\t{\n\t\treturn $this->makeReturnTable();\n\t}", "public function asArray(): array\n {\n return json_decode($this->result, true);\n }", "public function fetchAllZf1Changelogs()\n {\n $filters = $this->xmlRpc->getFavouriteFilters($this->jiraAuth);\n \n $versions = array();\n foreach ($filters as $filter) {\n if (preg_match('/fix.*?(\\d+\\.\\d+\\.\\d+)/i', $filter['name'], $m)) {\n $versions[$m[1]] = $filter['id'];\n }\n }\n \n $issues = array();\n foreach ($versions as $version => $filterId) {\n $issues[$version] = $this->fetchZf1ChangelogByJiraFilter($version, $filterId);\n }\n \n $this->console->writeLine(\"Writing to {$this->zf1DataFile}\");\n $fileContent = \"<\" . \"?php\\n\\$tags = \" \n . var_export($issues, 1) \n . \";\\nreturn \\$tags;\";\n file_put_contents($this->zf1DataFile, $fileContent);\n \n $this->console->writeLine('[DONE]', Color::GREEN);\n }", "public function fetchHistory(): array;", "protected function getOrderChanges()\n {\n $changes = array();\n\n foreach (static::$changes as $key => $data) {\n $names = explode(':', $key, 2);\n\n $name = static::getFieldHumanReadableName($names[0]);\n $subname = isset($names[1]) ? $names[1] : null;\n\n if ($subname) {\n $subname = static::getFieldHumanReadableName($subname);\n $changes[$name][$subname] = $data;\n\n } else {\n $changes[$name] = $data;\n }\n }\n\n return $changes;\n }", "public function getResponseData(): array\n {\n $responseData = [\n 'success' => $this->isSuccessful(),\n 'data' => $this->data,\n ];\n\n if ($this->error && !$this->isSuccessful()) {\n $responseData['error'] = $this->getErrorData();\n }\n\n if ($this->message) {\n $responseData['message'] = $this->message;\n }\n\n if (!empty($this->meta)) {\n $responseData['meta'] = $this->meta;\n }\n\n $responseData += ($this->fields ?: []);\n\n return $responseData;\n }", "public function getChangesFromIssue(int $issueId) : array\n {\n $results = $this->repository->fetchIssue(\n \"TYPO3-Documentation\",\n \"TYPO3CMS-Reference-CoreApi\",\n $issueId\n );\n\n $body = $results['body'] ?? '';\n\n $lines = explode(\"\\n\", $body);\n $types = array_keys($this->changes);\n\n $type = '';\n foreach ($lines as $line) {\n foreach ($types as $someType) {\n if (strpos($line, \"# $someType\", 0) === 0) {\n $type = $someType;\n break;\n }\n }\n if ($type && $line && strpos($line, '* [', 0) ===0) {\n // get title\n $matches = [];\n $result = preg_match('#\\* \\[[x ]?\\] \\[([^\\]]*)#', $line, $matches);\n if ($result != 1 || !($matches[1] ?? false)) {\n print(\"ERROR: No match for pattern title ... in line $line\\n\");\n exit(1);\n }\n $title = $matches[1];\n\n // get $url\n $matches = [];\n $result = preg_match('#\\* \\[[x ]?\\] \\[[^\\]]*\\]\\((.*)\\)#', $line, $matches);\n if ($result != 1 || !($matches[1] ?? false)) {\n print(\"ERROR: No match for pattern url ... in line $line\\n\");\n exit(1);\n }\n $url = $matches[1];\n\n $this->changesInIssue[$type]['changelogs'][$title] = [\n 'title' => $title,\n 'url' => $url,\n 'line' => $line\n ];\n }\n }\n\n return $this->changesInIssue;\n }", "public function getList()\n {\n $_params = array();\n return $this->master->call('webhooks/list', $_params);\n }", "public static function getChannels() {\n\t\t$channels = [];\n\t\ttry {\n\t\t\t$mapper = new ObjectMapper();\n\t\t\t$response = self::getResponse();\n\t\t\t$data = json_decode( $response, true );\n\t\t\tif ( count( $data['Channels'] ) > 0 ) {\n\t\t\t\tforeach ( $data['Channels'] as $dataProject ) {\n $channels[] = $mapper->mapJson( json_encode( $dataProject ), Channel::class );\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $channels;\n\t}", "public function getAllResult() {\n return $this->response;\n }" ]
[ "0.67157435", "0.61088574", "0.585037", "0.57277656", "0.56542236", "0.56542236", "0.5624591", "0.5572137", "0.55466884", "0.5533756", "0.55239457", "0.55141217", "0.5479879", "0.54715574", "0.545753", "0.545753", "0.545753", "0.545753", "0.545753", "0.545753", "0.545753", "0.54291654", "0.54279155", "0.53849643", "0.5371557", "0.5358073", "0.529181", "0.528974", "0.52842623", "0.5261654", "0.5238066", "0.5179621", "0.51568896", "0.5128463", "0.512419", "0.5114796", "0.510366", "0.50998944", "0.50874346", "0.50848705", "0.50844014", "0.50770324", "0.50702745", "0.50631183", "0.5058632", "0.50492626", "0.5036849", "0.50318754", "0.5027451", "0.5018169", "0.50019574", "0.4996479", "0.4976883", "0.49672547", "0.49601725", "0.49601725", "0.4957718", "0.4940866", "0.49314448", "0.49292704", "0.49213904", "0.4914818", "0.49144697", "0.49121013", "0.49084395", "0.49031433", "0.48872963", "0.48814848", "0.48652568", "0.48585376", "0.485609", "0.48501277", "0.484545", "0.48323646", "0.48295084", "0.48172572", "0.48170343", "0.48128563", "0.48086116", "0.48059058", "0.47986722", "0.47780073", "0.47645903", "0.47544506", "0.47480652", "0.47425276", "0.47400957", "0.4736759", "0.47211072", "0.4720644", "0.47180474", "0.47168443", "0.4713245", "0.47051388", "0.47050235", "0.4704908", "0.47039765", "0.47039604", "0.4702946", "0.46999007" ]
0.59232146
2
Construct a HttpBatchResponse object from raw batch response.
public static function Create($httpBatchResponse) { $changesetBoundary = null; $httpResponses = array(); if (!self::CheckIsError($httpBatchResponse)) { $changesetBoundary = HttpBatchResponse::ExtractChangesetBoundary($httpBatchResponse); if (!isset($changesetBoundary)) { throw new InvalidOperation(Resource::InvalidBatchResponseNoCSBoundary); } $httpResponses = HttpBatchResponse::ExtractHttpResponses($httpBatchResponse, $changesetBoundary); } return new HttpBatchResponse($httpResponses, $httpBatchResponse, $changesetBoundary); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAsHttpResponse()\n {\n $parts = explode(\"--\" . $this->_changesetBoundary,\n $this->_rawHttpBatchResponse, 2);\n return new Microsoft_Http_Response($this->GetCode(),\n HttpResponse::extractHeaders($parts[0]),\n (count($parts) == 2) ?\n ('--' . $this->_changesetBoundary . \"\\n\" . $parts[1]) :\n $parts[0]);\n }", "public function __construct(array $batch)\n\t{\n\t\tif(Tivoka::$version == Tivoka::VER_1_0) throw new Tivoka_exception('Batch requests are not supported by JSON-RPC 1.0 spec', Tivoka::ERR_SPEC_INCOMPATIBLE);\n\t\t$this->id = array();\n\t\n\t\t//prepare requests...\n\t\tforeach($batch as $request)\n\t\t{\n\t\t\tif(!($request instanceof Tivoka_Request) && !($request instanceof Tivoka_Notification))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t//request...\n\t\t\tif($request instanceof Tivoka_Request)\n\t\t\t{\n\t\t\t\tif(in_array($request->id,$this->id,true)) continue;\n\t\t\t\t$this->id[$request->id] = $request;\n\t\t\t}\n\t\t\t\n\t\t\t$this->request[] = $request->request;\n\t\t}\n\t}", "protected static function ExtractCorrectHttpLine($rawHttpBatchResponse)\n {\n if(preg_match_all(\"|HTTP/[\\d\\.x]+ \\d+ [^\\r\\n]+|\", $rawHttpBatchResponse,\n $multiArray, PREG_OFFSET_CAPTURE))\n {\n if (isset($multiArray[0]))\n {\n if (!(isset($multiArray[0][0]) &&\n isset($multiArray[0][0][0])))\n {\n return null;\n }\n\n $prevHeader = $multiArray[0][0][0];\n $index = self::ExtractBatchBoundaryIndex($rawHttpBatchResponse);\n unset($multiArray[0][0]);\n //If BatchBoundry tag is not present, then return the last HTTP\n //line from the collection.\n if($index == -1)\n {\n $count = count($multiArray[0]);\n if($count > 0)\n {\n $prevHeader = $multiArray[0][$count][0];\n }\n }\n else\n {\n foreach($multiArray[0] as $array)\n {\n if ($array[1] > $index)\n {\n break;\n }\n\n $prevHeader = $array[0];\n }\n }\n\n return $prevHeader;\n }\n }\n\n return null;\n }", "public function parse()\r\n\t{\r\n\t\tif(is_string($this->_raw)) {\r\n\t\t\t$response = self::toArray($this->_format, $this->_raw);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$response = $this->_raw;\r\n\t\t}\r\n\r\n\t\tif(!empty($response['error_code'])) {\r\n\t\t\tthrow new MediaMonks_Service_Hyves_Response_Exception($response['error_message'], $response['error_code']);\r\n\t\t}\r\n\t\t\r\n\t\tif(null == $this->_method && !empty($response['method'])) {\r\n\t\t\t$this->_method = $response['method'];\r\n\t\t\tunset($response['method']);\r\n\t\t}\r\n\t\t\r\n\t\t$this->_info = $response['info'];\r\n\t\tunset($response['info']);\r\n\t\t\r\n\t\t$this->_body = $response;\r\n\t\t\r\n\t\t// pagination\r\n\t\tif(!empty($this->_info['totalresults'])) {\r\n\t\t\t$this->_paginated = true;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_parsed = true;\r\n\t\treturn $this;\r\n\t}", "private function make_response_array($response) {\n $myarray = array();\n $data = explode(\"\\n\", $response);\n if (strpos($data[0], 'HTTP') === 0) {\n // the first line is a status code\n $myarray['status'] = $data[0];\n array_shift($data);\n }\n foreach ($data as $part) {\n if (json_decode($part)) {\n $myarray[] = json_decode($part);\n continue;\n }\n $middle = explode(\": \", $part, 2);\n $myarray[trim($middle[0])] = trim($middle[1]);\n }\n return $myarray;\n }", "public function __construct($raw) {\n parent::__construct($raw);\n\n // Map all response data into this object\n $this->transactionGroupId = $this->response['transaction_group_id']['@attributes']['id'];\n $this->transactionInfos = array();\n if (Text2PayApi_Common::isAssocArray($this->response['transaction_group_id']['transaction_id'])) {\n // it is a single transaction\n $trxid = $this->response['transaction_group_id']['transaction_id']['@attributes']['id'];\n $confirmation = $this->response['transaction_group_id']['transaction_id']['confirmation'];\n $this->transactionInfos[] = new Text2PayApi_verifyTransaction_TransactionInfo($trxid, $confirmation);\n }\n else {\n // it is a list of multiple transactions\n foreach($this->response['transaction_group_id']['transaction_id'] as $t) {\n $trxid = $t['@attributes']['id'];\n $confirmation = $t['confirmation'];\n \t$this->transactionInfos[] = new Text2PayApi_verifyTransaction_TransactionInfo($trxid, $confirmation);\n }\n }\n }", "public static function fromBaseResponse($response)\n {\n $baseResponse = $response->baseResponse;\n\n return new static(\n new Psr7Response($baseResponse->getStatusCode(), $baseResponse->headers->all(), $baseResponse->getContent()),\n $response\n );\n }", "protected static function ExtractHttpResponses($httpBatchResponse, $changesetBoundary)\n {\n $httpResponses = array();\n $parts = explode( \"--\" . $changesetBoundary, $httpBatchResponse);\n $count = count($parts);\n if($count < 2)\n {\n return $httpResponses;\n }\n\n unset($parts[0]);\n unset($parts[$count-1]);\n foreach ($parts as $changeSet)\n {\n $subParts = preg_split('|(?:\\r?\\n){2}|m', $changeSet, 2);\n $httpResponses[] = Microsoft_Http_Response::fromString($subParts[1]);\n }\n\n return $httpResponses;\n }", "public function interpretResponse($resparr) {\n\t\t//validate\n\t\tif(count($resparr) < 1 || !is_array($resparr)) {\n\t\t\tthrow new Tivoka_Exception('Expected batch response, but none was received', Tivoka::ERR_INVALID_RESPONSE);\n\t\t}\n\t\n\t\t$requests = $this->id;\n\t\t$nullresps = array();\n\t\t$responses = array();\n\t\n\t\t//split..\n\t\tforeach($resparr as $resp)\n\t\t{\n\t\t\tif(!is_array($resp)) throw new Tivoka_Exception('Expected batch response, but no array was received', Tivoka::ERR_INVALID_RESPONSE);\n\t\t\t\t\n\t\t\t//is jsonrpc protocol?\n\t\t\tif(!isset($resp['jsonrpc']) && !isset($resp['id'])) throw new Tivoka_Exception('The received reponse doesn\\'t implement the JSON-RPC prototcol.', Tivoka::ERR_INVALID_RESPONSE);\n\t\t\t\t\n\t\t\t//responds to an existing request?\n\t\t\tif(!array_key_exists($resp['id'], $requests))\n\t\t\t{\n\t\t\t\tif($resp['id'] != null) continue;\n\t\n\t\t\t\t$nullresps[] = $resp;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t//normal response...\n\t\t\t$requests[ $resp['id'] ]->setResponse(json_encode($resp));\n\t\t\tunset($requests[ $resp['id'] ]);\n\t\t}\n\t\n\t\t//handle id:null responses...\n\t\tforeach($requests as $req)\n\t\t{\n\t\t\t$resp = array_shift($nullresps);\n\t\t\t$requests[ $req->id ]->setResponse(json_encode($resp));\n\t\t}\n\t}", "private function parseDefaultResponse($rawResponse)\n {\n if (isset($rawResponse->body) && $rawResponse->body != '') {\n switch ($rawResponse->type) {\n case 'application/json':\n $content = JsonHelper::decode((string) $rawResponse->body);\n break;\n case 'application/msgpack':\n case 'application/x-msgpack':\n $content = msgpack_unpack((string) $rawResponse->body);\n break;\n default:\n $this->buildExceptionFromResponse($rawResponse);\n }\n if (!isset($content)) {\n $this->buildExceptionFromResponse($rawResponse);\n }\n } else {\n $content = null;\n }\n if (!isset($content['success'])) {\n $content = [\n 'success' => true,\n 'data' => $content,\n ];\n }\n if (!isset($rawResponse->headers['content-id']) && count($this->requests) == 1) {\n $rawResponse->headers['content-id'] = $this->requests[0]->id;\n }\n if (!isset($rawResponse->headers['content-id'])) {\n throw new Exception('Invalid response!');\n }\n $content['id'] = $rawResponse->headers['content-id'];\n $meta = isset($content['meta']) ? $content['meta'] : [];\n $content['meta'] = array_merge($rawResponse->customHeaders, $meta);\n $content['meta']['statusCode'] = (int) $rawResponse->statusCode;\n $content['headers'] = $rawResponse->headers;\n if (isset($content['data'])) {\n FileHelper::processFiles($content['data'], $content['id']);\n }\n if ((int) $rawResponse->statusCode >= 400 && $content['success']) {\n $content['success'] = false;\n $content['error'] = [\n 'code' => ResponseError::ERRORCODE_HTTP_ERROR,\n 'message' => $rawResponse->statusCode,\n ];\n }\n\n return new ApiResponse($content);\n }", "function _parseResponse($res) {\n\n\t\t// set defaults\n\t\t$response = $this->response;\n\t\t$response['raw']['response'] = $res;\n\n\t\t// parse header\n\t\tif (preg_match(\"/^(.+\\r\\n)(.*)(?<=\\r\\n)\\r\\n/Us\", $res, $match)) {\n\t\t\t\n\t\t\tlist($null, $response['raw']['status-line'], $response['raw']['header']) = $match;\n\t\t\t$response['raw']['body'] = substr($res, strlen($match[0]));\n\n\t\t\tif (preg_match(\"/(.+) ([0-9]{3}) (.+)\\r\\n/DU\", $response['raw']['status-line'], $match)) {\n\t\t\t\t$response['status']['http-version'] = $match[1];\n\t\t\t\t$response['status']['code'] = (int) $match[2];\n\t\t\t\t$response['status']['reason-phrase'] = $match[3];\n\t\t\t}\n\n\t\t\t$response['header'] = $this->_parseHeader($response['raw']['header']);\n\t\t\t$response['body'] = $response['raw']['body'];\n\n\t\t\tif (!empty($response['header'])) {\n\t\t\t\t$response['cookies'] = $this->parseCookies($response['header']);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t$response['body'] = $res;\n\t\t\t$response['raw']['body'] = $res;\n\t\t}\n\n\t\tif (isset($response['header']['Transfer-Encoding']) && $response['header']['Transfer-Encoding'] == 'chunked') {\n\t\t\t$response['body'] = $this->_decodeChunkedBody($response['body']);\n\t\t}\n\n\t\tforeach ($response['raw'] as $field => $val) {\n\t\t\tif ($val === '') {\n\t\t\t\t$response['raw'][$field] = null;\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}", "private function parseMultipartMixedResponse($rawResponse)\n {\n $responses = [];\n foreach ($rawResponse->parts as $part) {\n $response = null;\n try {\n $this->lastParsedContentId = null;\n $response = $this->parseResponse($part);\n } catch (\\Throwable $ex) {\n $response = new ApiResponse([\n 'id' => $this->lastParsedContentId ?? join('-', ['sdkError', ApiHelper::generateId()]),\n 'success' => false,\n 'error' => new ResponseError([\n 'type' => get_class($ex),\n 'code' => $ex->getCode(),\n 'message' => ['httpError' => $ex->getMessage()],\n 'exception' => $ex,\n ]),\n ]);\n }\n $responses[$response->id] = $response;\n }\n\n return $responses;\n }", "public static function createFromRaw(string $rawResponse, string $responseClassName = Response::class): ResponseInterface\n {\n $response = new $responseClassName();\n\n if (!$response instanceof ResponseInterface) {\n throw new \\InvalidArgumentException(sprintf('The given response class name \"%s\" does not implement the \"%s\" and cannot be created with this method.', $responseClassName, ResponseInterface::class));\n }\n\n // see https://tools.ietf.org/html/rfc7230#section-3.5\n $lines = explode(chr(10), $rawResponse);\n $statusLine = array_shift($lines);\n\n if (substr($statusLine, 0, 5) !== 'HTTP/') {\n throw new \\InvalidArgumentException('The given raw HTTP message is not a valid response.', 1335175601);\n }\n list($httpAndVersion, $statusCode, $reasonPhrase) = explode(' ', $statusLine, 3);\n $version = explode('/', $httpAndVersion)[1];\n if (strlen($statusCode) !== 3) {\n // See https://tools.ietf.org/html/rfc7230#section-3.1.2\n throw new \\InvalidArgumentException('The given raw HTTP message contains an invalid status code.', 1502981352);\n }\n $response = $response->withStatus((integer)$statusCode, trim($reasonPhrase));\n $response = $response->withProtocolVersion($version);\n\n $parsingHeader = true;\n $contentLines = [];\n $headers = new Headers();\n foreach ($lines as $line) {\n if ($parsingHeader) {\n if (trim($line) === '') {\n $parsingHeader = false;\n continue;\n }\n $headerSeparatorIndex = strpos($line, ':');\n if ($headerSeparatorIndex === false) {\n throw new \\InvalidArgumentException('The given raw HTTP message contains an invalid header.', 1502984804);\n }\n $fieldName = trim(substr($line, 0, $headerSeparatorIndex));\n $fieldValue = trim(substr($line, strlen($fieldName) + 1));\n if (strtoupper(substr($fieldName, 0, 10)) === 'SET-COOKIE') {\n $cookie = Cookie::createFromRawSetCookieHeader($fieldValue);\n if ($cookie !== null) {\n $headers->setCookie($cookie);\n }\n } else {\n $headers->set($fieldName, $fieldValue, false);\n }\n } else {\n $contentLines[] = $line;\n }\n }\n if ($parsingHeader === true) {\n throw new \\InvalidArgumentException('The given raw HTTP message contains no separating empty line between header and body.', 1502984823);\n }\n $content = implode(chr(10), $contentLines);\n\n $response->setHeaders($headers);\n $response = $response->withBody(ArgumentsHelper::createContentStreamFromString($content));\n\n return $response;\n }", "protected static function deserializeCsvResponse(string $rawResponse, AbstractCsvResponse $model): AbstractCsvResponse {\n\n $model->setRawResponse($rawResponse);\n\n $lines = explode(\"\\n\", $rawResponse);\n\n $count = count($lines);\n if ($count <= 1) {\n return $model;\n }\n\n $headers = explode(\",\", $lines[0]);\n\n for ($i = 1; $i < $count; ++$i) {\n\n $current = $lines[$i];\n if (\"\" === $current) {\n continue;\n }\n\n $model->addAdresse(static::deserializeAdresse($current, $headers));\n }\n\n return $model;\n }", "protected function parseResponse()\n {\n // get the status code from response.\n $statusCode = $this->httpResponse->getStatusCode();\n\n // set as error, if http status code is not between 200 and 299 (inclusive).\n $this->networkError = !($statusCode >= 200 && $statusCode <= 299);\n\n // decode the response body.\n $body = $this->decodeBody();\n\n // stop when no body is present.\n if ($body) {\n // parse the response id from the body.\n $this->id = (int) array_get($body, 'id', null);\n\n // set as error when there is a an error key and it's not null.\n $this->isError = array_get($body, 'error', null) !== null;\n\n // parse the response data, from result or error.\n $this->data = collect(array_get($body, $this->isError ? 'error' : 'result', []));\n }\n\n // just return the response body.\n return $this->body;\n }", "public function __construct($response)\n {\n @list($this->rawHeaders, $this->body) = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n $this->buildHeaders($this->rawHeaders);\n }", "public function GetRawHttpResponse()\n {\n return $this->_rawHttpBatchResponse;\n }", "public static function deserializeCollectionResponse(string $rawResponse): CollectionResponse {\n\n $data = json_decode(trim($rawResponse), true);\n\n $model = new CollectionResponse();\n $model->setRawResponse($rawResponse);\n\n if (null === $data) {\n return $model;\n }\n\n foreach (ArrayHelper::get($data, \"media\", []) as $current) {\n\n $type = ArrayHelper::get($current, \"type\");\n if (\"Photo\" === $type) {\n $model->addMedia(JsonDeserializer::deserializePhoto($current));\n }\n if (\"Video\" === $type) {\n $model->addMedia(JsonDeserializer::deserializeVideo($current));\n }\n }\n\n $model->setPage(intval(ArrayHelper::get($data, \"page\", -1)));\n $model->setPerPage(intval(ArrayHelper::get($data, \"per_page\", -1)));\n $model->setTotalResults(intval(ArrayHelper::get($data, \"total_results\", -1)));\n $model->setNextPage(ArrayHelper::get($data, \"next_page\"));\n $model->setPrevPage(ArrayHelper::get($data, \"prev_page\"));\n\n return $model;\n }", "protected function init()\n {\n if ($this->request->getResponseFormat() == 'xml') {\n $aggregated = new \\SimpleXMLElement('<response/>');\n foreach ($this->responseRaw as $name => $response) {\n $child = $aggregated->addChild('classification');\n $child->addAttribute('classifier', $name);\n $xml = simplexml_load_string($response);\n\n if (! $xml instanceof \\SimpleXMLElement) {\n throw new ServiceReaderException('Failed parsing XML response.');\n }\n\n if ((string) $xml->status->attributes()->success !== 'true') {\n throw new ServiceReaderException($xml->status->attributes()->statusCode);\n }\n\n foreach ($xml->readCalls->classify as $classify) {\n $child->addAttribute('textCoverage', $classify->classification->attributes()->textCoverage);\n foreach ($classify->classification->class as $class) {\n $this->simplexmlImportXml($child, $class->asXML());\n }\n }\n }\n\n return $aggregated->asXML();\n }\n\n if ($this->request->getResponseFormat() == 'json') {\n $aggregated = array();\n foreach ($this->responseRaw as $name => $response) {\n $current = json_decode($response, 1);\n\n if (! array_key_exists('success', $current)) {\n throw new ServiceReaderException('Unable to complete request');\n }\n\n if ($current['success'] !== true) {\n throw new ServiceReaderException($current['statusCode'] . ' ' . $current['errorMessage']);\n }\n\n array_key_exists('textCoverage', $current) ? '' : $current['textCoverage'] = null;\n array_key_exists('cls1', $current) ? '' : $current['cls1'] = null;\n\n $aggregated[] = array(\n 'classifier' => $name,\n 'textCoverage' => $current['textCoverage'],\n 'classes' => $current['cls1']\n );\n }\n\n return json_encode($aggregated);\n }\n\n return $this->responseRaw;\n }", "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "public function __construct($raw) {\n\n // Map all response data into this object\n $this->transactionId = $raw['@attributes']['id'];\n if (!empty($raw['merchant_reference']))\n $this->merchantRef = $raw['merchant_reference'];\n $this->confirmationStatus = $raw['confirmation_status'];\n $this->statusCode = $raw['status_code'];\n $this->statusTitle = $raw['status_title'];\n $this->statusDescription = $raw['status_description'];\n $this->serviceId = $raw['service_id'];\n $this->pricePoint = $raw['price_point'];\n $this->commodityAmount = $raw['commodity_amount'];\n }", "private function parse()\n {\n if ($this->isError()) {\n // error parsing\n if (empty($this->body) || !isset($this->body['errors'])) {\n // response body isn't an error object, return a custom one\n $error = new Entity\\Error();\n $error->message = \"Error $this->http_status\";\n $error->name = \"INVALID REQUEST\";\n $error->at = \"\";\n $this->objects[] = $error;\n } else {\n // parse error\n $errors = $this->body['errors'];\n foreach ($errors as $error) {\n $this->objects[] = Entity\\Error::parse($error);\n }\n }\n } else if (isset($this->body['card'])) {\n // card parsing\n $cards = $this->body['card'];\n foreach ($cards as $card) {\n $this->objects[] = Entity\\Card::parse($card);\n }\n } else if (isset($this->body['paymentmethod'])) {\n // payment parsing\n $this->objects[] = Entity\\Payment::parse($this->body);\n if (isset($this->body['subscription_plan'])) {\n // subscription also found, payment is a subscription\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n }\n } else if (isset($this->body['vendor'])) {\n // vendor parsing\n $this->objects[] = Entity\\Vendor::parse($this->body['vendor']);\n } else if (isset($this->body['item'])) {\n // item parsing\n $this->objects[] = Entity\\Item::parse($this->body['item']);\n } else if (isset($this->body['refunded'])) {\n // refund parsing, same as payment\n $this->objects[] = Entity\\Payment::parse($this->body);\n } else if (isset($this->body['subscription_plan'])) {\n // subscription parsing\n $this->objects[] = Entity\\Subscription::parse($this->body['subscription_plan']);\n } else if (isset($this->body['deleted'])) {\n // nothing to return\n } else {\n throw new \\RuntimeException('Could not recognize response type');\n }\n }", "public function __construct($response)\n {\n // Headers regex\n $pattern = '#HTTP/(\\d\\.\\d|\\d).*?$.*?#ims';\n\n // Extract headers from response\n preg_match_all($pattern, $response, $matches);\n\n list($headers, $body) = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n $headers_string = trim(preg_replace($pattern, '', $headers));\n $parsedHeaders = $this->parseHeaders($headers_string);\n\n // Remove headers from the response body\n\n $this->body = trim(str_replace($headers, '', $response));\n // Convert headers into an associative array\n $this->headers = $parsedHeaders;\n\n // Extract the version and status from the first header\n preg_match('#HTTP/(\\d\\.\\d|\\d)\\s(\\d\\d\\d)\\s(.*)#', $response, $matches);\n\n if($matches && count($matches) >= 3){\n $this->headers['httpVersion'] = $matches[1];\n $this->headers['statusCode'] = $matches[2];\n $this->headers['status'] = $matches[2].' '.$matches[3];\n }\n\n }", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "public function __construct($raw) {\n parent::__construct($raw);\n\n $this->transactionGroupId = $this->response['transaction_group_id']['@attributes']['id'];\n $this->totalPricePoint = $this->response['transaction_group_id']['@attributes']['total_price_point'];\n $this->totalCommodityAmount = $this->response['transaction_group_id']['@attributes']['total_commodity_amount'];\n\n $this->transactionStatusInfos = array();\n if (Text2PayApi_Common::isAssocArray($this->response['transaction_group_id']['transaction_id'])) {\n // it is a single transaction\n array_push($this->transactionStatusInfos, new Text2PayApi_checkTransactionStatus_TransactionStatusInfo($this->response['transaction_group_id']['transaction_id']));\n }\n else {\n // it is a list of multiple transactions\n foreach($this->response['transaction_group_id']['transaction_id'] as $t)\n array_push($this->transactionStatusInfos, new Text2PayApi_checkTransactionStatus_TransactionStatusInfo($t));\n }\n }", "public function build(): BatchRetrieveInventoryCountsResponse\n {\n return CoreHelper::clone($this->instance);\n }", "private function processResponse(Request $request, int $status, array $body): Iterator\n {\n if ($status < 200 || $status >= 300) {\n throw new BatchRequestException(sprintf(\n 'Unexpected status \"%d\" for request \"%s\": %s, %s',\n $status,\n $request->getUri(),\n $body['error']['code'] ?? '',\n $body['error']['message'] ?? '',\n ), $body['error']['message'], $body, $status);\n }\n\n // Map response body (eg. to files)\n /** @var iterable $values */\n $values = $request->hasResponseMapper() ? $request->getResponseMapper()($body) : [$body];\n foreach ($values as $key => $value) {\n // End if over limit (eg. last page has 10 items, but we need only 4)\n if ($this->limit && $this->processedCount >= $this->limit) {\n break;\n }\n\n // It is needed to specify key, otherwise it would be overwritten\n // ... because method is called multiple times, and without specifications are keys: 0, 1, 2 ...\n yield $this->processedCount => $value;\n\n // Increase processed\n $this->processedCount++;\n }\n }", "public static function deserializePhotosResponse(string $rawResponse): PhotosResponse {\n\n $data = json_decode(trim($rawResponse), true);\n\n $model = new PhotosResponse();\n $model->setRawResponse($rawResponse);\n\n if (null === $data) {\n return $model;\n }\n\n $model->setTotalResults(intval(ArrayHelper::get($data, \"total_results\", -1)));\n $model->setPage(intval(ArrayHelper::get($data, \"page\", -1)));\n $model->setPerPage(intval(ArrayHelper::get($data, \"per_page\", -1)));\n $model->setUrl(ArrayHelper::get($data, \"url\"));\n $model->setPrevPage(ArrayHelper::get($data, \"prev_page\"));\n $model->setNextPage(ArrayHelper::get($data, \"next_page\"));\n\n foreach (ArrayHelper::get($data, \"photos\", []) as $current) {\n $model->addPhoto(JsonDeserializer::deserializePhoto($current));\n }\n\n return $model;\n }", "public function createBatchUpdater()\n {\n return new Util\\BatchUpdater($this->conn->getClient(), $this);\n }", "public static function deserializePhotoResponse(string $rawResponse): PhotoResponse {\n\n $data = json_decode(trim($rawResponse), true);\n\n $model = new PhotoResponse();\n $model->setRawResponse($rawResponse);\n\n if (null === $data) {\n return $model;\n }\n\n $model->setPhoto(JsonDeserializer::deserializePhoto($data));\n\n return $model;\n }", "private function parseMultipartRelatedResponse($rawResponse)\n {\n $responseIds = [];\n foreach ($rawResponse->parts as $id => $part) {\n $response = new RawResponse($this->client, $part);\n if ($response->isFile()) {\n $this->parseResponse($part);\n } else {\n $responseIds[] = $id;\n }\n }\n $responses = [];\n foreach ($responseIds as $id) {\n $responses[] = $this->parseResponse($rawResponse->parts[$id]);\n }\n\n return $responses;\n }", "protected function prepareResponse($responseRaw, RestRequest $request)\n {\n $body = (string) $responseRaw->getBody();\n \n $parsedResult = json_decode($body);\n if ($parsedResult == false) {\n $parsedResult = new \\stdClass();\n }\n \n $response = new RestResponse($responseRaw->getStatusCode(), $body, $parsedResult, $request);\n \n return $response;\n }", "public function batchQuery(ParamsOfBatchQuery $query): ResultOfBatchQuery\n {\n return new ResultOfBatchQuery(\n $this->tonClient->request(\n 'net.batch_query',\n [\n 'operations' => $query,\n ]\n )->wait()\n );\n }", "public function deserializeResponse(string $response): Response;", "function processResponse($strResponse) {\n\t\tlist($theHeaders, $theBody) = explode(\"\\r\\n\\r\\n\", $strResponse, 2);\n\t\treturn array('headers' => $theHeaders, 'body' => $theBody);\n\t}", "protected static function ExtractBatchBoundaryIndex($httpBatchResponse)\n {\n preg_match(\"|boundary=(batchresponse_[^\\r\\n]+)|\", $httpBatchResponse,\n $m, PREG_OFFSET_CAPTURE);\n if (isset($m[1]) && isset($m[1][1])) { return $m[1][1]; }\n\n return -1;\n }", "public function __construct(Response $response)\n {\n $decoded = json_decode($response->getBody());\n\n //If things did not go well.\n if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 600) {\n $this->success = false;\n\n if (isset($decoded->error)) {\n $this->errors = $decoded->error;\n }\n\n if (!$this->errors) {\n // API calls don't always provide an error :(\n $this->errors[] = 'An error occurred, however, no error message was given. Use the response body, HTTP status code and URL to help troubleshoot the issue.';\n }\n\n //If things went well.\n } else {\n $this->body = $decoded;\n }\n\n $this->statusCode = $response->getStatusCode();\n\n //DME's request limit meta data.\n if (isset($response->getHeaders()['x-dnsme-requestId'])) {\n $this->requestId = $response->getHeaders()['x-dnsme-requestId'];\n }\n\n if (isset($response->getHeaders()['x-dnsme-requestsRemaining'])) {\n $this->requestsRemaining = $response->getHeaders()['x-dnsme-requestsRemaining'];\n }\n\n if (isset($response->getHeaders()['x-dnsme-requestLimit'])) {\n $this->requestLimit = $response->getHeaders()['x-dnsme-requestLimit'];\n }\n\n if(!$this->success){\n \tthrow new ResultErrorException($this);\n }\n }", "function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}", "private function createResponse($curl, $raw)\n {\n // fixes bug https://sourceforge.net/p/curl/bugs/1204/\n $version = curl_version();\n if (version_compare($version['version'], '7.30.0', '<')) {\n $pos = strlen($raw) - curl_getinfo($curl, CURLINFO_SIZE_DOWNLOAD);\n } else {\n $pos = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n }\n\n list($statsLine, $headers) = $this->parseHeaders(rtrim(substr($raw, 0, $pos)));\n $body = strlen($raw) > $pos ? substr($raw, $pos) : '';\n if (!preg_match('|^HTTP/([12].[01]) ([1-9][0-9][0-9]) (.*?)$|', $statsLine, $matches)) {\n throw new HttpException('Not a HTTP response');\n }\n\n return MessageFactoryDiscovery::find()->createResponse((int) $matches[2], $matches[3], $headers, $body, $matches[1]);\n }", "public function __construct(array $response, $multi = false, $size = 0, $from = 0)\n {\n $this->multi = $multi;\n\n $responses = null;\n if ($this->multi) {\n $responses = $response['responses'];\n $response = $responses[0];\n }\n\n $this->statusCode = (!$response['timed_out'] ? 200 : 404);\n $this->headers = [];\n\n try {\n $this->data = $responses ?? $response;\n $this->status = !$response['timed_out'] ? 'OK' : 'ERROR';\n $this->errors = $response['error'] ?? null;\n $this->debug = $contents['debug'] ?? null;\n $this->version = 1;\n $this->included = [];\n $this->meta = new Meta($this->data['hits']['total'] ?? 0, $size, $from);\n } catch (\\Exception $ex) {\n $this->success = false;\n $this->errors = $ex->getMessage();\n throw new \\Exception($ex->getMessage());\n }\n }", "public function __construct($response)\n {\n $this->transformResultData($response->results);\n\n }", "public function popolate_full_response($response){\n\t\t\n\t\tif(!is_array($response)){\n\t\t\t$response = json_decode(json_encode($response), true);\n\t\t}\n\t\t\n\t\tif(!is_array($response)){\n\t\t\tthrow new \\Exception(\"\\$response type must be iterable\");\n\t\t}\n\t\t\n\t\tforeach($response as $key => $value){\n\t\t\t\n\t\t\tif(!property_exists(self::class, $key)){\n\t\t\t\t$this->{$key} = $value;\n\t\t\t}\n\t\t}\n\t}", "protected function handleBatch()\n {\n if (!($requests = $this->router->getVariable('requests'))) {\n throw new \\ApiException(\\Phork::language()->translate('Missing batch definitions'), 400);\n }\n \n if (!(is_string($requests) && $requests = json_decode($requests, true))) {\n throw new \\ApiException(\\Phork::language()->translate('Invalid batch definitions'), 400);\n }\n \n foreach ($requests as $key => $request) {\n $key = isset($request['key']) ? $request['key'] : $key;\n if (!empty($request['method']) && !empty($request['url'])) {\n switch (strtolower($request['method'])) {\n case 'get':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::get($request['url'], false);\n break;\n\n case 'post':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::post($request['url'], !empty($request['args']) ? $request['args'] : array(), false);\n break;\n\n case 'put':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::put($request['url'], false);\n break;\n\n case 'delete':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::delete($request['url'], false);\n break;\n }\n } else {\n throw new \\ApiException(\\Phork::language()->translate('Missing request type and/or URL'), 400);\n }\n }\n\n $this->success = true;\n $this->result = array(\n 'batched' => isset($result) ? $result : array()\n );\n }", "function makeResponse($response)\n {\n $result = current(Util::toArray($response));\n\n $response = new Response([\n 'raw_body' => $result,\n\n ## get response message as array\n 'default_expected' => function($rawBody) use ($result) {\n return $result;\n }\n ]);\n // TODO handle exceptions\n\n /** @var iResponse $response */\n $response = $this->exceptionHandler($response);\n \n\n return $response;\n }", "public static function fromResponse(Response $response)\n {\n $responseArray = json_decode($response->getBody(), true);\n\n if (isset($responseArray['item']) === false) {\n throw new \\Exception('Missing item key in response.');\n }\n\n return new self($responseArray['item']);\n }", "public static function fromResponse(Response $response)\n {\n $responseArray = json_decode($response->getBody(), true);\n\n if (isset($responseArray['item']) === false) {\n throw new \\Exception('Missing item key in response.');\n }\n\n return new self($responseArray['item']);\n }", "public static function fromResponse(Response $response)\n {\n $responseArray = json_decode($response->getBody(), true);\n\n if (isset($responseArray['item']) === false) {\n throw new \\Exception('Missing item key in response.');\n }\n\n return new self($responseArray['item']);\n }", "public function processResponseData($rawResponseData);", "public function setBatches($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Ydb\\Topic\\StreamReadMessage\\ReadResponse\\Batch::class);\n $this->batches = $arr;\n\n return $this;\n }", "protected function curl_parse ( $response )\r\n\t{\r\n\t\tif (empty($response))\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\r\n\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$response,2);\r\n\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +100@', $lines[0]))\r\n\t\t{\r\n\t\t\t/* HTTP/1.x 100 Continue\r\n\t\t\t * the real data is on the next line\r\n\t\t\t*/\r\n\t\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$body,2);\r\n\t\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\t}\r\n\t\r\n\t\t// first line of headers is the HTTP response code\r\n\t\t$http_line = array_shift($lines);\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +([0-9]{3})@', $http_line, $matches))\r\n\t\t{\r\n\t\t\t$code = $matches[1];\r\n\t\t}\r\n\t\r\n\t\t// put the rest of the headers in an array\r\n\t\t$headers = array();\r\n\t\tforeach ($lines as $l)\r\n\t\t{\r\n\t\t\tlist($k, $v) = explode(': ', $l, 2);\r\n\t\t\t$headers[strtolower($k)] = $v;\r\n\t\t}\r\n\t\r\n\t\treturn array( 'code' => $code, 'headers' => $headers, 'body' => $body);\r\n\t}", "abstract protected function createResponse(GuzzleResponse $response);", "protected function Transform_Response($response)\n\t{\n\t\t\n\t\tif (is_string($response))\n\t\t{\n\t\t\t$response = new OLP_Response($response);\n\t\t}\n\t\t\n\t\t// we want the merged result so we have tokens for promo_id, etc.\n\t\t$data = array_merge($response->Signature()->To_Array(), $response->Collection()->To_Array());\n\t\t\n\t\t$proxy = new stdClass();\n\t\t$proxy->session_id = $response->Unique_ID();\n\t\t$proxy->page = $response->Page();\n\t\t$proxy->data = $data;\n\t\t$proxy->errors = $response->Errors()->To_Array();\n\t\t$proxy->event = array();\n\t\t\n\t\t// if we have a <section> element, turn it into\n\t\t// the eds_page in the response, using XSLT\n\t\tif (count($response->Content()->Sections()))\n\t\t{\n\t\t\t\n\t\t\t// which style-sheet?\n\t\t\t$xslt = DIR_SHARED.\"/xsl/{$response->Page()}.xsl\";\n\t\t\t\n\t\t\tif (is_file($xslt))\n\t\t\t{\n\t\t\t\t// transform our response\n\t\t\t\t$content = Transform_XML($xslt, $response->Received());\n\t\t\t\t$proxy->eds_page = array('content'=>$content, 'type'=>'text/html');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $proxy;\n\t\t\n\t}", "function batch($batch) {\n if(!$batch['total']) return false;\n $batch['size'] = $batch['size'] ? $batch['size'] : 1;\n $batch['start'] = $batch['start'] ? $batch['start'] : 0;\n $batch['end'] =min($batch['total']-1, $batch['start'] + $batch['size'] - 1);\n $ret = array('status'=> $batch['end']>=$batch['total']-1 ? 'end' : 'next') ;\n $batch['next'] = $batch['end'] + 1;\n return xpAS::merge($batch, $ret);\n }", "public function __construct($response) {\n\t\t$this->response = $response;\n\t\t$this->csv = $response->getBody();\n\t}", "public static function create(\\GuzzleHttp\\Psr7\\Response $response)\n {\n // - validate body\n $data = json_decode($response->getBody(), true, 512, JSON_BIGINT_AS_STRING);\n if (empty($data)) {\n throw new ApiException('Invalid response body');\n }\n // - validate internal data\n if (isset($data['status'])) {\n if ($data['status'] != 0) {\n throw new ApiException('Remote error: ' .\n (isset($data['status_message']) ? $data['status_message'] : '-'),\n $data['status']);\n }\n $item = new self();\n $item->data = $data;\n return $item;\n }\n throw new ApiException('Invalid response json');\n }", "public static function parseRawResponse($raw_data, $json_as_array = FALSE) {\n\t\tif ( !strlen($raw_data) ) throw new InvalidArgumentException(\"no data to parse\");\n\t\tif ( !substr_compare($raw_data, \"HTTP/1.1 100 Continue\\r\\n\\r\\n\", 0, 25) ) {\n\t\t\t$raw_data = substr($raw_data, 25);\n\t\t}\n\t\t$response = array('body'=>null);\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $raw_data,2);\n// \t\techo \"Headers : $headers , Body : $body\\n\";\n\t\t$headers_array=explode(\"\\n\",$headers);\n\t\t$status_line = reset($headers_array);\n\t\t$status_array = explode(' ',$status_line,3);\n\t\t$response['status_code'] = trim($status_array[1]);\n\t\t$response['status_message'] = trim($status_array[2]);\n\t\tif ( strlen($body) ) {\n\t\t\t$response['body'] = preg_match('@Content-Type:\\s+application/json@i',$headers) ? json_decode($body,$json_as_array) : $body ;\n\t\t}\n\t\treturn $response;\n\t}", "public function getMultipart()\n {\n\n if (empty($this->multipartTransactions)) {\n\n $this->multipartTransactions = array();\n\n if (!$this->isContentType('multipart/mixed')) {\n throw new Exception('Response is not multipart');\n }\n\n // Step 1. Get boundary\n\n preg_match('/boundary=([^\";]+)/i', $this->getContentType(), $matches);\n\n if (empty($matches[1])) {\n throw new Exception('Boundary not found');\n }\n\n $boundary = $matches[1];\n\n // Step 2. Split by boundary and remove first and last parts if needed\n\n $parts = explode('--' . $boundary . '', (string)$this->response->getBody()); //TODO Handle as stream\n\n if (empty($parts[0])) {\n array_shift($parts);\n }\n\n if (trim($parts[count($parts) - 1]) == '--') {\n array_pop($parts);\n }\n\n if (count($parts) == 0) {\n throw new Exception('No parts found');\n }\n\n // Step 3. Create status info object\n\n $statusInfoPart = array_shift($parts);\n $statusInfoObj = new self(null, trim($statusInfoPart), $this->response->getStatusCode());\n $statusInfo = $statusInfoObj->getJson()->response;\n\n // Step 4. Parse all parts into Response objects\n\n foreach ($parts as $i => $part) {\n\n $partInfo = $statusInfo[$i];\n\n $this->multipartTransactions[] = new self(null, trim($part), $partInfo->status);\n\n }\n\n }\n\n return $this->multipartTransactions;\n\n }", "public function rawResponseToArray($responseRaw) {\n $responseDecoded = json_decode($responseRaw, true, 10);\n $decodeError = json_last_error_msg();\n if ($decodeError != 'No error') {\n $this->addStatusMessage('JSON Decoder: ' . $decodeError, 'error');\n $this->addStatusMessage($responseRaw, 'debug');\n }\n return $responseDecoded;\n }", "public static function deserializeCollectionsResponse(string $rawResponse): CollectionsResponse {\n\n $data = json_decode(trim($rawResponse), true);\n\n $model = new CollectionsResponse();\n $model->setRawResponse($rawResponse);\n\n if (null === $data) {\n return $model;\n }\n\n foreach (ArrayHelper::get($data, \"collections\", []) as $current) {\n $model->addCollection(JsonDeserializer::deserializeCollection($current));\n }\n\n $model->setPage(intval(ArrayHelper::get($data, \"page\", -1)));\n $model->setPerPage(intval(ArrayHelper::get($data, \"per_page\", -1)));\n $model->setTotalResults(intval(ArrayHelper::get($data, \"total_results\", -1)));\n $model->setNextPage(ArrayHelper::get($data, \"next_page\"));\n $model->setPrevPage(ArrayHelper::get($data, \"prev_page\"));\n\n return $model;\n }", "public static function deserializeReverseCsvResponse(string $rawResponse): ReverseCsvResponse {\n return static::deserializeCsvResponse($rawResponse, new ReverseCsvResponse());\n }", "abstract protected function parseResponse($response);", "abstract function parse_api_response();", "public static function init(): self\n {\n return new self(new BatchRetrieveInventoryCountsResponse());\n }", "protected function _parse_respone($response)\n {\n $response = explode(self::RESPONSE_SEPARATOR, rtrim($response, self::RESPONSE_SEPARATOR));\n if ( is_array($response) ) {\n $this->response['status'] = $response[0];\n if ( $this->response['status'] == self::RESPONSE_OK ) {\n unset($response[0]);\n $this->response['data'] = $response;\n } else {\n $this->response['error'] = $response[1];\n }\n }\n }", "public function processResponse(\\SimpleXMLElement $response)\n {\n $this->data = array(\n 'bucket' => (string)$response->Bucket,\n 'key' => (string)$response->Key,\n 'upload_id' => (string)$response->UploadId,\n 'part_number_marker' => (string)$response->PartNumberMarker,\n 'next_token' => (string)$response->NextPartNumberMarker,\n 'is_truncated' => (((string)$response->IsTruncated == 'true') ? true : false),\n 'storage_class' => (string)$response->StorageClass,\n 'owner' => array(\n 'id' => (string)$response->Owner->ID,\n 'display_name' => (string)$response->Owner->DisplayName,\n ),\n 'initiator' => array(\n 'id' => (string)$response->Initiator->ID,\n 'display_name' => (string)$response->Initiator->DisplayName,\n )\n );\n\n $this->pageSize = (string)$response->MaxParts;\n\n if (!isset($this->data['resources'])) {\n $this->data['resources'] = array();\n }\n\n if ($response->Part) {\n foreach ($response->Part as $obj) {\n $this->data['resources'][] = $objData = array(\n 'part_number' => (string)$obj->PartNumber,\n 'last_modified' => (string)$obj->LastModified,\n 'etag' => str_replace('\"', '', (string)$obj->ETag),\n 'size' => (int)$obj->Size\n );\n }\n }\n }", "private function parseResult(string $result): HttpClientResponseInterface\n {\n $resultParts = explode(\"\\r\\n\\r\\n\", $result, 2);\n\n $headers = explode(\"\\r\\n\", $resultParts[0]);\n $statusLine = array_shift($headers);\n $statusLineParts = explode(' ', $statusLine);\n $httpCode = intval($statusLineParts[1]);\n if (in_array($httpCode, [100, 103])) {\n return $this->parseResult($resultParts[1]);\n }\n\n $content = '';\n if (count($resultParts) > 1) {\n $content = $resultParts[1];\n }\n\n $response = new HttpClientResponse($httpCode, $content);\n foreach ($headers as $header) {\n $response->addHeader(trim($header));\n }\n\n return $response;\n }", "protected function parseResponseData(HttpResponse $response)\n {\n return json_decode($response->getBody());\n }", "private static function _createBatchHelper(Api\\MtBatchSmsCreate &$batch)\n {\n $fields = [\n 'from' => $batch->getSender(),\n 'to' => $batch->getRecipients()\n ];\n\n if (null != $batch->getDeliveryReport()) {\n $fields['delivery_report'] = $batch->getDeliveryReport();\n }\n\n if (null != $batch->getSendAt()) {\n $fields['send_at'] = Serialize::_dateTime($batch->getSendAt());\n }\n\n if (null != $batch->getExpireAt()) {\n $fields['expire_at'] = Serialize::_dateTime($batch->getExpireAt());\n }\n\n if (null != $batch->getTags()) {\n $fields['tags'] = $batch->getTags();\n }\n\n if (null != $batch->getCallbackUrl()) {\n $fields['callback_url'] = $batch->getCallbackUrl();\n }\n\n return $fields;\n }", "public static function deserializeSearchCsvResponse(string $rawResponse) {\n return static::deserializeCsvResponse($rawResponse, new SearchCsvResponse());\n }", "private function parseResponse($response, $requestLog = null, $responseLog = null)\n {\n $rawResponse = new RawResponse($this->client, $response);\n $contentId = isset($rawResponse->headers['content-id']) ? $rawResponse->headers['content-id'] : null;\n $this->lastParsedContentId = $contentId;\n if (!isset($contentId) && count($this->cache) == 1) {\n $contentId = key($this->cache);\n }\n if ($this->client->cache && isset($contentId)) {\n if (isset($this->cache[$contentId])) {\n if ($rawResponse->statusCode == Http::STATUS_NOT_MODIFIED) {\n $response = $this->cache[$contentId]->getContent();\n $rawResponse = new RawResponse($this->client, $response);\n $rawResponse->headers['content-id'] = $contentId;\n $log = \"--------------------------------\\r\\nCached response\\r\\n--------------------------------\\r\\n\";\n $log .= $rawResponse->statusCode . \"\\r\\n\";\n foreach ($rawResponse->headers as $header => $value) {\n $log .= $header . ': ' . $value . \"\\r\\n\";\n }\n $log .= $rawResponse->body;\n $this->client->log(LOG_INFO, $log);\n } else {\n $this->cache[$contentId]->delete();\n }\n }\n if ($rawResponse->statusCode != Http::STATUS_NOT_MODIFIED && $rawResponse->statusCode < Http::STATUS_INTERNAL_SERVER_ERROR && isset($rawResponse->headers['etag'])) {\n $this->cache[$contentId]->set($rawResponse->headers['etag'], $rawResponse->message);\n }\n }\n $method = 'parse' . ApiHelper::camelize($rawResponse->type) . 'response';\n if ($rawResponse->type === '' || !method_exists($this, $method)) {\n $method = 'parseDefaultResponse';\n }\n try {\n return $this->$method($rawResponse);\n } catch (\\Exception $ex) {\n $this->client->dumpService->setPrefix($contentId);\n $this->client->dumpService->save($requestLog, DumpServiceInterface::DUMPTYPE_REQUEST);\n $this->client->dumpService->save($responseLog, DumpServiceInterface::DUMPTYPE_RESPONSE);\n $this->client->dumpService->saveException($ex);\n throw $ex;\n }\n }", "protected static function ExtractChangesetBoundary($httpBatchResponse)\n {\n preg_match(\"|boundary=(changesetresponse_[^\\r\\n]+)|\",\n $httpBatchResponse, $m);\n if (isset($m[1])) { return $m[1]; }\n return null;\n }", "function parse_response($response)\n {\n $data = $response->getBody();\n\n // Note we could not use Guzzle XML method becuase Endicia does not return valid XML it seems\n $sxe = new SimpleXMLElement($data);\n\n if ($sxe->status == 0) {\n $return_data = array();\n $return_data['Status'] = (string)$sxe->Status;\n $return_data['Base64LabelImage'] = (string)$sxe->Base64LabelImage;\n $return_data['TrackingNumber'] = (string)$sxe->TrackingNumber;\n $return_data['FinalPostage'] = (string)$sxe->FinalPostage;\n $return_data['TransactionID'] = (string)$sxe->TransactionID;\n $return_data['PostmarkDate'] = (string)$sxe->PostmarkDate;\n $return_data['DeliveryTimeDays'] = (string)$sxe->PostagePrice->DeliveryTimeDays;\n\t $return_data['error'] = (string)$data;\n \n\t\treturn $return_data;\n } else {\n return array('status' => 'error', 'message' => $sxe);\n }\n }", "public function parseResponse($response) {\n $this->_rawresponse = $response;\n $_response = new Payment_Response($this);\n $this->_response = $_response;\n return $this;\n }", "public function __construct(array $response = [])\n {\n $this->response = $response;\n }", "public function __construct($responses)\n {\n foreach ($responses as $response) {\n $this->responses[] = [\n 'field' => $response->field,\n 'type' => $response->type,\n 'value' => $response->response\n ];\n }\n }", "public static function fromResponse(Response $response, string $class): static\n {\n $collection = static::make($response->json('data'))->mapInto($class);\n\n if ($links = $response->json('links')) {\n $collection->setLinks($links);\n }\n\n if ($meta = $response->json('meta')) {\n $collection->setMeta($meta);\n }\n\n return $collection;\n }", "abstract public function createResponse(AbstractRequestClient $request);", "public function __construct( $raw_response_json ) {\n\n\t\t$this->raw_response_json = $raw_response_json;\n\n\t\t$this->response_data = json_decode( $raw_response_json );\n\t}", "protected static function CheckIsError($rawHttpBatchResponse)\n {\n $httpLine = self::ExtractCorrectHttpLine($rawHttpBatchResponse);\n if($httpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ (\\d+)|\", $httpLine, $m);\n if (isset($m[1]))\n {\n $floorVal = floor((int)$m[1] / 100);\n return ($floorVal == 4 || $floorVal == 5);\n }\n }\n\n return false;\n }", "public static function prepare($response)\n {\n if (! $response instanceof Response) {\n $response = new static($response);\n }\n\n return $response;\n }", "protected function responseToItems($response)\n {\n $array = array();\n foreach($response->product as $current) {\n\n if( !isset($current->name) || \n !isset($current->regularPrice) || \n !isset($current->url) || \n !isset($current->productId) ) \n {\n //If any of the required info is not present skip this item.\n continue;\n }\n\n $item = new Item();\n $item->setName((string)$current->name);\n $item->setPrice(intval((string)$current->regularPrice), Item::CURRENCY_UNIT_DOLLAR);\n $item->setLink((string)$current->url);\n $item->setvendorId((string)$current->productId);\n \n if(isset($current->thumbnailImage))\n {\n $item->setSmallImage((string)$current->thumbnailImage);\n }\n \n if(isset($current->image))\n {\n $item->setMediumImage((string)$current->image);\n }\n \n $array[] = $item;\n }\n\n return $array;\n\n }", "public function createResponse()\n {\n return new GuzzleResponse();\n }", "public function GetSubBatchHttpResponses()\n {\n return $this->_httpResponses;\n }", "public static function fromString($response_str)\n {\n $code = self::extractCode($response_str);\n $headers = self::extractHeaders($response_str);\n $body = self::extractBody($response_str);\n $version = self::extractVersion($response_str);\n $message = self::extractMessage($response_str);\n return new Microsoft_Http_Response($code, $headers, $body, $version, $message);\n }", "public static function binaryBatch(Api\\MtBatchBinarySmsCreate $batch)\n {\n $fields = Serialize::_createBatchHelper($batch);\n\n $fields['type'] = 'mt_binary';\n $fields['body'] = base64_encode($batch->getBody());\n $fields['udh'] = bin2hex($batch->getUdh());\n\n return Serialize::_toJson($fields);\n }", "public static function sendBatch($class, array $responses)\n {\n $data = [];\n foreach ($responses as $res) {\n $data[] = [\n $res->getStatusCode(),\n $res->getStatusText(),\n $res->getHeaders(),\n $res->getData()\n ];\n }\n\n $response = new $class(200);\n $response->addHeader(\"X-Response-Count\", count($data));\n $response->setData($data);\n $response->send();\n }", "public static function createFromResponse(Response $response): ResponseItem\n {\n $parsedResponseBody = $response->getParsedBody();\n if (!property_exists($parsedResponseBody, 'item')) {\n throw new ResponseException('Property item not set');\n }\n\n return new static($parsedResponseBody->item);\n }", "public static function fromXml(string $xml, AbstractResponse $response = null) : AbstractResponse\n {\n // Force an object.\n $response = $response ?? new GetPostageLabelRequestResponse();\n\n try {\n parent::fromXml($xml, $response);\n\n $xml = str_replace('www.envmgr.com/LabelService', '', $xml);\n \n $dom = new \\DOMDocument();\n $dom->loadXML($xml);\n\n $xp = new \\DOMXPath($dom);\n\n // If it's a failure we're done.\n if(!$response->isSuccessful()) {\n return $response;\n }\n\n /*\n * Validate/Set Label Image data\n */\n $b64ImageNodeList = $xp->query('Base64LabelImage');\n\t\t\tif($b64ImageNodeList->length == 1) {\n \t// we found the image as a single run of data\n\t\t\t\t$response->encodedImageData = $b64ImageNodeList[0]->nodeValue;\n\t\t\t} else {\n\t\t\t\t// a successful label but the label is not in Base64LabelImage\n\t\t\t\t// that means the Label node must exist and contain one or more chunks\n\t\t\t\t$labelNodeList = $xp->query('Label');\n\t\t\t\tif($labelNodeList->length != 1) {\n\t throw new InvalidArgumentException('API indicated a successful response but returned no label data');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$response->imageFragments = array();\n\t\t\t\t$imageFragments = $labelNodeList[0]->childNodes;\n\t\t\t\tforeach($imageFragments as $fragment) {\n\t\t\t\t\t$index = $fragment->getAttribute('PartNumber');\n\t\t\t\t\t$response->imageFragments[$index] = $fragment->textContent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n /*\n * Validate/Set Tracking Number\n */\n $trackingNumberNodeList = $xp->query('TrackingNumber');\n if($trackingNumberNodeList->length == 0) {\n throw new InvaliArgumentException('Response did not contain a Tracking Number');\n }\n\n $response->setTrackingNumber($trackingNumberNodeList[0]->textContent);\n\t\t\t\n return $response;\n } catch(\\Exception $e) {\n throw new InvalidArgumentException('Invalid LabelRequestResponse XML. ' . $e->getMessage(), null, $e);\n }\n }", "abstract public function convertFromResponse(SimplifiedResponse $response);", "public static function deserializeVideosResponse(string $rawResponse): VideosResponse {\n\n $data = json_decode(trim($rawResponse), true);\n\n $model = new VideosResponse();\n $model->setRawResponse($rawResponse);\n\n if (null === $data) {\n return $model;\n }\n\n $model->setTotalResults(intval(ArrayHelper::get($data, \"total_results\", -1)));\n $model->setPage(intval(ArrayHelper::get($data, \"page\", -1)));\n $model->setPerPage(intval(ArrayHelper::get($data, \"per_page\", -1)));\n $model->setUrl(ArrayHelper::get($data, \"url\"));\n $model->setPrevPage(ArrayHelper::get($data, \"prev_page\"));\n $model->setNextPage(ArrayHelper::get($data, \"next_page\"));\n\n foreach (ArrayHelper::get($data, \"videos\", []) as $current) {\n $model->addVideo(JsonDeserializer::deserializeVideo($current));\n }\n\n return $model;\n }", "public function __construct(\\GuzzleHttp\\Message\\ResponseInterface $response)\n {\n $this->http_status = intval($response->getStatusCode());\n $this->is_error = !($this->http_status >= 200 && $this->http_status < 300);\n try {\n $this->body = $response->json();\n }\n catch (\\GuzzleHttp\\Exception\\ParseException $e) { }\n \n $this->parse();\n }", "protected function processResponse($rawResponse, $contentType = self::CONTENT_TYPE_AUTO)\n\t{\n\t\tif (empty($rawResponse)) {\n\t\t\treturn [];\n\t\t}\n\t\tswitch ($contentType) {\n\t\t\tcase self::CONTENT_TYPE_AUTO: {\n\t\t\t\t$contentType = $this->determineContentTypeByRaw($rawResponse);\n\t\t\t\tif ($contentType == self::CONTENT_TYPE_AUTO) {\n\t\t\t\t\tthrow new Exception('Unable to determine response content type automatically.');\n\t\t\t\t}\n\t\t\t\t$response = $this->processResponse($rawResponse, $contentType);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase self::CONTENT_TYPE_JSON: {\n\t\t\t\t$response = Json::decode($rawResponse, true);\n\t\t\t\tif (isset($response['error'])) {\n\t\t\t\t\tthrow new Exception('Response error: ' . $response['error']);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase self::CONTENT_TYPE_URLENCODED: {\n\t\t\t\t$response = [];\n\t\t\t\tparse_str($rawResponse, $response);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase self::CONTENT_TYPE_XML: {\n\t\t\t\t$response = $this->convertXmlToArray($rawResponse);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tthrow new Exception('Unknown response type \"' . $contentType . '\".');\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t}", "private function setMultiArray($responseContent)\n {\n $jsonResponseContent = json_decode($responseContent, true);\n $error = json_last_error();\n if ($error) {\n print_r($responseContent);\n throw new InvalidArgumentException('Invalid json provided');\n }\n $this->responseBody = new MultiArray($jsonResponseContent);\n }", "public function prepareResponse($response)\n\t{\n\t\tif ($response instanceof modProcessorResponse) {\n\t\t\t$output = $response->getResponse();\n\t\t} else {\n\t\t\t$message = $response;\n\t\t\tif (empty($message)) {\n\t\t\t\t$message = $this->lexicon('err_unknown');\n\t\t\t}\n\t\t\t$output = $this->failure($message);\n\t\t}\n\t\tif ($this->config['jsonResponse'] AND is_array($output)) {\n\t\t\t$output = $this->modx->toJSON($output);\n\t\t} elseif (!$this->config['jsonResponse'] AND !is_array($output)) {\n\t\t\t$output = $this->modx->fromJSON($output);\n\t\t}\n\n\t\treturn $output;\n\t}", "function Receipt_Batch(){\n\t/*Constructor function initialises a new receipt batch */\n\t\t$this->Items = array();\n\t\t$this->ItemCounter=0;\n\t\t$this->total=0;\n\t}", "private function process(HttpSocketResponse $response)\n\t{\n\t\t$result = array();\n\t\tif (!empty($response)) {\n\t\t\t$body = $response->body();\n\t\t\tswitch ($this->format) {\n\t\t\t\tcase 'xml':\n\t\t\t\t\t$xml = Xml::build($body);\n\t\t\t\t\t$temp = Xml::toArray($xml);\n\t\t\t\t\t$result = array('Yourls' => $temp['result']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'json':\n\t\t\t\t\t$result = array('Yourls' => json_decode($body, true));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result = $body;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function executeBatch() {\n if (!$this->isBatch) {\n throw new JsonRpcException('Client is not in batch mode, start a batch operation by calling startBatch() first');\n }\n\n if (empty($this->batchRequests)) {\n throw new JsonRpcException('No batch requests are attached. Use call() first');\n }\n\n $batchRequests = $this->batchRequests;\n $this->discardBatch();\n\n return $this->parseBatchResponse($this->performRequest($batchRequests));\n }", "public function prepareResponse();", "public function parseErrors(Response $response);", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }" ]
[ "0.5658277", "0.56258756", "0.5618119", "0.5466368", "0.5367479", "0.53603345", "0.53492403", "0.5336909", "0.53273875", "0.5327176", "0.5307578", "0.53007185", "0.5270299", "0.52382547", "0.5231376", "0.5222696", "0.51875234", "0.5162311", "0.5123806", "0.5101168", "0.5096934", "0.50935215", "0.5074941", "0.505701", "0.50514543", "0.50261426", "0.50230235", "0.5021909", "0.49994978", "0.4996313", "0.4989754", "0.4947418", "0.49320903", "0.49318814", "0.49058396", "0.49031645", "0.48966673", "0.4876515", "0.48729807", "0.48627192", "0.48455063", "0.48289335", "0.48223272", "0.4810633", "0.48027644", "0.48027644", "0.48027644", "0.48013368", "0.4779244", "0.4765674", "0.47634146", "0.47457567", "0.4745633", "0.4738191", "0.47357398", "0.47352934", "0.47257158", "0.47215617", "0.47060055", "0.4705754", "0.47009632", "0.47001395", "0.46954948", "0.46911976", "0.4689459", "0.46772584", "0.46764114", "0.46726218", "0.4666986", "0.46433532", "0.46389034", "0.4634145", "0.46321857", "0.46177113", "0.46097738", "0.45962837", "0.4583689", "0.45823333", "0.45814735", "0.45751345", "0.45722333", "0.45601264", "0.45572147", "0.45561147", "0.45479867", "0.45475096", "0.45472822", "0.45428818", "0.4531942", "0.45264125", "0.4524936", "0.451818", "0.4516751", "0.4500146", "0.4484799", "0.44755903", "0.44735393", "0.44695282", "0.4456765", "0.4455964" ]
0.7419049
0
This function returns true if batch header of $rawHttpBatchResponse contains HTTP status code for error else false.
protected static function CheckIsError($rawHttpBatchResponse) { $httpLine = self::ExtractCorrectHttpLine($rawHttpBatchResponse); if($httpLine != null) { preg_match("|^HTTP/[\d\.x]+ (\d+)|", $httpLine, $m); if (isset($m[1])) { $floorVal = floor((int)$m[1] / 100); return ($floorVal == 4 || $floorVal == 5); } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasError()\n {\n return $this->info['http_code'] != '200';\n }", "public function isSuccessful(): bool\n {\n return \\in_array($this->getStatusCode(), [200, 201, 202, 204, 205]);\n }", "public function IsError()\n {\n if($this->_correctHttpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ (\\d+)|\", $this->_correctHttpLine, $m);\n if (isset($m[1]))\n {\n $floorVal = floor((int)$m[1] / 100);\n return ($floorVal == 4 || $floorVal == 5);\n }\n }\n\n return false;\n }", "public function isSuccessful()\n {\n return 400 > $this->statusCode;\n }", "public function isSuccessful()\n {\n return in_array($this->getCode(), ['300', '301', '302', '400']);\n }", "public function isSuccessful(): bool\n {\n return ($this->statusCode >= 200 && $this->statusCode <= 299);\n }", "public function isSuccessful(): bool\n {\n return $this->getStatusCode() >= 200 && $this->getStatusCode() < 300;\n }", "public function has_http_error($response) {\n if(!$response || !isset($response['response']['code']) || !preg_match('/20*/', $response['response']['code']) || !isset($response['body'])) {\n return true;\n }\n return false;\n }", "public function isSuccessful() {\n\t\treturn isset($this->data['status']) && $this->data['status'] >= 200 && $this->data['status'] < 300;\n\t}", "public function isSuccessful()\n {\n return ($this->statusCode >= 200) && ($this->statusCode < 300);\n }", "public function clientError()\n {\n return $this->status() >= 400 && $this->status() < 500;\n }", "public function isSuccessful()\n {\n $status = (int)$this->get('status');\n return $status >= 200 && $status <= 299;\n }", "public function isSuccessful(): bool\n {\n $statusCode = $this->getStatusCode();\n\n return ($statusCode >= 200 && $statusCode < 300) || $statusCode == 304;\n }", "public function isSuccessful()\n {\n return isset($this->data['response_code']) \n && \n ( substr($this->data['response_code'], 2) == '000' );\n }", "public function isSuccessful()\n {\n return $this->response->getStatusCode() >= 200 && $this->response->getStatusCode() < 300;\n }", "public function hasError() {\n return ($this->getStatus() != 1);\n }", "protected function isCaptureResponseErrorCode()\n {\n return in_array($this->reader->getResponseCode(), self::CAPTURE_ERROR_RESPONSE_CODES, true);\n }", "public function hasSuccessHTTPStatus() { return ($this->status == 200); }", "public function hasStatusCode(): bool\n {\n return isset($this->meta['status_code']);\n }", "public function isOk()\n {\n if ($this->statusCode >= 200 && $this->statusCode < 400) {\n return true;\n }\n\n return false;\n }", "public function isValid() : bool\n {\n return in_array($this->getStatusCode(), Response::CODE_LIST);\n }", "public function isSuccessful()\n {\n if (isset($this->data['result'])\n && empty($this->data['result']['parameterErrors'])\n && $this->getCode() < 400) {\n if (!empty($this->data['result']['code'])) {\n $code = $this->data['result']['code'];\n $success = false;\n switch ($code) {\n case (preg_match('/^(000\\.200)/', $code) ? true : false):\n case (preg_match('/^(000\\.000\\.|000\\.100\\.1|000\\.[36])/', $code) ? true : false):\n case (preg_match('/^(000\\.400\\.0|000\\.400\\.100)/', $code) ? true : false):\n $success = true;\n break;\n default:\n $success = false;\n }\n\n return $success;\n }\n\n return false;\n }\n\n return false;\n }", "public function isSuccess(): bool\n {\n return $this->code >= 200 && $this->code < 300;\n }", "public function isSuccessful(): bool\n {\n return $this->json('statusCode') === '00'\n && $this->json('errorCode') === null;\n }", "public function isClientError() {\n return (4 === $this->getStatusClass());\n }", "public function getStatus() {\r\n if ($this->status === \"error\") {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "public function isClientError(): bool\n {\n return $this->code >= 400 && $this->code < 500;\n }", "public function successful()\n {\n return $this->status() >= 200 && $this->status() < 300;\n }", "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "public function hasErrors()\n {\n if (isset($this->_response->ERROR)) {\n return true;\n }\n return false;\n }", "public function isFailed()\r\n {\r\n return $this->status < 0;\r\n }", "public function testImportRawHttpResponseWithADifferentStatusCode()\n {\n $this->testImportingRawHttpResponseString(array('status' => 201));\n }", "public function clientErrorOccurred(): bool\n {\n return $this->getStatusCode() >= 400 && $this->getStatusCode() < 500;\n }", "public function isSuccessful()\n {\n return count($this->errors) === 0;\n }", "public function isSuccess()\n {\n return ($this->isValidArray($this->response) && !isset($this->errorStack['error']));\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 }", "public function isSuccess(): bool\n {\n return $this->code >= CODE_OK && $this->code < CODE_BAD_REQUEST;\n }", "public function isStatusFailed()\n\t{\n\t\treturn $this->status == self::STATUS_FAILED;\n\t}", "public function isSuccessful()\n {\n return (0 == $this->code);\n }", "public function request_succeeded()\n {\n return curl_errno($this->ch) === 0;\n }", "public function canHaveBody() {\n return ( $this->status < 100 || $this->status >= 200 ) &&\n (!in_array($this->status, array(201, 204, 304)));\n }", "public function isSuccessful() {\n return (2 === $this->getStatusClass());\n }", "public function isError()\n {\n return isset($this->decodedBody['error']) || isset($this->decodedBody['errors']);\n }", "public function isOk() : bool\n {\n return $this->m_responseCode === 201;\n }", "public function isSuccessful() {\n\n return $this->result->success && 200 == $this->result->status_code;\n }", "public function is_error() \n\t\t{\n\t\t\t\t$json = json_decode( $this->response );\n\t\t\t\tif( $json->faultstring )\n\t\t\t\t{\n\t\t\t\t\t\t$this->error = $json->faultstring;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\treturn false;\n\n\t\t}", "public function isOk()\n {\n $codes = [\n static::STATUS_OK,\n static::STATUS_CREATED,\n static::STATUS_ACCEPTED,\n static::STATUS_NON_AUTHORITATIVE_INFORMATION,\n static::STATUS_NO_CONTENT\n ];\n\n return in_array($this->code, $codes);\n }", "public function isSuccess ()\n {\n return $this->info[ 'http_code' ] == '200';\n }", "function is_invalid_http_codes($http_codes) {\r\n foreach ($http_codes as $http_code) {\r\n if ( is_invalid_http_code($http_code) ) {\r\n return TRUE;\r\n }\r\n }\r\n}", "public function isServerError() {\n return (5 === $this->getStatusClass());\n }", "public function getHttpStatusCode(): int\n {\n preg_match('#^HTTP/1\\.1 (\\d+)#mi', $this->getHeaders(), $matches);\n \n return $matches[1] ?? false;\n }", "public function isOK()\n {\n return $this->getHTTPCode() == 200;\n }", "function getResponseStatus( $response ) {\n\t\t//this function is only supposed to make sure the communication was well-formed... \n\t\tif ( is_array( $response ) && array_key_exists( 'RESULT', $response ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isError()\n {\n return $this->getStatus() !== $this->config()->get('status_ok');\n }", "public function check()\n {\n if ($this->getResponse()->status == 'error') {\n return true;\n }\n\n return false;\n }", "private function checkUrlStatus()\n {\n $request = curl_init($this->url);\n\n curl_setopt($request, CURLOPT_HEADER, true);\n curl_setopt($request, CURLOPT_NOBODY, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($request, CURLOPT_TIMEOUT, 10);\n\n curl_exec($request);\n $httpCode = curl_getinfo($request, CURLINFO_HTTP_CODE);\n curl_close($request);\n\n if ($httpCode >= 200 && $httpCode < 400) {\n return true;\n }\n\n return false;\n }", "public function isClientError(): bool\n {\n return $this->code >= CODE_BAD_REQUEST &&\n $this->code < CODE_INTERNAL_SERVER_ERROR;\n }", "protected static function ExtractCorrectHttpLine($rawHttpBatchResponse)\n {\n if(preg_match_all(\"|HTTP/[\\d\\.x]+ \\d+ [^\\r\\n]+|\", $rawHttpBatchResponse,\n $multiArray, PREG_OFFSET_CAPTURE))\n {\n if (isset($multiArray[0]))\n {\n if (!(isset($multiArray[0][0]) &&\n isset($multiArray[0][0][0])))\n {\n return null;\n }\n\n $prevHeader = $multiArray[0][0][0];\n $index = self::ExtractBatchBoundaryIndex($rawHttpBatchResponse);\n unset($multiArray[0][0]);\n //If BatchBoundry tag is not present, then return the last HTTP\n //line from the collection.\n if($index == -1)\n {\n $count = count($multiArray[0]);\n if($count > 0)\n {\n $prevHeader = $multiArray[0][$count][0];\n }\n }\n else\n {\n foreach($multiArray[0] as $array)\n {\n if ($array[1] > $index)\n {\n break;\n }\n\n $prevHeader = $array[0];\n }\n }\n\n return $prevHeader;\n }\n }\n\n return null;\n }", "protected function verifyHeaders()\r\n\t{\r\n\t\tif(!array_key_exists(SONIC_HEADER__TARGET_API, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__TARGET_API . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__DATE, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__DATE . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__SIGNATURE, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__SIGNATURE . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__RANDOM, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__RANDOM . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__SOURCE_GID, $this->headers))\r\n\t\t\tthrow new MalformedResponseHeaderException(\"Malformed response: Header \" . SONIC_HEADER__SOURCE_GID . \" missing\");\r\n\t\telse if(!array_key_exists(SONIC_HEADER__PLATFORM_GID, $this->headers))\r\n\t\t\tthrow new MalformedRequestHeaderException(\"Malformed response: Header \" . SONIC_HEADER__PLATFORM_GID . \" missing\");\r\n\t\telse return true;\r\n\t}", "public function hasError()\n {\n if ( curl_errno($this->handler) ) {\n return true;\n }\n return false;\n }", "public function isOk() : bool\n {\n return $this->m_responseCode === 200;\n }", "public function isSuccessful()\r\n {\r\n return is_array($this->data);\r\n }", "public function hasErrors() {\n return (boolean) $this->_getErrorNumber();\n }", "protected function isFailedGroupTransaction()\n {\n return $this->hasPostData(\n 'brq_transaction_type',\n self::BUCK_PUSH_GROUPTRANSACTION_TYPE\n ) &&\n $this->hasPostData(\n 'brq_statuscode',\n $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_FAILED')\n );\n }", "public function hasError()\n {\n return $this->_detectFailureBoundaryInOutput(true);\n }", "public function isError()\n {\n return ($this->error_count > 0);\n }", "public function isFailed()\n {\n return static::STATUS_FAILED == $this->getStatus();\n }", "public function isServerError(): bool\n {\n return $this->code >= 500 && $this->code < 600;\n }", "public function isError() {\r\n\t return ($this->intCountErrors) ? true : false;\r\n\t }", "public function isSuccessful() : bool\n {\n return in_array($this->getStatusCode(), [static::$STATUS_OK, static::$STATUS_NOT_CHANGED]);\n }", "public function isError(): bool\n {\n return !$this->isOk();\n }", "public function isLastError(string $errorCode): bool;", "public static function isClientError($status){\n\t\tif($status >= $this::$HTTP_STATUS_BAD_REQUEST && $status < $this::$HTTP_STATUS_INTERNAL_SERVER_ERROR)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "function IsOK()\n\t{\n\t\treturn ($this->status == 200);\n\t}", "public function isValid()\n {\n $valid = TRUE;\n\n if ($this->body && !$this->hasHeader('Content-Length')) {\n $valid = 400;\n }\n\n return $valid;\n }", "public function IsError() {\n\t return ($this->error_count > 0);\n\t}", "public function hasFailure()\r\n {\r\n return count($this->strError) > 0;\r\n }", "public function isRequestSuccess(): bool\n {\n return count($this->errors) === 0;\n }", "protected function isApplyProcessError()\n {\n return in_array($this->reader->getStatusCode(), self::APPLY_PROCESS_ERROR, true);\n }", "function getStatusCode($response){\n\tif(preg_match(\"~HTTP/1\\.1 (\\d+)~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getStatusCode: invalid response from server\", true);\n\treturn false;\n}", "public function hadError() :bool {\n\t\treturn (($this->errNum < -1) or $this->shouldThrow);\n\t}", "public function isSuccessResponseStatus()\n {\n if ($this->curl->getStatus() >= 200 & $this->curl->getStatus() < 300) {\n return true;\n }\n\n return false;\n }", "public function hasError() {\r\n\t\treturn ($this->errorNumber ? true : false);\r\n\t}", "public static function isError($statusCode)\n {\n return $statusCode >= 400;\n }", "protected static function isErrorApiResponse($response): bool\n {\n return property_exists($response, 'status_code') &&\n property_exists($response, 'status') &&\n $response->status === 'failed';\n }", "public function isError(): bool\n {\n return $this->isClientError() || $this->isServerError();\n }", "public function hasError()\n {\n return $this->errors === 0;\n }", "private function successful($status): bool\n\t{\n\t\treturn $status >= 200 && $status < 300;\n\t}", "public function isError(): bool\n {\n return $this->get('json', 'error') === true;\n }", "public function lastCallFailed()\n {\n @trigger_error('The '.__METHOD__.' method is deprecated, use \\Redmine\\Client\\Client::getLastResponseStatusCode() instead.', E_USER_DEPRECATED);\n\n $code = $this->client->getLastResponseStatusCode();\n\n return 200 !== $code && 201 !== $code;\n }", "protected function isApiResponseSuccess(array $response)\n\t{\n\t\treturn in_array($response['ResponseCode'], [1, -290]);\n\t}", "protected function checkResponse($r){\n if (!is_array($r) || !array_key_exists('code', $r)){\n $this->log(\"No Response found\",'Warning');\n return false;\n }\n if ($r['code'] == 200){\n return true;\n } else {\n $xml = simplexml_load_string($r['body'])->Error;\n $this->log(\"Bad Response! \".$r['code'].\" \".$r['error'].\": \".$xml->Code.\" - \".$xml->Message,'Urgent');\n return false;\n }\n }", "public function isSuccessful()\n {\n return $this->data['status'];\n }", "public function isValid() {\n\n $valid = true;\n\n if ($this->isSecure()) {\n $valid = $valid && ($this->secureResponseCode == 200) && ($this->insecureResponseCode >= 200) && ($this->insecureResponseCode < 303);\n } else {\n $valid = $this->insecureResponseCode == 200;\n }\n\n return $valid;\n }", "public function hasErrors()\n {\n return count($this->get(self::ERRORS)) !== 0;\n }", "public function hasError()\n\t{\n\t\treturn $this->error || $this->error_code;\n\t}", "public function getHTTPStatusCode() { return $this->status; }", "public function hasRedirectHTTPStatus() { return ($this->status == 301 || $this->status == 302 || $this->status == 303); }", "public function getReturnedErrorCount()\n {\n $errors = 0;\n foreach ($this->data['calls'] as $call) {\n $errors += ($call['statusCode'] != 200) ? 1 : 0;\n }\n\n return $errors;\n }", "public function isFailed()\n {\n return $this->result == self::RESULT_FAILED;\n }" ]
[ "0.6734576", "0.6631673", "0.6616551", "0.6596415", "0.64952564", "0.64580846", "0.6440501", "0.6415775", "0.6405771", "0.637121", "0.62749845", "0.62698436", "0.62678117", "0.62673473", "0.6250424", "0.62315995", "0.6211907", "0.6209211", "0.6200225", "0.61797506", "0.61700463", "0.6121437", "0.6111263", "0.60765713", "0.6071539", "0.60655457", "0.6064821", "0.60529095", "0.60502005", "0.60144126", "0.60138553", "0.5986165", "0.5953134", "0.58849096", "0.5862695", "0.58536303", "0.58311856", "0.5829799", "0.581479", "0.58082795", "0.5791205", "0.57892966", "0.5784975", "0.57822454", "0.57741123", "0.57727474", "0.5769001", "0.57580096", "0.57564557", "0.5754032", "0.5752551", "0.5751892", "0.5749812", "0.5749524", "0.573971", "0.57279116", "0.57064146", "0.57008266", "0.5683842", "0.56728214", "0.5659184", "0.56548345", "0.5642519", "0.5642032", "0.5635572", "0.5633009", "0.56209236", "0.5617016", "0.5616379", "0.56134886", "0.5612963", "0.5610856", "0.56093824", "0.56067014", "0.56050134", "0.5602547", "0.5598569", "0.55840623", "0.55711514", "0.5557845", "0.5547432", "0.55459625", "0.55378443", "0.55254817", "0.55161834", "0.55067253", "0.550403", "0.5498863", "0.5488889", "0.54841137", "0.54708135", "0.5468405", "0.54548204", "0.54527384", "0.5431253", "0.54304045", "0.5422", "0.54209954", "0.54195374", "0.54103214" ]
0.7830958
0
To extract the final HTTP line. For example if Windows auth is enabled then the http response will contains 3 http headers. First two headers will be auth related and 3rd will be the actual IIS response specific to the request. We need to extract the 3rd one. Similarily in the case of Digest auth the repsonse will contains one auth header and one header specific to the request.
protected static function ExtractCorrectHttpLine($rawHttpBatchResponse) { if(preg_match_all("|HTTP/[\d\.x]+ \d+ [^\r\n]+|", $rawHttpBatchResponse, $multiArray, PREG_OFFSET_CAPTURE)) { if (isset($multiArray[0])) { if (!(isset($multiArray[0][0]) && isset($multiArray[0][0][0]))) { return null; } $prevHeader = $multiArray[0][0][0]; $index = self::ExtractBatchBoundaryIndex($rawHttpBatchResponse); unset($multiArray[0][0]); //If BatchBoundry tag is not present, then return the last HTTP //line from the collection. if($index == -1) { $count = count($multiArray[0]); if($count > 0) { $prevHeader = $multiArray[0][$count][0]; } } else { foreach($multiArray[0] as $array) { if ($array[1] > $index) { break; } $prevHeader = $array[0]; } } return $prevHeader; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastResponseHeaders() {}", "function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}", "function http_response_header_lines($hdr_str) {\n\t$lines = explode(\"\\n\", $hdr_str);\n\t$hdr_arr['status_line'] = trim(array_shift($lines));\n\tforeach ($lines as $line) {\n\t\tlist($key, $val) = explode(':', $line, 2);\n\t\t$hdr_arr[trim($key)] = trim($val);\n\t}\n\treturn $hdr_arr;\n}", "public function __getLastRequestHeaders() {\n\t\tif ($this->useCurl) {\n\t\t\treturn $this->lastRequestHeaders;\n\t\t}\n\t\treturn parent::__getLastResponseHeaders();\n\t}", "public function __getLastResponseHeaders() {\n\t\tif ($this->useCurl) {\n\t\t\treturn $this->lastResponseHeaders;\n\t\t}\n\t\treturn parent::__getLastResponseHeaders();\n\t}", "protected function getLastResponseHeaders()\n {\n return ParserRegistry::getInstance()->getParser('message')\n ->parseResponse($this->client->__getLastResponseHeaders());\n }", "public function getAuthorizationHeader() \n {\n $headers = null;\n \n if (isset($_SERVER['Authorization'])) {\n $headers = trim($_SERVER['Authorization']);\n }\n else if (isset($_SERVER['HTTP_AUTHORIZATION'])) {\n $headers = trim($_SERVER['HTTP_AUTHORIZATION']);\n } elseif (function_exists('apache_request_headers')) {\n $apacheHeaders = apache_request_headers();\n \n $apacheHeaders = array_combine(array_map('ucwords', array_keys($apacheHeaders)), array_values($apacheHeaders));\n if (isset($apacheHeaders['Authorization'])) {\n $headers = trim($apacheHeaders['Authorization']);\n }\n }\n \n //echo (\"Headers: \" . $headers .\"\\n\"); //debug\n return $headers;\n }", "public static function getServerAuthentication() {\n $header = array();\n // PHP as Apache module provides a SAPI function.\n // PHP 5.4+ enables getallheaders() also for FastCGI.\n if (function_exists('getallheaders')) {\n $headers = getallheaders();\n if (isset($headers['Authorization'])) {\n $input = $headers['Authorization'];\n }\n }\n // PHP as CGI with server/.htaccess configuration (e.g., via mod_rewrite)\n // may transfer/forward HTTP request data into server variables.\n elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) {\n $input = $_SERVER['HTTP_AUTHORIZATION'];\n }\n // PHP as CGI may provide HTTP request data as environment variables.\n elseif (isset($_ENV['HTTP_AUTHORIZATION'])) {\n $input = $_ENV['HTTP_AUTHORIZATION'];\n }\n if (isset($input)) {\n preg_match_all('@([^, =]+)=\"([^\"]*)\"@', $input, $header);\n $header = array_combine($header[1], $header[2]);\n }\n return $header;\n }", "public function getLastRequestHeaders()\n {\n return $this->__getLastRequestHeaders();\n }", "protected function read_auth_header() {\n\t\t$auth_header = isset( $_SERVER['HTTP_AUTHORIZATION'] ) ? $_SERVER['HTTP_AUTHORIZATION'] : null;\n\n\t\tif ( !is_null( $auth_header ) ) {\n\t\t\t// Grab our type\n\t\t\t$auth_header_type = explode( ' ', $auth_header )[0];\n\n\t\t\t// Grab our string, and do some string processing\n\t\t\t$auth_header_string = str_replace(\n\t\t\t\t\"\\r\\n\",\n\t\t\t\t'',\n\t\t\t\ttrim( substr( $auth_header, strlen( $auth_header_type ) ) )\n\t\t\t);\n\n\t\t\t// Process our string into params\n\t\t\t$auth_header_params = array();\n\t\t\t// Regex source: http://oauth.googlecode.com/svn/code/php/OAuth.php OAuthUtil::split_header()\n\t\t\tif ( preg_match_all( '/([a-z_-]*)=(:?\"([^\"]*)\"|([^,]*))/', $auth_header_string, $params ) ) {\n\t\t\t\tforeach( $params[1] as $key => $val ) {\n\t\t\t\t\t$auth_header_params[ $val ] = trim( $params[2][ $key ], '\"' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Combine our parts\n\t\t\t$auth_header_parts = (object) array(\n\t\t\t\t'type' => $auth_header_type,\n\t\t\t\t'string' => $auth_header_string,\n\t\t\t\t'params' => $auth_header_params,\n\t\t\t);\n\n\t\t\treturn $auth_header_parts;\n\t\t}\n\n\t\treturn false;\n\t}", "function get_headers3($Url, $Format= 0, $Depth= 0) {\n\n\t// echo 'checking: ' . $Url . PHP_EOL;\n\n if ($Depth > 5) return;\n $Parts = parse_url($Url);\n if (!array_key_exists('path', $Parts)) $Parts['path'] = '/';\n if (!array_key_exists('scheme', $Parts)) $Parts['scheme'] = 'http';\n if (!array_key_exists('port', $Parts)) $Parts['port'] = 80;\n\n\t// echo 'connecting to: ' . $Parts['host'] . ':' . $Parts['port'] . PHP_EOL;\n\t\n $Return = array();\n\n\tif ($Parts['scheme'] == 'https') {\n\t\t$fp = fsockopen('ssl://'.$Parts['host'], 443, $errno, $errstr, 30);\n\t} else {\n\t\t$fp = fsockopen($Parts['host'], $Parts['port'], $errno, $errstr, 30);\n\t}\n if ($fp) {\n $Out = 'GET '.$Parts['path'].(isset($Parts['query']) ? '?'.@$Parts['query'] : '').\" HTTP/1.1\\r\\n\".\n 'Host: '.$Parts['host'].($Parts['port'] != 80 ? ':'.$Parts['port'] : '').\"\\r\\n\".\n 'Connection: Close'.\"\\r\\n\";\n fwrite($fp, $Out.\"\\r\\n\");\n $Redirect = false; $RedirectUrl = '';\n while (!feof($fp) && $InLine = fgets($fp, 1280)) {\n if ($InLine == \"\\r\\n\") break;\n $InLine = rtrim($InLine);\n\n list($Key, $Value) = explode(': ', $InLine, 2);\n if ($Key == $InLine) {\n if ($Format == 1)\n $Return[$Depth] = $InLine;\n else $Return[] = $InLine;\n\n if (strpos($InLine, 'Moved') > 0) $Redirect = true;\n } else {\n if ($Key == 'Location') $RedirectUrl = $Value;\n if ($Format == 1)\n $Return[$Key] = $Value;\n else $Return[] = $Key.': '.$Value;\n }\n }\n fclose($fp);\n if ($Redirect && !empty($RedirectUrl)) {\n $NewParts = parse_url($RedirectUrl);\n if (!array_key_exists('host', $NewParts)) $RedirectUrl = $Parts['host'].$RedirectUrl;\n if (!array_key_exists('scheme', $NewParts)) $RedirectUrl = $Parts['scheme'].'://'.$RedirectUrl;\n $RedirectHeaders = get_headers3($RedirectUrl, $Format, $Depth+1);\n if ($RedirectHeaders) $Return = array_merge_recursive($Return, $RedirectHeaders);\n }\n return $Return;\n }\n return false;\n}", "public function authDigestGetUserDetails()\n {\n $subject = $this->getServerVariableValue('PHP_AUTH_DIGEST');\n if (empty($subject)) {\n return false;\n }\n $pattern = '@(nonce|nc|cnonce|qop|username|uri|response)=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@';\n //int , int\n $matches = array();\n $flags = PREG_SET_ORDER;\n $offset = 0;\n preg_match_all($pattern, $subject, $matches, $flags, $offset);\n\n $result = array();\n foreach ($matches as $match) {\n $result[$match[1]] = $match[3] ? $match[3] : $match[4];\n }\n return count($result) != 7 ? false : $result;\n }", "public function getLastRequestHeaders()\n {\n return null;\n }", "public function __getLastRequestHeaders()\n {\n return $this->lastRequestHeaders;\n }", "public function getLastHeaders()\n {\n return $this->getRequest()->getHeadersFromLastResponse();\n }", "function httpDigestParse($txt)\n{\n $needed_parts = array('nonce' => 1, 'nc' => 1, 'cnonce' => 1, 'qop' => 1, 'username' => 1, 'uri' => 1, 'response' => 1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\n}", "public function __getLastResponseHeaders()\n {\n return $this->lastResponseHeaders;\n }", "private function parseHttpLine(&$response, $line){\n $splittedLine = explode(' ', $line);\n $protocolAndVersion = explode('/', array_shift($splittedLine));\n $response['protocol'] = trim(array_shift($protocolAndVersion));\n $response['protocol_version'] = trim(array_shift($protocolAndVersion));\n $httpCode = trim(array_shift($splittedLine));\n $response['http_code'] = $httpCode;\n $response['http_message'] = trim(array_shift($splittedLine));\n $response['status'] = 200 <= $httpCode && $httpCode <= 299?'success':'failure';\n }", "public function getLastResponseHeaders()\n {\n return $this->__getLastResponseHeaders();\n }", "function getresponseheader($header = false){\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head){\n if ( is_integer(strpos ($head, $header) )){\n $hstart = strpos ($head, \": \");\n $head = trim(substr($head,$hstart+2,100));\n return $head;\n }\n }\n }", "function getHeader() {\n\tglobal $server, $html, $hostname, $userpwd;\n\t$chopts = array(\n\t\tCURLOPT_URL=>$hostname,\n\t CURLOPT_PORT=>80,\n\t CURLOPT_TIMEOUT=>5,\n\t CURLOPT_RETURNTRANSFER=>true,\n\t CURLOPT_HEADER=>true,\n\t CURLOPT_USERPWD=>\"$userpwd\",\n\t CURLOPT_FOLLOWLOCATION=>true);\n\n\t$ch = curl_init();\n\tcurl_setopt_array($ch, $chopts);\n\t$return = curl_exec($ch);\n\n\t// check for authentication failures using http codes *EXPERIMENTAL*\n\t/*\n\t$hCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\tif(isset($hCode)) {\n\t\tswitch($hCode) {\n\t\t\tcase \"401\": echo \"[-] authentication failure for: $hostname ($userpwd)\\n\"; exit(0);\n\t\t\tcase \"501\": echo \"[-] authentication failure for: $hostname ($userpwd)\\n\"; exit(0);\n\t\t\tdefault: break;\n\t\t}\n\t}\n\t*/\n\n\t// check for connection timeout using curl error codes\n\tif(curl_errno($ch)) {\n\t\tif(curl_errno($ch) == 28) {\n\t\t\tlogIT('e',\"[!] connection timed out to: $hostname, skipping...\");\n\t\t\techo \"[!] connection timed out to: $hostname, skipping...\\n\";\n\t\t\texit(0);\n\t\t}\n\t}\n\tcurl_close($ch);\n\n\t$headers = http_response_headers($return);\n\tforeach ($headers as $header) {\n\t\t$hdr_arr = http_response_header_lines($header);\n\t if(isset($hdr_arr['Location'])) {\n\t $str = $hdr_arr['Location'];\n\t $html = file_get_contents_curl(\"$str\", \"$userpwd\");\n\t } else {\n\t $html = file_get_contents_curl(\"$hostname\", \"$userpwd\");\n\t }\n\t if(isset($hdr_arr['Server'])) {\n\t\t\t$server = $hdr_arr['Server'];\n\t\t}\n\t}\n}", "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 getRespHeaders()\n {\n $headerSize = curl_getinfo($this->res, CURLINFO_HEADER_SIZE);\n\n return substr($this->lastResponse, 0, $headerSize);\n }", "public function getHeaders(): array\n {\n $headers = [];\n\n foreach ($this->parameters as $key => $value) {\n\n if (Str::startsWith($key, 'HTTP_')) {\n $headers[Str::cutFromStart($key, 5)] = $value;\n\n } elseif (in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) {\n $headers[$key] = $value;\n }\n }\n\n // TODO check and refactor\n\n if ($this->has('PHP_AUTH_USER')) {\n $headers['PHP_AUTH_USER'] = $this->get('PHP_AUTH_USER');\n $headers['PHP_AUTH_PW'] = $this->get('PHP_AUTH_PW', '');\n\n } else {\n /*\n * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default\n * For this workaround to work, add these lines to your .htaccess file:\n * RewriteCond %{HTTP:Authorization} .+\n * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]\n *\n * A sample .htaccess file:\n * RewriteEngine On\n * RewriteCond %{HTTP:Authorization} .+\n * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]\n * RewriteCond %{REQUEST_FILENAME} !-f\n * RewriteRule ^(.*)$ app.php [QSA,L]\n */\n\n $authorizationHeader = null;\n\n if ($this->has('HTTP_AUTHORIZATION')) {\n $authorizationHeader = $this->get('HTTP_AUTHORIZATION');\n } elseif ($this->has('REDIRECT_HTTP_AUTHORIZATION')) {\n $authorizationHeader = $this->get('REDIRECT_HTTP_AUTHORIZATION');\n }\n\n if ($authorizationHeader !== null) {\n\n if (Str::startsWith($authorizationHeader, 'basic ')) {\n\n // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic\n $exploded = explode(':', base64_decode(Str::cutFromStart($authorizationHeader, 6)), 2);\n\n if (count($exploded) === 2) {\n [$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded;\n }\n\n } else if (empty($this->parameters['PHP_AUTH_DIGEST']) && (Str::startsWith($authorizationHeader, 'digest '))) {\n // In some circumstances PHP_AUTH_DIGEST needs to be set\n $headers['PHP_AUTH_DIGEST'] = $authorizationHeader;\n $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader;\n\n } else if (0 === stripos($authorizationHeader, 'bearer ')) {\n /*\n * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables,\n * I'll just set $headers['AUTHORIZATION'] here.\n * https://php.net/reserved.variables.server\n */\n $headers['AUTHORIZATION'] = $authorizationHeader;\n }\n }\n }\n\n if (!isset($headers['AUTHORIZATION'])) {\n // PHP_AUTH_USER/PHP_AUTH_PW\n if (isset($headers['PHP_AUTH_USER'])) {\n $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']);\n } elseif (isset($headers['PHP_AUTH_DIGEST'])) {\n $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "public function getResponseHeaders();", "public function getLastResponseHeaders()\n {\n return null;\n }", "public function getLastResponse()\r\n\t{\r\n\t\treturn array('headers' => $this->response_headers[count($this->response_headers)-1],\r\n\t\t'content' => $this->response_content);\r\n\t}", "protected static function ExtractCorrectHttpLine($rawHttpResponse, &$index = 0)\n {\n if(preg_match_all (\"|HTTP/[\\d\\.x]+ \\d+ [^\\r\\n]+|\", $rawHttpResponse,\n $multiArray, PREG_OFFSET_CAPTURE))\n {\n if (isset($multiArray[0]))\n {\n if (!(isset($multiArray[0][0]) &&\n isset($multiArray[0][0][0])))\n {\n return null;\n }\n\n $correctHeaderIndex = count($multiArray[0]) - 1;\n $index = $multiArray[0][$correctHeaderIndex][1];\n return $multiArray[0][$correctHeaderIndex][0];\n }\n }\n\n return null;\n }", "private function read_header($ch, $string) {\r\n if (preg_match('/^(.*): (.*?)\\s?$/', $string, $result)) {\r\n if (!$this->out_total && $result[1] == 'Content-Length') {\r\n $this->out_total = intval($result[2]);\r\n if ($this->out_total != $this->content_length)\r\n $this->content_length = $this->out_total;\r\n }\r\n\r\n if (!$this->finish_write_headers && in_array($result[1], $this->proxy_headers))\r\n header(\"{$result[1]}: {$result[2]}\");\r\n }\r\n else if (preg_match('/^HTTP\\/1\\.[01] (\\d+) (.*)\\s?$/', $string, $result)) {\r\n $this->code = intval($result[1]);\r\n if ($this->code == 200 || $this->code == 302) {\r\n // OK, write response\r\n if (!$this->finish_write_headers) {\r\n header(\"Content-Type: {$this->content_type}\");\r\n\r\n foreach ($this->headers as $key => $value) {\r\n header(\"$key: $value\");\r\n }\r\n }\r\n } else {\r\n // Error\r\n return 0;\r\n }\r\n }\r\n return strlen($string);\r\n }", "function getResponseHeaders();", "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 }", "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}", "function processHeader( $lastLine = CRLF )\r\n\t{\r\n\t\tif( $this->debug & DBGLOW ) echo \"processHeader( [lastLine] )\\n\";\r\n\t\t$headers = array();\r\n\t\t$finished = false;\r\n\t\t\r\n\t\twhile ( ( ! $finished ) && ( ! feof($this->socket)) ) {\r\n\t\t\t$str = fgets( $this->socket, 1024 );\r\n\t\t\tif( $this->debug & DBGINDATA ) echo \"HEADER : $str\";\r\n\t\t\t$finished = ( $str == $lastLine );\r\n\t\t\tif ( !$finished ) {\r\n\t\t\t\tlist( $hdr, $value ) = split( \": \", $str, 2 );\r\n\t\t\t\t// nasty workaround broken multiple same headers (eg. Set-Cookie headers) @FIXME \r\n\t\t\t\tif( isset( $headers[$hdr]) )\r\n\t\t\t\t\t$headers[$hdr] .= \"; \" . trim($value);\r\n\t\t\t\telse\r\n\t\t\t\t\t$headers[$hdr] = trim($value);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $headers;\r\n\t}", "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 }", "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 getRawResponseHeaders() {\n\t}", "public function getHTTPHeaders() {\n\t\treturn array(\n\t\t\t'Authorization: Basic '.base64_encode($this->username.':'.$this->password)\n\t\t);\n\t}", "private function getAuthHeader()\n\t\t{\n\t\t\tif (isset($_SERVER['Authorization'])) {\n\t\t\t\treturn $_SERVER['Authorization'];\n\t\t\t} elseif (function_exists('apache_request_headers')) {\n\t\t\t\t$headers = apache_request_headers();\n\t\t\t\tif (isset($headers['Authorization'])) {\n\t\t\t\t\treturn $headers['Authorization'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthrow new Exception(\"No authorization data!\");\n\t\t}", "static public function getCurlResponseBody($response) {\n $parts = explode(\"\\r\\n\\r\\n\", $response);\n return end($parts);\n }", "private static function getHeaderAndBody($response) {\n\n $header = self::http_parse_headers(substr($response, 0, strrpos($response,\"\\r\\n\\r\\n\")));\n $body = substr($response, strrpos($response,\"\\r\\n\\r\\n\")+4);\n\n return array($header,$body);\n }", "function http_digest_parse($txt)\n{\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\n}", "public function getRawHeaders()\n {\n $protocolVersion = $this->protocolVersion ? : '1.1';\n\n return trim($this->method . ' ' . $this->getResource()) . ' ' .\n strtoupper(str_replace('https', 'http', $this->getScheme())) . '/' .\n $protocolVersion . \"\\r\\n\" . implode(\"\\r\\n\", $this->getHeaderLines());\n }", "function http_digest_parse($txt)\n{\n // protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\n}", "function http_digest_parse($txt)\n{\n // protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\n}", "function http_digest_parse($txt)\n{\n // protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\n}", "public function getHeaderValue();", "public function getRequestHeaders()\n {\n return curl_getinfo($this->res, CURLINFO_HEADER_OUT);\n }", "public function GetHeaders()\n {\n return HttpResponse::extractHeaders($this->_rawHttpBatchResponse);\n }", "function get_headers_from_curl_response($response) {\n $headers = array();\n\n $header_text = substr($response, 0, strpos($response, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if ($i === 0)\n $headers['http_code'] = $line;\n else {\n list ($key, $value) = explode(': ', $line);\n $headers[$key] = $value;\n }\n return $headers;\n}", "public function getHeader()\n {\n return $this->httpHeader;\n }", "public function GetMessage()\n {\n if($this->_correctHttpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ \\d+ ([^\\r\\n]+)|\",\n $this->_correctHttpLine, $m);\n if (isset($m[1])) { return $m[1]; }\n }\n return false;\n }", "protected static function get_response_headers()\n {\n }", "protected function fetchHeader($response)\r\n {\r\n $headers = [];\r\n $headerSize = 0;\r\n $headerParts = explode(PHP_EOL, $response);\r\n\r\n foreach ($headerParts as $headerString) {\r\n\r\n $headerSize += strlen($headerString);\r\n\r\n $headerString = trim($headerString);\r\n if (empty($headerString)) {\r\n break;\r\n }\r\n\r\n if (strpos($headerString, ':') !== false) {\r\n $headerSize += strlen(PHP_EOL);\r\n $headerString = str_replace('\"', '', $headerString);\r\n $headerStringParts = explode(':', $headerString);\r\n $headerStringParts = array_map('trim', $headerStringParts);\r\n\r\n $headers[ $headerStringParts[ 0 ] ] = $headerStringParts[ 1 ];\r\n } elseif (preg_match(\"/(HTTP\\/[0-9].[0-9])\\s([0-9]+)\\s([a-zA-Z]+)/\", $headerString, $matches)) {\r\n $headerSize += strlen(PHP_EOL);\r\n\r\n $this->info->httpVersion = $matches[ 1 ];\r\n $this->info->httpCode = $matches[ 2 ];\r\n $this->info->httpCodeDescription = $matches[ 3 ];\r\n }\r\n }\r\n\r\n $this->headers = new Headers($headers);\r\n\r\n // Update info\r\n if ($this->headers->offsetExists('contentType')) {\r\n $this->info->contentType = $this->headers->offsetGet('contentType');\r\n }\r\n\r\n $this->info->headerSize = $headerSize;\r\n }", "function ws_getheaders($data) {\n //if(!preg_match('/\\AGET (\\S+) HTTP\\/1.1\\z/', $lines[0], $matches))\n\n\t$lines = preg_split(\"/\\r\\n/\",rtrim($data));\n\t$lines[0] = \"info: \".$lines[0];\n\t\n\t$headers = array();\n\tforeach($lines as $line)\n\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', rtrim($line), $matches)) $headers[$matches[1]] = $matches[2];\n\n\treturn $headers;\n}", "function getRedirectLocation($response){\n\tif(preg_match(\"~Location: (.+)\\r\\n~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getRedirectLocation: unparsable HTTP headers\", true);\n\treturn false;\n}", "function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}", "public function getLastHeaders()\n {\n return $this->lastHeaders;\n }", "final protected function getLastHttpResponse()\n {\n $info = curl_getinfo($this->curl_handle);\n return $info[\"http_code\"];\n }", "abstract public function getHeaders();", "#[Pure]\nfunction http_get_request_headers() {}", "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 }", "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 }", "function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}", "public function getLastResponseInfo() {}", "function http_build_request_headers()\n\t{\n\t\t$this->http_auth_headers();\n\t\t$this->http_headers_add('Connection', \"Close{$this->http_linebreak}\");\n\t\t$request = $this->http_headers_to_s($this->http_request_headers);\n\t\t$this->http_request_headers = array();\n\n\t\treturn $request;\n\t}", "function getHeaders($respHeaders)\n{\n $headers = array();\n\n $headerText = substr($respHeaders, 0, strpos($respHeaders, \"\\r\\n\\r\\n\"));\n\n foreach (explode(\"\\r\\n\", $headerText) as $i => $line) {\n if ($i === 0) {\n $headers['http_code'] = $line;\n } else {\n list($key, $value) = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return $headers;\n}", "public function getHeader();", "public function getHeader();", "public function getHeader();", "function http_digest_parse($txt)\n{\n // protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\t\n\t//error_log(\"Parsing $txt against $keys\");\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\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 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 }", "public function getAuthorizationHeader()\n {\n // from the request, try to fall back to our own non-standard header\n $names = ['authorization', 'arengu-authorization'];\n\n // https://bugs.php.net/bug.php?id=72915\n // https://github.com/symfony/symfony/issues/19693\n // https://datatracker.ietf.org/doc/html/rfc3875#section-9.2\n foreach ($names as $lower) {\n $upper = strtoupper($lower);\n $prefixed = 'HTTP_' . str_replace('-', '_', $upper);\n\n // fpm/cli\n if (!empty($_SERVER[$prefixed])) {\n return $_SERVER[$prefixed];\n }\n \n // old cgi?\n if (!empty($_SERVER[$upper])) {\n return $_SERVER[$upper];\n }\n\n // apache\n $apache_headers = $this->getApacheHeaders();\n\n if (!empty($apache_headers[$lower])) {\n return $apache_headers[$lower];\n }\n }\n\n return '';\n }", "function http_digest_parse($txt)\n\t{\n\t\t// protect against missing data\n\t\t$needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1, 'realm'=>1);\n\t\t$data = array();\n\t\t$keys = implode('|', array_keys($needed_parts));\n\n\t\tpreg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n\t\tforeach ($matches as $m) {\n\t\t\t$data[$m[1]] = $m[3] ? $m[3] : $m[4];\n\t\t\tunset($needed_parts[$m[1]]);\n\t\t}\n\n\t\treturn $needed_parts ? false : $data;\n\t}", "function http_parse_headers($headers) {\n\t\t$replace = ($this->http_linebreak == \"\\n\" ? \"\\r\\n\" : \"\\n\");\n\t\t$headers = str_replace($replace, $this->http_linebreak, trim($headers));\n\t\t$headers = explode($this->http_linebreak, $headers);\n\t\t$this->http_response_headers = array();\n\t\tif (preg_match('/^HTTP\\/\\d\\.\\d (\\d{3})/', $headers[0], $matches)) {\n\t\t $this->http_response_code = intval($matches[1]);\n\t\t array_shift($headers);\n\t\t}\n\t\tif($headers):\n\t\t\tforeach ($headers as $string) {\n\t\t\t list($header, $value) = explode(': ', $string, 2);\n\t\t\t $this->http_response_headers[$header] = trim($value);\n\t\t\t}\n\t\tendif;\n\t}", "public function getResponse()\n\t\t{\n\t\t\treturn $this->getHeader( \"response\" );\n\t\t}", "private function api_get_headers($fp) {\n $data = stream_get_meta_data($fp);\n return $data['wrapper_data'];\n }", "public function getRawHeaders()\n {\n $headers = 'HTTP/' . $this->protocolVersion . ' ' . $this->statusCode . ' ' . $this->reasonPhrase . \"\\r\\n\";\n $lines = $this->getHeaderLines();\n\n if (!empty($lines)) {\n $headers .= implode(\"\\r\\n\", $lines) . \"\\r\\n\";\n }\n\n return $headers;\n }", "public function getRawRequestHeaders() {\n\t}", "function get_http_response_code()\n\t{\n\t\t//最后一个收到的HTTP代码\n\t\treturn curl_getinfo($this->ch, CURLINFO_HTTP_CODE);\n\t}", "function getHeaders($headers)\r\n\t{\r\n\t\t$array = explode(\"\\n\",$headers);\r\n\t\tfor($i=0;$i<count($array);$i++)\r\n\t\t{\r\n\t\t\tif( ereg(\"([A-Za-z]+)/([0-9]\\.[0-9]) +([0-9]+) +([A-Za-z]+)\",$array[$i],$r) )\r\n\t\t\t{\r\n\t\t\t\t$hdrs['version'] = trim($r[2]);\r\n\t\t\t\t$hdrs['status_code'] = (int)trim($r[3]);\r\n\t\t\t\t$hdrs['status_text'] = trim($r[4]);\r\n\t \t}\r\n\t \telseif(ereg(\"([^:]*): +(.*)\",$array[$i],$r))\r\n\t \t{\r\n\t\t\t\t$hdr = eregi_replace(\"-\",\"_\",trim(strtolower($r[1])));\r\n\t\t\t\t$hdrs[$hdr] = trim($r[2]);\r\n\t\t }\r\n\t\t}\r\n\t \treturn $hdrs;\r\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}", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "function http_digest_parse($txt)\n{\n // protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n\n preg_match_all('@(\\w+)=(?:([\\'\"])([^$2]+)$2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n \n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? trim($m[3],\"\\\",'\") : trim($m[4],\"\\\",'\");\n unset($needed_parts[$m[1]]);\n }\n \n return $needed_parts ? false : $data;\n}", "function http_auth_headers() {\n\t\tif($this->http_user || $this->http_pass):\n\t\t\t$this->http_headers_add('Authorization', \" Basic \".base64_encode($this->http_user . \":\" . $this->http_pass));\n\t\tendif;\n\t}", "function getHeaders()\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaders()\\n\";\r\n\t\tif( $this->debug & DBGINDATA ) { \r\n\t\t\techo \"DBG.INDATA responseHeaders=\"; print_r( $this->responseHeaders );\r\n\t\t}\r\n\t\treturn $this->responseHeaders;\r\n\t}", "public function headers()\r\n\t\t\t {\r\n return self::headersToArray(explode( \"\\r\\n\", $this->headers ));\r\n\t\t\t }", "protected static function ExtractCorrectResponse($rawHttpResponse)\n {\n $index;\n self::ExtractCorrectHttpLine($rawHttpResponse, $index);\n return substr($rawHttpResponse, $index);\n }", "private function api_get_auth_header(array $headers) {\n foreach ($headers as $header) {\n if( substr( $header, 0, 14 ) === \"Authorization:\" ) {\n return $header;\n }\n }\n return '';\n }", "protected function _parseDigest()\n {\n\t\t$digest = $_SERVER['PHP_AUTH_DIGEST'];\n\t\t\n // protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n \n //preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $digest, $matches, PREG_SET_ORDER);\n\t\t//preg_match_all('@('.$keys.')=(?:(([\\'\"])(.+?)\\3|([A-Za-z0-9/]+)))@', $digest, $matches, PREG_SET_ORDER);\n\t\t\n\t\t$matches = explode(\",\", $digest);\n\t\t//print_r($matches);\n\t\tforeach($matches as $v) {\n\t\t\t$t = explode(\"=\",$v,2);\n\t\t\t$v = trim($t[1],\"\\\" '\");\n\t\t\t$k = trim($t[0]);\n\t\t\t$k = explode(\" \",$k);\n\t\t\t$k = $k[count($k)-1];\n\t\t\tif (isset($needed_parts[$k])) {\n\t\t\t\tunset($needed_parts[$k]);\n\t\t\t\t$data[$k]=$v;\n\t\t\t}\n\t\t}\n\t\t\n /*\n\t\tforeach ($matches as $m) {\n\t\t\t//error_log($m[1].\">\".$m[3].\">\".$m[4]);\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\t\t*/\n\t\tif (!isset($data['username']) || (isset($data['username']) && (trim($data['username'])=='' || $data['username']=='\"\"' || $data['username']=='\"' || strtolower($data['username'])=='anonymous'))) {\n\t\t\t\n\t\t\t$data['username']=\"\";\n\t\t\t$needed_parts = false;\n\t\t}\n\t\t\n return $needed_parts ? false : $data;\n }", "public abstract function getHeaders();", "public function getHeaders ();", "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 getDigestedResponse() {\n\t}", "function http_headers_get_response_code() {\n\t\treturn $this->http_response_code;\n\t}", "private function readHead() {\n\t\t$matches = array();\n\n\t\t// Read and parse status line\n\t\t$status = $this->readLine();\n\t\tif (!preg_match('!^(?:HTTP/(\\d\\.\\d)) (\\d{3})(?: (.+))?!', $status, $matches)) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Malformed status line: \" . $status);\n\t\t}\n\n\t\t// Debug status line\n\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t$this->client->log(\"< \" . trim($status));\n\t\t}\n\n\t\t$this->version = $matches[1];\n\t\t$this->code = intval($matches[2]);\n\t\t$this->message = $matches[3];\n\n\t\t// Read and parse headers\n\t\tdo {\n\t\t\t$line = $this->readLine();\n\n\t\t\t// Debug header line\n\t\t\tif ($this->client->getLogLevel() >= 2) {\n\t\t\t\t$this->client->log(\"< \" . trim($line));\n\t\t\t}\n\n\t\t\tif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $line, $matches)) {\n\t\t\t\t$name = strtolower($matches[1]);\n\t\t\t\t$value = trim($matches[2]);\n\n\t\t\t\t// Put multiple headers with the same name into an array\n\t\t\t\tif (isset($this->headers[$name])) {\n\t\t\t\t\tif (is_array($this->headers[$name])) {\n\t\t\t\t\t\t$this->headers[$name][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->headers[$name] = array($this->headers[$name], $value);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->headers[$name] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($line !== \"\");\n\t}", "private function getBodyAndHeaders($body, &$response)\n {\n $headers = array();\n\n $data = explode(\"\\n\",$body);\n\n $flag = 1;\n\n foreach ($data as $part) {\n if ($flag == 1) {\n $headers['Protocol'] = explode(' ', $part)[0];\n } else if(count($data) == $flag) {\n $response->body = trim($part);\n break;\n } else {\n $aux = explode(': ', $part);\n\n if (count($aux) >= 2) {\n $headers[$aux[0]] = trim($aux[1]);\n }\n }\n\n $flag++;\n }\n\n $response->headers = $headers;\n }", "public function getHeaderValue()\n {\n }", "function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\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}" ]
[ "0.62883985", "0.62447745", "0.6130713", "0.5988037", "0.58505744", "0.58372784", "0.580454", "0.5802968", "0.5798714", "0.5789131", "0.5765612", "0.5752545", "0.5745061", "0.5740348", "0.5712348", "0.5694508", "0.56725895", "0.5662554", "0.565236", "0.5622807", "0.5598413", "0.5591855", "0.558955", "0.55664384", "0.5544684", "0.554366", "0.5535599", "0.5524395", "0.55239815", "0.55169934", "0.5516084", "0.5507919", "0.5487921", "0.5471998", "0.54690844", "0.5426221", "0.5401872", "0.53940827", "0.53919697", "0.53891534", "0.5384483", "0.5366025", "0.5359419", "0.5359419", "0.5359419", "0.5347651", "0.5340568", "0.53401285", "0.5334864", "0.5333237", "0.53282404", "0.53249234", "0.5323702", "0.53033763", "0.53007716", "0.5288751", "0.52803755", "0.5278078", "0.52755505", "0.52431643", "0.52402467", "0.52395236", "0.52377176", "0.52348137", "0.52302563", "0.5225576", "0.52098316", "0.52098316", "0.52098316", "0.52039975", "0.520255", "0.5201142", "0.52001613", "0.5194948", "0.51941246", "0.5192289", "0.51850617", "0.51840746", "0.5182037", "0.51812", "0.51797444", "0.51648426", "0.5160864", "0.51574993", "0.5151168", "0.51450026", "0.5130676", "0.513032", "0.51125336", "0.5106839", "0.5105474", "0.51048404", "0.5103544", "0.50976676", "0.5095858", "0.50825435", "0.50785446", "0.50765884", "0.50726235", "0.5068975" ]
0.5777389
10
To extract the changeset boundary, if not exists return null.
protected static function ExtractChangesetBoundary($httpBatchResponse) { preg_match("|boundary=(changesetresponse_[^\r\n]+)|", $httpBatchResponse, $m); if (isset($m[1])) { return $m[1]; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBoundary(): ?string {\n $regex = $this->config[\"boundary\"] ?? \"/boundary=(.*?(?=;)|(.*))/i\";\n $boundary = $this->find($regex);\n\n if ($boundary === null) {\n return null;\n }\n\n return $this->clearBoundaryString($boundary);\n }", "protected function getBoundary() {\n\t\treturn $this->boundary;\n\t}", "public function getBoundary()\n {\n return $this->_boundary;\n }", "public function getBoundary(): string\n\t{\n\t\treturn $this->boundary;\n\t}", "public function getBoundary()\n\t{\n\t\treturn $this->getContentTypeAttribute('boundary');\n\t}", "public function getBoundary()\n {\n if (null === $this->boundary) {\n $this->boundary = uniqid('', true);\n }\n\n return $this->boundary;\n }", "protected function getBoundary($boundary, $charSet, $contentType, $encoding)\n {\n }", "protected function getBoundary(): string\n {\n if ($this->boundary === null) {\n $this->boundary = md5(random_bytes(16));\n }\n\n return $this->boundary;\n }", "private function GetBoundary($boundary, $charSet, $contentType, $encoding){\n\t $result = '';\n\t if($charSet == '') {\n\t $charSet = $this->CharSet;\n\t }\n\t if($contentType == '') {\n\t $contentType = $this->ContentType;\n\t }\n\t if($encoding == '') {\n\t $encoding = $this->Encoding;\n\t }\n\t $result .= $this->TextLine('--' . $boundary);\n\t $result .= sprintf(\"Content-Type: %s; charset = \\\"%s\\\"\", $contentType, $charSet);\n\t $result .= $this->LE;\n\t $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);\n\t $result .= $this->LE;\n\t\t\n\t return $result;\n\t}", "public function getBoundary()\n {\n if (!isset($this->boundary)) {\n $this->boundary = '_=_swift_'.time().'_'.bin2hex(random_bytes(16)).'_=_';\n }\n\n return $this->boundary;\n }", "protected function getBoundary(Request $request)\n {\n $matches = [];\n preg_match('/.*boundary=(.*)$/', $request->getHeaderLine('Content-Type'), $matches);\n return $matches[1];\n }", "function get_boundary_post($in_same_term = \\false, $excluded_terms = '', $start = \\true, $taxonomy = 'category')\n {\n }", "public function getBranch() /*: string*/ {\n if ($this->branch === null) {\n throw new \\Exception(\"Branch is not initialized\");\n }\n return $this->branch;\n }", "public function getBranch()\n {\n return $this->branch;\n }", "public function getBranch()\n {\n return $this->branch;\n }", "public function getGitHashPlaceholder()\n {\n if (isset($this->raw->{'git-commit'})) {\n return $this->raw->{'git-commit'};\n }\n\n return null;\n }", "public function getBranchOf()\n {\n return $this->branchOf;\n }", "public function getSnapshot(): ?FHIRStructureDefinitionSnapshot\n\t{\n\t\treturn $this->snapshot;\n\t}", "protected function getBoundary($boundary, $charSet, $contentType, $encoding)\n {\n $result = '';\n if ($charSet == '') {\n $charSet = $this->CharSet;\n }\n if ($contentType == '') {\n $contentType = $this->ContentType;\n }\n if ($encoding == '') {\n $encoding = $this->Encoding;\n }\n $result .= $this->textLine('--' . $boundary);\n $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet);\n $result .= $this->LE;\n // RFC1341 part 5 says 7bit is assumed if not specified\n if ($encoding != '7bit') {\n $result .= $this->headerLine('Content-Transfer-Encoding', $encoding);\n }\n $result .= $this->LE;\n\n return $result;\n }", "public function getSynchronization()\n {\n if (array_key_exists(\"synchronization\", $this->_propDict)) {\n if (is_a($this->_propDict[\"synchronization\"], \"\\Beta\\Microsoft\\Graph\\Model\\Synchronization\") || is_null($this->_propDict[\"synchronization\"])) {\n return $this->_propDict[\"synchronization\"];\n } else {\n $this->_propDict[\"synchronization\"] = new Synchronization($this->_propDict[\"synchronization\"]);\n return $this->_propDict[\"synchronization\"];\n }\n }\n return null;\n }", "private function findContentBoundary($handle, PartBuilder $partBuilder)\n {\n // last separator before a boundary belongs to the boundary, and is not\n // part of the current part\n while (!feof($handle)) {\n $endPos = ftell($handle) - $this->lastLineSeparatorLength;\n $line = $this->readBoundaryLine($handle, $this->lastLineSeparatorLength);\n if ($line !== '' && $partBuilder->setEndBoundaryFound($line)) {\n $partBuilder->setStreamPartAndContentEndPos($endPos);\n return;\n }\n }\n $partBuilder->setStreamPartAndContentEndPos(ftell($handle));\n $partBuilder->setEof();\n }", "private function makeBoundary($last = false) {\n\t\t$boundary = \"\\n\\n--\".$this->options['boundary'];\n\t\tif ($last) {\n\t\t\t$boundary .= '--';\n\t\t} else {\n\t\t\t$boundary .= \"\\n\";\n\t\t}\n\n\t\treturn $boundary;\n\t}", "private function _check_boundary()\n {\n if (preg_match(\"/Content-Type: multipart\\/\\w+;\\n?\\s+boundary=([\\\"']?)(.*?)(\\\\1)\\n/\", $this->_message, $boundary_matches))\n {\n $boundary = $boundary_matches[2];\n if ( strpos($boundary, '\"')\n || strpos($boundary, \"'\"))\n {\n // Any quote inside the boundary value will choke mail_mimedecode\n debug_add('\"corrupt\" (as in will choke mail_mimedecode) boundary detected, trying to fix', MIDCOM_LOG_WARN);\n // Se we replace them with dashes\n $new_boundary = str_replace(array('\"', \"'\"), array('-', '-'), $boundary);\n debug_add(\"new_boundary=\\\"{$new_boundary}\\\"\");\n // Check if our new boundary exists inside the body (unlikely but I would *hate* to debug such issue)\n while (strpos($this->_message, $new_boundary))\n {\n debug_add('Our fixed new_boundary already exists inside the body, making two random changes to it', MIDCOM_LOG_WARN);\n //Replace two characters randomly in the boundary\n $a = chr(rand(97, 122));\n $b = chr(rand(97, 122));\n $new_boundary = substr_replace($new_boundary, $a, rand(0, strlen($new_boundary)), 1);\n $new_boundary = substr_replace($new_boundary, $b, rand(0, strlen($new_boundary)), 1);\n debug_add(\"new_boundary=\\\"{$new_boundary}\\\"\");\n }\n // Finally we have a new workable boundary, replace all instances of the old one with the new\n $this->_message = str_replace($boundary, $new_boundary, $this->_message);\n }\n }\n }", "public function get($boundary, $contextName = null);", "protected function setBoundary() {\n\t\t$this->boundary = \"==Multipart_Boundary_x\".StringUtil::getRandomID().\"x\";\n\t}", "public function getB2bCollaborationInbound()\n {\n if (array_key_exists(\"b2bCollaborationInbound\", $this->_propDict)) {\n if (is_a($this->_propDict[\"b2bCollaborationInbound\"], \"\\Beta\\Microsoft\\Graph\\Model\\CrossTenantAccessPolicyB2BSetting\") || is_null($this->_propDict[\"b2bCollaborationInbound\"])) {\n return $this->_propDict[\"b2bCollaborationInbound\"];\n } else {\n $this->_propDict[\"b2bCollaborationInbound\"] = new CrossTenantAccessPolicyB2BSetting($this->_propDict[\"b2bCollaborationInbound\"]);\n return $this->_propDict[\"b2bCollaborationInbound\"];\n }\n }\n return null;\n }", "public function getRegion() : ?string ;", "private function EndBoundary($boundary) {\n\t return $this->LE . '--' . $boundary . '--' . $this->LE;\n\t}", "public static function getAsBoundary($format, $orientation = self::ORIENTATION_PORTRAIT, $boundaryName = null) {}", "public function setBoundary( $boundary='' )\n {\n if( !empty( $boundary ) && is_string( $boundary ) )\n {\n $this->boundary = trim( $boundary );\n }\n }", "public function getBranch()\n {\n return $this->_options['branch'];\n }", "function determine_branch_name( $request) {\n // push request, branch is in request[ref]\n if (isset($reqest['ref'])) {\n // strip out the refs/head nonsense -- doesn't look like bare\n // branch is listed anywhere in the request\n return preg_replace(\"|refs/heads/|\", \"\", $request['ref']);\n }\n\n _log(\"Unable to determine branch name. Maybe this wasn't a pull or merge request?\");\n}", "public function getRestrictions() : ?ReposOwnerRepoBranchesBranchProtectionPutBodyRestrictions\n {\n return $this->restrictions;\n }", "public function getBoundingBox() {}", "public function getBoundaryEvents();", "public function getBranchId(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_BRANCH_ID);\n }", "private function getBcc(): ?array {\n\t\treturn $this->bcc;\n\t}", "public function getBoundaries()\n {\n }", "public function getDifferential(): ?FHIRStructureDefinitionDifferential\n\t{\n\t\treturn $this->differential;\n\t}", "public function getBranch()\n {\n return new GitBranch($this->getProjectBase());\n }", "public function getMerkleRoot(): BufferInterface;", "function getByBBOX($w,$s,$e,$n) {\r\n $geom = sprintf(\"ST_Transform(ST_GeometryFromText('POLYGON((%f %f, %f %f, %f %f, %f %f, %f %f))',4326),3734)\",\r\n $w, $s,\r\n $w, $n,\r\n $e, $n,\r\n $e, $s,\r\n $w, $s\r\n );\r\n $row = $this->db->query(\"SELECT * FROM {$this->table} WHERE ST_Intersects(the_geom,$geom) LIMIT 1\");\r\n $row = $row->row();\r\n return $row;\r\n}", "public function getBranchName()\n {\n if ($this->_branch === false) {\n $this->_branch = preg_match('#^/-([^/]+)-#', $this->getPathInfo(), $matches)\n ? $matches[1]\n : null;\n }\n\n return $this->_branch;\n }", "final public function getHedge(): ?object {}", "public function getRegion(): ?string\n {\n return $this->_region;\n }", "public function getBranchesBranch()\n {\n return $this->hasOne(Branches::className(), ['branch_id' => 'branches_branch_id']);\n }", "public function getBound()\n {\n return $this->bound;\n }", "public function getBound()\n {\n return $this->bound;\n }", "private function splitAndCleanBoundaries($boundary_delimiter) {\n $boundaries = array();\n $boundaries_orig = explode($boundary_delimiter, $this->content);\n\n // Nettoyage du boundary\n foreach($boundaries_orig as $boundary_part) { \n $boundary = $boundary_part;\n\n // On met tout le boundary sur une seule ligne\n $boundary = preg_replace('/\\n/m', ' ', $boundary);\n\n // On remplace toutes les tabulations par un espace\n $boundary = preg_replace('/\\t/', ' ', $boundary);\n\n // Suppression des doubles espaces\n $boundary = preg_replace('/\\s{2,}/', ' ', $boundary);\n\n // \"Trim\"\n $boundary = preg_replace('/^\\s*/', '', $boundary);\n $boundary = preg_replace('/\\s*$/', '', $boundary);\n\n // Et on le stocke dans un tableau\n $boundaries[] = $boundary;\n }\n\n return $boundaries;\n }", "public function getSearchBranch()\n {\n return $this->search_branch;\n }", "function getContract() {\n $etp = $this->entity_table;\n $eid = $this->entity_id;\n switch ($etp) {\n case 'civicrm_contribution_recur' :\n $recur = new CRM_Contribute_BAO_ContributionRecur();\n $recur->get('id', $eid);\n return $recur;\n break;\n case 'civicrm_contribution' :\n $contr = new CRM_Contribute_BAO_Contribution();\n $contr->get('id', $eid);\n return $contr;\n break;\n default:\n echo 'Huh ? ' . $etp;\n }\n return null;\n }", "public function getGitTagPlaceholder()\n {\n if (isset($this->raw->{'git-tag'})) {\n return $this->raw->{'git-tag'};\n }\n\n return null;\n }", "protected function getCurrentConstraint(): string {\n $branch = trim(shell_exec('git rev-parse --abbrev-ref HEAD'));\n if ($branch !== 'HEAD') {\n return \"${branch}-dev\";\n } else {\n $tag = trim(shell_exec('git describe --exact-match --tags $(git log -n1 --pretty=\\'%h\\')'));\n if ($tag) {\n return $tag;\n } else {\n // Maybe we are on a PR.\n $branch = $_SERVER['GITHUB_HEAD_REF'];\n $branch_parts = explode('/', $branch);\n $branch = end($branch_parts);\n if ($branch) {\n return \"${branch}-dev\";\n }\n }\n }\n // Final fallback, return \"^8\";\n return '^8';\n }", "public function getReferencedConsignment()\n {\n return $this->referencedConsignment;\n }", "public function getGitVersionPlaceholder()\n {\n if (isset($this->raw->{'git-version'})) {\n return $this->raw->{'git-version'};\n }\n\n return null;\n }", "public function getMerkleRoot();", "private function _checkBoundary($newBoundary, $newBox) {}", "public function getBranch()\n {\n return $this->hasOne(CompanyBranches::className(), ['BranchID' => 'BranchID']);\n }", "public function getRegion(): ?Region\n {\n return $this->oRegion;\n }", "protected function determineBuildBranchAncestor($branch) {\n // Check whether the latest build of the production branch is something we\n // can start from with.\n $productionBranch = $this->phappManifest->getGitBranchProduction();\n $productionBuildBranch = $this->phappManifest->getGitBranchForBuild($productionBranch);\n $process = $this->_execSilent(\"git log --format=oneline $productionBuildBranch --grep \\\"Build .* commit \\\"\");\n\n if ($process->isSuccessful() && $output = $process->getOutput()) {\n // Parse the message to get the source commit hash.\n list($first_line) = explode(\"\\n\", $output, 2);\n $matches = [];\n if (preg_match('/Build .* commit (\\S*)./', $first_line, $matches)) {\n $sourceCommit = $matches[1];\n }\n }\n\n // If the source commit of the last build has been found, verify the\n // to-be-built branch is based upon it. Else, we need to start a new build\n // branch.\n if (!empty($sourceCommit)) {\n $process = $this->_execSilent(\"git log --format=oneline $sourceCommit..$branch\");\n $sourceIsParent = $process->isSuccessful() && $process->getOutput() != '';\n\n if ($sourceIsParent) {\n return $productionBuildBranch;\n }\n\n // Check whether the source commit is the same as to-be-built commit.\n $process = $this->_execSilent(\"git reflog $sourceCommit\");\n $hash1 = $process->isSuccessful() ? $process->getOutput() : FALSE;\n $process = $this->_execSilent(\"git reflog $branch\");\n $hash2 = $process->isSuccessful() ? $process->getOutput() : FALSE;\n if ($hash1 && $hash2 && $hash1 == $hash2) {\n return $productionBuildBranch;\n }\n }\n\n // No relationship between the to-be-built and the last built commit could\n // be found. Thus, start a new build branch based upon the to-be-built\n // branch.\n return $branch;\n }", "public function get_bbox($region)\n\t{\n\t\t$dir = $_SERVER[\"DOCUMENT_ROOT\"].'/data';\n\t\tif (!file_exists($dir))\n\t\t\tmkdir($dir);\n\n\t\t$fname = \"$dir/bbox.json\";\n\n\t\tif (file_exists($fname)) {\n\n\t\t\t$st = file_get_contents($fname);\n\n\t\t\t$a = json_decode($st, true);\n\t\t\tif (is_null($a)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (isset($a[$region])) {\n\t\t\t\treturn $a[$region];\n\t\t\t}\n\t\t}\n\n\t\t// TODO: сделать одну функцию для запросов к Overpass API\n\t\t$url = \"https://overpass.openstreetmap.ru/api/interpreter\";\n\t\t//$url = \"https://overpass-api.de/api/interpreter\";\n\n\t\t// FIXME: запрос слишком много инфы загружает, поправить\n\t\t$query =\n\t\t\t'[out:json][timeout:180];\n\t\t\trel[ref=\"'.$region.'\"][admin_level=4][boundary=administrative];\n\t\t\tout bb;';\n\n\t\t$page = $this->get_web_page($url, $query);\n\t\tif (is_null($page)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$page = json_decode($page, true);\n\t\tif (is_null($page)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!$page) {\n\t\t\t$bbox = null;\n\t\t} else {\n\t\t\t$bbox = [\n\t\t\t\t'minlat' => $page['elements'][0]['bounds']['minlat'],\n\t\t\t\t'minlon' => $page['elements'][0]['bounds']['minlon'],\n\t\t\t\t'maxlat' => $page['elements'][0]['bounds']['maxlat'],\n\t\t\t\t'maxlon' => $page['elements'][0]['bounds']['maxlon'],\n\t\t\t];\n\n\t\t\t$a[$region] = $bbox;\n\t\t\t$st = json_encode($a);\n\t\t\tfile_put_contents($fname, $st);\n\t\t}\n\n\t\treturn $bbox;\n\t}", "public function GetCommit()\n\t{\n\t\treturn $this->commit;\n\t}", "public function getLastMatch()\n {\n return new Xml\\Match\\Chunk($this->getXml('LastMatch'));\n }", "public function setTrimBox($boundary, $checkBoundary = true) {}", "protected function createBoundary(): void\n {\n if (\n $this->boundary === null &&\n (\n $this->attachments ||\n $this->emailFormat === static::MESSAGE_BOTH\n )\n ) {\n $this->boundary = md5(Security::randomBytes(16));\n }\n }", "public function getBranchSlug(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_BRANCH_SLUG);\n }", "protected function endBoundary($boundary)\n {\n return $this->LE . '--' . $boundary . '--' . $this->LE;\n }", "public function getBoundingBox($recalc = false) {}", "public function getBb()\n {\n return $this->bb;\n }", "protected function setBoundary($boundary)\n {\n $this->boundary = $boundary;\n }", "public function getGeometry()\n {\n return $this->geometry;\n }", "public function getDefaultBranch() {\n $repoApi = new \\Drupal\\config_pr\\RepoControllers\\GitLabApi($this->getClient());\n $path = '/api/v4/projects/' . $this->getProjectId();\n $response = $repoApi->get($path);\n\n return $response['default_branch'];\n }", "public function getFragment()\n {\n return $this->fragment;\n }", "public function getFragment()\n {\n return $this->fragment;\n }", "public function getFragment()\n {\n return $this->fragment;\n }", "final public function getContainingField(): ?Field\n {\n return $this->containingField;\n }", "public function getGitShortHashPlaceholder()\n {\n if (isset($this->raw->{'git-commit-short'})) {\n return $this->raw->{'git-commit-short'};\n }\n\n return null;\n }", "public function getBranchId()\n {\n return $this->branch_id;\n }", "function reference()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->Reference;\n }", "public function branches()\n {\n return $this->_refs('heads');\n }", "public function getShipmentReference1()\n {\n return isset($this->shipmentReference1) ? $this->shipmentReference1 : null;\n }", "public function getPostBuffer()\n {\n if (array_key_exists(\"postBuffer\", $this->_propDict)) {\n if (is_a($this->_propDict[\"postBuffer\"], \"\\DateInterval\") || is_null($this->_propDict[\"postBuffer\"])) {\n return $this->_propDict[\"postBuffer\"];\n } else {\n $this->_propDict[\"postBuffer\"] = new \\DateInterval($this->_propDict[\"postBuffer\"]);\n return $this->_propDict[\"postBuffer\"];\n }\n }\n return null;\n }", "public function getWasabiBucket() {\n return @$this->attributes['wasabi_bucket'];\n }", "public function setBleedBox($boundary, $checkBoundary = true) {}", "public function fetchBBOX() {\r\n $row = $this->db->query(\"SELECT ST_X(geom)-0.0001 AS w, ST_X(geom)+0.0001 AS e, ST_YMIN(geom)-0.0001 AS s, ST_YMAX(geom)+0.0001 AS n FROM {$this->table} WHERE id=?\", array($this->id) )->row();\r\n $row->w = (float) $row->w;\r\n $row->s = (float) $row->s;\r\n $row->e = (float) $row->e;\r\n $row->n = (float) $row->n;\r\n return $row;\r\n}", "public function getRefgroup()\n {\n return $this->refgroup;\n }", "function get_document_bounds($annotation, $feature) {\r\n $bound = [];\r\n foreach ($annotation->getPages() as $page) {\r\n if ($feature == FEATURE_PAGE){\r\n $coord=$this->bound_to_coord($page->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($page->getBlocks() as $block) {\r\n if ($feature == FEATURE_BLOCK) {\r\n $coord=$this->bound_to_coord($block->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($block->getParagraphs() as $paragraph) {\r\n if ($feature == FEATURE_PARA){\r\n $coord=$this->bound_to_coord($paragraph->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($paragraph->getWords() as $word) {\r\n if ($feature == FEATURE_WORD){\r\n $coord=$this->bound_to_coord($word->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($word->getSymbols() as $symbol) {\r\n if ($feature == FEATURE_SYMBOL){\r\n $coord=$this->bound_to_coord($symbol->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public function getFilebaseBucket() {\n return @$this->attributes['filebase_bucket'];\n }", "function bbox(string $id): Rect {\n if (!isset($this->features[$id]))\n return new Rect([41, -4, 51, 10]);\n else\n return $this->features[$id]['bbox'];\n }", "public function getOverwriteGeo()\n {\n return $this->readOneof(5);\n }", "public function getRequest(): ?BreachesRequest {\n return parent::getRequest();\n }", "public function getPreBuffer()\n {\n if (array_key_exists(\"preBuffer\", $this->_propDict)) {\n if (is_a($this->_propDict[\"preBuffer\"], \"\\DateInterval\") || is_null($this->_propDict[\"preBuffer\"])) {\n return $this->_propDict[\"preBuffer\"];\n } else {\n $this->_propDict[\"preBuffer\"] = new \\DateInterval($this->_propDict[\"preBuffer\"]);\n return $this->_propDict[\"preBuffer\"];\n }\n }\n return null;\n }", "protected function getGitRevision() {}", "public function getBasis();", "public function getDefaultRegion() : ?string;", "function _versioncontrol_git_log_get_branches() {\n $logs = _versioncontrol_git_log_exec('git show-ref --heads'); // Query branches.\n $branches = _versioncontrol_git_log_parse_branches($logs); // Parse output.\n return $branches;\n}", "public function versionConstraint(): ?string\n {\n return null;\n }", "public function getCurrentBranch() : string\n {\n $process = $this->runProcess(new Process('git branch'));\n\n $branches = collect(explode(PHP_EOL, $process->getOutput()));\n\n $currentBranch = $branches->first(function(string $branch) {\n return str_contains($branch, '*');\n });\n\n return trim(str_replace('*', '', $currentBranch));\n }", "protected function endBoundary($boundary)\n {\n }", "public function git_working_branch()\n\t{\n\t\texec( 'cd ' . $this->theme_dir . '; git status', $status );\n\t\t$status = $status[0];\n\n\t\treturn preg_replace( '/# On branch/', '', $status );\n\t}" ]
[ "0.70015126", "0.6738219", "0.65591896", "0.63910156", "0.62610763", "0.6225313", "0.5662655", "0.53878003", "0.5334199", "0.5249215", "0.5238914", "0.51138866", "0.5074821", "0.50533533", "0.50533533", "0.5015317", "0.5002634", "0.4966477", "0.49210292", "0.4912005", "0.48603088", "0.48341924", "0.4825847", "0.47900373", "0.47556117", "0.4744932", "0.47268328", "0.4720138", "0.47072104", "0.46869633", "0.46820876", "0.468185", "0.46765828", "0.46576548", "0.4650334", "0.46428448", "0.46402305", "0.46394017", "0.46079385", "0.46007305", "0.45994422", "0.45949733", "0.45766017", "0.45706564", "0.45613113", "0.45612195", "0.45554405", "0.45554405", "0.45543784", "0.45398295", "0.45238027", "0.45235533", "0.45210811", "0.45050466", "0.44973093", "0.44567338", "0.44552666", "0.44262233", "0.44166845", "0.440669", "0.44034958", "0.43964988", "0.43905056", "0.43772566", "0.43647414", "0.43623024", "0.43559068", "0.43558037", "0.43258643", "0.43226078", "0.4313928", "0.4294862", "0.4288297", "0.4288297", "0.4288297", "0.4282058", "0.42775542", "0.42755708", "0.4275273", "0.42685696", "0.42675513", "0.42671087", "0.42483258", "0.42471343", "0.424369", "0.4243438", "0.42432886", "0.424245", "0.42380288", "0.42319253", "0.42302766", "0.42237735", "0.4222116", "0.4219369", "0.4219303", "0.42128274", "0.4208037", "0.41975403", "0.41951007", "0.41850364" ]
0.5997897
6
To extract the batch boundary index.
protected static function ExtractBatchBoundaryIndex($httpBatchResponse) { preg_match("|boundary=(batchresponse_[^\r\n]+)|", $httpBatchResponse, $m, PREG_OFFSET_CAPTURE); if (isset($m[1]) && isset($m[1][1])) { return $m[1][1]; } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function batchIndex(): ?int;", "protected function getBoundary() {\n\t\treturn $this->boundary;\n\t}", "public function getBoundary()\n {\n return $this->_boundary;\n }", "public function getBoundary()\n {\n if (null === $this->boundary) {\n $this->boundary = uniqid('', true);\n }\n\n return $this->boundary;\n }", "public function getBoundary(): string\n\t{\n\t\treturn $this->boundary;\n\t}", "public function getBoundary()\n\t{\n\t\treturn $this->getContentTypeAttribute('boundary');\n\t}", "public function getBatchID()\n {\n return $this->BatchID;\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function getEndIndex()\n {\n return $this->end_index;\n }", "public function getBatch()\n\t{\n\t\tif (! is_int(self::$batch))\n\t\t{\n\t\t\t$batch = $this->db->table($this->table)\n\t\t\t\t->selectMax('batch')\n\t\t\t\t->get()->getResultObject();\n\t\t\t$batch = empty($batch) ? 0 : (int) reset($batch)->batch;\n\n\t\t\tself::$batch = $batch + 1;\n\t\t}\n\n\t\treturn self::$batch;\n\t}", "function getThisBatchId($db) {\n\t\t$batchId=0;\n\t\t$res=$db->query(\"SELECT MIN(id) as id_min FROM batch\");\n\t\twhile($row=$res->fetch_assoc()) {\n\t\t\t$batchId=$row[\"id_min\"];\n\t\t}\n\t\treturn $batchId+1;\n\t}", "public function GetBackReferencePosPort () {\n\t\tif ($this->backReferencePosPort === NULL)\n\t\t\t$this->preparePatternAndBackReferenceIndexes();\n\t\treturn $this->backReferencePosPort;\n\t}", "public function getBatch()\n {\n return $this->_batch;\n }", "public function getBound()\n {\n return $this->bound;\n }", "public function getBound()\n {\n return $this->bound;\n }", "public function getBoundary()\n {\n if (!isset($this->boundary)) {\n $this->boundary = '_=_swift_'.time().'_'.bin2hex(random_bytes(16)).'_=_';\n }\n\n return $this->boundary;\n }", "function getBatchObj()\n\t\t{\n\t\t\treturn $this->BatchObj;\n\t\t}", "public function get_batch_id()\n {\n $results = $this->results();\n\n return $results['SubmitNotificationBatchResult']->BatchID;\n }", "public function getCurrentChunkNumber()\n {\n return $this->getParam('flowChunkNumber');\n }", "public function getBatch()\n {\n return isset($this->batch) ? $this->batch : null;\n }", "public function getIdx()\n {\n return $this->get(self::_IDX);\n }", "public function getBatchCode()\n {\n $params = $this->getRequest()->getPost();\n $batch_number = $params['batch_number'];\n if (!$batch_number) {\n $id = (int) $params['entity_id'];\n if (!$id) {\n $id = $this->getRequest()->getParam('id', null); //Get batch id\n }\n if ($id) {\n $batch_number = Mage::getModel('batchcode/batchcode')\n ->load($id)\n ->getBatchNumber();\n }\n }\n\n if (!$batch_number) {\n $batch_number = Mage::helper('batchcode')->__('Invalid');\n }\n\n return $batch_number;\n }", "public function fetchBatchId ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_object = new Acad_Model_StudentClass();\r\n $student_class_object->setMember_id($member_id);\r\n $batch_identifier_class_id = $student_class_object->fetchBatchIdentifierClassId();\r\n $class_object = new Acad_Model_Class();\r\n $class_object->setClass_id($batch_identifier_class_id);\r\n $class_object->fetchInfo();\r\n $batch_id = $class_object->getBatch_id();\r\n return $batch_id;\r\n }", "public function getMarkerIndex()\n {\n return $this->currentMarker;\n }", "protected function getBoundary(): string\n {\n if ($this->boundary === null) {\n $this->boundary = md5(random_bytes(16));\n }\n\n return $this->boundary;\n }", "public function getBoundaries()\n {\n }", "public function getBatchQuantity()\n {\n return $this->batchQuantity;\n }", "public function getLastIndex()\n {\n return $this->index - 1;\n }", "public function getBrickPosition(Brick $brick)\n {\n return array_search($brick, $this->bricks);\n }", "public function indexSeparate() {\n if ($this->_m_indexSeparate !== null)\n return $this->_m_indexSeparate;\n if ($this->isIndexSeparate()) {\n $this->_m_indexSeparate = ($this->indexSeparateMinus() + 176);\n }\n return $this->_m_indexSeparate;\n }", "public function key()\n {\n return key($this->bricks[$this->position]);\n }", "public function getBatchCount() {\n\t\treturn count( $this->batches );\n\t}", "public function getNextBatchNumber()\n {\n return $this->getLastBatchNumber() + 1;\n }", "public function getStartIndex()\n {\n return $this->start_index;\n }", "public function getStartIndex();", "public function getBoundary(): ?string {\n $regex = $this->config[\"boundary\"] ?? \"/boundary=(.*?(?=;)|(.*))/i\";\n $boundary = $this->find($regex);\n\n if ($boundary === null) {\n return null;\n }\n\n return $this->clearBoundaryString($boundary);\n }", "protected function setIndexAtMax()\n {\n return count($this->segments) - 1;\n }", "public function getBlinds()\n\t{\n\t\treturn [$this->bb, $this->sb];\n\t}", "function get_document_bounds($annotation, $feature) {\r\n $bound = [];\r\n foreach ($annotation->getPages() as $page) {\r\n if ($feature == FEATURE_PAGE){\r\n $coord=$this->bound_to_coord($page->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($page->getBlocks() as $block) {\r\n if ($feature == FEATURE_BLOCK) {\r\n $coord=$this->bound_to_coord($block->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($block->getParagraphs() as $paragraph) {\r\n if ($feature == FEATURE_PARA){\r\n $coord=$this->bound_to_coord($paragraph->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($paragraph->getWords() as $word) {\r\n if ($feature == FEATURE_WORD){\r\n $coord=$this->bound_to_coord($word->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n foreach ($word->getSymbols() as $symbol) {\r\n if ($feature == FEATURE_SYMBOL){\r\n $coord=$this->bound_to_coord($symbol->getBoundingBox());\r\n $this->add_block($coord['x1'],$coord['y1'],$coord['x2'],$coord['y2'],$coord['x3'],$coord['y3'],$coord['x4'],$coord['y4'],true);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "public function getLastBatchNo()\n {\n $query = \"SELECT max(BatchNumber) AS BatchNumber FROM voucherbatch\";\n $sql = Yii::app()->db->createCommand($query);\n $result = $sql->queryRow();\n \n if($result['BatchNumber'] > 0)\n return $result['BatchNumber'] + 1;\n else\n return 1;\n }", "public function getLastBatchNumber()\n {\n global $wpdb;\n\n $max = $wpdb->get_results(\n \"SELECT MAX(`batch`) as max FROM {$wpdb->prefix}exolnet_migration as em\",\n 'ARRAY_A'\n );\n\n return absint($max[0]['max']) ?? 0;\n }", "public function getIndexEnd();", "protected function getBatchNumber(ObjectIdentityInterface $oid)\n {\n $identifier = $oid->getIdentifier();\n\n if (!$this->isDigitIdentifier($oid)) {\n $identifier = crc32($identifier);\n }\n\n return (int)floor($identifier / $this->batchSize) + 1;\n }", "function getBrfId()\n {\n return (int) $this->_iBrfId;\n }", "protected function getBoundary(Request $request)\n {\n $matches = [];\n preg_match('/.*boundary=(.*)$/', $request->getHeaderLine('Content-Type'), $matches);\n return $matches[1];\n }", "public function getProjectBatchInfo(){\n return $this->_projectBatchInfo;\n }", "public function get_offset() {\n\t\treturn ( $this->step - 1 ) * $this->per_step;\n\t}", "static function getBucketIndex( $key ) {\n\n // Read as a 32-bit unsigned long\n // TODO: unpack() is slow. Is there an alternative?\n //\n // The hash function must result in as uniform a distribution of bits\n // as possible, over all the possible $key values. CRC32 looks pretty good:\n // http://michiel.buddingh.eu/distribution-of-hash-values\n //\n return unpack( 'L', hash( 'crc32', $key, true ) )[ 1 ] % self::HASH_BUCKET_COUNT;\n }", "public function getLastChunk()\n {\n return $this->lastChunk;\n }", "public function advanceBatchIndex(): bool;", "public function getBoundingBox() {}", "protected function get_offset(): int\n\t{\n\t\treturn $this->start;\n\t}", "function getIndex() ;", "public function getXfIndex()\n\t{\n\t\treturn $this->_xfIndex;\n\t}", "public function getXfIndex()\n\t{\n\t\treturn $this->_xfIndex;\n\t}", "public function bbox()\n {\n $minX = PHP_INT_MAX;\n $minY = PHP_INT_MAX;\n $maxX = PHP_INT_MIN;\n $maxY = PHP_INT_MIN;\n $n = 0;\n\n foreach($this->coordinates() as $xy)\n {\n list($x, $y) = $xy;\n $minX = min($minX, $x);\n $minY = min($minY, $y);\n $maxX = max($maxX, $x);\n $maxY = max($maxY, $y);\n $n++;\n }\n\n if($n > 0)\n {\n return array($minX, $minY, $maxX, $maxY);\n }\n else\n {\n return false;\n }\n }", "abstract public function getIntervalColumnCount(): int;", "public function getBatches()\n {\n return $this->batches;\n }", "public function getBoost() {\n return $this->_documentBoost;\n }", "public function get_start_batch(): string\n {\n return $this->start_batch;\n }", "public function thruIndex() {\n\t\treturn $this->thru > 0 ? $this->thru - 1 : 0;\n\t}", "protected function getBoundary($boundary, $charSet, $contentType, $encoding)\n {\n }", "public function getSettleIndex()\n {\n return $this->settle_index;\n }", "public function key()\n {\n if(is_null($this->paginationVar))\n return 0;\n return $this->curIndex + $this->paginationVar->GetOffset();\n }", "public function get_end_batch(): string\n {\n return $this->end_batch;\n }", "public function indexInTag() {\n if ($this->_m_indexInTag !== null)\n return $this->_m_indexInTag;\n $this->_m_indexInTag = ($this->tag() - 32);\n return $this->_m_indexInTag;\n }", "public function batch()\n\t{\n\t\treturn $this->table()->max('batch');\n\t}", "function getMaxBatch(){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"SELECT MAX(batch_no) from breeding_tbl\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['MAX(batch_no)'];\n\n\t}\n\n\t$crud->disconnect();\n}", "protected function getBoundary($ln = 24) {\r\n\t\t$tmp = '';\r\n\t\tfor($i = 0; $i < $ln; $i++)\r\n\t\t\t$tmp.= rand(0, 9);\r\n\t\treturn $tmp;\r\n\t}", "public function getUpperBound()\n {\n return $this->upper_bound;\n }", "public function getStartOffset() {}", "public function getGuaranteedInd()\n {\n return $this->guaranteedInd;\n }", "public function getStartingStackSize(): int\n\t{\n\t\treturn $this->bb * $this->stackSize;\n\t}", "public function GetLastIndexInPage()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return ($this->GetFirstIndexInPage() + $this->GetNumberOfResultsInThisPage()) - 1;\n }", "public function getBatchToken(): ?string\n {\n return $this->batchToken;\n }", "protected function getrowspan(){\n\t\t$y_points=$this->GTemp->struct->YPoints;\n\t\treturn array_search($this->y2, $y_points)-array_search($this->y1, $y_points);\n\t}", "public function key()\n {\n $pageSize = $this->getDataProvider()->getPagination()->pageSize;\n\n return $this->getCurrentPage() * $pageSize + $this->getCurrentIndex();\n }", "public function getEnd(): int;", "private static function generateBoundary() {\n\t\treturn \"-----=\".md5(uniqid(mt_rand(), 1));\n\t}", "public function getOffsetEnd()\n\t{\n\t\treturn $this->start + count($this->entities);\n\t}", "public function getBounds()\n {\n return $this->bounds;\n }", "public function getID_B()\n {\n return $this->ID_B;\n }", "public function getBreadth() {\r\n return $this->breadth;\r\n }", "private function getLastAttributeIndex() {\n\t\tend($this->attributesArray);\n\t\treturn key($this->attributesArray);\n\t}", "private function EndBoundary($boundary) {\n\t return $this->LE . '--' . $boundary . '--' . $this->LE;\n\t}", "public function key() : int\n {\n return $this->currentRecordPos - ($this->pageSize * ($this->currentPagePos-1));\n }", "public function getBounds();", "public function key()\n\t{\n\t\t$pageSize = $this->_dataProvider->getPagination()->getPageSize();\n\t\treturn $this->_currentPage * $pageSize + $this->_currentIndex;\n\t}", "public function getMaxBatchSize() \n {\n return $this->_fields['MaxBatchSize']['FieldValue'];\n }", "public function getBatchSize()\n {\n return (integer) $this->scopeConfig->getValue(\n 'orderflow_inventory_import/settings/batch_size',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE\n );\n }", "public function getIncludeShardKeyBounds()\n {\n return $this->include_shard_key_bounds;\n }", "function get_batch_id() {\n global $_REQUEST;\n if (!(isset($_REQUEST['batch_id'])\n && is_string($_REQUEST['batch_id'])\n && preg_match('/^\\{?[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}\\}?$/i', $_REQUEST['batch_id']))) {\n hs_ajax_result(false, \"hack attach!\", null);\n }\n\n return $_REQUEST['batch_id'];\n}", "public function index(): int\n {\n return $this->index;\n }", "private static function createBinaryIndexes($count)\n {\n // Start a counter to base our binary frame on\n $startOffset = 0;\n\n // Start a loop that we will manually break out of\n while (1) {\n $out = array();\n\n foreach (range(1, $count) as $range) {\n $out[] = decbin($startOffset + $range);\n }\n\n // Make sure that no index is the prefix of any another\n $found = false;\n foreach ($out as $v1) {\n foreach ($out as $v2) {\n if ($v1 !== $v2 && strpos($v1, $v2) === 0) {\n $found = true;\n }\n }\n }\n\n // Once a mapping is accepted, return it as an array\n if (!$found) {\n return $out;\n }\n\n // ... otherwise, try again from the next highest position\n $startOffset = $startOffset + 1;\n }\n }", "public function getBatch()\n {\n return Controllers\\BatchController::getInstance();\n }", "public static function getIndex(): int\n {\n return static::$index;\n }", "function get_boundary_post($in_same_term = \\false, $excluded_terms = '', $start = \\true, $taxonomy = 'category')\n {\n }", "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "public function key()\n\t{\n\t\treturn $this->index;\n\t}", "public function getHashIndex();" ]
[ "0.66085887", "0.62296146", "0.6126582", "0.6012707", "0.57899404", "0.5724486", "0.5707866", "0.5698865", "0.55410594", "0.5516474", "0.5497138", "0.5449849", "0.5428432", "0.5403393", "0.5403393", "0.53790146", "0.5368912", "0.5328668", "0.5304338", "0.52558756", "0.5255347", "0.52226245", "0.51787084", "0.5167284", "0.5160176", "0.51462877", "0.5140723", "0.51131415", "0.509689", "0.50958616", "0.50799537", "0.50700057", "0.5069696", "0.5028191", "0.50211877", "0.5018744", "0.50168705", "0.5009624", "0.4999586", "0.49873996", "0.49639386", "0.4952797", "0.49331325", "0.49234858", "0.49017346", "0.4889008", "0.48816592", "0.48808005", "0.4871393", "0.48704338", "0.48577613", "0.48542053", "0.48409367", "0.484031", "0.484031", "0.48392516", "0.48320183", "0.4811541", "0.48085934", "0.48028782", "0.48016644", "0.4800324", "0.47947294", "0.4792922", "0.47840777", "0.47723165", "0.47608355", "0.4753426", "0.4727822", "0.47253156", "0.47235382", "0.47230384", "0.47221443", "0.47190878", "0.47156227", "0.4703516", "0.47001255", "0.46908653", "0.46850637", "0.4669874", "0.46677986", "0.4665196", "0.4664157", "0.46553808", "0.46520245", "0.46477205", "0.46473515", "0.46461985", "0.46443468", "0.4643217", "0.46429196", "0.46333367", "0.46314892", "0.46202195", "0.46159494", "0.46109283", "0.4603137", "0.46031335", "0.46031335", "0.4599569" ]
0.67002594
0
This function will extract the changesets from raw batch response and generate a list of Microsoft_Http_Response objects.
protected static function ExtractHttpResponses($httpBatchResponse, $changesetBoundary) { $httpResponses = array(); $parts = explode( "--" . $changesetBoundary, $httpBatchResponse); $count = count($parts); if($count < 2) { return $httpResponses; } unset($parts[0]); unset($parts[$count-1]); foreach ($parts as $changeSet) { $subParts = preg_split('|(?:\r?\n){2}|m', $changeSet, 2); $httpResponses[] = Microsoft_Http_Response::fromString($subParts[1]); } return $httpResponses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAsHttpResponse()\n {\n $parts = explode(\"--\" . $this->_changesetBoundary,\n $this->_rawHttpBatchResponse, 2);\n return new Microsoft_Http_Response($this->GetCode(),\n HttpResponse::extractHeaders($parts[0]),\n (count($parts) == 2) ?\n ('--' . $this->_changesetBoundary . \"\\n\" . $parts[1]) :\n $parts[0]);\n }", "public function GetSubBatchHttpResponses()\n {\n return $this->_httpResponses;\n }", "private function getRollbackList(int $batch): array\r\n {\r\n $listRs = DB::table('migrations')->select('id', 'migration')\r\n ->where('batch', $batch)\r\n ->orderBy('id', 'desc')\r\n ->get();\r\n $return = array();\r\n foreach ($listRs as $v) {\r\n $return[] = [\r\n 'id' => $v->id,\r\n 'migration' => $v->migration,\r\n ];\r\n }\r\n return $return;\r\n }", "private function parseMultipartRelatedResponse($rawResponse)\n {\n $responseIds = [];\n foreach ($rawResponse->parts as $id => $part) {\n $response = new RawResponse($this->client, $part);\n if ($response->isFile()) {\n $this->parseResponse($part);\n } else {\n $responseIds[] = $id;\n }\n }\n $responses = [];\n foreach ($responseIds as $id) {\n $responses[] = $this->parseResponse($rawResponse->parts[$id]);\n }\n\n return $responses;\n }", "protected function analyzeResponse() {\n\t\tvar_dump($this->curlResponse);\n\t\t$parts = explode(\"\\r\\n\\r\\n\", $this->curlResponse);\n\n\t\t$response_body = array_pop($parts);\n\t\t$response_headers = implode('', $parts);\n\t\t$http_status_code = $this->curl->getinfo(CURLINFO_HTTP_CODE); \n\n\t\treturn array(trim($response_headers), trim($response_body), $http_status_code);\n\t}", "public function toCollection(): \\Illuminate\\Support\\Collection\n {\n $this->buildResponse();\n\n return collect(json_decode($this->response->getBody()->getContents(), true));\n }", "private function parseMultipartMixedResponse($rawResponse)\n {\n $responses = [];\n foreach ($rawResponse->parts as $part) {\n $response = null;\n try {\n $this->lastParsedContentId = null;\n $response = $this->parseResponse($part);\n } catch (\\Throwable $ex) {\n $response = new ApiResponse([\n 'id' => $this->lastParsedContentId ?? join('-', ['sdkError', ApiHelper::generateId()]),\n 'success' => false,\n 'error' => new ResponseError([\n 'type' => get_class($ex),\n 'code' => $ex->getCode(),\n 'message' => ['httpError' => $ex->getMessage()],\n 'exception' => $ex,\n ]),\n ]);\n }\n $responses[$response->id] = $response;\n }\n\n return $responses;\n }", "private function parseResponseAddUpdateMultipleRecords($xml)\n {\n $records = [];\n foreach ($xml->result->row as $row) {\n $no = (string) $row['no'];\n if (isset($row->success)) {\n $success = new Result((int) $no, (string) $row->success->code);\n $data = [];\n foreach ($row->success->details->children() as $field) {\n $data[(string) $field['val']] = (string) $field;\n }\n $records[$no] = $success->setData($data);\n } else {\n $error = new Result((int) $no, (string) $row->error->code);\n $error->setError(\n new ZohoRecruitError((string) $row->error->code, (string) $row->error->details)\n );\n $records[$no] = $error;\n }\n }\n\n return $records;\n }", "private function make_response_array($response) {\n $myarray = array();\n $data = explode(\"\\n\", $response);\n if (strpos($data[0], 'HTTP') === 0) {\n // the first line is a status code\n $myarray['status'] = $data[0];\n array_shift($data);\n }\n foreach ($data as $part) {\n if (json_decode($part)) {\n $myarray[] = json_decode($part);\n continue;\n }\n $middle = explode(\": \", $part, 2);\n $myarray[trim($middle[0])] = trim($middle[1]);\n }\n return $myarray;\n }", "private function _loadResponse()\n {\n $sroObjects = Mage::getModel('pedroteixeira_correios/sro_object_collection');\n $trackList = $this->getRequestCollection();\n $response = $this->getResponse();\n \n if (isset($response->return) && $response->return->qtd > 0) {\n foreach ((array)$response->return->objeto as $obj) {\n $track = $trackList->getItemByColumnValue('number', $obj->numero);\n if ($track) {\n $item = Mage::getModel('pedroteixeira_correios/sro_object');\n $item->setTrack($track)\n ->setInfo($obj);\n $sroObjects->addItem($item);\n } else {\n Mage::log(\"Cant locate track for {$obj->numero}\");\n }\n }\n }\n \n $this->setLog(\"{$sroObjects->count()} identified of {$this->getLog()}\");\n \n return $this->setResponseCollection($sroObjects);\n }", "public function getAllVersions(): Collection\n {\n $guzzleClient = new Client(['base_uri' => config('bitbucket.api_base_url')]);\n $response = $guzzleClient\n ->get(\"2.0/repositories/\" . config('bitbucket.vendor') . \"/\" . config('bitbucket.repo') . \"/refs/tags\", [\n 'auth' => [config('bitbucket.username'), config('bitbucket.password')]\n ])->getBody();\n\n return collect(\\GuzzleHttp\\json_decode($response)->values);\n }", "public function list() : array\n {\n $raw = $this->connection->get($this->url(self::ENDPOINT));\n $this->response = json_decode($raw, true);\n $this->triggerErrorIfAny();\n\n return $this->response;\n }", "private function getOldTicketsList() {\r\n\t\t$sql = \"SELECT TOP 5 summary, TicketNbr, status_description AS status, \";\r\n\t\t$sql .= \"company_name, age, resource_list as resources \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"ORDER BY age desc\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['age'] = $row['age'];\r\n\t\t\t$r[$i]['resources'] = $row['resources'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function GetRawHttpResponse()\n {\n return $this->_rawHttpBatchResponse;\n }", "private function process(HttpSocketResponse $response)\n\t{\n\t\t$result = array();\n\t\tif (!empty($response)) {\n\t\t\t$body = $response->body();\n\t\t\tswitch ($this->format) {\n\t\t\t\tcase 'xml':\n\t\t\t\t\t$xml = Xml::build($body);\n\t\t\t\t\t$temp = Xml::toArray($xml);\n\t\t\t\t\t$result = array('Yourls' => $temp['result']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'json':\n\t\t\t\t\t$result = array('Yourls' => json_decode($body, true));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result = $body;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "protected function handleBatch()\n {\n if (!($requests = $this->router->getVariable('requests'))) {\n throw new \\ApiException(\\Phork::language()->translate('Missing batch definitions'), 400);\n }\n \n if (!(is_string($requests) && $requests = json_decode($requests, true))) {\n throw new \\ApiException(\\Phork::language()->translate('Invalid batch definitions'), 400);\n }\n \n foreach ($requests as $key => $request) {\n $key = isset($request['key']) ? $request['key'] : $key;\n if (!empty($request['method']) && !empty($request['url'])) {\n switch (strtolower($request['method'])) {\n case 'get':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::get($request['url'], false);\n break;\n\n case 'post':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::post($request['url'], !empty($request['args']) ? $request['args'] : array(), false);\n break;\n\n case 'put':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::put($request['url'], false);\n break;\n\n case 'delete':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::delete($request['url'], false);\n break;\n }\n } else {\n throw new \\ApiException(\\Phork::language()->translate('Missing request type and/or URL'), 400);\n }\n }\n\n $this->success = true;\n $this->result = array(\n 'batched' => isset($result) ? $result : array()\n );\n }", "public function getEntityResponses()\n {\n return $this->bulkEntitiesResponse;\n }", "protected static function ExtractChangesetBoundary($httpBatchResponse)\n {\n preg_match(\"|boundary=(changesetresponse_[^\\r\\n]+)|\",\n $httpBatchResponse, $m);\n if (isset($m[1])) { return $m[1]; }\n return null;\n }", "public function end_batch($batch): array\n {\n $batch_consignments[] = $batch;\n $consignments_to_return = [];\n\n foreach ($batch_consignments as $key => $consignment) {\n $consignments_to_return[] .= \"Ref number \" . ($key + 1) . \" Consignment Number : \" . $consignment;\n }\n\n return $consignments_to_return;\n }", "public function decodeMultiple(ResponseInterface $response): array\n {\n return $this->decode($response, $this->resourceName());\n }", "public function prepare_response_for_collection($response)\n {\n }", "public function getChanges();", "public function getChanges();", "public function fetchAllZf2Changelogs()\n {\n $data = array();\n $this->console->writeLine(\"Fetching list of all tags\");\n\n if ($this->githubToken) {\n $httpRequest = $this->httpClient->getRequest();\n $httpRequest->getHeaders()->addHeaderLine('Authorization', 'token ' . $this->githubToken);\n }\n\n $uri = sprintf(self::GITHUB_TAGS, 'zf2');\n $this->httpClient->setUri($uri);\n\n $response = $this->httpClient->send();\n\n if (!$response->isOk()) {\n $this->emitError(sprintf('Received response code %d with body %s', $response->getStatusCode(), $response->getBody()));\n return;\n }\n\n $tags = json_decode($response->getBody());\n foreach ($tags as $info) {\n $tag = $info->name;\n if (preg_match('/dev(?:el)?(?:\\d+(?:[a-z]+)?)?$/', $tag)) {\n // skip development tags\n continue;\n }\n \n $tagData = $this->fetchGithubChangelog('zf2', $tag);\n\n if (!$tagData) {\n return;\n }\n\n $tag = str_replace('release-', '', $tag);\n $data[$tag] = $tagData;\n }\n \n $fileContent = \"<\" . \"?php\\n\\$tags = \" \n . var_export($data, 1) \n . \";\\nreturn \\$tags;\";\n \n $this->console->writeLine(\"Writing to {$this->zf2DataFile}\");\n file_put_contents($this->zf2DataFile, $fileContent);\n\n $this->console->writeLine('[DONE]', Color::GREEN);\n }", "public static function unpackRows($response)\n\t{\n\t\t// Return a null result if we don't have any rows.\n\t\tif ($response->num_rows < 1) return NULL;\n\t\t\n\t\t$ret = array();\n\t\t\n\t\t// Append the unpacked rows to the result.\n\t\twhile ($row = $response->fetch_assoc()) {\n\t\t\t$entry = WikiRevision::getEmpty();\t// Get defaults\n\t\t\tforeach (WikiRevision::$field as $key) {\t// Store any retrieved fields.\n\t\t\t\tif ($row[$key]) $entry[$key] = $row[$key];\n\t\t\t\t$ret[] = $entry;\t// Append this row to the return array.\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "private function parseRequest(){\n\t\t\n\t\tif($this->swapperRequest){\n\t\t\tif($this->blockName != $this->oldBlockName){\n\t\t\t\theader('Content-Type: application/json');\n\t\t\t\t$link = explode('?',$_SERVER['REQUEST_URI']);\n\t\t\t\t$output = array('swapper_newpage' => true, 'swapper_newpage_link' => 'http://'.$_SERVER['HTTP_HOST'].$link[0]);\n\t\t\t\techo json_encode($output);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t$this->oldRequest = array();\n\t\t\tif(Session::exists('swapper.oldRequest')){\n\t\t\t\t$this->oldRequest = Session::get('swapper.oldRequest');\n\t\t\t}\n\n\t\t\t$this->responseBlocks = array();\n\t\t\t/*echo \"old:\";\n\t\t\tprint_r($this->oldRequest);*/\n\t\t\tforeach($this->blocks as $block => $vars){\n\t\t\t\t\t#echo $block;\n\t\t\t\t\tif(!isset($this->oldRequest[$block])){\n\n\t\t\t\t\t\t$this->responseBlocks[$block] = $vars;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$diff = $this->arrayRecursiveDiff($vars,$this->oldRequest[$block]);\n\t\t\t\t\t\t$this->diff = $diff;\n\t\t\t\t\t\tif(!empty($diff)){\n\t\t\t\t\t\t\t$this->responseBlocks[$block] = $vars;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t/*echo \"New response:\";\n\t\t\tprint_r($this->responseBlocks);\n\t\t\tdie();*/\n\t\t\treturn;\n\t\t}\n\n\t\t$this->responseBlocks = $this->blocks;\n\t}", "private function getLastResponseBodyAsArray(): array\n {\n $body = $this->client->getLastResponseBody();\n $contentType = $this->client->getLastResponseContentType();\n $returnData = null;\n\n // parse XML\n if (0 === strpos($contentType, 'application/xml')) {\n $returnData = XmlSerializer::createFromString($body)->getNormalized();\n } elseif (0 === strpos($contentType, 'application/json')) {\n $returnData = JsonSerializer::createFromString($body)->getNormalized();\n }\n\n if (!is_array($returnData)) {\n throw new SerializerException('Could not convert response body into array: '.$body);\n }\n\n return $returnData;\n }", "public function getChanges()\n {\n $this->conn->initialize();\n $response = $this->conn->getClient()->request(\"/{$this->name}/_changes\");\n\n if (false === $response->isSuccessful()) {\n throw new \\RuntimeException('Request wasn\\'t successfull');\n }\n\n return JSONEncoder::decode($response->getContent());\n }", "public function getRevisions(): array;", "private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }", "public function testReadChangeset()\n\t{\n\t\t$id = '14153708';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleXml;\n\t\t$returnData->changeset = new SimpleXMLElement($this->sampleXml);\n\n\t\t$path = 'changeset/' . $id;\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t\t$this->object->readChangeset($id),\n\t\t\t\t$this->equalTo(new SimpleXMLElement($this->sampleXml))\n\t\t);\n\t}", "protected function init()\n {\n if ($this->request->getResponseFormat() == 'xml') {\n $aggregated = new \\SimpleXMLElement('<response/>');\n foreach ($this->responseRaw as $name => $response) {\n $child = $aggregated->addChild('classification');\n $child->addAttribute('classifier', $name);\n $xml = simplexml_load_string($response);\n\n if (! $xml instanceof \\SimpleXMLElement) {\n throw new ServiceReaderException('Failed parsing XML response.');\n }\n\n if ((string) $xml->status->attributes()->success !== 'true') {\n throw new ServiceReaderException($xml->status->attributes()->statusCode);\n }\n\n foreach ($xml->readCalls->classify as $classify) {\n $child->addAttribute('textCoverage', $classify->classification->attributes()->textCoverage);\n foreach ($classify->classification->class as $class) {\n $this->simplexmlImportXml($child, $class->asXML());\n }\n }\n }\n\n return $aggregated->asXML();\n }\n\n if ($this->request->getResponseFormat() == 'json') {\n $aggregated = array();\n foreach ($this->responseRaw as $name => $response) {\n $current = json_decode($response, 1);\n\n if (! array_key_exists('success', $current)) {\n throw new ServiceReaderException('Unable to complete request');\n }\n\n if ($current['success'] !== true) {\n throw new ServiceReaderException($current['statusCode'] . ' ' . $current['errorMessage']);\n }\n\n array_key_exists('textCoverage', $current) ? '' : $current['textCoverage'] = null;\n array_key_exists('cls1', $current) ? '' : $current['cls1'] = null;\n\n $aggregated[] = array(\n 'classifier' => $name,\n 'textCoverage' => $current['textCoverage'],\n 'classes' => $current['cls1']\n );\n }\n\n return json_encode($aggregated);\n }\n\n return $this->responseRaw;\n }", "public function getReferenceSetsList(){\n return $this->_get(1);\n }", "private function get_links( WP_REST_Response $response ) {\n\n\t\t$server = rest_get_server();\n\n\t\tforeach ( [ 'get_compact_response_links', 'get_response_links' ] as $method ) {\n\t\t\tif ( is_callable( [ $server, $method ] ) ) {\n\t\t\t\treturn (array) call_user_func( [ $server, $method ], $response );\n\t\t\t}\n\t\t}\n\n\t\treturn [];\n\t}", "private function mapResponses()\n {\n foreach ($this->responses as &$data) {\n /** @var Response $response */\n $response = $data[1];\n\n if (preg_match('/^\\$/',$response->ref)) {\n $params = explode(\"/\", strtolower($response->ref));\n\n $this->loadParent($data, $params[1], $params[2]);\n } else {\n $this->head_responses[] = &$data;\n }\n }\n }", "public function postOutboundCallanalysisresponsesetsWithHttpInfo($body)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\ResponseSet';\n $request = $this->postOutboundCallanalysisresponsesetsRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ResponseSet',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function wrapResults($outputs)\n {\n return new Google_Drive_Changes_List_Results($outputs);\n }", "public function getVersions():array\n {\n return json_decode(\n copy_to_string($this->request('GET', '/unoconv/versions')->getBody()),\n true\n );\n }", "public function interpretResponse($resparr) {\n\t\t//validate\n\t\tif(count($resparr) < 1 || !is_array($resparr)) {\n\t\t\tthrow new Tivoka_Exception('Expected batch response, but none was received', Tivoka::ERR_INVALID_RESPONSE);\n\t\t}\n\t\n\t\t$requests = $this->id;\n\t\t$nullresps = array();\n\t\t$responses = array();\n\t\n\t\t//split..\n\t\tforeach($resparr as $resp)\n\t\t{\n\t\t\tif(!is_array($resp)) throw new Tivoka_Exception('Expected batch response, but no array was received', Tivoka::ERR_INVALID_RESPONSE);\n\t\t\t\t\n\t\t\t//is jsonrpc protocol?\n\t\t\tif(!isset($resp['jsonrpc']) && !isset($resp['id'])) throw new Tivoka_Exception('The received reponse doesn\\'t implement the JSON-RPC prototcol.', Tivoka::ERR_INVALID_RESPONSE);\n\t\t\t\t\n\t\t\t//responds to an existing request?\n\t\t\tif(!array_key_exists($resp['id'], $requests))\n\t\t\t{\n\t\t\t\tif($resp['id'] != null) continue;\n\t\n\t\t\t\t$nullresps[] = $resp;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\n\t\t\t//normal response...\n\t\t\t$requests[ $resp['id'] ]->setResponse(json_encode($resp));\n\t\t\tunset($requests[ $resp['id'] ]);\n\t\t}\n\t\n\t\t//handle id:null responses...\n\t\tforeach($requests as $req)\n\t\t{\n\t\t\t$resp = array_shift($nullresps);\n\t\t\t$requests[ $req->id ]->setResponse(json_encode($resp));\n\t\t}\n\t}", "protected function curl_parse ( $response )\r\n\t{\r\n\t\tif (empty($response))\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\r\n\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$response,2);\r\n\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +100@', $lines[0]))\r\n\t\t{\r\n\t\t\t/* HTTP/1.x 100 Continue\r\n\t\t\t * the real data is on the next line\r\n\t\t\t*/\r\n\t\t\t@list($headers,$body) = explode(\"\\r\\n\\r\\n\",$body,2);\r\n\t\t\t$lines = explode(\"\\r\\n\",$headers);\r\n\t\t}\r\n\t\r\n\t\t// first line of headers is the HTTP response code\r\n\t\t$http_line = array_shift($lines);\r\n\t\tif (preg_match('@^HTTP/[0-9]\\.[0-9] +([0-9]{3})@', $http_line, $matches))\r\n\t\t{\r\n\t\t\t$code = $matches[1];\r\n\t\t}\r\n\t\r\n\t\t// put the rest of the headers in an array\r\n\t\t$headers = array();\r\n\t\tforeach ($lines as $l)\r\n\t\t{\r\n\t\t\tlist($k, $v) = explode(': ', $l, 2);\r\n\t\t\t$headers[strtolower($k)] = $v;\r\n\t\t}\r\n\t\r\n\t\treturn array( 'code' => $code, 'headers' => $headers, 'body' => $body);\r\n\t}", "public function retrieveAll() {\n $connMgr = new ConnectionManager();\n $conn = $connMgr->getConnection();\n\n $sql = \"SELECT * FROM response\";\n $stmt = $conn->prepare($sql);\n \n $status = $stmt->execute();\n\n $responses = [];\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n while( $row = $stmt->fetch() ) {\n $responses[] = new Response(\n $row[\"name\"], \n $row[\"classLength\"],\n $row[\"semLength\"]\n );\n }\n\n $stmt = null;\n $conn = null;\n\n return $responses;\n }", "function http_parse_response()\n\t{\n\t\tlist($headers, $body) = explode(\"\\r\\n\\r\\n\", $this->http_response, 2);\n\t\t$this->http_parse_headers($headers);\n\n\t\tif(isset($this->http_response_headers['Transfer-Encoding']) && 'chunked' == $this->http_response_headers['Transfer-Encoding']):\n \t\t$this->http_response_body = $this->http_chunked_decode($body);\n\t\telse:\n\t\t\t$this->http_response_body = $body;\n\t\tendif;\n\n\t\t$this->http_set_content_type($this->http_default_content_type);\n\t}", "private function parse_curl_response()\n {\n $this->status_code = curl_getinfo($this->curl_handle, CURLINFO_HTTP_CODE);\n #$this->http_info = array_merge($this->http_info, curl_getinfo($this->curl_handle));\n\n $header_size = curl_getinfo($this->curl_handle, CURLINFO_HEADER_SIZE);\n\n // Capture the HTTP response headers\n $this->http_response_headers = substr($this->curl_response, 0, $header_size);\n\n // Capture the HTTP response body\n $this->http_body = substr($this->curl_response, $header_size);\n\n if(!$this->do_not_exit)\n {\n $this->_check_valid_response($this->http_body);\n }\n //close connection\n curl_close($this->curl_handle);\n }", "public abstract function fetchRawValueFromChangeset($changeset);", "protected function formatHistoryList($content){\r\n\t\t// Looking for successful header\r\n\t\t$resultsList = explode(\"200 Ok\\n\",$content);\r\n\t\t// Separate the header and the actual body that contains the ticket list\r\n\t\t$results = explode(\"\\n\\n--\\n\", $resultsList[1]);\r\n\t\t// Check if there is any ticket in the body\r\n\t\tif (!empty($results) && strpos($results[0], \"id: \") > 0) { // if result if not empty\r\n\t\t\t// Translate the text list into array\r\n\t\t\tforeach ($results as $j => $ticket){\r\n\t\t\t\t// Get content atttribute out and treat it separately\r\n\t\t\t\t$head = explode(\"Content: \", $ticket);\r\n\t\t\t\t$tail = explode(\"Creator:\", $head[1]);\r\n\t\t\t\t$contentBody = $tail[0];\r\n\t\t\t\t$ticket = $head[0] . \"Creator:\" . $tail[1];\r\n\t\t\t\t$attributes = explode(\"\\n\",$ticket);\r\n\t\t\t\tif(empty($attributes[0])) unset($attributes[0]);\r\n\t\t\t\tif(empty($attributes[count($attributes)-1])) unset($attributes[count($attributes)-1]);\r\n\t\t\t\tforeach ($attributes as $i => $data){\r\n\t\t\t\t\t$keys = explode(\": \", $data);\r\n\t\t\t\t\tunset($attributes[$i]);\r\n\t\t\t\t\tif (!empty($keys[0])) $attributes[$keys[0]] = $keys[1];\r\n\t\t\t\t}\r\n\t\t\t\t$attributes['Content'] = trim($contentBody);\r\n\t\t\t\t$results[$j] = $attributes;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}", "public function getChangeset(): array\n\t{\n\t\t$changes = [];\n\n\t\tforeach ($this->getNonMetadataFields() as $key => $value) {\n\t\t\tif (! isset($this->initialFieldValues[$key]) || $value !== $this->initialFieldValues[$key]) {\n\t\t\t\t$changes[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $changes;\n\t}", "public function flushResponses()\n {\n self::$bxClient->flushResponses();\n self::$bxClient->resetRequests();\n }", "public function testDownloadChangeset()\n\t{\n\t\t$id = '123';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleXml;\n\t\t$returnData->create = new SimpleXMLElement($this->sampleXml);\n\n\t\t$path = 'changeset/' . $id . '/download';\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t\t$this->object->downloadChangeset($id),\n\t\t\t\t$this->equalTo(new SimpleXMLElement($this->sampleXml))\n\t\t);\n\t}", "public function getMultipart()\n {\n\n if (empty($this->multipartTransactions)) {\n\n $this->multipartTransactions = array();\n\n if (!$this->isContentType('multipart/mixed')) {\n throw new Exception('Response is not multipart');\n }\n\n // Step 1. Get boundary\n\n preg_match('/boundary=([^\";]+)/i', $this->getContentType(), $matches);\n\n if (empty($matches[1])) {\n throw new Exception('Boundary not found');\n }\n\n $boundary = $matches[1];\n\n // Step 2. Split by boundary and remove first and last parts if needed\n\n $parts = explode('--' . $boundary . '', (string)$this->response->getBody()); //TODO Handle as stream\n\n if (empty($parts[0])) {\n array_shift($parts);\n }\n\n if (trim($parts[count($parts) - 1]) == '--') {\n array_pop($parts);\n }\n\n if (count($parts) == 0) {\n throw new Exception('No parts found');\n }\n\n // Step 3. Create status info object\n\n $statusInfoPart = array_shift($parts);\n $statusInfoObj = new self(null, trim($statusInfoPart), $this->response->getStatusCode());\n $statusInfo = $statusInfoObj->getJson()->response;\n\n // Step 4. Parse all parts into Response objects\n\n foreach ($parts as $i => $part) {\n\n $partInfo = $statusInfo[$i];\n\n $this->multipartTransactions[] = new self(null, trim($part), $partInfo->status);\n\n }\n\n }\n\n return $this->multipartTransactions;\n\n }", "public static function getSuccessFullTrackResponses(): array\n {\n $finder = new Finder();\n $finder->name('*.json')->in(__DIR__ . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . 'success');\n $result = [];\n /** @var SplFileInfo $file */\n foreach ($finder->files() as $file) {\n $result['TrackId: ' . str_replace('*.json', '', $file->getFilename())] = [\n 'jsonResponse' => file_get_contents(\n $file->getPathname()\n ),\n ];\n }\n\n return $result;\n }", "function Get_revisions($query = \"select * from Revisions\"){\n\t\t$sqlResult = sqlsrv_query($this->conn,$query);\n\t\t$temp =\"\";\n\t\twhile ($row = sqlsrv_fetch_array($sqlResult))\n\t\t{\n\t\t\t$temp .= '{\"Id\":\"'.$row['Id'].'\",';\n\t\t\t$temp .= '\"Revision\": \"'.$row['Revision'].'\",';\n\t\t\t$temp .= '\"Status\": \"'.$row['Status'].'\",';\n\t\t\t$temp .= '\"Active\": \"'.$row['Active'].'\",';\n\t\t\t$temp .= '\"Path\": \"'.$row['Active'].'\",';\n\t\t\t$temp .= '\"Dept\": \"'.$row['Dept'].'\"},';\n\n\t\t}\n\t\t$temp = substr($temp,0, -1);\n\t\t$json ='{\"All\":\"algo\",\"dataset\":[ '.$temp.']}';\n\t\tprint $json;\n\t\t$object = json_decode($json);\n\t\techo $object;\n\t\treturn $object;\n\t\t\n\t}", "public function processChangedEntities(array $sourceEntityData): array\n {\n return [];\n }", "public function getResponseContent($request): array\n {\n return $this->wrap(\n $this->resource->resolve($request),\n $this->resource->with($request),\n $this->resource->additional\n );\n }", "public function fetchAllZf1Changelogs()\n {\n $filters = $this->xmlRpc->getFavouriteFilters($this->jiraAuth);\n \n $versions = array();\n foreach ($filters as $filter) {\n if (preg_match('/fix.*?(\\d+\\.\\d+\\.\\d+)/i', $filter['name'], $m)) {\n $versions[$m[1]] = $filter['id'];\n }\n }\n \n $issues = array();\n foreach ($versions as $version => $filterId) {\n $issues[$version] = $this->fetchZf1ChangelogByJiraFilter($version, $filterId);\n }\n \n $this->console->writeLine(\"Writing to {$this->zf1DataFile}\");\n $fileContent = \"<\" . \"?php\\n\\$tags = \" \n . var_export($issues, 1) \n . \";\\nreturn \\$tags;\";\n file_put_contents($this->zf1DataFile, $fileContent);\n \n $this->console->writeLine('[DONE]', Color::GREEN);\n }", "public function allBranches()\n {\n $client = new Client();\n \t$response = $client->request('GET', 'http://www.dpdparcelshop.cz/api/get-all');\n $statusCode = $response->getStatusCode();\n \t$body = $response->getBody()->getContents();\n\n $result = json_decode($body);\n if($result->code != 200){\n return 'External service error';\n }\n\n\n $branches = array();\n foreach($result->data->items as $item){\n $branch = new BranchModel($item);\n array_push($branches, $branch->getBranchData());\n }\n return $branches;\n }", "public function toArray(): array\n {\n $this->buildResponse();\n\n return json_decode($this->response->getBody()->getContents(), true);\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}", "protected function getChangedRemoteObjects()\n {\n $query = $this->getRemoteObjectsQuery();\n $table = $this->getRemoteBaseTable();\n $query->addWhere(\"\\\"{$table}\\\".\\\"_ImportedID\\\" > 0\");\n $query->addWhereAny(array(\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" IS NULL\",\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" < \\\"{$table}\\\".\\\"LastEdited\\\"\"\n ));\n $items = iterator_to_array($this->task->query($query));\n return new ArrayList($items);\n }", "public function parseMetadata(ResponseInterface $response): array;", "public function handle_collection($response)\n {\n foreach ($response->items as &$value) {\n $value = new ContactList(new Response($value));\n }\n }", "public function getComponents()\n {\n $this->parseResponse();\n\n return $this->components;\n }", "public function listsChangereasonget()\r\n {\r\n $response = ChangeReason::all();\r\n return response()->json($response, 200);\r\n }", "public function getNewChangelogs(string $url): array\n {\n $baseUrl = $this->getBaseUrl($url);\n\n $html = file_get_contents($url);\n $crawler = new Crawler($html);\n\n foreach ($this->changes as $type => $values) {\n\n $filter = $crawler->filter('#' . $values['id'] . ' > div > ul > li > a');\n $this->changes[$type] = [\n 'title' => $type,\n 'changelogs' => []\n ];\n\n foreach ($filter as $domElement) {\n\n $title = $this->escapeTitleFromChangelog($domElement->nodeValue);\n\n $url = $domElement->getAttribute('href');\n $url = $baseUrl . '/' . $url;\n\n if (!($this->changesInIssue[$type]['changelogs'][$title] ?? false)) {\n $line = \"* [ ] [$title]($url)\";\n $this->changes[$type]['changelogs'][$title] = [\n 'title' => $title,\n 'url' => $url,\n 'line' => $line\n ];\n }\n }\n }\n\n return $this->changes;\n }", "public static function getHmpoResponseArray()\n {\n return self::getAll(true);\n }", "public function getErrorResponses();", "private function buildParsedRequests(ApiParseResult $parseResult) : array\n {\n $requests = [];\n\n foreach ($parseResult->getApi()->getResourceGroups() as $apiResourceGroup) {\n foreach ($apiResourceGroup->getResources() as $apiResource) {\n foreach ($apiResource->getTransitions() as $apiStateTransition) {\n foreach ($apiStateTransition->getHttpTransactions() as $apiHttpTransaction) {\n $this->processApiHttpTransactions(\n $apiHttpTransaction,\n $apiResourceGroup,\n $apiResource,\n $apiStateTransition,\n $requests\n );\n }\n }\n }\n }\n\n return $requests;\n }", "function parse() {\r\n\t\t/* JSON */\r\n\t\tif (strpos ( $this->response_content_type, \"application/json\" ) !== false) {\r\n\t\t\t$this->response_parsed = json_decode($this->response_body);\r\n\t\t\t/* JSON STREAM */\r\n\t\t} elseif (strpos ( $this->response_content_type, \"json-stream\" ) !== false) {\r\n\t\t\t$stream = split ( \"\\n\", $this->response_body );\r\n\t\t\tif (count ( $stream ) < $stream [0] ['ResultLength']) {\r\n\t\t\t\t// echo \"Invalid JSON Stream. Result Length:\".count($stream);\r\n\t\t\t\t$this->client->status_code = 400;\r\n\t\t\t\t$GLOBALS ['ResultStack']->pushNew ( \"Invalid JSON Stream\", ERROR );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$jsonServer = new JSON ( JSON_LOOSE_TYPE );\r\n\t\t\t$this->response_parsed = array ();\r\n\t\t\tforeach ( $stream as $line )\r\n\t\t\t\t$this->response_parsed [] = $jsonServer->decode ( $line );\r\n\t\t\t/* DEFAULT */\r\n\t\t} else {\r\n\t\t\t$this->response_parsed = $this->response_body;\r\n\t\t}\r\n\t}", "private function parseResponse(array $responses, int $limit): array\n {\n $responseBody = $responses[0]->getBody()->getContents();\n $results = json_decode($responseBody, true);\n\n if (!isset($results['recommendations'])) {\n throw new MultiParseException(0, \"Invalid data from Recommendations API\");\n }\n\n $pids = $this->getPidsFromRecommendations($results['recommendations'], $limit);\n\n $result = [];\n if ($pids) {\n $result = $this->programmesService->findByPids($pids);\n }\n return $result;\n }", "public function getTransformedCollection( ) {\n $response[\"data\"] = [];\n foreach ( (new static)->get() as $industry_object) {\n $response['data'][] = $industry_object->getBeforeStandard();\n }//foreach ( (new static)->get() as $industry_object)\n return $response;\n }", "protected function getOrderChanges()\n {\n $changes = array();\n\n foreach (static::$changes as $key => $data) {\n $names = explode(':', $key, 2);\n\n $name = static::getFieldHumanReadableName($names[0]);\n $subname = isset($names[1]) ? $names[1] : null;\n\n if ($subname) {\n $subname = static::getFieldHumanReadableName($subname);\n $changes[$name][$subname] = $data;\n\n } else {\n $changes[$name] = $data;\n }\n }\n\n return $changes;\n }", "public function getResponseData(): array\n {\n $this->build();\n\n return $this->responseData;\n }", "function get_set_list($content_type,$q, $limit,$offset) {\n\tglobal $api_key;\n\t$url= \"https://api-eu.hosted.exlibrisgroup.com/almaws/v1/conf/sets\";\n\t$ch = curl_init();\n\t$queryParams = '?' . urlencode('apikey') . '=' . urlencode($api_key);\n\t$queryParams .= '&' . urlencode('content_type') . '=' . urlencode($content_type);\n\t//if ($q != \"\") {\n\t\t$queryParams .= '&' . urlencode('q') . '=' . urlencode($q);\n\t//}\n\t$queryParams .= '&' . urlencode('limit') . '=' . urlencode($limit);\n\t$queryParams .='&' . urlencode('offset') . '=' . urlencode($offset);\n\tcurl_setopt($ch, CURLOPT_URL, $url . $queryParams);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\tcurl_setopt($ch, CURLOPT_HEADER, FALSE);\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}", "private function http_data($response, $infohashes, $host)\n {\n $torrents_data = [];\n\n foreach ($infohashes as $infohash) {\n $ben_hash = '20:' . pack('H*', $infohash) . 'd';\n $start_pos = strpos($response, $ben_hash);\n if (false !== $start_pos) {\n $start = $start_pos + 24;\n $head = substr($response, $start);\n $end = strpos($head, 'ee') + 1;\n $data = substr($response, $start, $end);\n\n $seeders = '8:completei';\n $torrent_info['seeders'] = $this->get_information($data, $seeders, 'e');\n\n $completed = '10:downloadedi';\n $torrent_info['completed'] = $this->get_information($data, $completed, 'e');\n\n $leechers = '10:incompletei';\n $torrent_info['leechers'] = $this->get_information($data, $leechers, 'e');\n\n $torrents_data[$infohash] = $torrent_info;\n } else {\n $this->collect_infohash($infohash);\n $this->errors[] = 'Invalid infohash (' . $infohash . ') for tracker: ' . $host . '.';\n }\n }\n\n return $torrents_data;\n }", "private function extractBulkResponseItems($response): array\n {\n // If response is callable, wait until we have the final response\n if (($response instanceof FutureArrayInterface) === true) {\n $response = $this->unwrapPromise($response);\n }\n\n // If final response isn't an array, throw exception\n if (\\is_array($response) === false) {\n throw new BulkFailureException([], 'Invalid response received from bulk request.');\n }\n\n // If the top level indicates no errors or items, return nothing\n if (isset($response['errors']) === false ||\n $response['errors'] === false ||\n isset($response['items']) === false ||\n \\is_array($response['items']) === false) {\n return [];\n }\n\n return $response['items'];\n }", "public function finalize()\n {\n // Prepare response\n if (in_array($this->status, array(204, 304))) {\n $this->headers->remove('Content-Type');\n $this->headers->remove('Content-Length');\n $this->setBody('');\n }\n\n return array($this->status, $this->headers, $this->body);\n }", "protected static function ExtractCorrectHttpLine($rawHttpBatchResponse)\n {\n if(preg_match_all(\"|HTTP/[\\d\\.x]+ \\d+ [^\\r\\n]+|\", $rawHttpBatchResponse,\n $multiArray, PREG_OFFSET_CAPTURE))\n {\n if (isset($multiArray[0]))\n {\n if (!(isset($multiArray[0][0]) &&\n isset($multiArray[0][0][0])))\n {\n return null;\n }\n\n $prevHeader = $multiArray[0][0][0];\n $index = self::ExtractBatchBoundaryIndex($rawHttpBatchResponse);\n unset($multiArray[0][0]);\n //If BatchBoundry tag is not present, then return the last HTTP\n //line from the collection.\n if($index == -1)\n {\n $count = count($multiArray[0]);\n if($count > 0)\n {\n $prevHeader = $multiArray[0][$count][0];\n }\n }\n else\n {\n foreach($multiArray[0] as $array)\n {\n if ($array[1] > $index)\n {\n break;\n }\n\n $prevHeader = $array[0];\n }\n }\n\n return $prevHeader;\n }\n }\n\n return null;\n }", "public function getLastResponse()\r\n\t{\r\n\t\treturn array('headers' => $this->response_headers[count($this->response_headers)-1],\r\n\t\t'content' => $this->response_content);\r\n\t}", "private function getContent()\n {\n return $this->serializer->deserialize($this->client->getResponse()->getContent(), 'array', 'json');\n }", "public function getVerboseResponse() \n {\n $this->execute();\n \n if ($this->error) {\n return $this->error;\n }\n \n $contentType = $this->getContentType();\n \n $body = ($this->def['dataType'] == 'array' || strpos($contentType, 'json') !== false) ? static::data2json($this->responseText) : $this->responseText;\n \n return [\n 'status' => $this->status,\n 'body' => $body, \n 'info' => $this->responseInfo,\n 'header' => $this->responseHeaders,\n 'request_header' => $this->getRequestHeaders(),\n 'content_type' => $contentType\n ];\n }", "public static function Create($httpBatchResponse)\n {\n $changesetBoundary = null;\n $httpResponses = array();\n if (!self::CheckIsError($httpBatchResponse))\n {\n $changesetBoundary = HttpBatchResponse::ExtractChangesetBoundary($httpBatchResponse);\n if (!isset($changesetBoundary))\n {\n throw new InvalidOperation(Resource::InvalidBatchResponseNoCSBoundary);\n }\n\n $httpResponses = HttpBatchResponse::ExtractHttpResponses($httpBatchResponse,\n $changesetBoundary);\n }\n\n return new HttpBatchResponse($httpResponses, $httpBatchResponse,\n $changesetBoundary);\n }", "public function runAllRequests(): array\n {\n $running = null;\n do {\n $status = curl_multi_exec($this->multiHandle, $running);\n usleep(250000); // 0.25s\n } while ($status === CURLM_CALL_MULTI_PERFORM || $running);\n\n for($i=0, $iMax = count($this->handles); $i < $iMax; $i++) {\n $out = curl_multi_getcontent($this->handles[$i]);\n $data[$i] = $out; // json_decode($out, true);\n curl_multi_remove_handle($this->multiHandle, $this->handles[$i]);\n }\n// foreach ($this->handles as $i => $c) {\n// $out = curl_multi_getcontent($this->handles[$i]);\n// $data[$i] = json_decode($out, true);\n// curl_multi_remove_handle($this->multiHandle, $this->handles[$i]);\n// }\n curl_multi_close($this->multiHandle);\n return $data;\n }", "public function getStatus(): array\n {\n $this->parseResponse();\n return $this->getData();\n }", "public function listAction(int $limit = 20, int $offset = 0, $updateCounter = false): array\n\t{\n\t\tif (\n\t\t\t!Loader::includeModule('crm')\n\t\t\t|| !class_exists('\\Bitrix\\Crm\\Activity\\Provider\\CallTracker')\n\t\t)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif (\\Bitrix\\Crm\\Settings\\LeadSettings::isEnabled())\n\t\t{\n\t\t\treturn $this->getErrorResult('Wrong crm mode. Only simple crm is supported', 'NOT_SIMPLE_CRM');\n\t\t}\n\n\t\tif (!\\Bitrix\\Crm\\Restriction\\RestrictionManager::isCallTrackerPermitted())\n\t\t{\n\t\t\treturn $this->getErrorResult('Not supported for your tariff', 'WRONG_TARIFF');\n\t\t}\n\n\t\tif ($limit > 100)\n\t\t{\n\t\t\t$limit = 100;\n\t\t}\n\n\t\tif ($offset < 0)\n\t\t{\n\t\t\t$offset = 0;\n\t\t}\n\n\t\t$userID = $this->getCurrentUser()->getId();\n\t\t$filter = [\n\t\t\t'IS_RECURRING' => 'N',\n\t\t\t'STAGE_SEMANTIC_ID' => [\\Bitrix\\Crm\\PhaseSemantics::PROCESS],\n\t\t\t'CHECK_PERMISSIONS' => 'Y',\n\t\t];\n\n\t\t$counter = \\Bitrix\\Crm\\Counter\\EntityCounterFactory::create(\n\t\t\t\\CCrmOwnerType::Deal,\n\t\t\t\\Bitrix\\Crm\\Counter\\EntityCounterType::CURRENT,\n\t\t\t$userID\n\t\t);\n\n\t\t$filter = array_merge(\n\t\t\t$filter,\n\t\t\t$counter->prepareEntityListFilter([\n\t\t\t\t'MASTER_ALIAS' => \\CCrmDeal::TABLE_ALIAS,\n\t\t\t\t'MASTER_IDENTITY' => 'ID',\n\t\t\t\t'PROVIDER_ID' => \\Bitrix\\Crm\\Activity\\Provider\\CallTracker::PROVIDER_ID,\n\t\t\t])\n\t\t);\n\n\t\t$navOptions = [\n\t\t\t'FIELD_OPTIONS' => [\n\t\t\t\t'ADDITIONAL_FIELDS' => [\n\t\t\t\t\t'ACTIVITY',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'QUERY_OPTIONS' => [\n\t\t\t\t'LIMIT' => $limit,\n\t\t\t\t'OFFSET' => $offset,\n\t\t\t],\n\t\t];\n\n\t\t$dealIds = [];\n\n\t\t$dealActivityList = \\CCrmActivity::GetEntityList(\n\t\t\t\\CCrmOwnerType::Deal,\n\t\t\t$userID,\n\t\t\t'asc',\n\t\t\t$filter,\n\t\t\tfalse,\n\t\t\t$navOptions\n\t\t);\n\t\twhile ($dealActivityItem = $dealActivityList->Fetch())\n\t\t{\n\t\t\t$dealIds[] = $dealActivityItem['ID'];\n\t\t}\n\n\t\t$result = [\n\t\t\t'items' => $this->getItemsById($dealIds),\n\t\t];\n\n\t\tif ($updateCounter)\n\t\t{\n\t\t\t$this->updateCounter();\n\t\t}\n\n\t\treturn $result;\n\t}", "public static function deserializeCollectionsResponse(string $rawResponse): CollectionsResponse {\n\n $data = json_decode(trim($rawResponse), true);\n\n $model = new CollectionsResponse();\n $model->setRawResponse($rawResponse);\n\n if (null === $data) {\n return $model;\n }\n\n foreach (ArrayHelper::get($data, \"collections\", []) as $current) {\n $model->addCollection(JsonDeserializer::deserializeCollection($current));\n }\n\n $model->setPage(intval(ArrayHelper::get($data, \"page\", -1)));\n $model->setPerPage(intval(ArrayHelper::get($data, \"per_page\", -1)));\n $model->setTotalResults(intval(ArrayHelper::get($data, \"total_results\", -1)));\n $model->setNextPage(ArrayHelper::get($data, \"next_page\"));\n $model->setPrevPage(ArrayHelper::get($data, \"prev_page\"));\n\n return $model;\n }", "private function set_response_rows($result) { \n $rows = [];\n foreach ($result as $r) {\n $cell = [];\n foreach ($r as $column => $value) {\n $cell[] = call_user_func($this->format, $column, $value, $r);\n }\n\n $rows[] = [\n 'id' => $r->id,\n 'cell' => $cell\n ];\n }\n return $rows;\n }", "function getFileList() {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// use the getURL function to call the URL\n\t$response = getURL($apiBaseURL);\n\t// it returned as JSON so lets decode it\n\t$response = json_decode($response);\n\n\t// return the response\n\treturn($response);\n}", "public function getResponseErrors(): array\n {\n $responseBody = $this->response->getBody();\n $responseBody->rewind();\n $decodedBody = json_decode($responseBody->getContents(), true);\n $responseBody->rewind();\n return isset($decodedBody['errors']) ? $decodedBody['errors'] : [];\n }", "public static function batchCopy() {\n $result = array();\n $copied = lC_Products_Admin::batchCopy($_GET['batch'], $_GET['new_category_id'], $_GET['copy_as']);\n if ($copied) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "private function setResponseData($competitions)\n {\n $response = [];\n if (!$competitions->isEmpty()) {\n $competitionCollection = $competitions->map(function ($competition) {\n\n $status = null;\n\n return $values[] = [\n 'id' => $competition->id,\n 'annoucement_date' => $competition->annoucement_date,\n 'start_date' => $competition->start_date,\n 'end_date' => $competition->end_date,\n 'name' => $competition->name,\n 'coordinates' => $competition->coordinates,\n 'location' => $competition->location,\n 'details' =>$competition->details,\n 'admission_price' => $competition->admission_price,\n 'certification_doc' => $competition->certification_doc,\n 'status' => $competition->status,\n 'type' => $competition->type->name\n ];\n });\n $response = $competitionCollection->toArray();\n\n }\n return $response;\n\n }", "public function getDataChangesList() {\n return DataChangeRecord::get()->filter([\n 'ChangeRecordID' => $this->owner->ID,\n 'ChangeRecordClass' => $this->owner->ClassName\n ]);\n }", "public static function batchDelete() {\n $result = array();\n $copied = lC_Products_Admin::batchDelete($_GET['batch']);\n if ($copied) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "protected function wrapResults($outputs)\n {\n return new Google_Drive_Revisions_List_Results($outputs);\n }", "public function testCanReturnAnArrayOfStatusUpdates()\n {\n $t = M::mock('Example\\FacebookFeedReader');\n $t->shouldReceive('getMessages')\n ->once()\n ->andReturn(array('foo', 'bar', 'baz', 'boo', 'bop'));\n $s = new SocialFeed($t);\n $v = $s->getArray();\n $this->assertCount(5, $v);\n $this->assertEquals($v[0], 'foo');\n $this->assertEquals($v[1], 'bar');\n $this->assertEquals($v[2], 'baz');\n $this->assertEquals($v[3], 'boo');\n $this->assertEquals($v[4], 'bop');\n }", "public function getAllPipelines() \n\t{\n\t\t$requestor \t= new \\Streak\\ApiRequestor();\n\t\t$endpoint \t= \"/v1/pipelines\";\n\t\t$data \t\t= $requestor->request($endpoint);\n return $data;\n\t}", "protected function getArrayResponse($response) {\n $content = $response->getContent();\n return json_decode($content, true);\n }", "public function setBatches($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Ydb\\Topic\\StreamReadMessage\\ReadResponse\\Batch::class);\n $this->batches = $arr;\n\n return $this;\n }", "private function getHistory()\n {\n $history = [];\n\n foreach ($this->getResponse()->data as $k => $v) {\n $history[$k]['tanggal'] = Utils::setDate($v->Tanggal);\n\n switch ($v->StatusInternal) {\n case 'Baru':\n $history[$k]['posisi'] = preg_replace('/Diterima di Sales Counter (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Manifest Pickup':\n $posisi = preg_replace('/Di pickup oleh petugas (.*)/', '$1', $v->TrackStatusNama);\n $history[$k]['posisi'] = $posisi;\n $this->kotaPengirim = strtoupper($posisi);\n break;\n\n case 'Serah Terima Pickup':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Moda Angkutan':\n $history[$k]['posisi'] = preg_replace('/Pengiriman dari (.*) ke (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Surat Muatan':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Manifest':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Surat Jalan Kurir':\n $history[$k]['posisi'] = preg_replace('/Proses pengantaran oleh kurir (.*), (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Terkirim/Diterima':\n $history[$k]['posisi'] = 'Diterima';\n $this->tanggalTerima = $v->Tanggal;\n $this->namaPenerima = preg_replace('/Diterima oleh (.*)\\((.*)/', '$1', $v->TrackStatusNama);\n break;\n\n default:\n $history[$k]['posisi'] = null;\n break;\n }\n\n $history[$k]['message'] = $v->TrackStatusNama;\n }\n\n return $history;\n }", "public function getResponses() {\r\n\t\t\treturn $this->_arrResponses;\r\n\t\t}", "function get_batches($batch_id=0){\n\t\tglobal $mysqli;\n\n\t\t$query=\"SELECT courses.*,batches.* FROM courses_mas courses, batches WHERE courses.course_id=batches.course_id\";\n\t\tif($batch_id != 0)\n\t\t{\n\t\t\t$query.=\" AND batch_id=\".$batch_id.\" LIMIT 1\";\n\t\t}\n\t\t$result=$mysqli->query($query);\n\t\twhile($row=$result->fetch_assoc())\n\t\t{\n\t\t\t$response[]=$row;\n\t\t}\n\t\theader('Content-Type: application/json');\n\t\techo json_encode($response, JSON_UNESCAPED_SLASHES);\n\t}" ]
[ "0.57859606", "0.5652944", "0.524977", "0.510357", "0.5055637", "0.50298923", "0.49956423", "0.49920276", "0.48605344", "0.48599285", "0.48245278", "0.47964564", "0.47758868", "0.4772405", "0.47491142", "0.47408336", "0.47234517", "0.47150832", "0.4697898", "0.46687984", "0.46638206", "0.46446759", "0.46446759", "0.4637141", "0.46233377", "0.46188366", "0.46099013", "0.45876417", "0.45828786", "0.4580652", "0.45786116", "0.45753586", "0.45696282", "0.4548975", "0.45444372", "0.454017", "0.45380747", "0.4538009", "0.45378867", "0.45331675", "0.45241776", "0.4522407", "0.45214942", "0.45164117", "0.45120856", "0.45107898", "0.45100754", "0.45021105", "0.44936395", "0.44933128", "0.44930884", "0.4485066", "0.44839096", "0.44838032", "0.44694358", "0.44657624", "0.44642204", "0.44585222", "0.445534", "0.44523495", "0.44497293", "0.4449089", "0.44448885", "0.44434687", "0.44425014", "0.44385424", "0.44359228", "0.4434341", "0.44341153", "0.44312721", "0.44264406", "0.44209546", "0.4417348", "0.441232", "0.43945733", "0.43942782", "0.43910813", "0.43879485", "0.4387507", "0.43729776", "0.43586415", "0.43569705", "0.43534073", "0.435265", "0.43397546", "0.43245202", "0.43229043", "0.4316879", "0.43148106", "0.43098015", "0.4308557", "0.4304056", "0.43006393", "0.42939863", "0.42931253", "0.4287955", "0.4286996", "0.42850432", "0.42827317", "0.42815992" ]
0.67692846
0
Creates an Enqueue instance.
public function __construct( string $handle, string $type ) { $this->handle = $handle; $this->type = $type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createQueue();", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue() {\n\t}", "public static function enqueue();", "public function createQueue() {\n // Drupal is first installed) so there is nothing we need to do to create\n // a new queue.\n }", "function __construct(){\n\n\t\t\t$this->enqueues();\n\n\t\t}", "public function __construct($queue);", "public function __construct()\n {\n $this->queue = new Pheanstalk('localhost', '11300', null, true);\n }", "public function testEnqueue()\n {\n $topicName = 'topic.name';\n $exchangeName = 'exchangeName';\n $envelopeBody = 'envelopeBody';\n $envelopeProperties = ['property_key_1' => 'property_value_1'];\n $topicData = [\n \\Magento\\Framework\\Communication\\ConfigInterface::TOPIC_IS_SYNCHRONOUS => false\n ];\n $this->communicationConfig->expects($this->once())\n ->method('getTopic')->with($topicName)->willReturn($topicData);\n $channel = $this->getMockBuilder(\\AMQPChannel::class)\n ->setMethods(['batch_basic_publish', 'publish_batch'])\n ->disableOriginalConstructor()->getMock();\n $this->amqpConfig->expects($this->once())->method('getChannel')->willReturn($channel);\n $publisher = $this\n ->getMockBuilder(\\Magento\\Framework\\MessageQueue\\Publisher\\Config\\PublisherConfigItemInterface::class)\n ->disableOriginalConstructor()->getMock();\n $this->publisherConfig->expects($this->once())\n ->method('getPublisher')->with($topicName)->willReturn($publisher);\n $connection = $this\n ->getMockBuilder(\\Magento\\Framework\\MessageQueue\\Publisher\\Config\\PublisherConnectionInterface::class)\n ->disableOriginalConstructor()->getMock();\n $publisher->expects($this->once())->method('getConnection')->with()->willReturn($connection);\n $connection->expects($this->once())->method('getExchange')->with()->willReturn($exchangeName);\n $envelope = $this\n ->getMockBuilder(\\Magento\\Framework\\MessageQueue\\EnvelopeInterface::class)\n ->disableOriginalConstructor()->getMock();\n $envelope->expects($this->once())->method('getBody')->willReturn($envelopeBody);\n $envelope->expects($this->once())->method('getProperties')->willReturn($envelopeProperties);\n $channel->expects($this->once())->method('batch_basic_publish')\n ->with($this->isInstanceOf(\\PhpAmqpLib\\Message\\AMQPMessage::class), $exchangeName, $topicName);\n $channel->expects($this->once())->method('publish_batch');\n $this->assertNull($this->bulkExchange->enqueue($topicName, [$envelope]));\n }", "public static function queue($config)\r\n {\r\n if (isset(static::$_queuers[$config])) {\r\n return static::$_queuers[$config];\r\n }\r\n\r\n $engine = static::engine($config);\r\n $queuer = new Queuer($engine);\r\n $logger = new CremillaLog();\r\n $queuer->attachListener('Queue.afterEnqueue', function ($response) use ($logger) {\r\n $data = $response->data();\r\n $logger->log(\"info\", \"Job enqueued\", []);\r\n });\r\n return static::$_queuers[$config] = $queuer;\r\n }", "function enqueue(){\n\t\t}", "public function createQueue($name, $options = null);", "public function __construct() {\n # Get the queue\n $this->queue = Queue::getQueue();\n # Now process\n $this->process();\n }", "function enqueue ($entry) {\n\n}", "public function getQueue()\n {\n return new Queue($this);\n }", "public function __construct()\n {\n $this->container = getContainer();\n $this->queue = $this->container->get(Queue::class);\n }", "public function enqueue($queue, $class, $args = null, $trackStatus = false)\n {\n return Resque::enqueue($queue, $class, $args, $trackStatus);\n }", "protected function initializeQueue() {\n\t\t$className = $this->getConfiguredQueueClassName();\n\t\t$objectFactory = new ObjectFactory();\n\t\t$queueFactory = new QueueFactory();\n\t\tself::$instance = new $className();\n\t\tif (TRUE === self::$instance instanceof QueueCachableInterface) {\n\t\t\t$cacheFactory = new CacheFactory();\n\t\t\t$queueCache = $cacheFactory->fetchCache($className::CACHE_IDENTITY);\n\t\t\tself::$instance->setCache($queueCache);\n\t\t\tself::$instance->load();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public function __construct()\n {\n $this->onQueue('tags');\n }", "public function add() {\n $this->out('CakePHP Queue Example task.');\n $this->hr();\n $this->out('This is a very simple example of a QueueTask.');\n $this->out('I will now add an example Job into the Queue.');\n $this->out('This job will only produce some console output on the worker that it runs on.');\n $this->out(' ');\n $this->out('To run a Worker use:');\n $this->out('\tbin/cake queue runworker');\n $this->out(' ');\n $this->out('You can find the sourcecode of this task in: ');\n $this->out(__FILE__);\n $this->out(' ');\n\n //$options = getopt('',['id:']);\n /*\n * Adding a task of type 'example' with no additionally passed data\n */\n //if ($this->QueuedJobs->createJob('RemittanceApi', ['id'=>4033, 'batch_id'=>'58e44de0f33a7'])) {\n if ($this->QueuedJobs->createJob('RemittanceApi', null)) {\n $this->out('OK, job created, now run the worker');\n } else {\n $this->err('Could not create Job');\n }\n }", "public function connect(array $config)\n {\n $gcp_config = $this->transformConfig($config);\n\n return new Queue(\n new \\Google\\Cloud\\PubSub\\PubSubClient($gcp_config),\n $config['queue'] ?? null\n );\n }", "public function Queues();", "public function test_createQueue() {\n\n }", "abstract public function enqueue($Job, $priority = null);", "public function createQueue($filterArray, $operations, $offset, $limit, $queueId);", "public static function enqueue($queue, $class, $args = array(), $trackStatus = null) {\n\t\tif ($trackStatus === null) {\n\t\t\t$trackStatus = Configure::read('CakeResque.Job.track');\n\t\t}\n\n\t\t$r = Resque::enqueue($queue, $class, $args, $trackStatus);\n\n\t\tif (!is_array($args)) {\n\t\t\t$args = array($args);\n\t\t}\n\n\t\t$caller = version_compare(PHP_VERSION, '5.4.0') >= 0\n\t\t\t? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)\n\t\t\t: debug_backtrace(FALSE);\n\n\t\tself::$logs[$queue][] = array(\n\t\t\t'queue' => $queue,\n\t\t\t'class' => $class,\n\t\t\t'method' => array_shift($args),\n\t\t\t'args' => $args,\n\t\t\t'jobId' => $r,\n\t\t\t'caller' => $caller\n\t\t);\n\n\t\treturn $r;\n\t}", "public function enqueue(array $messages);", "public function __construct()\n {\n $this->queue = 'mail';\n }", "protected function enqueueCreation() {\n\t\t$project = $this->Project();\n\t\t$log = $this->log();\n\n\t\t$args = array(\n\t\t\t'createID' => $this->ID,\n\t\t\t'logfile' => $this->logfile(),\n\t\t\t'projectName' => $project->Name\n\t\t);\n\n\t\tif(!$this->CreatorID) {\n\t\t\t$this->CreatorID = Member::currentUserID();\n\t\t}\n\n\t\tif($this->CreatorID) {\n\t\t\t$creator = $this->Creator();\n\t\t\t$message = sprintf(\n\t\t\t\t'Environment creation for project %s initiated by %s (%s), with IP address %s',\n\t\t\t\t$project->Name,\n\t\t\t\t$creator->getName(),\n\t\t\t\t$creator->Email,\n\t\t\t\tController::curr()->getRequest()->getIP()\n\t\t\t);\n\t\t\t$log->write($message);\n\t\t}\n\n\t\treturn Resque::enqueue('create', 'CreateEnvJob', $args, true);\n\t}", "public function createQueue(string $name): Queue\n {\n return new Queue($name);\n }", "public static function enqueueAt($at, $queue, $class, $args = array())\n\t{\n\t\tself::validateJob($class, $queue);\n\n\t\t$job = self::jobToHash($queue, $class, $args);\n\t\tself::delayedPush($at, $job);\n\t\t\n\t\tResque_Event::trigger('afterRepeatSchedule', array(\n\t\t\t'at' => $at,\n\t\t\t'queue' => $queue,\n\t\t\t'class' => $class,\n\t\t\t'args' => $args,\n\t\t));\n\t}", "public function enqueue($type, $payload = null)\n {\n $job = Job::create($type, $payload);\n\n if ($this->logger) {\n $this->logger->debug(\n 'jobqueue.queue enqueue successful: {job}',\n [\n 'job' => $job,\n ]\n );\n }\n\n $this->send($job);\n }", "public function testEnqueueQueueJobs()\n {\n $queueJobTest1 = new TestQueueJob('price', 'ShopwarePriceImport');\n $queueJobTest2 = new TestQueueJob('product', 'ShopwareProductExport');\n\n $result = $this->queue->enqueue($queueJobTest1);\n $this->assertTrue($result);\n\n $result = $this->queue->enqueue($queueJobTest2);\n $this->assertTrue($result);\n\n $this->assertCount(2, $this->queueStorage->queue);\n }", "public function __construct()\n {\n parent::__construct();\n $this->worker = new \\GearmanWorker();\n $this->worker->addServer();\n $this->worker->addFunction(env('QUEUE_SEMANTIC'), sprintf('\\\\%s::%s', __CLASS__, 'start'));\n }", "public function enqueue($element) {\n $this->queue[] = $element;\n }", "public function __construct()\n {\n $this->onQueue('daily-game-play');\n }", "public function testAddToQueue()\n {\n $this->setUpDB(['email']);\n \n $Email = new \\EmailTemplate('test');\n \n // Add the message to queue\n $r = $Email->queue('[email protected]', 'test', 'test');\n \n // get data from DB\n $EmailQueue = new \\EmailQueue();\n $filter = ['too' => '[email protected]'];\n $Collection = $EmailQueue->Get($filter, []);\n \n // asserts\n $this->assertEquals(1, $r);\n $this->assertInstanceOf(\\Collection::class, $Collection);\n $this->assertCount(1, $Collection);\n $Item = $Collection->getItem();\n $this->assertInstanceOf(\\SetterGetter::class, $Item);\n $this->assertEquals('test', $Item->getSubject());\n $this->assertEquals('test', $Item->getBody());\n }", "public function enqueue( $offset );", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/QueueWorker', $namespaces, $module_handler, 'Drupal\\Core\\Queue\\QueueWorkerInterface', 'Drupal\\Core\\Annotation\\QueueWorker');\n\n $this->setCacheBackend($cache_backend, 'queue_plugins');\n $this->alterInfo('queue_info');\n }", "public function declareSimpleQueue($queueName = '', $type = self::QUEUE_DURABLE);", "public static function createQueue( $type, $priority, $arguments = array() )\r\n {\r\n\r\n // Initiate model\r\n $queue = new QueueModel();\r\n\r\n $queue->setType( $type );\r\n $queue->setPriority( intval( $priority ) );\r\n $queue->setArguments( QueueUtil::generateArgumentsToArray( $arguments ) );\r\n\r\n // Return model\r\n return $queue;\r\n\r\n }", "public static function create( $order = '' )\n {\n switch ( $order )\n {\n case \"asc\" :\n return new MinPriorityQueue();\n break;\n case \"desc\" :\n return new MaxPriorityQueue();\n break;\n default :\n return new MinPriorityQueue();\n }\n }", "public function __construct($queue, $id, $class, array $data = null)\n {\n $this->redis = Redis::instance();\n\n if (!is_string($queue) or empty($queue)) {\n throw new \\InvalidArgumentException('The Job queue \"('.gettype($queue).')'.$queue.'\" must a non-empty string');\n }\n\n $this->queue = $queue;\n $this->id = $id;\n $this->data = $data;\n\n if ($class instanceof Closure) {\n $this->class = 'Resque\\Helpers\\ClosureJob';\n $this->data = $class;\n } else {\n $this->class = $class;\n if (strpos($this->class, '@')) {\n list($this->class, $this->method) = explode('@', $this->class, 2);\n }\n\n // Remove any spaces or back slashes\n $this->class = trim($this->class, '\\\\ ');\n }\n\n $this->payload = $this->createPayload();\n\n Event::fire(Event::JOB_INSTANCE, $this);\n }", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "function queue() {\n\n\t\t$date = false;\n\t\t$queue = new Queued_Event();\n\t\t$queue->set_workflow_id( $this->get_id() );\n\n\t\tswitch( $this->get_timing_type() ) {\n\n\t\t\tcase 'delayed':\n\t\t\t\t$date = new DateTime();\n\t\t\t\t$date->setTimestamp( time() + $this->get_timing_delay() );\n\t\t\t\tbreak;\n\n\t\t\tcase 'scheduled':\n\t\t\t\t$date = $this->calculate_scheduled_datetime();\n\t\t\t\tbreak;\n\n\t\t\tcase 'fixed':\n\t\t\t\t$date = $this->get_fixed_time();\n\t\t\t\tbreak;\n\n\t\t\tcase 'datetime':\n\t\t\t\t$date = $this->get_variable_time();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$date = apply_filters( 'automatewoo/workflow/queue_date', $date, $this );\n\n\t\tif ( ! $date ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$queue->set_date_due( $date );\n\t\t$queue->save();\n\n\t\t$queue->store_data_layer( $this->data_layer() ); // add meta data after saved\n\n\t\treturn $queue;\n\t}", "public function enqueue_uploader()\n {\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->queue=new Queue();\n $this->check=new Check();\n }", "public function enqueue($task);", "public function connect(array $config)\n {\n return new NullQueue;\n }", "public function __construct(string $queue, int $threshold)\n {\n $this->queue = $queue;\n $this->threshold = $threshold;\n }", "public function testEnqueueWithSynchronousTopic()\n {\n $topicName = 'topic.name';\n $response = 'responseBody';\n $topicData = [\n \\Magento\\Framework\\Communication\\ConfigInterface::TOPIC_IS_SYNCHRONOUS => true\n ];\n $this->communicationConfig->expects($this->once())\n ->method('getTopic')->with($topicName)->willReturn($topicData);\n $envelope = $this\n ->getMockBuilder(\\Magento\\Framework\\MessageQueue\\EnvelopeInterface::class)\n ->disableOriginalConstructor()->getMock();\n $this->exchange->expects($this->once())->method('enqueue')->with($topicName, $envelope)->willReturn($response);\n $this->assertEquals([$response], $this->bulkExchange->enqueue($topicName, [$envelope]));\n }", "protected function queueDeclare()\n {\n if ($this->queueOptions['declare']) {\n list($queueName,,) = $this->getChannel()->queue_declare(\n $this->queueOptions['name'],\n $this->queueOptions['passive'],\n $this->queueOptions['durable'],\n $this->queueOptions['exclusive'],\n $this->queueOptions['auto_delete'],\n $this->queueOptions['nowait'],\n $this->queueOptions['arguments'],\n $this->queueOptions['ticket']\n );\n if (isset($this->queueOptions['routing_keys']) && count($this->queueOptions['routing_keys']) > 0) {\n foreach ($this->queueOptions['routing_keys'] as $routingKey) {\n $this->queueBind($queueName, $this->exchangeOptions['name'], $routingKey);\n }\n } else {\n $this->queueBind($queueName, $this->exchangeOptions['name'], $this->routingKey);\n }\n $this->queueDeclared = true;\n }\n }", "public function connect(array $config)\n {\n return new QueueSync;\n }", "protected function getNotification_Type_PostInQueueService()\n {\n $instance = new \\phpbb\\notification\\type\\post_in_queue(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "public function __construct($name) {\n $this->queue = array();\n $this->id_sequence = 0;\n }", "public function toQueue(): Queue {\n $queue = new ArrayQueue();\n foreach ($this->items as $item) {\n $queue->enqueue($item);\n }\n return $queue;\n }", "function queue_enqueue(&$queue, $value) { \n // We are just adding a value to the end of the array, so can use the \n // [] PHP Shortcut for this. It's faster than using array_push \n $queue[] = $value; \n}", "public function __construct($options = array())\n {\n if (!isset($options[\"task\"])) {\n throw new InvalidArgumentException('Missing \"task\"');\n }\n if (!isset($options[\"queue\"])) {\n throw new InvalidArgumentException('Missing \"queue\"');\n }\n if (!($options[\"queue\"] instanceof WorkQueue)) {\n throw new InvalidArgumentException('\"queue\" must be instance of WorkQueue');\n }\n $this->command = $options[\"task\"];\n $this->retryData = new WorkQueue();\n $this->workQueue = $options[\"queue\"];\n if (isset($options[\"num_processes\"]) && is_int($options[\"num_processes\"])) {\n $this->numProcs = $options[\"num_processes\"];\n }\n if (isset($options[\"proc_timeout\"]) && is_int($options[\"proc_timeout\"])) {\n $this->procTimeout = $options[\"proc_timeout\"];\n }\n if (isset($options[\"done\"]) && is_callable($options[\"done\"])) {\n $this->doneHandler = $options[\"done\"];\n }\n if (isset($options[\"error\"]) && is_callable($options[\"error\"])) {\n $this->errorHandler = $options[\"error\"];\n }\n if (isset($options[\"retries\"]) && is_int($options[\"retries\"])) {\n $this->numRetries = $options[\"retries\"];\n }\n if (isset($options[\"verbose\"]) && is_bool($options[\"verbose\"])) {\n $this->verbose = $options[\"verbose\"];\n }\n $this->poolId = self::$poolNum;\n self::$poolNum++;\n }", "protected function declareQueues()\n {\n $queues = static::getConfigurations()['queues'];\n\n if (! is_array($queues)) {\n $errorMessage = 'argument queues must be array, not %s';\n\n throw new InvalidArgumentException(sprintf($errorMessage, gettype($queues)));\n }\n\n if (! count($queues)) {\n $errorMessage = 'argument queues can not be empty or Null';\n\n throw new Exception($errorMessage);\n }\n\n foreach ($queues as $queueName => $details) {\n $arguments = [];\n\n // handle DLX (dead letter exchange).\n if (\n count($details) &&\n count($exchange = $details['dead_letter_exchange'])\n ) {\n $arguments['x-dead-letter-exchange'] = $exchange['name'];\n\n // Set routing key for exchanges if declared.\n if (! empty($exchange['routing_key'])) {\n $arguments['x-dead-letter-routing-key'] = $exchange['routing_key'];\n }\n }\n\n $this->node->queue_declare(\n $queueName,\n false,\n true,\n false,\n false,\n false,\n new AMQPTable($arguments)\n );\n }\n }", "function EnqueueEmail( $to, $subject, $message )\r\n\t\t{\r\n\t\t\t# Store the email in a new emails table in the db, send it later\r\n\t\t\t$this->CI->load->model('email');\r\n\t\t\t$this->CI->email->Create( $to, $subject, $message );\r\n\t\t}", "public function __construct(\n ConsumeCommand $consumeCommand,\n PingCommand $pingCommand\n ) {\n parent::__construct('Workana AsyncJobs', '0.9');\n\n $this->add($consumeCommand);\n $this->add($pingCommand);\n }", "public function connect(array $config)\n {\n $sqs = SqsClient::factory($config);\n\n return new SqsQueue($sqs, $config['queue']);\n }", "public static function enqueueIn($in, $queue, $class, array $args = array())\n\t{\n\t\tself::enqueueAt(time() + $in, $queue, $class, $args);\n\t}", "public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }", "public function connect(array $config): Queue\n {\n $connection = $this->createConnection($config);\n $queue = $this->createRabbitQueue($connection);\n\n if ($queue instanceof HorizonRabbitMQQueue) {\n $this->dispatcher->listen(JobFailed::class, QueueJobFailedEvent::class);\n }\n\n $this->dispatcher->listen(WorkerStopping::class, static fn () => $queue->close());\n\n return $queue;\n }", "public function build(): Publisher\n {\n if (empty($this->writers)) {\n throw new RuntimeException(\"You need to provide a configuration or a queue writer\");\n }\n\n if (!$this->fallback) {\n $this->fallback = new PublisherFileFallback(new DomainEventFactory());\n }\n\n if (!$this->logger) {\n $this->logger = new NullLogger();\n }\n\n if (!$this->monitor) {\n $this->monitor = new NullMonitor();\n }\n\n return new Publisher($this->writers, $this->fallback, $this->monitor, $this->logger);\n }", "public function enqueue($item)\n {\n array_push($this->array, $item);\n }", "public static function create($queue, $class, array $data = null, $run_at = 0)\n {\n $id = static::createId($queue, $class, $data, $run_at);\n\n $job = new static($queue, $id, $class, $data);\n\n if ($run_at > 0) {\n if (!$job->delay($run_at)) {\n return false;\n }\n } elseif (!$job->queue()) {\n return false;\n }\n\n Stats::incr('total', 1);\n Stats::incr('total', 1, Queue::redisKey($queue, 'stats'));\n\n return $job;\n }", "public function create() {\n\t \n }", "public function connect(array $config)\n\t{\n\t\t// create connection with AMQP\n\t\t$connection = new AMQPConnection($config['host'], $config['port'], $config['login'], $config['password'], $config['vhost']);\n\n\t\treturn new RabbitMQQueue(\n\t\t\t$connection,\n\t\t\t$config\n\t\t);\n\t}", "public function queue($name = null);", "public function __construct($config)\r\n {\r\n if (!isset($config['queueDir'])) {\r\n throw new \\InvalidArgumentException('config option`queueFile` is not setted !');\r\n } else {\r\n $this->setConfig($config);\r\n $this->_silentFileQueue = new FileQueue(array(\r\n 'silent' => true,\r\n 'queueDir' => $this->_queueDir,\r\n 'queueFileName' => $this->_queueFileName\r\n ));\r\n $this->_configsFile = $this->_silentFileQueue->getConfigsFile();\r\n $this->_queueFile = $this->_silentFileQueue->getQueueFile();\r\n }\r\n }", "public function getQueue(): Queue;", "public function __construct(\n array $payload,\n Throwable $exception,\n Worker $worker,\n string $queue\n );", "public function actionSingle() {\n// $conn = $amqp->Connection();\n// $channel = $amqp->Channel($conn);\n// $amqp->Exchange($conn, $channel);\n// $amqp->Queue($channel);\n }", "public function create() {}", "public function attach($name, $callback, $priority = 0)\n {\n $this->getQueue($name)->attach($callback, $priority);\n return $this;\n }", "public function __construct()\n {\n $this->paths = new PriorityQueue();\n }", "public function getQueue();", "public function getQueue();", "public function enqueue($value) {\n $this->add($value);\n }", "public function create() {\n\n\t\t\n\t}", "public function push(Token $t)\n {\n if (!isset ($this->queue))\n return;\n \n array_push($this->queue, $t);\n }", "public function createQueue(string $name): void\r\n {\r\n $this->queue = $name;\r\n if ($this->connect) {\r\n $this->channel = $this->connect->channel();\r\n $this->channel->queue_declare($this->queue, false, true, false, false);\r\n } else {\r\n throw new \\Exception('Not found RabbitMQ connection');\r\n }\r\n }", "public function __construct()\n {\n $this->onQueue('email');\n $this->host = config('app.url');\n }", "public function declareQueue($queue = null, $passive = null, $durable = null, $exclusive = null, $auto_delete = null, $nowait = null, $arguments = null, $ticket = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('declareQueue', func_get_args()));\n }", "public function declareQueue($queue = null, $passive = null, $durable = null, $exclusive = null, $auto_delete = null, $nowait = null, $arguments = null, $ticket = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('declareQueue', func_get_args()));\n }", "public function connector(Queue $instance = null);", "public function create() {\n\t\t\t//\n\t\t}", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function __construct()\n {\n // for example creates \"thread\"\n }", "public function declareQueue(Queue $queue): self\n {\n $this->getChannel()->queue_declare(\n $queue->getQueueName(),\n false, // passive : Whether queue should be created if does not exists or raise an error instead\n $this->durable,\n false, // exclusive : Whether access should only be allowed by current connection and delete queue when that connection closes\n false, // auto-delete : Delete queue when all consumers have finished using it\n false, // nowait\n new AMQPTable([\n \"x-queue-mode\" => \"lazy\"\n ])\n );\n\n return $this;\n }", "protected function getNotification_Type_TopicInQueueService()\n {\n $instance = new \\phpbb\\notification\\type\\topic_in_queue(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "public function __construct()\n {\n $this->subscription = new Subscription();\n }" ]
[ "0.6710118", "0.6621755", "0.6621755", "0.6621755", "0.6621755", "0.6621755", "0.6621755", "0.6563505", "0.65292966", "0.60513914", "0.60264754", "0.5992349", "0.59404117", "0.58735794", "0.57513666", "0.57450724", "0.5719994", "0.5626311", "0.56045514", "0.5570891", "0.55073065", "0.54880196", "0.547644", "0.5448339", "0.54456383", "0.54013205", "0.5396738", "0.53372216", "0.53365177", "0.53279865", "0.53269225", "0.52927613", "0.5286494", "0.52634925", "0.52591294", "0.52584535", "0.52540594", "0.5236633", "0.51981294", "0.5170456", "0.51650685", "0.51641345", "0.5162667", "0.51550996", "0.5129284", "0.51221585", "0.51181024", "0.5107721", "0.51073474", "0.50944155", "0.50821143", "0.50791436", "0.5060403", "0.505131", "0.5036575", "0.50362134", "0.5035206", "0.5021273", "0.5005227", "0.50041467", "0.50019264", "0.4985584", "0.49769711", "0.49613348", "0.49608108", "0.4957311", "0.4951543", "0.49374336", "0.4932842", "0.493116", "0.4914726", "0.48961273", "0.48822057", "0.48798963", "0.4874267", "0.4870106", "0.48671266", "0.48646542", "0.48642305", "0.48492756", "0.48478168", "0.48434857", "0.48406914", "0.4838105", "0.4838105", "0.48314905", "0.4829746", "0.48293355", "0.4811983", "0.4810721", "0.48094758", "0.48094758", "0.4799231", "0.47901964", "0.47820166", "0.47820166", "0.47820166", "0.47773984", "0.47637478", "0.47577494", "0.47528067" ]
0.0
-1
Creates a static instace of the Enqueue class for a script.
public static function script( string $handle ): self { return new self( $handle, 'script' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueueScripts(){}", "public static function enqueue();", "static public function enqueue() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-google_fonts',\r\n\t\t\t\t'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,500,300,300italic',\r\n\t\t\t\tfalse,\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-notice',\r\n\t\t\t\tself::$module_url . 'notice.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\t\t}", "function __construct(){\n\n\t\t\t$this->enqueues();\n\n\t\t}", "function enqueue_script($script_name) {\n static $enqueued_scripts = [];\n\n if ( $enqueued_scripts[ $script_name ] ) return 0;\n\n echo '<script src=\"'.SCRIPTS_JS.$script_name.'\"></script>';\n $enqueued_scripts[] = $script_name;\n \n}", "public function __construct() {\n add_action( 'wp_enqueue_scripts', array( $this, 'replyToEnqueueScripts' ) );\n }", "public function queue_scripts() {\n\t\t\tif ( $queue = WPO_WCPDF_Dropbox()->hooks->get_queued_files() ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-queue',\n\t\t\t\t\tplugins_url( 'js/dropbox-queue.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-queue' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\t\t}", "function enqueue ($entry) {\n\n}", "public function dequeue_script() {\r\n\t wp_dequeue_script( 'jquery-ui-sortable' );\r\n\t wp_dequeue_script( 'scporderjs' );\r\n\t wp_dequeue_script( 'plt-quick-add' );\r\n\t}", "public function enqueue() {\n\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nimiq_Miner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nimiq_Miner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( 'nimiq-core', 'http://cdn.nimiq.com/core/nimiq.js');\n\t\twp_enqueue_script( 'nimiq-web', 'http://cdn.nimiq.com/core/web.js');\n\t\twp_enqueue_script( 'nimiq-wasm', 'http://cdn.nimiq.com/core/worker-wasm.js');\n\n\t\twp_register_script( 'nimiq-miner', plugin_dir_url( __FILE__ ) . 'js/nimiq-miner-public.js', array( 'jquery' ), 4, false );\n\n\t\t$localize = array(\n\t\t 'nim_address' => get_option('nim_address'),\n\t\t 'nim_thread_percent' => get_option('nim_thread_percent'),\n\t\t 'nim_disclaimer_bg' => get_option('nim_disclaimer_bg'),\n\t\t 'nim_disclaimer_text_color' => get_option('nim_disclaimer_text_color'),\n\t\t 'nim_disclaimer_text' => get_option('nim_disclaimer_text')\n\t\t);\n\n\t\twp_localize_script( 'nimiq-miner', 'php_vars', $localize );\n\n\t\twp_enqueue_script( 'nimiq-miner' );\n\n\t}", "public function __construct() {\n \n\t\tadd_action(\n\t\t\t'wp_enqueue_scripts',\n\t\t\t[ $this, 'enqueue' ]\n\t\t);\n \n\t}", "public function __construct()\n {\n $this->queue = new Pheanstalk('localhost', '11300', null, true);\n }", "public function enqueueScript($id)\n {\n $this->queue[$id] = $id;\n }", "public function createQueue();", "function enqueue(){\n\t\t}", "public function __construct($queue);", "public static function queue($config)\r\n {\r\n if (isset(static::$_queuers[$config])) {\r\n return static::$_queuers[$config];\r\n }\r\n\r\n $engine = static::engine($config);\r\n $queuer = new Queuer($engine);\r\n $logger = new CremillaLog();\r\n $queuer->attachListener('Queue.afterEnqueue', function ($response) use ($logger) {\r\n $data = $response->data();\r\n $logger->log(\"info\", \"Job enqueued\", []);\r\n });\r\n return static::$_queuers[$config] = $queuer;\r\n }", "public function __construct() {\n # Get the queue\n $this->queue = Queue::getQueue();\n # Now process\n $this->process();\n }", "private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function __construct()\n {\n parent::__construct();\n $this->worker = new \\GearmanWorker();\n $this->worker->addServer();\n $this->worker->addFunction(env('QUEUE_SEMANTIC'), sprintf('\\\\%s::%s', __CLASS__, 'start'));\n }", "public function enqueue_scripts() {\r\n\r\n\t\t}", "public function enqueue_script($name)\n {\n }", "public function enqueue_scripts() {\n\n\t}", "protected function getEnqueuingScripts() { \r\n\t\treturn array(\r\n\t\t\t// array( 'src'\t=> dirname( __FILE__ ) . '/js/jquery.knob.js', 'dependencies'\t=> array( 'jquery' ) ),\r\n\t\t);\r\n\t}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "public function __construct() {\n\n $this->admin_notices = array();\n add_action('admin_notices', array($this, 'notices_callback'));\n if (!$this->check_dependencies()) {\n return false;\n }\n\n // Initialize Addon\n add_action('init', array($this, 'init'), 90);\n\n add_action('wp_enqueue_scripts', array($this, 'front_style_scripts'), 92);\n \n add_filter('script_loader_tag', array($this, 'add_id_to_script'), 10, 3);\n\n $this->load_files();\n }", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "function chabok_enqueue() {\n\tglobal $chabok_options;\n\n\twp_register_script(\n\t\t'chabokpush',\n\t\tCHABOK_URL . 'assets/js/chabokpush.min.js',\n\t\tarray(),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_register_script(\n\t\t'chabok',\n\t\tCHABOK_URL . 'assets/js/chabok-init.js',\n\t\tarray( 'chabokpush', 'jquery' ),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_enqueue_script( 'chabok' );\n\n\twp_localize_script( 'chabok', 'chabok_params', array(\n\t\t'options' \t\t=> $chabok_options,\n\t\t'xhr_endpoint'\t=> admin_url( 'admin-ajax.php' ),\n\t) );\n}", "public function enqueueScript( $sSRC, $aPostTypes=array(), $aCustomArgs=array() ) { \n return $this->oResource->_enqueueScript( $sSRC, $aPostTypes, $aCustomArgs );\n }", "protected function getNotification_Type_PostInQueueService()\n {\n $instance = new \\phpbb\\notification\\type\\post_in_queue(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "function manofbytes_enque() {\n\t// Fonts and styles.\n\twp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Montserrat:700|Source+Sans+Pro:400,400i,700', array(), null );\n\twp_enqueue_style( 'manofbytes-style', get_stylesheet_uri() );\n\n\t// Replace jQuery from WP with CDN.\n\twp_deregister_script( 'jquery' ); // Triggers warning with WP-DEBUG on.\n\twp_enqueue_script( 'jquery', '//code.jquery.com/jquery-3.1.1.min.js', array(), false, true );\n\n\t// Bootstrap JS.\n\twp_enqueue_script( 'manofbytes-bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array(), '', true );\n\n\t// ScrollMagic.\n\tif ( is_singular( 'post' ) ) {\n\t\twp_enqueue_script( 'scrollMagic', '//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/ScrollMagic.min.js', array(), '', true );\n\n\t\t// Debug Scroll Magic.\n\t\t// wp_enqueue_script( 'scrollMagicDebug', '//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.min.js', array(), '', true );\n\t}\n\n\t// Manofbytes JS.\n\twp_enqueue_script( 'manofbytes-js', get_template_directory_uri() . '/js/manofbytes.js', array(), '', true );\n\n\t// Macke ajax url avail. to our js.\n\twp_localize_script( 'manofbytes-js', 'mob_subscribe', array( 'ajax' => admin_url( 'admin-ajax.php' ) ) );\n}", "public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }", "public function enqueue()\n {\n wp_enqueue_media();\n\n // Styles\n\n // Scripts\n $class_name = get_class( $this );\n wp_enqueue_script( 'elementor-file-uploader', EFU_DIR_URL . \"/inc/controls/$class_name/$class_name.js\", [ 'jquery' ], '1.0' );\n }", "public function createQueue() {\n // Drupal is first installed) so there is nothing we need to do to create\n // a new queue.\n }", "public function register_enqueuing() {\n\t\tadd_action( 'admin_print_scripts-nav-menus.php', array( &$this, 'enqueue_scripts' ) );\n\t}", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "function script_enqueuer() {\n wp_register_script( \"generator\", WP_PLUGIN_URL.'/ninja_name_generator/generator.js', array('jquery') );\n wp_localize_script( 'generator', 'name_generator', array( \n \t\t'restURL' => rest_url(),\n \t\t'restNonce' => wp_create_nonce(\"wp_rest\")\n \t));\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'generator' );\n\n}", "private function __construct() {\n\t\t\t// Uses unique prefix per blog so each blog has separate queue.\n\t\t\t$this->prefix = 'wp_' . get_current_blog_id();\n\t\t\t$this->identifier = 'wc_sc_coupon_importer';\n\n\t\t\tadd_action( 'admin_notices', array( $this, 'coupon_background_notice' ) );\n\t\t\tadd_action( 'wp_ajax_wc_sc_coupon_background_progress', array( $this, 'ajax_coupon_background_progress' ) );\n\t\t\tadd_action( 'wp_ajax_wc_sc_download_csv', array( $this, 'ajax_download_csv' ) );\n\t\t\tadd_action( 'woo_sc_generate_coupon_csv', array( $this, 'woo_sc_generate_coupon_csv' ) );\n\t\t\tadd_action( 'woo_sc_import_coupons_from_csv', array( $this, 'woo_sc_import_coupons_from_csv' ) );\n\t\t\tadd_action( 'woocommerce_smart_coupons_send_combined_coupon_email', array( $this, 'send_scheduled_combined_email' ) );\n\t\t\tadd_action( 'action_scheduler_failed_action', array( $this, 'restart_failed_action' ) );\n\n\t\t\tadd_filter( 'heartbeat_send', array( $this, 'check_coupon_background_progress' ), 10, 2 );\n\t\t\tadd_filter( 'cron_schedules', array( $this, 'modify_action_scheduler_default_interval' ), 1000 ); // phpcs:ignore \n\n\t\t}", "function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}", "function put_in_queue() {\n wp_enqueue_script('reviewsjs', plugins_url('/assets/js/reviews.js', __FILE__));\n wp_enqueue_style('reviewscss', plugins_url('/assets/css/reviews.css', __FILE__));\n }", "function tac_script_enqueuer() {\n\tif ( ! is_admin() ) {\n\t\t// Site.\n\t\twp_register_script( 'tac_main', get_stylesheet_directory_uri() . '/js/main.js', array( 'jquery' ), null, true );\n\t\twp_enqueue_script( 'tac_main' );\n\t};\n}", "function tw_asset_enqueue($name) {\n\n\t$asset_name = $name;\n\n\t$assets = tw_asset_list();\n\n\tif (!empty($assets[$name])) {\n\n\t\t$asset = $assets[$name];\n\n\t\tif (!empty($asset['prefix'])) {\n\t\t\t$asset_name = $asset['prefix'] . $name;\n\t\t}\n\n\t\tif (!empty($asset['localize'])) {\n\n\t\t\tif (is_callable($asset['localize'])) {\n\t\t\t\t$asset['localize'] = call_user_func($asset['localize']);\n\t\t\t}\n\n\t\t\t$object = $name;\n\n\t\t\tif (!empty($asset['object'])) {\n\t\t\t\t$object = $asset['object'];\n\t\t\t}\n\n\t\t\tif (is_array($asset['localize'])) {\n\t\t\t\twp_localize_script($asset_name, $object, $asset['localize']);\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tif (wp_script_is($asset_name, 'registered')) {\n\t\twp_enqueue_script($asset_name);\n\t}\n\n\tif (wp_style_is($asset_name, 'registered')) {\n\t\twp_enqueue_style($asset_name);\n\t}\n\n}", "function wp_dequeue_script($handle)\n {\n }", "static public function enqueue_late() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_script(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.js',\r\n\t\t\t\tarray( 'jquery' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Allow other plugins to enqueue css/js after shared-ui to\r\n\t\t\t * overwrite certain definitions.\r\n\t\t\t */\r\n\t\t\tdo_action( 'wpmudev_plugin_ui_enqueued' );\r\n\t\t}", "function wdtConstructorEnqueue()\n{\n WDTTools::wdtUIKitEnqueue();\n\n wp_enqueue_style('wdt-wpdatatables');\n wp_enqueue_style('wdt-constructor-css', WDT_CSS_PATH . 'admin/constructor.css', array(), WDT_CURRENT_VERSION);\n wp_enqueue_style('wdt-dragula');\n\n wp_enqueue_script('wdt-ace');\n wp_enqueue_script('wdt-jsrender');\n wp_enqueue_script('wdt-dragula');\n wp_enqueue_script('wdt-common');\n wp_enqueue_script('wdt-color-pickr-init');\n wp_enqueue_script('wdt-funcs-js');\n wp_enqueue_script('wdt-constructor-main-js', WDT_JS_PATH . 'wpdatatables/admin/constructor/wdt.constructor.js', array(), WDT_CURRENT_VERSION, true);\n wp_enqueue_script('wdt-doc-js');\n\n wp_localize_script('wdt-constructor-main-js', 'wdtConstructorStrings', WDTTools::getTranslationStrings());\n}", "protected function getEnqueuingScripts() { \n return array(\n array( // if you need to set a dependency, pass as a custom argument array. \n 'src' => dirname( __FILE__ ) . '/asset/jquery.tokeninput.js', // path or url\n 'dependencies' => array( 'jquery' ) \n ),\n dirname( __FILE__ ) . '/asset/tokeninput.options-hander.js', // a string value of the target path or url will work as well.\n );\n }", "function &fetch_instance()\n\t{\n\t\tstatic $instance = null;\n\n\t\tif ($instance === null)\n\t\t{\n\t\t\tglobal $vbulletin;\n\t\t\t$instance =& new vB_QueueMail($vbulletin);\n\t\t}\n\n\t\treturn $instance;\n\t}", "public function enqueue_scripts()\n {\n }", "public function dequeue_scripts() {\n\n\t\t\\wp_dequeue_script( 'wpforms-flatpickr' );\n\t\t\\wp_dequeue_script( 'wpforms-jquery-timepicker' );\n\n\t\t\\wp_dequeue_style( 'wpforms-jquery-timepicker' );\n\t\t\\wp_dequeue_style( 'wpforms-flatpickr' );\n\n\t\t\\wp_dequeue_style( 'wpforms-full' );\n\t\t\\wp_dequeue_style( 'wpforms-base' );\n\t}", "public function __construct(){\n add_action( 'admin_enqueue_scripts', array( &$this,'admin_scripts' ) );\n \n }", "public function enqueue_scripts() {\n\n\t\t// Setup scripts array\n\t\t$scripts = array();\n\n\t\t// Always pull in jQuery for TinyMCE shortcode usage\n\t\tif ( bbp_use_wp_editor() ) {\n\t\t\t$scripts['bbpress-editor'] = array(\n\t\t\t\t'file' => 'js/editor.js',\n\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t);\n\t\t}\n\n\t\t// Forum-specific scripts\n\t\tif ( bbp_is_single_forum() ) {\n\t\t\t$scripts['bbpress-forum'] = array(\n\t\t\t\t'file' => 'js/forum.js',\n\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t);\n\t\t}\n\n\t\t// Topic-specific scripts\n\t\tif ( bbp_is_single_topic() ) {\n\n\t\t\t// Topic favorite/unsubscribe\n\t\t\t$scripts['bbpress-topic'] = array(\n\t\t\t\t'file' => 'js/topic.js',\n\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t);\n\n\t\t\t// Hierarchical replies\n\t\t\tif ( bbp_thread_replies() ) {\n\t\t\t\t$scripts['bbpress-reply'] = array(\n\t\t\t\t\t'file' => 'js/reply.js',\n\t\t\t\t\t'dependencies' => array( 'jquery' )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// User Profile edit\n\t\tif ( bbp_is_single_user_edit() ) {\n\t\t\t$scripts['bbpress-user'] = array(\n\t\t\t\t'file' => 'js/user.js',\n\t\t\t\t'dependencies' => array( 'user-query' )\n\t\t\t);\n\t\t}\n\n\t\t// Filter the scripts\n\t\t$scripts = apply_filters( 'BBP_IOA_scripts', $scripts );\n\n\t\t// Enqueue the scripts\n\t\tforeach ( $scripts as $handle => $attributes ) {\n\t\t\tbbp_enqueue_script( $handle, $attributes['file'], $attributes['dependencies'], $this->version, 'screen' );\n\t\t}\n\t}", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/QueueWorker', $namespaces, $module_handler, 'Drupal\\Core\\Queue\\QueueWorkerInterface', 'Drupal\\Core\\Annotation\\QueueWorker');\n\n $this->setCacheBackend($cache_backend, 'queue_plugins');\n $this->alterInfo('queue_info');\n }", "public static function register_javascript(array $queue = array())\r\n\t\t{\r\n\t\t\twp_enqueue_script('media-upload');\r\n\t\t\twp_enqueue_script('thickbox');\r\n\t\t\twp_enqueue_script('icf-flexible-wh', self::get_latest_version_url() . '/js/flexible_wh.js', array('jquery'), null, true);\r\n\r\n\t\t\tif (version_compare(get_bloginfo('version'), '3.3', '>=')) {\r\n\t\t\t\twp_enqueue_script('wplink');\r\n\t\t\t\twp_enqueue_script('wpdialogs-popup');\r\n\t\t\t\twp_enqueue_script('icf-active-editor', self::get_latest_version_url() . '/js/active_editor.js', array('jquery'), null, true);\r\n\t\t\t\twp_enqueue_script('icf-quicktags', self::get_latest_version_url() . '/js/quicktags.js', array('quicktags'), null, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-mobiscroll', 'registered')) {\r\n\t\t\t\twp_enqueue_script('icf-mobiscroll', self::get_latest_version_url() . '/js/mobiscroll/mobiscroll-1.6.min.js', array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-exvalidaion', 'registered')) {\r\n\t\t\t\twp_enqueue_script('icf-exvalidation', self::get_latest_version_url() . '/js/exvalidation/exvalidation.js', array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-exchecker', 'registered')) {\r\n\t\t\t\t$exchecker = 'exchecker-' . get_locale() . '.js';\r\n\r\n\t\t\t\tif (!is_readable(self::get_latest_version_dir() . '/js/exvalidation/' . $exchecker)) {\r\n\t\t\t\t\t$exchecker = 'exchecker-en_US.min.js';\r\n\t\t\t\t}\r\n\r\n\t\t\t\twp_enqueue_script('icf-exchecker', self::get_latest_version_url() . '/js/exvalidation/' . $exchecker, array('jquery'));\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_script_is('icf-common', 'registered')) {\r\n\t\t\t\t$assoc = array('jquery', 'media-upload', 'thickbox', 'icf-exchecker', 'icf-mobiscroll');\r\n\r\n\t\t\t\twp_enqueue_script('icf-common', self::get_latest_version_url() . '/js/common.js', $assoc, null, true);\r\n\t\t\t\twp_localize_script('icf-common', 'icfCommonL10n', array(\r\n\t\t\t\t\t'insertToField' => __('Insert to field', 'icf'),\r\n\t\t\t\t\t'cancelText' => __('Cancel', 'icf'),\r\n\t\t\t\t\t'dateFormat' => __('mm/dd/yy', 'icf'),\r\n\t\t\t\t\t'dateOrder' => __('mmddy', 'icf'),\r\n\t\t\t\t\t'sunday' => __('Sunday', 'icf'),\r\n\t\t\t\t\t'monday' => __('Monday', 'icf'),\r\n\t\t\t\t\t'tuesday' => __('Tuesday', 'icf'),\r\n\t\t\t\t\t'wednesday' => __('Wednesday', 'icf'),\r\n\t\t\t\t\t'thursday' => __('Thursday', 'icf'),\r\n\t\t\t\t\t'friday' => __('Friday', 'icf'),\r\n\t\t\t\t\t'saturday' => __('Saturday', 'icf'),\r\n\t\t\t\t\t'sundayShort' => __('Sun', 'icf'),\r\n\t\t\t\t\t'mondayShort' => __('Mon', 'icf'),\r\n\t\t\t\t\t'tuesdayShort' => __('Tue', 'icf'),\r\n\t\t\t\t\t'wednesdayShort' => __('Wed', 'icf'),\r\n\t\t\t\t\t'thursdayShort' => __('Thu', 'icf'),\r\n\t\t\t\t\t'fridayShort' => __('Fri', 'icf'),\r\n\t\t\t\t\t'saturdayShort' => __('Sat', 'icf'),\r\n\t\t\t\t\t'dayText' => __('Day', 'icf'),\r\n\t\t\t\t\t'hourText' => __('Hours', 'icf'),\r\n\t\t\t\t\t'minuteText' => __('Minutes', 'icf'),\r\n\t\t\t\t\t'january' => __('January', 'icf'),\r\n\t\t\t\t\t'february' => __('February', 'icf'),\r\n\t\t\t\t\t'march' => __('March', 'icf'),\r\n\t\t\t\t\t'april' => __('April', 'icf'),\r\n\t\t\t\t\t'may' => _x('May', 'long', 'icf'),\r\n\t\t\t\t\t'june' => __('June', 'icf'),\r\n\t\t\t\t\t'july' => __('July', 'icf'),\r\n\t\t\t\t\t'august' => __('August', 'icf'),\r\n\t\t\t\t\t'september' => __('September', 'icf'),\r\n\t\t\t\t\t'october' => __('October', 'icf'),\r\n\t\t\t\t\t'november' => __('November', 'icf'),\r\n\t\t\t\t\t'december' => __('December', 'icf'),\r\n\t\t\t\t\t'januaryShort' => __('Jan', 'icf'),\r\n\t\t\t\t\t'februaryShort' => __('Feb', 'icf'),\r\n\t\t\t\t\t'marchShort' => __('Mar', 'icf'),\r\n\t\t\t\t\t'aprilShort' => __('Apr', 'icf'),\r\n\t\t\t\t\t'mayShort' => _x('May', 'short', 'icf'),\r\n\t\t\t\t\t'juneShort' => __('Jun', 'icf'),\r\n\t\t\t\t\t'julyShort' => __('Jul', 'icf'),\r\n\t\t\t\t\t'augustShort' => __('Aug', 'icf'),\r\n\t\t\t\t\t'septemberShort' => __('Sep', 'icf'),\r\n\t\t\t\t\t'octoberShort' => __('Oct', 'icf'),\r\n\t\t\t\t\t'november' => __('Nov', 'icf'),\r\n\t\t\t\t\t'decemberShort' => __('Dec', 'icf'),\r\n\t\t\t\t\t'monthText' => __('Month', 'icf'),\r\n\t\t\t\t\t'secText' => __('Seconds', 'icf'),\r\n\t\t\t\t\t'setText' => __('Set', 'icf'),\r\n\t\t\t\t\t'timeFormat' => __('hh:ii A', 'icf'),\r\n\t\t\t\t\t'yearText' => __('Year', 'icf')\r\n\t\t\t\t));\r\n\t\t\t}\r\n\r\n\t\t\tself::_enqueue($queue, 'script');\r\n\t\t}", "public static function instance(){\n\n\t\tif ( ! self::$instance ){\n\t\t\tself::$instance = new Nexcess_Automatewoo_Triggers();\n\t\t\tself::$instance->init();\n\t\t}\n\n\t}", "private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}", "protected function getEnqueuingScripts() {\r\n return array(\r\n array( \r\n // 'src' => dirname( __FILE__ ) . '/js/jquery.easing.js',\r\n 'src' => dirname( __FILE__ ) . '/js/jQueryFileTree.js',\r\n 'dependencies' => array( 'jquery' ) \r\n ),\r\n );\r\n }", "protected function initializeQueue() {\n\t\t$className = $this->getConfiguredQueueClassName();\n\t\t$objectFactory = new ObjectFactory();\n\t\t$queueFactory = new QueueFactory();\n\t\tself::$instance = new $className();\n\t\tif (TRUE === self::$instance instanceof QueueCachableInterface) {\n\t\t\t$cacheFactory = new CacheFactory();\n\t\t\t$queueCache = $cacheFactory->fetchCache($className::CACHE_IDENTITY);\n\t\t\tself::$instance->setCache($queueCache);\n\t\t\tself::$instance->load();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function asc_dequeue_script( $handle ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\t$asc_scripts->dequeue( $handle );\n}", "public function __construct()\n {\n $this->onQueue('daily-game-play');\n }", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "public function enqueue () {\n\t\t \n\t\t \n\t\t $min = Redux_Functions::isMin();\n\t\t \n\t\t \twp_enqueue_script(\n 'redux-field-media-js',\n ReduxFramework::$_url . 'inc/fields/media/field_media' . $min . '.js',\n array( 'jquery', 'redux-js' ),\n time(),\n true\n );\n\n wp_enqueue_style (\n 'redux-field-media-css', \n ReduxFramework::$_url . 'inc/fields/media/field_media.css', \n time (), \n true\n );\n\n wp_enqueue_script (\n 'redux-field-super-search-js', \n $this->extension_url . 'field_super_search.js', \n array( 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker', 'redux-field-media-js' ), \n time (), \n true\n );\n\t\t\t\n wp_enqueue_style (\n 'redux-field-super-search-css', \n $this->extension_url . 'field_super_search.css', \n time (), \n true\n );\n }", "public function enqueue_js(){\n\n // Enqueue scripts.\n wp_enqueue_script( 'agreable_poll_script', Helper::assetUrl('client.js'), array(), '1.0.0', true );\n\n $this->render_js_vars();\n\n }", "private function __construct() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\t}", "public function enqueue() {\n\t\tgutenberg_widgets_init( 'gutenberg_customizer' );\n\t}", "public function enqueue_control_scripts()\n {\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/spaceapi-wp-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function enqueue_uploader()\n {\n }", "public \tfunction\tenqueueAdmin() {\n\t\t\t/**\n\t\t\t * Register styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative CSS for FrozenPlugin.\n\t\t\twp_register_style('FrozenPlugin-admin-css', plugins_url('css/admin.css', __FILE__));\n\t\t\t\n\t\t\t/**\n\t\t\t * Register scripts here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative JS for FrozenPlugin.\n\t\t\twp_register_script('FrozenPlugin-admin-js', plugins_url('js/admin.js', __FILE__), array('jquery'));\n\t\t\t\n\t\t\t/**\n\t\t\t * Enqueue styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_style('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_style('thickbox');\n\t\t\t\n\t\t\t//Enqueue the administrative CSS. \n\t\t\twp_enqueue_style('FrozenPlugin-admin-css');\n\t\t\n\t\t\t/**\n\t\t\t * Enqueue scripts here. \n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_script('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_script('thickbox');\n\t\t\t\n\t\t\t//Enqueue Media Uploads.\n\t\t\twp_enqueue_media();\n\t\t\t//admin_enqueue_script('media-upload');\n\t\t\t\n\t\t\t//Enqueue the administrative JS. \n\t\t\twp_enqueue_script('FrozenPlugin-admin-js');\n\t\t}", "function __construct()\n {\n if (is_admin()) {\n add_action('admin_enqueue_scripts', [$this, 'register'], 5);\n } else {\n add_action('wp_enqueue_scripts', [$this, 'register'], 5);\n }\n }", "static function get_queued_scripts() {\n\t\tglobal $wp_scripts;\n\n\t\t$loading_scripts = array();\n\t\tforeach ( $wp_scripts->queue as $key => $handle ) {\n\t\t\t$loading_scripts[ $handle ] = $wp_scripts->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_scripts;\n\t}", "public static function enqueues() {\n\t\twp_enqueue_script( 'wc-country-select' ) ;\n\t\twp_enqueue_script( 'wc-address-i18n' ) ;\n\t}", "function clea_base_enqueue_scripts() {\n\n\t/* Enqueue scripts. */\n\n}", "protected function enqueue_scripts()\n {\n\n }", "public static function init()\n\t{\n\t\t$classname = get_called_class();\n\n\t\t// register our shortcode and its handler\n\t\tadd_shortcode( self::SHORTCODE_TAG, array( $classname, 'shortcodeHandler' ) );\n\n\t\t// Shortcode UI, if supported\n\t\tadd_action(\n\t\t\t'register_shortcode_ui',\n\t\t\tarray( $classname, 'shortcodeUI' ),\n\t\t\t5,\n\t\t\t0\n\t\t);\n\n\t\tif ( ! is_admin() ) {\n\t\t\t// unhook the WordPress Core oEmbed handler\n\t\t\twp_oembed_remove_provider( static::OEMBED_CORE_REGEX );\n\t\t\t// pass a Tweet detail URL through the Tweet shortcode handler\n\t\t\twp_embed_register_handler(\n\t\t\t\tself::SHORTCODE_TAG,\n\t\t\t\tstatic::URL_REGEX,\n\t\t\t\tarray( $classname, 'linkHandler' ),\n\t\t\t\t1\n\t\t\t);\n\t\t}\n\t}", "function __construct(){\n\t\t\trequire_once('class-sp-theme-admin.php');\n\t\t\t$this->admin = new SP_THEME_ADMIN;\n\n\t\t\t/* LOAD ASSETS */\n\t\t\tadd_action('wp_enqueue_scripts', array( $this, 'assets' ) );\n\n\t\t}", "function wpt_enqueued()\n{\n global $wp_scripts, $wp_styles;\n\n $list = array('scripts'=>[],'styles'=>[]);\n\n foreach( $wp_scripts->queue as $script )\n $list['scripts'][] = $wp_scripts->registered[$script];\n\n foreach( $wp_styles->queue as $style)\n $list['styles'][] = $wp_styles->registered[$style];\n\n return $list;\n\n}", "public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }", "public function onAdminEnqueueScripts()\n {\n $this->enqueue('admin');\n }", "public function __construct()\n\t{\n\t\t$this->plugin_slug = 'ucl-quiz';\n\t\t$this->version = '0.1.0';\n\n\t\t$this->load_dependencies();\n\t\t$this->load_api_dependencies();\n\t\t$this->loader = new Loader;\n\t\t$this->routing = new Routing;\n\t\t$this->define_routes();\n\t\t$this->define_hooks();\n\n\t\tif (is_admin()) {\n\t\t\trequire_once 'Ucl_Quiz_Admin.php';\n\n\t\t\tnew Ucl_Quiz_Admin;\n\t\t}\n\n\t}", "function ssSearchEnqueueScript() {\n //-- main js file\n wp_enqueue_script( 'ss_search_main_js', plugin_dir_url( __FILE__ ) . 'js/ss_ajax_search.js', array( 'jquery' ) );\n\n //-- main css file\n wp_enqueue_style( 'ss_search_main_css', plugin_dir_url( __FILE__ ) . 'css/ss_ajax_search.css' );\n\n //-- localize ajax\n\t wp_localize_script( 'ss_search_main_js', 'ajax_object', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'input_value' => 1234 ) );\n\n //-- jquery ui js and css\n $ss_wp_scripts = wp_scripts();\n\n wp_enqueue_script( 'jquery-ui-autocomplete' );\n wp_enqueue_style( 'jquery-ui-css',\n 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . $ss_wp_scripts->registered['jquery-ui-core']->ver . '/themes/smoothness/jquery-ui.css',\n false,\n 'v1.0',\n false);\n }", "public function public_enqueues() {\n wp_enqueue_style(\n 'wfc-preloader-css',\n WFC_PL_CSS . '/preloader.css'\n );\n\n wp_enqueue_script(\n 'wfc-preloader-js',\n WFC_PL_JS . '/preloader.js',\n array('jquery'),\n '',\n true\n );\n\n $wfc_preloader_enable = wfc_toolkit_get_option( 'enable_preloader' ) ? 1 : 0;\n $wfc_preloader_image_id = wfc_toolkit_get_option( 'preloader_spinner_image' );\n $wfc_preloader_background_color = wfc_toolkit_get_option( 'preloader_background', '#000000' );\n wp_localize_script(\n 'wfc-preloader-js',\n 'wfc_preloader',\n array(\n 'enable' => $wfc_preloader_enable, \n 'image' => $wfc_preloader_image_id,\n 'background_color' => $wfc_preloader_background_color,\n 'is_preload' => $this->genesis_preloader_load(true) !== null ? 1 : 0\n )\n );\n }", "public function __construct() {\n add_action(\"init\", array($this, \"registerAll\"));\n \n if(is_admin()) {\n add_action(\"admin_enqueue_scripts\", array($this, \"adminEnqueueScripts\"));\n add_action(\"admin_print_styles\", array($this, \"adminPrintStyles\"));\n } else {\n add_action('wp_enqueue_scripts', array($this, \"addScriptsFront\"), 20);\n }\n }", "public static function init()\n\t{\n\t\t$classname = get_called_class();\n\n\t\tadd_shortcode( static::SHORTCODE_TAG, array( $classname, 'shortcodeHandler' ) );\n\n\t\t// convert a URL into the shortcode equivalent\n\t\twp_embed_register_handler(\n\t\t\tstatic::SHORTCODE_TAG,\n\t\t\tstatic::URL_REGEX,\n\t\t\tarray( $classname, 'linkHandler' ),\n\t\t\t1\n\t\t);\n\n\t\t// Shortcode UI, if supported\n\t\tadd_action(\n\t\t\t'register_shortcode_ui',\n\t\t\tarray( $classname, 'shortcodeUI' ),\n\t\t\t5,\n\t\t\t0\n\t\t);\n\t}", "public function __construct()\n {\n add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));\n }", "public function enqueue() {\n\t\twp_enqueue_script( 'jquery-ui-button' );\n\t}", "public function Queues();", "function prosody_plugin_queue_scripts ()\n{\n\n wp_enqueue_style(\n 'poem-css',\n plugin_dir_url( __FILE__ ) . 'css/poem.css',\n array(),\n null,\n false\n );\n\n wp_register_script(\n 'handlers.js',\n plugins_url('js/handlers.js', __FILE__),\n array(),\n null,\n true\n );\n // Localize the script to pass in the siteurl\n wp_localize_script('handlers.js', 'WPURLS', array( 'siteurl' => home_url() ));\n wp_enqueue_script( 'handlers.js' );\n}", "public function public_enqueue_scripts() {\n\n\t\twp_register_script('custom-event-polyfill', get_template_directory_uri() . '/js/polyfill/custom-event.min.js', array(), $this->version, true);\n\t\twp_register_script('promise-polyfill', get_template_directory_uri() . '/js/polyfill/promise.min.js', array(), $this->version, true);\n\t\t// wp_register_script('scroll-polyfill', get_template_directory_uri() . '/js/polyfill/smoothscroll.min.js', array(), $this->version, true);\n\n\t\twp_register_script('tinyAnimate', get_template_directory_uri() . '/js/utils/TinyAnimate.js', array(), $this->version, true);\n\t\twp_register_script('swipe', get_template_directory_uri() . '/js/utils/swipe.js', array(), $this->version, true);\n\t\twp_register_script('collection', get_template_directory_uri() . '/js/utils/collection.js', array(), $this->version, true);\n\t\twp_register_script('media-player', get_template_directory_uri() . '/js/utils/media-player.js', array('tinyAnimate', 'collection'), $this->version, true);\n\t\twp_register_script('media-player-v2', get_template_directory_uri() . '/js/utils/media-player-v2.js', array('tinyAnimate', 'collection'), $this->version, true);\n\t\twp_register_script('build', get_template_directory_uri() . '/js/utils/build.js', array(), $this->version, true);\n\t\twp_register_script('ajax', get_template_directory_uri() . '/js/utils/ajax.js', array(), $this->version, true);\n\t\twp_register_script('marquee', get_template_directory_uri() . '/js/utils/marquee.js', array(), $this->version, true);\n\t\twp_register_script('popup', get_template_directory_uri() . '/js/utils/popup.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('calendar', get_template_directory_uri() . '/js/utils/calendar.js', array(), $this->version, true);\n\t\twp_register_script('translation', get_template_directory_uri() . '/js/utils/translation.js', array(), $this->version, true);\n\t\twp_register_script('grid-system', get_template_directory_uri() . '/js/utils/grid-system.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('sticky', get_template_directory_uri() . '/js/utils/sticky.js', array(), $this->version, true);\n\t\twp_register_script('custom-dispatcher', get_template_directory_uri() . '/js/utils/custom-dispatcher.js', array(), $this->version, true);\n// \t\twp_enqueue_script('grid', get_template_directory_uri() . '/js/grid.js', array('grid-system'), $this->version, true);\n// \t\twp_enqueue_script('projects-grid', get_template_directory_uri() . '/js/projects.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('project', get_template_directory_uri() . '/js/project.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('image', get_template_directory_uri() . '/js/image.js', array('tinyAnimate'), $this->version, true);\n\t\t// wp_register_script('grid-slideshow', get_template_directory_uri() . '/js/grid-slideshow.js', array('media-player', 'swipe', 'build'), $this->version, true);\n\n\t\t// wp_enqueue_script('home', get_template_directory_uri() . '/js/home.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('header', get_template_directory_uri() . '/js/header.js', array('popup', 'sticky', 'marquee'), $this->version, true);\n\t\t// wp_enqueue_script('single', get_template_directory_uri() . '/js/single.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('bios', get_template_directory_uri() . '/js/bios.js', array('popup'), $this->version, true);\n\t\t// wp_enqueue_script('agenda', get_template_directory_uri() . '/js/agenda.js', array('popup', 'ajax', 'build', 'calendar', 'grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('intro', get_template_directory_uri() . '/js/intro.js', array('media-player'), $this->version, true);\n\n\t\twp_register_script('cookies', get_template_directory_uri() . '/js/utils/cookies.js', array(), $this->version, false);\n\n\t\twp_register_script('gmap', get_template_directory_uri() . '/js/utils/gmap.js', array('gmap-api'), $this->version, true);\n\n\t}", "public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }" ]
[ "0.60146", "0.57902837", "0.5741122", "0.57089186", "0.56896347", "0.55447245", "0.5517112", "0.5512141", "0.54832727", "0.5474848", "0.54120886", "0.5396691", "0.5373377", "0.5372826", "0.53547734", "0.5353875", "0.5332397", "0.5326679", "0.53261614", "0.53241205", "0.5305125", "0.5305125", "0.5305125", "0.5305125", "0.5305125", "0.5305125", "0.5274141", "0.5262768", "0.52312434", "0.5228627", "0.5215197", "0.5210807", "0.52048177", "0.5199895", "0.51944065", "0.5194288", "0.519241", "0.51684135", "0.5163034", "0.5161872", "0.51348895", "0.51329046", "0.512354", "0.51235324", "0.51183516", "0.51169866", "0.511658", "0.5112198", "0.50857526", "0.5084069", "0.508361", "0.5080812", "0.5064372", "0.5051357", "0.50498575", "0.50470287", "0.5041759", "0.5038011", "0.50331926", "0.5032071", "0.50059855", "0.50038177", "0.5002308", "0.49946362", "0.4983294", "0.49830943", "0.49699908", "0.49627233", "0.49590096", "0.49490803", "0.49429432", "0.49294123", "0.4909874", "0.49079534", "0.4890842", "0.48872173", "0.48812157", "0.48779276", "0.4875487", "0.4870829", "0.48705927", "0.48640972", "0.48608688", "0.48575512", "0.48553443", "0.48515677", "0.48472196", "0.48454046", "0.4845146", "0.483644", "0.4834558", "0.48333648", "0.48290625", "0.48289844", "0.4827214", "0.48171428", "0.4812173", "0.4806399", "0.48032048", "0.4800321", "0.47924134" ]
0.0
-1
Creates a static instace of the Enqueue class for a style.
public static function style( string $handle ): self { return new self( $handle, 'style' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}", "function wp_dequeue_style($handle)\n {\n }", "public function admin_enqueue()\n\t{\n\t\t// styles.\n\n\t}", "public function enqueue()\n {\n if((int)Option::getByPath('wunderlist_todo_options', 'live.enabled') === 1)\n {\n wp_enqueue_script('socket', setcooki_config('wunderlist', 'socket.client.src'));\n }\n if((int)Option::getByPath('wunderlist_todo_options', 'css.enabled'))\n {\n $style = setcooki_get_option(self::PRIMARY_STYLES, $this);\n $style = apply_filters('wunderlist_todo_style', $style);\n $theme = (string)Option::getByPath('wunderlist_todo_options', 'css.theme', '');\n if(stripos($style, '.less') !== false)\n {\n try\n {\n $css = setcooki_path('plugin') . '/var/app.min.css';\n $style = setcooki_path('root') . DIRECTORY_SEPARATOR . ltrim($style, DIRECTORY_SEPARATOR);\n $theme = setcooki_path('root') . DIRECTORY_SEPARATOR . ltrim($theme, DIRECTORY_SEPARATOR);\n if(!file_exists($css) || (file_exists($css) && ((int)@filemtime($style) > (int)@filemtime($css)) || ((int)@filemtime($theme) > (int)@filemtime($css))))\n {\n require_once setcooki_path('plugin') . '/src/ext/less/Less.php';\n $parser = new \\Less_Parser(array('compress' => true));\n $parser->SetImportDirs(array(setcooki_path('plugin') . '/static/css/' => setcooki_path('plugin', true) . '/static/css/') );\n $parser->parse((string)file_get_contents($theme));\n $parser->parse((string)file_get_contents($style));\n file_put_contents(setcooki_path('plugin') . '/var/app.min.css', $parser->getCss());\n }\n $style = setcooki_path('plugin', true) . '/var/app.min.css';\n }\n catch(\\Exception $e)\n {\n $style = null;\n }\n }\n if(!empty($style))\n {\n wp_enqueue_style('wunderlist', $style, array(), false, 'all');\n }\n if(setcooki_has_option(self::CUSTOM_STYLES, $this))\n {\n wp_enqueue_style('wunderlist-custom', setcooki_get_option(self::CUSTOM_STYLES, $this), array(), false, 'all');\n }\n }\n wp_register_script('wunderlist', setcooki_path('plugin', true) . '/static/js/app.js', array('jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-sortable'), '1.0.0', false);\n wp_localize_script('wunderlist', 'wunderlistAjax', array('url' => admin_url('admin-ajax.php'), 'nonce' => get_option('wunderlist_nonce')));\n wp_localize_script('wunderlist', 'wunderlistConf', setcooki_config('wunderlist', 'js.conf'));\n wp_enqueue_script('wunderlist');\n }", "static public function enqueue() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-google_fonts',\r\n\t\t\t\t'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,500,300,300italic',\r\n\t\t\t\tfalse,\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-notice',\r\n\t\t\t\tself::$module_url . 'notice.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\t\t}", "function vcex_enque_style( $type = '', $value = '' ) {\n\tif ( 'ilightbox' === $type || 'lightbox' === $type ) {\n\t\tif ( function_exists( 'wpex_enqueue_lightbox_scripts' ) ) {\n\t\t\twpex_enqueue_lightbox_scripts();\n\t\t} elseif ( function_exists( 'wpex_enqueue_ilightbox_skin' ) ) {\n\t\t\twpex_enqueue_ilightbox_skin( $value );\n\t\t}\n\t} elseif ( 'hover-animations' === $type ) {\n\t\twp_enqueue_style( 'wpex-hover-animations' );\n\t}\n}", "protected function getEnqueuingStyles() { \r\n\t\treturn array();\r\n\t}", "public static function bkap_resource_css_file(){\n\n if ( get_post_type() == 'bkap_resource' ) {\n wp_dequeue_style( 'wc_bookings_admin_styles' );\n }\n }", "public function enqueue() {\r\n\t\twp_enqueue_style( 'wfct-ei', WFC_EI_CSS_URL . 'environment-indicator.css', array(), WFC_EI_VERSION );\r\n\t}", "function ka_enqueue_styles() {\n // Carrega o estilo padrão\n wp_enqueue_style( 'ka-style' );\n }", "public function enqueues() {\n\n\t\t// CSS.\n\t\twp_enqueue_style(\n\t\t\t'wpforms-builder-setup',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/admin-builder-setup.css',\n\t\t\tnull,\n\t\t\tWPFORMS_VERSION\n\t\t);\n\t}", "public function enqueue_styles() {\n\n\t\t// Setup styles array\n\t\t$styles = array();\n\n\t\t// LTR\n\t\t$styles['bbp-default'] = array(\n\t\t\t'file' => URL.'sprites/stylesheets/forums.css',\n\t\t\t'dependencies' => array()\n\t\t);\n\n\t\t// RTL helpers\n\t\tif ( is_rtl() ) {\n\t\t\t$styles['bbp-default-rtl'] = array(\n\t\t\t\t'file' => 'css/bbpress-rtl.css',\n\t\t\t\t'dependencies' => array( 'bbp-default' )\n\t\t\t);\n\t\t}\n\n\t\t// Filter the scripts\n\t\t$styles = apply_filters( 'BBP_IOA_styles', $styles );\n\n\t\t// Enqueue the styles\n\t\tforeach ( $styles as $handle => $attributes ) {\n\t\t\tbbp_enqueue_style( $handle, $attributes['file'], $attributes['dependencies'], $this->version, 'screen' );\n\t\t}\n\t}", "public static function enqueue_styles() {\n\t\tif ( ! static::$enqueued && wp_style_is( 'cmb2-styles', 'enqueued' ) ) {\n\t\t\twp_enqueue_style( 'wplibs-form' );\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "function shd_dequeue_style() {\r\n\twp_dequeue_style( 'notifications' );\r\n}", "public function enqueues()\n {\n\n // CSS\n wp_enqueue_style(\n 'wpforms-builder-settings',\n WPFORMS_PLUGIN_URL . 'assets/css/admin-builder-settings.css',\n null,\n WPFORMS_VERSION\n );\n }", "public function enqueue() {\n\t\tgutenberg_widgets_init( 'gutenberg_customizer' );\n\t}", "function put_in_queue() {\n wp_enqueue_script('reviewsjs', plugins_url('/assets/js/reviews.js', __FILE__));\n wp_enqueue_style('reviewscss', plugins_url('/assets/css/reviews.css', __FILE__));\n }", "private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private function enqueueStyle() {\n wp_enqueue_style(\n 'shokka-forms',\n plugins_url( 'css/dist/style.css', 'shokka-forms/shokka-forms.php' ),\n array(),\n filemtime(\n sprintf(\n '%s%s%s',\n trailingslashit( WP_PLUGIN_DIR ),\n plugin_dir_path( 'shokka-forms/shokka-forms.php' ),\n wp_normalize_path( 'css/dist/style.css' )\n )\n )\n );\n }", "function add_css() \n {\n if( $this->options['use-css-file'] ) {\n wp_register_style( 'bbquotations-style' , $this->plugin_url . 'bbquotations-style.css');\n wp_enqueue_style( 'bbquotations-style' );\n } \n }", "function TemaCurso_resources(){\r\n wp_enqueue_style('style', get_stylesheet_uri());\r\n}", "public function enqueue() {\n $this->register();\n\n // If stylesheet is in browser cache, load it the traditional way\n if ( isset( $_COOKIE['fullCSS'] ) && false !== $_COOKIE['fullCSS'] )\n {\n // Load Typekit\n wp_enqueue_style( 'typekit' );\n // Default style.css.\n wp_enqueue_style( 'style' );\n }\n // Otherwise, inline critical CSS and load full stylesheet asynchronously\n else\n {\n add_filter( 'style_loader_tag', array( $this, 'custom_link_tag_attributes' ), 5, 4 );\n add_action( 'wp_head', array( __CLASS__, 'loadCSS' ), 10 );\n }\n\n // jQuery.\n wp_enqueue_script( 'jquery' );\n\n // Fullpage.js\n wp_enqueue_script( 'parallax' );\n wp_enqueue_script( 'fullpage' );\n\n // MmenuLight\n wp_enqueue_script( 'mmenu-light-polyfills' );\n wp_enqueue_script( 'mmenu-light' );\n\n // Frontend.\n wp_enqueue_script( 'app-js' );\n\n // Post comments.\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }", "function wp_enqueue_style() {\n\t}", "private function __construct() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\t}", "function bwcr_enqueue(){\n wp_enqueue_style( 'bwcr-style', plugin_dir_url( __FILE__ ) . 'style.css', array(), filemtime(plugin_dir_path( __FILE__ ) . 'style.css'), false );\n wp_enqueue_script( 'bwcr-script', plugin_dir_url( __FILE__ ) . 'script.js', array(), filemtime(plugin_dir_path( __FILE__ ) . 'script.js'), false );\n wp_enqueue_style( 'font-awe', 'https://use.fontawesome.com/releases/v5.6.3/css/all.css', array(), '5.6.3', false );\n}", "public function enqueue()\n {\n wp_enqueue_media();\n\n // Styles\n\n // Scripts\n $class_name = get_class( $this );\n wp_enqueue_script( 'elementor-file-uploader', EFU_DIR_URL . \"/inc/controls/$class_name/$class_name.js\", [ 'jquery' ], '1.0' );\n }", "public function enqueue_styles() {\r\n\r\n\t\t}", "function wp_enqueue_style($handle, $src = '', $deps = array(), $ver = \\false, $media = 'all')\n {\n }", "public function enqueue_style() {\n\t\twp_enqueue_style( 'aztec-style', get_stylesheet_directory_uri() . '/assets/css/styles.css' );\n\t}", "function enqueue_custom_script(){\n\n\t$version = \"b\";\n\n\twp_dequeue_style( 'gforms_formsmain_css' );\n\n\t$cam_formsmain = get_template_directory_uri() . '/css/gforms-formsmain.css';\n\twp_register_style('cam_formsmain',$cam_formsmain, false, $version);\n\twp_enqueue_style( 'cam_formsmain');\t\n\n}", "function tac_css_enqueuer() {\n\twp_register_style( 'tac_main', get_stylesheet_directory_uri() . '/style.css' );\n\twp_enqueue_style( 'tac_main' );\n}", "public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nimiq_Miner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nimiq_Miner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/nimiq-miner-public.css', array(), $this->version, 'all' );\n\n\t}", "function wp_add_inline_style($handle, $data)\n {\n }", "function ep_bp_enqueue_style() {\n\twp_register_style( 'elasticpress-buddypress', plugins_url( '/elasticpress-buddypress/css/elasticpress-buddypress.css' ) );\n\twp_enqueue_style( 'elasticpress-buddypress' );\n}", "public function styles(){\n //Enqueue styles\n /**\n * wp_enqueue_style('sample-style',$this->directory_uri . '/sample.css');\n * ...\n * ....\n */\n }", "function wpt_enqueued()\n{\n global $wp_scripts, $wp_styles;\n\n $list = array('scripts'=>[],'styles'=>[]);\n\n foreach( $wp_scripts->queue as $script )\n $list['scripts'][] = $wp_scripts->registered[$script];\n\n foreach( $wp_styles->queue as $style)\n $list['styles'][] = $wp_styles->registered[$style];\n\n return $list;\n\n}", "function wp_enqueue_block_support_styles($style, $priority = 10)\n {\n }", "public function adminEnqueueStyles($hook = '') {\n if (isset($_GET['page']) && $_GET['page'] == 'vcht-console') {\n wp_register_style($this->_token . '-bootstrap', esc_url($this->assets_url) . 'css/bootstrap.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-bootstrap');\n wp_register_style($this->_token . '-flat-ui', esc_url($this->assets_url) . 'css/flat-ui-pro.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-flat-ui');\n wp_register_style($this->_token . '-fontawesome', esc_url($this->assets_url) . 'css/font-awesome.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-fontawesome');\n wp_register_style($this->_token . '-customScrollbar', esc_url($this->assets_url) . 'css/jquery.mCustomScrollbar.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-customScrollbar');\n wp_register_style($this->_token . '-dropzone', esc_url($this->assets_url) . 'css/dropzone.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-dropzone');\n wp_register_style($this->_token . '-colpick', esc_url($this->assets_url) . 'css/colpick.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-colpick');\n wp_enqueue_style('thickbox');\n wp_register_style($this->_token . '-admin', esc_url($this->assets_url) . 'css/admin.min.css', array(), $this->_version);\n wp_enqueue_style($this->_token . '-admin');\n }\n }", "public function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t\twp_enqueue_script( 'wp-color-picker-alpha', $this->get_mtm_resource_url() . 'js/wp-color-picker-alpha.js', array( 'wp-color-picker' ), '1.0', true );\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t}", "public function __construct() {\n \n\t\tadd_action(\n\t\t\t'wp_enqueue_scripts',\n\t\t\t[ $this, 'enqueue' ]\n\t\t);\n \n\t}", "public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }", "public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/fastnetmarketing-admin-admin.css', array(), $this->version, 'all' );\n\n\t}", "function dequeue_all_styles() {\n\tglobal $wp_styles;\n\t$wp_styles->queue = array();\n}", "public function getStyleLoader();", "function hankart_enqueue_styles() {\n // wp_dequeue_style( 'font-awesome' );\n // wp_dequeue_style( 'storefront-fonts' );\n // wp_dequeue_style( 'source-sans-pro' );\n // wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );\n // wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() );\n wp_enqueue_style( 'load-fa', 'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css' );\n}", "function jehaann_style(){\n wp_register_style('style', get_stylesheet_uri(),'','1.0','all');\n\n //cargando hojas de estilos\n\n wp_enqueue_style('style');\n}", "public function run()\n {\n Style::create([\n 'type' => 'Masculino',\n 'description' => 'Produto para homem',\n ]);\n Style::create([\n 'type' => 'Feminino',\n 'description' => 'Produto para mulher',\n ]);\n Style::create([\n 'type' => 'Unisex',\n 'description' => 'Produto para homem ou mulher',\n ]);\n }", "public static function enqueue();", "static function get_queued_styles() {\n\t\tglobal $wp_styles;\n\n\t\t$loading_styles = array();\n\t\tforeach ( $wp_styles->queue as $key => $handle ) {\n\t\t\t$loading_styles[ $handle ] = $wp_styles->registered[ $handle ]->src;\n\t\t}\n\t\treturn $loading_styles;\n\t}", "function clea_base_enqueue_styles() {\n\t\n\t/*\n\t* enqueue font awesome 4.0 from CDN\n\t* @since 1.1.0\n\t*/\n\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' );\n\t\n\n\t/*\n\t* @since 1.1.0\n\t* specific style added to the unique style.css file\n\t*/\n\twp_enqueue_style( 'clea-specific', trailingslashit( THEME_URI ) . 'css/clea-specific.css' );\t\n}", "private function __construct() {\n\t\t\t// Uses unique prefix per blog so each blog has separate queue.\n\t\t\t$this->prefix = 'wp_' . get_current_blog_id();\n\t\t\t$this->identifier = 'wc_sc_coupon_importer';\n\n\t\t\tadd_action( 'admin_notices', array( $this, 'coupon_background_notice' ) );\n\t\t\tadd_action( 'wp_ajax_wc_sc_coupon_background_progress', array( $this, 'ajax_coupon_background_progress' ) );\n\t\t\tadd_action( 'wp_ajax_wc_sc_download_csv', array( $this, 'ajax_download_csv' ) );\n\t\t\tadd_action( 'woo_sc_generate_coupon_csv', array( $this, 'woo_sc_generate_coupon_csv' ) );\n\t\t\tadd_action( 'woo_sc_import_coupons_from_csv', array( $this, 'woo_sc_import_coupons_from_csv' ) );\n\t\t\tadd_action( 'woocommerce_smart_coupons_send_combined_coupon_email', array( $this, 'send_scheduled_combined_email' ) );\n\t\t\tadd_action( 'action_scheduler_failed_action', array( $this, 'restart_failed_action' ) );\n\n\t\t\tadd_filter( 'heartbeat_send', array( $this, 'check_coupon_background_progress' ), 10, 2 );\n\t\t\tadd_filter( 'cron_schedules', array( $this, 'modify_action_scheduler_default_interval' ), 1000 ); // phpcs:ignore \n\n\t\t}", "function register_style() {\n}", "function styles() {\n\twp_register_style(\n\t\t'fontawesome',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/fontawesome/css/font-awesome.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'ionicons',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/ionicons/css/ionicons.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'bootstrap',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/bootstrap/dist/css/bootstrap.min.css\",\n\t\tarray( 'fontawesome' ),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_register_style(\n\t\t'sanitize',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/sanitize/sanitize.min.css\",\n\t\tarray(),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n\n\twp_enqueue_style(\n\t\t'vincentragosta',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/css/vincentragosta---twenty-seventeen.css\",\n\t\tarray( 'bootstrap', 'fontawesome', 'ionicons', 'sanitize' ),\n\t\tVINCENTRAGOSTA_COM_VERSION\n\t);\n}", "function thrive_dashboard_enqueue_style($handle, $src, $deps = array(), $ver = false, $media = 'all')\n{\n if ($ver === false) {\n $ver = \"1.0\";\n }\n wp_enqueue_style($handle, $src, $deps, $ver, $media);\n}", "function elzero_style() {\n wp_enqueue_style('font-awesome-style' , get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(),'4.7.0');\n wp_enqueue_style('bootstrap-style' , get_template_directory_uri() . '/assets/css/bootstrap.min.css', array(),'4.0.0-alpha.6');\n wp_enqueue_style('my-style' , get_template_directory_uri() . '/assets/css/style.min.css', array(),'1.0.0');\n}", "public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/spaceapi-wp-admin.css', array(), $this->version, 'all' );\n\n\t}", "function enqueue(){\n wp_enqueue_style( 'pluginstyle', plugins_url( '/assets/beteasy-style.css', __FILE__ ) );\n wp_enqueue_script( 'pluginscript', plugins_url( '/assets/beteasy-js.js', __FILE__ ) );\n\n }", "public static function load_dynamic_css() {\n\t\t\tif ( ! isset( $_POST['vc_inline'] ) ) {\n\t\t\t\t\n\t\t\t\t// Custom styles\n\t\t\t\t$name = self::option( 'white_label_theme_name', 'xtra' );\n\t\t\t\t$handle = wp_style_is( 'codevz-plugin' ) ? 'codevz-plugin' : $name;\n\t\t\t\t$extra_css = '';\n\n\t\t\t\t// Dark\n\t\t\t\tif ( self::option( 'dark' ) ) {\n\t\t\t\t\t$extra_css .= \"/* Dark */\" . 'body{background-color:#171717;color:#fff}.layout_1,.layout_2{background:#191919}a,.woocommerce-error, .woocommerce-info, .woocommerce-message{color:#fff}.sf-menu li li a,.sf-menu .cz > h6{color: #000}.cz_quote_arrow blockquote{background:#272727}.search_style_icon_dropdown .outer_search, .cz_cart_items {background: #000;color: #c0c0c0 !important}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {color: #111}#bbpress-forums li{background:none!important}#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-footer{background:#141414!important;color:#FFF;padding:10px 20px!important}.bbp-header a{color:#fff}.subscription-toggle,.favorite-toggle{padding: 1px 20px !important;}span#subscription-toggle{color: #000}#bbpress-forums #bbp-single-user-details #bbp-user-navigation li.current a{background:#1D1E20!important;color:#FFF;opacity:1}#bbpress-forums li.bbp-body ul.forum,#bbpress-forums li.bbp-body ul.topic{padding:10px 20px!important}.bbp-search-form{margin:0 0 12px!important}.bbp-form .submit{margin:0 auto 20px}div.bbp-breadcrumb,div.bbp-topic-tags{line-height:36px}.bbp-breadcrumb-sep{padding:0 6px}#bbpress-forums li.bbp-header ul{font-size:14px}.bbp-forum-title,#bbpress-forums .bbp-topic-title .bbp-topic-permalink{font-size:16px;font-weight:700}#bbpress-forums .bbp-topic-started-by{display:inline-block}#bbpress-forums p.bbp-topic-meta a{margin:0 4px 0 0;display:inline-block}#bbpress-forums p.bbp-topic-meta img.avatar,#bbpress-forums ul.bbp-reply-revision-log img.avatar,#bbpress-forums ul.bbp-topic-revision-log img.avatar,#bbpress-forums div.bbp-template-notice img.avatar,#bbpress-forums .widget_display_topics img.avatar,#bbpress-forums .widget_display_replies img.avatar{margin-bottom:-2px;border:0}span.bbp-admin-links{color:#4F4F4F}span.bbp-admin-links a{color:#7C7C7C}.bbp-topic-revision-log-item *{display:inline-block}#bbpress-forums .bbp-topic-content ul.bbp-topic-revision-log,#bbpress-forums .bbp-reply-content ul.bbp-topic-revision-log,#bbpress-forums .bbp-reply-content ul.bbp-reply-revision-log{border-top:1px dotted #474747;padding:10px 0 0;color:#888282}.bbp-topics,.bbp-replies,.topic{position:relative}#subscription-toggle,#favorite-toggle{float:right;line-height:34px;color:#DFDFDF;display:block;border:1px solid #DFDFDF;padding:0;margin:0;font-size:12px;border:0!important}.bbp-user-subscriptions #subscription-toggle,.bbp-user-favorites #favorite-toggle{position:absolute;top:0;right:0;line-height:20px}.bbp-reply-author br{display:none}#bbpress-forums li{text-align:left}li.bbp-forum-freshness,li.bbp-topic-freshness{width:23%}.bbp-topics-front ul.super-sticky,.bbp-topics ul.super-sticky,.bbp-topics ul.sticky,.bbp-forum-content ul.sticky{background-color:#2C2C2C!important;border-radius:0!important;font-size:1.1em}#bbpress-forums div.odd,#bbpress-forums ul.odd{background-color:#0D0D0D!important}div.bbp-template-notice a{display:inline-block}div.bbp-template-notice a:first-child,div.bbp-template-notice a:last-child{display:inline-block}#bbp_topic_title,#bbp_topic_tags{width:400px}#bbp_stick_topic_select,#bbp_topic_status_select,#display_name{width:200px}#bbpress-forums #bbp-your-profile fieldset span.description{color:#FFF;border:#353535 1px solid;background-color:#222!important;margin:16px 0}#bbpress-forums fieldset.bbp-form{margin-bottom:40px}.bbp-form .quicktags-toolbar{border:1px solid #EBEBEB}.bbp-form .bbp-the-content,#bbpress-forums #description{border-width:1px!important;height:200px!important}#bbpress-forums #bbp-single-user-details{width:100%;float:none;border-bottom:1px solid #080808;box-shadow:0 1px 0 rgba(34,34,34,0.8);margin:0 0 20px;padding:0 0 20px}#bbpress-forums #bbp-user-wrapper h2.entry-title{margin:-2px 0 20px;display:inline-block;border-bottom:1px solid #FF0078}#bbpress-forums #bbp-single-user-details #bbp-user-navigation a{padding:2px 8px}#bbpress-forums #bbp-single-user-details #bbp-user-navigation{display:inline-block}#bbpress-forums #bbp-user-body,.bbp-user-section p{margin:0}.bbp-user-section{margin:0 0 30px}#bbpress-forums #bbp-single-user-details #bbp-user-avatar{margin:0 20px 0 0;width:auto;display:inline-block}#bbpress-forums div.bbp-the-content-wrapper input{width:auto!important}input#bbp_topic_subscription{width:auto;display:inline-block;vertical-align:-webkit-baseline-middle}.widget_display_replies a,.widget_display_topics a{display:inline-block}.widget_display_replies li,.widget_display_forums li,.widget_display_views li,.widget_display_topics li{display:block;border-bottom:1px solid #282828;line-height:32px;position:relative}.widget_display_replies li div,.widget_display_topics li div{font-size:11px}.widget_display_stats dt{display:block;border-bottom:1px solid #282828;line-height:32px;position:relative}.widget_display_stats dd{float:right;margin:-40px 0 0;color:#5F5F5F}#bbpress-forums div.bbp-topic-content code,#bbpress-forums div.bbp-reply-content code,#bbpress-forums div.bbp-topic-content pre,#bbpress-forums div.bbp-reply-content pre{background-color:#FFF;padding:12px 20px;max-width:96%;margin-top:0}#bbpress-forums div.bbp-forum-author img.avatar,#bbpress-forums div.bbp-topic-author img.avatar,#bbpress-forums div.bbp-reply-author img.avatar{border-radius:100%}#bbpress-forums li.bbp-header,#bbpress-forums li.bbp-footer,#bbpress-forums li.bbp-body ul.forum,#bbpress-forums li.bbp-body ul.topic,div.bbp-forum-header,div.bbp-topic-header,div.bbp-reply-header{border-top:1px solid #252525!important}#bbpress-forums ul.bbp-lead-topic,#bbpress-forums ul.bbp-topics,#bbpress-forums ul.bbp-forums,#bbpress-forums ul.bbp-replies,#bbpress-forums ul.bbp-search-results,#bbpress-forums fieldset.bbp-form,#subscription-toggle,#favorite-toggle{border:1px solid #252525!important}#bbpress-forums div.bbp-forum-header,#bbpress-forums div.bbp-topic-header,#bbpress-forums div.bbp-reply-header{background-color:#1A1A1A!important}#bbpress-forums div.even,#bbpress-forums ul.even{background-color:#161616!important}.bbp-view-title{display:block}div.fixed_contact,i.backtotop,i.fixed_contact,.ajax_search_results{background:#151515}.nice-select{background-color:#fff;color:#000}.nice-select .list{background:#fff}.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,.woocommerce div.product .woocommerce-tabs ul.tabs li a{color: inherit}.woocommerce #reviews #comments ol.commentlist li .comment-text{border-color:rgba(167, 167, 167, 0.2) !important}.woocommerce div.product .woocommerce-tabs ul.tabs li.active{background:rgba(167, 167, 167, 0.2)}.woocommerce div.product .woocommerce-tabs ul.tabs li::before,.woocommerce div.product .woocommerce-tabs ul.tabs li::after{display:none!important}#comments .commentlist li .avatar{box-shadow: 1px 10px 10px rgba(167, 167, 167, 0.1) !important}.cz_line{background:#fff}.xtra-post-title span{color:rgba(255, 255, 255, 0.6)}.woocommerce div.product div.images .woocommerce-product-gallery__wrapper .zoomImg{background-color:#0b0b0b}.cz_popup_in{background:#171717;color:#fff}';\n\t\t\t\t}\n\n\t\t\t\t// Category page custom background\n\t\t\t\tif ( is_category() || is_tag() || is_tax() ) {\n\n\t\t\t\t\tglobal $wp_query;\n\n\t\t\t\t\tif ( ! empty( $wp_query->queried_object->term_id ) ) {\n\n\t\t\t\t\t\t$tax_meta = get_term_meta( $wp_query->queried_object->term_id, 'codevz_cat_meta', true );\n\n\t\t\t\t\t\tif ( ! empty( $tax_meta['_css_page_title'] ) ) {\n\n\t\t\t\t\t\t\t$extra_css .= '.page_title{' . str_replace( ';', ' !important;', $tax_meta['_css_page_title'] ) . '}';\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Theme styles\n\t\t\t\tif ( is_customize_preview() ) {\n\n\t\t\t\t\twp_add_inline_style( $handle, $extra_css );\n\n\t\t\t\t} else {\n\t\t\t\t\t$ts = self::option( 'css_out' );\n\n\t\t\t\t\t// Fix for old users\n\t\t\t\t\tif ( ! $ts && self::$plugin ) {\n\t\t\t\t\t\t$ts = Codevz_Options::css_out();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add styles\n\t\t\t\t\twp_add_inline_style( $handle, $extra_css . $ts );\n\n\t\t\t\t\t// Fonts\n\t\t\t\t\tforeach( (array) self::option( 'fonts_out' ) as $font ) {\n\t\t\t\t\t\tself::enqueue_font( $font );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function add_styles() {\n\t\tif ( is_active_widget( false, false, $this->id_base, true ) ) {\n\t\t\twp_enqueue_style( 'font-awesome' );\n\t\t\t\n\t\t\t//wp_enqueue_style( 'my-style', \\trends\\helper\\utils::get_widgets_uri( 'social_icons', '/assets/my-style.css') );\n\t\t\t\n\t\t}\n\t}", "public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/drinkers-edition-admin.css', array(), $this->version, 'all' );\n\n\t}", "function ecomaster_scripts() {\n wp_enqueue_style( 'ecomaster-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\n}", "function taleronWP_resources(){\n\twp_enqueue_style('style', get_stylesheet_uri());\n}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function enqueue_styles() {\n\n\t\t\t/**\n\t\t\t * This function is provided for demonstration purposes only.\n\t\t\t *\n\t\t\t * An instance of this class should be passed to the run() function\n\t\t\t * defined in Advanced_Reviews_Pro_Loader as all of the hooks are defined\n\t\t\t * in that particular class.\n\t\t\t *\n\t\t\t * The Advanced_Reviews_Pro_Loader will then create the relationship\n\t\t\t * between the defined hooks and the functions defined in this\n\t\t\t * class.\n\t\t\t */\n\n\t\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/advanced-reviews-pro-public.css', array(), $this->version, 'all' );\n\t\t}", "function streamline_enqueue() {\n // Theme Stylesheet (currently points to stylesheet in the sass folder)\n wp_enqueue_style( 'streamline-style' , get_stylesheet_uri('stylesheets/style.css') );\n}", "function wdtConstructorEnqueue()\n{\n WDTTools::wdtUIKitEnqueue();\n\n wp_enqueue_style('wdt-wpdatatables');\n wp_enqueue_style('wdt-constructor-css', WDT_CSS_PATH . 'admin/constructor.css', array(), WDT_CURRENT_VERSION);\n wp_enqueue_style('wdt-dragula');\n\n wp_enqueue_script('wdt-ace');\n wp_enqueue_script('wdt-jsrender');\n wp_enqueue_script('wdt-dragula');\n wp_enqueue_script('wdt-common');\n wp_enqueue_script('wdt-color-pickr-init');\n wp_enqueue_script('wdt-funcs-js');\n wp_enqueue_script('wdt-constructor-main-js', WDT_JS_PATH . 'wpdatatables/admin/constructor/wdt.constructor.js', array(), WDT_CURRENT_VERSION, true);\n wp_enqueue_script('wdt-doc-js');\n\n wp_localize_script('wdt-constructor-main-js', 'wdtConstructorStrings', WDTTools::getTranslationStrings());\n}", "function enqueue ($entry) {\n\n}", "public function createQueue();", "public function enqueue_styles() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Points_Of_Sale_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Points_Of_Sale_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/points-of-sale-admin.css', array(), $this->version, 'all');\n\n\t}", "function agile_style() {\n\twp_enqueue_style( 'agile-style', get_stylesheet_uri() );\n}", "abstract public function register_style();", "public static function register_css(array $queue = array())\r\n\t\t{\r\n\t\t\twp_enqueue_style('thickbox');\r\n\t\t\twp_enqueue_style('editor-buttons');\r\n\r\n\t\t\tif (version_compare(get_bloginfo('version'), '3.3', '>=')) {\r\n\t\t\t\twp_enqueue_style('wp-jquery-ui-dialog');\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_style_is('icf-mobiscroll', 'registered')) {\r\n\t\t\t\twp_enqueue_style('icf-mobiscroll', ICF_Loader::get_latest_version_url() . '/js/mobiscroll/mobiscroll-1.6.min.css');\r\n\t\t\t}\r\n\r\n\t\t\tif (!wp_style_is('icf-exvalidation', 'registered')) {\r\n\t\t\t\twp_enqueue_style('icf-exvalidation', ICF_Loader::get_latest_version_url() . '/js/exvalidation/exvalidation.css');\r\n\t\t\t}\r\n\r\n\t\t\tself::_enqueue($queue, 'style');\r\n\t\t}", "public function mtk_enqueueBlockFiles()\n {\n $handle = 'mtk_cptshortcode';\n $src = $this->plugin_url . 'assets/gut_cptshortcode.css';\n $deps = array( 'wp-edit-blocks') ;\n $ver = filemtime( $this->plugin_path . 'assets/gut_cptshortcode.css' );\n wp_register_style( $handle, $src, $deps, $ver );\n }", "function cloud4all_dequeue_styles() {\n\twp_dequeue_style('twentytwelve-ie');\n}", "function weeklypowerup_enqueue_styles()\n{\n\n\t wp_enqueue_style(\"add_normalize\", \t\tget_template_directory_uri() \t. \"/assets/css/normalize.css\");\n\n\t wp_enqueue_style(\"add_webflow_css\", \tget_template_directory_uri() \t. \"/assets/css/webflow.css\");\n\n\t wp_enqueue_style(\"add_weekly_css\", \tget_template_directory_uri() \t. \"/assets/css/weeklypowerup.webflow.css\");\n\n\t wp_enqueue_style(\"add_nunito_font\", \t\t\t\t\t\t\t\t'https://fonts.googleapis.com/css?family=Nunito', false); \n\n\t wp_enqueue_script('add_prism_js', \t\tget_template_directory_uri() \t. '/assets/js/prism.js');\n\t\n\t wp_enqueue_style(\"add_prism_css\", \tget_template_directory_uri() \t. \"/assets/css/prism.css\");\n\n wp_enqueue_style(\"frontpage-custom\", \tget_template_directory_uri() . \"/assets/css/frontpage.css\");\n\n\t wp_enqueue_script('add_webflow_js', \tget_template_directory_uri() \t. '/assets/js/webflow.js', array( 'jquery' ));\n \n wp_enqueue_style(\"weeklypowerup-style\", get_stylesheet_uri());\n \n \n}", "protected function createStyle()\n\t{\n\t\treturn new TPanelStyle;\n\t}", "public function enqueue_styles() {\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nerd_Wp_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nerd_Wp_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/contact-helpdesk-admin.css', array(),\n\t\t\t$this->version, 'all' );\n\t}", "function enqueue()\n\t{\n\t\twp_enqueue_style('kbpluginstyle', $this->plugin_url . 'assets/style.css');\n\t\twp_enqueue_script('kbpluginscript', $this->plugin_url . 'assets/script.js');\n\t}", "function script_n_styles_func() {\n\n wp_enqueue_style( 'custom-stylesheet', PLUGINS_URL( '/css/custom.css', __FILE__ ) );\n wp_enqueue_style( 'font-awesome-cdn', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css' );\n\n }", "function on_enqueue_scripts ()\n{\n wp_register_style ('cap-collation-front', plugins_url ('css/front.css', __FILE__));\n wp_enqueue_style ('cap-collation-front');\n}", "function enqueueClientFiles() {\n\t\t\tglobal $wp_styles;\n\n\t\t\tif ( ! is_admin() ) {\n\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'titan-style',\n\t\t\t\t\tget_bloginfo( 'stylesheet_url' ),\n\t\t\t\t\t'',\n\t\t\t\t\tnull\n\t\t\t\t);\n\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'titan-ie-style',\n\t\t\t\t\tget_template_directory_uri() . '/stylesheets/ie.css',\n\t\t\t\t\tarray( 'titan-style' ),\n\t\t\t\t\tnull\n\t\t\t\t);\n\t\t\t\t$wp_styles->add_data( 'titan-ie-style', 'conditional', 'lt IE 8' );\n\n\t\t\t\tif ( is_singular() ) {\n\t\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function prefix_add_my_stylesheet() {\n wp_register_style( 'prefix-style', plugins_url('style1.css', __FILE__) );\n wp_enqueue_style( 'prefix-style',plugins_url('style1.css', __FILE__) );\n wp_enqueue_script( 'prefix-style',plugins_url('close.js', __FILE__) );\n wp_enqueue_style( 'fa-style',plugins_url('font-awesome-4.2.0/css/font-awesome.min.css', __FILE__) );\n \n}", "function sp_admin_scripts_style_sc ($hook) {\n\tif( $hook == 'post.php' || $hook == 'post-new.php' ) {\n\twp_register_style( 'shortcode-style', esc_url( get_template_directory_uri() . '/library/shortcode/css/sc-style.css' ) );\n\twp_enqueue_style( 'shortcode-style' );\n\t}\n}", "function indosEnqueue() {\n global $app_base_url;\n\n\tif(! is_admin()){\n\t wp_register_style('indoshipping_css',$app_base_url.'assets/indoshipping.css');\n\t wp_register_script('indoshipping_js',$app_base_url.'assets/indoshipping.js',array('jquery'));\n\t wp_localize_script('indoshipping_js','indoshipping',array('pluginurl'=>$app_base_url,'ajaxurl'=>admin_url('admin-ajax.php')));\n\t wp_enqueue_style('indoshipping_css');\n\t wp_enqueue_script('indoshipping_js');\n\t}\n}", "function sf_child_theme_dequeue_style() {\n wp_dequeue_style( 'storefront-style' );\n wp_dequeue_style( 'storefront-woocommerce-style' );\n}", "function cbusds_styles()\n{\n\n wp_register_style('w3css', get_template_directory_uri() . '/css/w3.css', array(), '', 'all');\n wp_enqueue_style('w3css'); // Enqueue it!\n\n wp_register_style('normalize', get_template_directory_uri() . '/normalize.css', array(), '1.0', 'all');\n wp_enqueue_style('normalize'); // Enqueue it!\n\n wp_register_style('cbusdscss', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');\n wp_enqueue_style('cbusdscss'); // Enqueue it!\n}", "static public function enqueue_late() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_script(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.js',\r\n\t\t\t\tarray( 'jquery' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Allow other plugins to enqueue css/js after shared-ui to\r\n\t\t\t * overwrite certain definitions.\r\n\t\t\t */\r\n\t\t\tdo_action( 'wpmudev_plugin_ui_enqueued' );\r\n\t\t}", "function enqueueStyles() {\r\n $version = '0.2';\r\n $mainJS = get_template_directory_uri() . '/js/dist/main.js';\r\n $mainCSS = get_template_directory_uri() . '/css/dist/main.min.css';\r\n\r\n wp_enqueue_style('style', $mainCSS, $version, true);\r\n wp_enqueue_script('script', $mainJS, $version, true);\r\n}", "public function enqueueStyles() {\n\t\t\twp_enqueue_style('app', self::asset(\"css/app.css\"), NULL, '1.0.0', 'all');\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "function __construct(){\n\n\t\t\t$this->enqueues();\n\n\t\t}", "protected function getEnqueuingStyles() { \n return array(\n dirname( __FILE__ ) . '/asset/token-input.css',\n dirname( __FILE__ ) . '/asset/token-input-facebook.css',\n dirname( __FILE__ ) . '/asset/token-input-mac.css', \n dirname( __FILE__ ) . '/asset/token-input-admin_page_framework.css', \n );\n }", "public function kiwip_stylesheet_add_file(){\n\t\t//register\n\t\tforeach($this->stylesheet as $key){\n\t\t\twp_register_style('kiwip_shortcode-css-'.$key['stylesheetId'], $key['stylesheetURL']);\n\t\t}\n\t\t\n\t\t//load\n\t\tforeach($this->stylesheet as $eky){\n\t\t\twp_enqueue_style('kiwip_shortcode-css-'.$key['stylesheetId']);\n\t\t}\t\t\n\n\t\t// $this->debug($this->stylesheet); die();\n\t}", "public function enqueue() {\n\t\t\tstatic $enqueued = false;\n\n\t\t\t//Don't enqueue more than once\n\t\t\tif ( $enqueued ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$enqueued = true;\n\t\t\t// Set up min files for dev_mode = false.\n\t\t\t$min = Redux_Functions::isMin();\n\n\t\t\t// Field dependent JS\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-css_layout-js',\n\t\t\t\t$this->extension_url . 'field_css_layout' . $min . '.js',\n\t\t\t\tarray( 'jquery', 'wp-color-picker', 'select2-js' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style( 'select2-css' );\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-color-picker-css',\n\t\t\t\tReduxFramework::$_url . 'assets/css/color-picker/color-picker.css',\n\t\t\t\tarray( 'wp-color-picker' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-css_layout-css',\n\t\t\t\t$this->extension_url . 'field_css_layout.css',\n\t\t\t\tarray(),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "function ks_dequeue_block_styles(){\n wp_dequeue_style('wp-block-library');\n wp_dequeue_style('global-styles');\n wp_dequeue_style('classic-theme-styles');\n}", "public static function enqueue_resources() {\n\t\t$preparsed = easyazon_get_preparsed_shortcodes();\n\n\t\t$attribute_sets = array();\n\n\t\tif(isset($preparsed[EASYAZONPRO_SHORTCODE_INFO_BLOCK])) {\n\t\t\t$attribute_sets = array_merge($attribute_sets, $preparsed[EASYAZONPRO_SHORTCODE_INFO_BLOCK]);\n\t\t}\n\n\t\tif(isset($preparsed[EASYAZONPRO_SHORTCODE_INFO_BLOCK_LEGACY])) {\n\t\t\t$attribute_sets = array_merge($attribute_sets, $preparsed[EASYAZONPRO_SHORTCODE_INFO_BLOCK_LEGACY]);\n\t\t}\n\n\t\tif(!empty($attribute_sets)) {\n\n\t\t}\n\n\n\t\t$keys = array();\n\t\tforeach($attribute_sets as $atts) {\n\t\t\t$atts = apply_filters('easyazon_shortcode_atts', array(), $atts);\n\n\t\t\tif(isset($atts['key']) && $atts['key']) {\n\t\t\t\t$keys[] = $atts['key'];\n\t\t\t} else {\n\t\t\t\t$keys[] = '';\n\t\t\t}\n\t\t}\n\n\n\t\t$keys = array_unique($keys);\n\n\t\t$scripts = array();\n\t\t$stylesheets = array();\n\n\t\tforeach($keys as $key) {\n\t\t\t$scripts = array_merge($scripts, easyazon_get_info_block_template_scripts($key));\n\t\t\t$stylesheets = array_merge($stylesheets, easyazon_get_info_block_template_stylesheets($key));\n\t\t}\n\n\t\t$scripts = array_unique($scripts);\n\t\t$stylesheets = array_unique($stylesheets);\n\n\t\tforeach($scripts as $script) {\n\t\t\twp_enqueue_script(sprintf('easyazon-pro-info-block-%s', $script), plugins_url(\"resources/{$script}\", __FILE__), array('jquery', 'easyazonpro-bootstrap-popovers'), EASYAZONPRO_VERSION, true);\n\t\t}\n\n\t\tforeach($stylesheets as $stylesheet) {\n\t\t\twp_enqueue_style(sprintf('easyazon-pro-info-block-%s', $stylesheet), plugins_url(\"resources/{$stylesheet}\", __FILE__), array(), EASYAZONPRO_VERSION);\n\t\t}\n\t}", "public function public_enqueues() {\n wp_enqueue_style(\n 'wfc-preloader-css',\n WFC_PL_CSS . '/preloader.css'\n );\n\n wp_enqueue_script(\n 'wfc-preloader-js',\n WFC_PL_JS . '/preloader.js',\n array('jquery'),\n '',\n true\n );\n\n $wfc_preloader_enable = wfc_toolkit_get_option( 'enable_preloader' ) ? 1 : 0;\n $wfc_preloader_image_id = wfc_toolkit_get_option( 'preloader_spinner_image' );\n $wfc_preloader_background_color = wfc_toolkit_get_option( 'preloader_background', '#000000' );\n wp_localize_script(\n 'wfc-preloader-js',\n 'wfc_preloader',\n array(\n 'enable' => $wfc_preloader_enable, \n 'image' => $wfc_preloader_image_id,\n 'background_color' => $wfc_preloader_background_color,\n 'is_preload' => $this->genesis_preloader_load(true) !== null ? 1 : 0\n )\n );\n }", "function add_style()\r\n{\r\n wp_enqueue_style(\r\n 'bootstrap'\r\n , get_template_directory_uri().'/css/bootstrap.min.css'\r\n );\r\n wp_enqueue_style(\r\n 'fontawesome'\r\n , get_template_directory_uri().'/css/font-awesome.min.css'\r\n );\r\n wp_enqueue_style(\r\n 'main'\r\n , get_template_directory_uri().'/css/main.css'\r\n ); \r\n\r\n}" ]
[ "0.6196724", "0.60213566", "0.5988783", "0.598669", "0.59145516", "0.5842425", "0.57952815", "0.579484", "0.5733131", "0.5683119", "0.56440383", "0.5626124", "0.56108063", "0.5580238", "0.55498743", "0.55224663", "0.5471425", "0.5466063", "0.5439852", "0.5432349", "0.54012024", "0.53974783", "0.53964126", "0.53810936", "0.5378501", "0.5360449", "0.53586763", "0.5347362", "0.53445625", "0.53395", "0.5338736", "0.53386164", "0.53288203", "0.53191715", "0.5311315", "0.5286213", "0.52758217", "0.52733064", "0.5271388", "0.5268088", "0.5251091", "0.5243376", "0.52404046", "0.52398777", "0.52383155", "0.5232809", "0.5232618", "0.52308965", "0.5217347", "0.52142", "0.520494", "0.52040446", "0.51747197", "0.5170875", "0.5170801", "0.5167293", "0.5166736", "0.5160154", "0.5159601", "0.5158676", "0.5153716", "0.5149538", "0.5145742", "0.5140555", "0.5139777", "0.51301944", "0.5124277", "0.5118171", "0.5110733", "0.51089406", "0.51051956", "0.50971484", "0.509586", "0.5092558", "0.5092036", "0.50914955", "0.50834846", "0.50815386", "0.5075124", "0.5070468", "0.5066016", "0.5065218", "0.50645137", "0.50628084", "0.505958", "0.5058203", "0.50565267", "0.50539595", "0.50522625", "0.50504684", "0.50504684", "0.50504684", "0.50504684", "0.5048813", "0.50487536", "0.504753", "0.5041414", "0.5040344", "0.50356585", "0.5034211", "0.5030602" ]
0.0
-1
Enqueue in wpadmin (ajax/rest)
public function admin( bool $admin = true ): self { $this->admin = $admin; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function indosEnqueue() {\n global $app_base_url;\n\n\tif(! is_admin()){\n\t wp_register_style('indoshipping_css',$app_base_url.'assets/indoshipping.css');\n\t wp_register_script('indoshipping_js',$app_base_url.'assets/indoshipping.js',array('jquery'));\n\t wp_localize_script('indoshipping_js','indoshipping',array('pluginurl'=>$app_base_url,'ajaxurl'=>admin_url('admin-ajax.php')));\n\t wp_enqueue_style('indoshipping_css');\n\t wp_enqueue_script('indoshipping_js');\n\t}\n}", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "public \tfunction\tenqueueAdmin() {\n\t\t\t/**\n\t\t\t * Register styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative CSS for FrozenPlugin.\n\t\t\twp_register_style('FrozenPlugin-admin-css', plugins_url('css/admin.css', __FILE__));\n\t\t\t\n\t\t\t/**\n\t\t\t * Register scripts here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative JS for FrozenPlugin.\n\t\t\twp_register_script('FrozenPlugin-admin-js', plugins_url('js/admin.js', __FILE__), array('jquery'));\n\t\t\t\n\t\t\t/**\n\t\t\t * Enqueue styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_style('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_style('thickbox');\n\t\t\t\n\t\t\t//Enqueue the administrative CSS. \n\t\t\twp_enqueue_style('FrozenPlugin-admin-css');\n\t\t\n\t\t\t/**\n\t\t\t * Enqueue scripts here. \n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_script('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_script('thickbox');\n\t\t\t\n\t\t\t//Enqueue Media Uploads.\n\t\t\twp_enqueue_media();\n\t\t\t//admin_enqueue_script('media-upload');\n\t\t\t\n\t\t\t//Enqueue the administrative JS. \n\t\t\twp_enqueue_script('FrozenPlugin-admin-js');\n\t\t}", "private function admin_ajax_routing() {\n\n\t\t// Load API injection\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_profile', $this->api, 'getUserProfile');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_base_folders', $this->api, 'getBaseFolders');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_layer', $this->api, 'getLayer');\n\t\t$this->add_action( 'wp_ajax_flowdrive_compare', $this->api, 'compare');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_folder_contents', $this->api, 'getFolderContents');\n\t\t$this->add_action( 'wp_ajax_flowdrive_post_item', $this->api, 'postItem');\n\t}", "public function onAdminEnqueueScripts()\n {\n $this->enqueue('admin');\n }", "public function bkap_load_resource_ajax_admin() {\n add_action( 'wp_ajax_bkap_add_resource', array( &$this, 'bkap_add_resource' ) );\n\n // ajax for deleting a single resource.\n add_action( 'wp_ajax_bkap_delete_resource', array( &$this, 'bkap_delete_resource' ) );\n }", "function chabok_enqueue() {\n\tglobal $chabok_options;\n\n\twp_register_script(\n\t\t'chabokpush',\n\t\tCHABOK_URL . 'assets/js/chabokpush.min.js',\n\t\tarray(),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_register_script(\n\t\t'chabok',\n\t\tCHABOK_URL . 'assets/js/chabok-init.js',\n\t\tarray( 'chabokpush', 'jquery' ),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_enqueue_script( 'chabok' );\n\n\twp_localize_script( 'chabok', 'chabok_params', array(\n\t\t'options' \t\t=> $chabok_options,\n\t\t'xhr_endpoint'\t=> admin_url( 'admin-ajax.php' ),\n\t) );\n}", "function wp_ajax_install_plugin()\n {\n }", "function b_script_enqueuer() \n{\n wp_register_script('tf_our_people', plugin_dir_url(__FILE__).'tf_our_people.js', array('jquery'));\n\n // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily\n wp_localize_script('tf_our_people', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));\n\n // enqueue jQuery library and the script you registered above\n wp_enqueue_script('jquery');\n wp_enqueue_script('tf_our_people');\n}", "function my_admin_enqueue() {\n $screen = get_current_screen();\n if( $screen->id != 'settings_page_gazette1-icon-gallery') {\n return;\n }\n // Styles\n wp_register_style('gazette1_admin_styles', plugin_dir_url(__FILE__) . 'admin/css/gazette1_styles.css');\n wp_enqueue_style('gazette1_admin_styles');\n // WP doesn't include the necessary jquery-ui stylings. Google CDN ftw\n wp_enqueue_style('jquery_ui_styles', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css');\n // Scripts\n wp_enqueue_script('jquery');\n wp_enqueue_script('jquery-ui-sortable');\n wp_enqueue_script('jquery-ui-core');\n wp_enqueue_script('jquery-ui-widget');\n wp_enqueue_script('jquery-ui-mouse');\n wp_register_script('gazette1_admin_js', plugin_dir_url(__FILE__) . 'admin/js/gazette1_admin.js', array('jquery', 'jquery-ui-sortable', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse'));\n wp_enqueue_script('gazette1_admin_js');\n}", "public function bsp_admin_enqueue($hook) {\n\n\t\t// load in entire admin area \n\t\twp_enqueue_style( 'BSP-admin-styles', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'style.css', '', false );\n\t\t// Select 2 boxes \n\t\twp_enqueue_style( 'select-22-styles', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'css/select2-custom.min.css', '', false );\n\t\twp_enqueue_script( 'select-22-script', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/select2-custom.min.js' );\n\t\twp_enqueue_script( 'BSP-admin-post-page-edit', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/wp-post-page-tools.js', \"\", true );\n\t\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', '', false );\n\t\twp_enqueue_style( 'BSP-edit', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"] . 'bsp-edit.css', array('font-awesome'), false );\n\t\t// Ace Code editor\n\t\twp_enqueue_script( 'ace-code-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js' );\n\t\twp_enqueue_script( 'ace-code-editor-mode-less', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-less.js' );\n\t\twp_enqueue_script( 'ace-code-editor-mode-css', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-css.js' );\n\t\twp_enqueue_script( 'ace-code-editor-bsp-theme', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/theme-custom.js' );\n\t\twp_enqueue_script( 'ace-code-editor-autocomplete', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ext-language_tools.js' );\n\t\t // If its not the main post page then exit now\n\t\tif ( 'toplevel_page_blog-styles-pro-menu' != $hook && 'wpe-dashboard_page_blog-styles-pro-menu' != $hook ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only if it exists on the admin main page \n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'toastr', 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js' );\n\t\twp_enqueue_style( 'toastr-style', \"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css\", '', false );\n\t\twp_enqueue_script( 'BSP-admin-config', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/config.js' );\n\t\twp_enqueue_script( 'BSP-admin-script', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/functions.js', array('jquery', 'toastr', 'media-upload'));\n\n\t}", "public function enqueue() {\n\t\twp_enqueue_script( 'jquery-ui-button' );\n\t}", "function wdtAdminEnqueue($hook)\n{\n if (in_array($hook, array(\n 'toplevel_page_wpdatareports',\n 'report-builder_page_wpdatareports-wizard',\n 'toplevel_page_wpdatatables-dashboard',\n 'wpdatatables_page_wpdatatables-administration',\n 'wpdatatables_page_wpdatatables-constructor',\n 'wpdatatables_page_wpdatatables-charts',\n 'wpdatatables_page_wpdatatables-chart-wizard',\n 'wpdatatables_page_wpdatatables-settings',\n 'wpdatatables_page_wpdatatables-support',\n 'wpdatatables_page_wpdatatables-system-info',\n 'admin_page_wpdatatables-getting-started',\n 'wpdatatables_page_wpdatatables-getting-started',\n 'admin_page_wpdatatables-welcome-page',\n 'admin_page_wpdatatables-lite-vs-premium',\n 'wpdatatables_page_wpdatatables-lite-vs-premium',\n 'wpdatatables_page_wpdatatables-add-ons'))) {\n\n add_filter('admin_body_class', 'wdtAddBodyClass');\n }\n\n wp_register_style('wdt-dragula', WDT_CSS_PATH . 'dragula/dragula.min.css', array(), WDT_CURRENT_VERSION);\n wp_register_style('wdt-browse-css', WDT_CSS_PATH . 'admin/browse.css', array(), WDT_CURRENT_VERSION);\n wp_register_style('wdt-wpdatatables', WDT_CSS_PATH . 'wpdatatables.min.css', array(), WDT_CURRENT_VERSION);\n\n wp_register_script('wdt-jsrender', WDT_JS_PATH . 'jsrender/jsrender.min.js', array(), WDT_CURRENT_VERSION, true);\n wp_register_script('wdt-dragula', WDT_JS_PATH . 'dragula/dragula.min.js', array(), WDT_CURRENT_VERSION, true);\n wp_register_script('wdt-ace', WDT_JS_PATH . 'ace/ace.js', array(), WDT_CURRENT_VERSION, true);\n wp_enqueue_script('wdt-color-pickr', WDT_JS_PATH . 'color-pickr/pickr.min.js', array(), WDT_CURRENT_VERSION, true);\n wp_register_script('wdt-color-pickr-init', WDT_ROOT_URL . 'assets/js/wpdatatables/admin/wdt.color-picker-init.js', array(), WDT_CURRENT_VERSION, true);\n wp_register_script('wdt-common', WDT_ROOT_URL . 'assets/js/wpdatatables/admin/common.js', array(), WDT_CURRENT_VERSION, true);\n wp_register_script('wdt-funcs-js', WDT_JS_PATH . 'wpdatatables/wdt.funcs.js', array('jquery', 'wdt-common'), WDT_CURRENT_VERSION, true);\n wp_register_script('wdt-doc-js', WDT_JS_PATH . 'wpdatatables/admin/doc.js', array('jquery', 'wdt-common'), WDT_CURRENT_VERSION, true);\n\n wp_enqueue_style('wdt-admin', WDT_CSS_PATH . 'admin/admin.css', array(), WDT_CURRENT_VERSION);\n wp_enqueue_style('wdt-color-pickr-classic', WDT_CSS_PATH . 'color-pickr/classic-theme.min.css', array(), WDT_CURRENT_VERSION);\n wp_enqueue_script('wdt-rating', WDT_JS_PATH . 'wpdatatables/admin/wdtRating.js', array('jquery'), WDT_CURRENT_VERSION, true);\n\n wp_enqueue_script('media-upload');\n\n wp_enqueue_media();\n\n wp_localize_script('wdt-common', 'wpdatatables_edit_strings', WDTTools::getTranslationStrings());\n wp_localize_script('wdt-common', 'wpdatatables_settings', WDTTools::getDateTimeSettings());\n wp_localize_script('wdt-common', 'wdtWpDataTablesPage', WDTTools::getWpDataTablesAdminPages());\n\n\n switch ($hook) {\n case 'toplevel_page_wpdatatables-dashboard':\n wdtDashboardEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-administration':\n wdtBrowseTablesEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-constructor':\n isset($_REQUEST['source']) ? wdtEditEnqueue() : wdtConstructorEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-charts':\n wdtBrowseChartsEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-chart-wizard':\n wdtChartWizardEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-settings':\n wdtSettingsEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-support':\n wdtSupportEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-system-info':\n wdtSystemInfoEnqueue();\n break;\n case 'admin_page_wpdatatables-getting-started':\n case 'wpdatatables_page_wpdatatables-getting-started':\n wdtGettingStartedEnqueue();\n break;\n case 'admin_page_wpdatatables-welcome-page':\n wdtWelcomePageEnqueue();\n break;\n case 'admin_page_wpdatatables-lite-vs-premium':\n case 'wpdatatables_page_wpdatatables-lite-vs-premium':\n wdtLiteVSPremiumEnqueue();\n break;\n case 'wpdatatables_page_wpdatatables-add-ons':\n wdtAddOnsEnqueue();\n break;\n }\n do_action('wpdatatables_enqueue_on_admin_pages');\n}", "function enqueue(){\n\t\t}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/spaceapi-wp-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "public function register(){\n add_action('admin_enqueue_scripts',array($this,'enqueue'));\n //load front end wp css & js\n add_action('wp_enqueue_scripts',array($this,'enqueue'));\n }", "function wp_doing_ajax()\n {\n }", "public function enqueue_dependencies () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Template')) require_once (dirname(__FILE__) . '/class_thx_template.php');\n\n\t\tif (!class_exists('Upfront_Thx_Builder_VirtualPage')) require_once (dirname(__FILE__) . '/class_thx_endpoint.php');\n\n\t\t$tpl = Thx_Template::plugin();\n\n\t\twp_enqueue_style('create_edit', $tpl->url('css/create_edit.css'));\n\n\t\twp_enqueue_script('create_edit', $tpl->url('js/create_edit.js'), array('jquery'));\n\t\twp_localize_script('create_edit', '_thx', array(\n\t\t\t'editor_base' => esc_url(Upfront_Thx_Builder_VirtualPage::get_url(\n\t\t\t\tUpfront_Thx_Builder_VirtualPage::get_initial_url()\n\t\t\t)),\n\t\t\t'action_slug' => Upfront_Thx_Builder_VirtualPage::get_initial_url(),\n\t\t\t'admin_ajax' => admin_url('admin-ajax.php'),\n\t\t\t'l10n' => array(\n\t\t\t\t'oops' => __('Oops, something went wrong with processing your request.', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'start_building' => __('Start Building', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'checking' => __('Checking...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'creating' => __('Creating...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'select_media' => __('Select or Upload Media Of Your Chosen Persuasion', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'use_media' => __('Use this media', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'loading' => __('Loading data...', UpfrontThemeExporter::DOMAIN),\n\t\t\t),\n\t\t));\n\n\t\twp_enqueue_media();\n\t}", "public function admin_enqueue()\n\t{\n\t\t// styles.\n\n\t}", "public function enqueue() {\n\t\tgutenberg_widgets_init( 'gutenberg_customizer' );\n\t}", "function escalate_network_admin_ajax_callback() { include($this->plugin_basename . '/core/admin/ajax/admin-ajax.php'); die(); }", "public function adminEnqueueScripts($hook = '') {\n\n if (isset($_GET['page']) && $_GET['page'] == 'vcht-console') {\n global $wpdb;\n\n $settings = $this->getSettings();\n\n wp_register_script($this->_token . '-flat-ui', esc_url($this->assets_url) . 'js/flat-ui-pro.min.js', array(), $this->_version);\n wp_enqueue_script($this->_token . '-flat-ui');\n wp_register_script($this->_token . '-datatable', esc_url($this->parent->assets_url) . 'js/jquery.dataTables.min.js', array(), $this->_version);\n wp_enqueue_script($this->_token . '-datatable');\n wp_register_script($this->_token . '-bootstrap-datatable', esc_url($this->assets_url) . 'js/dataTables.bootstrap.min.js', array($this->_token . '-datatable'), $this->_version);\n wp_enqueue_script($this->_token . '-bootstrap-datatable');\n wp_register_script($this->_token . '-customScrollbar', esc_url($this->assets_url) . 'js/jquery.mCustomScrollbar.concat.min.js', array('jquery'));\n wp_enqueue_script($this->_token . '-customScrollbar');\n wp_register_script($this->_token . '-dropzone', esc_url($this->assets_url) . 'js/dropzone.min.js', array('jquery'));\n wp_enqueue_script($this->_token . '-dropzone');\n wp_register_script($this->_token . '-colpick', esc_url($this->assets_url) . 'js/colpick.min.js', array('jquery'), $this->_version);\n wp_enqueue_script($this->_token . '-colpick');\n wp_register_script($this->_token . '-mousetrap', esc_url($this->assets_url) . 'js/mousetrap.min.js', 'jquery', $this->_version);\n wp_enqueue_script($this->_token . '-mousetrap');\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_register_script($this->_token . '-admin', esc_url($this->assets_url) . 'js/admin.min.js', array('jquery',\n 'jquery-ui-core',\n 'jquery-ui-mouse',\n 'jquery-ui-position',\n 'jquery-ui-droppable',\n 'jquery-ui-draggable',\n 'jquery-ui-resizable',\n 'jquery-ui-sortable',\n 'jquery-effects-core',\n 'jquery-effects-drop',\n 'jquery-effects-fade',\n 'jquery-effects-bounce',\n 'jquery-effects-slide',\n 'jquery-effects-blind'), $this->_version);\n wp_enqueue_script($this->_token . '-admin');\n\n $texts = array(\n 'Yes' => __('Yes', 'WP_Visual_Chat'),\n 'No' => __('No', 'WP_Visual_Chat'),\n 'Online' => __('Online', 'WP_Visual_Chat'),\n 'Offline' => __('Offline', 'WP_Visual_Chat'),\n 'Log in' => __('Log in', 'WP_Visual_Chat'),\n 'Log out' => __('Log out', 'WP_Visual_Chat'),\n 'Drop files to upload here' => __('Drop files to upload here', 'WP_Visual_Chat'),\n 'File is too big (max size: {{maxFilesize}}MB)' => __('File is too big (max size: {{maxFilesize}}MB)', 'WP_Visual_Chat'),\n 'Invalid file type' => __('Invalid file type', 'WP_Visual_Chat'),\n 'You can not upload any more files' => __('You can not upload any more files', 'WP_Visual_Chat'),\n 'Shows an element of the website' => __('Shows an element of the website', 'WP_Visual_Chat'),\n 'remove' => __('Remove', 'WP_Visual_Chat'),\n 'display' => __('Display', 'WP_Visual_Chat'),\n 'search' => __('Search', 'WP_Visual_Chat'),\n 'showingPage' => sprintf(__('Showing page %1$s of %2$s', 'WP_Visual_Chat'), '_PAGE_', '_PAGES_'),\n 'filteredFrom' => sprintf(__('- filtered from %1$s documents', 'WP_Visual_Chat'), '_MAX_'),\n 'noRecords' => __('No documents to display', 'WP_Visual_Chat'),\n 'Do you want to reply ?' => __('Do you want to reply ?', 'WP_Visual_Chat'),\n 'New chat request from' => __('New chat request from', 'WP_Visual_Chat'),\n 'Another operator has already answered' => __('Another operator has already answered', 'WP_Visual_Chat'),\n '[username] stopped the chat' => __('[username] stopped the chat', 'WP_Visual_Chat'),\n 'Current operator' => __('Current operator', 'WP_Visual_Chat'),\n '[username1] tranfers the chat to [username2]' => __('[username1] tranfers the chat to [username2]', 'WP_Visual_Chat'),\n );\n global $wpdb;\n $userID = 0;\n $userWP = wp_get_current_user();\n $rows = $wpdb->get_results(\"SELECT * FROM \" . $wpdb->prefix . \"vcht_users WHERE userID=\" . $userWP->ID);\n $user = array();\n if (count($rows) == 0) {\n $uploadFolderName = md5(uniqid());\n $user = array(\n 'userID' => $userWP->ID,\n 'clientID' => md5(uniqid()),\n 'username' => $userWP->display_name,\n 'email' => $userWP->user_email,\n 'uploadFolderName' => $uploadFolderName,\n 'lastActivity' => date('Y-m-d H:i:s'),\n 'isOnline' => true, 'isOperator' => true,\n 'imgAvatar' => $this->assets_url . 'img/administrator-48.png',\n 'ip' => $_SERVER['REMOTE_ADDR']);\n\n $wpdb->insert($wpdb->prefix . 'vcht_users', $user);\n $user = (object) $user;\n $userID = $wpdb->insert_id;\n } else {\n $userID = $rows[0]->id;\n }\n wp_localize_script($this->_token . '-admin', 'vcht_data', array(\n 'websiteUrl' => get_home_url(),\n 'uploadsUrl' => $this->uploads_url,\n 'assetsUrl' => $this->assets_url,\n 'operatorID' => $user->ID,\n 'trackingDelay' => $settings->trackingDelay,\n 'ajaxCheckDelay' => $settings->ajaxCheckDelay,\n 'allowFilesFromOperators' => $settings->allowFilesFromOperators,\n 'filesMaxSize' => $settings->filesMaxSize,\n 'allowedFiles' => $settings->allowedFiles,\n 'isAdmin' => current_user_can('manage_options'),\n 'enableGeolocalization' => $settings->enableGeolocalization,\n 'userID' => $userID,\n 'enableVisitorsTracking' => $settings->enableVisitorsTracking,\n 'texts' => $texts));\n }\n }", "function admin_enqueue_script(){\n\t\tglobal $postmec;\n\t\t\n\t\tif($_GET['page'] == 'stores-management'){\n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_style( 'thickbox' ); // Stylesheet used by Thickbox\n\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\twp_enqueue_script( 'media-upload' );\n\t\t\twp_register_script('store-media-upload', $postmec->get_postmec_url() . 'js/plugin.media-uploader.js', array('jquery', 'thickbox', 'media-upload'));\n\t\t\twp_enqueue_script('store-media-upload');\n\t\t\n\t\t\t//wp_register_script('media-uploader-activator', $commentbar->get_this_url() . 'js/uploader.activator.js', array('jquery'));\n\t\t\t//wp_enqueue_script('media-uploader-activator');\n\t\t}\n\t}", "function slider_backend_enqueue_script($hook) {\r\n wp_enqueue_script ('jquery-ui-sortable');\r\n wp_enqueue_script ('slideshow-admin-script', plugins_url( '_inc/admin-script.js', __FILE__ ),array(\"jquery\")); \r\n\r\n wp_localize_script( 'slideshow-admin-script', 'admin_ajax_object',\r\n array( \r\n 'ajaxurl' => admin_url( 'admin-ajax.php' )\r\n )\r\n );\r\n}", "function enqueue(){\n wp_enqueue_style('login_css_bootstrap-grid', $this->plugin_url . 'assets/login-bootstrap-grid.css');\n wp_enqueue_style('login_css_bootstrap-reboot', $this->plugin_url . 'assets/login-bootstrap-reboot.css');\n wp_enqueue_style('login_css_style', $this->plugin_url . 'assets/login-style.css');\n wp_enqueue_style('register_css_style', $this->plugin_url . 'assets/register-style.css');\n\n //Enqueuing Scripts\n wp_enqueue_script('login-script', $this->plugin_url . 'assets/login-script.js');\n wp_localize_script( 'login-script', 'login_ajax',\n array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));\n\n wp_enqueue_script('register_js_script', $this->plugin_url . 'assets/register-script.js');\n wp_localize_script('register_js_script', 'register_object',\n array('ajaxurl' => admin_url('admin-ajax.php')));\n\n }", "public function admin_enqueue()\r\n {\r\n if (isset($_GET['page']) && $_GET['page'] === 'notifications') {\r\n wp_localize_script('giga-messenger-bots', 'messages', $this->messages);\r\n wp_localize_script('giga-messenger-bots', 'answers', $this->message->content);\r\n }\r\n }", "public function admin_ajax() {\n\n\t\t// Check Nonce\n\t\tif ( ! isset( $_REQUEST['nonce'] ) || ! isset( $_REQUEST['reqID'] ) ) {\n\t\t\tdie(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t'msg' => __( 'Security Error!', 'publisher' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$_nonce = wp_verify_nonce( $_REQUEST['nonce'], 'bf_nonce' );\n\n\t\t// Check Nonce\n\t\tif ( $_nonce === false ) {\n\t\t\tdie(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t'msg' => __( 'Security Error!', 'publisher' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\ttry {\n\n\t\t\tswitch ( $_REQUEST['reqID'] ) {\n\n\t\t\t\t// Option Panel, Save Settings\n\t\t\t\tcase( 'save_admin_panel_options' ):\n\n\t\t\t\t\t$options = bf_parse_str( ltrim( rtrim( stripslashes( $_REQUEST['data'] ), '&' ), '&' ) );\n\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'id' => $_REQUEST['panelID'],\n\t\t\t\t\t\t'lang' => $_REQUEST['lang'],\n\t\t\t\t\t\t'data' => $options\n\t\t\t\t\t);\n\n\t\t\t\t\tdo_action( 'better-framework/panel/save', $data );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Ajax Image Uploader\n\t\t\t\tcase( 'image_upload' ):\n\t\t\t\t\t$data = $_FILES[ $_REQUEST['file_id'] ];\n\t\t\t\t\tdo_action( 'better-framework/panel/image-upload', $data, $_REQUEST['file_id'] );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Add Custom Icon\n\t\t\t\tcase( 'add_custom_icon' ):\n\t\t\t\t\tdo_action( 'better-framework/icons/add-custom-icon', $_REQUEST['icon'] );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Remove Custom Icon\n\t\t\t\tcase( 'remove_custom_icon' ):\n\t\t\t\t\tdo_action( 'better-framework/icons/remove-custom-icon', $_REQUEST['icon'] );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Option Panel, Reset Settings\n\t\t\t\tcase( 'reset_options_panel' ):\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Fires for handling panel reset\n\t\t\t\t\t *\n\t\t\t\t\t * @param string $args reset panel data\n\t\t\t\t\t *\n\t\t\t\t\t * @since 1.0.0\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tdo_action( 'better-framework/panel/reset', array(\n\t\t\t\t\t\t'id' => $_REQUEST['panelID'],\n\t\t\t\t\t\t'lang' => $_REQUEST['lang'],\n\t\t\t\t\t\t'options' => $_REQUEST['to_reset']\n\t\t\t\t\t) );\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Option Panel, Ajax Action\n\t\t\t\tcase( 'ajax_action' ):\n\n\t\t\t\t\t$callback = isset( $_REQUEST['callback'] ) ? $_REQUEST['callback'] : '';\n\n\t\t\t\t\t$args = isset( $_REQUEST['args'] ) ? $_REQUEST['args'] : '';\n\n\t\t\t\t\t$error_message = isset( $_REQUEST['error-message'] ) ? $_REQUEST['error-message'] : __( 'An error occurred while doing action.', 'publisher' );\n\n\t\t\t\t\t//Security issue fix\n\t\t\t\t\tif ( empty( $_REQUEST['bf_call_token'] ) || self::callback_token( $callback ) !== $_REQUEST['bf_call_token'] ) {\n\n\t\t\t\t\t\techo json_encode(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t\t\t'msg' => __( 'the security token is not valid!', 'publisher' )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! empty( $callback ) && is_callable( $callback ) ) {\n\n\t\t\t\t\t\tif ( is_array( $args ) ) {\n\n\t\t\t\t\t\t\t$to_return = call_user_func_array( $callback, $args );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$to_return = call_user_func( $callback, $args );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( is_array( $to_return ) ) {\n\t\t\t\t\t\t\techo json_encode( $to_return );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo json_encode(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t\t\t\t'msg' => $error_message\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} else {\n\t\t\t\t\t\techo json_encode(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t\t\t'msg' => $error_message\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\tbreak;\n\n\t\t\t\t// Option Panel, Ajax Field\n\t\t\t\tcase( 'ajax_field' ):\n\n\t\t\t\t\tif ( isset( $_REQUEST['callback'] ) && is_callable( $_REQUEST['callback'] ) ) {\n\n\t\t\t\t\t\t$cb = $_REQUEST['callback'];\n\n\t\t\t\t\t\t$cb_args = array(\n\t\t\t\t\t\t\t! empty( $_REQUEST['key'] ) ? $_REQUEST['key'] : '',\n\t\t\t\t\t\t\t! empty( $_REQUEST['exclude'] ) ? $_REQUEST['exclude'] : ''\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$to_return = call_user_func_array( $cb, $cb_args );\n\n\t\t\t\t\t\tif ( is_array( $to_return ) ) {\n\t\t\t\t\t\t\techo count( $to_return ) === 0 ? - 1 : json_encode( $to_return );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Option Panel, Import Settings\n\t\t\t\tcase( 'import' ):\n\n\t\t\t\t\t$data = $_FILES['bf-import-file-input'];\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Fires for handling panel import\n\t\t\t\t\t *\n\t\t\t\t\t * @param string $data contain import file data\n\t\t\t\t\t * @param string $args contain import arguments\n\t\t\t\t\t *\n\t\t\t\t\t * @since 1.1.0\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tdo_action( 'better-framework/panel/import', $data, $_REQUEST );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'fetch-deferred-field':\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! empty( $_REQUEST['sectionID'] ) &&\n\t\t\t\t\t\t! empty( $_REQUEST['panelID'] ) &&\n\t\t\t\t\t\tis_string( $_REQUEST['sectionID'] )\n\t\t\t\t\t) { // panel field\n\n\t\t\t\t\t\tdo_action( 'better-framework/panel/ajax-panel-field', $_REQUEST['panelID'], $_REQUEST['sectionID'] );\n\t\t\t\t\t} elseif ( ! empty( $_REQUEST['sectionID'] ) &&\n\t\t\t\t\t ! empty( $_REQUEST['metabox'] ) &&\n\t\t\t\t\t ! empty( $_REQUEST['metabox_id'] ) &&\n\t\t\t\t\t is_string( $_REQUEST['sectionID'] )\n\t\t\t\t\t) { // metabox field\n\n\t\t\t\t\t\t$type = isset( $_REQUEST['type'] ) ? $_REQUEST['type'] : '';\n\t\t\t\t\t\t$object_id = isset( $_REQUEST['object_id'] ) ? $_REQUEST['object_id'] : '';\n\n\n\t\t\t\t\t\tif ( $type === 'taxonomy' ) {\n\n\t\t\t\t\t\t\t$hook = 'better-framework/taxonomy/metabox/ajax-tab';\n\n\t\t\t\t\t\t} elseif ( $type === 'users' ) {\n\n\t\t\t\t\t\t\t$hook = 'better-framework/user-metabox/ajax-tab';\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t$hook = 'better-framework/metabox/ajax-tab';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdo_action( $hook, $_REQUEST['sectionID'], $_REQUEST['metabox_id'], $object_id );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'fetch-mce-view-fields':\n\n\t\t\t\t\tif ( ! empty( $_REQUEST['shortcode'] ) ) {\n\n\t\t\t\t\t\tdo_action( 'better-framework/shortcodes/tinymce-fields', wp_unslash( $_REQUEST['shortcode'] ), $_REQUEST );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'fetch-mce-view-shortcode':\n\n\t\t\t\t\tif ( ! empty( $_REQUEST['shortcodes'] ) ) {\n\t\t\t\t\t\tdo_action( 'better-framework/shortcodes/tinymce-view-shortcode', wp_unslash( $_REQUEST['shortcodes'] ), $_REQUEST );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'term_select_items':\n\n\n\t\t\t\t\tif ( ! empty( $_REQUEST['data'] ) ) {\n\n\t\t\t\t\t\tdo_action( 'better-framework/fields/term-select-items', $_REQUEST['data'] );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'field_template':\n\n\t\t\t\t\t/**\n\t\t\t\t\t * @var BF_Assets_Manager\n\t\t\t\t\t */\n\t\t\t\t\tif ( ! empty( $_REQUEST['field'] ) ) {\n\n\t\t\t\t\t\t$template = apply_filters( 'better-framework/fields/ajax-load-template', '', $_REQUEST['field'] );\n\n\t\t\t\t\t\twp_send_json_success( $template );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\n\t\t\t$result = array(\n\t\t\t\t'error_message' => $e->getMessage(),\n\t\t\t\t'error_code' => $e->getCode(),\n\t\t\t\t'is_error' => true,\n\t\t\t);\n\n\t\t\techo json_encode( compact( 'result' ) );\n\t\t}\n\n\t\tdie;\n\t}", "public function enqueue () {\n\t\t \n\t\t \n\t\t $min = Redux_Functions::isMin();\n\t\t \n\t\t \twp_enqueue_script(\n 'redux-field-media-js',\n ReduxFramework::$_url . 'inc/fields/media/field_media' . $min . '.js',\n array( 'jquery', 'redux-js' ),\n time(),\n true\n );\n\n wp_enqueue_style (\n 'redux-field-media-css', \n ReduxFramework::$_url . 'inc/fields/media/field_media.css', \n time (), \n true\n );\n\n wp_enqueue_script (\n 'redux-field-super-search-js', \n $this->extension_url . 'field_super_search.js', \n array( 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker', 'redux-field-media-js' ), \n time (), \n true\n );\n\t\t\t\n wp_enqueue_style (\n 'redux-field-super-search-css', \n $this->extension_url . 'field_super_search.css', \n time (), \n true\n );\n }", "public function register_enqueuing() {\n\t\tadd_action( 'admin_print_scripts-nav-menus.php', array( &$this, 'enqueue_scripts' ) );\n\t}", "public function enqueue_files ()\n\t{\n\t\t// Flowdrive\n\t\twp_register_style( 'flowdrive_admin_css', plugin_dir_url( __DIR__ ) . 'assets/css/flowdrive-admin.css', false, $this->version );\n\t\twp_enqueue_style( 'flowdrive_admin_css' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __FILE__ ) . 'js/cloudoki-smmp-admin.js', array( 'jquery' ), $this->version, false );\n\t\t\n\t\t// Chosen\n\t\twp_register_style( 'chosen_admin_css', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/css/chosen.min.css', false, $this->version );\n\t\twp_enqueue_style( 'chosen_admin_css' );\n\t\t\n\t\twp_register_script( 'chosen_admin_js', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', ['jquery'], $this->version );\n\t\twp_enqueue_script( 'chosen_admin_js' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', array( 'jquery' ), $this->version, false );\n\t}", "function qpi_load() {\n\tadd_action( 'wp_ajax_qpi-install-plugin', 'qpi_install_plugin' );\n\tadd_action( 'wp_ajax_qpi-activate', 'qpi_activate_plugin' );\n\n\tadd_action( 'admin_enqueue_scripts', 'qpi_admin_enqueue_scripts' );\n}", "function fielding_enqueue_admin_resources($hook) {\n\t// Styles\n\twp_enqueue_style( 'fielding-admin', get_template_directory_uri() . '/css/admin.css', FIELDING_VERSION, 'all' );\n\n\t// Scripts - Head\n\twp_enqueue_script( 'fielding-admin', get_template_directory_uri() . '/js/admin.js', array( 'jquery' ), FIELDING_VERSION, false );\n}", "function enqueue_backend_resources()\n {\n $this->set_screen();\n if (C_NextGen_Admin_Page_Manager::is_requested()) {\n M_NextGen_Admin::enqueue_common_admin_static_resources();\n }\n wp_enqueue_script('jquery');\n $this->object->enqueue_jquery_ui_theme();\n wp_enqueue_script('photocrati_ajax');\n wp_enqueue_script('jquery-ui-accordion');\n wp_enqueue_style('imagely-admin-font', 'https://fonts.googleapis.com/css?family=Lato:300,400,700,900', array(), NGG_SCRIPT_VERSION);\n if (method_exists('M_Gallery_Display', 'enqueue_fontawesome')) {\n M_Gallery_Display::enqueue_fontawesome();\n }\n // Ensure select2\n wp_enqueue_style('ngg_select2');\n wp_enqueue_script('ngg_select2');\n }", "function admin_enqueues( $hook_suffix ) {\r\n\t\tif ( 'tools_page_regenthumbs-stamina' != $hook_suffix )\r\n\t\t\treturn;\r\n\r\n\t\twp_enqueue_script( 'jquery-ui-custom', plugins_url( 'jquery-ui-js/jquery-ui-1.8.5.custom.min.js', __FILE__ ), array('jquery'), '1.8.5' );\r\n\t\twp_enqueue_style( 'jquery-ui-regenthumbs', plugins_url( 'jquery-ui-css/start/jquery-ui-1.8.5.custom.css', __FILE__ ), array(), '1.8.5' );\r\n\t}", "function script_enqueuer() {\n wp_register_script( \"vote_display\", plugin_dir_url(__FILE__).'vote_display.js', array('jquery') );\n\n // localize the script to your domain name, so that you can reference the url to admin-ajax.php file easily\n wp_localize_script( 'vote_display', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));\n\n // enqueue jQuery library and the script you registered above\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'vote_display' );\n}", "function script_enqueuer() {\n wp_register_script( \"generator\", WP_PLUGIN_URL.'/ninja_name_generator/generator.js', array('jquery') );\n wp_localize_script( 'generator', 'name_generator', array( \n \t\t'restURL' => rest_url(),\n \t\t'restNonce' => wp_create_nonce(\"wp_rest\")\n \t));\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'generator' );\n\n}", "function enqueue_scripts() {\n\t\twp_enqueue_script( 'post-quick-editor', plugins_url('./dist/post-quick-editor-bundle.js', __FILE__), array(), 'v0.0.1', true );\n\t\twp_localize_script('post-quick-editor', 'wpApiSettings', array(\n\t\t\t'root' => esc_url_raw(rest_url()),\n\t\t\t'nonce' => wp_create_nonce( 'wp_rest' ),\n\t\t));\n\t}", "public function enqueue_admin_assets() {\n\t\tadd_action( 'admin_enqueue_scripts', [ $this, 'enqueue_scripts' ] );\n\t\tadd_action( 'admin_enqueue_scripts', [ $this, 'localize_script' ] );\n\t\tadd_action( 'admin_enqueue_scripts', [ $this, 'enqueue_styles' ] );\n\t}", "function level_ajax_enqueue() {\n\twp_enqueue_script(\n\t\t'level-ajax-script', get_template_directory_uri() . '/js/feedback_level.js',array('jquery'));\n\n// The wp_localize_script allows us to output the ajax_url path for our script to use.\n\twp_localize_script('level-ajax-script','level_ajax_obj',array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ));\n}", "function add_ajax_file(){\n\twp_enqueue_script('eg-portfolio',plugins_url('/js/ajax.js',__FILE__),array('jquery'),'1.1.0', true);\n\twp_localize_script('eg-portfolio','my_ajax_url',array(\n\t\t'ajax_url' => admin_url('admin-ajax.php',__FILE__)\n\t));\n}", "function the_champ_admin_sharing_scripts(){\r\n\t?>\r\n\t<script type=\"text/javascript\"> var theChampSharingAjaxUrl = '<?php echo get_admin_url() ?>admin-ajax.php';</script>\r\n\t<?php\r\n\twp_enqueue_script('the_champ_sharing', plugins_url('js/admin/sharing/admin.js', __FILE__), array('jquery', 'jquery-ui-sortable'), THE_CHAMP_SS_VERSION);\r\n}", "function saleforce_scripts_plug() {\n if (is_admin()) {\n wp_register_script('backcallscc', plugins_url('js/cussaleforce.js', __FILE__), array('jquery'));\n \n wp_enqueue_script('backcallscc');\n \n $file_for_jav = admin_url('admin-ajax.php');\n $tran_arr = array('jaxfile' => $file_for_jav);\n wp_localize_script('backcallscc', 'fromphp', $tran_arr);\n }\n}", "private function admin_init() {\n\n\t\tadd_action('admin_init', array($this, 'maybe_download_backup_from_email'));\n\n\t\tadd_action('core_upgrade_preamble', array($this, 'core_upgrade_preamble'));\n\t\tadd_action('admin_action_upgrade-plugin', array($this, 'admin_action_upgrade_pluginortheme'));\n\t\tadd_action('admin_action_upgrade-theme', array($this, 'admin_action_upgrade_pluginortheme'));\n\n\t\tadd_action('admin_head', array($this, 'admin_head'));\n\t\tadd_filter((is_multisite() ? 'network_admin_' : '').'plugin_action_links', array($this, 'plugin_action_links'), 10, 2);\n\t\tadd_action('wp_ajax_updraft_download_backup', array($this, 'updraft_download_backup'));\n\t\tadd_action('wp_ajax_updraft_ajax', array($this, 'updraft_ajax_handler'));\n\t\tadd_action('wp_ajax_updraft_ajaxrestore', array($this, 'updraft_ajaxrestore'));\n\t\tadd_action('wp_ajax_nopriv_updraft_ajaxrestore', array($this, 'updraft_ajaxrestore'));\n\t\tadd_action('wp_ajax_updraft_ajaxrestore_continue', array($this, 'updraft_ajaxrestore'));\n\t\tadd_action('wp_ajax_nopriv_updraft_ajaxrestore_continue', array($this, 'updraft_ajaxrestore'));\n\t\t\n\t\tadd_action('wp_ajax_plupload_action', array($this, 'plupload_action'));\n\t\tadd_action('wp_ajax_plupload_action2', array($this, 'plupload_action2'));\n\n\t\tadd_action('wp_before_admin_bar_render', array($this, 'wp_before_admin_bar_render'));\n\n\t\t// Add a new Ajax action for saving settings\n\t\tadd_action('wp_ajax_updraft_savesettings', array($this, 'updraft_ajax_savesettings'));\n\t\t\n\t\t// Ajax for settings import and export\n\t\tadd_action('wp_ajax_updraft_importsettings', array($this, 'updraft_ajax_importsettings'));\n\n\t\tadd_filter('heartbeat_received', array($this, 'process_status_in_heartbeat'), 10, 2);\n\n\t\t// UpdraftPlus templates\n\t\t$this->register_template_directories();\n\t\t\n\t\tglobal $updraftplus, $pagenow;\n\t\tadd_filter('updraftplus_dirlist_others', array($updraftplus, 'backup_others_dirlist'));\n\t\tadd_filter('updraftplus_dirlist_uploads', array($updraftplus, 'backup_uploads_dirlist'));\n\n\t\t// First, the checks that are on all (admin) pages:\n\n\t\t$service = UpdraftPlus_Options::get_updraft_option('updraft_service');\n\n\t\tif (UpdraftPlus_Options::user_can_manage()) {\n\n\t\t\t$this->print_restore_in_progress_box_if_needed();\n\n\t\t\t// Main dashboard page advert\n\t\t\t// Since our nonce is printed, make sure they have sufficient credentials\n\t\t\tif ('index.php' == $pagenow && current_user_can('update_plugins') && (!file_exists(UPDRAFTPLUS_DIR.'/udaddons') || (defined('UPDRAFTPLUS_FORCE_DASHNOTICE') && UPDRAFTPLUS_FORCE_DASHNOTICE))) {\n\n\t\t\t\t$dismissed_until = UpdraftPlus_Options::get_updraft_option('updraftplus_dismisseddashnotice', 0);\n\t\t\t\t\n\t\t\t\t$backup_dir = $updraftplus->backups_dir_location();\n\t\t\t\t// N.B. Not an exact proxy for the installed time; they may have tweaked the expert option to move the directory\n\t\t\t\t$installed = @filemtime($backup_dir.'/index.html');// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged\n\t\t\t\t$installed_for = time() - $installed;\n\n\t\t\t\tif (($installed && time() > $dismissed_until && $installed_for > 28*86400 && !defined('UPDRAFTPLUS_NOADS_B')) || (defined('UPDRAFTPLUS_FORCE_DASHNOTICE') && UPDRAFTPLUS_FORCE_DASHNOTICE)) {\n\t\t\t\t\tadd_action('all_admin_notices', array($this, 'show_admin_notice_upgradead'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Moved out for use with Ajax saving\n\t\t\t$this->setup_all_admin_notices_global($service);\n\t\t}\n\t\t\n\t\tif (!class_exists('Updraft_Dashboard_News')) include_once(UPDRAFTPLUS_DIR.'/includes/class-updraft-dashboard-news.php');\n\n\t\t$news_translations = array(\n\t\t\t'product_title' => 'UpdraftPlus',\n\t\t\t'item_prefix' => __('UpdraftPlus', 'updraftplus'),\n\t\t\t'item_description' => __('UpdraftPlus News', 'updraftplus'),\n\t\t\t'dismiss_tooltip' => __('Dismiss all UpdraftPlus news', 'updraftplus'),\n\t\t\t'dismiss_confirm' => __('Are you sure you want to dismiss all UpdraftPlus news forever?', 'updraftplus'),\n\t\t);\n\t\t\n\t\tadd_filter('woocommerce_in_plugin_update_message', array($this, 'woocommerce_in_plugin_update_message'));\n\t\t\n\t\tnew Updraft_Dashboard_News('https://feeds.feedburner.com/updraftplus/', 'https://updraftplus.com/news/', $news_translations);\n\n\t\t// New-install admin tour\n\t\tif ((!defined('UPDRAFTPLUS_ENABLE_TOUR') || UPDRAFTPLUS_ENABLE_TOUR) && (!defined('UPDRAFTPLUS_THIS_IS_CLONE') || !UPDRAFTPLUS_THIS_IS_CLONE)) {\n\t\t\tinclude_once(UPDRAFTPLUS_DIR.'/includes/updraftplus-tour.php');\n\t\t}\n\n\t\tif ('index.php' == $GLOBALS['pagenow'] && UpdraftPlus_Options::user_can_manage()) {\n\t\t\tadd_action('admin_print_footer_scripts', array($this, 'admin_index_print_footer_scripts'));\n\t\t}\n\t\t\n\t\t// Next, the actions that only come on the UpdraftPlus page\n\t\tif (UpdraftPlus_Options::admin_page() != $pagenow || empty($_REQUEST['page']) || 'updraftplus' != $_REQUEST['page']) return;\n\t\t$this->setup_all_admin_notices_udonly($service);\n\n\t\tglobal $updraftplus_checkout_embed;\n\t\tif (!class_exists('Updraft_Checkout_Embed')) include_once UPDRAFTPLUS_DIR.'/includes/checkout-embed/class-udp-checkout-embed.php';\n\n\t\t// Create an empty list (usefull for testing, thanks to the filter bellow)\n\t\t$checkout_embed_products = array();\n\n\t\t// get products from JSON file.\n\t\t$checkout_embed_product_file = UPDRAFTPLUS_DIR.'/includes/checkout-embed/products.json';\n\t\tif (file_exists($checkout_embed_product_file)) {\n\t\t\t$checkout_embed_products = json_decode(file_get_contents($checkout_embed_product_file));\n\t\t}\n\n\t\t$checkout_embed_products = apply_filters('updraftplus_checkout_embed_products', $checkout_embed_products);\n\n\t\tif (!empty($checkout_embed_products)) {\n\t\t\t$updraftplus_checkout_embed = new Updraft_Checkout_Embed(\n\t\t\t\t'updraftplus', // plugin name\n\t\t\t\tUpdraftPlus_Options::admin_page_url().'?page=updraftplus', \t// return url\n\t\t\t\t$checkout_embed_products, // products list\n\t\t\t\tUPDRAFTPLUS_URL.'/includes' // base_url\n\t\t\t);\n\t\t}\n\n\t\tadd_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'), 99999);\n\n\t\t$udp_saved_version = UpdraftPlus_Options::get_updraft_option('updraftplus_version');\n\t\tif (!$udp_saved_version || $udp_saved_version != $updraftplus->version) {\n\t\t\tif (!$udp_saved_version) {\n\t\t\t\t// udp was newly installed, or upgraded from an older version\n\t\t\t\tdo_action('updraftplus_newly_installed', $updraftplus->version);\n\t\t\t} else {\n\t\t\t\t// udp was updated or downgraded\n\t\t\t\tdo_action('updraftplus_version_changed', UpdraftPlus_Options::get_updraft_option('updraftplus_version'), $updraftplus->version);\n\t\t\t}\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraftplus_version', $updraftplus->version);\n\t\t}\n\n\t\tif (isset($_POST['action']) && 'updraft_wipesettings' == $_POST['action'] && isset($_POST['nonce']) && UpdraftPlus_Options::user_can_manage()) {\n\t\t\tif (wp_verify_nonce($_POST['nonce'], 'updraftplus-wipe-setting-nonce')) $this->wipe_settings();\n\t\t}\n\t}", "function enqueue() {\n wp_enqueue_style('frankluongo-plugin', plugins_url('/assets/frankluongo-plugin.css', __FILE__));\n wp_enqueue_script('frankluongo-plugin', plugins_url('/assets/frankluongo-plugin.js', __FILE__));\n }", "function wp_ajax_update_plugin()\n {\n }", "function wp_ajax_install_theme()\n {\n }", "public function enqueue() {\n\t\tglobal $post;\n\t\t\n\t\tif( is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'vfr_dress_library') ) {\n //Dashboard JS\n wp_enqueue_script(\n 'dress-library/js',\n plugins_url( 'assets/js/dress-library.js', dirname( __FILE__ ) ),\n null,\n filemtime( plugin_dir_path( dirname( __FILE__ ) ) . 'assets/js/dress-library.js' ),\n TRUE\n );\n\n // LOCALIZE\n wp_localize_script( 'dress-library/js', 'VIRTUAL_FITTING_ROOM', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'nonce' => wp_create_nonce( 'virtual_fitting_room' )\n )\n );\n\n }\n\n if( is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'vfr_profile') ) {\n\n\t\t\t//Dashboard JS\n wp_enqueue_script(\n 'profile/js',\n plugins_url( 'assets/js/profile.js', dirname( __FILE__ ) ),\n null,\n filemtime( plugin_dir_path( dirname( __FILE__ ) ) . 'assets/js/profile.js' ),\n TRUE\n );\n\n // LOCALIZE\n wp_localize_script( 'profile/js', 'PROFILE', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'nonce' => wp_create_nonce( 'virtual_fitting_room' ),\n 'dress_images_dir' => plugin_dir_url( dirname( __FILE__ ) ) . 'assets/img/',\n 'uploads_dir' => wp_upload_dir()['baseurl']\n )\n );\n\t\t}\n\n\t}", "public function init_ajax() {\r\n\t\t$this->add_action( 'mainwp-child_clone_backupcreate', array( &$this, 'clone_backup_create' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupcreatepoll', array( &$this, 'clone_backup_create_poll' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupdownload', array( &$this, 'clone_backup_download' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupdownloadpoll', array( &$this, 'clone_backup_download_poll' ) );\r\n\t\t$this->add_action( 'mainwp-child_clone_backupextract', array( &$this, 'clone_backup_extract' ) );\r\n\t}", "function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}", "public function ajax_backend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "function admin_enqueue() {\r\n \r\n\r\n wp_enqueue_style( 'custom_wp_admin_css', plugins_url('css/dokan_admin_style.css', __FILE__) );\r\n\t wp_enqueue_script( 'my_custom_script', plugins_url('js/admin_shipping.js', __FILE__));\r\n\t \r\n}", "static public function enqueue_late() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_script(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.js',\r\n\t\t\t\tarray( 'jquery' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Allow other plugins to enqueue css/js after shared-ui to\r\n\t\t\t * overwrite certain definitions.\r\n\t\t\t */\r\n\t\t\tdo_action( 'wpmudev_plugin_ui_enqueued' );\r\n\t\t}", "function wp_ajax_trash_post($action)\n {\n }", "public function input_admin_enqueue_scripts()\n {\n\n $url = $this->settings['url'];\n\t\t\t$version = $this->settings['version'];\n\n\t\t\twp_register_script( 'acf-twitterposts-js', plugins_url( '../assets/js/twitterposts.js', __FILE__ ), array('acf-input'), $version );\n\t\t\twp_register_style( 'acf-input-twitterposts', plugins_url( '../assets/css/input.css', __FILE__ ), array( 'acf-input' ), $version );\n\n\t\t\t//for ajax calling named 'gettweet'\n\t\t\twp_localize_script( 'acf-twitterposts-js', 'gettweet', array(\n\t\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' )\n\t\t\t));\n\n\t\t\twp_enqueue_script(array('acf-twitterposts-js'));\n\t\t\twp_enqueue_style(array('acf-input-twitterposts'));\n\n }", "public function enqueue() {\n\n\t\t\t// Function for demo content setup\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-thememount-resetlike-js',\n\t\t\t\tget_template_directory_uri() . '/inc/redux-framework/redux_custom_fields/digitallaw_resetlike/field_digitallaw_resetlike.js',\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\ttime(),\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-thememount-resetlike-css',\n\t\t\t\tget_template_directory_uri() . '/inc/redux-framework/redux_custom_fields/digitallaw_resetlike/field_digitallaw_resetlike.css',\n\t\t\t\ttime(),\n\t\t\t\ttrue\n\t\t\t);\n\t\t\t\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-switch-js',\n\t\t\t\tReduxCore::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js',\n\t\t\t\tarray( 'jquery', 'redux-js' ),\n\t\t\t\t$this->timestamp,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tif ( $this->parent->args['dev_mode'] ) {\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'redux-field-switch-css',\n\t\t\t\t\tReduxCore::$_url . 'inc/fields/switch/field_switch.css',\n\t\t\t\t\tarray(),\n\t\t\t\t\t$this->timestamp,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "function waraPay_admin_init()\n {\n wp_register_script('waraPay_admin_js', WARAPAY_URL . '/javascripts/admin.js', array('jquery'));\n wp_register_style('waraPay_settings_css', WARAPAY_URL . '/styles/settings.css?v=2');\n }", "public function enqueue_admin_scripts()\n {\n }", "public function enqueue_admin_scripts()\n {\n }", "public function enqueue_admin_scripts()\n {\n }", "public function enqueue_admin_scripts()\n {\n }", "public function enqueue_admin_scripts()\n {\n }", "public function enqueue_admin_scripts()\n {\n }", "public function enqueue_admin_scripts()\n {\n }", "public function admin_head() {\n\n\t\tglobal $pagenow;\n\n\t\tif (UpdraftPlus_Options::admin_page() != $pagenow || !isset($_REQUEST['page']) || 'updraftplus' != $_REQUEST['page'] || !UpdraftPlus_Options::user_can_manage()) return;\n\n\t\t$chunk_size = min(wp_max_upload_size()-1024, 1048576*2);\n\n\t\t// The multiple_queues argument is ignored in plupload 2.x (WP3.9+) - http://make.wordpress.org/core/2014/04/11/plupload-2-x-in-wordpress-3-9/\n\t\t// max_file_size is also in filters as of plupload 2.x, but in its default position is still supported for backwards-compatibility. Likewise, our use of filters.extensions below is supported by a backwards-compatibility option (the current way is filters.mime-types.extensions\n\n\t\t$plupload_init = array(\n\t\t\t'runtimes' => 'html5,flash,silverlight,html4',\n\t\t\t'browse_button' => 'plupload-browse-button',\n\t\t\t'container' => 'plupload-upload-ui',\n\t\t\t'drop_element' => 'drag-drop-area',\n\t\t\t'file_data_name' => 'async-upload',\n\t\t\t'multiple_queues' => true,\n\t\t\t'max_file_size' => '100Gb',\n\t\t\t'chunk_size' => $chunk_size.'b',\n\t\t\t'url' => admin_url('admin-ajax.php', 'relative'),\n\t\t\t'multipart' => true,\n\t\t\t'multi_selection' => true,\n\t\t\t'urlstream_upload' => true,\n\t\t\t// additional post data to send to our ajax hook\n\t\t\t'multipart_params' => array(\n\t\t\t\t'_ajax_nonce' => wp_create_nonce('updraft-uploader'),\n\t\t\t\t'action' => 'plupload_action'\n\t\t\t)\n\t\t);\n\n\t\t// WP 3.9 updated to plupload 2.0 - https://core.trac.wordpress.org/ticket/25663\n\t\tif (is_file(ABSPATH.WPINC.'/js/plupload/Moxie.swf')) {\n\t\t\t$plupload_init['flash_swf_url'] = includes_url('js/plupload/Moxie.swf');\n\t\t} else {\n\t\t\t$plupload_init['flash_swf_url'] = includes_url('js/plupload/plupload.flash.swf');\n\t\t}\n\n\t\tif (is_file(ABSPATH.WPINC.'/js/plupload/Moxie.xap')) {\n\t\t\t$plupload_init['silverlight_xap_url'] = includes_url('js/plupload/Moxie.xap');\n\t\t} else {\n\t\t\t$plupload_init['silverlight_xap_url'] = includes_url('js/plupload/plupload.silverlight.swf');\n\t\t}\n\n\t\t?><script>\n\t\t\tvar updraft_credentialtest_nonce = '<?php echo wp_create_nonce('updraftplus-credentialtest-nonce');?>';\n\t\t\tvar updraftplus_settings_nonce = '<?php echo wp_create_nonce('updraftplus-settings-nonce');?>';\n\t\t\tvar updraft_siteurl = '<?php echo esc_js(site_url('', 'relative'));?>';\n\t\t\tvar updraft_plupload_config = <?php echo json_encode($plupload_init); ?>;\n\t\t\tvar updraft_download_nonce = '<?php echo wp_create_nonce('updraftplus_download');?>';\n\t\t\tvar updraft_accept_archivename = <?php echo apply_filters('updraftplus_accept_archivename_js', \"[]\");?>;\n\t\t\t<?php\n\t\t\t$plupload_init['browse_button'] = 'plupload-browse-button2';\n\t\t\t$plupload_init['container'] = 'plupload-upload-ui2';\n\t\t\t$plupload_init['drop_element'] = 'drag-drop-area2';\n\t\t\t$plupload_init['multipart_params']['action'] = 'plupload_action2';\n\t\t\t$plupload_init['filters'] = array(array('title' => __('Allowed Files'), 'extensions' => 'crypt'));\n\t\t\t?>\n\t\t\tvar updraft_plupload_config2 = <?php echo json_encode($plupload_init); ?>;\n\t\t\tvar updraft_downloader_nonce = '<?php wp_create_nonce(\"updraftplus_download\"); ?>'\n\t\t\t<?php\n\t\t\t\t$overdue = $this->howmany_overdue_crons();\n\t\t\t\tif ($overdue >= 4) {\n\t\t\t\t\t?>\n\t\t\t\t\tjQuery(function() {\n\t\t\t\t\t\tsetTimeout(function(){ updraft_check_overduecrons(); }, 11000);\n\t\t\t\t\t});\n\t\t\t\t<?php } ?>\n\t\t</script>\n\t\t<?php\n\t}", "public function enqueue_scripts () {\n wp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/script.js', array( 'jquery' ), $this->_version );\n // Localize the script with new data\n\n $url = admin_url('admin-ajax.php');\n wp_localize_script( $this->_token . '-frontend', 'ajax_url', $url );\n wp_enqueue_script( $this->_token . '-frontend' );\n }", "function ghactivity_enqueue_admin_scripts( $hook ) {\n\n\tglobal $ghactivity_settings_page;\n\n\t// Only add our script to our admin page.\n\tif ( $ghactivity_settings_page !== $hook ) {\n\t\treturn;\n\t}\n\n\twp_register_script( 'ghactivity-settings', plugins_url( 'js/admin-settings.js' , __FILE__ ), array( 'jquery' ), GHACTIVITY__VERSION );\n\t$ghactivity_settings = array(\n\t\t'api_url' => esc_url_raw( rest_url() ),\n\t\t'api_nonce' => wp_create_nonce( 'wp_rest' ),\n\t\t'progress_message' => esc_html__( 'In Progress', 'ghactivity' ),\n\t);\n\twp_localize_script( 'ghactivity-settings', 'ghactivity_settings', $ghactivity_settings );\n\n\twp_enqueue_script( 'ghactivity-settings' );\n}", "public function addAdminAssets() {\n\t\twp_enqueue_script( 'csframework-admin-upload' );\n\t}", "function wp_ajax_add_user($action)\n {\n }", "function on_admin_enqueue_scripts ()\n{\n wp_register_style (\n 'cap-collation-admin',\n plugins_url ('css/admin.css', __FILE__),\n array ('cap-jquery-ui-css')\n );\n wp_enqueue_style ('cap-collation-admin');\n\n wp_register_script (\n 'cap-collation-admin',\n plugins_url ('js/admin.js', __FILE__),\n array ('cap-jquery', 'cap-jquery-ui')\n );\n wp_enqueue_script ('cap-collation-admin');\n\n wp_localize_script (\n 'cap-collation-admin',\n 'ajax_object',\n array (\n 'ajax_nonce' => wp_create_nonce (NONCE_SPECIAL_STRING),\n 'ajax_nonce_param_name' => NONCE_PARAM_NAME,\n )\n );\n}", "function squarecandy_acf_events_admin_enqueue() {\n\twp_enqueue_style( 'squarecandy-acf-events-admin-css', ACF_EVENTS_URL . 'dist/css/admin.min.css', false, ACF_EVENTS_VERSION );\n\twp_enqueue_script( 'squarecandy-acf-events-admin-js', ACF_EVENTS_URL . 'dist/js/admin.min.js', array( 'jquery' ), ACF_EVENTS_VERSION, true );\n}", "function load_custom_wp_admin_files()\n{\n wp_enqueue_script('child-admin.js', get_stylesheet_directory_uri() . '/js/divi-admin.js', array('jquery'), true);\n wp_enqueue_style('child-admin.css', get_stylesheet_directory_uri() . '/admin.css', false, null);\n}", "function enqueue(){\r\n\t\t\r\n\t\twp_enqueue_script(\r\n\t\t\t'vibe-opts-field-import-export-js', \r\n\t\t\tVIBE_OPTIONS_URL.'fields/import_export/field_import_export.js', \r\n\t\t\tarray('jquery'),\r\n\t\t\ttime(),\r\n\t\t\ttrue\r\n\t\t);\r\n\t\t\r\n\t}", "function wp_smpro_script() {\r\n\t?>\r\n\t<script type=\"text/javascript\">\r\n\t\tfunction wp_smpro_activate_plugin(action, smpro_nonce) {\r\n\t\t\tjQuery('.smushit-pro-status').removeClass('error');\r\n\t\t\tjQuery('.smushit-pro-status').addClass('updated');\r\n\t\t\tjQuery('.smushit-pro-status p').html('<strong>Smushit Pro:</strong> Activating WPMU DEV Dashboard...');\r\n\t\t\tvar param = {\r\n\t\t\t\taction: action,\r\n\t\t\t\t_ajax_nonce: smpro_nonce\r\n\t\t\t};\r\n\t\t\tjQuery.post(ajaxurl, param, function (data) {\r\n//\t\t\t\tdata = jQuery.parseJSON( data );\r\n\t\t\t\tif (data.success == true) {\r\n\t\t\t\t\tjQuery('.smushit-pro-status p').html('<strong>Smushit Pro:</strong> WPMU DEV Dashbaord activated.');\r\n\t\t\t\t\tlocation.reload();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery('.smushit-pro-status p').html('<strong>Smushit Pro:</strong> There is some problem. Please try again.');\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t}\r\n\t</script><?php\r\n}", "function wp_ajax_rest_nonce()\n {\n }", "function manofbytes_enque() {\n\t// Fonts and styles.\n\twp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Montserrat:700|Source+Sans+Pro:400,400i,700', array(), null );\n\twp_enqueue_style( 'manofbytes-style', get_stylesheet_uri() );\n\n\t// Replace jQuery from WP with CDN.\n\twp_deregister_script( 'jquery' ); // Triggers warning with WP-DEBUG on.\n\twp_enqueue_script( 'jquery', '//code.jquery.com/jquery-3.1.1.min.js', array(), false, true );\n\n\t// Bootstrap JS.\n\twp_enqueue_script( 'manofbytes-bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array(), '', true );\n\n\t// ScrollMagic.\n\tif ( is_singular( 'post' ) ) {\n\t\twp_enqueue_script( 'scrollMagic', '//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/ScrollMagic.min.js', array(), '', true );\n\n\t\t// Debug Scroll Magic.\n\t\t// wp_enqueue_script( 'scrollMagicDebug', '//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.min.js', array(), '', true );\n\t}\n\n\t// Manofbytes JS.\n\twp_enqueue_script( 'manofbytes-js', get_template_directory_uri() . '/js/manofbytes.js', array(), '', true );\n\n\t// Macke ajax url avail. to our js.\n\twp_localize_script( 'manofbytes-js', 'mob_subscribe', array( 'ajax' => admin_url( 'admin-ajax.php' ) ) );\n}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.1', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "function admin_init()\n\t{\n\t\t// css\n\t\twp_enqueue_style( 'nymble-popup', NYMBLE_TINYMCE_URI . '/css/popup.css', false, '1.0', 'all' );\n\t\t\n\t\t// js\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\twp_enqueue_script( 'jquery-livequery', NYMBLE_TINYMCE_URI . '/js/jquery.livequery.js', false, '1.1.1', false );\n\t\twp_enqueue_script( 'jquery-appendo', NYMBLE_TINYMCE_URI . '/js/jquery.appendo.js', false, '1.0', false );\n\t\twp_enqueue_script( 'base64', NYMBLE_TINYMCE_URI . '/js/base64.js', false, '1.0', false );\n\t\twp_enqueue_script( 'nymble-popup', NYMBLE_TINYMCE_URI . '/js/popup.js', false, '1.0', false );\n\t\t\n\t\twp_localize_script( 'jquery', 'NymbleShortcodes', array('plugin_folder' => get_template_directory_uri() .'/shortcodes') );\n\t}", "public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }", "public function enqueue() {\n\t}", "public function init_hooks() {\r\n add_action('wp_ajax_labb_admin_ajax', array($this, 'labb_admin_ajax'));\r\n // Load admin ajax js script\r\n add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));\r\n\r\n }", "public function init()\n\t{\n\t\tadd_action( 'admin_init', array( $this, 'enqueue_assets' ) );\n\t\tadd_action( 'wp_ajax_download_link_title', array( $this, 'download_link_title' ) );\n\t}", "public function enqueue() {\n\t\twp_enqueue_style( 'nscu-controls' );\n\t\twp_enqueue_script( 'nscu-controls' );\n\t}", "public function enqueue() {\n\t\twp_enqueue_style( 'nscu-controls' );\n\t\twp_enqueue_script( 'nscu-controls' );\n\t}", "function enqueue()\n\t{\n\t\twp_enqueue_style('kbpluginstyle', $this->plugin_url . 'assets/style.css');\n\t\twp_enqueue_script('kbpluginscript', $this->plugin_url . 'assets/script.js');\n\t}", "public function init() {\n add_action( 'rest_api_init', array($this, 'register_route'));\n add_action( 'wp_enqueue_scripts', array($this, 'enqueue_script'));\n\t}", "public function enqueue_scripts() {\n wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/coinqvest.modal.min.js', array('jquery'), $this->version, false);\n\n\t\t$params = array ('ajaxurl' => admin_url('admin-ajax.php' ) );\n\t\twp_enqueue_script('coinqvest_ajax_handle', plugin_dir_url( __FILE__ ) . 'js/coinqvest-frontend-ajax-handler.js', array('jquery'), $this->version, false);\n\t\twp_localize_script('coinqvest_ajax_handle', 'params', $params);\n\t}", "function admin_init()\n {\n // css\n // wp_enqueue_style( 'zilla-popup', ZILLA_TINYMCE_URI . '/css/popup.css', false, '1.0', 'all' );\n\n // // js\n wp_enqueue_script( 'jquery-ui-sortable' );\n wp_enqueue_script( 'jquery-livequery', ZEBRAS_SHORTCODE_URI . '/js/jquery.livequery.js', false, '1.1.1', false );\n wp_enqueue_script( 'jquery-appendo', ZEBRAS_SHORTCODE_URI . '/js/jquery.appendo.js', false, '1.0', false );\n wp_enqueue_script( 'base64', ZEBRAS_SHORTCODE_URI . '/js/base64.js', false, '1.0', false );\n wp_enqueue_script( 'zebra-popup', ZEBRAS_SHORTCODE_URI . '/js/shortcode_popup.js', false, '1.0', false );\n wp_enqueue_style( 'zebras-popup', ZEBRAS_SHORTCODE_URI . 'css/zebras_popup.css' );\n wp_localize_script( 'jquery', 'ZebrasShortcodesFolder', array('shortcodes_folder' => ZEBRAS_SHORTCODE_URI ) );\n }", "public static function alm_enqueue_filters_admin_scripts(){\n\n \twp_enqueue_style( 'alm-filters-admin', ALM_FILTERS_URL. '/dist/css/admin_styles.css', '');\n \twp_enqueue_script( 'alm-filters-admin', ALM_FILTERS_URL. '/dist/js/admin.js', '', ALM_FILTERS_VERSION, true);\n\n \twp_localize_script(\n \t\t'alm-filters-admin', 'alm_filters_localize', array(\n \t\t\t'root' => esc_url_raw( rest_url() ),\n \t\t\t'nonce' => wp_create_nonce( 'wp_rest' ),\n \t\t\t'base_url' => get_admin_url() .'admin.php?page=ajax-load-more-filters',\n \t\t\t'delete_filter' => __('Are you sure you want to delete', 'ajax-load-more-filters'),\n \t\t\t'ordering_parameters' => __('Ordering Parameters', 'ajax-load-more-filters'),\n \t\t\t'date_parameters' => __('Date Parameters', 'ajax-load-more-filters'),\n \t\t\t'category_parameters' => __('Category Parameters', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_beta' => __('Beta', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_basic' => __('Basic Form Fields', 'ajax-load-more-filters'),\n\t\t\t\t\t'field_type_adv' => __('Advanced Form Fields', 'ajax-load-more-filters'),\n \t\t\t'tag_parameters' => __('Tag Parameters', 'ajax-load-more-filters'),\n \t\t\t'create_filter' => __('Create Filter', 'ajax-load-more-filters'),\n \t\t\t'update_filter' => __('Save Changes', 'ajax-load-more-filters'),\n \t\t\t'saved_filter' => __('Filter Saved', 'ajax-load-more-filters')\n \t\t)\n \t);\n\n \t}", "public function admin_enqueue_scripts() {\n\t\tif ( 'post' === get_current_screen()->base && 'page' === get_current_screen()->post_type ) {\n\t\t\twp_enqueue_script( 'wsublock-admin', plugins_url( '/js/wsublock-admin.js', __FILE__ ), array( 'jquery' ), $this->script_version, true );\n\t\t\twp_enqueue_style( 'wsublock-admin', plugins_url( '/css/wsublock-admin.css', __FILE__ ), array(), $this->script_version );\n\t\t}\n\t}", "public function enqueues() {\n\n\t\t// CSS.\n\t\twp_enqueue_style(\n\t\t\t'wpforms-builder-setup',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/admin-builder-setup.css',\n\t\t\tnull,\n\t\t\tWPFORMS_VERSION\n\t\t);\n\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-select2-js', $this->get_mtm_resource_url() . 'js/select2.full.min.js', array( 'jquery' ), '4.0.13', true );\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'mtm-select2-js' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.1', 'all' );\n\t\t\twp_enqueue_style( 'mtm-select2-css', $this->get_mtm_resource_url() . 'css/select2.min.css', array(), '4.0.13', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-select2-js', $this->get_mtm_resource_url() . 'js/select2.full.min.js', array( 'jquery' ), '4.0.13', true );\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'mtm-select2-js' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.1', 'all' );\n\t\t\twp_enqueue_style( 'mtm-select2-css', $this->get_mtm_resource_url() . 'css/select2.min.css', array(), '4.0.13', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n global $post_type;\n $setup3_pointposttype_pt1 = PFSAIssetControl('setup3_pointposttype_pt1','','pfitemfinder');\n\n \n if ($setup3_pointposttype_pt1 == $post_type) {\n \n // wp_enqueue_script(\n // 'admin-google-api', \n // 'http://www.google.com/jsapi?autoload={\"modules\":[{name:\"maps\",version:3.15}]}',\n // array('jquery'),\n // '1.0.0',\n // true\n // ); \n // wp_enqueue_script( \n // 'admin-gmap3', \n // get_home_url().\"/wp-content/themes/pointfinder\" . '/js/gmap3.js',\n // array( 'jquery', 'redux-js','admin-google-api' ),\n // time(),\n // true\n // );\n\n // wp_enqueue_script(\n // 'redux-field-streetview-js',\n // get_home_url().\"/wp-content/themes/pointfinder\".'/admin/options/extensions/streetview/field_streetview.js',\n // array( 'jquery', 'redux-js','admin-gmap3'),\n // time(),\n // true\n // );\n // wp_localize_script( 'redux-field-streetview-js', 'theme_quickjs2', array( \n // 'msg' => esc_html__('Please select a point from location map','pointfindert2d')\n // ));\n\n // wp_enqueue_style(\n // 'redux-field-streetview-css',\n // get_home_url().\"/wp-content/themes/pointfinder\".'/admin/options/extensions/streetview/field_streetview.css',\n // time(),\n // true\n // );\n }\n }", "function enqueue ($entry) {\n\n}", "function so_enqueue_scripts(){\r\n wp_register_script('jquery3','https://code.jquery.com/jquery-3.3.1.js');\r\n wp_enqueue_script( 'jquery3');\r\n wp_register_script(\r\n 'ajaxHandle',\r\n '/wp-content/plugins/refresh-plugin/js/refresh-plugin.js',\r\n array(),\r\n false,\r\n true\r\n );\r\n wp_enqueue_script( 'ajaxHandle' );\r\n wp_localize_script(\r\n 'ajaxHandle',\r\n 'ajax_object',\r\n array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'pluginurl' => plugin_dir_url( __FILE__ ) )\r\n );\r\n}", "public function enqueue_edit_scripts() {\n\t}" ]
[ "0.7249566", "0.7193542", "0.7156887", "0.7007891", "0.6986602", "0.69453204", "0.6927907", "0.68783903", "0.6838855", "0.6828883", "0.6808016", "0.67578906", "0.6723346", "0.66298854", "0.66289246", "0.6612179", "0.6602273", "0.6576256", "0.65714145", "0.6560447", "0.6554929", "0.6553152", "0.65200436", "0.6518273", "0.6505835", "0.64981204", "0.64924395", "0.6488767", "0.6477772", "0.64732563", "0.6457713", "0.6456192", "0.6455047", "0.6439725", "0.6434112", "0.6433872", "0.6431303", "0.6429809", "0.64296615", "0.64278567", "0.6427494", "0.64185715", "0.64092755", "0.6407582", "0.6394458", "0.6391987", "0.638942", "0.6383637", "0.6382689", "0.63710856", "0.63672924", "0.6364673", "0.6362229", "0.6357532", "0.6341905", "0.6340626", "0.6332576", "0.6331472", "0.6331472", "0.6331472", "0.6331472", "0.6331472", "0.6331472", "0.6331472", "0.63305604", "0.632602", "0.63189054", "0.6316224", "0.63116467", "0.6307699", "0.63036335", "0.6296391", "0.62912726", "0.6291263", "0.6289938", "0.6283984", "0.6282545", "0.6282545", "0.6280553", "0.6276803", "0.6272139", "0.6269698", "0.62682855", "0.6261884", "0.6257738", "0.6257738", "0.6256637", "0.62507856", "0.624879", "0.6248688", "0.6243431", "0.62374187", "0.6236421", "0.6233332", "0.6233332", "0.6230204", "0.6230204", "0.62302005", "0.6229524", "0.62276196", "0.62274873" ]
0.0
-1
Enqueue in frontend only.
public function front( bool $front = true ): self { $this->front = $front; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue() {\n\t}", "function enqueue(){\n\t\t}", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public static function enqueue();", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "function enqueue ($entry) {\n\n}", "public function enqueue() {\n\t\t\tstatic $enqueued = false;\n\n\t\t\t//Don't enqueue more than once\n\t\t\tif ( $enqueued ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$enqueued = true;\n\t\t\t// Set up min files for dev_mode = false.\n\t\t\t$min = Redux_Functions::isMin();\n\n\t\t\t// Field dependent JS\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-css_layout-js',\n\t\t\t\t$this->extension_url . 'field_css_layout' . $min . '.js',\n\t\t\t\tarray( 'jquery', 'wp-color-picker', 'select2-js' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style( 'select2-css' );\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-color-picker-css',\n\t\t\t\tReduxFramework::$_url . 'assets/css/color-picker/color-picker.css',\n\t\t\t\tarray( 'wp-color-picker' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-css_layout-css',\n\t\t\t\t$this->extension_url . 'field_css_layout.css',\n\t\t\t\tarray(),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "public function enqueue_graphiql()\n {\n }", "public function enqueue() {\n\t\tgutenberg_widgets_init( 'gutenberg_customizer' );\n\t}", "function put_in_queue() {\n wp_enqueue_script('reviewsjs', plugins_url('/assets/js/reviews.js', __FILE__));\n wp_enqueue_style('reviewscss', plugins_url('/assets/css/reviews.css', __FILE__));\n }", "public function enqueue() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-switch-js',\n\t\t\t\tReduxCore::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js',\n\t\t\t\tarray( 'jquery', 'redux-js' ),\n\t\t\t\t$this->timestamp,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tif ( $this->parent->args['dev_mode'] ) {\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'redux-field-switch-css',\n\t\t\t\t\tReduxCore::$_url . 'inc/fields/switch/field_switch.css',\n\t\t\t\t\tarray(),\n\t\t\t\t\t$this->timestamp,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "public function enqueue_uploader()\n {\n }", "public function enqueue_dependencies () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Template')) require_once (dirname(__FILE__) . '/class_thx_template.php');\n\n\t\tif (!class_exists('Upfront_Thx_Builder_VirtualPage')) require_once (dirname(__FILE__) . '/class_thx_endpoint.php');\n\n\t\t$tpl = Thx_Template::plugin();\n\n\t\twp_enqueue_style('create_edit', $tpl->url('css/create_edit.css'));\n\n\t\twp_enqueue_script('create_edit', $tpl->url('js/create_edit.js'), array('jquery'));\n\t\twp_localize_script('create_edit', '_thx', array(\n\t\t\t'editor_base' => esc_url(Upfront_Thx_Builder_VirtualPage::get_url(\n\t\t\t\tUpfront_Thx_Builder_VirtualPage::get_initial_url()\n\t\t\t)),\n\t\t\t'action_slug' => Upfront_Thx_Builder_VirtualPage::get_initial_url(),\n\t\t\t'admin_ajax' => admin_url('admin-ajax.php'),\n\t\t\t'l10n' => array(\n\t\t\t\t'oops' => __('Oops, something went wrong with processing your request.', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'start_building' => __('Start Building', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'checking' => __('Checking...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'creating' => __('Creating...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'select_media' => __('Select or Upload Media Of Your Chosen Persuasion', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'use_media' => __('Use this media', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'loading' => __('Loading data...', UpfrontThemeExporter::DOMAIN),\n\t\t\t),\n\t\t));\n\n\t\twp_enqueue_media();\n\t}", "public function enqueue_frontend_assets()\n {\n // If in the backend, bail out.\n if ( is_admin() )\n {\n return;\n }\n \n $block_path = '/assets/js/frontend.block.js';\n wp_enqueue_script(\n $this->namespace . '-block-frontend',\n _get_plugin_url() . $block_path,\n [],\n filemtime( _get_plugin_directory() . $block_path )\n );\n\n wp_localize_script(\n \t$this->namespace . '-block-frontend',\n \t$this->namespace . '_ajax_object',\n \t[\n \t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'security' => wp_create_nonce( $this->namespace . '-security-token' )\n \t]\n );\n \n }", "public function enqueue () {\n\t\t \n\t\t \n\t\t $min = Redux_Functions::isMin();\n\t\t \n\t\t \twp_enqueue_script(\n 'redux-field-media-js',\n ReduxFramework::$_url . 'inc/fields/media/field_media' . $min . '.js',\n array( 'jquery', 'redux-js' ),\n time(),\n true\n );\n\n wp_enqueue_style (\n 'redux-field-media-css', \n ReduxFramework::$_url . 'inc/fields/media/field_media.css', \n time (), \n true\n );\n\n wp_enqueue_script (\n 'redux-field-super-search-js', \n $this->extension_url . 'field_super_search.js', \n array( 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker', 'redux-field-media-js' ), \n time (), \n true\n );\n\t\t\t\n wp_enqueue_style (\n 'redux-field-super-search-css', \n $this->extension_url . 'field_super_search.css', \n time (), \n true\n );\n }", "public function enqueue_backend_scripts_and_styles() {\n\t\twp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\twp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/js/backend-scripts.js', array(), UCLACOMPONENTSWP_VERSION, false );\n\t\twp_localize_script( 'uclacomponentswp-backend-scripts', 'uclacomponentswp', array(\n\t\t\t'plugin_name' => __( UCLACOMPONENTSWP_NAME, 'ucla-components-for-wp' ),\n\t\t));\n\t}", "function indosEnqueue() {\n global $app_base_url;\n\n\tif(! is_admin()){\n\t wp_register_style('indoshipping_css',$app_base_url.'assets/indoshipping.css');\n\t wp_register_script('indoshipping_js',$app_base_url.'assets/indoshipping.js',array('jquery'));\n\t wp_localize_script('indoshipping_js','indoshipping',array('pluginurl'=>$app_base_url,'ajaxurl'=>admin_url('admin-ajax.php')));\n\t wp_enqueue_style('indoshipping_css');\n\t wp_enqueue_script('indoshipping_js');\n\t}\n}", "public function admin_enqueue()\n\t{\n\t\t// styles.\n\n\t}", "function enqueue_backend_resources()\n {\n $this->set_screen();\n if (C_NextGen_Admin_Page_Manager::is_requested()) {\n M_NextGen_Admin::enqueue_common_admin_static_resources();\n }\n wp_enqueue_script('jquery');\n $this->object->enqueue_jquery_ui_theme();\n wp_enqueue_script('photocrati_ajax');\n wp_enqueue_script('jquery-ui-accordion');\n wp_enqueue_style('imagely-admin-font', 'https://fonts.googleapis.com/css?family=Lato:300,400,700,900', array(), NGG_SCRIPT_VERSION);\n if (method_exists('M_Gallery_Display', 'enqueue_fontawesome')) {\n M_Gallery_Display::enqueue_fontawesome();\n }\n // Ensure select2\n wp_enqueue_style('ngg_select2');\n wp_enqueue_script('ngg_select2');\n }", "public \tfunction\tenqueueAdmin() {\n\t\t\t/**\n\t\t\t * Register styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative CSS for FrozenPlugin.\n\t\t\twp_register_style('FrozenPlugin-admin-css', plugins_url('css/admin.css', __FILE__));\n\t\t\t\n\t\t\t/**\n\t\t\t * Register scripts here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative JS for FrozenPlugin.\n\t\t\twp_register_script('FrozenPlugin-admin-js', plugins_url('js/admin.js', __FILE__), array('jquery'));\n\t\t\t\n\t\t\t/**\n\t\t\t * Enqueue styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_style('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_style('thickbox');\n\t\t\t\n\t\t\t//Enqueue the administrative CSS. \n\t\t\twp_enqueue_style('FrozenPlugin-admin-css');\n\t\t\n\t\t\t/**\n\t\t\t * Enqueue scripts here. \n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_script('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_script('thickbox');\n\t\t\t\n\t\t\t//Enqueue Media Uploads.\n\t\t\twp_enqueue_media();\n\t\t\t//admin_enqueue_script('media-upload');\n\t\t\t\n\t\t\t//Enqueue the administrative JS. \n\t\t\twp_enqueue_script('FrozenPlugin-admin-js');\n\t\t}", "public function onAdminEnqueueScripts()\n {\n $this->enqueue('admin');\n }", "function enqueue()\n\t{\n\t\tif ( empty( $_GET['page'] ) || 'd-settings' != $_GET['page'] )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\twp_enqueue_media();\n\t\twp_enqueue_style( 'ds-backend', DS_URL . '/assets/css/' . 'backend.css' );\n\t\twp_enqueue_script( 'ds-backend', DS_URL . '/assets/js/' . 'backend.js', array( 'jquery' ) );\n\t\twp_enqueue_style( 'bootstrap-css', DS_URL . '/assets/css/bootstrap.min.css' );\n\t\twp_enqueue_script( 'bootstrap-js', DS_URL . '/assets/js/bootstrap.min.js', array( 'jquery' ), '3.0.0', true );\n\t}", "function chabok_enqueue() {\n\tglobal $chabok_options;\n\n\twp_register_script(\n\t\t'chabokpush',\n\t\tCHABOK_URL . 'assets/js/chabokpush.min.js',\n\t\tarray(),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_register_script(\n\t\t'chabok',\n\t\tCHABOK_URL . 'assets/js/chabok-init.js',\n\t\tarray( 'chabokpush', 'jquery' ),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_enqueue_script( 'chabok' );\n\n\twp_localize_script( 'chabok', 'chabok_params', array(\n\t\t'options' \t\t=> $chabok_options,\n\t\t'xhr_endpoint'\t=> admin_url( 'admin-ajax.php' ),\n\t) );\n}", "public function queue_scripts() {\n\t\t\tif ( $queue = WPO_WCPDF_Dropbox()->hooks->get_queued_files() ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-queue',\n\t\t\t\t\tplugins_url( 'js/dropbox-queue.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-queue' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\t\t}", "public function enqueueScripts(){}", "function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}", "public function register_enqueuing() {\n\t\tadd_action( 'admin_print_scripts-nav-menus.php', array( &$this, 'enqueue_scripts' ) );\n\t}", "public function enqueue() {\n\t\tglobal $post;\n\t\t\n\t\tif( is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'vfr_dress_library') ) {\n //Dashboard JS\n wp_enqueue_script(\n 'dress-library/js',\n plugins_url( 'assets/js/dress-library.js', dirname( __FILE__ ) ),\n null,\n filemtime( plugin_dir_path( dirname( __FILE__ ) ) . 'assets/js/dress-library.js' ),\n TRUE\n );\n\n // LOCALIZE\n wp_localize_script( 'dress-library/js', 'VIRTUAL_FITTING_ROOM', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'nonce' => wp_create_nonce( 'virtual_fitting_room' )\n )\n );\n\n }\n\n if( is_a($post, 'WP_Post') && has_shortcode($post->post_content, 'vfr_profile') ) {\n\n\t\t\t//Dashboard JS\n wp_enqueue_script(\n 'profile/js',\n plugins_url( 'assets/js/profile.js', dirname( __FILE__ ) ),\n null,\n filemtime( plugin_dir_path( dirname( __FILE__ ) ) . 'assets/js/profile.js' ),\n TRUE\n );\n\n // LOCALIZE\n wp_localize_script( 'profile/js', 'PROFILE', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'nonce' => wp_create_nonce( 'virtual_fitting_room' ),\n 'dress_images_dir' => plugin_dir_url( dirname( __FILE__ ) ) . 'assets/img/',\n 'uploads_dir' => wp_upload_dir()['baseurl']\n )\n );\n\t\t}\n\n\t}", "private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public function enqueues() {\n\n\t\t// CSS.\n\t\twp_enqueue_style(\n\t\t\t'wpforms-builder-setup',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/admin-builder-setup.css',\n\t\t\tnull,\n\t\t\tWPFORMS_VERSION\n\t\t);\n\t}", "static public function enqueue_late() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_script(\r\n\t\t\t\t'wdev-plugin-ui',\r\n\t\t\t\tself::$module_url . 'wdev-ui.js',\r\n\t\t\t\tarray( 'jquery' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\t/**\r\n\t\t\t * Allow other plugins to enqueue css/js after shared-ui to\r\n\t\t\t * overwrite certain definitions.\r\n\t\t\t */\r\n\t\t\tdo_action( 'wpmudev_plugin_ui_enqueued' );\r\n\t\t}", "function enqueueClientFiles() {\n\t\t\tglobal $wp_styles;\n\n\t\t\tif ( ! is_admin() ) {\n\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'titan-style',\n\t\t\t\t\tget_bloginfo( 'stylesheet_url' ),\n\t\t\t\t\t'',\n\t\t\t\t\tnull\n\t\t\t\t);\n\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'titan-ie-style',\n\t\t\t\t\tget_template_directory_uri() . '/stylesheets/ie.css',\n\t\t\t\t\tarray( 'titan-style' ),\n\t\t\t\t\tnull\n\t\t\t\t);\n\t\t\t\t$wp_styles->add_data( 'titan-ie-style', 'conditional', 'lt IE 8' );\n\n\t\t\t\tif ( is_singular() ) {\n\t\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function enqueue()\n {\n if((int)Option::getByPath('wunderlist_todo_options', 'live.enabled') === 1)\n {\n wp_enqueue_script('socket', setcooki_config('wunderlist', 'socket.client.src'));\n }\n if((int)Option::getByPath('wunderlist_todo_options', 'css.enabled'))\n {\n $style = setcooki_get_option(self::PRIMARY_STYLES, $this);\n $style = apply_filters('wunderlist_todo_style', $style);\n $theme = (string)Option::getByPath('wunderlist_todo_options', 'css.theme', '');\n if(stripos($style, '.less') !== false)\n {\n try\n {\n $css = setcooki_path('plugin') . '/var/app.min.css';\n $style = setcooki_path('root') . DIRECTORY_SEPARATOR . ltrim($style, DIRECTORY_SEPARATOR);\n $theme = setcooki_path('root') . DIRECTORY_SEPARATOR . ltrim($theme, DIRECTORY_SEPARATOR);\n if(!file_exists($css) || (file_exists($css) && ((int)@filemtime($style) > (int)@filemtime($css)) || ((int)@filemtime($theme) > (int)@filemtime($css))))\n {\n require_once setcooki_path('plugin') . '/src/ext/less/Less.php';\n $parser = new \\Less_Parser(array('compress' => true));\n $parser->SetImportDirs(array(setcooki_path('plugin') . '/static/css/' => setcooki_path('plugin', true) . '/static/css/') );\n $parser->parse((string)file_get_contents($theme));\n $parser->parse((string)file_get_contents($style));\n file_put_contents(setcooki_path('plugin') . '/var/app.min.css', $parser->getCss());\n }\n $style = setcooki_path('plugin', true) . '/var/app.min.css';\n }\n catch(\\Exception $e)\n {\n $style = null;\n }\n }\n if(!empty($style))\n {\n wp_enqueue_style('wunderlist', $style, array(), false, 'all');\n }\n if(setcooki_has_option(self::CUSTOM_STYLES, $this))\n {\n wp_enqueue_style('wunderlist-custom', setcooki_get_option(self::CUSTOM_STYLES, $this), array(), false, 'all');\n }\n }\n wp_register_script('wunderlist', setcooki_path('plugin', true) . '/static/js/app.js', array('jquery', 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-sortable'), '1.0.0', false);\n wp_localize_script('wunderlist', 'wunderlistAjax', array('url' => admin_url('admin-ajax.php'), 'nonce' => get_option('wunderlist_nonce')));\n wp_localize_script('wunderlist', 'wunderlistConf', setcooki_config('wunderlist', 'js.conf'));\n wp_enqueue_script('wunderlist');\n }", "public \tfunction\tenqueueSite() {\n\t\t\t/**\n\t\t\t * Register styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the public site CSS for FrozenPlugin.\n\t\t\twp_register_style('FrozenPlugin-site-css', plugins_url('css/site.css', __FILE__));\n\t\t\n\t\t\t/**\n\t\t\t * Register scripts here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the public site JS for FrozenPlugin.\n\t\t\twp_register_script('FrozenPlugin-site-js', plugins_url('js/site.js', __FILE__), array('jquery'));\n\t\t\n\t\t\t/**\n\t\t\t * Enqueue styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue the public site CSS. \n\t\t\twp_enqueue_style('FrozenPlugin-site-css');\n\t\t\t\n\t\t\t/**\n\t\t\t * Enqueue scripts here. \n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue the public site JS. \n\t\t\twp_enqueue_script('FrozenPlugin-site-js');\n\t\t}", "static public function enqueue() {\r\n\t\t\t/*\r\n\t\t\t * Beta-testers will not have cached scripts!\r\n\t\t\t * Just in case we have to update the plugin prior to launch.\r\n\t\t\t */\r\n\t\t\tif ( defined( 'WPMUDEV_BETATEST' ) && WPMUDEV_BETATEST ) {\r\n\t\t\t\t$script_version = time();\r\n\t\t\t} else {\r\n\t\t\t\t$script_version = self::VERSION;\r\n\t\t\t}\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-google_fonts',\r\n\t\t\t\t'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Roboto:400,500,300,300italic',\r\n\t\t\t\tfalse,\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\r\n\t\t\twp_enqueue_style(\r\n\t\t\t\t'wdev-plugin-notice',\r\n\t\t\t\tself::$module_url . 'notice.css',\r\n\t\t\t\tarray( 'wdev-plugin-google_fonts' ),\r\n\t\t\t\t$script_version\r\n\t\t\t);\r\n\t\t}", "function acf_enqueue_uploader()\n {\n }", "public function enqueue() {\n\t\t$screen = get_current_screen();\n\t\tif ( ! isset( $screen->id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme = $this->theme_args;\n\t\t$theme_page = ! empty( $theme['template'] ) ? $theme['template'] . '-welcome' : $theme['slug'] . '-welcome';\n\n\t\tif ( $screen->id !== 'appearance_page_' . $theme_page ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$build_path = get_template_directory_uri() . '/dashboard/build/';\n\t\t$dependencies = ( include get_template_directory() . '/dashboard/build/dashboard.asset.php' );\n\n\t\twp_register_style( 'neve-dash-style', $build_path . 'style-dashboard.css', [ 'wp-components' ], $dependencies['version'] );\n\t\twp_style_add_data( 'neve-dash-style', 'rtl', 'replace' );\n\t\twp_enqueue_style( 'neve-dash-style' );\n\t\twp_register_script( 'neve-dash-script', $build_path . 'dashboard.js', array_merge( $dependencies['dependencies'], [ 'updates' ] ), $dependencies['version'], true );\n\t\twp_localize_script( 'neve-dash-script', 'neveDash', apply_filters( 'neve_dashboard_page_data', $this->get_localization() ) );\n\t\twp_enqueue_script( 'neve-dash-script' );\n\n\t\tif ( function_exists( 'wp_set_script_translations' ) ) {\n\t\t\twp_set_script_translations( 'neve-dash-script', 'neve' );\n\t\t}\n\t}", "public function enqueue() {\n\t\twp_enqueue_script( 'jquery-ui-button' );\n\t}", "public function enqueue_public_scripts_and_styles() {\n\t\t//wp_enqueue_style( 'uclacomponentswp-backend-styles', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/css/backend-styles.css', array(), UCLACOMPONENTSWP_VERSION, 'all' );\n\t\t//wp_enqueue_script( 'uclacomponentswp-backend-scripts', UCLACOMPONENTSWP_PLUGIN_URL . 'core/includes/assets/js/backend-scripts.js', array(), UCLACOMPONENTSWP_VERSION, false );\n\t\t// wp_localize_script( 'uclacomponentswp-backend-scripts', 'uclacomponentswp', array(\n\t\t// \t'plugin_name' => __( UCLACOMPONENTSWP_NAME, 'ucla-components-for-wp' ),\n\t\t// ));\n\t// Install the UCLA Component library styles\n\twp_enqueue_style( 'ucla-lib-style', 'https://cdn.webcomponents.ucla.edu/1.0.0-beta.16/css/ucla-lib.min.css' );\n\t// Install the UCLA Component Library scripts\n\twp_enqueue_script( 'ucla-lib-script', 'https://s3-us-west-1.amazonaws.com/webcomponents.ucla.edu/public/1.0.0-beta.16/js/ucla-lib-scripts.min.js' );\n\t\n\t}", "public function enqueue() {\n\t\twp_enqueue_style( 'nscu-controls' );\n\t\twp_enqueue_script( 'nscu-controls' );\n\t}", "public function enqueue() {\n\t\twp_enqueue_style( 'nscu-controls' );\n\t\twp_enqueue_script( 'nscu-controls' );\n\t}", "public function enqueue_files ()\n\t{\n\t\t// Flowdrive\n\t\twp_register_style( 'flowdrive_admin_css', plugin_dir_url( __DIR__ ) . 'assets/css/flowdrive-admin.css', false, $this->version );\n\t\twp_enqueue_style( 'flowdrive_admin_css' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __FILE__ ) . 'js/cloudoki-smmp-admin.js', array( 'jquery' ), $this->version, false );\n\t\t\n\t\t// Chosen\n\t\twp_register_style( 'chosen_admin_css', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/css/chosen.min.css', false, $this->version );\n\t\twp_enqueue_style( 'chosen_admin_css' );\n\t\t\n\t\twp_register_script( 'chosen_admin_js', plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', ['jquery'], $this->version );\n\t\twp_enqueue_script( 'chosen_admin_js' );\n\t\t\n\t\t// wp_enqueue_script( $this, plugin_dir_url( __DIR__ ) . '../vendor/drmonty/chosen/js/chosen.jquery.min.js', array( 'jquery' ), $this->version, false );\n\t}", "function enqueue_form()\n {\n }", "public function enqueue() {\n\n\t\t\t// Function for demo content setup\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-thememount-resetlike-js',\n\t\t\t\tget_template_directory_uri() . '/inc/redux-framework/redux_custom_fields/digitallaw_resetlike/field_digitallaw_resetlike.js',\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\ttime(),\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-thememount-resetlike-css',\n\t\t\t\tget_template_directory_uri() . '/inc/redux-framework/redux_custom_fields/digitallaw_resetlike/field_digitallaw_resetlike.css',\n\t\t\t\ttime(),\n\t\t\t\ttrue\n\t\t\t);\n\t\t\t\n\t\t}", "public function enqueue() {\r\n\t\twp_enqueue_style( 'wfct-ei', WFC_EI_CSS_URL . 'environment-indicator.css', array(), WFC_EI_VERSION );\r\n\t}", "function green_shortcodes_vc_scripts_front() {\n\t\tif (green_vc_is_frontend()) {\n\t\t\t// Include CSS \n\t\t\tgreen_enqueue_style ( 'shortcodes_vc-style', green_get_file_url('shortcodes/shortcodes_vc_front.css'), array(), null );\n\t\t\t// Include JS\n\t\t\tgreen_enqueue_script( 'shortcodes_vc-script', green_get_file_url('shortcodes/shortcodes_vc_front.js'), array(), null, true );\n\t\t}\n\t}", "function script_enqueue() {\n\t$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );\n\tisset($term->term_id) ? $is_detailed_category = get_woocommerce_term_meta( $term->term_id, '_woocommerce_detailed_category', true ) : $is_detailed_category = 0;\n\tif ($is_detailed_category) {\n\t\t// only load ad-gallery if is post : prevent from loading on other pages\n\t\twp_register_script('wc_dc_sortable', plugins_url('/assets/js/sortable.min.js', __FILE__));\n\t\twp_enqueue_script('wc_dc_sortable');\n\t\twp_register_script('wc_dc_loading_cart', plugins_url('/assets/js/loading-cart.min.js', __FILE__));\n\t\twp_enqueue_script('wc_dc_loading_cart');\n\t\twp_register_style( 'wc_dc_sortable_style', plugins_url('/assets/css/style.css', __FILE__) );\n\t\twp_enqueue_style( 'wc_dc_sortable_style' );\n\t}\n}", "public function enqueue_before_elementor() {\n\t\tif ( class_exists( 'Elementor\\Frontend', false ) ) {\n\t\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css', array(), HESTIA_VENDOR_VERSION );\n\t\t\twp_style_add_data( 'bootstrap', 'rtl', 'replace' );\n\t\t\twp_style_add_data( 'bootstrap', 'suffix', '.min' );\n\t\t\twp_enqueue_style( 'hestia-font-sizes', get_template_directory_uri() . '/assets/css/font-sizes' . ( ( HESTIA_DEBUG ) ? '' : '.min' ) . '.css', array(), HESTIA_VERSION );\n\t\t}\n\t}", "function wdtLiteVSPremiumEnqueue()\n{\n WDTTools::wdtUIKitEnqueue();\n wp_enqueue_style('wdt-lite-vs-premium-css', WDT_CSS_PATH . 'admin/lite-vs-premium.css', array(), WDT_CURRENT_VERSION);\n wp_enqueue_script('wdt-common');\n wp_enqueue_script('wdt-doc-js');\n}", "function syncAddonWithQueue($params)\n {\n dispatch(new SyncAddons($params));\n }", "private function setQueue() {\n if (count($this->request->q) > 0) {\n try {\n $this->client->setQueue(array($this->request->q));\n $this->view->addParameter(\"result\", \"success\");\n } catch(Exception $e) {\n $this->view->addParameter(\"result\", \"failure\");\n $this->view->addParameter(\"data\", \"Failed to execute '{$this->request->action}' action\");\n }\n } else {\n $this->view->addParameter(\"result\", \"invalid\");\n $this->view->addParameter(\"data\", \"Query array must not be empty\");\n }\n }", "public function admin_enqueue()\r\n {\r\n if (isset($_GET['page']) && $_GET['page'] === 'notifications') {\r\n wp_localize_script('giga-messenger-bots', 'messages', $this->messages);\r\n wp_localize_script('giga-messenger-bots', 'answers', $this->message->content);\r\n }\r\n }", "function enqueue()\n\t{\n\t\twp_enqueue_style('kbpluginstyle', $this->plugin_url . 'assets/style.css');\n\t\twp_enqueue_script('kbpluginscript', $this->plugin_url . 'assets/script.js');\n\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-select2-js', $this->get_mtm_resource_url() . 'js/select2.full.min.js', array( 'jquery' ), '4.0.13', true );\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'mtm-select2-js' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.1', 'all' );\n\t\t\twp_enqueue_style( 'mtm-select2-css', $this->get_mtm_resource_url() . 'css/select2.min.css', array(), '4.0.13', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-select2-js', $this->get_mtm_resource_url() . 'js/select2.full.min.js', array( 'jquery' ), '4.0.13', true );\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'mtm-select2-js' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.1', 'all' );\n\t\t\twp_enqueue_style( 'mtm-select2-css', $this->get_mtm_resource_url() . 'css/select2.min.css', array(), '4.0.13', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery', 'jquery-ui-core' ), '1.1', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue_jstree() {\n\t\tglobal $updraftplus;\n\n\t\tstatic $already_enqueued = false;\n\t\tif ($already_enqueued) return;\n\t\t\n\t\t$already_enqueued = true;\n\t\t$jstree_enqueue_version = $updraftplus->use_unminified_scripts() ? '3.3.12-rc.0'.'.'.time() : '3.3.12-rc.0';\n\t\t$min_or_not = $updraftplus->use_unminified_scripts() ? '' : '.min';\n\t\t\n\t\twp_enqueue_script('jstree', UPDRAFTPLUS_URL.'/includes/jstree/jstree'.$min_or_not.'.js', array('jquery'), $jstree_enqueue_version);\n\t\twp_enqueue_style('jstree', UPDRAFTPLUS_URL.'/includes/jstree/themes/default/style'.$min_or_not.'.css', array(), $jstree_enqueue_version);\n\t}", "function enqueueAdminBarColor() {\n if (!is_admin_bar_showing())\n return;\n\n $user_color = get_user_option('admin_color');\n\n if (isset($user_color)) {\n $setting = $this->getOptions();\n if (true == $setting['enbale-on-frontend']) {\n $wp_admin_color_schemes = get_option('wp_admin_color_schemes');\n if (isset($wp_admin_color_schemes[$user_color]))\n wp_enqueue_style($user_color, $wp_admin_color_schemes[$user_color]->url);\n }\n }\n }", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t}", "public function enqueue_edit_scripts() {\n\t}", "public function enqueue($value) {\n $this->add($value);\n }", "public function enqueue($handles)\n {\n }", "public function enqueue_front_end_scripts() {}", "public function output() {\n\n if ( $this->field['enqueue_frontend'] ) {\n\n }\n \n }", "public function public_enqueues() {\n wp_enqueue_style(\n 'wfc-preloader-css',\n WFC_PL_CSS . '/preloader.css'\n );\n\n wp_enqueue_script(\n 'wfc-preloader-js',\n WFC_PL_JS . '/preloader.js',\n array('jquery'),\n '',\n true\n );\n\n $wfc_preloader_enable = wfc_toolkit_get_option( 'enable_preloader' ) ? 1 : 0;\n $wfc_preloader_image_id = wfc_toolkit_get_option( 'preloader_spinner_image' );\n $wfc_preloader_background_color = wfc_toolkit_get_option( 'preloader_background', '#000000' );\n wp_localize_script(\n 'wfc-preloader-js',\n 'wfc_preloader',\n array(\n 'enable' => $wfc_preloader_enable, \n 'image' => $wfc_preloader_image_id,\n 'background_color' => $wfc_preloader_background_color,\n 'is_preload' => $this->genesis_preloader_load(true) !== null ? 1 : 0\n )\n );\n }", "public function enqueue(array $messages);", "function admin_enqueue_script(){\n\t\tglobal $postmec;\n\t\t\n\t\tif($_GET['page'] == 'stores-management'){\n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_style( 'thickbox' ); // Stylesheet used by Thickbox\n\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\twp_enqueue_script( 'media-upload' );\n\t\t\twp_register_script('store-media-upload', $postmec->get_postmec_url() . 'js/plugin.media-uploader.js', array('jquery', 'thickbox', 'media-upload'));\n\t\t\twp_enqueue_script('store-media-upload');\n\t\t\n\t\t\t//wp_register_script('media-uploader-activator', $commentbar->get_this_url() . 'js/uploader.activator.js', array('jquery'));\n\t\t\t//wp_enqueue_script('media-uploader-activator');\n\t\t}\n\t}", "public function enqueue() {\n\t\t\twp_enqueue_script( 'mtm-custom-controls-js', $this->get_mtm_resource_url() . 'js/customizer-custom.js', array( 'jquery' ), '1.0', true );\n\t\t\twp_enqueue_style( 'mtm-custom-controls-css', $this->get_mtm_resource_url() . 'css/customizer.css', array(), '1.0', 'all' );\n\t\t\twp_enqueue_editor();\n\t\t}", "public function customize_preview_enqueue()\n {\n }", "function enqueue_block_frontend_scripts() {\n\tif ( DEV_BUILD ) {\n\t\t$block_path = '/build/';\n\t} else {\n\t\t$block_path = '';\n\t}\n\n\twp_enqueue_script(\n\t\tFEM_PREFIX . 'blocks',\n\t\tplugins_url( $block_path . 'frontend.js', __FILE__ ),\n\t\t[ 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-api-fetch' ],\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . $block_path . 'frontend.js' ),\n\t\ttrue\n\t);\n\twp_enqueue_style(\n\t\tFEM_PREFIX . 'block-style-front',\n\t\tplugins_url( $block_path . 'style-frontend.css', __FILE__ ),\n\t\t[],\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . $block_path . 'style-frontend.css' )\n\t);\n\n\t// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion\n\twp_enqueue_style( 'file-icon-vectors', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/file-icon-vivid.min.css', null, null );\n}", "public function enqueue_control_scripts()\n {\n }", "public function page_builder_enqueue() {\n\t\tif ( $this->is_plugin_preview() && is_front_page() ) {\n\t\t\twp_enqueue_script( 'hestia-builder-integration', get_template_directory_uri() . '/assets/js/admin/hestia-pagebuilder.js', array(), HESTIA_VERSION );\n\t\t\twp_localize_script(\n\t\t\t\t'hestia-builder-integration',\n\t\t\t\t'hestiaBuilderIntegration',\n\t\t\t\tarray(\n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => wp_create_nonce( 'hestia-pagebuilder-nonce' ),\n\t\t\t\t\t'hideString' => esc_html__( 'Disable section', 'hestia' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$had_elementor = get_option( 'hestia_had_elementor' );\n\t\t// Ask user if he wants to disable default styling for plugin.\n\t\tif ( $had_elementor === 'no' && $this->is_plugin_preview() ) {\n\t\t\twp_enqueue_script( 'hestia-elementor-notice', get_template_directory_uri() . '/assets/js/admin/hestia-elementor-notice.js', array(), HESTIA_VERSION );\n\t\t\twp_localize_script(\n\t\t\t\t'hestia-elementor-notice',\n\t\t\t\t'hestiaElementorNotice',\n\t\t\t\tarray(\n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => wp_create_nonce( 'hestia-elementor-notice-nonce' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function enqueues()\n {\n\n // CSS\n wp_enqueue_style(\n 'wpforms-builder-settings',\n WPFORMS_PLUGIN_URL . 'assets/css/admin-builder-settings.css',\n null,\n WPFORMS_VERSION\n );\n }", "public function enqueue()\n {\n wp_enqueue_style(\n 'customizer_switch',\n addon_assets_url( 'css/switch.css', __DIR__ ),\n [],\n '1.0.2'\n );\n wp_enqueue_script(\n 'customizer_switch',\n addon_assets_url( 'js/jquery.switch.js', __DIR__ ),\n ['jquery'],\n '1.0.2',\n true\n );\n }", "function studeon_vc_frontend_scripts() {\n\t\tif (studeon_exists_visual_composer()) {\n\t\t\tif (studeon_is_on(studeon_get_theme_option('debug_mode')) && studeon_get_file_dir('plugins/js_composer/js_composer.css')!='')\n\t\t\t\twp_enqueue_style( 'studeon-js-composer', studeon_get_file_url('plugins/js_composer/js_composer.css'), array(), null );\n\t\t}\n\t}", "public function enqueue() {\n $this->register();\n\n // If stylesheet is in browser cache, load it the traditional way\n if ( isset( $_COOKIE['fullCSS'] ) && false !== $_COOKIE['fullCSS'] )\n {\n // Load Typekit\n wp_enqueue_style( 'typekit' );\n // Default style.css.\n wp_enqueue_style( 'style' );\n }\n // Otherwise, inline critical CSS and load full stylesheet asynchronously\n else\n {\n add_filter( 'style_loader_tag', array( $this, 'custom_link_tag_attributes' ), 5, 4 );\n add_action( 'wp_head', array( __CLASS__, 'loadCSS' ), 10 );\n }\n\n // jQuery.\n wp_enqueue_script( 'jquery' );\n\n // Fullpage.js\n wp_enqueue_script( 'parallax' );\n wp_enqueue_script( 'fullpage' );\n\n // MmenuLight\n wp_enqueue_script( 'mmenu-light-polyfills' );\n wp_enqueue_script( 'mmenu-light' );\n\n // Frontend.\n wp_enqueue_script( 'app-js' );\n\n // Post comments.\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }", "public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }", "public function bsp_admin_enqueue($hook) {\n\n\t\t// load in entire admin area \n\t\twp_enqueue_style( 'BSP-admin-styles', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'style.css', '', false );\n\t\t// Select 2 boxes \n\t\twp_enqueue_style( 'select-22-styles', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'css/select2-custom.min.css', '', false );\n\t\twp_enqueue_script( 'select-22-script', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/select2-custom.min.js' );\n\t\twp_enqueue_script( 'BSP-admin-post-page-edit', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/wp-post-page-tools.js', \"\", true );\n\t\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', '', false );\n\t\twp_enqueue_style( 'BSP-edit', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"] . 'bsp-edit.css', array('font-awesome'), false );\n\t\t// Ace Code editor\n\t\twp_enqueue_script( 'ace-code-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js' );\n\t\twp_enqueue_script( 'ace-code-editor-mode-less', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-less.js' );\n\t\twp_enqueue_script( 'ace-code-editor-mode-css', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-css.js' );\n\t\twp_enqueue_script( 'ace-code-editor-bsp-theme', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/theme-custom.js' );\n\t\twp_enqueue_script( 'ace-code-editor-autocomplete', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ext-language_tools.js' );\n\t\t // If its not the main post page then exit now\n\t\tif ( 'toplevel_page_blog-styles-pro-menu' != $hook && 'wpe-dashboard_page_blog-styles-pro-menu' != $hook ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only if it exists on the admin main page \n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'toastr', 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js' );\n\t\twp_enqueue_style( 'toastr-style', \"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css\", '', false );\n\t\twp_enqueue_script( 'BSP-admin-config', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/config.js' );\n\t\twp_enqueue_script( 'BSP-admin-script', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/functions.js', array('jquery', 'toastr', 'media-upload'));\n\n\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "function iron_code_cake_block_enqueue_front_end_js() {\n\tif ( is_admin() ) {\n\t\t// We are on the back-end, do NOT enqueue JavaScript.\n\t\treturn;\n\t}\n\twp_enqueue_script( 'iron-code-cake-block-front-end' );\n}", "function enqueue(){\r\n\t\t\r\n\t\twp_enqueue_script(\r\n\t\t\t'vibe-opts-field-import-export-js', \r\n\t\t\tVIBE_OPTIONS_URL.'fields/import_export/field_import_export.js', \r\n\t\t\tarray('jquery'),\r\n\t\t\ttime(),\r\n\t\t\ttrue\r\n\t\t);\r\n\t\t\r\n\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array('jquery'), BRAND_VER );\n\t\t\twp_enqueue_style('jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css');\n\t\t\twp_enqueue_style('jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css');\n\n\t\t}", "function tac_script_enqueuer() {\n\tif ( ! is_admin() ) {\n\t\t// Site.\n\t\twp_register_script( 'tac_main', get_stylesheet_directory_uri() . '/js/main.js', array( 'jquery' ), null, true );\n\t\twp_enqueue_script( 'tac_main' );\n\t};\n}", "public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }", "function aesir_enqueue_files() {\n /**\n * Only load if on the website\n */\n if (!is_admin()) {\n /**\n * Load the styles like this:\n * wp_enqueue_style( $handle, $src, $deps, $ver, $media );\n */\n wp_enqueue_style('main', AESIR_ASSETS_CSS . '/style.css', null, AESIR_CSS_VERSION);\n\n /**\n * Load the scripts like this:\n * wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );\n */\n wp_enqueue_script('main', AESIR_ASSETS_JS . '/build.min.js', array('jquery'), AESIR_JS_VERSION, true);\n }\n}", "public function enqueue_scripts () {\n wp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/script.js', array( 'jquery' ), $this->_version );\n // Localize the script with new data\n\n $url = admin_url('admin-ajax.php');\n wp_localize_script( $this->_token . '-frontend', 'ajax_url', $url );\n wp_enqueue_script( $this->_token . '-frontend' );\n }", "public function customize_preview_enqueue_deps()\n {\n }", "abstract public function enqueue($Job, $priority = null);", "public function enqueue( $offset );", "public function _adminbar(WP_Admin_Bar $admin_bar)\n\t{\n\t\tif(!current_user_can(self::REQUIRED_CAP))\n\t\t\treturn;\n\t\t\n\t\t$valid = XLII_Cache::isValid() !== false || defined('CACHE_DEBUG') && CACHE_DEBUG;\n\t\t\n\t\t// -- Add primary node\n\t\tif($valid)\n\t\t{\n\t\t\t$title = __('Cache', 'xlii-cache');\n\t\t\t\n\t\t\t// -- Track auto flushing\n\t\t\t$queue = XLII_Cache::getQueue();\n\t\t\t$queue = !$queue ? get_option(self::OPTION_NAME . '_' . get_current_user_id()) : $queue;\n\t\n\t\t\tif($queue)\n\t\t\t{\n\t\t\t\tif(is_array($queue) && count($queue))\n\t\t\t\t{\n\t\t\t\t\t$admin_bar->add_menu( array( \n\t\t\t\t\t\t'id' => 'varnish-cache-flushed',\n\t\t\t\t\t\t'parent' => 'varnish-cache',\n\t\t\t\t\t\t'title' => __('Flushed pages', 'xlii-cache')\n\t\t\t\t\t));\n\t\t\t\t\n\t\t\t\t\tasort($queue);\n\t\t\t\t\n\t\t\t\t\tforeach($queue as $i => $key)\n\t\t\t\t\t{\n\t\t\t\t\t\t$label = apply_filters('cache_label_flushed', str_replace(home_url(''), '', $key));\n\t\t\t\t\t\t$label = !$label || $label == '/' ? __('Home', 'theme') : $label;\n\t\t\t\t\t\t$label = substr($label, 0, 37) . (strlen($label) > 40 ? '...' : '');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$admin_bar->add_menu( array( \n\t\t\t\t\t\t\t'id' => 'varnish-cache-flushed-' . $i,\n\t\t\t\t\t\t\t'parent' => 'varnish-cache-flushed',\n\t\t\t\t\t\t\t'title' => $label,\n\t\t\t\t\t\t\t'href' => $key\n\t\t\t\t\t\t));\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t\t$title = __('Flushed', 'xlii-cache') . ' <span style = \"font-size:0.8em;\">(' . count($queue) . ')</span>';\n\t\t\t\t}\n\t\t\t\telse if($queue)\n\t\t\t\t{\n\t\t\t\t\t$title = __('Flushed', 'xlii-cache') . ' <span style = \"font-size:0.8em;\">(' . __('all', 'xlii-cache') . ')</span>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdelete_option(self::OPTION_NAME . '_' . get_current_user_id());\n\t\t\t}\n\t\t\n\t\t\t$admin_bar->add_menu( array( \n\t\t\t\t'id' => 'varnish-cache',\n\t\t\t\t'title' => $title\n\t\t\t));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$admin_bar->add_menu( array( \n\t\t\t\t'id' => 'varnish-cache',\n\t\t\t\t'title' => __('Unable to decect cache', 'xlii-cache')\n\t\t\t));\t\n\t\t}\n\n\t\t// -- Build support\n\t\t\n\t\tif(is_network_admin())\n\t\t{\n\t\t\t$this->_adminbarNetwork($admin_bar);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$context = $this->_adminbarFlush($admin_bar);\n\t\t\t\n\t\t\tdo_action('xlii_cache_admin_bar_menu', $admin_bar, $context);\n\t\t}\n\t}" ]
[ "0.7489904", "0.7355149", "0.7335404", "0.7335404", "0.7335404", "0.7335404", "0.7335404", "0.7335404", "0.70636547", "0.6839209", "0.67860997", "0.67112267", "0.64664257", "0.6376651", "0.6367604", "0.63494235", "0.63432", "0.6330326", "0.62807083", "0.6259394", "0.6226296", "0.62252843", "0.61855227", "0.6180606", "0.61802024", "0.6152027", "0.61320275", "0.60703796", "0.6048516", "0.60358983", "0.60067326", "0.5965859", "0.59556437", "0.5948675", "0.5946625", "0.5938101", "0.59353805", "0.5934405", "0.59296286", "0.5906873", "0.5898423", "0.58872384", "0.58858836", "0.58774805", "0.5863495", "0.5835567", "0.5835567", "0.582032", "0.5819059", "0.58161163", "0.5810559", "0.5799537", "0.5779891", "0.57702297", "0.5766116", "0.5734286", "0.57234436", "0.5714032", "0.5704874", "0.5702625", "0.5702625", "0.57011175", "0.57011175", "0.5691167", "0.56880486", "0.5676747", "0.56704485", "0.56704485", "0.5668647", "0.5647938", "0.5647776", "0.56476516", "0.5637605", "0.5636014", "0.5633486", "0.5624199", "0.56094104", "0.5603519", "0.5601413", "0.55921334", "0.55789477", "0.5570627", "0.5565625", "0.5563914", "0.5560782", "0.5548064", "0.55419505", "0.55402267", "0.55402267", "0.55402267", "0.55359983", "0.5532454", "0.5532098", "0.55305696", "0.5520449", "0.5520047", "0.5517337", "0.55121857", "0.5508485", "0.5502863", "0.550046" ]
0.0
-1
Defined the SRC of the file.
public function src( string $src ): self { $this->src = $src; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSrc();", "public function getSrc()\n {\n return $this->src;\n }", "public function getSrc()\n {\n return $this->src;\n }", "public function getSrc()\n {\n $value = $this->get(self::SRC);\n return $value === null ? (string)$value : $value;\n }", "public function getSrcPath()\n {\n return $this->getSettingArray()[\"src_path\"];\n }", "public function getSrc(): string {\n return $this->attributes()->getValue('src');\n }", "function actionSource() {\r\n\r\n\t\t\t// Get the basename of the file\r\n\t\t\t$file = $_GET['id'];\r\n\r\n\t\t\t// Filepath should start with the directory of this file\r\n\t\t\t$basePath = strtolower( dirname( __FILE__ ) );\r\n\t\t\t$filePath = strtolower( dirname( realpath( $_GET['id'] ) ) );\r\n\r\n\t\t\t// Check if the file is in the right directory\r\n\t\t\tif ( substr( $filePath, 0, strlen( $basePath ) ) != $basePath ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if the file exists\r\n\t\t\tif ( ! is_file( $file ) ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Show the highlighted source\r\n\t\t\t$this->template->assign( 'file', $file );\r\n\t\t\t$this->template->assign( 'source', highlight_file( $file, 1 ) );\r\n\r\n\t\t\t// Output the template\r\n\t\t\t$this->template->display();\r\n\r\n\t\t}", "function ImageSRC()\n\t{\treturn $this->imagelocation . (int)$this->id . \".jpg\";\n\t}", "public function getAbsoluteSrc();", "function getSourceFile() ;", "public function src($value = null){\n return $this->attr(ATTR_SRC, $value);\n }", "public function getSource()\n\t{\n\t\treturn file_get_contents($this->file);\n\t}", "public function get_source()\n {\n }", "function getSourceFilePath()\n {\n return $this->sourceFilePath;\n }", "public function getSource()\n {\n return Yii::$app->storage->fileAbsoluteHttpPath($this->filter_id . '_' . $this->file->name_new_compound);\n }", "public static function getSourceFilePath() {\n\n return get_option( 'geb_gfe_uploaded_template' );\n }", "public function getSource() {}", "public function getSource() {}", "public function getSrc(): string {\n return (string) $this->getAttribute('src');\n }", "public function source();", "public function source();", "public function source();", "function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }", "public function getSource()\n {\n }", "public function getResource();", "public function getResource();", "public function getResource();", "public function getResource();", "public function getResource();", "public function getResource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "function getSource() ;", "function getTargetFile() ;", "function open($src)\r\n {\r\n $this->source = $src;\r\n \r\n if(empty($this->source))\r\n {\r\n $this->error = \"Source file not specified\";\r\n return;\r\n }\r\n \r\n if($lines = @file($this->source))\r\n {\r\n $this->content = implode(\"\",$lines);\r\n $this->lines = $lines;\r\n }\r\n else\r\n {\r\n //failure\r\n $this->error = \"Could not read file\";\r\n return;\r\n }\r\n }", "function src($file, $dir = null, $ext = null, $version = null)\n{\n if ($ext !== null) {\n $file .= '.' . $ext;\n }\n if ($dir !== null) {\n $file = $dir . '/' . $file;\n }\n return web_path_to($file) . ($version ? '?v='. $version : '');\n}", "public function src(){\n return $this->imageFirstInContent;\n }", "public function getSource()\n {\n return 'media';\n }", "public function getSource()\n\t{\n\t\treturn '';\n\t}", "abstract public function getSource();", "public function setSrc($value)\n {\n return $this->set(self::SRC, $value);\n }", "public function sourceFile() {\n return $this->loader\n ? $this->loader->getResourceAsStream(strtr($this->name, '.', '/').'/package-info.xp')\n : NULL\n ;\n }", "public function getSource()\n {\n return 'ubicacion';\n }", "public function getSource(): string\n\t{\n\t\tif (is_null($this->source))\n\t\t{\n\t\t\t$pattern = $this->getPattern();\n\n\t\t\t// Match the correct source file\n\t\t\t$files = glob($pattern);\n\t\t\t$file = reset($files);\n\t\t\tif (! $file || ! is_file($file))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Source file missing: ' . $pattern);\t\t\t\n\t\t\t}\n\n\t\t\t$this->source = $file;\n\t\t}\n\n\t\treturn $this->source;\n\t}", "public function __construct()\r\r\n\t{\r\r\n\t\tparent::__construct();\r\r\n\t\t$this->strFile = preg_replace('@^/+@', '', str_replace('%20', ' ' , $this->Input->get('src')));\r\r\n\t}", "function source(string $src, string $type = 'unknown', string $attributes = '', bool $indexPage = false): string\n {\n if (! _has_protocol($src)) {\n $src = $indexPage === true ? site_url($src) : slash_item('baseURL') . $src;\n }\n\n $source = '<source src=\"' . $src\n . '\" type=\"' . $type . '\"';\n\n if (! empty($attributes)) {\n $source .= ' ' . $attributes;\n }\n\n return $source . _solidus() . '>';\n }", "function getSrcVarName() {\n return $this->srcVarName;\n }", "function ThumbSRC()\n\t{\treturn $this->imagelocation . \"thumbs/\" . (int)$this->id . \".jpg\";\n\t}", "public function getFileUrl()\n {\n\n return get_bloginfo('url') . \"/\" . $this->getFileName();\n\n }", "public function getResource() {}", "public function getSource()\n {\n return 'image';\n }", "public function file()\n\t{\n\t\treturn csscrush_file(\n\t\t\t$this->filename, \n\t\t\t$this->get_params(FALSE, array('filename', 'attributes'))\n\t\t);\n\t}", "public function getFileBaseUrl()\n {\n return Mage::getBaseUrl('media').'invitationstatus'.'/'.'file';\n }", "public function getFileBaseUrl()\n {\n return Mage::getBaseUrl('media').'family'.'/'.'file';\n }", "public function getSource(): string;", "public function getSource()\n {\n return 'upload';\n }", "public function setImageSourcePath($strSource = NULL) {\r\n\t\t\t$this->objParent->source_path = __SITE_ROOT__ . str_replace(__SITE_ROOT__, \"\", $strSource);\t \r\n\t\t }", "public function get_source() {\n\t\treturn $this->source;\n\t}", "public function getImgSRC()\n {\n return $this->imgSRC;\n }", "function src_inc_js(string $file) : string{\n return \"<script type='text/javascript' src='\".$file.\"'></script>\";\n}", "public function source(string $source);", "function get_file()\n\t{\n\t\treturn $this->file;\n\t}", "public function getUrl(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }", "public function get_file() {\n\t\treturn __FILE__;\n\t}", "public function source() {\n return $this->source;\n }", "public function getImageSrc()\n {\n return $this->imageSrc;\n }", "private function getImageSourcePath()\r\n {\r\n // check if relative\r\n if(substr($this->_imagesource, 0, 2) == \"..\" || $this->_imagesource{0} == \".\")\r\n {\r\n return dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $this->_imagesource;\r\n }\r\n else\r\n {\r\n return $this->_imagesource;\r\n }\r\n }", "public function getSource(): string\n {\n return $this->source;\n }", "public function getSource(): string\n {\n return $this->source;\n }", "public function source()\n {\n return $this->source;\n }", "protected function file($source)\n {\n return '@' . realpath($source);\n }", "function image (&$src) {\n\t // Check only if STS is enabled.\n if (MODULE_STS_DEFAULT_STATUS==\"true\" && $this->is_button ==false)\n if (file_exists(STS_TEMPLATE_DIR . $src)) $src = STS_TEMPLATE_DIR . $src;\n\t\t$this->is_button = false;\n\t}", "protected function get_file() {\n\n\t\treturn __FILE__;\n\t}", "public function setSrc(string $src) {\n $this->attributes()->set('src', $src);\n return $this;\n }", "public static function getFile(){\n\t\t$file_name = base_path().\"/resources/views/DURC/durc_html.mustache\";\n\t\treturn($file_name);\n\t}", "public function hasSrc()\n {\n return $this->get(self::SRC) !== null;\n }", "private function __fileContent()\n {\n return VIEWS . DS . $this->__paths['controller'] . DS . $this->__paths['action'] . '.php';\n }", "public function source()\n\t{\n\t\treturn $this->source;\n\t}", "function getImageSource() {return $this->_imagesource;}", "public function src($src)\n\t{\n\t\treturn $this->media($src);\n\t}", "public function render()\n\t{\n\t\t// get stylehseet base & source\n\t\t$base = (isset($this->params->base)) ? strtolower($this->params->base) : 'uploads';\n\t\t$source = (isset($this->params->source)) ? trim($this->params->source) : null;\n\n\t\t// if we want base to be template,\n\t\t// shortcut to template/assets/css folder\n\t\tif ($base == 'template')\n\t\t{\n\t\t\t$base = 'template' . DS . 'assets' . DS . 'js';\n\t\t}\n\n\t\t// we must have a source\n\t\tif ($source === null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// get download path for source (serve up file)\n\t\tif ($path = $this->group->downloadLinkForPath($base, $source))\n\t\t{\n\t\t\t// add stylsheet to document\n\t\t\t\\Document::addScript($path);\n\t\t}\n\t}", "protected function getTargetFile(){\n return $this->target_file;\n }", "public function getSourceFilePath(): string\n {\n $basePath = 'app/DataTransferObjects';\n if ($this->getDir()) {\n $basePath = $basePath.'/'.$this->getDir();\n }\n return base_path($basePath).'/'.$this->name.'.php';\n }", "public function setSrc($src) {\n\t\t$this->src = $src;\n\n\t\treturn $this;\n\t}", "public function load() {\n if ($this->cat === \"url\" && !file_exists($this->sourcepath)) Path::download($this->originalName, $this->sourcepath);\n }", "public function getUrl( $file );", "public function getSource()\n {\n return 'lab';\n }", "function getTargetFileName() ;", "public function getSource(){\n\t\treturn $this->_source;\n\t}", "public function source()\n\t{\n\t\treturn $this->_source;\n\t}", "public function setDataSrc($src)\n {\n $this->_dataSrc = $src;\n }", "public function get_file()\n {\n return $this->file;\n }", "public function getSourcePath()\n {\n return $this->sourcePath;\n }", "public function getSourceFile(): string\n {\n return $this->getStubContents($this->getStubPath(), $this->getStubVariables());\n }", "public function getResourcePath();", "function getSource()\n {\n return $this->source;\n }", "public function GetSourceResource()\n {\n return $this->_sourceResource;\n }" ]
[ "0.74343467", "0.7220371", "0.7220371", "0.7126886", "0.69427335", "0.693428", "0.6706327", "0.66945803", "0.6653393", "0.6605621", "0.65646327", "0.6542228", "0.64854103", "0.64592737", "0.6443993", "0.63784516", "0.6377248", "0.6377248", "0.63754797", "0.63517654", "0.63517654", "0.63517654", "0.6319281", "0.6314445", "0.62826455", "0.62826455", "0.62826455", "0.62826455", "0.62826455", "0.62826455", "0.62191594", "0.62191594", "0.62191594", "0.62191594", "0.62191594", "0.6215211", "0.6174616", "0.6155834", "0.61551255", "0.6147248", "0.6110587", "0.609673", "0.6096244", "0.60951245", "0.6064893", "0.6028107", "0.6024234", "0.6016347", "0.6012041", "0.60084736", "0.5977507", "0.59664303", "0.59619546", "0.59464663", "0.5939212", "0.5930211", "0.59287316", "0.5911993", "0.58909595", "0.58880544", "0.5882161", "0.58801544", "0.5876477", "0.58670956", "0.58521754", "0.5840495", "0.58377534", "0.5824731", "0.58196586", "0.58145285", "0.5795874", "0.5795874", "0.57921046", "0.5788436", "0.5785724", "0.5782579", "0.5775215", "0.5750444", "0.57443327", "0.5730672", "0.57262725", "0.5724906", "0.5724559", "0.5718139", "0.5690579", "0.5687999", "0.56816804", "0.56813776", "0.56781006", "0.56727546", "0.5670603", "0.5669538", "0.56596863", "0.56570953", "0.56569797", "0.5614508", "0.5608977", "0.56052965", "0.56051075", "0.5589157" ]
0.60868573
44
Defined the Dependencies of the enqueue.
public function deps( string ...$deps ): self { $this->deps = $deps; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customize_preview_enqueue_deps()\n {\n }", "function enqueue(){\n\t\t}", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function getPostDependencies()\n\t{\n\t\treturn array( 'TablesCreateMShop', 'OrderAlterForeignKeyContraintsOnDelete' );\n\t}", "public function get_dependencies()\n\t{\n\t\treturn array();\n\t}", "public function enqueue() {\n\t}", "public function getDependencies() {}", "public function getPostDependencies()\n\t{\n\t\treturn [];\n\t}", "public function getPostDependencies()\n\t{\n\t\treturn [];\n\t}", "public function getDependencies();", "public function getDependencies()\n {\n return null;\n }", "function GetDependencies() {\n\t\treturn array();\n\t}", "public function getDependencies()\n {\n return [UsersFixture::class,ThreadsFixture::class];\n }", "public function getPostDependencies()\n\t{\n\t\treturn array( 'MShopAddTypeData' );\n\t}", "public static function enqueue();", "public function getDependencies()\n {\n return [LoadProductData::class, LoadCategoryData::class];\n }", "public function getDependencies()\n {\n return [];\n }", "public function getPreDependencies()\n\t{\n\t\treturn array( 'MShopAddTypeDataDefault' );\n\t}", "public function getDependencies(){ return array(); }", "public function getDependencies()\n {\n $dependencies = array();\n if ($this->extendsClassDefinition) {\n $classDefinition = $this->extendsClassDefinition;\n if (method_exists($classDefinition, 'increaseDependencyRank')) {\n $dependencies[] = $classDefinition;\n }\n }\n\n if ($this->implementedInterfaceDefinitions) {\n foreach ($this->implementedInterfaceDefinitions as $interfaceDefinition) {\n if (method_exists($interfaceDefinition, 'increaseDependencyRank')) {\n $dependencies[] = $interfaceDefinition;\n }\n }\n }\n return $dependencies;\n }", "function GetDependencies()\n {\n return array();\n }", "public function getDependencies()\n {\n return $this->dependencies;\n }", "public function getDependencies()\n {\n return $this->dependencies;\n }", "public function getDependencies()\n {\n return $this->dependencies;\n }", "public function getDependencies()\n {\n return $this->dependencies;\n }", "public function set_up_dependencies () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\t\tadd_action('admin_enqueue_scripts', array($this, 'enqueue_dependencies'));\n\t}", "public function getPreDependencies()\n\t{\n\t\treturn array( 'OrderRenameTables', 'OrderServiceAttributeAddPrimaryKey' );\n\t}", "public function getDependencies() {\n\t\treturn $this->dependencies;\n\t}", "public static function getDependencies()\n {\n return [];\n }", "public static function getDependencies()\n {\n return [];\n }", "private function load_dependencies()\n {\n global $wp_queue;\n\n if (empty($wp_queue)) {\n $wp_queue = new WP_Queue();\n }\n\n // fire up the loader\n $this->loader = new MailChimp_WooCommerce_Loader();\n\n // change up the queue to use the new rest api version\n $service = new MailChimp_WooCommerce_Rest_Api();\n $this->loader->add_action( 'rest_api_init', $service, 'register_routes');\n }", "public function getDependencies(): array;", "public function getPreDependencies()\n\t{\n\t\treturn array( 'TablesCreateMShop' );\n\t}", "public function getPreDependencies()\n\t{\n\t\treturn array( 'TablesCreateMShop' );\n\t}", "public function setDependencies($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Helmgate\\Dependency::class);\n $this->dependencies = $arr;\n\n return $this;\n }", "function getDepends() {\n return $this->depends;\n }", "public function getDependencies(): array\n {\n return $this->dependencies;\n }", "public function getDependencies(): array\n {\n return $this->dependencies;\n }", "public function enqueue_dependencies () {\n\t\tif (!Upfront_Permissions::current(Upfront_Permissions::BOOT)) wp_die(\"Nope.\");\n\n\t\tif (!class_exists('Thx_Sanitize')) require_once (dirname(__FILE__) . '/class_thx_sanitize.php');\n\t\tif (!class_exists('Thx_Template')) require_once (dirname(__FILE__) . '/class_thx_template.php');\n\n\t\tif (!class_exists('Upfront_Thx_Builder_VirtualPage')) require_once (dirname(__FILE__) . '/class_thx_endpoint.php');\n\n\t\t$tpl = Thx_Template::plugin();\n\n\t\twp_enqueue_style('create_edit', $tpl->url('css/create_edit.css'));\n\n\t\twp_enqueue_script('create_edit', $tpl->url('js/create_edit.js'), array('jquery'));\n\t\twp_localize_script('create_edit', '_thx', array(\n\t\t\t'editor_base' => esc_url(Upfront_Thx_Builder_VirtualPage::get_url(\n\t\t\t\tUpfront_Thx_Builder_VirtualPage::get_initial_url()\n\t\t\t)),\n\t\t\t'action_slug' => Upfront_Thx_Builder_VirtualPage::get_initial_url(),\n\t\t\t'admin_ajax' => admin_url('admin-ajax.php'),\n\t\t\t'l10n' => array(\n\t\t\t\t'oops' => __('Oops, something went wrong with processing your request.', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'start_building' => __('Start Building', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'checking' => __('Checking...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'creating' => __('Creating...', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'select_media' => __('Select or Upload Media Of Your Chosen Persuasion', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'use_media' => __('Use this media', UpfrontThemeExporter::DOMAIN),\n\t\t\t\t'loading' => __('Loading data...', UpfrontThemeExporter::DOMAIN),\n\t\t\t),\n\t\t));\n\n\t\twp_enqueue_media();\n\t}", "function get_dependencies();", "public function getDependencies(): array\r\n {\r\n return [\r\n ];\r\n }", "public function dependencies()\n {\n return $this->bundle['dependencies'] ?? [];\n }", "private function load_dependencies() {\n\n\t\t$this->loader = new Loader();\n\t\t$TSB_hooks_loader = new Init_Functions();\n\t\t$this->loader->add_action( 'init', $TSB_hooks_loader, 'app_output_buffer' );\n\n//\t\t$this->loader->add_action( 'init', \t$TSB_hooks_loader, 'remove_admin_bar' );\n\n\t}", "function getDependencies()\n {\n return [\n TaskFixtures::class\n ];\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'chat',\n 'mysql',\n ),\n 'recommends' => array(\n ),\n 'conflicts_with' => array()\n );\n }", "public function getDependencies()\n {\n return [\n 'Elcodi\\Bundle\\StoreBundle\\DataFixtures\\ORM\\StoreData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\ProductSizeData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\ProductData',\n ];\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "public function getDependencies(): array\r\n {\r\n return [\r\n UserFixture::class,\r\n SalesTaskTypeFixture::class,\r\n SalesTaskStatusFixture::class,\r\n SalesWallFixture::class,\r\n ];\r\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function getDependencies()\n {\n return [\n 'Elcodi\\Bundle\\StoreBundle\\DataFixtures\\ORM\\StoreData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\PrintSideData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\ProductColorsData',\n ];\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'wiki',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'iotds',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'Conversr',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "private function receiveDependecies()\n {\n $dependencyReceiver = new ConsoleDependencyReceiver($this);\n $dependencyReceiver->buildWithAllDependencies();\n }", "public function getDependencies()\n {\n return [\n 'invokables' => [\n ],\n 'factories' => [\n ],\n ];\n }", "public function getDependencies() : array\n {\n return [\n 'delegators' => [\n \\Mezzio\\Application::class => [\n RoutesDelegator::class,\n ],\n ],\n 'invokables' => [\n ],\n 'factories' => [\n Handler\\ElementsReadHandler::class => Handler\\ElementsReadHandlerFactory::class,\n ],\n ];\n }", "public function active_dependencies(): Collection;", "public function getDependencies()\n {\n return array_merge(parent::getDependencies(), array(TravelFixtures::class));\n }", "public function enqueue() {\n\t\t\tstatic $enqueued = false;\n\n\t\t\t//Don't enqueue more than once\n\t\t\tif ( $enqueued ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$enqueued = true;\n\t\t\t// Set up min files for dev_mode = false.\n\t\t\t$min = Redux_Functions::isMin();\n\n\t\t\t// Field dependent JS\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-css_layout-js',\n\t\t\t\t$this->extension_url . 'field_css_layout' . $min . '.js',\n\t\t\t\tarray( 'jquery', 'wp-color-picker', 'select2-js' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style( 'select2-css' );\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-color-picker-css',\n\t\t\t\tReduxFramework::$_url . 'assets/css/color-picker/color-picker.css',\n\t\t\t\tarray( 'wp-color-picker' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-css_layout-css',\n\t\t\t\t$this->extension_url . 'field_css_layout.css',\n\t\t\t\tarray(),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function public_enqueues() {\n wp_enqueue_style(\n 'wfc-preloader-css',\n WFC_PL_CSS . '/preloader.css'\n );\n\n wp_enqueue_script(\n 'wfc-preloader-js',\n WFC_PL_JS . '/preloader.js',\n array('jquery'),\n '',\n true\n );\n\n $wfc_preloader_enable = wfc_toolkit_get_option( 'enable_preloader' ) ? 1 : 0;\n $wfc_preloader_image_id = wfc_toolkit_get_option( 'preloader_spinner_image' );\n $wfc_preloader_background_color = wfc_toolkit_get_option( 'preloader_background', '#000000' );\n wp_localize_script(\n 'wfc-preloader-js',\n 'wfc_preloader',\n array(\n 'enable' => $wfc_preloader_enable, \n 'image' => $wfc_preloader_image_id,\n 'background_color' => $wfc_preloader_background_color,\n 'is_preload' => $this->genesis_preloader_load(true) !== null ? 1 : 0\n )\n );\n }", "public function getDependencies()\n {\n return array( ProjetFixtures::class,\n DevisFixture::class,\n );\n }", "public function getDependencies(): array\n {\n return [StatusFixtures::class, ToDoListFixtures::class];\n }", "public function enqueue () {\n\t\t \n\t\t \n\t\t $min = Redux_Functions::isMin();\n\t\t \n\t\t \twp_enqueue_script(\n 'redux-field-media-js',\n ReduxFramework::$_url . 'inc/fields/media/field_media' . $min . '.js',\n array( 'jquery', 'redux-js' ),\n time(),\n true\n );\n\n wp_enqueue_style (\n 'redux-field-media-css', \n ReduxFramework::$_url . 'inc/fields/media/field_media.css', \n time (), \n true\n );\n\n wp_enqueue_script (\n 'redux-field-super-search-js', \n $this->extension_url . 'field_super_search.js', \n array( 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker', 'redux-field-media-js' ), \n time (), \n true\n );\n\t\t\t\n wp_enqueue_style (\n 'redux-field-super-search-css', \n $this->extension_url . 'field_super_search.css', \n time (), \n true\n );\n }", "protected function getEnqueuingScripts() { \r\n\t\treturn array(\r\n\t\t\t// array( 'src'\t=> dirname( __FILE__ ) . '/js/jquery.knob.js', 'dependencies'\t=> array( 'jquery' ) ),\r\n\t\t);\r\n\t}", "public function getDependencies()\n {\n return array(\n new ModuleDependency('files'),\n new ModuleDependency('user'),\n new ModuleDependency('db'),\n new ModuleDependency('orm'),\n new ModuleDependency('scriptcollector'),\n new ModuleDependency('search'),\n new ModuleDependency('word')\n );\n }", "public function enqueue($handles)\n {\n }", "public function getDependenciesList();", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core plugin.\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'includes/class-facebook-stats-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining internationalization functionality\n\t\t * of the plugin.\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'includes/class-facebook-stats-i18n.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'admin/class-facebook-stats-admin.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public-facing\n\t\t * side of the site.\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'public/class-facebook-stats-public.php';\n\n\t\t$this->loader = new Facebook_Stats_Loader();\n\n\t}", "public function mergeDependencies()\n {\n $this->dependencies = array_merge($this->dependencies, $this->commonDependencies);\n }", "public function getDependencies()\n {\n return array(\n SiteFixtures::class,\n );\n }", "public function getDependencies(): DependencyCollection;", "function enqueue ($entry) {\n\n}", "public static function dependsOn(): iterable;", "public function getDependencies()\n {\n return [CategoryFixtures::class, StateFixtures::class, UserFixtures::class, CountyFixtures::class,];\n }", "public function getDependencies()\n {\n // Get our interfaces\n $result = $this->extends;\n\n // We got an error that this is nor array, weird but build up a final frontier here\n if (!is_array($result)) {\n $result = array($result);\n }\n\n return $result;\n }", "public function getDependencies()\n {\n return [\n EstabelecimentoFixture::class\n ];\n }", "public function getDependencies()\n {\n return [\n 'factories' => [\n Action\\GetProducts::class => Action\\GetProductsFactory::class,\n Action\\GetProduct::class => Action\\GetProductFactory::class,\n ],\n ];\n }", "function getDependencies()\n {\n return [\n AddressFixtures::class,\n ContactFixtures::class\n ];\n }", "function __construct(){\n\n\t\t\t$this->enqueues();\n\n\t\t}", "protected function recurse_deps($queue, $handle)\n {\n }", "public function getDependencies()\n {\n return [\n UserFixture::class,\n DomaineFixture::class\n ];\n }", "public function getDependencyList()\n {\n return $this->dependencyList;\n }", "public function getDependencies()\n {\n return array(\n MachineFixtures::class,\n NetworkFixtures::class,\n UserFixtures::class,\n );\n }", "public function getDependencies()\n {\n if (!$this->isDependenciesLoaded)\n {\n $db = Codeli::getInstance()->getDB();\n\n $this->dependencies = array();\n\n $results = $db->query(\"SELECT * FROM \" . SystemTables::MODULE_DEPENDENCY . \" WHERE guid='::guid'\", array(\"::guid\" => $this->guid));\n\n while ($res = $db->fetchObject($results))\n {\n $this->dependencies[$res->dependencyGuid] = $res;\n }\n\n $this->isDependenciesLoaded = true;\n }\n\n return $this->dependencies;\n }", "public function getDependencies()\n {\n return array(\n DoctorFixtures::class,\n );\n // TODO: Implement getDependencies() method.\n }", "public function getDependency() {\r\n\t\r\n\t}", "public function getDependencies(): array\n {\n return [ToDoListFixtures::class];\n }", "public function getPrerequisites(): array\n {\n return [];\n }", "public function getPrerequisites(): array\n {\n return [];\n }", "public function getDependencies()\n {\n return [\n UserFixtures::class,\n EmployeeFixtures::class,\n MaterialFixtures::class\n ];\n }", "public function getDependencies()\n {\n return [\n UserFixtures::class,\n VehicleFixtures::class,\n ];\n }", "public function getDependencies(): array\n {\n return [ArticleFixtures::class, UserFixtures::class];\n }", "public function getDependencies(): array\n {\n return [QuestionFixtures::class, UserFixtures::class];\n }" ]
[ "0.6661258", "0.6501858", "0.6438912", "0.6438912", "0.6438912", "0.6438912", "0.6438912", "0.6438912", "0.6378945", "0.6352184", "0.63490283", "0.6341847", "0.62707627", "0.62707627", "0.6143019", "0.6140042", "0.61223716", "0.60858876", "0.6080296", "0.6077473", "0.60695755", "0.60346186", "0.6027407", "0.60110265", "0.5991938", "0.59845144", "0.5953598", "0.5953598", "0.5953598", "0.5953598", "0.59276944", "0.59162503", "0.58910495", "0.5886906", "0.5886906", "0.5829955", "0.58264977", "0.582546", "0.582546", "0.57984555", "0.5780199", "0.5773197", "0.5773197", "0.57415026", "0.5721101", "0.571363", "0.5698296", "0.56702024", "0.566542", "0.5651308", "0.56277263", "0.56076044", "0.56021434", "0.5587487", "0.5587487", "0.5587487", "0.5581164", "0.55773616", "0.5571478", "0.5568602", "0.5541871", "0.553726", "0.5524149", "0.5513746", "0.5511651", "0.5501459", "0.5491028", "0.549018", "0.5489909", "0.5486677", "0.5469962", "0.5457741", "0.5447597", "0.54454035", "0.54452693", "0.54307365", "0.54305553", "0.5427468", "0.5425637", "0.54140615", "0.5403761", "0.53942597", "0.53938055", "0.5373301", "0.53711677", "0.53710824", "0.53638065", "0.53478414", "0.534222", "0.53411484", "0.53337675", "0.5323924", "0.5311388", "0.5311243", "0.5305701", "0.5298499", "0.5298499", "0.5296309", "0.5293942", "0.52937067", "0.5292712" ]
0.0
-1
Defined the version of the enqueue
public function ver( string $ver ): self { $this->ver = $ver; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function enqueue();", "function enqueue(){\n\t\t}", "public function enqueue() {\n\t}", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "function enqueue ($entry) {\n\n}", "public function enqueue_uploader()\n {\n }", "function enqueue_package_class( $class_name, $version, $path ) {\n\t\tglobal $jetpack_packages_classes;\n\n\t\tif ( ! isset( $jetpack_packages_classes[ $class_name ] ) ) {\n\t\t\t$jetpack_packages_classes[ $class_name ] = array(\n\t\t\t\t'version' => $version,\n\t\t\t\t'path' => $path,\n\t\t\t);\n\t\t}\n\t\t// If we have a @dev version set always use that one!\n\t\tif ( 'dev-' === substr( $jetpack_packages_classes[ $class_name ]['version'], 0, 4 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Always favour the @dev version. Since that version is the same as bleeding edge.\n\t\t// We need to make sure that we don't do this in production!\n\t\tif ( 'dev-' === substr( $version, 0, 4 ) ) {\n\t\t\t$jetpack_packages_classes[ $class_name ] = array(\n\t\t\t\t'version' => $version,\n\t\t\t\t'path' => $path,\n\t\t\t);\n\n\t\t\treturn;\n\t\t}\n\t\t// Set the latest version!\n\t\tif ( version_compare( $jetpack_packages_classes[ $class_name ]['version'], $version, '<' ) ) {\n\t\t\t$jetpack_packages_classes[ $class_name ] = array(\n\t\t\t\t'version' => $version,\n\t\t\t\t'path' => $path,\n\t\t\t);\n\t\t}\n\t}", "public function enqueue( $offset );", "function queue_enqueue(&$queue, $value) { \n // We are just adding a value to the end of the array, so can use the \n // [] PHP Shortcut for this. It's faster than using array_push \n $queue[] = $value; \n}", "public function Queues();", "public function customize_preview_enqueue()\n {\n }", "protected function _syncProducer() {}", "abstract public function enqueue($Job, $priority = null);", "function acf_enqueue_uploader()\n {\n }", "public function enqueue($value) {\n $this->add($value);\n }", "public function enqueue () {\n\t\t \n\t\t \n\t\t $min = Redux_Functions::isMin();\n\t\t \n\t\t \twp_enqueue_script(\n 'redux-field-media-js',\n ReduxFramework::$_url . 'inc/fields/media/field_media' . $min . '.js',\n array( 'jquery', 'redux-js' ),\n time(),\n true\n );\n\n wp_enqueue_style (\n 'redux-field-media-css', \n ReduxFramework::$_url . 'inc/fields/media/field_media.css', \n time (), \n true\n );\n\n wp_enqueue_script (\n 'redux-field-super-search-js', \n $this->extension_url . 'field_super_search.js', \n array( 'jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker', 'redux-field-media-js' ), \n time (), \n true\n );\n\t\t\t\n wp_enqueue_style (\n 'redux-field-super-search-css', \n $this->extension_url . 'field_super_search.css', \n time (), \n true\n );\n }", "function __construct(){\n\n\t\t\t$this->enqueues();\n\n\t\t}", "abstract public function version();", "abstract public function version();", "public function enqueue_graphiql()\n {\n }", "public function getNextQueuedJob() {\n \t}", "function enqueue_form()\n {\n }", "function syncAddonWithQueue($params)\n {\n dispatch(new SyncAddons($params));\n }", "public function getQueue();", "public function getQueue();", "public function queue(): string\n {\n return $this->queue;\n }", "public function enqueue() {\n\t\t\tstatic $enqueued = false;\n\n\t\t\t//Don't enqueue more than once\n\t\t\tif ( $enqueued ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$enqueued = true;\n\t\t\t// Set up min files for dev_mode = false.\n\t\t\t$min = Redux_Functions::isMin();\n\n\t\t\t// Field dependent JS\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-css_layout-js',\n\t\t\t\t$this->extension_url . 'field_css_layout' . $min . '.js',\n\t\t\t\tarray( 'jquery', 'wp-color-picker', 'select2-js' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style( 'select2-css' );\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-color-picker-css',\n\t\t\t\tReduxFramework::$_url . 'assets/css/color-picker/color-picker.css',\n\t\t\t\tarray( 'wp-color-picker' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-css_layout-css',\n\t\t\t\t$this->extension_url . 'field_css_layout.css',\n\t\t\t\tarray(),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "public function dequeue();", "abstract public function queue($ts = null);", "public function queue(...$parameters): void;", "public function enqueue($task);", "public function getQueue(): Queue;", "public function enqueue(array $messages);", "public function version();", "public function version();", "public function version();", "public function version();", "public function version();", "public function getQueue()\n {\n \treturn \"campaign-{$this->campaign->id}-worker-{$this->id}\";\n }", "public function enqueue() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-switch-js',\n\t\t\t\tReduxCore::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js',\n\t\t\t\tarray( 'jquery', 'redux-js' ),\n\t\t\t\t$this->timestamp,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tif ( $this->parent->args['dev_mode'] ) {\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'redux-field-switch-css',\n\t\t\t\t\tReduxCore::$_url . 'inc/fields/switch/field_switch.css',\n\t\t\t\t\tarray(),\n\t\t\t\t\t$this->timestamp,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "public function getBuildEnqueued()\n {\n return $this->readOneof(53);\n }", "public function version()\n {\n\n }", "public function customize_preview_enqueue_deps()\n {\n }", "public function enqueue($handles)\n {\n }", "public \tfunction\tenqueueAdmin() {\n\t\t\t/**\n\t\t\t * Register styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative CSS for FrozenPlugin.\n\t\t\twp_register_style('FrozenPlugin-admin-css', plugins_url('css/admin.css', __FILE__));\n\t\t\t\n\t\t\t/**\n\t\t\t * Register scripts here.\n\t\t\t */\n\t\t\t\n\t\t\t//Register the administrative JS for FrozenPlugin.\n\t\t\twp_register_script('FrozenPlugin-admin-js', plugins_url('js/admin.js', __FILE__), array('jquery'));\n\t\t\t\n\t\t\t/**\n\t\t\t * Enqueue styles here.\n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_style('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_style('thickbox');\n\t\t\t\n\t\t\t//Enqueue the administrative CSS. \n\t\t\twp_enqueue_style('FrozenPlugin-admin-css');\n\t\t\n\t\t\t/**\n\t\t\t * Enqueue scripts here. \n\t\t\t */\n\t\t\t\n\t\t\t//Enqueue Farbtastic. \n\t\t\twp_enqueue_script('farbtastic');\n\t\t\t\n\t\t\t//Enqueue ThickBox. \n\t\t\twp_enqueue_script('thickbox');\n\t\t\t\n\t\t\t//Enqueue Media Uploads.\n\t\t\twp_enqueue_media();\n\t\t\t//admin_enqueue_script('media-upload');\n\t\t\t\n\t\t\t//Enqueue the administrative JS. \n\t\t\twp_enqueue_script('FrozenPlugin-admin-js');\n\t\t}", "private function setQueue() {\n if (count($this->request->q) > 0) {\n try {\n $this->client->setQueue(array($this->request->q));\n $this->view->addParameter(\"result\", \"success\");\n } catch(Exception $e) {\n $this->view->addParameter(\"result\", \"failure\");\n $this->view->addParameter(\"data\", \"Failed to execute '{$this->request->action}' action\");\n }\n } else {\n $this->view->addParameter(\"result\", \"invalid\");\n $this->view->addParameter(\"data\", \"Query array must not be empty\");\n }\n }", "public function queue($name = null);", "public function admin_enqueue()\n\t{\n\t\t// styles.\n\n\t}", "function syncCategoriesWithQueue($params)\n {\n dispatch(new SyncCategories($params));\n }", "protected function _balanceQueues(){\n// $this->RUNNING = false;\n }", "public function createQueue();", "public function runQueue();", "function syncServiceWithQueue($params)\n {\n dispatch(new SyncService($params));\n }", "public function enqueueRequests()\n {\n if (!$this->has_requests) {\n\t\treturn \"No requests to send\";\n\t}\n\t\n\t$finished = \"Error connecting to redis\";\n \n try {\n $redis = new Redis();\n $redis->pconnect(REDIS_ADDRESS);\n \n $multi = $redis->multi();\n \n //Executing all posts to Redis in one multi batch\n foreach ($this->data_requests as $key => $request) {\n $uuid = $request->getUUID();\n \n $multi->lPush(PENDING_QUEUE, $uuid);\n $multi->hSet(VALUES_HASH, $uuid, $request->getFormattedURL());\n $multi->hSet(VALUES_HASH, $uuid . ':method', $this->endpoint->method);\n $multi->hSet(STATS_HASH, $uuid . ':start', $this->start_time);\n }\n \n $ret = $multi->exec();\n \n $finished = \"Postback Delivered\";\n \n //Seach results for any errors from Redis commands\n foreach ($ret as $idx => $result) {\n if (!$result) {\n $finished = \"Redis call failed: \" . $idx;\n }\n }\n \n }\n catch (Exception $e) {\n return \"Error posting to Redis\";\n }\n \n return $finished;\n \n }", "public function getEnqueuedTime()\n {\n return $this->enqueued_time;\n }", "public function __construct($queue);", "function enQueue($value) {\n if($this->isFull()){\n return false;\n\n }\n if($this->isEmpty()){\n $this->front=0;\n\n }\n $this->rear=($this->rear+1)%$this->maxsize;\n $this->queue[$this->rear]=$value;\n\n return true;\n\n\n\n\n }", "public function enqueue_script($name)\n {\n }", "public function marshal()\n {\n try {\n $job = $this->marshalPushedJob();\n } catch (\\Exception $e) {\n // Ignore for security reasons!\n // So if we are being hacked\n // the hacker would think it went OK.\n Log::warning('Marshalling Queue Request: Invalid job.');\n return new Response('OK');\n }\n\n if (isset($job->id)) {\n $this->createPushedGaeJob($job)->fire();\n } else {\n Log::warning('Marshalling Queue Request: No GAE header supplied.');\n }\n\n return new Response('OK');\n }", "public function testEnqueueQueueJobs()\n {\n $queueJobTest1 = new TestQueueJob('price', 'ShopwarePriceImport');\n $queueJobTest2 = new TestQueueJob('product', 'ShopwareProductExport');\n\n $result = $this->queue->enqueue($queueJobTest1);\n $this->assertTrue($result);\n\n $result = $this->queue->enqueue($queueJobTest2);\n $this->assertTrue($result);\n\n $this->assertCount(2, $this->queueStorage->queue);\n }", "function acf_enqueue_uploader()\n{\n}", "public function redis_version()\n {\n return $this->redis_version;\n }", "public function getQueueableClass();", "function enQueue($value) {\n if ($this->isFull()){\n return FALSE;\n }\n $this->data[$this->rear]=$value;\n $this->rear=($this->rear+1)%$this->size;\n return TRUE;\n }", "public function getVersion()\n\t{\n\t}", "function queue_dequeue(&$queue) { \n // Just use array unshift \n return array_shift($queue); \n}", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "function __update_post($version) {\n\treturn true;\n}", "function __construct($k) {\n\n $this->front=-1;\n $this->rear=-1;\n $this->queue=[];\n $this->maxsize=$k;\n\n\n\n\n }", "public function enqueue() {\n\n\t\t\t// Function for demo content setup\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-thememount-resetlike-js',\n\t\t\t\tget_template_directory_uri() . '/inc/redux-framework/redux_custom_fields/digitallaw_resetlike/field_digitallaw_resetlike.js',\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\ttime(),\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-thememount-resetlike-css',\n\t\t\t\tget_template_directory_uri() . '/inc/redux-framework/redux_custom_fields/digitallaw_resetlike/field_digitallaw_resetlike.css',\n\t\t\t\ttime(),\n\t\t\t\ttrue\n\t\t\t);\n\t\t\t\n\t\t}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "function adminbartweak_version() {return \"1.0.0\";}", "public function getAPIVersion() : string{\n \treturn self::API_VERSION;\n }", "public function getQueue()\n {\n return $this->queue;\n }", "public function test_updateQueue() {\n\n }", "public function enqueue($element) {\n $this->queue[] = $element;\n }", "public function testEnqueueWithSynchronousTopic()\n {\n $topicName = 'topic.name';\n $response = 'responseBody';\n $topicData = [\n \\Magento\\Framework\\Communication\\ConfigInterface::TOPIC_IS_SYNCHRONOUS => true\n ];\n $this->communicationConfig->expects($this->once())\n ->method('getTopic')->with($topicName)->willReturn($topicData);\n $envelope = $this\n ->getMockBuilder(\\Magento\\Framework\\MessageQueue\\EnvelopeInterface::class)\n ->disableOriginalConstructor()->getMock();\n $this->exchange->expects($this->once())->method('enqueue')->with($topicName, $envelope)->willReturn($response);\n $this->assertEquals([$response], $this->bulkExchange->enqueue($topicName, [$envelope]));\n }", "protected function http_version()\n {\n }", "public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}", "function syncProviderWithQueue($params)\n {\n dispatch(new SyncProviders($params));\n }", "function put_in_queue() {\n wp_enqueue_script('reviewsjs', plugins_url('/assets/js/reviews.js', __FILE__));\n wp_enqueue_style('reviewscss', plugins_url('/assets/css/reviews.css', __FILE__));\n }", "function queue_initialize() { \n // In this case, just return a new array \n $new = array(); \n return $new; \n}", "public function get_queued_status() {\n\t\treturn '';\n\t}", "public function createQuotaVersion(){\n switch ($_SESSION['role']) {\n case 0:\n break;\n default:\n http_response_code(403);\n echo json_encode(array(\n 'message' => Constant::notPermissionText\n ));\n return;\n }\n\n $json = file_get_contents('php://input');\n $quotas = json_decode($json);\n\n if (property_exists($quotas, 'version')) {\n $version = $quotas->version;\n $checkVer = QuotaTable::checkVersionExisted($version);\n if($checkVer) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['version']) . Constant::isExistedText\n ));\n return;\n }\n } else {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['version']) . Constant::isRequiredText\n ));\n return;\n }\n $data = $quotas->data;\n if (!is_array($data) || count($data) == 0) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => Constant::emptyList\n ));\n return;\n }\n\n $errorCount = 0;\n\n $factors = array();\n //Only update factor by version\n $factors['mainFactorStudent'] = (property_exists($quotas, 'mainFactorStudent'))\n ? number_format($quotas->mainFactorStudent, 2, '.', '') : 1;\n $factors['coFactorStudent'] = (property_exists($quotas, 'coFactorStudent'))\n ? number_format($quotas->coFactorStudent, 2, '.', '') : 1;\n $factors['mainFactorResearcher'] = (property_exists($quotas, 'mainFactorResearcher'))\n ? number_format($quotas->mainFactorResearcher, 2, '.', '') : 1;\n $factors['coFactorResearcher'] = (property_exists($quotas, 'coFactorResearcher'))\n ? number_format($quotas->coFactorResearcher, 2, '.', '') : 1;\n $factors['mainFactorGraduated'] = (property_exists($quotas, 'mainFactorGraduated'))\n ? number_format($quotas->mainFactorGraduated, 2, '.', '') : 1;\n $factors['coFactorGraduated'] = (property_exists($quotas, 'coFactorGraduated'))\n ? number_format($quotas->coFactorGraduated, 2, '.', '') : 1;\n\n foreach ($data as $obj) {\n $quota = array();\n $quota['version'] = $version;\n if (property_exists($obj, 'degreeId')) $quota['degreeId'] = $obj->degreeId;\n if (property_exists($obj, 'maxStudent')) $quota['maxStudent'] = $obj->maxStudent;\n if (property_exists($obj, 'maxGraduated')) $quota['maxGraduated'] = $obj->maxGraduated;\n if (property_exists($obj, 'maxResearcher')) $quota['maxResearcher'] = $obj->maxResearcher;\n $quota['isActive'] = 0;\n $quota['mainFactorStudent'] = $factors['mainFactorStudent'];\n $quota['coFactorStudent'] = $factors['coFactorStudent'];\n $quota['mainFactorResearcher'] = $factors['mainFactorResearcher'];\n $quota['coFactorResearcher'] = $factors['coFactorResearcher'];\n $quota['mainFactorGraduated'] = $factors['mainFactorGraduated'];\n $quota['coFactorGraduated'] = $factors['coFactorGraduated'];\n\n $quotaObj = new Quota($quota);\n\n if(!isset($quota['degreeId']) || $quota['degreeId'] == null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['degreeId']) . Constant::isRequiredText\n ));\n $errorCount += 1;\n break;\n } elseif(!isset($quota['maxStudent']) || $quota['maxStudent'] === null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['maxStudent']) . Constant::isRequiredText\n ));\n $errorCount += 1;\n break;\n } elseif(!isset($quota['maxGraduated']) || $quota['maxGraduated'] === null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['maxGraduated']) . Constant::isRequiredText\n ));\n $errorCount += 1;\n break;\n } elseif(!isset($quota['maxResearcher']) || $quota['maxResearcher'] === null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['maxResearcher']) . Constant::isRequiredText\n ));\n $errorCount += 1;\n break;\n } elseif(!isset($quota['isActive']) || $quota['isActive'] === null) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames['isActive']) . Constant::isRequiredText\n ));\n $errorCount += 1;\n break;\n } else {\n foreach ($quota as $key => $value) {\n $action = 'check' . ucfirst($key);\n if (!$quotaObj->$action()) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::columnNames[$key]) . Constant::invalidText\n ));\n\n $errorCount += 1;\n break;\n }\n \n //Check maximum sum of factors\n if($key == 'mainFactorStudent' || $key == 'coFactorStudent') {\n $sumFactors = $quota['mainFactorStudent'] + $quota['coFactorStudent'];\n if($sumFactors != 1) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => \"Tổng hệ số hướng dẫn cho đề tài khóa luận phải bằng 1\"\n ));\n $errorCount += 1;\n break;\n }\n }\n\n else if($key == 'mainFactorGraduated' || $key == 'coFactorGraduated') {\n $sumFactors = $quota['mainFactorGraduated'] + $quota['coFactorGraduated'];\n if($sumFactors != 1) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => \"Tổng hệ số hướng dẫn cho đề tài luận văn phải bằng 1\"\n ));\n $errorCount += 1;\n break;\n }\n }\n\n else if($key == 'mainFactorResearcher' || $key == 'coFactorResearcher') {\n $sumFactors = $quota['mainFactorResearcher'] + $quota['coFactorResearcher'];\n if($sumFactors != 1) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => \"Tổng hệ số hướng dẫn cho đề tài luận án phải bằng 1\"\n ));\n $errorCount += 1;\n break;\n }\n }\n }\n\n if($errorCount > 0) { break; }\n }\n\n $degree = DegreeTable::getById($quota['degreeId']);\n if(!$degree){\n http_response_code(400);\n echo json_encode(array(\n 'message' => ucfirst(Constant::objectNames['degree']) . Constant::notExistedText\n ));\n\n $errorCount += 1;\n break;\n }\n\n //Create new quota for each degreeId\n $result = QuotaTable::addQuota($quotaObj);\n if(!$result) {\n http_response_code(400);\n echo json_encode(array(\n 'message' => \"Tạo \" . Constant::objectNames['quotas'] . \" không thành công\"\n ));\n\n $errorCount += 1;\n break;\n }\n }\n\n //Delete version if error occurs\n if($errorCount > 0) {\n //deactive\n //QuotaTable::activeQuotaByVersion($version, 0);\n QuotaTable::deleteByVersion($version);\n } else {\n http_response_code(200);\n echo json_encode(array(\n 'message' => Constant::success\n ));\n }\n }", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function getApiRequestVersion()\n {\n return $this->apiRequestVersion;\n }" ]
[ "0.73348194", "0.72971255", "0.7292218", "0.7125288", "0.7125288", "0.7125288", "0.7125288", "0.7125288", "0.7125288", "0.690292", "0.61651456", "0.58369666", "0.5712406", "0.5649375", "0.55531883", "0.55097544", "0.5501179", "0.54955024", "0.5489034", "0.54871637", "0.54603285", "0.54195106", "0.5406577", "0.5406577", "0.53800964", "0.53756565", "0.536998", "0.53368014", "0.5317063", "0.5317063", "0.5306302", "0.52975667", "0.5257704", "0.52376455", "0.5227803", "0.51925784", "0.5179703", "0.5162885", "0.5149613", "0.5145519", "0.5145519", "0.5145519", "0.5145519", "0.5145519", "0.5145154", "0.51393545", "0.5138919", "0.51331156", "0.5118445", "0.51075643", "0.51075566", "0.5091317", "0.50651", "0.50539786", "0.5045907", "0.50425106", "0.5038224", "0.50306535", "0.50287724", "0.5020653", "0.5018295", "0.50146866", "0.50122315", "0.5007843", "0.49976933", "0.49801898", "0.49758276", "0.49742895", "0.4972628", "0.49631864", "0.49546367", "0.4942907", "0.49392697", "0.49210414", "0.49209517", "0.49209517", "0.49209517", "0.49209517", "0.49190876", "0.49057847", "0.48924634", "0.48888943", "0.48875514", "0.48875514", "0.48875514", "0.48875514", "0.48868012", "0.48867345", "0.48834255", "0.487837", "0.48775733", "0.48733532", "0.48722917", "0.487117", "0.4865303", "0.48618725", "0.48464736", "0.4840989", "0.4838829", "0.48344523", "0.48337734" ]
0.0
-1
Define the media type.
public function media( string $media ): self { $this->media = $media; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init()\n\t{\n\t\t$this->setType(\"media\");\n\t}", "public function getMediaType() : string\n {\n return $this->mediaType;\n }", "protected function get_media_types()\n {\n }", "public function getMediaType()\n {\n return $this->mediaType;\n }", "public function getMediaType()\n {\n return $this->mediaType;\n }", "protected function _getMediaType()\n {\n if ($this->hasData('media_type')) {\n return $this->_getData('media_type');\n }\n return $this->getRequest()->getParam('type');\n }", "public function getClientMediaType() {}", "public function set_content_type($mime);", "public function set_content_type($mime);", "public function type($type = null) {\n\t\tif ($type === false) {\n\t\t\tunset($this->headers['Content-Type']);\n\t\t\t$this->_type = false;\n\t\t\treturn;\n\t\t}\n\t\t$media = $this->_classes['media'];\n\n\t\tif (!$type && $this->_type) {\n\t\t\treturn $this->_type;\n\t\t}\n\t\t$headers = $this->headers + ['Content-Type' => null];\n\t\t$type = $type ?: $headers['Content-Type'];\n\n\t\tif (!$type) {\n\t\t\treturn;\n\t\t}\n\t\t$header = $type;\n\n\t\tif (!$data = $media::type($type)) {\n\t\t\t$this->headers('Content-Type', $type);\n\t\t\treturn ($this->_type = $type);\n\t\t}\n\t\tif (is_string($data)) {\n\t\t\t$type = $data;\n\t\t} elseif (!empty($data['content'])) {\n\t\t\t$header = is_string($data['content']) ? $data['content'] : reset($data['content']);\n\t\t}\n\t\t$this->headers('Content-Type', $header);\n\t\treturn ($this->_type = $type);\n\t}", "public function getMediaType()\n {\n return $this->guessMediaTypeFromExtension();\n }", "public function getMediaType()\n {\n $contentType = $this->getContentType();\n if ($contentType) {\n $contentTypeParts = preg_split('/\\s*[;,]\\s*/', $contentType);\n\n return strtolower($contentTypeParts[0]);\n }\n\n return null;\n }", "public function createMediaType()\n {\n $filter = $this->getRouteNameFilter();\n return sprintf(\n 'application/vnd.%s.v%s+json',\n $filter->filter($this->module),\n $this->moduleEntity->getLatestVersion()\n );\n }", "public function setFileType() {\n\t\t$matches = array();\n\t\tpreg_match('/\\/as.([a-z]{2,})$/', $this->getRequestUri(), $matches);\n\t\tif ( count($matches) > 0 ) {\n\t\t\t$this->setOutputType($matches[1]);\n\t\t\t$this->setRequestUri(str_replace($matches[0], \"\", $this->getRequestUri()));\n\t\t} else {\n\t\t\tif ( strpos($this->getServerName(), 'wap.') === 0 ) {\n\t\t\t\t/*\n\t\t\t\t * Must disable sending of session cookies (may/can cause problems for phones)\n\t\t\t\t */\n\t\t\t\tini_set(\"session.use_cookies\", 0);\n\t\t\t\tif ( $this->isXhtmlMobile() ) {\n\t\t\t\t\t$this->setOutputType(mvcRequest::OUTPUT_XHTML);\n\t\t\t\t} else {\n\t\t\t\t\t$this->setOutputType(mvcRequest::OUTPUT_WML);\n\t\t\t\t}\n\t\t\t} elseif (strpos($this->getServerName(),'rss.') === 0) {\n\t\t\t\t$this->setOutputType(mvcRequest::OUTPUT_RSS);\n\t\t\t} elseif (strpos($this->getServerName(),'xml.') === 0) {\n\t\t\t\t$this->setOutputType(mvcRequest::OUTPUT_XML);\n\t\t\t} elseif (strpos($this->getServerName(),'atom.') === 0) {\n\t\t\t\t$this->setOutputType(mvcRequest::OUTPUT_ATOM);\n\t\t\t} else {\n\t\t\t\t$this->setOutputType(mvcRequest::OUTPUT_HTML);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "public function setMediaType($mediaType)\n {\n $this->mediaType = $mediaType;\n }", "public function getMediaType()\n {\n return Mage::getStoreConfig('quickview/media/active', Mage::app()->getStore());\n }", "function set_content_type($type) {\n $this->response->add_header('Content-Type', $type);\n }", "public function get_content_type()\n {\n }", "public static function setMediaType() {\r\n $result = array();\r\n if (lC_Default::setMediaType($_GET['type'], $_GET['size'])) {\r\n $result['rpcStatus'] = '1';\r\n }\r\n \r\n echo json_encode($result);\r\n }", "public static function setMediaType($type, $size) {\n \n $_SESSION['mediaType'] = $type;\n $_SESSION['mediaSize'] = $size;\n \n return true; \n }", "public function setMediaType(string $mediaType) : self\n {\n $this->initialized['mediaType'] = true;\n $this->mediaType = $mediaType;\n return $this;\n }", "public function setContentType($val){ return $this->setHeader('Content-Type',$val); }", "public function getMediaType($fileMimeType);", "public function contentType();", "public function getClientMediaType()\n {\n return $this->fileInfo['type'];\n }", "public function pi_set_content_type(){\n \treturn \"text/html\";\n\t}", "public function setMediaType($media_type)\n {\n $this->vkarg_media_type = $media_type;\n\n return $this;\n }", "public function media();", "public function setMediaType(?string $value): void {\n $this->getBackingStore()->set('mediaType', $value);\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "public function getMimetype();", "public function getType(){\n if ($this->isImage())\n return 'img';\n if ($this->isDoc())\n return 'doc';\n if ($this->isVid())\n return 'vid';\n if ($this->isAudio())\n return 'audio';\n return ''; \n }", "protected function get_current_mediatype(): string {\n $mediatype = $this->optional_param('mediatype', '', PARAM_ALPHA);\n if ($mediatype) {\n // Form has been submitted, but it being re-displayed.\n return $mediatype;\n }\n if (isset($this->question->id)) {\n // Form is being loaded to edit an existing question.\n return $this->question->options->mediatype;\n }\n // Creating new question.\n // The next line needs to match the default below.\n return $this->get_default_value('mediatype', qtype_recordrtc::MEDIA_TYPE_AUDIO);\n }", "public function MimeType();", "public function getClientMediaType() {\n\n return $this->type;\n }", "protected function _setContentType() {\n\t\tif (in_array($this->_status, array(304, 204))) {\n\t\t\treturn;\n\t\t}\n\t\t$whitelist = array(\n\t\t\t'application/javascript', 'application/json', 'application/xml', 'application/rss+xml'\n\t\t);\n\n\t\t$charset = false;\n\t\tif ($this->_charset &&\n\t\t\t(strpos($this->_contentType, 'text/') === 0 || in_array($this->_contentType, $whitelist))\n\t\t) {\n\t\t\t$charset = true;\n\t\t}\n\n\t\tif ($charset) {\n\t\t\t$this->header('Content-Type', \"{$this->_contentType}; charset={$this->_charset}\");\n\t\t} else {\n\t\t\t$this->header('Content-Type', \"{$this->_contentType}\");\n\t\t}\n\t}", "public function getClientMediaType(): string|null\n {\n return $this->clientMediaType;\n }", "public function setContentType ($type) {\r\n\t\t$this->content_type = Headers::getMimeType($type) ?: $type;\r\n\t}", "function http_set_content_type($content_type)\n\t{\n\t\t$this->http_content_type = $content_type;\n\t}", "public function mime ();", "public function setContentType($content_type) {}", "public function setContentType($type)\r\n {\r\n $this->repo['header']['Content-Type'] = $type;\r\n }", "function wp_is_json_media_type($media_type)\n {\n }", "public function setContentType($value)\n {\n $this->headers['Content-Type'] = $this->fixContentType($value);\n }", "public function getcontentType();", "private function setContentType($type = \"html\") \n\t{\n\t\theader('Content-type: application/'.$type);\n\t}", "public function set_content_type($mime) {\n $this->content_type = $mime;\n }", "function media_upload_type_url_form($type = \\null, $errors = \\null, $id = \\null)\n {\n }", "public static function setContentType($content_type) {}", "protected function setContentTypes()\n\t{\n\t\t// Some temporary examples\n\t\t$content_types = array(\n\t\t\t'text/html' => 'html',\n\t\t\t'application/json' => 'js',\n\t\t\t'application/xml' => 'xml',\n\t\t);\n\n\t\t$accept = $_SERVER['HTTP_ACCEPT'];\n\n\t\t$accept = explode(',', $accept);\n\t\tforeach ($accept as $key => $value) {\n\t\t\t$accept[$key] = explode(';', $accept[$key]);\n\n\t\t\t/*\n\t\t\t*\tTODO:\n\t\t\t*\tParse q value and sort array.\n\t\t\t*/\n\n\t\t\t$type = $accept[$key][0];\n\t\t\tif (isset($content_types[$type])) {\n\t\t\t\t$this->request['accept'][$type] = $content_types[$type];\n\t\t\t}\n\t\t}\n\t}", "public function getMediaType($mediaType) {\n if (!$mediaType) {\n return null;\n }\n\n if (isset($this->mediaTypes[$mediaType])) {\n return $this->mediaTypes[$mediaType];\n }\n\n $this->mediaTypes[$mediaType] = $this->mimeFactory->createMediaTypeFromString($mediaType);\n\n return $this->mediaTypes[$mediaType];\n }", "protected function setMessageType()\n {\n $type = array();\n if ($this->alternativeExists()) {\n $type[] = 'alt';\n }\n if ($this->inlineImageExists()) {\n $type[] = 'inline';\n }\n if ($this->attachmentExists()) {\n $type[] = 'attach';\n }\n $this->message_type = implode('_', $type);\n if ($this->message_type == '') {\n //The 'plain' message_type refers to the message having a single body element, not that it is plain-text\n $this->message_type = 'plain';\n }\n }", "protected function _getMimeType()\n\t{\n\t\treturn 'text/text';\n\t}", "public function getMediaTypeForString($string) {\n return $this->getMediaType($this->mimeSniffer->getMediaTypeForString($string));\n }", "function http_send_content_type($content_type = null) {}", "function _media(string $name, array $types = [], string $unsupportedMessage = '', string $attributes = '', array $tracks = []): string\n {\n $media = '<' . $name;\n\n if (empty($attributes)) {\n $media .= '>';\n } else {\n $media .= ' ' . $attributes . '>';\n }\n\n $media .= \"\\n\";\n\n foreach ($types as $option) {\n $media .= _space_indent() . $option . \"\\n\";\n }\n\n foreach ($tracks as $track) {\n $media .= _space_indent() . $track . \"\\n\";\n }\n\n if (! empty($unsupportedMessage)) {\n $media .= _space_indent() . $unsupportedMessage . \"\\n\";\n }\n\n return $media . ('</' . $name . \">\\n\");\n }", "public function setContentType($content_type);", "public function getDefaultMimeType();", "public function setContentType($contentType);", "public function setContentType($contentType);", "function contentType()\n {\n return '';\n }", "private function SetMessageType() {\n\t if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) {\n\t $this->message_type = 'plain';\n\t } else {\n\t if(count($this->attachment) > 0) {\n\t $this->message_type = 'attachments';\n\t }\n\t if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) {\n\t $this->message_type = 'alt';\n\t }\n\t if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) {\n\t $this->message_type = 'alt_attachments';\n\t }\n\t }\n \t}", "public function getContentType()\n {\n }", "public function getPreferredContentType()\n\t{\n\t\t$accept = explode(',', $this->getHeader('Accept'));\n\t\tforeach ($accept as $mimeType) {\n\t\t\tforeach ($this->formats as $formatMime) {\n\t\t\t\tif (Strings::contains($mimeType, $formatMime)) {\n\t\t\t\t\treturn $formatMime;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}", "public function setMimeType($mimeType) {}", "function get_post_mime_type($post = \\null)\n {\n }", "public function ImageType($file_type){\r\n $this->file_type=$file_type;\r\n }", "public function getMediaType(): ?string {\n $val = $this->getBackingStore()->get('mediaType');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'mediaType'\");\n }", "public function getContentType(): string;", "abstract public function getContentType();", "public function getTypeDeMedia()\n {\n return $this->typeDeMedia;\n }", "function getMimeType ()\n\t{\n\t\treturn $this->mainType.'/'.$this->subType;\n\t}", "private function guessMediaTypeFromExtension()\n {\n $self = $this; // Hack for PHP 5.3. 5.4 and up works as expected.\n\n $mediaType = array_filter(self::$mediaTypes, function ($extensions) use ($self) {\n return in_array($self->getExtension(), $extensions);\n });\n\n return empty($mediaType) ? self::DEFAULT_MIMETYPE : key($mediaType);\n }", "public function getMimeType() {\r\n\t\t// hard coding\r\n\t\treturn \"image/jpeg\";\r\n\t}", "public function getMimeType() {}", "public function getMimeType() {}", "public function getMimeType() {}", "public function getMimeType() {}", "function getTypeMime () {\n if ($this->thumbToolkit == null) {\n return '';\n }\n return $this->thumbToolkit->getTypeMime();\n }", "public static function getContentType(): string\n {\n return static::CONTENT_TYPE;\n }", "function feed_content_type($type = '')\n {\n }", "public function getMIMEType()\n {\n return $this->mimetype;\n }", "protected function getForm_Type_MediaService()\n {\n return $this->services['form.type.media'] = new \\Victoire\\Bundle\\MediaBundle\\Form\\Type\\MediaType($this->get('victoire_media.media_manager'), $this->get('doctrine.orm.default_entity_manager'));\n }", "private function addMedia($type, $url)\n {\n $this->startElement('media:content');\n $this->writeAttributes(array(\n 'url' => $url,\n 'medium' => 'image'\n ));\n $this->startElement('media:category');\n $this->writeAttributes(array('scheme' => 'http://www.opengis.net/spec/EOMPOM/1.0'));\n $this->text($type);\n $this->endElement();\n $this->endElement();\n }", "public static function getContentType() {}", "function headerType() {\r\n \r\n If($this->from === TRUE){\r\n $this->from=\"no-reply@\".constant(\"HOST\");\r\n }elseif(empty($this->from)){\r\n $this->from=\"no-reply@\".constant(\"HOST\");\r\n }\r\n $this->headers = \"From: {$this->from}\\r\\n\";\r\n $this->headers.= \"MIME-Version: 1.0\\r\\n\";\r\n switch ($this->type) {\r\n default :\r\n\r\n $this->headers.= \"Content-Type: multipart/alternative; boundary={$this->boundary}\\r\\n\";\r\n\r\n //html version\r\n $this->headers .= \"\\n--{$this->boundary}\\n\";\r\n $this->headers .= \"Content-type: text/html; charset={$this->charset}\\r\\n\";\r\n $this->headers .= $this->body;\r\n\r\n //text version\r\n $this->headers .= \"\\n--{$this->boundary}\"; // beginning \\n added to separate previous content\r\n $this->headers .= \"Content-type: text/plain; charset={$this->charset}\\r\\n\";\r\n $this->headers .= $this->body;\r\n\r\n break;\r\n case \"html\":\r\n $this->headers .= \"Content-type: text/html; charset={$this->charset}\\r\\n\";\r\n break;\r\n case \"text\":\r\n $this->headers .= \"Content-type: text/plain; charset={$this->charset}\\r\\n\";\r\n break;\r\n }\r\n }", "public function setContentType(string $value)\n\t{\n\t\t$parts = explode(\";\", $value);\n\t\t$type = array_shift($parts);\n\t\t$parameters = [];\n\t\tforeach ($parts as $part)\n\t\t{\n $part = trim($part);\n\t\t\tlist($key, $value) = explode('=', $part, 2);\n\t\t\t$value = trim($value, \"'\\\" \\t\\n\\r\\0\\x0B\");\n\t\t\t$parameters[$key] = $value;\n\t\t}\n\n\t\t$this->header_fields['Content-Type'] = [\n\t\t\t'type' => $type,\n\t\t\t'parameters' => $parameters\n\t\t];\n return $this;\n\t}", "public static function getMimeTypes()\n\t{\n\t\treturn MHTTPD::$config['Mimes'];\n\t}", "function getContentType();", "public function getContentType() { return $this->content_type; }", "public function createMedia();", "public function setMediaType($mediatype = self::MEDIATYPE_ALL)\n {\n if (in_array($mediatype, $this->mediaTypes)) {\n $this->defaultOptions['mediaType'] = $mediatype;\n }\n\n return $this;\n }", "function realtor_set_content_type()\n{\n return \"text/html\";\n}", "public function setContentTypeHeader($type)\n {\n switch($type) {\n case 'json':\n $this->app->response->headers->set('Content-Type', 'application/json');\n break;\n case 'javascript':\n $this->app->response->headers->set('Content-Type', 'application/javascript');\n break;\n default:\n // default is html..\n break;\n }\n }", "public function getContentType()\n {\n return $this->getHttpHeader('Content-Type', $this->options['content_type']);\n }", "function getMediaTypes ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/mediaTypes.json\");\n return $this->createResponse($result,'get All MediaTypes');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "private function getOpenGraphMediaTypes() : array\n {\n return [\n 'image' => Image::class,\n 'video' => Video::class,\n 'audio' => Audio::class,\n ];\n }", "function getContentType(){ return $this->_ContentType;}", "public function testGetClientMediaType(): void\n {\n $mediaType = (new UploadedFile(\n fopen('php://temp', 'wb+'), 0, UPLOAD_ERR_OK, 'foobar.baz', 'mediatype')\n )->getClientMediaType();\n\n self::assertSame('mediatype', $mediaType);\n }" ]
[ "0.7179153", "0.70645404", "0.70552105", "0.7034182", "0.7034182", "0.70293236", "0.67629564", "0.66762507", "0.66762507", "0.66486424", "0.6622682", "0.6594531", "0.6588879", "0.6587853", "0.65741897", "0.6563889", "0.6545722", "0.65276015", "0.65229315", "0.64659935", "0.64585626", "0.64579356", "0.6387897", "0.6340048", "0.63378525", "0.6320112", "0.6319664", "0.63120824", "0.6290029", "0.62821674", "0.62821674", "0.62821674", "0.62670296", "0.6154109", "0.6144773", "0.6128956", "0.6120488", "0.6115597", "0.6104883", "0.6059587", "0.6027159", "0.5991245", "0.59840816", "0.5975896", "0.5972287", "0.5932527", "0.5928185", "0.5924743", "0.5913474", "0.59121203", "0.58991367", "0.5889556", "0.58839715", "0.5880761", "0.5875027", "0.587387", "0.5872744", "0.5871578", "0.5860333", "0.5859014", "0.58483344", "0.58483344", "0.5845269", "0.5835202", "0.5824227", "0.5822564", "0.582179", "0.5818398", "0.5810513", "0.5809449", "0.57921666", "0.57917166", "0.57836664", "0.57755786", "0.57751834", "0.57746583", "0.5770919", "0.5770919", "0.5770919", "0.5770919", "0.57668436", "0.5758194", "0.57547927", "0.5740776", "0.57391113", "0.5725071", "0.5713424", "0.5707017", "0.57060665", "0.5701015", "0.56941426", "0.56825626", "0.56820875", "0.5679804", "0.56707835", "0.56706464", "0.56703687", "0.5667077", "0.56653965", "0.5663811", "0.56491643" ]
0.0
-1
Sets the version as last modified file time.
public function lastest_version(): self { if ( $this->does_file_exist( $this->src ) ) { $this->ver = strtotime( get_headers( $this->src, 1 )['Last-Modified'] ); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setLastModified($timestamp) {}", "public function setModificationTime( $timestamp )\n {\n $this->mtime = $timestamp;\n list( $this->properties[\"lastModFileTime\"], $this->properties[\"lastModFileDate\"] ) = self::timestampToDosFormat( $timestamp );\n }", "public function set_last_modified($timestamp)\n\t{\n\t\t$this->last_modified = max($timestamp, $this->last_modified);\n\t}", "private function setLastModifiedDateTime() {\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare(\"UPDATE `$this->table` SET `datetime-last-modified` = NOW() WHERE `id` = ?\");\n\t\t\t$stmt->execute([$this->getID()]);\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Post.class.php setLastModifiedDateTime() error: <br />';\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\n\t\t// Because we set the datetime from MySQL, we can't use PHP's datetime function to get the time as it may be slightly different\n\t\t$stmt = $this->db->prepare(\"SELECT `datetime-last-modified` FROM `$this->table` WHERE `id` = ?\");\n\t\t$stmt->execute([$this->getID()]);\n\n\t\tforeach ($stmt as $row) {\n\t\t\t$this->lastModifiedDate = $row['datetime-last-modified'];\n\t\t}\n\t}", "function set_timemodified() {\n $this->timemodified = time();\n return true;\n }", "public static function getLastModified() {}", "public function getLastModifiedTime();", "public function setLastModified(DateTime $lastModified);", "public function mtime()\n {\n }", "public function mtime()\n {\n }", "public function mtime()\n {\n }", "public function mtime()\n {\n }", "public function mtime()\n {\n }", "public function setModifiedAt()\n {\n $this->modifiedAt = new \\DateTime();\n }", "public function setLast_modified( $last_modified ) {\n\t\t$this->last_modified = $last_modified;\n\t}", "function http_send_last_modified($timestamp = null) {}", "public function setModifiedValue()\n {\n $this->setModified(new \\DateTime());\n }", "public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }", "public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }", "public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }", "public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }", "public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }", "public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }", "protected function changeModifiedTime($file, $timestamp)\n {\n touch($file, $timestamp);\n }", "public function setModified($time)\n\t{\n\t\t$this->modified = $time;\n\n\t\t// Set new cache name\n\t\t$this->cacheSetup();\n\t}", "private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_timestamp() );\n\n\t\t// If the model is dirty, we don't want to commit our save since the user should already be calling save.\n\t\tif ( ! $dirty ) {\n\t\t\t$this->save();\n\t\t}\n\t}", "function updateLastModifiedDate() {\n\t\t$res = db_query_params ('UPDATE artifact SET last_modified_date=EXTRACT(EPOCH FROM now())::integer WHERE artifact_id=$1',\n\t\t\tarray ($this->getID()));\n\t\treturn (!$res);\n\t}", "public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }", "public function getLastModified()\n {\n return filemtime($this->getFileName());\n }", "public function getLastModified();", "public function getLastModified();", "public function getLastModified();", "public function getLastModified();", "public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }", "public function mtime();", "public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }", "public function getLastModified() {\n\t\treturn filemtime($this->filename);\n\t}", "public function getLastModifiedAt();", "public function getLastModifiedAt();", "public function lastModificationTime($path);", "public function last_modified() {\n\t\treturn $this->timestamp;\n\t}", "public function setLastModified($value)\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LASTMODIFIED] \n = $value;\n }", "public function lastModified();", "public function lastModified();", "protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }", "public function lastModified(string $value)\n {\n $this->header('Last-Modified', $value, true);\n }", "private function SetModified(\\DateTime $value)\n\t\t{\n\t\t\t$this->modified = $value;\n\t\t}", "public function getLastModified(){\n return $this->lastModified;\n }", "public function setLastModified($value)\n {\n return $this->set('LastModified', $value);\n }", "public function setSysLastChanged() {}", "public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }", "public function getModificationTime()\n {\n return $this->fileStructure->mtime;\n }", "public function mtime($file)\n {\n }", "public function mtime($file)\n {\n }", "public function mtime($file)\n {\n }", "public function mtime($file)\n {\n }", "public function mtime($file)\n {\n }", "public function getModificationTime()\n {\n return ( $this->mtime ? $this->mtime : self::dosFormatToTimestamp( array( $this->lastModFileTime, $this->lastModFileDate ) ) );\n }", "public function getLastModified($asString = true) {}", "function last_version($file_name) {\n echo $file_name .\"?v=\". filemtime($file_name);\n}", "public function setLastModifiedDateTime($val)\n {\n $this->_propDict[\"lastModifiedDateTime\"] = $val;\n return $this;\n }", "public function setLastModifiedDateTime($val)\n {\n $this->_propDict[\"lastModifiedDateTime\"] = $val;\n return $this;\n }", "public function setLastModifiedDateTime($val)\n {\n $this->_propDict[\"lastModifiedDateTime\"] = $val;\n return $this;\n }", "public function setLastModifiedDateTime($val)\n {\n $this->_propDict[\"lastModifiedDateTime\"] = $val;\n return $this;\n }", "function stampModified() {\n\t\treturn $this->setLastModified(Core::getCurrentDate());\n\t}", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function setLastUpdated($lastUpdated);", "public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }", "public function modificationTime($path);", "public function setLastModifiedTime(int $unixTime): void\n {\n $this->lastModified = gmdate(\"D, d M Y H:i:s T\", $unixTime);\n }", "function setLastModified($dateModified) {\n\t\t$this->setData('lastModified', $dateModified);\n\t}", "public function lastModifiedTime(): int\n {\n if (isset($this->lastModifiedTime)) {\n return $this->lastModifiedTime;\n }\n return FileSystem::lastModifiedTime($this->path);\n }", "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "public function setRevisionCreationTime($timestamp);", "public function setRevisionCreationTime($timestamp);", "public function setRevisionCreationTime($timestamp);", "public function setRevisionCreationTime($timestamp);", "public function setRevisionCreationTime($timestamp);", "public function getLastModified()\n {\n return $this->lastModified;\n }", "public function lastModification( ) {\n\n\t\treturn file_exists( $this->_path )\n\t\t\t? filemtime( $this->_path )\n\t\t\t: 0;\n\t}", "function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }", "public function getLastModified()\n {\n return $this->_lastModified;\n }", "public function getLastModifiedDate() {\n\t\treturn date(\"d/m/Y\", strtotime($this->lastModifiedDate));\n\t}", "public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}", "public function set_modification_date($modified)\n {\n $this->set_default_property(self::PROPERTY_MODIFICATION_DATE, $modified);\n }", "public function onPreUpdate()\n {\n $this->modified_at = new \\DateTime(\"now\");\n }", "public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}", "private function last_version($file_name){ \n if (file_exists($file_name)){\n return $file_name.\"?v=\".filemtime($file_name); \n } \n }", "public function lastModified(\\DateTime $dateTime)\n\t{\n\t\t$this->lastModified = $dateTime->getTimestamp();\n\t\t$this->header(\"Last-Modified: \". gmdate(\"D, d M Y H:i:s\", $this->lastModified) .\" GMT\");\n\t}", "public function lastModified($last_modified_time = null)\n {\n return $this->dateHeader('Last-Modified', $last_modified_time, 'lastModified', '$last_modified_time');\n }", "function get_timemodified() {\n return $this->timemodified;\n }", "protected function __construct() {\n $this->version = filemtime(__FILE__);\n }", "private function _timestamp()\n \t{\n \t\t$this->updated_at = time();\n \t\tif (!$this->exists) $this->created_at = $this->updated_at;\n \t}", "function autoVer($filename){\n\t$ext = substr(strrchr($filename, '.'), 1);\r\n\t$path = $_SERVER['DOCUMENT_ROOT'].'/Apps/M/View/default/'.$ext.'/'.$filename;\r\n $ver = filemtime($path);\n//\t$ver='0415';\n echo $filename.'?v='.$ver;\n}", "public function modified($time = null) {\n\t\tif ($time !== null) {\n\t\t\t$date = $this->_getUTCDate($time);\n\t\t\t$this->_headers['Last-Modified'] = $date->format('D, j M Y H:i:s') . ' GMT';\n\t\t}\n\t\tif (isset($this->_headers['Last-Modified'])) {\n\t\t\treturn $this->_headers['Last-Modified'];\n\t\t}\n\t\treturn null;\n\t}", "public function lastModified($time)\n {\n if (is_integer($time)) {\n $this['response']->setHeader('Last-Modified', gmdate('D, d M Y H:i:s T', $time));\n if ($time === strtotime($this['request']->getHeader('IF_MODIFIED_SINCE'))) {\n $this->halt('304');\n }\n } else {\n throw new \\InvalidArgumentException(\n 'Brainwave::lastModified only accepts an integer UNIX timestamp value.'\n );\n }\n }" ]
[ "0.72372067", "0.70511043", "0.6848465", "0.673325", "0.6725371", "0.66711515", "0.65768254", "0.6551844", "0.65176", "0.651743", "0.6517036", "0.6517036", "0.6517036", "0.65026796", "0.64710987", "0.6403296", "0.6390648", "0.6372354", "0.6372354", "0.6372354", "0.6372354", "0.6372354", "0.6372354", "0.635813", "0.6342255", "0.63409644", "0.63253975", "0.6316464", "0.6306175", "0.63040984", "0.63040984", "0.63040984", "0.63040984", "0.6285701", "0.62805784", "0.6263527", "0.6254284", "0.6253266", "0.6253266", "0.6250811", "0.62492853", "0.6237599", "0.61909646", "0.61909646", "0.6166412", "0.61640394", "0.6154937", "0.61409384", "0.6131787", "0.6126326", "0.6121143", "0.61205506", "0.6108614", "0.6108614", "0.6108614", "0.6108614", "0.6106371", "0.6091631", "0.6088862", "0.6085516", "0.60635245", "0.60635245", "0.60635245", "0.60635245", "0.60603046", "0.60497856", "0.60497856", "0.60497856", "0.60497856", "0.60497856", "0.60421497", "0.60283357", "0.60264605", "0.6026349", "0.6022703", "0.6014056", "0.5990013", "0.59806234", "0.59806234", "0.59806234", "0.59806234", "0.59806234", "0.59784174", "0.5974787", "0.595397", "0.5945697", "0.5939999", "0.59345895", "0.5934258", "0.588872", "0.587083", "0.5864291", "0.58630115", "0.5853468", "0.5851448", "0.5850828", "0.584074", "0.5832758", "0.5832646", "0.5822472" ]
0.632292
27
Checks to see if a file exist using URL (not path).
private function does_file_exist( string $url ): bool { $ch = curl_init( $url ); curl_setopt( $ch, CURLOPT_NOBODY, true ); curl_setopt( $ch, CURLOPT_TIMEOUT_MS, 50 ); curl_exec( $ch ); $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE ); curl_close( $ch ); return $http_code === 200; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _bellcom_check_if_file_in_url_exists($file_url) {\n $file_headers = @get_headers($file_url);\n\n if ($file_headers[0] == 'HTTP/1.1 404 Not Found') {\n return FALSE;\n }\n else {\n return TRUE;\n }\n}", "function does_url_exist($url) {\n\t$fd = fopen(\"$url\", \"r\");\n\tif ($fd) {\n\t\tfclose($fd);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function url_exists($url) {\n if(@file_get_contents($url,0,NULL,0,1)) {\n return true;\n } else {\n return false;\n }\n}", "public static function url_exists($url) {\r\n \r\n // Too slow\r\n return true;\r\n \r\n /*\r\n \r\n $ch = curl_init($url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\r\n $response = curl_exec($ch);\r\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n \r\n if ($httpCode == 404) {\r\n return false;\r\n }\r\n \r\n return true;\r\n \r\n $file_headers = @get_headers($url);\r\n if ($file_headers[0] == 'HTTP/1.1 404 Not Found') {\r\n return false;\r\n }\r\n \r\n return true;\r\n */\r\n \r\n }", "public static function checkFileExists($file, $url){\n\t\t\n\t\tif(empty($file)) return false;\n\t\tif(!is_file($url.$file)) false;\n\t\treturn true;\n//\t\ttry {\n//\t\t\tfclose(fopen($file, \"r\"));\n//\t\t\treturn true;\n//\t\t} catch (Exception $e) {\n//\t\t\treturn false;\n//\t\t}\n\t}", "public function url_exists( $src ) {\n\n\t\t// Make arguments supplied are valid\n\t\tif( !is_string( $src ) ) {\n\t\t\texit( '$src is an invalid argument' );\n\t\t}\n\n\t\t// Isolate path to file from URL\n\t\t$url_parts = parse_url( $src );\n\t\t$path = $url_parts['path'];\n\n\t\t// Check if file exists from reassembled path\n\t\tif( file_exists( $_SERVER['DOCUMENT_ROOT'] . $path ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "private static function remoteFileExists($url) {\n\t\t$f = @fopen($url, 'r');\n\t\tif($f) {\n\t\t\tfclose($f);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function remote_file_exists($url)\n\t{\n\t // Make sure php will allow us to do this...\n\t if ( ini_get('allow_url_fopen') )\n\t {\n\t \t$head = '';\n\t \t$url_p = parse_url ($url);\n\t\n\t \tif (isset ($url_p['host']))\n\t \t{\n\t\t\t\t$host = $url_p['host']; \n\t\t\t}\n\t \telse\n\t \t{\n\t \treturn false;\n\t \t}\n\t\n\t \tif (isset ($url_p['path']))\n\t \t{ \n\t\t\t\t$path = $url_p['path']; \n\t\t\t}\n\t \telse\n\t \t{\n\t\t\t \t$path = ''; \n\t\t\t}\n\t\n\t \t$fp = @fsockopen ($host, 80, $errno, $errstr, 20);\n\t \tif (!$fp)\n\t \t{\n\t \t\treturn false;\n\t \t}\n\t \telse\n\t \t{\n\t \t\t$parse = parse_url($url);\n\t \t\t$host = $parse['host'];\n\t\n\t\t\t\t@fputs($fp, 'HEAD '.$url.\" HTTP/1.1\\r\\n\");\n\t \t\t@fputs($fp, 'HOST: '.$host.\"\\r\\n\");\n\t \t\t@fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\t \t\t$headers = '';\n\t \t\twhile (!@feof ($fp))\n\t \t\t{ \n\t\t\t\t\t$headers .= @fgets ($fp, 128); \n\t\t\t\t}\n\t \t}\n\t \t@fclose ($fp);\n\t\n\t \t$arr_headers = explode(\"\\n\", $headers);\n\t \tif (isset ($arr_headers[0])) \n\t\t\t{\n\t \t\tif(strpos ($arr_headers[0], '200') !== false)\n\t \t\t{ \n\t\t\t\t\treturn true; \n\t\t\t\t}\n\t \t\tif( (strpos ($arr_headers[0], '404') !== false) || (strpos ($arr_headers[0], '509') !== false) || (strpos ($arr_headers[0], '410') !== false))\n\t \t\t{ \n\t\t\t\t\treturn false; \n\t\t\t\t}\n\t \t\tif( (strpos ($arr_headers[0], '301') !== false) || (strpos ($arr_headers[0], '302') !== false))\n\t\t\t\t{\n\t \t\tpreg_match(\"/Location:\\s*(.+)\\r/i\", $headers, $matches);\n\t \t\tif(!isset($matches[1]))\n\t\t\t\t\t{\n\t \t\t\treturn false;\n\t\t\t\t\t}\n\t \t\t$nextloc = $matches[1];\n\t\t\t\t\treturn $this->remote_file_exists($nextloc);\n\t \t\t}\n\t \t}\n\t \t// If we are still here then we got an unexpected header\n\t \treturn false;\n\t }\n\t else\n\t {\n\t \t// Since we aren't allowed to use URL's bomb out\n\t \treturn false;\n\t }\n\t}", "public function exists( $url );", "public function test_url_exist($url) {\n\n\t\t$headers = @get_headers($url);\n\n\t\tif ($headers === FALSE) {\n\n\t\t\treturn FALSE;\n\t\t} else {\n\n\t\t\treturn TRUE;\n\t\t}\n\t}", "function url_exists($url){\n\t$url = str_replace(\"http://\", \"\", $url);\n\tif (strstr($url, \"/\")) {\n\t\t$url = explode(\"/\", $url, 2);\n\t\t$url[1] = \"/\".$url[1];\n\t} else {\n\t\t$url = array($url, \"/\");\n\t}\n\n\t$fh = fsockopen($url[0], 80);\n\tif ($fh) {\n\t\tfputs($fh,\"GET \".$url[1].\" HTTP/1.1\\nHost:\".$url[0].\"\\n\\n\");\n\t\tif (fread($fh, 22) == \"HTTP/1.1 404 Not Found\") { return FALSE; }\n\t\telse { return TRUE; }\n\n\t} else { \n\t\t//echo '<p>no fh</p>';\n\t\treturn FALSE;\n\t}\n}", "function url_exists($url){ \r\n $url_data = parse_url($url); // scheme, host, port, path, query\r\n if(!fsockopen($url_data['host'], isset($url_data['port']) ? $url_data['port'] : 80)){\r\n $this->set_message('url_exists', 'The URL you entered is not accessible.');\r\n return FALSE;\r\n } \r\n \r\n return TRUE;\r\n }", "function remoteFileExists($url) {\n $curl = curl_init($url);\n\n //don't fetch the actual page, you only want to check the connection is ok\n curl_setopt($curl, CURLOPT_NOBODY, true);\n\n //do request\n $result = curl_exec($curl);\n\n $ret = false;\n\n //if request did not fail\n if ($result !== false) {\n //if request was ok, check response code\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n if ($statusCode == 200) {\n $ret = true;\n }\n }\n\n curl_close($curl);\n\n return $ret;\n }", "function url_exist($url)\r\n\t\t{\r\n\t\t\r\n\t\t}", "function checkExternalFile($url)\n{\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_exec($ch);\n $retCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n return $retCode;\n}", "function url_exists($url) {\n $a_url = parse_url($url);\n if (!isset($a_url['port'])) $a_url['port'] = 80;\n $errno = 0;\n $errstr = '';\n $timeout = 5;\n if(isset($a_url['host']) && $a_url['host']!=gethostbyname($a_url['host'])){\n $fid = @fsockopen($a_url['host'], $a_url['port'], $errno, $errstr, $timeout);\n if (!$fid) return false;\n $page = isset($a_url['path']) ?$a_url['path']:'';\n $page .= isset($a_url['query'])?'?'.$a_url['query']:'';\n fputs($fid, 'HEAD '.$page.' HTTP/1.0'.\"\\r\\n\".'Host: '.$a_url['host'].\"\\r\\n\\r\\n\");\n $head = fread($fid, 4096);\n fclose($fid);\n return preg_match('#^HTTP/.*\\s+[200|302]+\\s#i', $head);\n } else {\n return false;\n }\n }", "function check_file_existance($path)\n{\n //buld the url\n $image_url=$path;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "public static function urlExists($url)\n {\n $file_headers = @get_headers($url);\n \n if ($file_headers[0] == 'HTTP/1.1 404 Not Found') {\n $exists = false;\n } else {\n $exists = true;\n }\n \n return $exists;\n }", "function IsFileExist()\n{\t\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\tif(file_exists($sFileUrl) === true)\n\t{\n\t\techo '<correct>file exist</correct>';\n\t} else\n\t{\n\t\techo '<correct>file not exist</correct>';\n\t}\n\t\n\treturn;\n}", "private function checkIfUrlExists($url) {\n $headers = get_headers($url);\n return ((int) substr($headers[0], 9, 3)) === 200;\n }", "function ajax_action_check_url() {\n\n\t\t$hadError = true;\n\n\t\t$url = isset( $_REQUEST['url'] ) ? $_REQUEST['url'] : '';\n\n\t\tif ( strlen( $url ) > 0 && function_exists( 'get_headers' ) ) {\n\t\t\t\t\n\t\t\t$file_headers = @get_headers( $url );\n\t\t\t$exists = $file_headers && $file_headers[0] != 'HTTP/1.1 404 Not Found';\n\t\t\t$hadError = false;\n\t\t}\n\n\t\techo '{ \"exists\": '. ($exists ? '1' : '0') . ($hadError ? ', \"error\" : 1 ' : '') . ' }';\n\n\t\tdie();\n\t}", "public function urlExists($url, $path)\n {\n $filename = '/statamic-test-'.time();\n $tmp = $path . $filename;\n touch($tmp);\n\n $resolvedUrl = URL::assemble($this->getAbsoluteUrl($url), $filename);\n\n $headers = get_headers($resolvedUrl);\n\n unlink($tmp);\n\n return (!$headers || strpos($headers[0], '404')) == false;\n }", "static function existeURL($url) {\n $url = @parse_url($url);\n if (!$url)\n return false;\n\n $url = array_map('trim', $url);\n $url['port'] = (!isset($url['port'])) ? 80 : (int) $url['port'];\n\n $path = (isset($url['path'])) ? $url['path'] : '/';\n $path .= (isset($url['query'])) ? \"?$url[query]\" : '';\n\n if (isset($url['host']) && $url['host'] != gethostbyname($url['host'])) {\n\n $fp = fsockopen($url['host'], $url['port'], $errno, $errstr, 30);\n\n if (!$fp)\n return false; //socket not opened\n\n fputs($fp, \"HEAD $path HTTP/1.1\\r\\nHost: $url[host]\\r\\n\\r\\n\"); //socket opened\n $headers = fread($fp, 4096);\n fclose($fp);\n\n if (preg_match('#^HTTP/.*\\s+[(200|301|302)]+\\s#i', $headers)) {//matching header\n return true;\n } else\n return false;\n } // if parse url\n else\n return false;\n }", "function found_url($url) {\n\t$test = @fopen($url, 'r');\n\tif(!$test) {\n\t\tif($GLOBALS['debug']) echo(\"> Can't open file!: $url\\n\");\n\t\treturn(1);\n\t}\n\t\n\techo($url.\"\\n\");\n}", "public function file_exists($file);", "private static function urlExists($url){\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10); // set time out to 10 seconds\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //follow redirects\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_exec($ch);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if($code == 200){\n $status = true;\n } else {\n $status = false;\n }\n curl_close($ch);\n\n return $status;\n }", "public function checkRemoteFile($url){\n\n\t $ch = curl_init();\n\n\t curl_setopt($ch, CURLOPT_URL,$url);\n\n\t // don't download content\n\t curl_setopt($ch, CURLOPT_NOBODY, 1);\n\t curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t if (curl_exec($ch) !== FALSE) {\n\t return true;\n\t \t}\n\t else {\n\t return false;\n\t \t}\n\t\t}", "public function checkRemoteFile($url){\n\n\t $ch = curl_init();\n\n\t curl_setopt($ch, CURLOPT_URL,$url);\n\n\t // don't download content\n\t curl_setopt($ch, CURLOPT_NOBODY, 1);\n\t curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\t if (curl_exec($ch) !== FALSE) {\n\t return true;\n\t \t}\n\t else {\n\t return false;\n\t \t}\n\n\t\t}", "function checkRemoteFile($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n// don't download content\n curl_setopt($ch, CURLOPT_NOBODY, 1);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n if (curl_exec($ch) !== FALSE) {\n return true;\n } else {\n return false;\n }\n}", "public static function urlImageExists($url){\n if(strpos($url,'http://') === false)\n return false;\n $headers = @get_headers($url);\n if(is_array($headers))\n return strpos($headers[0],'200') !== false;\n }", "public function urlExists($url) {\n\t\t$headers = @get_headers($url);\n\t\treturn is_array($headers) ? true : false;\n\t}", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}", "protected function verifyUrlExists($url) \n\t{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_exec($ch);\n $response = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n return (!empty($response) && $response != 404);\n }", "function checkExists($url)\n{\n\t$db = new SQLite3(DB_NAME);\n\t$query = \"SELECT * FROM URL WHERE url='$url' LIMIT 1\";\n\t$exec = $db->query($query);\n\t$count = count($exec->fetchArray());\n\tif($count==1)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t\treturn true;\n}", "function does_file_exist ($ip,$vhost,$query) {\n\t$data = \"\";\n\t$fp = fsockopen($ip, 80, $errno, $errstr, 1);\n\tif (!$fp) {\n\t\treturn false;\n\t} else {\n\t\t$out = \"HEAD $query HTTP/1.1\\r\\n\";\n\t\t$out .= \"Host: $vhost\\r\\n\";\n\t\t$out .= \"Connection: Close\\r\\n\\r\\n\";\n\t\tfwrite($fp, $out);\n\t\twhile (!feof($fp)) {\n\t\t\t$data .= fgets($fp);\n\t\t}\n\t\tif (ereg('HTTP/1.1 200 OK', $data)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\t\n\t\t\n\t\tfclose($fp);\n\t}\n}", "public function isFileExistsRemotely();", "public static function isURL($filename) {\n\t\treturn preg_match('!^(https?|ftp)://!', $filename);\n\t}", "public static function exists($url)\n {\n $handle = curl_init($url);\n if (false === $handle)\n {\n return false;\n }\n\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_FAILONERROR, true);\n curl_setopt($handle, CURLOPT_HTTPHEADER, array(\"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15\") );\n curl_setopt($handle, CURLOPT_NOBODY, true);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, false);\n $connectable = curl_exec($handle);\n curl_close($handle);\n\n return $connectable;\n }", "function remote_file_exists( $source, $extra_mile = 0 ) {\r\n ////////////////////////////////// Does it exist? \r\n # EXTRA MILE = 1 \r\n ////////////////////////////////// Is it an image? \r\n \r\n if ( $extra_mile === 1 ) { \r\n $img = @getimagesize($source); \r\n \r\n if ( !$img ) return 0; \r\n else \r\n { \r\n switch ($img[2]) \r\n { \r\n case 0: \r\n return 0; \r\n break; \r\n case 1: \r\n return $source; \r\n break; \r\n case 2: \r\n return $source; \r\n break; \r\n case 3: \r\n return $source; \r\n break; \r\n case 6: \r\n return $source; \r\n break; \r\n default: \r\n return 0; \r\n break; \r\n } \r\n } \r\n } \r\n else \r\n { \r\n if (@FClose(@FOpen($source, 'r'))) \r\n return 1; \r\n else \r\n return 0; \r\n } \r\n }", "function check_image_existance($path,$image_name)\n{\n //buld the url\n $image_url=$path.$image_name;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}", "public function exists($filename);", "function check_url($url){\n\n $data = file_get_contents($url);\n\n if (empty($data)) {\n return \"false\";\n } else {\n return \"true\";\n }\n\n\n \n}", "function check_url_exists($url, $test_freq_secs)\n{\n $test1 = $GLOBALS['SITE_DB']->query_select('urls_checked', array('url_check_time', 'url_exists'), array('url' => $url), 'ORDER BY url_check_time DESC', 1);\n\n if ((!isset($test1[0])) || ($test1[0]['url_check_time'] < time() - $test_freq_secs)) {\n $test2 = http_download_file($url, 0, false);\n if (($test2 === null) && (($GLOBALS['HTTP_MESSAGE'] == '401') || ($GLOBALS['HTTP_MESSAGE'] == '403') || ($GLOBALS['HTTP_MESSAGE'] == '405') || ($GLOBALS['HTTP_MESSAGE'] == '416') || ($GLOBALS['HTTP_MESSAGE'] == '500') || ($GLOBALS['HTTP_MESSAGE'] == '503') || ($GLOBALS['HTTP_MESSAGE'] == '520'))) {\n $test2 = http_download_file($url, 1, false); // Try without HEAD, sometimes it's not liked\n }\n $exists = (($test2 === null) && ($GLOBALS['HTTP_MESSAGE'] != 401)) ? 0 : 1;\n\n if (isset($test1[0])) {\n $GLOBALS['SITE_DB']->query_delete('urls_checked', array(\n 'url' => $url,\n ));\n }\n\n $GLOBALS['SITE_DB']->query_insert('urls_checked', array(\n 'url' => $url,\n 'url_exists' => $exists,\n 'url_check_time' => time(),\n ));\n } else {\n $exists = $test1[0]['url_exists'];\n }\n\n return ($exists == 1);\n}", "public function fileExists($name);", "public function exists(string $filename) : bool;", "function fileExists($file){\n\treturn is_file($file) || (@fopen($file,'r')==true);\n}", "function check_url($url, $post=false) {\r\n $ch = curl_init($url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\r\n curl_setopt($ch, CURLOPT_TIMEOUT,1);\r\n if ($post) {\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, $_SESSION['plex_headers']);\r\n }\r\n /* Get the HTML or whatever is linked in $url. */\r\n $response = curl_exec($ch);\r\n\r\n /* Check for 404 (file not found). */\r\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n\r\n /* If the document has loaded successfully without any redirection or error */\r\n if ($httpCode >= 200 && $httpCode < 300) {\r\n write_log(\"Connection is valid: \".$url);\r\n return true;\r\n } else {\r\n write_log(\"Connection failed with error code \".$httpCode.\": \".$url,\"ERROR\");\r\n return false;\r\n }\r\n }", "public function exists()\n {\n if (file_exists($this->getDestination()))\n {\n try\n {\n // Do a redirect to the file on filesystem - don't load contents in - that costs memory\n $url = str_replace(sfImagePoolPluginConfiguration::getBaseDir(), sfImagePoolPluginConfiguration::getBaseUrl(), $this->getDestination());\n \n sfContext::getInstance()->getController()->redirect($url, 0, 301);\n \n return $url;\n }\n catch (Exception $e)\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }", "function check_remote_file($url)\n {\n $content_type = '';\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_NOBODY, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $results = explode(\"\\n\", trim(curl_exec($ch)));\n foreach ($results as $line) {\n if (strtolower(strtok($line, ':')) == 'content-type') {\n $parts = explode(\":\", $line);\n $content_type = trim($parts[1]);\n }\n }\n curl_close($ch);\n $status = strpos($content_type, 'image') !== false;\n\n return $status;\n }", "function icedrive_file_exists($path, $file)\r\n {\r\n $files = array();\r\n $response = $this->icedrive->request('PROPFIND', $path);\r\n $response = $this->icedrive_response_to_array($response['body']);\r\n\r\n if (empty($response['dresponse'])) {\r\n return false;\r\n }\r\n\r\n foreach ($response['dresponse'] as $f) {\r\n if (is_array($f) && array_key_exists('dhref', $f)) {\r\n $files[] = $f['dhref'];\r\n }\r\n }\r\n if (in_array($path . $file, $files)) {\r\n return true;\r\n }\r\n return false;\r\n }", "public static function checkUrl($url)\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_NOBODY, true); // only make a HEAD request\r\n curl_setopt($ch, CURLOPT_FAILONERROR, true); // fail if response >= 400\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n \r\n if (curl_exec($ch) !== false)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "private function urlExist() {\n if (!$this->webhook->url) {\n // throw an exception\n $this->missingEx('url');\n }\n }", "function remote_file_exists($source, $extra_mile = 0) {# # EXTRA MILE = 1////////////////////////////////// Is it an image?\n if ($extra_mile === 1) {\n $img = @getimagesize($source);\n if (!$img)\n return 0;\n else {\n switch ($img[2]) {\n case 0: return 0;\n break;\n case 1:return $source;\n break;\n case 2:return $source;\n break;\n case 3:return $source;\n break;\n case 6:return $source;\n break;\n default:return 0;\n break;\n }\n }\n } else {\n if (@FClose(@FOpen($source, 'r')))\n return 1;\n else\n return 0;\n }\n }", "private function CheckFileExists( $File )\n {\n $return = file_exists($File);\n\n if( !$return && preg_match(\"/^(https?):\\/\\//i\", $File) )\n {\n $header_response = get_headers($File);\n\n if ( strpos( $header_response[0], \"200\" ) !== false )\n {\n $return = true;\n }\n }\n\n return $return;\n }", "public static function fileDoesNotExist()\n {\n return self::logicalNot(self::fileExists());\n }", "public function check_file ( $file ) {\r\n\t\treturn file_exists( $file );\r\n\t}", "function urlOK($url)\n{\n $headers = @get_headers($url);\n if(strpos($headers[0],'200')===false){return false;}else{return true;}\n}", "function url_exists($pageURL){\n\t if ((strpos($pageURL, \"https\")) === false){ $pageURL = \"https://\" . $pageURL;} //pos8etei https an leipei\n\t\t \n\t\t \n\t\t \n\t if (is_array(@get_headers($pageURL)) && ((strpos($pageURL, \"facebook\")) !== false))\t//an to header request itan epituxes kai to page itan kapoio fb page\n\t return true;\n\t else\n\t\t {return true;}\n\t}", "function pathExists($path);", "public static function pathExists($path) {\n return file_exists($path) || is_link($path);\n }", "function checkIfExistingBaseUrl($url)\n {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true); // set to HEAD request\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // don't output the response\n curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 400);\n curl_exec($ch);\n $result = curl_getinfo($ch, CURLINFO_HTTP_CODE) == 200;\n curl_close($ch);\n\n return $result;\n }", "public function hasFile(string $name): bool {}", "function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}", "public function exists($file) {\n\t}", "function is_file_url_correct_in_db( $fn, $furl ) {\n // Prepare SELECT statement to retrieve the file\n $select = \"SELECT * FROM files WHERE\n filename = :filename\";\n $stmt = $this->pdo->prepare($select);\n\n // Bind parameters\n $stmt->bindParam(':filename', $fn);\n\n // Execute statement\n $stmt->execute();\n\n // Count results from SELECT\n $result = $stmt->fetch();\n\n if( $furl === $result['url'] ) {\n return true;\n } else {\n return false;\n }\n }", "function file_exists_wrapper($string) {\n\tif (is_link($string)) {\n\t\t$linkinfo = readlink($string);\n\t\tif ($linkinfo === false) {\n\t\t\t//TODO: throw error?\n\t\t\treturn !unlink($string);\n\t\t} else {\n\t\t\tif (file_exists($linkinfo)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn !unlink($string);\n\t\t\t}\n\t\t}\n\t} else {\n\t\treturn file_exists($string);\n\t}\n}", "public function checkPathExists($path);", "public function exists()\n {\n if (empty($this->filename)) {\n return false;\n }\n\n // Since we only have a valid path when the file exists this is a good test.\n $filename = $this->getFullPath();\n\n if (!empty($filename)) {\n return true;\n }\n // else\n return false;\n }", "public function exists() {\n if (is_null($this->sourceexists)) {\n $this->sourceexists = file_exists($this->sourcepath);\n if ($this->cat === \"url\" && !$this->sourceexists) $this->sourceexists = Path::exists($this->name);\n }\n return $this->sourceexists;\n }", "private function _checkFile( $fileName = false )\r\n\t{\r\n\t\tif( Configure::read() != 0 )\r\n\t\t{\r\n\t\t\t$fileName = str_replace( \"/\", \"\", $fileName );\r\n\t\t\t$fileName = str_replace( \"\\\\\", \"\", $fileName );\r\n\r\n\t\t\tif( file_exists( SERVICE_BROWSER_PATH . $fileName ) )\r\n\t\t\t{\r\n\t\t\t\treturn $fileName;\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "function image_exist($file, $path=\"\") {\n\tif ($file)\n\t{\n\t\t$checkfile=($path)?$path . \"/\" . $file:$file;\n\t\tif (file_exists($checkfile)) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\t}", "protected function isRemoteFile()\n {\n return preg_match('/^(https?|ftp):\\/\\/.*/', $this->path) === 1;\n }", "protected function isRemoteFile()\n {\n return preg_match('/^(https?|ftp):\\/\\/.*/', $this->path) === 1;\n }", "public function exists($file) {\n\t\treturn false;\n\t}", "public function exists()\n\t{\n\t\treturn $this->get('fullPath') && file_exists($this->get('fullPath'));\n\t}", "public static function locate_file_url($filename) {\r\n //$path = '/tpl/' . $dir . '/' . $file;\r\n $located = FALSE;\r\n if (file_exists(get_stylesheet_directory() . '/' . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_template_directory() . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_stylesheet_directory() . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_template_directory() . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_stylesheet_directory() . '/' . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_template_directory() . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(STYLESHEETPATH . '/' . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(TEMPLATEPATH . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(CWP_URL . '/' . $filename)):\r\n $file = CWP_URL . '/' . $filename;\r\n return $file;\r\n endif;\r\n if (!$located):\r\n return false;\r\n else :\r\n return $file;\r\n endif;\r\n }", "function fetchFileFromURL($url, $file, $local_path = './data/', $local_file)\n{\n $data = fetchFileDataFromURL($url . $file);\n if ($data) {\n $d = fopen($local_path . $local_file, \"wb\");\n $ret = fwrite($d, $data);\n fclose($d);\n\n return $ret;\n }\n\n return false;\n}", "function does_file_exist($mediatype, $filename, $inout = 'in') {\n $params = Array();\n $params['region'] = $this->region;\n $params['mediatype'] = $mediatype;\n $params['filename'] = $filename;\n $params['inout'] = $inout;\n try {\n $ret = poodlltools::call_cloudpoodll('local_cpapi_does_file_exist',$params);\n if(!$ret || !isset($ret->returnCode)) {return 'failed to get aws remote result';}\n if ($ret->returnCode==\"0\") {\n return $ret->returnMessage == 'true';\n } else {\n return $ret->returnMessage;\n }\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n\n }", "private function checkFileExist(string $file): bool\n {\n return is_file($file);\n }", "public function checkIsPathExists($path);", "public function checkIfExternal($url)\n {\n $baseUrlTrimmed = str_replace(['http://', 'https://'], '', $this->baseUrl);\n if (preg_match(\"@http(s)?\\://$baseUrlTrimmed@\", $url)) {\n return false;\n } else {\n return true;\n }\n }", "function _drush_patchfile_is_url($url) {\n return parse_url($url, PHP_URL_SCHEME) !== NULL;\n}", "public function pathExists($path);", "public function fileExists() {\r\n return file_exists($this->pathname);\r\n }", "private function check_exists()\n\t{\n\t\t// so this is sufficient to test for existence in accordance with\n\t\t// File::check_exists()\n\t\t// However, getFileInfo() is slow, since it involves a DB query,\n\t\t// so we'll cache the result in $this->exists and test that first...\n\t\tif ( $this->exists )\n\t\t\treturn true;\n\t\telse $this->getFileInfo();\n\t}", "public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}", "function file_exists($pathname)\r\n {\r\n if ($this->_use_mod_ftp) {\r\n \t\tftp_mdtm($this->_socket, $pathname);\r\n \t} else {\r\n \tif (!$this->_socket) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$this->putcmd(\"MDTM\", $pathname);\r\n \t}\r\n \tif ($this->ok()) {\r\n \t\t$this->debug(\"Remote file \".$pathname.\" exists\\n\");\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\t$this->debug(\"Remote file \".$pathname.\" does not exist\\n\");\r\n \t\treturn FALSE;\r\n \t}\r\n }", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function file_exists($filename)\n {\n return @file_exists($filename);\n }", "public static function urlExists($url, $follow_redirects = TRUE) {\n $handle = curl_init();\n curl_setopt($handle, CURLOPT_URL, $url);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($handle, CURLOPT_FOLLOWLOCATION, $follow_redirects);\n curl_setopt($handle, CURLOPT_HEADER, 0);\n // Get the HTML or whatever is linked in $redirect_url.\n $response = curl_exec($handle);\n\n // Get status code.\n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n $last_location = curl_getinfo($handle, CURLINFO_EFFECTIVE_URL);\n\n $url = ($follow_redirects) ? $last_location : $url;\n\n // Check that http code exists.\n if ($http_code) {\n // Determines first digit of http code.\n $first_digit = substr($http_code, 0, 1);\n // Filters for 2 or 3 as first digit.\n if ($first_digit == 2 || $first_digit == 3) {\n return $url;\n }\n else {\n // Invalid url.\n return FALSE;\n }\n }\n }", "protected function get_and_check_file($file){\n\t\t$path = helper_get_path_from_abs_url($file);\n if( ! File::exists($path) ){\n\t\t\t$file = sprintf('%1$s/unknow-48.png' , $this->get_foto_folder());\n }\n return $file;\n }", "public function exists($path);", "function exists() {\n\t\treturn is_file($this->path);\n\t}", "function checkURL($url) {\n\t\t\tif(!eregi(\"^http:\\/\\/\", $url)) {return false;}\n\t\t\treturn true;\n\t\t}", "public static function exists($filename)\n {\n return Storage::disk('public')->exists(static::relativePath($filename));\n }", "private function file_exists( $path, $filename )\n\t{\n\t\t$finder = new Finder();\n\n\t\ttry {\n\t\t\t$count = $finder\n\t\t\t\t\t\t->files()\n\t\t\t\t\t\t->in($path)\n\t\t\t\t\t\t->name($filename)\n\t\t\t\t\t\t->depth('== 0')\n\t\t\t\t\t\t->count()\n\t\t\t;\n\t\t} catch ( InvalidArgumentException $e ) {\n\t\t\techo json_encode($e->getMessage());\n\t\t\texit;\n\t\t} catch ( Exception $e ) {\n\t\t\t$errors = array(\n\t\t\t\t'error' => $e->getMessage(),\n\t\t\t);\n\n\t\t\t// Set the template here\n\t\t\t$template = File::get( __DIR__ . '/views/error-no-render.html');\n\n\t\t\t$html = Parse::template($template, $errors);\n\n\t\t\theader('Content-Type', 'application/json');\n\t\t\techo self::build_response_json(false, true, FILECLERK_S3_ERROR, $e->getMessage(), 'error', $errors, null, null);\n\t\t\texit;\n\t\t}\n\n\t\treturn $count === 1 ? TRUE : FALSE;\n\t}", "public function isValidPathReturnsTrueIfPathExists() {}", "function image_exist( $img ) \r\n\t\t{\r\n\t\t\tif( @file_get_contents( $img,0,NULL,0,1) ){ return 1; } else{ return 0; }\r\n\t\t\t\r\n\t\t}", "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }" ]
[ "0.8638853", "0.8375075", "0.8167054", "0.80970025", "0.80127156", "0.79934925", "0.79465246", "0.76697105", "0.7618086", "0.7566552", "0.7561323", "0.7560348", "0.75567114", "0.7505442", "0.74303186", "0.74196076", "0.7418685", "0.74129736", "0.74015045", "0.73845536", "0.7381811", "0.73599666", "0.73573595", "0.7302577", "0.7291436", "0.72753996", "0.72404367", "0.7231525", "0.716089", "0.71002734", "0.6997401", "0.69461983", "0.69440466", "0.68999386", "0.6896358", "0.68906546", "0.68804246", "0.6876013", "0.68539155", "0.6835063", "0.6815582", "0.67964625", "0.6790426", "0.6759751", "0.6742804", "0.67139035", "0.6690706", "0.6678865", "0.6662295", "0.6634349", "0.6629591", "0.6593077", "0.6543459", "0.65141827", "0.6505669", "0.6482019", "0.64816993", "0.645832", "0.6455974", "0.64536285", "0.6415082", "0.6413753", "0.6400064", "0.6398174", "0.6377011", "0.6374892", "0.63635856", "0.63632387", "0.63608736", "0.63460594", "0.6339978", "0.63249487", "0.63249487", "0.6319587", "0.631927", "0.630229", "0.62995946", "0.62922496", "0.6292121", "0.6285757", "0.62722045", "0.62718004", "0.6264507", "0.6256087", "0.62550074", "0.62399036", "0.62341166", "0.62171274", "0.62171274", "0.6201188", "0.61982507", "0.61909133", "0.6187854", "0.61819005", "0.6181006", "0.61720234", "0.6169609", "0.61460227", "0.6142361", "0.6138594" ]
0.82945824
2
Should the script be called in the footer.
public function footer( bool $footer = true ): self { $this->footer = $footer; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_footer() {\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "public function print_footer_scripts()\n {\n }", "public function print_footer_scripts()\n {\n }", "public static function footer_scripts()\n\t{\n\t\tself::$_configInstance->footer_scripts();\n\t}", "function footer() {\n }", "protected function footer()\n {\n\n }", "function _wp_footer_scripts()\n {\n }", "function footer()\r\n{\r\n}", "public function after_footer_scripts_code () {\n // Sets initial JS variables value\n ?>\n <script type=\"text/javascript\">\n ct_current_role = '<?php echo $this->role; ?>';\n ct_current_orderby = '<?php echo $this->orderby; ?>';\n ct_current_order = '<?php echo $this->order; ?>';\n ct_current_page = <?php echo $this->page; ?>;\n ct_total_pages = <?php echo $this->total_pages; ?>;\n </script>\n <?php\n }", "function asc_print_footer_scripts() {\n\t/**\n\t * Fires when footer scripts are printed.\n\t *\n\t * @since 2.8.0\n\t */\n\tdo_action( 'asc_print_footer_scripts' );\n}", "function footer() {\n\t\trequire ('views/partial/footer.php');\n\t}", "protected function footer()\n {\n require SCRIPT_BASE . \"build/rox/templates/footer.php\";\n }", "function print_footer_scripts()\n {\n }", "protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }", "public function customizer_footer_scripts()\n {\n $this->add_activate_switch();\n $this->change_title_html();\n do_action('mo_optin_customizer_footer_scripts', $this);\n }", "public function footer() {\n\t}", "function ft_hook_add_js_call_footer() {}", "public function footer_scripts() {\n\n\t\tif ( ! empty( $this->element_footer_scripts ) ) {\n\t\t\techo \"<script type=\\\"text/javascript\\\">\\r\\n\";\n\t\t\tforeach ( $this->element_footer_scripts as $script ) {\n\t\t\t\techo $script . \"\\r\\n\";\n\t\t\t}\n\t\t\techo \"</script>\\r\\n\";\n\t\t}\n\t}", "function quasar_before_footer_hook(){\n\t//Do Nothing\n}", "function opinionstage_settings_load_footer(){\n}", "function add_late_scripts()\n\t{\n\t\t// only procceed if we have finished printing footer scripts\n\t\tif (did_action('bwp_minify_after_footer_scripts'))\n\t\t\t$this->todo_late_scripts = 'footer' . $this->late_script_order;\n\t}", "public function footer()\n {\n }", "function cera_grimlock_footer() {\n\t\tdo_action( 'grimlock_prefooter', array(\n\t\t\t'callback' => 'cera_grimlock_prefooter_callback',\n\t\t) );\n\n\t\tdo_action( 'grimlock_footer', array(\n\t\t\t'callback' => 'cera_grimlock_footer_callback',\n\t\t) );\n\t}", "public function do_footer_items()\n {\n }", "public function do_footer_items()\n {\n }", "abstract protected function footer();", "abstract protected function footer();", "public function admin_footer__sync()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "function admin_footer()\n {\n }", "protected function after_filter()\n {\n $this->render('footer.php');\n }", "function codepress_footer_js()\n {\n }", "public static function footer()\n {\n require_once(getcwd() . \"/views/Template/footer.php\");\n }", "public function admin_index_print_footer_scripts() {\n\t\tif (time() < UpdraftPlus_Options::get_updraft_option('dismissed_clone_php_notices_until', 0)) return;\n\t\t?>\n\t\t<script>\n\t\t\tjQuery(function($) {\n\t\t\t\tif ($('#dashboard-widgets #dashboard_php_nag').length < 1) return;\n\t\t\t\t$('#dashboard-widgets #dashboard_php_nag .button-container').before('<div class=\"updraft-ad-container\"><a href=\"<?php echo UpdraftPlus_Options::admin_page_url(); ?>?page=updraftplus&amp;tab=migrate#updraft-navtab-migrate-content\"><?php echo esc_js(__('You can test running your site on a different PHP (or WordPress) version using UpdraftClone credits.', 'updraftplus')); ?></a> (<a href=\"#\" onclick=\"jQuery(\\'.updraft-ad-container\\').slideUp(); jQuery.post(ajaxurl, {action: \\'updraft_ajax\\', subaction: \\'dismiss_clone_php_notice\\', nonce: \\'<?php echo wp_create_nonce('updraftplus-credentialtest-nonce'); ?>\\' });return false;\"><?php echo esc_js(__('Dismiss notice', 'updraftplus')); ?></a>)</div>');\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "function Footer(){\n\t}", "function Footer()\n\t\t{\n\t\t}", "function Footer()\r\n {\r\n }", "public function kapee_wp_print_footer_scripts() {\n\t\tif(!kapee_get_option('cookie-notice', 0)){ return false;}\n\t\t$scripts = html_entity_decode( trim( wp_kses_post( kapee_get_option('cookie-refuse-code','') ) ) );\n\t\t\n\t\tif ( $this->kapee_cookie_setted() && ! empty( $scripts ) ) {\n\t\t\t?>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t<?php echo esc_js( $scripts ); ?>\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "protected function add_footer_scripts() {\n\t\t\tdo_action( 'admin_print_footer_scripts' );\n\t\t}", "public static function addScripts() {\n\t\t$embeddedMode\t = get_option( 'cmtt_enableEmbeddedMode', false );\n\t\t$inFooter\t\t = get_option( 'cmtt_script_in_footer', false );\n\t\t/*\n\t\t * If the embeddedMode is enabled we ignore the inFooter setting\n\t\t */\n\t\tif ( $inFooter && !$embeddedMode ) {\n\t\t\tadd_action( 'wp_footer', array( __CLASS__, 'outputScripts' ), 9 );\n\t\t} else {\n\t\t\tself::outputScripts();\n\t\t}\n\t}", "function display_portal_footer()\r\n {\r\n Display :: footer();\r\n }", "function mantis_publisher_footer()\n{\n\t$site = get_option('mantis_site_id');\n\n\tif (!$site) {\n\t\treturn;\n\t}\n\n\trequire(dirname(__FILE__) . '/html/publisher/config.php');\n\n\trequire(dirname(__FILE__) . '/html/publisher/styling.php');\n\n\tif (get_option('mantis_async')) {\n\t\trequire(dirname(__FILE__) . '/html/publisher/async.html');\n\t} else {\n\t\trequire(dirname(__FILE__) . '/html/publisher/sync.html');\n\t}\n}", "function wp_print_footer_scripts()\n {\n }", "public function footer_scripts()\n\t{\n\t\tglobal $context, $settings;\n\n\t\tif(!empty($context['theme_scripts'])) {\n\t\t\tforeach($context['theme_scripts'] as $type => $script) {\n\t\t\t\techo '\n\t\t<script type=\"text/javascript\" src=\"',($script['default'] ? $settings['default_theme_url'] : $settings['theme_url']) . '/' . $script['name'] . $context['jsver'], '\"></script>';\n\t\t\t}\n\t\t}\n\t\tif(!empty($context['inline_footer_script']))\n\t\t\techo '\n\t\t<script type=\"text/javascript\">\n\t\t<!-- // --><![CDATA[\n\t\t',$context['inline_footer_script'],'\n\n\t\t';\n\t\techo '\n\t\t// ]]>\n\t\t</script>\n\t\t';\n\t}", "function ihs_add_script_footer() {\n\t\t$output = '';\n\t\t$id = ihs_get_current_page_id();\n\t\tif ( $id ) {\n\t\t\t$output = stripslashes( get_post_meta( $id, 'ihs_add_script_footer_meta', true ) );\n\t\t}\n\t\techo $output;\n\t}", "public function on_admin_footer() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_footer`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_footer', $this );\n\t\t}\n\t}", "public function executeFooterPanel()\n {\n }", "function shutdown() {\n // Safety for themes not using wp_footer\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "function wpstocks_action_javascript_footer()\n{\n}", "public function addFooter()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/footer.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/footer.php\");\n }\n }", "public function hookFooter()\n\t{\n\t\t//Assign template variables\n\t\t$this->context->smarty->assign(\n\t\t\tarray(\n\t\t\t\t'clerk_public_key' => Configuration::get('CLERK_PUBLIC_KEY', ''),\n\t\t\t)\n\t\t);\n\n\t\treturn $this->display(__FILE__, 'visitor_tracking.tpl', $this->getCacheId(BlockCMSModel::FOOTER));\n\t}", "public static function output_footer_assets()\n {\n }", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "public function add_footer_script($script){\n\t\t$script = str_replace(PHP_EOL, '', $script);\n\t\t$this->footer_scripts[] = $script;\n\t\treturn true;\n\t}", "public function hookFooter(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'.tpl');\n }", "function cosmetics_footer_scripts() {\n global $cosmetics_options;\n $cosmetics_footer_scripts = $cosmetics_options['cosmetics_footer_scripts_editor'];\n\n if ( !empty( $cosmetics_footer_scripts ) ) :\n echo $cosmetics_footer_scripts;\n endif;\n}", "public function apb_email_footer() {\r\n\t\tinclude AWE_function::template_exsits( 'emails/apb-email-footer' );\r\n\t}", "public function initPageFooter()\n\t{\n\t\tinclude_once('view/main_page_footer.php');\n\t}", "public static function _wp_footer()\n\t{\n\t\tforeach (static::$footer_scripts as $params) {\n\t\t\tif (!isset($params['url'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (isset($params['localize']) && isset($params['localize']['name']) && isset($params['localize']['data'])) {\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\tvar <?php $params['localize']['name'] ?> = <?php echo json_encode($params['localize']['data']); ?>;\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\tif (isset($params['version']) && $params['version']) {\n\t\t\t\t$join_char = (stripos($params['url'], '?') !== false) ? '&' : '?';\n\t\t\t\t$params['url'] .= $join_char.'ver='.$params['version'];\n\t\t\t}\n\n\t\t\t$attrs_str = 'type=\"text/javascript\" src=\"'.$params['url'].'\"';\n\n\t\t\tif (isset($params['async']) && $params['async']) {\n\t\t\t\t$attrs_str .= ' async';\n\t\t\t}\n\n\t\t\tif (isset($params['defer']) && $params['defer']) {\n\t\t\t\t$attrs_str .= ' defer';\n\t\t\t}\n\n\t\t\techo \"<script {$attrs_str}></script>\\n\";\n\t\t}\n\t}", "public static function displayFooter() {\r\n ?>\r\n <br><br><br>\r\n <div id=\"push\"></div>\r\n </div>\r\n <div id=\"footer\"><br>&copy 2016 Power House. All Rights Reserved.</div>\r\n <script type=\"text/javascript\" src=\"<?= BASE_URL ?>/www/js/ajax_autosuggestion.js\"></script>\r\n </body>\r\n </html>\r\n <?php\r\n }", "function mantis_advertiser_footer()\n{\n $advertiser = get_option('mantis_advertiser_id');\n\n if (!$advertiser) {\n return;\n }\n\n require(dirname(__FILE__) . '/html/advertiser/config.php');\n\n require(dirname(__FILE__) . '/html/advertiser/async.html');\n}", "function _asc_footer_scripts() {\n\tprint_late_styles();\n\tprint_footer_scripts();\n}", "public function wp_footer() {\n\t\t\twp_register_style('sv_core_init_style', $this->get_url_core('frontend/css/style.css'));\n\n\t\t\tforeach ( $this->get_scripts() as $script ) {\n\t\t\t\tif(!$script->get_is_backend() && !$script->get_load_in_header()) {\n\t\t\t\t\t$this->add_script($script);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// inline styles are printed\n\t\t\twp_enqueue_style('sv_core_init_style');\n\n\t\t\tob_start();\n\t\t\t// now remove the attached style\n\t\t\tadd_action('wp_print_footer_scripts', function(){\n\t\t\t\t$this->replace_type_attributes();\n\t\t\t});\n\t\t}", "function opinionstage_help_resource_load_footer(){\n}", "function exit_script()\n{\n\t//Each time we want the script to stop executing further, we will call this function so that the basic html code is output at the end\n\t\n\t?>\n\t</article>\n\t<!-- ----------------------------Including the footer ------------------------------------------- -->\n <?php require_once($_SERVER['DOCUMENT_ROOT'].'/../cms_server_files/footer.php'); //This file contains code of footer \n\t?>\n\t</section>\n\t\n\t<div class=\"clear\"></div>\n\t</section>\n </body>\n\t</html>\n\n<?php\n\texit;\n}", "function exit_script()\n{\n\t//Each time we want the script to stop executing further, we will call this function so that the basic html code is output at the end\n\t\n\t?>\n\t</article>\n\t<!-- ----------------------------Including the footer ------------------------------------------- -->\n <?php require_once($_SERVER['DOCUMENT_ROOT'].'/../cms_server_files/footer.php'); //This file contains code of footer \n\t?>\n\t</section>\n\t\n\t<div class=\"clear\"></div>\n\t</section>\n </body>\n\t</html>\n\n<?php\n\texit;\n}", "function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}", "function udesign_footer_inside() {\r\n do_action('udesign_footer_inside');\r\n}", "function footer() {\n\n\techo '<p>Copyright Dynamic Sites LLC 2012</p>';\n\t\n}", "public function hookFooter()\n {\n $ga_scripts = '';\n $this->js_state = 0;\n\n if (isset($this->context->cookie->ga_cart)) {\n $this->filterable = 0;\n\n $gacarts = unserialize($this->context->cookie->ga_cart);\n foreach ($gacarts as $gacart) {\n if ($gacart['quantity'] > 0) {\n } elseif ($gacart['quantity'] < 0) {\n $gacart['quantity'] = abs($gacart['quantity']);\n }\n }\n unset($this->context->cookie->ga_cart);\n }\n\n $controller_name = Tools::getValue('controller');\n $products = $this->wrapProducts($this->context->smarty->getTemplateVars('products'), [], true);\n\n if ($controller_name == 'order' || $controller_name == 'orderopc') {\n $this->eligible = 1;\n $step = Tools::getValue('step');\n if (empty($step)) {\n $step = 0;\n }\n }\n\n if (version_compare(_PS_VERSION_, '1.5', '<')) {\n if ($controller_name == 'orderconfirmation') {\n $this->eligible = 1;\n }\n } else {\n $confirmation_hook_id = (int) Hook::getIdByName('orderConfirmation');\n if (isset(Hook::$executed_hooks[$confirmation_hook_id])) {\n $this->eligible = 1;\n }\n }\n\n if (isset($products) && count($products) && $controller_name != 'index') {\n if ($this->eligible == 0) {\n $ga_scripts .= $this->addProductImpression($products);\n }\n $ga_scripts .= $this->addProductClick($products);\n }\n\n return $this->_runJs($ga_scripts);\n }", "function Footer()\n\t{\n\t\t$this->pie_pred();\n\t \n\t}", "function adminFooter()\n {\n return \"\";\n }", "public function print_footer() {\n // Do nothing.\n }", "function extamus_change_admin_footer(){\n\t echo '<span id=\"footer-note\">Please dont hesitate to reach out to your friends at <a href=\"http://www.extamus.com/\" target=\"_blank\">Extamus Media</a> with any questions.</span>';\n\t}", "function my_footer_shh() {\n remove_filter( 'update_footer', 'core_update_footer' );\n}", "function printFooter()\n\t{\n\t\tinclude 'View/Footer.html';\n\t}", "public function input_admin_footer() {\n\t\t$this->display_svg();\n\t}", "public function control_panel__add_to_foot()\n\t{\n\t\t// Get the necessary support .js\n\t\tif ( URL::getCurrent(false) == '/publish' ) {\n\t\t\treturn $this->js->link('build/fileclerk.min.js');\n\t\t}\n\t}", "function showFooter()\n{\n ?>\n </body>\n </html>\n <?php\n}", "public function template_footer() {\n\t\tget_footer( 'course' );\n\t}", "public function pfoot() {\n include(dirname(dirname(__FILE__)) . '/ui/footer.php');\n }", "protected function makeFooter()\n {\n }", "public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }", "public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}", "function udesign_footer_before() {\r\n do_action('udesign_footer_before');\r\n}", "public function my_addition_to_login_footer() {\n }", "protected function output_footer() {\n include dirname( __FILE__ ) . '/views/html-csv-import-footer.php';\n }", "public function global_footer() {\n\t\t$this->disp('footer.tpl');\n\t\t$this->flush_buffer();\n\t}", "function iframe_footer()\n {\n }", "function block_footer_area()\n {\n }", "function core_update_footer($msg = '')\n {\n }", "function modifyThemeFooter() {\n?>\n<!-- W3TC-include-js-head -->\n<?php\n}", "function theme_hbmode_process_footer($app, &$vars) {\n}", "public function admin_footer() {\r\n // JS skeleton for adding a slide\r\n if(get_post_type()=='cycloneslider'){\r\n // Empty Slide\r\n $vars = array();\r\n $vars['box_title'] = __('Slide *', 'cyclone-slider-2');\r\n $vars['image_url'] = '';\r\n $vars['i'] = '{id}';\r\n $vars['slide'] = $this->data->get_slide_defaults();\r\n foreach($vars['slide'] as $key=>$value){\r\n $vars['slide'][$key] = '';\r\n }\r\n $vars['slide']['type'] = 'image';\r\n $vars['effects'] = $this->data->get_slide_effects();\r\n $vars['debug'] = ($this->debug) ? cyclone_slider_debug($vars['slide']) : '';\r\n \r\n $empty_slide = $this->view->get_render('slide-edit.php', $vars);\r\n \r\n // Main skeleton container\r\n $vars = array();\r\n $vars['empty_slide'] = $empty_slide;\r\n \r\n $this->view->render('slides-skeleton.php', $vars);\r\n }\r\n }", "public function common_metabox_footer() {\r\n\t\t$this->view( 'meta-box-footer', array(), 'common' );\r\n\t}", "public function buildFooter() {\n $arrOfJsFiles = $this->getJsFiles();\n \n //alle js bestanden in een script tag steken\n $stringOfJsTags = $this->createJsTags($arrOfJsFiles);\n \n include $this->footerFile;\n \n }", "function print_footer_scripts() {\n\tglobal $asc_scripts, $concatenate_scripts;\n\n\tif ( !is_a($asc_scripts, 'ASC_Scripts') )\n\t\treturn array(); // No need to run if not instantiated.\n\n\tscript_concat_settings();\n\t$asc_scripts->do_concat = $concatenate_scripts;\n\t$asc_scripts->do_footer_items();\n\n\t/**\n\t * Filter whether to print the footer scripts.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param bool $print Whether to print the footer scripts. Default true.\n\t */\n\tif ( apply_filters( 'print_footer_scripts', true ) ) {\n\t\t_print_scripts();\n\t}\n\n\t$asc_scripts->reset();\n\treturn $asc_scripts->done;\n}" ]
[ "0.81264675", "0.79664266", "0.79379785", "0.79263383", "0.7718861", "0.7633803", "0.7584376", "0.75474244", "0.74935144", "0.7470801", "0.7466874", "0.7462372", "0.7383364", "0.7373725", "0.7360856", "0.73602474", "0.735511", "0.7352453", "0.73451245", "0.73266125", "0.73254687", "0.7303793", "0.7303623", "0.7300529", "0.7300529", "0.72950226", "0.72950226", "0.72931653", "0.7289591", "0.7289591", "0.7289591", "0.7289591", "0.7289591", "0.7278733", "0.72777134", "0.7262402", "0.72490597", "0.7242218", "0.7240513", "0.7234865", "0.7230804", "0.7186854", "0.7171749", "0.7150469", "0.7149298", "0.711641", "0.7102239", "0.7091121", "0.7089938", "0.70692056", "0.7030198", "0.6999831", "0.69958556", "0.6973576", "0.69671005", "0.695657", "0.69420886", "0.69285876", "0.6921565", "0.69076425", "0.69002765", "0.68944925", "0.6877097", "0.68663657", "0.68634695", "0.6842436", "0.68394613", "0.6836927", "0.681727", "0.681727", "0.67875904", "0.67795134", "0.6760458", "0.67576426", "0.6753621", "0.674408", "0.6733084", "0.6714417", "0.670493", "0.67045105", "0.66891164", "0.667994", "0.66622627", "0.666063", "0.66601646", "0.66596216", "0.665934", "0.6653195", "0.6649076", "0.6644424", "0.6639098", "0.6620768", "0.66174644", "0.6616188", "0.66127264", "0.6599284", "0.6597268", "0.6585503", "0.65665346", "0.65545255", "0.654652" ]
0.0
-1
Should the script be called in the header.
public function header(): self { $this->footer = false; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function in_admin_header()\n {\n }", "function header_scripts_handler() {\n\t\t\t\t\t\t\n\t\t\t$this->make_compatible();\n\t\t\t$scripts = false;\n\t\t\t\n\t\t\t// Request via template function\n\t\t\tif ( $this->scriptsflag == \"true\" && $this->theSettings['disable_template_tag'] == \"false\" ) {\n\t\t\t\t$scripts = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Check widgets\n\t\t\t$allowed_widget = $this->has_allowed_widget( \"mp3-jplayer-widget\" ); //echo \"<br />is allowed widget: \" . $allowed_widget . \"<br />\";\n\t\t\t$allowed_widget_B = $this->has_allowed_widget( \"mp3mi-widget\" ); //echo \"<br />is allowed widgetB: \" . $allowed_widget_B . \"<br />\"; \n\t\t\t\n\t\t\t// On index pages\n\t\t\tif ( is_home() || is_archive() ) {\n\t\t\t\tif ( $allowed_widget || $allowed_widget_B || $this->theSettings['player_onblog'] == \"true\" ) {\n\t\t\t\t\t$scripts = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// On singulars\n\t\t\tif ( is_singular() ) {\t\n\t\t\t\tif ( $this->grab_Custom_Meta() > 0 ) { // mode 1 widget \n\t\t\t\t\t$this->PlayerPlaylist = $this->generate_playlist( $this->postMetaKeys, $this->postMetaValues, 1 );\n\t\t\t\t}\n\t\t\t\tif ( $allowed_widget || $allowed_widget_B || $this->has_shortcodes() ) {\n\t\t\t\t\t$scripts = true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t// On search pages\n\t\t\tif ( is_search() ) {\n\t\t\t\tif ( $allowed_widget || $allowed_widget_B ) {\n\t\t\t\t\t$scripts = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Add the scripts\n\t\t\tif ( $scripts ) {\n\t\t\t\t$style = ( $this->stylesheet == \"\" ) ? $this->theSettings['player_theme'] : $this->stylesheet;\n\t\t\t\t$this->add_Scripts( $style );\n\t\t\t}\n\t\t\treturn;\n\t\t}", "function loadInHeader() {\n $this->metaData();\n//\t\t$this->loadAddOns();\n $this->onHead(\"onHead\"); // call back to onHead in extensions things js, etc in head\n $this->onEditor(\"onHead\"); // only when login to admin, for fck to work??\n //If not in admin, blank initEditor\n if (!isset($_SESSION['name'])) { // not sure what this does??\n print \"<script type=\\\"text/javascript\\\">function initeditor(){}</script>\\n\";\n }\n }", "public function prePageHeader();", "function header() {\n }", "public function hookHeader()\n {\n // $this->context->controller->addJS('http://code.jquery.com/jquery-2.1.4.min.js');\n // $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js');\n $this->context->controller->addJS($this->_path.'views/js/front.js');\n $this->context->controller->addCSS($this->_path.'views/css/front.css');\n\n $this->context->controller->addJS($this->_path.'views/js/responsiveslides.js');\n $this->context->controller->addCSS($this->_path.'views/css/responsiveslides.css');\n $this->context->controller->addCSS($this->_path.'views/css/themes.css');\n }", "function ihs_add_script_header() {\n\n\t\t$output = '';\n\n\t\t$id = ihs_get_current_page_id();\n\t\tif ( $id ) {\n\t\t\t$output = stripslashes( get_post_meta( $id, 'ihs_add_script_header_meta', true ) );\n\t\t}\n\t\techo $output;\n\t}", "protected function header()\n {\n\n }", "public static function after_header() {\r\n\r\n\t}", "public function hookHeader()\n\t{\n\t\t/* If 1.4 and no backward, then leave */\n\t\tif (!$this->backward)\n\t\t\treturn;\n\n\t\t/* Continue only if we are in the checkout process */\n\t\tif (Tools::getValue('controller') != 'order-opc' && (!($_SERVER['PHP_SELF'] == __PS_BASE_URI__.'order.php' || $_SERVER['PHP_SELF'] == __PS_BASE_URI__.'order-opc.php' || Tools::getValue('controller') == 'order' || Tools::getValue('controller') == 'orderopc' || Tools::getValue('step') == 3)))\n\t\t\treturn;\n\n\t\t/* Load JS and CSS files through CCC */\n\t\t$this->context->controller->addCSS($this->_path.'views/css/stripe-prestashop.css');\n\t\t\n\t\treturn '<script src=\"https://checkout.stripe.com/checkout.js\"></script>';\n\t}", "function Header(){\n\t\t}", "function script()\n {\n }", "public function adminHead ()\r\n {\r\n \tif ($GLOBALS['editing']) {\r\n \t\t$this->printScripts();\r\n \t}\r\n }", "static function header() {\n $url = $GLOBALS[\"path\"] ? $GLOBALS[\"path\"] : \"http://localhost:8000/\";\n echo '<script src=\"'.$url.'pontoon.js\"></script>'.\"\\n\";\n }", "public function generatePage_whichScript() {}", "public function hookHeader()\n\t{\n\t\t$this->context->controller->addJS($this->_path.'/views/js/front.js');\n\t\t$this->context->controller->addCSS($this->_path.'/views/css/front.css');\n\t}", "public function onBeforeCompileHead() {\n\t\t$document = JFactory::getDocument();\n\t\t$headData = $document->getHeadData();\n\t\t$scripts = &$headData['scripts'];\n\n\t\t// удалить скрипт из массива в админке\n\t\tunset($scripts['/media/k2/assets/js/k2.frontend.js?v=2.8.0&amp;sitepath=/']);\n\t\t$headData['scripts'] = $scripts;\n\t\t$document->setHeadData($headData);\n\n // Проверить это это страницы админки\n $app = JFactory::getApplication();\n if ($app->isSite()) {\n return;\n }\n\n $document = JFactory::getDocument();\n\n // подключить скрипт для сортировки\n $document->addScript(JUri::root().'plugins/system/newwallet_sort/js/sort.js' );\n\t}", "function flatsome_custom_header_js() {\n if(get_theme_mod('html_scripts_header') && !is_admin()){\n echo get_theme_mod('html_scripts_header');\n }\n}", "public function hookHeader()\n {\n if ($this->context->controller instanceof OrderConfirmationController) {\n $this->context->controller->addJS($this->_path . '/views/js/scratch-card.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name || Tools::getValue('configure') == $this->name) {\n $this->context->controller->addJS($this->_path . 'views/js/back.js');\n $this->context->controller->addCSS($this->_path . 'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name || Tools::getValue('configure') == $this->name) {\n $this->context->controller->addJS($this->_path . 'views/js/back.js');\n $this->context->controller->addCSS($this->_path . 'views/css/back.css');\n }\n }", "public function hookHeader(){\n $this->context->controller->addCSS($this->_path.'style.css');\n \n $this->context->controller->addJqueryPlugin(array('scrollTo', 'serialScroll'));\n $this->context->controller->addJS($this->_path.'script.js');\n }", "public function hookBackOfficeHeader()\n\t{\n\t\tif (Tools::getValue('module_name') == $this->name) {\n\t\t\t$this->context->controller->addJS($this->_path.'views/js/back.js');\n\t\t\t$this->context->controller->addCSS($this->_path.'views/css/back.css');\n\t\t}\n\t}", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n }", "public function header()\n {\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function header() {\n\t}", "abstract protected function header();", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "public function addScriptToHeader($context)\n\t\t{\n\t\t\tif(!empty(Symphony::Engine()->Author))\n\t\t\t{\n\t\t\t\tif(Symphony::Engine()->Author->isDeveloper())\n\t\t\t\t{\n\t\t\t\t\t$context['output'] = str_replace('</head>', '\n\t\t\t\t\t\t<link rel=\"stylesheet\" type=\"text/css\" media=\"screen,tv,projection\" href=\"'.URL.'/extensions/frontend_debug/assets/frontend_debug.css\" />\n\t\t\t\t\t\t<script type=\"text/javascript\" src=\"'.URL.'/extensions/frontend_debug/assets/frontend_debug.js\"></script>\n\t\t\t\t\t\t</head>', $context['output']);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/owl.carousel.min.js');\n $this->context->controller->addCSS($this->_path.'/views/css/owl.carousel.min.css');\n\n $this->context->controller->addJS($this->_path.'/views/js/mf.custom.js');\n $this->context->controller->addCSS($this->_path.'/views/css/mf.theme.default.css');\n\n }", "public function hookHeader()\n {\n $language_code = $this->context->language->language_code;\n $this->context->controller->addJS($this->_path . '/views/js/front.js');\n $this->context->controller->addCSS($this->_path . '/views/css/front.css');\n if (version_compare(_PS_VERSION_, '1.6.1.0', '>=')) {\n Media::addJsDef(\n array(\n 'wi_weather_provider' => Configuration::get('WI_WEATHER_PROVIDER'),\n 'wi_weather_url' => $this->getUrl(),\n 'wi_weather_city' => $this->getCity($language_code)\n )\n );\n } else {\n $this->context->smarty->assign(\n array(\n 'wi_weather_provider' => Configuration::get('WI_WEATHER_PROVIDER'),\n 'wi_weather_url' => $this->getUrl(),\n 'wi_weather_city' => $this->getCity($language_code)\n )\n );\n\n return $this->context->smarty->fetch(\n _PS_MODULE_DIR_ . $this->name\n . DIRECTORY_SEPARATOR . 'views'\n . DIRECTORY_SEPARATOR . 'templates'\n . DIRECTORY_SEPARATOR . 'front'\n . DIRECTORY_SEPARATOR . 'javascript.tpl'\n );\n }\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->addJS($this->_path.'views/js/back.js');\n $this->context->addCSS($this->_path.'views/css/back.css');\n $this->context->addJS($this->_path.'views/fonts/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/jquery.dataTables.css');\n }\n }", "public function renderScript()\n {\n }", "function print_head_scripts()\n {\n }", "function of_head() { do_action( 'of_head' ); }", "function has_custom_header()\n {\n }", "public function page_script(){\r\n\r\n echo ISSET($this->pageSettings->page_script)?$this->pageSettings->page_script:'';\r\n\r\n }", "public function __invoke() {\n//\t\t\t$this->register_effect($e);\n\n\t\tif ($this->header_js) {\n\t\t$this->load_jquery();\n\t\t?>\n<script>\n<?php echo $this->header_js ?>\n</script>\n\n\t\t<?php\n\t\t}\n\t}", "function quasar_after_header_title_hook(){\n\t//Do Nothing\n}", "function header() {\n?>\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\n<?php \n // load the javascripts -- this is a little confusing and could be done more better.\n $this->jscript_list();\n $this->css_list();\n?> \n <Title><?php echo $this->title; ?></Title>\n</head>\n\n<?php \n }", "public function header_scripts() {\n\t\t$scripts = get_theme_mod( 'mpress_header_scripts', '' );\n\t\tif( !empty( $scripts ) ) {\n\t\t\techo $scripts;\n\t\t}\n\t}", "function cera_grimlock_header() {\n\t\tdo_action( 'grimlock_preheader', array(\n\t\t\t'callback' => 'cera_grimlock_preheader_callback',\n\t\t) );\n\n\t\tdo_action( 'grimlock_header', array(\n\t\t\t'callback' => 'cera_grimlock_header_callback',\n\t\t) );\n\t}", "public function addHead()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/head.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/head.php\");\n }\n }", "public function on_admin_head() {\n\t\tif ( $this->is_on_our_own_pages() ) {\n\t\t\t/**\n\t\t\t * Similar to action WordPress action `admin_head`,\n\t\t\t * but only fired from pages with Simple History.\n\t\t\t *\n\t\t\t * @param Simple_History $instance This class.\n\t\t\t */\n\t\t\tdo_action( 'simple_history/admin_head', $this );\n\t\t}\n\t}", "public function scripts()\n\t\t{\n\t\t}", "public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }", "function preLoad() {\n if ( ! $this->useThemes() ) {\n $this->doneAndExit( 'do_not_use_themes' );\n }\n $method = strtoupper( filter_input( INPUT_SERVER, 'REQUEST_METHOD' ) );\n if ( 'HEAD' === $method && apply_filters( 'exit_on_http_head', TRUE ) ) {\n $this->doneAndExit( 'on_http_head' );\n }\n if ( is_robots() ) {\n do_action( 'do_robots' );\n $this->doneAndExit( 'is_robots' );\n } elseif ( is_feed() ) {\n do_feed();\n $this->doneAndExit( 'is_feed' );\n } elseif ( is_trackback() ) {\n include( ABSPATH . 'wp-trackback.php' );\n $this->doneAndExit( 'is_trackback' );\n }\n return TRUE;\n }", "public function extObjHeader()\n {\n if (is_callable([$this->extObj, 'head'])) {\n $this->extObj->head();\n }\n }", "public function hookBackOfficeHeader()\n {\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n }", "function caldol_before_member_header_meta(){\n\techo \"<h1>got here with myBogusFunction</h1>\";\n}", "static function on_td_wp_booster_after_header() {\r\n $page_id = get_queried_object_id();\r\n\r\n if (is_page()) {\r\n\r\n\t // previous meta\r\n\t //$td_unique_articles = get_post_meta($page_id, 'td_unique_articles', true);\r\n\r\n\t $meta_key = 'td_page';\r\n\t $td_page_template = get_post_meta($page_id, '_wp_page_template', true);\r\n\t if (!empty($td_page_template) && ($td_page_template == 'page-pagebuilder-latest.php')) {\r\n\t\t $meta_key = 'td_homepage_loop';\r\n\r\n\t }\r\n\r\n\t $td_unique_articles = get_post_meta($page_id, $meta_key, true);\r\n\t if (!empty($td_unique_articles['td_unique_articles'])) {\r\n\t\t self::$keep_rendered_posts_ids = true; //for new module hook\r\n\t\t self::$unique_articles_enabled = true; //for datasource\r\n\t }\r\n }\r\n if (td_util::get_option('tds_ajax_post_view_count') == 'enabled') {\r\n self::$keep_rendered_posts_ids = true;\r\n }\r\n }", "public function hookbackOfficeHeader()\n\t{\n\t\tif (isset(Context::getContext()->controller) && $this->context->controller != null)\n\t\t\t$this->context->controller->addJS($this->_path.'js/clickline_order.js');\n\n//Ponemos el css para el admin\n\t\tif ((int) strcmp((version_compare(_PS_VERSION_, '1.5', '>=') ? Tools::getValue('configure') : Tools::getValue('module_name')), $this->name) == 0)\n\t\t{\n\n\t\t\tif (isset(Context::getContext()->controller) && $this->context->controller != null)\n\t\t\t{\n\t\t\t\t$this->context->controller->addCSS(_MODULE_DIR_.$this->name.'/css/admin.css');\n\t\t\t\t$this->context->controller->addJS(_MODULE_DIR_.$this->name.'/js/admin.js');\n\t\t\t}\n\t\t}\n\t}", "public function ajax_header_add()\n {\n }", "abstract public function header();", "public function phead($scripts = []) {\n include(dirname(dirname(__FILE__)) . '/ui/header.php');\n }", "public function print_scripts()\n {\n }", "function print_head_scripts() {\n\tglobal $asc_scripts, $concatenate_scripts;\n\n\tif ( ! did_action('asc_print_scripts') ) {\n\t\t/** This action is documented in functions.asc-scripts.php */\n\t\tdo_action( 'asc_print_scripts' );\n\t}\n\n\tif ( !is_a($asc_scripts, 'ASC_Scripts') )\n\t\t$asc_scripts = new ASC_Scripts();\n\n\tscript_concat_settings();\n\t$asc_scripts->do_concat = $concatenate_scripts;\n\t$asc_scripts->do_head_items();\n\n\t/**\n\t * Filter whether to print the head scripts.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param bool $print Whether to print the head scripts. Default true.\n\t */\n\tif ( apply_filters( 'print_head_scripts', true ) ) {\n\t\t_print_scripts();\n\t}\n\n\t$asc_scripts->reset();\n\treturn $asc_scripts->done;\n}", "function headerJS() {\n\t\tglobal $use_tooltips;\n\n\t\techo html_e('script', array('type' => 'text/javascript', 'src' => util_make_uri('/js/common.js')), '', false);\n\t\tplugin_hook(\"javascript_file\");\n\n\t\t// invoke the 'javascript' hook for custom javascript addition\n\t\t$params = array('return' => false);\n\t\tplugin_hook(\"javascript\", $params);\n\t\t$javascript = $params['return'];\n\t\tif($javascript) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript')).'//<![CDATA['.\"\\n\";\n\t\t\techo $javascript;\n\t\t\techo \"\\n\".'//]]'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t\thtml_use_storage();\n\t\thtml_use_coolfieldset();\n\t\thtml_use_jqueryui();\n\t\techo $this->getJavascripts();\n\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\techo '\t//<![CDATA[\n\t\t\tjQuery(window).load(function(){\n\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\tsetInterval(function() {\n\t\t\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\t\t}, 5000);\n\t\t\t});\n\t\t\t//]]>'.\"\\n\";\n\t\techo html_ac(html_ap() -1);\n\t\tif ($use_tooltips) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\t\techo '\t//<![CDATA[\n\t\t\t\tjQuery(document).ready(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tjQuery(document).tooltip();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t//]]>'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t}", "function bb_header()\n{\n\tdo_action('bb_header');\n}", "protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function print_scripts()\n {\n }", "function hook_head() {\r\n\t\t$key = $this->get_array_option('api_key_developer', 'foliamaptool_options');\r\n\r\n\t\t// For non-admin pages ONLY: load scripts only if at least one post has map coordinates (we don't check if map shortcode is present, though)\r\n\t\tif (!is_admin() && !$this->has_maps())\r\n\t\t\treturn;\r\n\r\n\t\t// Do nothing if no API key available\r\n\t\tif (empty($key))\r\n\t\t\treturn;\r\n\r\n\t\t// Load geocoder\r\n\r\n\t}", "function oh_header_scripts()\n{\n if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n \n }\n}", "function asc_print_head_scripts() {\n\n\tif ( ! did_action('asc_print_scripts') ) {\n\t\t/** This action is documented in functions.asc-scripts.php */\n\t\tdo_action( 'asc_print_scripts' );\n\t}\n\n\tglobal $asc_scripts;\n\n\tif ( !is_a($asc_scripts, 'ASC_Scripts') )\n\t\treturn array(); // no need to run if nothing is queued\n\n\treturn print_head_scripts();\n}", "function generateScriptHeader(& $Code) {\r\n ob_start();\r\n ?>\r\n/**@ * include 'remoteobject.js';\r\n <?php\r\n switch ( $this->RequestMethod ) {\r\n case 'rawpost':\r\n ?>\r\n* include 'request/rawpost.js';\r\n <?php\r\n break;\r\ncase 'post':\r\n ?>\r\n* include 'request/rawpost.js';\r\n <?php\r\n break;\r\n }\r\n\r\n if ( $this->RequestEncoding == 'xml' ) {\r\n ?>\r\n\r\n* include 'encode/xml.js';\r\n <?php\r\n } else {\r\n ?>\r\n* include 'encode/php.js';\r\n <?php\r\n }\r\n ?>\r\n*/\r\n <?php\r\n $Code->append(ob_get_contents());\r\n ob_end_clean();\r\n }", "function opinionstage_settings_load_header(){\n}", "function do_signup_header()\n {\n }", "public function beforeAction(){\n\t\t\n\t\t\tif($this->is_phoner()){\n\n\t\t\t\theader(\"Location:http://wap.33xiao.com/wap/\");exit;\n\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t\t$this->baseLoad();\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}", "function common_pre_header() {\r\n global $current_screen;\r\n\r\n $browser = WPI_Functions::browser();\r\n $screen_id = $current_screen->id;\r\n\r\n if (!$screen_id) {\r\n return;\r\n }\r\n\r\n //* Load Global Script and CSS Files */\r\n if (file_exists(WPI_Path . '/core/css/jquery-ui-1.8.21.custom.css')) {\r\n wp_register_style('wpi-custom-jquery-ui', WPI_URL . '/core/css/jquery-ui-1.8.21.custom.css');\r\n }\r\n\r\n if (file_exists(WPI_Path . '/core/css/wpi-admin.css')) {\r\n wp_register_style('wpi-admin-css', WPI_URL . '/core/css/wpi-admin.css', array(), WP_INVOICE_VERSION_NUM);\r\n }\r\n\r\n //* Load Page Conditional Script and CSS Files if they exist*/\r\n if (file_exists(WPI_Path . \"/core/css/{$screen_id}.css\")) {\r\n wp_register_style('wpi-this-page-css', WPI_URL . \"/core/css/{$screen_id}.css\", array('wpi-admin-css'), WP_INVOICE_VERSION_NUM);\r\n }\r\n\r\n //* Load IE 7 fix styles */\r\n if (file_exists(WPI_Path . \"/core/css/ie7.css\") && $browser['name'] == 'ie' && $browser['version'] == 7) {\r\n wp_register_style('wpi-ie7', WPI_URL . \"/core/css/ie7.css\", array('wpi-admin-css'), WP_INVOICE_VERSION_NUM);\r\n }\r\n\r\n //* Load Page Conditional Script and CSS Files if they exist*/\r\n if (file_exists(WPI_Path . \"/core/js/{$screen_id}.js\")) {\r\n wp_register_script('wpi-this-page-js', WPI_URL . \"/core/js/{$screen_id}.js\", array('wp-invoice-events'), WP_INVOICE_VERSION_NUM);\r\n }\r\n\r\n //* Load Conditional Metabox Files */\r\n if (file_exists(WPI_Path . \"/core/ui/metabox/{$screen_id}.php\")) {\r\n include_once WPI_Path . \"/core/ui/metabox/{$screen_id}.php\";\r\n }\r\n }", "function cera_grimlock_header_callback() {\n\t\tif ( apply_filters( 'grimlock_navigation_has_position_top', true ) ) :\n\t\t\tdo_action( 'grimlock_navigation' );\n\t\tendif;\n\n\t\tdo_action( 'grimlock_custom_header' );\n\n\t\tif ( apply_filters( 'grimlock_navigation_has_position_bottom', true ) ) :\n\t\t\tdo_action( 'grimlock_navigation' );\n\t\tendif;\n\t}", "function onBeforeRender()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\tif($app->isAdmin()) return true;\n\t\t$doc = JFactory::getDocument();\n\t\tif($doc->getType() != 'html') return true;\n\t\t$content = $this->params->get('headtags');\n\t\t$config = JFactory::getConfig();\n\t\t$content = str_replace('%SITENAME%',$config->get( 'sitename' ),$content);\n\t\tJFactory::getDocument()->addCustomTag(PHP_EOL.'<!-- { gjheqadtag insert -->'.PHP_EOL.$content.PHP_EOL.'<!-- gjheqadtag insert } -->'.PHP_EOL);\n\t}", "public function output_head() {\n\t\t// Verify tracking status\n\t\tif ( $this->disable_tracking() ) return;\n\n\t\t// no indentation on purpose\n\t\t?>\n<!-- Start WooCommerce KISSmetrics -->\n<script type=\"text/javascript\">\n\tvar _kmq = _kmq || [];\n\tfunction _kms(u) {\n\t\tsetTimeout(function () {\n\t\t\tvar s = document.createElement('script');\n\t\t\tvar f = document.getElementsByTagName('script')[0];\n\t\t\ts.type = 'text/javascript';\n\t\t\ts.async = true;\n\t\t\ts.src = u;\n\t\t\tf.parentNode.insertBefore(s, f);\n\t\t}, 1);\n\t}\n\t_kms('//i.kissmetrics.com/i.js');\n\t_kms('//doug1izaerwt3.cloudfront.net/<?php echo $this->api_key; ?>.1.js');\n\t_kmq.push(['identify', '<?php echo $this->get_identity(); ?>']);\n\t<?php if ( is_front_page() && $this->event_name['viewed_homepage'] ) echo \"_kmq.push(['record', '\" . $this->event_name['viewed_homepage'] . \"' ]);\\n\"; ?>\n</script>\n<!-- end WooCommerce KISSmetrics -->\n\t\t<?php\n\t}", "protected function setHeaders() {\n\t\tif(!self::$headerIncluded) {\n\n\t\t\tif($this->settings['includes']['jquery'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"></script>');\n\n if($this->settings['includes']['mediaelement'])\n\t\t\t $this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/mediaelement-and-player.min.js\"></script>');\n\n\t\t\tif($this->settings['includes']['jquery-resize'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/jquery.ba-resize.min.js\"></script>');\n\t\t\tif($this->settings['includes']['modernizr'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<script type=\"text/javascript\" src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/modernizr-2.5.3.js\"></script>');\n\t\t\t\t\t\t\n\t\t\tif($this->settings['includes']['css'])\n\t\t\t\t$this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/CSS/tx-vibeo.css\" />');\n\n if($this->settings['includes']['mediaelement-css'])\n\t\t\t $this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/mediaelementplayer.css\" />');\n\n if($this->settings['includes']['mediaelement-skin-css'])\n $this->response->addAdditionalHeaderData('<link rel=\"stylesheet\" href=\"'.t3lib_extMgm::siteRelPath($this->extKey).'Resources/Public/Vibeo/skin-gray.css\" />');\n\n\t\t\tself::$headerIncluded = true;\n\t\t}\n\t}", "function preRenderCallback() {\n $scripts = array('aurigma.uploader', 'aurigma.uploader.amazons3');\n foreach ($scripts as $script) {\n $this->_parent->addScriptFileName($script, $this->_parent->getDebugScriptLevel() > 0 ?\n $script . '.js' : $script . '.min.js');\n }\n\n $clientPreRender = $this->_parent->getClientEvents()->getPreRender();\n if (!isset($clientPreRender)) {\n $clientPreRender = array();\n }\n $clientPreRender[] = $this->buildScript();\n $this->_parent->getClientEvents()->setPreRender($clientPreRender);\n }", "public function preExecute(){\n\n\t\n\t}", "function display_header() {}", "public function generatePage_preProcessing() {}", "public function initPageHeaders()\n\t{\n\t\tinclude_once('view/main_page_header.php');\n\t}", "public function hookDisplayBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name || Tools::getValue('configure') == $this->name) {\n $this->context->controller->addJquery();\n Media::addJsDef(array(\n 'TWISPAY_LIVE_MODE' => Configuration::get('TWISPAY_LIVE_MODE'),\n ));\n $this->context->controller->addJS($this->_path.'views/js/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/back.css');\n }\n if ($this->context->cookie->redirect_error) {\n /** Display persistent error */\n $this->context->controller->errors[] = $this->context->cookie->redirect_error;\n /** Clean persistent error */\n unset($this->context->cookie->redirect_error);\n }\n }", "function actijour_header_prive($flux)\n{\n $exec = _request('exec');\n if (preg_match('@^(actijour_).*@i', $exec)) {\n $flux .= '<script type=\"text/javascript\" src=\"' . _DIR_PLUGIN_ACTIJOUR . 'func_js_acj.js\"></script>' . \"\\n\";\n }\n return $flux;\n}", "function charity_aboveheader() {\n do_action('charity_aboveheader');\n}", "public function before_render() {}", "public function testShouldAppearWhenConfigured()\n {\n $headScript = new HeadScript();\n $renderer = $this->getRendererMock($headScript);\n $settings = $this->getSettingsMock(self::GA_KEY_VALUE);\n $event = $this->getViewEventStub($renderer, '/child/site/page');\n\n $listener = new GoogleScriptTagEventListener($settings);\n $listener($event);\n\n $this->assertContains(self::GA_KEY_VALUE, $headScript->toString(), 'Expected to find Google Analytics code in <head> tag');\n }", "function charity_header() {\n do_action('charity_header');\n}", "function opinionstage_help_resource_load_header(){\n}", "function additionalHeaderStuff() {\n return;\n }", "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}", "public function print_footer_scripts()\n {\n }", "public function loadInitScript() {\n //di(forum()->getCategory());\n include_once forum()->locateTemplate('init');\n //exit;\n }", "function init_scripts() {\n return true;\n}", "public function headAction()\n {\n \n }", "public function onBeforeMain()\n\t{\n\t\t$this->addJavascriptFile('media://com_akeeba/js/Stepper.min.js');\n\t\t$this->addJavascriptFile('media://com_akeeba/js/Alice.min.js');\n\n\t\t/** @var Log $logModel */\n\t\t$logModel = $this->container->factory->model('Log')->tmpInstance();\n\n\t\t// Get a list of log names\n\t\t$this->logs = $logModel->getLogList();\n\t\t$this->log = $this->input->getCmd('log', null);\n\n\t\tJText::script('COM_AKEEBA_ALICE_SUCCESSS');\n\t\tJText::script('COM_AKEEBA_ALICE_WARNING');\n\t\tJText::script('COM_AKEEBA_ALICE_ERROR');\n\t\tJText::script('COM_AKEEBA_BACKUP_TEXT_LASTRESPONSE');\n\t}", "public function preAction()\n {\n // Nothing to do\n }", "function run_on_startup(): void {\r\n\r\n\t // Add the current page to GT\r\n\t $this->gtpage = MJKGTAPI::add_page([\r\n\t\t 'id' => 'masthead',\r\n\t\t 'name' => 'Masthead',\r\n\t\t 'source' => self::source,\r\n\t\t 'renderer' => 'MJKMH_Renderer',\r\n\t\t 'settings' => [JKNAPI::settings_page('roles')]\r\n\t ]);\r\n\r\n // Add the ACF filters\r\n\t MJKMH_ACF_Roles::add_filters();\r\n\t MJKMH_ACF_User::add_filters();\r\n\r\n\t // Add the dynamic field loading on the user ACF page\r\n\t global $pagenow;\r\n\t if (($pagenow === 'user-edit.php') || ($pagenow == 'user-new.php')) {\r\n\t \tMJKMH_ACF_User::enqueue_js();\r\n\t }\r\n\r\n }" ]
[ "0.69822997", "0.69292915", "0.68157", "0.6783218", "0.67670697", "0.6648197", "0.6633113", "0.6632054", "0.66020167", "0.65568584", "0.65219843", "0.6509729", "0.65039295", "0.6478405", "0.6446918", "0.64082116", "0.64072746", "0.640193", "0.63969696", "0.63615835", "0.63615835", "0.6361104", "0.63600403", "0.6347675", "0.6347675", "0.6347675", "0.63252395", "0.63237643", "0.63237643", "0.63237643", "0.63185894", "0.6316021", "0.6308183", "0.6308183", "0.627836", "0.6256065", "0.62356484", "0.62282693", "0.62218744", "0.6212091", "0.62113595", "0.6180298", "0.6177455", "0.61751145", "0.6169576", "0.6168072", "0.6157445", "0.6152832", "0.61411124", "0.6134768", "0.61339456", "0.6129496", "0.6128399", "0.61190134", "0.61179465", "0.61136734", "0.6112675", "0.61029744", "0.60884815", "0.6082783", "0.607796", "0.6069395", "0.6061533", "0.60610926", "0.6041231", "0.6034603", "0.6030993", "0.6027828", "0.60127324", "0.60104585", "0.60056204", "0.599111", "0.5983465", "0.5977143", "0.5962285", "0.59617466", "0.595897", "0.5953079", "0.59389323", "0.59370697", "0.59280056", "0.5921523", "0.591838", "0.5913883", "0.59129953", "0.5905316", "0.59035003", "0.5896304", "0.58938587", "0.58927286", "0.5892281", "0.58781165", "0.58767647", "0.58716375", "0.58697927", "0.58561045", "0.58453894", "0.5826087", "0.58233064", "0.5819115", "0.58021784" ]
0.0
-1
Should the script be called in the inline.
public function inline( bool $inline = true ):self { $this->inline = $inline; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function use_inline_scripts(){\n return false;\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "private function _inline_js() \n\t{\t\n\t\t// Are there any scripts to include? \n\t\tif (count($this->inline_scripts) == 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Create our shell opening\n\t\techo '<script type=\"text/javascript\">' . \"\\n\";\n\t\techo $this->ci->config->item('inline_js_opener') .\"\\n\\n\";\n\t\t\n\t\t// Loop through all available scripts\n\t\t// inserting them inside the shell.\n\t\tforeach($this->inline_scripts as $script)\n\t\t{\n\t\t\techo $script . \"\\n\";\n\t\t}\n\t\t\n\t\t// Close the shell.\n\t\techo \"\\n\" . $this->ci->config->item('inline_js_closer') . \"\\n\";\n\t\techo '</script>' . \"\\n\";\n\t\t\n\t}", "public function embed_scripts()\n {\n }", "function script()\n {\n }", "public function embed_scripts() {}", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function wp_add_inline_script($handle, $data, $position = 'after')\n {\n }", "public function output_admin_inline_scripts() : void {\n\t\t\t?>\n <?php // phpcs:ignore?>\n <?php if ( isset( $_GET['page'] ) && in_array( $_GET['page'], [ 'learndash-help' ], true ) ) : ?>\n\t\t\t\t<style>\n\t\t\t\t\tbody .notice {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t<?php endif; ?>\n\t\t\t<?php\n\t\t}", "public function renderScript()\n {\n }", "protected function _getInlineJavaScript()\n {\n return '';\n }", "public function output_admin_inline_scripts() : void {\n\t\t\t// Setup page.\n\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\tif ( isset( $_GET['page'] ) && 'learndash-setup' === $_GET['page'] ) {\n\t\t\t\t?>\n\t\t\t\t<style>\n\t\t\t\t\tbody .notice {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}", "protected function get_vc_inline_html() {\n\t\t\treturn false;\n\t\t}", "public function inline_js(){\n\n $this->render_js_vars();\n $js = file_get_contents(Helper::asset('client.js'));\n echo view('@AgreablePollPlugin/scripts.twig', [\n 'js_path' => Helper::asset('client.js'),\n 'js' => $js,\n ])->getBody();\n\n }", "function <%= functionPrefix %>_admin_conditional_scripts() { }", "public function page_script(){\r\n\r\n echo ISSET($this->pageSettings->page_script)?$this->pageSettings->page_script:'';\r\n\r\n }", "public function inline_edit()\n {\n }", "public function inline_edit()\n {\n }", "public function add_inline_script($handle, $data, $position = 'after')\n {\n }", "public function get_form_editor_inline_script_on_page_render() {\n\n\t\t// set the default field label for the simple type field\n\t\t$script = sprintf( \"function SetDefaultValues_simple(field) {field.label = '%s';}\", $this->get_form_editor_field_title() ) . PHP_EOL;\n\n\t\t// initialize the fields custom settings\n\t\t$script .= \"jQuery(document).bind('gform_load_field_settings', function (event, field, form) {\" .\n\t\t \"var inputClass = field.inputClass == undefined ? '' : field.inputClass;\" .\n\t\t \"jQuery('#input_class_setting').val(inputClass);\" .\n\t\t \"});\" . PHP_EOL;\n\n\t\t// saving the simple setting\n\t\t$script .= \"function SetInputClassSetting(value) {SetFieldProperty('inputClass', value);}\" . PHP_EOL;\n\n\t\treturn $script;\n\t}", "public function generatePage_whichScript() {}", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "public function render_control_template_scripts()\n {\n }", "private function dd_content_inline_js() {\n global $COURSE, $CFG;\n \n echo \"<script>\";\n echo \"dd_content_php['orientation'] = '\".$this->get_menu_oritentation().\"';\";\n echo \"</script>\";\n }", "public function print_inline_script($handle, $position = 'after', $display = \\true)\n {\n }", "public function inline_custom_data(){}", "protected function addOnSubmitJavaScriptCode() {}", "protected function renderAsJavascript() {}", "public function on_loco_admin_init(){\n $this->inline = true;\n }", "public static function render_control_template_scripts()\n {\n }", "public static function render_control_template_scripts()\n {\n }", "public function scripts()\n\t\t{\n\t\t}", "function preRenderCallback() {\n $scripts = array('aurigma.uploader', 'aurigma.uploader.amazons3');\n foreach ($scripts as $script) {\n $this->_parent->addScriptFileName($script, $this->_parent->getDebugScriptLevel() > 0 ?\n $script . '.js' : $script . '.min.js');\n }\n\n $clientPreRender = $this->_parent->getClientEvents()->getPreRender();\n if (!isset($clientPreRender)) {\n $clientPreRender = array();\n }\n $clientPreRender[] = $this->buildScript();\n $this->_parent->getClientEvents()->setPreRender($clientPreRender);\n }", "public function render()\n {\n $this->script = <<<EOT\n\nEOT;\n return parent::render();\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function wp_tinymce_inline_scripts()\n {\n }", "public function sharethis_include_js();", "protected function generateJavascript()\n\t{\n\t}", "private function displayJavascript() {\n $this->javascript_is_displayed = TRUE ;\n }", "public function enqueue_preview_scripts()\n {\n }", "public function enqueue_preview_scripts()\n {\n }", "public function enqueue_preview_scripts()\n {\n }", "public function enqueue_preview_scripts()\n {\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function enqueue_edit_scripts() {\n\t}", "public function addScriptWrapper() {\n if ($this->doAddScript) {\n $this->addScript();\n }\n }", "function wp_add_inline_script( $handle, $data, $position = 'after' ) {\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\tif ( false !== stripos( $data, '</script>' ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, sprintf(\n\t\t\t/* translators: 1: <script>, 2: wp_add_inline_script() */\n\t\t\t__( 'Do not pass %1$s tags to %2$s.' ),\n\t\t\t'<code>&lt;script&gt;</code>',\n\t\t\t'<code>wp_add_inline_script()</code>'\n\t\t), '4.5.0' );\n\t\t$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );\n\t}\n\n\treturn wp_scripts()->add_inline_script( $handle, $data, $position );\n}", "public function is_inline()\r\n\t{\r\n\t\treturn $this->is_inline;\r\n\t}", "public function __invoke() {\n//\t\t\t$this->register_effect($e);\n\n\t\tif ($this->header_js) {\n\t\t$this->load_jquery();\n\t\t?>\n<script>\n<?php echo $this->header_js ?>\n</script>\n\n\t\t<?php\n\t\t}\n\t}", "function vcex_vc_is_inline() {\n\tif ( function_exists( 'vc_is_inline' ) ) {\n\t\treturn vc_is_inline();\n\t}\n\treturn false;\n}", "public function print_scripts()\n {\n }", "public function print_scripts()\n {\n }", "protected function loadJavascript() {}", "function generateClientScript()\r\n\t{\r\n\t\tif ($this->bInlineScript)\r\n\t\t{\r\n\t\t\techo \"\\n<script type='text/javascript' \" . $this->sDefer . \"charset='UTF-8'>\\n\";\r\n\t\t\techo \"/* <![CDATA[ */\\n\";\r\n\r\n\t\t\tinclude(dirname(__FILE__) . '/modalWindow.js');\r\n\t\t\t\t\r\n\t\t\techo \"/* ]]> */\\n\";\r\n\t\t\techo \"</script>\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo \"\\n<script type='text/javascript' src='\" . $this->sJavascriptURI . \"xajax_plugins/response/modalWindow/modalWindow.js' \" . $this->sDefer . \"charset='UTF-8'></script>\\n\";\r\n\t\t}\r\n\t}", "function print_embed_scripts()\n {\n }", "function add_support_script_frontend(){\n}", "protected function addAdditionalScript() {\necho <<< HTML\n <script src=\"scripts/ajax.js\"></script>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"styles/customer.css\">\nHTML; \n }", "function admin_print_scripts() {\n\n \t\tdo_action('acf_print_scripts-input');\n\n\t}", "function eval_inline_php($myContent,$onlyEval=false)\n// *************************************************\n{\n\t$rVal = \"\";\n\n\t// PHP INCLUDES\n\t$pos1 = strpos($myContent,\"<?php\");\n\n\tif (!($pos1===false))\n\t{\n\t\t$pos2 = strpos($myContent,\"?>\",$pos1);\n\n\t\t$rVal .= substr($myContent,0,$pos1);\n\n\t\t// BLOCK AUSWERTEN\n\t\t$evalTxt = substr($myContent,$pos1+5,($pos2)-($pos1+5));\n\t\teval($evalTxt);\n\n\t\t// RUECKGABE BLOCK DAVOR UND DANACH\n\t\tif (!$onlyEval) return $rVal.substr($myContent,$pos2+2);\n\t}\n\telse\n\t\treturn $myContent;\n\n\treturn \"\";\n}", "function enqueue_embed_scripts()\n {\n }", "protected function doConcatenateJavaScript() {}", "public function getEnableClientScript()\n\t{\n\t\treturn true;\n\t}", "public function testInlineScript() {\n\t\t$config = $this->Helper->config();\n\t\t$config->set('js.filters', array());\n\t\t$config->paths('js', null, array(\n\t\t\t$this->_testFiles . 'js' . DS . 'classes'\n\t\t));\n\n\t\t$config->addTarget('all.js', array(\n\t\t\t'files' => array('base_class.js')\n\t\t));\n\n\t\tConfigure::write('debug', 0);\n\n\t\t$expected = <<<EOF\n<script>var BaseClass = new Class({\n\n});</script>\nEOF;\n\n\t\t$result = $this->Helper->inlineScript('all.js');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public static function addScripts() {\n\t\t$embeddedMode\t = get_option( 'cmtt_enableEmbeddedMode', false );\n\t\t$inFooter\t\t = get_option( 'cmtt_script_in_footer', false );\n\t\t/*\n\t\t * If the embeddedMode is enabled we ignore the inFooter setting\n\t\t */\n\t\tif ( $inFooter && !$embeddedMode ) {\n\t\t\tadd_action( 'wp_footer', array( __CLASS__, 'outputScripts' ), 9 );\n\t\t} else {\n\t\t\tself::outputScripts();\n\t\t}\n\t}", "function care_emit_js() {\n\tglobal $care_queued_js;\n\n\tif ( ! empty( $care_queued_js ) ) {\n\t\t// Sanitize.\n\t\t$care_queued_js = wp_check_invalid_utf8( $care_queued_js );\n\t\t$care_queued_js = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', \"'\", $care_queued_js );\n\t\t$care_queued_js = str_replace( \"\\r\", '', $care_queued_js );\n\n\t\t$emit = \"<!-- CARE Support JavaScript -->\\n<script type=\\\"text/javascript\\\">\\njQuery(function($) { $care_queued_js });\\n</script>\\n\";\n\n\t\t//dump($emit,'EMIT');\n\t\techo $emit;\n\t\t\n\t\tunset( $care_queued_js );\n\t}\n}", "function asc_script_is( $handle, $list = 'enqueued' ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\treturn (bool) $asc_scripts->query( $handle, $list );\n}", "public function enqueue_control_scripts()\n {\n }", "public function setScript()\n {\n $container = strtoupper($this->getCurrentWidget()->getPlugin());\n $NameAction = strtolower($this->getCurrentWidget()->getAction()); \n // If the widget is a \"gedmo snippet\"\n if ( ($container == 'CONTENT') && ($NameAction == 'snippet') ) {\n // if the configXml field of the widget is configured correctly.\n try {\n $xmlConfig = new \\Zend_Config_Xml($this->getCurrentWidget()->getConfigXml());\n if ($xmlConfig->widgets->get('content')){\n $snippet_widget = $this->getWidgetById($xmlConfig->widgets->content->id);\n $container = strtoupper($snippet_widget->getPlugin());\n $NameAction = strtolower($snippet_widget->getAction());\n }\n } catch (\\Exception $e) {\n } \n }\n // If the widget is a \"gedmo snippet\"\n elseif ( ($container == 'GEDMO') && ($NameAction == 'snippet') ) {\n // if the configXml field of the widget is configured correctly.\n try {\n $xmlConfig = new \\Zend_Config_Xml($this->getCurrentWidget()->getConfigXml());\n if ($xmlConfig->widgets->get('gedmo')){\n $snippet_widget = $this->getWidgetById($xmlConfig->widgets->gedmo->id);\n $container = strtoupper($snippet_widget->getPlugin());\n $NameAction = strtolower($snippet_widget->getAction());\n }\n } catch (\\Exception $e) {\n }\n } \n $this->script['js'][$container.$NameAction] = $this->extensionWidget->ScriptJsFunction($container, $NameAction);\n $this->script['css'][$container.$NameAction] = $this->extensionWidget->ScriptCssFunction($container, $NameAction);\n }", "public function getInlineJavascripts() {\n return $this->inlineScripts;\n }", "public function enableConcatenateJavascript() {}", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "public function js_1()\n {\n }", "function _ext_scripts()\n\t{\n\t\t$str = '';\n\n\t\t/* -------------------------------------------\n\t\t/* 'cp_js_end' hook.\n\t\t/* - Add Javascript into a file call at the end of the control panel\n\t\t/* - Added 2.1.2\n\t\t*/\n\t\t\t$str = $this->extensions->call('cp_js_end');\n\t\t/*\n\t\t/* -------------------------------------------*/\n\n\t\t$this->output->out_type = 'cp_asset';\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\");\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\n\t\t$this->output->set_output($str);\n\t}", "protected function initJavascriptCode() {}", "function script()\n {\n return '<script type=\"text/javascript\" src=\"' . $this->URL . '\"></script>';\n }", "public function onRun()\n {\n $this->page['visible'] = $this->property('visible');\n $this->page['button'] = $this->property('button');\n }", "final public function getInlineScripts() {\n return preg_replace(\"/[\\n]{2,}$/m\", \"\\n\", $this->internalScripts);\n }", "function script_on_submit()\n\t{\n\t\treturn '';\n\t}", "function before_block( $instance ) {\n\t\t}", "function wp_default_packages_inline_scripts($scripts)\n {\n }", "private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}", "public function isScriptAllowed()\n {\n return $this->allowScript;\n }", "public function js()\n {\n }", "public function run() {\n $class = \"\";\n if ($this->style != \"basic\") {\n if ($this->gradient) {\n $class .= \"background_$this->gradient color_$this->gradient\";\n \n }\n if ($this->roundStyle) {\n $class .= \" $this->roundStyle\";\n }\n if ($this->displayShadow && $this->shadowDirection ) {\n $class .= \" shadow_$this->shadowDirection\";\n }\n }\n \n echo CHtml::closeTag(\"div\");\n $script = \"\n $('#$this->id').find('.question').addClass( '$class' );\n $('#$this->id').faq({\n expandIconClass : '$this->expandIconClass',\n collapseIconClass : '$this->collapseIconClass'\n });\n \";\n Yii::app()->getClientScript()->registerScript($this->id, $script);\n }", "public function preExecute(){\n\n\t\n\t}", "function _ext_scripts()\r\n\t{\r\n\t\t$str = '';\r\n\r\n\t\t/* -------------------------------------------\r\n\t\t/* 'cp_js_end' hook.\r\n\t\t/* - Add Javascript into a file call at the end of the control panel\r\n\t\t/* - Added 2.1.2\r\n\t\t*/\r\n\t\t\t$str = $this->extensions->call('cp_js_end');\r\n\t\t/*\r\n\t\t/* -------------------------------------------*/\r\n\t\t\r\n\t\t$this->output->out_type = 'cp_asset';\r\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\r\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\"); \r\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\r\n\t\t$this->output->set_output($str);\r\n\t}", "public function run(){\n parent::run();\n //Do stuff...\n }", "public static function use_inline_styles(){\n return false;\n }", "public function isInline() : bool\n {\n return $this->getDisposition() == 'inline';\n }", "public function beforeRender() {\n\t\t$this->Html->script('/dximagebox/js/jquery.fancybox-1.3.4', array('inline' => false));\n\t\t$this->Html->script('/dximagebox/js/jquery.mousewheel-3.0.4.pack', array('inline' => false));\n\t\t$this->Html->script('/dximagebox/js/jquery.easing-1.3.pack', array('inline' => false));\n\t\t$this->Html->css('/dximagebox/css/jquery.fancybox-1.3.4', null, array('inline' => false)); \n\t\t\n }", "public function addInlineJavascript($script) {\n $this->inlineScripts[] = $script;\n }", "function onExtra($name)\r\n\t{\r\n\t\t$output = null;\r\n\t\tif($name==\"header\" && $this->yellow->getRequestHandler()==\"edit\")\r\n\t\t{\r\n\t\t\t$imageLocation = $this->yellow->config->get(\"serverBase\").$this->yellow->config->get(\"imageLocation\");\r\n\t\t\t$pluginLocation = $this->yellow->config->get(\"serverBase\").$this->yellow->config->get(\"pluginLocation\");\r\n\t\t\t$jqueryCdn = $this->yellow->config->get(\"jqueryCdn\");\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$jqueryCdn}\\\"></script>\\n\";\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$pluginLocation}inline-attachment.js\\\"></script>\\n\";\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$pluginLocation}jquery.inline-attachment.js\\\"></script>\\n\";\r\n\t\t\t$output .= \"<script type=\\\"text/javascript\\\">\\n\";\r\n\t\t\t$output .= \"\\$(function() {\\$('textarea').inlineattachment({uploadUrl: '{$imageLocation}upload_attachment.php'});});\";\r\n\t\t\t$output .= \"</script>\\n\";\r\n\t\t}\r\n\t\treturn $output;\r\n\t}", "final public function addInlineScript($script) {\n //We must separate scripts with newlines, so that line comments from the previous script don't affect this script\n $this->internalScripts .= $script;\n\tif(!preg_match(\"/\\n$/\", $this->internalScripts)){\n\t\t$this->internalScripts .= \"\\n\";\n\t}\n return $this;\n }", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}" ]
[ "0.6937547", "0.68634444", "0.68634444", "0.68634444", "0.67512465", "0.6738498", "0.66822356", "0.666077", "0.6652935", "0.6640596", "0.63255084", "0.6305929", "0.61653894", "0.6150084", "0.61476374", "0.60999006", "0.6068692", "0.605817", "0.60531497", "0.6051796", "0.59787893", "0.5965448", "0.5943714", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5937877", "0.5916858", "0.59064573", "0.5904547", "0.58951426", "0.58720595", "0.58649075", "0.58217436", "0.58217436", "0.58179206", "0.5771315", "0.5766099", "0.57629055", "0.5761285", "0.574887", "0.57363355", "0.5698567", "0.5689946", "0.5685106", "0.5685106", "0.5685106", "0.5685106", "0.5663703", "0.5646455", "0.5642369", "0.56343645", "0.563135", "0.56292516", "0.56251323", "0.55942667", "0.5586355", "0.55760515", "0.5559857", "0.55474323", "0.5547", "0.55454725", "0.5541266", "0.5531395", "0.5531374", "0.5519976", "0.5512848", "0.5501423", "0.549948", "0.54978937", "0.54970706", "0.54701966", "0.5465827", "0.5463139", "0.5458524", "0.54553837", "0.5450902", "0.54456806", "0.5442803", "0.54424953", "0.54364634", "0.54345155", "0.5432923", "0.54312396", "0.5418437", "0.54180557", "0.54167897", "0.540954", "0.5401783", "0.53996485", "0.5397024", "0.5393173", "0.5391433", "0.5385377", "0.5371772", "0.5361579", "0.5351588", "0.53494024", "0.53338563", "0.5332985" ]
0.0
-1
Pass any key => value pairs to be localised with the enqueue.
public function localize( array $args ): self { $this->localize = $args; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function enqueue ($entry) {\n\n}", "function enqueue(){\n\t\t}", "public static function enqueue();", "public function enqueue() {\n\t}", "public function enqueue(array $messages);", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "protected function queue($operation, $key, $sql, $values)\n {\n\t$this->queue[$operation][$key]= (object) array(\n\t'sql' => $sql,\n\t'values' => $values,\n\t);\n }", "function queue_enqueue(&$queue, $value) { \n // We are just adding a value to the end of the array, so can use the \n // [] PHP Shortcut for this. It's faster than using array_push \n $queue[] = $value; \n}", "abstract public function enqueue($Job, $priority = null);", "public static function queue($queue, $key, $data = array()) {\n static::$queued[$queue][$key] = $data;\n }", "public function queue(...$parameters): void;", "function syncCategoriesWithQueue($params)\n {\n dispatch(new SyncCategories($params));\n }", "public function admin_enqueue()\r\n {\r\n if (isset($_GET['page']) && $_GET['page'] === 'notifications') {\r\n wp_localize_script('giga-messenger-bots', 'messages', $this->messages);\r\n wp_localize_script('giga-messenger-bots', 'answers', $this->message->content);\r\n }\r\n }", "public function enqueue($value) {\n $this->add($value);\n }", "function enqueue_action($action_name, $func_name, $priority = 0, $num_para = 0){\n if(empty($action_name) || empty($func_name)) return false;\n global $_lms_action_arr;\n $_lms_action_arr[$action_name][$priority] = array(\n 'name' => $func_name, 'num_para' => $num_para,\n );\n ksort($_lms_action_arr[$action_name]);\n}", "function chabok_enqueue() {\n\tglobal $chabok_options;\n\n\twp_register_script(\n\t\t'chabokpush',\n\t\tCHABOK_URL . 'assets/js/chabokpush.min.js',\n\t\tarray(),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_register_script(\n\t\t'chabok',\n\t\tCHABOK_URL . 'assets/js/chabok-init.js',\n\t\tarray( 'chabokpush', 'jquery' ),\n\t\tCHABOK_VER,\n\t\ttrue\n\t);\n\n\twp_enqueue_script( 'chabok' );\n\n\twp_localize_script( 'chabok', 'chabok_params', array(\n\t\t'options' \t\t=> $chabok_options,\n\t\t'xhr_endpoint'\t=> admin_url( 'admin-ajax.php' ),\n\t) );\n}", "private function loadQueryValues($ar = array(null))\r\n {\r\n foreach ($ar as $key => $value) {\r\n if (is_array($value))\r\n self::$REQUEST[$key] = $value;\r\n else\r\n self::$REQUEST[$key] = strtolower($value); // URL parameters are all lower case, so form values need to be set to lower case also\r\n }\r\n }", "function acf_localize_data($data)\n{\n}", "public function enqueue( $offset );", "function syncProviderWithQueue($params)\n {\n dispatch(new SyncProviders($params));\n }", "function encode_items(&$item, $key) {\n\t$item = utf8_encode($item);\n}", "private static function localize(array &$arr)\n\t{\n\t\t$arr = isset($arr[LANG]) ? $arr[LANG] : $arr[0];\n\t}", "function tw_asset_enqueue($name) {\n\n\t$asset_name = $name;\n\n\t$assets = tw_asset_list();\n\n\tif (!empty($assets[$name])) {\n\n\t\t$asset = $assets[$name];\n\n\t\tif (!empty($asset['prefix'])) {\n\t\t\t$asset_name = $asset['prefix'] . $name;\n\t\t}\n\n\t\tif (!empty($asset['localize'])) {\n\n\t\t\tif (is_callable($asset['localize'])) {\n\t\t\t\t$asset['localize'] = call_user_func($asset['localize']);\n\t\t\t}\n\n\t\t\t$object = $name;\n\n\t\t\tif (!empty($asset['object'])) {\n\t\t\t\t$object = $asset['object'];\n\t\t\t}\n\n\t\t\tif (is_array($asset['localize'])) {\n\t\t\t\twp_localize_script($asset_name, $object, $asset['localize']);\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tif (wp_script_is($asset_name, 'registered')) {\n\t\twp_enqueue_script($asset_name);\n\t}\n\n\tif (wp_style_is($asset_name, 'registered')) {\n\t\twp_enqueue_style($asset_name);\n\t}\n\n}", "public static function enqueueAt($at, $queue, $class, $args = array())\n\t{\n\t\tself::validateJob($class, $queue);\n\n\t\t$job = self::jobToHash($queue, $class, $args);\n\t\tself::delayedPush($at, $job);\n\t\t\n\t\tResque_Event::trigger('afterRepeatSchedule', array(\n\t\t\t'at' => $at,\n\t\t\t'queue' => $queue,\n\t\t\t'class' => $class,\n\t\t\t'args' => $args,\n\t\t));\n\t}", "public function prepareTranslations($domain, $key, $message, $locale);", "public function enqueue($handles)\n {\n }", "function syncAddonWithQueue($params)\n {\n dispatch(new SyncAddons($params));\n }", "public function queued(string $key, mixed $default = null, string $path = null);", "public function setTranslationsForKey(array $messages, $key);", "private function setQueue() {\n if (count($this->request->q) > 0) {\n try {\n $this->client->setQueue(array($this->request->q));\n $this->view->addParameter(\"result\", \"success\");\n } catch(Exception $e) {\n $this->view->addParameter(\"result\", \"failure\");\n $this->view->addParameter(\"data\", \"Failed to execute '{$this->request->action}' action\");\n }\n } else {\n $this->view->addParameter(\"result\", \"invalid\");\n $this->view->addParameter(\"data\", \"Query array must not be empty\");\n }\n }", "function lang_parse($key, $args)\n{\n\tglobal $lang;\n\t\n\t// Make sure the key is uppercase\n\t$key = strtoupper($key);\n\t\n\t// Does that key exist?\n\tif(!$lang[$key])\n\t{\n\t\t// So we know it needs to be translated.\n\t\treturn '{' . $key . '}';\n\t}\n\telse\n\t{\n\t\treturn mb_vsprintf($lang[$key], $args, $lang['ENCODING']);\n\t}\n}", "public function pushOn($queue, $job, $data = '');", "function m($t, $key = '')\r\n\t{\r\n\t\t$this->arMessages[] = $t;\r\n\t\tif ($this->varMode == 'names')\r\n\t\t{\r\n\t\t\treturn (isset($this->lang[$t]) && is_array($this->lang[$t]) && isset($this->lang[$t][$key]))\r\n\t\t\t\t\t? $this->lang[$t][$key]\r\n\t\t\t\t\t: (isset($this->lang[$t]) ? $this->lang[$t] : $t);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn defined($t) ? eval(\"print $t;\") : $t;\r\n\t\t}\r\n\t}", "public static function enqueueIn($in, $queue, $class, array $args = array())\n\t{\n\t\tself::enqueueAt(time() + $in, $queue, $class, $args);\n\t}", "public function translate($key, $arg = NULL) {\n\t\tif (isset($this->dictionary[$key])) {\n\t\t\t$message = $this->dictionary[$key];\n\t\t} else {\n\t\t\t$message = $key;\n\t\t}\n\t\tif ($arg !== null) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tforeach($arg as $name=>$value) {\n\t\t\t\t\t$message = str_replace('{'.$name.'}', $value, $message);\n\t\t\t\t}\n\t\t\t\treturn $message;\n\t\t\t} else {\n\t\t\t\t$args = func_get_args();\n\t\t\t\tarray_shift($args);\n\t\t\t\treturn vsprintf($message, $args);\n\t\t\t}\n\t\t} else {\n\t\t\treturn $message;\n\t\t}\n\t}", "protected function enqueue($key)\n {\n $this->checkKey($key);\n \n $scripts = array_merge($this->scripts['scripts'], $this->scripts[$key]);\n $styles = array_merge($this->styles['styles'], $this->styles[$key]);\n \n foreach($scripts as $id => $script) {\n $deps = isset($script['deps']) ? $script['deps'] : array();\n $id = self::PREFIX . '-' . $id;\n \n wp_register_script( $id, plugins_url( $script['file'], WPBM_PLUGIN ), $deps );\n \n if (isset($script['l10n'])) {\n $method = $script['l10n'];\n wp_localize_script($id, self::PREFIX, $this->$method());\n }\n \n wp_enqueue_script( $id );\n }\n \n foreach($styles as $id => $style) {\n $deps = isset($style['deps']) ? $script['deps'] : array();\n $id = self::PREFIX . '-' . $id;\n \n wp_register_style( $id, plugins_url( $style['file'], WPBM_PLUGIN ) );\n wp_enqueue_style( $id );\n }\n }", "public function register_strings() {\r\n\t\t$db = Maps_Marker_Pro::get_instance('MMP\\DB');\r\n\t\t$l10n = Maps_Marker_Pro::get_instance('MMP\\L10n');\r\n\r\n\t\tif (!isset($_POST['nonce']) || wp_verify_nonce($_POST['nonce'], 'mmp-tools-register-strings') === false) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Security check failed', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\tif (!$l10n->ml) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('No supported multilingual plugin found', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$maps = $db->get_all_maps();\r\n\t\tforeach ($maps as $map) {\r\n\t\t\t$l10n->register(\"Map (ID {$map->id}) name\", $map->name);\r\n\t\t}\r\n\t\t$markers = $db->get_all_markers();\r\n\t\tforeach ($markers as $marker) {\r\n\t\t\t$l10n->register(\"Marker (ID {$marker->id}) name\", $marker->name);\r\n\t\t\t$l10n->register(\"Marker (ID {$marker->id}) address\", $marker->address);\r\n\t\t\t$l10n->register(\"Marker (ID {$marker->id}) popup\", $marker->popup);\r\n\t\t}\r\n\t\twp_send_json(array(\r\n\t\t\t'success' => true,\r\n\t\t\t'message' => esc_html__('Strings for all maps and markers successfully registered for translation', 'mmp')\r\n\t\t));\r\n\t}", "protected function _syncKeywords() {}", "public function enqueue($message = array()) {\n $this->_events->enqueue($message);\n }", "public static function enqueues() {\n\t\twp_enqueue_script( 'wc-country-select' ) ;\n\t\twp_enqueue_script( 'wc-address-i18n' ) ;\n\t}", "protected static function setLanguageKeys() {}", "static function load(Array $ar) {\n\t\tforeach($ar as $key => $value) {\n\t\t\t$_REQUEST[$key] = $value;\n\t\t}\n\t}", "public function enqueue_locationpicker() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Points_Of_Sale_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Points_Of_Sale_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t}", "function __($key, $values = null) {\n global $lang;\n return $lang->get($key, $values);\n}", "function fanwood_localize_topic_script() {\n\n\t// Bail if not viewing a single topic\n\tif ( !bbp_is_single_topic() )\n\t\treturn;\n\n\t$user_id = bbp_get_current_user_id();\n\n\t$localizations = array(\n\t\t'currentUserId' => $user_id,\n\t\t'topicId' => bbp_get_topic_id(),\n\t);\n\n\t// Favorites\n\tif ( bbp_is_favorites_active() ) {\n\t\t$localizations['favoritesActive'] = 1;\n\t\t$localizations['favoritesLink'] = bbp_get_favorites_permalink( $user_id );\n\t\t$localizations['isFav'] = (int) bbp_is_user_favorite( $user_id );\n\t\t$localizations['favLinkYes'] = __( 'favorites', 'bbpress' );\n\t\t$localizations['favLinkNo'] = __( '?', 'bbpress' );\n\t\t$localizations['favYes'] = __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' );\n\t\t$localizations['favNo'] = __( '%favAdd% (%favLinkNo%)', 'bbpress' );\n\t\t$localizations['favDel'] = __( '&times;', 'bbpress' );\n\t\t$localizations['favAdd'] = __( 'Add this topic to your favorites', 'bbpress' );\n\t} else {\n\t\t$localizations['favoritesActive'] = 0;\n\t}\n\n\t// Subscriptions\n\tif ( bbp_is_subscriptions_active() ) {\n\t\t$localizations['subsActive'] = 1;\n\t\t$localizations['isSubscribed'] = (int) bbp_is_user_subscribed( $user_id );\n\t\t$localizations['subsSub'] = __( 'Subscribe', 'bbpress' );\n\t\t$localizations['subsUns'] = __( 'Unsubscribe', 'bbpress' );\n\t\t$localizations['subsLink'] = bbp_get_topic_permalink();\n\t} else {\n\t\t$localizations['subsActive'] = 0;\n\t}\n\n\twp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations );\n}", "function tracks_request($request) {\n\tglobal $pagenow;\n\tif (is_admin() && $pagenow == 'edit.php' && isset($request['post_type']) && $request['post_type'] == 'track') {\n\t\t$request['order'] = 'desc';\n\t\t$request['orderby'] = 'menu_order';\n\t\tif (strlen($request['track-state'])) {\n\t\t\t$request['track-state'] = get_term($request['track-state'],'track-state')->name;\n\t\t}\n\t\tif (strlen($request['track-speciality'])) {\n\t\t\t$request['track-speciality'] = get_term($request['track-speciality'],'track-speciality')->name;\n\t\t}\n\t}\n\treturn $request;\n}", "public function registerMessages($messages, $locale = null)\n {\n foreach ($messages as $key => $value) {\n $this->registerMessage($key, $value, $locale);\n }\n }", "function _t($str/*[, mixed $args [, mixed $... ]]*/)\n{\n global $lc_lang;\n global $lc_translation;\n global $lc_translationEnabled;\n\n $args = func_get_args();\n $str = array_shift($args);\n $str = trim($str);\n\n if ($lc_translationEnabled == false) {\n return (count($args)) ? vsprintf($str, $args) : $str;\n }\n\n $po = session_get('po');\n if (!is_array($po)) {\n $po = array();\n }\n $po[$str] = '';\n\n if (isset($lc_translation[$lc_lang])) {\n # check with lowercase\n $lowerStr = strtolower($str);\n if (isset($lc_translation[$lc_lang][$lowerStr]) && !empty($lc_translation[$lc_lang][$lowerStr])) {\n $translated = $lc_translation[$lc_lang][$lowerStr];\n $str = (is_array($translated)) ? $translated[0] : $translated;\n }\n }\n\n if (isset($translated)) {\n $po[$str] = $translated;\n }\n return (count($args)) ? vsprintf($str, $args) : $str;\n}", "public function registerWorker()\r\n {\r\n Resque::redis()->sadd('workers', $this);\r\n setlocale(LC_TIME, \"\");\r\n setlocale(LC_ALL, \"en\");\r\n Resque::redis()->set('worker:' . (string)$this . ':started', strftime('%a %b %d %H:%M:%S %Z %Y'));\r\n }", "public function enqueue_graphiql()\n {\n }", "function syncServiceWithQueue($params)\n {\n dispatch(new SyncService($params));\n }", "function pushDataAsText($data, $prefix = '');", "function json_cb(&$item, $key) { \n if (is_string($item)) $item = mb_encode_numericentity($item, array (0x80, 0xffff, 0, 0xffff), 'UTF-8'); \n}", "function enqueue_fullcalendar_locale() {\n $locale = get_locale();\n $script = '';\n\n // no need to add locale for en_US\n if ( 'en_US' === $locale ) {\n return;\n }\n\n $locale = explode( '_', $locale );\n\n // make sure we have two segments - 1.lang, 2.country\n if ( count( $locale ) < 2 ) {\n return;\n }\n\n $lang = $locale[0];\n $country = strtolower( $locale[1] );\n\n if ( $lang === $country ) {\n $script = $lang;\n } else {\n $script = $lang . '-' . $country;\n }\n\n if ( file_exists( WPERP_PATH . \"/assets/vendor/fullcalendar/lang/{$script}.js\" ) ) {\n wp_enqueue_script( 'erp-fullcalendar-locale', WPERP_ASSETS . \"/vendor/fullcalendar/lang/{$script}.js\", array( 'erp-fullcalendar' ), null, true );\n }\n}", "function admin_bar_css()\n{\n queue_css_url('//fonts.googleapis.com/css?family=Arvo:400', 'screen');\n queue_css_file('admin-bar', 'screen');\n}", "function __t($key, $values = null)\n{\n // Get current locale\n $locale = cache()->rememberForever('language', function () {\n try {\n return get_setting('language') ?? 'en';\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return 'en';\n }\n });\n\n // Get language strings\n $strings = cache()->rememberForever(\"language-translations-$locale\", function () use ($locale) {\n try {\n return Language::whereLocale($locale)->firstOrFail()->languageTranslations;\n } catch (QueryException | ModelNotFoundException $e) {\n return null;\n }\n }) ?? get_default_language_translations();\n\n // Find the string by key\n $string = $strings->firstWhere('key', $key)->value ?? $strings->get($key);\n\n if ($values) {\n return replace_occurrence($string, collect($values));\n }\n\n return $string;\n}", "function l(){\n\tglobal $_LOCALE;\n\t\n\t$entry = $_LOCALE;\n\t$args = func_get_args();\n\t\n\tfor($i = 0; $i < count($args); $i++){\n\t\t$key = $args[$i];\n\t\tif ( array_key_exists($key, $entry) ) {\n\t\t\t$entry = $entry[$key];\n\t\t\tif ( ! is_array($entry) )\n\t\t\t\tbreak;\n\t\t} else {\n\t\t\t$entry = 'Missing entry in language file: ' . join(' → ', array_slice($args, 0, $i + 1));\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t$format_args = array_slice($args, $i + 1);\n\treturn (is_string($entry) and count($format_args) > 0) ? vsprintf($entry, $format_args) : $entry;\n}", "public function getQueueJob(array $data);", "public function public_enqueues() {\n wp_enqueue_style(\n 'wfc-preloader-css',\n WFC_PL_CSS . '/preloader.css'\n );\n\n wp_enqueue_script(\n 'wfc-preloader-js',\n WFC_PL_JS . '/preloader.js',\n array('jquery'),\n '',\n true\n );\n\n $wfc_preloader_enable = wfc_toolkit_get_option( 'enable_preloader' ) ? 1 : 0;\n $wfc_preloader_image_id = wfc_toolkit_get_option( 'preloader_spinner_image' );\n $wfc_preloader_background_color = wfc_toolkit_get_option( 'preloader_background', '#000000' );\n wp_localize_script(\n 'wfc-preloader-js',\n 'wfc_preloader',\n array(\n 'enable' => $wfc_preloader_enable, \n 'image' => $wfc_preloader_image_id,\n 'background_color' => $wfc_preloader_background_color,\n 'is_preload' => $this->genesis_preloader_load(true) !== null ? 1 : 0\n )\n );\n }", "public function addValueMarkers() {\n\t\t$args = func_get_args();\n\t\t$this->setProperty('chm', $this->encodeData($args, ','), true);\n\t}", "public function queue($key, $task, $params, $freshFor, $force = false, $tags = array(), $priority = 50, $delay = 0, $channel = 1);", "public function enqueue(array $items)\n {\n //$t0 = the time that the next item currently in the queue will get expired (inf if nothing)\n //$best = the id corresponding to $t0 (0 if nothing)\n //$n = the number of items in $items array that are going to get expired sooner than $t0\n $first = $this->redis->zrange($this->name, 0, 0, 'WITHSCORES');\n if (count($first)) {\n $t0 = array_values($first)[0];\n $best = array_keys($first)[0];\n $n = 0;\n foreach ($items as $item) {\n if($item->score < $t0) {\n $n++;\n }\n }\n } else {\n $t0 = INF;\n $best = 0;\n $n = count($items);\n }\n //zadd $items in the sorted set\n $this->queue->enqueue($items);\n //lpush $n flags into list \"{$this->name}:$best\" and make sure this list will expire soon\n if ($n) {\n $this->redis->lpush($this->name . ':' . $best, array_fill(0, $n, ''));\n $exp = $t0 != INF ? ceil($t0) : time() + 1;\n $this->redis->expireat($this->name . ':' . $best, $exp);\n }\n }", "public function enqueue()\n {\n wp_enqueue_script('google-maps', '//maps.googleapis.com/maps/api/js?key=' . $this->apiKey, array(), '3', true);\n wp_enqueue_script('google-map-init');\n }", "public function enqueueAll($messages = array()) {\n $this->_events->enqueueAll($messages);\n }", "public function enqueue($item)\n {\n array_push($this->array, $item);\n }", "function _acf_apply_language_cache_key($key)\n{\n}", "public function enqueueRequests()\n {\n if (!$this->has_requests) {\n\t\treturn \"No requests to send\";\n\t}\n\t\n\t$finished = \"Error connecting to redis\";\n \n try {\n $redis = new Redis();\n $redis->pconnect(REDIS_ADDRESS);\n \n $multi = $redis->multi();\n \n //Executing all posts to Redis in one multi batch\n foreach ($this->data_requests as $key => $request) {\n $uuid = $request->getUUID();\n \n $multi->lPush(PENDING_QUEUE, $uuid);\n $multi->hSet(VALUES_HASH, $uuid, $request->getFormattedURL());\n $multi->hSet(VALUES_HASH, $uuid . ':method', $this->endpoint->method);\n $multi->hSet(STATS_HASH, $uuid . ':start', $this->start_time);\n }\n \n $ret = $multi->exec();\n \n $finished = \"Postback Delivered\";\n \n //Seach results for any errors from Redis commands\n foreach ($ret as $idx => $result) {\n if (!$result) {\n $finished = \"Redis call failed: \" . $idx;\n }\n }\n \n }\n catch (Exception $e) {\n return \"Error posting to Redis\";\n }\n \n return $finished;\n \n }", "function enqueue_form()\n {\n }", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "public function push($job, $data = '', $queue = null);", "public function shop_js_localize( $localize ) {\n\t\t\tglobal $wp_query;\n\n\t\t\t$single_ajax_add_to_cart = astra_get_option( 'single-product-ajax-add-to-cart' );\n\n\t\t\tif ( is_singular( 'product' ) ) {\n\t\t\t\t$product = wc_get_product( get_the_id() );\n\t\t\t\tif ( false !== $product && $product->is_type( 'external' ) ) {\n\t\t\t\t\t// Disable Ajax Add to Cart feature for External/Affiliate product.\n\t\t\t\t\t$single_ajax_add_to_cart = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$shop_pagination = astra_get_option( 'shop-pagination' );\n\t\t\t$shop_infinite_scroll_event = astra_get_option( 'shop-infinite-scroll-event' );\n\n\t\t\t$localize['edit_post_url'] = admin_url( 'post.php?post={{id}}&action=edit' );\n\t\t\t$localize['ajax_url'] = admin_url( 'admin-ajax.php' );\n\t\t\t$localize['shop_infinite_count'] = 2;\n\t\t\t$localize['shop_infinite_total'] = $wp_query->max_num_pages;\n\t\t\t$localize['shop_pagination'] = $shop_pagination;\n\t\t\t$localize['shop_infinite_scroll_event'] = $shop_infinite_scroll_event;\n\t\t\t$localize['shop_no_more_post_message'] = apply_filters( 'astra_shop_no_more_product_text', __( 'No more products to show.', 'astra-addon' ) );\n\n\t\t\t$localize['checkout_prev_text'] = __( 'Back to my details', 'astra-addon' );\n\t\t\t$localize['checkout_next_text'] = __( 'Proceed to payment', 'astra-addon' );\n\n\t\t\t$localize['show_comments'] = __( 'Show Comments', 'astra-addon' );\n\n\t\t\t$localize['shop_quick_view_enable'] = astra_get_option( 'shop-quick-view-enable' );\n\t\t\t$localize['shop_quick_view_stick_cart'] = astra_get_option( 'shop-quick-view-stick-cart' );\n\t\t\t$localize['shop_quick_view_auto_height'] = true;\n\t\t\t$localize['single_product_qty_ajax_nonce'] = wp_create_nonce( 'single_product_qty_ajax_nonce' );\n\t\t\t$localize['single_product_ajax_add_to_cart'] = $single_ajax_add_to_cart;\n\t\t\t$localize['is_cart'] = is_cart();\n\t\t\t$localize['is_single_product'] = is_product();\n\t\t\t$localize['view_cart'] = esc_attr__( 'View cart', 'astra-addon' );\n\t\t\t$localize['cart_url'] = apply_filters( 'astra_woocommerce_add_to_cart_redirect', wc_get_cart_url() );\n\n\t\t\treturn $localize;\n\t\t}", "public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}", "public function resolveQueueUsing($callback)\n {\n $this->queueResolver = $callback;\n }", "function _trans($default = null, $key = null, $replace = [], $locale = null)\n {\n if (is_null($key)) {\n return $default;\n }\n\n return trans($key, $replace, $locale);\n }", "function wpt_enqueued()\n{\n global $wp_scripts, $wp_styles;\n\n $list = array('scripts'=>[],'styles'=>[]);\n\n foreach( $wp_scripts->queue as $script )\n $list['scripts'][] = $wp_scripts->registered[$script];\n\n foreach( $wp_styles->queue as $style)\n $list['styles'][] = $wp_styles->registered[$style];\n\n return $list;\n\n}", "abstract public function push($job, $queue = null);", "public function __construct($local = 'en_EN') {\r\n\t\t$file = LANG_PATH . $local . '.php';\r\n\t\tinclude $file;\r\n\t\t$this->dictionary = $dictionary;\r\n\t}", "public static function enqueue($queue, $class, $args = array(), $trackStatus = null) {\n\t\tif ($trackStatus === null) {\n\t\t\t$trackStatus = Configure::read('CakeResque.Job.track');\n\t\t}\n\n\t\t$r = Resque::enqueue($queue, $class, $args, $trackStatus);\n\n\t\tif (!is_array($args)) {\n\t\t\t$args = array($args);\n\t\t}\n\n\t\t$caller = version_compare(PHP_VERSION, '5.4.0') >= 0\n\t\t\t? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)\n\t\t\t: debug_backtrace(FALSE);\n\n\t\tself::$logs[$queue][] = array(\n\t\t\t'queue' => $queue,\n\t\t\t'class' => $class,\n\t\t\t'method' => array_shift($args),\n\t\t\t'args' => $args,\n\t\t\t'jobId' => $r,\n\t\t\t'caller' => $caller\n\t\t);\n\n\t\treturn $r;\n\t}", "private function localize( $file ) {\n\t\tif( $this->enqueue_script( $file['src'] ) ) {\n\t\t\twp_localize_script( $file['handle'], $file['object_name'], $file['l10n'] );\n\t\t}\n\t}", "public function __construct(\\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {\n parent::__construct('Plugin/QueueWorker', $namespaces, $module_handler, 'Drupal\\Core\\Queue\\QueueWorkerInterface', 'Drupal\\Core\\Annotation\\QueueWorker');\n\n $this->setCacheBackend($cache_backend, 'queue_plugins');\n $this->alterInfo('queue_info');\n }", "abstract public function queue($ts = null);", "public function __construct( $args )\n {\n parent::__construct( 'queue_restriction', $args );\n \n $this->add_column( 'site.name', 'string', 'Site', true );\n $this->add_column( 'city', 'string', 'City', true );\n $this->add_column( 'region.name', 'string', 'Region', false );\n $this->add_column( 'postcode', 'string', 'Postcode', true );\n }", "function it_exchange_abandoned_carts_update_qualified_shoppers_queue( $new_queue=array() ) {\n\t$plugin_options = it_exchange_get_option( 'addon_abandoned_carts' );\n\t$new_queue = (array) $new_queue;\n\t$new_queue = apply_filters( 'it_exchange_abandoned_carts_update_qualified_shoppers_queue', $new_queue );\n\n\t$plugin_options['qualified_shoppers'] = $new_queue;\n\tit_exchange_save_option( 'addon_abandoned_carts', $plugin_options );\n}", "function setAllTranslationStrings($list) {\n\t\t$this->translationStrings = $list;\n\t}", "public function testEnqueueWithSynchronousTopic()\n {\n $topicName = 'topic.name';\n $response = 'responseBody';\n $topicData = [\n \\Magento\\Framework\\Communication\\ConfigInterface::TOPIC_IS_SYNCHRONOUS => true\n ];\n $this->communicationConfig->expects($this->once())\n ->method('getTopic')->with($topicName)->willReturn($topicData);\n $envelope = $this\n ->getMockBuilder(\\Magento\\Framework\\MessageQueue\\EnvelopeInterface::class)\n ->disableOriginalConstructor()->getMock();\n $this->exchange->expects($this->once())->method('enqueue')->with($topicName, $envelope)->willReturn($response);\n $this->assertEquals([$response], $this->bulkExchange->enqueue($topicName, [$envelope]));\n }", "function localisation_sc_map() {\n\treturn vdsl_get_template( 'archive-retailers.php' );\n}", "public function pushRaw($payload, $queue = null, array $options = []);", "function _post_format_request($qvs)\n {\n }", "public function ackQueueMessagesExtern($params = null);", "public function push($queue, $jobClass, array $arguments);", "public function logQueueLookupEvent(QueueLookupEvent $event)\n {\n $this->output->writeln('QueueLookupEvent:: Looking up Job with params' .json_encode(array(\n 'job_id' => $event->getJobId() \n )));\n }", "protected function localizer() {\n\t\treturn wponion_localize()->as_array();\n\t}", "protected function prepareMessage() {\n //Initialize $message\n $message = '';\n //loop through $this->_storage array\n foreach ($this->_storage as $key => $value) {\n // if it has no value, assign 'Not provided' \n $value = (empty($value)) ? 'Not provided' : $value;\n // if an array, expand as comma-separated string \n if (is_array($value)) {\n $value = implode(', ', $value);\n }\n // replace underscores and hyphens in the label with spaces \n $key = str_replace(array('_', '-'), ' ', $key);\n // add label and value to the message body. Uppercase first letter\n $message .=ucfirst($key) . \": $value\\r\\n\\r\\n\";\n }\n // limit line length to 70 characters \n $this->_body = wordwrap($message, 70);\n }", "function item_put($key = null)\n {\n $incoming = key($this->put());\n // decode record before anything, as assoc array\n $record = json_decode($incoming,true);\n // item ID specified as segment or query parameter\n if (($key == null) || ($key == 'id'))\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $record);\n }\n $this->crud_put($record);\n }", "public function enqueueMultiple($items)\n {\n $this->addMultiple($items);\n }" ]
[ "0.61594284", "0.54363513", "0.52288324", "0.5086183", "0.50430226", "0.49302354", "0.49302354", "0.49302354", "0.49302354", "0.49302354", "0.49302354", "0.49185124", "0.4917589", "0.49100783", "0.49020225", "0.48927292", "0.4870606", "0.484717", "0.4644371", "0.46242762", "0.46174142", "0.45636946", "0.4514671", "0.45092455", "0.44770133", "0.4445471", "0.44356543", "0.4429087", "0.437711", "0.4372972", "0.43727487", "0.43473208", "0.4328246", "0.4312258", "0.42898738", "0.427389", "0.42700624", "0.4255193", "0.42544302", "0.4254366", "0.425231", "0.42521542", "0.4248521", "0.42456356", "0.4222756", "0.42199406", "0.42084613", "0.42066234", "0.420564", "0.41968971", "0.41966972", "0.41945735", "0.41926232", "0.4185288", "0.41742995", "0.41651428", "0.41579342", "0.41482535", "0.41330287", "0.41286305", "0.4120562", "0.41129324", "0.41061723", "0.40965542", "0.40955377", "0.40953958", "0.4094873", "0.40904105", "0.4089119", "0.4086423", "0.40779996", "0.40710846", "0.40704235", "0.40678173", "0.40599248", "0.40557852", "0.4052337", "0.40499124", "0.40424174", "0.40417847", "0.40414348", "0.4030225", "0.40256992", "0.40256718", "0.40238792", "0.4014011", "0.40061313", "0.39974514", "0.3996632", "0.3991892", "0.39904636", "0.39896604", "0.39886898", "0.39862725", "0.3980592", "0.39722514", "0.397168", "0.39590228", "0.39570558", "0.39566734" ]
0.4524549
22
Registers the file as either enqueued or inline parsed.
public function register(): void { if ( $this->type === 'script' ) { $this->register_script(); } if ( $this->type === 'style' ) { $this->register_style(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "public function startIncluding($fileName)\n\t{\n\t\t$thisHandler = array($this, 'handle');\n\n\t\t$oldHandler = set_error_handler($thisHandler);\n\t\tif ($oldHandler === $thisHandler) {\n\t\t\trestore_error_handler();\n\t\t}\n\t\tarray_push($this->files, $fileName);\n\t}", "public function register ()\n {\n\n add_action( 'enqueue_block_editor_assets', array ( $this , 'mtk_enqueueBlockEditorFiles' ) );\n add_action( 'enqueue_block_assets ', array ( $this , 'mtk_enqueueBlockFiles' ) );\n $this->registerBlock();\n }", "private function enqueue () {\n\n\t\t$this->add_action ('admin_enqueue_scripts', $this, 'enqueue_files' );\n\t}", "public function addFile($file, $register = true)\n {\n if (!is_file($file))\n {\n return;\n }\n\n if (in_array($file, $this->files))\n {\n if ($this->cacheLoaded)\n {\n return;\n }\n }\n else\n {\n if ($register)\n {\n $this->files[] = $file;\n }\n }\n\n if ($register)\n {\n $this->cacheChanged = true;\n }\n\n preg_match_all('~^\\s*(?:abstract\\s+|final\\s+)?(?:class|interface|trait)\\s+(\\w+)~mi', file_get_contents($file), $classes);\n foreach ($classes[1] as $class)\n {\n $this->classes[strtolower($class)] = $file;\n }\n }", "public function addFile($file, $register = true)\n {\n if (!is_file($file))\n return;\n\n if (in_array($file, $this->files))\n return;\n\n if ($register)\n $this->files[] = $file;\n\n preg_match_all('~^\\s*(?:abstract\\s+|final\\s+)?(?:class|interface)\\s+(\\w+)~mi', file_get_contents($file), $classes);\n foreach ($classes[1] as $class)\n $this->classes[strtolower($class)] = $file;\n }", "function register($metatype, callable $filefilter) {\n\t\tstatic::$filefilters[$metatype] = $filefilter;\n\t}", "function onFile($file) {\r\n\t\t$this->_filesystemList [] = $file;\r\n\t}", "private function register_script() {\n\n\t\tif ( $this->inline ) {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t'',\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t\tif ( $this->does_file_exist( $this->src ) ) {\n\t\t\t\twp_add_inline_script( $this->handle, file_get_contents( $this->src ) );\n\t\t\t}\n\t\t} else {\n\t\t\twp_register_script(\n\t\t\t\t$this->handle,\n\t\t\t\t$this->src,\n\t\t\t\t$this->deps,\n\t\t\t\t$this->ver,\n\t\t\t\t$this->footer\n\t\t\t);\n\t\t}\n\n\t\tif ( ! empty( $this->localize ) ) {\n\t\t\twp_localize_script( $this->handle, $this->handle, $this->localize );\n\t\t}\n\n\t\twp_enqueue_script( $this->handle );\n\t}", "public function register() {\n\n if ( ! function_exists( 'register_block_type' ) ) {\n return;\n }\n\n register_block_type( 'minervakb/' . $this->ID, array(\n 'attributes' => $this->get_block_attributes(),\n 'render_callback' => array($this, 'wrapped_render')\n ));\n }", "protected function registerFileLoader()\n {\n $command = new UpdateTranslationsCommand();\n $this->app['command.translator:update'] = $command;\n $this->commands( 'command.translator:update' );\n }", "public function addFile($file);", "public function addFileTask(string $fileName, $_globals = NULL): void {}", "public function addFileAndRender(string $filename, Data $data = null) : Content;", "private function add($type, $file)\n {\n array_push($this->asset[$type], $file);\n }", "function addInclude($path,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= 'include('.$this->prepareVariableString($path).');'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= 'include($'.$value.');'.chr(10);\n\t\t } \n\t\t}", "function register_hotlink_scanner() {\n \tadd_action( 'save_post', array( &$this, 'localize_hotlinked_files' ) );\n\t}", "public function parse($file){\n $this->fileReader->open($file);\n $this->registerCallback();\n $this->fileReader->parse($file);\n $this->fileReader->close($file);\n }", "function enqueue(){\n\t\t}", "public function mtk_enqueueBlockEditorFiles()\n {\n $handle = 'mtk_cptshortcode_editor';\n $src = $this->plugin_url . 'assets/gut_cptshortcode.js';\n $deps = array( 'wp-blocks' , 'wp-element') ;\n wp_register_script( $handle , $src , $deps );\n\n /* Register global block css - backend only */\n $handle = 'mtk_cptshortcode_editor';\n $src = $this->plugin_url . 'assets/gut_cptshortcode_editor.css';\n $deps = array( 'wp-edit-blocks') ;\n $ver = filemtime( $this->plugin_path . 'assets/gut_cptshortcode_editor.css' );\n wp_register_style( $handle, $src, $deps, $ver );\n }", "public function add($file) {\n\t\tarray_push($this->files, $file);\n\t}", "protected function registerFileLoader()\n {\n $app = $this->app;\n $defaultLocale = config('app.locale');\n $languageRepository = $app->make(LanguageRepository::class);\n $translationRepository = $app->make(TranslationRepository::class);\n $translationsPath = base_path('lang');\n $command = new TranslationsLoaderCommand(\n $languageRepository,\n $translationRepository,\n $app['files'],\n $translationsPath,\n $defaultLocale\n );\n\n $this->app['command.translator:load'] = $command;\n $this->commands('command.translator:load');\n }", "function OnFileUploaded($file) {\n\tAddFileToDatabase($file);\n\tScanFileOnVirusTotal($file);\n}", "function enqueue ($entry) {\n\n}", "protected function register(): void\n {\n if (function_exists('acf_register_block')) {\n acf_register_block_type(array(\n 'name' => $this->id,\n 'title' => $this->title,\n 'description' => $this->description,\n 'render_callback' => [$this, 'render'],\n 'category' => 'layout',\n 'icon' => 'screenoptions',\n 'keywords' => [$this->id, 'zkd'],\n 'supports' => ['anchor' => true]\n ));\n }\n }", "public function enqueue_uploader()\n {\n }", "public function enqueue() {\n\t}", "public function register() {\n\t\t$this->register_script();\n\t\t$this->register_style();\n\t\t$this->register_type();\n\t}", "public function parse(): void\n {\n $this->template->assign('page_title', BL::getLabel($this->url->getModule()));\n $this->cssFiles->parse($this->template, 'cssFiles');\n $this->jsFiles->parse($this->template, 'jsFiles');\n\n $this->jsData->add('site', 'domain', SITE_DOMAIN);\n $this->jsData->add('editor', 'language', $this->getCKEditorLanguage());\n $this->jsData->add('Core', 'session_timeout', $this->getFirstPossibleSessionTimeout());\n\n if (!empty($this->get('fork.settings')->get('Core', 'theme'))) {\n $this->jsData->add('theme', 'theme', $this->get('fork.settings')->get('Core', 'theme'));\n $themePath = FRONTEND_PATH . '/Themes/' . $this->get('fork.settings')->get('Core', 'theme');\n $this->jsData->add('theme', 'path', $themePath);\n $this->jsData->add('theme', 'has_css', is_file($themePath . '/Core/Layout/Css/screen.css'));\n $this->jsData->add('theme', 'has_editor_css', is_file($themePath . '/Core/Layout/Css/editor_content.css'));\n }\n $this->template->assign('jsData', $this->jsData);\n }", "protected function add_ready_file( $file ) {\r\n\t\t\t$file['isvalid'] = true;\r\n\t\t\t$file['issaved'] = true;\r\n\t\t\t\r\n\t\t\t$this->Files_ready[] = $file;\r\n\t\t\t$this->Files_ready_count++;\r\n\t\t}", "function acf_enqueue_uploader()\n {\n }", "function registerHandler($format, $callback);", "public function editor_enqueue()\n\t{\n\t\tadd_editor_style('assets/css/editor.css');\n\t}", "function register_block_core_file()\n {\n }", "public function addFileFiltered($file, $localName = null)\n {\n if (!isset($this->filters)) {\n throw new \\LogicException('No filters available.');\n }\n\n if (!is_file($file)) {\n throw new \\InvalidArgumentException('File not found ' . $file);\n }\n\n $this->addFromString($localName ?: $file, $this->filters->process($file, file_get_contents($file)));\n }", "public function enqueue()\n {\n wp_enqueue_media();\n\n // Styles\n\n // Scripts\n $class_name = get_class( $this );\n wp_enqueue_script( 'elementor-file-uploader', EFU_DIR_URL . \"/inc/controls/$class_name/$class_name.js\", [ 'jquery' ], '1.0' );\n }", "public static function enqueue_default_editor()\n {\n }", "public function addFile($file)\r\n\t{\r\n\t\t$this->frame[Cache::FILES][] = $file;\r\n\t}", "function register() {\n // Para el back-end\n add_action('admin_enqueue_scripts', array($this, 'put_in_queue'));\n // Para el front-end\n add_action('wp_enqueue_scripts', array($this, 'put_in_queue'));\n // Generar nuestro custom post type\n add_action('init', array($this, 'custom_post_type'));\n\n // Añadir una metabox a nuestro custom post type backend\n add_action('add_meta_boxes', array($this, 'reviews_meta_box'));\n // Guardar los cambios que hagamos en los custom post type backend\n add_action('save_post', array($this, 'save_review'));\n\n // Crear un enlace para los settings del plugin en el admin area\n add_action('admin_menu', array($this, 'add_admin_pages'));\n }", "protected function registerFile()\n {\n $this->app->bind('Ipalaus\\File\\File', function ($app) {\n $storageEngine = $app['file.storage.store'];\n $fileRepository = $app['file.repository'];\n $transformationRepository = $app['file.repository.transformation'];\n $fileBag = $app['request']->files;\n $transformers = $app['config']->get('file.transformers');\n\n return new File($storageEngine, $fileRepository, $transformationRepository, $fileBag, $app, $transformers);\n });\n\n $this->app->alias('Ipalaus\\File\\File', 'file');\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "public function enqueue()\n {\n }", "protected function register_files()\r\n\t\t{\r\n\t\t\t// register paths\r\n\t\t\t$this->paths[ self::ROOT_INDEX ] = $this->local;\r\n\t\t\t$this->register_ini( $this->paths[ self::ROOT_INDEX ] . self::REGISTRY_FILE );\r\n\t\t\t\t\r\n\t\t\tforeach( $this->path_follow as $index => $p )\r\n\t\t\t{\r\n\t\t\t\t// put together local path names\r\n\t\t\t\t$this->paths[ $index ] = $this->local . $p . DIRECTORY_SEPARATOR;\r\n\t\t\t\t\r\n\t\t\t\t// look for registries to assign id's to\r\n\t\t\t\t$this->register_ini( $this->paths[ $index ] . self::REGISTRY_FILE, $p, $p, $index );\r\n\t\t\t}\r\n\t\t}", "public function parse($file);", "public function parse($file);", "public static function _register()\n {\n self::assignElements([\n 'Type' => ['type' => 'MarkUpMarkDownEventTypeCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'Time' => [],\n 'Reason' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function addPostFile($name, $file, $content_type = null) {}", "function load_file( $name, $file_path, $is_script = false )\n\t\t\t{\n\t\t\n\t\t \t$url = content_url( $file_path, __FILE__ );\n\t\t\t\t$file = $file_path;\n\t\t\t\t\t\n\t\t\t\tif( $is_script )\n\t\t\t\t{\n\n\t\t\t\t\twp_register_script( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_script( $name );\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\twp_register_style( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_style( $name );\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "function load_file( $name, $file_path, $is_script = false )\n\t\t\t{\n\t\t\n\t\t \t$url = content_url( $file_path, __FILE__ );\n\t\t\t\t$file = $file_path;\n\t\t\t\t\t\n\t\t\t\tif( $is_script )\n\t\t\t\t{\n\n\t\t\t\t\twp_register_script( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_script( $name );\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\twp_register_style( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_style( $name );\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "function register_importer() {\n\t\tglobal $wp_importers;\n\n\t\tif( ! isset( $wp_importers['wgobd_the_events_calendar'] ) ) {\n\t\t\t$wp_importers['wgobd_the_events_calendar'] = array(\n\t\t\t\t__( 'The Events Calendar → All-in-One Event Calendar', wgobd_PLUGIN_NAME ),\n\t\t\t\t__( 'Imports events created using The Events Calendar plugin into the All-in-One Event Calendar', wgobd_PLUGIN_NAME ),\n\t\t\t\tarray( &$this, 'import_the_events_calendar' )\n\t\t\t);\n\t\t}\n\t}", "public function add()\n\t{\n\t\tforeach (func_get_args() as $script) {\n\t\t\t$asset = $this->input_path . $script;\n\t\t\tarray_push($this->files, $asset);\n\t\t}\n\t}", "public function register() {\n\t\tadd_filter( 'mce_external_plugins', array( $this, 'enqueue_plugin_scripts' ) );\n\t\tadd_filter( 'mce_buttons', array( $this, 'register_buttons_to_editor' ) );\n\t\tadd_action( 'admin_head', array( $this, 'my_add_styles_admin' ) );\n\t\tadd_action( 'add_meta_boxes', array( $this, 'create_meta_box' ) );\n\t\tadd_action( 'save_post', array( $this, 'slider_meta_save' ) );\n\n\t}", "public function mtk_enqueueBlockFiles()\n {\n $handle = 'mtk_cptshortcode';\n $src = $this->plugin_url . 'assets/gut_cptshortcode.css';\n $deps = array( 'wp-edit-blocks') ;\n $ver = filemtime( $this->plugin_path . 'assets/gut_cptshortcode.css' );\n wp_register_style( $handle, $src, $deps, $ver );\n }", "private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public function registerFileEngine($resolver)\n {\n $resolver->register('file', function () {\n return new FileEngine();\n });\n }", "public function enqueue() {\n\t\t\tstatic $enqueued = false;\n\n\t\t\t//Don't enqueue more than once\n\t\t\tif ( $enqueued ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$enqueued = true;\n\t\t\t// Set up min files for dev_mode = false.\n\t\t\t$min = Redux_Functions::isMin();\n\n\t\t\t// Field dependent JS\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-css_layout-js',\n\t\t\t\t$this->extension_url . 'field_css_layout' . $min . '.js',\n\t\t\t\tarray( 'jquery', 'wp-color-picker', 'select2-js' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_enqueue_style( 'select2-css' );\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-color-picker-css',\n\t\t\t\tReduxFramework::$_url . 'assets/css/color-picker/color-picker.css',\n\t\t\t\tarray( 'wp-color-picker' ),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\n\t\t\twp_enqueue_style(\n\t\t\t\t'redux-field-css_layout-css',\n\t\t\t\t$this->extension_url . 'field_css_layout.css',\n\t\t\t\tarray(),\n\t\t\t\tReduxFramework_extension_css_layout::$version,\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "public function registerParser(IParser $parser)\n {\n array_unshift($this->parsers, $parser);\n }", "public function addFile($file) {\n $this->files[$file->getName()] = $file;\n }", "function registerExternalFunction($mFunction,$sIncludeFile,$sRequestType=XAJAX_POST)\n\t{\n\t\t$this->registerFunction($mFunction, $sRequestType);\n\n\t\tif (is_array($mFunction)) {\n\t\t\t$this->aFunctionIncludeFiles[$mFunction[0]] = $sIncludeFile;\n\t\t}\n\t\telse {\n\t\t\t$this->aFunctionIncludeFiles[$mFunction] = $sIncludeFile;\n\t\t}\n\t}", "public function register(): void {\n\t\tadd_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );\n\t\tadd_action( 'admin_notices', [ $this, 'render_notice' ] );\n\t\tadd_action( 'network_admin_notices', [ $this, 'render_notice' ] );\n\t}", "public function register()\n {\n // Do nothing special for the content types.\n }", "public function register(): void\n\t{\n\t\t\\add_action('login_enqueue_scripts', [$this, 'enqueueStyles']);\n\t\t\\add_action('admin_enqueue_scripts', [$this, 'enqueueStyles'], 50);\n\t\t\\add_action('admin_enqueue_scripts', [$this, 'enqueueScripts']);\n\t}", "public static function enqueue();", "protected function initializeExternalParsers() {}", "function onInsertFile(&$man, &$file) {\r\n\t\treturn true;\r\n\t}", "public function registerFormat(Format\\FormatInterface $format)\n\t{\n\t\t$this->formats->add($format);\n\t}", "private function register_filehandler()\r\n\t{\r\n\t\t$myid = CCMSFileElementsRegister::register_element($this->objectname, \"CCMSPictureShowFile\", $this->path,$this->webpath, $this->type, $this->size);\r\n\t\tCCMSFileElementsRegister::extend_register($myid, Array(\"width\" => $this->maxwidth, \"height\" => $this->maxheight, \"prewidth\"=> $this->preview_width));\r\n\t\t$this->myid = $myid;\r\n\t\treturn $myid;\r\n\t}", "function fileNeedsProcessing() ;", "public function register(){\n add_action('admin_enqueue_scripts',array($this,'enqueue'));\n //load front end wp css & js\n add_action('wp_enqueue_scripts',array($this,'enqueue'));\n }", "public function kiwip_stylesheet_add_file(){\n\t\t//register\n\t\tforeach($this->stylesheet as $key){\n\t\t\twp_register_style('kiwip_shortcode-css-'.$key['stylesheetId'], $key['stylesheetURL']);\n\t\t}\n\t\t\n\t\t//load\n\t\tforeach($this->stylesheet as $eky){\n\t\t\twp_enqueue_style('kiwip_shortcode-css-'.$key['stylesheetId']);\n\t\t}\t\t\n\n\t\t// $this->debug($this->stylesheet); die();\n\t}", "function visitTwigFile(\\SplFileInfo $file, MessageCatalogue $catalogue, \\Twig_Node $ast)\r\n {\r\n // TODO: Implement visitTwigFile() method.\r\n }", "public function register() {\n\t\tparent::register();\n\t\tadd_action( 'load-theme-editor.php', array( $this, 'get_edition_data' ) );\n\t\tadd_action( 'load-plugin-editor.php', array( $this, 'get_edition_data' ) );\n\t\tadd_filter( 'wp_redirect', array( $this, 'log_changes' ) );\n\t}", "function acf_enqueue_uploader()\n{\n}", "public function add(SplFileInfo $splFileInfo);", "public static function enqueue_vc_inline_assets() {\n\t\t\twp_enqueue_style( 'the7-vc-inline-editor', get_template_directory_uri() . '/inc/shortcodes/css/vc-inline-editor.css', array(), THE7_VERSION );\n\t\t\twp_enqueue_script( 'the7-vc-inline-editor', get_template_directory_uri() . '/inc/shortcodes/js/vc-inline-editor.js', array(), THE7_VERSION, true );\n\t\t}", "private function addSitemapFile($fileName)\n {\n $this->sitemapFiles[] = $fileName;\n }", "public function inc($file){\n\t\t$filename = basename($file);\n\t\tif ($content = $this->read(filename)){\n\t\t\treturn false;\n\t\t}\n\t\tob_start();\n\t\trequire $file;\n\t\t$content = ob_set_clear();\n\t\t$this->write($filename, $content);\n\t\treturn true;\n\t}", "public function register()\n {\n foreach ($this->shortcodes as $shortcode) {\n $this->registerInWordpress($shortcode);\n }\n }", "public function visitFile($file)\n {\n $this->file = $this->doc->createElement('CstmrPmtRvsl');\n $this->root->appendChild($this->file);\n }", "function bp_tag_my_fav_content_init() {\n\trequire( dirname( __FILE__ ) . '/my-tagged-content.php' );\n}", "public function inc($file)\n {\n include($file . '.php');\n }", "function enqueues() {\n\t\twp_register_style( 'ks-thematic-actions', plugin_dir_url( __FILE__ ) . 'style.css' );\n\t wp_enqueue_style( 'ks-thematic-actions' );\n\t}", "function import( $file ) {\n\t\tadd_filter( 'import_post_meta_key', array( $this, 'is_valid_meta_key' ) );\n\t\tadd_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) );\n\n\t\t$this->import_start( $file );\n\n\t\twp_suspend_cache_invalidation( true );\n\t\t$this->process_categories();\n\t\t$this->process_tags();\n\t\t$this->process_terms();\n\t\t$this->process_posts();\n\t\twp_suspend_cache_invalidation( false );\n\n\t\t$this->import_end();\n\t}", "function visitPhpFile(\\SplFileInfo $file, MessageCatalogue $catalogue, array $ast)\r\n {\r\n // TODO: Implement visitPhpFile() method.\r\n }", "public function parseFiles()\n {\n $this->files->each(function ($file) {\n $this->store[] = $this->getTree($this->parseFile($file), $file);\n });\n }", "public function register()\n {\n $this->register_scripts($this->get_scripts());\n $this->register_styles($this->get_styles());\n }", "public function setFile($file) {}", "public function testIncludingFilesRemovesFromQueue() {\n\t\t$this->Helper->addCss('libraries', 'default');\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$expected = array(\n\t\t\t'link' => array(\n\t\t\t\t'type' => 'text/css',\n\t\t\t\t'rel' => 'stylesheet',\n\t\t\t\t'href' => '/cache_css/default.css?file%5B0%5D=libraries'\n\t\t\t)\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$this->assertEquals('', $result);\n\t}", "public function register()\n {\n add_filter( 'upload_mimes', array( $this, 'add_custom_file_types_supprot' ) );\n\n // add svg support\n add_filter( 'wp_prepare_attachment_for_js', array( $this, 'add_svg_media_thumbnails' ), 10, 3 );\n\n // filter wordpress filetype security check\n add_filter('wp_check_filetype_and_ext', array( $this, 'wp_check_filetype_and_ext' ) , 5, 5);\n\n // Add Custom user fields to ccd_client user role\n add_action( 'show_user_profile', array( $this, 'add_custom_user_fields' ) );\n add_action( 'edit_user_profile', array( $this, 'add_custom_user_fields' ) );\n\n // handle custom user fields update / form post\n add_action( 'personal_options_update', array( $this, 'update_custom_user_fields' ) );\n add_action( 'edit_user_profile_update', array( $this, 'update_custom_user_fields' ) );\n }", "private function link(string $filename): void\n {\n if ($this->loaded) {\n return;\n }\n\n /** @noinspection PhpIncludeInspection */\n $this->catalogue = include $filename;\n $this->loaded = true;\n }", "public function fileNeedsProcessing() {}", "public function markAsIncluded(ISnippet $snippet)\r\n\t{\r\n\t\t$this->alreadyIncluded[$snippet->hash] = true;\r\n\t}", "public function media(string $filename, string $src, string $mime_type='application/octet-stream'): void{\n\t\t$this->media[$filename] = [basename($filename),$src,$mime_type];\n\t}", "public function addCustomStyle($file){\n array_push($this->_customStyles,$file);\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 enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }" ]
[ "0.5809671", "0.5372936", "0.5364071", "0.5224869", "0.5203287", "0.5179822", "0.5042632", "0.49714842", "0.4893254", "0.4882744", "0.48703712", "0.48582035", "0.48439825", "0.4840138", "0.478904", "0.47371376", "0.4731748", "0.4722081", "0.47119555", "0.4707585", "0.46691996", "0.466889", "0.46522987", "0.46482688", "0.46481854", "0.46449244", "0.46367967", "0.4630444", "0.4625121", "0.46224472", "0.46092448", "0.46063286", "0.45883942", "0.45876163", "0.45763052", "0.45737392", "0.4562742", "0.4558796", "0.45574963", "0.4555296", "0.4537821", "0.4537821", "0.4537821", "0.4537821", "0.4537821", "0.4537821", "0.4532708", "0.4532507", "0.4532507", "0.452713", "0.45253205", "0.45210835", "0.45210835", "0.45143563", "0.4514089", "0.45111775", "0.4500546", "0.44925097", "0.44904682", "0.44776505", "0.44635287", "0.44517985", "0.44334382", "0.4432035", "0.44191852", "0.44184712", "0.4417174", "0.44150075", "0.4413659", "0.44068012", "0.4397094", "0.43960422", "0.43958163", "0.43734047", "0.4366014", "0.43655896", "0.43645388", "0.43624452", "0.4359156", "0.43577898", "0.43539825", "0.43521422", "0.43498167", "0.434584", "0.43415782", "0.43408906", "0.4340673", "0.43348673", "0.43314663", "0.4330567", "0.4327075", "0.4326983", "0.43256664", "0.43246204", "0.43239352", "0.4323839", "0.4319856", "0.43152505", "0.43146434", "0.43082896" ]
0.52253306
3
Registers and enqueues or inlines the script, with any passed localised data.
private function register_script() { if ( $this->inline ) { wp_register_script( $this->handle, '', $this->deps, $this->ver, $this->footer ); if ( $this->does_file_exist( $this->src ) ) { wp_add_inline_script( $this->handle, file_get_contents( $this->src ) ); } } else { wp_register_script( $this->handle, $this->src, $this->deps, $this->ver, $this->footer ); } if ( ! empty( $this->localize ) ) { wp_localize_script( $this->handle, $this->handle, $this->localize ); } wp_enqueue_script( $this->handle ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function register_script();", "public function localize_script() {\n\t\t/**\n\t\t * Filters the data that is passed to the admin JS script.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param array $data The data to pass to the script.\n\t\t */\n\t\t$script_data = apply_filters(\n\t\t\t'stellarwp/telemetry/' . Config::get_hook_prefix() . 'script_data',\n\t\t\t[\n\t\t\t\t'exit_interview' => [\n\t\t\t\t\t'action' => Exit_Interview_Subscriber::AJAX_ACTION,\n\t\t\t\t\t'nonce' => wp_create_nonce( Exit_Interview_Subscriber::AJAX_ACTION ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\twp_localize_script(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t'stellarwpTelemetry',\n\t\t\t$script_data\n\t\t);\n\t}", "function wp_add_inline_script($handle, $data, $position = 'after')\n {\n }", "public function add_inline_script($handle, $data, $position = 'after')\n {\n }", "public function registerScript(/*string*/ $scriptSrc);", "public static function enqueues() {\n\t\twp_enqueue_script( 'wc-country-select' ) ;\n\t\twp_enqueue_script( 'wc-address-i18n' ) ;\n\t}", "public function localize_script() {\n\n\t\twp_localize_script( 'editor', 'better_blockquotes', array(\n\t\t\t'add_blockquote' => __( 'Add Blockquote', 'better-blockquotes' ),\n\t\t\t'blockquote' => __( 'Blockquote', 'better-blockquotes' ),\n\t\t\t'quote' => __( 'Quote', 'better-blockquotes' ),\n\t\t\t'citation' => __( 'Citation', 'better-blockquotes' ),\n\t\t\t'citation_link' => __( 'Citation Link', 'better-blockquotes' ),\n\t\t) );\n\n\t}", "public function queueScript($name, $src){\n\t\tglobal $AWCORE_LOAD_SCRIPTS;\n\t\t\n\t\t$AWCORE_LOAD_SCRIPTS[$name]['src'] = $src;\n\t\t\n\t}", "public function enqueueScripts(){}", "public function register_script() {\n\t\ttribe_asset(\n\t\t\tTribe__Main::instance(),\n\t\t\t'tribe-common-logging-controls',\n\t\t\t'admin-log-controls.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'admin_enqueue_scripts',\n\t\t\tarray(\n\t\t\t\t'conditionals' => array( Tribe__Admin__Help_Page::instance(), 'is_current_page' ),\n\t\t\t\t'localize' => (object) array(\n\t\t\t\t\t'name' => 'tribe_logger_data',\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'check' => wp_create_nonce( 'logging-controls' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function register_enqueuing() {\n\t\tadd_action( 'admin_print_scripts-nav-menus.php', array( &$this, 'enqueue_scripts' ) );\n\t}", "public function enqueue_script( $handle , $path = '' , $localize_data = array () , $deps = array ( 'jquery' ) , $version = SUMO_PP_PLUGIN_VERSION , $in_footer = false ) {\n wp_register_script( $handle , $path , $deps , $version , $in_footer ) ;\n\n $name = str_replace( '-' , '_' , $handle ) ;\n wp_localize_script( $handle , $name , $localize_data ) ;\n wp_enqueue_script( $handle ) ;\n }", "public function save() {\n\t\t$url = $this->items[ $this->id ]['url'];\n\t\t$handle = $this->items[ $this->id ]['name'];\n\t\t$deps = isset( $this->items[ $this->id ]['deps'] ) ? $this->items[ $this->id ]['deps'] : array();\n\t\t$ver = isset( $this->items[ $this->id ]['ver'] ) ? $this->items[ $this->id ]['ver'] : null;\n\t\t$ver = $ver && 'auto' === $ver ? \\Wpfw\\Asset::get_modified_time( $url ) : $ver;\n\t\t$in_footer = isset( $this->items[ $this->id ]['in_footer'] ) ? $this->items[ $this->id ]['in_footer'] : true; // put default to footer for non-blocking request.\n\t\t$localize = isset( $this->items[ $this->id ]['localize'] ) ? $this->items[ $this->id ]['localize'] : false;\n\n\t\twp_register_script( $handle, $url, $deps, $ver, $in_footer );\n\n\t\tif ( $localize ) {\n\t\t\twp_localize_script(\n\t\t\t\t$this->items[ $this->id ]['name'],\n\t\t\t\t$this->items[ $this->id ]['localize']['name'],\n\t\t\t\t$this->items[ $this->id ]['localize']['value']\n\t\t\t);\n\t\t}\n\t}", "abstract public function executeScript($path, $identifier, array &$data = [], array $engineArguments = []);", "function setScriptData($value){\n $this->_options['scriptData'][$this->getInputName()]=CJSON::encode($value);\n }", "public function enqueue_edit_scripts() {\n\t}", "function asc_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {\n\tglobal $asc_scripts;\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\t$asc_scripts->add( $handle, $src, $deps, $ver );\n\tif ( $in_footer )\n\t\t$asc_scripts->add_data( $handle, 'group', 1 );\n}", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nimiq_Miner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nimiq_Miner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( 'nimiq-core', 'http://cdn.nimiq.com/core/nimiq.js');\n\t\twp_enqueue_script( 'nimiq-web', 'http://cdn.nimiq.com/core/web.js');\n\t\twp_enqueue_script( 'nimiq-wasm', 'http://cdn.nimiq.com/core/worker-wasm.js');\n\n\t\twp_register_script( 'nimiq-miner', plugin_dir_url( __FILE__ ) . 'js/nimiq-miner-public.js', array( 'jquery' ), 4, false );\n\n\t\t$localize = array(\n\t\t 'nim_address' => get_option('nim_address'),\n\t\t 'nim_thread_percent' => get_option('nim_thread_percent'),\n\t\t 'nim_disclaimer_bg' => get_option('nim_disclaimer_bg'),\n\t\t 'nim_disclaimer_text_color' => get_option('nim_disclaimer_text_color'),\n\t\t 'nim_disclaimer_text' => get_option('nim_disclaimer_text')\n\t\t);\n\n\t\twp_localize_script( 'nimiq-miner', 'php_vars', $localize );\n\n\t\twp_enqueue_script( 'nimiq-miner' );\n\n\t}", "function wp_script_add_data( $handle, $key, $value ){\n\treturn wp_scripts()->add_data( $handle, $key, $value );\n}", "public function embed_scripts() {}", "protected function registerScripts($id, $embeddedScript)\n\t{\n\t\t$basePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 1, YII_DEBUG);\n\t\t$scriptFile = 'http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false';\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCoreScript('jquery');\n\t\t$cs->registerScriptFile($scriptFile);\n\n\t\techo '<script>' . $embeddedScript . '</script>';\n\t}", "public function enqueue_scripts () {\n wp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/script.js', array( 'jquery' ), $this->_version );\n // Localize the script with new data\n\n $url = admin_url('admin-ajax.php');\n wp_localize_script( $this->_token . '-frontend', 'ajax_url', $url );\n wp_enqueue_script( $this->_token . '-frontend' );\n }", "public function enqueueScript($id)\n {\n $this->queue[$id] = $id;\n }", "function module_scriptLoad($val, $data)\n{\n\tif (!$data) return;\n\tsetCacheData(\"scriptLoad\", $data);\n\t\n\t$store\t= config::get(':scripts', array());\n\tif ($store[$data]) return;\n\n\t$store[$data] = $data;\n\tconfig::set(':scripts', $store);\n}", "function ffd_enqueue_js( $code ) {\r\n\tglobal $ffd_queued_js;\r\n\r\n\tif ( empty( $ffd_queued_js ) ) {\r\n\t\t$ffd_queued_js = '';\r\n\t}\r\n\r\n\t$ffd_queued_js .= \"\\n\" . $code . \"\\n\";\r\n}", "public static function add_script_configuration( $handle, $js_var_name, $data ) {\n\t\tif ( in_array( array( $handle, $js_var_name ), self::$inline_configs, true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_add_inline_script( $handle, 'const ' . $js_var_name . ' = ' . wp_json_encode( $data ) . ';', 'before' );\n\t\tself::$inline_configs[] = array( $handle, $js_var_name );\n\t}", "public function embed_scripts()\n {\n }", "public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}", "function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {\r\n\tglobal $wp_scripts;\r\n\tif ( !is_a($wp_scripts, 'WP_Scripts') )\r\n\t\t$wp_scripts = new WP_Scripts();\r\n\r\n\t$wp_scripts->add( $handle, $src, $deps, $ver );\r\n\tif ( $in_footer )\r\n\t\t$wp_scripts->add_data( $handle, 'group', 1 );\r\n}", "function wp_add_inline_script( $handle, $data, $position = 'after' ) {\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\tif ( false !== stripos( $data, '</script>' ) ) {\n\t\t_doing_it_wrong( __FUNCTION__, sprintf(\n\t\t\t/* translators: 1: <script>, 2: wp_add_inline_script() */\n\t\t\t__( 'Do not pass %1$s tags to %2$s.' ),\n\t\t\t'<code>&lt;script&gt;</code>',\n\t\t\t'<code>wp_add_inline_script()</code>'\n\t\t), '4.5.0' );\n\t\t$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );\n\t}\n\n\treturn wp_scripts()->add_inline_script( $handle, $data, $position );\n}", "public function register_plugin_script() {\n\t\twp_enqueue_script ( 'tr-execute', plugin_dir_url ( __FILE__ ) . '../js/execute.js', array (\n\t\t\t\t'jquery' \n\t\t) );\n\t\twp_enqueue_script ( 'tr-jquery-custom', plugin_dir_url ( __FILE__ ) . '../js/jquery-ui.min.js', array (\n\t\t\t\t'jquery' \n\t\t) );\n\t\t// wp_enqueue_script ( 'tr-jquery-charts', plugin_dir_url ( __FILE__ ) . '../js/charts.js', array (\n\t\t// 'jquery'\n\t\t// ) );\n\t\t// include the new datachart file.\n\t\t// wp_enqueue_script ( 'tr-jquery-charts', plugin_dir_url ( __FILE__ ) . '../js/define_chart_code.js', array (\n\t\t// 'jquery'\n\t\t// ) );\n\t\t// enque the google jsapi from url\n\t\t// wp_enqueue_script ( 'kek-chart', 'https://www.google.com/jsapi');\n\t\t// wp_enqueue_script ( 'kek-chart2', 'https://www.gstatic.com/charts/loader.js');\n\t}", "public function setup()\n {\n add_action('admin_head', function () {\n echo \"\n <style>\n i.mce-i-raph { font: 400 20px/1 dashicons; background-color: #777; }\n i.mce-i-raph:before { color: #fff!important; }\n </style>\n \";\n });\n add_action('admin_enqueue_scripts', function () {\n wp_localize_script('editor', 'Raph', $this->formData->data());\n });\n add_filter('mce_buttons', function (array $buttons) {\n return array_merge($buttons, ['raphRender']);\n });\n add_filter('mce_external_plugins', function (array $plugins) {\n return array_merge($plugins, ['raphRender' => $this->scriptUrl()]);\n });\n }", "public function add_script($data){\n\t\tif(filter_var($data, FILTER_VALIDATE_URL)){\n\t\t\t$this->add_content_var(new elem(\"script\",\"\",array(\"src\"=>$data,\"type\"=>\"text/javascript\")));\n\t\t}\n\t\telse{\n\t\t\t$this->add_content_var(new elem(\"script\",$data,array(\"type\"=>\"text/javascript\")));\n\t\t}\n\t}", "function pushScript ($script) {\n\t\t$this->_roof[\"cuerpo\"][] = \"<script type=\\\"text/javascript\\\" src=\\\"\".$script.\"\\\"></script>\";\n\t}", "public function bladerWithOutServerScript($str, $data = array())\n {\n return $this->blader($str, $data, false);\n }", "public function register_scripts()\n {\n }", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "function mp_enqueue_scripts(){\n\n // Action pour shunter mp_register_style\n do_action('enqueue_scripts');\n\n // On charge les registers\n $enqueue_registers = mp_cache_data('mp_register_script');\n\n if( !empty($enqueue_registers) ){\n\n // On charge les registers\n foreach ($enqueue_registers as $handle => $args)\n mp_enqueue_script($handle);\n }\n\n}", "static function enqueue_scripts() {\n\t\tif ( ! static::matches_custom_format( get_post_format() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//scripts\n\t\twp_register_script( 'custom-event-preview-script', get_stylesheet_directory_uri() . '/assets/js/cpf-event-preview.min.js', array( 'jquery' ), CURRENT_THEME_VERSION, true );\n\t\twp_enqueue_script( 'custom-event-preview-script' );\n\t\twp_localize_script( 'custom-event-preview-script', 'evtPreviewData', self::event_preview_data() );\n\t}", "private function add_script( scripts $script ) {\n\n\t\t\t// check if script is enqueued\n\t\t\tif($script->get_is_enqueued()) {\n\t\t\t\t// check is script isn't loaded already and not disabled\n\t\t\t\tif ($this->check_for_enqueue($script)) {\n\t\t\t\t\t// set as loaded\n\t\t\t\t\t$script->set_is_loaded();\n\t\t\t\t\tself::$scripts_by_handle[$script->get_handle()]\t= $script;\n\n\t\t\t\t\t// CSS or JS\n\t\t\t\t\tswitch ($script->get_type()) {\n\t\t\t\t\t\tcase 'css':\n\t\t\t\t\t\t\t$module = $script->get_parent();\n\n\t\t\t\t\t\t\t// get settings object for build css later\n\t\t\t\t\t\t\tif($script->get_ID() == 'config') {\n\t\t\t\t\t\t\t\tif($script->get_parent()->get_css_cache_active()) {\n\t\t\t\t\t\t\t\t\t$script->cache_css();\n\t\t\t\t\t\t\t\t\t$script->get_parent()->get_script('common')->set_is_enqueued(false);\n\t\t\t\t\t\t\t\t\t$script->get_parent()->get_script('default')->set_is_enqueued(false);\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t// legacy\n\t\t\t\t\t\t\t\t\t$_s = $script->get_parent()->get_settings();\n\t\t\t\t\t\t\t\t\t$_s = reset($_s);\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\t// check if inline per settings (higher prio) or per parameter (lower prio)\n\t\t\t\t\t\t\tif ( static::$list[$script->get_UID()][ 'attached' ] && // checks if null - Dennis\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\tstatic::$list[$script->get_UID()][ 'attached' ]->get_data() === 'inline'\n\t\t\t\t\t\t\t\t\t|| (\n\t\t\t\t\t\t\t\t\t\tstatic::$list[$script->get_UID()][ 'attached' ]->get_data() === 'default'\n\t\t\t\t\t\t\t\t\t\t&& $script->get_inline()\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&& ! $script->get_is_backend()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tif(is_file($script->get_path())) {\n\t\t\t\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\t\t\trequire($script->get_path());\n\t\t\t\t\t\t\t\t\t$css = ob_get_clean();\n\n\t\t\t\t\t\t\t\t\twp_add_inline_style('sv_core_init_style', $css);\n\t\t\t\t\t\t\t\t\twp_add_inline_style('sv_core_gutenberg_style', $css);\n\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\terror_log(__('Script \"'.$script->get_handle().'\" in path \"'.$script->get_path().'\" not found.'));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif(!is_admin()) {\n\t\t\t\t\t\t\t\t\tif($script->get_path() && filesize($script->get_path()) === 0){\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\twp_enqueue_style(\n\t\t\t\t\t\t\t\t\t\t$script->get_handle(),\t\t\t\t\t\t // script handle\n\t\t\t\t\t\t\t\t\t\t$script->get_url(),\t\t\t\t\t\t\t// script url\n\t\t\t\t\t\t\t\t\t\t$script->get_deps(),\t\t\t\t\t\t\t// script dependencies\n\t\t\t\t\t\t\t\t\t\t($this->is_external() ? md5($script->get_url()) : filemtime($script->get_path())),\t // script version, generated by last filechange time\n\t\t\t\t\t\t\t\t\t\t$script->get_media()\t\t\t\t\t\t\t// The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.\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\tif($script->get_is_gutenberg()){\n\t\t\t\t\t\t\t\t\t\tif(is_file($script->get_path())) {\n\t\t\t\t\t\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\t\t\t\t\trequire($script->get_path());\n\t\t\t\t\t\t\t\t\t\t\t$css = ob_get_clean();\n\n\t\t\t\t\t\t\t\t\t\t\twp_add_inline_style('sv_core_gutenberg_style', $css);\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\tbreak;\n\t\t\t\t\t\tcase 'js':\n\t\t\t\t\t\t\tif(strlen($script->get_inline()) > 0){\n\t\t\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\t\trequire($script->get_path());\n\t\t\t\t\t\t\t\t$js = ob_get_clean();\n\n\t\t\t\t\t\t\t\twp_add_inline_script($script->get_inline(), $js, 'before');\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\twp_enqueue_script(\n\t\t\t\t\t\t\t\t\t$script->get_handle(),\t\t\t\t\t\t\t // script handle\n\t\t\t\t\t\t\t\t\t$script->get_url(),\t\t\t\t\t\t\t // script url\n\t\t\t\t\t\t\t\t\t$script->get_deps(),\t\t\t\t\t\t\t\t// script dependencies\n\t\t\t\t\t\t\t\t\t($this->is_external() ? md5($script->get_url()) : filemtime($script->get_path())),\t\t // script version, generated by last filechange time\n\t\t\t\t\t\t\t\t\t$script->get_load_in_header() ? false : true\t\t\t\t\t\t\t\t\t // print in footer\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 ($script->is_localized()) {\n\t\t\t\t\t\t\t\twp_localize_script($script->get_handle(), $script->get_uid(), $script->get_localized());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tself::$scripts_active[]\t\t\t\t\t\t\t\t= $script;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function wp_script_add_data($handle, $key, $value)\n {\n }", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function script_enqueuer() {\n wp_register_script( \"generator\", WP_PLUGIN_URL.'/ninja_name_generator/generator.js', array('jquery') );\n wp_localize_script( 'generator', 'name_generator', array( \n \t\t'restURL' => rest_url(),\n \t\t'restNonce' => wp_create_nonce(\"wp_rest\")\n \t));\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'generator' );\n\n}", "private function processChunk(string $data): void\n {\n if ($this->eventFactory) {\n if ($event = $this->eventFactory->createEvent($data)) {\n $this->doDispatch($event);\n }\n\n // if an event factory is present, we have fully handed control\n return;\n }\n\n if (str_starts_with($data, \"\\e\") && strlen($data) > 1) {\n $event = EscapeSequenceEvent::fromString($data);\n }\n\n if (!isset($event)) {\n $event = InputEvent::fromString($data);\n }\n\n $this->doDispatch($event);\n }", "function blog_scripts() {\n // Register the script\n wp_register_script( 'custom-script', get_stylesheet_directory_uri(). '/js/ajex.js', array('jquery'), false, true );\n \n // Localize the script with new data\n $script_data_array = array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'security' => wp_create_nonce( 'load_states' ),\n );\n wp_localize_script( 'custom-script', 'blog', $script_data_array );\n \n // Enqueued script with localized data.\n wp_enqueue_script( 'custom-script' );\n}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "private function localize( $file ) {\n\t\tif( $this->enqueue_script( $file['src'] ) ) {\n\t\t\twp_localize_script( $file['handle'], $file['object_name'], $file['l10n'] );\n\t\t}\n\t}", "public function enqueue_scripts() {\n\t\t\n\t\twp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/sanoa-links-linter-public.js', '', $this->version, true ); // Put in footer\n\n // Grab all options\n\t\t$options = get_option($this->plugin_name);\n\t\t\n $urlparts = parse_url(site_url());\n $domain = $urlparts [host];\n\n\t\t$input_hostname = \n\t\t\t(empty($options['input-hostname'])) ? $domain : $options['input-hostname'];\t\n\n\t\t// Localize the script with new data\t\n\t\t$searchArgs = array(\n\t\t\t'input_hostname' => $input_hostname,\n\t\t\t$this->plugin_name\n\t\t);\n\t\twp_localize_script( $this->plugin_name, 'php_vars', $searchArgs );\n\n\t\twp_enqueue_script( $this->plugin_name );\n\n\t}", "function queue_js_string($string, $options = array())\n{\n get_view()->headScript()->appendScript($string, null, $options);\n}", "public function inject(SpanContext $spanContext, &$carrier): void;", "private function registerClientScripts()\n {\n $view = $this->getView();\n\n TranslitAsset::register($view);\n\n $replace = Json::htmlEncode(TranslitHelper::$replace);\n $view->registerJs(\"translit.replace = $replace;\", $view::POS_READY, 'translit');\n }", "public function custom_definition_after_data() {}", "protected function registerScripts($id, $embeddedScript) {\n $basePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n $baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 1, YII_DEBUG);\n\n $cs = Yii::app()->clientScript;\n $cs->registerCoreScript('jquery');\n\n // register additional scripts\n $extension = YII_DEBUG ? '.js' : '.min.js';\n foreach ($this->scripts as $script) {\n $cs->registerScriptFile(\"{$baseUrl}/{$script}{$extension}\", CClientScript::POS_HEAD);\n }\n\n // register embedded script\n $cs->registerScript($id, $embeddedScript, CClientScript::POS_LOAD);\n }", "private function enqueues(){\n\n\t\t\tadd_action( 'init', function(){\n\n\t\t\t\t//scripts:\n\t\t\t\t$url = Url::plugin( 'chef-sections', true ).'Assets/js/libs/';\n\t\t\t\t\n\t\t\t\tScript::register( 'isotope', $url.'isotope.min', false );\n\t\t\t\tScript::register( 'imagesloaded', $url.'imagesloaded.min', false );\n\t\t\t\tScript::register( 'autoload', $url.'autoload', false );\n\t\t\t\tScript::register( 'fitvids', $url.'fitvids.min', false );\n\n\t\t\t\t//sass:\n\t\t\t\tif( !Sass::ignore() ){\n\t\t\t\t\t\n\t\t\t\t\t$url = 'chef-sections/Assets/sass/front/';\n\t\t\t\t\t\n\t\t\t\t\tSass::register( 'sections-columns', $url.'_columns', false );\n\t\t\t\t\tSass::register( 'sections-collection', $url.'_collection', false );\n\t\t\t\t\tSass::register( 'sections-loader', $url.'_loader', false );\n\t\t\t\t\tSass::register( 'sections-socials', $url.'_socials', false );\n\t\t\t\t\tSass::register( 'sections-responsive', $url.'_responsive', false );\n\n\t\t\t\t}else{\n\n\t\t\t\t\t//we need to ignore sass and enqueue a regular css file:\n\t\t\t\t\tadd_action( 'wp_enqueue_scripts', function(){\n\n\t\t\t\t\t\twp_enqueue_style( 'chef_sections', Url::plugin( 'chef-sections', true ).'Assets/css/compiled.css' );\n\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function care_enqueue_js( $code ) {\n\tglobal $care_queued_js;\n\n\tif ( empty( $care_queued_js ) ) {\n\t\t$care_queued_js = '';\n\t}\n\n\t$care_queued_js .= \"\\n\" . $code . \"\\n\";\n}", "function enqueue(){\n\t\t}", "function add_myscript(){\n}", "function addElement($script){\n if(!$this->host->messages)\n $this->host->messages = $script;\n else\n $this->host->messages .= $script;\n }", "function register_block_script_handle($metadata, $field_name, $index = 0)\n {\n }", "public function withScript(ScriptElement $script, $scope = 'header');", "protected function register_scripts()\n {\n if ( $this->script_registered )\n return;\n\n $this->script_registered = TRUE;\n\n // add_action( 'wp_footer', 'misha_custom_internal_css' );\n \n\n wp_register_script(\n // unique handle\n $this->shortcode_class,\n // script URL\n plugin_dir_url( __FILE__ ) . '/model-populate-ajax.js',\n // dependencies\n array ( 'jquery'),\n // version\n 'v1',\n // print in footer\n TRUE\n );\n\n wp_enqueue_script( $this->shortcode_class );\n\n $data = array (\n // URL address for AJAX request\n 'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n // action to trigger our callback\n 'action' => $this->ajax_action,\n // selector for jQuery\n 'democlass' => $this->shortcode_class\n );\n\n wp_localize_script( $this->shortcode_class, 'AjaxDemo', $data );\n }", "function smash_enqueue_scripts() {\n\n\tglobal $wp_scripts;\n\n\t$js_assets = smash_get_scripts();\n\n\tforeach ( $js_assets AS $handle => $asset ) {\n\n\t\twp_enqueue_script( $handle, $asset[ 'file' ], $asset[ 'deps' ], $asset[ 'ver' ], $asset[ 'in_footer' ] );\n\n\t\t// checking for localize script args\n\t\tif ( array_key_exists( 'localize', $asset ) && ! empty( $asset[ 'localize' ] ) ) {\n\t\t\tforeach ( $asset[ 'localize' ] as $name => $args ) {\n\t\t\t\twp_localize_script( $handle, $name, $args );\n\t\t\t}\n\t\t}\n\n\t\tif ( array_key_exists( 'data', $asset ) ) {\n\t\t\tforeach ( $asset[ 'data' ] as $key => $value ) {\n\t\t\t\t$wp_scripts->add_data( $handle, $key, $value );\n\t\t\t}\n\t\t}\n\n\t}\n}", "public function run()\n {\n $block = trim(ob_get_clean());\n $this->registerCssBlock($block);\n $this->registerJsBlock($block);\n }", "function asc_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {\n\tglobal $asc_scripts;\n\n\tif ( ! is_a( $asc_scripts, 'ASC_Scripts' ) ) {\n\t\tif ( ! did_action( 'init' ) )\n\t\t\t_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),\n\t\t\t\t'<code>asc_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>', '<code>login_enqueue_scripts</code>' ), '3.3' );\n\t\t$asc_scripts = new ASC_Scripts();\n\t}\n\n\tif ( $src ) {\n\t\t$_handle = explode('?', $handle);\n\t\t$asc_scripts->add( $_handle[0], $src, $deps, $ver );\n\t\tif ( $in_footer )\n\t\t\t$asc_scripts->add_data( $_handle[0], 'group', 1 );\n\t}\n\t$asc_scripts->enqueue( $handle );\n}", "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n wp_localize_script( 'cbxcf-scripts', 'cbxcfObj', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong', 'cbxcustomform' ),\n ] );\n\n }", "protected function stash_step_data( $data = '' ) {\n\t\t$file = $this->get_file();\n\t\t$file .= $data;\n\n\t\t@file_put_contents( $this->file, $file );\n\t}", "function init() {\n $this->enqueue_script();\n $this->localize_script();\n $this->stylize();\n }", "function startText($parser,$data)\n\t{\n\t\tunset($parser);\n\n\t\t$parent_tempcode=array_pop($this->tempcode_stack);\n\t\t$parent_tempcode->attach($data);\n\t\tarray_push($this->tempcode_stack,$parent_tempcode);\n\t}", "function enqueue_script($script_name) {\n static $enqueued_scripts = [];\n\n if ( $enqueued_scripts[ $script_name ] ) return 0;\n\n echo '<script src=\"'.SCRIPTS_JS.$script_name.'\"></script>';\n $enqueued_scripts[] = $script_name;\n \n}", "public function feed(string $data)\n {\n $this->contents .= $data;\n\n // Notify all subscribers that this buffer has changed\n foreach ($this->callbacks as $callback) {\n $callback($this);\n }\n }", "function preRenderCallback() {\n $scripts = array('aurigma.uploader', 'aurigma.uploader.amazons3');\n foreach ($scripts as $script) {\n $this->_parent->addScriptFileName($script, $this->_parent->getDebugScriptLevel() > 0 ?\n $script . '.js' : $script . '.min.js');\n }\n\n $clientPreRender = $this->_parent->getClientEvents()->getPreRender();\n if (!isset($clientPreRender)) {\n $clientPreRender = array();\n }\n $clientPreRender[] = $this->buildScript();\n $this->_parent->getClientEvents()->setPreRender($clientPreRender);\n }", "public function add()\n\t{\n\t\tforeach (func_get_args() as $script) {\n\t\t\t$asset = $this->input_path . $script;\n\t\t\tarray_push($this->files, $asset);\n\t\t}\n\t}", "function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {\n\t$wp_scripts = wp_scripts();\n\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\n\tif ( $src || $in_footer ) {\n\t\t$_handle = explode( '?', $handle );\n\n\t\tif ( $src ) {\n\t\t\t$wp_scripts->add( $_handle[0], $src, $deps, $ver );\n\t\t}\n\n\t\tif ( $in_footer ) {\n\t\t\t$wp_scripts->add_data( $_handle[0], 'group', 1 );\n\t\t}\n\t}\n\n\t$wp_scripts->enqueue( $handle );\n}", "function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {\n\t$wp_scripts = wp_scripts();\n\t_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );\n\n\t$registered = $wp_scripts->add( $handle, $src, $deps, $ver );\n\tif ( $in_footer ) {\n\t\t$wp_scripts->add_data( $handle, 'group', 1 );\n\t}\n\n\treturn $registered;\n}", "public function add_to_head($data)\n\t{\n\t\t// Deprecated for scripts. Let's encourage good practices. This will\n\t\t// also let us move jquery in the future.\n\t\tif (strpos($data, '<script') !== FALSE)\n\t\t{\n\t\t\tee()->load->library('logger');\n\t\t\tee()->logger->deprecated('2.8', 'CP::add_to_foot() for scripts');\n\t\t}\n\n\t\t$this->its_all_in_your_head[] = $data;\n\t}", "function embed()\n\t\t{\n\t\t\tSERIA_Hooks::listen(SERIA_GuiHooks::EMBED, array($this, 'guiEmbed'));\n\t\t\tSERIA_Hooks::listen(SERIA_ROUTER_HOOK, array($this, 'router'), -100);\n\t\t}", "public function enqueue_script($name)\n {\n }", "function script()\n {\n }", "public function inline_custom_data(){}", "public function enqueue_script() {\n wp_enqueue_script('ln-publisher', plugins_url('js/publisher.js', __FILE__), array('jquery'));\n wp_enqueue_style('ln-publisher', plugins_url('css/publisher.css', __FILE__));\n wp_localize_script('ln-publisher', 'LN_publisher', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'charge_url' => !empty($this->options['public_url']) ? $this->options['public_url'] : $this->options['server_url']\n ));\n }", "public function registerScripts($form)\n\t{\n\t\t\n\t}", "function add_script($name, $file)\n{\n\tglobal $scripts_included;\n\t$scripts_included[$name] = \"<script type='text/javascript' src='\".site_url.$file.\"'></script>\\n\";\n}", "function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {\r\n\tglobal $wp_scripts;\r\n\tif ( !is_a($wp_scripts, 'WP_Scripts') )\r\n\t\t$wp_scripts = new WP_Scripts();\r\n\r\n\tif ( $src ) {\r\n\t\t$_handle = explode('?', $handle);\r\n\t\t$wp_scripts->add( $_handle[0], $src, $deps, $ver );\r\n\t\tif ( $in_footer )\r\n\t\t\t$wp_scripts->add_data( $_handle[0], 'group', 1 );\r\n\t}\r\n\t$wp_scripts->enqueue( $handle );\r\n}", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "public function setScript()\n {\n $container = strtoupper($this->getCurrentWidget()->getPlugin());\n $NameAction = strtolower($this->getCurrentWidget()->getAction()); \n // If the widget is a \"gedmo snippet\"\n if ( ($container == 'CONTENT') && ($NameAction == 'snippet') ) {\n // if the configXml field of the widget is configured correctly.\n try {\n $xmlConfig = new \\Zend_Config_Xml($this->getCurrentWidget()->getConfigXml());\n if ($xmlConfig->widgets->get('content')){\n $snippet_widget = $this->getWidgetById($xmlConfig->widgets->content->id);\n $container = strtoupper($snippet_widget->getPlugin());\n $NameAction = strtolower($snippet_widget->getAction());\n }\n } catch (\\Exception $e) {\n } \n }\n // If the widget is a \"gedmo snippet\"\n elseif ( ($container == 'GEDMO') && ($NameAction == 'snippet') ) {\n // if the configXml field of the widget is configured correctly.\n try {\n $xmlConfig = new \\Zend_Config_Xml($this->getCurrentWidget()->getConfigXml());\n if ($xmlConfig->widgets->get('gedmo')){\n $snippet_widget = $this->getWidgetById($xmlConfig->widgets->gedmo->id);\n $container = strtoupper($snippet_widget->getPlugin());\n $NameAction = strtolower($snippet_widget->getAction());\n }\n } catch (\\Exception $e) {\n }\n } \n $this->script['js'][$container.$NameAction] = $this->extensionWidget->ScriptJsFunction($container, $NameAction);\n $this->script['css'][$container.$NameAction] = $this->extensionWidget->ScriptCssFunction($container, $NameAction);\n }", "public function localizeScripts() {\n $this->localizeScriptsCommon();\n \n if(is_admin()) {\n $this->localizeScriptsAdmin();\n } else {\n $this->localizeScriptsFrontend();\n }\n }", "public function addScript(string $name, string $src, array $attributes = [], string $placement = Meta::PLACEMENT_FOOTER);", "public function setDispatchedData($data = []);", "function addScript($script, $arg, $max_execution_time = 300)\n {\n $this->scripts[] = array(\"script_name\" => $script, \"arg\"=>$arg, \"max_execution_time\" => $max_execution_time);\n }", "public function registerScript($source, $isHead=true)\n {\n $this->styleScripts[] = [\n 'isHead'=>$isHead,\n 'body'=>Html::script($source)\n ];\n }", "function add_support_script_frontend(){\n}", "function enqueue ($entry) {\n\n}", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "public function addFileAndRender(string $filename, Data $data = null) : Content;", "public function minifyJavaScriptCallsRegisteredHookWithInputString() {}", "function ajarRegisterBlock() {\n\n //Archivo php generado del builds\n $assets = include_once get_template_directory().'/blocks/build/index.asset.php';\n\n wp_register_script(\n 'ajar-block', // handle del script\n get_template_directory_uri().'/blocks/build/index.js', //url del directorio\n $assets['dependencies'], //all dep\n $assets['version'] // cada build cambia la version, para evitaas conflictos de cache\n );\n\n register_block_type(\n 'ajar/basic',\n array(\n 'editor_script' => 'ajar-block', //copiar el script ya registrado\n 'attributes' => array( //repetimos los attr del block de index.js\n 'content' => array(\n 'type' => \"string\",\n 'default' => 'Hello World'\n ),\n 'mediaURL' => array(\n \"type\" => 'string'\n ),\n 'mediaAlt' => array(\n \"type\" => 'string'\n ),\n ),\n 'render_callback' => 'ajarRenderDinamycBlock' //funcion para generar el SSR(server side render)\n )\n );\n}", "public function renderScript()\n {\n }", "function install($data='') {\n subscribeToEvent($this->name, 'SAY');\n parent::install();\n }", "private function hooks(): void {\n\t\t// Steps loader hooks.\n\n\t\tadd_filter(\n\t\t\t'learndash_breezy_localize_script_data',\n\t\t\t$this->container->callback( Steps\\Loader::class, 'add_scripts_data' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_nopriv_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t}", "public function arvan_wp_enqueue_scripts(){\n \n wp_register_script('arvan-plugin-custom-script', plugin_dir_url(__FILE__) . '/js/custom.js', array('jquery'));\n wp_localize_script( 'arvan-plugin-custom-script', 'WPData', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); \n wp_enqueue_script( 'arvan-plugin-custom-script');\n \n\n }" ]
[ "0.60732627", "0.5657612", "0.56544095", "0.5550382", "0.53114635", "0.5287906", "0.52496743", "0.523929", "0.52273226", "0.5209949", "0.5203299", "0.5081126", "0.5029614", "0.49631426", "0.49592793", "0.49580437", "0.49527276", "0.49464422", "0.49445912", "0.49440825", "0.49271664", "0.49265593", "0.4920012", "0.49064296", "0.49004868", "0.49002418", "0.48960504", "0.48624867", "0.48614466", "0.48588738", "0.48550558", "0.48476434", "0.48352212", "0.48303783", "0.48156047", "0.47934282", "0.47894505", "0.47675705", "0.47513264", "0.47493777", "0.4732543", "0.47290048", "0.47174737", "0.4696019", "0.46955758", "0.4689447", "0.46874893", "0.4680809", "0.46803388", "0.4678778", "0.46690732", "0.4668191", "0.46562615", "0.46520063", "0.46471223", "0.46465707", "0.4644737", "0.46246213", "0.46156758", "0.46009427", "0.4596333", "0.45955247", "0.4594304", "0.4592114", "0.45876995", "0.45854953", "0.45846558", "0.45841804", "0.45835194", "0.4567302", "0.4566012", "0.45616618", "0.45605123", "0.45582312", "0.45562378", "0.4554116", "0.4543511", "0.45408726", "0.45406684", "0.45263273", "0.45213962", "0.45196262", "0.45153663", "0.45093718", "0.45029068", "0.4498515", "0.44977486", "0.44915834", "0.44896236", "0.44853142", "0.44732195", "0.44729856", "0.4472842", "0.44726008", "0.44694713", "0.44594246", "0.445838", "0.4456612", "0.44562888", "0.44509417" ]
0.5798124
1
/ Widget output Rendering
protected function render() { $settings = $this->get_settings_for_display(); ?> <div class="wpsm-numhead wpsm-style1"> <span><?php echo intval($settings['num']);?></span> <h<?php echo esc_attr($settings['heading']);?> <?php echo ''.$this->get_render_attribute_string( "content" );?>><?php echo ''.$settings['content'];?></h<?php echo esc_attr($settings['heading']);?>> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}", "public function render_widget() {\n\t\t$this->get_db_values();\n\t\tif ( wponion_is_callable( $this->option( 'callback' ) ) ) {\n\t\t\techo wponion_callback( $this->option( 'callback' ), array( $this->get_db_values(), $this ) );\n\t\t}\n\t}", "function render() ;", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "protected function render() {}", "protected function render() {}", "protected function render() {}", "private function _render()\n {\n $content = '';\n\n if (is_array($this->widgets)) {\n // clean path vars\n self::_clean_paths();\n\n foreach ($this->widgets as $parts) {\n\n $content = '';\n\n $type = (array_key_exists('type', $parts)) ? $parts['type'] : '';\n $src = (array_key_exists('src', $parts)) ? $parts['src'] : '';\n $title = (array_key_exists('title', $parts)) ? $parts['title'] : '';\n $alt = (array_key_exists('alt', $parts)) ? $parts['alt'] : 1;\n $cols = (array_key_exists('cols', $parts)) ? $parts['cols'] : 1;\n\n // process action commands (these don't follow the convention of standard widgets)\n switch ($type) {\n case 'clear':\n // push content directly into dashboard array\n $content = \"<div style='clear:both'></div>\";\n $this->_dashboard[] = $content;\n continue 2;\n break;\n }\n\n // check if individual keys supplied instead of an array of values\n if (array_key_exists('src', $parts)) {\n\n // individual keys supplied so construct appropriate array\n $parts = array(array('type'=>$type, 'src'=>$src, 'alt'=>$alt));\n }\n\n // process each part\n foreach ($parts as $part) {\n\n if (! is_array($part)) continue;\n\n // add any part-specific sub-headings as <H3>\n $content .= (array_key_exists('title', $part)) ? \"<\".$this->widget_subheading.\">\".$part['title'].\"</\".$this->widget_subheading.\">\" : '';\n\n switch ($part['type']) {\n //======================================\n case 'oop':\n //======================================\n\n // run an external controller to produce widget contents\n if ($this->oop_alt) {\n // alternative location will be:\n // [oop_path]/[dashboard_folder]/[dashboard_name]/[controller_name].[ext]\n // eg. [application/controllers]/[dashboard]/[safety]/[test_dash].[php]\n $file_name = $this->_makepath($this->oop_path, $this->dash_fldr, $this->dash).$part['src'].EXT;\n\n } else {\n\n // normal location will be\n // [oop_path]/[dashboard_name]/[dashboard_folder]/[controller_name].[ext]\n // eg. [application/controllers]/[safety]/[dashboard]/[test_dash].[php]\n $file_name = $this->_makepath($this->oop_path, $this->dash, $this->dash_fldr).$part['src'].EXT;\n }\n\n if (file_exists($file_name)) {\n\n include_once $file_name;\n\n // create an instance of the controller so we can run it\n $cname = ucfirst($part['src']);\n $c = new $cname;\n\n // always run the index() method to build content\n $content .= $c->index();\n\n } else {\n\n $content .= 'WARNING: Unable to find controller: '.$file_name;\n }\n\n break;\n\n //======================================\n case 'html':\n //======================================\n\n // html or text content being directly supplied from controller\n $content .= $part['src'];\n\n break;\n\n //======================================\n case 'curl':\n //======================================\n\n // html or text content being directly supplied from controller\n $content .= $this->_curl_response($part['src']);\n\n break;\n\n //======================================\n case 'img':\n //======================================\n\n // create an <img> tag widget referencing an external image file\n // $img_file = (array_key_exists('src', $part)) ? $this->_makepath($this->asset_path, $this->img_path.PS.$this->dash.PS.$this->dash_fldr.PS.$part['src'] : '';\n $img_file = (array_key_exists('src', $part)) ? $this->_makepath($this->asset_path, $this->img_path, $this->dash, $this->dash_fldr).$part['src'] : '';\n $img_alt = (array_key_exists('alt', $part)) ? $part['alt'] : '';\n\n if (file_exists(FCPATH.$img_file)) {\n\n $content .= \"<img src='\".$img_file.\"' width='100%' alt='{$img_alt}' title='{$img_alt}' class='modalview' type='image' />\";\n\n } else {\n\n $content = 'WARNING: Unable to find img: '.FCPATH.$img_file;\n }\n\n break;\n\n //======================================\n case 'file':\n //======================================\n\n // pull widget contents directly from an external file\n $file_name = (array_key_exists('src', $part)) ? $this->_makepath(FCPATH.$this->asset_path, $this->file_path, $this->dash, $this->dash_fldr).$part['src'] : '';\n\n if (file_exists($file_name)) {\n $content .= file_get_contents($file_name);\n\n } else {\n\n $content .= 'WARNING: Unable to find file: '.$file_name;\n }\n\n break;\n }\n }\n\n // add this widget to dashboard\n $this->_dashboard[] = $this->_widget($title, $content, $cols);\n }\n }\n\n return $content;\n }", "protected function _render()\n {\n }", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {\r\n\t\t\r\n\t}", "public function render_widget() {\n\n return Widget::render($this->settings);\n\n }", "public function render()\n {\n \n }", "public function render()\n {\n echo $this->__toString();\n\n }", "public function render(){\n\t\t\n\t}", "public function renderWidgets()\r\n {\r\n foreach ($this->_widgets as $widget)\r\n {\r\n echo current($widget);\r\n }\r\n\r\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "public abstract function render();", "public abstract function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract protected function RenderContent();", "public function render() {\n echo $this->getHtml();\n }", "abstract public function render() ;", "abstract function render();", "public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }" ]
[ "0.74498177", "0.741333", "0.73592496", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.7335864", "0.72891176", "0.7288111", "0.7288111", "0.7274928", "0.7268549", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7257885", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.7256572", "0.72388333", "0.7237534", "0.7196838", "0.71369815", "0.71360505", "0.70932007", "0.70916003", "0.70916003", "0.7091565", "0.7090659", "0.70867676", "0.70867676", "0.70732224", "0.70732224", "0.70732224", "0.70732224", "0.70732224", "0.70732224", "0.7053837", "0.7030785", "0.7012026", "0.7008857", "0.7001952" ]
0.0
-1
Are there overdue individual emails.
public function check() { $now = time(); $count = $this->db->count_records_select('forum_posts', ' mailed = 0 AND ((mailnow = 1 AND created < ?) OR (mailnow = 0 AND created < ?)) ', [ $now - $this->timepadding, $now - $this->timepadding - $this->editdelay, ]); return $count > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOverdue()\n {\n $dueDate = $this->dueDate;\n\n if (!$dueDate) {\n\n return false;\n }\n\n $now = Carbon::now()->setTime(0,0,0);\n\n return $dueDate->lt($now);\n }", "public function isOverDue() {\n return $this->state === self::STATUS_OVERDUE;\n }", "public static function isOverdue()\n {\n $config = JRegister::get('config');\n\n // Verify access token exist\n if (!$config->get('accessToken', false))\n {\n return false;\n }\n\n // Verify oauth start time and expires_in exist\n $oauthStartTime = $config->get('time');\n $oauthLengthTime = $config->get('expiresIn');\n if (!$oauthStartTime || !$oauthLengthTime)\n {\n return false;\n }\n\n // Verify oauth end time is useful or not\n return !($oauthStartTime/1000 + $oauthLengthTime < time());\n }", "public function issueFeeOverdue()\n {\n $timeToPay = new \\DateInterval('P10D');\n $cutoff = new \\DateTime();\n $cutoff->sub($timeToPay);\n\n $criteria = Criteria::create();\n $criteria->andWhere(Criteria::expr()->lte('invoicedDate', $cutoff->format(\\DateTime::ISO8601)));\n $criteria->orderBy(['invoicedDate' => Criteria::DESC]);\n\n $matchedFees = $this->getFees()->matching($criteria);\n\n /**\n * @var Fee $fee\n */\n foreach ($matchedFees as $fee) {\n if ($fee->isOutstanding() && $fee->getFeeType()->isEcmtIssue()) {\n return true;\n }\n }\n\n return false;\n }", "function countPending() {\n return IncomingMails::count(array('state > 0'));\n }", "private function checkIfTimeLeft()\r\n {\r\n if($this->expireDateTime < strtotime(\"now\"))\r\n {\r\n generic::successEncDisplay(\"Emails have been sent out, however, there are a number of emails to be sent, and the server run out of time.\");\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public function howmany_overdue_crons() {\n\t\t$how_many_overdue = 0;\n\t\tif (function_exists('_get_cron_array') || (is_file(ABSPATH.WPINC.'/cron.php') && include_once(ABSPATH.WPINC.'/cron.php') && function_exists('_get_cron_array'))) {\n\t\t\t$crons = _get_cron_array();\n\t\t\tif (is_array($crons)) {\n\t\t\t\t$timenow = time();\n\t\t\t\tforeach ($crons as $jt => $job) {\n\t\t\t\t\tif ($jt < $timenow) $how_many_overdue++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $how_many_overdue;\n\t}", "private function isThereWorkToBeDone()\r\n {\r\n if($this->dbCon->count($this->dbTableName, [\"isDelivered\" => 0]) < 1)\r\n {\r\n generic::successEncDisplay(\"There is no email for posting\");\r\n\r\n // add the return to follow the PHP principles and manual, however, it will terminate from the above!\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public function hasPartsToIssue(): bool\n {\n return count($this->issuedItems) > 0;\n }", "function isRedeemed() {\n // we get if it wasn't used yet\n return $this->getUsed_at() != '';\n }", "protected function _checkSendEmail()\n {\n // get the last shipment time\n $shipment = Mage::getResourceModel('sales/order_shipment_collection')\n ->addAttributeToSelect('created_at')\n ->addAttributeToFilter('store_id', $this->_storeId)\n ->setOrder('created_at', 'DESC')\n ->setPageSize(1)\n ->setCurPage(1);\n\n if ($shipment->count() != 0) {\n $lastShipment = $shipment->getFirstItem();\n $shipmentTime = $lastShipment->getCreatedAt();\n\n if ($shipmentTime) {\n return $this->_helper->checkAddAlert(\n $shipmentTime,\n $this->_helper->getConfig(\n NoShipmentsAlert_Helper_Data::PATH_ALERT_TIME,\n $this->_storeId\n ),\n NoShipmentsAlert_Helper_Data::ALERT_TYPE,\n $this->_storeId\n );\n }\n } else {\n // no records exist check monitor start date in config\n // to determine if an alert should be sent\n $startDate = $this->_helper->getConfig(\n NoShipmentsAlert_Helper_Data::PATH_START_DATE,\n $this->_storeId\n );\n if ($startDate) {\n return $this->_helper->checkAddAlert(\n $startDate,\n $this->_helper->getConfig(\n NoShipmentsAlert_Helper_Data::PATH_ALERT_TIME,\n $this->_storeId\n ),\n NoShipmentsAlert_Helper_Data::ALERT_TYPE,\n $this->_storeId\n );\n }\n }\n\n return false;\n }", "public function isDue()\n {\n return in_array($this->status, array(Invoice\\InvoiceStatus::DUE, Invoice\\InvoiceStatus::PAST_DUE));\n }", "public static function generatesMissingEmails(): bool\n {\n return static::enabled(static::generateMissingEmails());\n }", "public function hasOutstandingFees()\n {\n return count($this->getLatestOutstandingEcmtApplicationFee());\n }", "public function checkEmailsForReject($emails)\n {\n if (empty($emails))\n return false;\n\n if (!is_array($emails))\n $emails = array($emails);\n\n $command = Yii::app()->db->createCommand();\n $command->select('t.recipient_email, t.notification_type, CONCAT_WS(\" \", u.first_name, u.last_name) as user_full_name');\n $command->from(AwsSesNotification::model()->tableName() . ' t');\n $command->leftJoin(User::model()->tableName() . ' u', '(`u`.`email` = `t`.`recipient_email` OR `u`.`alt_email` = `t`.`recipient_email`)');\n $command->where('`t`.`recipient_email` IN (\"' . implode('\",\"', $emails) . '\")');\n $command->group('t.recipient_email'); // To be on save side (don't depend on errors in other places)\n $notifications = $command->queryAll();\n \n $rejectedList = array();\n if (!empty($notifications)) {\n foreach ($notifications as $notification) {\n $email = $notification['recipient_email'];\n \n $rejectedEmail = new AwsRejectedEmail();\n $rejectedEmail->email = $email;\n $rejectedEmail->reason = $notification['notification_type'];\n $rejectedEmail->userName = empty($notification['user_full_name']) ? '' : ($notification['user_full_name']);\n\n $rejectedList[$email] = $rejectedEmail;\n }\n }\n \n return $rejectedList;\n }", "public function countExpired()\n {\n $expiredDate = UserBackgroundCheck::getExpiredDate();\n\n return $this->backgroundCheck\n ->where('issued_at', '<', $expiredDate)\n ->count();\n }", "private function check()\n {\n foreach ($this->scheduler->getQueuedJobs() as $job) {\n if ($job->isDue(new DateTime()) === true) {\n\n $this->executeIfNotOverlapped($job);\n }\n }\n }", "public function hasNotifications()\n {\n return count($this->notifications) > 0;\n }", "public function hasEmail() {\n return $this->_has(4);\n }", "function ReduceEmails($reduce_emails_by=0)\n\t{\n\t\tif ($this->userid <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$userid = intval($this->userid);\n\t\t$reduce_emails_by = intval($reduce_emails_by);\n\n\t\tif ($reduce_emails_by == 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->hasUnlimitedTotalCredit()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->GetDb();\n\n\t\t$currentUser = IEM::userGetCurrent();\n\t\t\n\t\tif ($currentUser->userid == $this->userid) {\n\t\t\tIEM::userFlushCache();\n\t\t}\n\n\t\treturn true;\n\t}", "public static function isOverdueTicket( $ticket_id ) {\n\t\t# get overduetime\n\t\t$overduetime = obHelpDeskHelper::getConfig( 'overduetime' )->value;\n\t\t$db = JFactory::getDbo();\n\n\t\t# get last message time\n\t\t$query = '\n\t\t\tSELECT max(m.`reply_time`) as last_message, m.`email`, m.`tid`\n\t\t\tFROM `#__obhelpdesk3_messages` AS m\n\t\t\tINNER JOIN `#__obhelpdesk3_tickets` AS t\n\t\t\tON m.`tid` = t.`id` WHERE m.`tid` = ' . $ticket_id . ' AND t.`status` = \\'open\\'\n\t\t\tGROUP BY m.`tid`';\n\t\t$db->setQuery( $query );\n\t\t$result = $db->loadObject();\n\t\tif ( ! $result || ! $result->last_message ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$current_time = time();\n\t\t\t#get timezone by second\n\t\t\t$timezone = date( 'Z', time() );\n\t\t\t$reply_time = strtotime( $result->last_message );\n\t\t\tif ( ( $current_time - $reply_time - $timezone ) >= $overduetime ) { // pass overduetime => return true\n\t\t\t\treturn true;\n\t\t\t} else { // return false\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "public function isPastDue()\n {\n return Invoice\\InvoiceStatus::PAST_DUE == $this->status;\n }", "public function notifCountHasReachedMax() {\n\t\tif ( $this->getLocalNotificationCount() >= self::MAX_BADGE_COUNT ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isPastDue()\n {\n if ($this->due_date && !$this->due_date->lt(Carbon::now()))\n {\n return false;\n }\n return true;\n }", "public function isReported()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_REPORTED);\n\t}", "public function hasIssue()\n {\n return $this->status === 'message_issues';\n }", "private function checkEventDateNotDue(){\n $event = Event::find($this->id);\n $now = Carbon::now();\n \n $startTime = Carbon::createFromFormat('Y-m-d H:i:s', $event->start_time);\n return $startTime->gt($now);\n }", "private function isOverdueJobTicket($taskflowTime,$jobticketCompleteTime){\n $taskflow = $this->getComparebleDate($taskflowTime);\n $duration = $this->getComparebleDate($jobticketCompleteTime);\n $isOverDue = ($duration->lessThan($taskflow)) ? false : true;\n return $isOverDue;\n \n }", "public function checkForFollowUpNotOpened()\n {\n $now = Carbon::now();\n $logs = $this->getNotOpenedMessagesToFollow();\n foreach($logs as $log) {\n MailLog::info(sprintf('Trigger sending follow-up not opened email for automation `%s`, subscriber: %s, event ID: %s', $this->automation->name, $log->subscriber_id, $this->id));\n $this->fire(collect([$log->subscriber]));\n // a more verbal way is: fire(Subscriber::where('id', $log->subscriber_id)\n }\n }", "public function isDue(): bool\n {\n $this->schedule($this->event());\n\n return $this->event->isDue(app());\n }", "public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}", "public function isConcurrentUsersExceeded()\n {\n $concurrent_user_count = $this->concurrentUserCount();\n $users_allowed_count = $this->usersAllowedCount();\n $user_waiting_count = 1;\n if (($concurrent_user_count + $user_waiting_count) > $users_allowed_count)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function getIsUnPublishScheduled()\n {\n /** @var DBDatetime $unpublish */\n $unpublish = $this->owner->dbObject('UnPublishOnDate');\n\n if ($unpublish->InFuture()) {\n return true;\n }\n\n if ((int) $this->owner->UnPublishJobID !== 0) {\n return true;\n }\n\n return false;\n }", "private function isCompletedTaskCountNegative(): bool\n {\n $count = \\count($this->models) - \\count($this->completed_tasks);\n return \\substr(\\strval($count), 0, 1) === '-';\n }", "public function actionNotifyUnExeptedProfiles(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $hidden = UserStat::model()->findAll(\"completeness < :comp\",array(\":comp\"=>PROFILE_COMPLETENESS_MIN));\n\n $c = 0;\n foreach ($hidden as $stat){\n //set mail tracking\n if ($stat->user->status != 0) continue; // skip active users\n if ($stat->user->newsletter == 0) continue; // skip those who unsubscribed\n if ($stat->user->lastvisit_at != '0000-00-00 00:00:00') continue; // skip users who have already canceled their account\n \n //echo $stat->user->name.\" - \".$stat->user->email.\": \".$stat->user->create_at.\" (\".date('c',strtotime('-4 week')).\" \".date('c',strtotime('-3 week')).\")<br />\\n\";\n $create_at = date(\"Y-m-d H\",strtotime($stat->user->create_at));\n //$create_at_hour = date(\"Y-m-d H\",strtotime($stat->user->create_at));\n /*if ($create_at < strtotime('-8 week') || $create_at >= strtotime('-1 day')) continue; \n if (!\n (($create_at >= strtotime('-1 week')) || \n (($create_at >= strtotime('-4 week')) && ($create_at < strtotime('-3 week'))) || \n (($create_at >= strtotime('-8 week')) && ($create_at < strtotime('-7 week'))) )\n ) continue;*/\n if ( !($create_at == date(\"Y-m-d H\",strtotime('-2 hour')) || $create_at == date(\"Y-m-d H\",strtotime('-1 day')) || \n $create_at == date(\"Y-m-d H\",strtotime('-3 days')) || $create_at == date(\"Y-m-d H\",strtotime('-8 days')) || \n $create_at == date(\"Y-m-d H\",strtotime('-14 day')) || $create_at == date(\"Y-m-d H\",strtotime('-21 day')) || \n $create_at == date(\"Y-m-d H\",strtotime('-28 day'))) ) continue;\n //echo $stat->user->email.\" - \".$stat->user->name.\" your Cofinder profile is moments away from approval!\";\n\n //echo \"SEND: \".$stat->user->name.\" - \".$stat->user->email.\": \".$stat->user->create_at.\" (\".$stat->completeness.\")<br />\\n\";\n //echo 'http://www.cofinder.eu/profile/registrationFlow?key='.substr($stat->user->activkey,0, 10).'&email='.$stat->user->email;\n\n //continue;\n //set mail tracking\n $mailTracking = mailTrackingCode($stat->user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'registration-flow-reminder';\n $ml->user_to_id = $stat->user->id;\n $ml->save();\n\n $email = $stat->user->email;\n $message->subject = $stat->user->name.\" your Cofinder account is almost approved\"; // 11.6. title change\n\n $content = \"We couldn't approve your profile just yet since you haven't provided enough information.\"\n . \"Please fill your profile and we will revisit your application.\".\n mailButton(\"Do it now\", absoluteURL().'/profile/registrationFlow?key='.substr($stat->user->activkey,0, 10).'&email='.$stat->user->email,'success',$mailTracking,'fill-up-button');\n\n $message->setBody(array(\"content\"=>$content,\"email\"=>$email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($email);\n Yii::app()->mail->send($message);\n\n Notifications::setNotification($stat->user_id,Notifications::NOTIFY_INVISIBLE);\n $c++;\n }\n if ($c > 0) Slack::message(\"CRON >> UnExcepted profiles: \".$c);\n return 0;\n }", "function checkPendingInvitation(){\n $checkarray=array(\n \"medical_group_id\"=>$this->medical_group_id,\n \"active\"=>$this->active,\n \"type\"=>$this->type\n );\n if($this->user_id!=null){\n $checkarray[\"user_id\"]=$this->user_id;\n }\n else{\n $checkarray[\"user_id\"]=NULL;\n $checkarray[\"email\"]=$this->email;\n }\n if($this->getCount($checkarray)==true){\n return false;\n }\n return true;\n }", "public function checkobsolete()\n {\n $end_of_today = date(\"Y-m-d\");\n //count\n $server_obsolete_count = Serveros::where('notification', $end_of_today)->count();\n\n\n if ($server_obsolete_count >=1)\n {\n\n //if old auto send notification\n $servers_obsolete = Serveros::where('notification', $end_of_today)->get();\n foreach($servers_obsolete as $server_obsolete)\n {\n $server_os = $server_obsolete->server_os_id;\n $this->mailer($server_os);\n }\n }\n \n }", "public static function countEmails()\r\n {\r\n $number = count(self::$emailArray);\r\n return $number;\r\n }", "public function has_expired()\n\t{\n\t\treturn $this->until < time();\n\t}", "public function countOldPendingEmail()\n {\n $qb = $this->createQueryBuilder('tn')\n ->select('count(tn)')\n ->where('tn.dtStart <= :dt')\n ->andWhere('tn.status = :status')\n ->andWhere('tn.type != :typeA')\n ->andWhere('tn.type != :typeB')\n ->setParameter('dt', new DateTime('now'))\n ->setParameter('status', TraineeNotif::PENDING)\n ->setParameter('typeA', TraineeNotif::TYPE_TXT_SURVEYBEGIN)\n ->setParameter('typeB', TraineeNotif::TYPE_TXT_SURVEYEND);\n\n $query = $qb->getQuery();\n\n return $query->getSingleScalarResult();\n }", "public function groupNotChangedMails()\n {\n $conditions = array('GroupChangeRequest.request_type'=>'cr','GroupChangeRequest.is_moved'=>0);\n $pendingRequests = $this->GroupChangeRequest->find('all',array('conditions'=>$conditions));\n $cuttentTimeStamp = strtotime(date('Y-m-d'));\n if(!empty($pendingRequests)) {\n $count = 0;\n foreach($pendingRequests as $row){\n $timeDiff = round(abs($cuttentTimeStamp - strtotime($row['GroupChangeRequest']['created'])) / (60*60),0);\n if($timeDiff < 48) {\n //Send Mails\n $count++;\n $emailLib = new Email();\n $to = $userInfo['BusinessOwner']['email'];\n //$to = '[email protected]';\n $subject = 'FoxHopr: Group change request status';\n $template ='group_change_pending';\n $variable = array('name'=>$row['BusinessOwner']['fname'] . \" \" . $row['BusinessOwner']['lname']);\n $success = $emailLib->sendEmail($to,$subject,$variable,$template,'both');\n }\n }\n }\n }", "public function hasUnlimitedMonthlyCredit()\n\t{\n\t return $this->group->limit_emailspermonth > 0\n\t ? false\n\t : true;\n\t}", "private function check_meet_creation_limit()\n {\n $recent_shackmeet_count = count($this->load_recent_shackmeet_count());\n \n return $recent_shackmeet_count < 2;\n }", "static function email_available($email) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `email` LIKE '\".$email.\"';\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "public function dueEvents(Application $app)\n {\n return array_filter($this->_events, function (Event $event) use ($app) {\n return $event->isDue($app);\n });\n }", "protected function emailAlreadyInUse($email)\n {\n return (bool)self::select(['id'])->\n where('email', '=', $email)->\n count();\n }", "public static function getoverdue() {\r\n $today = new DateTime(); \r\n $dueDate = date_modify($today, '-11 months');\r\n $date = $dueDate->format('Y-m-d');\r\n \r\n $db = static::getDB();\r\n $stmt = $db->query(\r\n \"SELECT * FROM lifts \"\r\n . \"WHERE last_insp_date < '$date' \"\r\n . \"AND active = '1' \"\r\n . \"ORDER BY last_insp_date ASC\");\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n return $results;\r\n }", "public function isRejected() {\n\t\treturn $this->approved == -1;\n\t}", "public function allowedForOvertime()\n { return (($this->esgrp == 'ES') || ($this->esgrp == 'EF') || ($this->esgrp == 'F')) ? true : false;\n }", "public function hasAlreadyUsedUpMoney()\n {\n return !! Timestamp :: build( $this ) -> getChargingStatusTimestamp( OrderStatusEnum :: USED_UP );\n }", "function edd_pup_is_processing( $emailid = null ) {\r\n\tif ( empty( $emailid ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$email_list = edd_pup_emails_processing();\r\n\r\n\tif ( is_array( $email_list['processing'] ) && in_array( $emailid, $email_list['processing'] ) ) {\r\n\r\n\t\t$totals = edd_pup_check_queue( $emailid );\r\n\r\n\t\tif ( $totals['queue'] > 0 ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t} else {\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n}", "function is_email_available($email)\n\t{\n\t\t// Load Models\n\t\t$this->ci->load->model('dx_auth/users', 'users');\n\t\t//$this->ci->load->model('dx_auth/user_temp', 'user_temp');\n\n\t\t$users = $this->ci->users->check_email($email);\n\t\t//$temp = $this->ci->user_temp->check_email($email);\n\t\t//$available = $users->num_rows() + $temp->num_rows() == 0;\n\t\t$available = $users->num_rows() == 0;\n\t\t\n\t\treturn $available;\n\t}", "public function countUnreadMails()\n {\n try\n {\n //init the catching\n $this->exceptionThrower->start();\n $info = imap_mailboxmsginfo($this->mailbox);\n $this->exceptionThrower->stop();\n return ( property_exists($info,'unread') ? (int) $info->unread : null);\n }catch (\\Exception $e)\n {\n throw new SimpleMailReceiverException(\"Error getting the number of unread mails\" . $e->getMessage(), $e->getCode());\n }\n }", "public function validateReminderEmails($subscriptionId) {\n $validate = false;\n $sub = new Cart66AccountSubscription($subscriptionId);\n $account = new Cart66Account($sub->account_id);\n \n // Check to see if the customer has opted out already\n if(!$account->opt_out) {\n $validate = true;\n }\n \n return $validate;\n }", "private function hasOutdatedStatistics(\\DateTimeInterface $lastReceived)\n {\n $today = new \\DateTime('now');\n\n $interval = new \\DateInterval('P1D');\n\n $periods = new \\DatePeriod($lastReceived, $interval, $today);\n $days = iterator_count($periods);\n\n return $days > 7;\n }", "protected function tooManyFailedPayments(array $payload)\n\t{\n\t\treturn $payload['data']['object']['attempt_count'] > 0;\n\t}", "public function isExceededAttempts()\n { \n $attempts = $this->con->prepare(\"SELECT attempts, last_attempts FROM login_attempts WHERE user_id = ? AND ip = ? \");\n $attempts->bind_param('is', $this->user_id, $this->ip);\n $attempts->execute();\n $attempts->store_result();\n $attempts->bind_result( $number_attempts, $last_attempts);\n $attempts->fetch();\n $rows_attempts = $attempts->num_rows;\n $attempts->free_result();\n $attempts->close();\n \n if( $attempts and $rows_attempts > 0)\n {\n $last_attempts = $this->calcIntervalAttempts($last_attempts);\n if($number_attempts >= self::$max_attempts and $last_attempts <= self::$time_bloq)\n {\n return self::$time_bloq - $last_attempts;\n } \n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }", "public function isDue(): bool;", "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "public function getAllNotResponded()\n {\n $query = 'select count(attendees.attendeeID) from users right join attendees on users.userID = attendees.userID where users.isRSVP = 0;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "public function unpaid(): bool\n {\n return in_array($this->status, [self::PENDING]);\n }", "public function pastDue() : bool\n {\n return $this->stripe_status === StripeSubscription::STATUS_PAST_DUE;\n }", "public function isDone()\n\t{\n\t $today = Carbon::now()->setTimezone('America/Los_Angeles')->startOfDay();\n\t return $today->gte($this->event_date->endOfDay());\n\t}", "public function hasRetriesRemaining(): bool\n {\n return $this->attempts === $this->total;\n }", "public function hasCompletedAffiliatedOrders()\n {\n return (count($this->getCompletedAffiliatedOrders()) > 0) ? true : false;\n }", "public function isRedelivered();", "public function isRejected() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->rejectionDate) ? false: true;\r\n\t}", "public function expired()\n {\n return !$this->subscribed() && $this->billing_trial_ends_at && strtotime($this->billing_trial_ends_at) <= time();\n }", "public function isSubscribedInviteReminder(){\n\n\t\t// check if the object has been hydrated\n\t\tif(null === $this->id){\n\t\t\t$this->load();\n\t\t}\n\n\t\t// this method only available for email obj w/template = 'inviteReminder'\n\t\tif('inviteReminder' !== $this->template) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// look for the corresponding \"unsubscribe\" email record for this gift/email. If it exists, they have unsubscribed\n\t\t$sql = \"\n\t\t\tSELECT \t`id`\n\t\t\tFROM \t`emails`\n\t\t\tWHERE \t`emailDigest` = '$this->emailDigest'\n\t\t\tAND \t`giftId` = $this->giftId\n\t\t\tAND \t`template` = 'inviteReminderUnsubscribe'\n\t\t\";\n\n\t\t$result = db::query($sql);\n\t\t$recordCount = mysql_num_rows($result);\n\t\treturn (0 === $recordCount);\n\n\t}", "public function get_attempts() {\n global $DB, $USER;\n\n $sql = \"SELECT *\n FROM {simplecertificate_issues} i\n WHERE certificateid = :certificateid\n AND userid = :userid AND timedeleted IS NULL\";\n\n $issues = $DB->get_records_sql($sql, array('certificateid' => $this->get_instance()->id, 'userid' => $USER->id));\n if ($issues) {\n return $issues;\n }\n\n return false;\n }", "public function isUnderpaid()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_UNDERPAID;\n }", "public function emailAvailable($email) {\n $conn = $this->getConnection();\n $result = $conn->query(\"SELECT Email FROM User WHERE Email = '$email'\", PDO::FETCH_ASSOC);\n return $result == null || $result->rowCount() <= 0;\n }", "public function hasFailures()\n {\n return $this->failedsportevents > 0;\n }", "public function hasProjectGotTimesheetItems($projectId) {\n\t\treturn $this->projectDao->hasProjectGotTimesheetItems($projectId);\n\t}", "function check_all_is_post_upcoming(){\n $this->loop_through_all(array($this, 'is_post_upcoming'));\n }", "public function isEmailRegistered()\n {\n return $this->isEmailAvailable($this->getEmailAddress());\n\n }", "public function checkForAnuallyRecurring()\n {\n // not supported\n }", "public function isEmailAlreadySentForThisSurvery($projectId,$email_repetitive_sent, $email_records_sent,$event_id, $record, $instrument, $alertid,$isRepeatInstrument,$repeat_instance){\n if(!empty($email_repetitive_sent)){\n if(array_key_exists($instrument,$email_repetitive_sent)){\n if(array_key_exists($alertid,$email_repetitive_sent[$instrument])){\n if(array_key_exists('repeat_instances', $email_repetitive_sent[$instrument][$alertid])){\n #In case they have changed the project to non repeatable\n if(array_key_exists($record, $email_repetitive_sent[$instrument][$alertid]['repeat_instances'])){\n if(array_key_exists($event_id, $email_repetitive_sent[$instrument][$alertid]['repeat_instances'][$record])){\n if(in_array($repeat_instance, $email_repetitive_sent[$instrument][$alertid]['repeat_instances'][$record][$event_id])){\n return true;\n }\n }else{\n //Old structure\n foreach ($email_repetitive_sent[$instrument][$alertid]['repeat_instances'][$record] as $index=>$instance){\n if($instance == $repeat_instance){\n #delete the old instance and add a the new structure\n unset($email_repetitive_sent[$instrument][$alertid]['repeat_instances'][$record][$index]);\n $email_repetitive_sent = $this->addRecordSent($email_repetitive_sent, $record, $instrument, $alertid,$isRepeatInstrument,$repeat_instance,$event_id);\n $this->setProjectSetting('email-repetitive-sent', json_encode($email_repetitive_sent), $projectId);\n return true;\n }\n }\n }\n }\n }\n if(array_key_exists($record, $email_repetitive_sent[$instrument][$alertid])){\n if(array_key_exists($event_id, $email_repetitive_sent[$instrument][$alertid][$record])){\n return true;\n }else{\n #Old structure\n if($email_repetitive_sent[$instrument][$alertid][$record] == \"1\" && !$isRepeatInstrument){\n #Add the event in the new structure\n// $email_repetitive_sent = $this->addRecordSent($email_repetitive_sent, $record, $instrument, $alertid,$isRepeatInstrument,$repeat_instance,$event_id);\n// $this->setProjectSetting('email-repetitive-sent', $email_repetitive_sent, $projectId);\n $this->log('email-repetitive-sent', [\n 'project_id' => $projectId,\n 'instrument' => $instrument,\n 'alert' => $alertid,\n 'record_id' => $record,\n 'event' => $event_id,\n 'instance' => $instance\n ]);\n return true;\n }\n }\n }\n #If the record is registered as sent but it's not in the old repetitive sent structure\n if($this->recordExistsInRegisteredRecords($email_records_sent,$record) && (!array_key_exists($record, $email_repetitive_sent[$instrument][$alertid]['repeat_instances']) && !array_key_exists($record, $email_repetitive_sent[$instrument][$alertid]))){\n// $email_repetitive_sent = $this->addRecordSent($email_repetitive_sent, $record, $instrument, $alertid,$isRepeatInstrument,$repeat_instance,$event_id);\n// $this->setProjectSetting('email-repetitive-sent', $email_repetitive_sent, $projectId);\n $this->log('email-repetitive-sent', [\n 'project_id' => $projectId,\n 'instrument' => $instrument,\n 'alert' => $alertid,\n 'record_id' => $record,\n 'event' => $event_id,\n 'instance' => $instance\n ]);\n return true;\n }\n }\n }\n }\n\n return false;\n }", "protected function hasSuccessfullyCancelledAccounts(): bool\n {\n return $this->getCancelledSubscriptions()->count() === $this->accounts->count();\n }", "function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t/*echo $count;\n\t\tdie;*/\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}", "function countUnreadMessages($username) {\r\n\t\t$query = \"SELECT * FROM \".TBL_MAIL.\" WHERE UserTo = :username AND Deleted = 0 AND status = 'unread' ORDER BY SentDate DESC\";\r\n\t\t$stmt = $this->connection->prepare($query);\r\n\t\t$stmt->execute(array(':username' => $username));\r\n\t\t$dbarray = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t$count = $stmt->rowCount();\r\n\t\tif(!$dbarray || $count < 1){\r\n\t\t\treturn false; // failure\r\n\t\t} else {\r\n\t\t\treturn $count; // success\r\n\t\t}\r\n\t}", "public function isNotDisposable($email)\n {\n return ! $this->isDisposable($email);\n }", "public function is_expired() {\n\t\treturn $this->data['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt();\n\t}", "function listUserCompletedNoNotifiedKeys() {\r\n\t\t$query = \"SELECT * FROM \".TBL_USED_KEYS.\" WHERE status = 'completed' AND imported = 1\";\r\n\t\t$dbarray = $this->connection->query($query);\r\n\t\t$rows = $dbarray->fetch(PDO::FETCH_ASSOC);\r\n\t\tif(!$dbarray || $dbarray->rowCount() < 1){\r\n\t\t\treturn 1; // failure\r\n\t\t} else {\r\n\t\t\treturn $rows; // success\r\n\t\t}\r\n\t}", "function isEmailInList($email) {\n\t\tglobal $polarbear_db;\n\t\t$emailSafe = $polarbear_db->escape($email);\n\t\t$sql = \"SELECT count(id) AS antal FROM \" . POLARBEAR_DB_PREFIX . \"_emaillist_emails WHERE listID = '{$this->id}' AND email = '$emailSafe'\";\n\t\tglobal $polarbear_db;\n\t\t$antal = $polarbear_db->get_var($sql);\n\t\treturn (bool) $antal;\n\t}", "public function readOverdueInvoices()\n {\n $user = auth()->user();\n\n // Mark invoice notifications as read\n foreach ($user->unreadNotifications as $notification) {\n // Not an invoice notification\n if ($notification->getAttribute('type') != 'App\\Notifications\\Income\\Invoice') {\n continue;\n }\n\n $notification->markAsRead();\n }\n\n // Redirect to invoices\n return redirect('customers/invoices');\n }", "public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }", "function it_exchange_get_abandoned_cart_email_times_sent( $email_id ) {\n\t$sent = (int) get_post_meta( $email_id, '_it_exchange_abandoned_cart_emails_sent', true );\n\treturn empty( $sent ) ? 0 : $sent;\n}", "public function has_remaining_posts() {\n\t\treturn $this->has_remaining_posts;\n\t}", "public static function isEmailAlreadyInUse($email)\n {\n $db = Base::getConnection();\n $stmt = $db->prepare(\"SELECT COUNT(*) AS count_emails FROM users WHERE email = :email\");\n $stmt->bindParam(\":email\", $email, PDO::PARAM_STR);\n $stmt->execute();\n\n $result = $stmt->fetch();\n $stmt->closeCursor();\n\n return $result['count_emails'] > 0;\n }", "public function hasANotificationBeenRecentlySent($userId)\n {\n $expiresIn = Carbon::now()\n ->addMinutes(10);\n\n return !Cache::add('users:notifications:just:' . $userId, 1, $expiresIn);\n }", "public function hasNotCompleted() : bool\n {\n return $this->completed_at === null;\n }", "function it_exchange_abandoned_carts_mark_email_opened( $email_id, $cart_id ) {\n\t$cart_emails = get_post_meta( $cart_id, '_it_exchange_abandoned_cart_emails_sent', true );\n\n\t// Make sure this email hasn't already been counted.\n\tforeach( (array) $cart_emails as $key => $email ) {\n\t\tif ( ! empty( $email['email_id'] ) && $email['email_id'] == $email_id && ! empty( $email['opened'] ) ) {\n\t\t\treturn;\n\t\t} else if ( ! empty( $email['email_id'] ) && $email['email_id'] == $email_id ) {\n\t\t\t$cart_emails[$key]['opened'] = time();\n\t\t\tupdate_post_meta( $cart_id, '_it_exchange_abandoned_cart_emails_sent', $cart_emails );\n\t\t}\n\t}\n\n\t// If we made it this far the abadoned cart's sent_email has been flagged as open and we need to increment the opens for the email.\n\t$opened = (int) get_post_meta( $email_id, '_it_exchange_abandoned_cart_emails_opened', true );\n\tupdate_post_meta( $email_id, '_it_exchange_abandoned_cart_emails_opened', ( $opened + 1 ) );\n\n\t// Lets also credit any future purchases to this email\n\tupdate_post_meta( $cart_id, '_it_exchange_abandoned_cart_conversion_source', $email_id );\n\n}", "public function failed() {\r\n return !empty($this->messages);\r\n }", "private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }", "public function hasLateDaysRemaining() {\n return $this->getLateDaysRemaining() > 0;\n }", "public function checkForListUnsubscription()\n {\n $now = Carbon::now();\n $subscribers = $this->getUnsubscribersToFollow();\n\n foreach ($subscribers as $subscriber) {\n if ($now->gte($subscriber->unsubscribed_at->copy()->modify($this->getDelayInterval()))) {\n MailLog::info(sprintf('Trigger sending follow-up unsubscribed email for automation `%s`, subscriber ID: %s, event ID: %s, message ID: %s', $this->automation->name, $subscriber->id, $this->id, $subscriber->message_id));\n $this->fire(collect([$subscriber]));\n // a more verbal way is: fire(Subscriber::where('id', $log->subscriber_id)\n }\n }\n }", "public function isAccountOldEnough()\n {\n\n $data = $this->facebook->api('/me/posts?limit=1&until=1388534400');\n\n if (!empty($data['data']['0'])) {\n return true;\n } else {\n return false;\n }\n }", "private function checkEmailSettings(): bool\n {\n return (is_array($this->properties['mail_recipients']) || is_array($this->properties['mail_bcc']));\n }", "public function p_emailrepeat(){\n\t\t\n\t\t\t$q = \"SELECT *\n\t\t\t\tFROM users \n\t\t\t\tWHERE email = '\".$_POST['email'].\"'\";\n\n\t\t\t$next_author = DB::instance(DB_NAME)->select_rows($q);\n\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($next_author);\n\t\t\techo \"</pre>\";\n\n\t\t\t# get all authors for the story so far, to deny repeats\n\t\t\t$q = \"SELECT *\n\t\t\t\tFROM users_tales\n\t\t\t\tWHERE tale_id = '\".$this->user->current_tale.\"'\";\n\n\t\t\t$previous_authors = DB::instance(DB_NAME)->select_rows($q);\n\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($previous_authors);\n\t\t\techo \"</pre>\";\n\n\t\t\t\n\t\t\tforeach($previous_authors as $key => $value){\n\t\t\t\tif($value['user_id'] == $next_author[0]['user_id']){\n\t\t\t\t\techo \"that user has already written on this story\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t}" ]
[ "0.6918729", "0.64691955", "0.64335775", "0.6384309", "0.62226963", "0.6156522", "0.6101114", "0.5931919", "0.58438843", "0.5762655", "0.5740838", "0.5716118", "0.5697291", "0.56921977", "0.5627474", "0.56249243", "0.562196", "0.56215394", "0.5621307", "0.5583509", "0.55582947", "0.554981", "0.55486256", "0.5547585", "0.55016136", "0.54963446", "0.5495596", "0.54769564", "0.5462829", "0.5461862", "0.5439258", "0.54350984", "0.5403644", "0.53936464", "0.5361776", "0.5360662", "0.53559035", "0.53445476", "0.5343482", "0.5334056", "0.53255516", "0.53224146", "0.5321165", "0.5308657", "0.53024226", "0.53005046", "0.52981573", "0.528978", "0.5271949", "0.5259616", "0.5252255", "0.52478397", "0.5246642", "0.52460325", "0.52416074", "0.5236236", "0.52337086", "0.5226932", "0.5223922", "0.5223273", "0.5220036", "0.5208456", "0.5208135", "0.5198589", "0.5196736", "0.51966053", "0.51959", "0.5172895", "0.51714325", "0.5169155", "0.516529", "0.5162252", "0.51603305", "0.5156758", "0.5145846", "0.51416343", "0.5135419", "0.5135293", "0.513192", "0.51294637", "0.5126787", "0.51115656", "0.5106931", "0.5105941", "0.5105303", "0.5101342", "0.51012886", "0.5101106", "0.510024", "0.5098692", "0.50890297", "0.50842535", "0.5084109", "0.507978", "0.50779366", "0.50663394", "0.50623965", "0.5061302", "0.505868", "0.50573266" ]
0.559897
19
Renders a gluggi component.
public function renderGluggiComponent (string $type, string $name, array $context = []) : string { $component = $this->registry->getComponent($type, $name); $context = \array_replace([ "standalone" => false, ], $context); return "<!-- Component Start: {$type}/{$name} -->" . \trim($this->locator->get("twig")->render($component->getTemplatePath(), $context)) . "<!-- / Component End: {$type}/{$name} -->"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render($component);", "public function renderComponents();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public function render();", "public abstract function render();", "public abstract function render();", "public function render() {\r\n\t\t\r\n\t}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "abstract public function render();", "public function render()\n {\n \n }", "public function render()\n {\n }", "public function render()\n {\n }", "public function render()\n {\n }", "public function render()\n {\n }", "public function render(){\n\t\t\n\t}", "public function render()\n {\n return view('dwbtui::components.html');\n }", "public function render() {\n echo $this->getHtml();\n }", "function render()\n\t{\n\t}", "abstract public function render() ;", "abstract function render();", "function render ()\n {\n parent::render();\n }", "public function render()\n {\n //\n }", "protected function render() {}", "protected function render() {}", "protected function render() {}", "public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}", "function render() ;", "public function displayComponent() {\n\t\t\n\t\t\t$this->outputLine($this->_content);\n\t\t\t\n\t\t}" ]
[ "0.69164664", "0.6720474", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314696", "0.6314028", "0.6314028", "0.620751", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147928", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.6147549", "0.61223024", "0.61223024", "0.61223024", "0.61223024", "0.61223024", "0.61223024", "0.6116176", "0.60989654", "0.60989654", "0.60989654", "0.60989654", "0.60958534", "0.6090704", "0.60602224", "0.605678", "0.60383546", "0.60228735", "0.59967065", "0.597891", "0.5973683", "0.59731513", "0.59731513", "0.59532666", "0.5953039", "0.59456533" ]
0.5993425
93
Returns the dummy content.
public function getDummy (string $type, array $options = []) : string { $twig = $this->locator->get("twig"); $hasModernRadBundle = \class_exists(DataContainer::class) || \class_exists(OldDataContainer::class); $allowedContentTypes = [ "content", "form", ]; // dummy: "content" if ($allowedContentTypes[0] === $type) { $options = \array_replace([ "headlines" => 4, ], $options); $options["headlines"] = \min(6, \max(1, $options["headlines"])); return $twig->render("@Gluggi/dummy/content.html.twig", $options); } // dummy: "form" if ($allowedContentTypes[1] === $type) { if (!$hasModernRadBundle) { throw new \InvalidArgumentException("The 'form' dummy content needs becklyn/rad-bundle v6+ or becklyn/rad v8+"); } $form = $this->formFactory->create(ExampleForm::class, null); ExampleForm::addErrors($form); return $twig->render("@Gluggi/dummy/form.html.twig", [ "form" => $form->createView(), ]); } throw new \InvalidArgumentException(\sprintf( "Unsupported dummy content '%s'. Supported are: %s", $type, "'" . \implode("', '", $allowedContentTypes) . "'" )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function noContent()\n {\n return $this->factory->noContent();\n }", "public function getUndefinedContent()\n {\n return $this->undefinedContent;\n }", "public function getDummy()\n {\n return $this->dummy;\n }", "public function getDummy()\n {\n return $this->dummy;\n }", "public function getDummy()\n {\n return $this->dummy;\n }", "public function getDummy()\n {\n return $this->dummy;\n }", "public function getDefaultContent(): string;", "public function content();", "public function content() {\n $element = array(\n '#markup' => 'Hello',\n );\n return $element;\n }", "public static function dummy() {}", "public function getOptionalContent() {}", "public function contentNotGiven()\n {\n return empty($this->content);\n }", "public function testFromNoContentResponse() : void {\n $this->assertEmpty(Result::fromResponse(Response::fromName(\"no content\"))->toArray());\n }", "public function getRawContent();", "function content() {\r\n\t\t/* Reimplement this function in subclasses. */\r\n\t}", "function get_content() {\r\n\t\treturn $this->content;\r\n\t}", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }", "abstract protected function content();", "public function content()\n {\n return $this->content;\n }", "public function content()\n {\n return $this->content;\n }", "public function content()\n {\n return $this->content;\n }", "public function noContent() {\n $this->noContent = 'NOCONTENT';\n return $this;\n }", "public function get_content() {\n if ($this->content !== null) {\n return $this->content;\n }\n\n $this->content = new stdClass;\n\n // get configured text if available\n if (! empty($this->config->text)) {\n $this->content->text = $this->config->text;\n }\n\n //$this->content->text = 'The content of our SimpleHTML block!';\n $this->content->footer = 'Goodbye for now...';\n\n return $this->content;\n\n }", "public function getContent() {}", "public function getContent() {}", "public function getContent()\n {\n \t$content = $this->content;\n return $content;\n }", "public static function getEmptyContentObeobeko()\n {\n $obeobekos = Obeobeko::where('content', '')\n ->whereDate('created_at', '<', Carbon::now()->subDay()->toDateString())\n ->get();\n\n return $obeobekos;\n }", "public function getUnsaturatedFatContent()\n {\n return $this->unsaturatedFatContent;\n }", "public function getContent() { return $this->content; }", "public function getContentMarkup(){ return $this->content_markup; }", "public function getContent(){\n\t\treturn $this->content;\n\t}", "public function get_content() {\n return $this->content;\n }", "public function foundNone() {\n return $this->randomItem(\n \"Sorry, I couldn't find any\",\n \"That's odd, there don't seem to be any\",\n 'Sorry, the internet is fresh out of',\n 'Alas, I failed to bring you your'\n );\n }", "public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }", "public function testContent() {\n \n $content = [\n '#theme' => 'twigTest',\n '#test_var' => $this->t('Example of a page'),\n '#test_var2' => $this->t('implemented with Vuejs'),\n '#attached' => [\n 'library' => [\n 'drupal_vuejs/vuejs',\n 'drupal_vuejs/appvuejs',\n ]\n ],\n '#cache' => array(\n 'max-age' => 0,\n ),\n ];\n \n return $content;\n }", "public function getContent () {\r\n\t\treturn $this->content;\r\n\t}", "public function mixedContent()\n {\n return $this->socrates->mixedContent($this->id);\n }", "function getContent() ;", "public function getContent()\r\n {\r\n return $this->content;\r\n }", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function content(): string\n {\n return $this->content;\n }", "public static function getContent() {\n\t\treturn self::$_content;\n\t}", "function getContent()\n {\n return $this->content;\n\n }", "public function getContent()\r\n {\r\n return $this->_content;\r\n }", "public function getContent() {\r\n\t\treturn $this->content;\r\n\t}", "function getContent()\n {\n return $this->content;\n }", "function getContent()\n {\n return $this->content;\n }", "public function content()\n {\n return $this->cache->get('content');\n }", "public function Content()\n {\n return $this->content;\n }", "public function getSodiumContent()\n {\n return $this->sodiumContent;\n }", "public function getData()\n\t{\n\t\ttry\n\t\t{\n\n\t\t\treturn $content;\n\t\t}\n\t\tcatch (RuntimeException $e)\n\t\t{\n\t\t\t\t$content = '';\n\t\t\treturn $content;\n\n\t\t}\n\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "protected function getContent() {\n return $this->content;\n }", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function get_content()\n\t\t{\n\t\t\tif (!$this->is_cached()) {\n\t\t\t\t$this->load();\n\t\t\t}\n\n\t\t\treturn $this->content;\n\t\t}", "public static function renderContent() {}", "public function getContent(): string;", "public function getContent(): string;", "function content();", "public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}", "public function noContent() {\n return $this->simpleResponse(null, Codes::HTTP_NO_CONTENT);\n }", "public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}", "public function getContent()\n {\n return $this->_content;\n }", "public function renderContent() {}", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }" ]
[ "0.7053434", "0.70515877", "0.653244", "0.653244", "0.653244", "0.653244", "0.6370849", "0.6204422", "0.6089123", "0.60193855", "0.60028577", "0.6001181", "0.5977226", "0.5973756", "0.59713", "0.5969881", "0.5944046", "0.5944046", "0.59432304", "0.5940594", "0.5915026", "0.5915026", "0.5915026", "0.5896084", "0.5893448", "0.5893428", "0.5893428", "0.5889508", "0.58860093", "0.58599925", "0.58196014", "0.5810314", "0.57976276", "0.5791934", "0.5790838", "0.57885396", "0.578416", "0.57691073", "0.5753118", "0.57484055", "0.5748356", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5741248", "0.5738458", "0.57384235", "0.5726158", "0.5724229", "0.57239777", "0.5721512", "0.5721512", "0.5715279", "0.57150507", "0.570304", "0.57027733", "0.5696039", "0.5696039", "0.5696039", "0.5694046", "0.5694046", "0.5694046", "0.5691476", "0.56912214", "0.56912214", "0.56912214", "0.5691216", "0.5679687", "0.56780505", "0.56780505", "0.5677888", "0.56688076", "0.56688076", "0.56562656", "0.56556344", "0.5652136", "0.5651184", "0.56506616", "0.56506616", "0.56506616", "0.56506616", "0.56506616", "0.56506616", "0.56506616", "0.56506616", "0.56506616", "0.56506616" ]
0.0
-1
Returns the template name.
public function getTemplateName (string $type, string $name) : string { return $this->registry->getComponent($type, $name)->getTemplatePath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplateName()\n {\n return $this->templateName;\n }", "function getTemplateName() {\n\t\treturn $this->templateName;\n\t}", "public function getTemplateName()\n {\n return $this->_sThisTemplate;\n }", "protected function _getTemplateName()\n {\n $tag = $this->getTemplateTag();\n $lang = app()->getLocale();\n $fallbackLang = config('app.fallback_locale');\n\n $name = \"mail_{$tag}_{$lang}\";\n\n if (empty(setting($name))) return \"mail_{$tag}_{$fallbackLang}\";\n\n return $name;\n }", "public function getTemplateName()\n {\n return isset($this->TemplateName) ? $this->TemplateName : null;\n }", "public function getTemplateName(): string;", "public function getTemplateName()\n {\n // TODO: Implement getTemplateName() method.\n return 'Tem';\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "public function getTemplateName()\n {\n }", "public function get_utemplate_name() {\n $fs = get_file_storage();\n $xmlfile = $fs->get_file_by_id($this->utemplateid);\n\n return $xmlfile->get_filename();\n }", "function get_template_name($instance) {\n return 'template';\n }", "abstract public function getTemplateName();", "public function getReidentifyTemplateName()\n {\n return $this->reidentify_template_name;\n }", "public function getInspectTemplateName()\n {\n return $this->inspect_template_name;\n }", "public function render()\n {\n return $this->getTemplateName();\n }", "protected function _getTplName()\n {\n // assign template name\n $sTplName = oxRegistry::getConfig()->getRequestParameter('tpl');\n\n if ($sTplName) {\n // security fix so that you cant access files from outside template dir\n $sTplName = basename($sTplName);\n\n //checking if it is template name, not content id\n if (!getStr()->preg_match(\"/\\.tpl$/\", $sTplName)) {\n $sTplName = null;\n } else {\n $sTplName = 'message/' . $sTplName;\n }\n }\n\n return $sTplName;\n }", "public function forTemplate() {\n\t\treturn $this->ActionName;\n\t}", "protected function template_name() {\r\n return 'transportation/route_planner';\r\n }", "protected function getName()\n {\n return $this->getRequest()->args('name') ?: $this->profile->code . '_' . $this->tpl['name'];\n }", "public function getFullName(){\n\t\treturn $this->templateSet->getFullName() . '/' . $this->name . $this->suffix;\n\t}", "private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }", "public function getNewTemplateName()\n {\n return isset($this->NewTemplateName) ? $this->NewTemplateName : null;\n }", "public function getTemplatePathname() : string {\n\t\treturn $this->templateBasePath . '/linklist-group.mustache';\n\t}", "protected function getTemplateFilename() {\n if (isset($this->extra['template-file'])) {\n return $this->extra['template-file'];\n }\n return 'settings.local.php.twig';\n }", "function get_template_name( $instance ) {\n\t\t\treturn isset($instance['template']) ? $instance['template'] : 'base';\n\t\t}", "function getTemplateFilename($t)\n{\n\treturn ARC_TEMPLATE_FS . $t . '.php';\n}", "final public function getTemplate() {\n\t\treturn '';\n\t}", "public function templatePrefix()\n\t{\n\t\treturn '';\n\t}", "function get_current_template_name() {\n\tglobal $wp_query;\n \n // Page\n\n if(is_page()) {\n return basename(get_page_template(), \".php\");\n }\n\n // Single post\n\n elseif (is_single()) {\n $post_id = $wp_query->get_queried_object_id();\n\t\t$post = $wp_query->get_queried_object();\n\t\t$post_type = $post->post_type;\n\n if ( isset( $post->post_type ) ) {\n // If a regular/default post then assign the name as single.\n if($post->post_type === 'post') {\n return 'single';\n }\n // Else use the post type name.\n else {\n return 'single-' . sanitize_html_class( $post->post_type );\n }\n }\n }\n\n // Search\n\n elseif ( is_search() ) {\n\t\treturn 'search';\n\t}\n}", "public function getTemplateName()\n\t{\n\t\treturn 'uitypes/Modules.tpl';\n\t}", "public function getName()\r\n\t{\r\n\t\treturn GeekPoint_AdminDAVi_Directory_Root::ADMIN_TEMPLATES;\r\n\t}", "function getTemplateString($templateName) {\n if ($templateName) { //fetch template string !DOCUMENT!\n $templateString=$this->cObj->fileResource($templateName);\n $template=$this->cObj->getSubpart($templateString, '###'.strtoupper($this->cObj->data['xtemplate']).'###');\n return $template;\n }\n return '';\n }", "public function getTemplatePathAndFilename() {}", "public function getExportLayoutName(){\n\t\t\n\t\t$this->validateInited();\n\t\t\n\t\t$parentID = $this->post->post_parent;\n\t\t\n\t\t$prefix = \"template\";\n\t\t\n\t\t$layoutName = $prefix;\n\t\tif(!empty($parentID))\n\t\t\t$layoutName .= \"_\". $this->getPostBaseName($parentID);\n\t\t\n\t\t$layoutName .= \"_\".$this->getPostBaseName($this->id);\n\t\t\n\t\t$layoutName = HelperUC::convertTitleToHandle($layoutName);\n\n\t\treturn($layoutName);\n\t}", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "protected function resolveViewTemplateName(): string\n {\n $controllerName = ltrim($this->request->getControllerName(), '\\\\');\n $namespaceParts = explode('\\\\', $controllerName);\n $controllerClassName = array_pop($namespaceParts);\n\n // Get rid of module name\n array_shift($namespaceParts);\n\n if (strtolower($namespaceParts[0]) == 'mvc') {\n array_shift($namespaceParts);\n }\n\n if (strtolower($namespaceParts[0]) == 'controller') {\n array_shift($namespaceParts);\n }\n\n $controllerClassName = str_replace('Controller', '', $controllerClassName);\n\n return\n $this->getTemplateDir() . implode(DIRECTORY_SEPARATOR, [\n '',\n 'Templates',\n implode('\\\\', $namespaceParts),\n ucfirst($controllerClassName),\n ucfirst($this->request->getControllerActionName())\n ]) . '.phtml';\n }", "protected function filename()\n {\n return 'emailtemplate_' . time();\n }", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "public function getName()\n {\n return $this->view;\n }", "public function getName()\n {\n return $this->view;\n }", "public function getTemplateName() {\n\t\treturn 'uitypes/Tree.tpl';\n\t}", "protected function getTemplate()\r\n {\r\n $request = Registry::getInstance()->get('Request');\r\n\r\n return implode(\r\n DIRECTORY_SEPARATOR,\r\n array(\r\n APPLICATION_PATH,\r\n $this->templatePath,\r\n $request->getControllerName(),\r\n $request->getActionName() . $this->templateExtention\r\n )\r\n );\r\n }", "public function template($var = null): string\n {\n return $this->loadHeaderProperty(\n 'template',\n $var,\n function ($value) {\n return trim($value ?? (($this->isModule() ? 'modular/' : '') . str_replace($this->extension(), '', $this->name())));\n }\n );\n }", "public function getJsTemplateName()\n {\n return addcslashes($this->getModel()->getTemplateCode(), \"\\\"\\r\\n\\\\\");\n }", "public static function getTemplateName($mailerId)\n\t{\n\t\t$templateName = $mailerId.\".html\";\n\t\treturn $templateName;\n\t}", "public function template()\n {\n if ($this->template === null) {\n return 'charcoal/app/handler/layout';\n }\n\n return $this->template;\n }", "public function buildFileName()\n {\n $twig = $this->container->get('twig');\n $globals = $twig->getGlobals();\n return $globals['fullName'].'-Resume.';\n }", "function get_template_name( $instance ) {\n\t\treturn $instance['tpl'] ? $instance['tpl'] : 'base';\n\t}", "public static function label()\n {\n return __('Templates');\n }", "public function getSlug() : string\n {\n return 'template';\n }", "function dt_get_template_name( $post_id = 0, $force_in_loop = false ) {\n\tglobal $post;\n\n\t// work in admin\n\tif ( is_admin() && !$force_in_loop ) {\n\n\t\tif ( isset($_GET['post']) ) {\n\n\t\t\t$post_id = $_GET['post'];\n\t\t} elseif( isset($_POST['post_ID']) ) {\n\n\t\t\t$post_id = $_POST['post_ID'];\n\t\t}\n\t}\n\n\t// work in the loop\n\tif ( !$post_id && isset($post->ID) ) {\n\t\t$post_id = $post->ID;\n\t}\n\n\treturn get_post_meta( absint($post_id), '_wp_page_template', true );\n}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "public function getControlTemplateUID()\n {\n return $this->name.'_TPL_UID';\n }", "public function getTemplateName()\n\t{\n\t\treturn 'Edit/Field/Number.tpl';\n\t}", "public static function singularLabel()\n {\n return __('Template');\n }", "public function get_chosen_template_name($template) {\n\t\treturn self::$template = $template;\n\t}", "public function name() {\n\t\t// @version 1.2.0 Use filename then fallback to path\n\t\t$path = $this->data('name') ?: $this->path();\n\n\t\treturn pathinfo($path, PATHINFO_FILENAME);\n\t}", "public function getTemplateSlug(): string;", "protected function getTemplatePathAndFilename() {}", "public function getTemplateId() : string {\n return $this->templateId;\n }", "protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}", "public function FormName()\n {\n return $this->getTemplateHelper()->generateFormID($this);\n }", "function get_template_name( $instance ) {\n if ( !empty( $instance['layout'] ) ) {\n return $instance['layout'];\n } else {\n return 'base';\n }\n }", "public function getFormTemplate(): string\n {\n return static::FORM_TEMPLATE;\n }", "function get_template_name( $instance ) {\n return 'yc-headline';\n }", "public function getName()\n {\n // TODO: Implement getName() method.\n return \"troiswa_back.twig_extension\";\n }", "protected function getName()\n {\n return $this->slimInstance->router()->getCurrentRoute()->getName();\n }", "public function getName() {\n\t\treturn $this->current_name;\n\t}", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "public function name($var = null): string\n {\n return $this->loadProperty(\n 'name',\n $var,\n function ($value) {\n $value = $value ?? $this->getMetaData()['template'] ?? 'default';\n if (!preg_match('/\\.md$/', $value)) {\n $language = $this->language();\n if ($language) {\n // TODO: better language support\n $value .= \".{$language}\";\n }\n $value .= '.md';\n }\n $value = preg_replace('|^modular/|', '', $value);\n\n $this->unsetProperty('template');\n\n return $value;\n }\n );\n }", "public function getPaymentPageTemplateName($scopeId = null)\n {\n return $this->getValue(\n self::XML_PATH_PAYMENT_PAGE_TEMPLATE_NAME,\n ScopeInterface::SCOPE_STORE,\n $scopeId\n );\n }", "public static function getTemplate() {\n $settings = self::getSettings();\n \n return $settings->template;\n }", "public function getTemplatefile()\n\t{\n\t\treturn $this->templatefile;\n\t}", "public static function getTemplateSymbol()\n {\n return self::$_templateSymbol;\n }", "function store_email_template_name($name)\n {\n if (in_array($name, array('order_confirmation'))) {\n return lang('store.email.'.$name);\n }\n\n return $name;\n }", "public function resolveTemplateName($name);", "public function getName()\n\t{\n\t\treturn str_replace(\".{$this->getExtension()}\", '', $this->path);\n\t}", "public function getName(){\n if ($this->file)\n return $this->file->getName();\n }", "protected function template() {\n\t\treturn '';\n\t}", "public function getTemplateUrl() {\n\t\t\t\n\t\t\treturn DMURL::getCurrentBaseUrl() . 'templates/' . $this->_template;\n\t\t\t\n\t\t}", "public function getOutputName()\n {\n\n $ext_pos = strrpos($this->getName(), '.');\n if ($ext_pos === false) {\n throw new SiteBuilderException('Unexpected filename; must have file extension');\n }\n $filename = substr($this->getName(), 0, $ext_pos) . '.html';\n\n return $filename;\n }", "public function getTempName() {}", "public function getTName()\n {\n return $this->t_name;\n }", "public function getTemplate() {}", "public function path()\n {\n try {\n return ($this->engine->getResolveTemplatePath())($this->name);\n } catch (TemplateNotFound $e) {\n return $e->paths()[0];\n }\n }", "public function getName()\n\t{\n\t\tglobal $langs;\n\n\t\treturn $langs->trans('File');\n\t}", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }" ]
[ "0.88440555", "0.87645316", "0.83950526", "0.82461864", "0.807059", "0.8060452", "0.80052334", "0.7985286", "0.7967164", "0.79210424", "0.7807803", "0.7805273", "0.7744384", "0.7718529", "0.7608556", "0.76039517", "0.74488753", "0.7432413", "0.7415514", "0.73819846", "0.734269", "0.7322566", "0.73175067", "0.7280291", "0.72665787", "0.72520226", "0.71928215", "0.71680015", "0.71221113", "0.7098281", "0.7084565", "0.6946972", "0.6920715", "0.69198173", "0.690863", "0.69023365", "0.69023365", "0.69023365", "0.69023365", "0.6900522", "0.6877758", "0.6869961", "0.6858969", "0.6858969", "0.6853541", "0.6848854", "0.6833458", "0.6827043", "0.6815346", "0.68053395", "0.67893386", "0.67848855", "0.6770189", "0.67622703", "0.6759246", "0.6754307", "0.6754307", "0.67483956", "0.67437315", "0.6741365", "0.67334986", "0.67316025", "0.6696473", "0.6687772", "0.66594154", "0.66573673", "0.66531026", "0.6607381", "0.6607019", "0.6584895", "0.6558955", "0.65486366", "0.65092736", "0.6500677", "0.64958966", "0.64942", "0.64930505", "0.64929235", "0.6492024", "0.64849776", "0.6475544", "0.64658207", "0.64651996", "0.6462484", "0.64549285", "0.64537495", "0.645358", "0.644528", "0.6441372", "0.64406025", "0.64373106", "0.6431914", "0.6431914", "0.6431914", "0.6431914", "0.6431914", "0.6431914", "0.6431914", "0.6431914", "0.6431914" ]
0.7169491
27
Adiciona dois arquivos com o mesmo nome ao template alterando o tipo (js e css) Exemplos: bwHtml::js2css('contato'); bwHtml::js2css('ie8', 'ie < 9'); bwHtml::js2css('chrome', 'chrome'); bwHtml::js2css('
function js2css($url, $condition = false) { bwHtml::js($url . '.js', $condition); bwHtml::css($url . '.css', $condition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function css($arquivo);", "function addExtraAssets()\n\t{\n\t\t$base = JURI::base(true);\n\t\t$regurl = '#(http|https)://([a-zA-Z0-9.]|%[0-9A-Za-z]|/|:[0-9]?)*#iu';\n\n\t\tforeach (array(T3_PATH, T3_TEMPLATE_PATH) as $bpath) {\n\t\t\t//full path\n\t\t\t$afile = $bpath . '/etc/assets.xml';\n\t\t\tif (is_file($afile)) {\n\n\t\t\t\t//load xml\n\t\t\t\t$axml = JFactory::getXML($afile);\n\n\t\t\t\t//process if exist\n\t\t\t\tif ($axml) {\n\t\t\t\t\tforeach ($axml as $node => $nodevalue) {\n\t\t\t\t\t\t//ignore others node\n\t\t\t\t\t\tif ($node == 'stylesheets' || $node == 'scripts') {\n\t\t\t\t\t\t\tforeach ($nodevalue->file as $file) {\n\t\t\t\t\t\t\t\t$compatible = $file['compatible'];\n\t\t\t\t\t\t\t\tif ($compatible) {\n\t\t\t\t\t\t\t\t\t$parts = explode(' ', $compatible);\n\t\t\t\t\t\t\t\t\t$operator = '='; //exact equal to\n\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\tif (count($parts) == 2) {\n\t\t\t\t\t\t\t\t\t\t$operator = $parts[0];\n\t\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//compare with Joomla version\n\t\t\t\t\t\t\t\t\tif (!version_compare(JVERSION, $operand, $operator)) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\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\t$url = (string)$file;\n\t\t\t\t\t\t\t\tif (substr($url, 0, 2) == '//') { //external link\n\n\t\t\t\t\t\t\t\t} else if ($url[0] == '/') { //absolute link from based folder\n\t\t\t\t\t\t\t\t\t$url = is_file(JPATH_ROOT . $url) ? $base . $url : false;\n\t\t\t\t\t\t\t\t} else if (!preg_match($regurl, $url)) { //not match a full url -> sure internal link\n\t\t\t\t\t\t\t\t\t$url = T3Path::getUrl($url); // so get it\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($url) {\n\t\t\t\t\t\t\t\t\tif ($node == 'stylesheets') {\n\t\t\t\t\t\t\t\t\t\t$this->addStylesheet($url);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->addScript($url);\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}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// template extended styles\n\t\t$aparams = $this->_tpl->params->toArray();\n\t\t$extras = array();\n\t\t$itemid = JFactory::getApplication()->input->get ('Itemid');\n\t\tforeach ($aparams as $name => $value) {\n\t\t\tif (preg_match ('/^theme_extras_(.+)$/', $name, $m)) {\n\t\t\t\t$extras[$m[1]] = $value;\n\t\t\t}\n\t\t}\n\t\tif (count ($extras)) {\n\t\t\tforeach ($extras as $extra => $pages) {\n\t\t\t\tif (!is_array($pages) || !count($pages) || in_array (0, $pages)) {\n\t\t\t\t\tcontinue; // disabled\n\t\t\t\t}\n\t\t\t\tif (in_array (-1, $pages) || in_array($itemid, $pages)) {\n\t\t\t\t\t// load this style\n\t\t\t\t\t$this->addCss ('extras/'.$extra);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function tm_regenerate_all_css_js(){\n\t\n\t/* ----- Now regenerating CSS files ----- */\n\t\n\t// Getting all CSS files in /css/ directory.\n\t$css_dir = get_template_directory().'/css/';\n\t$css_files = scandir($css_dir);\n\t\n\t// Fontiocn Library\n\t$ficon_css_dir = get_template_directory().'/css/fonticon-library/';\n\t$ficon_css_list = scandir($ficon_css_dir);\n\t\n\t$css_array = array();\n\t$css_array[get_template_directory().'/style.css'] = get_template_directory().'/style.min.css'; // style.css\n\t$css_array[get_template_directory().'/rtl.css'] = get_template_directory().'/rtl.min.css'; // rtl.css\n\t$css_array[get_template_directory().'/style-login.css'] = get_template_directory().'/style-login.min.css'; // style-login.css\n\t\n\tforeach($css_files as $css){\n\t\tif ($css != \".\" && $css != \"..\" && substr($css, -4)=='.css' && substr($css, -8)!='.min.css' ) {\n\t\t\t$newfileame = str_replace('.css','.min.css',$css);\n\t\t\t$currentfile = $css_dir.$css;\n\t\t\t$newfile = $css_dir.$newfileame;\n\t\t\t$css_array[$currentfile] = $newfile;\n\t\t}\n\t}\n\t\n\tforeach($ficon_css_list as $library){\n\t\tif ($library != \".\" && $library != \"..\" && is_dir($ficon_css_dir.$library) ) {\n\t\t\t$currentfile = $ficon_css_dir.$library.'/css/thememount-'.$library.'.css';\n\t\t\t$newfile = $ficon_css_dir.$library.'/css/thememount-'.$library.'.min.css';\n\t\t\t$css_array[$currentfile] = $newfile;\n\t\t}\n\t}\n\t\n\t// processing all CSS fles\n\ttm_minifier('css',$css_array);\n\t\n\t\n\t\n\t/* ----- Now regenerating JS files ----- */\n\n\t// Getting all JS files in /js/ directory.\n\t$js_dir = get_template_directory().'/js/';\n\t$js_files = scandir($js_dir);\n\t$js_array = array();\n\tforeach($js_files as $js){\n\t\tif ($js != \".\" && $js != \"..\" && substr($js, -3)=='.js' && substr($js, -7)!='.min.js' ) {\n\t\t\t$newfileame = str_replace('.js','.min.js',$js);\n\t\t\t$currentfile = $js_dir.$js;\n\t\t\t$newfile = $js_dir.$newfileame;\n\t\t\t$js_array[$currentfile] = $newfile;\n\t\t}\n\t}\n\t\n\t// Now processing the files\n\ttm_minifier('js',$js_array);\n\t\n\t\n\t\n\t\n}", "public function getCssJsHtml()\n {\n $lines = array();\n foreach ($this->_data['items'] as $item) {\n if (!is_null($item['cond']) && !$this->getData($item['cond']) || !isset($item['name'])) {\n continue;\n }\n $if = !empty($item['if']) ? $item['if'] : '';\n $params = !empty($item['params']) ? $item['params'] : '';\n switch ($item['type']) {\n case 'js': // js/*.js\n case 'skin_js': // skin/*/*.js\n case 'js_css': // js/*.css\n case 'skin_css': // skin/*/*.css\n $lines[$if][$item['type']][$params][$item['name']] = $item['name'];\n break;\n default:\n $this->_separateOtherHtmlHeadElements($lines, $if, $item['type'], $params, $item['name'], $item);\n break;\n }\n }\n\n // prepare HTML\n $shouldMergeJs = Mage::getStoreConfigFlag('dev/js/merge_files');\n $shouldMergeCss = Mage::getStoreConfigFlag('dev/css/merge_css_files');\n\n $html = '';\n foreach ($lines as $if => $items) {\n if (empty($items)) {\n continue;\n }\n if (!empty($if)) {\n // open !IE conditional using raw value\n if (strpos($if, \"><!-->\") !== false) {\n $html .= $if . \"\\n\";\n } else {\n $html .= '<!--[if '.$if.']>' . \"\\n\";\n }\n }\n\n if(Mage::getStoreConfigFlag('stylecss/critical_path/enable') && Mage::getStoreConfigFlag('dev/css/merge_css_files') && !Mage::app()->getStore()->isAdmin() && !empty($items['skin_css'])) {\n // after CriticalPathCSS\n $html .= $this->_prepareStaticAndSkinElements(\"<script>var cb = function() {\n var l = document.createElement('link'); l.rel = 'stylesheet';\n l.href = '%s';\n var h = document.getElementsByTagName('head')[0];\n var s = document.getElementById('custom-styles');\n if(s) {h.insertBefore(l, s);} else {h.appendChild(l, h);}\n };\n var raf = requestAnimationFrame || mozRequestAnimationFrame ||\n webkitRequestAnimationFrame || msRequestAnimationFrame;\n if (raf) raf(cb);\n else window.addEventListener('load', cb);</script>\".\"\\n\",\n empty($items['js_css']) ? array() : $items['js_css'],\n empty($items['skin_css']) ? array() : $items['skin_css'],\n $shouldMergeCss ? array(Mage::getDesign(), 'getMergedCssUrl') : null\n );\n } else {\n // static and skin css\n $html .= $this->_prepareStaticAndSkinElements('<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\"%s />'.\"\\n\",\n empty($items['js_css']) ? array() : $items['js_css'],\n empty($items['skin_css']) ? array() : $items['skin_css'],\n $shouldMergeCss ? array(Mage::getDesign(), 'getMergedCssUrl') : null\n ); \n }\n\n // static and skin javascripts\n $html .= $this->_prepareStaticAndSkinElements('<script type=\"text/javascript\" src=\"%s\"%s></script>' . \"\\n\",\n empty($items['js']) ? array() : $items['js'],\n empty($items['skin_js']) ? array() : $items['skin_js'],\n $shouldMergeJs ? array(Mage::getDesign(), 'getMergedJsUrl') : null\n );\n\n // other stuff\n if (!empty($items['other'])) {\n $html .= $this->_prepareOtherHtmlHeadElements($items['other']) . \"\\n\";\n }\n\n if (!empty($if)) {\n // close !IE conditional comments correctly\n if (strpos($if, \"><!-->\") !== false) {\n $html .= '<!--<![endif]-->' . \"\\n\";\n } else {\n $html .= '<![endif]-->' . \"\\n\";\n }\n }\n }\n return $html;\n }", "function minimize_code($obj, $codetype='javascript')\n{\n\tif($codetype == 'javascript')\n\t{\n\t\t$obj->load->library(\"jsmin\");\n\t\n\t\t$combined_file_name = HOME_URL.\"js/combined.js\"; \n\t\tif (!MINIFY_JS) {\n\t\t\t// remove the combined JS file so that it can be regenerated \n\t\t\tunlink($combined_file_name); \n\t\t} \n\t\tif (!file_exists($combined_file_name)) {\n\t\t\t$files = glob(HOME_URL.\"js/*.js\");\n\t\t\t$js = \"\";\n\t\t\t\n\t\t\tforeach($files AS $file) \n\t\t\t{\n\t\t\t\tif(strpos($file, 'easyui') == FALSE && strpos($file, '.min.') == FALSE && strpos($file, '.datepick.') == FALSE){\n\t\t\t\t\tif (MINIFY_JS) {\n\t\t\t\t\t\t$js .= JSMin::minify(file_get_contents($file));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$js .= file_get_contents($file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile_put_contents($combined_file_name, $js);\n\t\t} \n\t\treturn \"<script type='text/javascript' src='\".base_url().\"js/combined.js'></script>\";\n\t\n\t} \n\telse if($codetype == 'stylesheets')\n\t{\n\t\t\n\t\t$obj->load->library(\"xmlrpc\");\n\t\t\n\t\t$obj->load->library(\"cssmin\");\n\t\t\n\t\t$combined_file_name = HOME_URL.\"css/combined.css\"; \n\t\tif (!MINIFY_JS) {\n\t\t\t// remove the combined JS file so that it can be regenerated \n\t\t\tunlink($combined_file_name); \n\t\t}\n\t\t\n\t\tif (!file_exists($combined_file_name)) \n\t\t{\n\t\t\t$files = glob(HOME_URL.\"css/*.css\");\n\t\t\t$css = \"\";\n\t\t\n\t\t\t\t\t\n\t\t\tforeach($files as $file) \n\t\t\t{\n\t\t\t\tif(strpos($file, 'easyui') == FALSE && strpos($file, '.min.') == FALSE && strpos($file, '.datepick.') == FALSE)\n\t\t\t\t{\n\t\t\t\t\tif (MINIFY_JS)\n\t\t\t\t\t{\n\t\t\t\t\t\t$css .= CssMin::minify(file_get_contents($file));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$css .= file_get_contents($file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfile_put_contents($combined_file_name, $css);\n\t\t} \n\t\t\n\t\treturn \"<link href='\".base_url().\"css/combined.css' rel='stylesheet' type='text/css' />\";\n\t}\t\n}", "protected function _setTemplateAssets(){\n $styles = array_merge($this->config[($this->is_mobile ? 'mobile_': '' ).'styles'], $this->{($this->is_mobile ? 'mobile_': '' ).'styles'});\n $scripts= array_merge($this->config[($this->is_mobile ? 'mobile_': '' ).'scripts'], $this->{($this->is_mobile ? 'mobile_': '' ).'scripts'});\n foreach($styles as $_style)\n AssetsManager::instance()->addStyle($_style);\n foreach($scripts as $_script)\n AssetsManager::instance()->addScript($_script);\n $this->template->styles = AssetsManager::instance()->getStyles();\n $this->template->scripts = AssetsManager::instance()->getScripts();\n }", "static function createJSList()\n {\n $result=\"\";\n if(!empty(self::$arr_js_list))\n foreach (self::$arr_js_list as $js_file => $file_location)\n {\n if ($file_location == \"common\")\n $result.='<script type=\"text/javascript\" src=\"js/'.$js_file.'.js\"> </script>';\n elseif ($file_location == \"component\")\n $result.='<script type=\"text/javascript\" src=\"components/'.$js_file.'/js/'.$js_file.'.js\"> </script>';\n }\n\n self::putData(\"js_list\",$result,\"L\");\n self::$js_list = $result;\n }", "static function getArchivoCss($template) {\r\n\r\n $archivoTemplate = str_replace('html', 'css', $template);\r\n\r\n if (!file_exists($_SESSION['theme'] . '/modules/' . $archivoTemplate)) {\r\n $aux = explode(\"/\", $archivoTemplate);\r\n $modulo = $aux[0];\r\n $archivoTemplate = (!file_exists(\"{$_SESSION['theme']}/modules/{$modulo}/index.css.twig\")) ?\r\n \"_global/css.twig\" :\r\n \"{$modulo}/index.css.twig\";\r\n }\r\n\r\n return $archivoTemplate;\r\n }", "function add_css_js()\n\t{\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\tdefine('CSS_JS_PARSED', true);\n\t\t}\n\n\t\t// Include custom CSS from templates/CURRENT_TPL folder\n\t\tif(is_array($this->css_style_include) && !empty($this->css_style_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_style_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_style_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_style_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom CSS from templates/common folder\n\t\tif(is_array($this->css_include) && !empty($this->css_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom JS from templates/common folder\n\t\tif(is_array($this->js_include) && !empty($this->js_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->js_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('js_include', array(\n\t\t\t\t\t'JS_FILE' => $this->js_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "protected function renderJavaScriptAndCss() {}", "function filets_sep_installe_dist() {\n//cs_log('filets_sep_installe_dist()');\n\tinclude_spip('inc/texte');\n\t// Tester si on echappe en span ou en div\n\t$mode = preg_match(',<('._BALISES_BLOCS.'|p)(\\W|$),iS', _FILETS_SEP_BALISE_DEBUT)?'div':'span';\n\t$bt = defined('_DIR_PLUGIN_PORTE_PLUME');\n\t$filets = array();\n\t// filets numeriques\n\tfor($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++) {\n\t\t$filets[6][] = $i;\n\t\t$filets[1][\"$i\"] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class='filet_sep filet_sep_$i'\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t}\n\t// filets image\t\n\t$path = find_in_path('img/filets');\n\t$dossier = opendir($path);\n\tif($path) while ($image = readdir($dossier)) {\n\t\tif (preg_match(',^(([a-z0-9_-]+)'._FILETS_REG_EXT.'),', $image, $reg)) {\n\t\t\t$filets[0][] = '__'.$reg[1].'__';\n\t\t\t$filets[6][] = preg_quote($reg[1]);\n\t\t\t$filets[2][] = $reg[2];\n\t\t\tlist(,$haut) = @getimagesize($path.'/'.$reg[1]);\n\t\t\tif ($haut) $haut=\"height:{$haut}px;\";\n\t\t\t$f = url_absolue($path).'/'.$reg[1];\n\t\t\t$filets[1][$reg[1]] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class=\\\"filet_sep filet_sep_image\\\" style=\\\"$haut background-image: url($f);\\\"\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t\t\tif($bt)\n\t\t\t\t$filets[4]['filet_'.str_replace('.','_',$reg[1])] = $reg[1];\n\t\t}\n\t}\n\t// RegExpr finale\n\t$filets[6] = _FILETS_REG_DEBUT . join('|', $filets[6]) . _FILETS_REG_FIN;\n\tif($bt) for($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++)\n\t\t$filets[5]['filet_'.$i] = $i;\n\treturn array($filets);\n}", "function _creative_include_layout_additional_assets($file_name) {\n foreach (array('css', 'js') as $type) {\n $file_relative_path = CREATIVE_THEME_PATH . \"/$type/includes/$file_name.$type\";\n\n if (file_exists(DRUPAL_ROOT . '/' . $file_relative_path)) {\n call_user_func(\"drupal_add_$type\", $file_relative_path, array(\n 'group' => constant(strtoupper($type) . '_THEME'),\n ));\n }\n }\n}", "public function addJavascriptFiles($js /* array */);", "static function getArchivoJs($template) {\r\n\r\n $archivoTemplate = str_replace('html', 'js', $template);\r\n\r\n if (!file_exists($_SESSION['theme'] . '/modules/' . $archivoTemplate)) {\r\n $aux = explode(\"/\", $archivoTemplate);\r\n $modulo = $aux[0];\r\n $archivoTemplate = (!file_exists(\"{$_SESSION['theme']}/modules/{$modulo}/index.js.twig\")) ?\r\n \"_global/js.twig\" :\r\n \"{$modulo}/index.js.twig\";\r\n }\r\n\r\n return $archivoTemplate;\r\n }", "function jsuni($name)\n{\n\t$jsbegin = '<script type=\"text/javascript\" src=\"';\n\t$jsend = '\"></script>';\n\tif (current_user_can('administrator')) $jspath = '/js/';\n\telse $jspath = '/js/'; //$jspath='/js/';\n\t$filename = get_stylesheet_directory() . $jspath . $name;\n\tif (file_exists($filename)) return $jsbegin . get_template_directory_uri() . $jspath . $name . '?v=' . filemtime($filename) . $jsend;\n\treturn $jsbegin . get_template_directory_uri() . $jspath . $name . $jsend;\n}", "private function register_files() {\n\t\tif( $this->type === self::STYLE ) {\n\t\t\twp_register_style( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['media'] );\n\t\t} else if ( $this->type === self::SCRIPT ) {\n\t\t\twp_register_script( $this->handle, $this->src, $this->settings['deps'], $this->settings['vers'], $this->settings['in_footer'] );\n\t\t}\n\t}", "function GetStylesheetes()\n{\n $isMobile = check_user_agent('mobile') === false && @$_GET['screen'] != 'mobile' ? false :true;\n $append = $isMobile ? '.mobile.css':'.css';\n $stylesheets = GetTheDataArray(array('theme','stylesheet'));\n $returnData = '';\n foreach($stylesheets as $key => $style)\n {\n $file = '';\n if($key == 'core') {\n //include core stylesheet and decide if mobile stylesheet should be used\n if(check_user_agent('mobile') === false && @$_GET['screen'] != 'mobile')\n {\n $style = $style['primary'];\n\n } else {\n $style = $style['mobile'];\n\n }\n\n $httpFile = base_url().'theme/'.THEMESELECTED.'/css/'.$style;\n $file = THEMEPATH.THEMESELECTED.'/css/'.$style;\n //including files from project data css folder configured in projectconfig.php\n } elseif($key == 'include'){\n foreach($style as $st)\n {\n $httpFile = base_url().'project/'.PROJECT.'/data/css/'.$st.$append;\n $file = PROJECTROOT.PROJECT.'/data/css/'.$st.$append;\n }\n\n }\n\n if(file_exists($file))\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.$httpFile.'\"/>';\n }\n\n }\n //adding include files depending on what device is being used\n foreach($stylesheets['core']['includes'] as $includes)\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.base_url().'theme/'.THEMESELECTED.'/css/includes/'.$includes.$append.'\"/>';\n }\n //adding animation files\n if(iteraxcontroller::Instance()->it->data['theme']['animations'] === true)\n {\n foreach($stylesheets['animations'] as $includes)\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.base_url().'theme/'.THEMESELECTED.'/css/animation/'.$includes.'\"/>';\n }\n }\n\n\n return $returnData;\n}", "protected function addSystemCssJs()\n\t{\n\t\tglobal $cWebPath;\n\t\t\t\t\n\t\t$this->mStyles[] = $cWebPath . '/style/mainstyle.css';\n\t\t$this->mStyles[] = $cWebPath . '/style/svwp_style.css';\n\t\t\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.slideViewerPro.1.5.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/jquery.timers-1.2.js';\n\t\t$this->mScripts[] = $cWebPath . '/scripts/imageslider.js';\n\t}", "public function getCompressCss() {}", "protected function createJavaScriptLanguageLabelsFromFiles() {}", "function _getCSSscripts(&$scriptList, $filenames)\n\t{\n\t\tclearstatcache();\n\t\t$cssfile_path = JPATH_SITE.DS.\"components\".DS.\"com_jbolo\".DS.\"css\".DS.\"jbolocss.php\";\n\t\t//combine and minify css\n\n\t\t//echo $this->params->get('comb_mini');\n\t\t//var_dump(is_writable($cssfile_path)); die;\n\n\t\tif($this->params->get('comb_mini') && is_writable($cssfile_path))\n\t\t{\n\n\t\t\t//$sitepath=JPATH_SITE;\n\t\t\t$sitepath=JPATH_SITE.'/';\n\t\t\tforeach($filenames as $file){\n\t\t\t\t//$css_script[]=\"include('\".$sitepath.\"/components/com_jbolo/css/\".$file.\"');\";\n\t\t\t\t$css_script[]=\"include('\".$sitepath.$file.\"');\";\n\t\t\t}\n\t\t\t$css_script=implode(\"\\n\",$css_script);\n\t\t\t$cssfile_path=JPATH_SITE.DS.\"components\".DS.\"com_jbolo\".DS.\"css\".DS.\"jbolocss.php\";\n\t\t\t$cssgzip='header(\"Content-type: text/css\");\n\t\t\t\tob_start(\"compress\");\n\t\t\t\tfunction compress($buffer){\n\t\t\t\t\t/* remove comments */\n\t\t\t\t\t$buffer = preg_replace(\"!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!\", \"\", $buffer);\n\t\t\t\t\t/* remove tabs, spaces, newlines, etc. */\n\t\t\t\t\t$buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", \" \", \" \", \" \"), \"\", $buffer);\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}';\n\n\t\t\t$data=\"<?php \".$cssgzip .\"\\n\".$css_script.\"\\n ob_end_flush();?>\";\n\t\t\tif(JFile::write($cssfile_path, $data)){\n\t\t\t\t$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().'components/com_jbolo/css/jbolocss.php\" type=\"text/css\" />';\n\t\t\t}\n\t\t\telse{\n\t\t\t\tforeach($filenames as $file){\n\t\t\t\t\t//$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().'components/com_jbolo/css/'.$file.'\" type=\"text/css\" />';\n\t\t\t\t\t$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().$file.'\" type=\"text/css\" />';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tforeach($filenames as $file){\n\t\t\t\t//$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().'components/com_jbolo/css/'.$file.'\" type=\"text/css\" />';\n\t\t\t\t$scriptList[]='<link rel=\"stylesheet\" href=\"'.JURI::root().$file.'\" type=\"text/css\" />';\n\t\t\t}\n\t\t}\n\t\t//die(\"hrr\");\n\t}", "protected function appendLanguageFiles()\n {\n $language = \\Yii::$app->language;\n $sourceLanguage = \\Yii::$app->sourceLanguage;\n\n if ($language != $sourceLanguage) {\n $this->js[] = \"i18n/jquery.colorbox-$language.js\";\n }\n }", "protected function doCompressCss() {}", "function allLoadJs($path){\n \n $diretorio = dir($path);\n\n while($arquivo = $diretorio -> read()){\n //verifica apenas as extenções do css \n if(strpos($arquivo, '.js')!==FALSE)\n echo (\"<script src='\".BARRA.url_base.BARRA.$path.$arquivo.\"' type='text/javascript'></script>\\n\");\n }\n $diretorio -> close();\n\n }", "protected function getContentCssFileNames() {}", "function incluirCSS($arquivo){ ?>\n\t\t<link href=\"css/<?=$arquivo?>.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\t<?php }", "public function JS( $files, $type = NULL ) {\r\n\t\r\n\tif (!is_array($files)) {\r\n\t\t# Get the files from the string\r\n\t\t$files = explode(\",\", $files);\r\n\t}\r\n\t\r\n\t# Is it External or Inline ?\r\n\tswitch ($type) {\r\n\t\t\t\t\r\n\t\t# External = CACHE\r\n\t\tcase 'external':\r\n\t\t\tforeach ($files as $js) {\r\n\t\t\t\tif (config ( 'development' )) {\r\n\t\t\t\t\tif (! file_exists ( \"www-static\" . DS . \"assets\" . DS . \"js\" . DS . $js . \".js\" )) {\r\n\t\t\t\t\t\tthrow new Exception ( \"No such file as $js.js\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$fullpath = \"/www-static\" . DS . \"assets\" . DS . \"js\" . DS . $js . \".js\";\r\n\t\t\t\techo '<script type=\"text/javascript\" src=\"'.$fullpath.'\"></script>';\r\n\t\t\t}\r\n\t\tbreak;\r\n\t\t\r\n\t\t# Inline = COMPRESS\r\n\t\tdefault:\r\n\t\t\tif (config ( 'features/compress/js' )) {\r\n\t\t\t\t// See @ref #1\r\n\t\t\t\tob_start ( array ($this, 'compressorJS' ) );\r\n\t\t\t}\r\n\t\t\techo \"<script type='text/javascript'>\";\r\n\t\t\tforeach ( $files as $js ) {\r\n\t\t\t\tif (config ( 'development' )) {\r\n\t\t\t\t\tif (! file_exists ( \"www-static\" . DS . \"assets\" . DS . \"js\" . DS . $js . \".js\" )) {\r\n\t\t\t\t\t\tthrow new Exception ( \"No such file as $js.js\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trequire_once \"www-static\" . DS . \"assets\" . DS . \"js\" . DS . $js . \".js\";\r\n\t\t\t}\r\n\t\t\techo \"</script>\";\r\n\t\t\t\r\n\t\t\tif (config ( 'features/compress/js' )) {\r\n\t\t\t\tob_end_flush ();\r\n\t\t\t}\r\n\t\tbreak;\r\n\t}\t\t\r\n\r\n\t}", "function load_css($arquivo=NULL,$pasta='css',$midia='all'){\n if($arquivo!= null):\n $CI =& get_instance();\n $CI->load->helper('url');\n $retorno ='';\n if(is_array($arquivo)):\n foreach ($arquivo as $css):\n $retorno .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.base_url(\"$pasta/$css.css\").'\"media=\"'.$midia.'\"/>';\n endforeach;\n else:\n $retorno = '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.base_url(\"$pasta/$arquivo.css\").'\"media=\"'.$midia.'\"/>';\n endif;\n endif;\n return $retorno;\n\n}", "function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}", "function css()\n{\n\t$cssbegin = '<link rel=\"stylesheet\" href=\"';\n\t$cssend = '\">';\n//\tif (current_user_can('administrator')) $csspath = '/css/';\n\t$csspath = '/css/'; //$csspath='/css/';\n\t$name = substr(basename(get_page_template()), 0, -4) . '.css';\n\t$filename = get_stylesheet_directory() . $csspath . $name;\n\tif (file_exists($filename)) return $cssbegin . get_template_directory_uri() . $csspath . $name . '?v=' . filemtime($filename) . $cssend;\n\telse { //create new file if no exists\n\t\t$fp = fopen($filename, \"w\");\n\t\tfwrite($fp, 'This is new file, add your styles @media(min-width:992px){} @media(max-width:991px) and (min-width:601px){} @media(max-width:600px){}');\n\t\tfclose($fp);\n\t\treturn $cssbegin . get_template_directory_uri() . $csspath . $name . $cssend;\n\t}\n}", "function insert_resouces($resources) {\r\n foreach ($resources['css'] as $css) {\r\n echo '<link rel=\"stylesheet\" href=\"'. $css .'\">';\r\n }\r\n foreach ($resources['js'] as $js) {\r\n echo '<script src=\"'. $js .'\"></script>';\r\n }\r\n }", "function links_insert_head_css($flux) {\r\n\t$links = links_configuration();\r\n\r\n\t//Styles\r\n\tif($links['style'] == 'on'){\r\n\t\t$flux .= '<link rel=\"stylesheet\" href=\"'.find_in_path('css/links.css').'\" type=\"text/css\" media=\"all\" />';\r\n\t}\r\n\t//Ouverture d'une nouvelle fenetre : insertion des init js inline, en amont des CSS (perf issue)\r\n\tif($links['window'] == 'on'){\r\n\t\t$js = 'var js_nouvelle_fenetre=\\''._T('links:js_nouvelle_fenetre').'\\';';\r\n\t\t//Ouverture dune nouvelel fenetre sur les liens externes\r\n\t\tif($links['external'] == 'on'){\r\n\t\t\t// quand un site fait du multidomaine on prend en reference le domaine de la page concernee :\r\n\t\t\t// sur www.example.org : autre.example.org est external\r\n\t\t\t// sur autre.example.org : www.example.org est external\r\n\t\t\t// sur un site mono-domaine ca ne change rien :)\r\n\t\t\t// ca marche parce que le cache change quand le HTTP_HOST change (donc quand le domaine change)\r\n\t\t\t$js .= 'var links_site = \\'' . protocole_implicite(url_de_base()) . '\\';';\r\n\t\t}\r\n\t\t//Ouverture d'une nouvelle fenetre sur les documents (extensions a preciser)\r\n\t\tif(($links['download'] == 'on')&&($links['doc_list'])){\r\n\t\t\t$js .= 'var links_doc = \\''.$links['doc_list'].'\\';';\r\n\t\t}\r\n\t\t$flux = '<script type=\"text/javascript\">'.$js.'</script>' . \"\\n\" . $flux;\r\n\t}\r\n\r\n\treturn $flux;\r\n}", "function import_front_end($import_type, $imports)\n{\n\n foreach ($imports as $key => $import) {\n switch ($import_type) {\n case 'css':\n drupal_add_css($import['path'], $import['options']);\n break;\n case 'js_inline':\n case 'js':\n drupal_add_js($import['path'], $import['options']);\n break;\n }\n }\n\n\n}", "protected function generateCSS() {}", "public function js_css_public(){\n\n wp_enqueue_style('asRange', plugin_dir_url(__FILE__). 'libs/assets/css/asRange.min.css', false, $this->version());\n wp_enqueue_style('select2', plugin_dir_url(__FILE__). 'libs/assets/css/select2.min.css', false, $this->version());\n wp_enqueue_style('flatpickr', plugin_dir_url(__FILE__). 'libs/assets/css/flatpickr.min.css', false, $this->version());\n wp_enqueue_style('metform-ui', plugin_dir_url(__FILE__). 'libs/assets/css/metform-ui.css', false, $this->version());\n wp_enqueue_style('font-awesome', plugin_dir_url(__FILE__). 'libs/assets/css/font-awesome.min.css', false, $this->version());\n wp_enqueue_style('metform-style', plugin_dir_url(__FILE__). 'libs/assets/css/style.css', false, $this->version());\n \n wp_enqueue_script('asRange', plugin_dir_url(__FILE__) . 'libs/assets/js/jquery-asRange.min.js', array(), $this->version(), true);\n wp_enqueue_script('select2', plugin_dir_url(__FILE__) . 'libs/assets/js/select2.min.js', array(), $this->version(), true);\n wp_enqueue_script('flatpickr', plugin_dir_url(__FILE__) . 'libs/assets/js/flatpickr.js', array(), $this->version(), true);\n \n wp_register_script('recaptcha', 'https://www.google.com/recaptcha/api.js?onload=onloadMetFormCallback&render=explicit', array(), $this->version(), true);\n wp_enqueue_script('metform-submission', plugin_dir_url(__FILE__) . 'libs/assets/js/submission.js', array(), $this->version(), true);\n \n\n }", "function add_css($acss=array()) {\n\t\tforeach ($acss as $css) {\n\t\t\tif (isset($css[\"path\"]) && $css[\"path\"]!=\"\") {\n\t\t\t\t$priority = 0;\n\t\t\t\tif (isset($css[\"priority\"])) {\n\t\t\t\t\t$priority = $css[\"priority\"];\n\t\t\t\t}\n\t\t\t\t$condition = \"\";\n\t\t\t\tif (isset($css[\"condition\"])) {\n\t\t\t\t\t$condition = $css[\"condition\"];\n\t\t\t\t}\n\t\t\t\t$is_local = true;\n\t\t\t\tif (isset($css[\"is_local\"])) {\n\t\t\t\t\t$is_local = $css[\"is_local\"];\n\t\t\t\t}\n\t\t\t\t$this->custom_css[] = array(\"css\" => $css[\"path\"], \"priority\" => $priority, \"condition\" => $condition, \"is_local\" => $is_local);\n\t\t\t}\n\t\t}\n\t}", "function incluirJS($arquivo){ ?>\n\t\t<script src=\"js/<?=$arquivo?>.js\" type=\"text/javascript\"></script>\n\t<?php }", "function addCSSFiles()\n\t{\n\t\t$this->getContainer()->AddCSSFile(\"include/zoombox/zoombox.css\");\n\t}", "protected function doConcatenateCss() {}", "protected function buildCssAndRegisterIcons() {}", "public function load_scripts($data){\n if(!is_array($data)){\n $data_load['js'] = '';\n $data_load['css'] = '';\n return $data_load;\n }\n $files_js = '';\n $files_css = '';\n $url_js = base_url().'assets';\n $url_css = base_url().'assets'; \n if(!empty($data)){\n if (array_key_exists('js', $data)) { \n foreach ($data['js'] as $key => $value) {\n $js_name = ($value['name']!='') ? $value['name'] : '';\n $js_dir = ($value['dirname']!='') ? $value['dirname'].'/' : '';\n $files_js.= \"<script type='text/javascript' src='\".$url_js.'/'.$js_dir.$js_name.\".js'></script>\";\n }\n }\n if (array_key_exists('css', $data)) {\n foreach ($data['css'] as $key => $value) {\n $css_name = ($value['name']!='') ? $value['name'] : '';\n $css_dir = ($value['dirname']!='') ? $value['dirname'].'/' : '';\n $files_css.= '<link rel=\"stylesheet\" href=\"'.$url_css.'/'.$css_dir.$css_name.'.css\" type=\"text/css\" />';\n }\n } \n }\n $data_load['js'] = $files_js;\n $data_load['css'] = $files_css;\n return $data_load;\n }", "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public function css();", "function v2_mumm_include_asset($variable, $type) {\n $path = drupal_get_path('theme', 'v2_mumm');\n if ($type == 'css') {\n foreach ($variable as $key => $item) {\n drupal_add_css($path . '/css/' . $item . '.css', array(\n 'group' => CSS_THEME,\n 'type' => 'file',\n 'media' => 'screen',\n 'preprocess' => TRUE,\n 'every_page' => TRUE,\n 'group' => CSS_THEME,\n 'weight' => $key,\n ));\n }\n }\n if ($type == 'js') {\n foreach ($variable as $key => $item) {\n drupal_add_js($path . '/js/' . $item . '.js', array(\n 'type' => 'file',\n 'scope' => 'footer',\n 'group' => JS_THEME,\n 'every_page' => TRUE,\n 'preprocess' => TRUE,\n 'cache' => TRUE,\n 'weight' => $key,\n ));\n }\n }\n}", "function buildContent($lang) {\n\t// stores the textbox file names to use\n\t// NOTE: the textboxes will be created and ordered in the same order of this array\n\t$file_list = array(\"narrator_box\", \"style_box\", \"script_box\", \"about_box\");\n\n\t// stores the content to be returned\n\t$res = array(\"style\" => \"\", \"script\" => \"\");\n\n\t// loop through the file list and create the textboxes HTML\n\tfor ($i = 0; $i < count($file_list); $i++) {\n\t\t// get this file's content\n\t\t$file_content = getFileContent($file_list[$i], $lang);\n\n\t\t// check if this file has no content\n\t\tif (empty($file_content)) {\n\t\t\t// it doesn't, so skip it\n\t\t\tcontinue;\n\t\t}\n\n\t\t// standardize the line breaks used in the file's content\n\t\t$file_content = preg_replace(\"/(\\n|\\r\\n)/\", \"\\r\", $file_content);\n\n\t\t// run this file's content through the CSS color coding function\n\t\t$content_parts = addStyleTags($file_content);\n\n\t\t// store the raw CSS code (without any color coding tags)\n\t\t$res[\"style\"] .= $content_parts[\"style\"];\n\n\t\t// store the new file content, now with the CSS color coding tags\n\t\t$file_content = $content_parts[\"color_coded\"];\n\n\t\t// run this file's content through the JS color coding function\n\t\t$content_parts = addScriptTags($file_content);\n\n\t\t// store the raw JS code (without any color coding tags)\n\t\t$res[\"script\"] .= $content_parts[\"script\"];\n\n\t\t// store the new file content, now with the JS color coding tags\n\t\t$file_content = $content_parts[\"color_coded\"];\n\n\t\t// store this file's content (with color coding)\n\t\t// making sure to remove any \"goto\" tags and any \"\\r\" after it (avoiding empty lines in the final result)\n\t\t$res[$file_list[$i]] = preg_replace(\"/<goto[^>]*>\\r?/i\", \"\", $file_content);\n\n\t\t// create this file's textbox HTML\n\t\t$res[$file_list[$i]] = \"<div id='\".$file_list[$i].\"' class='content flex_item' style='order:\".$i.\";'>\n\t\t\t<div class='header header_expanded'>\n\t\t\t\t<div class='header_text'>\".strtoupper($file_list[$i]).\"</div>\n\t\t\t\t<div class='header_button hb_expanded'></div>\n\t\t\t</div>\n\t\t\t<div class='text text_expanded'>\".$res[$file_list[$i]].\"</div>\n\t\t</div>\";\n\t}\n\n\t// return the processed data\n\treturn($res);\n}", "private function _load_js_files($load = array())\n\t{\n\t\t$folder = $this->EE->config->item('use_compressed_js') == 'n' ? 'src' : 'compressed';\n\n\t\tif ( ! defined('PATH_JQUERY'))\n\t\t{\n\t\t\tdefine('PATH_JQUERY', PATH_THEMES.'javascript/'.$folder.'/jquery/');\n\t\t}\n\n\t\t$types\t= array(\n\t\t\t'effect'\t=> PATH_JQUERY.'ui/jquery.effects.',\n\t\t\t'ui'\t\t=> PATH_JQUERY.'ui/jquery.ui.',\n\t\t\t'plugin'\t=> PATH_JQUERY.'plugins/',\n\t\t\t'file'\t\t=> PATH_THEMES.'javascript/'.$folder.'/',\n\t\t\t'package'\t=> PATH_THIRD,\n\t\t\t'fp_module'\t=> PATH_MOD\n\t\t);\n\t\t\n\t\t$contents = '';\n\t\t\n\t\tforeach ($types as $type => $path)\n\t\t{\t\t\t\n\t\t\tif (isset($load[$type]))\n\t\t\t{\n\t\t\t\t// Don't load the same library twice\n\t\t\t\t$load[$type] = array_unique((array)$load[$type]);\n\n\t\t\t\t$files = $load[$type];\n\n\t\t\t\tif ( ! is_array($files))\n\t\t\t\t{\n\t\t\t\t\t$files = array( $files );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($files as $file)\n\t\t\t\t{\n\t\t\t\t\tif ($type == 'package' OR $type == 'fp_module')\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $file.'/javascript/'.$file;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($type == 'file')\n\t\t\t\t\t{\n\t\t\t\t\t\t$parts = explode('/', $file);\n\t\t\t\t\t\t$file = array();\n\n\t\t\t\t\t\tforeach ($parts as $part)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($part != '..')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$file[] = $this->EE->security->sanitize_filename($part);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$file = implode('/', $file);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->EE->security->sanitize_filename($file);\n\t\t\t\t\t}\n\n\t\t\t\t\t$file = $path.$file.'.js';\n\n\t\t\t\t\tif (file_exists($file))\n\t\t\t\t\t{\n\t\t\t\t\t\t$contents .= file_get_contents($file).\"\\n\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $contents;\n\t}", "function spip2odt_ajouter_styles_perso($fichier_perso, $fichier_oasis){\n\n\tlire_fichier($fichier_oasis, $styles);\n\t\n\t$f = find_in_path($fichier_perso);\n\tlire_fichier($f, $styles_defaut);\n\t$ajout_styles = \"\";\n\tif (preg_match_all(\",<((style:style|text:list-style|text:outline-style)\\s[^/>]*)(/>|>.*</(\\\\2)>),Uims\",$styles_defaut,$matches,PREG_SET_ORDER)){\n\t\tforeach($matches as $match){\n\t\t\tif (preg_match(\",style:name=([\\\"'])([^\\\\1]*)\\\\1,Ums\",$match[1],$regs)){\n\t\t\t\t$nom_style = $regs[2];\n\t\t\t\tif (!preg_match(\",style:name=(['\\\"])$nom_style\\\\1,\",$styles))\n\t\t\t\t\t$ajout_styles .= $match[0];\n\t\t\t}\n\t\t}\n\t}\n\t$styles = str_replace('</office:styles>',$ajout_styles.'</office:styles>',$styles);\t\n\tecrire_fichier($fichier_oasis, $styles);\n\n}", "function css( $params ){\n\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$document =& JFactory::getDocument();\n\t\t\n\t\t$cssFile = 'ja_contentslide.css';\n\t\n\t\tif( file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$cssFile) ) {\n\t\t\t$document->addStyleSheet( JURI::base().'templates/'.$mainframe->getTemplate().'/css/'.$cssFile );\n\t\t} else { \n\t\t\t$document->addStyleSheet( JURI::base().'modules/mod_ja_contentslide/assets/css/'.$cssFile );\n\t\t}\n\t}", "function nectar_generate_options_css() {\n\n\t$nectar_options = get_nectar_theme_options(); \n\n\tif(!empty($nectar_options['external-dynamic-css']) && $nectar_options['external-dynamic-css'] == 1){\n\n\t\t$css_dir = get_stylesheet_directory() . '/css/'; \n\t\tob_start(); // Capture all output (output buffering)\n\n\t\t//include css\n\t\tnectar_colors_css_output();\n\t\tnectar_custom_css_output();\n\t\tnectar_fonts_output();\n\n\t\t$css = ob_get_clean(); // Get generated CSS (output buffering)\n\t\t\n\t\trequire_once( ABSPATH . 'wp-admin/includes/file.php' );\n\t\tglobal $wp_filesystem;\n\t\tWP_Filesystem();\n\t\t\n\t\t$wp_filesystem->put_contents($css_dir . 'dynamic-combined.css', $css, FS_CHMOD_FILE);\n\t\t\n\t\t//file_put_contents($css_dir . 'dynamic-combined.css', $css, LOCK_EX); // Save it\n\t\t\n\t}\n}", "function XT_load_css($params){\n if($params['media'] == \"\"){\n $params['media']= \"screen\";\n }\n if(empty($params['file'])) {\n return false;\n } else {\n if(empty($GLOBALS['loadedcss'][$params['file']])){\n // js ausgeben und als geladen merken\n $GLOBALS['loadedcss'][$params['file']] = '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . STYLES_DIR . 'live/' . $params['file'] . '\" media=\"' . $params['media'] . '\" />';\n return NULL;\n }else{\n return false;\n }\n }\n}", "function add_js_theme( $js_files, $is_i18n = FALSE )\n {\n if ( $is_i18n )\n return $this->add_jsi18n_theme( $js_files );\n\n // make sure that $this->includes has array value\n if ( ! is_array( $this->includes ) )\n $this->includes = array();\n\n // if $css_files is string, then convert into array\n $js_files = is_array( $js_files ) ? $js_files : explode( \",\", $js_files );\n\n foreach( $js_files as $js )\n {\n // remove white space if any\n $js = trim( $js );\n\n // go to next when passing empty space\n if ( empty( $js ) ) continue;\n\n // using sha1( $js ) as a key to prevent duplicate js to be included\n $this->includes[ 'js_files' ][ sha1( $js ) ] = base_url( \"/themes/{$this->settings->theme}/js\" ) . \"/{$js}\";\n }\n\n return $this;\n }", "private function add_rich_form_scripts() {\r\n\r\n\t$this->template->libs_js = array(\r\n\t \"http://code.jquery.com/jquery-1.8.2.js\",\r\n\t \"http://code.jquery.com/ui/1.9.1/jquery-ui.js\",\r\n\t \"jquery-ui-timepicker-addon.js\",\r\n\t \"http://cdn.aloha-editor.org/latest/lib/require.js\"\r\n\t);\r\n\t$this->template->libs_css = array(\r\n\t \"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\",\r\n\t \"datetimepicker.css\",\r\n\t \"http://cdn.aloha-editor.org/latest/css/aloha.css\"\r\n\t);\r\n }", "function studeon_vc_merge_styles($list) {\n\t\t$list[] = 'plugins/js_composer/js_composer.css';\n\t\treturn $list;\n\t}", "function addScriptResources()\t{\n\t\tif (t3lib_extMgm::isLoaded('t3jquery')) {\n\t\t\trequire_once(t3lib_extMgm::extPath('t3jquery').'class.tx_t3jquery.php');\n\t\t}\n\n\t\t// checks if t3jquery is loaded\n\t\tif (T3JQUERY === TRUE) {\n\t\t\ttx_t3jquery::addJqJS();\n\t\t} else {\n\t\t\tif($this->conf['jQueryRes']) $this->jsFile[] = $this->conf['jQueryRes'];\n\t\t\tif($this->conf['tooltipJSRes']) $this->jsFile[] = $this->conf['tooltipJSRes'];\n\t\t}\n\n\t\t// Fix moveJsFromHeaderToFooter (add all scripts to the footer)\n\t\tif ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {\n\t\t\t$allJsInFooter = TRUE;\n\t\t} else {\n\t\t\t$allJsInFooter = FALSE;\n\t\t}\n\n\t\t$pagerender = $GLOBALS['TSFE']->getPageRenderer();\n\t\t\n\t\t// add all defined JS files\n\t\tif (count($this->jsFile) > 0) {\n\t\t\tforeach ($this->jsFile as $jsToLoad) {\n\t\t\t\tif (T3JQUERY === TRUE) {\n\t\t\t\t\t$conf = array(\n\t\t\t\t\t\t'jsfile' => $jsToLoad,\n\t\t\t\t\t\t'tofooter' => ($this->conf['jsInFooter'] || $allJsInFooter),\n\t\t\t\t\t\t'jsminify' => $this->conf['jsMinify'],\n\t\t\t\t\t);\n\t\t\t\t\ttx_t3jquery::addJS('', $conf);\n\t\t\t\t} else {\n\t\t\t\t\t$file = $GLOBALS['TSFE']->tmpl->getFileName($jsToLoad);\n\t\t\t\t\tif ($file) {\n\t\t\t\t\t\tif ($allJsInFooter) {\n\t\t\t\t\t\t\t$pagerender->addJsFooterFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$pagerender->addJsFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt3lib_div::devLog(\"'{\".$jsToLoad.\"}' does not exists!\", $this->extKey, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add defined CSS file\n\t\tif($this->conf['cssFile']) {\n\t\t\t// Add script only once\n\t\t\t$css = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['cssFile']);\n\t\t\tif ($css) {\n\t\t\t\t$pagerender->addCssFile($css, 'stylesheet', 'all', '', $this->conf['cssMinify']);\n\t\t\t} else {\n\t\t\t\tt3lib_div::devLog(\"'{\".$this->conf['cssFile'].\"}' does not exists!\", $this->extKey, 2);\n\t\t\t}\n\t\t}\n\t}", "function escort_files() {\n wp_enqueue_script('adding-js', get_theme_file_uri('/script.js'), array(), false, true );\n wp_register_style('add-bx-css1', get_stylesheet_directory_uri() . '/css/style.css', array(), '1', 'all');\n wp_register_style('add-bx-css2', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), '1', 'all');\n wp_register_style('add-bx-css3', get_stylesheet_directory_uri() . '/css/flexslider.css', array(), '1', 'all');\n wp_register_style('add-bx-css4', get_stylesheet_directory_uri() . '/css/popuo-box.css', array(), '1', 'all');\n wp_register_style('font-awesome', get_stylesheet_directory_uri() . '/css///netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '1', 'all');\n\n /* wp_enqueue_script('add-bx-js1');\n wp_enqueue_script('add-bx-js2');\n wp_enqueue_script('add-bx-js3');\n wp_enqueue_script('add-bx-js4');\n wp_enqueue_script('add-bx-js5');\n wp_enqueue_script('add-bx-js6');*/\n wp_enqueue_style('add-bx-css1');\n wp_enqueue_style('add-bx-css2');\n wp_enqueue_style('add-bx-css3');\n wp_enqueue_style('add-bx-css4');\n wp_enqueue_style('font-awesome');\n}", "function add_js() {\n // È possibile aggiungere un file js presente nella cartella del tema\n wp_register_script('main_js', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true);\n wp_enqueue_script('main_js');\n\n // È possibile aggiungere un url remoto (es. CDN)\n // wp_register_script('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js', array('jquery'), null, true);\n // wp_enqueue_script('select2');\n\n // Inoltre è possibile aggiungere un css solo se una determinata condizione è vera\n // In questo esempio aggiungiamo il file home.css solo se ci troviamo sulla pagina di home\n // if(is_home()) {\n // wp_register_script('home_js', get_template_directory_uri() . '/js/home.js', array('jquery'), null, true);\n // wp_enqueue_script('home_js');\n // }\n}", "public static function minify($_base,array $_files) {\n\t\tpreg_match('/\\.(js|css)*$/',$_files[0],$_ext);\n\t\tif (!$_ext[1]) {\n\t\t\t// Not a JavaSript/CSS file\n\t\t\tF3::http404();\n\t\t\treturn;\n\t\t}\n\t\t$_type=array(\n\t\t\t'js'=>'application/x-javascript',\n\t\t\t'css'=>'text/css'\n\t\t);\n\t\t$_path=F3::$global['GUI'].F3::resolve($_base);\n\t\tforeach ($_files as $_file)\n\t\t\tif (!file_exists($_path.$_file)) {\n\t\t\t\tF3::$global['CONTEXT']=$_file;\n\t\t\t\ttrigger_error(self::TEXT_Minify);\n\t\t\t\treturn;\n\t\t\t}\n\t\t$_src='';\n\t\tif (PHP_SAPI!='cli' && !headers_sent())\n\t\t\theader(F3::HTTP_Content.': '.$_type[substr($_ext[1],0,3)].'; '.\n\t\t\t\t'charset='.F3::$global['ENCODING']);\n\t\tforeach ($_files as $_file) {\n\t\t\tF3::$global['PROFILE']['FILES']\n\t\t\t\t['minified'][basename($_file)]=filesize($_path.$_file);\n\t\t\t// Rewrite relative URLs in CSS\n\t\t\t$_src.=preg_replace_callback(\n\t\t\t\t'/\\b(?<=url)\\(([\\\"\\'])*([^\\1]+?)\\1*\\)/',\n\t\t\t\tfunction($_url) use($_path,$_file) {\n\t\t\t\t\t$_fdir=dirname($_file);\n\t\t\t\t\t$_rewrite=explode(\n\t\t\t\t\t\t'/',$_path.($_fdir!='.'?$_fdir.'/':'').$_url[2]\n\t\t\t\t\t);\n\t\t\t\t\t$_i=0;\n\t\t\t\t\twhile ($_i<count($_rewrite))\n\t\t\t\t\t\t// Analyze each URL segment\n\t\t\t\t\t\tif ($_i>0 &&\n\t\t\t\t\t\t\t$_rewrite[$_i]=='..' &&\n\t\t\t\t\t\t\t$_rewrite[$_i-1]!='..') {\n\t\t\t\t\t\t\t// Simplify URL\n\t\t\t\t\t\t\tunset($_rewrite[$_i],$_rewrite[$_i-1]);\n\t\t\t\t\t\t\t$_rewrite=array_values($_rewrite);\n\t\t\t\t\t\t\t$_i--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$_i++;\n\t\t\t\t\t// Reconstruct simplified URL\n\t\t\t\t\treturn\n\t\t\t\t\t\t'('.implode('/',array_merge($_rewrite,array())).')';\n\t\t\t\t},\n\t\t\t\t// Retrieve CSS/Javascript file\n\t\t\t\tfile_get_contents($_path.$_file)\n\t\t\t);\n\t\t}\n\t\t$_ptr=0;\n\t\t$_dst='';\n\t\twhile ($_ptr<strlen($_src)) {\n\t\t\tif ($_src[$_ptr]=='/') {\n\t\t\t\t// Presume it's a regex pattern\n\t\t\t\t$_regex=TRUE;\n\t\t\t\tif ($_ptr>0) {\n\t\t\t\t\t// Backtrack and validate\n\t\t\t\t\t$_ofs=$_ptr;\n\t\t\t\t\twhile ($_ofs>0) {\n\t\t\t\t\t\t$_ofs--;\n\t\t\t\t\t// Pattern should be preceded by parenthesis,\n\t\t\t\t\t// colon or assignment operator\n\t\t\t\t\tif ($_src[$_ofs]=='(' || $_src[$_ofs]==':' ||\n\t\t\t\t\t\t$_src[$_ofs]=='=') {\n\t\t\t\t\t\t\twhile ($_ptr<strlen($_src)) {\n\t\t\t\t\t\t\t\t$_str=strstr(substr($_src,$_ptr+1),'/',TRUE);\n\t\t\t\t\t\t\t\tif (!strlen($_str) && $_src[$_ptr-1]!='/' ||\n\t\t\t\t\t\t\t\t\tstrpos($_str,\"\\n\")!==FALSE) {\n\t\t\t\t\t\t\t\t\t// Not a regex pattern\n\t\t\t\t\t\t\t\t\t$_regex=FALSE;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$_dst.='/'.$_str;\n\t\t\t\t\t\t\t\t$_ptr+=strlen($_str)+1;\n\t\t\t\t\t\t\t\tif ($_src[$_ptr-1]!='\\\\' ||\n\t\t\t\t\t\t\t\t\t$_src[$_ptr-2]=='\\\\') {\n\t\t\t\t\t\t\t\t\t\t$_dst.='/';\n\t\t\t\t\t\t\t\t\t\t$_ptr++;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($_src[$_ofs]!=\"\\t\" && $_src[$_ofs]!=' ') {\n\t\t\t\t\t\t\t// Not a regex pattern\n\t\t\t\t\t\t\t$_regex=FALSE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($_regex && _ofs<1)\n\t\t\t\t\t\t$_regex=FALSE;\n\t\t\t\t}\n\t\t\t\tif (!$_regex || $_ptr<1) {\n\t\t\t\t\tif (substr($_src,$_ptr+1,2)=='*@') {\n\t\t\t\t\t\t// Conditional block\n\t\t\t\t\t\t$_str=strstr(substr($_src,$_ptr+3),'@*/',TRUE);\n\t\t\t\t\t\t$_dst.='/*@'.$_str.$_src[$_ptr].'@*/';\n\t\t\t\t\t\t$_ptr+=strlen($_str)+6;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($_src[$_ptr+1]=='*') {\n\t\t\t\t\t\t// Multiline comment\n\t\t\t\t\t\t$_str=strstr(substr($_src,$_ptr+2),'*/',TRUE);\n\t\t\t\t\t\t$_ptr+=strlen($_str)+4;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($_src[$_ptr+1]=='/') {\n\t\t\t\t\t\t// Single-line comment\n\t\t\t\t\t\t$_str=strstr(substr($_src,$_ptr+2),\"\\n\",TRUE);\n\t\t\t\t\t\t$_ptr+=strlen($_str)+2;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Division operator\n\t\t\t\t\t\t$_dst.=$_src[$_ptr];\n\t\t\t\t\t\t$_ptr++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($_src[$_ptr]=='\\'' || $_src[$_ptr]=='\"') {\n\t\t\t\t$_match=$_src[$_ptr];\n\t\t\t\t// String literal\n\t\t\t\twhile ($_ptr<strlen($_src)) {\n\t\t\t\t\t$_str=strstr(substr($_src,$_ptr+1),$_src[$_ptr],TRUE);\n\t\t\t\t\t$_dst.=$_match.$_str;\n\t\t\t\t\t$_ptr+=strlen($_str)+1;\n\t\t\t\t\tif ($_src[$_ptr-1]!='\\\\' || $_src[$_ptr-2]=='\\\\') {\n\t\t\t\t\t\t$_dst.=$_match;\n\t\t\t\t\t\t$_ptr++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (ctype_space($_src[$_ptr])) {\n\t\t\t\t$_last=substr($_dst,-1);\n\t\t\t\t$_ofs=$_ptr+1;\n\t\t\t\twhile (ctype_space($_src[$_ofs]))\n\t\t\t\t\t$_ofs++;\n\t\t\t\tif (preg_match('/[\\w'.\n\t\t\t\t\t// IE is sensitive about certain spaces in CSS\n\t\t\t\t\t((isset($_SERVER['HTTP_USER_AGENT']) &&\n\t\t\t\t\t\tpreg_match('/MSIE/',$_SERVER['HTTP_USER_AGENT']) &&\n\t\t\t\t\t\t$_ext[1]=='css')?'\\(\\)':'').\n\t\t\t\t\t'][\\w\\$\\.]/',$_last.$_src[$_ofs]))\n\t\t\t\t\t\t$_dst.=$_src[$_ptr];\n\t\t\t\t$_ptr=$_ofs;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_dst.=$_src[$_ptr];\n\t\t\t\t$_ptr++;\n\t\t\t}\n\t\t}\n\t\techo $_dst;\n\t}", "public function add_assets($type, $files = array())\n {\n if(is_array($files))\n {\n switch($type)\n {\n case \"css\":\n case \"js\":\n case \"image\":\n case \"less\":\n $assets = $this->asset[$type];\n $assets = array_merge($assets, $files);\n $this->asset[$type] = $assets;\n break;\n default:\n break;\n }\n }\n }", "public function getConcatenateCss() {}", "public function loadJavascript($options = null) {\n $js_asset_records = $options ? $options : $this->asset_array['default']['javascript'][$this->getDeviceName()];\n //get default them\n $theme = $this->asset_array['default']['theme'];\n\n foreach ($js_asset_records as $key => $js_file_path) {\n if (!$options) {\n echo '<script type=\"text/javascript\" src=\"/Skin/' . $this->theme . '/css/' . $js_file_path . '\"></script>';\n } else if (isset($options[$js_file_path])) {\n echo '<script type=\"text/javascript\" src=\"/Skin/' . $this->theme . '/css/' . $js_file_path . '\"></script>';\n }\n }\n\n //include user submited css\n if (isset($this->javascript)) {\n foreach ($this->javascript as $js_file_path) {\n echo '<script type=\"text/javascript\" src=\"/Skin/' . $this->theme . '/css/' . $js_file_path . '\"></script>';\n }\n }\n }", "function addFileTypes($fileTypes) {\r\n $fileTypes['svg'] = 'image/svg+xml';\r\n return $fileTypes;\r\n}", "function thmplt_carousel_add_jscss() {\r\n global $post;\r\n\t$url_to_here = str_replace( TEMPLATEPATH, get_bloginfo('template_url'), dirname(__FILE__) );\r\n\tif ('thmplt_carousel' === $post->post_type) {\t\t\r\n\t\techo \"<script type='text/javascript' src='\".$url_to_here. \"/carousel.js'></script>\\n\";\r\n\t\t#echo \"<link rel='stylesheet'href='\".$plugin_url.\"/editor.css' type='text/css' media='all' \\>\\n\";\t\t\r\n\t}\r\n}", "public function loadConfigAssets()\r\n {\r\n $this->app->document->addScript('elements:imagebox/assets/js/myimage.js');\r\n $this->app->document->addStylesheet('elements:imagebox/assets/css/editoption.css');\r\n $this->app->document->addScript('elements:imagebox/assets/js/myoption.js');\r\n $this->app->document->addStylesheet('elements:option/option.css');\r\n }", "private function \t\t\t\tbuild_style_tags() {\n\t\t$load=array(\n\t\t\t\"assets/css/bootstrap/bootstrap-grid.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap-reboot.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap.min.css\",\n\t\t\t\"assets/css/fontawesome/all.min.css\",\n\t\t\t\"assets/css/style.css\"\n\t\t);\n\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_css)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<link rel=\"stylesheet\" title=\"estilos\" type=\"text/css\" href=\"{$_item}\" media=\"screen\" />\nR;\n\t\t\treturn $_acum;\n}, '');\n\t}", "public static function getAllResources($type){\n\t\t$template = themesDB::getThemeName();\n\t\t$folder = TEMPLATES_PATH.$template.'/'.$type.'/';\n\t\t$typePom = explode('_',$type);\n\t\t$files = baseFile::getFilesList($folder,$typePom[0]);\t\n\t\t$finalArr = array();\n\t\tforeach ($files as $file){\n\t\t\tif (preg_match('/main.css/', $file->path) or preg_match('/main.js/', $file->path) or preg_match('/less.css/', $file->path)) {\n\t\t\t\t$main[] = $file->path;\n\t\t\t}else{\n\t\t\t\t$finalArr[] = $file->path;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (is_array($main) and is_array($finalArr)) {\n\t\t\t$finalArr = array_merge($finalArr,$main);\n\t\t}elseif (is_array($main)){\n\t\t\t$finalArr = $main;\n\t\t}\n\n\t\treturn $finalArr;\n\t}", "function loadFiles($params, $module)\n {\n //if( $params->get('load_css_file') ) {\r\n JHTML::stylesheet('modules/' . $module . '/assets/style.css');\n if (is_file(JPATH_SITE . DS . 'templates' . DS . JFactory::getApplication()->getTemplate() . DS . 'css' . DS . $module . \".css\"))\n JHTML::stylesheet('templates/' . JFactory::getApplication()->getTemplate() . '/css/' . $module . \".css\");\n\n //}\r\n }", "private function generateFrontend()\n {\n #-- add needed css an js files\n $GLOBALS['TL_CSS'][] = 'bundles/homekitee/uikit-3.6.21/css/uikit.min.css';\n $GLOBALS['TL_JAVASCRIPT'][] = 'bundles/homekitee/uikit-3.6.21/js/uikit.min.js';\n $GLOBALS['TL_JAVASCRIPT'][] = 'bundles/homekitee/uikit-3.6.21/js/uikit-icons.min.js';\n }", "protected function ejsTemplates() {\n $commentTpl = $this->config['ejsTemplatesPath'] . $this->config['commentTpl'] . '.ejs';\n $deletedCommentTpl = $this->config['ejsTemplatesPath'] . $this->config['deletedCommentTpl'] . '.ejs';\n if (!file_exists($commentTpl)) {\n $tags = array(\n 'index' => '<%= index %>',\n 'idx' => '<%= idx %>',\n 'id' => '<%= id %>',\n 'avatar' => '<%= avatar %>',\n 'name' => '<%= name %>',\n 'edit_name' => '<%= edit_name %>',\n 'link' => '<%= link %>',\n 'date' => '<%= date %>',\n 'funny_date' => '<%= funny_date %>',\n 'funny_edit_date' => '<%= funny_edit_date %>',\n 'content' => '<%= content %>',\n 'user' => '<%= user %>',\n 'timeMarker' => '<%= timeMarker %>',\n 'hideAvatar' => '<%= hideAvatar %>',\n 'userId' => '<%= userId %>',\n 'timeago' => '<%= timeago %>',\n 'user_info' => '<%= user_info %>',\n 'like_block' => '<%= like_block %>',\n 'link_reply' => '',\n 'quote' => '',\n );\n $tpl = $this->getTpl($this->config['commentTpl']);\n $data = preg_replace('@\\s{2,}|\\n@i', '', $this->parseTpl($tpl, $tags));\n file_put_contents($commentTpl, $data);\n }\n if (!file_exists($deletedCommentTpl)) {\n $tags = array(\n 'deleteUser' => '<%= deleteUser %>',\n 'delete_date' => '<%= delete_date %>',\n 'funny_delete_date' => '<%= funny_delete_date %>',\n 'name' => '<%= name %>',\n 'index' => '<%= index %>',\n 'date' => '<%= date %>',\n 'funny_date' => '<%= funny_date %>',\n 'id' => '<%= id %>',\n 'idx' => '<%= idx %>',\n 'timeMarker' => '<%= timeMarker %>',\n 'timeago' => '<%= timeago %>',\n 'deleted_by' => '<%= deleted_by %>',\n 'restore' => '<%= restore %>',\n 'link' => '<%= link %>',\n );\n $tpl = $this->getTpl($this->config['deletedCommentTpl']);\n $data = preg_replace('@\\s{2,}|\\n@i', '', $this->parseTpl($tpl, $tags));\n file_put_contents($deletedCommentTpl, $data);\n }\n\n return true;\n }", "function asset_loader($data = array())\r\n\t{\r\n\t\t$backtrace\t\t\t\t\t\t\t\t\t= debug_backtrace();\r\n\t\t$pattern\t\t\t\t\t\t\t\t\t= ('/' == DIRECTORY_SEPARATOR ? '/\\/themes\\/(.*?)\\//' : '/\\\\\\themes\\\\\\(.*?)\\\\\\/');\r\n\t\t$theme\t\t\t\t\t\t\t\t\t\t= preg_match($pattern, (isset($backtrace[0]['file']) ? $backtrace[0]['file'] : null), $matched);\r\n\t\t$theme\t\t\t\t\t\t\t\t\t\t= (isset($matched[1]) ? $matched[1] : null);\r\n\t\t\r\n\t\tif(!$theme) return false;\r\n\t\t\r\n\t\tif(!is_array($data))\r\n\t\t{\r\n\t\t\t$data\t\t\t\t\t\t\t\t\t= array_map('trim', explode(',', $data));\r\n\t\t}\r\n\t\t\r\n\t\t$output\t\t\t\t\t\t\t\t\t\t= null;\r\n\t\t\r\n\t\tforeach($data as $key => $val)\r\n\t\t{\r\n\t\t\tif(file_exists('../themes/' . $theme . '/' . $val))\r\n\t\t\t{\r\n\t\t\t\tif('css' == strtolower(pathinfo($val, PATHINFO_EXTENSION)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$output\t\t\t\t\t\t\t.= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\" . base_url('themes/' . $theme . '/' . $val) . \"\\\" />\\n\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$output\t\t\t\t\t\t\t.= \"<script type=\\\"text/javascript\\\" src=\\\"\" . base_url('themes/' . $theme . '/' . $val) . \"\\\"></script>\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function build_css() {\n\t\t\t\n\t\t}", "public function css($type = 'cdn', array $attributes = array());", "private function CssJavascriptController($filecss = null){\n // Je recuper controler sur l'extension\n $cssArray = $this->twig->getExtension('AppBundle\\Twig\\AppExtension');\n // Deinition tous les Css files\n\n //Si le css existent a la AppExtension\n if(sizeof((array)$cssArray)>0)\n {\n $csstext = '';\n $kernel= $this->get('kernel');\n // Ici sera une array tous les css\n foreach ((array)$cssArray as $key=>$cssArray){\n foreach ($cssArray as $keycss){\n if ('@' !== $keycss[0]) {\n $csstext.=\\file_get_contents($keycss);\n }\n else{\n $path = $kernel->locateResource($keycss);\n $csstext.=\\file_get_contents($path);\n }\n\n }\n }\n // Ici on va compresser nos css sur une seule fishe\n $optimcss = new OptimizerCss();\n $optimcss->optimizeCss($csstext);\n\n if(is_null($filecss))\n {\n // Recuperation nouvelle css file name deini sur parameters.yml\n $filecss = $this->container->getParameter('cssFileName');\n }\n // REcuperation la route du notre web site\n $path = $this->get('kernel')->getRootDir() . '/../web/css/';\n // Mettre nouvelle css sur son bonne endtroit\n \\file_put_contents($path.$filecss,$optimcss->optimizeCss($csstext));\n }\n }", "function AddBackendStyleOptions(){\n $path = get_stylesheet_directory_uri() . '/gutenberg-editor.js';\n if(prefix_core_BaseFunctions::CheckFileExistence($path)):\n wp_enqueue_script(\n 'backend-gutenberg-css-classes',\n $path,\n ['wp-i18n', 'wp-element', 'wp-blocks']\n );\n endif;\n }", "public function automaticCss()\n \t{\n \t\t$css = array();\n \t\tif (isset($this->pluginPath)) {\n\t \t\t\n\t \t\t# CSS Plugin Path\n\t\t\t$css_path_plugin = $this->pluginPath . $this->constant['webroot'] . DS . $this->constant['cssBaseUrl'];\n\t\t\tif (is_file($css_path_plugin . $this->controller . '.css')) {\n\t\t \t$css[] = $this->plugin.'.'.$this->controller;\n\t\t \t}\n\n\t\t \tif (is_file($css_path_plugin . $this->controller . DS . $this->action . '.css')) {\n\t\t \t$css[] = $this->plugin.'.'.$this->controller . '/' . $this->action;\n\t\t \t}\n \t\t}\n \t\t\n \t\t$css_path = $this->constant['www_root'] . $this->constant['cssBaseUrl'];\n \t\tif (is_file($css_path . $this->controller . '.css')) {\n\t \t$css[] = $this->controller;\n\t\t}\n\n\t \tif (is_file($css_path . $this->controller . DS . $this->action . '.css')) {\n\t \t$css[] = $this->controller . DS . $this->action;\n\t\t}\n\t\treturn $this->css($css);\n \t}", "public function run()\n {\n \t$array = array(\n\t \"html\", \"laravel\", \"htmlycss\",\n\t \"apphtml\", \"javascript\", \"php\",\n\t \"jquery\"\n\t\t);\n\n \t$arrayimagenes = array(\n\t \"html5.jpg\", \"laravel.jpg\", \"htmlycss.jpg\",\n\t \"apphtml.jpg\", \"javascript.jpg\", \"php.jpg\",\n\t \"jquery.jpg\"\n\t\t);\n\n\t\tfor($i=0; $i<count($array); $i++){\n\n\t\t\tswitch ($array[$i]) {\n\t\t\t\tcase 'html':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'laravel':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\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\t\t\t 'nombre'=>'modelo',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'vista',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'controlador',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'htmlycss':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\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\t\t\t 'nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'css'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\n\t\t\t\tcase 'apphtml':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\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\t\t\t 'nombre'=>'html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'htmlmixed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'text/html'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'css',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_2',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'css'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_3',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'javascript'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_4',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'javascript':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\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\t\t\t 'nombre'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'javascript')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\n\t\t\t\t\n\t\t\t\tcase 'php':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\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\t\t\t 'nombre'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'php',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'php'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'jquery':\n\t\t\t\t\t$codigos =array('nombre'=>$array[$i],\n\t\t\t\t\t\t\t\t\t'tipos_archivos'=>array(\n\t\t\t\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\t\t\t 'nombre'=>'jquery',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'modo'=>'javascript',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'nombre_column'=>'colum_1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'extension_archivo'=>'jquery'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\tDB::table('categorias')->insert([\n\t\t\t'nombre' => $array[$i],\n\t\t\t'imagen' => \"img/\".$arrayimagenes[$i],\n\t\t\t'tipos_archivos'=>json_encode($codigos),\n\t\t\t'descripsion' => str_random(255)\n\t\t ]);\n\n\t\t}\n\n \n\n\t \n\t }", "public function clientScript($path,$type)\n {\n \n if($type===\"js\")\n \n return '<script src=\"'.$path.'\"></script>'.\"\\n\";\n elseif($type===\"css\")\n \n return'<link rel=\"stylesheet\" href=\"'.$path.'\">'.\"\\n\";\n else\n \n return \"Notice: missing argument 2 type js or css\";\n \n }", "function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}", "public function action_compile_get()\n {\n $css_combi = ABSPATH . DS.'assets'.DS.'css'.DS.'compiled'.DS;\n $js_combi = ABSPATH . DS.'assets'.DS.'js'.DS;\n \n $js_files = array(\n 'tipsy.js',\n 'facebox.js',\n 'tablesort.js',\n 'bootstrap.js',\n 'app.js',\n );\n\t\t\n\t\t$css_files = array(\n\t\t\t'bootstrap.css',\n\t\t\t'facebox.css',\n\t\t\t'main.css'\n\t\t);\n\t\t\n\t\t$css_combined = '';\n\t\tforeach($css_files as $file)\n\t\t $css_combined .= file_get_contents($css_combi.$file);\n \n if (file_exists($css_combi.'combo.css'))\n unlink($css_combi.'combo.css');\n \n // Minify CSS\n require_once(dirname(dirname(__FILE__)).DS.'libraries'.DS.'cssmin'.EXT);\n \n $min = new Minify_CSS();\n $css_combined = $min->minify($css_combined, array('preserveComments'=> FALSE, 'prependRelativePath' => NULL));\n \n // Removing Lines\n $css_combined = str_replace(PHP_EOL, '',$css_combined);\n \n $open = fopen($css_combi.'combo.css', 'w');\n fwrite($open, $css_combined);\n fclose($open);\n \n // Let's do it for the JS now!\n $js_combined = '';\n\t\tforeach($js_files as $file) :\n\t\t $js_combined .= file_get_contents($js_combi.$file);\n endforeach;\n \n \n // Minify them\n $this->load->library('curl');\n \n $js_combined = $this->curl->simple_post('http://marijnhaverbeke.nl/uglifyjs', array('js_code' => $js_combined), array());\n \n if (file_exists($js_combi.'combo.js'))\n unlink($js_combi.'combo.js');\n \n $open = fopen($js_combi.'combo.js', 'w');\n fwrite($open, $js_combined);\n fclose($open);\n \n echo \"CSS and JS files compilied\".PHP_EOL;\n }", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "public function enableConcatenateCss() {}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "function register_assets()\n{\n\n if (is_single()) {\n wp_enqueue_style( //fonctions pour charger un feuille de style css personalisé sur une page en particulier avec la fonction if(is_front_page)\n 'jpg-custom-single-css',\n get_template_directory_uri() . '/assets/styles/projets.css',\n array(),\n '1.0'\n );\n }\n if (is_page()) {\n wp_enqueue_style( //fonctions pour charger un feuille de style css personalisé sur une page en particulier avec la fonction if(is_front_page)\n 'jpg-custom-page-css',\n get_template_directory_uri() . '/assets/styles/page.css',\n array(),\n '1.0'\n );\n }\n\n\n wp_enqueue_style(\n 'jpg',\n get_stylesheet_uri(),\n array(),\n '1.0'\n\n );\n wp_enqueue_style(\n 'wordpress-css',\n \"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\"\n\n );\n wp_enqueue_style(\n 'jpg-custom-css',\n get_template_directory_uri() . '/assets/styles/main.css',\n array(),\n '1.0'\n\n );\n\n\n\n\nwp_enqueue_script(\n 'wordpress',\n 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'\n\n);\n\nwp_enqueue_script(\n 'jpg',\n get_template_directory_uri() . '/assets/scripts/main.js',\n array('wordpress'),\n '1.0',\n true\n);\n}", "protected function registerAssets(){\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCoreScript('jquery');\n\n\t\t$assets_path = dirname(__FILE__) . DIRECTORY_SEPARATOR.'assets';\n\t\t$url = Yii::app()->assetManager->publish($assets_path, false, -1, YII_DEBUG);\n\t\t$webroot = Yii::getPathOfAlias('webroot').DIRECTORY_SEPARATOR;\n\t\t$plugins = array();\n\t\t\n\t\t// register redactor files\n\t\t$cs->registerScriptFile($url.'/chosen.jquery.min.js');\n\t\t$cs->registerCssFile($url.'/chosen.min.css');\n\t\t\n\t\t$cs->registerScript('chosen_'.$this->id, '\n\t\t\t$(\"#'.$this->id.'\").chosen({no_results_text: \"'.Yii::t('chosen', 'Ничего не найдено').'\"});\n\t\t');\n\t\t\n\t}", "function add_style_script(){\r\n wp_enqueue_style('glv-style', plugins_url(\"GLV-Prospectos/admin/include/css/\").'glv-style.css');\r\n wp_enqueue_style('select2-style', plugins_url(\"GLV-Prospectos/admin/include/css/\").'select2.css');\r\n wp_enqueue_script('select-script', plugins_url(\"GLV-Prospectos/admin/include/js/\").'select2.js');\r\n wp_enqueue_script('glv-script', plugins_url(\"GLV-Prospectos/admin/include/js/\").'function.js');\r\n \r\n }", "public function enableCompressCss() {}", "function load_stylesheets(){\n /**/ \n\t\twp_register_style('mobiriseicon', get_template_directory_uri(). '/assets/web/assets/mobirise-icons2/mobirise2.css', '',2.0,'all');\n\t\twp_register_style('tether', get_template_directory_uri(). '/assets/tether/tether.min.css', '',1.0,'all');\n\t\twp_register_style('bootstrap', get_template_directory_uri(). '/assets/bootstrap/css/bootstrap.min.css', '',4.0,'all');\n\t\twp_register_style('bootstrapgrid', get_template_directory_uri(). '/assets/bootstrap/css/bootstrap-grid.min.css', '',4.0,'all');\n\t\twp_register_style('bootstrapreboot', get_template_directory_uri(). '/assets/bootstrap/css/bootstrap-reboot.min.css', '',4.0,'all');\n\t\twp_register_style('dropdown', get_template_directory_uri(). '/assets/dropdown/css/style.css', '',5.1,'all');\n\t\twp_register_style('socicon', get_template_directory_uri(). '/assets/socicon/css/styles.css', '',3.0,'all');\n\t\twp_register_style('themestyle', get_template_directory_uri(). '/assets/theme/css/style.css', '',3.0,'all');\n\t\twp_register_style('addstyle', get_template_directory_uri(). '/assets/mobirise/css/mbr-additional.css', '',3.0,'all');\n\t\twp_register_style('appcss', get_template_directory_uri(). '/assets/css/app.css', '',0.1,'all');\n \n wp_enqueue_style('mobiriseicon');\n wp_enqueue_style('tether');\n wp_enqueue_style('bootstrap');\n wp_enqueue_style('bootstrapgrid');\n wp_enqueue_style('bootstrapreboot');\n wp_enqueue_style('dropdown');\n wp_enqueue_style('socicon');\n wp_enqueue_style('themestyle');\n wp_enqueue_style('addstyle');\n wp_enqueue_style('appcss');\n}", "function assets( $type = 'css', $file = 'component.css' ) {\n\t\t\t\treturn implode( '/', array(\n\t\t\t\t\t\ttrim( $this->url, '/' ),\n\t\t\t\t\t\ttrim( $this->assets_dir, '/' ),\n\t\t\t\t\t\ttrim( $type, '/' ),\n\t\t\t\t\t\ttrim( $file, '/' )\n\t\t\t\t\t) );\n\t\t\t}", "function baseCss($nameCSS){ \n global $name;\n global $nameCSS;\n \n $cssbase = \".sprite{\\n\n background-image: url(\".'\"'.$name.'\"'.\");\\n\n background-repeat: no-repeat;\\n\n display: block;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"w\");\n $write = fwrite($handle, $cssbase);\n}", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "function get_theme_script( $file, $type = 'js' ){\n\t$path = get_theme_path();\n\t$type = strtolower( $type );\n\tif ( !in_array($type, ['js','css']) )\n\t\t$type = 'js';\n\n\treturn \"$path/$type/$file\";\n}", "public function composer_additional_assets() { ?>\n\n <script id=\"cv-builder-cv_blog-script\">\n (function($){\n \"use strict\";\n\n $(document).on( 'cv-composer-load-cv_blog', function() {\n\n var $modal = $('#cv-composer-absolute-container').children().last();\n var $styleControl = $modal.find('.control-style select');\n var $columnsControl = $modal.find('.control-masonry_columns');\n\n $styleControl.on( 'change', function() {\n\n var val = $styleControl.val();\n\n // Show/hide columns control\n if ( 'masonry' === val ) {\n $columnsControl.fadeIn();\n }\n else {\n $columnsControl.hide();\n }\n\n }).trigger('change');\n });\n })(jQuery);\n </script>\n\n <?php }", "static public function js($files, $path = null)\n {\n $output = null;\n\n if ( !is_array($files) )\n $files = array($files);\n\n if ( $path === null )\n $path = 'globals/views/js';\n \n $path = (URL_REWRITING) ? ROOT.$path : $path;\n\n foreach ( $files as $file )\n {\n $output .= '<script type=\"text/javascript\" '.\n\t'src=\"'.$path.'/'.$file.'.js\"></script>';\n }\n\n return $output;\n }", "function libreriasJS(){\n\t\t$libreriasJAVA='<script type=\"text/javascript\" src=\"js/jquery-2.min.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/jqueryui.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/funComunes.js\"></script>\n\t\t\t \t<link type=\"text/css\" href=\"css/jquery-ui-min.css\" rel=\"stylesheet\" />\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n\t\treturn $libreriasJAVA;\n\t}", "public function loadCustomCssJs() {\r\n\t\t$mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);\r\n\r\n\t\t$minishopAssetsUrl = $this->modx->getOption('minishop2.assets_url',null,$this->modx->getOption('assets_url',null,MODX_ASSETS_URL).'components/minishop2/');\r\n\t\t$connectorUrl = $minishopAssetsUrl.'connector.php';\r\n\t\t$minishopJsUrl = $minishopAssetsUrl.'js/mgr/';\r\n\t\t$minishopImgUrl = $minishopAssetsUrl.'img/mgr/';\r\n\r\n\t\t// Customizable product fields feature\r\n\t\t$product_fields = array_merge($this->resource->getAllFieldsNames(), array('syncsite'));\r\n\t\t$product_data_fields = $this->resource->getDataFieldsNames();\r\n\r\n\t\tif (!$product_main_fields = $this->modx->getOption('ms2_product_main_fields')) {\r\n\t\t\t$product_main_fields = 'pagetitle,longtitle,introtext,content,publishedon,pub_date,unpub_date,template,parent,alias,menutitle,searchable,cacheable,richtext,uri_override,uri,hidemenu,show_in_tree';\r\n\t\t}\r\n\t\t$product_main_fields = array_map('trim', explode(',',$product_main_fields));\r\n\t\t$product_main_fields = array_values(array_intersect($product_main_fields, $product_fields));\r\n\r\n\t\tif (!$product_extra_fields = $this->modx->getOption('ms2_product_extra_fields')) {\r\n\t\t\t$product_extra_fields = 'article,price,old_price,weight,color,remains,reserved,vendor,made_in,tags';\r\n\t\t}\r\n\t\t$product_extra_fields = array_map('trim', explode(',',$product_extra_fields));\r\n\t\t$product_extra_fields = array_values(array_intersect($product_extra_fields, $product_fields));\r\n\t\t//---\r\n\r\n // Get extra options fields\r\n $product_option_fields = $this->resource->getOptionFields();\r\n\r\n\r\n\t\t$showComments = class_exists('Ticket') && $this->modx->getOption('ms2_product_show_comments') ? 1 : 0;\r\n\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/util/datetime.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/widgets/element/modx.panel.tv.renders.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/widgets/resource/modx.grid.resource.security.local.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'product/product.tv.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/widgets/resource/modx.panel.resource.js');\r\n\t\t$this->addJavascript($mgrUrl.'assets/modext/sections/resource/update.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'minishop2.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/ms2.combo.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/ms2.utils.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/plupload/plupload.full.js');\r\n\t\t$this->addJavascript($minishopJsUrl.'misc/ext.ddview.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/category.tree.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/gallery.panel.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/links.grid.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/product.common.js');\r\n\t\t$this->addLastJavascript($minishopJsUrl.'product/update.js');\r\n\r\n\t\t$this->prepareFields();\r\n\r\n\t\tif ($showComments) {$this->loadTickets();}\r\n\t\tif ($this->resource instanceof msProduct) {\r\n\t\t\t$neighborhood = $this->resource->getNeighborhood();\r\n\t\t}\r\n\r\n\t\t$this->addHtml('\r\n\t\t<script type=\"text/javascript\">\r\n\t\t// <![CDATA[\r\n\t\tminiShop2.config = {\r\n\t\t\tassets_url: \"'.$minishopAssetsUrl.'\"\r\n\t\t\t,connector_url: \"'.$connectorUrl.'\"\r\n\t\t\t,show_comments: '.$showComments.'\r\n\t\t\t,logo_small: \"'.$minishopImgUrl.'ms2_small.png\"\r\n\t\t\t,main_fields: '.json_encode($product_main_fields).'\r\n\t\t\t,extra_fields: '.json_encode($product_extra_fields).'\r\n\t\t\t,option_fields: '.json_encode($product_option_fields).'\r\n\t\t\t,vertical_tabs: '.$this->modx->getOption('ms2_product_vertical_tabs', null, true).'\r\n\t\t\t,product_tab_extra: '.$this->modx->getOption('ms2_product_tab_extra', null, true).'\r\n\t\t\t,product_tab_gallery: '.$this->modx->getOption('ms2_product_tab_gallery', null, true).'\r\n\t\t\t,product_tab_links: '.$this->modx->getOption('ms2_product_tab_links', null, true).'\r\n\t\t\t,data_fields: '.json_encode($product_data_fields).'\r\n\t\t\t,additional_fields: []\r\n\t\t\t,media_source: '.json_encode($this->getSourceProperties()).'\r\n\t\t}\r\n\t\tMODx.config.publish_document = \"'.$this->canPublish.'\";\r\n\t\tMODx.onDocFormRender = \"'.$this->onDocFormRender.'\";\r\n\t\tMODx.ctx = \"'.$this->ctx.'\";\r\n\t\tExt.onReady(function() {\r\n\t\t\tMODx.load({\r\n\t\t\t\txtype: \"minishop2-page-product-update\"\r\n\t\t\t\t,resource: \"'.$this->resource->get('id').'\"\r\n\t\t\t\t,record: '.$this->modx->toJSON($this->resourceArray).'\r\n\t\t\t\t,publish_document: \"'.$this->canPublish.'\"\r\n\t\t\t\t,preview_url: \"'.$this->previewUrl.'\"\r\n\t\t\t\t,locked: '.($this->locked ? 1 : 0).'\r\n\t\t\t\t,lockedText: \"'.$this->lockedText.'\"\r\n\t\t\t\t,canSave: '.($this->canSave ? 1 : 0).'\r\n\t\t\t\t,canEdit: '.($this->canEdit ? 1 : 0).'\r\n\t\t\t\t,canCreate: '.($this->canCreate ? 1 : 0).'\r\n\t\t\t\t,canDuplicate: '.($this->canDuplicate ? 1 : 0).'\r\n\t\t\t\t,canDelete: '.($this->canDelete ? 1 : 0).'\r\n\t\t\t\t,canPublish: '.($this->canPublish ? 1 : 0).'\r\n\t\t\t\t,show_tvs: '.(!empty($this->tvCounts) ? 1 : 0).'\r\n\t\t\t\t,next_page: '.(!empty($neighborhood['right'][0]) ? $neighborhood['right'][0] : 0).'\r\n\t\t\t\t,prev_page: '.(!empty($neighborhood['left'][0]) ? $neighborhood['left'][0] : 0).'\r\n\t\t\t\t,up_page: '.$this->resource->parent.'\r\n\t\t\t\t,mode: \"update\"\r\n\t\t\t});\r\n\t\t});\r\n\t\t// ]]>\r\n\t\t</script>');\r\n\t\t/* load RTE */\r\n\t\t$this->loadRichTextEditor();\r\n\t\t$this->modx->invokeEvent('msOnManagerCustomCssJs',array('controller' => &$this, 'page' => 'product_update'));\r\n\t\t$this->loadPlugins();\r\n\t}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "public function register_assets() {\n $js_folder = SD_PLUGIN_PATH . '/src/assets/js/';\n $css_folder = SD_PLUGIN_PATH . '/src/assets/css/';\n $scripts = scandir($js_folder);\n //var_dump($scripts);\n $styles = scandir($css_folder);\n foreach ($styles as $style) {\n if( !is_dir($style) ) {\n wp_enqueue_style( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/css/' . $style);\n }\n }\n foreach ($scripts as $script) {\n if( !is_dir($script) ) {\n wp_enqueue_script( URL_SCOPE . mt_rand(0, 9000), '/wp-content/plugins/'.sanitize_key(PLUGIN_NAME).'/src/assets/js/' . $script);\n }\n }\n }", "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "protected function addFilteringJsAndCss()\n {\n $this->setStylesheets('');\n $this->setJavascripts('');\n }" ]
[ "0.6102688", "0.6086826", "0.60665137", "0.5954602", "0.5936584", "0.5797042", "0.5781476", "0.577037", "0.5754038", "0.5733811", "0.5732236", "0.5711255", "0.5697353", "0.56872874", "0.56851393", "0.5684642", "0.56508726", "0.56410825", "0.5628131", "0.561732", "0.56091833", "0.56090826", "0.55994993", "0.55709666", "0.5569175", "0.5555413", "0.55540746", "0.5544956", "0.55304235", "0.5527833", "0.55258524", "0.5479661", "0.5471763", "0.54701", "0.54670244", "0.54664975", "0.5462852", "0.54518825", "0.5449903", "0.54468113", "0.5438972", "0.5433495", "0.54298234", "0.5413012", "0.5411886", "0.54111564", "0.5411155", "0.5406706", "0.5404895", "0.53998345", "0.5394997", "0.53933614", "0.53927606", "0.53898096", "0.5388551", "0.5379185", "0.5376328", "0.5373784", "0.5368522", "0.5362172", "0.5360139", "0.53556085", "0.53532434", "0.53488564", "0.5348174", "0.5347692", "0.5344801", "0.53311265", "0.532453", "0.5319141", "0.5308939", "0.52938896", "0.5289262", "0.5288162", "0.5287902", "0.52876437", "0.5285932", "0.5284421", "0.5283552", "0.5280115", "0.5280115", "0.5279874", "0.5278533", "0.5275432", "0.52724403", "0.5270916", "0.52695286", "0.52663726", "0.5265448", "0.52603495", "0.52558863", "0.5255169", "0.5255063", "0.5253446", "0.52499783", "0.5248402", "0.52480894", "0.524225", "0.5239738", "0.52356" ]
0.5289054
73
Adiciona um arquivo JavaScript ao template bwHtml::js('contato.js'); bwHtml::js('ie8.js', 'ie < 9'); bwHtml::js('chrome.js', 'chrome'); bwHtml::js('
function js($url, $condition = false) { if ($condition != false) { $b = new bwBrowser; if (!$b->isBrowser($condition)) return; } $template = bwTemplate::getInstance(); if (bwFile::exists($template->getPath() . DS . 'js' . DS . str_replace('/', DS, $url))) { $url = $template->getUrl() . '/js/' . $url; } $head = "<script type=\"text/javascript\" src=\"$url\"></script>"; bwHtml::addHead('js', $head); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addJavaScript() {\n\t\t$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['contagged']);\n\t\t$javaScriptPathAndFilename = $extensionConfiguration['javaScriptPathAndFilename'];\n\t\tif (is_string($javaScriptPathAndFilename) && $javaScriptPathAndFilename !== '') {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData['contagged'] .= '<script src=\"' . $javaScriptPathAndFilename . '\" type=\"text/javascript\"></script>';\n\t\t}\n\t}", "function incluirJS($arquivo){ ?>\n\t\t<script src=\"js/<?=$arquivo?>.js\" type=\"text/javascript\"></script>\n\t<?php }", "protected function addJS() {\n foreach ($this->js_files as $js_file) {\n $this->header.=\"<script type='text/javascript' src='\" . __ASSETS_PATH . \"/\" . $js_file . \"'></script> \\n\";\n }\n }", "private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n codeActivity.lang = {\n empty_name: '\" . addslashes(get_string('js_empty_name', 'codeactivity')) . \"',\n empty_test_code: '\" . addslashes(get_string('js_empty_test_code', 'codeactivity')).\"',\n error_add: '\" . addslashes(get_string('js_error_add', 'codeactivity')).\"',\n error_delete: '\" . addslashes(get_string('js_error_delete', 'codeactivity')).\"',\n error_forbidden: '\" . addslashes(get_string('js_error_forbidden', 'codeactivity')).\"'\n }\n });\n </script>\";\n \n $this->_form->addElement('html', $script);\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "private function includeJavaScript() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId]\n\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t'pi1/tx_explanationbox_pi1.js\">' .\n\t\t\t'</script>';\n\n\t\tif ($this->hasConfValueString('mooTools')) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_moo']\n\t\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t\t$this->getConfValueString('mooTools') . '\">' .\n\t\t\t\t'</script>';\n\t\t}\n\t}", "public function addJavascriptFiles($js /* array */);", "private function \t\t\t\tbuild_script_tags() {\n\t\t$load=array(\n\t\t\t\"assets/js/jquery/jquery-3.3.1.min.js\",\n\t\t\t\"assets/js/bootstrap/bootstrap.min.js\",\n\t\t\t// \"assets/js/fontawesome/all.min.js\",\n\t\t\t\"assets/js/app/fetch.js\",\n\t\t\t\"assets/js/app/modal.js\",\n\t\t\t\"assets/js/app/common.js\"\n\t\t);\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_js)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<script type=\"text/javascript\" src=\"{$_item}\"></script>\nR;\n\t\t\treturn $_acum;\n\t\t}, '');\n\t}", "function addScriptResources()\t{\n\t\tif (t3lib_extMgm::isLoaded('t3jquery')) {\n\t\t\trequire_once(t3lib_extMgm::extPath('t3jquery').'class.tx_t3jquery.php');\n\t\t}\n\n\t\t// checks if t3jquery is loaded\n\t\tif (T3JQUERY === TRUE) {\n\t\t\ttx_t3jquery::addJqJS();\n\t\t} else {\n\t\t\tif($this->conf['jQueryRes']) $this->jsFile[] = $this->conf['jQueryRes'];\n\t\t\tif($this->conf['tooltipJSRes']) $this->jsFile[] = $this->conf['tooltipJSRes'];\n\t\t}\n\n\t\t// Fix moveJsFromHeaderToFooter (add all scripts to the footer)\n\t\tif ($GLOBALS['TSFE']->config['config']['moveJsFromHeaderToFooter']) {\n\t\t\t$allJsInFooter = TRUE;\n\t\t} else {\n\t\t\t$allJsInFooter = FALSE;\n\t\t}\n\n\t\t$pagerender = $GLOBALS['TSFE']->getPageRenderer();\n\t\t\n\t\t// add all defined JS files\n\t\tif (count($this->jsFile) > 0) {\n\t\t\tforeach ($this->jsFile as $jsToLoad) {\n\t\t\t\tif (T3JQUERY === TRUE) {\n\t\t\t\t\t$conf = array(\n\t\t\t\t\t\t'jsfile' => $jsToLoad,\n\t\t\t\t\t\t'tofooter' => ($this->conf['jsInFooter'] || $allJsInFooter),\n\t\t\t\t\t\t'jsminify' => $this->conf['jsMinify'],\n\t\t\t\t\t);\n\t\t\t\t\ttx_t3jquery::addJS('', $conf);\n\t\t\t\t} else {\n\t\t\t\t\t$file = $GLOBALS['TSFE']->tmpl->getFileName($jsToLoad);\n\t\t\t\t\tif ($file) {\n\t\t\t\t\t\tif ($allJsInFooter) {\n\t\t\t\t\t\t\t$pagerender->addJsFooterFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$pagerender->addJsFile($file, 'text/javascript', $this->conf['jsMinify']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt3lib_div::devLog(\"'{\".$jsToLoad.\"}' does not exists!\", $this->extKey, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add defined CSS file\n\t\tif($this->conf['cssFile']) {\n\t\t\t// Add script only once\n\t\t\t$css = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['cssFile']);\n\t\t\tif ($css) {\n\t\t\t\t$pagerender->addCssFile($css, 'stylesheet', 'all', '', $this->conf['cssMinify']);\n\t\t\t} else {\n\t\t\t\tt3lib_div::devLog(\"'{\".$this->conf['cssFile'].\"}' does not exists!\", $this->extKey, 2);\n\t\t\t}\n\t\t}\n\t}", "public function javascript() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t\r\n\t\t\tif(@$this->scriptTo) {\r\n\t\t\t\t$element = pzk_element($this->scriptTo);\r\n\t\t\t\tif($element) {\r\n\t\t\t\t\t$element->append(pzk_parse('<html.js src=\"'.BASE_URL.'/js/'.implode('/', $this->fullNames).'.js\" />'));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$page =pzk_page();\r\n\t\t\t\tif ($page) {\r\n\t\t\t\t\t$page->addObjJs($this->tagName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->jsLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/js/'.$this->jsLink.'.js\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ($this->jsExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.js src=\"'.$this->jsExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->jsExternalLink);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "protected function doConcatenateJavaScript() {}", "function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "protected function loadJavascript() {}", "private function add_rich_form_scripts() {\r\n\r\n\t$this->template->libs_js = array(\r\n\t \"http://code.jquery.com/jquery-1.8.2.js\",\r\n\t \"http://code.jquery.com/ui/1.9.1/jquery-ui.js\",\r\n\t \"jquery-ui-timepicker-addon.js\",\r\n\t \"http://cdn.aloha-editor.org/latest/lib/require.js\"\r\n\t);\r\n\t$this->template->libs_css = array(\r\n\t \"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\",\r\n\t \"datetimepicker.css\",\r\n\t \"http://cdn.aloha-editor.org/latest/css/aloha.css\"\r\n\t);\r\n }", "public function loadJavascript($options = null) {\n $js_asset_records = $options ? $options : $this->asset_array['default']['javascript'][$this->getDeviceName()];\n //get default them\n $theme = $this->asset_array['default']['theme'];\n\n foreach ($js_asset_records as $key => $js_file_path) {\n if (!$options) {\n echo '<script type=\"text/javascript\" src=\"/Skin/' . $this->theme . '/css/' . $js_file_path . '\"></script>';\n } else if (isset($options[$js_file_path])) {\n echo '<script type=\"text/javascript\" src=\"/Skin/' . $this->theme . '/css/' . $js_file_path . '\"></script>';\n }\n }\n\n //include user submited css\n if (isset($this->javascript)) {\n foreach ($this->javascript as $js_file_path) {\n echo '<script type=\"text/javascript\" src=\"/Skin/' . $this->theme . '/css/' . $js_file_path . '\"></script>';\n }\n }\n }", "public static function js($controlador=\"\", $js=\"\") {\r\n\r\n if (!$js) {\r\n $js = $controlador;\r\n $controlador = \"\";\r\n }\r\n $link = \"<script type='text/javascript' src='\";\r\n \r\n if($controlador)\r\n $src = URL . \"recursos/$controlador/js/\";\r\n else\r\n $src = URL . \"recursos/js/\";\r\n \r\n return $link . $src . $js . \".js' ></script>\";\r\n }", "protected function generateJavascript()\n\t{\n\t}", "function fresh_text_add_js()\n\t{\n\t\techo '<script>';\n\t\techo require_once 'replacement.php';\n\t\techo '</script>';\n\t}", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "protected function loadJavaScripts() {}", "public function addStaticJavascript()\n {\n JHTML::_('behavior.mootools');\n\n $document = JFactory::getDocument();\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/jquery-ui-base-1.8.20.css\");\n $document->addStyleSheet(JURI::root() . \"/media/com_cedtag/css/tagit-stylish-yellow.css\");\n\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery.1.7.2.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/jquery-ui.1.8.20.min.js\");\n $document->addScript(JURI::root() . \"media/com_cedtag/js/tagit.js\");\n $document->addScriptDeclaration(\"jQuery.noConflict();\");\n }", "public function AddJS($javascript){\n\t\t$headHTML = \"\";\n\t\tif(!is_array($javascript)){\n\t\t\t$javascript = [$javascript];\n\t\t}\n\t\tforeach($javascript as $js){\n\t\t\t$strExt = strtolower(substr($js,-3)) != \".js\" ? \".js\" : \"\";\n\t\t\t$js = $js.$strExt;\n\t\t\t$routeInApplication = APP_PATH.$js;\n\t\t\tif(is_file($routeInApplication)){\n\t\t\t\t$headHTML .= '<script type=\"text/javascript\" src=\"'.URL_APP.$routeInApplication.'\" ></script>';\n\t\t\t}else{\n\t\t\t\tthrow new \\Exception(\"The JS file \".$js.\" is not found in the application\");\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $headHTML;\n\t}", "public function addJS ($js) {\r\n\t\t\t$this->js .= \"<script src='js/$js.js' ></script>\";\r\n\t\t}", "protected function addCustomJS()\n\t{\n\t\t\n\t}", "function export_add_js()\n {\n }", "private function _addJavascript ()\n {\n $options = array ();\n\n if ($this->isTypeahead) {\n $options['documentReady'][] = 'init';\n if ($this->desc)\n $options['documentReady'][] = 'tooltip';\n }\n \n if ($this->selectable) {\n $options['documentReady'][] = 'selectable';\n if ($this->sortable) {\n $options['documentReady'][] = 'sortable';\n }\n }\n\n if ($this->clickable) {\n \t$options['documentReady'][] = 'click';\n }\n\n if (!empty ($options)) {\n $this->buildJS('thesaurus/', $options);\n }\n\n if ($this->selectable) {\n $this->_element->addDocumentReady($this->endJavascript);\n if (isset($this->required_items) && is_array ($this->required_items)) {\n foreach ($this->required_items as $item) {\n $this->_element->addDocumentReady(\"setRequiredItems_\" . $this->idfilter . \" ('$item');\");\n }\n }\n }\n }", "function loadJS() {\n\t\t$first = true;\n\t\t$jsPart = '';\n\t\tforeach( $this->conf->js->file as $file ) {\n\t\t\tif( ! $first ) {\n\t\t\t\t$jsPart .= chr( 9 );\n\t\t\t}\n\t\t\t$jsPart .= '<script type=\"text/javascript\" src=\"';\n\t\t\t$jsPart .= $this->conf->path->baseUrl . $this->conf->path->js . $file;\n\t\t\t$jsPart .= '\"></script>' . chr( 10 );\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\tif( count( $this->additionalJS ) >= 1 ) {\n\t\t\tforeach( $this->additionalJS as $key => $value ) {\n\t\t\t\t$jsPart .= '<script type=\"text/javascript\">' . chr( 10 );\n\t\t\t\t$jsPart .= $value . chr( 10 );\n\t\t\t\t$jsPart .= '</script>' . chr( 10 );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $jsPart;\n\t}", "public function buildFooter() {\n $arrOfJsFiles = $this->getJsFiles();\n \n //alle js bestanden in een script tag steken\n $stringOfJsTags = $this->createJsTags($arrOfJsFiles);\n \n include $this->footerFile;\n \n }", "function head_js($includeDefaults = true)\n{\n $headScript = get_view()->headScript();\n\n if ($includeDefaults) {\n $dir = 'javascripts';\n $headScript->prependScript('jQuery.noConflict();')\n ->prependScript('window.jQuery.ui || document.write(' . js_escape(js_tag('vendor/jquery-ui')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js')\n ->prependScript('window.jQuery || document.write(' . js_escape(js_tag('vendor/jquery')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js')\n ;\n }\n return $headScript;\n}", "public function assets_js() {\n \n $data = '<script src=\"//cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js\"></script>';\n $data .= \"\\n\";\n $data .= '<script src=\"//www.chartjs.org/dist/2.7.2/Chart.js\"></script>';\n $data .= \"\\n\";\n $data .= '<script src=\"//www.chartjs.org/samples/latest/utils.js\"></script>'; \n $data .= \"\\n\"; \n $data .= '<script src=\"' . base_url() . 'assets/apps/dashboard/js/dashboard.js?ver=' . MD_VER . '\"></script>';\n $data .= \"\\n\";\n \n foreach ( $this->js_urls_widgets as $url ) {\n\n $data .= '<script src=\"' . $url . '?ver=' . MD_VER . '\"></script>';\n $data .= \"\\n\"; \n\n } \n \n return $data;\n \n }", "protected function doCompressJavaScript() {}", "function headerJS() {\n\t\tglobal $use_tooltips;\n\n\t\techo html_e('script', array('type' => 'text/javascript', 'src' => util_make_uri('/js/common.js')), '', false);\n\t\tplugin_hook(\"javascript_file\");\n\n\t\t// invoke the 'javascript' hook for custom javascript addition\n\t\t$params = array('return' => false);\n\t\tplugin_hook(\"javascript\", $params);\n\t\t$javascript = $params['return'];\n\t\tif($javascript) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript')).'//<![CDATA['.\"\\n\";\n\t\t\techo $javascript;\n\t\t\techo \"\\n\".'//]]'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t\thtml_use_storage();\n\t\thtml_use_coolfieldset();\n\t\thtml_use_jqueryui();\n\t\techo $this->getJavascripts();\n\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\techo '\t//<![CDATA[\n\t\t\tjQuery(window).load(function(){\n\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\tsetInterval(function() {\n\t\t\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\t\t}, 5000);\n\t\t\t});\n\t\t\t//]]>'.\"\\n\";\n\t\techo html_ac(html_ap() -1);\n\t\tif ($use_tooltips) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\t\techo '\t//<![CDATA[\n\t\t\t\tjQuery(document).ready(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tjQuery(document).tooltip();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t//]]>'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t}", "private function addJS()\n {\n Filters::add('scripts', array($this, 'renderRevisionsJS'));\n }", "function js($args) {\n\t\t//Determine the current theme location\n\t\t$theme_location = $this->theme_location;\n\t\t$file_location = $theme_location . '/static/js/' . implode('/', $args);\n\t\t// Maybe check for a less file to compile and compile it\n//\t\t$this->less_check($file_location);\n\n\n\t\tif (file_exists($file_location)) {\n\t\t\theader(\"Content-Type: text/javascript\");\n\t\t\theader(\"X-Content-Type-Options: nosniff\");\n\n\t\t\theader(\"Access-Control-Allow-Origin:*\");\n\t\t\theader('Cache-Control:public, max-age=30672000');\n\n\t\t\techo file_get_contents($file_location);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->_404();\n\t\t\tdie();\n\t\t}\n\t}", "function js()\n{\n\t$jsbegin = '<script type=\"text/javascript\" src=\"';\n\t$jsend = '\"></script>';\n//\tif (current_user_can('administrator')) $jspath = '/js/';\n\t$jspath = '/js/'; //$csspath='/js/';\n\t$name = substr(basename(get_page_template()), 0, -4) . '.js';\n\t$filename = get_stylesheet_directory() . $jspath . $name;\n\tif (file_exists($filename)) return $jsbegin . get_template_directory_uri() . $jspath . $name . '?v=' . filemtime($filename) . $jsend;\n\telse { //create new file if no exists\n\t\t$fp = fopen($filename, \"w\");\n\t\tfwrite($fp, '(function() { YOU Script })();');\n\t\tfclose($fp);\n\t\treturn $jsbegin . get_template_directory_uri() . $jspath . $name . $jsend;\n\t}\n}", "public function registerScriptsFrontend() {\n $v = Wpjb_Project::VERSION;\n $p = plugins_url().'/wpjobboard/public/js/';\n \n wp_register_script('wpjb-js', $p.'frontend.js', array(\"jquery\"), $v );\n \n wp_register_script('wpjb-payment', $p.'frontend-payment.js', array(\"jquery\"), $v );\n wp_register_script('wpjb-serialize', $p.'serialize.js', array(), $v, true);\n wp_register_script('wpjb-alert', $p.'frontend-alert.js', array(\"jquery\", \"wp-util\", 'wpjb-serialize'), $v, true);\n wp_register_script('wpjb-manage', $p.'frontend-manage.js', array(\"jquery\"), $v, true);\n wp_register_script('wpjb-manage-apps', $p.'frontend-manage-apps.js', array(\"jquery\"), $v, true);\n \n wp_register_script(\"wpjb-paypal-reply\", $p.\"wpjb-paypal-reply.js\", array(\"jquery\"), $v);\n\n }", "private static function addJs(Zend_View $view, $js){\n\t\t\n\t\t// Custom XML file inclusion of the js files\r\n\t\tif (! empty ( $js )) {\r\n\t\t\tforeach ( $js as $item ) {\r\n\t\t\t\t$view->headScript ()->appendFile ( $item );\r\n\t\t\t}\r\n\t\t}\n\t}", "function options_general_add_js()\n {\n }", "static function createJSList()\n {\n $result=\"\";\n if(!empty(self::$arr_js_list))\n foreach (self::$arr_js_list as $js_file => $file_location)\n {\n if ($file_location == \"common\")\n $result.='<script type=\"text/javascript\" src=\"js/'.$js_file.'.js\"> </script>';\n elseif ($file_location == \"component\")\n $result.='<script type=\"text/javascript\" src=\"components/'.$js_file.'/js/'.$js_file.'.js\"> </script>';\n }\n\n self::putData(\"js_list\",$result,\"L\");\n self::$js_list = $result;\n }", "function ft_hook_add_js_file() {}", "public function enableConcatenateJavascript() {}", "public function getHeadJavascript()\n\t{\n\n $url = Config::$url;\n $googleAnalyticsToken = Config::$googleAnalyticsToken;\n\n\t\treturn<<<js\n<script type=\"text/javascript\" data-comment=\"Google Analytics\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '$googleAnalyticsToken']);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n</script>\n\n<!-- package-javascript\nAll external javascript file, including the minified SNAP javascript,\nare listed here and in the project makefile to be bundled into a single\njavascript file. The 'package-javascript' and 'end-package' tokens\nare used to determine the region to be replaced with a single script inclusion.\n\nIf you add a file here, you must add it to the makefile for packaging. See the README in the js/ directory.\n-->\n<script src=\"js/underscore-min.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery-1.8.2.min.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery.blockUI.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery.hoverIntent.minified.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.cycle.all.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.url.js\" type=\"text/javascript\"></script>\n<script src=\"js/plugins.js\" type=\"text/javascript\"></script>\n<script src=\"js/highcharts.js\" type=\"text/javascript\"></script>\n<script src=\"js/exporting.src.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery-ui-1.8.24.custom.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.ba-hashchange.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.validate.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.ba-bbq.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.scrollTo-min.js\" type=\"text/javascript\"></script>\n\n<script src=\"js/licenseModal.js\" type=\"text/javascript\"></script>\n<script src=\"js/charts.js\" type=\"text/javascript\"></script>\n<script src=\"js/maps.js\" type=\"text/javascript\"></script>\n<!-- end-package -->\n\n<script type=\"text/javascript\">\n\n// Interpolate server-side configs as appropriate\nwindow.snapConfig = {\n url: '$url',\n geonetworkMetadataUrl: 'http://athena.snap.uaf.edu:8080/geonetwork/srv/en/metadata.show.embedded?id=',\n dataPath: '/data/'\n}\n</script>\n\njs;\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "private function _print_html_head_javascript()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t//Check if theme defined\n\t\t$theme = ($this->theme) ? $this->theme : '';\n\t\t\n\t\tforeach($this->jss as $script) {\n\t\t\t$skip = FALSE;\n\t\t\t\n\t\t\t$fullpath = $script;\n\t\t\t\n\t\t\tif (!substr_count($fullpath, '//')) {\n \t\t\t$partpath = (strpos($script, '.js') === FALSE) ? \"{$theme}js/{$script}.js\" : $script;\n \t\t\t$fullpath = Ashtree_Common::get_real_path($partpath, TRUE);\n \t\t\t$this->_debug->log(\"INFO\", \"Including script '{$fullpath}'\");\n\t\t\t\n\t\t\t\n \t\t\tif (!file_exists($fullpath)) {\n \t\t\t\t$this->_debug->status('ABORT');\n \t\t\t\t\n \t\t\t\t$partpath = \"js/{$script}.js\";\n \t\t\t\t$fullpath = ASH_BASEPATH . $partpath;\n \t\t\t\t$this->_debug->log(\"INFO\", \"Including script '{$fullpath}'\");\n \t\t\t\n \t\t\t\tif (!file_exists($fullpath)) {\n \t\t\t\t $skip = TRUE;\n \t\t\t\t} else {\n \t\t\t\t $this->_debug->clear();\n \t\t\t\t}\n \t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($skip) {\n\t\t\t\t$this->_debug->status('ABORT');\n\t\t\t} else {\n\t\t\t\t$this->_debug->status('OK');\n\t\t\t\t$fullpath = (substr_count($fullpath, '//')) ? $fullpath : Ashtree_Common::get_real_path($fullpath);\n\t\t\t $output .= \"<script type=\\\"text/javascript\\\" src=\\\"{$fullpath}\\\"></script>\\n\";\n\t\t\t}\n\t\t}//foreach\n\t\t\n\t\t\t\t\n\t\tforeach($this->element as $script) {\n\t\t\t$output .= \"{$script}\\n\";\n\t\t}//foreach\n\t\t\n\t\t$output .= \"<script type=\\\"text/javascript\\\">\\n\";\n\t\t$output .= \"\\t\\$(document).ready(function(){\\n\";\n\t\tforeach($this->jquery as $script) {\n\t\t\t$output .= \"\\t\\t{$script}\\n\";\n\t\t}//foreach\n\t\t\n\t\t$output .= \"\\t});\\n\\n\";\n\t\t\n\t\tforeach($this->javascript as $script) {\n\t\t\t$output .= \"\\t{$script}\\n\";\n\t\t}//foreach\n\t\t\n\t\t$output .= \"</script>\\n\";\n\t\t\n return $output;\n\t}", "public function add_js()\n\t{\n $args = func_get_args();\n foreach ( $args as $a ){\n if ( is_array($a) ){\n $data = $a;\n }\n else if ( is_string($a) ){\n $path = $a;\n }\n }\n if ( $r = $this->get_view(isset($path) ? $path : '', 'js') ){\n $this->add_script($this->render($r, isset($data) ? $data : $this->data));\n }\n\t\treturn $this;\n }", "function add_js() {\n // È possibile aggiungere un file js presente nella cartella del tema\n wp_register_script('main_js', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true);\n wp_enqueue_script('main_js');\n\n // È possibile aggiungere un url remoto (es. CDN)\n // wp_register_script('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js', array('jquery'), null, true);\n // wp_enqueue_script('select2');\n\n // Inoltre è possibile aggiungere un css solo se una determinata condizione è vera\n // In questo esempio aggiungiamo il file home.css solo se ci troviamo sulla pagina di home\n // if(is_home()) {\n // wp_register_script('home_js', get_template_directory_uri() . '/js/home.js', array('jquery'), null, true);\n // wp_enqueue_script('home_js');\n // }\n}", "protected function renderJavaScriptAndCss() {}", "function _ext_scripts()\r\n\t{\r\n\t\t$str = '';\r\n\r\n\t\t/* -------------------------------------------\r\n\t\t/* 'cp_js_end' hook.\r\n\t\t/* - Add Javascript into a file call at the end of the control panel\r\n\t\t/* - Added 2.1.2\r\n\t\t*/\r\n\t\t\t$str = $this->extensions->call('cp_js_end');\r\n\t\t/*\r\n\t\t/* -------------------------------------------*/\r\n\t\t\r\n\t\t$this->output->out_type = 'cp_asset';\r\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\r\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\"); \r\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\r\n\t\t$this->output->set_output($str);\r\n\t}", "public function getJavaScript() {}", "function addCommonJs() {\n\t\t// call parent if need RunnerJS API \n\t\tRunnerPage::addCommonJs();\n\t\t\n\t\t$this->addJsGroupsAndRights();\t\t\n\t}", "function _ext_scripts()\n\t{\n\t\t$str = '';\n\n\t\t/* -------------------------------------------\n\t\t/* 'cp_js_end' hook.\n\t\t/* - Add Javascript into a file call at the end of the control panel\n\t\t/* - Added 2.1.2\n\t\t*/\n\t\t\t$str = $this->extensions->call('cp_js_end');\n\t\t/*\n\t\t/* -------------------------------------------*/\n\n\t\t$this->output->out_type = 'cp_asset';\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\");\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\n\t\t$this->output->set_output($str);\n\t}", "function _javascript($view) {\n switch ($view) {\n case 'invoices_add':\n $java = array(\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.waypoints.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.counterup.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-toastr/toastr.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/datatable.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/datatables/datatables.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/app.min.js'\",\n \"'\" . base_url() . \"../assets/pages/scripts/table-datatables-responsive.js'\",\n \"'\" . base_url() . \"../assets/layouts/layout/scripts/layout.min.js'\",\n );\n\t\t\t\t\n break;\n case 'invoices_view':\n $java = array(\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.waypoints.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/counterup/jquery.counterup.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-toastr/toastr.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/app.min.js'\",\n \"'\" . base_url() . \"../assets/layouts/layout/scripts/layout.min.js'\",\n );\n\t\t\t\t\n break;\n }\n return $java;\n }", "public function registerScripts() {\r\n\t\t$baseUrl = Yii::app()->assetManager->publish(dirname(__FILE__).\"/assets/\".__CLASS__);\r\n\t\tYii::app()->clientScript->registerScriptFile($baseUrl.\"/AFileBrowser.js\");\r\n\t\t\r\n\t}", "protected function addAdditionalScript() {\necho <<< HTML\n <script src=\"scripts/ajax.js\"></script>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"styles/customer.css\">\nHTML; \n }", "function src_inc_js(string $file) : string{\n return \"<script type='text/javascript' src='\".$file.\"'></script>\";\n}", "function skShortIncludeJsActivators() {\r\n\t\t$output = \"\r\n\t\t<script type=\\\"text/javascript\\\">\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\tjQuery('.sktooltip').each(function() {\r\n\t\t\t\t\tjQuery(this).SKTooltip();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.sk-notification').each(function() {\r\n\t\t\t\t\tjQuery(this).closeNotification();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.skimage-slider').each(function() {\r\n\t\t\t\t\tjQuery(this).skImageSlider();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.sktoggle-open, .sktoggle-closed').each(function() {\r\n\t\t\t\t\tjQuery(this).skToggle();\r\n\t\t\t\t});\r\n\t\t\t\tjQuery('.sktabbed').each(function() {\r\n\t\t\t\t\tjQuery(this).skTabbed();\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t</script>\";\r\n\t\techo $output;\r\n\t}", "function add_css_js()\n\t{\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\tdefine('CSS_JS_PARSED', true);\n\t\t}\n\n\t\t// Include custom CSS from templates/CURRENT_TPL folder\n\t\tif(is_array($this->css_style_include) && !empty($this->css_style_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_style_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_style_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_style_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom CSS from templates/common folder\n\t\tif(is_array($this->css_include) && !empty($this->css_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->css_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('css_include', array(\n\t\t\t\t\t'CSS_FILE' => $this->css_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Include custom JS from templates/common folder\n\t\tif(is_array($this->js_include) && !empty($this->js_include))\n\t\t{\n\t\t\tfor ($i = 0; $i < sizeof($this->js_include); $i++)\n\t\t\t{\n\t\t\t\t$this->assign_block_vars('js_include', array(\n\t\t\t\t\t'JS_FILE' => $this->js_include[$i],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function sharethis_include_js();", "function _javascript($view) {\n switch ($view) {\n case 'credit_list':\n $java = array(\n \"'\" . base_url() . \"../assets/global/plugins/jquery.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/jquery-migrate.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/jquery-ui/jquery-ui.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap/js/bootstrap.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/jquery.blockui.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/jquery.cokie.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/uniform/jquery.uniform.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/bootstrap-select/bootstrap-select.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/select2/select2.min.js'\",\n \"'\" . base_url() . \"../assets/global/plugins/jquery-multi-select/js/jquery.multi-select.js'\",\n \"'\" . base_url() . \"../assets/global/scripts/metronic.js'\",\n \"'\" . base_url() . \"../assets/admin/layout/scripts/layout.js'\",\n \"'\" . base_url() . \"../assets/admin/layout/scripts/quick-sidebar.js'\",\n \"'\" . base_url() . \"../assets/admin/layout/scripts/demo.js'\",\n \"'\" . base_url() . \"../assets/admin/pages/scripts/index.js'\",\n \"'\" . base_url() . \"../assets/admin/pages/scripts/tasks.js'\",\n \"'\" . base_url() . \"../assets/admin/pages/scripts/components-dropdowns.js'\"\n\t\t\t\t\t\n );\n break;\n }\n return $java;\n }", "public function customJS() {\n\n\t if ( isset( $this->options['customJS'] ) ){\n\n\t \t$content = \"<script type='text/javascript'>\\n\";\n\t \t$content .= $this->options['customJS'].\"\\n\";\n\t \t$content .= \"</script>\";\n\n\t \techo $content;\n\t }\n\t}", "private function registerClientScripts()\n {\n $view = $this->getView();\n\n TranslitAsset::register($view);\n\n $replace = Json::htmlEncode(TranslitHelper::$replace);\n $view->registerJs(\"translit.replace = $replace;\", $view::POS_READY, 'translit');\n }", "function _getJSscripts(&$scriptList, $filenames)\n\t{\n\t\tclearstatcache();\n\t\t$jsfile_path = JPATH_SITE.DS.\"components\".DS.\"com_jbolo\".DS.\"js\".DS.\"jbolojs.php\";\n\t\t//combine and minify js\n\t\tif($this->params->get('comb_mini') && is_writable($jsfile_path))\n\t\t{\n\t\t\t//$sitepath= JPATH_SITE;\n\t\t\t$sitepath=JPATH_SITE.'/';\n\t\t\tforeach($filenames as $file){\n\t\t\t\tif($file[0] == '/'){\n\t\t\t\t\t//$js_script[] = \"include('\".$sitepath.\"/components/com_jbolo\".$file.\"');\";\n\t\t\t\t\t$js_script[] = \"include('\".$sitepath.$file.\"');\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//$js_script[] = \"include('\".$sitepath.\"/components/com_jbolo/js/\".$file.\"');\";\n\t\t\t\t\t$js_script[] = \"include('\".$sitepath.$file.\"');\";\n\t\t\t\t}\n\t\t\t}//end foreach\n\t\t\t//$js_script[] = \"include('\".JRoute::_('index.php?option=com_jbolo&view=js&format=raw').\"');\";\n\t\t\t$js_script = implode(\"\\n\",$js_script);\n\n\t\t\t$jsgzip='header(\"Content-type: text/javascript;\");\n\t\t\t\tob_start(\"compress\");\n\t\t\t\tfunction compress($buffer){\n\t\t\t\t\t/* remove comments */\n\t\t\t\t\t$buffer = preg_replace(\"!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!\", \"\", $buffer);\n\t\t\t\t\t/* remove tabs, spaces, newlines, etc. */\n\t\t\t\t\t$buffer = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", \" \", \" \", \" \"), \"\", $buffer);\n\t\t\t\t\treturn $buffer;\n\t\t\t\t}';\n\n\t\t\t$data = \"<?php \".$jsgzip .\"\\n\".$js_script.\"\\n ob_end_flush();?>\";\n\t\t\tif(JFile::write($jsfile_path, $data)){\n\t\t\t\t$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().'components/com_jbolo/js/jbolojs.php\"> </script>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\tforeach($filenames as $file){\n\t\t\t\t\tif($file[0] == '/'){\n\t\t\t\t\t\t//$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().'components/com_jbolo'.$file.'\"> </script>';\n\t\t\t\t\t\t$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().$file.'\"> </script>';\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().'components/com_jbolo/js/'.$file.'\"> </script>';\n\t\t\t\t\t\t$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().$file.'\"> </script>';\n\t\t\t\t\t}\n\t\t\t\t}//end foreach\n\t\t\t}\n\t\t}//end if\n\t\telse{\n\t\t\tforeach($filenames as $file){\n\t\t\t\tif($file[0] == '/'){\n\t\t\t\t\t//$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().'components/com_jbolo'.$file.'\"> </script>';\n\t\t\t\t\t$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().$file.'\"> </script>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().'components/com_jbolo/js/'.$file.'\"> </script>';\n\t\t\t\t\t$scriptList[]='<script type=\"text/javascript\" src=\"'.JURI::root().$file.'\"> </script>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function js($arquivo);", "function ajouter_liens_javascript($java)\n{\n\tif ($java == \"2\")\n\t{\n\t\t$javascript = ecrire_js();\n\t\t$javascript .= bbcode_js();\n\t}\n\telse\n\t{\n\t\t$javascript = \"\";\n\t}\n\treturn $javascript;\n}", "public function js_includes()\n {\n }", "public static function addJavascript($file)\n\t{\n\t\t$html = '<script type=\"text/javascript\" src=\"' . Config::get('site_url') . '/javascript/' . $file . '\"></script>';\n\t\t\n\t\tTemplate::instance()->smarty->tpl_vars['js_files']->value .= \"\\n\" . $html;\n\t}", "public function getCompressJavascript() {}", "protected function regScripts() {\n // Check the settings, turn jQquery\n $jscripts = array(\n $this->config['jsUrl'] . 'web/lib/jquery.history.js',\n $this->config['jsUrl'] . 'web/lib/jquery.autogrow.js',\n $this->config['jsUrl'] . 'web/lib/jquery.misc.js',\n $this->config['jsUrl'] . 'web/lib/jquery.scrollTo.js',\n $this->config['jsUrl'] . 'web/ejs_production.js',\n $this->config['jsUrl'] . 'web/lib/timeago.js',\n $this->config['jsUrl'] . 'web/bbcode/bbcode.js',\n $this->config['jsUrl'] . 'web/highlight.pack.js',\n );\n\n // Add jquery if not exist\n $this->modx->regClientHTMLBlock('<script type=\"text/javascript\">\n if(typeof jQuery == \"undefined\") {\n document.write(\"<script src=\\\"' . $this->config['jsUrl'] . 'web/lib/jquery-1.9.min.js\\\" type=\\\"text/javascript\\\"><\\/script>\");\n }\n</script>');\n\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.history.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.autogrow.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.misc.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/jquery.scrollTo.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/ejs_production.js');\n\n if (!$this->revers) {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/modxtalks.js');\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/scrubber.js');\n } else {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/modxtalks_rev.js');\n }\n\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/timeago.js');\n // Localization for timeago plugin\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/lib/timeago/' . $this->lang . '.js');\n\n // Add a button at quoting the resource allocation in the footer\n $this->modx->regClientHTMLBlock('<div id=\"mt_MTpopUpBox\"><span class=\"\">' . $this->modx->lexicon('modxtalks.quote_text') . '</span></div>');\n\n // Check the settings, turn BBCode\n if ($this->config['bbcode']) {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/bbcode/bbcode.js');\n }\n\n // Check the settings, turn Highlight\n if ($this->modx->getOption('modxtalks.highlight', null, false)) {\n $this->modx->regClientScript($this->config['jsUrl'] . 'web/highlight.pack.js');\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/highlight/' . strtolower($this->modx->getOption('modxtalks.highlighttheme', null, 'GitHub')) . '.css');\n }\n\n return true;\n }", "public function inline_js(){\n\n $this->render_js_vars();\n $js = file_get_contents(Helper::asset('client.js'));\n echo view('@AgreablePollPlugin/scripts.twig', [\n 'js_path' => Helper::asset('client.js'),\n 'js' => $js,\n ])->getBody();\n\n }", "public static function js() {\r\n\t\t\t$s = '';\r\n\t\t\tforeach(func_get_args() as $js) {\r\n\t\t\t\t$file = WEB_ROOT . '/' . $js;\r\n\t\t\t\tif(!file_exists($file)) {\r\n\t\t\t\t\tABPF::logger()->error(\"JS file $file doesn't exist!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$v = filemtime($file);\r\n\t\t\t\t$s .= sprintf('<script type=\"text/javascript\" src=\"%s/%s?v=%d\"></script>', BASE_URL, $js, $v);\r\n\t\t\t}\r\n\t\t\treturn $s;\r\n\t\t}", "public function ajouterScript($fichierJS) {\r\n $chemin = 'javascript/';\r\n $suffixe = '.js';\r\n $jsfile=$chemin . $fichierJS . $suffixe;\r\n if(!is_readable($jsfile)) die(\"ERROR $jsfile inexistant\");\r\n \r\n array_push($this->script, \"$jsfile\");\r\n \r\n \r\n }", "public function insert_js_code() {\n echo \"\\n<script>\\n\" . $this->getJsCodeToEcho($this->pluginCommon->optGid(), array(\n 'log' => $this->pluginCommon->optUseLogging(),\n 'localserver' => $this->isIgnoredServer(),\n )) . '</script>' . \"\\n\";\n }", "public function js(){\n if (func_num_args() > 0){\n for ($i = 0; $i < func_num_args(); $i++){\n $filename = func_get_arg($i); // Fatal error: func_get_arg(): Can't be used as a function parameter\n array_push($this->js, $this->javascript_tag($filename));\n }\n }\n \n return join($this->js, \"\\n\");\n }", "public function getConcatenateJavascript() {}", "function block__custom_javascripts(){\n $app =& Dataface_Application::getInstance();\n $record =& $app->getRecord();\n \n echo \"\\t\\t<!-- jQuery library (served from Google) -->\\n\";\n echo \"\\t\\t<script src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'></script>\\n\";\n echo \"\\t\\t<!-- load OpenLayers -->\\n\";\n echo \"\\t\\t<script src='js/ol/OpenLayers.js'></script>\\n\";\n echo \"<script type='text/javascript' src='js/stations.js'></script>\\n\";\n \n /*parse Station information to Javascript using JSON*/\n if(isset($record)){ \n echo \"<script type='text/javascript'>\";\n echo \"var Station ={'name':'\".$record->val('name_station').\"','lon':'\".\n $record->val('longitude').\"','lat':'\".$record->val('latitude').\"'};\";\n echo \"</script>\";\n }\n }", "function js_include()\n {\n $args = func_get_args();\n\n $js_lookup_table = [\n 'jquery' => '/ext/jquery-3.1.1.min.js',\n 'tinymce' => '/ext/tinymce/tinymce.min.js',\n 'pagination' => '/ext/pagination.min.js',\n 'featherlight' => '/ext/featherlight.min.js',\n 'featherlight-gallery' => '/ext/featherlight.gallery.min.js',\n 'chosen' => '/ext/chosen_v1.6.2/chosen.jquery.min.js',\n 'qtip' => '/ext/jquery.qtip.min.js'\n ];\n\n foreach( $args as $arg )\n {\n if( isset( $js_lookup_table[$arg] ) )\n $arg = $js_lookup_table[$arg];\n\n echo \"<script src=\\\"/common/js/$arg\\\"></script>\";\n }\n }", "public function addJS($strFile) {\n\t\t\t$strFile = fixPath($strFile); \n\t\t\tif (!in_array($strFile, $this->arJS)) array_push($this->arJS, $strFile); \n\t\t}", "function libreriasJS(){\n\t\t$libreriasJAVA='<script type=\"text/javascript\" src=\"js/jquery-2.min.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/jqueryui.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/funComunes.js\"></script>\n\t\t\t \t<link type=\"text/css\" href=\"css/jquery-ui-min.css\" rel=\"stylesheet\" />\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n\t\treturn $libreriasJAVA;\n\t}", "public function includeAssets()\n {\n $this->Html->script('CkTools.vendor/tinymce/jquery.tinymce.min.js', ['block' => true]);\n $this->Html->script('CkTools.vendor/moxiemanager/js/moxman.loader.min.js', ['block' => true]);\n }", "protected function _addJs() {\n\t\t$checkUrl = $this->Html->url([\n\t\t\t'plugin' => 'vat_number_check', 'controller' => 'vat_number_checks', 'action' => 'check', 'ext' => 'json'\n\t\t]);\n\t\t$checkImages = [\n\t\t\t'ok' => $this->Html->url('/vat_number_check/img/ok.png'),\n\t\t\t'failure' => $this->Html->url('/vat_number_check/img/failure.png'),\n\t\t\t'serviceUnavailable' => $this->Html->url('/vat_number_check/img/service-unavailable.png'),\n\t\t];\n\n\t\t$script = \"\n\t\t\t/* jshint jquery:true */\n\n\t\t\tjQuery.noConflict();\n\t\t\t(function($) {\n\t\t\t\t$(function () {\n\t\t\t\t\tvar options = {\n\t\t\t\t\t\telementSelector: '\" . sprintf('input.%s', $this->_inputClass) . \"',\n\t\t\t\t\t\tcheckUrl: '\" . $checkUrl . \"',\n\t\t\t\t\t\tcheckImages: \" . json_encode($checkImages) . \",\n\t\t\t\t\t};\n\t\t\t\t\tvar vatNumberCheck = new VatNumberCheck(options);\n\t\t\t\t});\n\t\t\t})(jQuery);\n\t\t\";\n\n\t\t$this->Html->script([\n\t\t\t'VatNumberCheck.jquery.min', 'VatNumberCheck.klass.min', 'VatNumberCheck.vat_number_check'\n\t\t], ['inline' => false, 'once' => true]);\n\t\t$this->Html->scriptBlock($script, ['inline' => false]);\n\t}", "public function addScript($js) {\r\n $this->body[] = self::getScript($js);\r\n }", "public function getJavaScripts() {\n return array_merge(parent::getJavaScripts(), array(\n '/sfEPFactoryFormPlugin/js/jquery.min.js',\n '/sfAdminTemplatePlugin/js/jquery.fancybox-1.3.4.pack.js',\n 'ficheForm.js'\n ));\n }", "public function add_js($js) {\n $current = $this->dwoo_data->js_files;\n $current[] = $js;\n $this->dwoo_data->js_files = $current;\n }", "function js_tag($file, $dir = 'javascripts', $version = OMEKA_VERSION)\n{\n $href = src($file, $dir, 'js', $version);\n return '<script type=\"text/javascript\" src=\"' . html_escape($href) . '\" charset=\"utf-8\"></script>';\n}", "function cookiebar_insert_head($flux){\n //$js_cookiebar = parametre_url(generer_url_public('jquery.cookiebar.js'), 'lang', $lang); \n if (!$lang) $lang = $GLOBALS[\"spip_lang\"];\n $js_cookiebar = produire_fond_statique(\"jquery.cookiebar.js\", array(\"lang\"=>$lang));\n\n $flux .= \n \"<script type='text/javascript' src='$js_cookiebar'></script>\\n\"\n . \"<script type='text/javascript' src='\".find_in_path('js/jquery.cookiebar.call.js').\"'></script>\";\n \n return $flux;\n}", "function wpi_theme_js() {\n\n global $wp_scripts;\n\n wp_register_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false);\n wp_register_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false);\n\n $wp_scripts->add_data('html5_shiv', 'conditional', 'lt IE 9');\n $wp_scripts->add_data('respond_js', 'conditional', 'lt IE 9');\n/**\n * Load javascripts used by the theme\n */\n\n\n\n \n wp_enqueue_script('main_js', get_template_directory_uri(). '/js/main.js', array('jquery'), '', true);\n wp_enqueue_script('bootstrap_js', get_template_directory_uri(). '/js/bootstrap.min.js', array('jquery'), '', true);\n \n \n \n \n\n }", "public function script() {\r\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\r\n\t\t\t$page = pzk_page();\r\n\t\t\tif ($page) {\r\n\t\t\t\t$page->addJsInst($this->toArray());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function registerClientScript() {\n\n// $_cssFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jquery.innerfade/css/jq_fade.css';\n// $cssFile = Yii::app()->getAssetManager()->publish($_cssFile);\n// Yii::app()->getClientScript()->registerCssFile($cssFile);\n\n $_jsFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'jquery.innerfade/js/jquery.innerfade.js';\n $jsFile = Yii::app()->getAssetManager()->publish($_jsFile);\n\n Yii::app()->getClientScript()->registerScriptFile($jsFile);\n }", "public function addJSFile($filePath) {\n $this->addToHead(\"<script src=\\\"\" . $filePath . \"\\\"></script>\", Page::BOTTOM);\n }", "protected function insertScriptElements() {\n\t\t$base = $this->doc->createElement('base');\n\t\t$base->setAttribute('href', WP_Insights_Utils::url_get_base($this->record['url']));\n\t\t$ini_comm = $this->doc->createComment(\" begin wpi tracking code \");\n\t\t$end_comm = $this->doc->createComment(\" end wpi tracking code \");\n\t\t$api_comm = $this->doc->createComment(\" load wpi drawing API \");\n\t\t// point to (smt) aux functions\n\t\t//$js_aux = $this->doc->createExternalScript($this->auxjspath);\n\t\t$js_replayer = $this->doc->createExternalScript($this->js_replayer_path);\n\t\t$js_create = $this->doc->createExternalScript($this->js_create_path);\n\t\t// and peppy selector library\n\t\t//$js_selector = $this->doc->createExternalScript($this->selectorjspath);\n\t\t// rebuild parsed page\n\t\t$head = $this->doc->getElementsByTagName('head');\n\t\tforeach ($head as $h) {\n\t\t\t// loading order is crucial!\n\t\t\t$h->insertBefore($base, $h->firstChild);\n\t\t\t$h->appendChild($ini_comm);\n\t\t\t$h->appendChild($js_create);\n\t\t\t$h->appendChild($js_replayer);\n\t\t\t$h->appendChild($this->js_user_data);\n\t\t\t/*$h->appendChild($js_selector);\n\t\t\tif (isset($js_widget)) $h->appendChild($js_widget);\n\t\t\t$h->appendChild($api_comm);\n\t\n\t\t\tif ($this->api == \"js\") {\n\t\t\t\t$h->appendChild($this->js_graphics);\n\t\t\t\t$h->appendChild($this->js_json);\n\t\t\t} else if ($this->api == \"swf\") {\n\t\t\t\t$h->appendChild($this->js_swfobject);\n\t\t\t\t$h->appendChild($this->css_swf);\n\t\t\t}*/\n\t\t\t$h->appendChild($end_comm);\n\t\t}\n\t\t// append tracking script at the end of the page body\n\t\t/*$body = $this->doc->getElementsByTagName('body');\n\t\tforeach ($body as $b) {\n\t\t\tif ($this->api == \"js\") {\n\t\t\t\t$b->appendChild($this->js_replay);\n\t\t\t\t$b->appendChild($this->js_options);\n\t\t\t} else if ($this->api == \"swf\") {\n\t\t\t\t$b->appendChild($this->js_swf);\n\t\t\t}\n\t\t}*/\n\t}", "function addJS($src, $async, $defer){\n echo '<script src=\"'. $src .'\"'. ($async? \" async\":\"\") . ($defer? \" defer\":\"\") .'> </script>';\n}", "public function enableCompressJavascript() {}", "public function addJs(){\r\n\t\treturn '<script type=\"text/javascript\" src=\"'.Mage::getBaseUrl('js').'interaktingslider/interaktingslider.js\"></script>';\r\n\r\n\t}", "public function js_template()\n {\n ?>\n <script id=\"js-builderius-setting-<?php \n echo $this->setting_key ;\n ?>-tmpl\" type=\"text/template\">\n <?php \n ?>\n </script>\n <?php \n }", "function pushScript ($script) {\n\t\t$this->_roof[\"cuerpo\"][] = \"<script type=\\\"text/javascript\\\" src=\\\"\".$script.\"\\\"></script>\";\n\t}", "private function coreJs() {\n $corejs = '';\n $corejs .= '<!--Core JS Files-->\n \n <script src=\"' . $this->baseUrl(\"assets/js/jquery-1.10.2.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/jquery-ui.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/bootstrap.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/jquery.validate.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/moment.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/bootstrap-datetimepicker.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/bootstrap-selectpicker.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/bootstrap-checkbox-radio-switch-tags.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/jquery.easypiechart.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/chartist.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/bootstrap-notify.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/sweetalert2.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/jquery-jvectormap.js\") . '\" type=\"text/javascript\"></script>\n \n <script src=\" ' . $this->baseUrl(\"../tc-merchant-template/assets/js/loader.js\") . ' \" type=\"text/javascript\"></script>\n \n <script src=\" ' . $this->baseUrl(\"assets/js/jquery.bootstrap.wizard.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/bootstrap-table.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/fullcalendar.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/paper-dashboard.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/jquery.sharrre.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"assets/js/demo.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"../tc-merchant-template/plugins/dropzone-master/dist/min/dropzone.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\" ' . $this->baseUrl(\"../tc-merchant-template/plugins/stepformwizard/assets/js/tsf-wizard-plugin.js\") . '\" type=\"text/javascript\"></script>';\n// $corejs .=$this->angularJs();\n// $corejs .=$this->angularBootstrapJs();\n\n\n $filenamePut=\"'\".$this->filename().\"'\";\n\n \n $corejs .='<script type=\"text/javascript\">\n\t\t\t\t\t$(document).ready(function(){\n\n\t\t\t\t\t\tvar getTest=$(\"a[href='.$filenamePut.']\").parent().parent().parent().parent(\"li\").html();\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif(getTest!=\"undefined\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$(\"a[href='.$filenamePut.']\").parent().addClass('.$this->PushSingleQuta('active').');\n\t\t\t\t\t\t\t$(\"a[href='.$filenamePut.']\").parent().parent().parent().parent(\"li\").children('.$this->PushSingleQuta('a').').click();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t});\n\t\t\t\t</script>';\n\n return $corejs;\n }", "function theme_page_javascript($custom_settings)\n{\n $theme_url = clearos_theme_url('AdminLTE');\n\n // The version is used to avoid upgrade/caching issues. Bump when required.\n $version = '7.0.0';\n\n // FIXME: review all of these\n return \"\n\n<script type='text/javascript' src='$theme_url/js/jquery.cookie.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.base64.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery-ui-1.11.1.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/bootstrap.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/lightbox.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.dotdotdot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-dialog/bootstrap-dialog.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/metisMenu/jquery.metisMenu.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/colorpicker/bootstrap-colorpicker.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/dataTables.bootstrap.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.rowReordering.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-slider/bootstrap-slider.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/sparkline/jquery.sparkline.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.resize.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.pie.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.time.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.stack.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.categories.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.flot.axislabels.js'></script>\n<script type='text/javascript' src='$theme_url/js/nav-menu-\" . $custom_settings['menu'] . \".js'></script>\n\n<!--[if IE 7]>\n\n<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>\n\n<![endif]-->\n\n<!-- Theme Javascript -->\n<script type='text/javascript' src='$theme_url/js/translations.js.php?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/widgets.js?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/marketplace.js?v=$version'></script>\n\n\n\";\n}", "function jehaann_scripts(){\n\n\n wp_register_script('scripts',RutaTema.'/js/scripts.js','','1.0','True');\n wp_enqueue_script('scripts');\n\n\n}" ]
[ "0.7429795", "0.726075", "0.7230732", "0.715833", "0.70189995", "0.70177704", "0.69847286", "0.6971382", "0.6909528", "0.68571126", "0.6753826", "0.67405796", "0.67283374", "0.6726846", "0.6699807", "0.6661973", "0.6615687", "0.6610511", "0.66078514", "0.66027665", "0.65975904", "0.6592071", "0.6578058", "0.65758914", "0.6567042", "0.6563187", "0.65224373", "0.652169", "0.6519474", "0.65071934", "0.64993906", "0.648267", "0.6480376", "0.6472007", "0.64717376", "0.64715475", "0.6465168", "0.64622724", "0.6460716", "0.6451384", "0.6451327", "0.6421217", "0.6421216", "0.64192694", "0.6419114", "0.6415958", "0.63934004", "0.6391277", "0.63856316", "0.63797283", "0.63791853", "0.63607526", "0.63605195", "0.6359494", "0.63492334", "0.63423103", "0.633527", "0.63329875", "0.6331451", "0.63224715", "0.63218975", "0.63177896", "0.63077563", "0.6307114", "0.63017684", "0.6298901", "0.6291877", "0.6280862", "0.627886", "0.6276274", "0.6276228", "0.6271686", "0.6267065", "0.62632877", "0.62594646", "0.6253964", "0.62419015", "0.62264675", "0.6225017", "0.6223568", "0.62227815", "0.6221145", "0.6217859", "0.6216528", "0.62160265", "0.62111557", "0.62082714", "0.62028176", "0.61928606", "0.61927783", "0.61919194", "0.6191868", "0.6187747", "0.618526", "0.6181275", "0.6177045", "0.6176474", "0.61666805", "0.6161075", "0.6159966", "0.6156291" ]
0.0
-1
Adiciona um arquivo CSS ao template bwHtml::css('contato.css'); bwHtml::css('ie8.css', 'ie < 9'); bwHtml::css('chrome.css', 'chrome'); bwHtml::css('
function css($url, $condition = false, $rel = 'Stylesheet') { if ($condition != false) { $b = new bwBrowser; if (!$b->isBrowser($condition)) return; } $template = bwTemplate::getInstance(); if (bwFile::exists($template->getPath() . DS . 'css' . DS . str_replace('/', DS, $url))) { $url = $template->getUrl() . '/css/' . $url; } $head = "<link type=\"text/css\" href=\"$url\" rel=\"$rel\" />"; bwHtml::addHead('css', $head); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function enteteCSS() {\r\n foreach (Page::getInstance()->css as $link) {\r\n ?>\r\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo $link; ?>\" />\r\n <?php\r\n }\r\n }", "protected function generateCSS() {}", "protected function addCSS() {\n foreach ($this->css_files as $css_file) {\n $this->header.=\"<link rel='stylesheet' href='\" . __ASSETS_PATH . \"/\" . $css_file . \"'/> \\n\";\n }\n }", "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin/'.pzk_app()->name.'/css/'.$this->cssLink.'.css\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page())\r\n\t\t\t\t\t$page->addObjCss($this->cssLink);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif ($this->cssExternalLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\r\n\t\t\t} else {\r\n\t\t\t\tif($page = pzk_page()) {\r\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "function css($arquivo);", "function incluirCSS($arquivo){ ?>\n\t\t<link href=\"css/<?=$arquivo?>.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\t<?php }", "function css()\n{\n\t$cssbegin = '<link rel=\"stylesheet\" href=\"';\n\t$cssend = '\">';\n//\tif (current_user_can('administrator')) $csspath = '/css/';\n\t$csspath = '/css/'; //$csspath='/css/';\n\t$name = substr(basename(get_page_template()), 0, -4) . '.css';\n\t$filename = get_stylesheet_directory() . $csspath . $name;\n\tif (file_exists($filename)) return $cssbegin . get_template_directory_uri() . $csspath . $name . '?v=' . filemtime($filename) . $cssend;\n\telse { //create new file if no exists\n\t\t$fp = fopen($filename, \"w\");\n\t\tfwrite($fp, 'This is new file, add your styles @media(min-width:992px){} @media(max-width:991px) and (min-width:601px){} @media(max-width:600px){}');\n\t\tfclose($fp);\n\t\treturn $cssbegin . get_template_directory_uri() . $csspath . $name . $cssend;\n\t}\n}", "function head_css()\n\t{\n\t\tqa_html_theme_base::head_css();\n\t\t// if if already added widgets have a css file activated\n\t\t$styles = array();\n\t\tforeach ($this->content['widgets'] as $region_key => $regions) {\n\t\t\tforeach ($regions as $template_key => $widgets) {\n\t\t\t\t$position = strtoupper(substr($region_key,0,1) . substr($template_key,0,1) );\n\t\t\t\tforeach ($widgets as $key => $widget) {\n\t\t\t\t\t$widget_name = get_class ($widget);\n\t\t\t\t\t$widget_key = $widget_name.'_'.$position;\n\t\t\t\t\t$file = get_widget_option($widget_key, 'uw_styles');\n\t\t\t\t\t// if file existed then put it into an array to prevent duplications\n\t\t\t\t\tif($file)\n\t\t\t\t\t\t$styles[$widget_name][$file]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add styling files to theme\n\t\tif($styles)\n\t\t\tforeach ($styles as $widget_name => $files)\n\t\t\t\tforeach ($files as $file => $verified)\n\t\t\t\t\tif( $file != 'none' )\n\t\t\t\t\t\t$this->output('<link rel=\"stylesheet\" href=\"'.UW_URL.'widgets/'.$widget_name.'/styles/'.$file.'\"/>');\n\t}", "public static function css();", "protected function doConcatenateCss() {}", "function add_css() \n {\n if( $this->options['use-css-file'] ) {\n wp_register_style( 'bbquotations-style' , $this->plugin_url . 'bbquotations-style.css');\n wp_enqueue_style( 'bbquotations-style' );\n } \n }", "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "function add_css($css, $tabs = 2)\n{\n /**\n * Add a css file into the html file.\n *\n * Args:\n * $css (str): the css file to add\n * $tabs (int): number of tabs for indentation, default is 2\n */\n Tab($tabs) ;\n echo \"<link rel='stylesheet' href='\" . $css . \"' />\" ;\n NL();\n}", "function loadCSS() {\n\t\t$first = true;\n\t\t$cssPart = '';\n\t\tforeach( $this->conf->css->file as $file ) {\n\t\t\tif( ! $first ) {\n\t\t\t\t$cssPart .= chr( 9 );\n\t\t\t}\n\t\t\t$cssPart .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"';\n\t\t\t$cssPart .= $this->conf->path->baseUrl . $this->conf->path->css . $file;\n\t\t\t$cssPart .= '\" />' . chr( 10 );\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\tif( count( $this->additionalCSS ) >= 1 ) {\n\t\t\tforeach( $this->additionalCSS as $key => $value ) {\n\t\t\t\t$cssPart .= '<style type=\"text/css\">' . chr( 10 );\n\t\t\t\t$cssPart .= $value . chr( 10 );\n\t\t\t\t$cssPart .= '</style>' . chr( 10 );\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn $cssPart;\n\t}", "function add_css($acss=array()) {\n\t\tforeach ($acss as $css) {\n\t\t\tif (isset($css[\"path\"]) && $css[\"path\"]!=\"\") {\n\t\t\t\t$priority = 0;\n\t\t\t\tif (isset($css[\"priority\"])) {\n\t\t\t\t\t$priority = $css[\"priority\"];\n\t\t\t\t}\n\t\t\t\t$condition = \"\";\n\t\t\t\tif (isset($css[\"condition\"])) {\n\t\t\t\t\t$condition = $css[\"condition\"];\n\t\t\t\t}\n\t\t\t\t$is_local = true;\n\t\t\t\tif (isset($css[\"is_local\"])) {\n\t\t\t\t\t$is_local = $css[\"is_local\"];\n\t\t\t\t}\n\t\t\t\t$this->custom_css[] = array(\"css\" => $css[\"path\"], \"priority\" => $priority, \"condition\" => $condition, \"is_local\" => $is_local);\n\t\t\t}\n\t\t}\n\t}", "protected function loadCss() {}", "public function css();", "function make_css( $args, $assoc_args ) {\n if ( class_exists( 'TF_Styling_Control' ) ) {\n if ( TF_Model::create_stylesheets() ) {\n WP_CLI::success( \"Stylesheet succesfully created.\" );\n } else {\n WP_CLI::error( \"Could not create stylesheet.\" );\n }\n }\n }", "function ft_hook_add_css() {}", "function add_css() {\n // È possibile aggiungere un file css presente nella cartella del tema\n wp_register_style('normalize', get_template_directory_uri() . '/vendor/normalize/normalize.css', array(), null, 'all');\n wp_enqueue_style('normalize');\n wp_register_style('main', get_template_directory_uri() . '/css/main.css', array('normalize'), null, 'all');\n wp_enqueue_style('main');\n\n // È possibile anche aggiungere un url remoto (es. Google Fonts)\n // wp_register_style('webfont', 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,500,600,700,800,900', array(), null, 'all');\n // wp_enqueue_style('webfont');\n\n // Inoltre è possibile aggiungere un css solo se una determinata condizione è vera\n // In questo esempio aggiungiamo il file home.css solo se ci troviamo sulla pagina di home\n // if(is_home()) {\n // wp_register_style('home', get_template_directory_uri() . '/css/home.css', array(), null, 'all');\n // wp_enqueue_style('home');\n // }\n}", "function css( $params ){\n\t\n\t\tglobal $mainframe;\n\t\t\n\t\t$document =& JFactory::getDocument();\n\t\t\n\t\t$cssFile = 'ja_contentslide.css';\n\t\n\t\tif( file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$cssFile) ) {\n\t\t\t$document->addStyleSheet( JURI::base().'templates/'.$mainframe->getTemplate().'/css/'.$cssFile );\n\t\t} else { \n\t\t\t$document->addStyleSheet( JURI::base().'modules/mod_ja_contentslide/assets/css/'.$cssFile );\n\t\t}\n\t}", "private function load_css () {\n $buffer = '';\n if (count($this->css_files)) {\n foreach ($this->css_files as $file) {\n $file = explode('/', $file);\n // TODO: use $this->config->item('modules_locations') for modules path\n $file = 'application/modules/'.$file[0].'/views/'.$this->get_skin().'/skin/'.implode('/',array_slice($file, 1));\n $buffer .= \"\\n\".'<link rel=\"stylesheet\" href=\"'.base_url($file).'\">';\n }\n return $buffer.\"\\n\";\n } else {\n return \"\\n\";\n }\n }", "private function \t\t\t\tbuild_style_tags() {\n\t\t$load=array(\n\t\t\t\"assets/css/bootstrap/bootstrap-grid.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap-reboot.min.css\",\n\t\t\t\"assets/css/bootstrap/bootstrap.min.css\",\n\t\t\t\"assets/css/fontawesome/all.min.css\",\n\t\t\t\"assets/css/style.css\"\n\t\t);\n\n\n\t\treturn array_reduce(array_unique(array_merge($load, $this->section_css)), function($_acum, $_item) {\n\t\t\t$_acum.=<<<R\n\n\t\t<link rel=\"stylesheet\" title=\"estilos\" type=\"text/css\" href=\"{$_item}\" media=\"screen\" />\nR;\n\t\t\treturn $_acum;\n}, '');\n\t}", "private function _include_css()\n {\n if ( !$this->cache['css'] )\n {\n $this->EE->cp->add_to_head('<style type=\"text/css\">\n .vz_range { padding-bottom:0.5em; }\n .vz_range input { width:97%; padding:4px; }\n .vz_range_min { float:left; width:46%; }\n .vz_range_max { float:right; width:46%; }\n .vz_range_sep { float:left; width:8%; text-align:center; line-height:2; }\n</style>');\n\n $this->cache['css'] = TRUE;\n }\n }", "function cookiebar_insert_head_css($flux){\n $flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path(\"css/jquery.cookiebar.css\").'\" />';\n return $flux;\n}", "function addCSSFiles()\n\t{\n\t\t$this->getContainer()->AddCSSFile(\"include/zoombox/zoombox.css\");\n\t}", "function css($args) {\n\t\t//Determine the current theme location\n\t\t$theme_location = $this->theme_location;\n\t\t$file_location = $theme_location . '/static/css/' . implode('/', $args);\n\t\t// Maybe check for a less file to compile and compile it\n\t\t$this->less_check($file_location);\n\n\n\t\tif (file_exists($file_location)) {\n\t\t\theader(\"Content-Type: text/css\");\n\t\t\theader(\"X-Content-Type-Options: nosniff\");\n\t\t\theader(\"Access-Control-Allow-Origin:*\");\n\t\t\theader('Cache-Control:public, max-age=30672000');\n\n\t\t\techo file_get_contents($file_location);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->_404();\n\t\t\tdie();\n\t\t}\n\t}", "function nectar_generate_options_css() {\n\n\t$nectar_options = get_nectar_theme_options(); \n\n\tif(!empty($nectar_options['external-dynamic-css']) && $nectar_options['external-dynamic-css'] == 1){\n\n\t\t$css_dir = get_stylesheet_directory() . '/css/'; \n\t\tob_start(); // Capture all output (output buffering)\n\n\t\t//include css\n\t\tnectar_colors_css_output();\n\t\tnectar_custom_css_output();\n\t\tnectar_fonts_output();\n\n\t\t$css = ob_get_clean(); // Get generated CSS (output buffering)\n\t\t\n\t\trequire_once( ABSPATH . 'wp-admin/includes/file.php' );\n\t\tglobal $wp_filesystem;\n\t\tWP_Filesystem();\n\t\t\n\t\t$wp_filesystem->put_contents($css_dir . 'dynamic-combined.css', $css, FS_CHMOD_FILE);\n\t\t\n\t\t//file_put_contents($css_dir . 'dynamic-combined.css', $css, LOCK_EX); // Save it\n\t\t\n\t}\n}", "public function formatCSS() {\n echo $this->head;\n echo \"<link rel='stylesheet' href='desktop.css'>\";\n }", "private function addCSS()\n {\n Filters::add('head', array($this, 'renderRevisionsCSS'));\n }", "private function _addCss() {\r\n JHtml::styleSheet( Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/list.css');\r\n }", "public function css(){\n if (func_num_args() > 0){\n for ($i = 0; $i < func_num_args(); $i++){\n $arg = func_get_arg($i); // Fatal error: func_get_arg(): Can't be used as a function parameter\n if (preg_match('/^(.+)\\[(.+)\\]$/', $arg, $matches)){\n $filename = $matches[1];\n $media = $matches[2];\n } else {\n $filename = $arg;\n $media = 'screen,projection';\n }\n \n array_push($this->css, $this->stylesheet_tag($filename, $media));\n }\n }\n \n return join($this->css, \"\\n\");\n }", "protected function saveCss()\n\t{\n\t\t$stylesheet = new \\File(str_replace(TL_ROOT . '/', '', $this->outputFolder . $this->cssFilename));\n\t\t$stylesheet->write($this->strStylesheet);\n\t\t$stylesheet->close();\n\t}", "function rainette_insert_head_css($flux) {\n\tstatic $done = false;\n\tif (!$done) {\n\t\t$done = true;\n\t\t$flux .= '<link rel=\"stylesheet\" href=\"' . find_in_path('rainette.css') . '\" type=\"text/css\" media=\"all\" />';\n\t}\n\n\treturn $flux;\n}", "public function automaticCss()\n \t{\n \t\t$css = array();\n \t\tif (isset($this->pluginPath)) {\n\t \t\t\n\t \t\t# CSS Plugin Path\n\t\t\t$css_path_plugin = $this->pluginPath . $this->constant['webroot'] . DS . $this->constant['cssBaseUrl'];\n\t\t\tif (is_file($css_path_plugin . $this->controller . '.css')) {\n\t\t \t$css[] = $this->plugin.'.'.$this->controller;\n\t\t \t}\n\n\t\t \tif (is_file($css_path_plugin . $this->controller . DS . $this->action . '.css')) {\n\t\t \t$css[] = $this->plugin.'.'.$this->controller . '/' . $this->action;\n\t\t \t}\n \t\t}\n \t\t\n \t\t$css_path = $this->constant['www_root'] . $this->constant['cssBaseUrl'];\n \t\tif (is_file($css_path . $this->controller . '.css')) {\n\t \t$css[] = $this->controller;\n\t\t}\n\n\t \tif (is_file($css_path . $this->controller . DS . $this->action . '.css')) {\n\t \t$css[] = $this->controller . DS . $this->action;\n\t\t}\n\t\treturn $this->css($css);\n \t}", "protected function loadStylesheets()\n {\n if (!empty($GLOBALS['TBE_STYLES']['stylesheet'])) {\n $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet']);\n }\n if (!empty($GLOBALS['TBE_STYLES']['stylesheet2'])) {\n $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet2']);\n }\n }", "public static function css() {\r\n\t\t\t$s = '';\r\n\t\t\tforeach(func_get_args() as $css) {\r\n\t\t\t\t$file = WEB_ROOT . '/' . $css;\r\n\t\t\t\tif(!file_exists($file)) {\r\n\t\t\t\t\tABPF::logger()->error(\"CSS file $file doesn't exist!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$v = filemtime($file);\r\n\t\t\t\t$s .= sprintf('<link rel=\"stylesheet\" type=\"text/css\" href=\"%s/%s?v=%d\" />', BASE_URL, $css, $v);\r\n\t\t\t}\r\n\t\t\treturn $s;\r\n\t\t}", "public function addCSSFiles($css /* array */);", "function generate_css() {\r\n global $config;\r\n\r\n $res = '';\r\n foreach ($config['css']as $v) {\r\n $res .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$v\\\"/>\";\r\n }\r\n return $res;\r\n}", "function includeCss($fileName) {\n $data = '<link type=\"text/css\" rel=\"Stylesheet\" href=\"'.BASE_PATH.'/public/css/'.$fileName.'.css\" />';\n return $data;\n }", "public function kiwip_stylesheet_add_file(){\n\t\t//register\n\t\tforeach($this->stylesheet as $key){\n\t\t\twp_register_style('kiwip_shortcode-css-'.$key['stylesheetId'], $key['stylesheetURL']);\n\t\t}\n\t\t\n\t\t//load\n\t\tforeach($this->stylesheet as $eky){\n\t\t\twp_enqueue_style('kiwip_shortcode-css-'.$key['stylesheetId']);\n\t\t}\t\t\n\n\t\t// $this->debug($this->stylesheet); die();\n\t}", "public function addCSS($css) {\r\n\t\t\t$this->css.= \"<link rel='stylesheet' type='text/css' href='$css.css' >\";\r\n\t\t}", "public function styles() {\n $this->addStyle(CORE_WWW_ROOT.\"ressources/css/externals/bootstrap.core.min.css\", true);\n\n\n $this->addStyle($this->directory().\"css/reset.less\");\n $this->addStyle($this->directory().\"css/animations.less\");\n $this->addStyle($this->directory().\"css/main.less\");\n $this->addStyle($this->directory().\"css/overlay.less\");\n $this->addStyle($this->directory().\"css/header.less\");\n $this->addStyle($this->directory().\"css/footer.less\");\n\n // externals\n $this->addStyle(\"//fonts.googleapis.com/css?family=Lora:400,400i,700,700i\", true);\n $this->addStyle('//fonts.googleapis.com/css?family=Roboto:700', true);\n\n // blocks\n $this->addStyle($this->directory().\"css/blocks/rd_arrow.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_button.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_bigteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_smallteaser.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_longtext.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_forms.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_listings.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_collection.less\");\n $this->addStyle($this->directory().\"css/blocks/rd_components.less\");\n\n $this->addStyle($this->directory().\"css/responsive.less\");\n }", "protected function doCompressCss() {}", "private function _compile_css(){\n\t\t$compiled_css = \"\";\n\t\tforeach($this->css as $css_file){\n\t\t\t$compiled_css .= \"\\t<link rel=\\\"stylesheet\\\" href=\\\"\".$this->assets_url('css').\"/{$css_file}.css\\\" />\\n\";\n\t\t}\n\t\t\n\t\tif ($compiled_css == \"\") return \"\";\n\n\t\treturn \"<!-- START Compiled CSS -->\\n\".$compiled_css.\"\\t<!-- END Compiled CSS -->\\n\";\n\t}", "public function enableConcatenateCss() {}", "public static function css($controlador=\"\", $hoja=\"\") {\r\n\r\n if (!$hoja) {\r\n $hoja = $controlador;\r\n $controlador = \"\";\r\n }\r\n $link = \"<link type='text/css' rel='stylesheet' href='\";\r\n if($controlador)\r\n $href = URL . \"recursos/$controlador/css/\";\r\n else\r\n $href = URL . \"recursos/css/\";\r\n \r\n return $link . $href . $hoja . \".css' />\";\r\n }", "protected function compileCss() {\r\n\t\tif(count($this->source_files) == 0) {\r\n\t\t\tfile_put_contents($this->result_file, \"\", FILE_APPEND);\r\n\t\t} else {\r\n\t\t\tforeach($this->source_files as $src_file) {\r\n\t\t\t\tfile_put_contents($this->result_file, file_get_contents($src_file) . PHP_EOL, FILE_APPEND);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function css($path_to_file) {\n\t\treturn '<link rel=\"stylesheet\" href=\"'.SITE_ROOT.$this->p_dir.'/'.$path_to_file.'\" type=\"text/css\" media=\"screen\" charset=\"utf-8\" />\n';\n\t}", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "public function insert_inline_css() {\n }", "function src_inc_css(string $file) : string {\n return \"<link rel='stylesheet' href='\".$file.\"'>\";\n}", "public function ie8_css() {\n\t\t$ie_8_url = WPEX_CSS_DIR_URI .'ie8.css';\n\t\t$ie_8_url = apply_filters( 'wpex_ie_8_url', $ie_8_url );\n\t\techo '<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"'. $ie_8_url .'\" media=\"screen\"><![endif]-->';\n\t}", "function bb_mystique_load_stylesheets() {\r\n\t$mystique_options = bb_get_mystique_options();\r\n\t$font_styles = bb_mystique_font_styles();\r\n\t/*\r\n\t$w = $mystique_options['page_width'];\r\n\t$unit = $w == 'fluid' ? '%' : 'px';\r\n\t$gs = $w == 'fluid' ? '100' : '940';\r\n\t*/\r\n\t?>\r\n\t<style type=\"text/css\">\r\n\t\t@import \"<?php bb_stylesheet_uri(); ?>\";\r\n\t\t@import \"<?php bb_active_theme_uri(); ?>color-<?php echo $mystique_options['color_scheme']; ?>.css\";;\r\n\t\t<?php\r\n\t\t\tif ( in_array( $mystique_options['font_style'], array_keys( $font_styles ) ) )\r\n\t\t\t\techo '*{font-family:' . $font_styles[$mystique_options['font_style']]['code'] . ';}';\r\n\t\t\t\r\n\t\t\tif ( $mystique_options['background'] )\r\n\t\t\t\techo '#page{background-image:none;}body{background-image:url(\"' . $mystique_options['background'] . '\");background-repeat:no-repeat;background-position:center top;}';\r\n\t\t\tif ( ( $mystique_options['background_color'] ) && ( strpos( $mystique_options['background_color'], '000000' ) === false ) ) {\r\n\t\t\t\techo 'body{background-color:#' . $mystique_options['background_color'] . ';}';\r\n\t\t\t\tif ( !$mystique_options['background'] )\r\n\t\t\t\t\techo 'body,#page{background-image:none;}';\r\n\t\t\t}\r\n\t\t\tif ( $mystique_options['user_css'] )\r\n\t\t\t\techo $mystique_options['user_css'];\r\n\t\t?>\r\n\t</style>\r\n\t<?php if ( 'rtl' == bb_get_option( 'text_direction' ) ) : ?>\r\n\t<link rel=\"stylesheet\" href=\"<?php bb_stylesheet_uri( 'rtl' ); ?>\" type=\"text/css\" />\r\n\t<?php endif; ?>\r\n\t<!--[if lte IE 6]><link media=\"screen\" rel=\"stylesheet\" href=\"<?php bb_active_theme_uri(); ?>ie6.css\" type=\"text/css\" /><![endif]-->\r\n\t<!--[if IE 7]><link media=\"screen\" rel=\"stylesheet\" href=\"<?php bb_active_theme_uri(); ?>ie7.css\" type=\"text/css\" /><![endif]-->\r\n\t<?php\r\n}", "function writeCommonStyles() {\r\n ?>\r\n<link href=\"css/style.css\" rel=\"stylesheet\" type=\"text/css\"/>\r\n<link href=\"css/menu.css\" rel=\"stylesheet\" type=\"text/css\"/>\r\n<?php\r\n}", "function shop_cetri_insert_head($flux) {\n\t$css = find_in_path('css/shop_cetri.css');\n\t$flux .= \"<link rel='stylesheet' type='text/css' media='all' href='$css' />\\n\";\n\n\treturn $flux;\n}", "private function _print_html_head_css()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t//Check if theme defined\n\t\t$theme = ($this->theme) ? $this->theme : '';\n\t\t\n\t\tforeach($this->css as $style) {\n\t\t\t$skip = FALSE;\n\t\t\t\n\t\t\t$partpath = (strpos($style, '.css') === FALSE) ? \"{$theme}css/{$style}.css\" : \"/{$style}\";\n\t\t\t$fullpath = Ashtree_Common::get_real_path($partpath, TRUE);\n\t\t\t$this->_debug->log(\"INFO\", \"Including stylesheet '{$fullpath}'\");\n\t\t\t\n\t\t\tif (!file_exists($fullpath)) {\n\t\t\t\t$this->_debug->status('ABORT');\n\t\t\t\t\n\t\t\t\t$partpath = \"css/{$style}.css\";\n\t\t\t\t$fullpath = ASH_BASEPATH . $partpath;\n\t\t\t\t$this->_debug->log(\"INFO\", \"Including stylesheet '{$fullpath}'\");\n\t\t\t\n\t\t\t\tif (!file_exists($partpath)) {\n\t\t\t\t $skip = TRUE;\n\t\t\t\t} else {\n\t\t\t\t $this->_debug->clear();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($skip) {\n\t\t\t\t$this->_debug->status('ABORT');\n\t\t\t} else {\n\t\t\t\t$this->_debug->status('OK');\n\t\t\t\t$fullpath = Ashtree_Common::get_real_path($fullpath);\n\t\t\t\t$output .= \"<link type=\\\"text/css\\\" media=\\\"screen\\\" rel=\\\"stylesheet\\\" href=\\\"{$fullpath}\\\" />\\n\";\n\t\t\t}\n\t\t\t\n\t\t}//foreach\n\t\t\n\t\t$output .= \"<style type=\\\"text/css\\\">\\n\";\n\t\t\n\t\tforeach($this->style as $style) {\n\t\t\t$output .= \"\\t{$style}\\n\";\n\t\t}//foreach\n\t\t\n\t\t$output .= \"</style>\\n\";\n\t\t\n\t\treturn $output;\n\t}", "function mocca_styles_files() {\n \n wp_enqueue_style('bootstrap-css', get_template_directory_uri() . '/css/bootstrap.min.css');\n wp_enqueue_style('fontawesome-css', get_template_directory_uri() . '/css/fontawesome-all.min.css');\n wp_enqueue_style('normalize-css', get_template_directory_uri() . '/css/normalize.css');\n wp_enqueue_style('main-css', get_template_directory_uri() . '/css/main.css');\n }", "protected function regStyles() {\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/bbcode/bbcode.css');\n $this->modx->regClientCSS($this->config['cssUrl'] . 'web/styles.css');\n }", "function add_style($name, $file)\n{\n\tglobal $styles_included;\n\t$styles_included[$name] = \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\".site_url.$file.\"\\\"/>\\n\";\n}", "public function customCSS() {\n\n\t if ( isset( $this->options['customCSS'] ) ){\n\n\t \t$content = \"<style type='text/css'>\\n\";\n\t \t$content .= $this->options['customCSS'].\"\\n\";\n\t \t$content .= \"</style>\";\n\n\t \techo $content;\n\t }\n\t}", "function SA_dev_register_style($handle, $src, $ver){echo '<link rel=\"stylesheet\" href=\"'.$src.'\" type=\"text/css\" charset=\"utf-8\" />'.\"\\n\";}", "function load_css($arquivo=NULL,$pasta='css',$midia='all'){\n if($arquivo!= null):\n $CI =& get_instance();\n $CI->load->helper('url');\n $retorno ='';\n if(is_array($arquivo)):\n foreach ($arquivo as $css):\n $retorno .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.base_url(\"$pasta/$css.css\").'\"media=\"'.$midia.'\"/>';\n endforeach;\n else:\n $retorno = '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.base_url(\"$pasta/$arquivo.css\").'\"media=\"'.$midia.'\"/>';\n endif;\n endif;\n return $retorno;\n\n}", "public function css_includes()\n {\n }", "public function getConcatenateCss() {}", "public function mm_default_css() {\n $default_css = CSS_DIR . DEFAULT_CSS;\n $new_css = CSS_DIR . CUSTOM_CSS;\n ob_start();\n @include( $default_css );\n $css = ob_get_contents();\n ob_end_clean();\n \n $css = stripslashes ( $css );\n \n update_option('mm_gallery_css', $css);\n file_put_contents($new_css, $css); \n }", "function load_stylesheets()\n{\n // 1. Download bootstrap css from serwer (katalog otoedu)\n wp_register_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), false, 'all');\n wp_enqueue_style('bootstrap');\n\n // 2. Download style css from serwer (katalog otoedu)\n // It is my style (not bootstrap). That must be second position\n wp_register_style('style', get_template_directory_uri() . '/style.css', array(), false, 'all');\n wp_enqueue_style('style');\n}", "public function include_css($env) {\n global $CFG;\n $css = '';\n $cssurl = $CFG->dirroot . '/course/format/ludimoodle/motivators/' . $this->get_short_name() . '/styles.css';\n\n // We can't require css like this in format because <head> is already closed\n //$page = $env->get_page();\n //$page->requires->css($cssurl);\n\n // if css is not already in page\n if (file_exists($cssurl) && (!in_array($cssurl, $env->cssinitdata))) {\n // mark that this css is in page\n $env->cssinitdata[] = $cssurl;\n $css = '<style>' . file_get_contents($cssurl) . '</style>';\n }\n return $css;\n }", "function phptemplate_get_ie_styles() {\n global $language;\n\n $iecss = '<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"'. base_path() . path_to_theme() .'/fix-ie.css\" />';\n\n return $iecss;\n}", "function webbusiness_save_css() {\n\t$save_custom_css = get_theme_mod('save-custom-css');\n\tif (get_theme_mod('save-custom-css') != \"\" && get_theme_mod('save-custom-css') < time()) {\n\t\t$data = webbusiness_load_custom_css();\n\t\tremove_theme_mod('save-custom-css');\n\t\t\n\t\t// write to file\n\t\t$uploads = wp_upload_dir();\n\t\t$uploads_dir = trailingslashit($uploads[\"basedir\"]);\n\t\t$img_path = get_template_directory_uri();\n\t\t$data = str_replace(\"../img/\", $img_path . \"/img/\", $data);\n\t\t\n\t\tfile_put_contents($uploads_dir . \"webbusiness.css\", $data);\n\t\tdelete_transient('webbusiness_custom_css');\n\t}\n}", "function phptemplate_get_ie_styles() {\n global $language;\n\n $iecss = '<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"'. base_path() . path_to_theme() .'/css/fix-ie.css\" />';\n\n return $iecss;\n}", "function fragmention_insert_head_css($flux) {\n\tstatic $vu = false;\n\n\n\tif (!$vu) {\n\t\t$flux .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.find_in_path('css/fragmention.css').'\" media=\"all\" />'.\"\\n\";\n\t\t$vu = true;\n\t}\n\treturn $flux;\n}", "function addThemeStyles() \n {\n global $blog_id;\n \n // need for wordpress MU and WP3\n if (!$blog_id) {\n $blog_id = 1;\n }\n\n // load style\n if (file_exists(CONSTRUCTOR_DIRECTORY .'/cache/style'.$blog_id.'.css')) {\n wp_enqueue_style('constructor-style', CONSTRUCTOR_DIRECTORY_URI .'/cache/style'.$blog_id.'.css');\n } else {\n wp_enqueue_style('constructor-style', get_option('home').'/?theme-constructor=css');\n }\n \n // load constructor subtheme style\n if (file_exists(CONSTRUCTOR_DIRECTORY .'/themes/'.$this->getTheme().'/style.css')) {\n wp_enqueue_style( 'constructor-theme', CONSTRUCTOR_DIRECTORY_URI.'/themes/'.$this->getTheme().'/style.css');\n }\n }", "function css_add(){\n\t\t\tif($_GET['csv']==true) : \t\t\t\n\t\t\t\t$url = dirname(__FILE__) ;\n\t\t\t\tpreg_match('/\\/wp-content.+$/',$url,$c);\n\t\t\t\t$link = get_option('home').$c[0].'/css/style.css';\t\t\t\t\t\n\t\t\t\techo \"<link rel='stylesheet' href='$link' media='all' type='text/css' />\" ;\n\t\t\tendif;\n\t\t\t\n\t\t}", "function XT_load_css($params){\n if($params['media'] == \"\"){\n $params['media']= \"screen\";\n }\n if(empty($params['file'])) {\n return false;\n } else {\n if(empty($GLOBALS['loadedcss'][$params['file']])){\n // js ausgeben und als geladen merken\n $GLOBALS['loadedcss'][$params['file']] = '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . STYLES_DIR . 'live/' . $params['file'] . '\" media=\"' . $params['media'] . '\" />';\n return NULL;\n }else{\n return false;\n }\n }\n}", "function charity_create_stylesheet() {\n $content = \"\\t\";\n $content .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\";\n $content .= get_bloginfo('stylesheet_url');\n $content .= \"\\\" />\";\n $content .= \"\\n\\n\";\n echo apply_filters('charity_create_stylesheet', $content);\n}", "public function add_css($css) {\n $current = $this->dwoo_data->css_files;\n $current[] = $css;\n $this->dwoo_data->css_files = $current;\n }", "public function renderCSS()\n {\n }", "public function cssFile($params) {\n // This stops styles inadvertently clashing with the main site.\n if (strpos($_SERVER['REQUEST_URI'], $this->getPluginPath()) === 0 ||\n strpos($_SERVER['REQUEST_URI'], '/widgets/') === 0\n ) {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$this->getThemePath().'/css/style.css\" />'.\"\\n\";\n }\n }", "public function add_css ( $filename )\n {\n\n \n if(substr($filename,0,1) != \"/\"){\n $path = basedir . $this->templatePath . 'css' . DS . $filename;\n $fileLoc = DS . $this->templatePath . 'css' . DS . $filename;\n } else {\n $path = basedir . $filename;\n $fileLoc = $filename;\n }\n if( in_array( $fileLoc, $this->css_files ) == true )\n {\n return null;\n }\n \n if( file_exists($path) == false )\n {\n /*------------ERROR------------*/\n // $this->reg->debug->error('Error','Function add_css()', 'Css file not found. File: '.$path, DateTime, $this);\n \n //log::write(\"Css file not found. File: `$path`\", $this, 'add_css()');\n return false;\n }\n $this->css_files[] = str_replace(\"\\\\\",\"/\", $fileLoc);\n $this->includeLibs();\n }", "function ra_builder_css()\n\t\t{\n\t\t\t$this->output('<meta name=\"generator\" content=\"rahularyan\">');\n\t\t\tif($this->template == 'user'){\n\t\t\t\tif(defined('QA_WORDPRESS_INTEGRATE_PATH')){\n\t\t\t\t\t$id = $this->content['raw']['userid'];\n\t\t\t\t\t$cover = get_user_meta( $id, 'cover' );\n\t\t\t\t\t$cover = $cover[0];\n\t\t\t\t}else{\n\t\t\t\t\t@$cover = ra_user_profile(@$this->content['raw']['account']['handle'], 'cover');\n\t\t\t\t}\n\t\t\t\tif($cover)\n\t\t\t\t\t$this->output('<style>#user .user-bar{background:url(\"'.qa_opt('site_url').'images/'.$cover.'\") no-repeat scroll 0 0 / cover;}</style>');\n\t\t\t\t\n\t\t\t}\n\t\t\tif(ra_is_home()){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_home').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'questions'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_questions').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'unanswered'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_unanswered').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'tags'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_tags').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'categories'){\t\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_categories').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'users'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_users').ra_db_builder('css_bottom').'</style>');\n\t\t\t}elseif($this->template == 'user'){\t\t\t\t\n\t\t\t\t$this->output('<style>'.ra_db_builder('css_user').ra_db_builder('css_bottom').'</style>');\n\t\t\t}\n\t\t}", "public function assets_css() {\n \n $data = '<link rel=\"stylesheet\" type=\"text/css\" href=\"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css?ver=' . MD_VER . '\" media=\"all\"/> ';\n $data .= \"\\n\";\n $data .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . base_url() . 'assets/apps/dashboard/styles/css/dashboard.css?ver=' . MD_VER . '\" media=\"all\"/> ';\n $data .= \"\\n\";\n \n if ( $this->css_urls_widgets ) {\n \n foreach ( $this->css_urls_widgets as $url ) {\n \n $data .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $url . '?ver=' . MD_VER . '\" media=\"all\"/> ';\n $data .= \"\\n\"; \n \n }\n \n }\n \n return $data;\n \n }", "public static function mergeCSS()\n {\n if ((class_exists('Kohana') AND Kohana::$environment !== Kohana::PRODUCTION) OR\n (!file_exists('cache'.DIRECTORY_SEPARATOR.'css')))\n {\n return static::renderCSS();\n }\n\n $content = '';\n $files = '';\n\n sort(static::$_css);\n\n foreach (static::$_css as $src)\n {\n if (in_array($src, static::$_cssNoMerge)) continue;\n\n $files .= $src.PHP_EOL;\n }\n\n $fileName = 'style'.md5($files).'.css';\n $path = 'cache'.DIRECTORY_SEPARATOR.'css'.DIRECTORY_SEPARATOR.$fileName;\n\n if (!file_exists($path))\n {\n foreach (static::$_css as $src)\n {\n if (in_array($src, static::$_cssNoMerge)) continue;\n\n try\n {\n $content .= file_get_contents($src).PHP_EOL.PHP_EOL.'/* --- */'.PHP_EOL.PHP_EOL;\n }\n catch (Exception $e) {}\n }\n\n file_put_contents($path, $content);\n }\n\n //return PHP_EOL.HTML::style(URL::site('cache/css/'.$fileName)).static::_renderCSS(static::$_cssNoMerge);\n //return PHP_EOL.HTML::style(URL::site('cache/css/'.$fileName.'?'.date('Y-m-d'))).static::_renderCSS(static::$_cssNoMerge);\n return PHP_EOL.HTML::style(URL::site('cache/css/'.$fileName.'?'.static::$buildVersion)).static::_renderCSS(static::$_cssNoMerge);\n }", "function barjeel_css_loader() {\n\n wp_enqueue_style('barjeel', get_template_directory_uri().'/stylesheets/barjeel.css', false ,'0.90', 'all' );\n\n if (ICL_LANGUAGE_CODE == \"ar\") {\n\t wp_enqueue_style('barjeel-ar', get_template_directory_uri().'/stylesheets/barjeel-rtl.css', false ,'0.90', 'all' );\n\t}\n\n }", "public function css()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n $files = $dir->scanRecursive(\"*.css\");\n\n echo \"\\nMinifying Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // Skip all foo.#.js (e.g foo.52.js) which are files from a previous build\n if (is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)))\n continue;\n\n /**\n * @var $destFile \\Ninja\\File\n */\n $destFile = $sourceFile->getParent()->ensureFile($sourceFile->getName(true) . '.' . self::REVISION . '.' . $sourceFile->getExtension());\n\n $destFile->write(\\Minify_Css::process($sourceFile->read()));\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n\n unset($sourceFile);\n }\n }", "public function addCSS($css, $mode = 'file') {\n // Add CSS inline (<style> tag).\n if ($mode == 'inline') {\n $this->addData('css_inline', array($css));\n }\n else {\n $this->addData('css', array($css));\n }\n }", "public function addCss($script) {\n\t\tLibraries::enqueueCss($script);\n\t}", "public function DefineCssResources()\n {\n $this->carabiner->css(array(\n array('assets/css/libs/bootstrap.css'),\n array('assets/css/views/normalize.css'),\n array('assets/css/libs/Chart.min.css')\n ));\n }", "function GetStylesheetes()\n{\n $isMobile = check_user_agent('mobile') === false && @$_GET['screen'] != 'mobile' ? false :true;\n $append = $isMobile ? '.mobile.css':'.css';\n $stylesheets = GetTheDataArray(array('theme','stylesheet'));\n $returnData = '';\n foreach($stylesheets as $key => $style)\n {\n $file = '';\n if($key == 'core') {\n //include core stylesheet and decide if mobile stylesheet should be used\n if(check_user_agent('mobile') === false && @$_GET['screen'] != 'mobile')\n {\n $style = $style['primary'];\n\n } else {\n $style = $style['mobile'];\n\n }\n\n $httpFile = base_url().'theme/'.THEMESELECTED.'/css/'.$style;\n $file = THEMEPATH.THEMESELECTED.'/css/'.$style;\n //including files from project data css folder configured in projectconfig.php\n } elseif($key == 'include'){\n foreach($style as $st)\n {\n $httpFile = base_url().'project/'.PROJECT.'/data/css/'.$st.$append;\n $file = PROJECTROOT.PROJECT.'/data/css/'.$st.$append;\n }\n\n }\n\n if(file_exists($file))\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.$httpFile.'\"/>';\n }\n\n }\n //adding include files depending on what device is being used\n foreach($stylesheets['core']['includes'] as $includes)\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.base_url().'theme/'.THEMESELECTED.'/css/includes/'.$includes.$append.'\"/>';\n }\n //adding animation files\n if(iteraxcontroller::Instance()->it->data['theme']['animations'] === true)\n {\n foreach($stylesheets['animations'] as $includes)\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.base_url().'theme/'.THEMESELECTED.'/css/animation/'.$includes.'\"/>';\n }\n }\n\n\n return $returnData;\n}", "function zilla_custom_css($content) {\n\t\t$zilla_values = get_option( 'zilla_framework_values' );\n\t\tif( array_key_exists( 'style_custom_css', $zilla_values ) && $zilla_values['style_custom_css'] != '' ){\n\t\t\t$content .= '/* Custom CSS */' . \"\\n\";\n\t\t\t\t$content .= stripslashes($zilla_values['style_custom_css']);\n\t\t\t\t$content .= \"\\n\\n\";\n\t\t}\n\t\treturn $content;\n\t\t\n}", "function baseCss($nameCSS){ \n global $name;\n global $nameCSS;\n \n $cssbase = \".sprite{\\n\n background-image: url(\".'\"'.$name.'\"'.\");\\n\n background-repeat: no-repeat;\\n\n display: block;\\n\n}\\n\";\n $handle = fopen($nameCSS, \"w\");\n $write = fwrite($handle, $cssbase);\n}", "function phptemplate_get_ie_styles() {\n global $language;\n\n $iecss = '<link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"'. base_path() . path_to_theme() .'/fix-ie.css\" />';\n if ($language->direction == LANGUAGE_RTL) {\n $iecss .= '<style type=\"text/css\" media=\"all\">@import \"'. base_path() . path_to_theme() .'/fix-ie-rtl.css\";</style>';\n }\n\n return $iecss;\n}", "function wyde_add_body_style($handle, $src){\n global $wyde_body_stylesheets;\n if( !$wyde_body_stylesheets ){\n $wyde_body_stylesheets = array();\n }\n\n $wyde_body_stylesheets[$handle] = $src; \n}", "function App_CSS_Add()\n {\n array_push($this->MyApp_Interface_Head_CSS_OnLine,\"CSS/sivent2.css\");\n }", "function css_files() {\n\t\twp_enqueue_style('escalate_network-admin-global', $this->plugin_url .'/css/styles-admin-global.css');\n\t}", "public function css() {\r\r\n\r\r\n // $scss = new scssc();\r\r\n // $scss->setImportPaths(\"css/\");\r\r\n // $scss->setFormatter(\"scss_formatter_compressed\");\r\r\n // $dir = $_SERVER['DOCUMENT_ROOT'].\"/css/\";\r\r\n // $server = new scss_server($dir, $this->config->config['cache_path'].'resources', $scss);\r\r\n // $server->serve('', $name);\r\r\n\r\r\n $scss = new scssc();\r\r\n $scss->setFormatter(\"scss_formatter_compressed\");\r\r\n\r\r\n $source = '';\r\r\n $cache_path = $this->config->config['cache_path'].'resources';\r\r\n $file_cache = $cache_path.'/styles.css';\r\r\n\r\r\n $mtime_cache = (file_exists($file_cache)) ? filemtime($file_cache) : 0;\r\r\n $mtime_files = 0;\r\r\n\r\r\n foreach($this->config->config['css_site'] as $file) {\r\r\n if(pathinfo($file, PATHINFO_EXTENSION) === 'scss') {\r\r\n\r\r\n $scss->last_modified = filemtime($file);\r\r\n $scss->compile('@import \"'.$file.'\"');\r\r\n if($mtime_files < $scss->last_modified) {\r\r\n $mtime_files =$scss->last_modified;\r\r\n }\r\r\n\r\r\n } else {\r\r\n if($mtime_files < filemtime($file)) {\r\r\n $mtime_files = filemtime($file);\r\r\n }\r\r\n }\r\r\n }\r\r\n\r\r\n if($mtime_cache > $mtime_files) {\r\r\n header(\"Content-Type: text/css\");\r\r\n $lastModified = gmdate('D, d M Y H:i:s', $mtime_cache) . ' GMT';\r\r\n header('Last-Modified: ' . $lastModified);\r\r\n echo file_get_contents($file_cache);\r\r\n\r\r\n return;\r\r\n }\r\r\n\r\r\n $t = @date('r');\r\r\n\r\r\n foreach($this->config->config['css_site'] as $file) {\r\r\n if(pathinfo($file, PATHINFO_EXTENSION) === 'scss') {\r\r\n $source .= $scss->compile('@import \"'.$file.'\"');\r\r\n } else {\r\r\n $source .= $scss->compile(file_get_contents($file));\r\r\n }\r\r\n }\r\r\n\r\r\n $source = \"/* generated by trivy on \".@date('r').\" */\\n\\n\" . $source;\r\r\n\r\r\n $file = fopen($file_cache, 'w+');\r\r\n fwrite($file, $source);\r\r\n fclose($file);\r\r\n $mtime_cache = filemtime($file_cache);\r\r\n\r\r\n header(\"Content-Type: text/css\");\r\r\n $lastModified = gmdate('D, d M Y H:i:s', $mtime_cache) . ' GMT';\r\r\n header('Last-Modified: ' . $lastModified);\r\r\n echo $source;\r\r\n }", "public function setCss($css);" ]
[ "0.723392", "0.72300965", "0.72277975", "0.7173311", "0.70850563", "0.706912", "0.7056713", "0.7022473", "0.698215", "0.6974772", "0.6943815", "0.6927878", "0.68831414", "0.6824871", "0.6803415", "0.6792126", "0.67838526", "0.67570186", "0.67559695", "0.674866", "0.67449737", "0.67159104", "0.6695835", "0.6686736", "0.66695535", "0.6662987", "0.6657477", "0.66543376", "0.6650556", "0.66363454", "0.6629127", "0.6619592", "0.66036355", "0.6554748", "0.6546713", "0.65370554", "0.65292054", "0.652882", "0.6526183", "0.6500499", "0.6492918", "0.64896905", "0.6480628", "0.6469653", "0.64613974", "0.6439512", "0.64248127", "0.6421265", "0.6394828", "0.6394252", "0.63885975", "0.63885975", "0.63885975", "0.63885975", "0.63885975", "0.6384498", "0.6378944", "0.6361426", "0.63573855", "0.6357337", "0.6349936", "0.634576", "0.6344744", "0.63351834", "0.62986755", "0.6289865", "0.62880075", "0.6286343", "0.6286283", "0.6285682", "0.62798136", "0.6277804", "0.6275242", "0.6271295", "0.62636715", "0.62601537", "0.62592596", "0.62549853", "0.6253639", "0.62527263", "0.62494993", "0.62433517", "0.6232462", "0.62318426", "0.6230841", "0.62306434", "0.6230526", "0.62276894", "0.6218512", "0.6217694", "0.6209996", "0.6205899", "0.6202226", "0.62018716", "0.62010914", "0.6199378", "0.61944395", "0.6192431", "0.61741984", "0.61737335", "0.61667806" ]
0.0
-1
Bootstrap the application services
public function boot() { $this->strapRoutes(); $this->strapViews(); $this->strapMigrations(); $this->strapCommands(); $this->registerPolicies(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boot()\n {\n // Boot here application\n }", "public function boot()\n {\n $configuration = [];\n\n if (file_exists($file = getcwd() . '/kaleo.config.php')) {\n $configuration = include_once $file;\n }\n\n $this->app->singleton('kaleo', function () use ($configuration) {\n return new KaleoService($configuration);\n });\n }", "public function boot()\n {\n $this->setupConfig('delta_service');\n $this->setupMigrations();\n $this->setupConnection('delta_service', 'delta_service.connection');\n }", "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot(){\r\n $this->app->configure('sdk');\r\n $this->publishes([\r\n __DIR__.'/../../resources/config/sdk.php' => config_path('sdk.php')\r\n ]);\r\n $this->mergeConfigFrom(__DIR__.'/../../resources/config/sdk.php','sdk');\r\n\r\n $api = config('sdk.api');\r\n foreach($api as $key => $value){\r\n $this->app->singleton($key,$value);\r\n }\r\n }", "public function boot() {\n\n }", "public function boot()\n {\n $this->shareResources();\n $this->mergeConfigFrom(self::CONFIG_PATH, 'amocrm-api');\n }", "function boot(Application $app)\n {\n //Nothing to do for now\n }", "public function boot() {\n //\n }", "public function boot() {\n //\n }", "public function boot() {\n //\n }", "public function boot() {\n //\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n }", "public function boot()\n {\n\n $this->app->bind(FileUploaderServiceInterface::class,FileUploaderService::class);\n $this->app->bind(ShopServiceInterface::class,ShopService::class);\n $this->app->bind(CategoryServiceInterface::class,CategoryService::class);\n $this->app->bind(ProductServiceInterface::class,ProductService::class);\n $this->app->bind(ShopSettingsServiceInterface::class,ShopSettingsService::class);\n $this->app->bind(FeedbackServiceInterface::class,FeedbackService::class);\n $this->app->bind(UserServiceInterface::class,UserService::class);\n $this->app->bind(ShoppingCartServiceInterface::class,ShoppingCartService::class);\n $this->app->bind(WishlistServiceInterface::class,WishlistService::class);\n $this->app->bind(NewPostApiServiceInterface::class,NewPostApiService::class);\n $this->app->bind(DeliveryAddressServiceInterface::class,DeliveryAddressService::class);\n $this->app->bind(StripeServiceInterface::class,StripeService::class);\n $this->app->bind(OrderServiceInterface::class,OrderService::class);\n $this->app->bind(MailSenderServiceInterface::class,MailSenderSenderService::class);\n }", "public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public function boot()\n {\n\n }", "public static function boot() {\n\t\tstatic::container()->boot();\n\t}", "public function boot()\n {\n resolve(EngineManager::class)->extend('elastic', function () {\n return new ElasticScoutEngine(\n ElasticBuilder::create()\n ->setHosts(config('scout.elastic.hosts'))\n ->build()\n );\n });\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "public function boot(Application $app)\n {\n\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\r\n {\r\n //\r\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }", "public function boot()\n {\n //\n }" ]
[ "0.73316276", "0.72163665", "0.7175111", "0.703214", "0.7007509", "0.69893754", "0.69869876", "0.69784296", "0.69552237", "0.6951853", "0.6951853", "0.6951853", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69447684", "0.69364953", "0.6928678", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6921212", "0.6912165", "0.6910395", "0.690022", "0.690022", "0.690022", "0.6899572", "0.6896648", "0.68932813", "0.68932813", "0.68932813", "0.68932813", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782", "0.6874782" ]
0.0
-1
Register the application services.
public function register() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }", "public function register()\n { \n // User Repository\n $this->app->bind('App\\Contracts\\Repository\\User', 'App\\Repositories\\User');\n \n // JWT Token Repository\n $this->app->bind('App\\Contracts\\Repository\\JSONWebToken', 'App\\Repositories\\JSONWebToken');\n \n $this->registerClearSettleApiLogin();\n \n $this->registerClearSettleApiClients();\n \n \n }", "public function register()\n {\n $this->app->bind(\n 'Uhmane\\Repositories\\ContatosRepository', \n 'Uhmane\\Repositories\\ContatosRepositoryEloquent'\n );\n }", "public function register()\n {\n // $this->app->make('CheckStructureService');\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/telescope-error-service-client.php', 'telescope-error-service-client'\n );\n\n $this->registerStorageDriver();\n\n $this->commands([\n Console\\InstallCommand::class,\n Console\\PublishCommand::class,\n ]);\n }", "public function register()\n\t{\n\t\t$this->registerPasswordBroker();\n\n\t\t$this->registerTokenRepository();\n\t}", "public function register()\n {\n $this->registerRepositories();\n }", "public function register()\n {\n $this->registerFacades();\n $this->registerRespository();\n }", "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n App::bind('App\\Repositories\\ReserveProductRepositoryInterface','App\\Repositories\\ReserveProductRepository');\n App::bind('App\\Repositories\\Product_reserveRepositoryInterface','App\\Repositories\\Product_reserveRepository');\n App::bind('App\\Repositories\\Ordering_productRepositoryInterface','App\\Repositories\\Ordering_productRepository');\n App::bind('App\\Repositories\\OrderingRepositoryInterface','App\\Repositories\\OrderingRepository');\n App::bind('App\\Repositories\\UserUpdateSlipRepositoryInterface','App\\Repositories\\UserUpdateSlipRepository');\n }", "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/config.php', 'laragle.authorization');\n }", "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'Toyopecas\\Repositories\\TopoRepository',\n 'Toyopecas\\Repositories\\TopoRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ServicesRepository',\n 'Toyopecas\\Repositories\\ServicesRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\SobreRepository',\n 'Toyopecas\\Repositories\\SobreRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Toyopecas\\Repositories\\ProdutosRepository',\n 'Toyopecas\\Repositories\\ProdutosRepositoryEloquent'\n );\n }", "public function register()\n {\n $this->registerOtherProviders()->registerAliases();\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'jarvisPlatform');\n $this->app->bind('jarvis.auth.provider', AppAuthenticationProvider::class);\n $this->loadRoutes();\n }", "public function register()\n {\n include __DIR__.'/routes.php';\n\n $this->app->make('Jlopezcur\\MediaManager\\MediaManagerController');\n }", "public function register()\n {\n // $this->app->bind('AuthService', AuthService::class);\n }", "public function register()\n {\n $this->app->bind(\n PegawaiServiceContract::class,\n PegawaiService::class \n );\n\n $this->app->bind(\n RiwayatPendidikanServiceContract::class,\n RiwayatPendidikanService::class \n );\n\n $this->app->bind(\n ProductionHouseServiceContract::class,\n ProductionHouseService::class\n );\n\n $this->app->bind(\n MovieServiceContract::class,\n MovieService::class\n );\n\n $this->app->bind(\n PangkatServiceContract::class,\n PangkatService::class \n );\n\n }", "public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/awesio-auth.php', 'awesio-auth');\n\n $this->app->singleton(AuthContract::class, Auth::class);\n\n $this->registerRepositories();\n\n $this->registerServices();\n\n $this->registerHelpers();\n }", "public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__.'/../config/colissimo.php', 'colissimo');\r\n $this->mergeConfigFrom(__DIR__.'/../config/rules.php', 'colissimo.rules');\r\n $this->mergeConfigFrom(__DIR__.'/../config/prices.php', 'colissimo.prices');\r\n $this->mergeConfigFrom(__DIR__.'/../config/zones.php', 'colissimo.zones');\r\n $this->mergeConfigFrom(__DIR__.'/../config/insurances.php', 'colissimo.insurances');\r\n $this->mergeConfigFrom(__DIR__.'/../config/supplements.php', 'colissimo.supplements');\r\n // Register the service the package provides.\r\n $this->app->singleton('colissimo', function ($app) {\r\n return new Colissimo;\r\n });\r\n }", "public function register()\n {\n\n\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\UserRepository',\n 'Onlinecorrection\\Repositories\\UserRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ClientRepository',\n 'Onlinecorrection\\Repositories\\ClientRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\ProjectRepository',\n 'Onlinecorrection\\Repositories\\ProjectRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentRepository',\n 'Onlinecorrection\\Repositories\\DocumentRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderRepository',\n 'Onlinecorrection\\Repositories\\OrderRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\OrderItemRepository',\n 'Onlinecorrection\\Repositories\\OrderItemRepositoryEloquent'\n );\n\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\DocumentImageRepository',\n 'Onlinecorrection\\Repositories\\DocumentImageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\PackageRepository',\n 'Onlinecorrection\\Repositories\\PackageRepositoryEloquent'\n );\n $this->app->bind(\n 'Onlinecorrection\\Repositories\\StatusRepository',\n 'Onlinecorrection\\Repositories\\StatusRepositoryEloquent'\n );\n\n }", "public function register()\n {\n\n $this->app->register(RepositoryServiceProvider::class);\n }", "public function register()\n {\n $this->registerInertia();\n $this->registerLengthAwarePaginator();\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\UtilitiesServiceProvider');\n $this->registerLogViewer();\n $this->app->register('Arcanedev\\\\LogViewer\\\\Providers\\\\CommandsServiceProvider');\n }", "public function register()\n {\n include __DIR__.'/routes.php';\n $this->app->make('Unrulynatives\\Attitudes\\AttitudesController');\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'APIcoLAB\\Services\\Registrar'\n\t\t);\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Flight\\FlightRepository',\n 'APIcoLAB\\Repositories\\Flight\\SkyScannerFlightRepository'\n );\n\n $this->app->bind(\n 'APIcoLAB\\Repositories\\Place\\PlaceRepository',\n 'APIcoLAB\\Repositories\\Place\\SkyScannerPlaceRepository'\n );\n\t}", "public function register()\n {\n $this->app->bind('App\\Services\\UserService');\n $this->app->bind('App\\Services\\PostService');\n $this->app->bind('App\\Services\\MyPickService');\n $this->app->bind('App\\Services\\FacebookService');\n $this->app->bind('App\\Services\\LikeService');\n }", "public function register()\r\n {\r\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel-base.php', 'laravel-base');\r\n\r\n $this->app->bind(UuidGenerator::class, UuidGeneratorService::class);\r\n\r\n }", "public function register()\n {\n $this->app->bind('tochka', function () {\n return new Tochka();\n });\n $this->mergeConfigFrom(__DIR__.'/../config/tochka.php', 'tochka');\n }", "public function register()\n {\n $this->app->bind(\n 'Larafolio\\Http\\HttpValidator\\HttpValidator',\n 'Larafolio\\Http\\HttpValidator\\CurlValidator'\n );\n\n $this->app->register(ImageServiceProvider::class);\n }", "public function register()\n\t{\n\t\t$this->app->bind('Mosaiqo\\OptimusPrime\\Contracts\\Transformer', 'Mosaiqo\\OptimusPrime\\Transformer');\n\t\t$this->registerArtisanCommand();\n\t}", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/services.php', 'services'\n );\n }", "public function register()\n {\n include __DIR__.'/routes.php';\n $this->app->make('YigitCukuren\\Optimum7\\Controllers\\Optimum7Controller');\n $this->commands($this->commands);\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/Config/user-role-and-permission.php', 'user-role-and-permission');\n\n $this->app->register('Caffeinated\\Shinobi\\ShinobiServiceProvider');\n\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(ExceptionServiceProvider::class);\n $this->app->register(ViewComposerServiceProvider::class);\n\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Shinobi', \\Caffeinated\\Shinobi\\Facades\\Shinobi::class);\n }", "public function register()\n {\n $this->app->bind('App\\Services\\TripService.php', function ($app) {\n return new TripService();\n });\n }", "public function register()\n {\n $this->app->bind(\\Cookiesoft\\Repositories\\CategoryRepository::class, \\Cookiesoft\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\BillpayRepository::class, \\Cookiesoft\\Repositories\\BillpayRepositoryEloquent::class);\n $this->app->bind(\\Cookiesoft\\Repositories\\UserRepository::class, \\Cookiesoft\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerMigrator();\n $this->registerArtisanCommands();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\PessoaRepositoryInterface', 'App\\Repositories\\PessoaRepositoryEloquent'\n );\n $this->app->bind(\n 'App\\Repositories\\PerfilRepositoryInterface', 'App\\Repositories\\PerfilRepositoryEloquent'\n );\n $this->app->bind(\n 'App\\Repositories\\AplicativoRepositoryInterface', 'App\\Repositories\\AplicativoRepositoryEloquent'\n );\n $this->app->bind(\n 'App\\Repositories\\UsuarioRepositoryInterface', 'App\\Repositories\\UsuarioRepositoryEloquent'\n );\n $this->app->bind(\n 'App\\Repositories\\AcessoRepositoryInterface', 'App\\Repositories\\AcessoRepositoryEloquent'\n );\n }", "public function register()\n {\n $this->registerRepositories();\n\n $this->pushMiddleware();\n }", "public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }", "public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CompanyInterface', \n 'App\\Repositories\\CompanyRepo'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\UtilityInterface', \n 'App\\Repositories\\UtilityRepo'\n );\n }", "public function register()\n {\n // Merge configs\n $this->mergeConfigFrom(\n __DIR__ . '/../config/songyz_validator.php',\n 'songyz_validator'\n );\n\n $this->app->singleton('songyz.validator.generator', function ($app) {\n return new GeneratorValidatorRequestCommand();\n });\n $this->commands([\n 'songyz.validator.generator'\n ]);\n\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'meilisearch');\n\n $this->app->singleton(Client::class, function () {\n return new Client(config('meilisearch.host'), config('meilisearch.key'));\n });\n }", "public function register()\n {\n //\n include __DIR__.'/routes.php';\n $this->app->make('Hulucat\\WechatCorp\\CorpController');\n $this->app->singleton('CorpApi', function($app){\n \treturn new CorpApi(new HttpClient());\n });\n }", "public function register()\n {\n $this->app->bind(VehicleRepository::class, GuzzleVehicleRepository::class);\n }", "public function register()\n {\n $this->app->register(\\Maatwebsite\\Excel\\ExcelServiceProvider::class);\n $this->app->register(\\Intervention\\Image\\ImageServiceProvider::class);\n $this->app->register(\\Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n $this->app->register(\\Yajra\\Datatables\\ButtonsServiceProvider::class);\n\n $loader = null;\n if (class_exists('Illuminate\\Foundation\\AliasLoader')) {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n }\n\n // Facades\n if ($loader != null) {\n $loader->alias('Image', \\Intervention\\Image\\Facades\\Image::class);\n $loader->alias('Excel', \\Maatwebsite\\Excel\\Facades\\Excel::class);\n\n }\n\n if (app()->environment() != 'production') {\n // Service Providers\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n // Facades\n if ($loader != null) {\n $loader->alias('Debugbar', \\Barryvdh\\Debugbar\\Facade::class);\n }\n }\n\n if ($this->app->environment('local', 'testing')) {\n $this->app->register(\\Laravel\\Dusk\\DuskServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerUserComponent();\n $this->registerLocationComponent();\n\n }", "public function register()\n {\n\n\n $this->app->bind(\n 'App\\Repositories\\RepositoryInterface','App\\Repositories\\ORM\\CsvRepository'\n );\n\n $this->app->bind(\n 'App\\Strategy\\StrategyDataSource','App\\Strategy\\CsvDataSource'\n );\n\n\n }", "public function register()\n {\n // Default configuration file\n $this->mergeConfigFrom(\n __DIR__.'/Config/auzo_tools.php', 'auzoTools'\n );\n\n $this->registerModelBindings();\n $this->registerFacadesAliases();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\\\Repositories\\\\Tournaments\\\\ITournamentsRepository',\n 'App\\\\Repositories\\\\Tournaments\\\\TournamentsRepository'\n );\n }", "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerCommand();\n $this->registerSchedule();\n $this->registerDev();\n\n }", "public function register()\n {\n $this->registerDomainLocalization();\n $this->registerDomainLocaleFilter();\n }", "public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }", "public function register() {\n /**\n * Load default configurations.\n */\n $this->mergeConfigFrom(\n __DIR__.'/../../config/problem.php', 'problem'\n );\n\n /**\n * Bind to service container.\n */\n $this->app->singleton(\n \\Illuminate\\Contracts\\Debug\\ExceptionHandler::class,\n ProblemAlertExceptionHandler::class\n );\n }", "public function register()\n\t{\n $this->app->bind(\n 'Commuttr\\Repositories\\Coordinates\\CoordinatesRepositoryInterface',\n 'Commuttr\\Repositories\\Coordinates\\DbCoordinatesRepository');\n\n $this->app->bind(\n 'Commuttr\\Repositories\\Route\\RouteRepositoryInterface',\n 'Commuttr\\Repositories\\Route\\DbRouteRepository');\n\n $this->app->bind(\n 'Commuttr\\Repositories\\Review\\ReviewRepositoryInterface',\n 'Commuttr\\Repositories\\Review\\DbReviewRepository');\n\n\t\t$this->app->bind(\n 'Commuttr\\Repositories\\User\\UserRepositoryInterface',\n 'Commuttr\\Repositories\\User\\DbUserRepository');\n\t}", "public function register()\n {\n $this->app->make('Furqank786\\Multitenancy\\Controllers\\SiteController');\n //$this->loadViewsFrom(__DIR__.'/views', 'multitenancy');\n\n }", "public function register()\n {\n $this->registerGraphQL();\n\n $this->registerConsole();\n }", "public function register()\n {\n $this->registerPayment();\n\n $this->app->alias('image', 'App\\Framework\\Image\\ImageService');\n }", "public function register()\n {\n $this->registerRollbar();\n }", "public function register()\n {\n $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function($app){\n return new ElasticsearchNedvizhimostsObserver(new Client());\n });\n\n // $this->app->bindShared(ElasticsearchNedvizhimostsObserver::class, function()\n // {\n // return new ElasticsearchNedvizhimostsObserver(new Client());\n // });\n }", "public function register()\n {\n $this->app->bind(TelescopeRouteServiceContract::class, TelescopeRouteService::class);\n }", "public function register()\n {\n\n // 將config/config.php裡的設定跟原有的結合起來\n $this->mergeConfigFrom(\n __DIR__.'/config/config.php', 'es_config'\n );\n\n // 登入elasticsearch\n $this->app->singleton('Elasticsearch\\Client', function($app){\n\n return ClientBuilder::create()->build(config('es_config'));\n\n });\n\n $this->app->instance('qelastic', new Qelastic($this->app));\n\n\n\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/faithgen-events.php', 'faithgen-events');\n\n $this->app->singleton(EventsService::class);\n $this->app->singleton(GuestService::class);\n }", "public function register()\n {\n $this->app->bind('gameService', 'App\\Service\\GameService');\n }", "public function register()\n {\n $this->app->bind(\n \\App\\Services\\UserCertificate\\IUserCertificateService::class,\n \\App\\Services\\UserCertificate\\UserCertificateService::class\n );\n }", "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "public function register() {\n $this->app->bind(\n 'Illuminate\\Contracts\\Auth\\Registrar' , 'App\\Services\\Registrar'\n );\n\n $this->app->bind(PostRepositoryContract::class, PostRepository::class);\n }", "public function register()\n {\n $this->app->bind('ResponseFormat',ResponseFormat::class);\n $this->app->bind('AdminUserService',AdminUserService::class);\n $this->app->bind('GenresService', GenresService::class);\n $this->app->bind('ContentService', ContentService::class);\n $this->app->bind(AudioBookRepository::class,function($app){\n return new AudioBookRepository(new AudioBook);\n });\n $this->app->bind(PodcastRepository::class,function($app){\n return new PodcastRepository(new Podcast);\n });\n $this->app->bind(AudioBookGenreRepository::class,function($app){\n return new AudioBookGenreRepository(new AudioBookGenre); \n });\n $this->app->bind(PodcastGenreRepository::class,function($app){\n return new PodcastGenreRepository(new PodcastGenre);\n });\n $this->app->bind(TrainingGenreRepository::class,function($app){\n return new TrainingGenreRepository(new TrainingGenre);\n });\n $this->app->bind(TrainingRepository::class,function($app){\n return new TrainingRepository(new Training);\n });\n $this->app->bind(UserRepository::class,function($app){\n return new UserRepository(new User);\n });\n $this->app->bind(RegisterApplicationRepository::class,function($app){\n return new RegisterApplicationRepository(new RegisterApplication);\n });\n $this->app->bind(AdminUserRepository::class,function($app){\n return new AdminUserRepository(new AdminUser);\n });\n $this->app->bind(VolunteerApplicationRepository::class,function($app){\n return new VolunteerApplicationRepository(new VolunteerApplication);\n });\n \n }", "public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "public function register()\n {\n //\n $this->app->bind(\n 'App\\Repositories\\Address\\IAddressRepository',\n 'App\\Repositories\\Address\\AddressRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\College\\ICollegeRepository',\n 'App\\Repositories\\College\\CollegeRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Course\\ICourseRepository',\n 'App\\Repositories\\Course\\CourseRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Favorites\\IFavoritesRepository',\n 'App\\Repositories\\Favorites\\FavoritesRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Images\\IImageRepository',\n 'App\\Repositories\\Images\\ImageRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Place\\IPlaceRepository',\n 'App\\Repositories\\Place\\PlaceRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PlaceType\\IPlaceTypeRepository',\n 'App\\Repositories\\PlaceType\\PlaceTypeRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\City\\ICityRepository',\n 'App\\Repositories\\City\\CityRepository'\n );\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\Customer\\CustomerRepository',\n 'App\\Repositories\\Customer\\DbCustomerRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Flight\\FlightRepository',\n 'App\\Repositories\\Flight\\DbFlightRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Booking\\BookingRepository',\n 'App\\Repositories\\Booking\\DbBookingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Passenger\\PassengerRepository',\n 'App\\Repositories\\Passenger\\DbPassengerRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Outbound\\OutboundRepository',\n 'App\\Repositories\\Outbound\\DbOutboundRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Cost\\CostRepository',\n 'App\\Repositories\\Cost\\DbCostRepository'\n );\n }", "public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }", "public function register()\n {\n $this->registerGuard();\n $this->registerBladeDirectives();\n }", "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(\n config('settings.authentication_services'),\n $app['Laravel\\Socialite\\Contracts\\Factory'],\n $app['Illuminate\\Contracts\\Auth\\Factory']\n );\n });\n\n $this->app->singleton(ImageValidator::class, function ($app) {\n return new ImageValidator(\n config('settings.image.max_filesize'),\n config('settings.image.mime_types'),\n $app['Intervention\\Image\\ImageManager']\n );\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(\n config('settings.image.max_width'),\n config('settings.image.max_height'),\n config('settings.image.folder')\n );\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService(\n $app['App\\Repositories\\WordRepository'],\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.number_of_words_to_remember')\n );\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService(\n $app['Illuminate\\Session\\SessionManager'],\n config('settings.min_number_of_chars_per_one_mistake')\n );\n });\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "public function register()\n {\n $this->registerRepository();\n $this->registerParser();\n }", "public function register()\n {\n $this->registerJWT();\n $this->registerJWSProxy();\n $this->registerJWTAlgoFactory();\n $this->registerPayload();\n $this->registerPayloadValidator();\n $this->registerPayloadUtilities();\n\n // use this if your package has a config file\n // config([\n // 'config/JWT.php',\n // ]);\n }", "public function register()\n {\n $this->app->bind(CertificationService::class, function($app){\n return new CertificationService();\n });\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/config/config.php', 'monobank'\n );\n\n $this->app->make('Karpovigorok\\MonobankStatement\\Controllers\\MainpageController');\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->app->register(Providers\\ManagerServiceProvider::class);\n $this->app->register(Providers\\ValidationServiceProvider::class);\n }", "public function register()\n {\n\n\n\n $this->mergeConfigFrom(__DIR__ . '/../config/counter.php', 'counter');\n\n $this->app->register(RouteServiceProvider::class);\n\n\n }", "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/exposable.php', 'exposable');\n\n $this->registerMiddleware();\n\n $this->registerRoutes();\n\n $this->app->make(ExposableController::class);\n\n $this->app->bind('exposable.signer', function () {\n return new ExposableSigner(config('exposable.key'));\n });\n }", "public function register()\n {\n $this->registerConfig();\n $this->registerView();\n $this->registerMessage();\n $this->registerMenu();\n $this->registerOutput();\n $this->registerCommands();\n require __DIR__ . '/Service/ServiceProvider.php';\n require __DIR__ . '/Service/RegisterRepoInterface.php';\n require __DIR__ . '/Service/ErrorHandling.php';\n $this->registerExportDompdf();\n $this->registerExtjs();\n }", "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\UsersInterface',\n 'App\\Services\\UsersService'\n );\n $this->app->bind(\n 'App\\Contracts\\CallsInterface',\n 'App\\Services\\CallsService'\n );\n $this->app->bind(\n 'App\\Contracts\\ContactsInterface',\n 'App\\Services\\ContactsService'\n );\n $this->app->bind(\n 'App\\Contracts\\EmailsInterface',\n 'App\\Services\\EmailsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PhoneNumbersInterface',\n 'App\\Services\\PhoneNumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\NumbersInterface',\n 'App\\Services\\NumbersService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserNumbersInterface',\n 'App\\Services\\UserNumbersService'\n );\n }", "public function register()\n {\n $this->app->bind(ReverseEncoder::class, function () {\n return new ReverseEncoder;\n });\n }", "public function register()\n {\n Schema::defaultStringLength(199);\n\n $this->app->bind(\n 'App\\Helper\\ICheckAction',\n 'App\\Helper\\CheckAction'\n );\n\n $this->app->bind(\n 'App\\Helper\\IGetDateTime',\n 'App\\Helper\\GetDateTime'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AnnouceRepository\\IAnnouceRepository',\n 'App\\Repositories\\AnnouceRepository\\AnnouceRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AjaxRepository\\IAjaxRepository',\n 'App\\Repositories\\AjaxRepository\\AjaxRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\UserRepository\\IUserRepository',\n 'App\\Repositories\\UserRepository\\UserRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PermissionRepository\\IPermissionRepository',\n 'App\\Repositories\\PermissionRepository\\PermissionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PermissionDetailRepository\\IPermissionDetailRepository',\n 'App\\Repositories\\PermissionDetailRepository\\PermissionDetailRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\AreaRepository\\IAreaRepository',\n 'App\\Repositories\\AreaRepository\\AreaRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\TableRepository\\ITableRepository',\n 'App\\Repositories\\TableRepository\\TableRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\GroupMenuRepository\\IGroupMenuRepository',\n 'App\\Repositories\\GroupMenuRepository\\GroupMenuRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ToppingRepository\\IToppingRepository',\n 'App\\Repositories\\ToppingRepository\\ToppingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialRepository\\IMaterialRepository',\n 'App\\Repositories\\MaterialRepository\\MaterialRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialDetailRepository\\IMaterialDetailRepository',\n 'App\\Repositories\\MaterialDetailRepository\\MaterialDetailRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MaterialActionRepository\\IMaterialActionRepository',\n 'App\\Repositories\\MaterialActionRepository\\MaterialActionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\SupplierRepository\\ISupplierRepository',\n 'App\\Repositories\\SupplierRepository\\SupplierRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\CookRepository\\ICookRepository',\n 'App\\Repositories\\CookRepository\\CookRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\CookScreenRepository\\ICookScreenRepository',\n 'App\\Repositories\\CookScreenRepository\\CookScreenRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\DishRepository\\IDishRepository',\n 'App\\Repositories\\DishRepository\\DishRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\OrderRepository\\IOrderRepository',\n 'App\\Repositories\\OrderRepository\\OrderRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PayRepository\\IPayRepository',\n 'App\\Repositories\\PayRepository\\PayRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\WarehouseRepository\\IWarehouseRepository',\n 'App\\Repositories\\WarehouseRepository\\WarehouseRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\WarehouseCookRepository\\IWarehouseCookRepository',\n 'App\\Repositories\\WarehouseCookRepository\\WarehouseCookRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ImportCouponRepository\\IImportCouponRepository',\n 'App\\Repositories\\ImportCouponRepository\\ImportCouponRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ExportCouponRepository\\IExportCouponRepository',\n 'App\\Repositories\\ExportCouponRepository\\ExportCouponRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ShiftRepository\\IShiftRepository',\n 'App\\Repositories\\ShiftRepository\\ShiftRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PositionRepository\\IPositionRepository',\n 'App\\Repositories\\PositionRepository\\PositionRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ReportRepository\\IReportRepository',\n 'App\\Repositories\\ReportRepository\\ReportRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\BookingRepository\\IBookingRepository',\n 'App\\Repositories\\BookingRepository\\BookingRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\DayRepository\\IDayRepository',\n 'App\\Repositories\\DayRepository\\DayRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\VoucherRepository\\IVoucherRepository',\n 'App\\Repositories\\VoucherRepository\\VoucherRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\MethodRepository\\IMethodRepository',\n 'App\\Repositories\\MethodRepository\\MethodRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\PlanRepository\\IPlanRepository',\n 'App\\Repositories\\PlanRepository\\PlanRepository'\n );\n }", "public function register()\n\t{\n\t\t$this->app->bind(\n\t\t\t'Illuminate\\Contracts\\Auth\\Registrar',\n\t\t\t'App\\Services\\Registrar'\n\t\t);\n \n $this->app->bind(\"App\\\\Services\\\\ILoginService\",\"App\\\\Services\\\\LoginService\");\n \n $this->app->bind(\"App\\\\Repositories\\\\IItemRepository\",\"App\\\\Repositories\\\\ItemRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IOutletRepository\",\"App\\\\Repositories\\\\OutletRepository\");\n $this->app->bind(\"App\\\\Repositories\\\\IInventoryRepository\",\"App\\\\Repositories\\\\InventoryRepository\");\n\t}", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/config.php',\n 'iyzipay'\n );\n\n $this->app->bind('iyzipay-laravel', function () {\n return new IyzipayLaravel();\n });\n }", "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/wortmann-soap-api.php',\n 'wortmann-soap-api',\n );\n\n $this->app->singleton(WortmannSoapApi::class, function () {\n return new Api(config('wortmann-soap-api'));\n });\n }", "public function register()\n {\n $this->app->bind(ReviewService::class, function ($app) {\n return new ReviewService();\n });\n }", "public function register()\n {\n include __DIR__.'/Http/routes.php';\n\n // For LAEditor\n if(file_exists(__DIR__.'/../../laeditor')) {\n include __DIR__.'/../../laeditor/src/routes.php';\n }\n \n /*\n |--------------------------------------------------------------------------\n | Providers\n |--------------------------------------------------------------------------\n */\n \n // Collective HTML & Form Helper\n $this->app->register(\\Collective\\Html\\HtmlServiceProvider::class);\n // For Datatables\n $this->app->register(\\Yajra\\Datatables\\DatatablesServiceProvider::class);\n // For Gravatar\n $this->app->register(\\Creativeorange\\Gravatar\\GravatarServiceProvider::class);\n // For Entrust\n $this->app->register(\\Zizaco\\Entrust\\EntrustServiceProvider::class);\n // For Spatie Backup\n $this->app->register(\\Spatie\\Backup\\BackupServiceProvider::class);\n \n /*\n |--------------------------------------------------------------------------\n | Register the Alias\n |--------------------------------------------------------------------------\n */\n \n $loader = AliasLoader::getInstance();\n \n // Collective HTML & Form Helper\n $loader->alias('Form', \\Collective\\Html\\FormFacade::class);\n $loader->alias('HTML', \\Collective\\Html\\HtmlFacade::class);\n \n // For Gravatar User Profile Pics\n $loader->alias('Gravatar', \\Creativeorange\\Gravatar\\Facades\\Gravatar::class);\n \n // For LaraAdmin Code Generation\n $loader->alias('CodeGenerator', \\Dwij\\Laraadmin\\CodeGenerator::class);\n \n // For LaraAdmin Form Helper\n $loader->alias('LAFormMaker', \\Dwij\\Laraadmin\\LAFormMaker::class);\n \n // For LaraAdmin Helper\n $loader->alias('LAHelper', \\Dwij\\Laraadmin\\Helpers\\LAHelper::class);\n \n // LaraAdmin Module Model \n $loader->alias('Module', \\Dwij\\Laraadmin\\Models\\Module::class);\n\n // For LaraAdmin Configuration Model\n $loader->alias('LAConfigs', \\Dwij\\Laraadmin\\Models\\LAConfigs::class);\n \n // For Entrust\n $loader->alias('Entrust', \\Zizaco\\Entrust\\EntrustFacade::class);\n $loader->alias('role', \\Zizaco\\Entrust\\Middleware\\EntrustRole::class);\n $loader->alias('permission', \\Zizaco\\Entrust\\Middleware\\EntrustPermission::class);\n $loader->alias('ability', \\Zizaco\\Entrust\\Middleware\\EntrustAbility::class);\n \n /*\n |--------------------------------------------------------------------------\n | Register the Controllers\n |--------------------------------------------------------------------------\n */\n $this->app->make('App\\Http\\Controllers\\Auth\\AuthController');\n $this->app->make('Dwij\\Laraadmin\\Controllers\\ModuleController');\n $this->app->make('Dwij\\Laraadmin\\Controllers\\FieldController');\n $this->app->make('Dwij\\Laraadmin\\Controllers\\MenuController');\n \n // For LAEditor\n if(file_exists(__DIR__.'/../../laeditor')) {\n $this->app->make('Dwij\\Laeditor\\Controllers\\CodeEditorController');\n }\n\n }", "public function register()\n {\n $this->registerConfig();\n\n $this->registerDataStore();\n\n $this->registerStorageFactory();\n\n $this->registerStorageManager();\n\n $this->registerSimplePhoto();\n }", "public function register()\n {\n\n $config = $this->app['config']['cors'];\n\n $this->app->bind('Yocome\\Cors\\CorsService', function() use ($config){\n return new CorsService($config);\n });\n\n }", "public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }", "public function register()\n {\n $this->app->bind(\n 'auditor',\n Auditor::class\n );\n }", "public function register()\n {\n\n //include (__DIR__.\"/../../vendor/autoload.php\");\n\n // Blog Repositories\n $this->app->singleton(\n \\Ridwanpandi\\Blog\\Repositories\\BlogRepository::class,\n \\Ridwanpandi\\Blog\\Repositories\\BlogEloquent::class\n );\n // end Blog Repositories\n\n $this->loadMigrationsFrom(__DIR__.'/../Database');\n\n $this->app->make('Ridwanpandi\\Blog\\Http\\Controllers\\BlogController');\n $this->app->make('Ridwanpandi\\Blog\\Http\\Controllers\\TokenController');\n $this->app->make('Ridwanpandi\\Blog\\Http\\Middleware\\JWTMiddleware');\n $this->app->make('Ridwanpandi\\Blog\\Models\\Blog');\n $this->app->make('Ridwanpandi\\Blog\\Models\\Meta');\n\n $this->publishes([\n __DIR__.'/../Database' => base_path('database/migrations'),\n ]);\n\n $this->app->routeMiddleware([\n 'jwt' => \\Ridwanpandi\\Blog\\Http\\Middleware\\JWTMiddleware::class,\n ]);\n }", "public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }", "public function register()\n {\n $this->app->bind(UserRepositoryContract::class, UserRepository::class);\n\n $this->app->register(UserRouteServiceProvider::class);\n }", "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }" ]
[ "0.72834975", "0.7129936", "0.7108755", "0.70365775", "0.69857496", "0.6981425", "0.69721615", "0.6920895", "0.69191223", "0.6882845", "0.6881585", "0.6819491", "0.6818964", "0.68054336", "0.68047476", "0.6799833", "0.6794076", "0.679339", "0.6788445", "0.67767453", "0.67700595", "0.67683184", "0.67680913", "0.67643136", "0.6759103", "0.67554945", "0.6752813", "0.6750741", "0.6746924", "0.67453396", "0.674472", "0.6736895", "0.67368203", "0.6736107", "0.6732007", "0.6730551", "0.67287403", "0.672675", "0.67204756", "0.6715763", "0.6714403", "0.6708389", "0.6705731", "0.67022485", "0.6701995", "0.67011917", "0.6697624", "0.66935164", "0.6693066", "0.6691179", "0.6690436", "0.6685918", "0.6683847", "0.6681835", "0.6677354", "0.66759163", "0.66744", "0.6668164", "0.6667953", "0.666673", "0.6666137", "0.6664308", "0.66636014", "0.66625667", "0.6662302", "0.6661477", "0.66603136", "0.6658671", "0.66563946", "0.6656232", "0.66561985", "0.665449", "0.6653904", "0.6652145", "0.66504127", "0.664745", "0.6647391", "0.6647022", "0.6644753", "0.6644314", "0.6643591", "0.66434056", "0.6641648", "0.66351223", "0.6633715", "0.6631681", "0.6631141", "0.6628324", "0.6621463", "0.6619662", "0.661933", "0.6617775", "0.66167384", "0.6614609", "0.661398", "0.66132176", "0.6613193", "0.6613182", "0.6613065", "0.661006", "0.66071045" ]
0.0
-1
Returns a generic web service object
public function create() { $this->response->setData(1); $this->response->setHeader('__CREATED', Http::Response(Http::CREATED)); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "abstract protected function getService();", "private static function getServiceInstance()\n {\n $s = self::getServiceType();\n switch ($s) {\n case 0:\n http_response_code(404);\n exit();\n case 1:\n return new RCFaxClient();\n break;\n case 2:\n return new TwilioFaxClient();\n }\n }", "public function getWebService()\n {\n return $this->webService;\n }", "public function getWebservice()\n {\n return $this->_webservice;\n }", "protected function getHandler()\n {\n static $soap;\n\n if (empty($soap)) {\n $soap = new ECommerceServices(\n new Request(),\n $this->getApplication()->getKernel()->getContainer()->get('Logger'),\n new EventDispatcher()\n );\n }\n\n return $soap;\n }", "public function getWebservice()\n {\n return $this->webservice;\n }", "protected function service()\n {\n return new Service();\n }", "abstract public function service();", "protected function resourceService(){\n return new $this->resourceService;\n }", "public function get_service($index = FALSE, $settings = FALSE)\n\t{\t\t\n\t\treturn parent::get_object($index, $settings);\n\t}", "public function getWebservice(): WebserviceInterface\n {\n if ($this->_webservice === null) {\n $this->_webservice = $this->getConnection()->getWebservice($this->getName());\n }\n\n return $this->_webservice;\n }", "static function generarServicioF(){\n\n\t\trequire_once('SERVIDOR/lib/nusoap.php');\n \n $host = 'http://maxineiner.tuars.com/webservice/ws_segundo_parcial.php?wsdl';\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}", "public function service($request,$response,$utilities);", "abstract function get_crud_service();", "public function getApiService();", "function __get_service($service) {\n\n if ($this->services[$service] === null) {\n\n $url = $this->soap_endpoint.'/'.$service.'?wsdl';\n\n $this->services[$service] =\n $this->__create_soap_client($url, $this->soap_wsdl);\n\n }\n\n return $this->services[$service];\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 }", "public static function factory( $name, $config ) {\n\t\t$handlers = array(\n\t\t\t'microsoft' => 'MicrosoftWebService',\n\t\t\t'apertium' => 'ApertiumWebService',\n\t\t\t'yandex' => 'YandexWebService',\n\t\t\t'ttmserver' => 'RemoteTTMServerWebService',\n\t\t);\n\n\t\tif ( !isset( $config['timeout'] ) ) {\n\t\t\t$config['timeout'] = 3;\n\t\t}\n\n\t\tif ( isset( $handlers[$config['type']] ) ) {\n\t\t\t$class = $handlers[$config['type']];\n\n\t\t\treturn new $class( $name, $config );\n\t\t}\n\n\t\treturn null;\n\t}", "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}", "public static function init(){\n $wsdlUrl = self::getWsdl();\n $soapClientOptions = [\n 'stream_context' =>self::generateContext(),\n 'cache_wsdl' => WSDL_CACHE_NONE\n ];\n return new SoapClient($wsdlUrl,$soapClientOptions);\n }", "function ezWordpREST () {\n\t$instance = ezWordpREST::instance( __FILE__, '1.0.0' );\n\n\treturn $instance;\n}", "public function saveWebservice() {\n\n $registry = Zend_Registry::getInstance();\n $em = $registry->entitymanager;\n $data = $this->getRequest()->getParams();\n\n if(isset($data['webserviceId']) && $data['webserviceId'] > 0) {\n $serviceObj = $em->find('TWebservice',$data['webserviceId']);\n $serviceObj->setWebserviceId($data['webserviceId']);\n } else {\n $serviceObj = new TWebservice();\n }\n\n $serviceObj->setWebserviceName($data['WB_Name']);\n $serviceObj->setWebserviceUrl($data['WB_Url']);\n\n $Client = $em->find('TClient', $data['clientId']);\n\n $serviceObj->setClientId($Client);\n $em->persist($serviceObj);\n $em->flush();\n\n return true;\n }", "public function getObject()\n\t{\n\t\t// Create the OPF instance.\n\t\treturn new Opf_Class($this->_serviceLocator->get('template.Opt'));\n\t}", "public function call(){\n \n $service = (string)$this->_service;\n \n if(!$this->_params){\n $this->setParams();\n }\n \n $response = $this->_soapClient->$service($this->_params); \n \n $serviceResult = $service.'Result';\n \n $xml = $response->$serviceResult; \n \n return $xml;\n\n }", "public function getReflectionService() {}", "abstract protected function getService($id);", "function __construct($service) {\n // return new $class;\n }", "public function getAsSOAP() {\n\t $this->recursive_unset($this,\"schema\");\n\t //print_r($this);\n\t foreach($this as $key=>&$value) {\n\t\t$this->prepareSOAPrecursive($this->$key);\n\t }\n\t return $this;\n\t}", "function _getJsonServices() {\n\t\trequire_once('lib/pkp/lib/json/JSON.php');\n\t\treturn new Services_JSON();\n\t}", "public function __construct($wsdl = NULL, $options = NULL)\n {\n }", "public abstract function getApiObjectClass();", "public function aw_service_wp ( $proc, $args ) {\n\t \t//$args = array('argDta' => $productID,'argIsSale' => 1,'argUsr' => '');\n\t\t$url \t\t= 'http://203.201.129.15/AWSERVICE_WP_WEB/awws/AWService_WP.awws?wsdl';\n\t\t$client \t= new SoapClient($url);\n\t\t$response \t= $client->__soapCall( $proc, array($args) );\n\t\t\n\t\tswitch ( $proc ) {\n\t\t\tcase 'Trainers_OnlineProduct_Listing':\n\t\t\t\t$simpleXml = simplexml_load_string($response->Trainers_OnlineProduct_ListingResult);\n\t\t\tbreak;\n\n\t\t\tcase 'CorporateClientsList':\n\t\t\t\t$simpleXml = simplexml_load_string($response->CorporateClientsListResult);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'pcPrdct_DisplayInfo':\n\t\t\t\t$simpleXml = simplexml_load_string($response->pcPrdct_DisplayInfoResult);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'pcChat_UserDetails':\n\t\t\t\t$simpleXml = $response->pcChat_UserDetailsResult;\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t \treturn $simpleXml;\n\t }", "public function getService() // TODO: add function return type\r\n {\r\n $connection_properties = $this->get();\r\n\r\n // load the services from the services store; for connections,\r\n // make sure the service also has the connection interface\r\n $connection_type = $connection_properties['connection_type'];\r\n $connection_info = $connection_properties['connection_info'];\r\n $service = \\Flexio\\Services\\Factory::create($connection_type, $connection_info);\r\n if (!($service instanceof \\Flexio\\IFace\\IConnection))\r\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::NO_SERVICE);\r\n\r\n // for oauth services, the access token may have been refreshed via\r\n // a refresh token, so these should be saved so that the access token\r\n // isn't refreshed in every subsequent call\r\n if ($service instanceof \\Flexio\\IFace\\IOAuthConnection)\r\n {\r\n $tokens = $service->getTokens();\r\n $connection_info = $connection_properties['connection_info'];\r\n\r\n $info_changed = false;\r\n if (!isset($connection_info))\r\n {\r\n $info_changed = true;\r\n }\r\n else\r\n {\r\n if (($connection_info['access_token'] ?? false) !== $tokens['access_token'])\r\n $info_changed = true;\r\n if (($connection_info['refresh_token'] ?? false) !== $tokens['refresh_token'])\r\n $info_changed = true;\r\n if (($connection_info['expires'] ?? false) !== $tokens['expires'])\r\n $info_changed = true;\r\n }\r\n\r\n if ($info_changed === true)\r\n $this->set([ 'connection_info' => $tokens]);\r\n }\r\n\r\n return $service;\r\n }", "public function createWebserviceDriver()\n {\n return new WebServiceHealthCheck;\n }", "public function asWebserviceInput() {\r\n $input = array(\"Id\" => $this->getTaxType(), \"BaseImp\" => $this->getBaseAmount(), \"Importe\" => $this->getTaxAmount());\r\n return $input;\r\n }", "protected function getResponseFactory()\n {\n }", "public static function factory($config = array())\n {\n $default = array(\n 'base_url' => 'http://api.wordpress.org',\n 'curl.options' => array(\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_TIMEOUT => 120,\n 'body_as_string' => true,\n ),\n );\n\n $required = array('base_url');\n $config = Collection::fromConfig($config, $default, $required);\n $description = ServiceDescription::factory(__DIR__.'/service.json');\n\n $client = new self($config->get('base_url'), $config);\n $client->setDescription($description);\n\n return $client;\n }", "function _openService($url)\n {\n $obj = new SOAP_Client($url, TRUE);\n return $obj;\n }", "public function webserviceAction($className = NULL, $service = false)\n {\n $this->layout = \"blank\";\n $niddles = preg_split(\"[_]\", $className);\n $className = \"Development_Helper_Api_{$niddles[count($niddles)-1]}\";\n\n if (isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'POST')) {\n App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->loadServer();\n }\n else {\n if ($service) {\n echo App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->setServiceName(\"appRain\")\n ->showWSDL();\n }\n else {\n echo App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->setServiceName(\"appRain\")\n ->showWSDLURI();\n }\n }\n }", "public static function _getSoapClient($parameters = array())\n\t{\n\t\t$endpoint = Transip_ApiSettings::$endpoint;\n\n\t\tif(self::$_soapClient === null)\n\t\t{\n\t\t\t$extensions = get_loaded_extensions();\n\t\t\t$errors = array();\n\t\t\tif(!class_exists('SoapClient') || !in_array('soap', $extensions))\n\t\t\t{\n\t\t\t\t$errors[] = 'The PHP SOAP extension doesn\\'t seem to be installed. You need to install the PHP SOAP extension. (See: http://www.php.net/manual/en/book.soap.php)';\n\t\t\t}\n\t\t\tif(!in_array('openssl', $extensions))\n\t\t\t{\n\t\t\t\t$errors[] = 'The PHP OpenSSL extension doesn\\'t seem to be installed. You need to install PHP with the OpenSSL extension. (See: http://www.php.net/manual/en/book.openssl.php)';\n\t\t\t}\n\t\t\tif(!empty($errors)) die('<p>' . implode(\"</p>\\n<p>\", $errors) . '</p>');\n\n\t\t\t$classMap = array(\n\t\t\t\t'DataCenterVisitor' => 'Transip_DataCenterVisitor',\n\t\t\t);\n\n\t\t\t$options = array(\n\t\t\t\t'classmap' => $classMap,\n\t\t\t\t'encoding' => 'utf-8', // lets support unicode\n\t\t\t\t'features' => SOAP_SINGLE_ELEMENT_ARRAYS, // see http://bugs.php.net/bug.php?id=43338\n\t\t\t\t'trace' => false, // can be used for debugging\n\t\t\t);\n\n\t\t\t$wsdlUri = \"https://{$endpoint}/wsdl/?service=\" . self::SERVICE;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tself::$_soapClient = new SoapClient($wsdlUri, $options);\n\t\t\t}\n\t\t\tcatch(SoapFault $sf)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Unable to connect to endpoint '{$endpoint}'\");\n\t\t\t}\n\t\t\tself::$_soapClient->__setCookie('login', Transip_ApiSettings::$login);\n\t\t\tself::$_soapClient->__setCookie('mode', Transip_ApiSettings::$mode);\n\t\t}\n\n\t\t$timestamp = time();\n\t\t$nonce = uniqid('', true);\n\n\t\tself::$_soapClient->__setCookie('timestamp', $timestamp);\n\t\tself::$_soapClient->__setCookie('nonce', $nonce);\n\t\tself::$_soapClient->__setCookie('clientVersion', self::API_VERSION);\n\t\tself::$_soapClient->__setCookie('signature', self::_urlencode(self::_sign(array_merge($parameters, array(\n\t\t\t'__service' => self::SERVICE,\n\t\t\t'__hostname' => $endpoint,\n\t\t\t'__timestamp' => $timestamp,\n\t\t\t'__nonce' => $nonce\n\t\t)))));\n\n\t\treturn self::$_soapClient;\n\t}", "function __create_soap_client($endpoint, $wsdl = false, $proxyhost = false,\n $proxyport = false, $proxyusername = false,\n $proxypassword = false, $timeout = 0,\n $response_timeout = 30) {\n\n if (!extension_loaded('soap')) {\n return new soapclient($endpoint, $wsdl, $proxyhost, $proxyport,\n $proxyusername, $proxypassword, $timeout,\n $response_timeout);\n } else {\n return new nusoap_client($endpoint, $wsdl, $proxyhost, $proxyport,\n $proxyusername, $proxypassword, $timeout,\n $response_timeout);\n }\n\n}", "public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }", "public function __construct($wsdl){\n\t\n\t\t$this->wsdl\t=\t$wsdl;\n\t}", "public function addService($serviceId, $object)\n {\n if (!$object instanceof BaseWebService) return;\n if (!$serviceId) return;\n\n $rClass = new \\ReflectionClass(get_class($object));\n $methods = $rClass->getMethods(\\ReflectionMethod::IS_PUBLIC);\n $ar = $this->getAnnotationReader();\n\n //Find the default namespace\n $daClass = 'PureMachine\\Bundle\\WebServiceBundle\\Service\\Annotation\\WSNamespace';\n $nsAnnotation = $ar->getClassAnnotation($rClass, $daClass);\n if ($nsAnnotation) $defaultNamespace = $nsAnnotation->value;\n else $nsAnnotation = '';\n\n foreach ($methods as $method) {\n /*\n * If the method has no Webservice annotation , exclude it from\n * the addService building\n */\n $webserviceAnnotationsClass = 'PureMachine\\Bundle\\WebServiceBundle\\Service\\Annotation\\WebService';\n $wsAnnotations = $ar->getMethodAnnotation($method, $webserviceAnnotationsClass);\n if(is_null($wsAnnotations)) continue;\n\n //Lookup the namespace\n $nsAnnotation = $ar->getMethodAnnotation($method, $daClass);\n if ($nsAnnotation) $namespace = $nsAnnotation->value;\n else $namespace = $defaultNamespace;\n\n $annotations = $ar->getMethodAnnotations($method);\n $definition = array();\n $definition['inputType'] = 'object';\n $definition['inputClass'] = array();\n $definition['returnType'] = 'object';\n $definition['returnClass'] = array();\n $definition['headers'] = array();\n $description = '';\n $internal = array();\n $name = null;\n $version = null;\n\n foreach ($annotations as $annotation) {\n\n if ($annotation instanceof PM\\WebService) {\n $name = $namespace . \"/\" . $annotation->value;\n $version = $annotation->version;\n $definition['accessLevel'] = static::ACCESS_LEVEL_PRIVATE;\n $internal['id'] = $serviceId;\n $internal['method'] = $method->getName();\n } elseif ($annotation instanceof PM\\ReturnClass) {\n $definition['returnClass'] = $annotation->getValue();\n if ($annotation->isArray) $definition['returnType'] = 'array';\n } elseif ($annotation instanceof PM\\InputClass) {\n $definition['inputClass'] = $annotation->getValue();\n if ($annotation->isArray) $definition['inputType'] = 'array';\n } elseif ($annotation instanceof PM\\Doc) {\n $description = $annotation->description;\n } elseif ($annotation instanceof PM\\Headers) {\n if (is_array($annotation->value)) {\n foreach ($annotation->value as $key => $value) {\n $definition['headers'][$key] = $value;\n }\n }\n }\n\n }\n\n if (count($definition['returnClass']) == 0)\n throw new WebServiceException(\"A store class must be defined in returnClass \"\n .\"annotation\",\n WebServiceException::WS_006);\n\n if ($name && $version) {\n $key = strtolower($name);\n\n if (!array_key_exists($key, $this->webServices)) {\n $this->webServices[$key] = array();\n }\n\n $this->webServices[$key]['name'] = $name;\n $this->webServices[$key][$version] = array();\n $this->webServices[$key][$version]['definition'] = $definition;\n $this->webServices[$key][$version]['_internal'] = $internal;\n $this->webServices[$key]['description'] = $description;\n }\n }\n }", "protected function _make_client()\n\t{\n\t\tif (is_null($this->_client))\n\t\t{\n\t\t\trequire_once APPPATH.'libraries/nusoap/nusoap.php';\n\t\t\t\t\n\t\t\t$this->_client = new nusoap_client($this->_url, 'wsdl', '', '', '', '');\n\t\t}\n\t\t\n\t\treturn $this->_client;\n\t}", "function getWSDL($modelId, $serviceMethod = 'call')\n {\n $modelClass = $this->__getModelClass($modelId);\n $expireTime = '+1 year';\n $cachePath = $modelClass . '.wsdl';\n \n // Check cache if exist\n $wsdl = cache($cachePath, null, $expireTime);\n\n // If DEBUG > 0, compare cache modified time to model file modified time\n if ((Configure::read() > 0) && (! is_null($wsdl))) {\n\n $cacheFile = CACHE . $cachePath;\n if (is_file($cacheFile)) {\n $modelMtime = filemtime($this->__getModelFile($modelId));\n $cacheMtime = filemtime(CACHE . $cachePath);\n if ($modelMtime > $cacheMtime) {\n $wsdl = null;\n }\n }\n\n }\n \n // Generate WSDL if not cached\n if (is_null($wsdl)) {\n \n $refl = new IPReflectionClass($modelClass);\n \n $controllerName = $this->params['controller'];\n $serviceURL = Router::url(\"/\". $controllerName . \"/\" . $serviceMethod, true);\n\n $wsdlStruct = new WSDLStruct('http://schema.example.com', \n $serviceURL . '/' . $modelId, \n SOAP_RPC, \n SOAP_LITERAL);\n $wsdlStruct->setService($refl);\n try {\n $wsdl = $wsdlStruct->generateDocument();\n // cache($cachePath, $wsdl, $expireTime);\n } catch (WSDLException $exception) {\n if (Configure::read() > 0) {\n $exception->Display();\n exit();\n } else {\n return null;\n }\n }\n }\n\n return $wsdl;\n }", "protected function initializeSoapClient()\n {\n\n\t\t$authArray = array(\n\t\t\t'location' => 'https://' . $this->server . '/EWS/Exchange.asmx',\n\t\t\t'classmap' => $this->classMap(),\n\t\t\t'curlopts' => $this->curl_options,\n\t\t\t'features' => SOAP_SINGLE_ELEMENT_ARRAYS,\n\t\t); \n\n\t\tif(!empty($this->token)) {\n\n\t\t\t$authArray[\"token\"] = $this->token; \n\n\t\t}\n\t\telse {\n\n\t\t\t$authArray[\"user\"] = $this->username; \n\t\t\t$authArray[\"password\"] = $this->password; \n\n\t\t}\n\n $this->soap = new Oath2Soap(\n dirname(__FILE__) . '/assets/services.wsdl',\n $authArray\n );\n\n return $this->soap;\n }", "public function getUrlSOAP(){\r\n\t\treturn $this->soap;\r\n\t}", "private function getServiceMap()\n {\n $result = array(\n 'transport' => 'POST',\n 'envelope' => 'JSON-RPC-2.0',\n 'SMDVersion' => '2.0',\n 'contentType' => 'application/json',\n 'target' => !empty($_SERVER['REQUEST_URI']) ? substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], '?')) : '',\n 'services' => array(),\n 'description' => '',\n );\n\n foreach ($this->instances as $namespace => $instance) {\n $rc = new ReflectionClass($instance);\n\n // Get Class Description\n if ($rcDocComment = $this->getDocDescription($rc->getDocComment())) {\n $result['description'] .= $rcDocComment . PHP_EOL;\n }\n\n foreach ($rc->getMethods() as $method) {\n /** @var ReflectionMethod $method */\n if (!$method->isPublic() || in_array(strtolower($method->getName()), $this->hiddenMethods)) {\n continue;\n }\n\n $methodName = ($namespace ? $namespace . '.' : '') . $method->getName();\n $docComment = $method->getDocComment();\n\n $result['services'][$methodName] = array('parameters' => array());\n\n // set description\n if ($rmDocComment = $this->getDocDescription($docComment)) {\n $result['services'][$methodName]['description'] = $rmDocComment;\n }\n\n // @param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\s\\*]*)\n $parsedParams = array();\n if (preg_match_all('/@param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\n\\*]*)/', $docComment, $matches)) {\n foreach ($matches[2] as $number => $name) {\n $type = $matches[1][$number];\n $desc = $matches[3][$number];\n $name = trim($name, '$');\n\n $param = array('type' => $type, 'description' => $desc);\n $parsedParams[$name] = array_filter($param);\n }\n };\n\n // process params\n foreach ($method->getParameters() as $parameter) {\n $name = $parameter->getName();\n $param = array('name' => $name, 'optional' => $parameter->isDefaultValueAvailable());\n if (array_key_exists($name, $parsedParams)) {\n $param += $parsedParams[$name];\n }\n\n if ($param['optional']) {\n $param['default'] = $parameter->getDefaultValue();\n }\n\n $result['services'][$methodName]['parameters'][] = $param;\n }\n\n // set return type\n if (preg_match('/@return\\s+([^\\s]+)\\s*([^\\n\\*]+)/', $docComment, $matches)) {\n $returns = array('type' => $matches[1], 'description' => trim($matches[2]));\n $result['services'][$methodName]['returns'] = array_filter($returns);\n }\n }\n }\n\n return $result;\n }", "protected function getRequestService()\n {\n return new PokemonRequestService();\n }", "abstract public function getServiceTypeName();", "private function createShipmentObject()\n {\n switch ($this->getServiceMethod()) {\n case 'addShip':\n return new AddShip();\n case 'addShipment':\n return new AddShipment();\n }\n }", "public static function create($type)\n\t{\n\t\tif (empty($type) || 0 === strpos($type, 'text/html')) {\n\t\t\treturn new HttpGetRequest;\n\t\t}\n\n\t\tif (0 === strpos($type, 'application/json')) {\n\t\t\treturn new HttpJsonRequest;\n\t\t}\n\n\t\treturn new HttpPostRequest;\n\t}", "function create_service_map($soap) {\n foreach ($this->services as $service) {\n require_once($service . '.php');\n if (class_exists($service)) {\n $c = (string) $service; \n $object = new $c();\n $soap->addObjectMap($object, 'urn:php-islandora-soapservice');\n }\n else {\n $this->log->lwrite(\"Could not load class $service, check the config files list \n of services to make sure they are correct\", 'SOAP_SERVER', NULL, NULL, 'ERROR');\n }\n }\n }", "public function getForWebserviceExport()\n {\n $el = parent::getForWebserviceExport();\n if ($this->data[\"internal\"]) {\n if (intval($this->data[\"internalId\"]) > 0) {\n if ($this->data[\"internalType\"] == \"document\") {\n $referencedDocument = Document::getById($this->data[\"internalId\"]);\n if (!$referencedDocument instanceof Document) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n } else if ($this->data[\"internalType\"] == \"asset\") {\n $referencedAsset = Asset::getById($this->data[\"internalId\"]);\n if (!$referencedAsset instanceof Asset) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n }\n }\n }\n\n $el->data = $this->data;\n return $el;\n }", "public static function loadService($service) {\n\t\t$class = ucfirst($service).'Service';\n\t\trequire(SITE_ROOT.'/services/'.$service.'/'.$class.'.php');\n\t\t$serviceObj = new $class();\n\t\treturn $serviceObj;\n\t}", "public function toSoapRequest()\n { \n \n $obj = new \\stdClass();\n\n // Populate SOAP Request object with data\n foreach ($this->_properties as $key=>$value) {\n // Prepare value by function\n $functionName = \"_prepare\" . ucwords($key);\n if (method_exists($this, $functionName)) {\n $value = $this->$functionName($value);\n }\n\n if (is_array($value)) {\n // An array\n $result = array();\n foreach ($value as $itemId => $item) {\n if ($item instanceof \\Pcxpress\\Unifaun\\Model\\Pcxpress\\Unifaun\\UnifaunAbstract) {\n $result[$itemId] = $item->toSoapRequest();\n } else {\n $result[$itemId] = $item;\n }\n }\n\n if (sizeof($result) > 0) {\n $namespace = $this->_namespace;\n if (array_key_exists($key, $this->_namespaceForProperties)) {\n $namespace = $this->_namespaceForProperties[$key];\n }\n\n if ($namespace !== null) {\n $result = new \\SoapVar($result, SOAP_ENC_OBJECT, null, $namespace, $key, $namespace);\n }\n\n $obj->$key = $result;\n }\n } elseif ($value instanceof \\Pcxpress\\Unifaun\\Model\\Pcxpress\\Unifaun\\UnifaunAbstract) {\n // An object was found in value\n $result = $value->toSoapRequest();\n if (sizeof($result) > 0) {\n $obj->$key = $result;\n }\n } else {\n if ($value !== NULL) {\n $namespace = $this->_namespace;\n if (array_key_exists($key, $this->_namespaceForProperties)) {\n $namespace = $this->_namespaceForProperties[$key];\n }\n\n if ($namespace !== null && !$value instanceof \\stdClass) {\n $value = new \\SoapVar((string)$value, null, null, $namespace, $key, $namespace);\n }\n $obj->$key = $value;\n }\n }\n\n }\n\n return $obj;\n }", "function createSoapClient() {\n\tglobal $voipnow_access_token, $voipnow_version;\n\t$script_location = $_SERVER['SCRIPT_FILENAME'];\n\t/* create SOAP client based on WSDL, with trace for debugging */\n\t$files_location = getLocalSchemesLocation($script_location);\n\t$client_class = new SoapClient_4psa($files_location, array('trace' => 1, 'exceptions' => 0, 'cache_wsdl' => WSDL_CACHE_BOTH));\n\t$client = $client_class->getSoapClient();\n\t\n\t$auth = new stdClass();\n\t$auth->accessToken = $voipnow_access_token;\n\t$authvalues = new SoapVar($auth, SOAP_ENC_OBJECT, HEADERURL.$voipnow_version);\n\t$header = new SoapHeader(HEADERURL.$voipnow_version, 'userCredentials', $authvalues, false);\n\t$client->__setSoapHeaders(array($header));\n\treturn $client;\n}", "function register_webservices()\r\n {\r\n $methods = array('get', 'get_list', 'create', 'update', 'delete');\r\n \r\n $application = $this->get_application();\r\n $namespace = Application :: determine_namespace($application);\r\n \r\n $base_path = (WebApplication :: is_application($application) ? WebApplication :: get_application_class_path($application) : CoreApplication :: get_application_class_path($application));\r\n $path = $base_path . 'webservices/';\r\n\r\n if(!file_exists($path))\r\n {\r\n return true;\r\n }\r\n\r\n $folders = FileSystem :: get_directory_content($path, FileSystem :: LIST_DIRECTORIES, false);\r\n if(count($folders) > 0)\r\n {\r\n $application_webservice_category = new WebserviceCategory();\r\n $application_webservice_category->set_name(Translation :: get('TypeName', null, $namespace));\r\n if(!$application_webservice_category->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCategoryCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $application_webservice_category->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCategoryCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $application_webservice_category->get_name() . '</em>');\r\n }\r\n }\r\n\r\n foreach($folders as $folder)\r\n {\r\n $camelcase_folder = Utilities :: underscores_to_camelcase($folder);\r\n \r\n $object_webservice_category = new WebserviceCategory();\r\n $object_webservice_category->set_name(Translation :: get($camelcase_folder, null, $namespace));\r\n $object_webservice_category->set_parent($application_webservice_category->get_id());\r\n if(!$object_webservice_category->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCategoryCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $object_webservice_category->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCategoryCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $object_webservice_category->get_name() . '</em>');\r\n }\r\n\r\n $file = $path . $folder . '/webservice_handler.class.php';\r\n if(file_exists($file))\r\n {\r\n require_once $file;\r\n $class = $namespace . '\\\\' . Utilities :: underscores_to_camelcase($folder) . 'WebserviceHandler';\r\n foreach($methods as $method)\r\n {\r\n if(method_exists($class, $method))\r\n {\r\n $camelcase_method = Utilities :: underscores_to_camelcase($method);\r\n\r\n $webservice = new WebserviceRegistration();\r\n $webservice->set_name(Translation :: get($camelcase_method, null, WebserviceManager :: APPLICATION_NAME));\r\n $webservice->set_description(Translation :: get($camelcase_folder . $camelcase_method . 'Description', null, $namespace));\r\n $webservice->set_active(1);\r\n $webservice->set_category($object_webservice_category->get_id());\r\n $webservice->set_code($application . '_' . $folder . '_' . $method);\r\n if(!$webservice->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $webservice->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $webservice->get_name() . '</em>');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n return true;\r\n\r\n }", "public function getApiInstance()\n {\n $params = func_num_args();\n if ($params > 2 || $params < 1) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN'));\n }\n if ($params == 1) {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0));\n $api->set_platform(self::PLATFORM_OPENPLATFORM);\n } else {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0), func_get_arg(1));\n $api->set_platform(self::PLATFORM_STD);\n }\n if ($this->_switcher->getWebsiteId() != 0) {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId())) {\n $api->sandbox_mode(true);\n }\n } else {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode')) {\n $api->sandbox_mode(true);\n }\n }\n\n\n $api->set_type(self::TYPE);\n\n //$api->set_so((string)$this->_moduleContext->getVersion()); //TODO tracking\n\n return $api;\n\n }", "public function getService()\n {\n return $this->send('POST', 'getService');\n }", "public function sp_api()\n {\n $awsCredentials = new Credentials(\n env('AWS_ACCESS_KEY_ID'),\n env('AWS_SECRET_ACCESS_KEY')\n );\n\n // All of the below should be safe to bind as singletons to an IoC container.\n $spApiConfig = $this->buildSpApiConfig();\n $awsCredentialProvider = CredentialProvider::fromCredentials($awsCredentials);\n $lwaClient = new LwaClient($spApiConfig);\n $lwaService = new LwaService($lwaClient, static::$arrayCache, $spApiConfig);\n $clientAuthenticator = new ClientAuthenticator($lwaService, $awsCredentialProvider, $spApiConfig);\n $clientFactory = new ClientFactory($clientAuthenticator, $spApiConfig);\n $rdtService = new RdtService($clientFactory);\n // ^^^^^^^^^^^^^^^^ END of singleton-safe dependencies ^^^^^^^^^^^^^^^^\n\n // This should always be new'ed up on every use -- i.e. should never be used as a singleton.\n // This is because this wrapper class has state (e.g. rdtRequest) that is intended to be\n // short-lived for the purpose of a single SP-API call.\n return new SpApi(\n $clientFactory,\n $rdtService,\n $lwaService,\n $spApiConfig\n );\n }", "function _wp_http_get_object()\n {\n }", "protected function getRequestService()\n {\n return $this->services['request'] = new \\phpbb\\request\\request(NULL, true);\n }", "function consumir_webservice($xml_data)\n{\n\t$stream_options = array(\n\t\t'http' => array(\n\t\t\t'method'\t=> 'POST',\n\t\t\t'header'\t=> 'Authorization: Basic ' . base64_encode(\"Openbravo:openbravo\") . ' Content-Type: text/xml',\n\t\t\t'content'\t=> $xml_data,\n\t\t),\n\t);\n\n\t// Crear contexto de flujo con las opciones para consumir el webservice\n\t$context = stream_context_create($stream_options);\n\n\t// Consumir webservice y obtener respuesta\n\t// $ob_response = @file_get_contents('http://192.168.1.251:443/ob_lecaroz/ws/mx.cusoft.importing.rest.insertLecPayment', NULL, $context);\n\t$ob_response = @file_get_contents('http://192.168.1.3:443/ob_lecaroz/ws/mx.cusoft.importing.rest.insertLecPayment', NULL, $context);\n\n\treturn $ob_response;\n}", "public function getObject();", "public function getObject();", "public function service(BLW_HTTP_Request $request, BLW_HTTP_Response $response);", "public function handleServiceRequest() {\n //\n // Create instance of SOAP server.\n //\n $SoapServer = new SoapServer($this->getWsdlFullPath()); \n $SoapServer->setClass(AblePolecat_Data::getDataTypeName($this)); \n $SoapServer->setPersistence(SOAP_PERSISTENCE_SESSION);\n $SoapServer->handle();\n }", "public function setWebService($webService)\n {\n $this->webService = $webService;\n\n return $this;\n }", "public function getWsdl();", "private function instantiate_service( $class ) {\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $class );\n\t\t}\n\n\t\t$service = new $class();\n\n\t\tif ( ! $service instanceof Service ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $service );\n\t\t}\n\n\t\tif ( $service instanceof AssetsAware ) {\n\t\t\t$service->with_assets_handler( $this->assets_handler );\n\t\t}\n\n\t\treturn $service;\n\t}", "public function getService(string $key, array $extra = null): object;", "function __construct() {\n\t\t$wsdlURL = \"https://hc.mercurydev.net/tws/transactionservice.asmx?WSDL\";\n\t\t$this->wsClient = new SoapClient($wsdlURL);\n\t}", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public function getObject() {}", "public function getObject() {}", "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 createService($serviceClass);", "private function initSoap()\n {\n $options = array(\n 'soap_version' => SOAP_1_1,\n 'stream_context' => $this->container->getParameter('aspone.context'),\n 'authentification' => SOAP_AUTHENTICATION_BASIC,\n 'trace' => 1\n );\n $soap = new SoapClient($this->container->getParameter('aspone.wsdl.monitoring'), $options);\n\n $soap->setContext($this->container->getParameter('aspone.context'));\n $soap->setContextLogin($this->container->getParameter('aspone.contextLogin'));\n $soap->setContextPassword($this->container->getParameter('aspone.contextPassword'));\n $soap->setPassword($this->container->getParameter('aspone.password'));\n $soap->setUsername($this->container->getParameter('aspone.username'));\n $soap->setService($this->container->getParameter('aspone.serviceVersion.0'));\n $soap->setServiceVersion('1.0');\n $soap->setSoapHeaders();\n $soap->__setLocation($this->container->getParameter('aspone.location.monitoring'));\n\n $this->soap = $soap;\n }", "public function __construct() {\n $this->oUserService = new UserService();\n $this->oArticleService = new ArticleService();\n $this->oLeagueService = new LeagueService();\n// $this->oTeamService = new TeamService();\n// $this->oMatchService = new MatchService(); \n }", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function getObject(): object;", "public static function getInstance($name = 'default') {\r\n if (!array_key_exists($name, self::$instances)) {\r\n self::$instances[$name] = new MOC_Api_Service();\r\n }\r\n return self::$instances[$name];\r\n }", "public static function factory(): ServiceInterface\n {\n return new static();\n }", "public function __invoke()\n {\n $client = $this->container->get('cpms\\service\\api');\n\n return $client;\n }", "public function getResponseClass();", "function ODQuery_QueryService() {\n\t\t$this->client = new SoapClient(__DIR__.'/../wsdl/QueryService2.wsdl',array(\n 'exceptions'=>true,\n 'encoding'=>'utf-8')\n );\n\t\t$this->soapException = new ODSubmission_SoapException();\n\t}", "public function demo(){\n // $this->soapWrapper->add(function ($service) {\n // $service->name('CRW')\n // ->wsdl('http://crm.elizade.net:5050/Service1.svc?wsdl')\n // ->trace(true);\n // });\n $this->soapWrapper->add('CRW', function ($service) {\n $service\n ->wsdl('http://crm.elizade.net:5050/Service1.svc?wsdl')\n ->trace(true);\n // ->classmap([\n // GetConversionAmount::class,\n // GetConversionAmountResponse::class,\n // ]);\n });\n\n $data = [\n 'lastname' => 'Raymond',\n 'firstname' => 'Ativie',\n 'email' => '[email protected]',\n 'bizPhone' => '08151700676'\n ];\n\n $case = [\n 'accountnumber' => 'CUST013643',\n 'description' => 'This is a description',\n 'title' => 'Hello world'\n ];\n\n // $response = $this->soapWrapper->call('CRW.CreateContact', [$data]);\n $response = $this->soapWrapper->call('CRW.CreateCase', [$case]);\n\n var_dump($response);\n\n // Using the added service\n // $this->soapWrapper->service('CRW', function ($service) use ($data) {\n // var_dump($service->call('CreateContact', [$data]));\n // // var_dump($service->call('Otherfunction'));\n // });\n }", "function createPWSSOAPClient()\n{\n //Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials\n $client = new SoapClient( \"./wsdl/PickUpService.wsdl\", \n array\t(\n 'trace'\t\t\t=>\ttrue,\t\t\t\t \n\t\t\t\t 'location'\t=>\t\"https://devwebservices.purolator.com/EWS/V1/PickUp/PickUpService.asmx\",\t\t\t\t \n 'uri'\t\t\t\t=>\t\"http://purolator.com/pws/datatypes/v1\",\n 'login'\t\t\t=>\tPRODUCTION_KEY,\n 'password'\t=>\tPRODUCTION_PASS\n )\n );\n //Define the SOAP Envelope Headers\n $headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', \n 'RequestContext', \n array (\n 'Version' => '1.2',\n 'Language' => 'en',\n 'GroupID' => 'xxx',\n 'RequestReference' => 'Rating Example'\n )\n ); \n //Apply the SOAP Header to your client \n $client->__setSoapHeaders($headers);\n\n return $client;\n}", "public function getObjectFactory(): ObjectFactoryInterface;", "public function getName()\n {\n return 'soap';\n }", "protected function getWsdl() {\n\t\t$wsdl = 'http://localhost/WS.wsdl';\n\t\tswitch ($this->version) {\n\t\t\tcase self::VERSION_10:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t\tcase self::VERSION_20:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS20/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t\tcase self::VERSION_21:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS21/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $wsdl;\n\t}", "public function __construct($wsdl=\"http://webservice.dkvistun.is/DemoDev/dkwsitemscgi.exe/wsdl/IWSDLPublish\", $options=array()) {\n\t\tforeach(self::$classmap as $wsdlClassName => $phpClassName) {\n\t\t if(!isset($options['classmap'][$wsdlClassName])) {\n\t\t $options['classmap'][$wsdlClassName] = $phpClassName;\n\t\t }\n\t\t}\n\t\tparent::__construct($wsdl, $options);\n\t}", "public function createFSService();", "function get_service($limit = 3){\n return app(ServiceInterface::class)->getService();\n }", "public function __construct($wsdl=null, $options=array()) {\n\t\tparent::__construct($wsdl, $options);\n\t}", "public function testCreateService()\n {\n\n }", "function fn_soneritics_kiyoh_get_api(): KiyohApi\n{\n $settings = new SoneriticsKiyohSettings;\n $api = new KiyohApi($settings->getHash());\n\n return $api;\n}", "public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }" ]
[ "0.64610803", "0.634004", "0.6305028", "0.62099606", "0.61674774", "0.612044", "0.60537", "0.6026978", "0.59685373", "0.59585094", "0.5957972", "0.589491", "0.5882698", "0.58656305", "0.5829823", "0.5825442", "0.5779587", "0.574492", "0.574174", "0.57299656", "0.5725291", "0.5720529", "0.5655141", "0.56504077", "0.56369597", "0.56079096", "0.5580991", "0.5573948", "0.55707836", "0.5563394", "0.5544538", "0.54989064", "0.5490554", "0.54896873", "0.54721487", "0.5470014", "0.5469558", "0.5466497", "0.5463074", "0.5462927", "0.54584503", "0.5450581", "0.5438075", "0.5428189", "0.5427778", "0.5427546", "0.541234", "0.54066527", "0.5396974", "0.53948414", "0.5376419", "0.535223", "0.53377926", "0.5337692", "0.5331143", "0.5327545", "0.53255147", "0.5324758", "0.53246033", "0.5309291", "0.52922165", "0.5285602", "0.52605414", "0.5253166", "0.52474016", "0.52466106", "0.5244206", "0.5244206", "0.5231936", "0.52310896", "0.522277", "0.520618", "0.51994425", "0.51887375", "0.5188248", "0.51782805", "0.51569396", "0.51569396", "0.5153773", "0.51533514", "0.51526153", "0.51472527", "0.5146983", "0.5143616", "0.51365125", "0.5133882", "0.512846", "0.5127408", "0.5125321", "0.5124723", "0.5123526", "0.5117559", "0.51131624", "0.5111922", "0.5110178", "0.5108049", "0.5097331", "0.50926673", "0.50923985", "0.50857604", "0.5074278" ]
0.0
-1
Returns a generic web service object
public function update() { $this->response->setData(1); $this->response->setHeader('__OK', Http::Response(Http::OK)); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "abstract protected function getService();", "private static function getServiceInstance()\n {\n $s = self::getServiceType();\n switch ($s) {\n case 0:\n http_response_code(404);\n exit();\n case 1:\n return new RCFaxClient();\n break;\n case 2:\n return new TwilioFaxClient();\n }\n }", "public function getWebService()\n {\n return $this->webService;\n }", "public function getWebservice()\n {\n return $this->_webservice;\n }", "protected function getHandler()\n {\n static $soap;\n\n if (empty($soap)) {\n $soap = new ECommerceServices(\n new Request(),\n $this->getApplication()->getKernel()->getContainer()->get('Logger'),\n new EventDispatcher()\n );\n }\n\n return $soap;\n }", "public function getWebservice()\n {\n return $this->webservice;\n }", "protected function service()\n {\n return new Service();\n }", "abstract public function service();", "protected function resourceService(){\n return new $this->resourceService;\n }", "public function get_service($index = FALSE, $settings = FALSE)\n\t{\t\t\n\t\treturn parent::get_object($index, $settings);\n\t}", "public function getWebservice(): WebserviceInterface\n {\n if ($this->_webservice === null) {\n $this->_webservice = $this->getConnection()->getWebservice($this->getName());\n }\n\n return $this->_webservice;\n }", "static function generarServicioF(){\n\n\t\trequire_once('SERVIDOR/lib/nusoap.php');\n \n $host = 'http://maxineiner.tuars.com/webservice/ws_segundo_parcial.php?wsdl';\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}", "public function service($request,$response,$utilities);", "abstract function get_crud_service();", "public function getApiService();", "function __get_service($service) {\n\n if ($this->services[$service] === null) {\n\n $url = $this->soap_endpoint.'/'.$service.'?wsdl';\n\n $this->services[$service] =\n $this->__create_soap_client($url, $this->soap_wsdl);\n\n }\n\n return $this->services[$service];\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 }", "public static function factory( $name, $config ) {\n\t\t$handlers = array(\n\t\t\t'microsoft' => 'MicrosoftWebService',\n\t\t\t'apertium' => 'ApertiumWebService',\n\t\t\t'yandex' => 'YandexWebService',\n\t\t\t'ttmserver' => 'RemoteTTMServerWebService',\n\t\t);\n\n\t\tif ( !isset( $config['timeout'] ) ) {\n\t\t\t$config['timeout'] = 3;\n\t\t}\n\n\t\tif ( isset( $handlers[$config['type']] ) ) {\n\t\t\t$class = $handlers[$config['type']];\n\n\t\t\treturn new $class( $name, $config );\n\t\t}\n\n\t\treturn null;\n\t}", "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}", "public static function init(){\n $wsdlUrl = self::getWsdl();\n $soapClientOptions = [\n 'stream_context' =>self::generateContext(),\n 'cache_wsdl' => WSDL_CACHE_NONE\n ];\n return new SoapClient($wsdlUrl,$soapClientOptions);\n }", "function ezWordpREST () {\n\t$instance = ezWordpREST::instance( __FILE__, '1.0.0' );\n\n\treturn $instance;\n}", "public function saveWebservice() {\n\n $registry = Zend_Registry::getInstance();\n $em = $registry->entitymanager;\n $data = $this->getRequest()->getParams();\n\n if(isset($data['webserviceId']) && $data['webserviceId'] > 0) {\n $serviceObj = $em->find('TWebservice',$data['webserviceId']);\n $serviceObj->setWebserviceId($data['webserviceId']);\n } else {\n $serviceObj = new TWebservice();\n }\n\n $serviceObj->setWebserviceName($data['WB_Name']);\n $serviceObj->setWebserviceUrl($data['WB_Url']);\n\n $Client = $em->find('TClient', $data['clientId']);\n\n $serviceObj->setClientId($Client);\n $em->persist($serviceObj);\n $em->flush();\n\n return true;\n }", "public function getObject()\n\t{\n\t\t// Create the OPF instance.\n\t\treturn new Opf_Class($this->_serviceLocator->get('template.Opt'));\n\t}", "public function call(){\n \n $service = (string)$this->_service;\n \n if(!$this->_params){\n $this->setParams();\n }\n \n $response = $this->_soapClient->$service($this->_params); \n \n $serviceResult = $service.'Result';\n \n $xml = $response->$serviceResult; \n \n return $xml;\n\n }", "public function getReflectionService() {}", "abstract protected function getService($id);", "function __construct($service) {\n // return new $class;\n }", "public function getAsSOAP() {\n\t $this->recursive_unset($this,\"schema\");\n\t //print_r($this);\n\t foreach($this as $key=>&$value) {\n\t\t$this->prepareSOAPrecursive($this->$key);\n\t }\n\t return $this;\n\t}", "function _getJsonServices() {\n\t\trequire_once('lib/pkp/lib/json/JSON.php');\n\t\treturn new Services_JSON();\n\t}", "public function __construct($wsdl = NULL, $options = NULL)\n {\n }", "public abstract function getApiObjectClass();", "public function aw_service_wp ( $proc, $args ) {\n\t \t//$args = array('argDta' => $productID,'argIsSale' => 1,'argUsr' => '');\n\t\t$url \t\t= 'http://203.201.129.15/AWSERVICE_WP_WEB/awws/AWService_WP.awws?wsdl';\n\t\t$client \t= new SoapClient($url);\n\t\t$response \t= $client->__soapCall( $proc, array($args) );\n\t\t\n\t\tswitch ( $proc ) {\n\t\t\tcase 'Trainers_OnlineProduct_Listing':\n\t\t\t\t$simpleXml = simplexml_load_string($response->Trainers_OnlineProduct_ListingResult);\n\t\t\tbreak;\n\n\t\t\tcase 'CorporateClientsList':\n\t\t\t\t$simpleXml = simplexml_load_string($response->CorporateClientsListResult);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'pcPrdct_DisplayInfo':\n\t\t\t\t$simpleXml = simplexml_load_string($response->pcPrdct_DisplayInfoResult);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'pcChat_UserDetails':\n\t\t\t\t$simpleXml = $response->pcChat_UserDetailsResult;\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t \treturn $simpleXml;\n\t }", "public function getService() // TODO: add function return type\r\n {\r\n $connection_properties = $this->get();\r\n\r\n // load the services from the services store; for connections,\r\n // make sure the service also has the connection interface\r\n $connection_type = $connection_properties['connection_type'];\r\n $connection_info = $connection_properties['connection_info'];\r\n $service = \\Flexio\\Services\\Factory::create($connection_type, $connection_info);\r\n if (!($service instanceof \\Flexio\\IFace\\IConnection))\r\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::NO_SERVICE);\r\n\r\n // for oauth services, the access token may have been refreshed via\r\n // a refresh token, so these should be saved so that the access token\r\n // isn't refreshed in every subsequent call\r\n if ($service instanceof \\Flexio\\IFace\\IOAuthConnection)\r\n {\r\n $tokens = $service->getTokens();\r\n $connection_info = $connection_properties['connection_info'];\r\n\r\n $info_changed = false;\r\n if (!isset($connection_info))\r\n {\r\n $info_changed = true;\r\n }\r\n else\r\n {\r\n if (($connection_info['access_token'] ?? false) !== $tokens['access_token'])\r\n $info_changed = true;\r\n if (($connection_info['refresh_token'] ?? false) !== $tokens['refresh_token'])\r\n $info_changed = true;\r\n if (($connection_info['expires'] ?? false) !== $tokens['expires'])\r\n $info_changed = true;\r\n }\r\n\r\n if ($info_changed === true)\r\n $this->set([ 'connection_info' => $tokens]);\r\n }\r\n\r\n return $service;\r\n }", "public function createWebserviceDriver()\n {\n return new WebServiceHealthCheck;\n }", "public function asWebserviceInput() {\r\n $input = array(\"Id\" => $this->getTaxType(), \"BaseImp\" => $this->getBaseAmount(), \"Importe\" => $this->getTaxAmount());\r\n return $input;\r\n }", "protected function getResponseFactory()\n {\n }", "public static function factory($config = array())\n {\n $default = array(\n 'base_url' => 'http://api.wordpress.org',\n 'curl.options' => array(\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_TIMEOUT => 120,\n 'body_as_string' => true,\n ),\n );\n\n $required = array('base_url');\n $config = Collection::fromConfig($config, $default, $required);\n $description = ServiceDescription::factory(__DIR__.'/service.json');\n\n $client = new self($config->get('base_url'), $config);\n $client->setDescription($description);\n\n return $client;\n }", "function _openService($url)\n {\n $obj = new SOAP_Client($url, TRUE);\n return $obj;\n }", "public function webserviceAction($className = NULL, $service = false)\n {\n $this->layout = \"blank\";\n $niddles = preg_split(\"[_]\", $className);\n $className = \"Development_Helper_Api_{$niddles[count($niddles)-1]}\";\n\n if (isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'POST')) {\n App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->loadServer();\n }\n else {\n if ($service) {\n echo App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->setServiceName(\"appRain\")\n ->showWSDL();\n }\n else {\n echo App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->setServiceName(\"appRain\")\n ->showWSDLURI();\n }\n }\n }", "public static function _getSoapClient($parameters = array())\n\t{\n\t\t$endpoint = Transip_ApiSettings::$endpoint;\n\n\t\tif(self::$_soapClient === null)\n\t\t{\n\t\t\t$extensions = get_loaded_extensions();\n\t\t\t$errors = array();\n\t\t\tif(!class_exists('SoapClient') || !in_array('soap', $extensions))\n\t\t\t{\n\t\t\t\t$errors[] = 'The PHP SOAP extension doesn\\'t seem to be installed. You need to install the PHP SOAP extension. (See: http://www.php.net/manual/en/book.soap.php)';\n\t\t\t}\n\t\t\tif(!in_array('openssl', $extensions))\n\t\t\t{\n\t\t\t\t$errors[] = 'The PHP OpenSSL extension doesn\\'t seem to be installed. You need to install PHP with the OpenSSL extension. (See: http://www.php.net/manual/en/book.openssl.php)';\n\t\t\t}\n\t\t\tif(!empty($errors)) die('<p>' . implode(\"</p>\\n<p>\", $errors) . '</p>');\n\n\t\t\t$classMap = array(\n\t\t\t\t'DataCenterVisitor' => 'Transip_DataCenterVisitor',\n\t\t\t);\n\n\t\t\t$options = array(\n\t\t\t\t'classmap' => $classMap,\n\t\t\t\t'encoding' => 'utf-8', // lets support unicode\n\t\t\t\t'features' => SOAP_SINGLE_ELEMENT_ARRAYS, // see http://bugs.php.net/bug.php?id=43338\n\t\t\t\t'trace' => false, // can be used for debugging\n\t\t\t);\n\n\t\t\t$wsdlUri = \"https://{$endpoint}/wsdl/?service=\" . self::SERVICE;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tself::$_soapClient = new SoapClient($wsdlUri, $options);\n\t\t\t}\n\t\t\tcatch(SoapFault $sf)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Unable to connect to endpoint '{$endpoint}'\");\n\t\t\t}\n\t\t\tself::$_soapClient->__setCookie('login', Transip_ApiSettings::$login);\n\t\t\tself::$_soapClient->__setCookie('mode', Transip_ApiSettings::$mode);\n\t\t}\n\n\t\t$timestamp = time();\n\t\t$nonce = uniqid('', true);\n\n\t\tself::$_soapClient->__setCookie('timestamp', $timestamp);\n\t\tself::$_soapClient->__setCookie('nonce', $nonce);\n\t\tself::$_soapClient->__setCookie('clientVersion', self::API_VERSION);\n\t\tself::$_soapClient->__setCookie('signature', self::_urlencode(self::_sign(array_merge($parameters, array(\n\t\t\t'__service' => self::SERVICE,\n\t\t\t'__hostname' => $endpoint,\n\t\t\t'__timestamp' => $timestamp,\n\t\t\t'__nonce' => $nonce\n\t\t)))));\n\n\t\treturn self::$_soapClient;\n\t}", "function __create_soap_client($endpoint, $wsdl = false, $proxyhost = false,\n $proxyport = false, $proxyusername = false,\n $proxypassword = false, $timeout = 0,\n $response_timeout = 30) {\n\n if (!extension_loaded('soap')) {\n return new soapclient($endpoint, $wsdl, $proxyhost, $proxyport,\n $proxyusername, $proxypassword, $timeout,\n $response_timeout);\n } else {\n return new nusoap_client($endpoint, $wsdl, $proxyhost, $proxyport,\n $proxyusername, $proxypassword, $timeout,\n $response_timeout);\n }\n\n}", "public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }", "public function __construct($wsdl){\n\t\n\t\t$this->wsdl\t=\t$wsdl;\n\t}", "public function addService($serviceId, $object)\n {\n if (!$object instanceof BaseWebService) return;\n if (!$serviceId) return;\n\n $rClass = new \\ReflectionClass(get_class($object));\n $methods = $rClass->getMethods(\\ReflectionMethod::IS_PUBLIC);\n $ar = $this->getAnnotationReader();\n\n //Find the default namespace\n $daClass = 'PureMachine\\Bundle\\WebServiceBundle\\Service\\Annotation\\WSNamespace';\n $nsAnnotation = $ar->getClassAnnotation($rClass, $daClass);\n if ($nsAnnotation) $defaultNamespace = $nsAnnotation->value;\n else $nsAnnotation = '';\n\n foreach ($methods as $method) {\n /*\n * If the method has no Webservice annotation , exclude it from\n * the addService building\n */\n $webserviceAnnotationsClass = 'PureMachine\\Bundle\\WebServiceBundle\\Service\\Annotation\\WebService';\n $wsAnnotations = $ar->getMethodAnnotation($method, $webserviceAnnotationsClass);\n if(is_null($wsAnnotations)) continue;\n\n //Lookup the namespace\n $nsAnnotation = $ar->getMethodAnnotation($method, $daClass);\n if ($nsAnnotation) $namespace = $nsAnnotation->value;\n else $namespace = $defaultNamespace;\n\n $annotations = $ar->getMethodAnnotations($method);\n $definition = array();\n $definition['inputType'] = 'object';\n $definition['inputClass'] = array();\n $definition['returnType'] = 'object';\n $definition['returnClass'] = array();\n $definition['headers'] = array();\n $description = '';\n $internal = array();\n $name = null;\n $version = null;\n\n foreach ($annotations as $annotation) {\n\n if ($annotation instanceof PM\\WebService) {\n $name = $namespace . \"/\" . $annotation->value;\n $version = $annotation->version;\n $definition['accessLevel'] = static::ACCESS_LEVEL_PRIVATE;\n $internal['id'] = $serviceId;\n $internal['method'] = $method->getName();\n } elseif ($annotation instanceof PM\\ReturnClass) {\n $definition['returnClass'] = $annotation->getValue();\n if ($annotation->isArray) $definition['returnType'] = 'array';\n } elseif ($annotation instanceof PM\\InputClass) {\n $definition['inputClass'] = $annotation->getValue();\n if ($annotation->isArray) $definition['inputType'] = 'array';\n } elseif ($annotation instanceof PM\\Doc) {\n $description = $annotation->description;\n } elseif ($annotation instanceof PM\\Headers) {\n if (is_array($annotation->value)) {\n foreach ($annotation->value as $key => $value) {\n $definition['headers'][$key] = $value;\n }\n }\n }\n\n }\n\n if (count($definition['returnClass']) == 0)\n throw new WebServiceException(\"A store class must be defined in returnClass \"\n .\"annotation\",\n WebServiceException::WS_006);\n\n if ($name && $version) {\n $key = strtolower($name);\n\n if (!array_key_exists($key, $this->webServices)) {\n $this->webServices[$key] = array();\n }\n\n $this->webServices[$key]['name'] = $name;\n $this->webServices[$key][$version] = array();\n $this->webServices[$key][$version]['definition'] = $definition;\n $this->webServices[$key][$version]['_internal'] = $internal;\n $this->webServices[$key]['description'] = $description;\n }\n }\n }", "protected function _make_client()\n\t{\n\t\tif (is_null($this->_client))\n\t\t{\n\t\t\trequire_once APPPATH.'libraries/nusoap/nusoap.php';\n\t\t\t\t\n\t\t\t$this->_client = new nusoap_client($this->_url, 'wsdl', '', '', '', '');\n\t\t}\n\t\t\n\t\treturn $this->_client;\n\t}", "function getWSDL($modelId, $serviceMethod = 'call')\n {\n $modelClass = $this->__getModelClass($modelId);\n $expireTime = '+1 year';\n $cachePath = $modelClass . '.wsdl';\n \n // Check cache if exist\n $wsdl = cache($cachePath, null, $expireTime);\n\n // If DEBUG > 0, compare cache modified time to model file modified time\n if ((Configure::read() > 0) && (! is_null($wsdl))) {\n\n $cacheFile = CACHE . $cachePath;\n if (is_file($cacheFile)) {\n $modelMtime = filemtime($this->__getModelFile($modelId));\n $cacheMtime = filemtime(CACHE . $cachePath);\n if ($modelMtime > $cacheMtime) {\n $wsdl = null;\n }\n }\n\n }\n \n // Generate WSDL if not cached\n if (is_null($wsdl)) {\n \n $refl = new IPReflectionClass($modelClass);\n \n $controllerName = $this->params['controller'];\n $serviceURL = Router::url(\"/\". $controllerName . \"/\" . $serviceMethod, true);\n\n $wsdlStruct = new WSDLStruct('http://schema.example.com', \n $serviceURL . '/' . $modelId, \n SOAP_RPC, \n SOAP_LITERAL);\n $wsdlStruct->setService($refl);\n try {\n $wsdl = $wsdlStruct->generateDocument();\n // cache($cachePath, $wsdl, $expireTime);\n } catch (WSDLException $exception) {\n if (Configure::read() > 0) {\n $exception->Display();\n exit();\n } else {\n return null;\n }\n }\n }\n\n return $wsdl;\n }", "protected function initializeSoapClient()\n {\n\n\t\t$authArray = array(\n\t\t\t'location' => 'https://' . $this->server . '/EWS/Exchange.asmx',\n\t\t\t'classmap' => $this->classMap(),\n\t\t\t'curlopts' => $this->curl_options,\n\t\t\t'features' => SOAP_SINGLE_ELEMENT_ARRAYS,\n\t\t); \n\n\t\tif(!empty($this->token)) {\n\n\t\t\t$authArray[\"token\"] = $this->token; \n\n\t\t}\n\t\telse {\n\n\t\t\t$authArray[\"user\"] = $this->username; \n\t\t\t$authArray[\"password\"] = $this->password; \n\n\t\t}\n\n $this->soap = new Oath2Soap(\n dirname(__FILE__) . '/assets/services.wsdl',\n $authArray\n );\n\n return $this->soap;\n }", "public function getUrlSOAP(){\r\n\t\treturn $this->soap;\r\n\t}", "private function getServiceMap()\n {\n $result = array(\n 'transport' => 'POST',\n 'envelope' => 'JSON-RPC-2.0',\n 'SMDVersion' => '2.0',\n 'contentType' => 'application/json',\n 'target' => !empty($_SERVER['REQUEST_URI']) ? substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], '?')) : '',\n 'services' => array(),\n 'description' => '',\n );\n\n foreach ($this->instances as $namespace => $instance) {\n $rc = new ReflectionClass($instance);\n\n // Get Class Description\n if ($rcDocComment = $this->getDocDescription($rc->getDocComment())) {\n $result['description'] .= $rcDocComment . PHP_EOL;\n }\n\n foreach ($rc->getMethods() as $method) {\n /** @var ReflectionMethod $method */\n if (!$method->isPublic() || in_array(strtolower($method->getName()), $this->hiddenMethods)) {\n continue;\n }\n\n $methodName = ($namespace ? $namespace . '.' : '') . $method->getName();\n $docComment = $method->getDocComment();\n\n $result['services'][$methodName] = array('parameters' => array());\n\n // set description\n if ($rmDocComment = $this->getDocDescription($docComment)) {\n $result['services'][$methodName]['description'] = $rmDocComment;\n }\n\n // @param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\s\\*]*)\n $parsedParams = array();\n if (preg_match_all('/@param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\n\\*]*)/', $docComment, $matches)) {\n foreach ($matches[2] as $number => $name) {\n $type = $matches[1][$number];\n $desc = $matches[3][$number];\n $name = trim($name, '$');\n\n $param = array('type' => $type, 'description' => $desc);\n $parsedParams[$name] = array_filter($param);\n }\n };\n\n // process params\n foreach ($method->getParameters() as $parameter) {\n $name = $parameter->getName();\n $param = array('name' => $name, 'optional' => $parameter->isDefaultValueAvailable());\n if (array_key_exists($name, $parsedParams)) {\n $param += $parsedParams[$name];\n }\n\n if ($param['optional']) {\n $param['default'] = $parameter->getDefaultValue();\n }\n\n $result['services'][$methodName]['parameters'][] = $param;\n }\n\n // set return type\n if (preg_match('/@return\\s+([^\\s]+)\\s*([^\\n\\*]+)/', $docComment, $matches)) {\n $returns = array('type' => $matches[1], 'description' => trim($matches[2]));\n $result['services'][$methodName]['returns'] = array_filter($returns);\n }\n }\n }\n\n return $result;\n }", "protected function getRequestService()\n {\n return new PokemonRequestService();\n }", "abstract public function getServiceTypeName();", "private function createShipmentObject()\n {\n switch ($this->getServiceMethod()) {\n case 'addShip':\n return new AddShip();\n case 'addShipment':\n return new AddShipment();\n }\n }", "public static function create($type)\n\t{\n\t\tif (empty($type) || 0 === strpos($type, 'text/html')) {\n\t\t\treturn new HttpGetRequest;\n\t\t}\n\n\t\tif (0 === strpos($type, 'application/json')) {\n\t\t\treturn new HttpJsonRequest;\n\t\t}\n\n\t\treturn new HttpPostRequest;\n\t}", "function create_service_map($soap) {\n foreach ($this->services as $service) {\n require_once($service . '.php');\n if (class_exists($service)) {\n $c = (string) $service; \n $object = new $c();\n $soap->addObjectMap($object, 'urn:php-islandora-soapservice');\n }\n else {\n $this->log->lwrite(\"Could not load class $service, check the config files list \n of services to make sure they are correct\", 'SOAP_SERVER', NULL, NULL, 'ERROR');\n }\n }\n }", "public function getForWebserviceExport()\n {\n $el = parent::getForWebserviceExport();\n if ($this->data[\"internal\"]) {\n if (intval($this->data[\"internalId\"]) > 0) {\n if ($this->data[\"internalType\"] == \"document\") {\n $referencedDocument = Document::getById($this->data[\"internalId\"]);\n if (!$referencedDocument instanceof Document) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n } else if ($this->data[\"internalType\"] == \"asset\") {\n $referencedAsset = Asset::getById($this->data[\"internalId\"]);\n if (!$referencedAsset instanceof Asset) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n }\n }\n }\n\n $el->data = $this->data;\n return $el;\n }", "public static function loadService($service) {\n\t\t$class = ucfirst($service).'Service';\n\t\trequire(SITE_ROOT.'/services/'.$service.'/'.$class.'.php');\n\t\t$serviceObj = new $class();\n\t\treturn $serviceObj;\n\t}", "public function toSoapRequest()\n { \n \n $obj = new \\stdClass();\n\n // Populate SOAP Request object with data\n foreach ($this->_properties as $key=>$value) {\n // Prepare value by function\n $functionName = \"_prepare\" . ucwords($key);\n if (method_exists($this, $functionName)) {\n $value = $this->$functionName($value);\n }\n\n if (is_array($value)) {\n // An array\n $result = array();\n foreach ($value as $itemId => $item) {\n if ($item instanceof \\Pcxpress\\Unifaun\\Model\\Pcxpress\\Unifaun\\UnifaunAbstract) {\n $result[$itemId] = $item->toSoapRequest();\n } else {\n $result[$itemId] = $item;\n }\n }\n\n if (sizeof($result) > 0) {\n $namespace = $this->_namespace;\n if (array_key_exists($key, $this->_namespaceForProperties)) {\n $namespace = $this->_namespaceForProperties[$key];\n }\n\n if ($namespace !== null) {\n $result = new \\SoapVar($result, SOAP_ENC_OBJECT, null, $namespace, $key, $namespace);\n }\n\n $obj->$key = $result;\n }\n } elseif ($value instanceof \\Pcxpress\\Unifaun\\Model\\Pcxpress\\Unifaun\\UnifaunAbstract) {\n // An object was found in value\n $result = $value->toSoapRequest();\n if (sizeof($result) > 0) {\n $obj->$key = $result;\n }\n } else {\n if ($value !== NULL) {\n $namespace = $this->_namespace;\n if (array_key_exists($key, $this->_namespaceForProperties)) {\n $namespace = $this->_namespaceForProperties[$key];\n }\n\n if ($namespace !== null && !$value instanceof \\stdClass) {\n $value = new \\SoapVar((string)$value, null, null, $namespace, $key, $namespace);\n }\n $obj->$key = $value;\n }\n }\n\n }\n\n return $obj;\n }", "function createSoapClient() {\n\tglobal $voipnow_access_token, $voipnow_version;\n\t$script_location = $_SERVER['SCRIPT_FILENAME'];\n\t/* create SOAP client based on WSDL, with trace for debugging */\n\t$files_location = getLocalSchemesLocation($script_location);\n\t$client_class = new SoapClient_4psa($files_location, array('trace' => 1, 'exceptions' => 0, 'cache_wsdl' => WSDL_CACHE_BOTH));\n\t$client = $client_class->getSoapClient();\n\t\n\t$auth = new stdClass();\n\t$auth->accessToken = $voipnow_access_token;\n\t$authvalues = new SoapVar($auth, SOAP_ENC_OBJECT, HEADERURL.$voipnow_version);\n\t$header = new SoapHeader(HEADERURL.$voipnow_version, 'userCredentials', $authvalues, false);\n\t$client->__setSoapHeaders(array($header));\n\treturn $client;\n}", "function register_webservices()\r\n {\r\n $methods = array('get', 'get_list', 'create', 'update', 'delete');\r\n \r\n $application = $this->get_application();\r\n $namespace = Application :: determine_namespace($application);\r\n \r\n $base_path = (WebApplication :: is_application($application) ? WebApplication :: get_application_class_path($application) : CoreApplication :: get_application_class_path($application));\r\n $path = $base_path . 'webservices/';\r\n\r\n if(!file_exists($path))\r\n {\r\n return true;\r\n }\r\n\r\n $folders = FileSystem :: get_directory_content($path, FileSystem :: LIST_DIRECTORIES, false);\r\n if(count($folders) > 0)\r\n {\r\n $application_webservice_category = new WebserviceCategory();\r\n $application_webservice_category->set_name(Translation :: get('TypeName', null, $namespace));\r\n if(!$application_webservice_category->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCategoryCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $application_webservice_category->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCategoryCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $application_webservice_category->get_name() . '</em>');\r\n }\r\n }\r\n\r\n foreach($folders as $folder)\r\n {\r\n $camelcase_folder = Utilities :: underscores_to_camelcase($folder);\r\n \r\n $object_webservice_category = new WebserviceCategory();\r\n $object_webservice_category->set_name(Translation :: get($camelcase_folder, null, $namespace));\r\n $object_webservice_category->set_parent($application_webservice_category->get_id());\r\n if(!$object_webservice_category->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCategoryCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $object_webservice_category->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCategoryCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $object_webservice_category->get_name() . '</em>');\r\n }\r\n\r\n $file = $path . $folder . '/webservice_handler.class.php';\r\n if(file_exists($file))\r\n {\r\n require_once $file;\r\n $class = $namespace . '\\\\' . Utilities :: underscores_to_camelcase($folder) . 'WebserviceHandler';\r\n foreach($methods as $method)\r\n {\r\n if(method_exists($class, $method))\r\n {\r\n $camelcase_method = Utilities :: underscores_to_camelcase($method);\r\n\r\n $webservice = new WebserviceRegistration();\r\n $webservice->set_name(Translation :: get($camelcase_method, null, WebserviceManager :: APPLICATION_NAME));\r\n $webservice->set_description(Translation :: get($camelcase_folder . $camelcase_method . 'Description', null, $namespace));\r\n $webservice->set_active(1);\r\n $webservice->set_category($object_webservice_category->get_id());\r\n $webservice->set_code($application . '_' . $folder . '_' . $method);\r\n if(!$webservice->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $webservice->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $webservice->get_name() . '</em>');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n return true;\r\n\r\n }", "public function getApiInstance()\n {\n $params = func_num_args();\n if ($params > 2 || $params < 1) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN'));\n }\n if ($params == 1) {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0));\n $api->set_platform(self::PLATFORM_OPENPLATFORM);\n } else {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0), func_get_arg(1));\n $api->set_platform(self::PLATFORM_STD);\n }\n if ($this->_switcher->getWebsiteId() != 0) {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId())) {\n $api->sandbox_mode(true);\n }\n } else {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode')) {\n $api->sandbox_mode(true);\n }\n }\n\n\n $api->set_type(self::TYPE);\n\n //$api->set_so((string)$this->_moduleContext->getVersion()); //TODO tracking\n\n return $api;\n\n }", "public function getService()\n {\n return $this->send('POST', 'getService');\n }", "public function sp_api()\n {\n $awsCredentials = new Credentials(\n env('AWS_ACCESS_KEY_ID'),\n env('AWS_SECRET_ACCESS_KEY')\n );\n\n // All of the below should be safe to bind as singletons to an IoC container.\n $spApiConfig = $this->buildSpApiConfig();\n $awsCredentialProvider = CredentialProvider::fromCredentials($awsCredentials);\n $lwaClient = new LwaClient($spApiConfig);\n $lwaService = new LwaService($lwaClient, static::$arrayCache, $spApiConfig);\n $clientAuthenticator = new ClientAuthenticator($lwaService, $awsCredentialProvider, $spApiConfig);\n $clientFactory = new ClientFactory($clientAuthenticator, $spApiConfig);\n $rdtService = new RdtService($clientFactory);\n // ^^^^^^^^^^^^^^^^ END of singleton-safe dependencies ^^^^^^^^^^^^^^^^\n\n // This should always be new'ed up on every use -- i.e. should never be used as a singleton.\n // This is because this wrapper class has state (e.g. rdtRequest) that is intended to be\n // short-lived for the purpose of a single SP-API call.\n return new SpApi(\n $clientFactory,\n $rdtService,\n $lwaService,\n $spApiConfig\n );\n }", "function _wp_http_get_object()\n {\n }", "protected function getRequestService()\n {\n return $this->services['request'] = new \\phpbb\\request\\request(NULL, true);\n }", "function consumir_webservice($xml_data)\n{\n\t$stream_options = array(\n\t\t'http' => array(\n\t\t\t'method'\t=> 'POST',\n\t\t\t'header'\t=> 'Authorization: Basic ' . base64_encode(\"Openbravo:openbravo\") . ' Content-Type: text/xml',\n\t\t\t'content'\t=> $xml_data,\n\t\t),\n\t);\n\n\t// Crear contexto de flujo con las opciones para consumir el webservice\n\t$context = stream_context_create($stream_options);\n\n\t// Consumir webservice y obtener respuesta\n\t// $ob_response = @file_get_contents('http://192.168.1.251:443/ob_lecaroz/ws/mx.cusoft.importing.rest.insertLecPayment', NULL, $context);\n\t$ob_response = @file_get_contents('http://192.168.1.3:443/ob_lecaroz/ws/mx.cusoft.importing.rest.insertLecPayment', NULL, $context);\n\n\treturn $ob_response;\n}", "public function getObject();", "public function getObject();", "public function service(BLW_HTTP_Request $request, BLW_HTTP_Response $response);", "public function handleServiceRequest() {\n //\n // Create instance of SOAP server.\n //\n $SoapServer = new SoapServer($this->getWsdlFullPath()); \n $SoapServer->setClass(AblePolecat_Data::getDataTypeName($this)); \n $SoapServer->setPersistence(SOAP_PERSISTENCE_SESSION);\n $SoapServer->handle();\n }", "public function setWebService($webService)\n {\n $this->webService = $webService;\n\n return $this;\n }", "public function getWsdl();", "private function instantiate_service( $class ) {\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $class );\n\t\t}\n\n\t\t$service = new $class();\n\n\t\tif ( ! $service instanceof Service ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $service );\n\t\t}\n\n\t\tif ( $service instanceof AssetsAware ) {\n\t\t\t$service->with_assets_handler( $this->assets_handler );\n\t\t}\n\n\t\treturn $service;\n\t}", "public function getService(string $key, array $extra = null): object;", "function __construct() {\n\t\t$wsdlURL = \"https://hc.mercurydev.net/tws/transactionservice.asmx?WSDL\";\n\t\t$this->wsClient = new SoapClient($wsdlURL);\n\t}", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public function getObject() {}", "public function getObject() {}", "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 createService($serviceClass);", "private function initSoap()\n {\n $options = array(\n 'soap_version' => SOAP_1_1,\n 'stream_context' => $this->container->getParameter('aspone.context'),\n 'authentification' => SOAP_AUTHENTICATION_BASIC,\n 'trace' => 1\n );\n $soap = new SoapClient($this->container->getParameter('aspone.wsdl.monitoring'), $options);\n\n $soap->setContext($this->container->getParameter('aspone.context'));\n $soap->setContextLogin($this->container->getParameter('aspone.contextLogin'));\n $soap->setContextPassword($this->container->getParameter('aspone.contextPassword'));\n $soap->setPassword($this->container->getParameter('aspone.password'));\n $soap->setUsername($this->container->getParameter('aspone.username'));\n $soap->setService($this->container->getParameter('aspone.serviceVersion.0'));\n $soap->setServiceVersion('1.0');\n $soap->setSoapHeaders();\n $soap->__setLocation($this->container->getParameter('aspone.location.monitoring'));\n\n $this->soap = $soap;\n }", "public function __construct() {\n $this->oUserService = new UserService();\n $this->oArticleService = new ArticleService();\n $this->oLeagueService = new LeagueService();\n// $this->oTeamService = new TeamService();\n// $this->oMatchService = new MatchService(); \n }", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function getObject(): object;", "public static function getInstance($name = 'default') {\r\n if (!array_key_exists($name, self::$instances)) {\r\n self::$instances[$name] = new MOC_Api_Service();\r\n }\r\n return self::$instances[$name];\r\n }", "public static function factory(): ServiceInterface\n {\n return new static();\n }", "public function __invoke()\n {\n $client = $this->container->get('cpms\\service\\api');\n\n return $client;\n }", "public function getResponseClass();", "function ODQuery_QueryService() {\n\t\t$this->client = new SoapClient(__DIR__.'/../wsdl/QueryService2.wsdl',array(\n 'exceptions'=>true,\n 'encoding'=>'utf-8')\n );\n\t\t$this->soapException = new ODSubmission_SoapException();\n\t}", "public function demo(){\n // $this->soapWrapper->add(function ($service) {\n // $service->name('CRW')\n // ->wsdl('http://crm.elizade.net:5050/Service1.svc?wsdl')\n // ->trace(true);\n // });\n $this->soapWrapper->add('CRW', function ($service) {\n $service\n ->wsdl('http://crm.elizade.net:5050/Service1.svc?wsdl')\n ->trace(true);\n // ->classmap([\n // GetConversionAmount::class,\n // GetConversionAmountResponse::class,\n // ]);\n });\n\n $data = [\n 'lastname' => 'Raymond',\n 'firstname' => 'Ativie',\n 'email' => '[email protected]',\n 'bizPhone' => '08151700676'\n ];\n\n $case = [\n 'accountnumber' => 'CUST013643',\n 'description' => 'This is a description',\n 'title' => 'Hello world'\n ];\n\n // $response = $this->soapWrapper->call('CRW.CreateContact', [$data]);\n $response = $this->soapWrapper->call('CRW.CreateCase', [$case]);\n\n var_dump($response);\n\n // Using the added service\n // $this->soapWrapper->service('CRW', function ($service) use ($data) {\n // var_dump($service->call('CreateContact', [$data]));\n // // var_dump($service->call('Otherfunction'));\n // });\n }", "function createPWSSOAPClient()\n{\n //Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials\n $client = new SoapClient( \"./wsdl/PickUpService.wsdl\", \n array\t(\n 'trace'\t\t\t=>\ttrue,\t\t\t\t \n\t\t\t\t 'location'\t=>\t\"https://devwebservices.purolator.com/EWS/V1/PickUp/PickUpService.asmx\",\t\t\t\t \n 'uri'\t\t\t\t=>\t\"http://purolator.com/pws/datatypes/v1\",\n 'login'\t\t\t=>\tPRODUCTION_KEY,\n 'password'\t=>\tPRODUCTION_PASS\n )\n );\n //Define the SOAP Envelope Headers\n $headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', \n 'RequestContext', \n array (\n 'Version' => '1.2',\n 'Language' => 'en',\n 'GroupID' => 'xxx',\n 'RequestReference' => 'Rating Example'\n )\n ); \n //Apply the SOAP Header to your client \n $client->__setSoapHeaders($headers);\n\n return $client;\n}", "public function getObjectFactory(): ObjectFactoryInterface;", "public function getName()\n {\n return 'soap';\n }", "protected function getWsdl() {\n\t\t$wsdl = 'http://localhost/WS.wsdl';\n\t\tswitch ($this->version) {\n\t\t\tcase self::VERSION_10:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t\tcase self::VERSION_20:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS20/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t\tcase self::VERSION_21:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS21/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $wsdl;\n\t}", "public function __construct($wsdl=\"http://webservice.dkvistun.is/DemoDev/dkwsitemscgi.exe/wsdl/IWSDLPublish\", $options=array()) {\n\t\tforeach(self::$classmap as $wsdlClassName => $phpClassName) {\n\t\t if(!isset($options['classmap'][$wsdlClassName])) {\n\t\t $options['classmap'][$wsdlClassName] = $phpClassName;\n\t\t }\n\t\t}\n\t\tparent::__construct($wsdl, $options);\n\t}", "public function createFSService();", "function get_service($limit = 3){\n return app(ServiceInterface::class)->getService();\n }", "public function __construct($wsdl=null, $options=array()) {\n\t\tparent::__construct($wsdl, $options);\n\t}", "public function testCreateService()\n {\n\n }", "function fn_soneritics_kiyoh_get_api(): KiyohApi\n{\n $settings = new SoneriticsKiyohSettings;\n $api = new KiyohApi($settings->getHash());\n\n return $api;\n}", "public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }" ]
[ "0.64610803", "0.634004", "0.6305028", "0.62099606", "0.61674774", "0.612044", "0.60537", "0.6026978", "0.59685373", "0.59585094", "0.5957972", "0.589491", "0.5882698", "0.58656305", "0.5829823", "0.5825442", "0.5779587", "0.574492", "0.574174", "0.57299656", "0.5725291", "0.5720529", "0.5655141", "0.56504077", "0.56369597", "0.56079096", "0.5580991", "0.5573948", "0.55707836", "0.5563394", "0.5544538", "0.54989064", "0.5490554", "0.54896873", "0.54721487", "0.5470014", "0.5469558", "0.5466497", "0.5463074", "0.5462927", "0.54584503", "0.5450581", "0.5438075", "0.5428189", "0.5427778", "0.5427546", "0.541234", "0.54066527", "0.5396974", "0.53948414", "0.5376419", "0.535223", "0.53377926", "0.5337692", "0.5331143", "0.5327545", "0.53255147", "0.5324758", "0.53246033", "0.5309291", "0.52922165", "0.5285602", "0.52605414", "0.5253166", "0.52474016", "0.52466106", "0.5244206", "0.5244206", "0.5231936", "0.52310896", "0.522277", "0.520618", "0.51994425", "0.51887375", "0.5188248", "0.51782805", "0.51569396", "0.51569396", "0.5153773", "0.51533514", "0.51526153", "0.51472527", "0.5146983", "0.5143616", "0.51365125", "0.5133882", "0.512846", "0.5127408", "0.5125321", "0.5124723", "0.5123526", "0.5117559", "0.51131624", "0.5111922", "0.5110178", "0.5108049", "0.5097331", "0.50926673", "0.50923985", "0.50857604", "0.5074278" ]
0.0
-1
Returns a generic web service object
public function get() { $this->response->setData(1); $this->response->setHeader('__OK', Http::Response(Http::OK)); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "abstract protected function getService();", "private static function getServiceInstance()\n {\n $s = self::getServiceType();\n switch ($s) {\n case 0:\n http_response_code(404);\n exit();\n case 1:\n return new RCFaxClient();\n break;\n case 2:\n return new TwilioFaxClient();\n }\n }", "public function getWebService()\n {\n return $this->webService;\n }", "public function getWebservice()\n {\n return $this->_webservice;\n }", "protected function getHandler()\n {\n static $soap;\n\n if (empty($soap)) {\n $soap = new ECommerceServices(\n new Request(),\n $this->getApplication()->getKernel()->getContainer()->get('Logger'),\n new EventDispatcher()\n );\n }\n\n return $soap;\n }", "public function getWebservice()\n {\n return $this->webservice;\n }", "protected function service()\n {\n return new Service();\n }", "abstract public function service();", "protected function resourceService(){\n return new $this->resourceService;\n }", "public function get_service($index = FALSE, $settings = FALSE)\n\t{\t\t\n\t\treturn parent::get_object($index, $settings);\n\t}", "public function getWebservice(): WebserviceInterface\n {\n if ($this->_webservice === null) {\n $this->_webservice = $this->getConnection()->getWebservice($this->getName());\n }\n\n return $this->_webservice;\n }", "static function generarServicioF(){\n\n\t\trequire_once('SERVIDOR/lib/nusoap.php');\n \n $host = 'http://maxineiner.tuars.com/webservice/ws_segundo_parcial.php?wsdl';\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}", "public function service($request,$response,$utilities);", "abstract function get_crud_service();", "public function getApiService();", "function __get_service($service) {\n\n if ($this->services[$service] === null) {\n\n $url = $this->soap_endpoint.'/'.$service.'?wsdl';\n\n $this->services[$service] =\n $this->__create_soap_client($url, $this->soap_wsdl);\n\n }\n\n return $this->services[$service];\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 }", "public static function factory( $name, $config ) {\n\t\t$handlers = array(\n\t\t\t'microsoft' => 'MicrosoftWebService',\n\t\t\t'apertium' => 'ApertiumWebService',\n\t\t\t'yandex' => 'YandexWebService',\n\t\t\t'ttmserver' => 'RemoteTTMServerWebService',\n\t\t);\n\n\t\tif ( !isset( $config['timeout'] ) ) {\n\t\t\t$config['timeout'] = 3;\n\t\t}\n\n\t\tif ( isset( $handlers[$config['type']] ) ) {\n\t\t\t$class = $handlers[$config['type']];\n\n\t\t\treturn new $class( $name, $config );\n\t\t}\n\n\t\treturn null;\n\t}", "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}", "public static function init(){\n $wsdlUrl = self::getWsdl();\n $soapClientOptions = [\n 'stream_context' =>self::generateContext(),\n 'cache_wsdl' => WSDL_CACHE_NONE\n ];\n return new SoapClient($wsdlUrl,$soapClientOptions);\n }", "function ezWordpREST () {\n\t$instance = ezWordpREST::instance( __FILE__, '1.0.0' );\n\n\treturn $instance;\n}", "public function saveWebservice() {\n\n $registry = Zend_Registry::getInstance();\n $em = $registry->entitymanager;\n $data = $this->getRequest()->getParams();\n\n if(isset($data['webserviceId']) && $data['webserviceId'] > 0) {\n $serviceObj = $em->find('TWebservice',$data['webserviceId']);\n $serviceObj->setWebserviceId($data['webserviceId']);\n } else {\n $serviceObj = new TWebservice();\n }\n\n $serviceObj->setWebserviceName($data['WB_Name']);\n $serviceObj->setWebserviceUrl($data['WB_Url']);\n\n $Client = $em->find('TClient', $data['clientId']);\n\n $serviceObj->setClientId($Client);\n $em->persist($serviceObj);\n $em->flush();\n\n return true;\n }", "public function getObject()\n\t{\n\t\t// Create the OPF instance.\n\t\treturn new Opf_Class($this->_serviceLocator->get('template.Opt'));\n\t}", "public function call(){\n \n $service = (string)$this->_service;\n \n if(!$this->_params){\n $this->setParams();\n }\n \n $response = $this->_soapClient->$service($this->_params); \n \n $serviceResult = $service.'Result';\n \n $xml = $response->$serviceResult; \n \n return $xml;\n\n }", "public function getReflectionService() {}", "abstract protected function getService($id);", "function __construct($service) {\n // return new $class;\n }", "public function getAsSOAP() {\n\t $this->recursive_unset($this,\"schema\");\n\t //print_r($this);\n\t foreach($this as $key=>&$value) {\n\t\t$this->prepareSOAPrecursive($this->$key);\n\t }\n\t return $this;\n\t}", "function _getJsonServices() {\n\t\trequire_once('lib/pkp/lib/json/JSON.php');\n\t\treturn new Services_JSON();\n\t}", "public function __construct($wsdl = NULL, $options = NULL)\n {\n }", "public abstract function getApiObjectClass();", "public function aw_service_wp ( $proc, $args ) {\n\t \t//$args = array('argDta' => $productID,'argIsSale' => 1,'argUsr' => '');\n\t\t$url \t\t= 'http://203.201.129.15/AWSERVICE_WP_WEB/awws/AWService_WP.awws?wsdl';\n\t\t$client \t= new SoapClient($url);\n\t\t$response \t= $client->__soapCall( $proc, array($args) );\n\t\t\n\t\tswitch ( $proc ) {\n\t\t\tcase 'Trainers_OnlineProduct_Listing':\n\t\t\t\t$simpleXml = simplexml_load_string($response->Trainers_OnlineProduct_ListingResult);\n\t\t\tbreak;\n\n\t\t\tcase 'CorporateClientsList':\n\t\t\t\t$simpleXml = simplexml_load_string($response->CorporateClientsListResult);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'pcPrdct_DisplayInfo':\n\t\t\t\t$simpleXml = simplexml_load_string($response->pcPrdct_DisplayInfoResult);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'pcChat_UserDetails':\n\t\t\t\t$simpleXml = $response->pcChat_UserDetailsResult;\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t \treturn $simpleXml;\n\t }", "public function getService() // TODO: add function return type\r\n {\r\n $connection_properties = $this->get();\r\n\r\n // load the services from the services store; for connections,\r\n // make sure the service also has the connection interface\r\n $connection_type = $connection_properties['connection_type'];\r\n $connection_info = $connection_properties['connection_info'];\r\n $service = \\Flexio\\Services\\Factory::create($connection_type, $connection_info);\r\n if (!($service instanceof \\Flexio\\IFace\\IConnection))\r\n throw new \\Flexio\\Base\\Exception(\\Flexio\\Base\\Error::NO_SERVICE);\r\n\r\n // for oauth services, the access token may have been refreshed via\r\n // a refresh token, so these should be saved so that the access token\r\n // isn't refreshed in every subsequent call\r\n if ($service instanceof \\Flexio\\IFace\\IOAuthConnection)\r\n {\r\n $tokens = $service->getTokens();\r\n $connection_info = $connection_properties['connection_info'];\r\n\r\n $info_changed = false;\r\n if (!isset($connection_info))\r\n {\r\n $info_changed = true;\r\n }\r\n else\r\n {\r\n if (($connection_info['access_token'] ?? false) !== $tokens['access_token'])\r\n $info_changed = true;\r\n if (($connection_info['refresh_token'] ?? false) !== $tokens['refresh_token'])\r\n $info_changed = true;\r\n if (($connection_info['expires'] ?? false) !== $tokens['expires'])\r\n $info_changed = true;\r\n }\r\n\r\n if ($info_changed === true)\r\n $this->set([ 'connection_info' => $tokens]);\r\n }\r\n\r\n return $service;\r\n }", "public function createWebserviceDriver()\n {\n return new WebServiceHealthCheck;\n }", "public function asWebserviceInput() {\r\n $input = array(\"Id\" => $this->getTaxType(), \"BaseImp\" => $this->getBaseAmount(), \"Importe\" => $this->getTaxAmount());\r\n return $input;\r\n }", "protected function getResponseFactory()\n {\n }", "public static function factory($config = array())\n {\n $default = array(\n 'base_url' => 'http://api.wordpress.org',\n 'curl.options' => array(\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_TIMEOUT => 120,\n 'body_as_string' => true,\n ),\n );\n\n $required = array('base_url');\n $config = Collection::fromConfig($config, $default, $required);\n $description = ServiceDescription::factory(__DIR__.'/service.json');\n\n $client = new self($config->get('base_url'), $config);\n $client->setDescription($description);\n\n return $client;\n }", "function _openService($url)\n {\n $obj = new SOAP_Client($url, TRUE);\n return $obj;\n }", "public function webserviceAction($className = NULL, $service = false)\n {\n $this->layout = \"blank\";\n $niddles = preg_split(\"[_]\", $className);\n $className = \"Development_Helper_Api_{$niddles[count($niddles)-1]}\";\n\n if (isset($_SERVER['REQUEST_METHOD']) && ($_SERVER['REQUEST_METHOD'] == 'POST')) {\n App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->loadServer();\n }\n else {\n if ($service) {\n echo App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->setServiceName(\"appRain\")\n ->showWSDL();\n }\n else {\n echo App::Load(\"Module/Webservice\")\n ->setClassName($className)\n ->setServiceName(\"appRain\")\n ->showWSDLURI();\n }\n }\n }", "public static function _getSoapClient($parameters = array())\n\t{\n\t\t$endpoint = Transip_ApiSettings::$endpoint;\n\n\t\tif(self::$_soapClient === null)\n\t\t{\n\t\t\t$extensions = get_loaded_extensions();\n\t\t\t$errors = array();\n\t\t\tif(!class_exists('SoapClient') || !in_array('soap', $extensions))\n\t\t\t{\n\t\t\t\t$errors[] = 'The PHP SOAP extension doesn\\'t seem to be installed. You need to install the PHP SOAP extension. (See: http://www.php.net/manual/en/book.soap.php)';\n\t\t\t}\n\t\t\tif(!in_array('openssl', $extensions))\n\t\t\t{\n\t\t\t\t$errors[] = 'The PHP OpenSSL extension doesn\\'t seem to be installed. You need to install PHP with the OpenSSL extension. (See: http://www.php.net/manual/en/book.openssl.php)';\n\t\t\t}\n\t\t\tif(!empty($errors)) die('<p>' . implode(\"</p>\\n<p>\", $errors) . '</p>');\n\n\t\t\t$classMap = array(\n\t\t\t\t'DataCenterVisitor' => 'Transip_DataCenterVisitor',\n\t\t\t);\n\n\t\t\t$options = array(\n\t\t\t\t'classmap' => $classMap,\n\t\t\t\t'encoding' => 'utf-8', // lets support unicode\n\t\t\t\t'features' => SOAP_SINGLE_ELEMENT_ARRAYS, // see http://bugs.php.net/bug.php?id=43338\n\t\t\t\t'trace' => false, // can be used for debugging\n\t\t\t);\n\n\t\t\t$wsdlUri = \"https://{$endpoint}/wsdl/?service=\" . self::SERVICE;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tself::$_soapClient = new SoapClient($wsdlUri, $options);\n\t\t\t}\n\t\t\tcatch(SoapFault $sf)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Unable to connect to endpoint '{$endpoint}'\");\n\t\t\t}\n\t\t\tself::$_soapClient->__setCookie('login', Transip_ApiSettings::$login);\n\t\t\tself::$_soapClient->__setCookie('mode', Transip_ApiSettings::$mode);\n\t\t}\n\n\t\t$timestamp = time();\n\t\t$nonce = uniqid('', true);\n\n\t\tself::$_soapClient->__setCookie('timestamp', $timestamp);\n\t\tself::$_soapClient->__setCookie('nonce', $nonce);\n\t\tself::$_soapClient->__setCookie('clientVersion', self::API_VERSION);\n\t\tself::$_soapClient->__setCookie('signature', self::_urlencode(self::_sign(array_merge($parameters, array(\n\t\t\t'__service' => self::SERVICE,\n\t\t\t'__hostname' => $endpoint,\n\t\t\t'__timestamp' => $timestamp,\n\t\t\t'__nonce' => $nonce\n\t\t)))));\n\n\t\treturn self::$_soapClient;\n\t}", "function __create_soap_client($endpoint, $wsdl = false, $proxyhost = false,\n $proxyport = false, $proxyusername = false,\n $proxypassword = false, $timeout = 0,\n $response_timeout = 30) {\n\n if (!extension_loaded('soap')) {\n return new soapclient($endpoint, $wsdl, $proxyhost, $proxyport,\n $proxyusername, $proxypassword, $timeout,\n $response_timeout);\n } else {\n return new nusoap_client($endpoint, $wsdl, $proxyhost, $proxyport,\n $proxyusername, $proxypassword, $timeout,\n $response_timeout);\n }\n\n}", "public function getService()\n {\n\n if (preg_match('/^2\\./', $this->getVersion())) {\n $service = 'get';\n } else {\n $service = 'objects';\n }\n\n return $service;\n\n }", "public function __construct($wsdl){\n\t\n\t\t$this->wsdl\t=\t$wsdl;\n\t}", "public function addService($serviceId, $object)\n {\n if (!$object instanceof BaseWebService) return;\n if (!$serviceId) return;\n\n $rClass = new \\ReflectionClass(get_class($object));\n $methods = $rClass->getMethods(\\ReflectionMethod::IS_PUBLIC);\n $ar = $this->getAnnotationReader();\n\n //Find the default namespace\n $daClass = 'PureMachine\\Bundle\\WebServiceBundle\\Service\\Annotation\\WSNamespace';\n $nsAnnotation = $ar->getClassAnnotation($rClass, $daClass);\n if ($nsAnnotation) $defaultNamespace = $nsAnnotation->value;\n else $nsAnnotation = '';\n\n foreach ($methods as $method) {\n /*\n * If the method has no Webservice annotation , exclude it from\n * the addService building\n */\n $webserviceAnnotationsClass = 'PureMachine\\Bundle\\WebServiceBundle\\Service\\Annotation\\WebService';\n $wsAnnotations = $ar->getMethodAnnotation($method, $webserviceAnnotationsClass);\n if(is_null($wsAnnotations)) continue;\n\n //Lookup the namespace\n $nsAnnotation = $ar->getMethodAnnotation($method, $daClass);\n if ($nsAnnotation) $namespace = $nsAnnotation->value;\n else $namespace = $defaultNamespace;\n\n $annotations = $ar->getMethodAnnotations($method);\n $definition = array();\n $definition['inputType'] = 'object';\n $definition['inputClass'] = array();\n $definition['returnType'] = 'object';\n $definition['returnClass'] = array();\n $definition['headers'] = array();\n $description = '';\n $internal = array();\n $name = null;\n $version = null;\n\n foreach ($annotations as $annotation) {\n\n if ($annotation instanceof PM\\WebService) {\n $name = $namespace . \"/\" . $annotation->value;\n $version = $annotation->version;\n $definition['accessLevel'] = static::ACCESS_LEVEL_PRIVATE;\n $internal['id'] = $serviceId;\n $internal['method'] = $method->getName();\n } elseif ($annotation instanceof PM\\ReturnClass) {\n $definition['returnClass'] = $annotation->getValue();\n if ($annotation->isArray) $definition['returnType'] = 'array';\n } elseif ($annotation instanceof PM\\InputClass) {\n $definition['inputClass'] = $annotation->getValue();\n if ($annotation->isArray) $definition['inputType'] = 'array';\n } elseif ($annotation instanceof PM\\Doc) {\n $description = $annotation->description;\n } elseif ($annotation instanceof PM\\Headers) {\n if (is_array($annotation->value)) {\n foreach ($annotation->value as $key => $value) {\n $definition['headers'][$key] = $value;\n }\n }\n }\n\n }\n\n if (count($definition['returnClass']) == 0)\n throw new WebServiceException(\"A store class must be defined in returnClass \"\n .\"annotation\",\n WebServiceException::WS_006);\n\n if ($name && $version) {\n $key = strtolower($name);\n\n if (!array_key_exists($key, $this->webServices)) {\n $this->webServices[$key] = array();\n }\n\n $this->webServices[$key]['name'] = $name;\n $this->webServices[$key][$version] = array();\n $this->webServices[$key][$version]['definition'] = $definition;\n $this->webServices[$key][$version]['_internal'] = $internal;\n $this->webServices[$key]['description'] = $description;\n }\n }\n }", "protected function _make_client()\n\t{\n\t\tif (is_null($this->_client))\n\t\t{\n\t\t\trequire_once APPPATH.'libraries/nusoap/nusoap.php';\n\t\t\t\t\n\t\t\t$this->_client = new nusoap_client($this->_url, 'wsdl', '', '', '', '');\n\t\t}\n\t\t\n\t\treturn $this->_client;\n\t}", "function getWSDL($modelId, $serviceMethod = 'call')\n {\n $modelClass = $this->__getModelClass($modelId);\n $expireTime = '+1 year';\n $cachePath = $modelClass . '.wsdl';\n \n // Check cache if exist\n $wsdl = cache($cachePath, null, $expireTime);\n\n // If DEBUG > 0, compare cache modified time to model file modified time\n if ((Configure::read() > 0) && (! is_null($wsdl))) {\n\n $cacheFile = CACHE . $cachePath;\n if (is_file($cacheFile)) {\n $modelMtime = filemtime($this->__getModelFile($modelId));\n $cacheMtime = filemtime(CACHE . $cachePath);\n if ($modelMtime > $cacheMtime) {\n $wsdl = null;\n }\n }\n\n }\n \n // Generate WSDL if not cached\n if (is_null($wsdl)) {\n \n $refl = new IPReflectionClass($modelClass);\n \n $controllerName = $this->params['controller'];\n $serviceURL = Router::url(\"/\". $controllerName . \"/\" . $serviceMethod, true);\n\n $wsdlStruct = new WSDLStruct('http://schema.example.com', \n $serviceURL . '/' . $modelId, \n SOAP_RPC, \n SOAP_LITERAL);\n $wsdlStruct->setService($refl);\n try {\n $wsdl = $wsdlStruct->generateDocument();\n // cache($cachePath, $wsdl, $expireTime);\n } catch (WSDLException $exception) {\n if (Configure::read() > 0) {\n $exception->Display();\n exit();\n } else {\n return null;\n }\n }\n }\n\n return $wsdl;\n }", "protected function initializeSoapClient()\n {\n\n\t\t$authArray = array(\n\t\t\t'location' => 'https://' . $this->server . '/EWS/Exchange.asmx',\n\t\t\t'classmap' => $this->classMap(),\n\t\t\t'curlopts' => $this->curl_options,\n\t\t\t'features' => SOAP_SINGLE_ELEMENT_ARRAYS,\n\t\t); \n\n\t\tif(!empty($this->token)) {\n\n\t\t\t$authArray[\"token\"] = $this->token; \n\n\t\t}\n\t\telse {\n\n\t\t\t$authArray[\"user\"] = $this->username; \n\t\t\t$authArray[\"password\"] = $this->password; \n\n\t\t}\n\n $this->soap = new Oath2Soap(\n dirname(__FILE__) . '/assets/services.wsdl',\n $authArray\n );\n\n return $this->soap;\n }", "public function getUrlSOAP(){\r\n\t\treturn $this->soap;\r\n\t}", "private function getServiceMap()\n {\n $result = array(\n 'transport' => 'POST',\n 'envelope' => 'JSON-RPC-2.0',\n 'SMDVersion' => '2.0',\n 'contentType' => 'application/json',\n 'target' => !empty($_SERVER['REQUEST_URI']) ? substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], '?')) : '',\n 'services' => array(),\n 'description' => '',\n );\n\n foreach ($this->instances as $namespace => $instance) {\n $rc = new ReflectionClass($instance);\n\n // Get Class Description\n if ($rcDocComment = $this->getDocDescription($rc->getDocComment())) {\n $result['description'] .= $rcDocComment . PHP_EOL;\n }\n\n foreach ($rc->getMethods() as $method) {\n /** @var ReflectionMethod $method */\n if (!$method->isPublic() || in_array(strtolower($method->getName()), $this->hiddenMethods)) {\n continue;\n }\n\n $methodName = ($namespace ? $namespace . '.' : '') . $method->getName();\n $docComment = $method->getDocComment();\n\n $result['services'][$methodName] = array('parameters' => array());\n\n // set description\n if ($rmDocComment = $this->getDocDescription($docComment)) {\n $result['services'][$methodName]['description'] = $rmDocComment;\n }\n\n // @param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\s\\*]*)\n $parsedParams = array();\n if (preg_match_all('/@param\\s+([^\\s]*)\\s+([^\\s]*)\\s*([^\\n\\*]*)/', $docComment, $matches)) {\n foreach ($matches[2] as $number => $name) {\n $type = $matches[1][$number];\n $desc = $matches[3][$number];\n $name = trim($name, '$');\n\n $param = array('type' => $type, 'description' => $desc);\n $parsedParams[$name] = array_filter($param);\n }\n };\n\n // process params\n foreach ($method->getParameters() as $parameter) {\n $name = $parameter->getName();\n $param = array('name' => $name, 'optional' => $parameter->isDefaultValueAvailable());\n if (array_key_exists($name, $parsedParams)) {\n $param += $parsedParams[$name];\n }\n\n if ($param['optional']) {\n $param['default'] = $parameter->getDefaultValue();\n }\n\n $result['services'][$methodName]['parameters'][] = $param;\n }\n\n // set return type\n if (preg_match('/@return\\s+([^\\s]+)\\s*([^\\n\\*]+)/', $docComment, $matches)) {\n $returns = array('type' => $matches[1], 'description' => trim($matches[2]));\n $result['services'][$methodName]['returns'] = array_filter($returns);\n }\n }\n }\n\n return $result;\n }", "protected function getRequestService()\n {\n return new PokemonRequestService();\n }", "abstract public function getServiceTypeName();", "private function createShipmentObject()\n {\n switch ($this->getServiceMethod()) {\n case 'addShip':\n return new AddShip();\n case 'addShipment':\n return new AddShipment();\n }\n }", "public static function create($type)\n\t{\n\t\tif (empty($type) || 0 === strpos($type, 'text/html')) {\n\t\t\treturn new HttpGetRequest;\n\t\t}\n\n\t\tif (0 === strpos($type, 'application/json')) {\n\t\t\treturn new HttpJsonRequest;\n\t\t}\n\n\t\treturn new HttpPostRequest;\n\t}", "function create_service_map($soap) {\n foreach ($this->services as $service) {\n require_once($service . '.php');\n if (class_exists($service)) {\n $c = (string) $service; \n $object = new $c();\n $soap->addObjectMap($object, 'urn:php-islandora-soapservice');\n }\n else {\n $this->log->lwrite(\"Could not load class $service, check the config files list \n of services to make sure they are correct\", 'SOAP_SERVER', NULL, NULL, 'ERROR');\n }\n }\n }", "public function getForWebserviceExport()\n {\n $el = parent::getForWebserviceExport();\n if ($this->data[\"internal\"]) {\n if (intval($this->data[\"internalId\"]) > 0) {\n if ($this->data[\"internalType\"] == \"document\") {\n $referencedDocument = Document::getById($this->data[\"internalId\"]);\n if (!$referencedDocument instanceof Document) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n } else if ($this->data[\"internalType\"] == \"asset\") {\n $referencedAsset = Asset::getById($this->data[\"internalId\"]);\n if (!$referencedAsset instanceof Asset) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n }\n }\n }\n\n $el->data = $this->data;\n return $el;\n }", "public static function loadService($service) {\n\t\t$class = ucfirst($service).'Service';\n\t\trequire(SITE_ROOT.'/services/'.$service.'/'.$class.'.php');\n\t\t$serviceObj = new $class();\n\t\treturn $serviceObj;\n\t}", "public function toSoapRequest()\n { \n \n $obj = new \\stdClass();\n\n // Populate SOAP Request object with data\n foreach ($this->_properties as $key=>$value) {\n // Prepare value by function\n $functionName = \"_prepare\" . ucwords($key);\n if (method_exists($this, $functionName)) {\n $value = $this->$functionName($value);\n }\n\n if (is_array($value)) {\n // An array\n $result = array();\n foreach ($value as $itemId => $item) {\n if ($item instanceof \\Pcxpress\\Unifaun\\Model\\Pcxpress\\Unifaun\\UnifaunAbstract) {\n $result[$itemId] = $item->toSoapRequest();\n } else {\n $result[$itemId] = $item;\n }\n }\n\n if (sizeof($result) > 0) {\n $namespace = $this->_namespace;\n if (array_key_exists($key, $this->_namespaceForProperties)) {\n $namespace = $this->_namespaceForProperties[$key];\n }\n\n if ($namespace !== null) {\n $result = new \\SoapVar($result, SOAP_ENC_OBJECT, null, $namespace, $key, $namespace);\n }\n\n $obj->$key = $result;\n }\n } elseif ($value instanceof \\Pcxpress\\Unifaun\\Model\\Pcxpress\\Unifaun\\UnifaunAbstract) {\n // An object was found in value\n $result = $value->toSoapRequest();\n if (sizeof($result) > 0) {\n $obj->$key = $result;\n }\n } else {\n if ($value !== NULL) {\n $namespace = $this->_namespace;\n if (array_key_exists($key, $this->_namespaceForProperties)) {\n $namespace = $this->_namespaceForProperties[$key];\n }\n\n if ($namespace !== null && !$value instanceof \\stdClass) {\n $value = new \\SoapVar((string)$value, null, null, $namespace, $key, $namespace);\n }\n $obj->$key = $value;\n }\n }\n\n }\n\n return $obj;\n }", "function createSoapClient() {\n\tglobal $voipnow_access_token, $voipnow_version;\n\t$script_location = $_SERVER['SCRIPT_FILENAME'];\n\t/* create SOAP client based on WSDL, with trace for debugging */\n\t$files_location = getLocalSchemesLocation($script_location);\n\t$client_class = new SoapClient_4psa($files_location, array('trace' => 1, 'exceptions' => 0, 'cache_wsdl' => WSDL_CACHE_BOTH));\n\t$client = $client_class->getSoapClient();\n\t\n\t$auth = new stdClass();\n\t$auth->accessToken = $voipnow_access_token;\n\t$authvalues = new SoapVar($auth, SOAP_ENC_OBJECT, HEADERURL.$voipnow_version);\n\t$header = new SoapHeader(HEADERURL.$voipnow_version, 'userCredentials', $authvalues, false);\n\t$client->__setSoapHeaders(array($header));\n\treturn $client;\n}", "function register_webservices()\r\n {\r\n $methods = array('get', 'get_list', 'create', 'update', 'delete');\r\n \r\n $application = $this->get_application();\r\n $namespace = Application :: determine_namespace($application);\r\n \r\n $base_path = (WebApplication :: is_application($application) ? WebApplication :: get_application_class_path($application) : CoreApplication :: get_application_class_path($application));\r\n $path = $base_path . 'webservices/';\r\n\r\n if(!file_exists($path))\r\n {\r\n return true;\r\n }\r\n\r\n $folders = FileSystem :: get_directory_content($path, FileSystem :: LIST_DIRECTORIES, false);\r\n if(count($folders) > 0)\r\n {\r\n $application_webservice_category = new WebserviceCategory();\r\n $application_webservice_category->set_name(Translation :: get('TypeName', null, $namespace));\r\n if(!$application_webservice_category->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCategoryCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $application_webservice_category->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCategoryCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $application_webservice_category->get_name() . '</em>');\r\n }\r\n }\r\n\r\n foreach($folders as $folder)\r\n {\r\n $camelcase_folder = Utilities :: underscores_to_camelcase($folder);\r\n \r\n $object_webservice_category = new WebserviceCategory();\r\n $object_webservice_category->set_name(Translation :: get($camelcase_folder, null, $namespace));\r\n $object_webservice_category->set_parent($application_webservice_category->get_id());\r\n if(!$object_webservice_category->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCategoryCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $object_webservice_category->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCategoryCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $object_webservice_category->get_name() . '</em>');\r\n }\r\n\r\n $file = $path . $folder . '/webservice_handler.class.php';\r\n if(file_exists($file))\r\n {\r\n require_once $file;\r\n $class = $namespace . '\\\\' . Utilities :: underscores_to_camelcase($folder) . 'WebserviceHandler';\r\n foreach($methods as $method)\r\n {\r\n if(method_exists($class, $method))\r\n {\r\n $camelcase_method = Utilities :: underscores_to_camelcase($method);\r\n\r\n $webservice = new WebserviceRegistration();\r\n $webservice->set_name(Translation :: get($camelcase_method, null, WebserviceManager :: APPLICATION_NAME));\r\n $webservice->set_description(Translation :: get($camelcase_folder . $camelcase_method . 'Description', null, $namespace));\r\n $webservice->set_active(1);\r\n $webservice->set_category($object_webservice_category->get_id());\r\n $webservice->set_code($application . '_' . $folder . '_' . $method);\r\n if(!$webservice->create())\r\n {\r\n return $this->installation_failed(Translation :: get('WebserviceCreationFailed', null, WebserviceManager :: APPLICATION_NAME) . ' : <em>' . $webservice->get_name() . '</em>');\r\n }\r\n else\r\n {\r\n $this->add_message(self :: TYPE_NORMAL, Translation :: get('WebserviceCreated', null, WebserviceManager :: APPLICATION_NAME) . ': <em>' . $webservice->get_name() . '</em>');\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n return true;\r\n\r\n }", "public function getApiInstance()\n {\n $params = func_num_args();\n if ($params > 2 || $params < 1) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN'));\n }\n if ($params == 1) {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0));\n $api->set_platform(self::PLATFORM_OPENPLATFORM);\n } else {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0), func_get_arg(1));\n $api->set_platform(self::PLATFORM_STD);\n }\n if ($this->_switcher->getWebsiteId() != 0) {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId())) {\n $api->sandbox_mode(true);\n }\n } else {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode')) {\n $api->sandbox_mode(true);\n }\n }\n\n\n $api->set_type(self::TYPE);\n\n //$api->set_so((string)$this->_moduleContext->getVersion()); //TODO tracking\n\n return $api;\n\n }", "public function getService()\n {\n return $this->send('POST', 'getService');\n }", "public function sp_api()\n {\n $awsCredentials = new Credentials(\n env('AWS_ACCESS_KEY_ID'),\n env('AWS_SECRET_ACCESS_KEY')\n );\n\n // All of the below should be safe to bind as singletons to an IoC container.\n $spApiConfig = $this->buildSpApiConfig();\n $awsCredentialProvider = CredentialProvider::fromCredentials($awsCredentials);\n $lwaClient = new LwaClient($spApiConfig);\n $lwaService = new LwaService($lwaClient, static::$arrayCache, $spApiConfig);\n $clientAuthenticator = new ClientAuthenticator($lwaService, $awsCredentialProvider, $spApiConfig);\n $clientFactory = new ClientFactory($clientAuthenticator, $spApiConfig);\n $rdtService = new RdtService($clientFactory);\n // ^^^^^^^^^^^^^^^^ END of singleton-safe dependencies ^^^^^^^^^^^^^^^^\n\n // This should always be new'ed up on every use -- i.e. should never be used as a singleton.\n // This is because this wrapper class has state (e.g. rdtRequest) that is intended to be\n // short-lived for the purpose of a single SP-API call.\n return new SpApi(\n $clientFactory,\n $rdtService,\n $lwaService,\n $spApiConfig\n );\n }", "function _wp_http_get_object()\n {\n }", "protected function getRequestService()\n {\n return $this->services['request'] = new \\phpbb\\request\\request(NULL, true);\n }", "function consumir_webservice($xml_data)\n{\n\t$stream_options = array(\n\t\t'http' => array(\n\t\t\t'method'\t=> 'POST',\n\t\t\t'header'\t=> 'Authorization: Basic ' . base64_encode(\"Openbravo:openbravo\") . ' Content-Type: text/xml',\n\t\t\t'content'\t=> $xml_data,\n\t\t),\n\t);\n\n\t// Crear contexto de flujo con las opciones para consumir el webservice\n\t$context = stream_context_create($stream_options);\n\n\t// Consumir webservice y obtener respuesta\n\t// $ob_response = @file_get_contents('http://192.168.1.251:443/ob_lecaroz/ws/mx.cusoft.importing.rest.insertLecPayment', NULL, $context);\n\t$ob_response = @file_get_contents('http://192.168.1.3:443/ob_lecaroz/ws/mx.cusoft.importing.rest.insertLecPayment', NULL, $context);\n\n\treturn $ob_response;\n}", "public function getObject();", "public function getObject();", "public function service(BLW_HTTP_Request $request, BLW_HTTP_Response $response);", "public function handleServiceRequest() {\n //\n // Create instance of SOAP server.\n //\n $SoapServer = new SoapServer($this->getWsdlFullPath()); \n $SoapServer->setClass(AblePolecat_Data::getDataTypeName($this)); \n $SoapServer->setPersistence(SOAP_PERSISTENCE_SESSION);\n $SoapServer->handle();\n }", "public function setWebService($webService)\n {\n $this->webService = $webService;\n\n return $this;\n }", "public function getWsdl();", "private function instantiate_service( $class ) {\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $class );\n\t\t}\n\n\t\t$service = new $class();\n\n\t\tif ( ! $service instanceof Service ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $service );\n\t\t}\n\n\t\tif ( $service instanceof AssetsAware ) {\n\t\t\t$service->with_assets_handler( $this->assets_handler );\n\t\t}\n\n\t\treturn $service;\n\t}", "public function getService(string $key, array $extra = null): object;", "function __construct() {\n\t\t$wsdlURL = \"https://hc.mercurydev.net/tws/transactionservice.asmx?WSDL\";\n\t\t$this->wsClient = new SoapClient($wsdlURL);\n\t}", "public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }", "public function getObject() {}", "public function getObject() {}", "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 createService($serviceClass);", "private function initSoap()\n {\n $options = array(\n 'soap_version' => SOAP_1_1,\n 'stream_context' => $this->container->getParameter('aspone.context'),\n 'authentification' => SOAP_AUTHENTICATION_BASIC,\n 'trace' => 1\n );\n $soap = new SoapClient($this->container->getParameter('aspone.wsdl.monitoring'), $options);\n\n $soap->setContext($this->container->getParameter('aspone.context'));\n $soap->setContextLogin($this->container->getParameter('aspone.contextLogin'));\n $soap->setContextPassword($this->container->getParameter('aspone.contextPassword'));\n $soap->setPassword($this->container->getParameter('aspone.password'));\n $soap->setUsername($this->container->getParameter('aspone.username'));\n $soap->setService($this->container->getParameter('aspone.serviceVersion.0'));\n $soap->setServiceVersion('1.0');\n $soap->setSoapHeaders();\n $soap->__setLocation($this->container->getParameter('aspone.location.monitoring'));\n\n $this->soap = $soap;\n }", "public function __construct() {\n $this->oUserService = new UserService();\n $this->oArticleService = new ArticleService();\n $this->oLeagueService = new LeagueService();\n// $this->oTeamService = new TeamService();\n// $this->oMatchService = new MatchService(); \n }", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public function getObject(): object;", "public static function getInstance($name = 'default') {\r\n if (!array_key_exists($name, self::$instances)) {\r\n self::$instances[$name] = new MOC_Api_Service();\r\n }\r\n return self::$instances[$name];\r\n }", "public static function factory(): ServiceInterface\n {\n return new static();\n }", "public function __invoke()\n {\n $client = $this->container->get('cpms\\service\\api');\n\n return $client;\n }", "public function getResponseClass();", "function ODQuery_QueryService() {\n\t\t$this->client = new SoapClient(__DIR__.'/../wsdl/QueryService2.wsdl',array(\n 'exceptions'=>true,\n 'encoding'=>'utf-8')\n );\n\t\t$this->soapException = new ODSubmission_SoapException();\n\t}", "public function demo(){\n // $this->soapWrapper->add(function ($service) {\n // $service->name('CRW')\n // ->wsdl('http://crm.elizade.net:5050/Service1.svc?wsdl')\n // ->trace(true);\n // });\n $this->soapWrapper->add('CRW', function ($service) {\n $service\n ->wsdl('http://crm.elizade.net:5050/Service1.svc?wsdl')\n ->trace(true);\n // ->classmap([\n // GetConversionAmount::class,\n // GetConversionAmountResponse::class,\n // ]);\n });\n\n $data = [\n 'lastname' => 'Raymond',\n 'firstname' => 'Ativie',\n 'email' => '[email protected]',\n 'bizPhone' => '08151700676'\n ];\n\n $case = [\n 'accountnumber' => 'CUST013643',\n 'description' => 'This is a description',\n 'title' => 'Hello world'\n ];\n\n // $response = $this->soapWrapper->call('CRW.CreateContact', [$data]);\n $response = $this->soapWrapper->call('CRW.CreateCase', [$case]);\n\n var_dump($response);\n\n // Using the added service\n // $this->soapWrapper->service('CRW', function ($service) use ($data) {\n // var_dump($service->call('CreateContact', [$data]));\n // // var_dump($service->call('Otherfunction'));\n // });\n }", "function createPWSSOAPClient()\n{\n //Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials\n $client = new SoapClient( \"./wsdl/PickUpService.wsdl\", \n array\t(\n 'trace'\t\t\t=>\ttrue,\t\t\t\t \n\t\t\t\t 'location'\t=>\t\"https://devwebservices.purolator.com/EWS/V1/PickUp/PickUpService.asmx\",\t\t\t\t \n 'uri'\t\t\t\t=>\t\"http://purolator.com/pws/datatypes/v1\",\n 'login'\t\t\t=>\tPRODUCTION_KEY,\n 'password'\t=>\tPRODUCTION_PASS\n )\n );\n //Define the SOAP Envelope Headers\n $headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', \n 'RequestContext', \n array (\n 'Version' => '1.2',\n 'Language' => 'en',\n 'GroupID' => 'xxx',\n 'RequestReference' => 'Rating Example'\n )\n ); \n //Apply the SOAP Header to your client \n $client->__setSoapHeaders($headers);\n\n return $client;\n}", "public function getObjectFactory(): ObjectFactoryInterface;", "public function getName()\n {\n return 'soap';\n }", "protected function getWsdl() {\n\t\t$wsdl = 'http://localhost/WS.wsdl';\n\t\tswitch ($this->version) {\n\t\t\tcase self::VERSION_10:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t\tcase self::VERSION_20:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS20/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t\tcase self::VERSION_21:\n\t\t\t\t$wsdl = 'http://ref.cyberadmin.ch/WS21/ServiceContract/WS.wsdl';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $wsdl;\n\t}", "public function __construct($wsdl=\"http://webservice.dkvistun.is/DemoDev/dkwsitemscgi.exe/wsdl/IWSDLPublish\", $options=array()) {\n\t\tforeach(self::$classmap as $wsdlClassName => $phpClassName) {\n\t\t if(!isset($options['classmap'][$wsdlClassName])) {\n\t\t $options['classmap'][$wsdlClassName] = $phpClassName;\n\t\t }\n\t\t}\n\t\tparent::__construct($wsdl, $options);\n\t}", "public function createFSService();", "function get_service($limit = 3){\n return app(ServiceInterface::class)->getService();\n }", "public function __construct($wsdl=null, $options=array()) {\n\t\tparent::__construct($wsdl, $options);\n\t}", "public function testCreateService()\n {\n\n }", "function fn_soneritics_kiyoh_get_api(): KiyohApi\n{\n $settings = new SoneriticsKiyohSettings;\n $api = new KiyohApi($settings->getHash());\n\n return $api;\n}", "public function getService ()\n {\n if (null === $this->_service) {\n $this->setService('Default_Service_Spirit');\n }\n return $this->_service;\n }" ]
[ "0.64610803", "0.634004", "0.6305028", "0.62099606", "0.61674774", "0.612044", "0.60537", "0.6026978", "0.59685373", "0.59585094", "0.5957972", "0.589491", "0.5882698", "0.58656305", "0.5829823", "0.5825442", "0.5779587", "0.574492", "0.574174", "0.57299656", "0.5725291", "0.5720529", "0.5655141", "0.56504077", "0.56369597", "0.56079096", "0.5580991", "0.5573948", "0.55707836", "0.5563394", "0.5544538", "0.54989064", "0.5490554", "0.54896873", "0.54721487", "0.5470014", "0.5469558", "0.5466497", "0.5463074", "0.5462927", "0.54584503", "0.5450581", "0.5438075", "0.5428189", "0.5427778", "0.5427546", "0.541234", "0.54066527", "0.5396974", "0.53948414", "0.5376419", "0.535223", "0.53377926", "0.5337692", "0.5331143", "0.5327545", "0.53255147", "0.5324758", "0.53246033", "0.5309291", "0.52922165", "0.5285602", "0.52605414", "0.5253166", "0.52474016", "0.52466106", "0.5244206", "0.5244206", "0.5231936", "0.52310896", "0.522277", "0.520618", "0.51994425", "0.51887375", "0.5188248", "0.51782805", "0.51569396", "0.51569396", "0.5153773", "0.51533514", "0.51526153", "0.51472527", "0.5146983", "0.5143616", "0.51365125", "0.5133882", "0.512846", "0.5127408", "0.5125321", "0.5124723", "0.5123526", "0.5117559", "0.51131624", "0.5111922", "0.5110178", "0.5108049", "0.5097331", "0.50926673", "0.50923985", "0.50857604", "0.5074278" ]
0.0
-1
Returns a listing of the current collection
public function listing() { $this->response->setData(1); $this->response->setHeader('__OK', Http::Response(Http::OK)); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function list()\n {\n print_r($this->collection);\n }", "public function collection_list()\n\t{\n\t\t$data['collection_list']=$this->ref_coll->get_all();\n\t\t$data['brands_list']=$this->ref_brand->get_all();\n\t\t$data['catagory_list']=$this->ref_cat->get_all();\n\t\t$data['season_list']=$this->ref_season->get_all();\n\t\t$data['page']='Collection List';\n\t\t$view = 'Admin/collection/admin_collection_list_view';\n\t\techo Modules::run('Template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n\n $show_all=Collection::all();\n return view('AdminPanel.Collection.AllCollection',['show_All'=>$show_all]);\n }", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function index()\n {\n $categories = Category::paginate(10);\n return (new CategoryCollection($categories))->additional([\n \"message\" => \"categories fetch successfully.\"\n ]);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "public function listing();", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function getCollection() ;", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index(): AnonymousResourceCollection\n {\n return CommerceResource::collection(Commerce::latest()->paginate());\n }", "public function index()\n {\n return CowResource::collection(Cow::latest()->paginate(5));\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 indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function index()\n {\n return view('collections')->with('active_menu', 'collections');\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n $admins = Admin::paginate(5);\n return AdminResourceCollection::collection($admins);\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n $items = DB::collection('crudevolutions')->get();\n return $items;\n\n }", "private function showCollections()\n {\n $currentDB = $this->currentDB;\n if (!empty($currentDB)) {\n $collections = $this->mongoClient->selectDatabase($currentDB)->listCollections();\n foreach ($collections as $collection) {\n $this->cli->shout(' ' . $collection->getName());\n }\n } else {\n $this->cli->error('Please select db');\n }\n }", "public function index()\n {\n return CategoryResource::collection(Category::latest()->get());\n }", "public function activeCollectionsAction()\r\n {\r\n $em = $this->getDoctrine()\r\n ->getManager()\r\n ->getRepository('NiftyThriftyShopBundle:Collection');\r\n\t\t$totalcollections = $em->findCountAllActive();\r\n\t\t$activecollections = $totalcollections-7;\r\n $activecollections = 11;\r\n $collections = $em->findAllActive($activecollections, $orderBy=\"collectionDateEnd\", $direction=\"DESC\");\r\n return $this->render('NiftyThriftyShopBundle:Navigation:_itemList.html.twig',\r\n array('title' => 'Current Sales',\r\n 'prefix' => 'coll',\r\n 'items' => $collections,\r\n 'path_name' => 'show_collection'));\r\n }", "public function getCollection() {\n return $this->gateway->find(\n $this->getFilter(),\n $this->order,\n $this->relations,\n $this->pager,\n !$this->excludeRepo\n );\n }", "public function show(Collection $collection)\n {\n //\n }", "public function listAll()\n {\n $collectionClassName = $this->getInstanceCollectionClassName();\n return $collectionClassName::create($this, $this->getTable());\n }", "public function index()\n {\n return SupplyCollection::collection(Supply::paginate(10));\n }", "public function index()\n {\n $admin = Admin::simplePaginate(25);\n \n return new AdminResourceCollection($admin);\n }", "public function getAll()\n {\n $model = new static::$model;\n\n $per_page = request('per_page');\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n if( $per_page ) $model->setPerPage($per_page);\n\n $perPage = $model->getPerPage();\n if ($perPage) {\n $paginator = $query->paginate($perPage);\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public function show(Collection $collection): Collection\n {\n return $collection;\n }", "public function index()\n {\n $client = App::make('aws')->createClient('rekognition');\n $result = $client->listCollections([\n // 'MaxResults' => <integer>,\n // 'NextToken' => '<string>',\n ]);\n $collections = $result->get('CollectionIds');\n return \\view('collections.index', \\compact('collections'));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function index()\n {\n return CategoryResource::collection(\n Category::parents()->ordered()->with('children')->get()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\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 index ()\n {\n $company = Company::orderBy('created_at', 'desc')->paginate(5);\n return CompanyResource::collection($company);\n }", "public function index()\n {\n // return collection of articles\n return ArticleResource::collection(Article::orderBy('created_at', 'desc')->paginate(6));\n }", "public function index()\n {\n return ProductCollection::collection(Product::paginate(5));\n }", "public function index()\n {\n return Resource::collection(Query::get(request('query', 'default')));\n }", "public function index()\n {\n return Collection::on()->when($this->request->search, function ($query) {\n $query->where('name', 'ILIKE', '%' . $this->request->search . '%');\n $query->orWhere('description', 'ILIKE', '%' . $this->request->search . '%');\n })->when($this->request->limit, function ($query) {\n $query->limit($this->request->limit);\n })->when($this->request->page, function ($query) {\n $query->offset($this->request->limit * ($this->request->page - 1));\n })->orderBy('count_copies', 'desc')->get();\n }", "public function index()\n {\n $resource = Customer::paginate();\n return new CustomerCollection($resource);\n }", "public function findForList()\n {\n return $this->findByShowInOverview(true);\n }", "public function index()\n {\n return MembersResource::collection(Member::latest()->get());\n }", "public function index()\n {\n return ClientResource::collection(Client::orderBy('id', 'DESC')->paginate());\n }", "public function view(){\n $collectionObjAll = array_filter($this->_collectionList->smart_collections, function($collObj){\n return (bool)($collObj->handle == 'all');\n });\n\n $this->set('activeCollectionID', $collectionObjAll[0]->id);\n $this->set('productList', Shopifiable::getProducts(array(\n 'collection_id' => $collectionObjAll[0]->id,\n 'published_status' => 'published',\n 'limit' => 100\n )));\n\n }", "public function index()\n {\n return AnioResource::collection(Anio::All());\n }", "public function index()\n {\n $categories = Category::all();\n $categories->each(function ($categories) {\n $categories->entity;\n });\n return new CategoryCollection($categories);\n }", "public function index()\n {\n $posts = Post::included()->filter()->sort()->getOrPaginate();\n // return $categories;\n return PostResource::collection($posts); //Para una o varias respuestas\n }", "public function index()\n {\n $pages = Page::active()->orderBy('order' , 'DESC')->get();\n\n return PageResource::collection($pages);\n }", "public function index()\n {\n // Get Categorys\n $categories = CategoryWiseSpecification::orderBy('created_at', 'desc')->Where('active', 1)->paginate(100);\n\n // Return collection of Categorys as a resource\n return CategoryWiseSpecificationResouerce::collection($categories);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public static function list()\n {\n // retorna a query para a busca do grid\n $query = Feature::orderBy('name', 'ASC');\n // cria uma collection com pagination para montar o grid\n parent::handlePagination($query);\n // efetua o tratamento no collection\n parent::customCollection();\n\n\t\treturn [\n\t\t\t'data' => parent::$collection,\n\t\t\t'paginate' => parent::$paginate,\n\t\t];\n }", "public function index()\n {\n $Project = Project::paginate();\n return ProjectResource::collection($Project);\n }", "public function index()\n {\n $product_collection = Categorycollection::all();\n return view(\"admin/product_category/list_collection\", compact('product_collection'));\n }", "public function index()\n {\n // Get questions list\n $questions = Questions::orderby('created_at', 'desc')->paginate(15);\n //return collection as resource\n return $questions;\n\n }", "public function index()\n {\n $categories = Category::all();\n return new CategoryCollection($categories);\n }", "public function getAll()\n {\n $this->authorizeUserAction('viewAll');\n\n $model = new static::$model;\n\n // If we are caching the endpont, do a simple get all resources\n if (static::$cacheAll) {\n return $this->response->collection(Cache::remember(static::getCacheKey(), static::$cacheExpiresIn, function () use ($model) {\n return $model::with($model::getCollectionWith())->get();\n }), $this->getTransformer());\n }\n\n $query = $model::with($model::getCollectionWith());\n $this->qualifyCollectionQuery($query);\n\n // Handle pagination, if applicable\n $perPage = $model->getPerPage();\n if ($perPage) {\n // If specified, use per_page of the request\n if (request()->has('per_page')) {\n $perPage = intval(request()->input('per_page'));\n }\n\n $paginator = $query->paginate($perPage);\n\n return $this->response->paginator($paginator, $this->getTransformer());\n } else {\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }\n }", "public function index()\n {\n // Get galleries\n $galleries = Gallery::orderBy('created_at', 'desc')->get();\n\n // Return collection of galleries as a resource\n return GalleryResource::collection($galleries);\n }", "public function index()\n {\n return Resource::collection(News::paginate(10));\n }", "public function index()\n {\n $catList = Category::all();\n return new CategoryCollection($catList);\n }", "public function index(): Collection\n {\n return $this->repository->findAll();\n }", "public function getCollection() {\n return $this->collection;\n }", "public function index()\n {\n return new InsLogCollection(\n InsLog::latest()->paginate(config('inspector.paginate'))\n );\n }", "public function index()\n {\n $parts=Part::get();\n return PartResource::collection($parts);\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}", "public function index()\n {\n return PhotographResource::collection(Photograph::orderBy('sort', 'asc')->get());\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function index()\n {\n return GrupoResource::collection(Grupo::paginate());\n }", "public function index()\n {\n return CategoryResource::collection(Category::all());\n }", "public function index()\n {\n $categories = QueryBuilder::for(Category::class)\n ->select('categories.*', 'category_translations.name')\n ->join('category_translations', 'categories.id', '=', 'category_translations.category_id')\n ->where('category_translations.locale', '=', app()->getLocale())\n ->allowedSorts(['name', 'created_at'])\n ->allowedIncludes(['posts', 'translations'])\n ->jsonPaginate();\n// dd(new CategoriesCollection($categories));\n return new CategoriesCollection($categories);\n }", "public function index()\n {\n $classroom = Classroom::when([$this->order_table, $this->orderBy], Closure::fromCallable([$this, 'queryOrderBy']))\n ->when($this->limit, Closure::fromCallable([$this, 'queryLimit']));\n\n return ClassroomResource::collection($classroom);\n }", "public function index()\n {\n return Listing::all();\n }", "public function index()\n {\n return MonitoreoResource::collection(Monitoreo::all());\n //return MonitoreoResource::collection(Conexione::orderBy('ipe_id', 'asc')->get());\n }", "public function index()\n {\n //t will mean tenants\n $t = Tenant::all();\n\n return TResource::collection($t);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\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 //\n return ProductoResource::collection(Producto::paginate(15));\n }", "function get_collection(){\n\t\t$parent_id = $this->request->post('parent_id');\n\t\t$team_obj = new Project($parent_id);\n\t\t$object_type = $this->request->post('object_type');\n\t\t\n\t\t$listing = array();\n\t\tswitch($object_type){\n\t\t\tcase 'milestone':\n\t\t\t\t//$listing = Milestones::findByProject($team_obj, $this->logged_user);\n\t\t\t\t$listing = Milestones::findActiveByProject_custom($team_obj);\n\t\t\t\tbreak;\n\t\t\tcase 'ticket':\n\t\t\t\t$listing = Tickets::findOpenByProjectByNameSort($team_obj, STATE_VISIBLE, $this->logged_user->getVisibility());\n\t\t\t\tbreak;\n\t\t\tcase 'page':\n\t\t\t\t$categories = Categories::findByModuleSection($team_obj, 'pages', 'pages');\n\t\t\t\t$listing = Pages::findByCategories($categories, STATE_VISIBLE, $this->logged_user->getVisibility());\n\t\t\t\t/*foreach($categories as $category){\n\t\t\t\t\t$listing = array_merge($listing, Pages::findByCategory($category, STATE_VISIBLE, $this->logged_user->getVisibility()));\n\t\t\t\t}*/\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->smarty->assign('options', $listing);\n\t}", "public function get_all(){ \n\t\treturn $this->call('GET', '/admin/collects.json', array()); \n\t}", "public function getAllCollection() \n\n\t{\n\n\t\treturn $this->db->get('tb_collection')->result_array();\n\t}", "public function index()\n {\n $provider=Provider::all();\n return ProviderResource::collection($provider);\n }", "public function index()\n {\n return FilmResource::collection(Film::paginate(5));\n }", "public function getCollection()\r\n {\r\n return $this->collection;\r\n }", "public function getCollection()\n {\n return $this->collection;\n }", "public function index()\n {\n $product_category = ProductCategory::orderBy('id', 'DESC')->get();\n return ProductCategoryResource::collection($product_category);\n }", "public function index()\n {\n $Plannings = Planning::paginate(15);\n\n \n return PlanningResource::collection($Plannings);\n }", "public function index()\n {\n $prodcucts = Product::with('category')->paginate(10);\n\n return new ProductCollection($prodcucts);\n }", "public function index(){\n return CategoryResource::collection(Category::orderBy('id','DESC')->paginate(10));\n }", "public function getAll() : Collection;", "public function index()\n {\n $post = Post::paginate(5);\n return postresource::collection($post);\n }", "public function index()\n {\n return ProductResource::collection(Product::paginate(15));\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $company = Company::where('representative_id',Auth::user()->id)->get();\n return CompanyResource::collection($company);\n }", "public function index()\n {\n //$contacts = Contact::paginate(5);\n $contacts = Contact::orderBy('firstName', 'asc')->paginate(5);\n return ContactResource::collection($contacts);\n }", "public function index()\n {\n $albums = Album::with('photos')->get();\n return AlbumsResource::collection($albums);\n }", "public function index()\n {\n $feadback = Feadback::paginate(10);\n return FeadbackResource::collection($feadback);\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 }" ]
[ "0.8258754", "0.7877632", "0.7208573", "0.7185414", "0.7175108", "0.7175108", "0.7175108", "0.7175108", "0.71220523", "0.7109991", "0.71077466", "0.71064335", "0.7092632", "0.7082011", "0.70576537", "0.7010474", "0.6990422", "0.69825333", "0.69817615", "0.6981727", "0.6974898", "0.69370717", "0.6934719", "0.6928261", "0.69210047", "0.6911763", "0.68923694", "0.6890657", "0.68896455", "0.6880424", "0.6874725", "0.6873151", "0.68635774", "0.68554324", "0.68551123", "0.6843025", "0.68378943", "0.6835637", "0.683319", "0.68104684", "0.6789378", "0.6779344", "0.6779146", "0.67767984", "0.6771661", "0.6761625", "0.6761584", "0.676024", "0.6757499", "0.6750903", "0.67487115", "0.67412466", "0.6732332", "0.672958", "0.67270947", "0.67270434", "0.67267543", "0.6724178", "0.6721516", "0.6719722", "0.6712348", "0.67000777", "0.66947645", "0.6692847", "0.6687753", "0.6687106", "0.66845465", "0.6684494", "0.66770196", "0.6669108", "0.6664197", "0.6663668", "0.6662932", "0.6658143", "0.66576076", "0.6653839", "0.6651649", "0.66479546", "0.66462475", "0.6643338", "0.66336447", "0.66292334", "0.6627064", "0.66270167", "0.66224086", "0.6619309", "0.66167694", "0.66167474", "0.66147995", "0.6613504", "0.6610726", "0.6610679", "0.661047", "0.6608464", "0.66052777", "0.66048336", "0.6603118", "0.6601977", "0.66007006", "0.65902454", "0.6590127" ]
0.0
-1
Call this method to get singleton
public static function Instance() { static $inst = null; if ($inst === null) { $inst = new CUserFactory(); } return $inst; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance() {}", "public static function getInstance(): self;", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "public static function get_instance()\n {\n }", "static public function getInstance()\n\t{\n\t\treturn parent::getInstance();\n\t}", "protected static function __instance()\n {\n return DiPool::getinstance()->getSingleton(static::class);\n }", "public static function getInstance() {\n\t\tself::init();\n\t\treturn parent::getInstance();\n\t}", "public static function getInstance() {\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n return self::$instance;\n }", "public static function getInstance()\n {\n return self::$instance;\n }", "public static function getInstance()\n {\n return self::$instance;\n }", "public static function getInstance()\r\n {\r\n return static::$instance;\r\n }", "public static function getInstance()\n {\n return static::$instance;\n }", "private static function singleton() \n\t{\n\t\tif (! isset ( self::$_instance )) {\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\t\n\t\treturn self::$_instance;\n\t}", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__); \n\t}", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance();", "public static function getInstance()\n {\n return self::$instance ?? self::getNewInstance();\n }", "public function getInstance()\n {\n return self::$instance;\n }", "public static function getInstance() {\n\t\treturn parent::getInstance(__CLASS__);\n\t}", "static public function getInstance() {\n\t\treturn\n\t\t\tself::$instance===null\n\t\t\t\t? self::$instance = new static()//new self()\n\t\t\t\t: self::$instance;\n\t}", "public static function getInstance()\n\t{\n\t\treturn self::$instance;\n\t}", "static function getInstance () {\n\t\t\tif (self :: $_instance == null)\n\t\t\t\tself :: $_instance = new self ();\n\t\t\t\t\n\t\t\treturn self :: $_instance;\n\t\t}", "static public function getInstance() {\n return new static();\n }", "static function getInstance(){\r\n\r\n\t\tif(!isset(self::$instance)) self::$instance = new self();\r\n\t\treturn self::$instance;\r\n\t}", "public static function getInstance(){\r\n\r\n\t\t// This method is overriden from the singleton one simply to get correct\r\n\t\t// autocomplete annotations when returning the instance\r\n\t\t$instance = parent::getInstance();\r\n\r\n\t\treturn $instance;\r\n\t}", "public static function getInstance(){\n\t\treturn parent::_getInstance(get_class());\n\t}", "public static function getInstance(){\n\n if(!(self::$_instance instanceof self))\n self::$_instance=new self();\n return self::$_instance;\n\n }", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\treturn self::$instance;\n\t}", "public static function getInstance(){\n if(!self::$_instance){\n self::$_instance = new self();\n }\n \n return self::$_instance;\n }", "public static function getInstance()\n\t {\n\t \tif (self::$initialized) return;\n\t \tself::$initialized = true;\n\t }", "public static function getInstance(){\n\n if(!(self::$_instance instanceof self))\n self::$_instance=new self();\n return self::$_instance;\n\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance()\n {\n return GeneralUtility::makeInstance(self::class);\n }", "public static function getInstance(){\n\t\t\tif(!(self::$instance instanceof self)){\n\t\t\t\tself::$instance=new self();\n\t\t\t\t//return self::$instance;\n\t\t\t}else{\n\t\t\t\treturn self::$instance;\n\t\t\t}\n\t\t}", "public static function getInstance()\n /**/\n {\n if (is_null(self::$instance)) {\n self::$instance = new static();\n }\n\n return self::$instance;\n }", "public function getInstance() {\n\t\treturn $this->instance;\n\t}", "public static function getInstance(){\r\n if(!self::$_instance){\r\n self::$_instance = new self();\r\n }\r\n return self::$_instance;\r\n }", "public static function getInstance()\n {\n return new static;\n }", "public static function instance() {\r\n return self::$instance;\r\n }", "public static function singleton(){\n\t\tif (!isset(self::$instance)) {\n\t\t\t$miclase = __CLASS__;\n\t\t\tself::$instance = new $miclase;\n\t\t}\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n if (!self::$instance instanceof self) {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public static function getInstance(){\n if(self::$instance == null){\n self::$instance = new self;\n }\n return self::$instance;\n\n }", "public static function instance() {\n\t\treturn static::$instance;\n\t}", "public static function instance() {\n return self::$instance;\n }", "public static function getInstance(){\r\n if(!isset(self::$_instance)) {\r\n self::$_instance = new self();\r\n }\r\n\r\n return self::$_instance;\r\n }", "public\n\tstatic function getInstance() {\n\t\tif ( null == self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance(){\r\n if(empty(self::$instance)) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function getInstance(){\n if(!isset(self::$_instance)){\n self::$_instance = new self();\n }\n\n return self::$_instance;\n }", "public static function getInstance(){\n\t\tif(is_null(self::$instance)){\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "static public function getInstance()\n {\n if (self::$instance == null)\n {\n self::$instance = new self;\n }\n return self::$instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "public function getInstance()\n {\n return $this->instance;\n }", "static public function getInstance() {\r\n\t\tstatic $instance;\r\n\t\tif (!isset($instance))\r\n\t\t\t$instance = new self();\r\n\t\treturn $instance;\r\n\t}", "static public function getInstance() {\r\n\t\tstatic $instance;\r\n\t\tif (!isset($instance))\r\n\t\t\t$instance = new self();\r\n\t\treturn $instance;\r\n\t}", "public static function getInstance() {/*{{{*/\n if (is_null(self::$singleton)) self::$singleton = new self();\n return self::$singleton;\n }", "public static function getInstance() {\n\n\t\t// check for self instance\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\t// return the instance\n\t\treturn self::$instance;\n\t}", "public static function get_instance ();", "public static function getInstance()\n {\n if (!self::$__instance) {\n \n self::$__instance = new self;\n }\n \n return self::$__instance;\n }", "public function getInstance(): mixed;", "public static function get_instance() {\r\n\t\tif ( null === self::$single_instance ) {\r\n\t\t\tself::$single_instance = new self();\r\n\t\t}\r\n\r\n\t\treturn self::$single_instance;\r\n\t}", "public static function getInstance() {\r\r\n if (!(self::$_instance instanceof self)) {\r\r\n self::$_instance = new self();\r\r\n }\r\r\n\r\r\n return self::$_instance;\r\r\n }", "public static function getInstance()\n {\n if (!isset(self::$instance))\n {\n self::$instance = new self; \n }\n\n return self::$instance;\n }", "public static function getInstance() {\n \n if (empty(self::$instance)) {\n \n self::$instance = new self();\n \n }\n \n return self::$instance;\n \n }", "public static function getInstance ()\n {\n if ( is_null ( self::$instance) ) {\n self::$instance = new self();\n }\n return self::$instance;\n }", "public static function getInstance()\n\t{\n\t\tself::$_instance === null and self::$_instance = new self();\n\t\treturn self::$_instance;\n\t}", "public static function getInstance(){\n if(static::$instance === null){\n static::$instance = new static();\n }\n return static::$instance;\n }", "public static function getInstance()\n\t{\n\t\tif(!(self::$_instance instanceof self)){\n\t\t\tself::$_instance = new self;\n\t\t}\t\n\t\treturn self::$_instance;\n\t}", "public static function getInstance() {\n\n\t\tif ( ! self::$instance ) {\n\t\t\tself::$instance = new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function get_instance() {\n\t\tif ( null === self::$single_instance ) {\n\t\t\tself::$single_instance = new self();\n\t\t}\n\n\t\treturn self::$single_instance;\n\t}", "public static function get_instance() {\n\t\tif ( null === self::$single_instance ) {\n\t\t\tself::$single_instance = new self();\n\t\t}\n\n\t\treturn self::$single_instance;\n\t}", "public function getInstance()\n {\n return $this;\n }", "public static function getInstance() {\r\n if (!self::$instance instanceof self) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function getInstance() {\r\n if (!self::$instance instanceof self) {\r\n self::$instance = new self;\r\n }\r\n return self::$instance;\r\n }", "public static function instance()\n {\n }", "public static function get_instance() {\n \t if ( ! self::$instance ) {\n \t self::$instance = new self();\n \t }\n \t return self::$instance;\n \t}", "public static function getInstance() {\n\t\tif(self::$instance == null) {\n\t\t\treturn new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance() {\n\t\tif(self::$instance == null) {\n\t\t\treturn new self;\n\t\t}\n\n\t\treturn self::$instance;\n\t}", "public static function getInstance()\n {\n static $instance = null;\n\n if (null === $instance) \n {\n $instance = new static();\n }\n\n\treturn $instance;\n }" ]
[ "0.847603", "0.847603", "0.847603", "0.847603", "0.84753954", "0.84753954", "0.84753954", "0.8474683", "0.8474683", "0.8474683", "0.8469507", "0.8389552", "0.8389366", "0.83892477", "0.83892477", "0.83892477", "0.83892477", "0.8301893", "0.82863575", "0.82718897", "0.82356465", "0.8217548", "0.8211312", "0.8211312", "0.8208024", "0.82080203", "0.82014036", "0.8163649", "0.81570816", "0.81570816", "0.81570816", "0.81570816", "0.81570816", "0.81570816", "0.81570816", "0.81570816", "0.8150678", "0.8146112", "0.81253797", "0.81250584", "0.8124132", "0.8113796", "0.8112477", "0.8106571", "0.80872357", "0.8067044", "0.8061477", "0.80586267", "0.80586267", "0.8052667", "0.8049676", "0.80450505", "0.8042175", "0.8042175", "0.8033088", "0.8028985", "0.8024422", "0.8023689", "0.8009486", "0.7996175", "0.7990614", "0.7983527", "0.797881", "0.79746765", "0.7966368", "0.79653394", "0.7963838", "0.7960794", "0.7952234", "0.7951866", "0.79465634", "0.79369986", "0.79369986", "0.79369986", "0.79369986", "0.79333305", "0.79333305", "0.7932858", "0.7926719", "0.79245615", "0.7922947", "0.7899778", "0.7893839", "0.7892609", "0.78910583", "0.78721195", "0.7866225", "0.78621626", "0.7861898", "0.7861639", "0.7861319", "0.785822", "0.785822", "0.78575945", "0.785608", "0.785608", "0.78536385", "0.78524584", "0.785136", "0.785136", "0.7850107" ]
0.0
-1
Private constructor for singleton
private function __construct(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct() { // singleton\n }", "final private function __construct() {}", "final private function __construct() {}", "private function __construct()\r\n {\r\n // Prevent direct instantiation\r\n }", "final private function __construct() {\n\t\t\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private final function __construct() {}", "protected final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct () {}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "final private function __construct()\n\t{\n\t}", "final private function __construct()\n {\n }", "private function __construct() {\n\t\t}", "final private function __construct(){\r\r\n\t}", "final private function __construct()\n {\n }", "final private function __construct()\n {\n }", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}", "private function __construct() {\n\t}" ]
[ "0.85348773", "0.8124202", "0.8124202", "0.8039363", "0.79742104", "0.7970395", "0.7970395", "0.7970395", "0.79650956", "0.79565513", "0.7951879", "0.7951879", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.7951767", "0.794994", "0.7890221", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.7846802", "0.77795994", "0.7779189", "0.7742848", "0.7731377", "0.77239174", "0.77239174", "0.7714966", "0.7714966", "0.76888", "0.76608026", "0.76608026", "0.76608026" ]
0.7672813
97
Get the value of id
public static function getId() { return self::$id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId(){\n\t\t\treturn $this->$id;\n\t\t}", "public function getId()\n {\n return $this->getValue('id');\n }", "public function getId() {\n\t\treturn $this -> data['id'];\n\t}", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "function getID() {\n\t\treturn $this->data_array['id'];\n\t}", "public function getId(){\n return $this->_data['id'];\n }", "public function get_id();", "public function get_id();", "public function getId() {\r\n\t\treturn $this->data['id'];\r\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "function getId() {\n\t\treturn $this->getData('id');\n\t}", "public function getid(){\n\t\t\treturn $this->id;\n\t\t}", "public function value($id)\n\t{\n\t\treturn $this->connection()->get(\"element/$id/value\");\n\t}", "public function get_id(){\n\t\treturn $this->id;\n\t}", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string{\n return $this->id;\n }", "public function getId() : string\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "function get_id() {\n\t\treturn $this->id;\n\t}", "public function getID();", "public function getID();", "public function getID();", "function get_id() {\n return $this->get_mapped_property('id');\n }", "public static function id(){\n return self::info('id');\n }", "public function getid() {\n\t\treturn $this->id;\n\t}", "public function getID()\n { return $this->get('id'); }", "function get_id() {\n\t\treturn $this->id;\n\n\t}", "public function getid()\n {\n return $this->id;\n }", "public function getid()\n {\n return $this->id;\n }", "public function get_id(){\n return $this->id;\n }", "function get_id() {\n return $this->id;\n }", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "public function getId(){\n\t\t\treturn $this->id;\n\t\t}", "static function id()\n\t{\n\t\treturn self::data('id');\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\n\t\treturn $this->id;\n\t}", "public function getId(){\r\n\t\t\treturn $this->id;\r\n\t\t}", "public function getId(){\r\n\t\treturn $this->id;\r\n\t}", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "public static function get()\n {\n return self::$id;\n }", "public function getId()\n {\n $value = $this->get(self::ID);\n return $value === null ? (string)$value : $value;\n }", "function getId() {\n\t\treturn $this->id;\n\t}", "function getId();", "public function getValueId()\n {\n return $this->valueId;\n }", "function get_id()\n {\n return $this->id;\n }", "function get_id()\r\n {\r\n return $this->id;\r\n }", "function getId(){\n\t\treturn $this->id;\n\t}", "function getId(){\n\t\treturn $this->id;\n\t}", "function getId(){\n\t\treturn $this->id;\n\t}", "public function getId() ;", "public function get_id () {\r\n\t\treturn $this->id;\r\n\t}", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "function get() {\n if (!empty($this->_id)) {\n return $this->_id;\n }\n return '';\n }", "abstract public function get_id();", "function get_id(){\n return $this -> id;\n }", "function get_id(){\n return $this -> id;\n }", "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "public function get_id() {\r\n\t\treturn ($this->id);\r\n\t}", "public function getID(){\n \treturn $this->id;\n }", "public function get($id) {\n return $this->currentValues[$id];\n }", "public function getId()\n { return $this->getAttribute('id'); }", "public function getID(): string;", "function get_id()\n\t{\n\t\treturn $this->id;\n\t}", "public function getId(): mixed;", "public function getId()\n { // getter ID\n return $this->id;\n }", "public function getId()\n {\n return $this['id'];\n }", "public function id() {\n return $this->id;\n }", "public function getId() {}", "public function getId() {}", "public function getid()\n {\n return $this->Id;\n }", "public function getId()\n {\n $rtn = $this->data['id'];\n\n return $rtn;\n }", "public function getID() : string;", "public function getId()\n\t{\n\t\treturn $this->id; \n\n\t}", "public function getId()\n {\n return $this->getData(self::ID);\n }", "public function id(): string\n {\n return $this->getAttribute('id');\n }", "function id():string {return $this->_p['_id'];}", "public function get_id() {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "public function get_id() {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "public function id()\n {\n return $this->id;\n }", "private function getId() {\n return Xss::filter($this->request->get('id'));\n }", "public function getId() : string {\n return $this->id;\n }", "public function getID()\n {\n return $this->formattedData['id'];\n }", "function getId()\r\n\t\t{\r\n\t\t\treturn $this->id;\r\n\t\t\t\r\n\t\t}", "public function getId():string {\n return $this->id;\n }", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}", "public function getId() {\n\t\treturn $this->id;\n\t}" ]
[ "0.77531433", "0.75790346", "0.7551146", "0.74920887", "0.7472376", "0.7445116", "0.7433321", "0.7433321", "0.74298936", "0.7415067", "0.7415067", "0.732741", "0.7291388", "0.72722006", "0.7259057", "0.7259057", "0.7255057", "0.7253809", "0.72535557", "0.72535557", "0.72535557", "0.72478676", "0.7239034", "0.7214735", "0.7207342", "0.72061116", "0.7202167", "0.7202167", "0.7191623", "0.7179009", "0.7162689", "0.7162689", "0.7162689", "0.7162689", "0.7156056", "0.7142556", "0.7142556", "0.7142556", "0.7142556", "0.7142556", "0.7142064", "0.71383333", "0.71373826", "0.7133959", "0.71320766", "0.712474", "0.711623", "0.7115175", "0.7114791", "0.71101403", "0.7102386", "0.7102386", "0.7102386", "0.7091067", "0.70898867", "0.708427", "0.708427", "0.7076914", "0.7074607", "0.7059175", "0.7059175", "0.705889", "0.705889", "0.7057164", "0.7053134", "0.705276", "0.70520186", "0.7050234", "0.7041468", "0.7041224", "0.7039091", "0.7035577", "0.70308214", "0.70308214", "0.7025611", "0.70220804", "0.7018659", "0.7014001", "0.7010808", "0.7003174", "0.70012575", "0.69916296", "0.69916296", "0.69916296", "0.69893074", "0.69893074", "0.69893074", "0.69893074", "0.69839543", "0.6982348", "0.69735116", "0.6972415", "0.6970156", "0.69687396", "0.69687396", "0.69687396", "0.69687396", "0.69687396", "0.69687396", "0.69687396", "0.69687396" ]
0.0
-1
Set the value of id
public static function setId($id) { self::$id = $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetId($value) { $this->id=$value; }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "function set_id($id) {\n\t\t$this->id = $id;\n\t}", "private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}", "private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}", "function setId($id) {\n\t\t$this->setData('id', $id);\n\t}", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "function setId($id){\n\t\t$this->id = $id;\n\t}", "function set_id($id)\n {\n $this->id = $id;\n }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "public function set_id($id){\n $this->id = $id;\n }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}", "public function setId($id){\n $this->_id = $id;\n }", "public function SetId ($id);", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "public function setID($id) {\n $this->id = $id; \n }", "public function setID($id){\n $this->id = $id;\n }", "function setId($id)\n {\n $this->id = $id;\n }", "private function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id) { $this->id = $id; }", "public function setId($id){\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n {\n $this->id = $id;\n\n \n }", "public function setID($id);", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}", "function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}", "public function setID($id){\n $this->id=$id;\n }", "public function setId($id) \n {\n $this->id = $id;\n }", "public function setId( $id )\n {\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($x) { $this->id = $x; }", "public function set($id, $value);", "public function set($id, $value);", "public function setId($value)\n {\n $this->setDataField('id', $value);\n }", "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setid($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "public function set(string $id, $value);", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id)\n {\n $id = (int) $id;\n \n if ($id > 0)\n {\n $this->_id = $id;\n }\n }", "public function setId($id){\n $this->id = (string) $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\r\n\t\t{\r\n\t\t\t$this->_id = $id;\r\n\t\t}", "public function setId($id)\r\n\t{\r\n\t\t$this->id = $id;\r\n\t}", "public function setID($id) {\n\t\t$this->id = $id;\n\t}", "function setId($id)\n\t{\n\t\t// Set id\n\t\t$this->_id\t = $id;\n\t}", "public static function set($id)\n {\n self::$id = $id;\n }", "public function setId($var){\n\t\t$this->id=$var;\n\t}", "function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}", "public function setId($id){\n $this->id=$id;\n }", "function setId($id) {\n\t\treturn $this->setData('id', $id);\n\t}", "public function setId($id)\n {\n $this->_id = $id;\n }", "public function setId($id)\r\n {\r\n $this->_id = (int) $id;\r\n }", "public function setId($id)\n\t{\n\t\t$this->id = (int) $id;\n\t}", "public function setId($id)\n\t\t{\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n\t{\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n {\n $this->_id = (int)$id;\n }", "function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}", "function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }", "public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setID($id){\n $this->ID = $id;\n }", "public function setId($id){\n\t\t\t\t$this->id=$id;\n\t\t\t}", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }" ]
[ "0.88871074", "0.843179", "0.8386374", "0.82243615", "0.8207132", "0.8197505", "0.8139511", "0.81316125", "0.8130276", "0.81274986", "0.8092258", "0.80916125", "0.807949", "0.80521345", "0.80423075", "0.8040586", "0.8028681", "0.8028681", "0.80261153", "0.8006119", "0.8002501", "0.80008864", "0.79958093", "0.79923487", "0.79879093", "0.79750544", "0.7966122", "0.7966122", "0.7966122", "0.7961761", "0.79594445", "0.7944638", "0.7944638", "0.7937812", "0.79355067", "0.79330397", "0.792408", "0.79183996", "0.790568", "0.79031277", "0.7896356", "0.7891149", "0.7891149", "0.78905076", "0.7888843", "0.78869873", "0.7884865", "0.7884865", "0.7884865", "0.7884865", "0.7884865", "0.7882667", "0.78793806", "0.787181", "0.78704524", "0.7868695", "0.78657496", "0.78657496", "0.78600323", "0.78554225", "0.7837032", "0.7824912", "0.782488", "0.78234637", "0.7819974", "0.7815607", "0.7811229", "0.78052753", "0.7797653", "0.7787404", "0.77867395", "0.7781688", "0.7772302", "0.7768127", "0.7766342", "0.7766342", "0.7766342", "0.7766342", "0.7764087", "0.7759395", "0.7751634", "0.77469563", "0.7746471", "0.7746471", "0.7746471", "0.7746471", "0.77461237", "0.7740466", "0.77401155", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116", "0.7731116" ]
0.0
-1
Get the value of email
public static function getEmail() { return self::$email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmail() {\n return $this->getValue('email');\n }", "function getEmail() {\n\t\treturn $this->getData('email');\n\t}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function get_email() {\r\n return $this->email;\r\n }", "public function getEmail()\n {\n return $this->getParam(self::EMAIL);\n }", "public function getEmail()\r\n\t{\r\n\t\treturn $this['email'];\r\n\t}", "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "public function get_email() \n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->__get(\"email\");\n }", "public function getEmail()\n {\n \treturn $this->email;\n }", "public function getEmail() {\n\t\treturn $this->response['email'] ?: NULL;\n\t}", "public function get_email()\n {\n return $this->_email;\n }", "public function get_email()\n {\n return $this->_email;\n }", "public function get_email()\n {\n return $this->_email;\n }", "private function _extract_email()\r\n\t{\r\n\t\tif (! isset( $_SESSION['blesta_client_id'] ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tLoader :: loadModels( $this, array( 'clients' ) );\r\n\t\t$client_id\t=\t$_SESSION['blesta_client_id'];\r\n\t\t\r\n\t\t$client\t=\t$this->Clients->get( $_SESSION['blesta_client_id'] );\r\n\t\t\r\n\t\tif (! isset( $client->email ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn $client->email;\r\n\t}", "public function getEmail(){\n\t\treturn $this->email;\n\t}", "public function getEmail(){\r\n\t\t\treturn $this->email;\r\n\t\t}", "public static function getEmail(){\n if(Cache::isStored('website_email')) return Cache::get('website_email'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_email'\");\n $address = $row['value'];\n Cache::store('website_email', $address);\n return $address;\n }", "public function getEmail() {\n\t\treturn($this->email);\n\t}", "public function getEmail():string\n {\n return $this->email;\n }", "public function getEmail() : string\r\n\t{\r\n\t\treturn $this->email;\r\n\t}", "public function getEmail(): string\n {\n return $this->email;\n }", "public function getEmail(): string\n {\n return $this->email;\n }", "public function getEmail(): string\n {\n return $this->email;\n }", "public function getEmail(): string\n {\n return $this->email;\n }", "public function getEmail(): string\n\t{\n\t\treturn $this->email->getEmail();\n\t}", "public function getEmail(){\n\t\t\treturn $this->email;\n\t\t}", "public function getEmail() {\n return($this->email);\n }", "public function getEmail()\r\n {\r\n return $this->email;\r\n }", "public function getEmail()\r\n {\r\n return $this->email;\r\n }", "public function getEmail() {\r\n return $this->email;\r\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail()\n {\n return $this->getParameter('email');\n }", "public function getEmail(): string {\n return $this->email;\n }", "public function getUserEmail () {\n\t\treturn ($this->userEmail);\n\t}", "public function getEmailAddress()\n {\n return $this->_getVar('user_email');\n }", "public function getEmail() : string {\n return $this->email;\n }", "public function getEmail()\r\n {\r\n return $this->email;\r\n }", "public function getEmail() { return $this->email; }", "public function getEmail(): ?string\n {\n return $this->data->email;\n }", "public function getEmail(){\n return $this->email;\n }", "public function getEmail(){\n return $this->email;\n }", "public function getEmail()\n {\n return $this->getAttribute('email');\n }", "function getEmail() {\n return $this->email;\n }", "function getEmail() {\n return $this->email;\n }", "public function getMail();", "public function getEmail() {\r\n return $this->email;\r\n }", "public function getEmail()\n {\n if (array_key_exists(\"email\", $this->_propDict)) {\n return $this->_propDict[\"email\"];\n } else {\n return null;\n }\n }", "public function getEmail()\n {\n return $this->get('Email');\n }", "public function getEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmail()\n\t{\n\t\treturn $this->email;\n\t}", "public function getEmail()\n {\n return $this->attributes['email'] ?? null;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }", "public function getEmail()\n {\n return $this->email;\n }" ]
[ "0.8002871", "0.7953225", "0.78898126", "0.78898126", "0.78898126", "0.7888253", "0.7888253", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7819835", "0.78176445", "0.77480185", "0.7734104", "0.7732894", "0.77141553", "0.76730597", "0.7666667", "0.7641527", "0.7641527", "0.7641527", "0.7632761", "0.76218843", "0.7611186", "0.76093507", "0.7581587", "0.7581372", "0.75695014", "0.75385994", "0.75385994", "0.75385994", "0.75385994", "0.7536098", "0.7535771", "0.75344557", "0.7531016", "0.7531016", "0.7530068", "0.7529935", "0.7529935", "0.7529935", "0.7529935", "0.7529935", "0.7527459", "0.7502249", "0.7500836", "0.7493942", "0.7489811", "0.7489686", "0.74837995", "0.74805254", "0.74805254", "0.7479167", "0.74773145", "0.74773145", "0.74762547", "0.74733704", "0.7447003", "0.7443729", "0.7441894", "0.7441894", "0.7441894", "0.7441894", "0.7441894", "0.7441894", "0.74358666", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065", "0.74337065" ]
0.7511749
52
Set the value of email
public static function setEmail($email) { self::$email = $email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEmail($value)\n {\n $this->_email = $value;\n }", "public function setEmail($value) {\r\n $this->email = $value;\r\n }", "public function setEmail($value) {\n if(!strstr($value, \"@\")){\n throw new Exception(\"Errore in setEmail\");\n }\n // se esiste\n\n $this->email = $value;\n\n //$this->generateUserId();\n }", "public function setEmail($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_9'));\n\t\tif(!Validator::AccountEmail($value)) throw new Exception(lang('error_9'));\n\t\t\n\t\t$this->_email = $value;\n\t}", "private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }", "public function setEmail(?string $value): void {\n $this->getBackingStore()->set('email', $value);\n }", "function setEmail($newEmail){\n $this->email = $newEmail;\n }", "function setEmail( $email )\n {\n $this->setValueByFieldName( 'person_email', $email );\n return;\n }", "public function setEmailAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['email'] = $this->mayaEncrypt($value);\n }\n }", "public function changeEmail($newValue){\n\n $this->email = $newValue;\n $this ->save();\n\n }", "public function setUserEmail($value)\n {\n return $this->set('UserEmail', $value);\n }", "public function setUserEmail($value)\n {\n return $this->set('UserEmail', $value);\n }", "public function setEmail($email){\n\t\t$this->email = $email;\n\t}", "function setEmail($email) {\n\t\treturn $this->setData('email', $email);\n\t}", "public function setEmail(string $email){\n $this->email = $email;\n }", "private function _setEmail($input) {\n\t\tif(!Validator::Email($input)) throw new Exception(lang('error_9'));\n\t\t$this->_identifier = $input;\n\t}", "public function setEmail($newEmail){\n\t}", "public function set_email( $email ) {\n\t\treturn $this->set_field( 'EMAIL', $email );\n\t}", "protected function setEmail(string $email)\r\n\t{\r\n\t\t$this->email = $email;\r\n\t}", "public function setEmail($email){\n\t\t\t$this->email = $email;\n\t\t}", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n return $this->set('Email', $value);\n }", "public function setEmail($value)\n {\n \t$this->email = $value;\n \treturn $this;\n }", "public function setEmail($value)\n {\n return $this->set(self::EMAIL, $value);\n }", "public function setEmail(string $email): void\n {\n $this->_email = $email;\n }", "public function setEmail($email) {\n\t\t$this->_email = $email;\n\t}", "public function setUserMail(?string $value): void {\n $this->getBackingStore()->set('userMail', $value);\n }", "protected function setEmail(string $email) {\n $this->email = $email;\n }", "public function setEmailAddress($email);", "public function setEmail($email);", "public function setEmail($email);", "public function setEmail($email);", "public function setGiftcardSenderEmail($value);", "public function setEmail($email)\n {\n $this->email = $this->db->real_escape_string( $email);\n\n }", "public function setEmail(string $email): void\n {\n $this->email = $email;\n }", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t}", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t}", "public function setEmail($email) {\n\t\t$this->email = $email;\n\t}", "public function setEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}", "public function setEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}", "public function setEmail(string $email)\n {\n $this->email = $email;\n }", "public function setEmail($email) {\n $this->user_email = $email;\n }", "public function setEmail1($value)\n {\n return $this->set('Email1', $value);\n }", "public function setEmail($email) {\n $this->set('email', $email, 'user');\n }", "public function setEmailAttribute($value)\n {\n $this->attributes['email'] = mb_strtolower($value);\n }", "public function setEmail(String $email)\n {\n $this->email = $email;\n }", "function set_email($email) {\n if (is_string($email) == false)\n throw new Exception('type error!');\n\n $email = strtolower($email);\n $len = strlen($email);\n \n if ($len == 0)\n throw new Exception(\"email cannot be empty\");\n if (preg_match(\"/[^a-z_.0-9-@]+/\", $email))\n throw new Exception(\"email has some not allowed characters.\");\n if (!filter_var($email, FILTER_VALIDATE_EMAIL))\n throw new Exception(\"email is not valid\");\n if ($len > 30)\n throw new Exception(\"email cannot be more than 30 characters\");\n\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail($email)\n {\n $this->email = $email;\n }", "public function setEmail(string $email) {\n\n $this->email = $email;\n\n }", "public function setEmailAttribute($value) {\n \t$this->attributes['email'] = strtolower($value);\n\t}", "public function setEmail($strEmail) {\n\t\t$this->email = $strEmail;\n\t}", "public function setEmail($email) {\n $this->email = $email;\n }", "public function setEmail($email) {\n $this->email = $email;\n }", "public function setEmail($email) {\n $this->email = $email;\n }", "public function setEmail(?string $email): void;", "public function setEmail(?string $email): void;", "public function setEmail($val)\n {\n $this->_propDict[\"email\"] = $val;\n return $this;\n }", "function _webform_edit_email_validate($element, &$form_state) {\r\n if ($form_state['values']['user_email']) {\r\n $form_state['values']['value'] = '%useremail';\r\n }\r\n}", "public function set_email($email) : void\n {\n try {\n $this->obj_contato_anunciante->set_email(Validador::Contato_Anunciante()::validar_email($email));\n } catch (Exception $e) {\n $this->erros[] = $e->getMessage();\n $this->campos['email'] = \"erro\";\n }\n }", "public function setEmail($email)\n {\n $this->session->set('email', $email);\n $this->session->set('crumb', md5($this->config->secrets->secret . time()));\n if($this->isOwner())\n $this->session->set('site', $_SERVER['HTTP_HOST']);\n }", "public function set_email($email){\n if (\n !empty($email) &&\n \\Audit::instance()->email($email) == false\n ) {\n // no valid email address\n $this->throwValidationError('email');\n }\n return $email;\n }", "public function setGiftcardRecipientEmail($value);", "public function setEmail($email)\n\n{\n\n$this->email = $email;\n\n}", "public function setEmail($mail);", "public function setEmailAttribute($value)\n {\n $this->attributes['email'] = strtolower($value);\n }", "public function setEmail($email) {\n $this->setUsername($email);\n $this->email = $email;\n }", "public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }", "public function setEmail($email)\r\n {\r\n if(!$this->validate($email)){\r\n $this->message = \"Field is empty\";\r\n return false;\r\n }\r\n \r\n $this->email = $email;\r\n\r\n return true;\r\n }", "public function setEmail($email)\n\t\t{\n\t\t$this->email = $email;\n\t\treturn true;\n\t\t}", "public function userEmail($value = null)\n\t{\n\t\tif ($value != null)\n\t\t{\n\t\t\t$this->_userEmail = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_userEmail;\n\t\t}\n\t}", "public function setEmail(?CustomerTextFilter $email): void\n {\n $this->email = $email;\n }", "function set_admin_email($email) {\n $this->admin_email = $email;\n }", "public function setEmailAttribute(string $value): void\n {\n $this->attributes[self::EMAIL] = \\strtolower($value);\n }", "public function setEmail($email) {\n $this->getlead()->setEmail($email);\n }", "public function setUsernameToEmail()\n {\n $this->username = $this->email;\n $this->usernameCanonical = $this->emailCanonical;\n }", "function changeemail($member,$oldemail,$newemail) {\n\t\n}", "public function setMail($_mail)\n {\n $this->mail = $_mail;\n }", "public function setADEmail($email)\n\t{\n\t\t$this->email = $email;\n\t}", "public function setUserEmail($user) {\n\t\t$this->userEmail = $user;\n\t}", "public function updateEmail($email)\n {\n $this->email = trim($email);\n $this->update();\n }", "function email($email)\n {\n if (!is_valid_email($email))\n return false;\n\n if ($email != $this->email)\n $this->update['email'] = $email;\n\n $this->email = $email;\n\n return true;\n }", "public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }", "public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }", "public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }", "public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }", "public function setEmail($value)\n {\n return $this->setParameter('email', $value);\n }", "public function _setEmail($Email)\n {\n $this->Email = $Email;\n\n }", "public function setEmail($email)\n {\n if (!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) {\n $this->erreur[] = 'Mauvais format Email';\n }else{\n $this->email = htmlspecialchars($_POST['email']);\n return $this;\n }\n }", "public function setEmail($anEmail) {\n\t\t$this->_email = $anEmail;\n\t}", "public function setEmailToAddress($value) { $this->_emailToAddress = $value; }", "protected static function _email(){\n if (self::$_ruleValue) {\n $str = filter_var(trim(self::$_elementValue), FILTER_VALIDATE_EMAIL);\n if (!$str) {\n self:: setErrorMessage(\"Enter valid email\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }", "public function change_email() {\n if($_SESSION['user']->set_email($this->email)) {\n return true;\n } else {\n // An error occured updating the email address, return false\n return false;\n }\n }", "public function setEmail($email) {\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return false;\n }\n $this->email = $email;\n return true;\n }" ]
[ "0.8320114", "0.8207443", "0.81339836", "0.80443805", "0.7915434", "0.78432465", "0.78333914", "0.7637634", "0.7605696", "0.756671", "0.75154626", "0.75154626", "0.7496423", "0.7487856", "0.7484968", "0.74780154", "0.74690026", "0.7465834", "0.74249554", "0.73958474", "0.7376175", "0.73746145", "0.73746145", "0.73733425", "0.7350471", "0.73355174", "0.7335016", "0.73184", "0.7308534", "0.7303374", "0.72843206", "0.72843206", "0.72843206", "0.7282046", "0.7272034", "0.72678685", "0.7241061", "0.7241061", "0.7241061", "0.7229155", "0.7229155", "0.7227465", "0.7195372", "0.7191777", "0.71894056", "0.71891856", "0.71888304", "0.71815145", "0.7175152", "0.7175152", "0.7175152", "0.7175152", "0.7175152", "0.7175152", "0.7175152", "0.716556", "0.7160852", "0.7160221", "0.7152097", "0.7152097", "0.7152097", "0.7128992", "0.7128992", "0.7121045", "0.71195114", "0.711073", "0.70832497", "0.70753133", "0.7065379", "0.7054867", "0.7051952", "0.70494074", "0.7031222", "0.7007698", "0.70075375", "0.69909424", "0.6990149", "0.6979738", "0.6979417", "0.6968789", "0.6964078", "0.69636315", "0.6953141", "0.6923221", "0.6909192", "0.688023", "0.6869575", "0.6860859", "0.68381596", "0.68381596", "0.68381596", "0.68381596", "0.68381596", "0.6832759", "0.68308496", "0.6829195", "0.6819542", "0.68109906", "0.67864144", "0.6784444" ]
0.72757095
34
Get the value of position
public static function getPosition() { return self::$position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPosition() {\n return $this->getValue('position');\n }", "public function getPosition() : int\n {\n $rtn = $this->data['position'];\n\n return $rtn;\n }", "public function getPosition()\n {\n $value = $this->get(self::POSITION);\n return $value === null ? (string)$value : $value;\n }", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPosition()\n {\n return $this->getData(self::POSITION);\n }", "function getPosition()\n\t{\n\t\treturn $this->Info['Position'];\n\t}", "public function getPos();", "public function getPos();", "public function getPosition()\n {\n return $this->get(self::POSITION);\n }", "public function position()\n\t{\n\t\treturn $this->getField('position');\n\t}", "public function getPosition(): string;", "public function getPos()\n {\n return $this->pos;\n }", "public function getPosition() {\n\t\treturn $this->position;\n\t}", "public function getPosition() {\n\t\treturn $this->position;\n\t}", "function getPosition() {\n return sprintf(\"%010d\", $this->_position);\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition()\n {\n return $this->position;\n }", "public function getPosition(): int\n {\n return $this->position;\n }", "public function getPosition(): int\n {\n return $this->position;\n }", "public static function position()\n {\n return static::$position;\n }", "public static function position()\n {\n return static::$position;\n }", "public function position() {\n\t\treturn $this->position;\n\t}", "function getPosition() ;", "public function getPosition() {}", "public function getPosition() {}", "public function getPosition();", "public function getPosition();", "public function getPosition();", "function getPosition() { return $this->readText(); }", "public function getPosition()\n {\n return -1;\n }", "public function GetPosition()\n\t{\n\t\tif($this->position['horizontal'] != '' && $this->position['verticle'] != '')\n\t\t\treturn $this->position['horizontal'].$this->position['verticle'];\n\t\telse\n\t\t\treturn 'Invalid Position';\n\t}", "function getPosition() { return $this->readText(); }", "public function get_position(){ return $this->_position;}", "public function position()\n {\n return $this->i;\n }", "public function position()\r\n\t{\r\n\t\treturn ftell($this->getPointer());\r\n\t}", "function getPosition() {\n\t\t}", "public function getPosition(){ }", "public function getPosition() {\n }", "public function getCurrentPosition(): int;", "public function getPosCur()\n {\n return $this->pos_cur;\n }", "private function getXposition()\n {\n return $this->getPositionInstance()->getXposition();\n }", "public function getPosition() {\r\n return $this->posAxis;\r\n }", "function get_position( )\n\t{\n\t\treturn $this->latdeg.\";\".$this->londeg;\n\t}", "public function SeekPosition()\r\n\t{\r\n\t\treturn $this->active_row;\r\n\t}", "private function getCurrentPosition()\n {\n return $this->getPositionInstance()->getPosition();\n }", "function getOffset() ;", "public function getPositionXL()\n {\n // Scrutinizer thinks the following could return string. It is wrong.\n return array_search($this->position, self::POSITION_XLREF);\n }", "private function getPosition()\n {\n if (false === ($position = @ftell($this->getHandle()))) {\n $error = error_get_last();\n\n throw new RuntimeException($error['message']);\n }\n\n return $position;\n }", "function getX() {\n $pt = $this->getFirstPoint();\n if ( empty($pt) ) return FALSE;\n \n $poslist = $pt->getPosList();\n $cs = explode(' ',$poslist);\n return $cs[1];\n }", "public function get($position)\n\t{\n\t\tif($position < 0 || $position >= $this->length()) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$part = $this->parts[$position];\n\n\t\tif((string)(int)$part == $part) {\n\t\t\t$part = (int)$part;\n\t\t}\n\n\t\treturn $part;\n\t}", "public function getFunctionPosition();", "public function getValue(int $indexX, int $indexY): int;", "function pos(){\n return ftell($this->handle);\n }", "public function getPlacePosition()\n {\n return substr($this->place, 0, 1);\n }", "public function getPosition()\r\n {\r\n return ftell($this->handle);\r\n }", "public function getOffset()\n {\n if (! isset($this->offset)) {\n $this->offset = (int)$this->getXPath($this->getDom())->query($this->getOffsetQuery())->item(0)->value;\n }\n return $this->offset;\n }", "public function getOffset($value);", "public function getPosition()\n {\n if ($this->position === null) {\n throw new LogicException('Positional parameter position has not been set');\n }\n\n return $this->position;\n }", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function position();", "public function getArgumentPosition()\n {\n return $this->argument;\n }", "public function getOffset() {}", "public function getOffset() {}", "public function getOffset() {}", "private function _getTile($position){\r\n return $this->_structure[$position['x']][$position['y']];\r\n }", "public function getPosid()\n {\n return $this->posid;\n }", "public function getCoord(){\n return $this->coord;\n }", "public function getPosX();", "public static function positions() {\n\t\t\treturn self::get(self::position_index());\n\t\t}", "public function getTextPosition()\n\t{\n\t\treturn $this->textPosition;\n\t}", "public function getPosCurTmp()\n {\n return $this->pos_cur_tmp;\n }", "public function getOffset(): int;", "protected function coordinate()\n {\n $this->match(($this->lexer->isNextToken(Lexer::T_FLOAT) ? Lexer::T_FLOAT : Lexer::T_INTEGER));\n\n return $this->lexer->value();\n }", "public function getX()\r\n {\r\n //retourne la valeur saisie x\r\n return $this->x;\r\n }", "public function getPosition()\n {\n $positionName = $this->ipAddress;\n if ($this->city) {\n $placeNames = array($this->city);\n if ($this->country_name) {\n array_push($placeNames, $this->country_name);\n }\n $positionName = implode(\", \", $placeNames);\n } elseif ($this->latitude && $this->longitude) {\n $positionName = $this->latitude . \", \" . $this->longitude;\n }\n return $positionName;\n }", "public function getPosicion() {\n return $this->posicion;\n }", "function key() {\r\n return $this->_position;\r\n }", "public function key() {\n\t\treturn $this->position;\n\t}", "public function key() {\n\t\treturn $this->position;\n\t}", "public function key() {\n\t\treturn $this->position;\n\t}", "public function current()\n {\n return $this->activeValue[$this->position];\n }", "public function key() {\r\n\t\treturn $this->position;\r\n\t}", "public function getStartPosition()\n\t{\n\t\treturn -1;\n\t}", "function key()\n {\n return $this->_position;\n }", "public function key() {\n return $this->position;\n }", "public function calcPosValue($value) {\r\n return $this->horizontal ? $this->calcXPosValue($value) : $this->calcYPosValue($value);\r\n }", "public function key()\n {\n return $this->_position;\n }" ]
[ "0.8071875", "0.7956991", "0.78923684", "0.78696084", "0.78696084", "0.78696084", "0.78696084", "0.78696084", "0.7847471", "0.7841285", "0.77914447", "0.77914447", "0.7736089", "0.7732688", "0.7633124", "0.7623513", "0.76132035", "0.76132035", "0.7482768", "0.7481853", "0.7481853", "0.7481853", "0.7481853", "0.7481853", "0.7481853", "0.7481853", "0.7481853", "0.7481853", "0.7479512", "0.7479512", "0.7446699", "0.7446699", "0.74401", "0.7435479", "0.7389044", "0.7389044", "0.72936136", "0.72936136", "0.72936136", "0.72172606", "0.72085506", "0.71912867", "0.7180226", "0.7093118", "0.7077107", "0.7052996", "0.70415735", "0.7014037", "0.6934739", "0.6857095", "0.68552095", "0.6812133", "0.68104166", "0.67517936", "0.6725304", "0.67202437", "0.6680818", "0.6658205", "0.6618039", "0.65774524", "0.65654516", "0.6551311", "0.65456873", "0.6540965", "0.6538997", "0.6533092", "0.6517681", "0.6511387", "0.6506049", "0.6505101", "0.6505101", "0.6505101", "0.64983404", "0.6451228", "0.6424734", "0.6424734", "0.6424734", "0.6422451", "0.64131933", "0.63986576", "0.6395623", "0.63640946", "0.6355821", "0.63415694", "0.6336277", "0.6307371", "0.63038534", "0.62958443", "0.62818235", "0.6274284", "0.62660056", "0.62660056", "0.62660056", "0.62628716", "0.62288034", "0.6215096", "0.62070435", "0.6200689", "0.6169123", "0.61682725" ]
0.7647821
14
Set the value of position
public static function setPosition($position) { self::$position = $position; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPosition($value) {\n $this->_position = intval($value);\n }", "public function setPosition() {\n }", "public function testSetPosition ( ) {\n $this->markTestIncomplete (\n 'This test has not been implemented yet.'\n );\n\n }", "function set_position($newposition) {\n\t\t$this->position = $newposition;\n\t}", "public function assignPos(Position $position);", "public function setPos($pos)\n {\n $this->pos = $pos;\n }", "public function setPosition($position);", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function position($value) {\n return $this->setProperty('position', $value);\n }", "public function setPosition($value)\n {\n return $this->set(self::POSITION, $value);\n }", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function setPosition($v)\n {\n $this->position = $v;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setFeatureCvtermId($value);\n break;\n case 1:\n $this->setFeatureId($value);\n break;\n case 2:\n $this->setCvtermId($value);\n break;\n case 3:\n $this->setPubId($value);\n break;\n case 4:\n $this->setIsNot($value);\n break;\n case 5:\n $this->setRank($value);\n break;\n } // switch()\n }", "public static function setPosition(int $x, int $y) {}", "public function setPosition( $position )\n\t\t{\n\t\t\t$this->_position = $position;\n\t\t}", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setUfId($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setNome($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setSlug($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setLongitude($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setLatitude($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "function setPosition($s)\n\t{\n\t\t$this->Info['Position'] = $s;\n\t\tupdateTableByUser('Developer', 'Position', $s, $this->Username);\n\t}", "public function setPosition($position) {\n\t\t$this->position = $position;\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setOpPrimeId($value);\n break;\n case 1:\n $this->setOpId($value);\n break;\n case 2:\n $this->setOpPrimeLibelle($value);\n break;\n case 3:\n $this->setOpPrimeNumero($value);\n break;\n case 4:\n $this->setGdlArtId($value);\n break;\n case 5:\n $this->setOperationPrimeCurrencyId($value);\n break;\n case 6:\n $this->setOperationPrimeRRewardTypeId($value);\n break;\n case 7:\n $this->setOperationPrimeRRewardExpeditionModeId($value);\n break;\n case 8:\n $this->setOperationPrimeRRewardTransporterId($value);\n break;\n case 9:\n $this->setOperationPrimeFixedAmount($value);\n break;\n case 10:\n $this->setOperationPrimeProductPricePourcentage($value);\n break;\n case 11:\n $this->setOperationPrimeMaximumAmount($value);\n break;\n } // switch()\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setName($value);\n break;\n case 2:\n $this->setIsActive($value);\n break;\n case 3:\n $this->setIsClosed($value);\n break;\n case 4:\n $this->setFromDate($value);\n break;\n case 5:\n $this->setToDate($value);\n break;\n case 6:\n $this->setSortableRank($value);\n break;\n } // switch()\n }", "public function setPosition($position)\n {\n $this->position = $position;\n }", "public function setPosition($position)\n {\n $this->position = $position;\n }", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setCoParticipante($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setCoUsuarioElabora($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setCoForense($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setCoInformeRecomendaciones($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setCoInformeIncidente($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setCoInformeForense($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setCoInformeDepuracion($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setCoMantenimiento($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setCoDoumentoNormativo($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setIdBangunan($value);\n break;\n case 1:\n $this->setJenisPrasaranaId($value);\n break;\n case 2:\n $this->setSekolahId($value);\n break;\n case 3:\n $this->setIdTanah($value);\n break;\n case 4:\n $this->setPtkId($value);\n break;\n case 5:\n $this->setIdHapusBuku($value);\n break;\n case 6:\n $this->setKepemilikanSarprasId($value);\n break;\n case 7:\n $this->setKdKl($value);\n break;\n case 8:\n $this->setKdSatker($value);\n break;\n case 9:\n $this->setKdBrg($value);\n break;\n case 10:\n $this->setNup($value);\n break;\n case 11:\n $this->setKodeEselon1($value);\n break;\n case 12:\n $this->setNamaEselon1($value);\n break;\n case 13:\n $this->setKodeSubSatker($value);\n break;\n case 14:\n $this->setNamaSubSatker($value);\n break;\n case 15:\n $this->setNama($value);\n break;\n case 16:\n $this->setPanjang($value);\n break;\n case 17:\n $this->setLebar($value);\n break;\n case 18:\n $this->setNilaiPerolehanAset($value);\n break;\n case 19:\n $this->setJmlLantai($value);\n break;\n case 20:\n $this->setThnDibangun($value);\n break;\n case 21:\n $this->setLuasTapakBangunan($value);\n break;\n case 22:\n $this->setVolPondasiM3($value);\n break;\n case 23:\n $this->setVolSloopKolomBalokM3($value);\n break;\n case 24:\n $this->setPanjKudakudaM($value);\n break;\n case 25:\n $this->setVolKudakudaM3($value);\n break;\n case 26:\n $this->setPanjKasoM($value);\n break;\n case 27:\n $this->setPanjRengM($value);\n break;\n case 28:\n $this->setLuasTutupAtapM2($value);\n break;\n case 29:\n $this->setKdSatkerTanah($value);\n break;\n case 30:\n $this->setNmSatkerTanah($value);\n break;\n case 31:\n $this->setKdBrgTanah($value);\n break;\n case 32:\n $this->setNmBrgTanah($value);\n break;\n case 33:\n $this->setNupBrgTanah($value);\n break;\n case 34:\n $this->setTglSkPemakai($value);\n break;\n case 35:\n $this->setTglHapusBuku($value);\n break;\n case 36:\n $this->setKetBangunan($value);\n break;\n case 37:\n $this->setAsalData($value);\n break;\n case 38:\n $this->setCreateDate($value);\n break;\n case 39:\n $this->setLastUpdate($value);\n break;\n case 40:\n $this->setSoftDelete($value);\n break;\n case 41:\n $this->setLastSync($value);\n break;\n case 42:\n $this->setUpdaterId($value);\n break;\n } // switch()\n }", "public function setPosX($posX);", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setPothnbr($value);\n break;\n case 1:\n $this->setPothstat($value);\n break;\n case 2:\n $this->setPothrcptdate($value);\n break;\n case 3:\n $this->setIntbwhse($value);\n break;\n case 4:\n $this->setPothglpd($value);\n break;\n case 5:\n $this->setPothairship($value);\n break;\n case 6:\n $this->setPotherinreview($value);\n break;\n case 7:\n $this->setPothexchctry($value);\n break;\n case 8:\n $this->setPothexchrate($value);\n break;\n case 9:\n $this->setIntbwhseorig($value);\n break;\n case 10:\n $this->setPothlandcost($value);\n break;\n case 11:\n $this->setPothrcptnbr($value);\n break;\n case 12:\n $this->setPothlandbasedon($value);\n break;\n case 13:\n $this->setPothinvcnbr($value);\n break;\n case 14:\n $this->setPothinvcdate($value);\n break;\n case 15:\n $this->setPothfrtamt($value);\n break;\n case 16:\n $this->setPothmiscamt($value);\n break;\n case 17:\n $this->setDateupdtd($value);\n break;\n case 18:\n $this->setTimeupdtd($value);\n break;\n case 19:\n $this->setDummy($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setCoUsuario($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setNuCpf($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setDsPassword($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setNoUsuario($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setDsLogin($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setDtUltimoLogin($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setDsEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setCoPerfil($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setNuCelular($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setNuTelefone($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setStUsuario($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setPosition($newposition) {\n\t\t$this->position = $newposition;\n\t}", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setSubserial($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setAnnounce($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setMail($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setSerialId($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setRank($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setPrecinctId($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setGenreId($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setBroadcastId($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setCopyright($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setStatusId($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setRecorddate($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setPublicdate($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setEditorial1($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setEditorial2($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setEditorial3($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setAudio($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setDuration($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setNumView($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setComments($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setSekolahId($value);\n break;\n case 1:\n $this->setSemesterId($value);\n break;\n case 2:\n $this->setSumberAirId($value);\n break;\n case 3:\n $this->setSumberAirMinumId($value);\n break;\n case 4:\n $this->setCreateDate($value);\n break;\n case 5:\n $this->setLastUpdate($value);\n break;\n case 6:\n $this->setSoftDelete($value);\n break;\n case 7:\n $this->setLastSync($value);\n break;\n case 8:\n $this->setUpdaterId($value);\n break;\n case 9:\n $this->setKetersediaanAir($value);\n break;\n case 10:\n $this->setKecukupanAir($value);\n break;\n case 11:\n $this->setMinumSiswa($value);\n break;\n case 12:\n $this->setMemprosesAir($value);\n break;\n case 13:\n $this->setSiswaBawaAir($value);\n break;\n case 14:\n $this->setToiletSiswaLaki($value);\n break;\n case 15:\n $this->setToiletSiswaPerempuan($value);\n break;\n case 16:\n $this->setToiletSiswaKk($value);\n break;\n case 17:\n $this->setToiletSiswaKecil($value);\n break;\n case 18:\n $this->setJmlJambanLG($value);\n break;\n case 19:\n $this->setJmlJambanLTg($value);\n break;\n case 20:\n $this->setJmlJambanPG($value);\n break;\n case 21:\n $this->setJmlJambanPTg($value);\n break;\n case 22:\n $this->setJmlJambanLpG($value);\n break;\n case 23:\n $this->setJmlJambanLpTg($value);\n break;\n case 24:\n $this->setTempatCuciTangan($value);\n break;\n case 25:\n $this->setTempatCuciTanganRusak($value);\n break;\n case 26:\n $this->setASabunAirMengalir($value);\n break;\n case 27:\n $this->setJambanDifabel($value);\n break;\n case 28:\n $this->setTipeJamban($value);\n break;\n case 29:\n $this->setASediaPembalut($value);\n break;\n case 30:\n $this->setKegiatanCuciTangan($value);\n break;\n case 31:\n $this->setPembuanganAirLimbah($value);\n break;\n case 32:\n $this->setAKurasSeptitank($value);\n break;\n case 33:\n $this->setAMemilikiSolokan($value);\n break;\n case 34:\n $this->setATempatSampahKelas($value);\n break;\n case 35:\n $this->setATempatSampahTutupP($value);\n break;\n case 36:\n $this->setACerminJambanP($value);\n break;\n case 37:\n $this->setAMemilikiTps($value);\n break;\n case 38:\n $this->setATpsAngkutRutin($value);\n break;\n case 39:\n $this->setAAnggaranSanitasi($value);\n break;\n case 40:\n $this->setAMelibatkanSanitasiSiswa($value);\n break;\n case 41:\n $this->setAKemitraanSanDaerah($value);\n break;\n case 42:\n $this->setAKemitraanSanPuskesmas($value);\n break;\n case 43:\n $this->setAKemitraanSanSwasta($value);\n break;\n case 44:\n $this->setAKemitraanSanNonPem($value);\n break;\n case 45:\n $this->setKieGuruCuciTangan($value);\n break;\n case 46:\n $this->setKieGuruHaid($value);\n break;\n case 47:\n $this->setKieGuruPerawatanToilet($value);\n break;\n case 48:\n $this->setKieGuruKeamananPangan($value);\n break;\n case 49:\n $this->setKieGuruMinumAir($value);\n break;\n case 50:\n $this->setKieKelasCuciTangan($value);\n break;\n case 51:\n $this->setKieKelasHaid($value);\n break;\n case 52:\n $this->setKieKelasPerawatanToilet($value);\n break;\n case 53:\n $this->setKieKelasKeamananPangan($value);\n break;\n case 54:\n $this->setKieKelasMinumAir($value);\n break;\n case 55:\n $this->setKieToiletCuciTangan($value);\n break;\n case 56:\n $this->setKieToiletHaid($value);\n break;\n case 57:\n $this->setKieToiletPerawatanToilet($value);\n break;\n case 58:\n $this->setKieToiletKeamananPangan($value);\n break;\n case 59:\n $this->setKieToiletMinumAir($value);\n break;\n case 60:\n $this->setKieSelasarCuciTangan($value);\n break;\n case 61:\n $this->setKieSelasarHaid($value);\n break;\n case 62:\n $this->setKieSelasarPerawatanToilet($value);\n break;\n case 63:\n $this->setKieSelasarKeamananPangan($value);\n break;\n case 64:\n $this->setKieSelasarMinumAir($value);\n break;\n case 65:\n $this->setKieUksCuciTangan($value);\n break;\n case 66:\n $this->setKieUksHaid($value);\n break;\n case 67:\n $this->setKieUksPerawatanToilet($value);\n break;\n case 68:\n $this->setKieUksKeamananPangan($value);\n break;\n case 69:\n $this->setKieUksMinumAir($value);\n break;\n case 70:\n $this->setKieKantinCuciTangan($value);\n break;\n case 71:\n $this->setKieKantinHaid($value);\n break;\n case 72:\n $this->setKieKantinPerawatanToilet($value);\n break;\n case 73:\n $this->setKieKantinKeamananPangan($value);\n break;\n case 74:\n $this->setKieKantinMinumAir($value);\n break;\n } // switch()\n }", "public function setPosition(\\PB_Vec3 $value=null)\n {\n return $this->set(self::POSITION, $value);\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setIdmontacargas($value);\n break;\n case 1:\n $this->setIdsucursal($value);\n break;\n case 2:\n $this->setMontacargasModelo($value);\n break;\n case 3:\n $this->setMontacargasMarca($value);\n break;\n case 4:\n $this->setMontacargasC($value);\n break;\n case 5:\n $this->setMontacargasK($value);\n break;\n case 6:\n $this->setMontacargasP($value);\n break;\n case 7:\n $this->setMontacargasT($value);\n break;\n case 8:\n $this->setMontacargasE($value);\n break;\n case 9:\n $this->setMontacargasVolts($value);\n break;\n case 10:\n $this->setMontacargasAmperaje($value);\n break;\n case 11:\n $this->setMontacargasNombre($value);\n break;\n case 12:\n $this->setMontacargasNumserie($value);\n break;\n case 13:\n $this->setMontacargasComprador($value);\n break;\n case 14:\n $this->setMontacargasCiclosmant($value);\n break;\n case 15:\n $this->setMontacargasCiclosiniciales($value);\n break;\n case 16:\n $this->setMontacargasBaja($value);\n break;\n } // switch()\n }", "public function setPosition(?OnenotePatchInsertPosition $value): void {\n $this->getBackingStore()->set('position', $value);\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setSekolahId($value);\n break;\n case 1:\n $this->setKategoriTkId($value);\n break;\n case 2:\n $this->setKlasifikasiLembagaId($value);\n break;\n case 3:\n $this->setSumberDanaSekolahId($value);\n break;\n case 4:\n $this->setFasilitasLayananId($value);\n break;\n case 5:\n $this->setJadwalPmtas($value);\n break;\n case 6:\n $this->setLembagaPengangkatId($value);\n break;\n case 7:\n $this->setJadwalDdtk($value);\n break;\n case 8:\n $this->setFreqParenting($value);\n break;\n case 9:\n $this->setBentukLembagaId($value);\n break;\n case 10:\n $this->setJadwalKesehatan($value);\n break;\n case 11:\n $this->setIzinPaud($value);\n break;\n case 12:\n $this->setPencatatanDdtk($value);\n break;\n case 13:\n $this->setRujukanDdtk($value);\n break;\n case 14:\n $this->setPelaksanaanParenting($value);\n break;\n case 15:\n $this->setParentingKpo($value);\n break;\n case 16:\n $this->setParentingKelas($value);\n break;\n case 17:\n $this->setParentingKegiatan($value);\n break;\n case 18:\n $this->setParentingKonsultasi($value);\n break;\n case 19:\n $this->setParentingKunjungan($value);\n break;\n case 20:\n $this->setParentingLainnya($value);\n break;\n case 21:\n $this->setNilk($value);\n break;\n case 22:\n $this->setNilm($value);\n break;\n case 23:\n $this->setNoPenetapanPnf($value);\n break;\n case 24:\n $this->setTanggalPenetapanPnf($value);\n break;\n case 25:\n $this->setCreateDate($value);\n break;\n case 26:\n $this->setLastUpdate($value);\n break;\n case 27:\n $this->setSoftDelete($value);\n break;\n case 28:\n $this->setLastSync($value);\n break;\n case 29:\n $this->setUpdaterId($value);\n break;\n } // switch()\n }", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setVenueid($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setAddress($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setAddress2($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setCity($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setProvince($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setCountry($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setLatitude($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setLongitude($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setPhone($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setName($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setDescription($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setWebsite($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setTwitter($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setFacebook($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setRssfeed($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setClosed($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setLastfmid($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setSlug($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setHasphotos($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setSubmittedbyuser($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function set_position($position){\n $position = (array)$position;\n if(count($position) === 2){\n $this->posX = $position['x'];\n $this->posY = $position['y'];\n }\n return null;\n }", "public function setPositionAttribute($input)\n {\n $this->attributes['position'] = $input ? $input : null;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setPhadtype($value);\n break;\n case 1:\n $this->setPhadid($value);\n break;\n case 2:\n $this->setPhadsubid($value);\n break;\n case 3:\n $this->setPhadsubidseq($value);\n break;\n case 4:\n $this->setPhadcont($value);\n break;\n case 5:\n $this->setPhadintl($value);\n break;\n case 6:\n $this->setPhadtelenbr($value);\n break;\n case 7:\n $this->setPhadteleext($value);\n break;\n case 8:\n $this->setPhadintlnbr($value);\n break;\n case 9:\n $this->setPhadintlext($value);\n break;\n case 10:\n $this->setPhadfaxnbr($value);\n break;\n case 11:\n $this->setPhadifaxnbr($value);\n break;\n case 12:\n $this->setPhadcellnbr($value);\n break;\n case 13:\n $this->setPhadicellnbr($value);\n break;\n case 14:\n $this->setPhadhomenbr($value);\n break;\n case 15:\n $this->setPhadihomenbr($value);\n break;\n case 16:\n $this->setPhadwebaddr($value);\n break;\n case 17:\n $this->setPhademailaddr($value);\n break;\n case 18:\n $this->setPhadname($value);\n break;\n case 19:\n $this->setPhadcontname($value);\n break;\n case 20:\n $this->setDateupdtd($value);\n break;\n case 21:\n $this->setTimeupdtd($value);\n break;\n case 22:\n $this->setDummy($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setShnttype($value);\n break;\n case 1:\n $this->setShnttypedesc($value);\n break;\n case 2:\n $this->setOehhnbr($value);\n break;\n case 3:\n $this->setShntyear($value);\n break;\n case 4:\n $this->setOedhline($value);\n break;\n case 5:\n $this->setShntlotser($value);\n break;\n case 6:\n $this->setShntpickticket($value);\n break;\n case 7:\n $this->setShntpackticket($value);\n break;\n case 8:\n $this->setShntinvoice($value);\n break;\n case 9:\n $this->setShntacknow($value);\n break;\n case 10:\n $this->setShntseq($value);\n break;\n case 11:\n $this->setShntnote($value);\n break;\n case 12:\n $this->setShntkey2($value);\n break;\n case 13:\n $this->setShntform($value);\n break;\n case 14:\n $this->setDateupdtd($value);\n break;\n case 15:\n $this->setTimeupdtd($value);\n break;\n case 16:\n $this->setDummy($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setPartieId($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setReplicaPostId($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setType($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setTitle($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setUrl($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setText($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setPhotoFile($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setPhotoUrl($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setQuote($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setQuoteAuthor($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setLinkTitle($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setLinkUrl($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setLinkImage($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setVideoUrl($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setTotalIndex($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setBestBadge1($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setBestBadge2($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setIsPublished($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setIsFeatured($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setCommentsCount($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setCreatedAt($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setUpdatedAt($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setid($value);\n break;\n case 1:\n $this->setcreateDatetime($value);\n break;\n case 2:\n $this->setcreatePersonId($value);\n break;\n case 3:\n $this->setmodifyDatetime($value);\n break;\n case 4:\n $this->setmodifyPersonId($value);\n break;\n case 5:\n $this->setdeleted($value);\n break;\n case 6:\n $this->setClass($value);\n break;\n case 7:\n $this->setgroupId($value);\n break;\n case 8:\n $this->setcode($value);\n break;\n case 9:\n $this->setname($value);\n break;\n case 10:\n $this->settitle($value);\n break;\n case 11:\n $this->setflatCode($value);\n break;\n case 12:\n $this->setsex($value);\n break;\n case 13:\n $this->setage($value);\n break;\n case 14:\n $this->setageBu($value);\n break;\n case 15:\n $this->setageBc($value);\n break;\n case 16:\n $this->setageEu($value);\n break;\n case 17:\n $this->setageEc($value);\n break;\n case 18:\n $this->setoffice($value);\n break;\n case 19:\n $this->setshowInForm($value);\n break;\n case 20:\n $this->setgenTimeTable($value);\n break;\n case 21:\n $this->setserviceId($value);\n break;\n case 22:\n $this->setquotaTypeId($value);\n break;\n case 23:\n $this->setcontext($value);\n break;\n case 24:\n $this->setamount($value);\n break;\n case 25:\n $this->setamountEvaluation($value);\n break;\n case 26:\n $this->setdefaultStatus($value);\n break;\n case 27:\n $this->setdefaultDirectionDate($value);\n break;\n case 28:\n $this->setdefaultPlannedEndDate($value);\n break;\n case 29:\n $this->setdefaultEndDate($value);\n break;\n case 30:\n $this->setdefaultExecPersonId($value);\n break;\n case 31:\n $this->setdefaultPersonInEvent($value);\n break;\n case 32:\n $this->setdefaultPersonInEditor($value);\n break;\n case 33:\n $this->setmaxOccursInEvent($value);\n break;\n case 34:\n $this->setshowTime($value);\n break;\n case 35:\n $this->setisMes($value);\n break;\n case 36:\n $this->setnomenclativeServiceId($value);\n break;\n case 37:\n $this->setisPreferable($value);\n break;\n case 38:\n $this->setprescribedTypeId($value);\n break;\n case 39:\n $this->setsheduleId($value);\n break;\n case 40:\n $this->setisRequiredCoordination($value);\n break;\n case 41:\n $this->setisRequiredTissue($value);\n break;\n case 42:\n $this->settestTubeTypeId($value);\n break;\n case 43:\n $this->setjobTypeId($value);\n break;\n case 44:\n $this->setmnem($value);\n break;\n } // switch()\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setSekolahId($value);\n break;\n case 1:\n $this->setSemesterId($value);\n break;\n case 2:\n $this->setIdRuang($value);\n break;\n case 3:\n $this->setHari($value);\n break;\n case 4:\n $this->setBelKe01($value);\n break;\n case 5:\n $this->setBelKe02($value);\n break;\n case 6:\n $this->setBelKe03($value);\n break;\n case 7:\n $this->setBelKe04($value);\n break;\n case 8:\n $this->setBelKe05($value);\n break;\n case 9:\n $this->setBelKe06($value);\n break;\n case 10:\n $this->setBelKe07($value);\n break;\n case 11:\n $this->setBelKe08($value);\n break;\n case 12:\n $this->setBelKe09($value);\n break;\n case 13:\n $this->setBelKe10($value);\n break;\n case 14:\n $this->setBelKe11($value);\n break;\n case 15:\n $this->setBelKe12($value);\n break;\n case 16:\n $this->setBelKe13($value);\n break;\n case 17:\n $this->setBelKe14($value);\n break;\n case 18:\n $this->setBelKe15($value);\n break;\n case 19:\n $this->setBelKe16($value);\n break;\n case 20:\n $this->setBelKe17($value);\n break;\n case 21:\n $this->setBelKe18($value);\n break;\n case 22:\n $this->setBelKe19($value);\n break;\n case 23:\n $this->setBelKe20($value);\n break;\n case 24:\n $this->setCreateDate($value);\n break;\n case 25:\n $this->setLastUpdate($value);\n break;\n case 26:\n $this->setSoftDelete($value);\n break;\n case 27:\n $this->setLastSync($value);\n break;\n case 28:\n $this->setUpdaterId($value);\n break;\n } // switch()\n }", "function getPosition() {\n\t\t}", "public function set_position(INT $_position){\n $this->_position = $_position;\n\n return $this;\n }", "#[@fromDia(xpath= 'dia:attribute[@name=\"pos\"]/dia:point/@val', value= 'array')]\n public function setPosition($position) {\n $this->setPoint('pos', $position);\n }", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setDisplayName($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setRealName($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setLocation($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setWebpage($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setCountry($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setPostalCode($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setBirthday($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setGravatarAddress($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setInfo($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setPlatform($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setExperienceScore($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setUpVotes($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setDownVotes($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setIsGuest($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setIsAdmin($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setTodayVotes($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setEmailOn($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setLastEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setCreatedAt($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setUpdatedAt($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "function setPositionType( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->PositionType = $value;\n }", "public function setStartPosition($value) {\r\n $this->startPosition = $this->setDoubleProperty($this->startPosition, $value);\r\n }", "public function setByPosition ($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setCalendarUid ($value);\n break;\n case 1:\n $this->setCalendarHolidayName ($value);\n break;\n case 2:\n $this->setCalendarHolidayStart ($value);\n break;\n case 3:\n $this->setCalendarHolidayEnd ($value);\n break;\n } // switch()\n }", "public function setNewsfeedPosition($value)\n\t{\n\t\t$this->newsfeed_position = $value;\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setCode($value);\n break;\n case 2:\n $this->setCategory($value);\n break;\n case 3:\n $this->setAddress($value);\n break;\n case 4:\n $this->setAddress2($value);\n break;\n case 5:\n $this->setZipcode($value);\n break;\n case 6:\n $this->setCity($value);\n break;\n case 7:\n $this->setGeoCoordinateX($value);\n break;\n case 8:\n $this->setGeoCoordinateY($value);\n break;\n case 9:\n $this->setDistanceCamping($value);\n break;\n case 10:\n $this->setImage($value);\n break;\n case 11:\n $this->setPriority($value);\n break;\n case 12:\n $this->setTel($value);\n break;\n case 13:\n $this->setFax($value);\n break;\n case 14:\n $this->setEmail($value);\n break;\n case 15:\n $this->setWebsite($value);\n break;\n case 16:\n $this->setCreatedAt($value);\n break;\n case 17:\n $this->setUpdatedAt($value);\n break;\n case 18:\n $this->setActive($value);\n break;\n } // switch()\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setRefNo($value);\n break;\n case 2:\n $this->setUniquekeyid($value);\n break;\n case 3:\n $this->setCustomerId($value);\n break;\n case 4:\n $this->setAccountNo($value);\n break;\n case 5:\n $this->setServiceType($value);\n break;\n case 6:\n $this->setServiceDistrictId($value);\n break;\n case 7:\n $this->setBillingCycle($value);\n break;\n case 8:\n $this->setDueDate($value);\n break;\n case 9:\n $this->setBillingFrom($value);\n break;\n case 10:\n $this->setBillingTo($value);\n break;\n case 11:\n $this->setBillDate($value);\n break;\n case 12:\n $this->setRate($value);\n break;\n case 13:\n $this->setMeternumber($value);\n break;\n case 14:\n $this->setBillingmethod($value);\n break;\n case 15:\n $this->setDateoflastreading($value);\n break;\n case 16:\n $this->setDateofcurrentreading($value);\n break;\n case 17:\n $this->setDaysusage($value);\n break;\n case 18:\n $this->setLastmeterreading($value);\n break;\n case 19:\n $this->setCurrentmeterreading($value);\n break;\n case 20:\n $this->setUnitsconsumed($value);\n break;\n case 21:\n $this->setLastpaymentamount($value);\n break;\n case 22:\n $this->setLastpaymentdate($value);\n break;\n case 23:\n $this->setMetermaintenancecharge($value);\n break;\n case 24:\n $this->setDiscounts($value);\n break;\n case 25:\n $this->setOthercharges($value);\n break;\n case 26:\n $this->setPenaltycharges($value);\n break;\n case 27:\n $this->setTaxcharges($value);\n break;\n case 28:\n $this->setCharges($value);\n break;\n case 29:\n $this->setRoutinecharges($value);\n break;\n case 30:\n $this->setBillservicerate($value);\n break;\n case 31:\n $this->setBuildingtype($value);\n break;\n case 32:\n $this->setRoute($value);\n break;\n case 33:\n $this->setUsagetype($value);\n break;\n case 34:\n $this->setServiceCharge($value);\n break;\n case 35:\n $this->setPreviousBalance($value);\n break;\n case 36:\n $this->setPaymentReceived($value);\n break;\n case 37:\n $this->setLastPaymentReceivedDate($value);\n break;\n case 38:\n $this->setCurrentCharge($value);\n break;\n case 39:\n $this->setTotalDue($value);\n break;\n case 40:\n $this->setInvoiceNo($value);\n break;\n case 41:\n $this->setReceiptNo($value);\n break;\n case 42:\n $this->setDateCreated($value);\n break;\n case 43:\n $this->setCreator($value);\n break;\n case 44:\n $this->setStatus($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setUsername($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setPassword($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setPoints($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setCreatedAt($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setLastActivityAt($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setType($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setHidden($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setName($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setGender($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setHometown($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setHomePhone($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setMobilePhone($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setBirthdate($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setAddress($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setRelationshipStatus($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setShowEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setShowGender($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setShowHometown($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setShowHomePhone($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setShowMobilePhone($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setShowBirthdate($value);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\t$this->setShowAddress($value);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\t$this->setShowRelationshipStatus($value);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\t$this->setPasswordRecoverKey($value);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\t$this->setCookieKey($value);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\t$this->setCredit($value);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\t$this->setInvisible($value);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\t$this->setNotification($value);\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\t$this->setPhoneNumber($value);\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\t$this->setLogin($value);\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\t$this->setCreditCard($value);\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\t$this->setCreditCardToken($value);\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\t$this->setFirstCharge($value);\n\t\t\t\tbreak;\n\t\t\tcase 35:\n\t\t\t\t$this->setWhereFindUs($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setIDCommande($value);\n break;\n case 1:\n $this->setRFCommande($value);\n break;\n case 2:\n $this->setIDSociete_FK($value);\n break;\n case 3:\n $this->setTMode($value);\n break;\n case 4:\n $this->setQuantite($value);\n break;\n case 5:\n $this->setAPrix($value);\n break;\n case 6:\n $this->setADelai($value);\n break;\n case 7:\n $this->setDTECommande($value);\n break;\n case 8:\n $this->setPriorite($value);\n break;\n case 9:\n $this->setCMDNote($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setMcode($value);\n break;\n case 2:\n $this->setNameF($value);\n break;\n case 3:\n $this->setNameT($value);\n break;\n case 4:\n $this->setNameE($value);\n break;\n case 5:\n $this->setPosid($value);\n break;\n case 6:\n $this->setMdate($value);\n break;\n case 7:\n $this->setBirthday($value);\n break;\n case 8:\n $this->setNational($value);\n break;\n case 9:\n $this->setIdTax($value);\n break;\n case 10:\n $this->setIdCard($value);\n break;\n case 11:\n $this->setIdCardImg($value);\n break;\n case 12:\n $this->setIdCardImgDate($value);\n break;\n case 13:\n $this->setZip($value);\n break;\n case 14:\n $this->setHomeT($value);\n break;\n case 15:\n $this->setOfficeT($value);\n break;\n case 16:\n $this->setMobile($value);\n break;\n case 17:\n $this->setMcodeAcc($value);\n break;\n case 18:\n $this->setBonusrec($value);\n break;\n case 19:\n $this->setBankcode($value);\n break;\n case 20:\n $this->setBranch($value);\n break;\n case 21:\n $this->setAccType($value);\n break;\n case 22:\n $this->setAccNo($value);\n break;\n case 23:\n $this->setAccNoImg($value);\n break;\n case 24:\n $this->setAccNoImgDate($value);\n break;\n case 25:\n $this->setAccName($value);\n break;\n case 26:\n $this->setAccProv($value);\n break;\n case 27:\n $this->setSvCode($value);\n break;\n case 28:\n $this->setSpCode($value);\n break;\n case 29:\n $this->setSpName($value);\n break;\n case 30:\n $this->setSpCode2($value);\n break;\n case 31:\n $this->setSpName2($value);\n break;\n case 32:\n $this->setUpaCode($value);\n break;\n case 33:\n $this->setUpaName($value);\n break;\n case 34:\n $this->setLr($value);\n break;\n case 35:\n $this->setComplete($value);\n break;\n case 36:\n $this->setCompdate($value);\n break;\n case 37:\n $this->setModate($value);\n break;\n case 38:\n $this->setUsercode($value);\n break;\n case 39:\n $this->setNameB($value);\n break;\n case 40:\n $this->setSex($value);\n break;\n case 41:\n $this->setAge($value);\n break;\n case 42:\n $this->setOccupation($value);\n break;\n case 43:\n $this->setStatus($value);\n break;\n case 44:\n $this->setMarName($value);\n break;\n case 45:\n $this->setMarAge($value);\n break;\n case 46:\n $this->setEmail($value);\n break;\n case 47:\n $this->setBeneficiaries($value);\n break;\n case 48:\n $this->setRelation($value);\n break;\n case 49:\n $this->setDistrictid($value);\n break;\n case 50:\n $this->setAmphurid($value);\n break;\n case 51:\n $this->setProvinceid($value);\n break;\n case 52:\n $this->setFax($value);\n break;\n case 53:\n $this->setInvCode($value);\n break;\n case 54:\n $this->setUid($value);\n break;\n case 55:\n $this->setOid($value);\n break;\n case 56:\n $this->setPosCur($value);\n break;\n case 57:\n $this->setPosCur1($value);\n break;\n case 58:\n $this->setPosCur2($value);\n break;\n case 59:\n $this->setPosCur3($value);\n break;\n case 60:\n $this->setPosCur4($value);\n break;\n case 61:\n $this->setPosCurTmp($value);\n break;\n case 62:\n $this->setRposCur4($value);\n break;\n case 63:\n $this->setPosCur3Date($value);\n break;\n case 64:\n $this->setMemdesc($value);\n break;\n case 65:\n $this->setCmp($value);\n break;\n case 66:\n $this->setCmp2($value);\n break;\n case 67:\n $this->setCmp3($value);\n break;\n case 68:\n $this->setCcmp($value);\n break;\n case 69:\n $this->setCcmp2($value);\n break;\n case 70:\n $this->setCcmp3($value);\n break;\n case 71:\n $this->setAddress($value);\n break;\n case 72:\n $this->setStreet($value);\n break;\n case 73:\n $this->setBuilding($value);\n break;\n case 74:\n $this->setVillage($value);\n break;\n case 75:\n $this->setSoi($value);\n break;\n case 76:\n $this->setEwallet($value);\n break;\n case 77:\n $this->setEatoship($value);\n break;\n case 78:\n $this->setEcom($value);\n break;\n case 79:\n $this->setBmdate1($value);\n break;\n case 80:\n $this->setBmdate2($value);\n break;\n case 81:\n $this->setBmdate3($value);\n break;\n case 82:\n $this->setCbmdate1($value);\n break;\n case 83:\n $this->setCbmdate2($value);\n break;\n case 84:\n $this->setCbmdate3($value);\n break;\n case 85:\n $this->setOnline($value);\n break;\n case 86:\n $this->setCnameF($value);\n break;\n case 87:\n $this->setCnameT($value);\n break;\n case 88:\n $this->setCnameE($value);\n break;\n case 89:\n $this->setCnameB($value);\n break;\n case 90:\n $this->setCbirthday($value);\n break;\n case 91:\n $this->setCnational($value);\n break;\n case 92:\n $this->setCidTax($value);\n break;\n case 93:\n $this->setCidCard($value);\n break;\n case 94:\n $this->setCaddress($value);\n break;\n case 95:\n $this->setCbuilding($value);\n break;\n case 96:\n $this->setCvillage($value);\n break;\n case 97:\n $this->setCstreet($value);\n break;\n case 98:\n $this->setCsoi($value);\n break;\n case 99:\n $this->setCzip($value);\n break;\n case 100:\n $this->setChomeT($value);\n break;\n case 101:\n $this->setCofficeT($value);\n break;\n case 102:\n $this->setCmobile($value);\n break;\n case 103:\n $this->setCfax($value);\n break;\n case 104:\n $this->setCsex($value);\n break;\n case 105:\n $this->setCemail($value);\n break;\n case 106:\n $this->setCdistrictid($value);\n break;\n case 107:\n $this->setCamphurid($value);\n break;\n case 108:\n $this->setCprovinceid($value);\n break;\n case 109:\n $this->setInameF($value);\n break;\n case 110:\n $this->setInameT($value);\n break;\n case 111:\n $this->setIrelation($value);\n break;\n case 112:\n $this->setIphone($value);\n break;\n case 113:\n $this->setIidCard($value);\n break;\n case 114:\n $this->setStatusDoc($value);\n break;\n case 115:\n $this->setStatusExpire($value);\n break;\n case 116:\n $this->setStatusTerminate($value);\n break;\n case 117:\n $this->setTerminateDate($value);\n break;\n case 118:\n $this->setStatusSuspend($value);\n break;\n case 119:\n $this->setSuspendDate($value);\n break;\n case 120:\n $this->setStatusBlacklist($value);\n break;\n case 121:\n $this->setStatusAto($value);\n break;\n case 122:\n $this->setSletter($value);\n break;\n case 123:\n $this->setSinvCode($value);\n break;\n case 124:\n $this->setTxtoption($value);\n break;\n case 125:\n $this->setSetregis($value);\n break;\n case 126:\n $this->setSlr($value);\n break;\n case 127:\n $this->setLocationbase($value);\n break;\n case 128:\n $this->setCidMobile($value);\n break;\n case 129:\n $this->setBewallet($value);\n break;\n case 130:\n $this->setBvoucher($value);\n break;\n case 131:\n $this->setVoucher($value);\n break;\n case 132:\n $this->setManager($value);\n break;\n case 133:\n $this->setMtype($value);\n break;\n case 134:\n $this->setMtype1($value);\n break;\n case 135:\n $this->setMtype2($value);\n break;\n case 136:\n $this->setMvat($value);\n break;\n case 137:\n $this->setUidbase($value);\n break;\n case 138:\n $this->setExpDate($value);\n break;\n case 139:\n $this->setHeadCode($value);\n break;\n case 140:\n $this->setPvL($value);\n break;\n case 141:\n $this->setPvC($value);\n break;\n case 142:\n $this->setHpvL($value);\n break;\n case 143:\n $this->setHpvC($value);\n break;\n case 144:\n $this->setPvLNextmonth($value);\n break;\n case 145:\n $this->setPvCNextmonth($value);\n break;\n case 146:\n $this->setPvLLastmonth1($value);\n break;\n case 147:\n $this->setPvCLastmonth1($value);\n break;\n case 148:\n $this->setPvLLastmonth2($value);\n break;\n case 149:\n $this->setPvCLastmonth2($value);\n break;\n case 150:\n $this->setRcodeStar($value);\n break;\n case 151:\n $this->setBunit($value);\n break;\n case 152:\n $this->setProvince($value);\n break;\n case 153:\n $this->setLineId($value);\n break;\n case 154:\n $this->setFacebookName($value);\n break;\n case 155:\n $this->setTypeCom($value);\n break;\n case 156:\n $this->setExpPos($value);\n break;\n case 157:\n $this->setExpPos60($value);\n break;\n case 158:\n $this->setTripPrivate($value);\n break;\n case 159:\n $this->setTripTeam($value);\n break;\n case 160:\n $this->setMyfile1($value);\n break;\n case 161:\n $this->setMyfile2($value);\n break;\n case 162:\n $this->setClineId($value);\n break;\n case 163:\n $this->setCfacebookName($value);\n break;\n case 164:\n $this->setProfileImg($value);\n break;\n case 165:\n $this->setAtocom($value);\n break;\n case 166:\n $this->setHpv($value);\n break;\n } // switch()\n\n return $this;\n }", "protected function tempPosition()\n {\n $this->{$this->getPositionColumn()} = static::$insanePosition;\n $this->save();\n }", "function position( $x, $y )\n\t{\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}", "public function SetPosition($position)\n\t{\n\t\t$pos = str_split($position);\n\t\t\n\t\tif(in_array(strtoupper(strtoupper($pos[0])), $this->horizontal) && in_array($pos[1], $this->verticle))\n\t\t{\n\t\t\t$this->position['horizontal'] = strtoupper($pos[0]);\n\t\t\t$this->position['verticle'] = $pos[1];\n\t\t}\n\t}", "public function setPosition($var)\n {\n GPBUtil::checkInt64($var);\n $this->position = $var;\n\n return $this;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setName($value);\n break;\n case 2:\n $this->setOpendate($value);\n break;\n case 3:\n $this->setClosedate($value);\n break;\n case 4:\n $this->setStatus($value);\n break;\n case 5:\n $this->setInfotext($value);\n break;\n case 6:\n $this->setForbook($value);\n break;\n case 7:\n $this->setUserSys($value);\n break;\n case 8:\n $this->setConfigSys($value);\n break;\n case 9:\n $this->setSplit($value);\n break;\n case 10:\n $this->setParentnode($value);\n break;\n case 11:\n $this->setSort($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setPosition(int $value) : Page\n {\n\n if ($this->data['position'] !== $value) {\n $this->data['position'] = $value;\n $this->setModified('position');\n }\n\n return $this;\n }", "public function setPosition($position)\n {\n return $this->setData(self::POSITION, $position);\n }", "abstract function incrementPosition();", "public function set_position($param)\n\t{\n\t\t$this->position = (string)$param;\n\t\treturn $this;\n\t}", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setCoEquipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setCoRegion($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setCoNegocio($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setCoDivision($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setCoTipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setCoCustodio($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setTxEtiquetaSti($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setCoEstado($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setTxNombreEquipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setTxFunsionEquipo($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setCoSo($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setTxEtiquetaActivo($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setTxSerialHardware($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setTxMarcaHardware($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setTxModeloHardware($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setCoCiudad($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setCoEdificio($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setTxDireccionUbicacion($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setTxDetalleUbicacion($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setCoCentroDato($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setCoRack($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setTxUbicacionLlave($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setInRespaldoAutomatizado($value);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\t$this->setInBloqueoInactividad($value);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\t$this->setInAdiministradoresPersonalizados($value);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\t$this->setInPoliticaPassword($value);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\t$this->setInSincronizacionReloj($value);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\t$this->setInMonitoreado($value);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\t$this->setInInfActualizada($value);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\t$this->setInLogActivo($value);\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\t$this->setCoNivelCriticidad($value);\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\t$this->setTxObservaciones($value);\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\t$this->setTxRutaRespaldoConfiguraciones($value);\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\t$this->setCoNumInventario($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setSessionid($value);\n break;\n case 1:\n $this->setRecno($value);\n break;\n case 2:\n $this->setDate($value);\n break;\n case 3:\n $this->setTime($value);\n break;\n case 4:\n $this->setType($value);\n break;\n case 5:\n $this->setCustid($value);\n break;\n case 6:\n $this->setShiptoid($value);\n break;\n case 7:\n $this->setCustname($value);\n break;\n case 8:\n $this->setOrderno($value);\n break;\n case 9:\n $this->setCustpo($value);\n break;\n case 10:\n $this->setCustref($value);\n break;\n case 11:\n $this->setStatus($value);\n break;\n case 12:\n $this->setOrderdate($value);\n break;\n case 13:\n $this->setCareof($value);\n break;\n case 14:\n $this->setQuotdate($value);\n break;\n case 15:\n $this->setInvdate($value);\n break;\n case 16:\n $this->setShipdate($value);\n break;\n case 17:\n $this->setRevdate($value);\n break;\n case 18:\n $this->setExpdate($value);\n break;\n case 19:\n $this->setHasdocuments($value);\n break;\n case 20:\n $this->setHastracking($value);\n break;\n case 21:\n $this->setSubtotal($value);\n break;\n case 22:\n $this->setSalestax($value);\n break;\n case 23:\n $this->setFreight($value);\n break;\n case 24:\n $this->setMisccost($value);\n break;\n case 25:\n $this->setOrdertotal($value);\n break;\n case 26:\n $this->setHasnotes($value);\n break;\n case 27:\n $this->setEditord($value);\n break;\n case 28:\n $this->setError($value);\n break;\n case 29:\n $this->setErrormsg($value);\n break;\n case 30:\n $this->setSconame($value);\n break;\n case 31:\n $this->setShipname($value);\n break;\n case 32:\n $this->setShipaddress($value);\n break;\n case 33:\n $this->setShipaddress2($value);\n break;\n case 34:\n $this->setShipcity($value);\n break;\n case 35:\n $this->setShipstate($value);\n break;\n case 36:\n $this->setShipzip($value);\n break;\n case 37:\n $this->setShipcountry($value);\n break;\n case 38:\n $this->setContact($value);\n break;\n case 39:\n $this->setPhintl($value);\n break;\n case 40:\n $this->setPhone($value);\n break;\n case 41:\n $this->setExtension($value);\n break;\n case 42:\n $this->setFaxnbr($value);\n break;\n case 43:\n $this->setEmail($value);\n break;\n case 44:\n $this->setReleasenbr($value);\n break;\n case 45:\n $this->setShipviacd($value);\n break;\n case 46:\n $this->setShipviadesc($value);\n break;\n case 47:\n $this->setPricecode($value);\n break;\n case 48:\n $this->setPricecodedesc($value);\n break;\n case 49:\n $this->setPricedisp($value);\n break;\n case 50:\n $this->setTaxcode($value);\n break;\n case 51:\n $this->setTaxcodedesc($value);\n break;\n case 52:\n $this->setTaxcodedisp($value);\n break;\n case 53:\n $this->setTermcode($value);\n break;\n case 54:\n $this->setTermtype($value);\n break;\n case 55:\n $this->setTermcodedesc($value);\n break;\n case 56:\n $this->setRqstdate($value);\n break;\n case 57:\n $this->setShipcom($value);\n break;\n case 58:\n $this->setSp1($value);\n break;\n case 59:\n $this->setSp1name($value);\n break;\n case 60:\n $this->setSp2($value);\n break;\n case 61:\n $this->setSp2name($value);\n break;\n case 62:\n $this->setSp2disp($value);\n break;\n case 63:\n $this->setSp3($value);\n break;\n case 64:\n $this->setSp3name($value);\n break;\n case 65:\n $this->setSp3disp($value);\n break;\n case 66:\n $this->setFob($value);\n break;\n case 67:\n $this->setDeliverydesc($value);\n break;\n case 68:\n $this->setWhse($value);\n break;\n case 69:\n $this->setCardnumber($value);\n break;\n case 70:\n $this->setCardexpire($value);\n break;\n case 71:\n $this->setCardcode($value);\n break;\n case 72:\n $this->setCardapproval($value);\n break;\n case 73:\n $this->setTotalcost($value);\n break;\n case 74:\n $this->setTotaldiscount($value);\n break;\n case 75:\n $this->setPaymenttype($value);\n break;\n case 76:\n $this->setSrcdatefrom($value);\n break;\n case 77:\n $this->setSrcdatethru($value);\n break;\n case 78:\n $this->setBillname($value);\n break;\n case 79:\n $this->setBilladdress($value);\n break;\n case 80:\n $this->setBilladdress2($value);\n break;\n case 81:\n $this->setBilladdress3($value);\n break;\n case 82:\n $this->setBillcountry($value);\n break;\n case 83:\n $this->setBillcity($value);\n break;\n case 84:\n $this->setBillstate($value);\n break;\n case 85:\n $this->setBillzip($value);\n break;\n case 86:\n $this->setPrntfmt($value);\n break;\n case 87:\n $this->setPrntfmtdisp($value);\n break;\n case 88:\n $this->setDummy($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setPosition($x, $y, $unit = null);", "function setOffset($value) {\n $this->offset = $value;\n }", "public function setRelativePosition($value) {\r\n $this->relativePosition = $this->setDoubleProperty($this->relativePosition, $value);\r\n }", "public function set(\n int $position,\n int $value\n )\n {\n if ($position > count($this->memory)) {\n throw new MemoryOutOfRangeException('Position '.$position.' is out of range for our machine');\n }\n\n $this->memory[$position] = $value;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setBiblioId($value);\n break;\n case 1:\n $this->setTitle($value);\n break;\n case 2:\n $this->setSor($value);\n break;\n case 3:\n $this->setEdition($value);\n break;\n case 4:\n $this->setIsbn_issn($value);\n break;\n case 5:\n $this->setPublisherId($value);\n break;\n case 6:\n $this->setPublish_year($value);\n break;\n case 7:\n $this->setCollation($value);\n break;\n case 8:\n $this->setSeries_title($value);\n break;\n case 9:\n $this->setCall_number($value);\n break;\n case 10:\n $this->setLanguageId($value);\n break;\n case 11:\n $this->setSource($value);\n break;\n case 12:\n $this->setPublishPlaceId($value);\n break;\n case 13:\n $this->setClassification($value);\n break;\n case 14:\n $this->setNotes($value);\n break;\n case 15:\n $this->setImage($value);\n break;\n case 16:\n $this->setFile_att($value);\n break;\n case 17:\n $this->setOpac_hide($value);\n break;\n case 18:\n $this->setPromoted($value);\n break;\n case 19:\n $this->setLabels($value);\n break;\n case 20:\n $this->setFrequencyId($value);\n break;\n case 21:\n $this->setSpec_detail_info($value);\n break;\n case 22:\n $this->setInput_date($value);\n break;\n case 23:\n $this->setLast_update($value);\n break;\n case 24:\n $this->setUid($value);\n break;\n } // switch()\n\n return $this;\n }", "public function setPositionUnits($value) {\r\n if ($this->positionUnits != $value) {\r\n $this->positionUnits = $value;\r\n $this->invalidate();\r\n }\r\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setArticleId($value);\n break;\n case 1:\n $this->setDescription($value);\n break;\n case 2:\n $this->setPrice($value);\n break;\n case 3:\n $this->setCreation($value);\n break;\n case 4:\n $this->setVisible($value);\n break;\n case 5:\n $this->setShapeId($value);\n break;\n case 6:\n $this->setCakeTypeId($value);\n break;\n } // switch()\n\n return $this;\n }", "public function position();", "function getPosition() ;", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setPerfilId($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setEnderecoId($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setCargoId($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setDepartamentoId($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setMatricula($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setNome($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setDni($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setDataNascimento($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setDataContratacao($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setCelular($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setTelefone($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setToken($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setNomeUsuario($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setSenha($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setTokenSenha($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setTokenFirebase($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setDataRescisao($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setAtivo($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setTipoAcesso($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setEstadoCivil($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setNivelAcesso($value);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\t$this->setUsuarioValidado($value);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\t$this->setSexo($value);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\t$this->setDataCadastro($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function set($offset, $value);", "public function setIndex($position);", "public function getPosition() {}", "public function getPosition() {}", "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setSlug($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setName($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setCommentaire($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setSubject($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setTemplateId($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setContent($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setPreparedContent($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setTextContent($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setPreparedTextContent($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setStatus($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setFromName($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setFromEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setScheduledAt($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setScheduleType($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setTestType($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setTestUserList($value);\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\t$this->setTarget($value);\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\t$this->setReplyToEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\t$this->setReturnPathEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\t$this->setReturnPathServer($value);\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\t$this->setReturnPathLogin($value);\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\t$this->setReturnPathPassword($value);\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\t$this->setIsArchived($value);\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\t$this->setGoogleAnalyticsEnabled($value);\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\t$this->setGoogleAnalyticsSource($value);\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\t$this->setGoogleAnalyticsMedium($value);\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\t$this->setGoogleAnalyticsCampaignType($value);\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\t$this->setGoogleAnalyticsCampaignContent($value);\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\t$this->setGoogleAnalyticsContent($value);\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\t$this->setLitmusTestId($value);\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\t$this->setWebTrackerEnabled($value);\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\t$this->setCreatedAt($value);\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\t$this->setCreatedBy($value);\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\t$this->setUpdatedAt($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "public function setPosition(int $position, string $letter): void\n {\n $this->rotors[$position]->setPosition($this->alphabet->toEnigma($letter));\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setId($value);\n break;\n case 1:\n $this->setNickname($value);\n break;\n case 2:\n $this->setEmail($value);\n break;\n case 3:\n $this->setAge($value);\n break;\n case 4:\n $this->setSex($value);\n break;\n case 5:\n $this->setCreatedAt($value);\n break;\n case 6:\n $this->setUpdatedAt($value);\n break;\n } // switch()\n\n return $this;\n }", "public function at(int $position);", "public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}", "public function addPos( $value){\n return $this->_add(1, $value);\n }", "public function getPosition();", "public function getPosition();", "public function getPosition();", "private function _setPos(int $rowNr, int $pos)\n {\n $this->curPos = $pos;\n $this->board[$rowNr][$pos] = 1;\n }", "public function get_position(){ return $this->_position;}", "public function setPosition(int $position): self\n {\n $this->position = $position;\n $this->message .= \" at position {$position}\";\n\n return $this;\n }", "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setProdId($value);\n break;\n case 1:\n $this->setProdPriceId($value);\n break;\n case 2:\n $this->setProdName($value);\n break;\n case 3:\n $this->setProdAlt1($value);\n break;\n case 4:\n $this->setProdAlt2($value);\n break;\n case 5:\n $this->setProdAlt3($value);\n break;\n case 6:\n $this->setProdAlt4($value);\n break;\n case 7:\n $this->setProdCode($value);\n break;\n case 8:\n $this->setProdCategory($value);\n break;\n case 9:\n $this->setProdCategoryShipping($value);\n break;\n case 10:\n $this->setProdWriteup($value);\n break;\n case 11:\n $this->setProdLength($value);\n break;\n case 12:\n $this->setProdWingspan($value);\n break;\n case 13:\n $this->setProdHeight($value);\n break;\n case 14:\n $this->setProdScale($value);\n break;\n case 15:\n $this->setProdLinks($value);\n break;\n case 16:\n $this->setProdLinkdescription($value);\n break;\n case 17:\n $this->setProdFront($value);\n break;\n case 18:\n $this->setProdKeywords($value);\n break;\n case 19:\n $this->setProdKeywordsWriteup($value);\n break;\n case 20:\n $this->setProdTitle($value);\n break;\n case 21:\n $this->setProdDescription($value);\n break;\n case 22:\n $this->setProdGeneral($value);\n break;\n case 23:\n $this->setProdEra($value);\n break;\n case 24:\n $this->setProdCompany($value);\n break;\n case 25:\n $this->setProdRelated($value);\n break;\n case 26:\n $this->setProdRelatedPa($value);\n break;\n case 27:\n $this->setProdRelatedM3($value);\n break;\n case 28:\n $this->setProdRelated2($value);\n break;\n case 29:\n $this->setProdSaveas($value);\n break;\n case 30:\n $this->setProdAircraftreg($value);\n break;\n case 31:\n $this->setMb($value);\n break;\n case 32:\n $this->setPa($value);\n break;\n case 33:\n $this->setM3($value);\n break;\n } // switch()\n\n return $this;\n }", "public function set(int $index, $value);", "public function getPosition(){ }", "public function setZPosition($value) {\r\n $this->zPosition = $this->setDoubleProperty($this->zPosition, $value);\r\n }", "public function getPosition() {\n }", "abstract public function setCurrentPoint(int $x, int $y);" ]
[ "0.85995626", "0.7892546", "0.78184056", "0.77510685", "0.7714829", "0.76802343", "0.7610456", "0.7452887", "0.7452887", "0.7452887", "0.7452887", "0.7371104", "0.73442537", "0.7319233", "0.7310481", "0.7294445", "0.72566026", "0.724761", "0.71895117", "0.71864283", "0.70772195", "0.70740515", "0.6988929", "0.6988929", "0.69529426", "0.6910282", "0.69043046", "0.6874972", "0.68653864", "0.68563485", "0.68491375", "0.6829859", "0.6818779", "0.6814259", "0.68065983", "0.6802549", "0.679478", "0.6761127", "0.67322844", "0.67286885", "0.6707882", "0.67038083", "0.67007226", "0.6700027", "0.6693268", "0.6682268", "0.6680703", "0.667754", "0.6666362", "0.66554093", "0.6647843", "0.66446346", "0.6640567", "0.663679", "0.66281605", "0.66178447", "0.6609045", "0.6588682", "0.6587773", "0.65538293", "0.65525484", "0.6549193", "0.65187144", "0.6500395", "0.6484181", "0.6472086", "0.6471168", "0.64679056", "0.6464893", "0.64385426", "0.6425188", "0.640785", "0.6392943", "0.63834715", "0.6361085", "0.6350862", "0.6348933", "0.6337652", "0.63256234", "0.63187397", "0.63069266", "0.63069266", "0.6285283", "0.62501484", "0.62331986", "0.6193004", "0.6190498", "0.6188953", "0.6178796", "0.6178796", "0.6178796", "0.61665964", "0.614897", "0.6148439", "0.6081583", "0.6068806", "0.60676885", "0.6048973", "0.60308474", "0.6025194" ]
0.71453696
20