query
stringlengths 10
8.11k
| document
stringlengths 17
398k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
Grid Row JS Callback | public function getRowClickCallback()
{
$js = "
function (grid, event) {
var trElement = Event.findElement(event, 'tr');
var isInput = Event.element(event).tagName == 'INPUT';
var input = $('".$this->getInput()."');
if (trElement) {
var checkbox = Element.select(trElement, 'input');
$$(\"#".$this->getId()." input[type=checkbox][class=checkbox]\").each(function(e){
if (e.name != \"check_all\"){
if (e.checked && e != checkbox[0]){
e.checked = '';
}
}
});
if (checkbox[0]) {
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
if(checked){
input.value = checkbox[0].value;
}else{
var vl = checkbox[0].value;
if(input.value.search(vl) == 0){
if(input.value == vl) input.value = '';
input.value = input.value.replace(vl+', ','');
}else{
input.value = input.value.replace(', '+ vl,'');
}
}
checkbox[0].checked = checked;
grid.reloadParams['selected[]'] = input.value.split( ', ');
}
}
}
";
return $js;
} | [
"protected function getRowCallbackFunction(){}",
"public function getRowClickCallback()\n {\n $chooserJsObject = $this->getId();\n $js = '\n function (grid, event) {\n var trElement = Event.findElement(event, \"tr\");\n var blockId = trElement.down(\"td\").innerHTML.replace(/^\\s+|\\s+$/g,\"\");\n var blockTitle = trElement.down(\"td\").next().innerHTML;\n ' .\n $chooserJsObject .\n '.setElementValue(blockId);\n ' .\n $chooserJsObject .\n '.setElementLabel(blockTitle);\n ' .\n $chooserJsObject .\n '.close();\n }\n ';\n return $js;\n }",
"public function getRowClickCallback()\n {\n $chooserJsObject = $this->getId();\n $js = '\n function (grid, event) {\n var trElement = Event.findElement(event, \"tr\");\n var blockId = trElement.down(\"td\").innerHTML.replace(/^\\s+|\\s+$/g,\"\");\n var blockTitle = trElement.down(\"td\").next().innerHTML; '\n . $chooserJsObject . '.setElementValue(blockId); '\n . $chooserJsObject . '.setElementLabel(blockTitle); '\n . $chooserJsObject . '.close();\n }';\n return $js;\n }",
"public function getRowClickCallback()\n {\n $chooserJsObject = $this->getId();\n $js = '\n function (grid, event) {\n var trElement = Event.findElement(event, \"tr\");\n var lookbookName = trElement.down(\"td\").next().innerHTML;\n var lookbookId = trElement.down(\"td\").innerHTML.replace(/^\\s+|\\s+$/g,\"\");\n ' .\n $chooserJsObject .\n '.setElementValue(lookbookId);\n ' .\n $chooserJsObject .\n '.setElementLabel(lookbookName);\n ' .\n $chooserJsObject .\n '.close();\n }\n ';\n return $js;\n }",
"public function getRowClickCallback()\n {\n return '\n function (grid, event) {\n if(!grid.selBannersIds){\n grid.selBannersIds = {};\n }\n\n var trElement = Event.findElement(event, \"tr\");\n var isInput = Event.element(event).tagName == \\'INPUT\\';\n var inputs = Element.select(trElement, \\'input\\');\n var checkbox = inputs[0];\n var position = inputs[1].value || 1;\n var checked = isInput ? checkbox.checked : !checkbox.checked;\n checkbox.checked = checked;\n var bannerId = checkbox.value;\n\n if(checked){\n if(Object.keys(grid.selBannersIds).indexOf(bannerId) < 0){\n grid.selBannersIds[bannerId] = position;\n }\n }\n else{\n delete(grid.selBannersIds[bannerId]);\n }\n\n var idsclone = Object.clone(grid.selBannersIds);\n var bans = Object.keys(grid.selBannersIds);\n var pos = Object.values(grid.selBannersIds).sort(sortNumeric);\n var banners = [];\n var k = 0;\n for(var j = 0; j < pos.length; j++){\n for(var i = 0; i < bans.length; i++){\n if(idsclone[bans[i]] == pos[j]){\n banners[k] = bans[i];\n k++;\n delete(idsclone[bans[i]]);\n break;\n }\n }\n }\n $(\\'' .\n $this->_elementValueId .\n '\\').value = banners.join(\\',\\');\n grid.reloadParams = {};\n grid.reloadParams[\\'selected_banners[]\\'] = banners;\n }\n ';\n }",
"public function getRowClickCallback()\n {\n return '';\n }",
"function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}",
"public function rowPreview()\n {\n }",
"public function hook_row_index($column_index,&$column_value) {\n //Your code here\n }",
"function formatRow(){\n $this->hook('formatRow');\n }",
"public function aggregateListRow()\n\t{\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"public function hook_row_index($column_index,&$column_value) {\n //Your code here\n }",
"public function processRow($row);",
"public function the_row() {\n the_row();\n }",
"public function changeRowData(&$row){}",
"public function hook_row_index($column_index,&$column_value) {\t \n\t \t//Your code here\n\t }",
"abstract public function processRow($row);",
"public function hook_row_index(&$html,$data) {\n //Your code here\n\n }",
"public function callbackBeforeRenderActionButtons($each_row)\n\t{\n\t\t// code...\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Gets the 'a2lix_translation_form.default.listener.translationsforms' service. This service is shared. This method always returns the same instance of the service. | protected function getA2lixTranslationForm_Default_Listener_TranslationsformsService()
{
return $this->services['a2lix_translation_form.default.listener.translationsforms'] = new \A2lix\TranslationFormBundle\Form\EventListener\TranslationsFormsListener();
} | [
"protected function getA2lixTranslationForm_Default_Type_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.type.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsType($this->get('a2lix_translation_form.default.listener.translations'), array(0 => 'en', 1 => 'fr'), true);\n }",
"protected function getA2lixTranslationForm_Default_Type_TranslationsService()\n {\n return $this->services['a2lix_translation_form.default.type.translations'] = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslationsType($this->get('a2lix_translation_form.default.listener.translations'), $this->get('a2lix_translation_form.default.service.parameter_locale_provider'));\n }",
"protected function getA2lixTranslationForm_Default_Service_TranslationService()\n {\n return $this->services['a2lix_translation_form.default.service.translation'] = new \\A2lix\\TranslationFormBundle\\TranslationForm\\TranslationForm($this->get('form.registry'), $this->get('doctrine'));\n }",
"protected function getA2lixTranslationForm_Default_Type_TranslatedentityService()\n {\n $this->services['a2lix_translation_form.default.type.translatedentity'] = $instance = new \\A2lix\\TranslationFormBundle\\Form\\Type\\TranslatedEntityType();\n\n $instance->setRequest(NULL);\n\n return $instance;\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => false, 'resource_files' => array('sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sr_Latn.yml')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pl.yml')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.he.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.he.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.he.yml')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ro.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ro.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ro.yml')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.et.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.et.yml')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fa.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fa.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fa.yml')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ar.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ar.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ar.yml')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cy.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.gl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.th.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.th.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.th.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.th.yml')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ru.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ru.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ru.yml')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sv.yml')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.da.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.da.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.da.yml')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fi.yml')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lb.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lb.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.zh_CN.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.zh_CN.yml')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.nl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.nl.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nl.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nl.yml')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.fr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.fr.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.fr.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.fr.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.fr.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.fr.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.fr.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.fr.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.fr.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.fr.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.fr.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.fr.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.fr.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.fr.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.fr.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/messages.fr.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.fr.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.fr.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.fr.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.fr.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/messages.fr.xlf'), 23 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.fr.xliff'), 24 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.fr.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.mn.xlf')), 'af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.af.xlf'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.af.yml')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hr.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hr.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hr.yml')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.tr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.tr.yml')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.az.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.az.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.no.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.no.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hy.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sq.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.zh_TW.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.en.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.en.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.en.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.en.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.en.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.en.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.en.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.en.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.en.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.en.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.en.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.en.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.en.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.en.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.en.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.en.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.en.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.en.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.en.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.en.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.en.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lv.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lv.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lv.yml')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt.xlf'), 2 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.pt.xliff'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt.yml')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ca.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ca.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ca.yml')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.lt.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.lt.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.lt.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.lt.yml')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.id.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.id.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.id.yml')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.eu.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eu.yml')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.bg.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.bg.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.bg.yml')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.ja.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ja.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ja.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ja.yml')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.nn.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sl.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sl.yml')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.uk.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.uk.yml')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.cs.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.cs.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.cs.yml')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.el.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.el.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.el.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.el.yml')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.vi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.vi.xlf'), 2 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.vi.yml'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.vi.yml')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.de.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.de.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.de.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.de.yml')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.it.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.it.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.it.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.it.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.it.yml')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.sk.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.sk.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.sk.yml')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.hu.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.hu.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.hu.yml')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.es.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.es.xlf'), 3 => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle/Resources/translations/alertify.es.xliff'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.es.yml'), 5 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.es.yml'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/victoire.es.xliff'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Resources/translations/messages.es.xliff'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Resources/translations/victoire.es.xliff'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/victoire.es.xliff'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Resources/translations/messages.es.xliff'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Resources/translations/victoire.es.xliff'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Resources/translations/victoire.es.xliff'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle/Resources/translations/victoire.es.xliff'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Resources/translations/victoire.es.xliff'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/victoire.es.xliff'), 16 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Resources/translations/messages.es.xliff'), 17 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Resources/translations/victoire.es.xliff'), 18 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Resources/translations/victoire.es.xliff'), 19 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle/Resources/translations/victoire.es.xliff'), 20 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Resources/translations/victoire.es.xliff'), 21 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Resources/translations/victoire.es.xliff'), 22 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Resources/translations/victoire.es.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Form/Resources/translations/validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.pt_BR.yml'), 4 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.pt_BR.yml')), 'pt_PT' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf')), 'ky' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.ky.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.ky.yml')), 'eo' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.eo.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.eo.yml')), 'nb' => array(0 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/validators.nb.yml'), 1 => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/translations/FOSUserBundle.nb.yml')))), array());\n\n $instance->setConfigCacheFactory($this->get('config_cache_factory'));\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->get('translator.default')) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator.default']) ? $this->services['translator.default'] : $this->getTranslator_DefaultService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }",
"protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator.default'), $this->get('request_stack'));\n }",
"protected function getTranslator_DefaultService()\n {\n return $this->services['translator.default'] = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator($this, $this->get('translator.selector'), array('translation.loader.php' => 'php', 'translation.loader.yml' => 'yml', 'translation.loader.xliff' => 'xliff'), array('cache_dir' => '/var/www/htdocs/symfony/2.0.4-fp/app/cache/prod/translations', 'debug' => true), NULL);\n }",
"protected function getVictoireI18n_TranslatorService()\n {\n return $this->services['victoire_i18n.translator'] = new \\Victoire\\Bundle\\I18nBundle\\Translation\\Translator($this, ${($_ = isset($this->services['translator.selector']) ? $this->services['translator.selector'] : $this->getTranslator_SelectorService()) && false ?: '_'}, array(), array('cache_dir' => (__DIR__.'/translations%'), 'debug' => false));\n }",
"public function createComponentTranslatorForm()\n {\n return $this->translatorFactory->create();\n }",
"protected function getForm_Type_LanguageService()\n {\n return $this->services['form.type.language'] = new \\Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType();\n }",
"protected function getTranslatorService()\n {\n return $this->services['translator'] = new \\Symfony\\Component\\Translation\\DataCollectorTranslator(($this->privates['translator.default'] ?? $this->getTranslator_DefaultService()));\n }",
"protected function getTranslator_DefaultService()\n {\n return $this->services['translator.default'] = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator($this, $this->get('translator.selector'), array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini')), array('cache_dir' => '/Users/pete.robinson/Sites/wam/image/tests/SupportFiles/app/../../../tmp/cache/translations', 'debug' => true));\n }",
"protected function getSonata_Core_Form_Type_TranslatableChoiceService()\n {\n @trigger_error('The \"sonata.core.form.type.translatable_choice\" service is deprecated since 2.2.0 and will be removed in 4.0.', E_USER_DEPRECATED);\n\n return $this->services['sonata.core.form.type.translatable_choice'] = new \\Sonata\\CoreBundle\\Form\\Type\\TranslatableChoiceType(($this->services['translator'] ?? $this->getTranslatorService()));\n }",
"protected function getSylius_Translator_ListenerService()\n {\n return $this->services['sylius.translator.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->get('translator')) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'});\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\MessageSelector(), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => true, 'resource_files' => array('mn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.mn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.mn.xlf')), 'az' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.az.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.az.xlf')), 'cs' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cs.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.cs.xlf')), 'uk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.uk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.uk.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Latn.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.bg.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.bg.xlf')), 'th' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.th.xlf')), 'ca' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ca.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ca.xlf')), 'sk' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sk.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sk.xlf')), 'ro' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ro.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ro.xlf')), 'pt_BR' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt_BR.xlf')), 'id' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.id.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.id.xlf')), 'hu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hu.xlf')), 'fi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fi.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fi.xlf')), 'da' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.da.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.da.xlf')), 'gl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.gl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.gl.xlf')), 'es' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.es.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.es.xlf')), 'it' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.it.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.it.xlf')), 'sl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sl.xlf')), 'de' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.de.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.de.xlf')), 'et' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.et.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.et.xlf')), 'pt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pt.xlf')), 'eu' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.eu.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.eu.xlf')), 'hr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hr.xlf')), 'he' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.he.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.he.xlf')), 'zh_CN' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.zh_CN.xlf')), 'en' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.en.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.en.xlf')), 'ja' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ja.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ja.xlf')), 'el' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.el.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.el.xlf')), 'sv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sv.xlf')), 'pl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.pl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.pl.xlf')), 'fa' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fa.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fa.xlf')), 'hy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.hy.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.hy.xlf')), 'fr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.fr.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.fr.xlf')), 'zh_TW' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.zh_TW.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.sr_Cyrl.xlf')), 'sq' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.sq.xlf')), 'ru' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ru.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ru.xlf')), 'lt' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lt.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lt.xlf')), 'tr' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.tr.xlf')), 'ar' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.ar.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.ar.xlf')), 'lb' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lb.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lb.xlf')), 'cy' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.cy.xlf')), 'af' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.af.xlf')), 'lv' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.lv.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.lv.xlf')), 'nl' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nl.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.nl.xlf')), 'nn' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.nn.xlf')), 'vi' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.vi.xlf')), 'no' => array(0 => ($this->targetDirs[3].'/vendor/symfony/validator/Resources/translations/validators.no.xlf'), 1 => ($this->targetDirs[3].'/vendor/symfony/form/Resources/translations/validators.no.xlf')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->get('config_cache_factory')) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\MessageSelector(), 'es', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.af.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.af.yml')), 'ar' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ar.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ar.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ar.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ar.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ar.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ar.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ar.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ar.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ar.yml'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ar.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ar.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ar.yml')), 'az' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.az.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.az.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.az.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.az.xliff')), 'bg' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.bg.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.bg.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.bg.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bg.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.bg.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.bg.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.bg.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.bg.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.bg.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.bg.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.bg.yml')), 'ca' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ca.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ca.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ca.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ca.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ca.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ca.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ca.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ca.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ca.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ca.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ca.xliff')), 'cs' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cs.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.cs.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.cs.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.cs.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.cs.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.cs.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.cs.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.cs.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.cs.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.cs.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.cs.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.cs.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.cs.yml')), 'cy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.da.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.da.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.da.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.da.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.da.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.da.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.da.xliff')), 'de' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.de.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.de.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.de.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.de.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.de.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.de.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.de.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.de.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.de.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.de.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.de.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.de.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.de.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.de.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.de.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.de.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.de.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.de.xliff'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.de.yml'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.de.yml')), 'el' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.el.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.el.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.el.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.el.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.el.yml')), 'en' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.en.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.en.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.en.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.en.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.en.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.en.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.en.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.en.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.en.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.en.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.en.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.en.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.en.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.en.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.en.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.en.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.en.xliff'), 19 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\DataDogAuditBundle.en.xlf'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.en.yml'), 21 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.en.yml'), 22 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.en.xliff')), 'es' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.es.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.es.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.es.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.es.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.es.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.es.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.es.xliff'), 7 => ($this->targetDirs[3].'\\\\app/Resources/SonataUserBundle/translations\\\\SonataUserBundle.es.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.es.xliff'), 9 => ($this->targetDirs[3].'\\\\app/Resources/SonataMediaBundle/translations\\\\SonataMediaBundle.es.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.es.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.es.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.es.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.es.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.es.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.es.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.es.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.es.xliff'), 18 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\DataDogAuditBundle.es.xlf'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.es.yml'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.es.yml'), 21 => ($this->targetDirs[3].'\\\\app/Resources/GregwarCaptchaBundle/translations\\\\GregwarCaptchaBundle.es.xliff'), 22 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.es.xliff'), 23 => ($this->targetDirs[3].'\\\\app/Resources/translations\\\\messages.es.xliff')), 'et' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.et.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.et.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.et.yml')), 'eu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.eu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.eu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eu.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.eu.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.eu.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.eu.xliff')), 'fa' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fa.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fa.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fa.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.fa.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fa.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fa.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fa.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fa.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fa.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fa.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.fa.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.fa.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.fa.xliff')), 'fi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fi.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fi.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fi.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fi.xliff')), 'fr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.fr.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fr.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.fr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.fr.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fr.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fr.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.fr.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.fr.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.fr.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.fr.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.fr.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.fr.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.fr.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.fr.xliff'), 19 => ($this->targetDirs[3].'\\\\app/Resources/DataDogAuditBundle/translations\\\\messages.fr.xlf'), 20 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.fr.yml'), 21 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.fr.yml')), 'gl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.gl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.gl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.gl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.gl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.gl.xliff')), 'he' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.he.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.he.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.he.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.he.yml')), 'hr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.hr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hr.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.hr.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.hr.xliff')), 'hu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hu.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.hu.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hu.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hu.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.hu.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.hu.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hu.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hu.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.hu.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.hu.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.hu.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.hu.xliff')), 'hy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hy.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.id.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.id.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.id.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.id.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.id.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.id.yml')), 'it' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.it.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.it.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.it.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.it.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.it.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.it.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.it.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.it.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.it.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.it.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.it.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.it.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.it.xliff'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.it.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.it.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.it.xliff'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.it.yml'), 19 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.it.yml')), 'ja' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ja.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ja.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ja.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ja.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ja.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ja.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ja.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ja.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ja.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.ja.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ja.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ja.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ja.yml')), 'lb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lb.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lb.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.lb.xliff')), 'lt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lt.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.lt.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lt.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lt.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.lt.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.lt.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lt.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lt.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.lt.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.lt.yml')), 'lv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lv.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.mn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.mn.xlf')), 'nb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nb.yml')), 'nl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.nl.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nl.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.nl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.nl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.nl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.nl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.nl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.nl.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.nl.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.nl.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.nl.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.nl.xliff'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.nl.yml'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.nl.yml')), 'nn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.no.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.no.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.no.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.no.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.no.xliff')), 'pl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.pl.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pl.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.pl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.pl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pl.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.pl.yml'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.pl.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.pl.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.pl.yml')), 'pt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pt.xliff'), 5 => ($this->targetDirs[3].'\\\\app/Resources/SonataUserBundle/translations\\\\SonataUserBundle.pt.xliff'), 6 => ($this->targetDirs[3].'\\\\app/Resources/SonataMediaBundle/translations\\\\SonataMediaBundle.pt.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pt.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.pt.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.pt.xliff'), 12 => ($this->targetDirs[3].'\\\\app/Resources/AppBundle/translations\\\\AppBundle.pt.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.pt_BR.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt_BR.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt_BR.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.pt_BR.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.pt_BR.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt_BR.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt_BR.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.pt_BR.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.pt_BR.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.pt_BR.yml'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.pt_BR.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.pt_BR.yml')), 'ro' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ro.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ro.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ro.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ro.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ro.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ro.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ro.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ro.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ro.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ro.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ro.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ro.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ro.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ro.yml'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ro.yml')), 'ru' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ru.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ru.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ru.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ru.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ru.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ru.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.ru.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.ru.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ru.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ru.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.ru.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.ru.xliff'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\classification-bundle\\\\src/Resources/translations\\\\SonataClassificationBundle.ru.xliff'), 13 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.ru.xliff'), 14 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.ru.yml'), 15 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.ru.yml'), 16 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.ru.xliff'), 17 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.ru.yml'), 18 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.ru.yml')), 'sk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sk.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sk.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.sk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sk.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sk.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.sk.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.sk.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sk.yml'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.sk.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sk.xliff')), 'sl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.sl.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.sl.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sl.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sl.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\formatter-bundle\\\\src/Resources/translations\\\\SonataFormatterBundle.sl.xliff'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.sl.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sl.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sl.xliff')), 'sq' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Cyrl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sr_Cyrl.xliff')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sr_Latn.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.sr_Latn.xliff')), 'sv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.sv.xliff'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sv.yml'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.sv.yml')), 'th' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.th.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.th.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.th.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.th.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.th.xliff')), 'tr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.tr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.tr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.tr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.tr.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.tr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.tr.yml'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.tr.yml')), 'uk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.uk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.uk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.uk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.uk.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\media-bundle\\\\src/Resources/translations\\\\SonataMediaBundle.uk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.uk.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.uk.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.uk.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\mopa\\\\bootstrap-bundle\\\\Mopa\\\\Bundle\\\\BootstrapBundle/Resources/translations\\\\pagination.uk.yml'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.uk.xliff'), 11 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.uk.yml'), 12 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.uk.yml')), 'vi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.vi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.vi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.vi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.vi.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.zh_CN.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.zh_CN.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.zh_CN.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.zh_CN.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\datagrid-bundle\\\\src/Resources/translations\\\\SonataDatagridBundle.zh_CN.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.zh_CN.xliff'), 9 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\gregwar_captcha.zh_CN.yml'), 10 => ($this->targetDirs[3].'\\\\vendor\\\\gregwar\\\\captcha-bundle/Resources/translations\\\\validators.zh_CN.yml')), 'zh_TW' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_TW.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\user-bundle/Resources/translations\\\\SonataUserBundle.zh_TW.xliff')), 'pt_PT' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ua.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\lexik\\\\form-filter-bundle/Resources/translations\\\\LexikFormFilterBundle.ua.yml')), 'ky' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.ky.xliff'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ky.yml'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ky.yml')), 'sw' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\knplabs\\\\knp-paginator-bundle/Resources/translations\\\\KnpPaginatorBundle.sw.xliff')), 'bn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn.yml')), 'bn_BD' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn_BD.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn_BD.yml')), 'eo' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eo.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eo.yml')), 'sv_SE' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sv_SE.xliff')), 'oc' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\white-october\\\\pagerfanta-bundle/Resources/translations\\\\pagerfanta.oc.xliff')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->get('config_cache_factory')) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'es'));\n\n return $instance;\n }",
"protected function getTranslator_DefaultService()\n {\n $this->services['translator.default'] = $instance = new \\Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('translation.loader.csv' => function () {\n return ${($_ = isset($this->services['translation.loader.csv']) ? $this->services['translation.loader.csv'] : $this->get('translation.loader.csv')) && false ?: '_'};\n }, 'translation.loader.dat' => function () {\n return ${($_ = isset($this->services['translation.loader.dat']) ? $this->services['translation.loader.dat'] : $this->get('translation.loader.dat')) && false ?: '_'};\n }, 'translation.loader.ini' => function () {\n return ${($_ = isset($this->services['translation.loader.ini']) ? $this->services['translation.loader.ini'] : $this->get('translation.loader.ini')) && false ?: '_'};\n }, 'translation.loader.json' => function () {\n return ${($_ = isset($this->services['translation.loader.json']) ? $this->services['translation.loader.json'] : $this->get('translation.loader.json')) && false ?: '_'};\n }, 'translation.loader.mo' => function () {\n return ${($_ = isset($this->services['translation.loader.mo']) ? $this->services['translation.loader.mo'] : $this->get('translation.loader.mo')) && false ?: '_'};\n }, 'translation.loader.php' => function () {\n return ${($_ = isset($this->services['translation.loader.php']) ? $this->services['translation.loader.php'] : $this->get('translation.loader.php')) && false ?: '_'};\n }, 'translation.loader.po' => function () {\n return ${($_ = isset($this->services['translation.loader.po']) ? $this->services['translation.loader.po'] : $this->get('translation.loader.po')) && false ?: '_'};\n }, 'translation.loader.qt' => function () {\n return ${($_ = isset($this->services['translation.loader.qt']) ? $this->services['translation.loader.qt'] : $this->get('translation.loader.qt')) && false ?: '_'};\n }, 'translation.loader.res' => function () {\n return ${($_ = isset($this->services['translation.loader.res']) ? $this->services['translation.loader.res'] : $this->get('translation.loader.res')) && false ?: '_'};\n }, 'translation.loader.xliff' => function () {\n return ${($_ = isset($this->services['translation.loader.xliff']) ? $this->services['translation.loader.xliff'] : $this->get('translation.loader.xliff')) && false ?: '_'};\n }, 'translation.loader.yml' => function () {\n return ${($_ = isset($this->services['translation.loader.yml']) ? $this->services['translation.loader.yml'] : $this->get('translation.loader.yml')) && false ?: '_'};\n })), new \\Symfony\\Component\\Translation\\MessageSelector(), 'en', array('translation.loader.php' => array(0 => 'php'), 'translation.loader.yml' => array(0 => 'yml'), 'translation.loader.xliff' => array(0 => 'xlf', 1 => 'xliff'), 'translation.loader.po' => array(0 => 'po'), 'translation.loader.mo' => array(0 => 'mo'), 'translation.loader.qt' => array(0 => 'ts'), 'translation.loader.csv' => array(0 => 'csv'), 'translation.loader.res' => array(0 => 'res'), 'translation.loader.dat' => array(0 => 'dat'), 'translation.loader.ini' => array(0 => 'ini'), 'translation.loader.json' => array(0 => 'json')), array('cache_dir' => (__DIR__.'/translations'), 'debug' => true, 'resource_files' => array('af' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.af.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.af.yml')), 'ar' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ar.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ar.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ar.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ar.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ar.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ar.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ar.xliff')), 'az' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.az.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.az.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.az.xlf')), 'bg' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.bg.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.bg.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.bg.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bg.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bg.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.bg.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.bg.xliff')), 'ca' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ca.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ca.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ca.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ca.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ca.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ca.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ca.xliff')), 'cs' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cs.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.cs.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.cs.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.cs.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.cs.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.cs.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.cs.xliff')), 'cy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.cy.xlf')), 'da' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.da.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.da.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.da.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.da.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.da.yml')), 'de' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.de.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.de.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.de.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.de.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.de.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.de.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.de.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.de.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.de.xliff')), 'el' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.el.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.el.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.el.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.el.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.el.yml')), 'en' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.en.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.en.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.en.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.en.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.en.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.en.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.en.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.en.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.en.xliff')), 'es' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.es.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.es.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.es.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.es.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.es.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.es.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.es.xliff')), 'et' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.et.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.et.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.et.yml')), 'eu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.eu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.eu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eu.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eu.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.eu.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.eu.xliff')), 'fa' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fa.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fa.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fa.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fa.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fa.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fa.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fa.xliff')), 'fi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fi.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fi.xliff')), 'fr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.fr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.fr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.fr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.fr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.fr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.fr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.fr.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\validators.fr.xliff'), 8 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.fr.xliff')), 'gl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.gl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.gl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.gl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.gl.yml')), 'he' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.he.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.he.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.he.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.he.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.he.yml')), 'hr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hr.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hr.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hr.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hr.xliff')), 'hu' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hu.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hu.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.hu.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.hu.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.hu.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.hu.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.hu.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.hu.xliff')), 'hy' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.hy.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.hy.xlf')), 'id' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.id.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.id.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.id.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.id.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.id.yml')), 'it' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.it.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.it.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.it.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.it.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.it.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.it.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.it.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.it.xliff')), 'ja' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ja.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ja.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ja.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ja.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ja.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ja.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ja.xliff')), 'lb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lb.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lb.xliff')), 'lt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lt.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lt.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lt.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.lt.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lt.xliff')), 'lv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.lv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.lv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.lv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.lv.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.lv.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.lv.xliff')), 'mn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.mn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.mn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.mn.yml')), 'nb' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nb.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nb.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nb.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nb.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nb.yml')), 'nl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.nl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.nl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.nl.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.nl.xliff')), 'nn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.nn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.nn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.nn.xlf')), 'no' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.no.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.no.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.no.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.no.xliff')), 'pl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pl.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pl.xliff')), 'pt' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt.xliff')), 'pt_BR' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.pt_BR.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.pt_BR.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_BR.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.pt_BR.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.pt_BR.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.pt_BR.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.pt_BR.xliff')), 'ro' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ro.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ro.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ro.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ro.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ro.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ro.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ro.xliff')), 'ru' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.ru.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.ru.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ru.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ru.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ru.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.ru.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\block-bundle\\\\src/Resources/translations\\\\SonataBlockBundle.ru.xliff'), 7 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.ru.xliff')), 'sk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sk.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sk.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sk.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sk.xliff')), 'sl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sl.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sl.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sl.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.sl.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sl.xliff')), 'sq' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sq.xlf')), 'sr_Cyrl' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Cyrl.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Cyrl.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Cyrl.xlf')), 'sr_Latn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sr_Latn.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sr_Latn.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sr_Latn.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sr_Latn.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sr_Latn.yml')), 'sv' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.sv.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.sv.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.sv.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.sv.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.sv.yml')), 'th' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.th.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.th.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.th.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.th.yml')), 'tr' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.tr.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.tr.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.tr.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.tr.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.tr.xliff')), 'uk' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.uk.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.uk.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.uk.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.uk.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.uk.xliff'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.uk.xliff')), 'vi' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.vi.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.vi.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.vi.yml'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.vi.yml')), 'zh_CN' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_CN.xlf'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Form/Resources/translations\\\\validators.zh_CN.xlf'), 2 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.zh_CN.xlf'), 3 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.zh_CN.yml'), 4 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.zh_CN.yml'), 5 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\core-bundle\\\\src/Resources/translations\\\\SonataCoreBundle.zh_CN.xliff'), 6 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.zh_CN.xliff')), 'zh_TW' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Validator/Resources/translations\\\\validators.zh_TW.xlf')), 'pt_PT' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.pt_PT.xlf')), 'ua' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\symfony\\\\symfony\\\\src\\\\Symfony\\\\Component\\\\Security\\\\Core/Resources/translations\\\\security.ua.xlf')), 'bn' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn.yml')), 'bn_BD' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.bn_BD.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.bn_BD.yml')), 'eo' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.eo.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.eo.yml')), 'ky' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\FOSUserBundle.ky.yml'), 1 => ($this->targetDirs[3].'\\\\vendor\\\\friendsofsymfony\\\\user-bundle/Resources/translations\\\\validators.ky.yml')), 'sv_SE' => array(0 => ($this->targetDirs[3].'\\\\vendor\\\\sonata-project\\\\admin-bundle\\\\src/Resources/translations\\\\SonataAdminBundle.sv_SE.xliff')))));\n\n $instance->setConfigCacheFactory(${($_ = isset($this->services['config_cache_factory']) ? $this->services['config_cache_factory'] : $this->get('config_cache_factory')) && false ?: '_'});\n $instance->setFallbackLocales(array(0 => 'en'));\n\n return $instance;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function allow change properties "rule_title" value | public function set_rule_title($p_rule_title){
$this->v_rule_title = $p_rule_title;
} | [
"protected function set_title()\n {\n }",
"public function set_title($title);",
"public function getTitle($rules_reaction_rule) {\n return $this->t('Edit reaction rule \"@label\"', ['@label' => $rules_reaction_rule->label()]);\n }",
"function setTitle($newTitle, $editTitle);",
"function update_title($new_title){\n\t\t\tif($this->viewed_by->id == $this->created_by->id || !$this->viewed_by->is_norm()){\n\t\t\t\t$new_title = str_clean($new_title);\n\t\t\t\t\n\t\t\t\tdb_query(\"UPDATE `tickets` SET `title` = '{$new_title}' WHERE .`id` = {$this->ticket_id};\");\n\t\t\t}\n\t\t}",
"function set_title ($title) {\r\n\t\r\n\t\t$this->title = $title;\r\n\t}",
"public function setRule() {\n }",
"public function setTitle($title)\n {\n $this->title = ModelValidation::getValidTitle($title);\n }",
"function getTitle() {\n return __('Rules management');\n }",
"abstract protected function setRuleList():void;",
"public function title($title) {\n $this->title = $title;\n $this->forcetitle = true;\n }",
"public function setUrlTitle()\n {\n $source = $this->model->getFullName() . ' ' . $this->engine_name;\n $this->url_title = Inflector::slug(Inflector::transliterate($source, 'Russian-Latin/BGN; NFKD'));\n }",
"public function setTitle(string $title) \t\t{$this->title = $title;$this->setSlug(create_slug($title));}",
"public function filter_title()\n {\n }",
"function setTitle($title) {\n\t\t$this->description->_title = $title;\n\t}",
"public function setGenerateTitle($generate_title);",
"function editRules($rule_id,$rule_title,$rule_content)\n\t{\n\t\t$data = array(\n\t\t\t'rule_title' => $rule_title,\n\t\t\t'rule_content' => $rule_content\n\t\t);\n\n\t\t$this->db->where('rule_id', $rule_id);\n\t\t$result =$this->db->update('rules', $data); \n\t\t\n\t\tif($result){\n\t\t\treturn \"Updated successfully\";\n\t\t}\n\t\telse{\n\t\t\treturn \"UPdation failed\";\n\t\t}\n\t}",
"function yourls_edit_link_title( $keyword, $title ) {\n\t// Allow plugins to short-circuit the whole function\n\t$pre = yourls_apply_filter( 'shunt_edit_link_title', null, $keyword, $title );\n\tif ( null !== $pre )\n\t\treturn $pre;\n\n\tglobal $ydb;\n\t\n\t$keyword = yourls_escape( yourls_sanitize_keyword( $keyword ) );\n\t$title = yourls_escape( yourls_sanitize_title( $title ) );\n\t\n\t$table = YOURLS_DB_TABLE_URL;\n\t$update = $ydb->query(\"UPDATE `$table` SET `title` = '$title' WHERE `keyword` = '$keyword';\");\n\n\treturn $update;\n}",
"function setTitle($newTitle) {\n $this->title = $newTitle;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The test case. Generated from protobuf field .google.cloud.dialogflow.cx.v3beta1.TestCase test_case = 1; | public function getTestCase()
{
return isset($this->test_case) ? $this->test_case : null;
} | [
"public function setTestCases($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Ads\\GoogleAds\\Util\\Testing\\TestCase::class);\n $this->test_cases = $arr;\n\n return $this;\n }",
"public function RunTestCase(\\Google\\Cloud\\Dialogflow\\Cx\\V3\\RunTestCaseRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dialogflow.cx.v3.TestCases/RunTestCase',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }",
"public function UpdateTestCase(\\Google\\Cloud\\Dialogflow\\Cx\\V3\\UpdateTestCaseRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.dialogflow.cx.v3.TestCases/UpdateTestCase',\n $argument,\n ['\\Google\\Cloud\\Dialogflow\\Cx\\V3\\TestCase', 'decode'],\n $metadata, $options);\n }",
"public function setCase(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Support\\Common\\Case::class);\n $this->case = $var;\n }",
"public function createCase($testCase) {\n $caseId = $this->caseDao->createCase($testCase->title, $testCase->steps, $testCase->result, $testCase->duration, $testCase->order);\n Mediator::emit(\"caseCreated\", $caseId);\n $this->suiteDao->addCaseToSuite($caseId, $testCase->suiteId);\n parent::create($testCase, $caseId);\n return $caseId;\n }",
"public function setEnum($var)\n {\n GPBUtil::checkEnum($var, \\Grpc\\Test::class);\n $this->enum = $var;\n\n return $this;\n }",
"public function get_testcase_object() : TestCase\n\t{\n\t\treturn $this->testcase_object;\n\t}",
"protected abstract function getTestCase() : TestCase;",
"public function getCase()\n {\n return $this->case;\n }",
"public function getContest()\n {\n return $this->readOneof(11);\n }",
"public function getTestName()\n\t{\n\t\treturn $this->testName;\n\t}",
"public function getContestType()\n {\n return $this->contest_type;\n }",
"public function getTestCode()\n {\n return $this->getField(5)[0];\n }",
"public function get_testcase() : string\n\t{\n\t\treturn get_class($this->testcase_object);\n\t}",
"public function testGetChallengeActivityTemplate()\n {\n }",
"private function _addCase(TestCase $case)\n\t{\n\t\t$this->items[] = $case;\n\t}",
"protected function executeTest(UnitTestCase $case)\r\n\t{\r\n\t\t$case->log = $this->log;\r\n\t\t$this->cases[] = $case;\r\n\t\t$case->test();\r\n\t\t\r\n\t\tif($this->allCasesPassed && !$case->passed()) {\r\n\t\t\t$this->allCasesPassed = false;\r\n\t\t}\r\n\t}",
"function end_test_case()\n{\n $name = $GLOBALS[\"limonade\"][\"test_case_current\"];\n echo \"## \".strtoupper($name).\"\\n\";\n \n $desc = test_case_describe();\n if(!is_null($desc)) echo $desc.\"\\n\";\n\n echo \"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\\n\";\n \n test_case_execute_current();\n \n \n if(!is_null($name))\n {\n $test = $GLOBALS[\"limonade\"][\"test_cases\"][$name];\n // closing previous test\n echo \"\\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\\n\";\n echo $test['failures'] > 0 ? test_cli_format(\"|FAILED!|\", \"red\") : test_cli_format(\"|PASSED|\", \"green\");\n echo \" Test case '$name' finished: \";\n echo count(test_case_all_func()).\" tests, \";\n echo \" {$test['failures']} failures for {$test['assertions']} assertions.\\n\";\n \n echo \"-----------------------------------------------------------\\n\";\n }\n $GLOBALS[\"limonade\"][\"test_case_current\"] = null;\n}",
"public function getTestCases()\n {\n return $this->test_cases;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Fungsi dibawah ini digunakan untuk menampilkan form tambah artikel baru (hanya form). Pada baris 84 terdapat variabel 'categories' yang berfungsi untuk mengambil data kategori untuk ditampilkan pada combobox Sama halnya pada baris 85 untuk mengambil data tag artikel | function tambahartikel()
{
$data=array(
'categories' => $this->admin_model->datakategori(),
'tagnews' => $this->admin_model->tag()
);
$this->template->load('adminweb/media','adminweb/mod_artikel/tambah_artikel',$data);
} | [
"public function cat_form()\n {\n global $dsp;\n\n // Check for existing categories\n $cat_array = $this->get_cat_array($this->cat_id, 1);\n if ($cat_array) {\n $dsp->AddDropDownFieldRow(\"cat_id\", t('Produktkategorie'), $cat_array, \"\");\n }\n\n $dsp->AddTextFieldRow(\"cat_name\", t('Neue Produktkategorie'), $_POST['cat_name'], $this->error['cat_name']);\n }",
"function tambah()\n\t{\n\t\t$data['judul'] = \"Tambah Kategori\";\n\t\t$this->theme->set_ui('admin/tambahkategori', $data);\n\n\t\t//mengambil semua inputan dari form\n\t\t$inputan = $this->input->post();\n\n\t\t//Jika ada inputan\n\t\tif($inputan)\n\t\t{\n\t\t\t$this->Mkategori->simpan_kategori($inputan);\n\t\t\tredirect(\"admin/kategori\");\n\t\t}\n\t}",
"function sel_categories_form()\r\n{\r\n\r\n\t$form = new XoopsThemeForm('Current Categories', \"current\", \"\", \"post\");\r\n\r\n\t$categorieshandler = xoops_getmodulehandler('categories','ban');\r\n\t$criteria = new Criteria('1', 1);\r\n\t$categories = $categorieshandler->getObjects($criteria);\t\r\n\t$element = array();\r\n\tforeach($categories as $key => $item)\r\n\t{\r\n\t\t$element[$key] = new XoopsFormElementTray('Item '.$item->getVar('id').':');\r\n\t\t$element[$key]->addElement(new XoopsFormLabel('', '<a href=\"index.php?op=categories&fct=edit&id='.$item->getVar('category_id').'\">Edit</a> <a href=\"index.php?op=categories&fct=delete&id='.$item->getVar('category_id').'\">Delete</a>'));\r\n\t\t//$element[$key]->addElement(new XoopsFormText('Weight:', 'weight['.$item->getVar('category_id').']', 4, 5, $item->getVar('category_weight')));\t\t\t\r\n\t\t$element[$key]->addElement(new XoopsFormText('Name:', 'category_name['.$item->getVar('category_id').']', 25,128,$item->getVar('category_name')));\r\n\t\t$element[$key]->addElement(new XoopsFormHidden('id['.$key.']', $item->getVar('category_id')));\r\n\t\t$form->addElement($element[$key]);\r\n\t}\r\n\t$form->addElement(new XoopsFormHidden(\"op\", \"categories\"));\t\t\r\n\t$form->addElement(new XoopsFormHidden(\"fct\", \"saveall\"));\t\t\t\t\r\n\t$form->addElement(new XoopsFormButton('', 'contents_submit', _SUBMIT, \"submit\"));\r\n\t\r\n\t$form->display();\r\n\t\t\t\r\n}",
"public function add() {\n\t\t$this->layout = 'backend';\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->Categoria->create();\n\t\t\tif ($this->request->data['Categoria']['parent_id'] == null){\n\t\t\t\t$this->request->data['Categoria']['parent_id'] = 0;\n\t\t\t}\t\n\t\t\tif ($this->Categoria->saveAll($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('La categoría a sido salvada'));\n\t\t\t\t$this->redirect(array('action' => 'add'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('La categoría no pudo ser salvada. Por favor, inténtelo nuevamente.'));\n\t\t\t}\n\t\t}\n\t}",
"function _select_cat($data) {\n\t\tglobal $mdbd;\n\n\t\t$this->default=''; // domyslnie nie zaznaczony jest zaden produkt\n\n\t\t$title=$data[0];$entries=array();$entr=array();\n\t\tfor ($i=1;$i<sizeof($data);$i++) {\n\t\t\t$entr[$i]=$this->_productsFromCat($data[$i]);\n\t\t} // end for\n\n\t\treset($entr);\n\t\tforeach ($entr as $e) {\n\t\t\twhile (list($id,$name) = each($e)) {\n\t\t\t\t$entries[$id]=$name;\n\t\t\t}\n\t\t} // end foreach\n\n\t\t$name=$this->_name($id,\"basket_cat\");\n\t\tif (! empty($entries)) {\n\t\t\t$this->forms->addSelect($name,$title,$entries,$this->default);\n\t\t\t// $this->forms1->addSelect($name,$title,$entries,$this->default);\n\t\t}\n\n\n\t\treturn(0);\n\t}",
"public function cidade_categoria(){\n\t\t$this->set_config =\n\t \t\t[ \n\t\t\t'table' =>\n\t\t\t\t['nome' => 'tbl_cidade_categoria',\n\t\t\t\t 'chave_pk' => 'id_cidade_categoria',\n\t\t\t\t 'display' => 'Cidade por Categoria'],\n\t\t\t'columns' =>\n\t\t\t\t[\n\t\t\t\t \n\t\t\t 'id_cidade_categoria' =>\n\t\t\t\t['display_column' => 'Id', \n\t\t\t\t \n\t\t\t\t 'select' => [],\n\t\t\t\t 'input' => ['type' => 'number', 'required' => 'readonly'],\n\t\t\t\t\t\n\t\t\t\t 'rules' => '',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'false'],\n\t\t\t 'id_cidade' =>\n\t\t\t\t['display_column' => 'Cidade', \n\t\t\t\t \n\t\t\t\t 'select_relacional' => ['id_cidade','tbl_cidade', 'nome', []],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'id_categoria' =>\n\t\t\t\t['display_column' => 'Categoria', \n\t\t\t\t \n\t\t\t\t 'select_relacional' => ['id_categoria','tbl_categoria', 'nome', []],\n\t\t\t\t\t\n\t\t\t\t 'rules' => 'required',\n\t\t\t\t 'default_value' => '', \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'true'],\n\t\t\t 'id_usuario' =>\n\t\t\t\t['display_column' => 'Usuário', \n\t\t\t\t \n\t\t\t\t 'select_relacional' => ['id_usuario','tbl_usuario', 'nome', []],\n\t\t\t\t\t\n\t\t\t\t 'rules' => '',\n\t\t\t\t 'default_value' => $this->session->userdata(\"id_user\"), \n\t\t\t\t 'costumer_value' => '',\n\t\t\t\t 'display_grid' => 'false'],\n\n\t\t\t\t],\n\t\t\t'where' => ['id_usuario' => $this->session->userdata('id_user')],\n\t\t\t'dropdown' => [],\n\t\t];\n\n\t\t$this->execute();\n\t}",
"public function add_category() {\n $this->category();\n $this->loadView(\"editors/category_editor\");\n }",
"public function add()\n\t\t{\n\t\t\tif($_POST)\n\t\t\t{\n\t\t\t\t$modelCategory = $this->loadModel(\"category\");\n\t\t\t\t$modelCategory->add($_POST);\n\t\t\t\t$this->redirect(array(\"controller\"=>\"categories\"));\n\t\t\t}\n\t\t\t$this->_view->title=\"Nueva Categoria\";\n\t\t\t$this->_view->renderizar(\"add\");\n\t\t}",
"function add_sub_kategori_edar_form() {\n\t\tinclude_once 'class.xform.inc.php';\n\t\n//\t\tif (! $this->get_permission('fill_this')) return $this->intruder();\n\t\tglobal $_SESSION, $_GET, $adodb, $ses;\n\t\t$record = $_GET;\n\t\t$label_arr = $this->sub_kategori_edar_label;\n\t\t$optional_arr = $this->optional_arr;\n\n\t\t$field_arr[] = xform::xf('id_sub_kategori_edar','N','4');\n\t\t$field_arr[] = xform::xf('nama_sub_kategori_edar','X','-1');\n\t\t$field_arr[] = xform::xf('insert_by','C','16');\n\t\t$field_arr[] = xform::xf('date_insert','N','8');\n\t\t$field_arr[] = xform::xf('id_kategori_edar','N','4');\n\n\t\t$rs = $adodb->Execute(\"SELECT * FROM sub_kategori_edar WHERE id_sub_kategori_edar='{$record['id_sub_kategori_edar']}'\");\n\t\tif ($rs && ! $rs->EOF) {\n\t\t\t$value_arr = $rs->fields;\n\t\t\t$optional_arr['id_sub_kategori_edar'] = 'protect';\n\t\t\t$mode = 'edit';\n\t\t\t\n\t\t} else {\n\t\t\t$value_arr = array ();\n\t\t\t$mode = 'add';\n\t\t}\n\t\t\n\t\t$optional_arr['nama_sub_kategori_edar_rule'] = '';\n\t\t$optional_arr['insert_by_rule'] = '';\n\t\t$optional_arr['date_insert_rule'] = '';\n\t\t$optional_arr['sifat_rule'] = '';\n\n\t\teval($this->save_config);\n\t\t$this->id_kategori_edar_form($config);\n\t\t\t\t\n if($value_arr['sifat']=='perlu'){$check1='checked';$check2='';}else{$check1='';$check2='checked';}\n $optional_arr['sifat']='user_defined';\n $value_arr['sifat']='<input type=\"radio\" name=\"sifat\" value=\"perlu\" class=\"text\" '.$check1.'>Perlu <input type=\"radio\" name=\"sifat\" value=\"tidak perlu\" class=\"text\" '.$check2.'>Tidak perlu';\n\n\n\t\t$label_arr['submit_val'] = \"Submit\";\n\t\t$label_arr['form_extra'] = \"<input type=hidden name=action value='post$mode'>\"; // default null\n\t\t$label_arr['form_extra'] .= \"<input type=hidden name=oldpkvalue value='{$record['id_sub_kategori_edar']}'>\";\n\t\t$label_arr['form_title'] = \"Form \".ucwords($mode).\" Sub Kategori Izin Edar Alkes\";\n\t\t$label_arr['form_width'] = '100%';\n\t\t$label_arr['form_name'] = 'theform';\n\n\t\t$_form = new form();\n\t\t$_form->set_config(\n\t\t\tarray (\n\t\t\t\t'field_arr'\t=> $field_arr,\n\t\t\t\t'label_arr'\t=> $label_arr,\n\t\t\t\t'value_arr'\t=> $value_arr,\n\t\t\t\t'optional_arr'\t=> $optional_arr\n\t\t\t)\n\t\t);\n\t\treturn $_form->parse_field();\n\t}",
"private function set_categories()\n\t\t{\n\t\t\tif(empty($this->_categories)){\n\t\t\t\t$tkcategories = get_categories('hide_empty=0&orderby=name');\n\t\t\t\tarray_push($this->_categories, array('name'=> 'Choose a category', 'id' => 0 ));\n\t\t\t\tforeach ($tkcategories as $category_list ) {\n\t\t\t\t\tarray_push($this->_categories, array('name'=>$category_list->cat_name,'id'=>$category_list->cat_ID));\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function createOberkategorie(){\n $name = filter_var($_POST['ober_kategorie_name'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\n $create['name'] = $name;\n\n //reihenfolde\n $count_current_in_kategorie = $this->_model->count(\"kategories\",null);\n $total_current_in_kategorie = $count_current_in_kategorie[0]['total'];\n $create['reihenfolge'] = $total_current_in_kategorie+1;\n //slug\n $slugname = $this->toASCII($_POST['ober_kategorie_name']);\n $slugname = trim(str_replace(str_split('\\\\/:*?\"<>|,.#'), ' ', $slugname));\n $slug = str_replace('--','-',str_replace(' ','-',strtolower($slugname)));\n //check if slugkategorie already exists\n $check = $this->_model->check_exist(\"kategories\",\"slug\",$slug);\n if($check[0]['count'] == 1){\n $create['slug'] = $slug.'s';\n }else{\n $create['slug'] = $slug;\n }\n\n if(SESSION::get('admin')){\n $save = $this->_model->create(\"kategories\",$create);\n }\n Message::set(\"Neue Oberkategorie '$name' erstellt!\",'success');\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n }",
"public function AddSubCategory(){\n\t\t$data['categories']=$this->Common_model->select('*','ms_categories');\n\n\t\tif(isset($_FILES['icon']['name']))\n\t\t{\n\t\t\t$upload_path = 'public/assets/images';\n\t\t\t$image = 'icon';\n\t\t\t$profile_pic = $this->file_upload($upload_path, $image);\n\t\t}else\n\t\t{\n\t\t\t$profile_pic=\"\";\n\t\t}\n\n\t\tif(isset($_POST['submit'])){\n\n\t\t\t$icon_name=$_FILES['icon']['name'];\n\t\t\t$data=array(\n\t\t\t\t'category_id'=>$this->input->post('category'),\n\t\t\t\t'sub_category_name'=>$this->input->post('sub-category'),\n\t\t\t\t'icon'=>$icon_name\n\t\t\t\t);\n\t\t\t$data=array_filter($data);\n\t\t\tif(!empty($data)){\n\t\t\t\t$insert_id=$this->Common_model->insert('ms_sub_categories',$data);\n\t\t\t\t$data['msg']=$insert_id;\n\t\t\t}else{\n\t\t\t\t$data['msg']=0;\n\t\t\t}\n\t\t}\n\t\t$this->template('add-sub-category.php',$data);\n\n\t}",
"public function action_addBook() {\r\n $fieldset = Fieldset::forge('book')->add_model('Model_Book');\r\n $fieldset->delete('category_id');\r\n // get form from fieldset\r\n $form = $fieldset->form();\r\n\r\n // add category to the form\r\n $categories = Model_Category::find('all');\r\n $op = array();\r\n foreach ($categories as $category) {\r\n $op[$category['id']] = $category['name'];\r\n }\r\n\r\n $form->add(\r\n 'category', 'Book category',\r\n array('options' => $op, 'type' => 'radio', 'value' => 'true')\r\n );\r\n // add submit button to the form\r\n $form->add('Submit', '', array('type' => 'submit', 'value' => 'Submit'));\r\n\r\n\r\n // build the form and set the current page as action\r\n $formHtml = $fieldset->build(Uri::create('book/addBook'));\r\n $view = View::forge('book/addBook');\r\n $view->set('form', $formHtml, false);\r\n\r\n if (Input::param() != array()) {\r\n try {\r\n $book = Model_Book::forge();\r\n $book->title = Input::param('title');\r\n $book->author = Input::param('author');\r\n $book->price = Input::param('price');\r\n $book->url = Input::param('url');\r\n $book->category_id= Input::param('category');\r\n\r\n Log::debug('selected category '.$book->category_id);\r\n Log::debug('selected category '.Input::param('category'));\r\n $book->save();\r\n Response::redirect('book');\r\n } catch (Orm\\ValidationFailed $e) {\r\n $view->set('errors', $e->getMessage(), false);\r\n }\r\n }\r\n $this->template->title = \"Book add page\";\r\n $this->template->content = $view; \r\n }",
"public function get_add_category()\n\t{\n if(!Auth::user()->can(\"config-system\"))\n App::abort('403');\n\n $this->layout->title = 'Agregar Categoría';\n $this->layout->content = View::make('admin.configuration.treatments.categories.add');\n\t}",
"public function add(){\r\n\t\t$data= $this->getCategory();\r\n\t\t$this->load->view('subcategory/add',$data);\r\n\t}",
"public function categorie()\n {\n $data[\"categories\"]=$this->categories->list();\n $this->template_admin->displayad('categories' , $data);\n }",
"function addCategory()\n\t{\t$AS['ADD'] = new sql;\n\t\t$AS['ADD']->table=$this->table.\"cats\";\n\t\t$AS['ADD']->setValue('rPARENT',$_POST['parent']);\n\t\t$AS['ADD']->insert();\n\t\t\n\t\t$catID=$AS['ADD']->last_insert_id;\n\t\t\n\t\t$AS['ADD'] = new sql;\n\t\t$AS['ADD']->table=$this->table.\"cats\";\n\t\t$AS['ADD']->wherevar = ' WHERE fID='.$catID;\n\t\t$AS['ADD']->setValue('fSORTORDER',1000000+$catID);\n\t\t$AS['ADD']->update();\n\t\t\n\t\t\n\t\n\t\t$AS['ADD'] = new sql;\n\t\t$AS['ADD']->table=$this->table.\"cats_names\";\n\t\t$AS['ADD']->setValue('rCATID',$catID);\n\t\t$AS['ADD']->setValue('rCLANG',$this->config->getSetting('Languages','DefaultCLANG'));\n\t\t$AS['ADD']->setValue('fNAME',$_POST['catname']);\n\t\t$AS['ADD']->insert();\n\t\t\n\t\t$this->updateSEF($catID);\n\t\t\n\t}",
"function otherpageKategoriSub_TambahData(\n\t\t$tbl_otherpagekategorisub,\n\t\t$id, $idupline, $idkategori,\n\t\t$keterangan, $keteranganinggris,\n\t\t$statustampil, $menuatas1, $menuatas2,\n\t\t$menubawah1, $menubawah2, $homepagetampil,\n\t\t$posisi, $urutan,\n\t\t$imagefile, $imagelogo, $imageheader, $imagebackground,\n\t\t$hit, $linkjudul, $keyword \n\t){\n\t\t$sql = mysql_query(\"INSERT INTO $tbl_otherpagekategorisub\n\t\t(\n\n\t\t\tid, idupline, idkategori,\n\t\t\tketerangan, keteranganinggris,\n\t\t\tstatustampil, menuatas1, menuatas2,\n\t\t\tmenubawah1, menubawah2, homepagetampil,\n\t\t\tposisi, urutan,\n\t\t\timagefile, imagelogo, imageheader, imagebackground,\n\t\t\thit, linkjudul, keyword \n\n\t\t)VALUES(\n\t\n\t\t\t'$id', '$idupline', '$idkategori', \n\t\t\t'$keterangan', '$keteranganinggris', \n\t\t\t'$statustampil', '$menuatas1', '$menuatas2', \n\t\t\t'$menubawah1', '$menubawah2', '$homepagetampil', \n\t\t\t'$posisi', '$urutan', \n\t\t\t'$imagefile', '$imagelogo', '$imageheader', '$imagebackground',\n\t\t\t'$hit', '$linkjudul', '$keyword'\n\n\t\t)\");\n\t\treturn $sql;\n\t}",
"public function addJenisBuku()\n\t{\n\t\t$this->Model_buku->addJenisBuku();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ver las competencias /============================================================================================= | public static function verCompetencia(){
$rel=Conexion::conectar('localhost','proyecto','root','');
$resultado=$rel->prepare("SELECT * FROM resultados_aprendizaje");
$resultado->execute();
return $resultado;
} | [
"public function Verificacion_Condiciones_Establecidas_Compras() {\n //DATOS RELACIONADOS CON EL VALOR MÍNIMO DEL PEDIDO Y CONDICION PARA REALIZAR EL PAGO.\n if ( Session::Get('cumple_condicion_cpras_tron_industial') == TRUE){\n Session::Set('valor_real_pedido', $this->Vr_Total_Pedido_Amigos );\n }else{\n Session::Set('valor_real_pedido', $this->Vr_Total_Pedido_Ocasional );\n }\n\n\n // VERIFICACIÓN DE SI CUMPLE CON EL VALOR MÍNIMO DE PEDIDO PARA PAGO EN PAYU LATAM\n if ( Session::Get('pago_minimo_payulatam') > Session::Get('valor_real_pedido' ) && Session::Get('valor_real_pedido' ) > 0 ){\n Session::Set('cumple_valor_minimo_pedido', FALSE);\n }else{\n Session::Set('cumple_valor_minimo_pedido', TRUE);\n }\n\n\n\n // VERIFICACIÓN DE SI CUMPLE O NO CON LAS COMPRAS MÍNIMAS DE PRODUCTOS TRON\n //Session::Get('minimo_compras_productos_tron')\n Session::Set('Cumple_Minimo_Compras_Productos_Tron', TRUE);\n if ( $this->Tengo_Productos_Tron == TRUE ){\n if ( ( $this->compras_tron + $this->compras_industrial ) < Session::Get('minimo_compras_productos_tron') ){\n Session::Set('Cumple_Minimo_Compras_Productos_Tron', FALSE);\n }else{\n Session::Set('Cumple_Minimo_Compras_Productos_Tron', TRUE);\n }\n }\n\n\n }",
"public static function mostrarChecksConMisContactos() {\n global $textos, $sql, $sesion_usuarioSesion;\n $cod = \"\";\n $codigo = \"\";\n\n $tablas = array(\n \"c\" => \"contactos\",\n \"u\" => \"usuarios\",\n \"p\" => \"personas\"\n );\n\n $columnas = array(\n \"id_contacto1\" => \"c.id_usuario_solicitante\",\n \"id_contacto2\" => \"c.id_usuario_solicitado\",\n \"estado\" => \"c.estado\",\n \"usuario\" => \"u.usuario\",\n \"nombre\" => \"CONCAT(p.nombre, ' ', p.apellidos)\",\n \"id\" => \"u.id\"\n );\n\n $condicion = \"(u.id_persona = p.id AND c.id_usuario_solicitante = \" . $sesion_usuarioSesion->id . \" AND c.id_usuario_solicitado = u.id AND c.estado = '1') OR (u.id_persona = p.id AND c.id_usuario_solicitado = \" . $sesion_usuarioSesion->id . \" AND c.id_usuario_solicitante = u.id AND c.estado = '1')\";\n\n $consulta = $sql->seleccionar($tablas, $columnas, $condicion);\n\n if ($sql->filasDevueltas) {\n $arreglo = array();\n\n while ($contacto = $sql->filaEnObjeto($consulta)) {\n $arreglo[] = $contacto;\n }\n }\n\n $cod .= HTML::campoChequeo(\"\", \"\", \"\", \"marcarTodosLosChecks\") . $textos->id(\"SELECCIONAR_TODOS\") . \"<br/><br/>\";\n\n foreach ($arreglo as $elemento) {\n $cod .= HTML::campoChequeo(\"datos[varios_contactos][$elemento->id]\", \"\", \"checksContactos\") . $elemento->nombre . \"<br>\";\n }//fin del foreach \n\n\n $codigo = HTML::contenedor(HTML::parrafo($textos->id(\"SELECCIONAR_CONTACTOS\"), \"centrado negrilla\") . \"<br>\" . $cod, \"mostrarChecksConMisContactos\", \"mostrarChecksConMisContactos\");\n\n return $codigo;\n }",
"function definirCondicaoViagensDeslocamentos(){\n\t\t\t$consulta = mysql_query(\"SELECT * FROM livro_diario_custo_despesa WHERE cnae = '\".$this->getcnae().\"' AND categoria = 'Viagens e deslocamentos' \");\n\t\t\t$objeto_consulta = mysql_fetch_array($consulta);\n\t\t\tif( mysql_num_rows($consulta) == 0 )\n\t\t\t\treturn 2;\t\n\t\t\tif( $objeto_consulta['tipo'] == 'custo' )\n\t\t\t\treturn 1;\n\t\t\telse\n\t\t\t\treturn 2;\n\t\t}",
"function consultarCopilotos () {\n $resultado = false;\n $query = \"SELECT p.nombre,p.apellido,p.cedula FROM PERSONAL p\n WHERE p.TIPO_CARGO_id =2 AND habilitado =1 ORDER BY apellido,nombre\";\n $resultado = $this->transaccion->realizarTransaccion($query);\n return $resultado;\n }",
"function verCarrito() {\n // Sin usuario para buscar, devuelve vacio\n if (!array_key_exists('idusuario', $_SESSION))\n return array();\n\n // Check pedidos de compra en estado 'iniciada'\n $compraController = new CompraController();\n $compras = $compraController->buscarSinEstado($_SESSION['idusuario']);\n if (!empty($compras)) {\n // Check productos agregados al pedido de compra\n $carrito = [];\n foreach ($compras as $compra) {\n if ( $productos = $compraController->listarProductosDeCompra($compra->getIdcompra()) ) {\n array_push($carrito, [ 'compra' => $compra, 'productos' => $productos]);\n }\n }\n return $carrito;\n }\n \n // No se encontraron compras activas\n return array();\n }",
"function ver_competenciasActividad($id_realiza,$idactividad,$idarea,$masivo){\n\t\t\tparent::conectar();\n\t\t\t $sql=\"SELECT ID_COMPETENCIA,NOMBRECOMPETENCIA FROM view_competencias_ev WHERE ID_AREA=$idarea AND ID_REALIZA=$id_realiza ORDER BY NOMBRECOMPETENCIA\";\n\t\t\t $record_consulta = $this->obj_con->Execute($sql);\n\t\t\t /*obteniendo las competencias de la actividad que tiene actualmente*/\n\t\t\t $sql2=\"SELECT ID_COMPETENCIA FROM competencias_actividadesmasivas WHERE ID_MASIVO=$masivo\";\n\t\t\t $record_consulta2 = $this->obj_con->Execute($sql2);\n $competenciasActividad[]=array();\n $i=0;\n\t\t\t while(!$record_consulta2->EOF){\n\t\t\t \t$id_competenciaAct=$record_consulta2->fields[\"ID_COMPETENCIA\"];\n\t\t\t \t$competenciasActividad[$i]=$id_competenciaAct;\n\t\t\t \t$record_consulta2->MoveNext();\n\t\t\t \t$i++;\n\t\t\t }\n\t\t\t/*preparar array con true or false*/\t\t\t\n\t\t\t\t\t while (!$record_consulta->EOF)\n\t\t\t\t\t {\n\t\t\t\t\t $id_competencia=$record_consulta->fields[\"ID_COMPETENCIA\"];\n\t\t\t\t\t $nombrecompetencia=$record_consulta->fields[\"NOMBRECOMPETENCIA\"];\n\t\t\t\t\t $asignado=false;\n\t\t\t\t\t foreach ($competenciasActividad as $id_competenciaAct) {\n\t\t\t\t\t \t if($id_competenciaAct==$id_competencia){\n\t\t\t\t\t \t \t$asignado=true;/*fue asignada la competencia*/\n\t\t\t\t\t \t }\n\t\t\t\t\t }\n\t\t\t\t\t\t $data1[] = array('id_comp'=>$id_competencia,'nombreC'=>$nombrecompetencia,'selected'=>$asignado);\n\t\t\t\t\t $record_consulta->MoveNext();\n\t\t\t\t\t }\n\t\t\t\t\t\t\tif(isset($data1)){\n\t\t\t\t $respuesta= array('success' => true,'data'=>$data1);\n\t\t\t\t }else{\n\t\t\t\t $respuesta= array('success' =>false);\n\t\t\t\t }\t\t\t\t\t \n return $respuesta;\n\t\t}",
"function verRecorridos()\n {\n $cartoneros = $this->usuarioModel->getAllCartoneros();\n\n $i = 0;\n $retorno = [];\n foreach ($cartoneros as $cartonero) {\n $pedidos = $this->pedidoModel->getPedidosByDni($cartonero->dni);\n\n $armado = [];\n $armado[0] = $cartonero->dni;\n $armado[1] = $cartonero->nombre;\n $armado[2] = $pedidos;\n $retorno[$i] = $armado;\n $i++;\n }\n\n $this->view->verRecorridos($retorno);\n }",
"function verificaMontosConciliadosDocumentos(){\n\t$regresaMov = \"\";\n\tforeach ($_REQUEST['idMovBancos'] as $idval){\n\t\t$idDocumentoBanco = $this->ImportaModel->idsMovBancarioDocumento($idval);//ids del movimientos e importe \n\t\t$imporConcepto = $this->ImportaModel->importeConceptoBancarioDocumento($idval);\n\t\t$separa = explode(\"/\", $imporConcepto);\n\t\t$importeBanco = $separa[0];\n\t\t$conceptoBanco = $separa[1];\n\t\t$impMovDocumento = $this->ImportaModel->verificaMontosConciliadosB($idDocumentoBanco);//importe de los documentos\n\t\tif($importeBanco!=$impMovDocumento){\n\t\t\t$this->ImportaModel->desconsilia_MovnulosbancosDocumentos($idDocumentoBanco,$idval);\n\t\t\t$regresaMov .= $conceptoBanco.\"\\n\";\n\t\t}\n\t}\n\t$retVal = (empty($regresaMov)) ? 1 : $regresaMov ;\n\techo $retVal;\n\t\n}",
"public function executeVentasCompletas()\n\t{\n\t\t// Obtenemos el menu segun sus permisos\n\t\t$menu = new GenerarMenus();\t\t\n\t\t$this->menu_botones =$menu->generarMenuBotones();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesUrl\n\t\t$this->acc_url = new AccionesUrl();\n\t\t\n\t\t// Obtenemos un objeto de la clase Administracion\n\t\t$this->acc_admin = new Administracion();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesFechas\n\t\t$this->acc_fechas = new AccionesFechas();\n\t\t\n\t\t// Obtenemos un objeto de la clase Clientes\n\t\t$this->acc_clientes = new AccionesClientes();\n\t\t\n\t\t// Obtenemos un select con todos los Clientes\n\t\t$this->ar_clientes = $this->acc_clientes->obtenerSelectClientes();\t\n\t\t\n\t\t// Obtenemos un objeto de la clase Ventas\n\t\t$this->acc_ventas = new AccionesVentas();\n\t\t\n\t\t// Obtenemos un objeto de la clase Utilidades\n\t\t$this->acc_utilidades = new Utilidades();\n\t\t\n\t\t// Creamos la busqueda de los Ventas Completos\n\t\t$ventas_completas = new Criteria();\n\t\t$ventas_completas->add(VentasPeer::ID_ESTADO_VENTA,4);\n\t\t\t\t\n\t\t$id_cliente = $this->getRequestParameter('id_cliente');\n\t\t$id_cliente = $this->acc_url->parsearRecepcion($id_cliente);\n\t\t$this->id_cliente = $id_cliente;\n\t\tif ($this->id_cliente != 0)\n\t\t{\n\t\t\t$ventas_completas->add(VentasPeer::ID_CLIENTE,$this->id_cliente);\n\t\t}\n\t\t\n\t\t$id_estado_venta = $this->getRequestParameter('id_estado_venta');\n\t\t$id_estado_venta = $this->acc_url->parsearRecepcion($id_estado_venta);\n\t\t$this->id_estado_venta = $id_estado_venta;\t\t\n\t\t\n\t\t$num_venta = $this->getRequestParameter('num_venta');\n\t\t$num_venta = $this->acc_url->parsearRecepcion($num_venta);\n\t\t$this->num_venta = $num_venta;\n\t\t\n\t\t$fecha_venta = $this->getRequestParameter('fecha_venta');\n\t\t$fecha_venta = $this->acc_url->parsearRecepcion($fecha_venta);\n\t\t$this->fecha_venta = $fecha_venta;\n\t\t\n\t\t$page = $this->getRequestParameter('page');\t\n\t\t$desde = $this->getRequestParameter('desde');\n\t\t$desde = $this->acc_url->parsearRecepcion($desde);\n\t\t$this->desde = $desde;\n\t\t\n\t\t$fecha_ini = $this->getRequestParameter('fecha_ini');\n\t\t$fecha_ini = $this->acc_url->parsearRecepcion($fecha_ini);\n\t\t$this->fecha_ini = $fecha_ini;\t\t\t\n\t\t\n\t\tif ($this->fecha_ini != '')\n\t\t{\n\t\t\tif(empty($page))\n\t\t\t{\n\t\t\t\t$this->fecha_ini_inv = $this->acc_fechas->cambiarFormatoFecha2($this->fecha_ini);\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->fecha_ini_inv = $this->fecha_ini;\n\t\t\t} \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fecha_ini_inv = '';\n\t\t}\n\t\t\n\t\t// Recogemos las palabras hasta y fecha_fin a buscar si existe\n\t\t$hasta = $this->getRequestParameter('hasta');\n\t\t$hasta = $this->acc_url->parsearRecepcion($hasta);\n\t\t$this->hasta = $hasta;\n\t\t$fecha_fin = $this->getRequestParameter('fecha_fin');\n\t\t$fecha_fin = $this->acc_url->parsearRecepcion($fecha_fin);\n\t\t$this->fecha_fin = $fecha_fin;\n\t\t\t\n\t\tif ($this->fecha_fin != '')\n\t\t{\n\t\t\tif(empty($page))\n\t\t\t{\n\t\t\t\t$this->fecha_fin_inv = $this->acc_fechas->cambiarFormatoFecha2($this->fecha_fin);\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->fecha_fin_inv = $this->fecha_fin;\n\t\t\t}\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->fecha_fin_inv = '';\n\t\t}\t\t \t\t\t \t\n\t\t\n\t\tif (($this->hasta != '')&&($this->desde != ''))\n\t\t{\t\t\n\t\t\t$c = new Criteria();\n\t\t\t$crit0 = $c->getNewCriterion(VentasPeer::CREATED_AT,$this->fecha_ini_inv,Criteria::GREATER_EQUAL);\n\t\t\t$crit1 = $c->getNewCriterion(VentasPeer::CREATED_AT,$this->fecha_fin_inv,Criteria::LESS_EQUAL);\n\t\t\t$crit0->addAnd($crit1);\n\t\t\t$ventas_completas->add($crit0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($this->desde != '')\n\t\t{\n\t\t\t$ventas_completas->add(VentasPeer::CREATED_AT,$this->fecha_ini_inv,Criteria::GREATER_EQUAL);\n\t\t}\n\t\tif ($this->hasta != '')\n\t\t\t{\n\t\t\t\t$ventas_completas->add(VentasPeer::CREATED_AT,$this->fecha_fin_inv,Criteria::LESS_EQUAL);\n\t\t\t}\n\t\t} \n\t\t\n\t\t$type = $this->getRequestParameter('type');\n\t\t$type = $this->acc_url->parsearRecepcion($type);\n\t\t$this->type = $type;\n\t\t$sort = $this->getRequestParameter('sort');\n\t\t$sort = $this->acc_url->parsearRecepcion($sort);\n\t\t$this->sort = $sort;\n\t\t\n\t\tswitch($this->type) \n\t\t{\n\t\t\tcase 'asc':\n\t\t\t\t$ventas_completas = $this->acc_utilidades->ordenarObjetoXColumna($ventas_completas,$this->sort.\"_\".$this->type);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'desc':\n\t\t\t\t$ventas_completas = $this->acc_utilidades->ordenarObjetoXColumna($ventas_completas,$this->sort.\"_\".$this->type);\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\t// Llamamos al paginador\t\t\n\t\t$pager = new sfPropelPager('Ventas', 15);\n\t\t$pager->setCriteria($ventas_completas);\t\t\t\n\t\t$pager->setPage($this->getRequestParameter('page', 1));\n\t\t$pager->init();\n\t\t$this->pager = $pager;\t\n\t}",
"function Comprobar_atributos()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_DNI() &\n $this->Comprobar_codespacio() \n\t\t)\n\t{\n\t\treturn true;\n\t}\n\t//si no\n\telse\n\t\t{\n\t\t\treturn $this->erroresdatos;\n\t\t}\n}",
"function verificaComposicaoConcluida($obrid)\n{\n\n global $db;\n\n /* Pesquisando o 'proid' de acordo com o id da obra. */\n $arrProidOrigemObra = array();\n\n $sql1 = \"SELECT\n foo.proid,\n foo.origem\n FROM (\n SELECT\n obr.obrid,\n pro.proid,\n 'par' as origem\n FROM\n par.processoobrasparcomposicao pro\n INNER JOIN\n obras2.obras obr ON obr.preid = pro.preid\n INNER JOIN\n par.processoobraspar pop ON pop.proid = pro.proid AND pop.prostatus = 'A' :: BPCHAR\n WHERE\n pro.pocstatus = 'A' :: BPCHAR\n AND\n obr.obridpai IS NULL\n \n UNION ALL\n \n SELECT\n obr.obrid,\n pro.proid,\n 'pac' as origem\n FROM\n par.processoobraspaccomposicao pro\n INNER JOIN\n obras2.obras obr ON obr.preid = pro.preid\n INNER JOIN\n par.processoobra pobr ON pobr.proid = pro.proid AND pobr.prostatus = 'A' :: BPCHAR\n WHERE\n pro.pocstatus = 'A' :: BPCHAR\n AND\n obr.obridpai IS NULL\n ) foo\n WHERE\n foo.obrid = {$obrid};\";\n\n $retorno = $db->pegalinha($sql1);\n\n if ($retorno !== false) {\n $arrProidOrigemObra = $retorno;\n }\n\n if (!empty($arrProidOrigemObra)) {\n if ($arrProidOrigemObra[\"origem\"] == 'par') { // Origem da obra: PAR.\n $sqlComposicao = \"\n SELECT\n obr.obrid,\n pro.proid,\n obr.strid\n FROM\n par.processoobrasparcomposicao pro\n INNER JOIN\n obras2.obras obr ON obr.preid = pro.preid\n INNER JOIN\n par.processoobraspar pop ON pop.proid = pro.proid AND pop.prostatus = 'A' :: BPCHAR\n WHERE\n pro.pocstatus = 'A' :: BPCHAR\n AND\n obr.obridpai IS NULL\n AND\n pro.proid = {$arrProidOrigemObra[\"proid\"]};\";\n } elseif ($arrProidOrigemObra[\"origem\"] == 'pac') { // Origem da obra: PAC.\n $sqlComposicao = \"\n SELECT\n obr.obrid,\n pro.proid,\n obr.strid\n FROM\n par.processoobraspaccomposicao pro\n INNER JOIN\n obras2.obras obr ON obr.preid = pro.preid\n INNER JOIN\n par.processoobra pop ON pop.proid = pro.proid AND pop.prostatus = 'A' :: BPCHAR\n WHERE\n pro.pocstatus = 'A' :: BPCHAR\n AND\n obr.obridpai IS NULL\n AND\n pro.proid = {$arrProidOrigemObra[\"proid\"]};\";\n }\n } else {\n $sqlComposicao = \"\n SELECT\n obr.obrid,\n obr.strid\n FROM\n obras2.obras obr\n WHERE\n Replace(Replace(Replace(obr.obrnumprocessoconv, '.', ''), '/', ''), '-', '') =\n (SELECT Replace(Replace(Replace(o.obrnumprocessoconv, '.', ''), '/', ''), '-', '')\n FROM\n obras2.obras o\n WHERE\n obrid = {$obrid}\n )\n AND\n obr.obrstatus = 'A' :: BPCHAR\n AND\n obr.obridpai IS NULL\";\n }\n\n $composicao = $db->carregar($sqlComposicao);\n\n if (is_array($composicao)) {\n foreach ($composicao as $c) {\n if ($c[\"strid\"] != 6 && $c[\"strid\"] != 7 && $c[\"strid\"] != 8) {\n return false;\n }\n }\n return true;\n }\n\n return false;\n}",
"function verificaCumprimentoObjeto($obrid)\n{\n\n /* Verificando se no houve um bloqueio/desbloqueio forado (manual). */\n if (!verificaBloqueioManual($obrid)) {\n $situacaoObra = verificaSituacaoObra($obrid);\n //$co = new CumprimentoObjeto();\n $obra = new Obras($obrid);\n\n $pagamentosEfetuados = $obra->getPagamentoPar($obrid);\n $pagamentoEfetivadoExists = false;\n\n if ($situacaoObra == 8) { // OBRA CANCELADA\n // VERIFICANDO SE A ORIGEM DA OBRA 'CONVNIO'.\n if (verificaOrigemObra($obrid) == 2 || verificaNumeroConvenio($obrid) == true) {\n $pagamentoEfetivadoExists = true;\n } else {\n // VERIFICANDO SE EXISTE PELO MENOS UM PAGAMENTO EFETIVADO.\n if (is_array($pagamentosEfetuados)) {\n foreach ($pagamentosEfetuados as $pagamento) {\n if (strpos($pagamento[\"pagsituacaopagamento\"], \"EFETIVADO\") !== false) {\n $pagamentoEfetivadoExists = true;\n break;\n }\n }\n }\n }\n\n if (!$pagamentoEfetivadoExists) { // SE NO HOUVER NENHUM PAGAMENTO EFETIVADO\n return false;\n } else {\n return true;\n }\n } elseif ($situacaoObra == 7) { // OBRA INACABADA\n return true;\n } elseif ($situacaoObra == 6) { // OBRA CONCLUDA\n $vigencia = null;\n $situacaoEfetivada = false; // Varivel que indica se a obra est 100% paga.\n\n if (verificaOrigemObra($obrid) == 2 || verificaNumeroConvenio($obrid) == true) { // CONVNIO\n // Para a origem 'Convênio' assumido que a obra est 100% paga.\n $situacaoEfetivada = true;\n\n // Pesquisando na tabela 'registroatividades'.\n $dtvigencia = verificaLeituraNotificacaoObraConcluida($obrid);\n\n if ($dtvigencia) { // Se houver data de vigncia na tabela 'registroatividades'...\n $dtAtual = new DateTime(\"now\");\n\n // Obtendo a data da tabela 'registroatividades' e somando mais 45 dias.\n $dtvigencia = new DateTime($dtvigencia);\n $dtvigencia->add(new DateInterval(\"P45D\"));\n\n // Verificando a vigncia a partir da nova data (45 dias).\n if ($dtvigencia->diff($dtAtual) > 0) {\n $vigencia = false;\n } else {\n $vigencia = true;\n }\n } else {\n $dtfimconvenio = verificaDataFimConvenio($obrid);\n if ($dtfimconvenio) {\n $dtAtual = new DateTime(\"now\");\n $dtfimconvenio = new DateTime($dtfimconvenio);\n\n // Verificando se a vigncia a partir da nova data (45 dias).\n if ($dtfimconvenio->diff($dtAtual) > 0) {\n $vigencia = false;\n } else {\n $vigencia = true;\n }\n } else {\n // Caso no haja data de vigncia campo 'Fim' na aba 'Recursos' (para convênio) e nem na tabela 'registroatividades', bloqueia a aba 'Cumprimnento do objeto'.\n return false;\n }\n }\n } else { // PROCESSO\n // Verificando a data de vigncia da aba \"Recursos\".\n $vigencia = verificaVigenciaObra($obrid);\n\n if ($vigencia === null) { // Se no existir data de vigncia na aba recursos, pesquisar na tabela 'registroatividades'.\n // Pesquisando na tabela 'registroatividades'.\n $dtvigencia = verificaLeituraNotificacaoObraConcluida($obrid);\n\n if ($dtvigencia) { // Se houver data de vigncia na tabela 'registroatividades'...\n $dtAtual = new DateTime(\"now\");\n\n // Obtendo a data da tabela 'registroatividades' e somando mais 45 dias.\n $dtvigencia = new DateTime($dtvigencia);\n\n $dtvigencia->add(new DateInterval(\"P45D\"));\n\n // Verificando se a vigncia a partir da nova data (45 dias).\n if ($dtvigencia->diff($dtAtual) > 0) {\n $vigencia = false;\n } else {\n $vigencia = true;\n }\n } else {\n // Caso no haja data de vigncia na aba 'Recursos' e nem na tabela 'registroatividades', bloqueia a aba 'Cumprimnento do objeto'.\n return false;\n }\n }\n }\n\n if ($vigencia === false) { // Obra vencida.\n if ($pagamentosEfetuados) {\n $calc = 0;\n array_walk($pagamentosEfetuados, function ($v, $k) use (&$calc) {\n if (strpos($v[\"pagsituacaopagamento\"], \"EFETIVADO\") !== false) {\n $percentual = round($v[\"percentualpagamento\"], 2);\n $calc += $percentual;\n }\n }, $calc);\n\n if ($calc < 100) {\n $situacaoEfetivada = false;\n } else {\n $situacaoEfetivada = true;\n }\n }\n\n if ($situacaoEfetivada === false) {\n // Se a obra no for 100% efetivada, bloqueia-se a aba 'Cumprimento do objeto'.\n return false;\n } else {\n // Se todas as previses de providência estiverem vencidas, liberar a aba 'Cumprimento do objeto'.\n if (obterSituacaoPrevisaoProvidencia($obrid)) {\n return true;\n } else {\n // Se pelo menos uma previso de providência no estiver vencida, bloquear a aba 'Cumprimento do objeto'.\n return false;\n }\n }\n } elseif ($vigencia === true) { // Obra em vigncia.\n if ($pagamentosEfetuados) {\n $calc = 0;\n array_walk($pagamentosEfetuados, function ($v, $k) use (&$calc) {\n if (strpos($v[\"pagsituacaopagamento\"], \"EFETIVADO\") !== false) {\n $percentual = round($v[\"percentualpagamento\"], 2);\n $calc += $percentual;\n }\n }, $calc);\n\n if ($calc < 100) {\n $situacaoEfetivada = false;\n } else {\n $situacaoEfetivada = true;\n }\n }\n\n if ($situacaoEfetivada === false) {\n // Se a obra no for 100% efetivada, bloqueia-se a aba 'Cumprimento do objeto'.\n return false;\n } else {\n // Se todas as previses de providência estiverem vencidas, liberar a aba 'Cumprimento do objeto'.\n if (obterSituacaoPrevisaoProvidencia($obrid)) {\n $solicitacoes = capturaSolicitacoesObra($obrid);\n $solUsoSaldoDeferida = false;\n foreach ($solicitacoes as $solicitacao) {\n if ($solicitacoes[\"aprovado\"] == \"S\" && $solicitacoes[\"tslid\"] == 2) {\n $solUsoSaldoDeferida = true;\n break;\n }\n }\n\n // Se houver solicitação de uso de saldo deferida, bloqueia a aba 'Cumprimento do objeto'.\n if ($solUsoSaldoDeferida) {\n return false;\n } else {\n if (verificaComposicaoConcluida($obrid)) {\n return true;\n } else {\n return false;\n }\n }\n } else {\n // Se pelo menos uma previso de providência no estiver vencida, bloquear a aba 'Cumprimento do objeto'.\n return false;\n }\n }\n } else {\n return false;\n }\n }\n }\n}",
"public function TieneCobranzasVigentes()\n\t{\n\t\t$q = Doctrine_Query::create()\n\t\t->from('CobranzaLiquidacion cl')\n\t\t->innerJoin('cl.Factura f')\n\t\t->andWhere('f.FechaAnulacion IS NULL')\n\t\t->where('cl.FacturaId = ?', $this->Id);\n\t\t \n\t\t$liquidaciones\t=\t $q->execute();\n\t\t\n\t\tif(count($liquidaciones) > 0)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"function verInscritos($configuracion)\n\t{\n\t\tinclude_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/listado.class.php\");\n\t\t$milista=new listado($configuracion);\n\t\t$milista->setNumRegistros(8);\n\t\t//$milista->setRegistro($this->ejecutarSQL($configuracion,$this->accesoOracle,\"select * from acest where est_cod=20032025075\",\"busqueda\"));\n\t\t$milista->setTabla('v_presentar_ecaes','oracle');\n\t\t$milista->setRelacion('accra','cra_cod=pee_cra_cod');\n\t\t$milista->setRelacion('acest','pee_cod=est_cod');\n\t\t$milista->setRelacion('acestotr','eot_cod=est_cod');\n\t\t$milista->setColumna('codigo','est_cod');\n\t\t$milista->setColumna('documento','est_nro_iden');\n\t\t$milista->setColumna('nombre','est_nombre');\n\t\t$milista->setColumna('correo','eot_email');\n\t\t$milista->setColumna('semestre','pee_semestre');\n\t\t$milista->setColumna('porcentaje','pee_porcentaje_cursado');\n\t\t$milista->setFiltro('cra_emp_nro_iden =',$this->usuario);\n\t\t$milista->setFiltro('pee_presento=',\"'N'\");\n\t\t$milista->setFiltro('pee_porcentaje_cursado >=',70);\n\t\t\n\t\t\n\t\t//$milista->setCheck('miname',1);\n\t\t\n\t\techo $milista->armarListado($configuracion,$this->accesoOracle);\n\t\t//echo \"<br><center><input type='submit' value='Generar Recibos'></center>\"; \n\t}",
"function existen_cortes_control()\n\t{\n\t\t$cortes_activos = 0;\n\t\tif (is_null($this->_cortes_def)) {\t\t\t\t\t\t//Si no hay cortes procesados aun, tomo los definidos en base\n\t\t\t$cortes_activos = count($this->_info_cuadro_cortes);\n\t\t} elseif (! empty($this->_cortes_def)) {\n\t\t\t$datos_corte = reset($this->_cortes_def);\t\t\t//Ciclo por los cortes que se procesaron en la definicion\n\t\t\tdo {\n\t\t\t\tif ($datos_corte['habilitado'] == 1) {\t\t\t\t//Si el corte esta activo dejo de buscar.\n\t\t\t\t\t$cortes_activos++;\n\t\t\t\t}\n\t\t\t} while ($datos_corte = next($this->_cortes_def) && $cortes_activos == 0);\n\t\t}\n\t\treturn (($cortes_activos > 0) && !$this->_salida_sin_cortes);\n\t}",
"public function verActividades()\n {\n // section -64--88-1-102-9622ab2:134173cef74:-8000:000000000000176E begin\n \t$sql = \"SELECT * FROM actividades\";\n\t\t return $this->ejecutarQuery($sql);\n // section -64--88-1-102-9622ab2:134173cef74:-8000:000000000000176E end\n }",
"function Comprobar_codtitulacion()\n{\n\t$correcto = true;\n\n\t//realiza la comprobacion\n\tif (strlen($this->CODTITULACION)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"CODTITULACION\");\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guardamos el mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//realiza la comprobacion\n\tif (strlen($this->CODTITULACION)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"CODTITULACION\");\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guardamos el mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//realiza la comprobacion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ0-9]+$/\",$this->CODTITULACION)){\n\t\t$error = array();\n\t\t\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"CODTITULACION\");\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guardamos el mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números\");\n\n\t\t//guardamos el mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;\n}",
"public function horsCobas() \r\n {\r\n return $this->liste(\"HorsCOBAS=1\");\r\n }",
"public function verDados(){\r\n\t\techo get_class($this) . \"<br>\";\r\n\r\n\t\techo $this->nome . \"<br>\";\r\n\t\techo $this->idade . \"<br>\";\r\n\t\techo $this->senha . \"<br>\";//exemplo que mostra que atributo senha nao è acessado pela classe Programador pq senha è private\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the contentCachingPublicRanges A list of custom IP ranges that Apple's content caching service should use to match clients to content caches. This collection can contain a maximum of 500 elements. | public function setContentCachingPublicRanges($val)
{
$this->_propDict["contentCachingPublicRanges"] = $val;
return $this;
} | [
"public function setContentCachingPeerFilterRanges($val)\n {\n $this->_propDict[\"contentCachingPeerFilterRanges\"] = $val;\n return $this;\n }",
"public function setIpRanges($val)\n {\n $this->_propDict[\"ipRanges\"] = $val;\n return $this;\n }",
"function setIPRanges($ipRanges) {\n\t\treturn $this->setData(implode(REGISTRATION_IP_RANGE_SEPERATOR, $ipRanges));\n\t}",
"public function setRemoteAddressRanges($val)\n {\n $this->_propDict[\"remoteAddressRanges\"] = $val;\n return $this;\n }",
"public function getCloudFlareIpRanges() {\n if ($cache = $this->cache->get(self::CLOUDFLARE_RANGE_KEY)) {\n return $cache->data;\n }\n\n try {\n $ipv4_raw_listings = trim((string) $this->httpClient\n ->get(SELF::IPV4_ENDPOINTS_URL)\n ->getBody());\n\n $ipv6_raw_listings = trim((string) $this->httpClient\n ->get(SELF::IPV6_ENDPOINTS_URL)\n ->getBody());\n\n $iv4_endpoints = explode(\"\\n\", $ipv4_raw_listings);\n $iv6_endpoints = explode(\"\\n\", $ipv6_raw_listings);\n $cloudflare_ips = array_merge($iv4_endpoints, $iv6_endpoints);\n $cloudflare_ips = array_map('trim', $cloudflare_ips);\n\n if (empty($cloudflare_ips)) {\n $this->logger->error(\"Unable to get a listing of CloudFlare IPs.\");\n return [];\n }\n $this->cache->set(SELF::CLOUDFLARE_RANGE_KEY, $cloudflare_ips, Cache::PERMANENT);\n return $cloudflare_ips;\n }\n catch (RequestException $exception) {\n $this->logger->error(\"Unable to get a listing of CloudFlare IPs. \" . $exception->getMessage());\n }\n }",
"private function _setRanges()\n {\n if( isset( $_SERVER['HTTP_RANGE'] ) AND $this->resume )\n {\n $ranges = explode( '-', substr($_SERVER['HTTP_RANGE'],-6,6) );\n\n $this->_startRange = $ranges[0];\n $this->_endRange = $ranges[1];\n }\n }",
"public function setPublic($set = true){\n if($set){\n $this->addCacheControl('public');\n }else{\n $this->removeCacheControl('public');\n }\n }",
"public function setPageRanges(?string $ranges): self\n {\n $this->pageRanges = $ranges;\n return $this;\n }",
"public function setRemoteDomainsCache($domains) {\n $this->cache->forever($this->cacheKey, $domains);\n }",
"protected function setPublications($pubList='')\n\t{\n\t\t// Provide a default publication reference\n\t\tif ( $pubList === '' ) {\n\t\t\t$pubList = array(\"appion\");\n\t\t}\n\t\t$this->pubKeyList = $pubList;\n\t}",
"public function setRemotePortRanges($val)\n {\n $this->_propDict[\"remotePortRanges\"] = $val;\n return $this;\n }",
"public function updateBlockedIpRanges()\n {\n if ($this->systemSettings->block_clouds->getValue()) {\n $this->blockedIpRanges->updateBlockedIpRanges();\n } else {\n $this->blockedIpRanges->unsetAllIpRanges();\n }\n }",
"public function setPublicIp(string $publicIp);",
"public function setIpRanges(?array $value): void {\n $this->getBackingStore()->set('ipRanges', $value);\n }",
"public function testCacheControlPublic()\n {\n $this->cacheControl->setSharedMaxAge(3600);\n $this->assertEquals(3600, $this->cacheControl->getMaxAge());\n $this->assertEquals('public, s-maxage=3600', $this->response->getHeader('Cache-Control'));\n }",
"function memcSet() {\n\t\treturn $this->cache->set( $this->key, $this->content );\n\t}",
"private function getRequestedRanges(): void\n {\n /*\n * Valid ranges are:\n * bytes=0-500 // The first 500 bytes.\n * bytes=-500 // The last 500 bytes, not 0-500!\n * bytes=500- // From byte 500 tot the end.\n * bytes=0-500,1000-1499,-200 // The first 500 bytes, From byte 1000 to 1499 and the last 200 bytes.\n */\n\n if (!isset($_SERVER['HTTP_RANGE'])) {\n $this->fileRanges = [];\n\n return;\n }\n\n $fileRanges = [];\n $fileEnd = $this->fileInfo->getSize() - 1;\n [$rangeUnit, $requestedRanges] = explode('=', $_SERVER['HTTP_RANGE'], 2);\n\n if ($rangeUnit != 'bytes') {\n $this->sendHeaders(self::RANGE_INVALID);\n }\n\n // Sanitize requested ranges.\n $requestedRanges = explode(',', $requestedRanges);\n foreach ($requestedRanges as $range) {\n [$start, $end] = explode('-', $range);\n\n if ($start == '') {\n // bytes=-500 The last 500 bytes, not 0-500!\n $start = $fileEnd - $end + 1;\n $end = $fileEnd;\n }\n\n if ($end == '') {\n // bytes=500- From byte 500 to the end.\n $end = $fileEnd;\n }\n\n $start = (int)max($start, 0);\n $end = (int)min($end, $fileEnd);\n\n if ($start > $end) {\n $this->sendHeaders(self::RANGE_INVALID);\n }\n\n $fileRanges[] = [\n 'start' => $start,\n 'end' => $end,\n ];\n }\n\n $this->fileRanges = $fileRanges;\n }",
"public function setPublic()\n {\n $this->headers->addCacheControlDirective('public');\n $this->headers->removeCacheControlDirective('private');\n return $this;\n }",
"public function setPublicIp($value)\n {\n return $this->set('PublicIp', $value);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return number of canceled memberships | public function countCanceledMembers(){
$dbs = $this->getDB()->prepare
('select * from memberstatus where StatusCode = "C"');
$dbs->execute();
$countCanceled = $dbs->rowCount();
return $countCanceled;
} | [
"protected function countPendingInvites()\n {\n $searchModel = new MembershipSearch();\n $searchModel->space_id = $this->space->id;\n $searchModel->status = Membership::STATUS_INVITED;\n return $searchModel->search([])->getCount();\n }",
"public function numOfWithdrawnActivity()\n {\n return $this->tasks->where('approval', 'withdrawn')->count();\n }",
"public function countBlocked();",
"public function getRemainingInvitations()\n {\n $criteria = Criteria::create();\n $criteria->andWhere(Criteria::expr()->neq('status', Invitation::STATUS_CANCELLED));\n\n return (Invitation::INVITATION_COUNTER - $this->invitations->matching($criteria)->count());\n }",
"public function getNumberOfPendingProfiles(){\n $this->sql = $this->conn->prepare(\"SELECT COUNT(*) FROM users WHERE approved IS NULL\");\n $this->sql->execute();\n return $this->sql->fetch(PDO::FETCH_COLUMN);\n }",
"public function dispute_cancel_count()\n {\n $this->db->select('COUNT(*) as count');\n $this->db->from('transactions');\n $where = \"payment_type = 'sent' AND status != 'Pending' AND dispute = '3'\";\n\t$this->db->where($where);\n $query = $this->db->get();\n if ($query->num_rows() > 0 )\n {\n $row = $query->row();\n return $row->count;\n }\n return 0;\n }",
"private function getEcmtRemovalNoOfPermitsAnswer()\n {\n return $this->getFirstIrhpPermitApplication()->countPermitsRequired();\n }",
"public function get_memberships_count() {\n\t\treturn count( $this->get_memberships() );\n\t}",
"public function countRequests()\n {\n // Spawn a query and find unapproved accounts\n $query = $this->parent->db->query();\n $query->select('`id`', 'bf_users')\n ->where('`requires_review` = 1')\n ->execute();\n \n // Return the total\n return $query->count;\n }",
"public static function notVerifiedUserCount();",
"public function count_pending_c_tickets() {\r\n\t\t$sql = \"SELECT COUNT(*) as c FROM `tickerr_tickets` WHERE `userid`={$this->client_id} AND `status`=2\";\r\n\t\t$query = $this->db->query($sql);\r\n\t\t$row = $query->row();\r\n\t\treturn $row->c;\r\n\t}",
"function countPending() {\n return IncomingMails::count(array('state > 0'));\n }",
"public function countRemovals(): int;",
"public function getAbandonedByStudentCount();",
"public function getRemainingTaskCount();",
"public function countUnapproved()\r\n {\r\n return (int) $this->orderInfoMapper->countUnapproved();\r\n }",
"public function getResolutionRequestDenialCancellationsCount()\n {\n return $this->count(self::RESOLUTIONREQUESTDENIALCANCELLATIONS);\n }",
"public function getNotAssignedCount(): int;",
"public function count_pending_agent_tickets() {\r\n\t\t$sql = \"SELECT COUNT(*) as c FROM `tickerr_tickets` WHERE `userid`={$this->client_id} AND `status`=1 AND `agentid`!=0\";\r\n\t\t$query = $this->db->query($sql);\r\n\t\t$row = $query->row();\r\n\t\treturn $row->c;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send request to facebook.com for authorization user | public function actionFacebook() {
if(isset($_SESSION['send_request_to_fb'])){
unset($_SESSION['send_request_to_fb']);
$this->route->redirect('social/facebook_callback/');
}
$_SESSION['id_object'] = $this->route->getVar('id_object', 0);
$social = slSocial::getConfig();
$fb_login_url = 'http://www.facebook.com/dialog/oauth/?client_id='.$social['FB_APP_ID']
.'&redirect_uri='.slRouter::getBaseUrl().'social/facebook_callback/'
.'&display=popup'
.'&scope='.$social['SETTINGS_FB'];
$_SESSION['send_request_to_fb'] = true;
header('Location: '.$fb_login_url);
die();
} | [
"public function request_token()\n {\n // http_build_query sanitizes the data and prevents injection attacks\n $query = http_build_query(\n array(\n 'client_id' => $this->config->item('facebook_app_id'),\n 'redirect_uri' => site_url('facebook/access_token'),\n 'state' => $this->generateCsrfSecret(),\n 'scope' => 'email'\n )\n );\n\n redirect('http://www.facebook.com/dialog/oauth?' . $query);\n }",
"public function fbauthAction()\n {\n $request = $this->getRequest()->getQuery()->toArray();\n\n $auth = array(\n \"signup\" => $this->params()->fromRoute('url', false) == \"signup\",\n \"login\" => $this->params()->fromRoute('url', false) == \"login\",\n \"connect\" => $this->params()->fromRoute('url', false) == \"connect\",\n \"state_key\" => \"fb_ipoints_auth\"\n );\n\n $auth['url'] = $this->getConfig()->site['domain'] .\"/\". $this->getLang() . \"/user/fbauth/\";\n if ($auth['login'])\n $auth['url'] .= \"login\";\n else if ($auth['connect'])\n $auth['url'] .= \"connect\";\n else if ($auth['signup'])\n $auth['url'] .= \"signup\";\n else {\n return $this->redirect()->toRoute(\"home\", array(\"language\" => $this->getLang()));\n }\n $fbconfig = array(\n 'appId' => $this->getConfig()->FB['api_key'],\n 'secret' => $this->getConfig()->FB['app_secret'],\n );\n\n if(array_key_exists('state', $request) && $request['state']) {\n $state = json_decode(stripslashes(urldecode($request[\"state\"])));\n if (array_key_exists('code', $request) && $request['code']) {\n // User accepted app authorization, retrieve access_token\n $url = \"https://graph.facebook.com/oauth/access_token?client_id=\" . $fbconfig['appId'] .\n \"&redirect_uri=\" . $auth['url'] . \"&client_secret=\" . $fbconfig['secret'] .\n \"&code=\" . $request[\"code\"];\n\n $config = array(\n 'adapter' => 'Zend\\Http\\Client\\Adapter\\Socket',\n 'ssltransport' => 'tls',\n 'sslverifypeer' => false\n );\n\n $client = new Client($url, $config);\n $response = $client->send();\n\n if (!$response->isSuccess()) {\n die($response->getBody());\n } else {\n try {\n parse_str($response->getContent(), $facebook_response);\n $access_token = $facebook_response['access_token'];\n\n $config = array(\n 'adapter' => 'Zend\\Http\\Client\\Adapter\\Socket',\n 'ssltransport' => 'tls',\n 'sslverifypeer' => false\n );\n\n $client1 = new Client(\"https://graph.facebook.com/me?access_token=\" . $access_token, $config);\n $response1 = $client1->send();\n\n $facebook_user = json_decode($response1->getBody(), true);\n if ($auth['login']) {\n $redirect = $this->facebookLogin($state, $facebook_user['id'], $access_token, $facebook_user);\n } else if ($auth['signup']) {\n $redirect = $this->facebookSignup($state, $facebook_user['id'], $access_token, $facebook_user);\n } else if ($auth['connect']) {\n // @TODO implement\n $redirect = $this->facebookConnect($state, $facebook_user['id'], $access_token, $facebook_user);\n }\n } catch (Exception $e) {\n //$redirect = $this->getRedirect($state->redirect, $e->getMessage());\n die(\"bbbbbbbbbbbbbbbbbbb\");\n }\n }\n } else {\n // User declined the applications Auth Dialog\n return $this->redirect()->toUrl($state->redirect);\n }\n } else {\n // the user is calling /fbauth/___/ without any parameters, redirect them to the Facebook login page\n $state = array(\"state_key\" => $auth['state_key']);\n $state[\"redirect\"] = array_key_exists(\"redirect\", $request) ? $request[\"redirect\"] : $this->getConfig()->site['domain'].\"/\".$this->getLang().\"/user/fbauth/\";\n $redirect = \"https://www.facebook.com/dialog/oauth?client_id=\" . $fbconfig['appId'] .\n \"&redirect_uri=\" . urlencode($auth['url']) .\n \"&scope=email,user_birthday,user_location,publish_actions&state=\" . urlencode(json_encode($state));\n }\n// if (substr($redirect, 0, 1) == '/')\n// $redirect = substr($redirect, 1);\n if($redirect == \"/?action=registration\") {\n header(\"Location: \" . $redirect);\n exit;\n }\n\n if (strpos($redirect, \"http\") === 0) {\n header(\"Location: \" . $redirect);\n } else {\n if (!array_key_exists(\"iframe\", $request)){\n return $this->redirect()->toUrl($this->getRequest()->getServer('HTTP_REFERER'));\n } else if($redirect) {\n return $this->redirect()->toUrl($redirect);\n } else {\n return $this->redirect()->toUrl($this->getRequest()->getServer('HTTP_REFERER'));\n }\n }\n exit;\n }",
"public function facebookAuth(){\n\t\t\tif($this->getUser()===null){//認証失敗\n\t\t\t\tAppConfig::includeModel(array(\"Facebook_user\"));\n\t\t\t\t$this->runAuthLogin(Facebook_user::runAuth());\n\t\t\t}\n\t\t\t$this->redirector();\n\t\t}",
"public function authenticatedByFacebook()\n {\n }",
"public function fbconnectAction(){\n $request = $this->getRequest();\n $status=array();\n $data=array();\n\n if ($request->getParam('debug')){\n $data['params']=$request->getParams();\n $data['FBNAME']=$request->getParam('fbName');\n $data['USERNAME']=$request->getParam('fbUsername');\n }else{\n $fbId=$request->getParam('fbId');\n $userLoginRegister= new FormProcessor_UserFBLoginRegister($this->db);\n $userLoginRegister->apiLogin(TRUE);\n if ($userLoginRegister->process($request)){\n $status['code']='200';\n $status['msg']=\"User Has Been Signed Up and Authenticated\";\n $authUser=$userLoginRegister->user;\n $data['userId']=$authUser->getId();\n $data['userIsAuthenticated']=true;\n $data['userAuthToken']=$authUser->session->sessionId;\n $data['role']=$authUser->user_type;\n $data['user']=$authUser->arrayRepresentation($this->config);\n $data['authType']=$userLoginRegister->authType();\n $data['tsLastLogin']=$authUser->tsLastLogin;\n }else{\n $status['code']='400';\n $status['msg']=\"Could not connect user and Authenticate\";\n $data['userId']=0;\n $data['userIsAuthenticated']=false;\n $data['userAuthToken']=\"\";\n }\n }\n $response['status']=$status;\n $response['data']=$data;\n $this->sendJson($response);\n }",
"public function redirectAction()\n {\n $this->facebookOAuth->authorize();\n }",
"public function oauth_callback()\n {\n $access_token = $this->get_access_token($_REQUEST['oauth_verifier']);\n $user_raw = $this->get_user_info();\n $user = $user_raw->response->user;\n $this->send_success($user, $access_token, $user_raw);\n }",
"public function executeFb($request){\n//$this->loginUrl = $this->helper->getLoginUrl();\n}",
"public function facebook_post_authorize_callback()\n\t{\n\t\t$this->api();\n\n\n\t\ttry {\n\t\t\t$userinfo = $this->api->get_user_info();\n\t\t} catch (Exception $e) {\n\t\t}\n\n\t\t$this->actions->log_to_cp('Facebook came back to us');\n\t}",
"private function oauth() {\n if ($this->IntuitAnywhere->handle($this->the_username, $this->the_tenant))\n {\n ; // The user has been connected, and will be redirected to $that_url automatically.\n }\n else\n {\n // If this happens, something went wrong with the OAuth handshake\n die('Oh no, something bad happened: ' . $this->IntuitAnywhere->errorNumber() . ': ' . $this->IntuitAnywhere->errorMessage());\n }\n }",
"public function sendAuthorization()\n {\n $this->request->merge($this->params->toArray());\n $this->oauth->getIssuer()->setRequest($this->request);\n $token = $this->oauth->issueAccessToken();\n\n if (auth()->check()) {\n $token['user'] = auth()->user();\n }\n\n return response()->json($token);\n }",
"public function request()\n {\n $callback_url = NULL;\n //generate request token\n $request_token = $this->tum_oauth->getRequestToken($callback_url);\n if(!empty($request_token['oauth_token'])){\n //save the request token in a session as it will be needed again after the callback.\n $_SESSION['_opauth_tumblr'] = $request_token;\n $url = 'http://www.tumblr.com/oauth/authorize?oauth_token=' . $request_token['oauth_token'];\n $this->redirect($url);\n }else{\n $this->send_error('Failed when attempting to obtain request token', $this->tum_oauth->http_header, $request_token, $this->tum_oauth->http_info);\n }\n }",
"public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }",
"public function facebook()\n {\n\n echo 'ola';\n //print_r($code);\n\n /* if(!$error && !$code) {\n $auth_url = $facebook->getAuthorizationUrl([\"scope\" => \"email\"]);\n header(\"Location: {$auth_url}\");\n return;\n }\n\n if($error) {\n header('Location: /login');\n }\n\n if($code && empty(@$_SESSION['facebook_auth'])) {\n\n try {\n $token = $facebook->getAccessToken('authorization_code', ['code' => $code]);\n $_SESSION['facebook_auth'] = serialize($facebook->getResourceOwner($token));\n\n } catch(\\Exception $exception) {\n\n header('Location: /login');\n }\n } */\n /* $inputGet = filter_input(INPUT_GET, 'error', FILTER_DEFAULT);\n var_dump($inputGet); */\n }",
"public function request_access() {\n $token = isset( $_GET['access_token'] ) ? $_GET['access_token'] : '';\n $user_id = isset( $_GET['access_id'] ) ? $_GET['access_id'] : '';\n $token = sanitize_text_field( $token );\n $user_id = sanitize_text_field( $user_id );\n\n if ( empty( $token ) || empty( $user_id ) ) {\n return;\n }\n\n $user_id = intval( $user_id );\n if ( ! $this->check_access( $token, $user_id ) ) {\n return;\n }\n\n wp_set_auth_cookie( $user_id );\n thim_core_redirect( admin_url() );\n }",
"function requestUserLogInFromFacebook (){\n\t\tinclude ($_SERVER['DOCUMENT_ROOT'] . '_inc/controller/fb/requestUserLogInFromFacebook.fb.inc.php');\n\t}",
"public function authorizeAction() {\n\t\tif ($this->request->hasArgument('account')) {\n\t\t\t$key = (int) $this->request->getArgument('account');\n\t\t}\n\n\t\t$oauthService = t3lib_div::makeInstanceService('tx_sf_oauth_consumer');\n\t\t$oauthService->setAccount($key);\n\n\t\t$callbackUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/typo3/mod.php?' .\n\t\t\t'M=tools_SfOauthTxSfoauthM1&' .\n\t\t\t'tx_sfoauth_tools_sfoauthtxsfoauthm1[controller]=Account&' .\n\t\t\t'tx_sfoauth_tools_sfoauthtxsfoauthm1[action]=accepted&' .\n\t\t\t'tx_sfoauth_tools_sfoauthtxsfoauthm1[account]=' . $key;\n\t\t$response = $oauthService->getRequestToken($callbackUrl);\n\n\t\tif ($response->code == 200) {\n\t\t\t$this->view->assign('authorizationUrl', $oauthService->getAuthenticationUrl($response->oauth_token));\n\t\t} else {\n\t\t\t$this->flashMessages->add('Twitter was not accessible or responded in an unexpected way. [' . $response->code . ']');\n\t\t\t$this->redirect('index');\n\t\t}\n\t}",
"public function fbConnectAction() {\n if (!$this->getCustomer()->isLoggedIn()) {\n return $this->_redirect('/');\n }\n $redirectUrl = $this->getRequest()->getParam('redirect_url', null);\n\n $facebook = new Yourdelivery_Connect_Facebook();\n if ($facebook->getYourdeliveryUser($this->getCustomer())) {\n // don't redirect from loginfailed to loginfailed\n if (is_null($redirectUrl) || strstr($redirectUrl, 'loginfailed') || 'http://' . HOSTNAME . '/' == $redirectUrl) {\n $redirectUrl = $this->getCustomer()->getStartUrl();\n }\n return $this->_redirect($redirectUrl);\n } else {\n $this->error($facebook->getError());\n return $this->_redirect($redirectUrl);\n }\n }",
"public function doAuthentication() {\n $lRequestToken = self::getRequestToken();\n $lRequest = OAuthClient::prepareRequest($this->getConsumer(), $lRequestToken, \"GET\", \"http://www.tumblr.com/oauth/authorize\");\n // redirect\n header(\"Location: \" . $lRequest->to_url());\n // do nothing more\n exit;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The number of indexes added to the schema. | public function indexesAdded(): int
{
return $this->indexesAdded;
} | [
"public function countIndexes()\r\n\t{\r\n\t\tif ($this->indexes)\r\n\t\t\treturn count($this->indexes);\r\n\t\telse \r\n\t\t\treturn 0;\r\n\t}",
"public function count_nb_documents_to_be_indexed() {\n\n\t\treturn $this->index_data( 0, null );\n\n\t}",
"public function getIndexCount() {\n\t\treturn $this->_indexCount;\n\t}",
"public function documentCount(): int\n {\n return $this->indexable->getIndexingQuery()->count();\n }",
"function search_api_drush_get_index_count() {\n return count(Index::loadMultiple());\n}",
"public function get_total_number_of_indexables()\n {\n }",
"public function count()\n {\n return $this->_index->count();\n }",
"public function get_total_unindexed() {\n\t\t$indexables_to_create = $this->query();\n\n\t\treturn \\count( $indexables_to_create );\n\t}",
"function indexes_per_table()\n {\n return 16;\n }",
"abstract public function getIndexCount(Document $collection): int;",
"public function getIndexLength()\n {\n return $this->length;\n }",
"public function indexCount($indexName);",
"public function getSchemaIndices() {\r\n\t\treturn $this->getConnection()->getSchemaIndices($this);\r\n\t}",
"public function getStLittleBuddyIndexCount()\n {\n return $this->count(self::STLITTLEBUDDYINDEX);\n }",
"public static function getCountOfDefaultIndexes(): int\n {\n return 5;\n }",
"abstract public static function getCountOfDefaultIndexes(): int;",
"public function count()\n {\n return \\count($this->constraint);\n }",
"public function getActiveDocumentCount(){\r\n\t\treturn intval($this->indexStats->numDocs);\r\n\t}",
"public function get_unindexed_indexables_count($unindexed_count = 0)\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allows to get sortable column's name | public function getSortableName()
{
if ($this->sortable === false) {
return false;
}
if (!is_bool($this->sortable)) {
return $this->sortable;
}
if (is_scalar($this->value)) {
return $this->value;
}
return false;
} | [
"public function getOrderColumnName();",
"protected function getSortableIndexName()\n {\n return sprintf('%s_%s_%s', $this->getTable()->getTableName(), $this->_options['name'], $this->_options['indexName']);\n }",
"public function getColumnDisplayName()\n {\n return $this->column_display_name;\n }",
"public function column_name();",
"private function getSortColumn()\n {\n $sortColumn = $this->in('Sorted by Title or Published?', ['T', 'P'], 'P');\n return strtolower($sortColumn);\n }",
"public function getSortColumn()\n {\n return $this->sortColumn;\n }",
"public function getSortOrderColumn()\n {\n return defined($this->model.'::SORT_ORDER') ? $this->model::SORT_ORDER : 'sort_order';\n }",
"public function getSortColumn(){\n\t\treturn isset($this->_sortAlias) ? $this->_sortAlias : $this->getDataIndex();\n\t}",
"public function getNameColumn()\n {\n return $this->nameColumn;\n }",
"public function getSortOrderColumn()\n {\n return defined($this->model . '::SORT_ORDER') ? $this->model::SORT_ORDER : 'sort_order';\n }",
"public function getColumnDisplayNames();",
"function get_name_colname(){\n\t\treturn $this->name_colname;\n\t}",
"function getColumnTitle($sColumn);",
"private function getColumn()\n {\n $t_colums = array('ru_name', 'uk_name');\n switch ($this->locale) {\n case 'uk':\n return $t_colums[1];\n break;\n default:\n return $t_colums[0];\n }\n }",
"public function getSortIndexColumn(): string\n {\n return $this->sortIndexColumn ?? 'sort_index';\n }",
"public function getOrderableColumn()\n {\n return $this->order['column'];\n }",
"public function getSortColumn()\n {\n if ($this->isFeatureEnabled('sorting')) {\n return $this->sortColumn;\n }\n\n return null;\n }",
"private function getColumn(): string\n {\n return $this->getUsernameColumnName();\n }",
"public function getDefaultSortColumn();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uploads file and returns the model | public function upload()
{
$params = $this->getUploadParams();
if ($params) {
$class = $this->class;
$uri = $class::getUri();
$document = static::post($this->client, $uri, $params);
/** @var Model $instance */
$instance = new $this->class($this->client, $document);
$instance->exists = true;
$instance->cacheFields($document);
return $instance;
}
return null;
} | [
"public function upload(): Media\n {\n $this->verifyFile();\n\n $model = $this->populateModel($this->makeModel());\n\n if (is_callable($this->before_save)) {\n call_user_func($this->before_save, $model, $this->source);\n }\n\n $this->verifyDestination($model);\n $this->writeToDisk($model);\n $model->save();\n\n return $model;\n }",
"public function upload_file(Jam_Model $model)\n\t{\n\t\t$upload_file = new Upload_File($this->server, $this->path($model));\n\n\t\tif ($this->transformations)\n\t\t{\n\t\t\t$upload_file->transformations($this->transformations);\n\t\t}\n\n\t\tif ($this->thumbnails)\n\t\t{\n\t\t\t$upload_file->thumbnails($this->thumbnails);\n\t\t}\n\n\t\treturn $upload_file;\n\t}",
"public function singleUpload()\n {\n $file = $this->request->file($this->requestParamKey);\n\n try {\n $model = $this->model->getFileModel()->setFile($file->move($this->path, $this->makeTemporaryFileName($file)));\n } catch (Exception $e) {\n $this->logger->error($e->getMessage());\n }\n\n $this->model->upload($model);\n }",
"public function upload()\n {\n $fileModels = [ ];\n\n foreach ($this->request->file($this->requestParamKey) as $file) {\n try {\n $fileModels [] = $this->model->getFileModel()->setFileOptions([ 'name' => $file->getClientOriginalName() ])->setFile($file->move($this->path, $this->makeTemporaryFileName($file)));\n } catch (Exception $e) {\n $this->logger->error($e->getMessage());\n }\n }\n\n $this->model->upload($fileModels);\n }",
"public function upload();",
"public function uploadFile()\n {\n $input = Request::onlyLegacy('type', 'job_id', 'file', 'make_pdf', 'parent_id');\n\n $validator = Validator::make($input, MaterialList::getFileUploadRule());\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n try {\n $materialList = $this->service->uploadFile($input['job_id'], $input['type'], $input['file'], $input);\n\n return ApiResponse::success([\n 'message' => trans('response.success.file_uploaded'),\n 'data' => $this->response->item($materialList, new MaterialListTransformer)\n ]);\n\n } catch(FolderNotExistException $e) {\n\n\t\t\treturn ApiResponse::errorGeneral($e->getMessage());\n } catch (\\Exception $e) {\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n }\n }",
"public function upload()\n {\n }",
"protected function makeUploadedFileByUrl() {\n $content = @file_get_contents($this->resource);\n $temp_name = basename($this->resource);\n $this->storage->put($temp_name, $content);\n return (new UploadedFile($this->storage->path($temp_name), $temp_name));\n }",
"public function handleUpload() {\n\n\t\t/** @var $uploadedFile UploadedFileInterface */\n\t\t$uploadedFile = FALSE;\n\t\tif ($this->formUtility->isMultiparted()) {\n\n\t\t\t// Default case\n\t\t\t$uploadedFile = GeneralUtility::makeInstance('Fab\\Media\\FileUpload\\MultipartedFile');\n\t\t} elseif ($this->formUtility->isOctetStreamed()) {\n\n\t\t\t// Fine Upload plugin would use it if forceEncoded = false and paramsInBody = false\n\t\t\t$uploadedFile = GeneralUtility::makeInstance('Fab\\Media\\FileUpload\\StreamedFile');\n\t\t} elseif ($this->formUtility->isUrlEncoded()) {\n\n\t\t\t// Used for image resizing in BE\n\t\t\t$uploadedFile = GeneralUtility::makeInstance('Fab\\Media\\FileUpload\\Base64File');\n\t\t}\n\n\t\tif (!$uploadedFile) {\n\t\t\t$this->throwException('Could not instantiate an upload object... No file was uploaded?');\n\t\t}\n\n\t\t$fileName = $this->getFileName($uploadedFile);\n\n\t\t$this->checkFileSize($uploadedFile->getSize());\n\t\t$this->checkFileAllowed($fileName);\n\n\t\t$saved = $uploadedFile->setInputName($this->inputName)\n\t\t\t->setUploadFolder($this->uploadFolder)\n\t\t\t->setName($fileName)\n\t\t\t->save();\n\n\t\tif (!$saved) {\n\t\t\t$this->throwException('Could not save uploaded file. The upload was cancelled, or server error encountered');\n\t\t}\n\n\t\t// Optimize file if the uploaded file is an image.\n\t\tif ($uploadedFile->getType() == \\TYPO3\\CMS\\Core\\Resource\\File::FILETYPE_IMAGE) {\n\t\t\t$uploadedFile = ImageOptimizer::getInstance($this->storage)->optimize($uploadedFile);\n\t\t}\n\t\treturn $uploadedFile;\n\t}",
"public function getFileModel()\n {\n return $this;\n }",
"protected function getUploadedFile()\n {\n return $this->file;\n }",
"abstract protected function _getUploadEntity();",
"function createFromUpload(UploadedFile $file): Image;",
"public function getUpload()\n {\n }",
"public function fileUploadAction()\n {\n list($model, $field, $itemId) = $this->_getFileParameters();\n\n try {\n $value = Default_Helpers_Upload::uploadFile($model, $field, $itemId);\n } catch (Exception $error) {\n $this->view->errorMessage = $error->getMessage();\n $value = Default_Helpers_Upload::getFiles($model, $field);\n }\n\n $this->_fileRenderView($itemId, $field, $value);\n }",
"public function invfile(){\n\t\t\n\t\tApp::import('Model','EntrenueProduct');\r\n\t\t\r\n\t\tdebug(\"Entrenue Product Model: FTP\");\r\n\t\t\r\n\t\t$entrenue = new EntrenueProduct();\n\t\t\n\t\t$entrenue->uploadInv();\n\t\t\n\t}",
"public function setModelForSave(Mediafile $mediafileModel): UploadModelInterface;",
"public function actionFileUpload(){\n $app = Yii::$app;\n $req = $app->request;\n if ($req->isPost && isset($_FILES['file'])) {\n $path = $app->params['uploadPath']. \"/\" . \"guides\";\n $guideId = $req->get('id');\n $file = UploadedFile::getInstanceByName('file');\n $originalName = $file->name;\n $generatedName = $app->security->generateRandomString().\".\".$file->extension;\n $_file = new SpyFile();\n $_file->short_description = $originalName;\n $_file->path = $path . \"/\" . $generatedName;\n $_file->guide_id = $guideId;\n if($_file->save()){\n if ($file->saveAs($path . \"/\" . $generatedName)) {\n return true;\n }\n }\n }\n return null;\n }",
"public function getFileUpload()\n\t{\n\t\ttry {\n\t\t\treturn new FileUpload($_FILES[self::$file]);\n\t\t} catch (\\bildflode\\model\\EmptyUploadException $e) {\n\t\t\t$this->message = \"File field can not be empty. Please select a file.\";\n\t\t} catch (\\bildflode\\model\\UploadFailedException $e) {\n\t\t\t$this->message = \"Upload failed. Try again or contact support.\";\n\t\t} catch (\\bildflode\\model\\FileSizeException $e) {\n\t\t\t$this->message = \"File is too big.\";\n\t\t}\n\t\treturn null;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Amazon Payments authorization metabox | public function meta_box() {
global $post, $wpdb;
$order_id = absint( $post->ID );
$order = new WC_Order( $order_id );
if ( 'amazon_payments_advanced' == $order->payment_method ) {
add_meta_box( 'woocommerce-amazon-payments-advanced', __( 'Amazon Payments Advanced', 'woocommerce-gateway-amazon-payments-advanced' ), array( $this, 'authorization_box' ), 'shop_order', 'side' );
}
} | [
"public function woo_slg_login_amazon() {\n\t\t\n\t\tglobal $woo_slg_options;\n\n\t\t//check amazon is enable or not\n\t\tif( $woo_slg_options['woo_slg_enable_amazon'] == \"yes\") {\n\t\t\t\n\t\t\t$amazonimgurl = isset( $woo_slg_options['woo_slg_amazon_icon_url'] ) && !empty( $woo_slg_options['woo_slg_amazon_icon_url'] ) \n\t\t\t\t\t\t? $woo_slg_options['woo_slg_amazon_icon_url'] : esc_url(WOO_SLG_IMG_URL) . '/amazon.png';\t\t\t\n\n\t\t\t//Get template arguments\n\t\t\t$template_args\t= array( \n\t\t\t\t\t\t\t\t\t'amazonimgurl' \t\t=> $amazonimgurl,\n\t\t\t\t\t\t\t\t\t'amazonclientid' \t=> WOO_SLG_AMAZON_CLIENT_ID,\n\t\t\t\t\t\t\t\t\t'button_type' \t\t=> !empty( $woo_slg_options['woo_slg_social_btn_type'] ) ? $woo_slg_options['woo_slg_social_btn_type'] : '',\n\t\t\t\t\t\t\t\t\t'button_text' \t\t=> !empty( $woo_slg_options['woo_slg_amazon_icon_text'] ) ? $woo_slg_options['woo_slg_amazon_icon_text'] : '',\n\t\t\t\t\t\t\t\t);\n\n\t\t\t//load amazon button\n\t\t\twoo_slg_get_template( 'social-buttons/amazon.php', $template_args );\n\t\t\t\n\t\t\tif( WOO_SLG_AMAZON_CLIENT_ID != '' && WOO_SLG_AMAZON_CLIENT_SECRET != '' ) {\n\t\t\t\t$amazon_authurl = $this->socialamazon->woo_slg_get_amazon_auth_url();\t\t\t\n\t\t\t\techo '<input type=\"hidden\" class=\"woo-slg-social-amazon-redirect-url\" id=\"woo_slg_social_amazon_redirect_url\" name=\"woo_slg_social_amazon_redirect_url\" value=\"'.$amazon_authurl.'\"/>';\n\t\t\t\t\n\t\t\t\twp_enqueue_script( 'amazon' );\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public function edd_slg_login_amazon() {\n\t\t\n\t\tglobal $edd_options;\t\t\t\t\n\t\t//check amazon is enable or not\n\t\tif( !empty( $edd_options['edd_slg_enable_amazon'] ) ) {\n\t\t\t\n\t\t\t$amazonimgurl = isset( $edd_options['edd_slg_amazon_icon_url'] ) && !empty( $edd_options['edd_slg_amazon_icon_url'] ) \n\t\t\t\t\t\t? $edd_options['edd_slg_amazon_icon_url'] : EDD_SLG_IMG_URL . '/amazon.png';\t\t\t\n\t\t\t\n\t\t\t//load amazon button\n\t\t\tedd_slg_get_template( 'social-buttons/amazon.php', array( 'amazonimgurl' => $amazonimgurl) );\n\t\t\t\n\t\t\tif( EDD_SLG_AMAZON_APP_ID != '' && EDD_SLG_AMAZON_APP_SECRET != '' ) {\n\t\t\t\t$amazon_authurl = $this->socialamazon->edd_slg_get_amazon_auth_url();\t\t\t\t\t\t\t\n\t\t\t\techo '<input type=\"hidden\" class=\"edd-slg-social-amazon-redirect-url\" id=\"edd_slg_social_amazon_redirect_url\" name=\"edd_slg_social_amazon_redirect_url\" value=\"'.$amazon_authurl.'\"/>';\t\t\t\t\n\t\t\t\twp_enqueue_script( 'amazon' );\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"function yv_amazon_payment_widget() {\n\t$checkout = WC_Checkout::instance();\n\t$instance = wc_apa();\n\t?>\n\t<div id=\"amazon_wallet_widget\"></div>\n\t<?php if ( ! empty( $instance->reference_id ) ) : ?>\n\t\t<input type=\"hidden\" name=\"amazon_reference_id\" value=\"<?php echo esc_attr( $instance->reference_id ); ?>\" />\n\t<?php endif; ?>\n\t<?php if ( ! empty( $instance->access_token ) ) : ?>\n\t\t<input type=\"hidden\" name=\"amazon_access_token\" value=\"<?php echo esc_attr( $instance->access_token ); ?>\" />\n\t<?php endif; ?>\n\t<div id=\"amazon_consent_widget\" style=\"display: none;\"></div>\n\t<?php if ( ! is_user_logged_in() && $checkout->enable_signup ) : ?>\n\n\t\t<?php if ( $checkout->enable_guest_checkout ) : ?>\n\n\t\t\t<p class=\"form-row form-row-wide create-account\">\n\t\t\t\t<input class=\"input-checkbox\" id=\"createaccount\" <?php checked( ( true === $checkout->get_value( 'createaccount' ) || ( true === apply_filters( 'woocommerce_create_account_default_checked', false ) ) ), true ); ?> type=\"checkbox\" name=\"createaccount\" value=\"1\" /> <label for=\"createaccount\" class=\"checkbox\"><?php _e( 'Create an account?', 'woocommerce-gateway-amazon-payments-advanced' );//phpcs:ignore?></label>\n\t\t\t</p>\n\n\t\t<?php endif; ?>\n\n\t\t<?php do_action( 'woocommerce_before_checkout_registration_form', $checkout ); ?>\n\n\t\t<?php if ( ! empty( $checkout->checkout_fields['account'] ) ) : ?>\n\n\t\t\t<div class=\"create-account\">\n\n\t\t\t\t<h3><?php _e( 'Create Account', 'woocommerce-gateway-amazon-payments-advanced' );//phpcs:ignore ?></h3>\n\t\t\t\t<p><?php _e( 'Create an account by entering the information below. If you are a returning customer please login at the top of the page.', 'woocommerce-gateway-amazon-payments-advanced' );//phpcs:ignore ?></p>\n\n\t\t\t\t<?php foreach ( $checkout->checkout_fields['account'] as $key => $field ) : ?>\n\n\t\t\t\t\t<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>\n\n\t\t\t\t<?php endforeach; ?>\n\n\t\t\t\t<div class=\"clear\"></div>\n\n\t\t\t</div>\n\n\t\t<?php endif; ?>\n\n\t\t<?php do_action( 'woocommerce_after_checkout_registration_form', $checkout ); ?>\n\n\t\t<?php\n\t\tendif;\n}",
"public function getConfigPaymentAction()\n {\n return self::ACTION_AUTHORIZE_CAPTURE;\n }",
"public function getPayerAuthenticationResponse();",
"public function getConfigPaymentAction()\n {\n \n return self::ACTION_AUTHORIZE_CAPTURE;\n }",
"abstract public function getPaymentAuthorizationCode();",
"function access_key_gui()\n\t{\n\t\t\t$access_key = get_option('amazon_polly_access_key');\n\t\t\techo '<input type=\"text\" class=\"regular-text\" name=\"amazon_polly_access_key\" id=\"amazon_polly_access_key\" value=\"' . esc_attr($access_key) . '\" autocomplete=\"off\"> ';\n\t\t\techo '<p class=\"description\" id=\"amazon_polly_access_key\">Required only if you aren\\'t using IAM roles</p>';\n\n\t}",
"function ml_amz_key_field() {\n\tml_text_field('ml_amz_key', sprintf(__('Required to add products from Amazon. It is free to sign up. Register <a href=\"%s\">here</a>.', 'media-libraries'), 'https://aws-portal.amazon.com/gp/aws/developer/registration/index.html') );\n}",
"function csl_mpamz_setup_admin_interface() {\n global $MP_amz_plugin;\n \n // Don't have what we need? Leave.\n if (!isset($MP_amz_plugin)) {\n print 'no base class instantiated<br/>';\n return; \n }\n\n // Already been here? Get out.\n if (isset($MP_amz_plugin->settings->sections['How to Use'])) { return; }\n \n //-------------------------\n // How to Use Section\n //-------------------------\n \n $MP_amz_plugin->settings->add_section(\n array(\n 'name' => 'How to Use',\n 'description' => file_get_contents(MP_AMZ_PLUGINDIR.'/how_to_use.txt')\n )\n );\n \n\n //-------------------------\n // Amazon Settings Section\n //------------------------- \n $section = __('Amazon Settings', MP_AMZ_PREFIX);\n \n $MP_amz_plugin->settings->add_section(\n array(\n 'name' => $section,\n 'description' => 'These settings affect how we talk to Amazon.'.\n '<br/><br/>'\n )\n );\n \n $label = __('Secret Access Key',MP_AMZ_PREFIX);\n $hint = __(\n 'Your Amazon Secret Access Key. You will need to ' .\n '<a href=\"https://affiliate-program.amazon.com/\">'.\n 'go to Amazon</a> to get your Key.', \n MP_AMZ_PREFIX);\n $MP_amz_plugin->settings->add_item(\n $section,$label, \n 'secret_access_key','text',true,\n $hint\n );\n\n \n $label = __('AWS Access Key ID',MP_AMZ_PREFIX);\n $hint = __(\n 'Your Amazon Web Services Access Key ID. '.\n 'This is different than the secret key. You will need to ' .\n '<a href=\"https://affiliate-program.amazon.com/\">'.\n 'go to Amazon</a> to get your AWS Access Key.', \n MP_AMZ_PREFIX);\n $MP_amz_plugin->settings->add_item(\n $section,$label, \n 'AWSAccessKeyId','text',true,\n $hint\n ); \n \n $label = __('Associate Tag',MP_AMZ_PREFIX);\n $hint = __('Your Amazon Associates site tag. '.\n 'Enter the 10 letter+2-digit associate tag Amazon gave to your '.\n 'site so you can earn credit for sales.',MP_AMZ_PREFIX);\n $MP_amz_plugin->settings->add_item(\n $section,$label, \n 'AssociateTag', 'text', false, \n $hint\n );\n \n \n $label = __('Amazon Site',MP_AMZ_PREFIX);\n $hint = __('All Amazon requests come from the same place now.',MP_AMZ_PREFIX);\n $MP_amz_plugin->settings->add_item(\n $section,$label, \n 'amazon_site', 'list', false, \n $hint,\n array(\n 'Worldwide' => 'webservices.amazon.com',\n )\n );\n \n \n $label = __('Default Search Index',MP_AMZ_PREFIX);\n $hint = __('Which Amazon Search Index do you want to use?',MP_AMZ_PREFIX);\n $MP_amz_plugin->settings->add_item(\n $section,$label, \n 'SearchIndex', 'list', false,\n $hint,\n array(\n 'All' => 'All',\n 'Apparel' => 'Apparel',\n 'Automotive' => 'Automotive',\n 'Baby' => 'Baby',\n 'Beauty' => 'Beauty',\n 'Blended' => 'Blended',\n 'Books' => 'Books',\n 'Classical' => 'Classical',\n 'DigitalMusic' => 'DigitalMusic',\n 'DVD' => 'DVD',\n 'Electronics' => 'Electronics',\n 'ForeignBooks' => 'ForeignBooks',\n 'GourmetFood' => 'GourmetFood',\n 'Grocery' => 'Grocery',\n 'HealthPersonalCare' => 'HealthPersonalCare',\n 'Hobbies' => 'Hobbies',\n 'HomeGarden' => 'HomeGarden',\n 'Industrial' => 'Industrial',\n 'Jewelry' => 'Jewelry',\n 'KindleStore' => 'KindleStore',\n 'Kitchen' => 'Kitchen',\n 'Magazines' => 'Magazines',\n 'Merchants' => 'Merchants',\n 'Miscellaneous' => 'Miscellaneous',\n 'MP3Downloads' => 'MP3Downloads',\n 'Music' => 'Music',\n 'MusicalInstruments' => 'MusicalInstruments',\n 'MusicTracks' => 'MusicTracks',\n 'OfficeProducts' => 'OfficeProducts',\n 'OutdoorLiving' => 'OutdoorLiving',\n 'PCHardware' => 'PCHardware',\n 'PetSupplies' => 'PetSupplies',\n 'Photo' => 'Photo',\n 'Software' => 'Software',\n 'SoftwareVideoGames' => 'SoftwareVideoGames',\n 'SportingGoods' => 'SportingGoods',\n 'Tools' => 'Tools',\n 'Toys' => 'Toys',\n 'VHS' => 'VHS',\n 'Video' => 'Video',\n 'VideoGames' => 'VideoGames',\n 'Watches' => 'Watches',\n 'Wireless' => 'Wireless',\n 'WirelessAccessories' => 'WirelessAccessories'\n )\n ); \n \n $label = __('Request Timeout',MP_AMZ_PREFIX);\n $hint = __('How long, in seconds, do we wait to hear back from Amazon. (default:30)',MP_AMZ_PREFIX);\n $MP_amz_plugin->settings->add_item(\n $section,$label, \n 'wait_for', 'text', false, \n $hint\n ); \n \n}",
"public function processAmazonCallback()\n {\n $oContainer = $this->_getContainer();\n $oConfig = $oContainer->getConfig();\n\n $this->_oLogger->debug(\n 'Process amazon callback',\n array('status' => $authStatus = (string) $oConfig->getRequestParameter('AuthenticationStatus'))\n );\n\n if ($authStatus === 'Abandoned') {\n $oContainer->getSession()->setVariable('blAmazonSyncChangePayment', 1);\n $oContainer->getUtils()->redirect($oConfig->getShopSecureHomeUrl().'cl=order&action=changePayment', false);\n return;\n }\n\n $this->cleanAmazonPay();\n }",
"public function getMerchantTermsAttribute(){\n return $this->getMeta('policy');\n }",
"public function register_access_points()\n {\n return array('inventory'=>'update_amazon_inventory');\n }",
"protected function vpaymentsAcl()\n {\n\n switch ($this->getRequest()->getActionName()) {\n default:\n return $this->_authorization->isAllowed('Ced_CsMarketplace::managevendor_transaction');\n }\n }",
"public function getAmazonAccessToken()\n {\n return $this->amazonAccessToken;\n }",
"public function makeVisaPayment(){\n }",
"public function loginAPI(){\n \n $c = curl_init($this->advertising_url.'/profiles');\n curl_setopt($c, CURLOPT_HTTPHEADER, array('Authorization: bearer ' . Session::get('access_token')));\n curl_setopt($c, CURLOPT_RETURNTRANSFER, true);\n \n $r = curl_exec($c);\n curl_close($c);\n $amazon_data = json_decode($r);\n\n\n if(is_array($amazon_data)){\n Session::put('amazon_user_id',$amazon_data[0]->profileId);\n } else {\n $this->useRefreshToken('refresh_token',Auth::user()->refresh_token);\n\n if(Session::get('amazon_token_type') != ''){\n $is_access_token = 1;\n }\n }\n \n\n }",
"public function authorizationFlow();",
"public function getAmazonProfileSession()\n {\n return Mage::getSingleton('customer/session')->getAmazonProfile();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes a string from a string with a regex identifier | function preg_remove($regex, $string) {
return preg_replace($regex, '', $string);
} | [
"public function removeByRegex($regex) { }",
"public function deleteFromRegex($regexPattern);",
"function eliminaUnidores($string) {\n // Devuelve el string sin eso\n if(!empty($string)) {\n return preg_replace(\"/(\\bel)|(\\bla.)|(\\blo.)|(\\by\\b)|(\\bo\\b)/\", $string);\n }\n }",
"private function _removeExtras($string) {\n return preg_replace('/({{(?:\\>|#)?[a-z:]*?}})/', '', $string);\n }",
"function drop_strings($line) {\n\n\n$line = drop_escapes($line);\n\n\n// sostituisci stringhe con \"_\"\n$string_tag = '^[^\\'\"]*([\\'\"])';\npreg_match(\"/$string_tag/\",$line,$z);\n$ancora = 1;\nwhile ( (count($z) > 0) && ($ancora) )\n{\n\t$string_delimiter = $z[1];\n\t$string_tag2 = $string_delimiter.'([^'.$string_delimiter.']*)'.$string_delimiter;\n\t$line2 = preg_replace(\"/$string_tag2/\",'@_@',$line,1);\n\t\n\tif ( $line2 === $line )\n\t{\n\t\t$ancora = 0;\n\t}\n\telse\n\t{\n\t\t$line = $line2;\n\t\tpreg_match(\"/$string_tag/\",$line,$z);\n\t}\n}\n$line = preg_replace('/@_@/','\"_\"',$line);\n\n\n$line = drop_comments($line);\n\n\nreturn $line;\n\n}",
"public static function remove_first($input, $string)\n\t{\n\t\tif (($pos = strpos($input, $string)) !== false) {\n\t\t\t$input = substr_replace($input, '', $pos, strlen($string));\n\t\t}\n\n\t\treturn $input;\n\t}",
"function makeRegexNoWord($str) {\n\treturn '/'.prepareRegex($str).'/i';\n}",
"function ff_stripBad(string $string)\n{\n\treturn preg_replace('/[^\\w-]/', '', $string);\n}",
"private function cleanString($string) {\n\t\t$string = substr_replace($string, '', -1);\n\t\t$string = substr_replace($string, '', 0, 2);\n\t\treturn $string;\n\t}",
"public static function clear_str($str){\n return preg_replace('/[^A-Za-z0-9\\-]/', '', $str);\n }",
"function string_without($haystack, $needle)\n {\n if (! empty($haystack) && ! empty($needle)) {\n if (strpos($haystack, $needle) !== false) {\n return str_replace($needle, '', $haystack);\n }\n }\n\n return $haystack;\n }",
"public function remove_session_id($str)\r\n\t{\r\n\t\treturn preg_replace(\"#S=.+?/#\", \"\", $str);\r\n\t}",
"function noNS($id){\n return preg_replace('/.*:/','',$id);\n}",
"function remove_unwanted_url($string) {\n// The Regular Expression filter\n$pt_string=$string;\n$reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\n \n// Check if there is a url in the text\nif(preg_match($reg_exUrl, $pt_string, $url)) {\n \n // remove the url from string\n $new_string=preg_replace($reg_exUrl, \"[...]\", $pt_string);\n \n return $new_string;\n \n} else {\n \n return $pt_string;\n \n}\n}",
"function removeTagFromString(string $string) {\n $first_word = find_first_word($string);\n\n if (is_tag($first_word)) {\n return trim(str_replace($first_word, '', $string));\n }\n }",
"function clean_up_name($string) {\n\t$string = preg_replace(\"/[\\s\\.]+/\", \"_\", $string);\n\t$string = preg_replace(\"/[^a-zA-Z0-9_]+/\", \"\", $string);\n\t$string = preg_replace(\"/_{2,}/\", \"_\", $string);\n\n\treturn $string;\n}",
"public function pregUnQuote(string $pattern): string;",
"function hca_strip_nonalphanum($string){\n\treturn preg_replace(\"/[^A-Za-z0-9 ]/\", '', $string);\n}",
"function clean_string($string) {\r\n $bad = array(\"content-type\", \"bcc:\", \"to:\", \"cc:\", \"href\");\r\n return str_replace($bad, \"\", $string);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the current request parameters, can only be called after the dispatch() method is called. Its a wrapper for self::getVariable('PARAMS', self::$ARR_DISPATCH_DATA); | public function getRequestParams()
{
//return (self::$ARR_DISPATCH_DATA['PARAMS']);
return array_merge($_GET, $_POST);
} | [
"public static function get_current_request_params() {\n\t\t\t\n\t\t\treturn (isset(self::$current_request['params']) and is_array(self::$current_request['params'])) ? self::$current_request['params'] : array();\n\t\t\t\n\t\t}",
"protected function __get_params() {\n\t\t\treturn $this->request->params;\n\t\t}",
"public function getParams() {\n return $this->getDispatcher()->getParams();\n }",
"protected final function getParameters() {\n\t\treturn $this->getHttpRequest()->getParameters();\n\t}",
"public function getRequestParameters()\n\t{\n\t\treturn ($this->_request_parameters);\n\t}",
"public static function getRequestVars(){\r\n\t\t\t\treturn self :: $requestVars;\r\n\t\t\t}",
"public function getRequestParams()\n {\n return $this->request->request->all();\n }",
"private function _get_params() {\n\t\treturn $this->_params;\n\t}",
"public function _request_params()\n {\n $this->get_arr = is_array($this->input->get(NULL, TRUE)) ? $this->input->get(NULL, TRUE) : array();\n $this->post_arr = is_array($this->input->post(NULL, TRUE)) ? $this->input->post(NULL, TRUE) : array();\n $this->params_arr = array_merge($this->get_arr, $this->post_arr);\n return $this->params_arr;\n }",
"public static function getParams () {\n\t\treturn Lib::hashOfAssociativeArray(\\array_merge($_GET, $_POST));\n\t}",
"public static function params() {\n\n if(is_null(self::$paramsConfig)) {\n\n $appConf = self::app();\n self::$paramsConfig = (object) $appConf[\"params\"];\n }\n return self::$paramsConfig;\n }",
"private function getRouteVars()\n {\n return array_merge($this->getRequest()->query->all(), $this->getRequest()->attributes->get('_route_params'));\n }",
"protected function _getAllParams()\r\n\t{\r\n\t\treturn Katharsis_Request::getParams();\r\n\t}",
"public function getRequestParams() {\n }",
"private function _request_params()\n {\n $this->get_arr = is_array($this->input->get(NULL, TRUE)) ? $this->input->get(NULL, TRUE) : array();\n $this->post_arr = is_array($this->input->post(NULL, TRUE)) ? $this->input->post(NULL, TRUE) : array();\n $this->params_arr = array_merge($this->get_arr, $this->post_arr);\n return $this->params_arr;\n }",
"public function getActionParams()\n {\n return $_GET;// + $_POST;\n }",
"protected function _getControllerParams() {\n\t\t$params = array(\n\t\t\t'request_method' => env('REQUEST_METHOD'),\n\t\t\t'request_plugin' => !empty($this->_controller->params['plugin']) ? $this->_controller->params['plugin'] : null,\n\t\t\t'request_controller' => !empty($this->_controller->params['controller']) ? $this->_controller->params['controller'] : Inflector::underscore($this->_controller->name),\n\t\t\t'request_action' => !empty($this->_controller->params['action']) ? $this->_controller->params['action'] : Inflector::underscore($this->_controller->action),\n\t\t\t'request_ext' => !empty($this->_controller->params['url']['ext']) ? $this->_controller->params['url']['ext'] : null\n\t\t);\n\t\t$data = !empty($this->_controller->data) ? $this->_controller->data : array();\n\t\tif (!empty($data['_Token'])) {\n\t\t\tunset($data['_Token']);\n\t\t}\n\t\t$params['request_parameters'] = array_filter(array(\n\t\t\t'url' => $this->_controller->here,\n\t\t\t'data' => $data,\n\t\t\t'pass' => !empty($this->_controller->params['pass']) ? $this->_controller->params['pass'] : array(),\n\t\t\t'named' => !empty($this->_controller->params['named']) ? $this->_controller->params['named'] : array(),\n\t\t\t'form' => !empty($this->_controller->params['form']) ? $this->_controller->params['form'] : array()\n\t\t));\n\t\treturn array_filter($params);\n\t}",
"public function getParams()\n {\n return $this->invokeParams;\n }",
"public function getRequestParams()\n {\n if (!isset($this->request_params)) {\n throw new Exception('Request parameters not set');\n }\n\n return $this->request_params;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call Exchange Rate Api | function exchangeRateApi($from = null, $to = null, $apiKey = null) {
// Fetching JSON
$req_url = 'https://v6.exchangerate-api.com/v6/' . $apiKey . '/latest/' . $from;
$response_json = file_get_contents($req_url);
// Continuing if we got a result
if(false !== $response_json) {
// Decoding
$response = json_decode($response_json, true);
// Check for success
if('success' === $response['result']) {
return $response['conversion_rates'][$to];
}
}
} | [
"public function getExchangeRate();",
"function get_exchange_rate(){\n\n $data = array(\n 'token' => $this->session->userdata('token')\n ); \n\n $cek_token = $this->Shoope_model->get_token($data)->row();\n \n if (is_null($cek_token) == FALSE){\n \n $where = array(\n 'user_id' => $cek_token->id,\n 'delete_at' => NULL\n );\n\n $get_data = $this->Shoope_model->get_list_exchange($where);\n\n if($get_data->num_rows() > 0){\n $data_exchange['data'] = $this->Shoope_model->get_list_exchange($where);\n $this->load->view('form', $data_exchange);\n // $this->response($get_data, 200);\n }else{\n $this->load->view('form');\n // $this->response(array('status' => 'No data', 502));\n }\n }else{\n $this->load->view('form');\n // $this->response(array('status' => 'token not found', 502));\n }\n }",
"public function apiGetBitcoinExchangeRate()\n\t{\n\t\ttry {\n\t\t\t\t\t\n\t\t\t//Set up an array to return the results to the controller\n\t\t\t$result = null;\n\t\t\t\n\t\t\t// Get the latest Bitcoin price from Bitfinex\n\t\t\t$Bitfinex_Url = \"https://api.bitfinex.com/v1/ticker/btcusd\";\n\t\t\t$json = json_decode(file_get_contents($Bitfinex_Url), true);\n\t\t\t$priceBitfinex = $json[\"last_price\"];\n\n\t\t\t// Get the latest Bitcoin price from Bitstamp\n\t\t\t$Bitstamp_Url = \"https://www.bitstamp.net/api/ticker/\";\n\t\t\t$json = json_decode(file_get_contents($Bitstamp_Url), true);\n\t\t\t$priceBitstamp = $json[\"last\"];\n\n\t\t\t// Get the latest Bitcoin price from Coinbase\n\t\t\t$Coinbase_Url = \"https://api.bitfinex.com/v1/ticker/btcusd\";\n\t\t\t$json = json_decode(file_get_contents($Coinbase_Url), true);\n\t\t\t$priceCoinbase = $json[\"last_price\"];\n\t\t\t\n\t\t\t//Write the Bitcoin to the results array for sending back to the view\n\t\t\t$result['bitcoin_data'][0]['bitfinex_lp'] = $priceBitfinex;\n\t\t\t$result['bitcoin_data'][0]['bitstamp_lp'] = $priceBitstamp;\n\t\t\t$result['bitcoin_data'][0]['coinbase_lp'] = $priceCoinbase;\n\t\n\t\t}\n\t\tcatch (PDOEXception $e) {\n\t\t\tprint new Exception($e->getMessage());\n\t\t}\n\t\t\n\t\t//Send the response back to the view via the controller class\n\t\treturn $result;\n\n\t}",
"function getForeignExchangeRate()\n{\n $url = 'https://api.exchangeratesapi.io/latest?base=USD';\n $json_string = file_get_contents($url);\n $parsed_json = json_decode($json_string);\n return $parsed_json;\n}",
"private function viewRates(){\t\t\n\n CryptoLogger::log_msg(\"Sent rates request\");\n $rates_json_responce=file_get_contents(\"http://cryptopay.me/api/rates\");\n\t\t\n\t\t$rates=json_decode($rates_json_responce,true);\n\t\tCryptoLogger::log_msg(\"Got rates responce: \".json_encode($rates));\n\t\t$this->send($this->getCurrentChannel(), $this->initiator,\n \"Exchange rates:\".\n \"\\nEUR: buy \".$rates[\"BTCEUR\"][\"buy\"].\" | sell \".$rates[\"BTCEUR\"][\"sell\"].\n \"\\nUSD: buy \".$rates[\"BTCUSD\"][\"buy\"].\" | sell \".$rates[\"BTCUSD\"][\"sell\"].\n \"\\nGBP: buy \".$rates[\"BTCGBP\"][\"buy\"].\" | sell \".$rates[\"BTCGBP\"][\"sell\"]);\n\t}",
"public function getExchangeRates();",
"public function updateRate() {\n $this->apiModel->updateRate($this->request->getPost('API_KEY'));\n }",
"public function getConversionRate() \n {\n\t\t\ttry{\n\t\t\t\t$guj_request = $this->guzzle_client->get($this->url);\t\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t\treturn ['status' => false, 'msg' => \"Something went wrong try again. If error persist contact admin.\"];\n\t\t\t}\n\t\t\tif($guj_request->getStatusCode() == 200){\n\t\t\t\t$res = $guj_request->getBody();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // Get the actual response without headers\n\t\t\t\t$res_json = json_decode($res, true);\n\t\t\t\tif($res_json['success']){\n\t\t\t\t\treturn ['status' => true, 'res' => $res];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn ['status' => false, 'msg' => \"Error in getting latest currency conversion rate. Contact admin.\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn ['status' => false, 'msg' => \"Something went wrong try again. If error persist contact admin.\", 'status_code' => $guj_request->getStatusCode()];\n\t\t\t}\n }",
"private function getExchangeRates() {\n $values = array();\n\n // NOTE: We could use curl for more robust handling of remote connections\n \n // TODO: Improve error handling when calling the RESTful web service\n $exchangeRateXML = simplexml_load_file($this->webServiceURI);\n\n /**\n * Using multi-insert in one query execution instead of executing\n * mulltiple prepared statements for lower server overhead.\n */\n foreach ($exchangeRateXML->conversion as $conversion) {\n $values[] = '(\"' . (string)$conversion->currency . '\", ' . (float)$conversion->rate . ')';\n }\n\n $this->mysqli->query('INSERT INTO exchange_rates (currency, rate) VALUES ' . implode(',', $values));\n }",
"function calculateRate($original_currency) {\n\n global $config;\n\n $access_key = $config['access-key'];\n\n $uri = 'http://api.currencylayer.com/live?access_key='.$access_key.'¤cies='.$original_currency;\n $file_content = file_get_contents($uri);\n $api_response = json_decode($file_content, true);\n\n $rate = array_values($api_response['quotes'])[0];\n\n return $rate;\n}",
"public function getRemoteRates(){\n\t\t$request_url = self::URL . self::API_KEY;\n\t\t\n\t\t$content = file_get_contents($request_url);\n\t\t$content = json_decode($content, true);\n\t\t\n\t\tif(isset($content['base']) && isset($content['rates'])){\t\t\n\t\t\t$exchange = new Application_Model_Exchange();\n\t\t\t$exchange->setBase($content['base']);\n\t\t\t\n\t\t\t$exchange_mapper = new Application_Model_ExchangeMapper();\n\t\t\t$exchange_mapper->save($exchange);\n\t\t\t\n\t\t\t$currency_mapper = new Application_Model_CurrencyMapper();\n\t\t\t$available_currencies = $currency_mapper->fetchAll();\n\t\t\t\n\t\t\t$rate_mapper = new Application_Model_RateMapper();\n\t\t\t\n\t\t\t$rates = $content['rates'];\n\t\t\t\n\t\t\tforeach($available_currencies as $currency){\n\t\t\t\tif(isset($rates[$currency->getCode()])){\n\t\t\t\t\t$rate = new Application_Model_Rate();\n\t\t\t\t\t$rate->setExchangeId($exchange->getId());\n\t\t\t\t\t$rate->setCurrencyId($currency->getId());\n\t\t\t\t\t$rate->setRate($rates[$currency->getCode()]);\n\t\t\t\t\t\n\t\t\t\t\t$rate_mapper->save($rate);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $exchange;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"function RateOfExchange($args) {\n try {\n $RateDate = date('Y-m-d');\n\n $this->client->uri = 'http://www.sita.aero/PTS/fare/2005/12/RateOfExchangeRQ';\n $reqPayloadString = $this->POS . '\n <POS><Source><RequestorID Type=\"6\" ID=\"'.$this->RequestorID.'\" ID_Context=\"Airfare\"/></Source></POS>\n <RateOfExchangeRQFilter AirportCity=\"' . $args['AirportCity'] . '\"/>';\n\n $this->client->actionAttr['SITA_AirfareRateOfExchangeRQ'] = array(\n 'RequestType' => 'IATA_RateOfExchange', // BankersBuyingRate, BankersSellingRate, IATA_RateOfExchange\n 'TicketDate' => $RateDate\n );\n\n $result = $this->client->SITA_AirfareRateOfExchangeRQ(new SoapVar($reqPayloadString, XSD_ANYXML));\n $result = XML2Array::createArray($this->client->__getLastResponse());\n $result = $result['SOAP-ENV:Envelope']['SOAP-ENV:Body'];\n if ($this->log) {\n TicketLog::write($this->client->__getLastRequest(), 'Request SITA_AirfareRateOfExchange:', 'RateOfExchange');\n TicketLog::write($this->client->__getLastResponse(), 'Response SITA_AirfareRateOfExchange:', 'RateOfExchange');\n// TicketLog::write($result, 'SITA_AirfareRateOfExchange:', 'RateOfExchange');\n }\n\n $ExchangeRates = $result['sita:SITA_AirfareRateOfExchangeRS']['sita:ExchangeRates']['sita:ExchangeRate'];\n if (isset($ExchangeRates['sita:DomesticRounding'])) $ExchangeRates = array($ExchangeRates);\n foreach($ExchangeRates as $ExchangeRate) {\n $RateOfExchange = $ExchangeRate['@attributes']['RateOfExchange'];\n if ($ExchangeRate['@attributes']['ExchangeRateType'] == 'IATA_RateOfExchange') { // BankersBuyingRate, BankersSellingRate, IATA_RateOfExchange\n break;\n }\n }\n\n return isset($result['sita:SITA_AirfareRateOfExchangeRS']['sita:Success']) ? $RateOfExchange : false;\n } catch (SoapFault $fault) {\n TicketLog::write($this->client->__getLastRequest(), 'Request:', 'Exception RateOfExchange');\n TicketLog::write($this->client->__getLastResponse(), 'Response:', 'Exception RateOfExchange');\n TicketLog::write($fault, 'Exception:', 'RateOfExchange');\n return false;\n }\n }",
"public function getExchangeRate($currency);",
"public function getExchangeRates() {\n return parent::_requestData('get','exchangerates');\n }",
"public function getExchangeRateXmlRpc()\n {\n return $this->fetchExchangeRates('EUR', date('Y-m-d'));\n }",
"protected function _doRequest()\n {\n // $dev_env = Mage::getStoreConfig('easyship_options/ec_dev/env');\n // if (isset($dev_env) && $dev_env) {\n // $url = Mage::getStoreConfig( 'easyship_options/ec_dev/endpoint');\n // if (!isset($url)) {\n // Mage::log('endpoint empty', null, 'easyship.log');\n // throw new Exception('Endpoint has not been set');\n // }\n // }\n // else {\n // $url = $this->getConfigData( 'easyship_api_url');\n // }\n $url = $this->getConfigData('easyship_api_url');\n\n $url = $url . '/rate/v1/magento';\n $client = new Varien_Http_Client($url);\n $client->setMethod(Varien_Http_Client::POST);\n $client->setHeaders(array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->_token\n ));\n\n $json = $this->_rawRequest->toJson();\n\n $client->setRawData($json, null);\n $response = $client->request('POST');\n\n if (!$response->isSuccessful()) {\n Mage::log('Fail to connect', null, 'easyship.log');\n Mage::log(var_export($response, 1), null, 'easyship.log');\n return false;\n }\n\n // decode JSON respond\n $rates = json_decode($response->getBody(), true);\n Mage::log('OK to connect:', null, 'easyship.log');\n\n // Get Preferred Rates\n $prefer_rates = $rates['rates']; //$this->_prefer_rates( $rates['rates'] );\n Mage::log('Prefer Rates: ' . var_export($prefer_rates, 1), null, 'easyship.log');\n\n $result = Mage::getModel('shipping/rate_result');\n foreach ($prefer_rates as $rate) {\n $r = Mage::getModel('shipping/rate_result_method');\n $r->setCarrier($this->_code);\n $r->setCarrierTitle($this->getConfigData('title'));\n $r->setMethod($rate['courier_id']);\n $r->setMethodTitle($rate['full_description']);\n $r->setCost($rate['total_charge']);\n $r->setPrice($rate['total_charge']);\n $result->append($r);\n }\n\n return $result;\n }",
"public function testRetrieveExchangeRates()\n {\n\n // Set callback and perform API call\n $result = null;\n self::$controller->setHttpCallBack($this->httpResponse);\n try {\n $result = self::$controller->getExchangeRates();\n } catch (APIException $e) {\n }\n\n // Test response code\n $this->assertEquals(\n 200,\n $this->httpResponse->getResponse()->getStatusCode(),\n \"Status is not 200\"\n );\n\n // Test whether the captured response is as we expected\n $this->assertNotNull($result, \"Result does not exist\");\n\n $this->assertTrue(\n TestHelper::isJsonObjectProperSubsetOf(\n \"{\\n\t\\\"disclaimer\\\": \\\"Exchange rates are provided here for reference. They are updated at least once\" .\n \" a day and may have changed by time of order.\\\",\\n\t\\\"exchangeRates\\\": [{\\n\t\t\\\"lastModifiedDate\\\": \\\"\" .\n \"2018-04-19T13:00:14.291\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"EUR\\\",\\n\t\t\\\"baseCurrency\\\": \\\"NZD\\\",\\n\t\t\\\"baseFx\" .\n \"\\\": 0.59120\\n\t}, {\\n\t\t\\\"lastModifiedDate\\\": \\\"2018-04-19T13:00:14.291\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"US\" .\n \"D\\\",\\n\t\t\\\"baseCurrency\\\": \\\"NZD\\\",\\n\t\t\\\"baseFx\\\": 0.73130\\n\t}, {\\n\t\t\\\"lastModifiedDate\\\": \\\"2018-04-\" .\n \"19T13:00:14.230\\\",\\n\t\t\\\"rewardCurrency\\\": \\\"INR\\\",\\n\t\t\\\"baseCurrency\\\": \\\"AUD\\\",\\n\t\t\\\"baseFx\\\": 51.2\" .\n \"9066\\n\t}]\\n}\",\n $this->httpResponse->getResponse()->getRawBody(),\n false,\n true,\n false\n ),\n \"Response body does not match in keys\"\n );\n }",
"private function retrieve_exchange_rates() {\n\t\t$api_url = esc_attr( get_option( 'jcc_exchange_rates_api' ) );\n\t\t$from = esc_attr( get_option( 'jcc_exchange_rates_from' ) );\n\t\t$currencies = $this->get_currency_names( get_option( 'jcc_currency' ) );\n\t\t$currencies = join( ',', $currencies );\n\t\t$url = $api_url . '&from=' . $from . '¤cies=' . $currencies;\n\n\n\t\t$response = wp_remote_get( $url );\n\t\t$body = wp_remote_retrieve_body( $response );\n\t\t/*\n\t\t * Decode JSON response:\n\t\t */\n\t\t$exchangeRates = json_decode( $body, true );\n\n\t\tif ( ! isset( $exchangeRates['quotes'] ) ) {\n\t\t\treturn sprintf( __( 'API(key) is not valid : %s', $this->_slug ), $url );\n\t\t}\n\n\t\t$output = '';\n\t\tforeach ( $exchangeRates['quotes'] as $type => $rate ) {\n\t\t\t$output .= $type . ':' . $rate . \"\\n\";\n\t\t}\n\n\t\treturn nl2br( $output );\n\t}",
"public function getExchangeRates(Request $request) {\n\n try {\n\n $coin = $request->coin;\n $curency = strtoupper($request->curency);\n $marketResponse = [];\n\n foreach ($coin as $key => $value) {\n\n $bitgo = new BitGoSDK($this->token, $value, $this->testNet);\n $marketData = $bitgo->getMarketPriceData();\n\n $currencies = $marketData['latest']['currencies'];\n\n $usdRate = $marketData['latest']['currencies']['USD'];\n\n $prevDayHigh = $usdRate['24h_avg']*2 - $usdRate['last'];\n\n $dif = $this->changePercentage($prevDayHigh, $usdRate['last'] );\n\n\n if (array_key_exists($curency, $currencies )) {\n\n $marketResponse[$value] = $marketData['latest']['currencies'][$curency];\n $marketResponse[$value]['24h_dif'] = $dif;\n }else{\n if ($curency == 'GEL') {\n $currencyRateWithUSD = $this->gelRates()['data']['rate'];\n }else{\n $currencyRateWithUSD = $this->retesBetweenCurrencies('USD')['data'][$curency];\n }\n\n $rateWithUSD = $marketData['latest']['currencies']['USD'];\n $marketResponse[$value]['24h_avg'] = $currencyRateWithUSD * $rateWithUSD['24h_avg'];\n $marketResponse[$value]['last'] = $currencyRateWithUSD * $rateWithUSD['last'];\n $marketResponse[$value]['24h_dif'] = $dif;\n\n\n }\n\n\n }\n\n return [ 'status' => 1 , 'data' => $marketResponse ];\n\n } catch (\\Exception $e) {\n\n $message = $e->getMessage();\n return response()->json([ 'status' => 0 , 'data' => $message ]);\n\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Call the provided message builder. | protected function callMessageBuilder($callback, $message)
{
if ($callback instanceof Closure) {
return call_user_func($callback, $message);
} else if (is_string($callback)) {
$instance = $this->container->make($callback);
return $instance->mail($message);
}
throw new InvalidArgumentException("Callback is not valid.");
} | [
"protected function callMessageBuilder($callback, $message)\n {\n return call_user_func($callback, $message);\n }",
"protected function callMessageBuilder($callback, MessageContract $message)\n {\n if ($callback instanceof Closure) {\n return $callback($message);\n }\n\n if ($this->container !== null) {\n return $this->getInvoker()->call($callback)->mail($message);\n }\n\n throw new InvalidArgumentException('Callback is not valid.');\n }",
"protected function callMessageBuilder(Closure $callback, Message $message)\n {\n return call_user_func($callback, $message);\n }",
"public function call() {\n\t\tforeach ( $this->methods as $k => $v ) {\n\t\t\tif ( is_array($v) && sizeof($v) > 0 ) {\n\t\t\t\tif ( $k != 'select' ) {\n\t\t\t\t\tforeach ( $v as $v1 ) {\n\t\t\t\t\t\tif ( is_array($v1) ) {\n\t\t\t\t\t\t\tcall_user_func_array(array($this->builder, $k), $v1);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcall_user_func_array(array($this->builder, $k), $v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->builder;\n\t}",
"public function getMessageBuilder();",
"abstract protected function getBuiltMessage();",
"public function build()\n {\n return \"CALL \" . $this->call->name . \"(\" . ($this->call->parameters ? implode(\",\", $this->call->parameters->raw) : \"\") . \")\";\n }",
"protected function executeCall()\n\t{\n\t\t$mail\t= $this->getClass( 'Mail' );\n\t\t$date\t= date( 'Y-m-d', ( time() + ( self::NUM_DAYS_BEFORE_MATCH * 24 * 60 * 60 ) ) );\n\n\t\t$match\t= $this->getData( 'MatchModel', 'getMatchByDate', array( 'date' => $date ) );\n\t\tif ( !isset( $match[0] ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$match\t\t\t\t\t= array_shift( $match );\n\t\t$match['day_formated']\t= date( 'd/m/Y', strtotime( $match['day'] ) );\n\n\t\t$players\t= $this->getData( 'TeamModel', 'getPlayers', array( 'type' => 'player' ) );\n\t\tforeach( $players as $player )\n\t\t{\n\t\t\t$mail->setReceiver( $player['email'] );\n\t\t}\n\n\t\t$mail->setContentType( 'text/html', 'utf8' );\n\t\t$mail->setFrom( FROM_EMAIL );\n\t\t$mail->setSubject( \"Call {$match['day_formated']}\" );\n\t\t$mail->setBody( $this->composeMailBody( $match ) );\n\t\t$mail->send();\n\t}",
"public function callMethodOn(Builder $builder)\n {\n try {\n $response = $builder->{$this->methodName}(...$this->parameters);\n\n foreach ($this->parameters as $k => $parameter) {\n if ($parameter instanceof Closure && !in_array($k, $this->executedCallbacks)) {\n // Callback wasn't executed, but expected to. Assuming parentheses without method, so let's \"and\" it.\n $builder->group($parameter);\n }\n }\n\n return $response;\n } catch (TypeError $e) {\n throw new SyntaxException(\"`{$this->methodName}` does not allow the use of sub-queries.\");\n } catch (Throwable $e) {\n throw new SyntaxException($e->getMessage(), $e->getCode(), $e);\n }\n }",
"public function GetOperations(InteligentBuildingConmmunicationModel $Device, $message);",
"protected function createMessageBuilder()\n {\n return new MessageBuilder;\n }",
"public function trigger(IRCMessage $msg) {\n if ($this->willTrigger($msg->getCommand())) {\n call_user_func($this->method, $msg);\n $msg->respond($this);\n } \n }",
"function call ($phone_number, $message, $message_type, array $other = []) {\n return $this->post(self::VOICE_RESOURCE, array_merge($other, [\n \"phone_number\" => $phone_number,\n \"message\" => $message,\n \"message_type\" => $message_type\n ]));\n }",
"public function actionCall()\n {\n $req = Yii::$app->request;\n \n $phoneTo = (int)$req->get('phoneTo');\n if (!is_numeric($phoneTo)) return 'Phone must be a number';\n\n $phoneFrom = self::PHONE_ADMIN;\n $sid = $req->get('sid');\n $token = $req->get('token');\n \n $twiloiSet = (isset($sid) && isset($token));\n if (!$twiloiSet) return \"Twilio API call. From: $phoneFrom To: $phoneTo\";\n\n $client = new Client($sid, $token);\n\n $call = $client->calls->create(\n $phoneTo,\n $phoneFrom,\n [\"url\" => \"http://demo.twilio.com/docs/voice.xml\"]\n );\n echo $call->sid;\n }",
"public function dispatch(Message $message);",
"protected function getMessageBuilder(){\n return isset($this->messageBuilder) && ($this->messageBuilder->getMessageClass() == $this->getMessageClass())\n ? $this->messageBuilder\n : $this->messageBuilder = PEIP_Message_Builder::getInstance($this->messageClass)->setHeaders($this->defaultHeaders);\n }",
"public function getBuilder();",
"public function sendMessage($phone, $message);",
"public function execute()\n {\n $conversation = new Conversation(\n $this->getMessage()->getFrom()->getId(),\n $this->getMessage()->getChat()->getId()\n );\n $message = $this->getMessage();\n \n //You can use $command as param\n $chat_id = $message->getChat()->getId();\n $user_id = $message->getFrom()->getId();\n $command = $message->getCommand();\n\t $data = [\n 'chat_id' => $chat_id,\n 'text' => 'GM' . $command . ' not found.. :(',\n ];\n\n if ($conversation->exists() && ($command = $conversation->getCommand())) {\n return $this->telegram->executeCommand($command);\n\t\t}\n\t\t\n\t\t$texto_ingresado= trim($message->getText());\t\n\t\t\n\t\tif ( trim($texto_ingresado) == '' ) return Request::emptyResponse();\n \n\t\t\n\t\tif ($message->getPhoto() != null) {\n // foto del qr\n \n } else { //es texto inicia busqueda\n \n $response = Funciones::buscarBanda($texto_ingresado);\n \n $respuestas = json_decode($response, true);\n \n $lista = array();\n\n foreach($respuestas[\"artists\"][\"items\"] as $k){\n $boton = new InlineKeyboardButton(['text' => $k[\"name\"], 'callback_data' => $k[\"id\"]]);\n array_push($lista, array($boton));\n }\n \n $response = \"resultados encontrados\";\n $inline_keyboard = new InlineKeyboard($lista);\n $data['reply_markup'] = array(\"inline_keyboard\" => $lista);\n $data['text']= $response;\n Request::sendMessage($data); \n \n \n }\n\t\t\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if map identifiers are the same. | public function testMapIdentsMatch()
{
$aMapIdentsDE = $this->_getMap($this->getThemeName(), 'de');
$aMapIdentsEN = $this->_getMap($this->getThemeName(), 'en');
if (($aMapIdentsDE == array()) || ($aMapIdentsEN == array())) {
$this->fail(' Map array is empty');
}
$this->assertEquals(array(), array_diff_key($aMapIdentsDE, $aMapIdentsEN), 'Ident does not match EN misses some maps');
$this->assertEquals(array(), array_diff_key($aMapIdentsEN, $aMapIdentsDE), 'Ident does not match DE misses some maps');
} | [
"public function equals (Map $map) : bool;",
"#[@test]\n public function equalsOtherMapWithSameContents() {\n $other= new Hashmap();\n $this->map->put('color', 'green');\n $other->put('color', 'green');\n $this->assertTrue($this->map->equals($other));\n }",
"private function compareMappings($a, $b) {\n if ($a === $b) {\n return 0;\n }\n return 1;\n }",
"protected function groupoidPresent() {\r\n $len = count($this->map);\r\n for ( $i=0; $i<$len; $i+=1 ) {\r\n if ( $this->map[$i]->get('dbCol') === \"groupoid\" ) \r\n return true;\t\t\r\n }\r\n return false;\t\t\t\r\n }",
"private function isMap(array $array)\n\t{\n\t\t$m = 0;\n\t\tforeach($array as $i => $val)\n\t\t{\n\t\t\tif($i != $m)\n\t\t\t\treturn true;\n\t\t\t$m++;\n\t\t}\n\t\treturn false;\n\t}",
"protected function hasSystemDataEquivalentMapDuplicates()\n {\n if ($this->hasMagentoSystemData() && !$this->isSystemDataEquivalentMapExist()) {\n return false;\n }\n\n if (!empty($this->customerEquivalentMap && is_array($this->customerEquivalentMap))) {\n $customerEqMapWithoutIgnore = [];\n foreach ($this->customerEquivalentMap as $key => $value) {\n if ($value !== '') {\n $customerEqMapWithoutIgnore[$key] = $value;\n }\n }\n if (count($customerEqMapWithoutIgnore) !== count(array_unique($customerEqMapWithoutIgnore))) {\n return true;\n }\n }\n\n if (!empty($this->storeEquivalentMap && is_array($this->storeEquivalentMap))) {\n $storeEqMapWithoutIgnore = [];\n foreach ($this->storeEquivalentMap as $key => $value) {\n if ($value !== '') {\n $storeEqMapWithoutIgnore[$key] = $value;\n }\n }\n if (count($storeEqMapWithoutIgnore) !== count(array_unique($storeEqMapWithoutIgnore))) {\n return true;\n }\n }\n\n return false;\n }",
"function groupoidPresent() {\r\n\t\t$len = count($this->mapObjs);\r\n\t\tfor ( $i=0; $i<$len; $i+=1 ) {\r\n\t\t\tif ( $this->mapObjs[$i]->getDBColumnName() == \"groupoid\" ) \r\n\t\t\t\treturn true;\t\t\r\n\t\t}\r\n\t\treturn false;\t\t\t\r\n\t}",
"public static function sameAs(string $otherID): bool;",
"public static function checkForEqualIds(string $id1, string $id2): bool\n {\n return (static::cleanupId($id1) == static::cleanupId($id2));\n }",
"private static function are_vars_duplicated(&$array) : bool\n\t{\n\t\t$array = self::clear_vars($array);\n\n\t\tforeach($array as $key => $value)\n\t\t{\n\t\t\tif(count(array_keys($array, $value, true)) > 1)\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function testIfCustomMappingUsesUniqueValues()\n\t{\n\t\t$map = Config::get(ResponseBuilder::CONF_KEY_RESPONSE_KEY_MAP, null);\n\t\tif ($map !== null) {\n\t\t\t$base_map = BaseApiCodes::getDefaultResponseKeyMap();\n\n\t\t\tforeach ($map as $key => $val) {\n\t\t\t\t// check if reference key are known\n\t\t\t\tif (!array_key_exists($key, $base_map)) {\n\t\t\t\t\t$this->fail(\"Unknown reference key in your mapping: '{%key}'\");\n\t\t\t\t}\n\n\t\t\t\t// check mapping value is unique\n\t\t\t\tforeach ($map as $test_key => $test_val) {\n\t\t\t\t\tif (($test_val === $val) && ($test_key !== $key)) {\n\t\t\t\t\t\t$this->fail(\"Value used for reference key '{%key}' is not unique (used in '{%test_key}'\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->markTestSkipped(sprintf('No \"%s\" mapping found.', ResponseBuilder::CONF_KEY_RESPONSE_KEY_MAP));\n\t\t}\n\t}",
"protected function validMaps($maps)\n {\n $arrayValues = array_values($maps);\n\n return !empty(array_intersect_key($arrayValues, $this->getMappableColumns()->toArray()));\n }",
"public function hasMapping();",
"public function isKeyUnique();",
"public function equals(Identifier $other): bool;",
"function sameKeys($first, $second) {\n return is_array($first) and is_array($second) and\n count(array_diff_key($first, $second)) === 0 and\n count(array_diff_key($second, $first)) === 0;\n }",
"public function idsAreNotEqual()\n {\n $this->assertTrue($this->ww->getId() != $this->toyota->getId());\n }",
"function is_duplicate($event1, $event2) {\r\n\t\t\treturn ($event1['StartTime'] == $event2['StartTime']\r\n\t\t\t\tand $event1['EndTime'] == $event2['EndTime']);\r\n\t\t}",
"private function isUnique(string $identifier): bool\n {\n $resolutionSequence = $this;\n\n while ($resolutionSequence) {\n if ($resolutionSequence->identifier === $identifier) {\n return false;\n }\n $resolutionSequence = $resolutionSequence->parent;\n }\n\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills token stream field of the processed string objects Add lexical errors if any exists. | public function scan(&$processedstring) {
// Lexer must be a valid JLexPHP class, or implement next_token() and get_errors()
// Also it can implement find_errors for seeking of deferred errors
$scanerclass = $this->lexername();
$string = $processedstring->string;
if (is_a($string,'qtype_poasquestion\string') == true) {
$string = $string->string();
}
$string = $this->preprocess_for_scan($string);
$stream = new block_formal_langs_token_stream();
$stream->tokens = array();
$stream->errors = array();
if (core_text::strlen(trim($string)) != 0) {
StringStreamController::createRef('str', $string);
$pseudofile = fopen('string://str', 'r');
$this->scaner = new $scanerclass($pseudofile);
//Now, we are splitting text into lexemes
$tokens = array();
while ($token = $this->next_token($stream)) {
$tokens[] = $token;
}
$stream->tokens = $tokens;
$scanererrors = $this->scaner->get_errors();
if (count($stream->errors)) {
if (count($scanererrors)) {
$stream->errors = array_merge($stream->errors, $scanererrors);
}
} else {
$stream->errors = $scanererrors;
}
}
$processedstring->stream = $stream;
} | [
"public function test_scanning_error_in_beginning() {\r\n $lang = new block_formal_langs_language_c_language();\r\n //Unmatched quote or comments tests\r\n $processedstring = $lang->create_from_string('\\'abc asv ');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 0, 'First lexeme must be erroneous');\r\n $this->assertTrue($tokens[0]->position()->colstart() == 0, 'Error lexeme is at beginning');\r\n $this->assertTrue($tokens[0]->position()->colend() == 0, 'Error lexeme must be one character long');\r\n $processedstring = $lang->create_from_string('\"abc asv ');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 0, 'First lexeme must be erroneous');\r\n $this->assertTrue($tokens[0]->position()->colstart() == 0, 'Error lexeme is at beginning');\r\n $this->assertTrue($tokens[0]->position()->colend() == 0, 'Error lexeme must be one character long');\r\n $processedstring = $lang->create_from_string('/*abc asv ');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 0, 'First lexeme must be erroneous');\r\n $this->assertTrue($tokens[0]->position()->colstart() == 0, 'Error lexeme is at beginning');\r\n $this->assertTrue($tokens[0]->position()->colend() == 1, 'Error lexeme must be two characters long');\r\n //Multicharacter literal test\r\n $processedstring = $lang->create_from_string('\\'abc\\' asv ');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 0, 'First lexeme must be erroneous');\r\n $this->assertTrue($tokens[0]->position()->colstart() == 0, 'Error lexeme is at beginning');\r\n $this->assertTrue($tokens[0]->position()->colend() == 4, 'Error lexeme must be five characters long');\r\n }",
"public function test_scanning_error_in_end() {\r\n $lang = new block_formal_langs_language_c_language();\r\n $processedstring = $lang->create_from_string('asv \\'abc');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 1);\r\n $this->assertTrue($tokens[1]->position()->colstart() == 4);\r\n $this->assertTrue($tokens[1]->position()->colend() == 4);\r\n $processedstring = $lang->create_from_string('asv \"abc');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 1);\r\n $this->assertTrue($tokens[1]->position()->colstart() == 4);\r\n $this->assertTrue($tokens[1]->position()->colend() == 4);\r\n $processedstring = $lang->create_from_string('asv /*abc');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 1);\r\n $this->assertTrue($tokens[1]->position()->colstart() == 4);\r\n $this->assertTrue($tokens[1]->position()->colend() == 5);\r\n //Multicharacter literal test\r\n $processedstring = $lang->create_from_string('asv \\'abc\\'');\r\n $errors = $processedstring->stream->errors;\r\n $tokens = $processedstring->stream->tokens;\r\n $this->assertTrue(count($errors) == 1, 'There must be one error in errors');\r\n $this->assertTrue($errors[0]->tokenindex == 1);\r\n $this->assertTrue($tokens[1]->position()->colstart() == 4, 'Error lexeme is at the end');\r\n $this->assertTrue($tokens[1]->position()->colend() == 8, 'Error lexeme must be five characters long');\r\n }",
"public function process()\n {\n $tokens = $this->initializeTokens($this->contents, $this->filename);\n $this->parseTokenizer($tokens);\n }",
"function initTokens()\n {\n }",
"private function reset()\n\t{\n\t\t$this->tokens = array();\n\t\t$this->chunk = '';\n\t\t$this->idx = 0;\n\t}",
"public function tokenize_error($state) {\n $this->tokenerrors[] = $state;\n }",
"public function resolve(): void\n {\n $this->countUnparsedCharacters = 0;\n }",
"public function tokensWithError();",
"protected function postprocessTokens() {\n // we need to manually iterate and manage a count because we'll change\n // the tokens array on the way\n for ($i = 0, $c = count($this->tokens); $i < $c; ++$i) {\n // first check that the following tokens are of form ~LABEL~,\n // then match the __EMU__... sequence.\n if ('~' === $this->tokens[$i]\n && isset($this->tokens[$i + 2])\n && '~' === $this->tokens[$i + 2]\n && T_STRING === $this->tokens[$i + 1][0]\n && preg_match('(^__EMU__([A-Z]++)__(?:([A-Za-z0-9]++)__)?$)', $this->tokens[$i + 1][1], $matches)\n ) {\n if ('BINARY' === $matches[1]) {\n // the binary number can either be an integer or a double, so return a LNUMBER\n // or DNUMBER respectively\n $replace = array(\n array(is_int(bindec($matches[2])) ? T_LNUMBER : T_DNUMBER, $matches[2], $this->tokens[$i + 1][2])\n );\n } else if ('ELLIPSIS' === $matches[1]) {\n $replace = array(\n array(self::T_ELLIPSIS, '...', $this->tokens[$i + 1][2])\n );\n } else if ('POW' === $matches[1]) {\n $replace = array(\n array(self::T_POW, '**', $this->tokens[$i + 1][2])\n );\n } else if ('POWEQUAL' === $matches[1]) {\n $replace = array(\n array(self::T_POW_EQUAL, '**=', $this->tokens[$i + 1][2])\n );\n } else {\n // just ignore all other __EMU__ sequences\n continue;\n }\n\n array_splice($this->tokens, $i, 3, $replace);\n $c -= 3 - count($replace);\n // for multichar tokens (e.g. strings) replace any ~__EMU__...~ sequences\n // in their content with the original character sequence\n } elseif (is_array($this->tokens[$i])\n && 0 !== strpos($this->tokens[$i][1], '__EMU__')\n ) {\n $this->tokens[$i][1] = preg_replace_callback(\n '(~__EMU__([A-Z]++)__(?:([A-Za-z0-9]++)__)?~)',\n array($this, 'restoreContentCallback'),\n $this->tokens[$i][1]\n );\n }\n }\n }",
"private function setToken() {\n $this->tokenText = substr($this->sql_string, $this->tokenStart, $this->tokenLength);\n $this->tokenStart = $this->tokenPointer;\n $this->skipText = substr($this->sql_string, $this->tokenAbsStart, $this->tokenStart - $this->tokenAbsStart);\n }",
"function get_token(){\n global $token;\n global $identifier;\n global $array_stream;\n global $key_val;\n global $keywords;\n\n global $c_commentary;\n\n $token_end = True;\n $token_type = tokenType::start;\n init_token();\n\n while($token_end){\n /**\n * @warning end of Array works only for PHP7.3!!!!\n */\n if($key_val === array_key_last($array_stream)){\n $token->last = False;\n if($token->data !== PHP_EOL){\n $token->type = tokenType::EOL;\n $token_end = False;\n }\n }\n /* State automaton for lexical analysis combined with usage of regular expressions */\n switch ($token_type) {\n case tokenType::start:\n {\n if($array_stream[$key_val] === \".\"){ //header dection\n $token_type = tokenType::header;\n break;\n }\n elseif($array_stream[$key_val] === \"@\"){ //at mark detected\n $token->data = $array_stream[$key_val];\n $token->type = tokenType::marker;\n identify_operand();\n preset_label();\n $key_val++;\n $token_end = False;\n break;\n }\n elseif($array_stream[$key_val] === \"#\"){ //start of commentary\n $token_type = tokenType::commentary;\n break;\n }\n elseif($array_stream[$key_val] === PHP_EOL){ //EOL detected\n $token_type = tokenType::EOL;\n break;\n }\n elseif($array_stream[$key_val] === \"\\t\" || $array_stream[$key_val] === \" \"){ //white spaces before instruction/commentary\n $key_val++;\n preset_identifier();\n }\n elseif(ctype_alpha($array_stream[$key_val]) || ctype_digit($array_stream[$key_val]) || preg_match(\"/^_|\\-|\\$|&|%|\\*|!|\\?$/\", $array_stream[$key_val])){ //var/string/int catch\n $token_type = tokenType::charStream;\n break;\n }\n else {\n fwrite(STDERR, \"ERROR : Input doesn't start with .IPPcode19 header\\n\");\n exit(21);#appropriate exit code\n }\n break;\n }\n case tokenType::header:\n {\n /* Load header in loop, until new line space or commentary right after header */\n while(1){\n if($array_stream[$key_val] === PHP_EOL || preg_match(\"/^[ \\t#]$/\",$array_stream[$key_val]) || $key_val === array_key_last($array_stream)){\n if(preg_match(\"/^.ippcode19$/\", strtolower($token->data))){\n $token->type = tokenType::header;\n $token_end = False;\n break;\n }\n else {\n fwrite(STDERR,\"ERROR : Innapropriate header detected\\n\");\n exit(21);//no ippcode header;\n }\n }\n $token->data .= $array_stream[$key_val];\n $key_val++;\n }\n break;\n }\n /* Creates EOL token */\n case tokenType::EOL:\n {\n $token->data = $array_stream[$key_val];\n $token->type = tokenType::EOL;\n $key_val++;\n preset_identifier();\n preset_label();\n $token_end = False;\n break;\n }\n /* Catches commentary, all character are trimmed until EOL*/\n case tokenType::commentary:\n {\n while($array_stream[$key_val] !== PHP_EOL)\n {\n if($key_val === array_key_last($array_stream)) break;\n $key_val++;\n }\n $c_commentary++;\n $token_type = tokenType::EOL;\n break;\n }\n /* string/int or var stream stored into token */\n case tokenType::charStream:\n {\n while(1){\n if(preg_match(\"/^[ \\t@]$/\",$array_stream[$key_val])){\n $token_type = tokenType::identifyStream;\n break;\n }\n elseif($array_stream[$key_val] === PHP_EOL || $array_stream[$key_val] === \"#\"){ //read until newline or commentary start\n $token_type = tokenType::identifyStream;\n break;\n }\n elseif($key_val === array_key_last($array_stream)){ //read until EOF and add last character to token\n $token->data .= $array_stream[$key_val];\n $token_type = tokenType::identifyStream;\n break;\n }\n $token->data .= $array_stream[$key_val];\n $key_val++;\n }\n break;\n }\n case tokenType::identifyStream:\n {\n if(preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){ //matching the identifier\n $token->type = tokenType::identifier;\n foreach ($keywords as $key => $value) { //searching for keyword\n $match_pattern = \"/\\b\" . \"$value\" . \"\\b/i\";\n if(preg_match($match_pattern, strtolower($token->data))){\n $token->type = $key + 110;\n if(preg_match(\"/^(bool)|(int)|(string)|(nil)|(gf)|(lf)|(tf)$/\", $token->data)){\n identify_operand();\n }\n break;\n }\n }\n isset_identif();\n $token_end = False;\n break;\n }\n if(preg_match(\"/^[+|-]?[0-9]*$/\", $token->data)){ //matching numbers //^[+|-]?[1-9][0-9]*|[+|-][0]|[0]$\n $token->type = tokenType::number;\n $token_end = False;\n break;\n }\n /* Match for string literal - all unicode numbers and escape sequences */\n elseif(preg_match(\"/^([\\x{0024}-\\x{005B}]|[\\x{0021}\\x{0022}]|[\\x{005D}-\\x{FFFF}]|[ěščřžýáíéóúůďťňĎŇŤŠČŘŽÝÁÍÉÚŮa-zA-Z0-9]|([\\\\\\\\][0-9]{3})?)*$/\", $token->data)){ //^([ěščřžýáíéóúůďťňĎŇŤŠČŘŽÝÁÍÉÚŮa-zA-Z0-9]|([\\\\\\\\][0-9]{3})?)*$\n $token->type = tokenType::stringStream;\n $token_end = False;\n }\n else {\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n break;\n }\n\n default:\n break;\n }\n }\n }",
"private function processTokens ()\n {\n if (! $this->isProcessed) {\n $useNamespaces = array();\n\n for ($stackPtr = 0; $stackPtr < count($this->tokens); $stackPtr ++) {\n $token = $this->tokens[$stackPtr];\n if ($token[0] == T_USE && $this->tokens[$stackPtr - 2] != \")\") {\n $useNamespaces[$this->getNamespace($stackPtr)] = false;\n } elseif ($token[0] == T_STRING) {\n if ($this->isNamespaced($stackPtr, $useNamespaces)) {\n $namespace = $this->tokens[$stackPtr][1];\n if (array_key_exists($namespace, $useNamespaces)) {\n $useNamespaces[$namespace] = true;\n }\n }\n } elseif ($this->isCheckDocBlocked) {\n if ($token[0] == T_DOC_COMMENT || $token[0] == T_COMMENT) {\n $namespaces = $this->getTypeHintDocComments($token[1]);\n foreach ($namespaces as $namespace) {\n if (array_key_exists($namespace, $useNamespaces)) {\n $useNamespaces[$namespace] = true;\n }\n }\n }\n }\n }\n foreach ($useNamespaces as $nameSpace => $isUsed) {\n if (! $isUsed) {\n $this->unusedNamespaces[] = $nameSpace;\n }\n }\n $this->unusedNamespaces = array_unique($this->unusedNamespaces);\n $this->isProcessed = true;\n }\n }",
"protected function push()\n {\n // If current empty - start of token\n if ($this->current->isEmpty()) {\n $this->currentStringNum = $this->input->stringNum;\n $this->currentColNum = $this->input->colNum;\n }\n parent::push();\n }",
"function mSTR(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$STR;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:226:3: ( 'str' ) \n // Tokenizer11.g:227:3: 'str' \n {\n $this->matchString(\"str\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"protected function string() : void\n {\n while ($this->peek() !== '\"' && !$this->isAtEnd()) {\n if ($this->peek() == \"\\n\") $this->line++;\n $this->advance();\n }\n\n // If we are at EOF before we can consume the closing quote, this is an unterminated string\n if ($this->isAtEnd()) {\n $this->errorReporter->trackError($this->line, '', 'Unterminated string.');\n return;\n }\n\n // Consume the closing quote\n $this->advance();\n\n // Extract the token and produce the literal value\n $value = substr($this->source, $this->start + 1, $this->current - $this->start - 2);\n $this->addToken(TT::T_STRING, $value);\n }",
"protected function analyze() {\n if ($this->question->are_lexeme_sequences_equal($this->basestringpair)) {\n $this->bypass();\n $this->resultstringpairs[0]->assert_that_strings_are_equal();\n return;\n }\n\n $lexicalmistakes = $this->convert_lexer_errors_to_mistakes();\n // TODO: Biryukova's new code should be placed here!\n // 1. Compute self code - Mamontov\n // 1.1. Replace result with fixed strings\n $this->resultstringpairs = block_formal_langs_string_pair::best_string_pairs(\n $this->basestringpair->correctstring(),\n $this->basestringpair->comparedstring(),\n $this->question->lexicalerrorthreshold,\n $this->question->token_comparing_options(),\n 'qtype_correctwriting_string_pair'\n );\n\n /** @var qtype_correctwriting_string_pair $pair */\n $sequenceanalyzerdisabled = ($this->question->is_analyzer_enabled('sequence_analyzer') == false);\n foreach($this->resultstringpairs as $pair) {\n //$pair->tokenmappings[get_class($this)] = $pair->pairs_between_corrected_compared();\n /** qtype_correctwriting_string_pair */\n $pair->analyzersequence[] = get_class($this);\n if($pair->matches()==null){\n $pair->setcorrectedstring($pair->comparedstring());\n return;\n }\n $setmatches = $pair->matches()->matchedpairs;\n $lexmistakes=array();\n foreach ($setmatches as $onematch) {\n /** @var block_formal_langs_matched_tokens_pair $onematch */\n if ($onematch->mistakeweight > 0) {\n $lexmistake = new qtype_correctwriting_lexical_mistake($onematch);\n $lexmistake->stringpair = $pair;\n $lexmistake->answermistaken = $onematch->correcttokens;\n $lexmistake->responsemistaken = $onematch->comparedtokens;\n $lexmistake->mistakemsg = $onematch->message($this->basestringpair->correctstring(), $this->basestringpair->comparedstring());\n $lexmistake->weight = $onematch->mistakeweight;\n $lexmistakes[] = $lexmistake;\n }\n }\n if ($sequenceanalyzerdisabled) {\n $this->convert_non_covered_tokens_to_mistakes($pair);\n }\n $pair->append_mistakes($lexmistakes);\n }\n }",
"function Parse() {\n\n\t\t/* Index into $this->Grammar->LalrArray[]-> */\n\t\t$this->LalrState = 0; \n\t\t\n\t\t/* struct TokenStackStruct* */ \n\t\t$this->TokenStack = NULL; /* Stack of Tokens. */\n\t\t\n\t\t/* struct TokenStackStruct* */ \n\t\t$Work = NULL; /* Current token. */\n\t\t\n\t\t$this->InputHere = 0; /* Index into input. */\n\t\t$this->Line = 1; /* Line number. */\n\t\t$this->Column = 1; /* Column number. */\n\t\t$CommentLevel = 0; /* Used when skipping comments, nested comment count. */\n\t\t$Result = 0; /* Result from ParseToken(). */\n\n\t\t/* Initialize variables. */\n\t\t$this->LalrState = $this->Grammar->InitialLalrState;\n\t\t$this->TokenStack = NULL;\n\t\t$this->FirstToken = NULL;\n\n\t\t/* Sanity check. */\n\t\tif (($this->InputBuf == NULL) || ($this->InputSize == 0)) {\n\t\t\treturn(self::PARSEACCEPT);\n\t\t}\n\n\t\t/* Accept tokens until finished. */\n\t\twhile (1) {\n\n\t\t\t/* Create a new Token. Exit if out of memory. */\n\t\t\t//Work = (struct TokenStackStruct *)malloc(sizeof(struct TokenStackStruct));\n\t\t\t$Work = new TokenStackStruct();\n\t\t\t/*\n\t\t\tif ($Work == NULL) {\n\t\t\t\tParseCleanup($this->TokenStack, NULL, $this->FirstToken);\n\t\t\t\treturn(self::PARSEMEMORYERROR);\n\t\t\t}\n\t\t\t*/\n\n\t\t\t$Work->LalrState = $this->LalrState;\n\t\t\t$Work->NextToken = NULL;\n\t\t\t$Work->Token = new TokenStruct();\n\n\t\t\t/*\n\t\t\tif ($Work->Token == NULL) {\n\t\t\t\tunset($Work);\n\t\t\t\tParseCleanup($this->TokenStack, NULL, $this->FirstToken);\n\t\t\t\treturn(self::PARSEMEMORYERROR);\n\t\t\t}*/\n\n\t\t\t$Work->Token->ReductionRule = -1;\n\t\t\t$Work->Token->Tokens = NULL;\n\t\t\t$Work->Token->Line = $this->Line;\n\t\t\t$this->Symbol = $Work->Token->Symbol;\n\n\t\t\t/* Call the DFA tokenizer and parse a token from the input. */\n\t\t\t$Work->Token->Data = $this->RetrieveToken();\n\t\t\t$Work->Token->Symbol = $this->Symbol;\n\t\t\t//echo $Work->Token->Data.\"\\n\";\n\t\t\tif (($Work->Token->Data == NULL) && ($Work->Token->Symbol != 0)) {\n\t\t\t\t$this->ParseCleanup($this->TokenStack, $Work);\n\t\t\t\treturn(self::PARSEMEMORYERROR);\n\t\t\t}\n\n\t\t\t/* If we are inside a comment then ignore everything except the end\n\t\t\t of the comment, or the start of a nested comment. */\n\t\t\tif ($CommentLevel > 0) {\n\t\t\t\t/* Begin of nested comment: */\n\t\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLCOMMENTSTART) {\n\t\t\t\t\t/* Push the Token on the TokenStack to keep track of line+column. */\n\t\t\t\t\t$Work->NextToken = $this->TokenStack;\n\t\t\t\t\t$this->TokenStack = $Work;\n\n\t\t\t\t\t$CommentLevel = $CommentLevel + 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/* End of comment: */\n\t\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLCOMMENTEND) {\n\t\t\t\t\t/* Delete the Token. */\n\t\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\t\tunset($Work->Token);\n\t\t\t\t\tunset($Work);\n\n\t\t\t\t\t/* Pop the comment-start Token from the TokenStack and delete\n\t\t\t\t\t that as well. */\n\t\t\t\t\t$Work = $this->TokenStack;\n\t\t\t\t\t$this->TokenStack = $Work->NextToken;\n\t\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\t\tunset($Work->Token);\n\t\t\t\t\tunset($Work);\n\n\t\t\t\t\t$CommentLevel = $CommentLevel - 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/* End of file: Error exit. A comment was started but not finished. */\n\t\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLEOF) {\n\t\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\t\tunset($Work->Token);\n\t\t\t\t\tunset($Work);\n\t\t\t\t\t$Temp = NULL;\n\t\t\t\t\t$this->ParseCleanup($this->TokenStack, $Temp);\n\t\t\t\t\treturn(self::PARSECOMMENTERROR);\n\t\t\t\t}\n\n\t\t\t\t/* Any other Token: delete and loop. */\n\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\tunset($Work->Token);\n\t\t\t\tunset($Work);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* If the token is the start of a comment then increment the\n\t\t\t CommentLevel and loop. The routine will keep reading tokens\n\t\t\t until the end of the comment. */\n\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLCOMMENTSTART) {\n\t\t\t\tif ($this->Debug > 0)\n\t\t\t\t\tprintf(\"Parse: skipping comment.\\n\");\n\n\t\t\t\t/* Push the Token on the TokenStack to keep track of line+column. */\n\t\t\t\t$Work->NextToken = $this->TokenStack;\n\t\t\t\t$this->TokenStack = $Work;\n\n\t\t\t\t$CommentLevel = $CommentLevel + 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* If the token is the start of a linecomment then skip the rest\n\t\t\t of the line. */\n\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLCOMMENTLINE) {\n\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\tunset($Work->Token);\n\t\t\t\tunset($Work);\n\t\t\t\twhile (($this->InputHere < $this->InputSize) &&\n\t\t\t\t($this->InputBuf[$this->InputHere] != \"\\r\") &&\n\t\t\t\t($this->InputBuf[$this->InputHere] != \"\\n\")) {\n\t\t\t\t\t$this->InputHere = $this->InputHere + 1;\n\t\t\t\t}\n\t\t\t\tif (($this->InputHere < $this->InputSize) &&\n\t\t\t\t\t\t($this->InputBuf[$this->InputHere] == \"\\r\")) {\n\t\t\t\t\t$this->InputHere = $this->InputHere + 1;\n\t\t\t\t}\n\t\t\t\tif (($this->InputHere < $this->InputSize) &&\n\t\t\t\t\t\t($this->InputBuf[$this->InputHere] == \"\\n\")) {\n\t\t\t\t\t$this->InputHere = $this->InputHere + 1;\n\t\t\t\t}\n\t\t\t\t$this->Line = $this->Line + 1;\n\t\t\t\t$this->Column = 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* If parse error then exit. */\n\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLERROR) {\n\t\t\t\t$this->ParseCleanup($this->TokenStack, $Work);\n\t\t\t\treturn(self::PARSELEXICALERROR);\n\t\t\t}\n\n\t\t\t/* Ignore whitespace. */\n\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLWHITESPACE) {\n\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\tunset($Work->Token);\n\t\t\t\tunset($Work);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* The tokenizer should never return a non-terminal symbol. */\n\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLNONTERMINAL) {\n\t\t\t\tif ($this->Debug > 0) {\n\t\t\t\t\tprintf(\"Error: tokenizer returned self::SYMBOLNONTERMINAL '%S'.\\n\", $Work->Token->Data);\n\t\t\t\t}\n\t\t\t\t$this->ParseCleanup($this->TokenStack, $Work);\n\t\t\t\treturn(self::PARSETOKENERROR);\n\t\t\t}\n\n\t\t\tif ($this->Debug > 0) {\n\t\t\t\tprintf(\"Token Read: Lalr=%d Symbol=%S[%d] Value='%S'\\n\", $this->LalrState, $this->Grammar->SymbolArray[$Work->Token->Symbol]->Name, $Work->Token->Symbol, $Work->Token->Data);\n\t\t\t}\n\n\t\t\t/* Feed the Symbol to the LALR state machine. It can do several\n\t\t\t things, such as wind back and iteratively call itself. */\n\t\t\t$this->InputToken = $Work;\n\t\t\t$Result = $this->ParseToken();\n\n\t\t\t/* If out of memory then exit. */\n\t\t\tif ($Result == self::LALRMEMORYERROR) {\n\t\t\t\t$this->ParseCleanup($this->TokenStack, $Work);\n\t\t\t\treturn(self::PARSEMEMORYERROR);\n\t\t\t}\n\n\t\t\t/* If syntax error then exit. */\n\t\t\tif ($Result == self::LALRSYNTAXERROR) {\n\t\t\t\t/* Return LALR state in the Token->Symbol. */\n\t\t\t\t$Work->Token->Symbol = $this->LalrState;\n\t\t\t\t$this->ParseCleanup($this->TokenStack, $Work);\n\t\t\t\treturn(self::PARSESYNTAXERROR);\n\t\t\t}\n\n\t\t\t/* Exit if the LALR state machine says it has reached it's exit. */\n\t\t\tif ($Result == self::LALRACCEPT) {\n\t\t\t\tif ($this->Grammar->SymbolArray[$Work->Token->Symbol]->Kind == self::SYMBOLEOF) {\n\t\t\t\t\tif ($Work->Token->Data != NULL)\n\t\t\t\t\t\tunset($Work->Token->Data);\n\t\t\t\t\tunset($Work->Token);\n\t\t\t\t\tunset($Work);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$Temp = NULL;\n\t\t\t\t$this->ParseCleanup($this->TokenStack, $Temp);\n\t\t\t\t\n\t\t\t\treturn(self::PARSEACCEPT);\n\t\t\t}\n\n\t\t\t/* Push the token onto the TokenStack. */\n\t\t\t$Work->NextToken = $this->TokenStack;\n\t\t\t$this->TokenStack = $Work;\n\t\t}\n\n\t\t/* Should never get here. */\n\t}",
"protected function __update()\n\t{\n\t\t$this->tokens = array_values( $this->tokens );\n\t}",
"protected function unparse()\n\t\t{\n\t\t\tif ($this->is_parsed())\n\t\t\t\t{\n\t\t\t\t\t$temp_string = $this->toclean->save();\n\t\t\t\t\t$this->toclean = $temp_string;\n\t\t\t\t\t$this->parsed = false;\n\t\t\t\t}else{\n\t\t\t\t\tthrow New Exception(\"Call to unparse when the the string is not already parsed\");\n\t\t\t\t}\n\t\t\t\n\t\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ load all time sheets view | function all_timesheets() {
$this->access_only_team_members();
$members = $this->_get_members_to_manage_timesheet();
$view_data['members_dropdown'] = json_encode($this->_prepare_members_dropdown_for_timesheet_filter($members));
$view_data['projects_dropdown'] = json_encode($this->_get_all_projects_dropdown_list_for_timesheets_filter());
$view_data['clients_dropdown'] = json_encode($this->_get_clients_dropdown());
$this->template->rander("projects/timesheets/all_timesheets", $view_data);
} | [
"public function setLoadAllSheets();",
"private function load() {\n\t\t\t$sheet = array();\n\t\t\t\n\t\t\t$this->db->where('username',$this->user->getUsername());\n\t\t\t$rows = $this->db->get('sheets');\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$sheet['id'] = $row['id'];\n\t\t\t\t$sheet['name'] = $row['name'];\n\t\t\t\t$sheet['updated'] = $row['updated'];\n\t\t\t\t$this->data[] = $sheet;\n\t\t\t}\n\t\t}",
"function timesheets($project_id) {\n\n $this->init_project_permission_checker($project_id);\n $this->init_project_settings($project_id); //since we'll check this permission project wise\n\n\n if (!$this->can_view_timesheet($project_id)) {\n redirect(\"forbidden\");\n }\n\n $view_data['project_id'] = $project_id;\n\n //client can't add log or update settings\n $view_data['can_add_log'] = false;\n $view_data['can_update_settings'] = false;\n\n if ($this->login_user->user_type === \"staff\") {\n $view_data['can_add_log'] = true;\n $view_data['can_update_settings'] = $this->can_create_projects(); //settings can update only the allowed members\n }\n\n $view_data['project_members_dropdown'] = json_encode($this->_get_project_members_dropdown_list_for_filter($project_id));\n $view_data['tasks_dropdown'] = $this->_get_timesheet_tasks_dropdown($project_id, true);\n\n $this->load->view(\"projects/timesheets/index\", $view_data);\n }",
"public function listAction()\r\n {\r\n $pid = $this->_getParam('projectid');\r\n $where = array();\r\n if ($pid) {\r\n $where['projectid='] = $pid;\r\n }\r\n $cid = $this->_getParam('clientid');\r\n if ($cid) {\r\n $where['clientid='] = $cid;\r\n }\r\n \r\n $this->view->timesheets = $this->projectService->getTimesheets($where);\r\n \r\n $this->renderView('timesheet/list.php');\r\n }",
"public function dataSheets()\n {\n return view('resources.data_sheets');\n }",
"function loadWorksheets()\n\t {\n\t \t$xmlURL = \"https://spreadsheets.google.com/feeds/worksheets/\".$this->getSpreadsheetKey().\"/public/values\";\n\t\t$data = $this->fetchXML($xmlURL);\n\n\t\t$xml = simplexml_load_string($data);\n\t\t\n\t\tfor ($i = 0; $i < count ($xml->entry); $i++)\n\t\t{\n\t\t\t$id = explode(\"/\", $xml->entry[$i]->id);\n\t\t\t$id = $id[count($id)-1];\n\t\t\t\n\t\t\tarray_push($this->worksheets, array(\n\t\t\t\t$xml->entry[$i]->title, //name\n\t\t\t\t$xml->entry[$i]->id, //url\n\t\t\t\t$id, //id\n\t\t\t\t$xml->updated //date\n\t\t\t));\n\t\t}\n\t\t\n\n\t\t\n\t }",
"public function indexAction()\n {\n $entityManager = $this->getDoctrine()->getManager();\n $timesheets = $entityManager->getRepository(Timesheet::class)->findAll();\n\n return $this->render('admin/timesheet/index.html.twig', ['timesheets' => $timesheets]);\n }",
"protected function loadTimeslots(): void\n {\n $this->times = PrayerWheel::getTimeSlots();\n }",
"public function timesheets()\n\t{\n\t\treturn $this->hasMany('App\\Timesheet');\n\t}",
"public function weekviewAction() {\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$auth->setStorage(new Zend_Auth_Storage_Session('vazneyStorage'));\n\t\tif($auth->getIdentity()) {\n\t\t\t$options['userid'] =(int) $auth->getIdentity()->id;\n\t\t}\n\t\t$calendar = new ZFHtml_WeekTable($options);\n\t\t$this->view->calendar = $calendar->yield();\n\t}",
"public function timesheet()\n {\n return $this->belongsTo(TimeSheet::class);\n }",
"public function renderSingleTimesheet() {\n\n // For now, just echo timesheet contents to page.\n echo \"Timesheet ID: \" . $this->timesheets[0]['TimesheetID'];\n echo \" Timesheet Date: \" . $this->timesheets[0]['Date'];\n echo \" Timesheet TimeFrom: \" . $this->timesheets[0]['TimeFrom'];\n echo \" Timesheet TimeTo: \" . $this->timesheets[0]['TimeTo'];\n echo \" Timesheet contract: \" . $this->timesheets[0]['Contract'];\n }",
"public static function loadViews(){ \n $sql = \"SHOW FULL TABLES WHERE table_type='view'\";\n $results = self::query($sql); \n return $results;\n }",
"function loadListOfViews()\r\n\t{\r\n\t\tif(!isset($this->viewList))\r\n\t\t{\r\n\t\t\t$this->viewList = array();\r\n\t\t\t\r\n\t\t\t// query all views\r\n\t\t\t$viewListQuery = $this->mc->database->query(\"SELECT view_id, view_name, view_start FROM \" . $this->mc->config['database_pref'] . \"views AS A WHERE 1 ORDER BY view_id\", array(), array(array(\"views\", \"view_id\")));\r\n\t\t\t\r\n\t\t\tforeach($viewListQuery->rows as $currentView)\r\n\t\t\t{\r\n\t\t\t\t$currentViewDetails = array();\r\n\t\t\t\t$currentViewDetails['view_id'] = $currentView->view_id;\r\n\t\t\t\t$currentViewDetails['view_start'] = $currentView->view_start;\r\n\t\t\t\t$currentViewDetails['view_name'] = $this->mc->language->getLocalisation($currentView->view_name);\r\n\t\t\t\t$this->viewList[] = $currentViewDetails;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->viewList;\r\n\t}",
"static function load_views() {\n $result = db_query(\"SELECT DISTINCT v.* FROM {views_view} v\");\n $views = array();\n\n // Load all the views.\n foreach ($result as $data) {\n $view = new view;\n $view->load_row($data);\n $view->loaded = TRUE;\n $view->type = t('Normal');\n $views[$view->name] = $view;\n $names[$view->vid] = $view->name;\n }\n\n // Stop if we didn't get any views.\n if (!$views) {\n return array();\n }\n\n // Now load all the subtables:\n foreach (view::db_objects() as $key) {\n $object_name = \"views_$key\";\n $result = db_query(\"SELECT * FROM {{$object_name}} WHERE vid IN (:vids) ORDER BY vid, position\",\n array(':vids' => array_keys($names)));\n\n foreach ($result as $data) {\n $object = new $object_name(FALSE);\n $object->load_row($data);\n\n // Because it can get complicated with this much indirection,\n // make a shortcut reference.\n $location = &$views[$names[$object->vid]]->$key;\n\n // If we have a basic id field, load the item onto the view based on\n // this ID, otherwise push it on.\n if (!empty($object->id)) {\n $location[$object->id] = $object;\n }\n else {\n $location[] = $object;\n }\n }\n }\n return $views;\n }",
"function finanzen_timesheet( $date = 0 ) {\n\n if ($date == 0) {\n $current_date = time ();\n $first_day_year = _finanzen_first_day_year($current_date);\n }\n else \n $first_day_year = _finanzen_first_day_year($date);\n \n global $user;\n \n if (empty($user->og_groups)) {\n $content .= 'You do not belong to any project. Go and <a href=\"og\">join a project</a>.';\n }\n else {\n \n $content .= _finanzen_timesheet_summary($first_day_year, $user->uid);\n \n $first_month_user = _finanzen_first_day_month($user->created);\n $content .= _finanzen_timesheet_navigator($first_day_year, $user->name, $first_month_user);\n \n $all_projects = $user->og_groups;\n \n $months_curr_year = _finanzen_list_months_year ($first_day_year);\n \n /* Build header */\n $header['date'] = array('data' => \"\", 'class' => 'column_date');\n foreach ($all_projects as $project) {\n $project_code = _finanzen_get_project_code($project[nid]);\n $header[$project_code] = array('data' => $project_code, 'class' => 'column_project');\n }\n $header['total'] = array('data' => \"Total\", 'class' => 'column_total');\n $header['edit'] = t(\"Edit\");\n \n /* Get data */\n foreach ($months_curr_year as $month_name => $month_data) {\n \n if (/*(time() >= $month_data['date']) &&*/ ($first_month_user <= $month_data['date'])) {\n\t $total_hours_worker_month = 0;\n\t \t \n\t \t $rowdata['date'] = date('M Y', $month_data['date']);\n\t \t \n\t foreach ($all_projects as $project) {\n\t $total_hours_worker_month_project = 0;\n\t\t $query = \"SELECT ftwhp.nid, ftwhp.hours FROM {finanzen_timesheet_worker_hours_projects} ftwhp \n\t\t WHERE ftwhp.date>=\" . $month_data['date'] . \" \n\t\t AND ftwhp.date<\" . _finanzen_get_first_day_next_month($month_data['date']) . \" \n\t\t AND ftwhp.uid=\" . $user->uid . \" \n\t\t AND ftwhp.project_id=\" . $project[nid];\n\t\t $queryResult = db_query ( $query );\n\t\t \n\t\t while ($resource = db_fetch_object($queryResult)){\n\t\t $total_hours_worker_month_project += $resource->hours;\n\t\t $total_hours_worker_month += $resource->hours;\n\t\t }\n\t\t \n\t\t $rowdata[$project[title]] = round($total_hours_worker_month_project, 2) . ' hr' ;\n\t }\n\t \n\t $rowdata['total'] = '<strong>' . round($total_hours_worker_month, 2) . ' hr</strong>';\n\t $rowdata['edit'] = '<a href=\"/timesheet/edit-month/' . $month_data['date'] . '\"><img class=\"edit-pencil\" src=\"/'\n\t . drupal_get_path('module', 'finanzen') . '/img/pencil.png\" /></a>';\n\t\n\t\t $rows[] = $rowdata;\n\t }\n }\n \n $content .= theme_table($header, $rows, array('class' => 'finanzen timesheet timesheet-main'));\n }\n \n return $content;\n}",
"public function employeetimesheetAction(){\n\t\t$storage = new Zend_Auth_Storage_Session();\n\t\t$data = $storage->read();\n\n\t\t$selYrMon = $this->_getParam('selYrMon');\n\t\t$user_id = $this->_getParam('user_id');\n\t\t$manager_id = $this->_getParam('manager_id');\n\t\t$type = $this->_getParam('type');\n\t\t$hidweek = $this->_getParam('hidweek');\n\t\t$emplistflag = $this->_getParam('emplistflag');\n\t\t$project_ids = $this->_getParam('project_ids');\n\n\n\t\t$empTimesheets_model=new Timemanagement_Model_Emptimesheets();\n\t\t$min_year=$empTimesheets_model->getMinYear();\n\t\t$date1 = new DateTime(date('Y-m-01'));\n\t\t$startday=$date1->format('Y-m-d');\n\t\t$endday=date('Y-m').\"-\".cal_days_in_month(CAL_GREGORIAN, $date1->format('m'), $date1->format('Y')); //ending date of month\n\n\t\t$this->view->tm_role = Zend_Registry::get('tm_role');\n\t\t$this->view->data=$data;\n\t\t$this->view->startday_m=$startday;\n\t\t$this->view->endday_m=$endday;\n\t\t$this->view->min_year=$min_year;\n\t\t$this->view->type = $type;\n\t\t$this->view->selYrMon = $selYrMon;\n\t\t$this->view->user_id = $user_id;\n\t\t$this->view->manager_id = $manager_id;\n\t\t$this->view->hidweek = $hidweek;\n\t\t$this->view->emplistflag = $emplistflag;\n\t\t$this->view->project_ids = $project_ids;\n\n\t}",
"static function loadAll(){\n Controller::getEpisodes();\n Controller::getFranchises();\n Controller::getGenre();\n Controller::getMovies();\n Controller::getSeasons();\n Controller::getShows();\n }",
"function loadListOfViews()\r\n\t{\r\n\t\tif(!isset($this->viewList))\r\n\t\t{\r\n\t\t\t$this->viewList = array();\r\n\t\t\t\r\n\t\t\t// query all views\r\n\t\t\t$viewListQuery = $this->mc->database->query(\"SELECT view_id, view_name FROM \" . $this->mc->config['database_pref'] . \"views AS A WHERE 1 ORDER BY view_id\", array(), array(array(\"views\", \"view_id\")));\r\n\t\t\t\r\n\t\t\tforeach($viewListQuery->rows as $currentView)\r\n\t\t\t{\r\n\t\t\t\t$currentViewDetails = array();\r\n\t\t\t\t$currentViewDetails['view_id'] = $currentView->view_id;\r\n\t\t\t\t$currentViewDetails['view_name'] = $this->mc->language->getLocalisation($currentView->view_name);\r\n\t\t\t\t$this->viewList[] = $currentViewDetails;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->viewList;\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This test ensures that all dblists are alphasorted | public function testListsAreSorted() {
$lists = DBList::getLists();
foreach ( $lists as $listname => $dbnames ) {
$origdbnames = $dbnames;
sort( $dbnames );
$this->assertEquals(
$origdbnames,
$dbnames,
"{$listname}.dblist is not alphasorted"
);
}
} | [
"public function testIsAlpha() {\n $this->assertTrue(Hash::isAlpha(array('foo', 'bar')));\n $this->assertTrue(Hash::isAlpha(array('foo' => 'bar', 'number' => '123'), false));\n $this->assertTrue(Hash::isAlpha(array('bar', '123'), false));\n\n $this->assertFalse(Hash::isAlpha(array('foo' => 'bar', 'number' => '123')));\n $this->assertFalse(Hash::isAlpha(array('bar', '123')));\n $this->assertFalse(Hash::isAlpha(array('foo' => 123)));\n $this->assertFalse(Hash::isAlpha(array(null)));\n $this->assertFalse(Hash::isAlpha(array(true)));\n $this->assertFalse(Hash::isAlpha(array(false)));\n $this->assertFalse(Hash::isAlpha(array(array())));\n $this->assertFalse(Hash::isAlpha(array(new stdClass())));\n }",
"public function testSortByKey4()\n {\n $this->assertEquals(Arr::sortByKey($this->dummies3, 'id'), $this->dummies3ASC);\n }",
"public function natcasesort () {}",
"public function natcasesort() { }",
"function wc_ascii_uasort_comparison($a, $b)\n {\n }",
"public function natcasesort() {}",
"function natcasesort() {\n\t\tnatcasesort($this->array);\n\t}",
"public function testRuleIsAlpha(): void {\r\n\r\n //Should pass\r\n foreach(['abcdefg', 'sfire'] as $data) {\r\n\r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isAlpha();\r\n $this -> assertTrue($validator -> passes());\r\n $this -> assertFalse($validator -> fails());\r\n }\r\n\r\n //Should fail\r\n foreach([null, [], (object) [], 2552, true, '2817334'] as $data) {\r\n\r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isAlpha();\r\n $this -> assertFalse($validator -> passes());\r\n }\r\n\r\n //Should fail\r\n $validator = new Validator();\r\n $validator -> field('field') -> isAlpha();\r\n $this -> assertFalse($validator -> passes());\r\n }",
"public function testSort()\n {\n // sort all elements by their value\n CollectionUtils::sort($this->list, new TestComparator());\n $this->assertEquals(\"Adolf\", $this->list->get(0));\n $this->assertEquals(\"Albert\", $this->list->get(1));\n $this->assertEquals(\"Caesar\", $this->list->get(2));\n $this->assertEquals(\"Dodo\", $this->list->get(3));\n $this->assertEquals(\"Franz\", $this->list->get(4));\n $this->assertEquals(\"Julius\", $this->list->get(5));\n $this->assertEquals(\"Zacharias\", $this->list->get(6));\n }",
"public function testSpecialSortingByUndefinedKey()\n {\n $sort = Sort::using([ 'aaa', 'bb', 'c' ])->by('strlen')->get();\n\n static::assertSame([ 'aaa', 'bb', 'c' ], array_values($sort));\n }",
"public function isCorrectOrdering(): void;",
"public function testSortCmpNaturalCaseByKey()\n {\n $this->assertSame(\n array(\n 'img1.jpg' => 'img1.jpg',\n 'Img2.jpg' => 'Img2.jpg',\n 'img10.jpg' => 'img10.jpg',\n 'Img11.jpg' => 'Img11.jpg',\n ),\n iterator_to_array( new SortIterator(\n $this->array,\n SortIterator::SORT_CMP_NATURALCASE,\n SortIterator::SORT_BY_KEY\n ) )\n );\n }",
"public function testSpecialSortingByUndefinedKeyDesc()\n {\n $sort = Sort::using([ 'aaa', 'bb', 'c' ])->by('strlen', SORT_DESC)->get();\n\n static::assertSame([ 'aaa', 'bb', 'c' ], array_values($sort));\n }",
"public function testSort() {\n $this->assertEquals(TableSort::ASC, tablesort_get_sort([]));\n }",
"function alpharead3($dir)\n{\n\t\tif(!$dir)\n\t\t\t\t{\n\t\t\t\t$dir = '.';\n\t\t\t\t}\n\n\t\tforeach(glob(\"$dir/*\") as $item)\n\t\t{\n\t\t$sort[]= end(explode('/',$item));\n\t\t}\n\n\t\t$killit = array('index.html', 'index.php', 'thumbs.db', 'styles.css');\n\t\t$killcounter = 0;\n\n\t\tforeach($sort as $sorteditem)\n\t\t{\n\t\t\tforeach($killit as $killcheck)\n\t\t\t{\n\n\t\t\t\tif(strtolower($sorteditem) == strtolower($killcheck))\n\t\t\t\t\t{\n\t\t\t\t\tunset($sort[$killcounter]);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t$killcounter++;\n\t\t }\n\n\t\t\tif($sort)\n\t\t\t\t\t{\n\t\t\t\t\tnatsort($sort);\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach($sort as $item)\n\t\t\t\t\t{\n\t\t\t\t\t$return[]= $item;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!$return)\n\t\t\t\t\t\t{\n\t\t\t\t\t\treturn array();\n\t\t\t\t\t\t}\n\t\t\treturn $return;\n}",
"public static function sortAlpArray($array){\n\n\n\n $count = count($array) ;\n $z = 0;\n $beta = 'A' ;\n $alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','w','u','v','x','y','z'] ;\n $reCheck = 0 ;\n $q = 0;\n\n $checkCounter = [] ;\n\n for ($i=0; $i < 27; $i++) {\n $checkCounter[$i] = 0;\n }\n\n for($i = 0; $i < $count; $i++){\n\n $alpha = strtoupper(substr($array[$i]->name,0,1)) ;\n $check = array_search(strtolower($alpha), $alphabet) ;\n\n\n if($check !== FALSE){\n\n $arranged[$check][$checkCounter[$check]]['name'] = $array[$i]->name ;\n $arranged[$check][$checkCounter[$check]]['id'] = $array[$i]->id ;\n $arranged[$check][$checkCounter[$check]]['url'] = $array[$i]->url ;\n\n $checkCounter[$check]++;\n\n }\n\n else if(($array[$i]->id) && ($array[$i]->url)){\n\n\n $arranged[26][$checkCounter[26]]['name'] = $array[$i]->name ;\n $arranged[26][$checkCounter[26]]['id'] = $array[$i]->id ;\n $arranged[26][$checkCounter[26]]['url'] = $array[$i]->url ;\n\n $checkCounter[26]++;\n\n }\n\n else{\n\n\n\n }\n\n\n $reCheck = $check ;\n\n }\n\n\n return $arranged ;\n\n }",
"public function testOrder() {\n $this->assertEquals(\n [\n 'name' => NULL,\n 'sql' => NULL,\n ],\n tablesort_get_order([])\n );\n }",
"function getalpha() {\r\n\t$a = array(\r\n\t\t'status' => 'system-error'\r\n\t);\r\n\r\n\t// no inputs\r\n\t$conn = getConnection();\r\n\tif (!$conn) {\r\n\t\treturn $a;\r\n\t}\r\n\r\n\t// compose sql\r\n\t$sql = 'select * from mai.alphabet order by t;';\r\n\r\n\t$name = 'list-alpha';\r\n\t$params = array();\r\n\t$result = execSql($conn, $name, $sql, $params, false);\r\n\tif (!$result) {\r\n return $a;\r\n\t}\r\n\r\n\t$alphs = array();\r\n $numrows = pg_num_rows($result);\r\n for ($i=0; $i<$numrows; $i++) {\r\n $row = pg_fetch_array($result, $i, PGSQL_ASSOC);\r\n $alph = array();\r\n\t\t$alph['id'] = $row['id'];\r\n\t\t$alph['t'] = $row['t'];\r\n\t\t$alph['e'] = $row['e'];\r\n\t\t$alph['u'] = $row['u'];\r\n\t\t$alph['r'] = $row['r'];\r\n\t\t$alph['m'] = $row['m'];\r\n\t\t$alph['a'] = trim($row['a']);\r\n $alphs[] = $alph;\r\n }\r\n\r\n\t// success\r\n\t$a['status'] = 'ok';\r\n\t$a['list'] = $alphs;\r\n\treturn $a;\r\n}",
"public function testSort()\r\n\t{\r\n\t\t// sort all elements by their value\r\n\t\tTechDivision_Collections_CollectionUtils::sort(\r\n\t\t $this->list,\r\n\t\t new TechDivision_Collections_TestComparator()\r\n\t\t);\r\n\t\t$this->assertEquals(\"Adolf\", $this->list->get(0));\r\n\t\t$this->assertEquals(\"Albert\", $this->list->get(1));\r\n\t\t$this->assertEquals(\"Caesar\", $this->list->get(2));\r\n\t\t$this->assertEquals(\"Dodo\", $this->list->get(3));\r\n\t\t$this->assertEquals(\"Franz\", $this->list->get(4));\r\n\t\t$this->assertEquals(\"Julius\", $this->list->get(5));\r\n\t\t$this->assertEquals(\"Zacharias\", $this->list->get(6));\r\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getGroupOrder($surveyid,$gid) queries the database for the sortorder of a group. | function getGroupOrder($surveyid, $gid)
{
$s_lang = Survey::model()->findByPk($surveyid)->language;
$grporder_result = QuestionGroup::model()->findByAttributes(array('sid' => $surveyid, 'gid' => $gid, 'language' => $s_lang)); //Checked
$grporder_row = $grporder_result->attributes;
$group_order = $grporder_row['group_order'];
if ($group_order == "") {
return "0";
} else {
return $group_order;
}
} | [
"public function getGroupOrder($group_id) {\n return $this->_db->get('groups', array('id', '=', $group_id))->results()[0]->order;\n }",
"function sort_groups($group_type='ARO') {\r\n\r\n\t\tswitch(strtolower($group_type)) {\r\n\t\t\tcase 'axo':\r\n\t\t\t\t$table = 'axo_groups';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$table = 'aro_groups';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Grab all groups from the database.\r\n\t\t$query = \"select\r\n\t\t\t\t\t\t\t\t\tid,\r\n\t\t\t\t\t\t\t\t\tparent_id,\r\n\t\t\t\t\t\t\t\t\tname\r\n\t\t\t\t\t\tfrom $table\r\n\t\t\t\t\t\torder by parent_id, name asc\";\r\n\t\t$rs = $this->db->Execute($query);\r\n\t\t$rows = $rs->GetRows();\r\n\r\n\t\t/*\r\n\t\t * Save groups in an array sorted by parent. Should be make it easier for later on.\r\n\t\t */\r\n\t\tif ($rows != FALSE) {\r\n\t\t\tforeach ($rows as $row) {\r\n\t\t\t\t$id = &$row[0];\r\n\t\t\t\t$parent_id = &$row[1];\r\n\t\t\t\t$name = &$row[2];\r\n\r\n\t\t\t\t$sorted_groups[$parent_id][$id] = $name;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $sorted_groups;\r\n\t}",
"function add_buildgroup_sortlist($groupname)\n{\n // This information can be provided as a query string, otherwise we apply\n // some default ordering here. Default sort ordering for a group is based\n // on the groupname.\n //\n // Sort settings should probably be definable/overrideable by the user as wel\n // on the users page, or perhaps by the project admin on the project page.\n //\n $st = '';\n $xml = '';\n\n if(isset($_GET[\"sort\"]))\n {\n $xml .= add_XML_value(\"sortlist\", \"{sortlist: \" . $_GET[\"sort\"] . \"}\");\n return $xml;\n }\n\n $gn = strtolower($groupname);\n\n if (strpos($gn, 'nightly') !== FALSE)\n {\n $st = 'SortAsNightly';\n }\n else if ((strpos($gn, 'continuous') !== FALSE) || (strpos($gn, 'experimental') !== FALSE))\n {\n $st = 'SortByTime';\n }\n\n switch($st)\n {\n case 'SortAsNightly':\n $xml .= add_XML_value(\"sortlist\", \"{sortlist: [[4,1],[7,1],[11,1],[10,1],[5,1],[8,1]]}\");\n // Theoretically, most important to least important:\n // configure errors DESC, build errors DESC, tests failed DESC, tests not run DESC,\n // configure warnings DESC, build warnings DESC\n break;\n\n case 'SortByTime':\n $xml .= add_XML_value(\"sortlist\", \"{sortlist: [[14,1]]}\");\n // build time DESC\n break;\n\n // By default, no javascript-based sorting. Accept the ordering naturally as it came from\n // MySQL and the php processing code...\n }\n\n return $xml;\n}",
"abstract function getDataTypeFieldGroupOrder();",
"function gen_group_report( $gid )\n {\n // ----------------------------------------------------------------\n // Get database info first\n // ----------------------------------------------------------------\n\n // Let's grab some overall total stuff first\n $this->ipsclass->DB->simple_construct( array( 'select' => 'SUM( file_size ) as total_size, AVG( file_size ) as total_avg_size, COUNT( file_size ) as total_uploads',\n 'from' => 'gallery_images' ) );\n $this->ipsclass->DB->simple_exec();\n\n $stats = $this->ipsclass->DB->fetch_row();\n\n $this->ipsclass->DB->simple_construct( array( 'select' => 'SUM( size ) as total_transfer, COUNT( size ) as total_viewed',\n 'from' => 'gallery_bandwidth' ) );\n $this->ipsclass->DB->simple_exec();\n\n $stats = array_merge( $stats, $this->ipsclass->DB->fetch_row() );\n\n // Now let's get some indivisual stuff\n $this->ipsclass->DB->cache_add_query( 'get_group_rep_diskspace', array( 'gid' => $gid ), 'gallery_admin_sql_queries' ); $this->ipsclass->DB->simple_exec();\n\n $stats = array_merge( $stats, $this->ipsclass->DB->fetch_row() );\n\n $this->ipsclass->DB->cache_add_query( 'get_group_rep_bandwidth', array( 'gid' => $gid ), 'gallery_admin_sql_queries' ); $this->ipsclass->DB->simple_exec();\n\n\t\tif( $this->ipsclass->DB->get_num_rows() )\n\t\t{\n \t$stats = array_merge( $stats, $this->ipsclass->DB->fetch_row() );\n\t\t}\n\n // Now let's find out who we are talking about here\n $this->ipsclass->DB->simple_construct( array( 'select' => 'g_title', 'from' => 'groups', 'where' => \"g_id={$gid}\" ) );\n $this->ipsclass->DB->simple_exec();\n $group = $this->ipsclass->DB->fetch_row();\n\n // ----------------------------------------------------------------\n // Let's take a break fom querying, and start showing some stuff ;)\n // ----------------------------------------------------------------\n\n // Page Information\n $this->ipsclass->admin->page_title = \"Group Report for {$group['g_title']}\";\n $this->ipsclass->admin->page_detail = \"Here you will find detailed statistcs related to diskspace usage and bandwidth usage\";\n\n $this->ipsclass->adskin->td_header[] = array( \"Definition\", \"25%\" );\n $this->ipsclass->adskin->td_header[] = array( \"Value\" , \"25%\" );\n $this->ipsclass->adskin->td_header[] = array( \"Definition\", \"25%\" );\n $this->ipsclass->adskin->td_header[] = array( \"Value\" , \"25%\" );\n\n //+-----------------------------------------------------------\n\n $this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Gallery Usage Overview\" );\n\n $dp_percent = ( $stats['total_size'] ) ? ( round( $stats['group_size'] / $stats['total_size'], 2 ) * 100 ).'%' : '0%';\n $up_percent = ( $stats['total_uploads'] ) ? ( round( $stats['group_uploads'] / $stats['total_uploads'], 2 ) * 100 ).'%' : '0%';\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( 'Diskspace Overview', 'left', 'catrow2' );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<B>Total Diskspace</B>\" , $this->glib->byte_to_kb( $stats['group_size'] ),\n \"<B>Percent of all Diskspace used</B>\", $dp_percent,\n ) );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<B>Total Uploads</B>\" , $stats['group_uploads'],\n \"<B>Percent of all uploads</B>\", $up_percent,\n ) );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<B>Average File Size</B>\" , $this->glib->byte_to_kb( $stats['group_avg_size'] ),\n \"<B>Average File Size of all groups</B>\", $this->glib->byte_to_kb( $stats['total_avg_size'] ),\n ) );\n\n // Display bandwidth info, if we record such things\n if( $this->ipsclass->input['gallery_detailed_bandwidth'] )\n {\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( 'Bandwidth Overview for the past ' . $this->ipsclass->input['gallery_bandwidth_period'] . ' hours', 'left', 'catrow2' );\n\n $tr_percent = ( $stats['total_transfer'] ) ? ( round( $stats['group_transfer'] / $stats['total_transfer'], 2 ) * 100 ).'%' : '0%';\n $vi_percent = ( $stats['total_viewed'] ) ? ( round( $stats['group_viewed'] / $stats['total_viewed'], 2 ) * 100 ).'%' : '0%';\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<B>Total Transfer</B>\" , $this->glib->byte_to_kb( $stats['group_transfer'] ),\n \"<B>Percent of all Transfer</B>\", $tr_percent,\n ) );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<B>Total Views</B>\" , $stats['group_viewed'],\n \"<B>Percent of all views</B>\", $vi_percent,\n ) );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n }\n else\n {\n $this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n }\n\n // $this->ipsclass->html .= $this->ipsclass->adskin->add_td_spacer();\n\n $this->ipsclass->adskin->td_header[] = array( \"Definition\", \"25%\" );\n $this->ipsclass->adskin->td_header[] = array( \"Value\" , \"25%\" );\n $this->ipsclass->adskin->td_header[] = array( \"Definition\", \"25%\" );\n $this->ipsclass->adskin->td_header[] = array( \"Value\" , \"25%\" );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Other Information\" );\n\n $this->ipsclass->DB->cache_add_query( 'get_group_ecard_count', array( 'gid' => $gid ), 'gallery_admin_sql_queries' ); $this->ipsclass->DB->simple_exec();\n\n\n\n $cnt = $this->ipsclass->DB->fetch_row();\n\n $this->ipsclass->DB->cache_add_query( 'get_group_comment_count', array( 'gid' => $gid ), 'gallery_admin_sql_queries' ); $this->ipsclass->DB->simple_exec();\n\n $cnt = array_merge( $cnt, $this->ipsclass->DB->fetch_row() );\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>E-Card's Sent</b> \",\n ( $cnt['ecards'] ) ? $cnt['ecards'] : 0 ,\n \"<b>Total Comments</b>\",\n ( $cnt['comments'] ) ? $cnt['comments'] : 0,\n ) );\n\n $this->ipsclass->DB->cache_add_query( 'get_group_rating_overview', array( 'gid' => $gid ), 'gallery_admin_sql_queries' ); $this->ipsclass->DB->simple_exec();\n\n $rate = $this->ipsclass->DB->fetch_row();\n\n $this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Total images rated by this group</b> \",\n ( $rate['total_rates'] ) ? $rate['total_rates'] : 0,\n \"<b>Average rating given by this group</b>\",\n round( $rate['avg_rate'], 2 ),\n ) );\n\n\n $this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\n $this->ipsclass->admin->output();\n\n }",
"private function dbGetGroup()\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$q = \"select userid, grouplist from usergroup where upper(userid)='\".$this->userId.\"';\";\r\n\r\n\t\t$row = $db->getRow($q,ARRAY_A);\r\n\t\tif (!$row) \r\n\t\t\t$hasil='common;';\r\n\t\telse\r\n\t\t{\r\n\t\t\t$hasil = $row['grouplist'];\r\n\t\t\t$hasil.='common;';\r\n\t\t}\r\n\t\t$this->group = explode(';',$hasil);\r\n\t\t$i=0;\r\n\t\tforeach ($this->group as $groupitem)\r\n\t\t{\r\n\t\t\t$groupitem = trim($groupitem);\r\n\t\t\tif ($groupitem=='') continue;\r\n\t\t\t$q = \"select grouppath,groupattr from grouppath where groupname='\".$groupitem.\"';\";\r\n\t\t\t$attr = $db->getResults($q,ARRAY_N);\r\n\t\t\t\r\n\t\t\tif (is_null($attr)) return -1;\r\n\r\n\t\t\tforeach($attr as $row)\r\n\t\t\t{\r\n\t\t\t\t$i++;\r\n if (isset($this->groupPath[$row[0]]))\r\n {\r\n $this->groupPath[$row[0]].=$row[1];\r\n }\r\n else\r\n\t\t\t\t$this->groupPath[$row[0]]= $row[1]; //group['grouppath']='groupattr'\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $i;\t\r\n\t}",
"function getExam_Groups_By_Id_Status_ORDER_BY_Order_no() {\n\t\t$SQL=\"SELECT * FROM exam_groups WHERE id = '$id' AND status = 'Yes' ORDER BY CAST(order_no AS DECIMAL)\";\n\t\t$this->db->executeQuery($SQL);\n\n\t\t$result = array();\n\t\t$count = 0;\n\n\t\twhile($rs = $this->db->nextRecord())\n\t\t{\n\t\t\t$exam_groups = new Exam_Groups();\n\t\t\t$exam_groups->setId($rs['id']);\n\t\t\t$exam_groups->setName($rs['name']);\n\t\t\t$exam_groups->setBatch_id($rs['batch_id']);\n\t\t\t$exam_groups->setExam_type($rs['exam_type']);\n\t\t\t$exam_groups->setIs_published($rs['is_published']);\n\t\t\t$exam_groups->setResult_published($rs['result_published']);\n\t\t\t$exam_groups->setExam_date($rs['exam_date']);\n\t\t\t$result[$count++] = $exam_groups;\n\t\t}\n\n\t\t$this->db->closeRs();\n\t\tif(count($result) > 0 ){\n\t\t\treturn $result[0];\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}",
"function getgroupquote($sorder, $offset) {\n\n if(check_empty($offset)) {\n \n $offset = 50;\n \n }\n \n $sql = \"select \" . col_qid . \", \" . col_qtext . \", \" . col_score . \" from \" . tbl_quote . \" where \" . col_qstat . \"=2 order by \" . col_score . \" \" . $sorder . \" limit 0, \" . $offset . \";\";\n\n // global $dbconn;\n \n $res = @mysql_query($sql);\n \n if(debug == 1) {\n \n debug_sqlfnc($sql, mysql_error());\n \n }\n \n for ($i=0; $i < mysql_numrows($res); $i++) {\n \n $resarr[] = mysql_fetch_assoc($res);\n \n }\n \n return $resarr; \n\n}",
"public function fetchOrderRecords($group_name, $subscription, $order);",
"protected function _getItemGroupSortIndex($criteria, $direction)\r\n\t{\r\n\t\t// Get index, sorted in ascending order\r\n\t\tswitch ($criteria) {\r\n\t\t\tcase 'name':\r\n\t\t\t\t$cacheKey = 'itemGroups_sortable_name';\r\n\t\t\t\t$index = $this->_cache->get($cacheKey);\r\n\t\t\t\tif ($index === false) {\r\n\t\t\t\t\t$query = 'SELECT ag.id, ag.title\r\n\t\t\t\t\t\tFROM `articleGroups` AS `ag`\r\n\t\t\t\t\t\tORDER BY ag.title ASC';\r\n\t\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t\t$index = $this->_db->loadResultAssocArray('id', 'title');\r\n\r\n\t\t\t\t\t$this->_cache->set($cacheKey, $index, 60 * 60 * 24 / 2, null, array('compress' => true));\r\n\t\t\t\t}\r\n\t\t\t\t$sorted = Utility::SORT_ASC;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'date':\r\n\t\t\t\t$cacheKey = 'itemGroups_sortable_date';\r\n\t\t\t\t$index = $this->_cache->get($cacheKey);\r\n\t\t\t\tif ($index === false) {\r\n\t\t\t\t\t$query = 'SELECT ag.id, UNIX_TIMESTAMP(ag.date) as `date`\r\n\t\t\t\t\t\tFROM `articleGroups` AS `ag`\r\n\t\t\t\t\t\tORDER BY `date` DESC';\r\n\t\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t\t$index = $this->_db->loadResultAssocArray('id', 'date');\r\n\r\n\t\t\t\t\t$this->_cache->set($cacheKey, $index, 60 * 60 * 24 / 2, null, array('compress' => true));\r\n\t\t\t\t}\r\n\t\t\t\t$sorted = Utility::SORT_DESC;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'saves':\r\n\t\t\t\t$cacheKey = 'itemGroups_sortable_saves';\r\n\t\t\t\t$index = $this->_cache->get($cacheKey);\r\n\t\t\t\tif ($index === false) {\r\n\t\t\t\t\t$query = 'SELECT ag.id, COUNT(ag.id) AS `saves`\r\n\t\t\t\t\t\tFROM `articleGroups` AS `ag`\r\n\t\t\t\t\t\t\tLEFT JOIN `userSaves` AS `us` ON ag.id = us.objectId\r\n\t\t\t\t\t\t\t\tAND us.objectType = \"cookbook\"\r\n\t\t\t\t\t\tGROUP BY ag.id\r\n\t\t\t\t\t\tORDER BY `saves` DESC';\r\n\t\t\t\t\t$this->_db->setQuery($query);\r\n\t\t\t\t\t$index = $this->_db->loadResultAssocArray('id', 'saves');\r\n\r\n\t\t\t\t\t$this->_cache->set($cacheKey, $index, 60 * 60 * 24 / 2, null, array('compress' => true));\r\n\t\t\t\t}\r\n\t\t\t\t$sorted = Utility::SORT_DESC;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t// Flip, if necessary\r\n\t\tif ($direction != $sorted) {\r\n\t\t\t$index = array_reverse($index, true);\r\n\t\t}\r\n\r\n\t\t// Return\r\n\t\treturn $index;\r\n\t}",
"function synk_aro_groups($synkdb, $gid, &$options)\r\n\t{\r\n\t\t$success = &$options['success'];\r\n\t\t$msg = &$options['msg'];\r\n\t\t$localdb =& JFactory::getDBO();\r\n\t\t\r\n\t\t$success = false;\r\n\t\t\r\n\t\t// Table #__core_acl_aro_groups\r\n\t\t$table_aro_groups =& JTable::getInstance('arogroup');\r\n\t\t$table_aro_groups->_tbl_key = 'id'; // Bug in Joomla 1.5.14, setting as primary key the non-existing group_id\r\n\t\t\r\n\t\t$table_aro_groups->setDBO( $synkdb );\r\n\t\tif(!$table_aro_groups->load( $gid )){\r\n\t\t\t$table_aro_groups->setDBO( $localdb );\r\n\t\t\tif(!($table_aro_groups->load( $gid ))){\r\n\t\t\t\t$msg->message .= ' - '.JText::_('Failed to load ARO Group').$table_aro_groups->getError();\r\n\t\t\t\treturn $success;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$parent_gid = $table_aro_groups->parent_id;\r\n\t\t\t\r\n\t\t\t$table_aro_groups->setDBO( $synkdb );\r\n\t\t\tif (!$table_aro_groups->store()){\r\n\t\t\t\t$table_aro_groups->setDBO( $localbd );\r\n\t\t\t\t$msg->message .= ' - '.JText::_( 'ARO Group Store Failed' ).': '.$table_aro_groups->getError();\r\n\t\t\t\treturn $success;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Create parent group entries if don't exist\r\n\t\t\t// TODO Creating Parent Groups by name too instead of by Group ID only? \r\n\t\t\t\r\n\t\t\treturn $this->synk_aro_groups($synkdb, $parent_gid, $options);\r\n\t\t\t\r\n\t\t}\r\n\t\t$table_aro_groups->setDBO( $localbd );\r\n\t\t\r\n\t\t$success = true;\r\n\t\treturn $success;\r\n\t}",
"function ajaxMoveProposalGroup($ProposalGroupID, $ProposalID, $dblOrder)\n{\n global $xdb;\n\n $row = $xdb->getRowSQL(\"SELECT * FROM crmProposalGroup WHERE ProposalGroupID = \". $xdb->qs($ProposalGroupID), 0);\n if($dblOrder > $row->dblOrder){//if position increases then order it last, else order it first\n $sqlOrderPreference = 1;\n }else{\n $sqlOrderPreference = -1;\n }\n\n //update ProposalItem\n $xdb->doQuery(\"\n UPDATE crmProposalGroup\n SET dblOrder = \". $xdb->qs($dblOrder) .\"\n , refProposalID = \". $xdb->qs($ProposalID) .\"\n WHERE ProposalGroupID = \". $xdb->qs($ProposalGroupID), 0); //remove ABS later\n\n if($dblOrder == 0)\n $posStart = -1;\n else\n $posStart = 0;\n\n //print_rr($xdb);\n if($xdb->Error == 1){\n header(\"Content-type: text\");\n echo \"Unable to Move Proposal Group Item. [PGID=$ProposalGroupID][PID=$ProposalID]\";\n die();\n }else{\n Proposal::reorderProposalGroups($ProposalID, $ProposalGroupID, $sqlOrderPreference, $posStart);\n\n //Return new Order\n return array(\"dblOrder\" => $dblOrder);\n }\n}",
"public function postUpdateComponentGroupOrder()\n {\n $groupData = Binput::get('ids');\n\n foreach ($groupData as $order => $groupId) {\n $group = ComponentGroup::find($groupId);\n\n execute(new UpdateComponentGroupCommand(\n $group,\n $group->name,\n $order + 1,\n $group->collapsed,\n $group->visible\n ));\n }\n\n return $this->collection(ComponentGroup::query()->orderBy('order')->get());\n }",
"function exp_reorder_export_groups($info)\n{\n global $g_table_prefix, $L;\n\n $sortable_id = $info[\"sortable_id\"];\n $export_group_ids = explode(\",\", $info[\"{$sortable_id}_sortable__rows\"]);\n\n $order = 1;\n foreach ($export_group_ids as $export_group_id)\n {\n mysql_query(\"\n UPDATE {$g_table_prefix}module_export_groups\n SET list_order = $order\n WHERE export_group_id = $export_group_id\n \");\n $order++;\n }\n\n return array(true, $L[\"notify_export_group_reordered\"]);\n}",
"private function _createGroupQuery()\n\t{\n\t\treturn craft()->db->createCommand()\n\t\t\t->select('id, fieldId, name, sortOrder')\n\t\t\t->from('neogroups')\n\t\t\t->order('sortOrder');\n\t}",
"public function getGroupListsOrdered();",
"function get_group($group_id)\n {\n return $this->db->get_where('groups',array('group_id'=>$group_id))->row_array();\n }",
"public function getApiListOrderByName(&$groupID, &$asc = 'ASC')\n {\n $db = getDatabase();\n $result = $db->prepareExecuteAll(\"SELECT eo_ams_api.apiID,eo_ams_api.apiName,eo_ams_api.apiURI,eo_ams_api.apiStatus,eo_ams_api.apiRequestType,eo_ams_api.apiUpdateTime,eo_ams_api.starred,eo_ams_api_group.groupID,eo_ams_api_group.parentGroupID,eo_ams_api_group.groupName,eo_ams_api.updateUserID,eo_ams_conn_project.partnerNickName,eo_user.userNickName,eo_user.userName FROM eo_ams_api LEFT JOIN eo_ams_api_group ON eo_ams_api.groupID = eo_ams_api_group.groupID LEFT JOIN eo_ams_conn_project ON eo_ams_api.updateUserID = eo_ams_conn_project.userID AND eo_ams_api.projectID = eo_ams_conn_project.projectID LEFT JOIN eo_user ON eo_ams_api.updateUserID = eo_user.userID WHERE (eo_ams_api_group.groupID = ? OR eo_ams_api_group.parentGroupID = ? OR eo_ams_api.groupID IN (SELECT eo_ams_api_group.groupID FROM eo_ams_api_group WHERE eo_ams_api_group.parentGroupID IN (SELECT eo_ams_api_group.groupID FROM eo_ams_api_group WHERE eo_ams_api_group.parentGroupID = ?))) AND eo_ams_api.removed = 0 ORDER BY eo_ams_api.apiName $asc;\", array(\n $groupID,\n $groupID,\n $groupID\n ));\n\n if (empty($result))\n return FALSE;\n else\n return $result;\n }",
"public function getClassGroups($orderBy = '',$condition='') {\n\t\t$systemDatabaseManager = SystemDatabaseManager::getInstance();\n\t\t$query = \"SELECT groupId, groupName, groupShort FROM `group` $condition ORDER BY $orderBy\";\n return $systemDatabaseManager->executeQuery($query,\"Query: $query\");\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make new updated resource event. | function updated_resource(Model $resource, Authenticatable $user = null)
{
return crud_event(\Core\Crud\Events\UpdatedResource::class, $resource, $user);
} | [
"public function updated(Resource $resource)\n {\n //\n }",
"public function testUpdateResource()\n {\n\n }",
"public function dispatchOnPostUpdateResource($resource);",
"function updating_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatingResource::class, $resource, $user);\n }",
"function update ( $id, $resource ) {\r\n\r\n }",
"public function markAsChanged(ResolvedResource $resource);",
"public function updateResource(ResourceInterface $resource);",
"public function testUpdateEvent()\n {\n\n }",
"public function updateStream($resource);",
"public function on_update() {}",
"public function resourceTemplateUpdate(Event $event){\n $em = $this->getServiceLocator()->get('Omeka\\EntityManager');\n $entity = $event->getParam('entity');\n $request = $event->getParam('request');\n $operation = $request->getOperation();\n $error_store = $event->getParam('errorStore');\n\n if ($operation == 'update') {\n $resource_template_id = $request->getId();\n $resource_template = $em->getRepository('Omeka\\Entity\\ResourceTemplate')\n ->findOneBy(['id' => $resource_template_id]);\n\n $pre_teams = $em->getRepository('Teams\\Entity\\TeamResourceTemplate')\n ->findBy(['resource_template' => $resource_template_id]);\n\n foreach ($pre_teams as $pre_team):\n $em->remove($pre_team);\n endforeach;\n $em->flush();\n\n $teams = $em->getRepository('Teams\\Entity\\Team');\n foreach ($request->getContent()['o-module-teams:Team'] as $team_id):\n $team = $teams->findOneBy(['id'=>$team_id]);\n $trt = new TeamResourceTemplate($team,$resource_template);\n $em->persist($trt);\n endforeach;\n $em->flush();\n }\n }",
"public function refresh($resource);",
"public function testUpdateEvent0()\n {\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function update(resource $resource) {\n $stmt = $this->db->prepare(\"UPDATE resource set id=?,name=?,description=?,quantity=?,type=? where id=?\");\n $stmt->execute(array($resource->getIdresource(), $resource->getName(),$resource->getDescription(),\n $resource->getQuantity(),$resource->getType(),$resource->getIdresource()));\n }",
"function _cloneresource_update($id, $data) {\n /*\n global $user;\n $view = cloneresource_get_view($id);\n $data->id = $id;\n $data->uid = $view->uid;\n $data->timestamp = time();\n \n\n cloneresource_write_view($data);\n */\n _cloneresource_create($data);\n return;\n}",
"public function testNotifyUpdate()\n {\n $incident = $this->createIncidentMock();\n\n $incident->expects($this->any())->method('getStatus')->willReturn(IncidentInterface::STATUS_OK);\n\n $subject = $this->createSubject('target', '* * * * *');\n\n $this->getHttpClient()\n ->expects($this->once())\n ->method('put')\n ->with(\n $this->identicalTo($subject->getTarget().$this->getResourceUrl().'/'),\n $this->identicalTo(['Content-type' => 'application/json']),\n $this->identicalTo('{\"status\":4}')\n );\n\n $this->getRequestNType()->notify($subject, $incident);\n }",
"public function updated()\n {\n // do something after update\n }",
"public function onUpdateRecord()\n {\n $this->updated = new \\DateTime();\n $this->rev++;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get total number from the input SQL and parameters | protected function getTotal ($sql, $paramsList=array())
{
$return = 0;
if (count((array)$paramsList)) {
$this->_db->query($sql, $paramsList);
} else {
$this->_db->query($sql);
}
if ($row = $this->_db->fetchArray()) {
$return = (int)$row['count'];
}
return $return;
} | [
"function TotalInDatabase()\r\n{\r\n\tglobal $COMMON;\r\n $query = \"SELECT COUNT(`id`) as 'answer' FROM `ProjectDB`\";\r\n $return = $COMMON->executeQuery($query, $this);\r\n $countRows = $return->fetch(PDO::FETCH_ASSOC);\r\n return $countRows['answer'];\r\n}",
"function getTotal($where){\r\t\t$strSQL = \"\" . \r\t\t\t\"SELECT COUNT(id) AS total \" . \r\t\t\t\"FROM \".$this->dbTable.\" \" . \r\t\t\t\"WHERE 1=1 \" . \r\t\t\t\"$where \" . \r\t\t\t\";\"; \r\t\t$result = $this->DB->getObj(\"\".$this->className.\" :: function getTotal()\",$strSQL); \r\t\t$row=mysql_fetch_array($result); \r\t\t$total=$row[\"total\"]; \r\t\treturn $total; \r\t}",
"function exibeTotal($params, &$smarty){\n return $this->NumResult;\n }",
"public function getTotalQueries() : int\n {\n return 1;\n }",
"public function totalRecord(){\r\n\t\ttry {\r\n\t\t\t$sql = \"SELECT COUNT(*) as total FROM product\";\r\n\t\t\t$sth = $this->getPdo()->prepare($sql);\r\n\t\t\t$sth->execute();\r\n\t\t\t$result = $sth->fetch();\r\n\t\t\treturn $result['total'];\r\n\t\t} catch (Exception $e) {\r\n\t\t\techo $e->getMessage();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"public function getTotalQueryResult();",
"public function getTotalDegree($conditions=''){\n\n $query=\"SELECT COUNT(*) AS totalRecords\n FROM degree dg\n $conditions \" ; \n \n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\"); \n}",
"function totalProudctQuantity()\n\t{\n\t $sql = \"select sum(b.product_qty) as productquantity from products_table a inner join order_products_table b on a.product_id=b.product_id inner join orders_table c on c.orders_id=b.order_id \";\n\t\t\t $obj = new Bin_Query();\n\t\tif($obj->executeQuery($sql))\n\t\t{\t\t\n\t\t\t$output=$obj->records[0]['productquantity'];\n\t\t\treturn $output;\n\t\t}\n\t}",
"abstract public function prepareTotalCount();",
"public function getTotalQueries();",
"private function getRowCountViaSqlQuery(): int\n {\n $countSql = 'SELECT COUNT(1) FROM ('.$this->getQuery().') c';\n\n $this->logger->debug('Running count SQL request: '.$countSql);\n\n $this->count = (int) $this->tdbmService->getConnection()->fetchColumn($countSql, $this->parameters, 0, DbalUtils::generateTypes($this->parameters));\n return $this->count;\n }",
"public static function total() {\n return Database::recordcount();\n }",
"public function getTotalData() {\r\n $this->sql = \"SELECT $this->campoTable FROM $this->table ORDER BY $this->campoTable\";\r\n $this->qr = $this->query($this->sql);\r\n return self::countData($this->qr);\r\n }",
"public function getRecordsTotal(): int;",
"function get_count($sql=\"\", $data=null){\n\t $que = $this->conn->prepare($sql);\n\t if($data){\n\t $que->execute($data);\n\t }else{\n\t \t$que->execute();\n\t }\n\t return $que->rowCount();\n\t }",
"public function prepareQueryForTotal()\n {\n $sql = $this->prepareQueryForCategory();\n $sql->clean('limit')->clean('select')->select(array('total' => 'COUNT(*)'));\n \n return $sql;\n }",
"function get_total_rute_process_by_new_rute($params) {\n $sql = \"SELECT COUNT(*)'total' FROM izin_registrasi \n WHERE airlines_id = ? AND (izin_rute_start = ? OR izin_rute_start = ? OR izin_rute_end = ? OR izin_rute_end = ?)\n AND izin_completed = '0' AND registrasi_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['total'];\n } else {\n return 0;\n }\n }",
"public function totalMyModelCount()\n {\n $stmt = $this->conn->prepare(\"SELECT \" . $this->tableName . \".id,\" . $this->tableName . \".model_type,\"\n . $this->tableName . \".model_name,\" . $this->tableName . \".model_color,\" . $this->tableName . \".model_year,\"\n . $this->tableName . \".registration_number,\" . $this->tableName . \".image1,\" . $this->tableName1 .\n \".transcation_date,\" . $this->tableName1 . \".user_id FROM \" . $this->tableName . \" JOIN \" . \n $this->tableName1 . \" ON \" . $this->tableName . \".id=\" . $this->tableName1 . \".model_id WHERE \"\n . $this->tableName1 . \".user_id=:id\");\n \n $this->id=$_SESSION['userId'];\n\n //Bind Parameters using PDO Statment\n $stmt->bindParam(\":id\", $this->id);\n\n //execute the PDOStatment\n $stmt->execute();\n\n //rowCount() predefine function\n $totalRows=$stmt->rowCount();\n return $totalRows;\n }",
"function dbCount($table, $where, $ar_params){\n\t\tglobal $con;\n\t\t\n\t\t$query = \"SELECT COUNT(*) FROM $table WHERE $where;\";\n\t\t\n\t\t$stmt = $con->stmt_init();\n\t\tif ($stmt->prepare($query)){\n\t\t\tif (sizeof($ar_params))\n\t\t\t\tcall_user_func_array(array($stmt, 'bind_param'), $ar_params);\n\t\t\t$stmt->bind_result($count);\n\t\t\t$stmt->execute();\n\t\t\tif (!$con->errno){\n\t\t\t\t$stmt->store_result();\n\t\t\t\t$stmt->fetch();\n\t\t\t\t$stmt->close();\n\t\t\t\treturn $count;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttrigger_error(\"\\ncuPlaza SQL dbCount Error: \\n\\t$con->error\\n\\n\\tfor query: $query \\n\\n\\tand params: \" .implode(\", \", $ar_params).\"\\n\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\ttrigger_error(\"\\ncuPlaza SQL dbCount Error: \\n\\t$con->error\\n\\n\\tfor query: $query \\n\\n\\tand params: \" .implode(\", \", $ar_params).\"\\n\");\n\t\t\treturn -1;\n\t\t}\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the given iterable, mapping enumerators (objects or values) to data values. | public function addIterable(iterable $map): void
{
$innerMap = $this->map;
foreach ($map as $enumerator => $value) {
$ord = ($this->enumeration)::get($enumerator)->getOrdinal();
$innerMap[$ord] = $value;
}
$this->map = $innerMap;
} | [
"function values(iterable $iterable): \\Iterator {\n foreach ($iterable as $value) {\n yield $value;\n }\n}",
"public function extend($iterable)\n {\n parent::append(Conversions::mixedToIterator($iterable));\n }",
"private function buildValues(iterable $values): Generator\n {\n foreach ($values as $key => $value) {\n yield $key => new Value($value);\n }\n }",
"function values(iterable $items) : iterable\n{\n return _arrayOrIterator($items, function($items) {\n foreach ($items as $_ => $value) {\n yield $value;\n }\n });\n}",
"function merge(iterable ...$iterables): self\n {\n $values = $this->values;\n\n foreach ($iterables as $iterable) {\n foreach ($iterable as $value) {\n $values[] = $value;\n }\n }\n\n return new static($values);\n }",
"function foo(iterable $iterable) {\n foreach ($iterable as $value) {\n // ...\n }\n}",
"public function append (iterable $iterable) : self {\n foreach ($iterable as $value) {\n $this->items[] = $value;\n }\n\n return $this;\n }",
"public function update($iterable) {\n foreach ($iterable as $key => $value) {\n $this->put($key, $value);\n }\n return $this;\n }",
"public function process($iterable);",
"private function getIterator($iterable)\n {\n foreach ($iterable as $key => $value) {\n yield $key => $value;\n }\n }",
"public function collect(iterable $iterable): mixed;",
"static function addAll(Addable $list, \\Iterator $iterator ){\n\t\tforeach($iterator as $element)\n\t\t\t$list->add($element);\n\t}",
"function map($iterable, callable $f)\n{\n foreach ($iterable as $value) {\n yield $f($value);\n }\n}",
"public function entries(): iterable\n {\n foreach ($this->values as $value) {\n yield $value => $this->get($value);\n }\n }",
"function map(callable $function, iterable $iterable): \\Iterator {\n foreach ($iterable as $key => $value) {\n yield $key => $function($value);\n }\n}",
"private function iteratorMap(callable $map, iterable ...$iterable): array\n {\n $result = [];\n\n foreach ($iterable as $it) {\n foreach ($it as $key => $value) {\n $result[] = $map($value, $key);\n }\n }\n\n return $result;\n }",
"private function iterable($in, $type) {\n foreach ($in as $key => $value) {\n yield $key => $this->unmarshal($value, $type);\n }\n }",
"abstract protected function _normalizeIterable($iterable);",
"public function addAll( ArrayObject $list )\n {\n foreach ( $list as $key => $value )\n {\n parent::offsetSet( $key, $value );\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a collection of RolePengguna objects related by a onetomany relationship to the current object. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection. | public function setRolePenggunas(PropelCollection $rolePenggunas, PropelPDO $con = null)
{
$rolePenggunasToDelete = $this->getRolePenggunas(new Criteria(), $con)->diff($rolePenggunas);
$this->rolePenggunasScheduledForDeletion = unserialize(serialize($rolePenggunasToDelete));
foreach ($rolePenggunasToDelete as $rolePenggunaRemoved) {
$rolePenggunaRemoved->setPengguna(null);
}
$this->collRolePenggunas = null;
foreach ($rolePenggunas as $rolePengguna) {
$this->addRolePengguna($rolePengguna);
}
$this->collRolePenggunas = $rolePenggunas;
$this->collRolePenggunasPartial = false;
return $this;
} | [
"public function setRolePenggunas(PropelCollection $rolePenggunas, PropelPDO $con = null)\n {\n $rolePenggunasToDelete = $this->getRolePenggunas(new Criteria(), $con)->diff($rolePenggunas);\n\n $this->rolePenggunasScheduledForDeletion = unserialize(serialize($rolePenggunasToDelete));\n\n foreach ($rolePenggunasToDelete as $rolePenggunaRemoved) {\n $rolePenggunaRemoved->setLembSertifikasi(null);\n }\n\n $this->collRolePenggunas = null;\n foreach ($rolePenggunas as $rolePengguna) {\n $this->addRolePengguna($rolePengguna);\n }\n\n $this->collRolePenggunas = $rolePenggunas;\n $this->collRolePenggunasPartial = false;\n\n return $this;\n }",
"protected\tfunction\tsetRelations() {}",
"public function setRuangsRelatedByIdRuang(PropelCollection $ruangsRelatedByIdRuang, PropelPDO $con = null)\n {\n $ruangsRelatedByIdRuangToDelete = $this->getRuangsRelatedByIdRuang(new Criteria(), $con)->diff($ruangsRelatedByIdRuang);\n\n $this->ruangsRelatedByIdRuangScheduledForDeletion = unserialize(serialize($ruangsRelatedByIdRuangToDelete));\n\n foreach ($ruangsRelatedByIdRuangToDelete as $ruangRelatedByIdRuangRemoved) {\n $ruangRelatedByIdRuangRemoved->setRuangRelatedByParentIdRuang(null);\n }\n\n $this->collRuangsRelatedByIdRuang = null;\n foreach ($ruangsRelatedByIdRuang as $ruangRelatedByIdRuang) {\n $this->addRuangRelatedByIdRuang($ruangRelatedByIdRuang);\n }\n\n $this->collRuangsRelatedByIdRuang = $ruangsRelatedByIdRuang;\n $this->collRuangsRelatedByIdRuangPartial = false;\n\n return $this;\n }",
"private function __setRelations() {\n\n\t\t// percorre e seta todas as relacoes\n\t\tforeach( $this->_relations as $relation ) {\n\n\t\t\t// verifica se é uma relacao n:n\n\t\t\tif ( isset( $relation['type'] ) && $relation['type'] === 'n:n' ) {\n\n\t\t\t\t// seta a relacao n:n\n\t\t\t\t$this->_crud->set_relation_n_n( $relation['label'],\n\t\t\t\t\t\t\t\t\t\t\t\t$relation['relation_table'],\n\t\t\t\t\t\t\t\t\t\t\t\t$relation['select_table'],\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_table_id,\n\t\t\t\t\t\t\t\t\t\t\t\t$relation['relation_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t$relation['field'] );\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// seta a relacao 1:n\n\t\t\t\t$this->_crud->set_relation( $relation['field'], \n\t\t\t\t\t\t\t\t\t\t\t$relation['table'], \n\t\t\t\t\t\t\t\t\t\t\t$relation['use']);\n\t\t\t}\n\t\t}\n\t}",
"public function setPerguntas(PropelCollection $perguntas, PropelPDO $con = null)\n\t{\n\t\t$this->perguntasScheduledForDeletion = $this->getPerguntas(new Criteria(), $con)->diff($perguntas);\n\n\t\tforeach ($perguntas as $pergunta) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($pergunta->isNew()) {\n\t\t\t\t$pergunta->setPesquisa($this);\n\t\t\t}\n\t\t\t$this->addPergunta($pergunta);\n\t\t}\n\n\t\t$this->collPerguntas = $perguntas;\n\t}",
"private function ormCascadeUpdate()\n {\n foreach ($this->orm['relations'] as $class => $relDetail)\n {\t \n\t // Make sure the related object is available. It should always be.\n\t if (!isset($this->$class))\n\t {\n\t continue;\n\t }\n\t \n\t // $ref will be a pointer to the related object.\t \n\t $ref = $this->$class;\n\n\t if ($ref->isDirty())\n\t {\n\t $ref->ormUpdate(); \n\t }\n }\n }",
"public function setAgendaIgrejas(PropelCollection $agendaIgrejas, PropelPDO $con = null)\n\t{\n\t\t$this->agendaIgrejasScheduledForDeletion = $this->getAgendaIgrejas(new Criteria(), $con)->diff($agendaIgrejas);\n\n\t\tforeach ($agendaIgrejas as $agendaIgreja) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($agendaIgreja->isNew()) {\n\t\t\t\t$agendaIgreja->setIgreja($this);\n\t\t\t}\n\t\t\t$this->addAgendaIgreja($agendaIgreja);\n\t\t}\n\n\t\t$this->collAgendaIgrejas = $agendaIgrejas;\n\t}",
"public function setPenggunas(PropelCollection $penggunas, PropelPDO $con = null)\n {\n $penggunasToDelete = $this->getPenggunas(new Criteria(), $con)->diff($penggunas);\n\n $this->penggunasScheduledForDeletion = unserialize(serialize($penggunasToDelete));\n\n foreach ($penggunasToDelete as $penggunaRemoved) {\n $penggunaRemoved->setMstWilayah(null);\n }\n\n $this->collPenggunas = null;\n foreach ($penggunas as $pengguna) {\n $this->addPengguna($pengguna);\n }\n\n $this->collPenggunas = $penggunas;\n $this->collPenggunasPartial = false;\n\n return $this;\n }",
"public function setRuangs(PropelCollection $ruangs, PropelPDO $con = null)\n {\n $ruangsToDelete = $this->getRuangs(new Criteria(), $con)->diff($ruangs);\n\n $this->ruangsScheduledForDeletion = unserialize(serialize($ruangsToDelete));\n\n foreach ($ruangsToDelete as $ruangRemoved) {\n $ruangRemoved->setBangunan(null);\n }\n\n $this->collRuangs = null;\n foreach ($ruangs as $ruang) {\n $this->addRuang($ruang);\n }\n\n $this->collRuangs = $ruangs;\n $this->collRuangsPartial = false;\n\n return $this;\n }",
"public function setLocalizacaoAdvogados(PropelCollection $localizacaoAdvogados, PropelPDO $con = null)\n\t{\n\t\t$this->localizacaoAdvogadosScheduledForDeletion = $this->getLocalizacaoAdvogados(new Criteria(), $con)->diff($localizacaoAdvogados);\n\n\t\tforeach ($localizacaoAdvogados as $localizacaoAdvogado) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($localizacaoAdvogado->isNew()) {\n\t\t\t\t$localizacaoAdvogado->setAdvogado($this);\n\t\t\t}\n\t\t\t$this->addLocalizacaoAdvogado($localizacaoAdvogado);\n\t\t}\n\n\t\t$this->collLocalizacaoAdvogados = $localizacaoAdvogados;\n\t}",
"public function updatePivotRecords()\n {\n $pivots = $this->entityMap->getPivotRelationships();\n\n foreach ($pivots as $pivot) {\n if (array_key_exists($pivot, $this->relationships)) {\n $this->updatePivotRelation($pivot);\n }\n }\n }",
"public function syncManyFollowings(Collection $entities);",
"public function touchOwners()\n {\n foreach ($this->getTouchedRelations() as $relation) {\n $this->$relation()->touch();\n\n if ($this->$relation instanceof self) {\n $this->$relation->fireModelEvent('saved', false);\n\n $this->$relation->touchOwners();\n } elseif ($this->$relation instanceof Collection) {\n $this->$relation->each->touchOwners();\n }\n }\n }",
"protected function assignRoleToUsers(): void\n {\n foreach (User::all() as $user) {\n $role = Role::firstOrCreate(['name' => Role::USER]);\n $user->assignRole($role);\n }\n }",
"public function setProveedormarcas(PropelCollection $proveedormarcas, PropelPDO $con = null)\n {\n $proveedormarcasToDelete = $this->getProveedormarcas(new Criteria(), $con)->diff($proveedormarcas);\n\n\n $this->proveedormarcasScheduledForDeletion = $proveedormarcasToDelete;\n\n foreach ($proveedormarcasToDelete as $proveedormarcaRemoved) {\n $proveedormarcaRemoved->setProveedor(null);\n }\n\n $this->collProveedormarcas = null;\n foreach ($proveedormarcas as $proveedormarca) {\n $this->addProveedormarca($proveedormarca);\n }\n\n $this->collProveedormarcas = $proveedormarcas;\n $this->collProveedormarcasPartial = false;\n\n return $this;\n }",
"public function push_roles() {\n // Push roles through.\n $roles = \\local_connect\\role::get_all();\n foreach ($roles as $role) {\n $role->create_in_moodle();\n }\n }",
"protected function updateRoles()\n {\n if ($roles = $this->option('role')) {\n $this->user->roles()->sync(\n Role::whereIn('name_key', $roles)->get()->pluck('id')\n );\n }\n }",
"public function setRequetes(PropelCollection $requetes, PropelPDO $con = null)\n {\n $requetesToDelete = $this->getRequetes(new Criteria(), $con)->diff($requetes);\n\n\n //since at least one column in the foreign key is at the same time a PK\n //we can not just set a PK to NULL in the lines below. We have to store\n //a backup of all values, so we are able to manipulate these items based on the onDelete value later.\n $this->requetesScheduledForDeletion = clone $requetesToDelete;\n\n foreach ($requetesToDelete as $requeteRemoved) {\n $requeteRemoved->setUtilisateur(null);\n }\n\n $this->collRequetes = null;\n foreach ($requetes as $requete) {\n $this->addRequete($requete);\n }\n\n $this->collRequetes = $requetes;\n $this->collRequetesPartial = false;\n\n return $this;\n }",
"public function setCasos(PropelCollection $casos, PropelPDO $con = null)\n\t{\n\t\t$this->casosScheduledForDeletion = $this->getCasos(new Criteria(), $con)->diff($casos);\n\n\t\tforeach ($casos as $caso) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($caso->isNew()) {\n\t\t\t\t$caso->setAreaAdvocacia($this);\n\t\t\t}\n\t\t\t$this->addCaso($caso);\n\t\t}\n\n\t\t$this->collCasos = $casos;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes the content entities of the specified entity type. | public static function deleteContentEntities($entity_type_id, &$context) {
$storage = \Drupal::entityTypeManager()->getStorage($entity_type_id);
// Set the entity type ID in the results array so we can access it in the
// batch finished callback.
$context['results']['entity_type_id'] = $entity_type_id;
if (!isset($context['sandbox']['progress'])) {
$context['sandbox']['progress'] = 0;
$context['sandbox']['max'] = $storage->getQuery()->accessCheck(FALSE)->count()->execute();
}
$entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id);
$entity_ids = $storage->getQuery()
->accessCheck(FALSE)
->sort($entity_type->getKey('id'), 'ASC')
->range(0, 10)
->execute();
if ($entities = $storage->loadMultiple($entity_ids)) {
$storage->delete($entities);
}
// Sometimes deletes cause secondary deletes. For example, deleting a
// taxonomy term can cause its children to be deleted too.
$context['sandbox']['progress'] = $context['sandbox']['max'] - $storage->getQuery()->accessCheck(FALSE)->count()->execute();
// Inform the batch engine that we are not finished and provide an
// estimation of the completion level we reached.
if (count($entity_ids) > 0 && $context['sandbox']['progress'] != $context['sandbox']['max']) {
$context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
$context['message'] = new TranslatableMarkup('Deleting items... Completed @percentage% (@current of @total).', ['@percentage' => round(100 * $context['sandbox']['progress'] / $context['sandbox']['max']), '@current' => $context['sandbox']['progress'], '@total' => $context['sandbox']['max']]);
}
else {
$context['finished'] = 1;
}
} | [
"function hook_ENTITY_TYPE_delete(\\Drupal\\Core\\Entity\\EntityInterface $entity) {\n // Delete the entity's entry from a fictional table of all entities.\n \\Drupal::database()->delete('example_entity')\n ->condition('type', $entity->getEntityTypeId())\n ->condition('id', $entity->id())\n ->execute();\n}",
"public static function removeContent($options) {\n /* @var $entity_type string */\n /* @var $entity_bundles array */\n extract($options);\n // Retrieve the bundle name of the entity type.\n $entity_bundle_name = 'type';\n if ($entity_type == 'media') {\n $entity_bundle_name = 'bundle';\n }\n if ($entity_type == 'paragraph') {\n // TODO: There is still a problem with orphaned paragraph references.\n // Although the paragraph has been removed, the references (on the node) still exist.\n //\n // select * from paragraphs_item_field_data;\n // select * from paragraphs_item;\n // e.g. field - select * from node__field_normal_page_header_pars;\n // 1. Retrieve an array with `parent_type__parent_field_name` of all entity_ids above.\n // 2. Remove all rows with `parent_field_name`_target_id with above entity_ids.\n // from tables with the name `parent_type__parent_field_name`\n // 3. Do the same for revision tables.\n }\n foreach ($entity_bundles as $entity_bundle) {\n \\Drupal::logger($entity_bundle)->notice(t('Removing all content of type @bundle', ['@bundle' => $entity_bundle]));\n $entity_ids = \\Drupal::entityQuery($entity_type)\n ->condition($entity_bundle_name, $entity_bundle)\n ->execute();\n $controller = \\Drupal::entityTypeManager()->getStorage($entity_type);\n $entities = $controller->loadMultiple($entity_ids);\n $controller->delete($entities);\n }\n }",
"public function deleteAllEntities($objType)\r\n\t{\r\n\t\treturn true;\r\n\t}",
"public function entityTypeDeleteWithMatchingBundle() {\n $this->createEntityBundle($this->entityTypeMachineName, $this->entityTypeMachineName, $this->entityTypeLabel);\n\n \\Drupal::entityTypeManager()\n ->getStorage($this->entityTypeMachineName . '_type')\n ->load($this->entityBundleMachineName)\n ->delete();\n\n $this->entityBundleMachineName = $this->entityTypeMachineName;\n $this->entityBundleLabel = $this->entityTypeLabel;\n\n $route = 'entity.eck_entity_type.delete_form';\n $routeArguments = ['eck_entity_type' => $this->entityTypeMachineName];\n $expectedUrl = \"admin/structure/eck/{$this->entityTypeMachineName}/delete\";\n $expectedTitle = \"Are you sure you want to delete entity type {$this->entityTypeLabel}?\";\n $crumbs = [\n 'Structure',\n 'ECK Entity Types',\n \"Edit entity type\",\n ];\n\n $this->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);\n $this->assertSession()->pageTextContains(\"This action cannot be undone.\");\n\n // Delete the entity.\n $this->submitForm([], 'Delete entity type');\n\n $this->assertSession()->statusCodeEquals(200);\n\n // Try to load the deleted entity.\n $entity_type = \\Drupal::entityTypeManager()\n ->getStorage($this->entityTypeMachineName)\n ->load($this->entityTypeMachineName);\n\n // Make sure the entity is deleted.\n $this->assertNull($entity_type);\n\n $this->entityTypeList();\n }",
"public function entityTypeDeleteWithContent() {\n $field_machine_name = strtolower($this->randomMachineName());\n // Create a field.\n FieldStorageConfig::create([\n 'entity_type' => $this->entityTypeMachineName,\n 'field_name' => $field_machine_name,\n 'type' => 'decimal',\n ])->save();\n FieldConfig::create([\n 'entity_type' => $this->entityTypeMachineName,\n 'field_name' => $field_machine_name,\n 'bundle' => $this->entityBundleMachineName,\n ])->save();\n\n // Create an entity.\n \\Drupal::entityTypeManager()\n ->getStorage($this->entityTypeMachineName)\n ->create([\n 'type' => $this->entityBundleMachineName,\n $field_machine_name => random_int(1, 1000),\n ])->save();\n\n $route = 'entity.eck_entity_type.delete_form';\n $routeArguments = ['eck_entity_type' => $this->entityTypeMachineName];\n $expectedUrl = \"admin/structure/eck/{$this->entityTypeMachineName}/delete\";\n $expectedTitle = \"Delete entity type\";\n $crumbs = [\n 'Structure',\n 'ECK Entity Types',\n \"Edit entity type\",\n ];\n\n $this->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);\n $this->assertSession()->pageTextContains(\"There is 1 {$this->entityTypeLabel} entity. You can not remove this entity type until you have removed all of the {$this->entityTypeLabel} entities.\");\n\n // Create a second entity.\n \\Drupal::entityTypeManager()\n ->getStorage($this->entityTypeMachineName)\n ->create([\n 'type' => $this->entityBundleMachineName,\n $field_machine_name => random_int(1, 1000),\n ])->save();\n\n $route = 'entity.eck_entity_type.delete_form';\n $routeArguments = ['eck_entity_type' => $this->entityTypeMachineName];\n $expectedUrl = \"admin/structure/eck/{$this->entityTypeMachineName}/delete\";\n $expectedTitle = \"Delete entity type\";\n $crumbs = [\n 'Structure',\n 'ECK Entity Types',\n \"Edit entity type\",\n ];\n\n $this->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);\n $this->assertSession()->pageTextContains(\"There are 2 {$this->entityTypeLabel} entities. You may not remove {$this->entityTypeLabel} until you have removed all of the {$this->entityTypeLabel} entities.\");\n }",
"public static function deleteCreatedEntities() {\n global $entities;\n\n if (!empty($entities)) {\n foreach ($entities as $key => $val) {\n foreach ($val as $entity_id => $object) {\n if ($object->deleteProgrammatically()) {\n unset($entities[$key][$entity_id]);\n }\n }\n }\n }\n\n /*self::deleteEntities('node', 1);\n self::deleteEntities('taxonomy_term', 0);\n self::deleteEntities('user', 30);\n self::deleteEntities('comment', 0);*/\n }",
"public static function deleteCreatedEntities() {\n global $entities;\n\n if (!empty($entities)) {\n foreach ($entities as $key => $val) {\n foreach ($val as $entity_id => $object) {\n $object->delete();\n }\n }\n }\n\n self::deleteEntities('node', 103931);\n self::deleteEntities('taxonomy_term', 19066);\n self::deleteEntities('user', 10);\n }",
"function hook_simple_entity_type_delete(SimpleEntityType $simple_entity_type) {\n db_delete('mytable')\n ->condition('pid', entity_id('simple_entity_type', $simple_entity_type))\n ->execute();\n}",
"public function cleanContentTypes() {\n foreach ($this->contentTypes as $type) {\n $this->visitPath('/admin/structure/types/manage/' . $type . '/delete');\n\n // If we can't access the page, don't bother. We did our due diligence.\n if ($this->getSession()->getStatusCode() == 200) {\n $this->minkContext->pressButton('Delete');\n }\n }\n }",
"public function delete(Entity $entity);",
"public function delete($entity);",
"function entity_type_delete($projectId, $entityTypeId)\n{\n $entityTypesClient = new EntityTypesClient();\n\n $parent = $entityTypesClient->entityTypeName($projectId,\n $entityTypeId);\n $entityTypesClient->deleteEntityType($parent);\n printf('Entity type deleted: %s' . PHP_EOL, $parent);\n\n $entityTypesClient->close();\n}",
"public function cleanEntities(): void {\n foreach ($this->entities as $entityType => $entities) {\n foreach ($entities as $entity) {\n $this->getDriver()->entityDelete($entityType, $entity);\n }\n }\n $this->entities = [];\n }",
"protected function deleteEntityType() {\n $this->state->set('entity_test_update.entity_type', 'null');\n }",
"public function deleteAllByEntity($entity)\n {\n if (count($entity->getMetadata()) > 0) {\n $qb = $this->createQueryBuilder('m');\n $qb->delete(get_class($entity->getMetadata()[0]), 'm');\n $qb->where($qb->expr()->eq('m.' . static::ENTITY_NAME, $entity->getId()));\n $qb->getQuery()->getResult();\n }\n }",
"public function deleting($entity)\n {\n //\n }",
"public function entityTypeDeleteWithMultipleBundles() {\n $additional_bundle_name = strtolower($this->randomMachineName());\n $additional_bundle_label = strtolower($this->randomMachineName());\n // Create a randomly named bundle.\n $this->createEntityBundle($this->entityTypeMachineName, $additional_bundle_name, $additional_bundle_label);\n\n $route = 'entity.eck_entity_type.delete_form';\n $routeArguments = ['eck_entity_type' => $this->entityTypeMachineName];\n $expectedUrl = \"admin/structure/eck/{$this->entityTypeMachineName}/delete\";\n $expectedTitle = \"Are you sure you want to delete entity type {$this->entityTypeLabel}?\";\n $crumbs = [\n 'Structure',\n 'ECK Entity Types',\n \"Edit entity type\",\n ];\n\n $this->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);\n\n $this->assertSession()->pageTextContains(\"Configuration deletions The listed configuration will be deleted.{$this->entityTypeLabel} type\");\n $this->assertSession()->pageTextContains($additional_bundle_label);\n $this->assertSession()->pageTextContains($this->entityBundleLabel);\n }",
"public function deleteEntityTypeComments( $entityType )\n {\n $entityType = trim($entityType);\n $this->commentDao->deleteEntityTypeComments($entityType);\n $this->commentEntityDao->deleteByEntityType($entityType);\n }",
"public function deleteAction()\n {\n $request = $this->getRequest();\n $type = P4Cms_Content_Type::fetch($request->getParam('id'));\n $label = $type->getValue('label');\n $type->delete();\n P4Cms_Notifications::add(\n 'Content type \"'. $label .'\" deleted.',\n P4Cms_Notifications::SEVERITY_SUCCESS\n );\n\n // clear any cached entries related to this type\n P4Cms_Cache::clean(\n Zend_Cache::CLEANING_MODE_MATCHING_TAG,\n array('p4cms_content_type_' . bin2hex($type->getId()))\n );\n\n $this->redirector->gotoSimple('index');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle get mutator column for grid. | protected function handleGetMutatorColumn($method, $label)
{
if ($this->model()->eloquent()->hasGetMutator($method)) {
return $this->addColumn($method, $label);
}
return false;
} | [
"public static function mapGettersColumns();",
"protected abstract function getMutator();",
"public function get_column_value()\n {\n if ( isset( $this->properties['admin-column']['callback'] ) )\n {\n $id = \"{$this->namespace}-{$this->properties['slug']}\";\n $value = call_user_func( $this->properties['admin-column']['callback'], $id, $this->get_value() );\n }\n else\n {\n $value = $this->get_value();\n }\n return $value;\n }",
"public function getColumna(){\r\n return $this->columna;\r\n}",
"function GetDataViewColumn(){}",
"protected function getColumnSetter()\n {\n return 'set' . $this->getColumnForParameter('slug_column')->getPhpName();\n }",
"public function getCol();",
"public function grid_settings_modify_column($data)\n\t{\n\t\treturn $this->_settings_modify_column($data, TRUE);\n\t}",
"public function get($column);",
"static function get_modification_column()\r\n {\r\n if (! isset(self :: $modification_column))\r\n {\r\n self :: $modification_column = new CourseGroupTableColumn('');\r\n }\r\n return self :: $modification_column;\r\n }",
"function getColumn( $col ) {\n\t\tif( $this->row ) {\n\t\t\treturn $this->row[$col];\n\t\t} else {\n//\t\t\tdie( \"Fetch gagal: eksekusi method next() terlebih dahulu\" );\n\t\t\t\n// uncomment next line for debug only\n\t\t\tdie( \"Fetch gagal: eksekusi method next() terlebih dahulu\".\"<br>Query: \".$this->query );\n\t\t}\n\t}",
"public function testCreateWithGetMutator()\n {\n $model = new MockModel();\n\n $handler = new MutationHandler('example', ['exampleGet']);\n $handler->setModel($model);\n\n $this->assertEquals('example', $handler->getName());\n $this->assertTrue($handler->hasGetMutator('property1'));\n }",
"public function getMultiselectColumn()\n {\n return $this->multiselectColumn;\n }",
"public function getUpdateColumn()\n {\n return $this->select_list;\n }",
"private function get_editor_column(column $col): column/*col_out*/{\r\n //\r\n //An ATTRIBUTE does not \"change\" \r\n if($col instanceof attribute){ $exp=$col;}\r\n //\r\n //A PRIMARY key column maps to an expression that evaluates to a\r\n //tuple of the following form: [1, \"chic/25/2005-05-01\"]. This is \r\n //derived from the 2 columns of the parent selector\r\n elseif($col instanceof primary){\r\n //\r\n //Use the parent selector columns to formulate the concat \r\n //expression. Note that the friendly component of a selector\r\n //is called id.\r\n $exp= self::befriend($col, $this->columns['id']->exp);\r\n }\r\n //\r\n //A FOREIGN key column maps similarly to a primary key, except that\r\n //the friendly component is derievd from the away entity of the colum\r\n elseif($col->is_id() || (!$col->is_cross_member())){\r\n //\r\n //Identifier fields should be formulated using existing joints (to \r\n //save time)\r\n //\r\n //Get the away friendly parts of this foreign key\r\n $friendly_parts = iterator_to_array(\r\n $col->away()->get_friendly_part()\r\n );\r\n //\r\n $friend = new function_(\"concat\", $friendly_parts);\r\n //\r\n $exp= selector::befriend($col, $friend); \r\n }else{ \r\n //Non-identifiers should be formulated from scratch using a \r\n //fresh selector \r\n //\r\n //Use the column's ref property to formulate a selector query\r\n //$selector = $this->join->joints->get($col->away()->partial_name);\r\n $selector= new selector($col->away()->name, $col->away()->dbname);\r\n //\r\n //Return the selector as a named expression\r\n //Create a new field foreign this is because of the special naming this \r\n //column has\r\n $field= new field_primary($selector->dbname, $selector->name, \"id\", $selector->columns[\"id\"]);\r\n $exp = self::befriend($col,$field);\r\n }\r\n return new field($this->dbname, $this->name, $col->name, $exp);\r\n }",
"public function getEditorColumn()\n {\n return defined('static::EDITOR_COLUMN') ? static::EDITOR_COLUMN : 'updated_by';\n }",
"public function get_column_value()\n {\n return $this->properties['options'][$this->get_value()];\n }",
"protected function getColumnSetter($column)\n\t{\n\t\treturn 'set' . $this->getColumnForParameter($column)->getPhpName();\n\t}",
"public function columnPreview()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Operation convertToWordsAsync Returns document with the result of conversion | public function convertToWordsAsync(Requests\ConvertToWordsRequest $request)
{
return $this->convertToWordsAsyncWithHttpInfo($request)
->then(
function ($response) {
return $response[0];
}
);
} | [
"function watsonTranslator($source, $target, $sentences)\n{\n if (!$source || $source === 'auto') {\n header('HTTP/1.1 400 Bad Request');\n exit(1);\n }\n $username = getenv('IBM_CLOUD_USERNAME');\n $password = getenv('IBM_CLOUD_PASSWORD');\n $request = [\n 'text' => $sentences,\n 'source' => $source,\n 'target' => $target,\n ];\n $ch = curl_init('https://gateway.watsonplatform.net/language-translator/api/v2/translate');\n curl_setopt_array($ch, [\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => json_encode($request),\n CURLOPT_HTTPHEADER => [\n 'Content-Type: application/json',\n 'Accept: application/json',\n ],\n CURLOPT_USERPWD => \"$username:$password\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_SSL_VERIFYPEER => false,\n ]);\n $response = json_decode(curl_exec($ch));\n curl_close($ch);\n\n $result = [];\n foreach ($response->translations as $translation) {\n $result[] = $translation->translation;\n }\n return $result;\n}",
"public function convertToWords(Requests\\ConvertToWordsRequest $request)\n {\n try {\n list($response) = $this->convertToWordsWithHttpInfo($request);\n return $response;\n }\n catch(RepeatRequestException $e) {\n list($response) = $this->convertToWordsWithHttpInfo($request);\n return $response;\n } \n }",
"private function extractWord(){\n \n $cmd = $this->setHome()\n . $this->cdToFolder()\n . 'libreoffice --invisible --headless --convert-to txt:Text ' . escapeshellcmd($this->file_basename);\n exec($cmd);\n if(File::exists($this->storage_path . $this->file_name . '.txt')){\n File::move($this->storage_path . $this->file_name . '.txt', $this->storage_path . 'output.txt');\n }\n $this->parseText();\n }",
"public function convertToWordsStreamAsync(Requests\\ConvertToWordsStreamRequest $request) \n {\n return $this->convertToWordsStreamAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"private function mergeAsWordDocument()\n {\n $wordDocumentsToMerge = [];\n\n /** @var Document $currentDocument */\n foreach ($this->documents as $currentDocument) {\n $currentTemplates = $currentDocument->getTemplates();\n\n /** @var WordTemplate $currentTemplate */\n foreach ($currentTemplates as $currentTemplate) {\n $wordDocumentsToMerge[] = $currentTemplate->getPopulatedTemplate();\n }\n }\n\n $this->finalDocument = $this->fileService->mergeWordDocuments($wordDocumentsToMerge, $this->fileService->generateRandomFileName(\".docx\"));\n }",
"private function doc_to_text(){\n\t\t$fileHandle = fopen( $this->filename, \"r\" );\n\t\t$headers = fread($fileHandle, 0xA00);\n\t\t# 1 = (ord(n)*1) ; Document has from 0 to 255 characters\n\t\t$n1 = (ord($headers[0x21C]) - 1);\n\t\t# 1 = ((ord(n)-8)*256) ; Document has from 256 to 63743 characters\n\t\t$n2 = ((ord($headers[0x21D]) - 8) * 256);\n\t\t# 1 = ((ord(n)*256)*256) ; Document has from 63744 to 16775423 characters\n\t\t$n3 = ((ord($headers[0x21E]) * 256) * 256);\n\t\t# (((ord(n)*256)*256)*256) ; Document has from 16775424 to 4294965504 characters\n\t\t$n4 = (((ord($headers[0x21F]) * 256) * 256) * 256);\n\t\t# Total length of text in the document\n\t\t$textLength = ($n1 + $n2 + $n3 + $n4);\n\t\t$extracted_plaintext = fread($fileHandle, $textLength);\n\t\treturn $this->filter(utf8_encode(nl2br($extracted_plaintext)));\n }",
"public function convertDocument($file, ConversionRequestInterface $request): object;",
"public function test_can_convert_storedfile_to_docx() {\n $returnvalue = (object) [];\n\n $converter = $this->get_testable_mock([\n 'can_convert_format_to'\n ]);\n\n $types = \\core_filetypes::get_types();\n\n $file = $this->get_stored_file('example content', 'example.docx', [\n 'mimetype' => $types['docx']['type'],\n ]);\n\n $converter->expects($this->once())\n ->method('can_convert_format_to')\n ->willReturn($returnvalue);\n\n $result = $converter->can_convert_storedfile_to($file, 'target');\n $this->assertEquals($returnvalue, $result);\n }",
"public function word($id)\n {\n $event = $this->events->find($id);\n\n $template = 'events.' . $event->template . '.doc';\n\n if (!View::exists('events.' . $event->template . '.doc')) {\n $template = 'events.default.doc';\n }\n\n if ($event->language == 'en') {\n App::setLocale('en');\n }\n\n return response(view($template, [\n 'event' => $event,\n 'sections' => $event->getSectionsList(),\n 'images' => $event->getImagesList(),\n 'copyright' => Auth::user()->copyright,\n 'total' => $event->weight_person ? $event->getTotal(true) : $event->getTotal()\n ]))\n ->header('Content-type', 'application/msword;')\n ->header('Content-Transfer-Encoding', 'Binary')\n ->header('Content-disposition', 'attachment; filename=\"' . $event->name . '.doc\"');\n }",
"function docx2text()\n {\n return $this->readZippedXML($this->file, \"word/document.xml\");\n }",
"abstract protected function convertDocument(array $raw);",
"public function convertDocumentDocToTxtAsyncWithHttpInfo($input_file)\n {\n $returnType = '\\Swagger\\Client\\Model\\TextConversionResult';\n $request = $this->convertDocumentDocToTxtRequest($input_file);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\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 function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"protected static function convertDocFile($filePath){\n\t\t// Get converted script content to plain text\n\t\t$convert = parent::convertToPlainText($filePath, 'doc');\n\n\t\t//for solving situation when file has extension doc and has structure as docx\n\t\tif (!$convert){\n\t\t\t$convert = parent::convertToPlainText($filePath, 'docx');\n\t\t}\n\n\t\treturn $convert;\n\t}",
"function convertWord($word, $toBackend) {\n\t\tglobal $wordDataConversions;\n\t\t// in case $toBackend's boolean value as an int isn't 1/0\n\t\t$from = $toBackend ? 1 : 0;\n\t\t$to = $toBackend ? 0 : 1;\n\t\t\n\t\t$new = array(\"wordData\" => array(), \"stagingData\" => $word[\"stagingData\"]);\n\t\tforeach ($wordDataConversions as $conversion) {\n\t\t\t$new[\"wordData\"][$conversion[$to]] = $word[\"wordData\"][$conversion[$from]];\n\t\t}\n\t\treturn $new;\n\t}",
"public function SendRequestToConvertService($document_uri, $from_extension, $to_extension, $document_revision_id, $is_async, $filePass)\n {\n if (empty($from_extension)) {\n $path_parts = pathinfo($document_uri);\n $from_extension = $path_parts['extension'];\n }\n\n $title = basename($document_uri);\n if (empty($title)) {\n $title = guid();\n }\n\n if (empty($document_revision_id)) {\n $document_revision_id = $document_uri;\n }\n\n $document_revision_id = $this->GenerateRevisionId($document_revision_id);\n\n $urlToConverter = $this->config['DOC_SERV_CONVERTER_URL'];\n\n $arr = [\n \"async\" => $is_async,\n \"url\" => $document_uri,\n \"outputtype\" => trim($to_extension, '.'),\n \"filetype\" => trim($from_extension, '.'),\n \"title\" => $title,\n \"key\" => $document_revision_id,\n \"password\" => $filePass\n ];\n\n $jwt = new JwtManager();\n\n $headerToken = \"\";\n $jwtHeader = $this->config['DOC_SERV_JWT_HEADER'] == \"\" ? \"Authorization\" : $this->config['DOC_SERV_JWT_HEADER'];\n if ($jwt->isJwtEnabled()) {\n $headerToken = $jwt->jwtEncode([\"payload\" => $arr]);\n $arr[\"token\"] = $jwt->jwtEncode($arr);\n }\n\n $data = json_encode($arr);\n\n $opts = array('http' => array(\n 'method' => 'POST',\n 'timeout' => $this->config['DOC_SERV_TIMEOUT'],\n 'header' => \"Content-type: application/json\\r\\n\" .\n \"Accept: application/json\\r\\n\" .\n (empty($headerToken) ? \"\" : $jwtHeader.\": Bearer $headerToken\\r\\n\"),\n 'content' => $data\n )\n );\n\n if (substr($urlToConverter, 0, strlen(\"https\")) === \"https\") {\n $opts['ssl'] = array('verify_peer' => FALSE);\n }\n\n $context = stream_context_create($opts);\n $response_data = file_get_contents($urlToConverter, FALSE, $context);\n\n return $response_data;\n }",
"public function getWords();",
"public function wordEngine(){\n $getSomeWords = $this->getSomeWords();\n if(!$getSomeWords['status']){\n return $getSomeWords;\n }\n $words = $getSomeWords['body'];\n $result = $this->matrixMaker($words);\n $matrix = $result['matrix'];\n $info = $result['info'];\n return ['status'=>1, 'words'=>$words, 'matrix'=>$matrix, 'info'=>$info];\n }",
"public function withDocumentsText(): static\n {\n return $this->addExtensionsFromPresets(static::PRESET_DOCUMENTS_TEXT);\n }",
"public function transform($word);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Switch these to include the 'webinar' posty type in using this taxonomy | function resource_custom_taxonomies(){
// register_taxonomy('use_case', array( 'case_study','product_info','report','video','webinar' ), array(
register_taxonomy('use_case', array( 'case_study','product_info','white_paper','video' ), array(
'labels' => array(
'name' => 'Use Case',
'singular_name' => 'Use Case',
'menu_name' => 'Use Cases',
'all_items' => 'All Use Cases',
'parent_item' => 'Parent Use Case',
'parent_item_colon' => 'Parent Use Case:',
'new_item_name' => 'New Use Case',
'add_new_item' => 'Add New Use Case',
'edit_item' => 'Edit Use Case',
'update_item' => 'Update Use Case',
'separate_items_with_commas' => 'Separate Use Cases with commas',
'search_items' => 'Search Use Cases',
'add_or_remove_items' => 'Add or remove Use Cases',
'choose_from_most_used' => 'Choose from the most common Use Cases'
),
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => array(
'slug' => '/',
'with_front' => false,
'hierarchical' => true
)
)
);
} | [
"function register_webinartopics_tax() {\n $labels = array(\n 'name' => _x( 'Webinar Topics', 'taxonomy general name' ),\n 'singular_name' => _x( 'Webinar Topic', 'taxonomy singular name' ),\n 'add_new' => _x( 'Add New Webinar Topic', 'Institute Center'),\n 'add_new_item' => __( 'Add New Webinar Topic' ),\n 'edit_item' => __( 'Edit Webinar Topic' ),\n 'new_item' => __( 'New Webinar Topic' ),\n 'view_item' => __( 'View Webinar Topic' ),\n 'search_items' => __( 'Search Webinar Topics' ),\n 'not_found' => __( 'No Webinar Topics found' ),\n 'not_found_in_trash' => __( 'No Webinar Topics found in Trash' ),\n );\n\n $pages = array('webinar');\n\n $args = array(\n 'labels' => $labels,\n 'singular_label' => __('Webinar Topic'),\n 'public' => true,\n 'show_ui' => true,\n 'hierarchical' => true,\n 'show_tagcloud' => false,\n 'show_in_nav_menus' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'webinars', 'with_front' => false ),\n );\n register_taxonomy('webinartopics', $pages, $args);\n }",
"function register_webinartopics_tax() {\r\n $labels = array(\r\n 'name' => _x( 'Webinar Topics', 'taxonomy general name' ),\r\n 'singular_name' => _x( 'Webinar Topic', 'taxonomy singular name' ),\r\n 'add_new' => _x( 'Add New Webinar Topic', 'Institute Center'),\r\n 'add_new_item' => __( 'Add New Webinar Topic' ),\r\n 'edit_item' => __( 'Edit Webinar Topic' ),\r\n 'new_item' => __( 'New Webinar Topic' ),\r\n 'view_item' => __( 'View Webinar Topic' ),\r\n 'search_items' => __( 'Search Webinar Topics' ),\r\n 'not_found' => __( 'No Webinar Topics found' ),\r\n 'not_found_in_trash' => __( 'No Webinar Topics found in Trash' ),\r\n );\r\n\r\n $pages = array('webinar');\r\n\r\n $args = array(\r\n 'labels' => $labels,\r\n 'singular_label' => __('Webinar Topic'),\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'hierarchical' => true,\r\n 'show_tagcloud' => false,\r\n 'show_in_nav_menus' => true,\r\n 'has_archive' => true,\r\n 'rewrite' => array('slug' => 'webinars', 'with_front' => false ),\r\n );\r\n register_taxonomy('webinartopics', $pages, $args);\r\n }",
"public function add_custom_taxonomy() {\n //http://code.tutsplus.com/articles/custom-post-type-helper-class--wp-25104\n }",
"function tpt_enable_taxonomy_as_needed() {\n\t$types = tpt_all_post_types();\n\t$options = get_option(TPT_OPTIONS_ID);\n\tforeach($types as $type=>$type_obj) {\n\t\tif(isset($options[TPT_OPTION_PREFIX.'tag_'.$type]) && $options[TPT_OPTION_PREFIX.'tag_'.$type] == '1') {\n\t\t\tregister_taxonomy_for_object_type('post_tag', $type);\n\t\t}\n\t\tif(isset($options[TPT_OPTION_PREFIX.'date_'.$type]) && $options[TPT_OPTION_PREFIX.'tag_'.$type] == '1') {\n\t\t\tregister_taxonomy_for_object_type('post_date', $type);\n\t\t}\n\t\tif(isset($options[TPT_OPTION_PREFIX.'author_'.$type]) && $options[TPT_OPTION_PREFIX.'tag_'.$type] == '1') {\n\t\t\tregister_taxonomy_for_object_type('author_tag', $type);\n\t\t}\n\t\tif(isset($options[TPT_OPTION_PREFIX.'category_'.$type]) && $options[TPT_OPTION_PREFIX.'category_'.$type] == '1') {\n\t\t\tregister_taxonomy_for_object_type('category', $type);\n\t\t}\n\t}\n}",
"public function setup_custom_taxonomies() {\n\t\tregister_taxonomy_for_object_type( 'wsuwp_university_category', $this->point_content_type_slug );\n\t\tregister_taxonomy_for_object_type( 'wsuwp_university_location', $this->point_content_type_slug );\n\t}",
"public function kiwip_register_taxonomy_for_object_type(){\n\t\tregister_taxonomy_for_object_type($this->taxonomy_name, $this->post_type_name); // register_taxonomy_for_object_type : codex.wordpress.org/Function_Reference/register_taxonomy_for_object_type\n\t}",
"function register_presentation_taxonomy() {\n\tregister_taxonomy( 'grunwell_presentation', 'grunwell_talk', [\n\t\t'labels' => [\n \t\t'name' => __( 'Presentations', 'stevegrunwell' ),\n\t\t 'singular_name' => __( 'Presentation', 'stevegrunwell' ),\n\t\t 'search_items' => __( 'Search Presentations', 'stevegrunwell' ),\n\t\t 'popular_items' => __( 'Popular Presentations', 'stevegrunwell' ),\n\t\t 'all_items' => __( 'All Presentations', 'stevegrunwell' ),\n\t\t 'edit_item' => __( 'Edit Presentation', 'stevegrunwell' ),\n\t\t 'view_item' => __( 'View Presentation', 'stevegrunwell' ),\n\t\t 'update_item' => __( 'Update Presentation', 'stevegrunwell' ),\n\t\t 'add_new_item' => __( 'Add New Presentation', 'stevegrunwell' ),\n\t\t 'new_item_name' => __( 'New Presentation Name', 'stevegrunwell' ),\n\t\t 'separate_items_with_commas' => __( 'Separate presentations with commas', 'stevegrunwell' ),\n\t\t 'add_or_remove_items' => __( 'Add or remove presentations', 'stevegrunwell' ),\n\t\t 'choose_from_most_used' => __( 'Choose from the most used presentations', 'stevegrunwell' ),\n\t\t 'not_found' => __( 'No presentations found', 'stevegrunwell' ),\n\t\t 'no_terms' => __( 'No presentations', 'stevegrunwell' ),\n\t\t 'items_list_navigation' => __( 'Presentations', 'stevegrunwell' ),\n\t\t 'items_list' => __( 'Presentations', 'stevegrunwell' ),\n\t\t 'back_to_items' => __( 'Back to Presentations', 'stevegrunwell' ),\n\t\t],\n\t\t'description' => __( 'Links to presentation decks.', 'stevegrunwell' ),\n\t\t'public' => false,\n\t\t'hierarchical' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_rest' => false,\n\t\t'show_tagcloud' => false,\n\t\t'show_in_quick_edit' => false,\n\t\t'show_admin_column' => true,\n\t] );\n}",
"function icy_build_taxonomies() {\n $labels = array(\n 'name' => __( 'Event Type', 'framework' ),\n 'singular_name' => __( 'Event Type', 'framework' ),\n 'search_items' => __( 'Search Event Types', 'framework' ),\n 'popular_items' => __( 'Popular Event Types', 'framework' ),\n 'all_items' => __( 'All Event Types', 'framework' ),\n 'parent_item' => __( 'Parent Event Type', 'framework' ),\n 'parent_item_colon' => __( 'Parent Event Type:', 'framework' ),\n 'edit_item' => __( 'Edit Event Type', 'framework' ), \n 'update_item' => __( 'Update Event Type', 'framework' ),\n 'add_new_item' => __( 'Add New Event Type', 'framework' ),\n 'new_item_name' => __( 'New Event Type Name', 'framework' ),\n 'separate_items_with_commas' => __( 'Separate Event types with commas', 'framework' ),\n 'add_or_remove_items' => __( 'Add or remove Event types', 'framework' ),\n 'choose_from_most_used' => __( 'Choose from the most used Event types', 'framework' ),\n 'menu_name' => __( 'Event Types', 'framework' )\n );\n \n\tregister_taxonomy(\n\t 'type', \n\t array( __( 'event', 'framework' )), \n\t array(\n\t 'hierarchical' => true, \n\t 'labels' => $labels,\n\t 'show_ui' => true,\n\t 'query_var' => true,\n\t 'rewrite' => array('slug' => 'type', 'hierarchical' => true)\n\t )\n\t); \n}",
"function add_interactivity_type() {\n\t$types = array('post','page','attachment','nav_menu_item', 'learning_resource');\n register_taxonomy('asn_interactivity_type', $types, array(\n 'hierarchical' => false,\n 'labels' => array(\n 'name' => _x( 'Interactivity Type', 'taxonomy general name' ),\n 'singular_name' => _x( 'Interactivity Type', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Interactivity Types' ),\n 'all_items' => __( 'All Interactivity Types' ),\n 'parent_item' => __( 'Parent Interactivity Type' ),\n 'parent_item_colon' => __( 'Parent Interactivity Type:' ),\n 'edit_item' => __( 'Edit Interactivity Type' ),\n 'update_item' => __( 'Update Interactivity Type' ),\n 'add_new_item' => __( 'Add New Interactivity Type' ),\n 'new_item_name' => __( 'New Interactivity Type Name' ),\n 'menu_name' => __( 'Interactivity Type' ),\n ),\n //Slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'interactivity_type', \n 'with_front' => false,\n 'hierarchical' => false \n ),\n ));\n}",
"function film_type_taxonomy() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Film Types', 'Taxonomy General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Film Type', 'Taxonomy Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Film Type', 'text_domain' ),\n\t\t'all_items' => __( 'All Film Types', 'text_domain' ),\n\t\t'parent_item' => __( 'Parent Item', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'new_item_name' => __( 'New Film Type', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Film Type', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Film Type', 'text_domain' ),\n\t\t'update_item' => __( 'Update Film Type', 'text_domain' ),\n\t\t'view_item' => __( 'View Film Type', 'text_domain' ),\n\t\t'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ),\n\t\t'add_or_remove_items' => __( 'Add or remove items', 'text_domain' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),\n\t\t'popular_items' => __( 'Popular Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Film Types', 'text_domain' ),\n\t\t'not_found' => __( 'Not Found', 'text_domain' ),\n\t\t'no_terms' => __( 'No items', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t\t'show_in_rest' => true,\n\t);\n\tregister_taxonomy( 'film_type', array( 'films' ), $args );\n\n}",
"function register_taxonomy() {\n\t\tregister_taxonomy( self::taxonomy, 'post', array(\n\t\t\t'public' => true,\n\t\t\t'query_var' => 'resolved',\n\t\t\t'rewrite' => false,\n\t\t\t'show_ui' => false,\n\t\t) );\n\t}",
"function autoparts_trx_addons_post_type_taxonomy($tax='', $post_type='') {\n\t\tif ( defined('TRX_ADDONS_CPT_CARS_PT') && $post_type == TRX_ADDONS_CPT_CARS_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_CARS_TAXONOMY_MAKER;\n\t\telse if ( defined('TRX_ADDONS_CPT_COURSES_PT') && $post_type == TRX_ADDONS_CPT_COURSES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_COURSES_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_DISHES_PT') && $post_type == TRX_ADDONS_CPT_DISHES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_DISHES_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_PORTFOLIO_PT') && $post_type == TRX_ADDONS_CPT_PORTFOLIO_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_PORTFOLIO_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_PROPERTIES_PT') && $post_type == TRX_ADDONS_CPT_PROPERTIES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_PROPERTIES_TAXONOMY_TYPE;\n\t\telse if ( defined('TRX_ADDONS_CPT_SERVICES_PT') && $post_type == TRX_ADDONS_CPT_SERVICES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_SERVICES_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_COMPETITIONS_PT') && $post_type == TRX_ADDONS_CPT_COMPETITIONS_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_COMPETITIONS_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_TEAM_PT') && $post_type == TRX_ADDONS_CPT_TEAM_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_TEAM_TAXONOMY;\n\t\treturn $tax;\n\t}",
"function jss_create_gallery_taxonomies(){\n\tregister_taxonomy(\n\t\t'phototype', 'gallery', \n\t\tarray(\n\t\t\t'hierarchical'=> true, \n\t\t\t'label' => 'Banner',\n\t\t\t'singular_label' => 'Banner',\n\t\t\t'rewrite' => true\n\t\t)\n\t);\t\n}",
"function create_res_tax() {\n\tregister_taxonomy('media_cat', 'ibm_media', \n\t\tarray(\n\t\t\t// Hierarchical taxonomy (like categories)\n\t\t\t'hierarchical' => true,\n\t\t\t// This array of options controls the labels displayed in the WordPress Admin UI\n\t\t\t'label' => __( 'Media Categories' ),\n\t\t\t// Control the slugs used for this taxonomy\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'media-type', // This controls the base slug that will display before each term\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'with_front' => true\n\t\t\t),\n\t\t)\n\t);\n\tflush_rewrite_rules();\n}",
"function tkno_register_venue_taxonomy() {\n $labels = array(\n 'name' => 'Venues',\n 'singular_name' => 'Venue',\n 'search_items' => 'Search Venues',\n 'all_items' => 'All Venues',\n 'edit_item' => 'Edit Venue',\n 'update_item' => 'Update Venue',\n 'add_new_item' => 'Add New Venue',\n 'new_item_name' => 'New Venue Name',\n 'menu_name' => 'Venues',\n 'view_item' => 'View Venues',\n 'popular_items' => 'Popular Venues',\n 'separate_items_with_commas' => 'Separate venues with commas',\n 'add_or_remove_items' => 'Add or remove venues',\n 'choose_from_most_used' => 'Choose from the most used venues',\n 'not_found' => 'No venues found'\n );\n register_taxonomy(\n 'venue',\n array('post'),\n array(\n 'label' => __( 'Venue' ),\n 'hierarchical' => false,\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => false,\n 'show_ui' => true,\n 'show_in_nav_menus' => false,\n 'show_tagcloud' => false,\n 'show_admin_column' => false,\n 'rewrite' => array( 'slug' => 'venue','with_front' => false),\n )\n );\n}",
"function nji_custom_taxonomy_teams() {\n\t$args = array(\n\t\t'show_in_rest' => true,\n\t\t'labels' => nji_custom_labels_taxonomies( 'Team', 'Teams' ),\n\t\t'hierarchical' => true,\n\t\t'show_tagcloud' => false,\n\t);\n\tregister_taxonomy( 'teams', array( 'post', 'project', 'leaders' ), $args );\n}",
"function get_filter_taxonomy_list() {\n \n\t$taxonomies = array();\n\n\t$options = vb_options( views()->id );\n\n\t$post_types = isset($options['post-type']) ? $options['post-type'] : 'post';\n\n\t$taxonomy_names = get_object_taxonomies( $post_types );\n\tforeach ( $taxonomy_names as $taxonomy ) {\n\t\t$taxonomies[$taxonomy] = ucwords(str_replace('_', ' ', $taxonomy ));\n\t}\n\n\treturn $taxonomies;\n \n}",
"function chocorocco_trx_addons_post_type_taxonomy($tax='', $post_type='') {\n\t\tif ( defined('TRX_ADDONS_CPT_CARS_PT') && $post_type == TRX_ADDONS_CPT_CARS_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_CARS_TAXONOMY_MAKER;\n\t\telse if ( defined('TRX_ADDONS_CPT_COURSES_PT') && $post_type == TRX_ADDONS_CPT_COURSES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_COURSES_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_DISHES_PT') && $post_type == TRX_ADDONS_CPT_DISHES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_DISHES_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_PORTFOLIO_PT') && $post_type == TRX_ADDONS_CPT_PORTFOLIO_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_PORTFOLIO_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_PROPERTIES_PT') && $post_type == TRX_ADDONS_CPT_PROPERTIES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_PROPERTIES_TAXONOMY_TYPE;\n\t\telse if ( defined('TRX_ADDONS_CPT_SERVICES_PT') && $post_type == TRX_ADDONS_CPT_SERVICES_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_SERVICES_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_COMPETITIONS_PT') && $post_type == TRX_ADDONS_CPT_COMPETITIONS_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_COMPETITIONS_TAXONOMY;\n\t\telse if ( defined('TRX_ADDONS_CPT_TEAM_PT') && $post_type == TRX_ADDONS_CPT_TEAM_PT )\n\t\t\t$tax = TRX_ADDONS_CPT_TEAM_TAXONOMY;\n\t\treturn $tax;\n\t}",
"function cptui_register_my_taxes_case_study_taxonomy() {\n $labels = [\n \"name\" => __( \"Case Study Type\", \"custom-post-type-ui\" ),\n \"singular_name\" => __( \"Case Study Type\", \"custom-post-type-ui\" ),\n \"menu_name\" => __( \"Case Study Type\", \"custom-post-type-ui\" ),\n \"all_items\" => __( \"All Case Study Types\", \"custom-post-type-ui\" ),\n \"edit_item\" => __( \"Edit Case Study Type\", \"custom-post-type-ui\" ),\n \"view_item\" => __( \"View Case Study Type\", \"custom-post-type-ui\" ),\n \"update_item\" => __( \"Update Case Study Type name\", \"custom-post-type-ui\" ),\n \"add_new_item\" => __( \"Add new Case Study Type\", \"custom-post-type-ui\" ),\n \"new_item_name\" => __( \"New Case Study Type name\", \"custom-post-type-ui\" ),\n \"parent_item\" => __( \"Parent Case Study Type\", \"custom-post-type-ui\" ),\n \"parent_item_colon\" => __( \"Parent Case Study Type:\", \"custom-post-type-ui\" ),\n \"search_items\" => __( \"Search Case Study Types\", \"custom-post-type-ui\" ),\n \"popular_items\" => __( \"Popular Case Study Types\", \"custom-post-type-ui\" ),\n \"separate_items_with_commas\" => __( \"Separate Case Study Types with commas\", \"custom-post-type-ui\" ),\n \"add_or_remove_items\" => __( \"Add or remove Case Study Type\", \"custom-post-type-ui\" ),\n \"choose_from_most_used\" => __( \"Choose from the most used Case Study Types\", \"custom-post-type-ui\" ),\n \"not_found\" => __( \"No Case Study Types found\", \"custom-post-type-ui\" ),\n \"no_terms\" => __( \"No Case Study Types\", \"custom-post-type-ui\" ),\n \"items_list_navigation\" => __( \"Case Study Types list navigation\", \"custom-post-type-ui\" ),\n \"items_list\" => __( \"Case Study Types list\", \"custom-post-type-ui\" ),\n \"back_to_items\" => __( \"Back to Case Study Types\", \"custom-post-type-ui\" ),\n ];\n $args = [\n \"label\" => __( \"Case Study Type\", \"custom-post-type-ui\" ),\n \"labels\" => $labels,\n \"public\" => true,\n \"publicly_queryable\" => true,\n \"hierarchical\" => false,\n \"show_ui\" => true,\n \"show_in_menu\" => true,\n \"show_in_nav_menus\" => true,\n \"query_var\" => true,\n \"rewrite\" => [ 'slug' => 'case_study_taxonomy', 'with_front' => true, ],\n \"show_admin_column\" => false,\n \"show_in_rest\" => true,\n \"rest_base\" => \"case_study_taxonomy\",\n \"rest_controller_class\" => \"WP_REST_Terms_Controller\",\n \"show_in_quick_edit\" => false,\n \"show_in_graphql\" => false,\n ];\n register_taxonomy( \"case_study_taxonomy\", [ \"case_study\" ], $args );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get list of documentary by given options | public function getDocumentaries($options = array()) {
$sql = "SELECT * ";
$from = " FROM `{$this->_tablename}` ";
$where = " WHERE 1 = 1 ";
if($options['editor']) {
$where .= " AND `editor` = {$this->_db->quote($options['editor'])} ";
}
if($options['new']) {
if($options['new'] == 2) {
$new = 0;
} else {
$new = $options['new'];
}
$where .= " AND `new` = {$this->_db->quote($new, 'INTEGER')} ";
}
if($options['id']) {
$where .= " AND `id` = {$this->_db->quote($options['id'], 'INTEGER')} ";
}
if($options['name']) {
$where .= " AND `name` LIKE '%" . $options['name'] . "%' ";
}
if($options['active']) {
if($options['active'] == 2) {
$active = 0;
} else {
$active = 1;
}
$where .= " AND `active` = {$this->_db->quote($active, 'INTEGER')} ";
}
$order = " ORDER BY `id` DESC ";
if($options['order'] && $options['by']) {
$order = " ORDER BY `{$options['order']}` {$options['by']} ";
}
$limit = "";
if(isset($options['offset']) && $options['offset'] >=0 && $options['limit'] >0) {
$limit = " limit {$this->_db->quote($options['offset'], 'INTEGER')}, {$this->_db->quote($options['limit'], 'INTEGER')} ";
}
$result = $this->_db->fetchAll ( $sql . $from . $where . $order . $limit );
return $result;
} | [
"public function getDocuments();",
"function loadDocList() {\n\t\treturn $this->content->loadDocList();\n\t}",
"public function getCachedDocuments($options = array()) {\n if ( ! isset($options['query'])) $options['query'] = array();\n $query = $this->buildQuery($options['query']);\n return json_decode(file_get_contents($this->baseUrl . '/list-cached-documents/?' . $query));\n }",
"public function getOfficialDocuments() {}",
"function tidy_get_opt_doc(tidy $object, $optname) {}",
"public function get_document_list() {\n $returnArr['status'] = '0';\n $returnArr['response'] = '';\n try {\n\t\t\t$documentsArr = array();\n\t\t\t$getDocuments = $this->app_model->get_all_details(DOCUMENTS,array('status' =>\"Active\"));\n\t\t\tif($getDocuments->num_rows()>0){\n\t\t\t\tforeach($getDocuments->result() as $doc){\n\t\t\t\t\t$documentsArr[] = array(\"id\"=>(string)$doc->_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"=>(string)$doc->name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"category\"=>(string)$doc->category,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"is_req\"=>(string)$doc->hasReq,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"is_exp\"=>(string)$doc->hasExp\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$returnArr['status'] = '1';\n\t\t\t$returnArr['response'] = array(\"documents\"=>$documentsArr);\n } catch (MongoException $ex) {\n $returnArr['response'] = $this->format_string(\"Error in connection\", \"error_in_connection\");\n }\n $json_encode = json_encode($returnArr, JSON_PRETTY_PRINT);\n echo $this->cleanString($json_encode);\n }",
"function getCheckedOutDocs($options = array ()) {\n\t\t$obj_url = $this->workspace->collections[COLLECTION_CHECKED_OUT];\n\t\t$ret = $this->doGet($obj_url);\n\t\t$objs = $this->extractObjectFeed($ret->body);\n\t\t$this->cacheFeedInfo($objs);\n\t\treturn $objs;\n\t}",
"public function get_document_list()\n {\n $query = $this->db->get('document');\n return $query->result_array();\n }",
"public static function getDocsByTextType(){\n return $docs = self::select(self::required_docs_name,self::required_docs_type)->where(self::required_docs_type,\"!=\", \"image\")->get();\n }",
"function documentation_list( $type = '', $limit = 5 ) {\n\n\t$docs = get_documentation_data();\n\n\t$doc_list = array();\n\n\tforeach( $docs as $d ) {\n\t\tif ( $type == $d[ 'type' ] ) {\n\t\t\t$doc_list[] = $d;\n\t\t}\n\t}\n\n\t// reduce list to first '$limit' items\n\t$doc_list = array_slice( $doc_list, 0, $limit );\n\n\tif ( $doc_list ) {\n\t\techo '<ul>';\n\t\tforeach( $doc_list as $d ) {\n?>\n\t<li><a href=\"<?php echo $d[ 'url' ]; ?>\"><?php echo $d[ 'name' ]; ?></a></li>\n<?php\n\t\t}\n\t\techo '</ul>';\n\n\t}\n\n}",
"function getDocuments($condition_array = array()) {\n\t\t\n\t\treturn $this->collection->find($condition_array);\n\t}",
"public function getProcessediDocsList() {\n \t\t$dir = opendir($this->outgoing); \n\t\t$idocs = array();\n\t\twhile ($file = readdir($dir)) {\n\t\t\t$parts = explode(\".\", $file);\n\t\t\tif (is_array($parts) && count($parts) > 1) { \n \t\t$extension = end($parts);\n\t\t\t\tif ($extension == \"idoc\" OR $extension == \"IDOC\") {\n\t\t\t\t\tarray_push($idocs, $file);\n\t\t\t\t}\n\t\t\t}\n }\n\t\tclosedir($dir);\n\t\t\n\t\treturn ($idocs);\n\t}",
"public static function getList($options = array()) {\r\n\t\t\t\r\n\t\t$dbAdapter = Zend_Db_Table_Abstract::getDefaultAdapter();\r\n\t\t\r\n\t\tif($options['columns']['userId']) {\r\n\t\t\t$where = \" WHERE userId = \" . $options['columns']['userId'];\r\n\t\t\tif($options['columns']['category']) {\r\n\t\t\t\t$where .= \" AND category = '\" . $options['columns']['category'] . \"'\";\r\n\t\t\t}\r\n\t\t\tif($options['columns']['catId']) {\r\n\t\t\t\t$where .= \" AND catId = \" . $options['columns']['catId'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif($options['limit']) {\r\n\t\t\t$limit = \" LIMIT 0,\" . $options['limit'];\r\n\t\t}\r\n\t\t$query = \"SELECT * FROM bookmarks\" . $where . $limit;\t\t\r\n\t\t$stmt = $dbAdapter->query(\"SELECT * FROM bookmarks\" . $where. \" ORDER BY updatedtime DESC\" . $limit);\r\n $list = $stmt->fetchAll();\r\n array($list);\r\n\r\n return $list;\r\n\t}",
"public function listar_documentos()\n\t{\n\t\t$this->db->where('status', false);\n\t\t$this->db->order_by('fechaCarg','asc'); //ordena de manera ascente los elementos\n\t\treturn $this->db->get('documentose4')->result();\n\t}",
"public function getOptions(): iterable;",
"public function findDocumentsBy(array $criteria);",
"function getDocsByParameter($docType, $parameterName, $parameterDataName, $value) {\n if ($value) {\n $WHERE = \"(sdp.value_short LIKE '\" . mysql_real_escape_string($value) . \"' OR sdp.value_long LIKE '\" . mysql_real_escape_string($value) . \"')\";\n } else {\n $WHERE = \"1\";\n }\n \n if ($parameterDataName) {\n $sql_query = mysql_query(\"SELECT sdp.doc_id FROM sys_docs_params sdp, sys_docs sd WHERE sdp.doc_id = sd.doc_id AND sd.doc_type = '\" . mysql_real_escape_string($docType) . \"' AND sdp.param_name = '\" . mysql_real_escape_string($parameterName) . \"' AND sdp.param_data_name = '\" . mysql_real_escape_string($parameterDataName) . \"' AND $WHERE GROUP BY sdp.doc_id\");\n } else {\n $sql_query = mysql_query(\"SELECT sdp.doc_id FROM sys_docs_params sdp, sys_docs sd WHERE sdp.doc_id = sd.doc_id AND sd.doc_type = '\" . mysql_real_escape_string($docType) . \"' AND sdp.param_name = '\" . mysql_real_escape_string($parameterName) . \"' AND sdp.param_data_name IS NULL AND $WHERE GROUP BY sdp.doc_id\");\n }\n while ($sql = mysql_fetch_assoc($sql_query)) {\n $docs[] = $sql['doc_id'];\n }\n \n return $docs;\n}",
"public function getTypesDocument(){\n if (Server::RequestMethod(\"POST\")) {\n $tiposDocumentos = $this->_global->getAllTypeClients();\n\n $html = '<option value=\"\"></option>';\n foreach ($tiposDocumentos as $row) {\n $html .= \"<option value='\" . $row['id'] . \"'>\" . $row['descripcion'] . \"(\" . $row['codigo'] . \")\" . \"</option>\";\n }\n echo $html;\n } else {\n $this->redireccionar(\"../login\");\n }\n }",
"public function getDocs()\n {\n return $this->docs;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unquote a string and optionally return the quote removed. Meant to work with unique pairs of quotes, so passing in "AAABAC" will break it. | public static function unquote(string $string, string $quotes = '\'\'""', string &$leftQuote = ''): string {
if (strlen($string) < 2) {
$leftQuote = '';
return $string;
}
$q = substr($string, 0, 1);
$leftOffset = strpos($quotes, $q);
if ($leftOffset === false) {
$leftQuote = '';
return $string;
}
$rightQuoteCharacter = $quotes[$leftOffset + 1];
if (substr($string, -1) === $rightQuoteCharacter) {
$leftQuote = $quotes[$leftOffset];
return substr($string, 1, -1);
}
return $string;
} | [
"function _dequote($string)\r\n {\r\n if (($string{0} == \"'\" || $string{0} == '\"') &&\r\n substr($string, -1) == $string{0})\r\n return substr($string, 1, -1);\r\n else\r\n return $string;\r\n }",
"public function parseQuoted($string) {\n if (substr($string, 0, 1) != substr($string, -1, 1)) {\n // Start and end quotes must be the same.\n return FALSE;\n }\n $quote = substr($string, 0, 1);\n $string = substr($string, 1, -1);\n if ($quote == '\"') {\n // Double quotes: strip slashes.\n return stripcslashes($string);\n }\n elseif ($quote == \"'\") {\n // Simple quote: return as-is.\n return $string;\n }\n else {\n // Unrecognized quote.\n return FALSE;\n }\n }",
"function _locale_import_parse_quoted($string) {\n if (substr($string, 0, 1) != substr($string, -1, 1)) {\n return FALSE; // Start and end quotes must be the same\n }\n $quote = substr($string, 0, 1);\n $string = substr($string, 1, -1);\n if ($quote == '\"') { // Double quotes: strip slashes\n return stripcslashes($string);\n }\n elseif ($quote == \"'\") { // Simple quote: return as-is\n return $string;\n }\n else {\n return FALSE; // Unrecognized quote\n }\n}",
"function Internal_StripQuotes($string) {\n\t\t\tif (preg_match(\"/^\\\\\\\"(.*)\\\\\\\"$/\", $string, $matches))\n\t\t\t\treturn $matches[1];\n\t\t\telse if (preg_match(\"/^\\\\'(.*)\\\\'$/\", $string, $matches))\n\t\t\t\treturn $matches[1];\n\t\t\telse return $string;\n\t\t}",
"public static function clean_quotes($string)\n {\n $first_char = substr((string) $string, 0, 1);\n $last_char = substr((string) $string, -1, 1);\n\n /**\n * Test the first and last character for quote type\n */\n if ($first_char === $last_char && in_array($first_char, [self::QUOTE_SINGLE, self::QUOTE_DOUBLE])) {\n return trim($string, $first_char);\n }\n\n return $string;\n }",
"public static function unquoteString(string $value): string {\n\t\treturn strtr(substr($value, 1, -1), ['\\\\\"' => '\"', '\\\\\\\\' => '\\\\']);\n\t}",
"public function unescapeDoubleQuotedString($value)\n {\n $self = $this;\n $callback = function($match) use ($self) {\n return $self->unescapeCharacter($match[0]);\n };\n\n // evaluate the string\n return preg_replace_callback('/'.self::REGEX_ESCAPED_CHARACTER.'/u', $callback, $value);\n }",
"private function stripWrappedQuotes($input)\n {\n if (empty($input)) {\n return '';\n }\n if (substr($input, 0, 1) === '\"') {\n $input = substr($input, 1);\n }\n if (substr($input, -1, 1) === '\"') {\n $input = substr($input, 0, -1);\n }\n return $input;\n }",
"public function unescapeDoubleQuotedString($value)\n {\n $callback = function ($match) {\n return $this->unescapeCharacter($match[0]);\n };\n\n // evaluate the string\n return preg_replace_callback(\"/\" . self::REGEX_ESCAPED_CHARACTER . \"/u\", $callback, $value);\n }",
"public function unescapeSingleQuotedString($value)\n {\n return str_replace('\\'\\'', '\\'', $value);\n }",
"public function stripQuotes($text)\n {\n if (!$text || strlen($text) < 2) {\n return $text;\n }\n $text = trim($text);\n $p0 = $text[0];\n $p1 = substr($text, -1);\n if ($p0 === $p1 && ($p0 === '\"' || $p0 === \"'\")) {\n return substr($text, 1, -1);\n }\n return $text;\n }",
"public static function stripQuotes($string)\n {\n return strtr($string, array('\"' => '', \"'\" => ''));\n }",
"function str_quote_strip($str): string\n {\n return str_replace(['\"', \"'\"], '', $str);\n }",
"private function _removeQuotedValues() {\n $quotedToken = strtok( $this->_queryString, '\"\\'' );\n $output = '';\n $count = 1;\n\n while ( $quotedToken !== false ) {\n if ( $count++ % 2 ) {\n $output .= $quotedToken;\n }\n $quotedToken = strtok( '\"\\'' );\n }\n\n unset($quotedToken); //!< ensure that the tokeniser is destroyed\n\n return $output;\n }",
"public function stripQuotes($text)\n {\n if (!$text || strlen($text) < 2) {\n return $text;\n }\n $text=trim($text);\n $p0=$text[0];\n $p1=\\substr($text, -1);\n if ($p0===$p1 && ($p0==='\"' || $p0===\"'\")) {\n return \\substr($text, 1, -1);\n }\n return $text;\n }",
"function stripQuotes($text) {\n return preg_replace('/^(\\'(.*)\\'|\"(.*)\")$/', '$2$3', $text);\n}",
"function decodequotes($str)\n\t{\n\t\t$singlequotestr=str_replace(\"''\",\"'\",$str);\n\t\t$repdoublequotestr=str_replace('"','\"',$singlequotestr);\n\t\t$repbackslashquotestr=stripslashes($repdoublequotestr);\n\t\treturn $repbackslashquotestr;\n\t}",
"public function requote($string){}",
"private static function _escape_quoted_string($str) {\n $quo = substr($str, 0, 1);\n $str = substr($str, 1, -1);\n if ($quo == '\"') {\n $str = stripcslashes($str);\n } else {\n $str = strtr($str, array(\"\\\\'\" => \"'\", \"\\\\\\\\\" => \"\\\\\"));\n }\n return $str;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
login method Method for the API User to login | public function login() {
if($this->request->query) {
$apiUser = $this->ApiUser->login($this->request->query);
$this->set(compact('apiUser'));
} else {
$this->api_response("500", "Unauthorised");
}
} | [
"public function login() {\n\n $validator = $this->getValidator();\n $validator->set($this->request->data);\n\n $validator->validate = [\n 'user_id' => [\n 'rule' => 'notBlank',\n 'message' => __('ユーザーIDが必須です。'),\n 'required' => true\n ],\n 'password' => [\n 'rule' => 'notBlank',\n 'message' => __('パスワードが必須です。'),\n 'required' => true\n ]\n ];\n\n if (!$validator->validates()) {\n return $this->_falseJson(ApiResponseCode::BAD_REQUEST, null, $validator->validationErrors);\n }\n\n if ($this->request->is('post')) {\n $user = $this->Auth->identify($this->request, $this->response);\n\n // Login success\n if (!empty($user)) {\n // Create access token\n $access_token = ApiTokenAuthenticate::generate_token($user);\n\n // Save access log\n $this->__saveAccessLog(ApiResponseCode::OK, $access_token);\n\n // Return response\n return $this->_trueJson([\n 'id' => $user['id'],\n 'user_id' => $user['user_id'],\n 'name' => $user['user_name'],\n 'email' => $user['mail_addr'],\n 'access_token' => $access_token\n ]);\n }\n }\n\n // Response authenticate failure\n $this->__saveAccessLog(ApiResponseCode::UNAUTHORIZED);\n return $this->_falseJson(ApiResponseCode::UNAUTHORIZED, __('ユーザーIDまたはパスワードが正しくありません。'));\n }",
"public function login(){\n $postData = $this->request->getData();\n if (!$this->validateForm( ['username', 'password'], $postData)){\n $this->jsonError(\"Information missing\");\n return;\n }\n $user = $this->Users->find('all')\n ->where(['username'=>$postData['username'], 'deleted' => 0])\n ->first();\n\n if (empty($user) || !password_verify($postData['password'], $user['password'])){\n $this->jsonError(\"Could not verify\");\n return;\n }\n $session = $this->getRequest()->getSession();\n $session->write('user_id', $user['id'] );\n $this->jsonSuccess(\"Logged in\", ['username'=> $user['username']]);\n }",
"public function actionLogin() {\n try {\n $result = ApiModule::$defaultFailedResponse;\n // Check format of request\n $this->checkRequest();\n // Parse json\n $root = json_decode(filter_input(INPUT_POST, DomainConst::KEY_ROOT_REQUEST));\n // Check required parameters\n $this->checkRequiredParam($root, array(\n DomainConst::KEY_USERNAME,\n DomainConst::KEY_PASSWORD\n ));\n // Get user login\n $mUser = $this->getUserModel($root->username);\n ApiUserTokens::validateLogin($this, $mUser, $result, $root);\n \n $mUserToken = ApiUserTokens::makeNewToken($mUser, $root);\n CreateResponse::loginResponse($mUserToken->token, $mUser, $this);\n } catch (Exception $exc) {\n ApiModule::catchError($exc, $this);\n }\n }",
"public function logIn(){\n\n $username = $this->getUsername();\n $password = $this->get('password');\n\n if($username && $password){\n\n $loggedIn = Object::$_restClient->login($username,$password);\n\n if(Object::$_restClient->statusCode() == 200){\n $this->clearDirtyKeys();\n $this->updateAttributes((array)$loggedIn);\n $this->unsetAttr('password');\n\n session_start();\n $_SESSION['parse-session-token'] = $this->sessionToken;\n $_SESSION['sparse-user'] = $this->toJSON();\n\n User::$_current = $this;\n }\n }\n }",
"public function performLogin()\n {\n\n }",
"protected function login()\n {\n \tContainer::getInstance()\n \t->make(AuthFactory::class)\n \t->login($this->user);\n }",
"private function login()\n {\n return $this->post('login', [\n 'username' => 'username',\n 'password' => 'secret'\n ]);\n }",
"function login()\n\t{\n\t\t$app = \\Slim\\Slim::getInstance();\n\t\t$request = $app->request();\n\t\t$loginInfo = json_decode($request->getBody());\n\t\t$sql = \"SELECT user_id, first_name, last_name, email, tokens, phone, is_custom, custom_image_path FROM USER WHERE email = :email AND password = :password\";\n\t\ttry \n\t\t{\n\t\t\tif(isset($loginInfo))\n\t\t\t{\n\t\t\t\t$db = getConnection();\n\t\t\t\t$stmt = $db->prepare($sql);\n\t\t\t\t$stmt->bindParam(\"email\", $loginInfo->email);\n\t\t\t\t$stmt->bindParam(\"password\", md5($loginInfo->password));\n\t\t\t\t$stmt->execute();\n\t\t\t\t$userinfo = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t$db = null;\n\t\t\t\t$response = array('userID' => (int)$userinfo['user_id'], 'firstName' => $userinfo['first_name'], 'lastName' => $userinfo['last_name'], 'email' => $userinfo['email'], 'tokens' => (int)$userinfo['tokens'], 'phone' => $userinfo['phone'], 'is_custom' => (int)$userinfo['is_custom'], 'custom_image_path' => $userinfo['custom_image_path']);\n\t\t\t\techo json_encode($response);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo '{\"error\":{\"text\": \"Login Info was not set\" }}'; \t\t\n\t\t} \n\t\tcatch(PDOException $e) \n\t\t{\n\t\t\techo '{\"error\":{\"text\":' . \"\\\"\" . $e->getMessage() . \"\\\"\" . '}}'; \n\t\t}\n\t}",
"public function login()\n {\n Models\\User\\Login::create($this);\n $_SESSION['current_userID'] = $this->userID;\n }",
"public function login()\n {\n $this->getAuthenticator()->login();\n }",
"public function loginPost() {\n\n\t\t}",
"public function loginFirst(){\n }",
"public function loginUser(){\r\n $this->session->storeUserInSession($this->user->user_id, $this->user->name);\r\n $this->loggedIn = $this->session->isLoggedIn();\r\n }",
"public function actionLogin() {\n\t\t$missingParams = '';\n\t\tif (! isset ( $_POST [Params::param_Company_Id] )) {\n\t\t\tResponse::MissingParam(Params::param_Company_Id);\n\t\t}\n\t\tif (! isset ( $_POST [Params::param_Email] )) {\n\t\t\tResponse::MissingParam(Params::param_Email);\n\t\t}\n\t\tif (! isset ( $_POST [Params::param_Password] )) {\n\t\t\tResponse::MissingParam(Params::param_Password);\n\t\t}\n\t\t\n\t\t$password = md5($_POST[Params::param_Password]);\n\t\t\n\t\t// check email and company id existed\n\t\t$email = $_POST [Params::param_Email];\n\t\t$company_id = $_POST [Params::param_Company_Id];\n\t\t$device_id = '';\n\t\tif (isset ( $_POST [Params::param_Device_Id] )) {\n\t\t\t$device_id = $_POST [Params::param_Device_Id];\n\t\t}\n\t\t$user = $this->checkEmailExisted ( $email, $company_id );\n\t\tif (!is_null($user) && $user->is_actived == 1 && $password==$user->password) {\n\t\t\t// email existed, login successfully\n\t\t\t// check if device id is not existed, replace with the new\n\t\t\tif ($device_id!=='' && ! $this->checkDeviceIdAndEmail( $email, $company_id, $device_id )) {\n\t\t\t\t// new device id, replace current device id in database\n\t\t\t\tUser::model ()->updateByPk ( $user->id, array (\n\t\t\t\t\t\t'device_id' => $device_id \n\t\t\t\t) );\n\t\t\t}\n\t\t\t$now = date('Y-m-d H:i:s');\n\t\t\t$tomorrow = strtotime(\"+1 day\", strtotime($now));\n\t\t\t$token_expired_date = date('Y-m-d H:i:s', $tomorrow);\n\t\t\t\n\t\t\t$token = $this->generateToken ( $user->email, $user->device_id );\n\t\t\tUser::model ()->updateByPk ( $user->id, array (\n\t\t\t\t\t'token' => $token, \n\t\t\t\t\t'token_expired_date' =>$token_expired_date\n\t\t\t) );\n\t\t\t\n\t\t\t$data = array('token' => $token);\n\t\t\tResponse::SuccessWithSimpleArray($this->modelName, $data);\n\t\t} else {\n\t\t\t$message = 'Login failed, email not found or your account have been deactived by administrator.';\n\t\t\tResponse::Failed($message);\n\t\t}\n\t}",
"public function login() {\n\n //Create a new JWT for the user\n $jwt = $this->jwt([\n 'src' => 'login',\n 'sid' => Kiss::$app->session->getSessionId(),\n ]);\n\n //Set the JWT\n Kiss::$app->session->setJWT($jwt);\n $this->authorize($jwt);\n return $this->save();\n }",
"public function postSignIn(){\n $username = $this->params->get('username');\n $password = $this->params->get('password');\n if($username && $password){\n try{\n $users = $this->service('database')->from('users')\n ->where('Username = :username AND Password = :password')\n ->param('username', $username)\n ->param('password', hash('sha256', $password))\n ->model($this->model('User'))\n ->limit(0, 1)\n ->fetch();\n if($users->count() > 0){\n $user = (array)$users[0];\n $this->service('security')->identity($user);\n $this->redirect($this->route('admin.home'));\n return;\n }else{\n $this->service('messenger')->send(\n 'loginFail',\n __CLASS__ . ':getSignIn',\n self::INVALID_LOGIN\n );\n }\n }catch(Exception $ex){\n $this->service('messenger')->send(\n 'loginFail',\n __CLASS__ . ':getSignIn',\n $ex->getMessage()\n );\n }\n }else{\n $this->service('messenger')->send(\n 'loginFail',\n __CLASS__ . ':getSignIn',\n self::INVALID_LOGIN\n );\n }\n $this->redirect($this->route('adminSignIn'));\n }",
"public function login() {\n if (($this->username != null) && ($this->password != null)) {\n //test\n $this->userid = -1;\n }\n }",
"function login_get()\n { \n $email= $this->get('email');\n $enc_pass=$this->get('pass');\n\n $user = $this->user_model->login($email,$enc_pass);\n \n if($user)\n {\n $this->response($user, 200); \n }\n \n else\n {\n $this->response(NULL, 404);//Errors to be handled application side\n }\n }",
"public function doLogin() {\n $filterTemplate = array(\n \"usernameField\" => FILTER_SANITIZE_STRING,\n \"passwordField\" => FILTER_SANITIZE_STRING,\n );\n\n $filteredData = filter_input_array(INPUT_POST, $filterTemplate);\n $userController = new Controllers\\UserController();\n $result = $userController->login($filteredData['usernameField'], $filteredData['passwordField']);\n header(\"Refresh:0\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the userLogin property | public function getUserLogin()
{
return $this->userLogin;
} | [
"public function getUserLogin() {\n return $this->userLogin;\n }",
"public function getUserLogin()\n {\n return $this->user_login;\n }",
"public function getUserLogin()\n {\n return $this->{$this->getUserLoginName()};\n }",
"public function getLogin()\r\n {\r\n return $this->login;\r\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->{$this->getLoginName()};\n }",
"public function get_login()\n {\n return $this->_login;\n }",
"function getLoginUsername() {\r\n\t\treturn $this->get${property.name}();\r\n\t}",
"function getLogin() \r\n\t\t{\r\n\t\t\treturn $this->login;\r\n\t\t}",
"public function getLogin()\n {\n return isset($this->Login) ? $this->Login : null;\n }",
"public function getUsrLogin()\n {\n return $this->usr_login;\n }",
"public function getLogin()\n {\n if (!isset($this->data['fields']['login'])) {\n if ($this->isNew()) {\n $this->data['fields']['login'] = null;\n } elseif (!isset($this->data['fields']) || !array_key_exists('login', $this->data['fields'])) {\n $this->addFieldCache('login');\n $data = $this->getRepository()->getCollection()->findOne(array('_id' => $this->getId()), array('login' => 1));\n if (isset($data['login'])) {\n $this->data['fields']['login'] = (string) $data['login'];\n } else {\n $this->data['fields']['login'] = null;\n }\n }\n }\n\n return $this->data['fields']['login'];\n }",
"public function get_login_user_id() {\n\t\treturn $this->login_user_id;\n\t}",
"public function getLoginInfo()\n {\n return $this->login_info;\n }",
"public function loginAttribute()\n {\n return UserSettings::get('login_attribute', UserSettings::LOGIN_EMAIL);\n }",
"public function get_login_username() {\n\t\treturn $this->login_username;\n\t}",
"public function getIdLogin()\n {\n return $this->IdLogin;\n }",
"public function loginAttribute() {\n\t\treturn UserSettings::get ( 'login_attribute', UserSettings::LOGIN_EMAIL );\n\t}",
"public function getLoginName() {\n return $this->loginName;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clean up kernel usage in this test ! | protected function tearDown()
{
// purposefully not calling parent class, which shuts down the kernel
} | [
"abstract protected function ensureKernelShutdown();",
"abstract protected static function ensureKernelShutdown();",
"public function tearDown()\n {\n // kill the kernel\n static::$kernel->shutdown();\n }",
"public function resetKernel()\n {\n // Reset the kernel only if it has been initialized.\n if (LegacyKernel::hasInstance()) {\n /** @var \\Closure $kernelClosure */\n $kernelClosure = $this->container->get('ezpublish_legacy.kernel');\n $this->eventDispatcher->dispatch(\n LegacyEvents::PRE_RESET_LEGACY_KERNEL,\n new PreResetLegacyKernelEvent($kernelClosure())\n );\n }\n\n LegacyKernel::resetInstance();\n $this->webHandler = null;\n $this->cliHandler = null;\n $this->restHandler = null;\n\n $this->container->set('ezpublish_legacy.kernel', null);\n $this->container->set('ezpublish_legacy.kernel.lazy', null);\n $this->container->set('ezpublish_legacy.kernel_handler.web', null);\n $this->container->set('ezpublish_legacy.kernel_handler.cli', null);\n $this->container->set('ezpublish_legacy.kernel_handler.rest', null);\n }",
"protected function tearDown()\r\n {\r\n if (null !== $this->kernel) {\r\n $this->kernel->shutdown();\r\n }\r\n }",
"public function tearDown()\n {\n while ($kernel = array_shift($this->kernelStack)) {\n $kernel->shutdown();\n }\n }",
"abstract protected function initializeBasicKernel();",
"public function kernel()\n {\n $this->kernelUpdatePost();\n }",
"function KDE_prepare()\n{\necho(\"\nexport DEBIAN_FRONTEND=noninteractive\\n\n\nrm /etc/rc2.d/S99kdm\\n\n\n\n#create device files to make the istaller quiet\n\nmknod /dev/raw1394 c 171 0 2> /dev/null\n\nchown root.disk /dev/raw1394\n\nchmod 660 /dev/raw1394\n\n\");\n}",
"function clean_up_global_scope() {\n\t\tglobal $wp_customize;\n\t\t$wp_customize = null;\n\t\tparent::clean_up_global_scope();\n\t}",
"public function cleanUsed()\r\n {\r\n $this->usedArrays = array();\r\n $this->usedConstants = array();\r\n $this->usedVariables = array();\r\n }",
"public function phpunit_static_acceleration_purge() {\n $this->static_acceleration_purge();\n }",
"protected function __del__() { }",
"public function __destruct()\n {\n $this->cleanTestEnv();\n }",
"protected function tearDown(): void\n {\n Container::$globalInstance = null;\n }",
"function shutdown_kdnw92j()\n {\n end_coverage_cav39s8hca(True);\n }",
"protected function decontext( ) { }",
"function lingotek_cleanup_batch_init(&$context) {\n // A stub function for now.\n return TRUE;\n}",
"protected function unsetHiddenModules() {}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation deleteNetworkWirelessSsidIdentityPskWithHttpInfo Delete an Identity PSK | public function deleteNetworkWirelessSsidIdentityPskWithHttpInfo($network_id, $number, $identity_psk_id)
{
$returnType = '';
$request = $this->deleteNetworkWirelessSsidIdentityPskRequest($network_id, $number, $identity_psk_id);
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
} | [
"public function deleteNetworkWirelessSsidIdentityPsk($network_id, $number, $identity_psk_id)\n {\n $this->deleteNetworkWirelessSsidIdentityPskWithHttpInfo($network_id, $number, $identity_psk_id);\n }",
"public function testDeleteNetworkWirelessSsidIdentityPsk()\n {\n }",
"protected function deleteNetworkWirelessSsidIdentityPskRequest($network_id, $number, $identity_psk_id)\n {\n // verify the required parameter 'network_id' is set\n if ($network_id === null || (is_array($network_id) && count($network_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $network_id when calling deleteNetworkWirelessSsidIdentityPsk'\n );\n }\n // verify the required parameter 'number' is set\n if ($number === null || (is_array($number) && count($number) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $number when calling deleteNetworkWirelessSsidIdentityPsk'\n );\n }\n // verify the required parameter 'identity_psk_id' is set\n if ($identity_psk_id === null || (is_array($identity_psk_id) && count($identity_psk_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $identity_psk_id when calling deleteNetworkWirelessSsidIdentityPsk'\n );\n }\n\n $resourcePath = '/networks/{networkId}/wireless/ssids/{number}/identityPsks/{identityPskId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($network_id !== null) {\n $resourcePath = str_replace(\n '{' . 'networkId' . '}',\n ObjectSerializer::toPathValue($network_id),\n $resourcePath\n );\n }\n // path params\n if ($number !== null) {\n $resourcePath = str_replace(\n '{' . 'number' . '}',\n ObjectSerializer::toPathValue($number),\n $resourcePath\n );\n }\n // path params\n if ($identity_psk_id !== null) {\n $resourcePath = str_replace(\n '{' . 'identityPskId' . '}',\n ObjectSerializer::toPathValue($identity_psk_id),\n $resourcePath\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 \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Cisco-Meraki-API-Key');\n if ($apiKey !== null) {\n $headers['X-Cisco-Meraki-API-Key'] = $apiKey;\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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function deleteNetworkWirelessSsidIdentityPskAsyncWithHttpInfo($network_id, $number, $identity_psk_id)\n {\n $returnType = '';\n $request = $this->deleteNetworkWirelessSsidIdentityPskRequest($network_id, $number, $identity_psk_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function deleteNetworkWirelessSsidIdentityPskAsync($network_id, $number, $identity_psk_id)\n {\n return $this->deleteNetworkWirelessSsidIdentityPskAsyncWithHttpInfo($network_id, $number, $identity_psk_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function deleteKeyPair($request);",
"public function getNetworkWirelessSsidIdentityPskWithHttpInfo($network_id, $number, $identity_psk_id)\n {\n $returnType = 'object';\n $request = $this->getNetworkWirelessSsidIdentityPskRequest($network_id, $number, $identity_psk_id);\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 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function createNetworkWirelessSsidIdentityPskWithHttpInfo($network_id, $number, $create_network_wireless_ssid_identity_psk)\n {\n $returnType = 'object';\n $request = $this->createNetworkWirelessSsidIdentityPskRequest($network_id, $number, $create_network_wireless_ssid_identity_psk);\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 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function delete() {\n return $this->deleteRequest(\n \"/application/shops/{$this->shop_id}/shipping-profiles/{$this->shipping_profile_id}\"\n );\n }",
"public function getNetworkWirelessSsidIdentityPsk($network_id, $number, $identity_psk_id)\n {\n list($response) = $this->getNetworkWirelessSsidIdentityPskWithHttpInfo($network_id, $number, $identity_psk_id);\n return $response;\n }",
"public function updateNetworkWirelessSsidIdentityPsk($network_id, $number, $identity_psk_id, $update_network_wireless_ssid_identity_psk = null)\n {\n list($response) = $this->updateNetworkWirelessSsidIdentityPskWithHttpInfo($network_id, $number, $identity_psk_id, $update_network_wireless_ssid_identity_psk);\n return $response;\n }",
"public function delete_identity($identity, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['Identity'] = $identity;\n\t\t\n\t\treturn $this->authenticate('DeleteIdentity', $opt);\n\t}",
"public function deleteKeyPair() {\n if (empty((string)$_POST['avcwpr_jwt_unique_id'])) {\n return;\n }\n\n $jwtkey = sanitize_key((string)$_POST['avcwpr_jwt_unique_id']);\n\n $opts = $this->getOpts();\n if (!isset($opts[self::JWTKEYS_OPT][$jwtkey])) {\n return;\n }\n\n unset($opts[self::JWTKEYS_OPT][$jwtkey]);\n update_option($this->optkey, $opts);\n }",
"public function getNetworkWirelessSsidIdentityPsksWithHttpInfo($network_id, $number)\n {\n $returnType = 'object';\n $request = $this->getNetworkWirelessSsidIdentityPsksRequest($network_id, $number);\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 'object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function createNetworkWirelessSsidIdentityPskAsyncWithHttpInfo($network_id, $number, $create_network_wireless_ssid_identity_psk)\n {\n $returnType = 'object';\n $request = $this->createNetworkWirelessSsidIdentityPskRequest($network_id, $number, $create_network_wireless_ssid_identity_psk);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\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 function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function updateNetworkWirelessSsidIdentityPskAsyncWithHttpInfo($network_id, $number, $identity_psk_id, $update_network_wireless_ssid_identity_psk = null)\n {\n $returnType = 'object';\n $request = $this->updateNetworkWirelessSsidIdentityPskRequest($network_id, $number, $identity_psk_id, $update_network_wireless_ssid_identity_psk);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\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 function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function sendDeleteSessionSettingsByID(ApiTester $I)\n {\n $I->sendDELETE($this->route.'/'.$this->userID[0]);\n $I->seeResponseCodeIs(204);\n }",
"public function deleteSecurityIdentity(SecurityIdentityInterface $sid)\n {\n $this->connection->executeQuery($this->getDeleteSecurityIdentityIdSql($sid));\n }",
"public function delPrivKey()\n {\n $user = Auth::user();\n $pgp = PGPkey::where([\n ['user_id', $user->id],\n ['type', '5'],\n ]);\n $pgp->delete();\n\n return response()->json([\n 'success' => true,\n 'message' => \"Huỷ khoá thành công\",\n ]);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches the type of the secondtolast state in the path | public function getParentStateType(); | [
"public function getEndStateType();",
"function getLastStation () {\n return $this->pathArray[$this->numSegments - 1]->m1;\n }",
"public function getLastNode()\n {\n return $this->secondPath->getLastNode();\n }",
"public function lastComponent() {\n\t\t\treturn pathinfo( $this->_path, PATHINFO_BASENAME );\n\t\t}",
"public abstract function GetLastOperationState();",
"public function stateType() {}",
"function getLastSwitch() {\n\t\treturn $this->data['INFO_LAST_SWITCH'];\n\t}",
"private function getPathType()\n {\n switch ($this->getType()) {\n case 'nested':\n $type = 'path';\n break;\n case 'parent':\n $type = 'type';\n break;\n default:\n $type = null;\n }\n return $type;\n }",
"protected function _getSecondType()\n {\n if (isset($this->pokemon_types) && !empty($this->pokemon_types)) {\n return collection($this->pokemon_types)\n ->extract('type.name')\n ->skip(1)\n ->first();\n }\n\n return 'normal';\n }",
"public function getLastPathSegment(){\n $path = $this->path;\n if(strrpos($path, '/') === false){\n return $path;\n }\n return substr($path, strrpos($path, '/') + 1, strlen($path));\n }",
"public function getEventualEndRenderableStatePath();",
"public function pathEndIdentifierType()\n {\n $end = $this->pathEnd();\n\n if (isset($end['id'])) {\n return self::TYPE_ID;\n }\n\n if (isset($end['name'])) {\n return self::TYPE_NAME;\n }\n\n return null;\n }",
"public function findLast($type = null)\n {\n $entities = $this->find($type, -1);\n\n return current($entities);\n }",
"public function getLastCallType()\n {\n return $this->lastCallType;\n }",
"function get_last_segment() {\n $uri = service('uri');\n $last = $uri->getSegments();\n\n return end($last);\n\t}",
"public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS];\n\t}",
"public function testFindLastVersionByType()\n {\n $node = $this->repository->findInLastVersion('root', 'fr', '2');\n $nodes = $this->repository->findLastVersionByType('2');\n\n $this->assertSameNode('fr', $node->getVersion(), '2', $nodes[NodeInterface::ROOT_NODE_ID]);\n }",
"public function getType(): PathTypeInterface;",
"public function getLastBase() {\n\n if (\n ($bases = $this->getBases())\n && (is_array($bases))\n )\n return $bases[intval(count($bases)-1)];\n //===\n\n\n return NULL;\n //===\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
show grades for the given class | function grades($class_id) {
$this->load->model("class_admin/gradebk_model");
$data['class_id'] = $class_id;
$data['classinfo'] = $this->admin_model->load_class_info($data['class_id']);
$student_id = $this->session->userdata('id');
$data['possible'] = $this->gradebk_model->get_possible_points($class_id);
$data['stud'] = $this->admin_model->load_student_info($student_id);
$data['stud_avg'] = $this->gradebk_model->get_student_avg($class_id, $student_id);
// pull program info for each item and add it to the same array
$grades = $this->admin_model->load_student_grades($class_id, $student_id);
foreach ($grades as $item) {
$item->prog_info = $this->admin_model->pull_prog($class_id, $item->prog_id);
}
$data['grades'] = $grades;
// append program info to programs
$p = $this->gradebk_model->get_programs($class_id);
$programs = array();
foreach ($p as $item) {
$x = explode('_', $item); // extract prog_id
$y = new stdClass(); // template
$y->prog_info = $this->tc_model->load_prog_info($class_id, $x[1]); // pull data
// echo "<hr /><h2>Extracting from class: {$class_id} prog_id: {$x[1]}</h2>";
if ( is_array($y->prog_info) ) {
$y->prog_info = $y->prog_info[0];
}
// var_dump($y->prog_info); echo '<br />----------<br />';
$y->prog_info->session = $this->tc_model->load_session_info($class_id, $y->prog_info->session_id);
if (is_array($y->prog_info->session)) {
$y->prog_info->session = $y->prog_info->session[0];
}
// var_dump($y->prog_info->session); echo '<hr />';
if (!empty($y->prog_info->e_points) || !empty($y->prog_info->s_points)) {
$y->prog_info->possible = $y->prog_info->c_points +
$y->prog_info->s_points +
$y->prog_info->d_points +
$y->prog_info->e_points;
}
$y->prog_info->deadline = date("F j, Y", strtotime($y->prog_info->session->late)); //." - ".date("H:i", strtotime($y->prog_info->session->late)) ;
if ($y->prog_info->graded == 1) {
$y->prog_info->graded = "yes";
} else {
$y->prog_info->graded = "no";
}
$programs[] = $y; // replace with real data
}
//var_dump($programs); //die();
$data['programs'] = & $programs;
$data['main_content'] = 'stud/grades';
$this->load->view('includes/template', $data);
} | [
"public function printGrades(){\t\r\n\t\t\t\techo \"Grades are ... <br/>\";\r\n\t\t\t\tforeach($this->grades as $gradeKey=>$grade){\r\n\t\t\t\techo \"course {$this->courses[$gradeKey]} and grade {$grade} <br/>\";\r\n\t\t\t\t}\r\n\t\t\t}",
"function show_classes( $psid )\n{\n\n\t$info = unserialize ( $_SESSION['info'] );\n\t$name = $info->getName();\n\n\t//student\n\n\t$course = file(\"courses.txt\");\n\t$coursesTaken = array();\n\tfor ($i = 0; $i < count($course); $i++):\n\n\t\t$courseInfo = explode( \":\", $course[$i] );\n\t\n\t\tif ( $psid == $courseInfo[3] ):\n\t\t\n\t\t\tarray_push( $coursesTaken, $course[$i] );\n\t\n\t\tendif;\n\n\tendfor;\n\n\t$arrayObject = new ArrayObject( $coursesTaken );\n\tmergesort( $coursesTaken , 'sortByNumber' );\n\n\tmergesort( $coursesTaken , 'sortByAlphabet' );\n\n\tmergesort( $coursesTaken , 'sortByTerm' );\n\techo \"<br/>Here are the classes taken, with the respective grades:<br/>\";\n\n\tfor ($i = 0; $i < count($coursesTaken) ; $i++):\n\n\t\t$studentInfo = explode( \":\" ,$coursesTaken[$i] );\n\t\techo \"Term: $studentInfo[2] Class: $studentInfo[0]$studentInfo[1] Grade: $studentInfo[4]<br/>\";\n\n\tendfor;\n\n\treturn $coursesTaken;\n\t\t\n}",
"public function print_students(){\n\t\t$student_statement = $this->elite_db_connection->prepare('SELECT s.student_id, s.student_fname, s.student_lname, s.student_email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(SELECT ROUND(AVG(scg.grade), 2)\n\t\t\t\t\t\t\t\t\t\t\t FROM student_class_grades scg\n\t\t\t\t\t\t\t\t\t\t\t WHERE scg.student_id = s.student_id AND scg.class_id = ?) as grade\n\t\t FROM enrollment e\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tJOIN student s ON s.student_id = e.student_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE e.class_id = ?\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ORDER BY s.student_lname, s.student_fname');\n\t\t$student_statement->bind_param('ii', $this->id, $this->id);\n\t\t$student_statement->bind_result($student_id, $student_first, $student_last, $student_email, $grade);\n\t\t$student_statement->execute();\n\t\t$student_statement->store_result();\n\t\t\n\t\tif($student_statement->num_rows > 0){\n\t\t\twhile($student_statement->fetch()){\n\t\t\t\techo \"\\r\\n<tr>\";\n\t\t\t\techo \"\\r\\n <td>\" . $student_id . \"</td>\";\n\t\t\t\techo \"\\r\\n <td>\" . $student_last . \", \" . $student_first . \"</td>\";\n\t\t\t\techo \"\\r\\n <td>\" . $student_email . \"</td>\";\n\t\t\t\techo \"\\r\\n <td>\". $grade . ($grade != null ? \"%\" : \"N/A\") . \"</td>\";\n\t\t\t\techo \"\\r\\n</tr>\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\techo \"\\r\\n<tr><td colspan='4'>No Students Enrolled</td></tr>\";\n\t\t}\n\t}",
"function update_all_class_grades($classgrades = array()) {\n global $CURMAN;\n\n if (isset($this->course) && (get_class($this->course) == 'course')) {\n $elements = $this->course->get_completion_elements();\n } else {\n $elements = false;\n }\n\n $timenow = time();\n\n if (!empty($elements)) {\n // for each student, find out how many required completion elements are\n // incomplete, and when the last completion element was graded\n $sql = \"SELECT s.*, grades.incomplete, grades.maxtime\n FROM {$CURMAN->db->prefix_table(STUTABLE)} s\n JOIN (SELECT s.userid, COUNT(CASE WHEN grades.id IS NULL AND cc.required = 1 THEN 1\n ELSE NULL END) AS incomplete,\n MAX(timegraded) AS maxtime\n FROM {$CURMAN->db->prefix_table(STUTABLE)} s\n JOIN {$CURMAN->db->prefix_table(CRSCOMPTABLE)} cc\n ON cc.courseid = {$this->courseid}\n LEFT JOIN {$CURMAN->db->prefix_table(CLSGRTABLE)} grades\n ON grades.userid = s.userid\n AND grades.completionid = cc.id\n AND grades.classid = {$this->id}\n AND grades.grade >= cc.completion_grade\n WHERE s.classid = {$this->id} AND s.locked = 0\n GROUP BY s.userid\n ) grades ON grades.userid = s.userid\n WHERE s.classid = {$this->id} AND s.locked = 0\";\n $rs = get_recordset_sql($sql);\n if ($rs) {\n while ($rec = rs_fetch_next_record($rs)) {\n if ($rec->incomplete == 0 && $rec->grade > 0 &&\n $rec->grade >= $this->course->completion_grade) {\n $student = new student($rec, $this, null);\n $student->completestatusid = STUSTATUS_PASSED;\n $student->completetime = $rec->maxtime;\n $student->credits = $this->course->credits;\n $student->locked = 1;\n $student->complete();\n }\n }\n }\n } else {\n /// We have no completion elements so just make sure the user's grade is at least the\n /// minimum value required for the course.\n\n /// Get all unlocked enrolments\n $select = \"classid = {$this->id} AND locked = 0\";\n $rs = get_recordset_select(STUTABLE, $select, 'userid');\n if ($rs) {\n while ($rec = rs_fetch_next_record($rs)) {\n if ($rec->grade > 0 && $rec->grade >= $this->course->completion_grade) {\n $student = new student($rec, $this, null);\n $student->completestatusid = STUSTATUS_PASSED;\n $student->completetime = $timenow;\n $student->credits = $this->course->credits;\n $student->locked = 1;\n $student->complete();\n }\n }\n }\n }\n }",
"public function getAllGrades()\n {\n $restult = $this->db\n ->query(\"SELECT DISTINCT grade FROM class c\")\n ->result_array();\n\n return $restult;\n }",
"public function getClassByGradeLevel()\n {\n\n \t$gradelevel_id = $this->input->post('id');\n\n $query = $this->schoolclass_model->GetClassByGradeLevel($gradelevel_id);\n \n $classes[\"-1\"]=\"Select Class\";\n \n $options = '<option value=\"All\" selected>All Classes/Groups</option>';\n\n if($query){\n\t\t\tforeach($query as $row){\n \t$options .= '<option value=\"' . $row->id . '\">'.$row->title.'</option>';\n \t}\n\n \techo $options;\n }\n else{\n \techo $options;\n \t}\n }",
"public function get_grades() {\n return $this->grades;\n }",
"function index() {\n $courses = Course::all();\n $classes = $this->classes;\n $this->showTemplate('grade.index', compact('classes', 'courses'));\n }",
"public function gradeExam() {\n $data = $this->loadResults();\n // do grading\n $this->dData = $data;\n if (isset($this->input[\"m\"])) {\n $m = $this->input[\"m\"];\n if ($m == \"done\")\n $this->dData[\"message\"] = \"There are no more of that question to grade.\";\n else if ($m == \"checkin\")\n $this->dData[\"message\"] = \"Ungraded questions checked in.\";\n else if ($m == \"submitall\")\n $this->dData[\"message\"] = \"Any unsubmitted assessments have been submitted.\";\n }\n\n return $this->display(\"gradehome\");\n }",
"public function getClassGpa() :string\n {\n if (!is_array($this->grades[0])) {\n throw new Exception(\"Invalid grades\");\n }\n\n $grades = [];\n $gradeVals = [];\n $gpa = \"\";\n\n foreach ($this->grades as $studentGrades) {\n $gpa = new Gpa($studentGrades);\n $grades[] = $gpa->getStudentGpa();\n }\n \n foreach ($grades as $grade) {\n $gradeVals[] = array_search($grade, $this->gradeOrder) + 1;\n }\n\n return $this->gradeOrder[round(array_sum($gradeVals) / count($gradeVals)) - 1];\n }",
"public function getGrades()\n {\n return $this->getActiveSemester()->grades;\n }",
"public function ShowCoursesFromClass($class_id)\n\t{\n\t\t$class = find($class_id);\n\t\t$section_id = $class->section_id;\n\t\t//Gets the number of students in a particualr section\n\t\t$studentcount = User::where('section_id', '=', $section_id)->count();\n\t\t//Gets the coursessions for a particular course\n\t\t$courses = coursesession::where('class_id', '=', $class_id)->get();\n\n\t\treturn View::make('admin.classcourses',array('class'=>$class,'studentcount'=>$studentcount,'courses'=>$courses));\n\t}",
"function print_student_grade($user, $course) {\n \n global $CFG;\n \n if (!empty($user)) {\n $grades[$user->id] = array(); // Collect all grades in this array\n $gradeshtml[$user->id] = array(); // Collect all grades html formatted in this array\n $totals[$user->id] = array(); // Collect all totals in this array\n }\n \n $strmax = get_string(\"maximumshort\");\n /// Collect modules data\n get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);\n\n/// Search through all the modules, pulling out grade data\n $sections = get_all_sections($course->id); // Sort everything the same as the course\n \n // prints table\n\n // flag for detecting whether to print table header or not\n $nograde = 0;\n \n for ($i=0; $i<=$course->numsections; $i++) {\n if (isset($sections[$i])) { // should always be true\n $section = $sections[$i];\n if ($section->sequence) {\n $sectionmods = explode(\",\", $section->sequence);\n foreach ($sectionmods as $sectionmod) {\n \n $mod = $mods[$sectionmod];\n if (empty($mod->modname)) {\n continue; // Just in case, see MDL-7150\n }\n if (!$instance = get_record($mod->modname, 'id', $mod->instance)) {\n continue;\n }\n if (!$cm = get_coursemodule_from_instance($mod->modname, $mod->instance)) {\n continue;\n }\n if (!$cm->visible) {\n $modcontext = get_context_instance(CONTEXT_MODULE, $cm->id);\n if(!has_capability('moodle/course:viewhiddenactivities', $modcontext)) {\n continue;\n }\n }\n $libfile = \"$CFG->dirroot/mod/$mod->modname/lib.php\"; \n \n if (file_exists($libfile)) {\n require_once($libfile);\n $gradefunction = $mod->modname.'_grades';\n if (function_exists($gradefunction)) { // Skip modules without grade function\n if ($modgrades = $gradefunction($mod->instance)) {\n if (!empty($modgrades->maxgrade)) {\n if ($mod->visible) {\n $maxgrade = $modgrades->maxgrade;\n } else {\n $maxgrade = $modgrades->maxgrade;\n }\n } else {\n $maxgrade = '';\n }\n \n if ($maxgrade) { \n if (!$nograde) {\n echo ('<table align=\"center\" class=\"grades\"><tr><th scope=\"col\">'.get_string('activity').'</th><th scope=\"col\">'.get_string('yourgrade','grades').'</th><th scope=\"col\">'.get_string('maxgrade','grades').'</th></tr>');\n }\n $nograde++; \n \n $link_id = grade_get_module_link($course->id, $mod->instance, $mod->module);\n $link = $CFG->wwwroot.'/mod/'.$mod->modname.'/view.php?id='.$link_id->id;\n\n echo '<tr>';\n if (!empty($modgrades->grades[$user->id])) {\n $currentgrade = $modgrades->grades[$user->id];\n echo \"<td><a href='$link'>$mod->modfullname: \".format_string($instance->name,true).\"</a></td><td>$currentgrade</td><td>$maxgrade</td>\"; \n } else {\n echo \"<td><a href='$link'>$mod->modfullname: \".format_string($instance->name,true).\"</a></td><td>\".get_string('nograde').\"</td><td>$maxgrade</td>\"; \n }\n echo '</tr>'; \n }\n }\n }\n }\n }\n }\n }\n } // a new Moodle nesting record? ;-)\n \n if ($nograde) {\n echo '</table>';\n }\n}",
"private function overall($classGradeSummaries)\n {\n $count = 0;\n $total = 0;\n $totalAttemptedCredits = 0;\n\n $classAverageTotal = 0;\n foreach ($classGradeSummaries as $classGradeSummary) {\n $count += 1;\n $sectionId = $classGradeSummary[C::SECTION_ID];\n $credits = Section::find($sectionId)->course()->get()[0]->credits;\n\n $totalAttemptedCredits += $credits;\n $classAverage = $classGradeSummary[C::AVERAGE];\n\n $letterGrade = $this->gradeToLetter($classAverage);\n\n $gradePoint = $this->letterToGradePoint($letterGrade, $credits);\n $total += $gradePoint;\n $classAverageTotal += $classAverage;\n }\n\n $gpa = $totalAttemptedCredits > 0 ? (float)$total / $totalAttemptedCredits : 0;\n $totalAverage = $count > 0 ? (float)$classAverageTotal / $count : 0;\n\n return [C::AVERAGE => $totalAverage, C::SEMESTER_GPA => $gpa];\n }",
"public function render($grade)\n {\n if ($grade >= 90) {\n return 'Sehr empfehlenswert';\n } else if ($grade >= 70) {\n return 'Empfehlenswert';\n } else if ($grade >= 50) {\n return 'Befriedigend';\n } else {\n return 'Ausreichend';\n }\n }",
"public function StudentSectionAssign($class = -1) {\n $this->load->model('core/core', 'dbobj');\n $sectionList = $this->dbobj->GetAllSection();\n $this->load->view('staff/student_view/studentsectionassign_view', array(\"class\" => $class, \"sectionList\" => $sectionList));\n }",
"public function getHighGrade();",
"public function viewClass() {\r\n Auth::checkAuthentication();\r\n $teacherID = Session::get('user_id');\r\n $isTeacher = AccountModel::isTeacher(Session::get('user_role'));\r\n $classID = Request::get('classID');\r\n if (isset($teacherID) && isset($isTeacher) && isset($classID)) {\r\n if ($isTeacher) {\r\n if (ClassModel::isClassTaughtByTeacher($classID, $teacherID)) {\r\n $allStudentsInClassProgress = ClassModel::getAllStudentsInClassProgress($classID);\r\n $className = ClassModel::getClassName($classID, $teacherID);\r\n $allStudentsInClassProgress[\"className\"] = $className;\r\n $this->View->render('class/viewClass', $allStudentsInClassProgress);\r\n } else {\r\n Redirect::to(\"error/index\");\r\n }\r\n } else {\r\n Redirect::to(\"error/index\");\r\n }\r\n } else {\r\n Redirect::to(\"error/index\");\r\n }\r\n }",
"public function getGrade()\n {\n return $this->grade;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the name to a rank number. | public static function getRankName($rank) {
switch($rank) {
case 0: return "Guild Master";
case 1: return "Bank";
case 2: return "minimalist";
case 3: return "trialist";
case 4: return "Koeh der Woche";
case 5: return "Chef de Cuisine";
case 6: return "Kimi";
case 7: return "Community";
case 8: return "ProgressBremse";
case 9: return "rank 10";
}
} | [
"abstract protected function getRankingName();",
"public function getRank(): string\n {\n return ($this->face_up ? $this->rank : ' ');\n }",
"public function getFormattedRank()\n\t{\n\t\treturn fNumber($this->getRank());\n\t}",
"public function getRankstr() {\n return $this->get(self::RANKSTR);\n }",
"public function getNom_rank()\n {\n return $this->nom_rank;\n }",
"public function rankName($id)\n\t{\n\t\t$user = User::find($id);\n\t\t$rank = $user->roles->first()->name;\n\n\t\treturn $rank;\n\t}",
"public function getRank();",
"public static function getRank(string $name): string {\n $check = DB::checkUser($name);\n if ($check === true) {\n $lowername = strtolower($name);\n $query = self::$db->query(\"SELECT rank FROM users WHERE username='\" . self::$db->real_escape_string($name) . \"'\");\n $result = $query->fetch_array();\n $query->free();\n $check = in_array($result[0], self::$ranklist);\n if ($check !== true) {\n return \"ERROR\";\n }\n return $result[0];\n }\n return \"ERROR\";\n }",
"public function getRankIndex($name){\n\t\tif($name===\"default\")\n\t\t\t$name=$this->ranks->get(\"default\");\n\t\treturn $this->ranks->get($name);\n\t}",
"public function getRank(): int\n {\n return self::RANK[$this->value];\n }",
"public function getRank()\n {\n return $this->rank;\n }",
"public function get_rank()\n {\n return $this->_rank;\n }",
"public function getRank(Player $p){\n\t\tforeach($this->ranks->getAll() as $rank=>$names){\n\t\t\tif(in_array(strtolower($p->getName()), $names))\n\t\t\t\treturn $rank;\n\t\t}\n\t\treturn \"player\";\n\t}",
"public function display_rank() {\n\t\treturn $this->Rank->display();\n\t}",
"public function get_rank() {\n if(!$this->_rank_cache) {\n // If we dont have their rank stored in our cache, search for it in the DB\n $this->db->where('user_id', $this->id);\n // Get their rank from the user_ranks table.\n $query = $this->db->get('user_ranks', 1);\n // If there is no result, return them as a user.\n if($query->num_rows() == 0){\n return 'user';\n }\n // Get the result and then add it to the rank cache\n $result = $query->result_array();\n $row = $result[0];\n $this->_rank_cache = $row['rank'];\n }\n // return the rank cache.\n return $this->_rank_cache;\n }",
"public function getRank()\n\t{\n\t\tif(!$this->exists(\"rank\"))\n\t\t{\n\t\t\t$where = \"(`username` < ? AND `points` >= {points}) OR `points` > {points}\";\n\t\t\t$where = str_replace(\"{points}\", (float) $this->get(\"points\", 0), $where);\n\t\t\t$result = Core::getQuery()->select(\"user\", array(\"COUNT(`userid`)+1 AS rank\"), \"\", $where, \"\", 1, \"\", \"\", array($this->get(\"username\")));\n\t\t\t$this->set(\"rank\", (int) $result->fetchColumn());\n\t\t\t$result->closeCursor();\n\t\t}\n\t\treturn $this->get(\"rank\");\n\t}",
"public function getRank(Player $player) : string\n\t{\n \t\t$name = $player->getName();\n \t\t$result = $this->main->db->query(\"SELECT rank FROM elo WHERE name = '$name';\");\n \t\treturn $result->fetchArray(SQLITE3_ASSOC)[\"rank\"];\n\t}",
"public function getRankName($id) {\n switch ($id) {\n case -1: return \"users.rank.visitor\";\n case 0: return \"users.rank.moderator\";\n case 1: return \"users.rank.admin\";\n case 2: return \"users.rank.user\";\n default: return \"users.rank.unknown\";\n }\n }",
"public function getRank()\n {\n return $this->sortable_rank;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets endpoint remote handler. The handler will be used for readability data computation. Used in tests. | public function set_remote_handler( $request ) {
$this->_endpoint_remote_handler = $request;
} | [
"public function setHandler($handler);",
"protected function setHandler()\n {\n $this->handlerStack->setHandler($this->mocker);\n\n // create client and pass handler\n $this->httpClient = new Client(['handler' => $this->handlerStack]);\n\n $this->exportToExampleService->setClient($this->httpClient);\n }",
"public function setEndpoint($endpoint) {\n $this->endpoint = $endpoint;\n }",
"function setEndpoint($endpoint) {\n\t\t$this->debug(\"setEndpoint(\\\"$endpoint\\\")\");\n\t\t$this->forceEndpoint = $endpoint;\n\t}",
"function set_endpoint($method, $endpoint){\r\r\n\t\t// status\r\r\n\t\tif($endpoint) $this->end_points[$method] = $endpoint;\t\r\r\n\t}",
"public function setHandler($handler)\n {\n $this->m_handler = $handler;\n }",
"public function setHandle($handler)\n {\n $this->handler = $handler;\n }",
"public function setEndpoint($endpoint)\n\t{\n\t\t$this->endpoint = $endpoint;\n\t\tcurl_setopt($this->_ch, CURLOPT_URL, $this->url.$endpoint);\n\t}",
"public function setEndpoint(Endpoint $endpoint);",
"public function setDefaultEndpoint($endpoint);",
"public function setDefaultEndpoint($endpoint): self;",
"private function setEndpoint(): void\n {\n // Right trim the last '/' so even if the user sets this in the config we still get the correct url\n $url = rtrim(Config::get('gitlab-merge-requests.gitlab_url'), '/');\n $url .= '/api/';\n $url .= Config::get('gitlab-merge-requests.api_version');\n\n $this->endpoint = $url;\n }",
"protected function _endpoint() {\n\t\t\n\t\t$this->_endpoint = $this->_endpoints[$this->_environment];\n\t}",
"private function setEndpoint($endpoint)\n\t {\n\t \tif(!$this->validUrl($endpoint)) {\n\n\t \t throw new Exception('Invalid endpoint provided');\n\n\t \t}\n\n\t \t$this->endpoint = $endpoint;\n\t }",
"public function endpoint() {\n if (!isset($this->endpoint)) {\n $types = rules_web_remote_get_types();\n $this->endpoint = new $types[$this->type]['class']($this);\n }\n return $this->endpoint;\n }",
"protected function registerHandler()\n {\n $this->app->singleton('ductible.client.handler', function ($app) {\n $handler = $app->make('config')->get('ductible.handler');\n\n return (in_array($handler, ['default', 'single', 'multi']))\n ? ClientBuilder::{$handler.'Handler'}()\n : $app->make($handler);\n });\n }",
"public function setAuthorizationHandler($handler)\n {\n $this->authorizationHandler = $handler;\n }",
"public function setNext(Handler $handler): Handler;",
"public static function setDefaultHandler($handler): void\n {\n static::$defaultHandler = $handler;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the position of the previous record. | public function getPrevPosition()
{
$object = $this->getInvoker();
$q = $object->getTable()->createQuery();
$q->select($this->_options['name']);
$q->orderBy($this->_options['name'] . ' desc');
$q->addWhere($this->_options['name'] . ' < ?', $object->get($this->_options['name']));
foreach($this->_options['uniqueBy'] as $field)
{
if(is_object($object[$field]))
{
$q->addWhere($field . ' = ?', $object[$field]['id']);
}
else
{
$q->addWhere($field . ' = ?', $object[$field]);
}
}
$prev = $q->limit(1)->fetchOne();
$position = $prev ? $prev->get($this->_options['name']) : 0;
return (int) $position;
} | [
"public function getPreviousRecordID()\n {\n return $this->getAdjacentRecordID(-1);\n }",
"public function getPreviousOffset()\n {\n return $this->_pageOffset( $this->getPreviousPage() );\n }",
"public function getPreviousCursor()\n {\n return $this->getCursor('before');\n }",
"private function getPreviousRecordUid() {\n\t\treturn $this->getRecordAtPosition($this->piVars['recordPosition'] - 1);\n\t}",
"public function getPreviousRecord()\n {\n if ($this->hasPreviousRecord()) {\n return $this->records[--$this->recordIndex];\n }\n return null;\n }",
"public function previous()\n\t{\n\t\t$value = prev( $this->storage );\n\n\t\t$this->position = key( $this->storage );\n\n\t\treturn $value;\n\t}",
"public function previousRecord();",
"public function prevItem() {\n\t\tif ($this->isFirst()) return null;\n\t\t$position = $this->_position_col();\n\t\treturn $this->_scoped()\n\t\t\t\t\t->where($position, '<', $this->{$position})\n\t\t\t\t\t->orderBy($position, 'desc')->limit(1)\n\t\t\t\t\t->get()->first();\n\t}",
"function get_previous()\n {\n if (!$this->person) {\n return null;\n }\n $qb = org_routamc_positioning_log_dba::new_query_builder();\n $qb->add_constraint('person', '=', (int)$this->person);\n $qb->add_constraint('date', '<=', (int)$this->date);\n $qb->add_order('date', 'DESC');\n $qb->set_limit(1);\n $matches = $qb->execute_unchecked();\n if (count($matches) > 0) {\n return $matches[0];\n }\n return null;\n }",
"public function previousPageOffset(): int\n {\n return $this->offsetForPage(max($this->currentPage() - 1, 1));\n }",
"public function prev_entry()\n\t{\n\t\treturn $this->_prev_next('prev');\n\t}",
"public function previousPageOffset(): int;",
"public function getPrevPageOffset()\r\n {\r\n return $this->prevPageOffset;\r\n }",
"public function prev() {\n\t\t\tif ($this->intCursor > 0) {\n\t\t\t\t$this->intCursor--;\n\t\t\t\treturn $this->current();\n\t\t\t} else {\n\t\t\t\t$this->intCursor = -1;\n\t\t\t}\n\t\t}",
"private function getPrev() {\n return $this->tokenCollection->offsetGet ($this->tokenIterator->key () - 1);\n }",
"public function previousPage() {\n\n $previousPage = $this->pageCursor - 1;\n\n if (($previousPage) < 1) {\n return (int) $this->pageCursor;\n }\n\n $this->pageCursor = (int) $previousPage;\n\n return $this->pageCursor;\n }",
"public function getPrev()\n {\n return $this->prev;\n }",
"public function prev() {\n\t\treturn $this->getState(-1);\n\t}",
"public function getPrevious() {\n\t\t$previousIteratorPosition = $this->iteratorPosition - 1;\n\t\tif($previousIteratorPosition >= 0) {\n\t\t\treturn $this->dates[$previousIteratorPosition];\n\t\t}\n\t\treturn null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get queued status text. | public function get_queued_status() {
return '';
} | [
"public function getQueuedStateText(): string\n {\n return match ((int) $this->getAttribute('queue_state')) {\n Manager::QUEUE_NA => '',\n Manager::QUEUE_DONE => 'done',\n Manager::QUEUE_WAITING => 'waiting',\n Manager::QUEUE_WORKING => 'working',\n default => 'unknown',\n };\n }",
"protected function getQueueState(): string\n {\n return $this->manager->getQueuedStateText();\n }",
"public function getStatusText()\n {\n return $this->_status_text;\n }",
"public function getStatusText()\n\t{\n\t\t$statusOptions=$this->statusOptions;\n\t\treturn isset($statusOptions[$this->status]) ?\n\t\t$statusOptions[$this->status] : \"unknown status ({$this->status})\";\n\t}",
"public function getStatusText()\n {\n return static::$status_phrases[$this->status_code];\n }",
"public function status() {\n\t\t$info = $this->getStatus();\n\t\t$this->out('Queue size: ' . $info['queue_size']);\n\t\t$this->out('Last Task Completed: ' . $info['last_task_completed']);\n\t}",
"public function getStatusText() {\n return $this->_statusText;\n }",
"public function getStatusMessage()\n {\n return $this->statuses[$this->status];\n }",
"public function getTaskQueueStatus()\r\n {\r\n $this->curl->makeGet($this->aelfClientUrl . self::$WA_GETTASKQUEUESTATUS);\r\n $success = $this->curl->exec();\r\n if ($success->hasError()) {\r\n //Fail\r\n var_dump($success->getError());\r\n } else {\r\n //Success\r\n return json_decode($success->getBody(), JSON_UNESCAPED_UNICODE);\r\n\r\n }\r\n\r\n }",
"public function getStatusText() {\n return $this->status_code_text;\n }",
"public function getQueueStatus();",
"public function getStatusText()\n {\n return $this->statusText;\n }",
"public function getStatusText()\n {\n switch ($this->getStepStatus()) {\n case Step::MODULE_STATUS_OPEN:\n return CONST_NOT_PROCESSED;\n case 1:\n return CONST_PROCESSED;\n case STEP::MODULE_STATUS_FINISHED:\n return CONST_SYSTEM_ACTIVITY_COMPLETED;\n default:\n return '';\n }\n }",
"protected function _getSyncStatusText()\n {\n /** @var $mailigenSchedule Mailigen_Synchronizer_Model_Schedule */\n $mailigenSchedule = Mage::getSingleton('mailigen_synchronizer/schedule');\n\n if ($mailigenSchedule->getLastRunningJob()) {\n $html = \"Running\";\n if (strlen($mailigenSchedule->getLastRunningJob()->getExecutedAt())) {\n $html .= ' (Started at: ';\n $html .= Mage::helper('core')->formatDate($mailigenSchedule->getLastRunningJob()->getExecutedAt(), 'medium', true);\n $html .= ') ';\n\n /**\n * Show stop sync button\n */\n $html .= $this->_getStopSyncButton();\n }\n }\n elseif ($mailigenSchedule->getLastPendingJob()) {\n $html = \"Pending\";\n if (strlen($mailigenSchedule->getLastPendingJob()->getScheduledAt())) {\n $html .= ' (Scheduled at: ';\n $html .= Mage::helper('core')->formatDate($mailigenSchedule->getLastPendingJob()->getScheduledAt(), 'medium', true);\n $html .= ')';\n }\n }\n else {\n $html = \"Not scheduled\";\n /**\n * Show reset sync customers button\n */\n }\n\n return $html;\n }",
"protected static function get_queue_status() {\n\t\t$filter = new QueryFilter();\n\t\t$filter->where( 'status', Operators::NOT_EQUALS, QueueItem::COMPLETED );\n\n\t\treturn self::get_entities( QueueItem::CLASS_NAME, $filter );\n\t}",
"function statusMessage() {\n return \"The {$this->processor_status} Platform.sh event <em>{$this->event_type}</em> was {$this->sent_status}.\";\n }",
"public function getStatusAsString(): string\n {\n return $this->statues[$this->status];\n }",
"public function presentStatusText(){\n if($this->isDeleted()) {\n return PostPresenter::STATUS_TRASHED_TEXT;\n }\n\n switch(intval($this->status_id)){\n case Post::STATUS_PUBLISHED:\n if($this->isPublished()){\n return PostPresenter::STATUS_PUBLISHED_TEXT;\n } else {\n return PostPresenter::STATUS_PUBLISH_PENDING_TEXT;\n }\n break;\n case Post::STATUS_CONTENT_READY:\n return PostPresenter::STATUS_CONTENT_READY_TEXT;\n break;\n case Post::STATUS_DRAFT:\n return PostPresenter::STATUS_DRAFT_TEXT;\n break;\n default:\n return PostPresenter::STATUS_TRASHED_TEXT;\n break;\n }\n }",
"public function getStatusTextAttribute()\n {\n return isset(static::$statusTextMap[$this->Status]) ? static::$statusTextMap[$this->Status] : \"Unknown\";\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Form validation handler for city_form(). | function city_form_validate($form, &$form_state) {
if ($form_state['values']['title'] == '') {
form_set_error('title', t('You must set \'City name\''));
}
if ($form_state['values']['geoname_id'] == '') {
form_set_error('geoname_id', t('You must set \'Geoname ID\''));
} elseif (strcmp((int) $form_state['values']['geoname_id'], $form_state['values']['geoname_id'])) {
form_set_error('geoname_id', t('You must set \'Geoname ID\' type integer'));
}
if($form_state['values']['parent_id']){
if ((isset($form_state['city']->id)) && ($form_state['city']->id == $form_state['values']['parent_id'])) {
form_set_error('parent_city', t('You must changing \'Parent city\', recursion'));
} elseif (!city_load($form_state['values']['parent_id'])) {
form_set_error('parent_city', t('You must changing \'Parent city\', parent city not exist'));
}
}
} | [
"public function validate_city(){\n\t\t\t\n\t\t\t//obtain posted value\n\t\t\t$city = $this->input->post('city');\n\t\t\t\n\t\t\t//check if selected or default\n\t\t\tif ($city == '0')\n\t\t\t{\n\t\t\t\t//no city selected\n\t\t\t\t$this->form_validation->set_message('validate_city', 'Please select a city!');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}",
"private function validateCity($city)\n {\n $this->result[\"city_err\"] = \"\";\n if (empty($city)) {\n $this->result[\"city_err\"] = \"City is Required\";\n }\n }",
"function culturefeed_entry_ui_location_form_validate(array $form, array &$form_state) {\n\n $values = array(\n 'type' => '',\n 'asset' => array(),\n 'custom' => array(),\n );\n\n if (isset($form_state['values']['location']['location_control'])) {\n $values = $form_state['values']['location']['location_control'];\n }\n\n $location = NULL;\n\n // Custom.\n if ($values['type'] == 'custom') {\n\n \n if (empty($values['custom']['title'])) {\n form_set_error('location][location_control][custom][title', t('A title is required for a custom location'));\n }\n \n if ($values['custom']['country'] != 'BE') {\n if (empty($values['custom']['zip'])) {\n form_set_error('location][location_control][custom][zip', t('A zip code is required for a custom location'));\n }\n \n if (strlen($values['custom']['zip']) < 4 || strlen($values['custom']['zip']) > 15) {\n form_set_error('location][location_control][custom][zip', t('A zip code has minimum 4 characters'));\n }\n \n if (empty($values['custom']['city'])) {\n form_set_error('location][location_control][custom][city', t('A city is required for a custom location'));\n }\n \n }\n\n if ($values['custom']['country'] == 'BE') {\n\n // If an existing event is edited, the main city is not shown.\n $available_cities = culturefeed_search_get_city_suggestions($values['custom']['city']);\n $cities = array();\n $pattern = '/ \\(.*?\\)/';\n foreach ($available_cities as $available_city) {\n $cities[] = strtolower(preg_replace($pattern, '', $available_city));\n }\n $city = strtolower(preg_replace($pattern, '', $values['custom']['city']));\n if (!in_array($city, $cities)) {\n form_set_error('location][location_control][custom][city', t('Please select a city from the list.'));\n }\n\n }\n\n }\n\n elseif ($values['type'] == 'asset') {\n\n try {\n\n if ($values['asset']['label'] == '') {\n form_set_error('location', t('A location is required.'));\n }\n else {\n $location = culturefeed_search_item_load($values['asset']['id'], 'actor');\n if (!$location) {\n form_set_error('location', t('We could not validate the location'));\n }\n }\n\n }\n\n catch (Exception $e) {\n form_set_error('location', t('We could not validate the location'));\n }\n\n }\n\n return $location;\n\n}",
"public static function validateCity($args)\n\t{\n\t\treturn self::validator($args, array('city_name', 'city_2_code'));\n\t}",
"function forschungsatlas_admin_institution_form_validate($form, &$form_state) {\n // Validate City\n $result = forschungsatlas_get_city_name($form_state['values']['cid']);\n if (!$result) {\n watchdog('security', 'Possible SQL injection attempt! An illegal choice has been detected: CID.', array(), WATCHDOG_ALERT);\n form_set_error('cid', t('The server was unable to process the request due to an internal error.'));\n }\n $form_state['NEFO']['cityname'] = $result;\n // Validate Federal State\n $result = forschungsatlas_get_federal_state_values($form_state['values']['fsid']);\n if (!$result) {\n watchdog('security', 'Possible SQL injection attempt! An illegal choice has been detected: FSID.', array(), WATCHDOG_ALERT);\n form_set_error('fsid', t('The server was unable to process the request due to an internal error.'));\n }\n $form_state['NEFO']['fsname'] = $result['name'];\n // Validate Postal Code\n if (!forschungsatlas_validate_postalcode($form_state['values']['postalcode'])) {\n form_set_error('postalcode' , t('The postal code must be a 5-digit German zip code.'));\n }\n // Validate URL\n if (!empty($form_state['values']['url']) && !forschungsatlas_validate_url($form_state['values']['url'])) {\n form_set_error('url' , t('The URL is not valid.'));\n }\n // Validate Organization Type\n if (!forschungsatlas_get_orgtype_name($form_state['values']['otid'])) {\n watchdog('security', 'Possible SQL injection attempt! An illegal choice has been detected: OTID.', array(), WATCHDOG_ALERT);\n form_set_error('otid', t('The server was unable to process the request due to an internal error.'));\n }\n}",
"function vcn_findwork_common_validation($form, &$form_state) {\r\n\t$search_text_val = trim($form_state['input']['search_by_job_title']);\r\n\t$zipcode_val = trim($form_state['input']['zipcode']);\r\n\r\n\tif (!empty($zipcode_val)) {\r\n\t\t$zipcode_data = vcn_rest_wrapper('vcnlocationsvc', 'vcnlocation', 'get-location', array('zipcode' => $zipcode_val), 'json', 'post', false);\r\n\t\tif (empty($zipcode_data->location)) {\r\n\t\t\tform_set_error('zipcode', t('Please enter a valid US ZIP Code.'));\r\n\t\t}\r\n\t}\r\n\r\n\tif (empty($form['careers']['#value']) && empty($search_text_val)) {\r\n\t\tform_set_error('', t('Please enter a search term OR select a career from the list.'));\r\n\t\tform_set_error('careers');\r\n\t\tform_set_error('search_by_job_title');\r\n\t}\r\n}",
"public function check_city()\n {\n if (!in_array(ucwords(sanitize_text_field($_POST['billing_city'])), $this->business_area)) {\n throw new Exception(__('Your city is not within our business area', 'woocommerce'));\n }\n }",
"function adstrue_vendor_provice_validate($form, &$form_state) {\n drupal_add_css(drupal_get_path('module','adstrue_vendor').'/assets/css/custom_form.css');\n \n $name_province = $form_state['values']['name_province'];\n $company_id = $form_state['values']['company_id'];\n if($company_id == 0) {\n form_set_error('company_id',t('Vui lòng chọn công ty'));\n }\n\n $province_description = $form_state['values']['province_description'];\n $region_id = $form_state['values']['region_id'];\n $company_id = $form_state['values']['company_id'];\n if($name_province == '') {\n form_set_error('Vui lòng nhập tên tỉnh thành');\n }\n}",
"public function testCityRequired()\n {\n $crawler= $this->crawler;\n $form= $this->form;\n $client = $this->client;\n\n $form = $crawler->selectButton('Submit')->form();\n\n $form['member[city]']->setValue(\"\");\n\n $client->submit($form);\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertContains(\"City is required\", $client->getResponse()->getContent());\n }",
"public function city_or_province() {\n\t\t\t$this->value = stripslashes( $this->value );\n\t\t\tif ( preg_match( \"/^[\\D '\\-]+$/\", $this->value ) ) {\n\t\t\t\t$this->result->valid = true;\n\t\t\t} else {\n\t\t\t\t$this->result->valid = false;\n\t\t\t\t$this->result->error = sprintf( esc_html__( '%s must consist of letters, spaces, apostrophes, and dashes.', 'tribe-common' ), $this->label );\n\t\t\t}\n\t\t}",
"public static function checkCity()\r\n {\r\n if(!preg_match(\"/^[a-zA-z ]+$/\",self::$_registrationData['city']))\r\n {\r\n self::$_failure['cityF'] = \"e\";\r\n }\r\n else\r\n {\r\n self::$_success['cityS'] = self::$_registrationData['city'];\r\n } \r\n }",
"function castleschool_airport_transfers_form_validate($form, &$form_state) {\n\n if ($form_state['values']['whichairport'] != 0 &&\n $form_state['values']['arrivaldeparture'] == 0 &&\n $form_state['complete form']['arrivaldeparture']['#states']['required'][':input[name=\"whichairport\"]']['!value'] == 0) {\n form_set_error('title', t('Would you like just an Arrival transfer or Arrival and Departure field is required.'));\n }\n}",
"function crm_case_edit_form_validate(&$form, &$form_state) {\n $crm_case = $form_state['crm_case'];\n \n // Notify field widgets to validate their data.\n field_attach_form_validate('crm_case', $crm_case, $form, $form_state);\n}",
"function _addresses_province_field_validate($form, &$form_state) {\n // If province is not required and empty then prevent validation\n if (!$form['province']['#required'] && $form['province']['#value'] == '') {\n return;\n }\n\n $province = _addresses_province_valid(\n $form['country']['#value'],\n $form['province']['#value']\n );\n\n // If province is valid or if the country does not have any provinces\n if ($province || is_null($province)) {\n // Find array's key path to province field's value in $form_state\n $form_state_province =& $form_state['values'];\n foreach ($form['province']['#parents'] as $v) {\n $form_state_province =& $form_state_province[$v];\n }\n\n // Set province to ISO-3166-2 code (properly uppercased)\n $form_state_province = $province;\n }\n // Prevent inability to alter CCK fields in some instances\n elseif ($form_state['values']['form_id'] != 'content_field_edit_form') {\n // Get the province fieldname\n $field_name = $form['province']['#name'];\n $field_name = drupal_substr($field_name, 0, -1);\n $field_name = preg_replace('/([^]])\\[/', '\\1][', $field_name);\n\n $countries = _addresses_country_get();\n form_set_error($field_name, t('Could not find %province as a province from %country. Try to use the province abbreviation or number.', array(\n '%province' => $form['province']['#value'],\n '%country' => $countries[$form['country']['#value']])));\n }\n}",
"function checkCity($city, $X_langArray) {\n\tglobal $errorField, $reviewDAO;\n\t\n\t//city vuoto\n\tif (!isset($city) || $city == ''){\n\t\t$errorField .= \"&cityErrMsg=\".urlencode($X_langArray['CREATE_CITY_REV_CITY_EMPTY_ERR']);\n\t} else if ( (strlen($city) < 3 || strlen($city) > 60) && (strlen($cityName) < 3 || strlen($cityName) > 60) ) {\n\t\t$errorField .= \"&cityErrMsg=\".urlencode($X_langArray['CREATE_CITY_REV_CITY_LENGTH_ERR']);\n\t}\n}",
"function cbi_cf_process() {\n if( isset($_POST['billing_city2']) && empty($_POST['billing_city2']) && $_POST['billing_city'] == 'Other' ){\n wc_add_notice( __( \"Please fill in billing city field\" ), \"error\" );\n }\n\n // Updating shipping city 2 field\n if( isset($_POST['shipping_city2']) && empty($_POST['shipping_city2']) && $_POST['shipping_city'] == 'Other' ){\n wc_add_notice( __( \"Please fill in shipping city field\" ), \"error\" );\n }\n}",
"function validateCity($params)\n\t{\t\t\t\n\t\t\t\t$state_name=$params['pass'][0];\n\t\t\t\tApp::import('model','State');\n\t\t\t\t$this->State=new State();\n\t\t\t\t$s_id=$this->State->query(\"select id from states where page_url='$state_name'\");\n\t\t\t\t$state_id=$s_id[0]['states']['id'];\n\t\t\t\t\n\t\t\t\t$cot_name=$params['pass'][1];\n\t\t\t\t$cty_name=$params['pass'][2];\n\t\t\t\tApp::import('model','County');\n\t\t\t\t$this->County=new County();\n\t\t\t\t$cot_id=$this->County->query(\"select id from counties where state_id='$state_id' and page_url='$cot_name'\");\n\t\t\t\t$county_id=$cot_id[0]['counties']['id'];\n\t\t\t\tApp::import('model','City');\n\t\t\t\t$this->City=new City();\n\t\t\t\t$city=$this->City->query(\"select * from cities where county_id='$county_id' and page_url='$cty_name'\");\t\t\t\t\n\t\t\t\tif(!empty($city))\n\t\t\t\t\treturn 1;\n\t\t\t\telse\n\t\t\t\t\treturn 0;\n\t\t\t\t\n\t}",
"function countries_admin_form_validate($form, &$form_state) {\n // Edits\n $unique_keys = array('name', 'iso2', 'iso3', 'official_name', 'numcode');\n\n foreach ($unique_keys as $key) {\n if (drupal_strlen($form_state['values'][$key])) {\n $iso2 = isset($form['#country']) ? $form['#country']->iso2 : FALSE;\n if ($key == 'iso2' || $key == 'iso3') {\n $form_state['values'][$key] = drupal_strtoupper($form_state['values'][$key]);\n }\n else {\n $form_state['values'][$key] = trim($form_state['values'][$key]);\n }\n switch($key) {\n case 'name':\n break;\n case 'iso2':\n case 'iso3':\n if (preg_match('/[^A-Z]/', $form_state['values'][$key])) {\n form_set_error($key, t('Please only use uppercase characters for ISO codes.'));\n continue;\n }\n else {\n $length = $key == 'iso2' ? 2 : 3;\n if (drupal_strlen($form_state['values'][$key]) != $length) {\n form_set_error($key, t('The ISO!length code must be exactly !length characters.', array('!length' => $length)));\n continue;\n }\n }\n break;\n case 'official_name':\n break;\n case 'numcode':\n if (preg_match('/[^0-9]/', $form_state['values'][$key])) {\n form_set_error($key, t('Only numbers are allowed for the number code.'));\n continue;\n }\n break;\n }\n if ($key == 'numcode' && empty($form_state['values'][$key])) {\n // Duplicate 0 values are OK.\n }\n elseif ((bool) db_query_range(\"SELECT 1 FROM {countries_country} WHERE iso2 <> :orginaliso2 AND LOWER({$key}) = LOWER(:$key)\", 0, 1, array(':orginaliso2' => $iso2, \":$key\" => $form_state['values'][$key]))->fetchField()) {\n form_set_error($key, t('The value %value is already taken.', array('%value' => $form_state['values'][$key])));\n }\n }\n }\n}",
"function locguide_admin_areamap_form_validate($form, &$form_state) {\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the winner or draw if there is one, null if the game is unfinished | protected function getWinnerInternal()
{
if ($this->checkWinFor(self::PLAYER_A)) {
return self::PLAYER_A;
}
if ($this->checkWinFor(self::PLAYER_B)) {
return self::PLAYER_B;
}
if (strpos($this->asString(), $this->getEmptySymbol())===false) {
return self::DRAW_GAME;
}
return null;
} | [
"public function getWinner()\n\t{\n\t\tif ( ! $this->engine->inCheckmate()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->engine->turn() == \"w\" ? \"black\" : \"white\";\n\t}",
"public function winner()\n {\n return $this->edit->winner();\n }",
"public function winner() {\n Log::debug(\"winner()\");\n Log::debug(\"for game id: \" . $this->game_id);\n $player = Player::find($this->winner_id);\n return $player;\n }",
"public function winner(){\n\t\tif(count($this->armies[0]->warriors)==0){\n\t\t\treturn 1;\n\t\t}\n\t\telse if(count($this->armies[1]->warriors)==0){\n\t\t\treturn 2;\n\t\t}\n\t\treturn 0;\n\t}",
"private function getWinner()\n {\n return $this->winner;\n }",
"public function isWinner() {\n\t\t$winner = null;\n\t\t$rule = $this->getRule(); // note: rule is required for matches\n\t\tif($rule->rule_type == Rule::TYPE_MATCHPLAY) {\n\t\t\t// Get opponent scorecard\n\t\t\tif($opponent = $this->getOpponent()) {\n\t\t\t\tif($opponent_scorecard = $opponent->getScorecard()) {\n\t\t\t\t\t$this_total = $this->points_total($rule->handicap);\n\t\t\t\t\t$opponent_total = $opponent_scorecard->points_total($rule->handicap);\n\t\t\t\t\t//Yii::trace('tie:'.$this->tie_break.'vs.'.$opponent_scorecard->tie_break, 'Scorecard::isWinner');\n\t\t\t\t\t$winner = ($this_total > $opponent_total) ?\n\t\t\t\t\t\t\t\ttrue :\n\t\t\t\t\t\t\t\t($opponent_total > $this_total ?\n\t\t\t\t\t\t\t\t\tfalse :\n\t\t\t\t\t\t\t\t\t($this->tie_break > $opponent_scorecard->tie_break ?\n\t\t\t\t\t\t\t\t\t\ttrue :\n\t\t\t\t\t\t\t\t\t\t($this->tie_break < $opponent_scorecard->tie_break ?\n\t\t\t\t\t\t\t\t\t\t\tfalse :\n\t\t\t\t\t\t\t\t\t\t\tnull)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Yii::trace('return:'.($winner ? 't' : 'f'), 'Scorecard::isWinner');\n\t\treturn $winner;\n\t}",
"public function getWinner(){\n $this->game->UpdateStatus();\n if ($this->game->getWinner()!=$this->game->get_current_turn()){\n return false;\n }else{\n return true;\n }\n }",
"function detectWinner(){\n\n $team1 = $this->getPlayerByGroup(SL_TEAM_1);\n $team2 = $this->getPlayerByGroup(SL_TEAM_2);\n\n // pve map, always return id of playing team\n if(empty($team1))return SL_TEAM_2;\n if(empty($team2))return SL_TEAM_1;\n\n // all player of a team left the game. Winner is the other team\n if($this->countPlayerLeft($team1)==count($team1)){\n return SL_TEAM_2;\n }\n if($this->countPlayerLeft($team2)==count($team2)){\n\n return SL_TEAM_1;\n }\n\n // this works in most cases: player that executed the last commands is the winner\n if($this->lastActionInTeam($team1)>$this->lastActionInTeam($team2)){\n return SL_TEAM_1;\n }else{\n return SL_TEAM_2;\n }\n\n }",
"public function checkWinner(){\n\t\t$this->winner_player = new Player( null );\n\t\t\n\t\t$this->checkColumns(); //vertical\n\t\t$this->checkRows(); //horizontal\n\t\t$this->checkDiagonal(); //diagonal\n\t\t\n\t\tif($this->winner_found && $this->status != \"won\"){\n\t\t\t$sql = new SqlManager();\n\t\t\t$new = array( \"winner_game\" => $this->id, \"winner_player\" => $this->winner_player->getID(), \"winner_fieldset\" => serialize($this->fieldset), \"winner_winning_fields\" => serialize($this->winner_fields) );\n\t\t\t$sql->insert(\"winner\", $new);\n\t\t\t$this->setStatus(\"won\");\n\t\t\t$this->save();\n\t\t}\n\t\t\n\t\treturn $this->winner_found;\n\t}",
"public function checkForWinState() {\n $squares = $this->buildSquaresArray();\n foreach($this->winConditions as $strike => $cond) {\n if($this->conditionMet($cond, $squares)) {\n $this->winner = $squares[$cond[0]];\n $this->strike = $strike;\n $this->save();\n }\n }\n\n //check for Draw\n if($this->isDraw($squares)) {\n $this->winner = 'd';\n $this->save();\n }\n }",
"public function getWinner() {\r\n\r\n\t\t\t$retVal = null;\r\n\r\n\t\t\t$result = Lib\\Db::Query('SELECT COUNT(1) AS votes, character_id FROM votes WHERE round_id = :roundId GROUP BY character_id', [ ':roundId' => $this->id ]);\r\n\t\t\tif ($result && $result->count) {\r\n\t\t\t\t$highestVotes = 0;\r\n\t\t\t\t$winner = 0;\r\n\t\t\t\twhile ($row = Lib\\Db::Fetch($result)) {\r\n\t\t\t\t\tif ((int) $row->votes > $highestVotes) {\r\n\t\t\t\t\t\t$highestVotes = (int) $row->votes;\r\n\t\t\t\t\t\t$winner = (int) $row->character_id;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$retVal = Character::getById($winner);\r\n\t\t\t}\r\n\r\n\t\t\treturn $retVal;\r\n\r\n\t\t}",
"public function win()\n {\n $totScore = $this->gameScore + $this->gameRound->score();\n $win = false;\n if (self::$winScore <= $totScore) {\n $win = true;\n } else {\n $win = false;\n }\n return $win;\n }",
"public function getWinner ()\n\t{\n\t\t// Cache\n\t\tif ( $this->_CondorcetWinner !== null )\n\t\t{\n\t\t\treturn $this->_CondorcetWinner ;\n\t\t}\n\n\t\t\t//////\n\n\t\t// Basic Condorcet calculation\n\t\tforeach ( $this->_Pairwise as $candidate_key => $candidat_detail )\n\t\t{\n\t\t\t$winner = true ;\n\n\t\t\tforeach ($candidat_detail['win'] as $challenger_key => $win_count )\n\t\t\t{\n\t\t\t\tif\t( $win_count <= $candidat_detail['lose'][$challenger_key] )\n\t\t\t\t{\n\t\t\t\t\t$winner = false ;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($winner)\n\t\t\t{\n\t\t\t\t$this->_CondorcetWinner = $candidate_key ;\n\n\t\t\t\treturn $this->_CondorcetWinner ;\n\t\t\t}\n\t\t}\n\n\t\t\treturn null ;\n\t}",
"public function winner()\n {\n if ($this->match->completed_at) {\n return false;\n }\n\n foreach ($this->match->teams as $team) {\n $team->winner_status = false;\n $team->save();\n }\n\n $this->winner_status = true;\n\n return $this->save();\n }",
"function checkWinner($game) {\n\tglobal $message ;\n\t$winner = \"999\";\n\t$board = $game[\"board\"];\n\t$cellClicked = $game[\"clicked\"];\n\tif ($game[\"clicked\"] !== 9) {\n\t\tsettype($cellClicked, \"string\");\n\t\t$winCombo = array(\"012\",\"345\",\"678\",\"036\",\"147\",\"258\",\"840\",\"246\");\n\t\tfor( $row = 0; $row < 8; $row++ ) {\t\n\t\t\t// identify which row, column, and diag has been changed by current selection\n\t\t\t$idx = ($cellClicked < 9) \n\t\t\t\t? substr_count($winCombo[$row], $cellClicked)\n\t\t\t\t: -1;\n\t\t\t// test only the changed row, columns, and diags\n\t\t\tif ($idx == 1) { \n\t\t\t\tif ( $board[$winCombo[$row][0]] == $board[$winCombo[$row][1]] && \n\t\t\t\t\t $board[$winCombo[$row][1]] == $board[$winCombo[$row][2]] ) \t{\t\n\t\t\t\t\t\t$game[\"winningCombo\"] = $board[$winCombo[$row][0]];\n\t\t\t\t\t\t$winner = $winCombo[$row];\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\n\t\tif ($game[\"winningCombo\"] != -1) {\n\t\t\t$message = substr($game[\"playToken\"],$game[\"winningCombo\"],1) . \" wins\";\n\t\t}\n\t\telseif (count_chars($board,3) == \"01\") {\n\t\t\t$message = \"Game over. No winner\";\n\t\t}\n\t} \n\treturn $winner;\n}",
"function checkWinner($context)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor($j = 0; $j < count($context['winCombo']); $j++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$check = $context['winCombo'][$j];\n\n\t\t\t\t\t\t\t// any of the combos match with the board then change game message to winner message and change gameOver to 1\n\t\t\t\t\t\t\tif($context['board'][$check[0]] != \" \" && $context['board'][$check[0]] == $context['board'][$check[1]] && $context['board'][$check[0]] == $context['board'][$check[2]])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$context['gameOver'] = 1;\n\t\t\t\t\t\t\t\t$context['message'] = ($context['player'] == \"X\") ? \"Player O wins.\" : \"Player X wins.\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//$context['empty']--;\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if there is no empty cell left then change game message to draw message\n\t\t\t\t\t\tif($context['empty'] == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$context['message'] = \"Draw!\";\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if empty cell is not 0 and game is not over then change game message to current player message\t\t\t\t\n\t\t\t\t\t\tif($context['empty'] != 0 && $context['gameOver'] == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$context['message'] = $context['player'] . \" is playing\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn $context;\n\t\t\t\t\t}",
"protected function _winGame () : string\n\t{\n\t\t$this->_firstMove();\n\t\treturn $this->_makeWinMoves();\n\t}",
"public function displayWinner() {\n\t\t\t$winners = $this->getWinners();\n\t\t\tif (count($winners) == 1) {\n\t\t\t\techo $winners[0]->name(). \" has won.\\n\";\n\t\t\t} else {\n\t\t\t\techo implode(',',$winners). \" have tied for first.\\n\";\n\t\t\t}\n\t\t}",
"private function checkForWinner(Round $round): Team\n {\n $progress = $round->getProgress();\n $map = $round->getMap();\n foreach ($progress as $row_key => $row) {\n foreach ($row as $column_key => $value) {\n if ($value !== 0) {\n $map[$row_key][$column_key] = 'x';\n }\n }\n }\n $teams = $round->getGame()->getTeams();\n foreach ($teams as $team) {\n if ($this->countBoardOccurances($map, $team->getId()) == 0) {\n return $team;\n }\n }\n return null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the special date of the current object. | public function getSpecialDate()
{
return $this->specialDate;
} | [
"public function getMetaDate()\n {\n return $this->dbObject('Date');\n }",
"public function nowDate()\n {\n return $this->asUserDate($this->getNow());\n }",
"public static function GetCurrentDate()\n {\n return date(self::DB_DATE_FORMAT);\n }",
"private function currentDate() {\n return new DrupalDateTime();\n }",
"protected function getNow()\n\t{\n\t\treturn date('Y-m-d');\n\t}",
"function getCurrentDate()\n\t\t{\n\t\t\t$date = date('y-m-d');\n\t\t\treturn $date;\n\t\t}",
"public function get_date() {\n\t\treturn get_date_from_gmt( $this->date_gmt );\n\t}",
"public function CurrentDate()\n\t{\n\t\t$day = (integer)$this->day;\n\t\tif ($day<10) $day = '0'.$day;\n\t\t\n\t\t$month = (integer) $this->month;\n\t\tif ($month<10) $month = '0'.$month;\n\t\t\n\t\treturn \"{$this->year}-$month-$day\";\n\t}",
"private function currentDate(): string {\n return $this->dateFormatter->format($this->time->getCurrentTime(), 'custom', 'Y-m-d');\n }",
"function getDate() {\n\t\treturn $this->_Date;\n\t}",
"public static function getCurrentDateAsReadible() : string {\n return date(app::translate('DATETIME.FORMAT_DATE'), self::getCurrentTimestamp());\n }",
"private function getTheDate()\n {\n return $this->content[$this->getProfileCursor()][self::$DATE_CURSOR];\n }",
"public static function BuildCurrentDate()\n {\n return date('YYYYmmdd');\n }",
"public function Date()\n\t{\n\t\treturn $this->date;\n\t}",
"protected function getFreshDate()\n\t{\n\t\treturn new MongoDate();\n\t}",
"static function getCurrentDate() {\n $current_date = \\DateTime::createFromFormat('U.u', sprintf('%.4f', microtime(true)));\n $current_date->setTimezone(new \\DateTimeZone(\\Config::get('app.timezone')));\n return $current_date->format('Y-m-d\\TH:i:s.uP');\n }",
"public function getDATE()\n {\n return $this->DATE;\n }",
"public function getCurrentDate(): string\n {\n return Carbon::now()->locale(app()->getLocale())->isoFormat('l');\n }",
"static public function today()\n {\n return date(DT_DATE1);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation addRequestsProcessSandboxAPIOnlyAsync Add Requests: Process (Sandbox API Only) | public function addRequestsProcessSandboxAPIOnlyAsync($api_key, $v, $content_type, $body)
{
return $this->addRequestsProcessSandboxAPIOnlyAsyncWithHttpInfo($api_key, $v, $content_type, $body)
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function addRequestsProcessSandboxAPIOnly($api_key, $v, $content_type, $body)\n {\n $this->addRequestsProcessSandboxAPIOnlyWithHttpInfo($api_key, $v, $content_type, $body);\n }",
"private function addMissingConsentRequests()\n {\n $addon = ee('Addon')->get('consent');\n $requests = $addon->get('consent.requests', []);\n\n foreach ($requests as $name => $values) {\n $name = 'ee:' . $name;\n $request = ee('Model')->get('ConsentRequest')\n ->filter('consent_name', $name)\n ->first();\n if (is_null($request)) {\n $addon->makeConsentRequest($name, $values);\n } elseif (! $request->consent_request_version_id) {\n $version = ee('Model')->make('ConsentRequestVersion');\n $version->request = $values['request'];\n $version->request_format = (isset($values['request_format'])) ? $values['request_format'] : 'none';\n $version->author_id = 0;\n $version->create_date = ee()->localize->now;\n $request->Versions->add($version);\n\n $version->save();\n\n $request->CurrentVersion = $version;\n $request->save();\n }\n }\n }",
"public function add($request) {\n $this->requests[] = $request;\n return true;\n }",
"public function add_request($request) {\n array_push($this->requests, $request);\n }",
"public function processRequests();",
"public function addRequest($url, $user_data = null) { //Add to request queue\n $this->requests[] = array(\n 'url' => $url,\n 'user_data' => $user_data\n );\n return count($this->requests) - 1; //return request number/index\n }",
"protected function isPostRequestCompulsoryForProcessStep()\n {\n return true;\n }",
"public function testAddProcess()\n {\n try {\n\n $processAtt = new ProcessAttributes();\n $processAtt->setStatus('ACTIVE');\n $processAtt->setName('Process name');\n $processAtt->setType('NORMAL');\n\n /** @var ProcessItem $result */\n $result = $this->apiInstance->addProcess(new ProcessCreateItem(\n [\n 'data' => new Process(['attributes' => $processAtt])\n ]\n )\n );\n\n $this->assertNotNull($result->getData()->getId());\n $this->assertEquals('Process name', $result->getData()->getAttributes()->getName());\n //print_r($result->getData());\n return $result->getData()->getId();\n\n } catch (ApiException $e) {\n $this->dumpError($e, __METHOD__);\n }\n }",
"public function enableSandboxMode() {\n $this->setSandboxMode(true);\n }",
"public function actionAddRequestsPermissions()\n {\n //getRequestsList permission\n $getRequestsList = $this->createPermission('getRequestsList', 'Get Requests list permission');\n\n //getRequestDetails permission\n $getRequestDetails = $this->createPermission('getRequestDetails', 'Get Request details permission');\n\n //createRequest permission\n $createRequestDetails = $this->createPermission('createRequestDetails', 'Create Request details permission');\n\n //updateRequest permission\n $updateRequestDetails = $this->createPermission('updateRequestDetails', 'Update Request details permission');\n\n //deleteRequest permission\n $deleteRequestDetails = $this->createPermission('deleteRequestDetails', 'Delete Request details permission');\n\n //requestsUser role\n $requestsUser = $this->createRole('requestsUser', [\n $getRequestDetails,\n $createRequestDetails,\n ], 'Requests user role');\n\n //requestsAdmin role\n $requestsAdmin = $this->createRole('requestsAdmin', [\n $getRequestsList,\n $updateRequestDetails,\n $deleteRequestDetails,\n ], 'Requests admin role');\n\n $this->addRoleChild($requestsAdmin, $requestsUser);\n\n //User role\n $this->addCommonUserRole();\n $this->addRoleChild($this->userRole, $requestsUser);\n\n //Admin role\n $this->addCommonAdminRole();\n $this->addRoleChild($this->adminRole, $requestsAdmin);\n }",
"public function store(CreateProcessAPIRequest $request)\n {\n $input = $request->all();\n $input[\"inputs\"] = json_encode($input[\"inputs\"]);\n $input[\"outputs\"] = json_encode($input[\"outputs\"]);\n $input[\"metadata\"] = json_encode($input[\"metadata\"]);\n $input[\"user\"] = Auth::user()->id;\n\n $process = $this->processRepository->create($input);\n\n return $this->sendResponse($process->toArray(), 'Process saved successfully');\n }",
"public function enableSandboxMode()\n {\n $this->setSandboxMode(true);\n }",
"public function addRequestsProcessSandboxAPIOnlyAsyncWithHttpInfo($api_key, $v, $content_type, $body)\n {\n $returnType = '';\n $request = $this->addRequestsProcessSandboxAPIOnlyRequest($api_key, $v, $content_type, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function testAttachNewOnRuntime()\n {\n $total = 10;\n $test = $this;\n $queue = new cURL\\RequestsQueue();\n $queue->getDefaultOptions()\n ->set(CURLOPT_RETURNTRANSFER, true)\n ->set(CURLOPT_ENCODING, '');\n\n\n $n = 0;\n $attachNew = function () use ($queue, &$n, $total) {\n if ($n < $total) {\n $n++;\n $request = new cURL\\Request();\n $request->_param = $n;\n $request->getOptions()->set(CURLOPT_URL, $this->createRequestUrl($n));\n $queue->attach($request);\n }\n };\n\n $attachNew();\n $queue->addListener(\n 'complete',\n function (cURL\\Event $event) use (&$requests, $test, $attachNew) {\n $test->validateSuccesfulResponse($event->response, $event->request->_param);\n $attachNew();\n }\n );\n $queue->send();\n $this->assertEquals($total, $n);\n }",
"public function addRequest(Request $request)\n {\n $this->requests[] = $request;\n }",
"protected function debugRequestAdd(Request $request) {\n // Work on the clone of request to avoid any data damage.\n $request_clone = clone $request;\n\n if (!isset($_SESSION['vu_rp_api_debug_request'])) {\n $_SESSION['vu_rp_api_debug_request'] = [];\n }\n\n $content = $request_clone->getContent();\n if ($content) {\n // Decode any sent data in order to properly output it later.\n $request_clone->setContent($content);\n }\n\n $_SESSION['vu_rp_api_debug_request'][current_path()][] = (string) $request_clone;\n }",
"public function addRequest(Request $request){\n $this->requestQueue[] = $request;\n }",
"public function addAsync(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->wxPackagePackageAddAsync($data);\n return $response;\n });\n }",
"public static function allowOnlyAPIAccess() {\n\t\tApp::$data['isAPIRequest'] = true;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Building has many wards | public function wards()
{
return $this->belongsToMany(Ward::class);
} | [
"public function wards(){\n return $this->hasMany(Ward::class);\n }",
"public function ward()\n {\n return $this->hasMany(Ward::class);\n }",
"public function buildings()\n {\n return $this->belongsToMany('App\\Building', 'department', 'faculty_id', 'building_id');\n }",
"public function building()\n {\n return $this->belongsTo(Building::class);\n }",
"public function building(){\n return $this->belongsTo(Building::class);\n }",
"public function builds()\n {\n return $this->hasMany('App\\Models\\Build');\n }",
"public function wines(){\n return $this->hasMany('App\\Wine');\n }",
"public function getBuildings()\n {\n return Building::where('city_id', request()->city_id)\n ->has('hallBlueprints')\n ->get(['id', 'name'])\n ->map(function ($building) {\n return [\n 'id' => $building->id,\n 'text' => $building->name,\n ];\n });\n\t}",
"public function cw()\n {\n return $this->hasmany('App\\RelevantCoursework');\n }",
"public function getBuildingUnit(){\n return $this->hasMany(BuildingUnit::classname(), ['unitid' => 'unitid']);\n }",
"public function level_building()\n {\n return $this->hasOne('App\\Building_level');\n }",
"public function warehouses(){\n\n return $this->hasMany('App\\Warehouse');\n\n }",
"public function getBuilding()\r\n {\r\n return $this->building;\r\n }",
"public function standings()\n {\n \treturn $this->hasMany( Standing::class );\n }",
"function BuildWing()\n {\n $this->_bird->_wing=\"Blue\";\n }",
"public function beds(): HasMany\n {\n return $this->hasMany(HospitalBed::class, 'hospital_id', 'id')->orderBy('hospital_bed_type_id');\n }",
"public function lot()\n {\n return $this->hasmany('App\\WMS\\SWmLot');\n }",
"public function getFlatWing()\n {\n return $this->belongsTo('App\\Models\\Wings\\WingModel', 'wing_id');\n }",
"public function getShopCatalogWaresWithWareIdMany()\r\n {\r\n return $this->getMany(ShopCatalogWare::class, [\r\n 'ware_id' => 'id',\r\n ]); \r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subscribe to the given topic. | public function subscribe($topic); | [
"public function subscribe(Topic $topic);",
"public function subscribe(Topic $topic, Connection $connection);",
"function onSubscribe(ConnectionInterface $conn, $topic);",
"public function subscribe($topic, $qos) {}",
"public function subscribe($topic)\n {\n $normalizedTopic = $this->normalizeTopic($topic);\n\n if (isset($this->subscriptions[$normalizedTopic])) {\n return;\n }\n\n $queue = $this\n ->declarationManager\n ->queue();\n\n $exchange = $this\n ->declarationManager\n ->exchange();\n\n $this\n ->channel\n ->queue_bind(\n $queue,\n $exchange,\n $normalizedTopic\n );\n\n $this->subscriptions[$normalizedTopic] = true;\n\n if ($this->logger) {\n $this->logger->debug(\n 'pubsub.subscriber {topic} subscribe',\n [\n 'topic' => $topic,\n ]\n );\n }\n }",
"public function subscribeTo($topic)\n {\n $this->subscriptions()->firstOrCreate(['topic_id' => $topic->id]);\n }",
"public function publish($topic, $message);",
"public function register(Topic $topic);",
"public function subscribe(): void\n {\n if ($this->subscribed) {\n return;\n }\n\n // Subscribe to channels: send envelope to receiver\n $this->topic->subscribe($this->channels, function (EnvelopeInterface $envelope) {\n $this->receiver->receive($envelope, $this);\n\n pcntl_signal_dispatch();\n\n if (!$this->running) {\n $this->topic->connection()->close();\n }\n });\n\n $this->subscribed = true;\n }",
"public function storeSubscriber(Subscriber $subscriber, string $topic): void;",
"function subscribe_to_topic($topic, $registrationTokenOrTokens) {\n return messaging()->subscribeToTopic($topic, $registrationTokenOrTokens);\n}",
"public function subscribe($function, $topic = null) {\r\n\t\tif( ! Thread::available() ) {\r\n\t\t\techo \"Threads not supported\\n\";\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tif ($topic === null) {\r\n\t\t\t$topic = $this->_topic;\r\n\t\t}\r\n\t\t\r\n\t\tfunction receive($topic, $function) {\r\n\t\t\t$this->clientId = $this->_clientId;\r\n\t\t\t$this->_client->connect();\r\n\t\t\t$this->_client->subscribe($topic);\r\n\t\t\r\n\t\t\twhile ($_subscriber_thread -> isAlive()) {\r\n\t\t\t\t$msg = $this->_client->readFrame();\r\n\t\t\t\tif ( $msg != null) {\r\n\t\t\t\t\tcall_user_func($function, $msg);\r\n\t\t\t\t\t$this->_client->ack($msg);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsleep(1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->_client->unsubscribe($topic);\r\n\t\t\t$this->_client->disconnect();\r\n\t\t}\r\n\t\t\r\n\t\t$_subscriber_thread = new Thread(array($this, 'receive'));\r\n\t\t$_subscriber_thread -> start($topic, $function);\r\n\t}",
"public function subscribe(string $topic, string $type, string $endpoint): void\n {\n try {\n $this->sns->subscribe([\n 'Protocol' => $this->getEndpointProtocol($endpoint),\n 'TopicArn' => $topic,\n 'Endpoint' => $endpoint,\n 'Attributes' => [\n 'FilterPolicy' => json_encode([\n 'type' => [$type]\n ])\n ]\n ]);\n } catch (SnsException $e) {\n throw new ClientException($e->getMessage());\n }\n }",
"public function subscribe(array $topics, callable $callback): void\n {\n foreach ($topics as $pattern) {\n $this->subscribers[$pattern][] = $callback;\n\n // Create the regex pattern if the topic has '*' char.\n if (strpos($pattern, '*') !== false) {\n $this->regex[$pattern] = TopicMatcher::toRegex($pattern);\n }\n }\n }",
"public function subscribe(string $topic, callable $handler): void\n {\n Daemon::run(function () use ($topic, $handler) {\n $res = $this->receiveMessage($topic);\n\n if (empty($res->get('Messages'))) {\n $this->logger->info(sprintf('Without messages %s', $topic));\n return;\n }\n\n foreach ($res->getPath('Messages') as $message) {\n $this->logger->info(sprintf('Received Msg: %s', trim(substr($message['Body'], 0, 200))), [\n 'messaging' => [\n 'topic' => $topic\n ]\n ]);\n\n $handler($message['Body']);\n\n $this->logger->info(sprintf('Success: %s...', trim(substr($message['Body'], 0, 200))), [\n 'messaging' => [\n 'topic' => $topic\n ]\n ]);\n\n $this->commit($topic, $message);\n }\n });\n }",
"public function subscribe($data)\n {\n if (!isset($data['id'])) {\n throw new \\Box_Exception('Forum Topic ID not passed');\n }\n\n if ($this->is_subscribed($data)) {\n throw new \\Exception('You have already subscribed to this topic notifications');\n }\n\n $client = $this->getIdentity();\n $meta = $this->di['db']->dispense('extension_meta');\n $meta->extension = 'mod_forum';\n $meta->client_id = $client->id;\n $meta->rel_type = 'forum_topic';\n $meta->rel_id = $data['id'];\n $meta->meta_key = 'notification';\n $meta->meta_value = 1;\n $meta->created_at = date('Y-m-d H:i:s');\n $meta->updated_at = date('Y-m-d H:i:s');\n $this->di['db']->store($meta);\n\n $this->di['logger']->info('Subscribed to forum topic %s', $data['id']);\n\n return true;\n }",
"public function subscribeUserToTopic($params)\n {\n\n $artist_id = (isset($params['artist_id']) && $params['artist_id'] != '') ? trim($params['artist_id']) : \"\";\n $topic_id = (isset($params['topic_id']) && $params['topic_id'] != '') ? trim($params['topic_id']) : \"\";\n $device_token = (isset($params['device_token']) && $params['device_token'] != '') ? trim($params['device_token']) : \"\";\n $server_key = $this->getServerKeyByArtist($artist_id);\n\n if ($server_key != '') {\n\n $client = new Client();\n $client->setApiKey($server_key);\n $client->injectGuzzleHttpClient(new \\GuzzleHttp\\Client());\n //print_pretty($params);exit;\n\n $device_tokens = [$device_token];\n $response = $client->addTopicSubscription($topic_id, $device_tokens);\n\n $status_code = $response->getStatusCode();\n $response_body = $response->getBody()->getContents();\n return $status_code;\n }\n\n\n }",
"private function step_topic_subscriptions()\n {\n }",
"function subscribe($topic_id, $emails = NULL)\n\t{\n\t\tif (isset($_SESSION['user_id']) && is_numeric($_SESSION['user_id']) && $_SESSION['user_id'] != 0)\n\t\t{\n\t\t\t$res = $this->dbl->run(\"SELECT `user_id`, `topic_id`, `secret_key`, `emails` FROM `forum_topics_subscriptions` WHERE `user_id` = ? AND `topic_id` = ?\", array($_SESSION['user_id'], $topic_id))->fetch();\n\n\t\t\tif (!$res)\n\t\t\t{\n\t\t\t\t// have we been given an email option, if so use it\n\t\t\t\tif ($emails == NULL)\n\t\t\t\t{\n\t\t\t\t\t// find how they like to normally subscribe\n\t\t\t\t\t$get_email_type = $this->dbl->run(\"SELECT `auto_subscribe_email` FROM `users` WHERE `user_id` = ?\", array($_SESSION['user_id']))->fetchOne();\n\t\t\t\t\t\n\t\t\t\t\t$sql_emails = $get_email_type;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sql_emails = (int) $emails;\n\t\t\t\t}\n \n\t\t\t\t// for unsubscribe link in emails\n\t\t\t\t$secret_key = core::random_id(15);\n\n\t\t\t\t$this->dbl->run(\"INSERT INTO `forum_topics_subscriptions` SET `user_id` = ?, `topic_id` = ?, `emails` = ?, `send_email` = ?, `secret_key` = ?\", array($_SESSION['user_id'], $topic_id, $sql_emails, $sql_emails, $secret_key));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// for unsubscribe link in emails\n\t\t\t\tif (empty($res['secret_key']))\n\t\t\t\t{\n\t\t\t\t\t$secret_key = core::random_id(15);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$secret_key = $res['secret_key'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check over their email options on this new subscription\n\t\t\t\tif ($emails == NULL)\n\t\t\t\t{\n\t\t\t\t\t// find how they like to normally subscribe\n\t\t\t\t\t$get_email_type = $this->dbl->run(\"SELECT `auto_subscribe_email` FROM `users` WHERE `user_id` = ?\", array($_SESSION['user_id']))->fetchOne();\n\t\t\t\t\t\n\t\t\t\t\t$sql_emails = $get_email_type;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sql_emails = (int) $emails;\n\t\t\t\t}\n\n\t\t\t\t$this->dbl->run(\"UPDATE `forum_topics_subscriptions` SET `secret_key` = ?, `emails` = ?, `send_email` = ? WHERE `user_id` = ? AND `topic_id` = ?\", array($secret_key, $sql_emails, $sql_emails, $_SESSION['user_id'], $topic_id));\n\t\t\t}\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the url for the file depending if is private of public. | protected function getUrl()
{
if ($this->isPrivate() && config('filemanager.disk') != 'public') {
return $this->filesystem->temporaryUrl($this->path, now()->addMinutes(config('filemanager.temporary_url_expired_time')));
}
return $this->filesystem->url($this->path);
} | [
"public function getPrivateFileUrl(): string\n {\n return $this->privateFileUrl;\n }",
"public function getPublicUrl()\n\t{\n\t\treturn $this->publicPath .'/'. $this->file->getName();\n\t}",
"public function getURL()\n {\n $url = null;\n $app = Application::getFacadeApplication();\n $cf = $app->make('helper/concrete/file');\n $configuration = $this->getFileStorageLocationConfiguration();\n if ($this->hasPublicURL() && $configuration !== null) {\n $url = $configuration->getPublicURLToFile($cf->prefix($this->fvPrefix, $this->fvFilename));\n }\n if (!$url) {\n $url = (string) $this->getDownloadURL();\n }\n\n return $url;\n }",
"private function get_private_url()\n\t{\n\t\treturn $this->private_url;\n\t}",
"function private_url($ext)\n{\n\treturn PRIVATE_URL.$ext;\n}",
"function file_url( $file ) {\n\t\t$url = false;\n\t\tif ( isset( $this->files[$file] ) ) {\n\t\t\t$url = $this->files[$file];\n\t\t}\n\t\treturn $url;\n\t}",
"public function getUrl()\n {\n return phpb_full_url(phpb_config('general.uploads_url') . '/' . $this->public_id . '/' . $this->original_file);\n }",
"public function getPublicUrl()\n {\n $fileNameAndPath = str_replace(PATH_site, '', $this->getFileWithAbsolutePath());\n return '/' . ltrim($fileNameAndPath, '/');\n }",
"public function url()\n {\n return $this->file->get_file_url();\n }",
"public function getPublicPath();",
"public function hasPublicURL()\n {\n $configuration = $this->getFileStorageLocationConfiguration();\n if ($configuration !== null) {\n return $configuration->hasPublicURL();\n }\n\n return false;\n }",
"public function getFileUrl()\n {\n return $this->fileUrl;\n }",
"public function getFileURL() {\n\t\treturn $this->getFileURLForFilePath( $this->getFilePath() );\n\t}",
"abstract public function getFileViewUrl();",
"public function getPublicUrl() {\n\t\treturn \"http://flickr.com/photos/{$this->getUserId()}/{$this->getId()}/\";\n\t}",
"function getExternalUrl() {\n $path = str_replace('\\\\', '/', $this->getTarget());\n return url('system/files/' . $path, array('absolute' => TRUE));\n }",
"public function isPublic($path = '');",
"public function getPublicUri (): string;",
"public function getMyFileUrl()\n {\n return $this->myFileUrl;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills the provided config aware struct with config structs, according to the provided value. | public function buildConfigUpdateStructs(ConfigAwareValue $configAwareValue, ConfigAwareStruct $configAwareStruct): void
{
foreach ($configAwareValue->getConfigs() as $configKey => $config) {
$configStruct = new ConfigStruct();
$configStruct->fillParametersFromConfig($config);
$configAwareStruct->setConfigStruct($configKey, $configStruct);
}
} | [
"public function process(Config $value);",
"private static function moduleSettings_build(&$settings, $instance, $config, $values = null, $augment = true) {\n foreach ($config as $c) {\n $key = $c[\"key\"];\n $repeats = $c[\"repeatable\"] == true;\n $sub = isset($c[\"sub_settings\"]);\n $val = $values[$key][\"value\"];\n foreach ($instance as $i) {\n $val = $val[$i];\n }\n if ($repeats && !$sub && $val === null) {\n $val = array( null );\n }\n $settings[$key] = array( \n \"count\" => $repeats ? count($val) : 1,\n \"repeats\" => $repeats,\n \"hassubs\" => $sub\n );\n if ($sub && $repeats) {\n $settings[$key][\"sub\"] = array();\n foreach (array_keys($val) as $curInstance) {\n $settings[$key][\"sub\"][$curInstance] = array();\n array_push($instance, $curInstance);\n self::moduleSettings_build($settings[$key][\"sub\"][$curInstance], $instance, $c[\"sub_settings\"], $values, $augment);\n array_pop($instance);\n }\n // Add structure.\n self::moduleSettings_build($settings[$key][\"sub\"][null], $instance, $c[\"sub_settings\"], null, $augment);\n } \n else if ($sub) {\n $settings[$key][\"sub\"][0] = array();\n array_push($instance, 0);\n self::moduleSettings_build($settings[$key][\"sub\"][0], $instance, $c[\"sub_settings\"], $values, $augment);\n array_pop($instance);\n }\n else {\n $settings[$key][\"value\"] = $val;\n }\n if ($augment) {\n unset($c[\"sub_settings\"]);\n if (!isset($c[\"tab\"])) {\n // Supplement tab info.\n $c[\"tab\"] = \"module-reserved-tab\";\n }\n $settings[$key][\"config\"] = $c;\n $settings[$key][\"type\"] = $c[\"type\"];\n // File info.\n if ($c[\"type\"] == \"file\") {\n if ($repeats) {\n foreach ($val as $this_val) {\n $settings[$key][\"fileinfo\"][] = self::getFileInfo($this_val);\n }\n }\n else {\n $settings[$key][\"fileinfo\"] = self::getFileInfo($val);\n }\n }\n }\n } \n }",
"abstract protected function makeConfig();",
"protected function _initConfig() {\n\t\t$config = $this->ApiConfig->read();\n\t\tif (isset($config['exclude']) && is_array($config['exclude'])) {\n\t\t\tforeach ($config['exclude'] as $type => $exclusion) {\n\t\t\t\t$var = 'exclude' . Inflector::camelize($type);\n\t\t\t\t$this->{$var} = array_map('trim', explode(',', $exclusion));\n\t\t\t}\n\t\t}\n\t\tif (isset($config['file']['extensions'])) {\n\t\t\t$this->allowedExtensions = array_map('trim', explode(',', $config['file']['extensions']));\n\t\t}\n\t\tif (isset($config['file']['regex'])) {\n\t\t\t$this->fileRegExp = $config['file']['regex'];\n\t\t}\n\t\t$varMap = array('dependencies' => 'dependencyMap', 'mappings' => 'classMap');\n\t\tforeach ($varMap as $key => $var) {\n\t\t\tif (isset($config[$key]) && is_array($config[$key])) {\n\t\t\t\tforeach ($config[$key] as $name => $value) {\n\t\t\t\t\tif ($var == 'classMap') {\n\t\t\t\t\t\t$this->{$var}[$name] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->{$var}[$name] = array_map('trim', explode(',', $value));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function updateConfigValue($name, $value);",
"function extractConfig() {\n $configs = $this->getParameters();\n if (!empty($configs)) {\n foreach($configs as $k => $v) {\n if (isset($this->$k) && is_array($this->$k)) {\n // merge array, if already defined\n $this->$k = array_merge($this->$k, $v);\n } else {\n // for other types of values, just replace them\n $this->$k = $v;\n }\n }\n }\n }",
"public function set($config_name, $config_value)\n {\n $path = &$this->config;\n foreach (explode('.', $config_name) as $segment) {\n if (!isset($path[$segment])) {\n $path[$segment] = array();\n }\n $path = &$path[$segment];\n }\n $path = $config_value;\n }",
"public function __set($name, $value)\n {\n $cfg = $name === 'config'\n ? $value\n : array($name => $value);\n $this->debug->rootInstance->setCfg($cfg);\n }",
"function load_sqlconfig(&$config)\n{\n $config_defined = get_defined_settings(); // defined in config.php\n\n // Override some whitelisted definitions from config.php\n foreach ($config_defined as $key => $definition)\n {\n if (in_array($key, $config['definitions_whitelist']) && version_compare(PHP_VERSION, '5.3.0') >= 0 &&\n is_array($definition) && is_array($config[$key]))\n {\n $config[$key] = array_replace_recursive($config[$key], $definition);\n }\n }\n\n foreach (dbFetchRows(\"SELECT * FROM `config`\") as $item)\n {\n // Convert boo|bee|baa config value into $config['boo']['bee']['baa']\n $tree = explode('|', $item['config_key']);\n\n //if (array_key_exists($tree[0], $config_defined)) { continue; } // This complete skip option if first level key defined in $config\n\n // Unfortunately, I don't know of a better way to do this...\n // Perhaps using array_map() ? Unclear... hacky. :[\n // FIXME use a loop with references! (cf. nested location menu)\n switch (count($tree))\n {\n case 1:\n //if (isset($config_defined[$tree[0]])) { continue; } // Note, false for null values\n if (array_key_exists($tree[0], $config_defined)) { continue; }\n $config[$tree[0]] = unserialize($item['config_value']);\n break;\n case 2:\n if (isset($config_defined[$tree[0]][$tree[1]])) { continue; } // Note, false for null values\n $config[$tree[0]][$tree[1]] = unserialize($item['config_value']);\n break;\n case 3:\n if (isset($config_defined[$tree[0]][$tree[1]][$tree[2]])) { continue; } // Note, false for null values\n $config[$tree[0]][$tree[1]][$tree[2]] = unserialize($item['config_value']);\n break;\n case 4:\n if (isset($config_defined[$tree[0]][$tree[1]][$tree[2]][$tree[3]])) { continue; } // Note, false for null values\n $config[$tree[0]][$tree[1]][$tree[2]][$tree[3]] = unserialize($item['config_value']);\n break;\n case 5:\n if (isset($config_defined[$tree[0]][$tree[1]][$tree[2]][$tree[3]][$tree[4]])) { continue; } // Note, false for null values\n $config[$tree[0]][$tree[1]][$tree[2]][$tree[3]][$tree[4]] = unserialize($item['config_value']);\n break;\n default:\n print_error(\"Too many array levels for SQL configuration parser!\");\n }\n }\n}",
"public function it_should_be_able_to_dynamically_set_config_values()\n {\n $attachmentConfig = new AttachmentConfig('mockAttachment', ['styles' => []]);\n\n $attachmentConfig->foo = 'bar';\n\n $this->assertEquals('bar', $attachmentConfig->foo);\n }",
"protected function fillTree(array &$tree, array $config)\n {\n foreach ($config as $key => $value) {\n if (is_numeric($key)) {\n $searchIndex = false;\n if (isset($value[\"name\"])) {\n $column = array_column($tree, \"name\");\n $searchIndex = array_search($value[\"name\"], $column);\n }\n if ($searchIndex === false) {\n $tree[] = array();\n $actualKey = count($tree) - 1;\n } else {\n $actualKey = $searchIndex;\n }\n } else {\n $actualKey = $key;\n }\n\n if (is_array($value)) {\n if (!isset($tree[$actualKey])) {\n $tree[$actualKey] = array();\n }\n $this->fillTree($tree[$actualKey], $value);\n } else {\n $tree[$actualKey] = $value;\n }\n }\n }",
"protected function initStructureConfig() {\n $this->listId = $this->itemsArr['listIdentifier'];\n $this->structureByCols = t3lib_div::trimExplode(',', tx_pttools_div::getTS('plugin.tx_ptlist.listConfig.' . $this->listId . '.structureByCols'));\n tx_pttools_assert::isArray($this->structureByCols, array('message' => 'No structure by cols given for list configuration!'));\n $this->structureByHeaders = t3lib_div::trimExplode(',', tx_pttools_div::getTS('plugin.tx_ptlist.listConfig.' . $this->listId . '.structureByHeaders'));\n tx_pttools_assert::isArray($this->structureByHeaders, array('message' => 'No headers for structure by col given for list configuration!'));\n \n $this->concatString = tx_pttools_div::getTS('plugin.tx_ptlist.listConfig.' . $this->listId . '.concatString') != '' ?\n tx_pttools_div::getTS('plugin.tx_ptlist.listConfig.' . $this->listId . '.concatString') : ' - ';\n }",
"public function merge_config()\n {\n $current = $this->config;\n $this->config = array();\n\n foreach ($this->replaced_config as $prop => $replacement) {\n if (isset($current[$prop])) {\n if ($prop == 'skin_path') {\n $this->config[$replacement] = preg_replace('#skins/(\\w+)/?$#', '\\\\1', $current[$prop]);\n }\n else if ($prop == 'multiple_identities') {\n $this->config[$replacement] = $current[$prop] ? 2 : 0;\n }\n else {\n $this->config[$replacement] = $current[$prop];\n }\n }\n\n unset($current[$prop]);\n }\n\n foreach ($this->obsolete_config as $prop) {\n unset($current[$prop]);\n }\n\n // add all ldap_public sources having global_search enabled to autocomplete_addressbooks\n if (is_array($current['ldap_public'])) {\n foreach ($current['ldap_public'] as $key => $ldap_public) {\n if ($ldap_public['global_search']) {\n $this->config['autocomplete_addressbooks'][] = $key;\n unset($current['ldap_public'][$key]['global_search']);\n }\n }\n }\n\n $this->config = array_merge($this->config, $current);\n\n foreach (array_keys((array) $current['ldap_public']) as $key) {\n $this->config['ldap_public'][$key] = $current['ldap_public'][$key];\n }\n }",
"function load_sqlconfig(&$config)\n{\n $config_defined = get_defined_settings(); // defined in config.php\n\n // Override some whitelisted definitions from config.php\n foreach ($config_defined as $key => $definition)\n {\n if (in_array($key, $config['definitions_whitelist']) && version_compare(PHP_VERSION, '5.3.0') >= 0 &&\n is_array($definition) && is_array($config[$key]))\n {\n /* Fix mib definitions for dumb users, who copied old defaults.php\n where mibs was just MIB => 1,\n This definition should be array */\n // Fetch first element and validate that this is array\n if ($key == 'mibs' && !is_array(array_shift(array_values($definition)))) { continue; }\n\n $config[$key] = array_replace_recursive($config[$key], $definition);\n }\n }\n\n foreach (dbFetchRows(\"SELECT * FROM `config`\") as $item)\n {\n // Convert boo|bee|baa config value into $config['boo']['bee']['baa']\n $tree = explode('|', $item['config_key']);\n\n //if (array_key_exists($tree[0], $config_defined)) { continue; } // This complete skip option if first level key defined in $config\n\n // Unfortunately, I don't know of a better way to do this...\n // Perhaps using array_map() ? Unclear... hacky. :[\n // FIXME use a loop with references! (cf. nested location menu)\n switch (count($tree))\n {\n case 1:\n //if (isset($config_defined[$tree[0]])) { continue; } // Note, false for null values\n if (array_key_exists($tree[0], $config_defined)) { break; }\n $config[$tree[0]] = unserialize($item['config_value']);\n break;\n case 2:\n if (isset($config_defined[$tree[0]][$tree[1]])) { break; } // Note, false for null values\n $config[$tree[0]][$tree[1]] = unserialize($item['config_value']);\n break;\n case 3:\n if (isset($config_defined[$tree[0]][$tree[1]][$tree[2]])) { break; } // Note, false for null values\n $config[$tree[0]][$tree[1]][$tree[2]] = unserialize($item['config_value']);\n break;\n case 4:\n if (isset($config_defined[$tree[0]][$tree[1]][$tree[2]][$tree[3]])) { break; } // Note, false for null values\n $config[$tree[0]][$tree[1]][$tree[2]][$tree[3]] = unserialize($item['config_value']);\n break;\n case 5:\n if (isset($config_defined[$tree[0]][$tree[1]][$tree[2]][$tree[3]][$tree[4]])) { break; } // Note, false for null values\n $config[$tree[0]][$tree[1]][$tree[2]][$tree[3]][$tree[4]] = unserialize($item['config_value']);\n break;\n default:\n print_error(\"Too many array levels for SQL configuration parser!\");\n }\n }\n}",
"public function setExternalConfigurations(string $value): void{\n if(!$this->gotConfig) throw new ConfigurationsNotLoaded();\n else $this->ext_config = $value;\n }",
"function config($val = null){\n \n $default_val = null;\n if($val === null){\n $default_val = new out_config();\n }//if\n \n return $this->val('out_config_base::config',$val,$default_val);\n \n }",
"public static function test_the_config_getter()\n {\n config(['code_distortion.adapt.existing_value' => 'config value']);\n $propBag = (new LaravelPropBagDTO())->addProp('existingValue', 'prop value');\n self::assertSame(null, $propBag->adaptConfig('missing_value', 'missingValue'));\n self::assertSame('prop value', $propBag->adaptConfig('missing_value', 'existingValue'));\n self::assertSame('config value', $propBag->adaptConfig('existing_value', 'missingValue'));\n self::assertSame('prop value', $propBag->adaptConfig('existing_value', 'existingValue'));\n }",
"private function structify($value) {\n if (empty($value)) {\n return $value;\n } elseif ($this->is_associative_array($value)) {\n return array_reduce(array_keys($value), function ($memo, $key) use ($value) { $memo->offsetSet($key, $value[$key]); return $memo; }, new Open_Struct);\n } elseif ($this->is_list($value)) {\n return array_map(function ($value) { return $this->structify($value); }, $value);\n } else {\n return $value;\n }\n }",
"public function iFillInDynamicFieldWith($field, $value) {\n preg_match('/{([^}]*)}/', $value, $matches);\n $value = !empty($matches) && !empty($this->parameter_bag[$matches[1]])\n ? $this->parameter_bag[$matches[1]]\n : $value;\n\n $this->minkContext->fillField($field, $value);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the base row total for the order item. | public function getBaseRowTotal(); | [
"public function getBaseRowTotal() {\n return $this->item->getBaseRowTotal();\n }",
"protected function getOrderItemRowTotal($item = null)\n {\n if ($item === null) {\n $item = $this;\n }\n\n if (is_array($item)) {\n $item = new DataObject($item);\n }\n\n return $item->getRowTotal()\n + $item->getTaxAmount()\n + $item->getWeeeTaxAppliedRowAmount()\n - $item->getDiscountAmount();\n }",
"public function getRowTotal() {\n return $this->item->getRowTotal();\n }",
"public function calcRowTotal()\n {\n $invoice = $this->getInvoice();\n $orderItem = $this->getOrderItem();\n $orderItemQty = $orderItem->getQtyOrdered();\n\n $rowTotal = $orderItem->getRowTotal() - $orderItem->getRowInvoiced();\n $baseRowTotal = $orderItem->getBaseRowTotal() - $orderItem->getBaseRowInvoiced();\n $rowTotalInclTax = $orderItem->getRowTotalInclTax();\n $baseRowTotalInclTax = $orderItem->getBaseRowTotalInclTax();\n\n if (!$this->isLast()) {\n $availableQty = $orderItemQty - $orderItem->getQtyInvoiced();\n $rowTotal = $invoice->roundPrice($rowTotal / $availableQty * $this->getQty());\n $baseRowTotal = $invoice->roundPrice($baseRowTotal / $availableQty * $this->getQty(), 'base');\n }\n\n $this->setRowTotal($rowTotal);\n $this->setBaseRowTotal($baseRowTotal);\n\n if ($rowTotalInclTax && $baseRowTotalInclTax) {\n $this->setRowTotalInclTax($invoice->roundPrice($rowTotalInclTax / $orderItemQty * $this->getQty(), 'including'));\n $this->setBaseRowTotalInclTax($invoice->roundPrice($baseRowTotalInclTax / $orderItemQty * $this->getQty(), 'including_base'));\n }\n return $this;\n }",
"public function getBaseTotalAmount($item)\n {\n return $this->itemPriceRenderer->getBaseTotalAmount($item);\n }",
"public function calculate_order_total(){\r\n $this->order_total = 0;\r\n foreach($this->items as $item){\r\n $this->order_total += $this->getItemSubTotal($item);\r\n }\r\n $this->sales_tax_amount = ($this->order_total * $this->sales_tax);\r\n return $this->order_total + $this->sales_tax_amount;\r\n }",
"protected function getTotal(OrderItemInterface $order_item) {\n $total_price = $order_item->getTotalPrice();\n\n // Subtract the tax and promotion adjustments from line item total\n // if they are included in base price.\n foreach ($order_item->getAdjustments(['tax', 'promotion']) as $adjustment) {\n if ($adjustment->isIncluded()) {\n $total_price = $total_price->subtract($adjustment->getAmount());\n }\n }\n\n return $total_price->getNumber();\n }",
"public function getBaseRowTotalInclTax() {\n return $this->item->getBaseRowTotalInclTax();\n }",
"public function rawTotal()\n {\n $rawTotal = 0.00;\n foreach ($this->items as $item) {\n $rawTotal += $item->getPrice();\n }\n return $rawTotal;\n }",
"public function getBaseGrandTotal(){\n return $this->_get(self::BASE_GRAND_TOTAL);\n }",
"protected function get_order_total()\n {\n }",
"public function getBaseGrandTotal()\n {\n return $this->getData(self::KEY_BASE_GRAND_TOTAL);\n }",
"public function getBaseRowTotalInclTax();",
"public function getRowTotal();",
"public function getBaseSubtotal(){\n return $this->_getData(self::BASE_SUBTOTAL);\n }",
"public function getItemRowTotalHtml($item = null)\n {\n $block = $this->getLayout()->getBlock('item_row_total');\n if (!$item) {\n $item = $this->getItem();\n }\n $block->setItem($item);\n return $block->toHtml();\n }",
"public function getOrdertotal()\n {\n return $this->ordertotal;\n }",
"protected function getTotalItemAmount()\n {\n $total = 0;\n foreach ($this->items as $item) {\n $total += $item->quantity * $item->price;\n }\n return $total;\n }",
"public function getInvoiceItemPromotionTotal()\n {\n $total = array_reduce($this->invoiceItems->all(), function($carry, $item)\n {\n $carry += $item->getPromotionTotal();\n return $carry;\n }, 0);\n return $total;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
belongsTo relationship with ChargerConnectorType. | public function charger_connector_type()
{
return $this -> belongsTo( ChargerConnectorType :: class );
} | [
"public function charger_connector_types()\n {\n return $this -> hasMany(ChargerConnectorType::class);\n }",
"public function connector()\n {\n return $this->belongsTo('App\\\\SurveyConnector','connector_id');\n }",
"public function device_type () {\n return $this->belongsTo('App\\DeviceType');\n }",
"public function device(): BelongsTo\n {\n return $this->belongsTo(Device::class);\n }",
"public function branchType(): BelongsTo\n {\n return $this->belongsTo(OfficeBranchType::class, 'office_branch_type_id');\n }",
"public function type()\n {\n return $this->belongsTo(CarType::class, 'car_type_id');\n }",
"public function accountCurrencyType(){\n \treturn $this->belongsTo('App\\accountCurrencyType');\n }",
"public function car_type()\n {\n return $this->belongsTo('App\\Models\\CarType','car_id','id');\n }",
"public function labourType(): BelongsTo\n {\n return $this->belongsTo(LabourType::class, 'labour_type_id');\n }",
"public function type()\n {\n return $this->belongsTo(CustomerType::class, self::FIELD_ID_CUSTOMER_TYPE, CustomerType::FIELD_ID);\n }",
"public function cask()\n {\n return $this->belongsTo(Cask::class);\n }",
"function setChargerConnectorTypeId( $id )\n {\n $this -> chargerConnectorTypeId = $id;\n }",
"public function type()\n {\n return $this->belongsTo(CampaignType::class, 'campaign_type_id');\n }",
"public function clients_type()\n {\n return $this->belongsTo('App\\ClientsType', 'client_type_id');\n }",
"public function computer()\n {\n return $this->belongsTo(Computer::class);\n }",
"public function supplierBranch()\n {\n return $this->belongsTo(SupplierBranch::class);\n }",
"public function allowanceType(): BelongsTo\n {\n return $this->belongsTo(AllowanceType::class, 'allowance_type_id');\n }",
"public function circuit() {\n return $this->belongsTo('Circuit', 'circuitId', 'circuitId');\n }",
"public function phoneType()\n {\n return $this->belongsTo('App\\PhoneType', 'phone_type_id', 'id');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Functie: getAndereVacatures Doel: vind alle vacatures van een specifieke werkgever behalve de meegegeven vacature en ordert ze | public function getAndereVacatures($vacature) {
return $this->createQueryBuilder('v')
->andWhere('v.user = :val')
->setParameter('val', $vacature->getUser())
->andWhere('v.id != :self')
->setParameter('self', $vacature->getId())
->orderBy('v.datum DESC, v.id', 'DESC')
->getQuery()
->getResult();
} | [
"public function getAllVacatures() {\n return $this->createQueryBuilder('v')\n ->orderBy('v.datum DESC, v.id', 'DESC')\n ->getQuery()\n ->getResult();\n }",
"public function getAllVacatures(){\n return($this->findAll());\n }",
"function datosVac($idVacaciones){\n $pdo = new conexion();\n $query = $pdo->prepare(\"SELECT v.idVacation, v.FechaInicial, \"\n . \"v.FechaFinal, v.cantidad, v.Estado, e.nombre, \"\n . \"e.apellidoPaterno, e.apellidoMaterno FROM vacaciones v \"\n . \"join empleado e on e.idEmpleado = v.idEmpleado WHERE \"\n . \"idVacation = $idVacaciones;\");\n $query ->execute();\n $res = $query->fetchAll();\n foreach ($res as $value) {\n $this->idVacaciones=$value['idVacation'];\n $this->FechaIni = $value['FechaInicial'];\n $this->FechaFin = $value['FechaFinal'];\n $this->cantidad = $value['cantidad'];\n $this->Estado = $value['Estado'];\n $this->idEmpleado = $value['apellidoPaterno'].\" \".\n $value['apellidoMaterno'].\" \".$value['nombre'];\n }\n \n }",
"public function vacunas_aplicarFiltrosVacunas($fechaInicial, $fechaFinal, $fechaInicialProximo, $fechaFinalProximo, $idVacuna, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif($idVacuna != '0'){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idVacuna = '$idVacuna' \";\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($fechaInicial != \"\" AND $fechaFinal != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fecha BETWEEN '$fechaInicial' AND '$fechaFinal')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($fechaInicialProximo != \"\" AND $fechaFinalProximo != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND ( V.fechaProximoDesparasitante BETWEEN '$fechaInicialProximo' AND '$fechaFinalProximo')\";\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($idPropietario != \"0\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND P.idPropietario = '$idPropietario' \";\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($paciente != \"\"){\n\t\t\t\t\n\t\t\t\t$adicionQuery .= \" AND V.idMascota = '$paciente' \";\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$query = \" SELECT \n\t\t\t\t\t\t V.idMascotaVacunas,\n\t\t\t\t\t\t V.fecha,\n\t\t\t\t\t\t DATE_FORMAT(V.hora, '%H:%i') as hora,\n\t\t\t\t\t\t V.fechaProximaVacuna,\n\t\t\t\t\t\t V.observaciones,\n\t\t\t\t\t\t V.idVacuna,\n\t\t\t\t\t\t VV.nombre as nombreVacuna,\n\t\t\t\t\t\t M.nombre AS nombreMascota,\n\t\t\t\t\t\t M.sexo AS sexoMascota,\n\t\t\t\t\t\t P.identificacion AS identificacionPropietario,\n\t\t\t\t\t\t P.nombre AS nombrePropietario,\n\t\t\t\t\t\t P.apellido AS apellidoPropietario,\n\t\t\t\t\t\t P.telefono\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t tb_mascotas_vacunas AS V\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_mascotas AS M ON V.idMascota = M.idMascota\n\t\t\t\t\t\t \tINNER JOIN\n\t\t\t\t\t\t tb_vacunas AS VV ON V.idVacuna = VV.idVacuna\n\t\t\t\t\t\t INNER JOIN\n\t\t\t\t\t\t tb_propietarios AS P ON P.idPropietario = M.idPropietario\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\".$adicionQuery.\"\n\t\t\t\t\t\t\n\t\t\t\t\t\tGROUP BY (V.idMascotaVacunas)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tORDER BY (V.idMascotaVacunas) DESC; \";\n\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n\t\t\t\n }",
"public function getVacations()\n {\n return $this->hasMany(Vacation::className(), ['id' => 'id']);\n }",
"public function getRecentVacatures(){\n return $this->createQueryBuilder('v')->orderBy('v.datum', 'DESC')->setMaxResults(5)->getQuery()->getResult();\n }",
"public function listVacancy()\n {\n $vacancies = Vacancy::whereDoesntHave('careers', function ($query) {\n $query->where('user_id', '=', auth()->user()->id);\n })->where('expired', '>', now())->orderBy('id', 'desc')->get();\n return json($vacancies->makeHidden(['created_at', 'updated_at', 'deleted_at']));\n }",
"public function getVentasAutorizadas()\n {\n $ventas = Venta::where(\"estado\", \"=\", 2)->get();\n return $ventas;\n }",
"public function getDataVacinacao()\n {\n return $this->dataVacinacao;\n }",
"public function getAbastecimentos() {\n\n $aAbastecimentos = array();\n $oDaoAbastecimento = new cl_veicabast;\n $sWhere = \"ve70_veiculos = {$this->iCodigo}\";\n $sSqlQueryAbastecimento = $oDaoAbastecimento->sql_query_file(null, \"ve70_codigo\", \"ve70_codigo desc\", $sWhere);\n $rsAbastecimento = $oDaoAbastecimento->sql_record($sSqlQueryAbastecimento);\n for ($i = 0; $i < $oDaoAbastecimento->numrows; $i++) {\n\n $oAbastecimento = new AbastecimentoVeiculo(db_utils::fieldsMemory($rsAbastecimento, $i)->ve70_codigo);\n $aAbastecimentos[] = $oAbastecimento;\n }\n return $aAbastecimentos;\n }",
"function vacationExplode($vacationDays){\n $arrVacation = [];\n $arrStart = explode(' ', $vacationDays->start);\n $arrEnd = explode(' ', $vacationDays->end);\n $startDate = $arrStart[0];\n $endDate = $arrEnd[0];\n $rawShift = DB::table('users')->find(Auth::user()->id)->shift;\n $rawArrShift = explode('-', $rawShift);\n $arrShift = [];\n foreach($rawArrShift as $ras){\n $sp = DB::table('session')->find($ras);\n array_push($arrShift, $ras, $sp->start, $sp->end);\n }\n for($thisDate = strtotime($startDate); $thisDate <= strtotime($arrEnd[0]); $thisDate += 24*60*60){\n if( $thisDate == strtotime($startDate) ){\n $startTime = $arrStart[1];\n for($y = 0; $y < count($arrShift); $y += 3){\n if($startDate == $endDate){\n $endTime = $arrEnd[1];\n if(strtotime($endTime) <= strtotime($arrShift[$y+1])){\n break;\n }elseif( strtotime($endTime) > strtotime($arrShift[$y+1]) && strtotime($endTime) <= strtotime($arrShift[$y+2]) ){\n if(strtotime($startTime) <= strtotime($arrShift[$y+1])){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+1],\n 'end' => date('Y-m-d', $thisDate) . ' ' .$endTime,\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n }elseif(strtotime($startTime) > strtotime($arrShift[$y+1])){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$startTime,\n 'end' => date('Y-m-d', $thisDate) . ' ' .$endTime,\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n }\n break;\n }\n }\n if( strtotime($startTime) <= strtotime($arrShift[$y+1]) ){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+1],\n 'end' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+2],\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n }elseif( strtotime($startTime) > strtotime($arrShift[$y+1]) && strtotime($startTime) < strtotime($arrShift[$y+2]) ){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$startTime,\n 'end' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+2],\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n }elseif( strtotime($startTime) >= strtotime($arrShift[$y+2]) ){\n continue;\n }\n }\n }elseif($thisDate < strtotime($endDate)){\n for($y = 0; $y < count($arrShift); $y += 3){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+1],\n 'end' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+2],\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n }\n }elseif($thisDate == strtotime($endDate)){\n $endTime = $arrEnd[1];\n for($y = 0; $y < count($arrShift); $y += 3){\n if( strtotime($endTime) <= strtotime($arrShift[$y+1]) ){\n break;\n }elseif( strtotime($endTime) > strtotime($arrShift[$y+1]) && strtotime($endTime) <= strtotime($arrShift[$y+2]) ){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+1],\n 'end' => date('Y-m-d', $thisDate) . ' ' .$endTime,\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n break;\n }elseif( strtotime($endTime) > strtotime($arrShift[$y+2]) ){\n $obj = (object)[\n 'start' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+1],\n 'end' => date('Y-m-d', $thisDate) . ' ' .$arrShift[$y+2],\n ];\n $obj->spent = (strtotime($obj->end) - strtotime($obj->start))/60;\n $obj->type = Constants::OFF_VACATION;\n array_push($arrVacation, $obj);\n }\n }\n }\n }\n return $arrVacation;\n }",
"function ListarVentas()\n\t{\n\t\t$sql = \"SELECT V.idventa, DATE(V.fecha_hora) as fecha, V.idcliente, P.nombre as cliente, \t\t\t\t V.idusuario, U.nombre as usuario, V.tipo_comprobante, V.serie_comprobante, \t\t\t\t\t V.num_comprobante, V.total_venta, V.impuesto, V.estado \n\t\t\t\tFROM venta V INNER JOIN persona P ON V.idcliente=P.idpersona \n\t\t\t\t\t\t\t INNER JOIN usuario U ON V.idusuario=U.idusuario\n\t\t\t\tORDER BY V.idventa desc\";\n\t\treturn EjecutarConsulta($sql);\n\t}",
"public function vacantes()\n {\n return $this->hasMany('App\\BolsaEmpleo\\Vacante', 'puesto_id', 'id');\n }",
"public function vacancies() {\n\t\t$calendars = Calendar::with( 'user' )->get();\n\t\t$jobs = Job::with( [\n\t\t\t'practice',\n\t\t\t'practice.user',\n\t\t] )->where( 'completed', FALSE )->get();\n\t\t\n\t\t$merged = $calendars->merge( $jobs );\n\t\t$merged = $merged->sortByDesc( 'created_at' )->take( 6 );\n\t\t\n\t\treturn response()->myJson( 200, 'Successfully get latest vacancies.', $merged );\n\t}",
"public function get_vagas(){\n\t\t\t$vagas = array();\n\t\t\t$criteria=new Criteria;\n\t\t\t$criteria->add(new Filter('id_empresa','=',$this->id));\n\t\t\t$repo= new Repository('Vaga');\n\t\t\t$vinculos = $repo->load($criteria);\n\t\t\tif ($vinculos){\n\t\t\t\tforeach ($vinculos as $vinculo){\n\t\t\t\t\t$vagas[] = new Vaga($vinculo->id);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $vagas;\n\t\t}",
"public function actionVacaciones_periodicas($id){\n $funcionario = $this->findFuncionario($id);\n $query = Calculo::find();\n $fecha_base = new \\DateTime('2015-01-01');\n $fecha_actual = new \\DateTime(date('Y-m-d'));\n $fecha_ingreso = new \\DateTime($funcionario->Fun_FechaIngreso);\n $saldoAcumuladoL =0;\n $saldoAcumuladoC =0;\n // da el ultimo calculo realizado\n $calculoAnterior = $query->select('Cal_FechaFin')->from('calculo')->where(['Fun_Id' => $id,'activo'=>true])->orderBy('Cal_FechaFin DESC')->scalar();\n if ($calculoAnterior != null ){ //si ya tiene un calculo anterior\n\n //-- sumara saldos anteriores y calcular nuevo periodo\n $fechas = $this->calcularIntervalo($fecha_ingreso,$calculoAnterior);\n $fecha_fin = new \\DateTime($fechas['fecha_fin']);\n $fecha_inicio = new \\DateTime($fechas['fecha_inicio']);\n\n $valores['fecha_inicio'] = $fechas['fecha_inicio'];\n $valores['fecha_fin'] = $fechas['fecha_fin'];\n\n //-- saldo anterior\n $saldoAcumuladoL =$this->vac_lab($id);\n $saldoAcumuladoC =$this->vac_cal($id);\n $valores['vac_acu_cal'] = $saldoAcumuladoC;\n $valores['vac_acu_lab'] = $saldoAcumuladoL;\n\n }else { // si es primera vez\n\n if ($fecha_ingreso > $fecha_base){ //-- ingreso en este periodo\n\n\n $fechas = $this->calcularIntervalo($fecha_ingreso,null);\n $fecha_fin = new \\DateTime($fechas['fecha_fin']);\n $fecha_inicio = new \\DateTime($fechas['fecha_inicio']);\n $valores['fecha_inicio'] = $fechas['fecha_inicio'];\n $valores['fecha_fin'] = $fechas['fecha_fin'];\n\n\n //-- saldo anterior\n $valores['vac_acu_lab'] = $saldoAcumuladoL;\n $valores['vac_acu_cal'] = $saldoAcumuladoC;\n\n } else { // ingreso antes de este periodo\n //-- sin soporte aun\n }\n }\n //anio\n $valores['anio'] = $fecha_inicio->format('Y');\n\n // no existe dias de antiguedad\n $valores['dias_ley_lab'] = 0;\n $valores['dias_ley_cal'] = 0;\n\n //-- dias por ley\n $diasCalendario=$this->diasTrancurridos($fecha_inicio,$fecha_fin);\n $diasLaborales=(22*$diasCalendario)/30;\n $diasLaborales =number_format($diasLaborales, 2, '.', ' ');\n $valores['vac_dias_cal'] = $diasCalendario;\n $valores['vac_dias_lab'] = $diasLaborales;\n\n // calculo de permisos\n $getPermisos=$this->getPermisos($id,$fechas['fecha_inicio'],$fechas['fecha_fin']);\n $totalPermisoCalendario =$getPermisos['tot_cal'];\n $totalPermisosLaborales =$getPermisos['tot_lab'];\n $valores['num_per_cal']= $totalPermisoCalendario;\n $valores['num_per_lab']= $totalPermisosLaborales;\n\n //-- sub total\n $valores['calculo_cal_diascal']=$diasCalendario - $totalPermisoCalendario;\n $valores['calculo_cal_diaslab']=$diasLaborales - $totalPermisosLaborales;\n $subTotalC =$valores['calculo_cal_diascal'];\n $subTotalL =$valores['calculo_cal_diaslab'];\n\n /** si la fecha de ingreso sumado un periodo es igual o menor\n * a la fecha actual permite guardar el periodo\n * de lo contrario no permite\n */\n if ($fecha_fin <= $fecha_actual){\n $valores['guardar']=1;\n }else {\n $valores['guardar']=0;\n }\n\n $valores['calculo_cal_salcal']=$subTotalC+$saldoAcumuladoC;\n $valores['calculo_cal_sallab']=$subTotalL+$saldoAcumuladoL;\n echo json_encode($valores);\n }",
"function vacaciones($fecha,$dias,$sabadoh,$cod_epl){\n\t\n\t// si es sabado == 0 no cuenta el sabado habil si es 1 lo cuenta\n\t//echo $sabadoh; die(\"sabado\");\n\t\n\t $flag1=0; \n\t \n\t \n\t //echo $sabadoh; die(\"hola\");\n\t \n\t if($sabadoh==0){ // para que no cuente los sabados \n\t\t\n\t\t$flag2=0;\n\t }else{\n\t \n\t\t$flag2=1;\n\t }\n\t \n\t\n\t$dias=$dias -1; // 14\n\t\n\twhile($dias>0){ // inicio de while 1 > 0 \n\t\t \n\t\t$dias--; // dias == 0\n\t\t\n\t\t\n\t\tif($flag1==0){\n\t\t\n\t\t\t $festivo=verificar_festivos($cod_epl,$fecha); // 10-10-2013\n\t\t\t \n\t\t\t date_default_timezone_set(\"America/Bogota\");\n\t\t\t $fecha=(int)strtotime($fecha);\n\t\t\t \n\t\t\tif($festivo ==1 || ($flag2==0 && date('l', $fecha) == 'Saturday')){\n\t\t\t\n\t\t\t\t$fecha= $fecha + 24*60*60;//un dia\n\t\t\t\t \n\t\t\t\t$dias++;\n\t\n\t\t\t}else if($flag2==1 && date('l', $fecha) == 'Saturday'){\n\t\t\t\t\n\t\t\t\t$fecha= $fecha + 24*60*60;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$fecha= $fecha + 24*60*60;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$fecha=date('d-m-Y',$fecha);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif($dias==0){ // si el ultimo dia tambien cae un festivo\n\t\t\t\n\t\t\t\n\t\t\t$flag1=1;\n\t\t\t\n\t\t\t\n\t\t\t$festivo=verificar_festivos($cod_epl,$fecha);\t\n\t\t\t\n\t\t \n\t\t\t\n\t\t\t$fecha= strtotime($fecha);\n\t\t\t\n\t\t\tif($festivo ==1 || ($flag2==0 && date('l', $fecha) == 'Saturday') ){\n\t\t\t\n\t\t\t\t$fecha= $fecha\t+ 86400;\n\t\t\t\t\n\t\t\t\t$dias++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$fecha=date('d-m-Y',$fecha);\n\t\t}\n\t\t\t\n\t}// fin de while\n\t\n\t\t\n\treturn $fecha;\n\t\n\n\n}",
"public function getVacationDays(): int;",
"function haarlem_tangram_get_external_vacancies() {\n\t$result = false;\n\t\n\t$xml = haarlem_tangram_get_xml();\n\tif (empty($xml)) {\n\t\treturn false;\n\t}\n\t\n\tforeach ($xml->Vacature as $vacancy) {\n\t\t// is it interal\n\t\tif (empty($vacancy->Administratie->Datum_publ_bpstart)) {\n\t\t\tcontinue;\n\t\t}\n\t\n\t\t$start_date = strtotime($vacancy->Administratie->Datum_publ_bpstart);\n\t\tif ($start_date > time()) {\n\t\t\t// no yet open\n\t\t\tcontinue;\n\t\t}\n\t\n\t\t// check end date\n\t\tif (!empty($vacancy->Administratie->Datum_publ_stop)) {\n\t\t\t$end_date = strtotime($vacancy->Administratie->Datum_publ_stop);\n// \t\t\tif ($end_date < time()) {\n// \t\t\t\t// already ended\n// \t\t\t\tcontinue;\n// \t\t\t}\n\t\t}\n\t\n\t\t$result[] = haarlem_tangram_xml_vacancy_to_entity($vacancy);\n\t}\n\t\n\treturn $result;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// Get all products_id in a Category and its SubCategories use as: $my_products_id_list = array(); $my_products_id_list = zen_get_categories_products_list($categories_id) | function zen_get_categories_products_list($categories_id, $include_deactivated = false, $include_child = true, $parent_category = '0', $display_limit = '') {
global $db;
global $categories_products_id_list;
$childCatID = str_replace('_', '', substr($categories_id, strrpos($categories_id, '_')));
$current_cPath = ($parent_category != '0' ? $parent_category . '_' : '') . $categories_id;
$sql = "select p.products_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$childCatID . "'" .
($include_deactivated ? " and p.products_status = 1" : "") .
$display_limit;
$products = $db->Execute($sql);
while (!$products->EOF) {
$categories_products_id_list[$products->fields['products_id']] = $current_cPath;
$products->MoveNext();
}
if ($include_child) {
$sql = "select categories_id from " . TABLE_CATEGORIES . "
where parent_id = '" . (int)$childCatID . "'";
$childs = $db->Execute($sql);
if ($childs->RecordCount() > 0 ) {
while (!$childs->EOF) {
zen_get_categories_products_list($childs->fields['categories_id'], $include_deactivated, $include_child, $current_cPath, $display_limit);
$childs->MoveNext();
}
}
}
return $categories_products_id_list;
} | [
"function fn_twg_get_category_product_ids($category_id, $get_sub = false)\n{\n if (empty($category_id)) {\n return false;\n }\n\n $_categories[] = $category_id;\n\n if ($get_sub) {\n\n $category_params = array (\n 'id' => !empty($category_id) ? $category_id : 0,\n 'type' => 'plain_tree'\n );\n\n $categories = fn_twg_api_get_categories($category_params);\n\n if (!empty($categories)) {\n foreach ($categories['category'] as $category) {\n $_categories[] = $category['category_id'];\n }\n }\n }\n\n $ids = !empty($_categories)?\n db_get_fields(\n \"SELECT l.product_id\n FROM ?:products_categories AS l\n LEFT JOIN ?:products AS p\n ON p.product_id = l.product_id\n WHERE l.category_id IN(?a) AND l.link_type = 'M' AND p.status = 'A'\n ORDER BY l.position\",\n $_categories\n ):\n array();\n\n return $ids;\n}",
"private static function get_product_ids_in_categories_to_display() {\n\t\t$category_ids = self::get_category_ids_to_display();\n\t\t$product_ids = get_objects_in_term( $category_ids, 'product_cat' );\n\n\t\tif ( empty( $category_ids ) || empty( $product_ids ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn wc_get_products( array(\n\t\t\t'return' => 'ids',\n\t\t\t'include' => $product_ids,\n\t\t) );\n\t}",
"function get_products_categories_id($products_id)\n{\n $cate_query=tep_db_query(\"select categories_id from \" . TABLE_PRODUCTS_TO_CATEGORIES . \" where products_id='\". (int)$products_id . \"'\");\n $cate = tep_db_fetch_array($cate_query);\n return $cate['categories_id'];\n}",
"function get_all_category_ids()\n{\n}",
"public function getProductsBySubCatId($sub_cat_id){\n \t \n\t $sql=\"SELECT * FROM `\".$this->table_product_sub_categories.\"`, `\".$this->table_products.\"` \n\t\t WHERE\n\t\t `\".$this->table_products.\"` .`id` = `\".$this->table_product_sub_categories.\"`.`pro_id` \n AND `\".$this->table_product_sub_categories.\"`.`sub_cat_id`='$sub_cat_id' \";\n\t $products_list = $this->BlankModel->customQuery($sql);\n\t return $products_list;\t\n\t\n\t}",
"function zen_get_categories_name_from_product($product_id) {\r\n global $db;\r\n\r\n $check_products_category= $db->Execute(\"select products_id, categories_id from \" . TABLE_PRODUCTS_TO_CATEGORIES . \" where products_id='\" . $product_id . \"' limit 1\");\r\n $the_categories_name= $db->Execute(\"select categories_name from \" . TABLE_CATEGORIES_DESCRIPTION . \" where categories_id= '\" . $check_products_category->fields['categories_id'] . \"' and language_id= '\" . $_SESSION['languages_id'] . \"'\");\r\n\r\n return $the_categories_name->fields['categories_name'];\r\n}",
"function get_all_category_ids() {}",
"function get_category_products($_cat_id)\n {\n $this->db->where(products__cat_id, $_cat_id);\n $q = $this->db->get($this->products_table);\n return $q->result();\n }",
"public function getIdsCategories(){\r\n $cookie = $this->context->cookie;\r\n $cat = new Category();\r\n $list_cat = $cat->getCategories($cookie->id_lang);\r\n $current_cat = Category::getRootCategory()->id;\r\n $cat_ids = $this->recurseCategoryIds($list_cat, $list_cat, $current_cat);\r\n $cat_ids = implode(\",\",$cat_ids);\r\n return $cat_ids;\r\n /// get all category ids ///\r\n }",
"public function get_products_categories() {\n\t\t\t\treturn parent::get_products_categories();\n\t\t\t}",
"public function getCategories()\n\t{\n\t\t$ret = array();\n\t\tif ($row = Db::getInstance()->getAll('\n\t\tSELECT `id_category` FROM `'.DB_PREFIX.'product_to_category`\n\t\tWHERE `id_product` = '.(int)$this->id)\n\t\t)\n\t\t\tforeach ($row as $val)\n\t\t\t\t$ret[] = $val['id_category'];\n\t\treturn $ret;\n\t}",
"public function actionProductListInCategory()\n\t{\n\t\t$category_id = (isset($_REQUEST['id']))? $_REQUEST['id'] : 0;\n\t\t\n\t\t// get this category info\n\t\t$category = Category::model()->findByPk($category_id);\n\t\t\n\t\t// ancestor category\n\t\t$breadcrumbs = array();\n\t\tif(!empty($category)){\n\t\t\t\n\t\t\t$breadcrumbs = array(\n\t\t\t\t$category->name \n\t\t\t);\n\t\t\t$parentCategoryId = $category->parent_id;\n\t\t\t\n\t\t\twhile ( $parentCategory = Category::model()->findByPk($parentCategoryId) ) {\n\t\t\t\t\n\t\t\t\tif(empty($parentCategory))\tbreak;\n\t\t\t\t$breadcrumbs[$parentCategory->name] = array(\"shop/productListInCategory\", 'id'=>$parentCategory->id);\n\t\t\t\t$parentCategoryId = $parentCategory->parent_id;\n\n\t\t\t}\n\n\t\t\t$breadcrumbs = array_reverse($breadcrumbs);\n\t\t}\n\t\t\n\t\t// find child categories\n\t\t$childCategories = Category::model()->findAll('parent_id=:parent_id', array(':parent_id'=>$category_id));\n\t\t\n\t\t// find products in category\n\t\t$products = Product::model()->with(array(\n\t\t\t'productCategoryRefs'=>array(\n\t\t\t\t'condition'=>'category_id=:category_id', \n\t\t\t\t'params'=>array(':category_id'=>$category_id), \n\t\t\t), \n\t\t\t'productImageRefs', \n\t\t))->findAll();\n\t\t\n\t\t$this->render('productListInCategory', array(\n\t\t\t'breadcrumbs'=>$breadcrumbs, \n\t\t\t'category'=>$category, \n\t\t\t'childCategories'=>$childCategories, \n\t\t\t'products'=>$products, \n\t\t));\n\t\t\n\t}",
"function question_categorylist($categoryid) {\n // returns a comma separated list of ids of the category and all subcategories\n $categorylist = $categoryid;\n if ($subcategories = get_records('question_categories', 'parent', $categoryid, 'sortorder ASC', 'id, 1 AS notused')) {\n foreach ($subcategories as $subcategory) {\n $categorylist .= ','. question_categorylist($subcategory->id);\n }\n }\n return $categorylist;\n}",
"public function getSubCategoryIds()\n {\n // Fetch from database, if not set\n if (!isset($this->_sub_categories)){\n $result = Capsule::table('venue_sub_category')->select('sub_category_id')->where('venue_id', $this->id)->get();\n\n $this->_sub_categories = [];\n foreach ($result as $sub_category){\n $this->_sub_categories[] = $sub_category->sub_category_id;\n }\n }\n return $this->_sub_categories;\n }",
"public function getCategoryProducts()\n {\n return $this->db->get('category_products')->result_array();\n }",
"function PaopackGetProductsViaSubcategoryId($SubcatId){\r\n \t $db=$this->CheckConnection();\r\n\t\t if($db){\r\n\t\t \t $QueryToFetchProductDetails = $db->query(\"select * from tbl_pao_products where subcategory_id = '$SubcatId'\");\r\n\t\t\t $json_products=array();\r\n\t\t\t\tif($QueryToFetchProductDetails->num_rows>0){\r\n\t\t\t\t \twhile($ProductDetails = $QueryToFetchProductDetails->fetch_array()){\r\n\t\t\t\t \t\t$CategoryId=$ProductDetails['category_id'];\r\n\t\t\t\t \t\t$CategoryName = $this->GetCategoryName($ProductDetails['category_id']);\r\n\t\t\t\t\t\t$ProductName = $ProductDetails['product_name'];\r\n\t\t\t\t\t\t$ProductWt = $ProductDetails['product_wt'];\r\n\t\t\t\t\t\t$ProductPrice = $ProductDetails['product_price'];\r\n\t\t\t\t\t\t$ProductId = $ProductDetails['product_id'];\r\n\t\t\t\t\t\t$ProductImage = !empty($ProductDetails['product_image'])?$ProductDetails['product_image']:\"images/products/no_product_img.jpg\";\r\n\t\t\t\t\t\t$ProductDiscountedPrice = $ProductDetails['product_discount'];\r\n\t\t\t\t\t\t$json_products[]=array(\"Status\"=>\"Success\",\"CategoryName\"=>$CategoryName,\"ProductName\"=>$ProductName,\"ProductWt\"=>$ProductWt,\"ProductPrice\"=>$ProductPrice,\"ProductDiscount\"=>$ProductDiscountedPrice,\"ProductId\"=>$ProductId,\"CategoryId\"=>$CategoryId,\"ProductImage\"=>$ProductImage);\r\n\t\t\t\t \t}\r\n\t\t\t\t\treturn json_encode($json_products);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn json_encode($json_products);\r\n\t\t\t\t}\r\n\t\t }\r\n }",
"function get_category_list($level, $category_id){\r\n\r\n\t\t$db \t= new DB;\r\n\t\t$menu = $_SESSION[\"menu\"];\r\n\r\n\t\tif($level>0){\r\n\t\t\t$req = \"\r\n\t\t\t\tSELECT distinct c.category_name,c.category_id\r\n\t\t\t\tFROM category c, product_category pc, product p\r\n\t\t\t\tWHERE c.category_status=1 AND\r\n\t\t\t\tc.category_parent='$category_id'\r\n\t\t\t\tAND p.product_id=pc.product_id\r\n\t\t\t\tAND c.category_id=pc.category_id\r\n\t\t\t\tAND p.product_status=2\r\n\t\t\t\tORDER BY c.category_name ASC\";\r\n\t\t}else{\r\n\t\t\t$req = \"\r\n\t\t\t\tSELECT category_name,category_id FROM category\r\n\t\t\t\tWHERE category_status=1 AND\r\n\t\t\t\tcategory_parent=0\r\n\t\t\t\tORDER BY category_name ASC\";\r\n\t\t}\r\n\r\n\t\t$db->query($req);\r\n\t\t$i = 0;\r\n\t\twhile ($db->next_record()) {\r\n\t\t\t$menu[\"idx\"] = $i;\r\n\t\t\t$cat_id = $db->f(\"category_id\");\r\n\t\t\t$menu[$menu[\"idx\"]][\"id\"] \t= $cat_id;\r\n\t\t\t$menu[$menu[\"idx\"]][\"name\"] = $db->f(\"category_name\");\r\n\t\t\tif($level>0){\r\n\t\t\t\t$menu[$menu[\"idx\"]][\"indent\"] = true;\r\n\t\t\t}else{\r\n\t\t\t\t$menu[$menu[\"idx\"]][\"indent\"] = false;\r\n\t\t\t}\r\n\t\t\t$this->get_category_list(\"1\",$cat_id);\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$menu[\"idx\"]++;\r\n\r\n\t\t$_SESSION[\"menu\"] = $menu;\r\n\t\treturn True;\r\n\t}",
"public function getCategoriesByProductIds(array $productIds) {\n\n// SELECT * FROM category c INNER JOIN product_category pc ON c.category_id = pc.product_category_category_id WHERE pc.product_category_product_id IN(14661)\n\n $select = $this->getDbTable()\n ->select()\n ->setIntegrityCheck(false)\n ->from(array('c' => 'category'))\n ->join(array('pc' => 'product_category'), 'c.category_id = pc.product_category_category_id')\n ->where('pc.product_category_product_id IN(?)', $productIds);\n\n// echo $select->__toString();die;\n\n $rows = $this->getDbTable()->fetchAll($select);\n\n $entries = array();\n foreach ($rows as $row) {\n $category = new Admin_Model_Category();\n\n $category->setOptions($row->toArray());\n\n// echo $category->getCategory_id();die;\n if ($category->getCategory_parent()) {\n $parentStructure = $this->getParents($category->getCategory_parent(), $category->getCategory_name());\n $category->setCategory_structure($parentStructure);\n } else {\n $category->setCategory_structure($category->getCategory_name());\n }\n\n\n $entries[$row->product_category_product_id][] = $category;\n }\n\n return $entries;\n }",
"public function getSubProducts()\n\t{\n\t\t$subProducts = (new \\App\\Db\\Query())->select(['vtiger_products.productid'])->from(['vtiger_products'])\n\t\t\t->innerJoin('vtiger_crmentity', 'vtiger_crmentity.crmid = vtiger_products.productid')\n\t\t\t->leftJoin('vtiger_seproductsrel', 'vtiger_seproductsrel.crmid = vtiger_products.productid AND vtiger_products.discontinued = :p1 AND vtiger_seproductsrel.setype= :p2', [':p1' => 1, ':p2' => 'Products'])\n\t\t\t->where(['vtiger_crmentity.deleted' => 0, 'vtiger_seproductsrel.productid' => $this->getId()])\n\t\t\t->column();\n\t\t$subProductList = [];\n\t\tforeach ($subProducts as $productId) {\n\t\t\t$subProductList[] = Vtiger_Record_Model::getInstanceById($productId, 'Products');\n\t\t}\n\n\t\treturn $subProductList;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test getting checkbox values for all possible configurations. | public function testCheckboxValues() {
$self = $this;
$values = function ($display, $no_is_optout, $disable_optin) use ($self) {
$c = $self->getComponent([
'display' => $display,
'no_is_optout' => $no_is_optout,
'disable_optin' => $disable_optin,
]);
return Values::checkboxValues($c);
};
list($i, $o, $n) = ['opt-in', 'opt-out', 'no-change'];
$this->assertEqual([$i, $n], $values('checkbox', FALSE, FALSE));
$this->assertEqual([$i, $o], $values('checkbox', TRUE, FALSE));
$this->assertEqual([$n, $o], $values('checkbox', TRUE, TRUE));
$this->assertEqual([$i, $n], $values('checkbox', FALSE, TRUE));
$this->assertEqual([$n, $i], $values('checkbox-inverted', FALSE, FALSE));
$this->assertEqual([$o, $i], $values('checkbox-inverted', TRUE, FALSE));
$this->assertEqual([$o, $n], $values('checkbox-inverted', TRUE, TRUE));
$this->assertEqual([$n, $i], $values('checkbox-inverted', FALSE, TRUE));
} | [
"public function test_parse_checkbox()\n\t{\n\t\t$id = '';\n\t\t$input = array();\n\t\t$object = LiteSpeed_Cache::config();\n\t\t$options = $object->get_options();\n $bool = LiteSpeed_Cache_Admin::parse_checkbox($id, $input, $options);\n \t$this->assertFalse($bool);\t\n\t}",
"public function testMultipleCheckboxesDisplayCorrectly()\n {\n $data = [\n 'name' => 'someCheckbox',\n 'labelText' => 'Choose option(s)',\n 'options' => [\n 'option1' => 'Option 1',\n 'option2' => 'Option 2',\n ],\n 'values' => ['option1'],\n ];\n\n $dom = new DOMDocument();\n $dom->loadHTML($this->renderBladeView('checkbox', $data));\n\n $inputContainers = $dom->getElementsByTagName('label');\n $spans = $dom->getElementsByTagName('span');\n\n foreach($data['options'] as $optionKey => $optionText) {\n $inputContainer = Arr::first($inputContainers, function ($inputContainer) use ($data, $optionKey) {\n return $inputContainer->getAttribute('for') === \"{$data['name']}[{$optionKey}]\";\n });\n $this->assertNotNull($inputContainer);\n\n $span = Arr::first($spans, function ($span) use ($optionText) {\n return $span->textContent === $optionText;\n });\n $this->assertNotNull($span);\n\n $input = $dom->getElementById(\"{$data['name']}[{$optionKey}]\");\n $this->assertNotNull($input);\n\n if (in_array($optionKey, $data['values'])) {\n $this->assertTrue($input->hasAttribute('checked'));\n }\n }\n }",
"public function testCheckboxes() {\n\t\t$slug = 'checkboxes';\n\n\t\t$choices = array(\n\t\t\tarray(\n\t\t\t\t'label' => 'label1',\n\t\t\t\t'value' => 'value1',\n\t\t\t\t'selected' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'label' => 'label 3',\n\t\t\t\t'value' => '3',\n\t\t\t\t'selected' => true,\n\t\t\t),\n\t\t);\n\n\t\t$form_response = $this->_createForm( array( array( 'slug' => $slug, 'type' => 'checkboxes', 'required' => true, 'choices' => $choices ) ) );\n\n\t\t$_POST['form_id'] = $form_response->data['ID'];\n\t\t$_POST['ccf_form'] = true;\n\t\t$_POST['form_nonce'] = wp_create_nonce( 'ccf_form' );\n\n\t\tCCF_Form_Handler::factory()->submit_listen();\n\n\t\t$this->assertTrue( ! empty( CCF_Form_Handler::factory()->errors_by_form[$form_response->data['ID']][$slug . '1'] ) );\n\n\t\tCCF_Form_Handler::factory()->errors_by_form = array();\n\n\t\t$_POST['ccf_field_' . $slug . '1']['key'] = 'value';\n\n\t\tCCF_Form_Handler::factory()->submit_listen();\n\n\t\t$this->assertTrue( empty( CCF_Form_Handler::factory()->errors_by_form[$form_response->data['ID']][$slug . '1'] ) );\n\t}",
"public function testCheckboxes() {\n $webform = Webform::load('test_element_checkboxes');\n\n // Check exclude empty is not visible.\n $edit = [\n 'checkboxes_required_conditions[Yes]' => TRUE,\n 'checkboxes_other_required_conditions[checkboxes][Yes]' => TRUE,\n ];\n $this->postSubmission($webform, $edit, t('Preview'));\n $this->assertNoRaw('<label>checkbox_exclude_empty</label>');\n\n // Uncheck #exclude_empty.\n $webform->setElementProperties('checkbox_exclude_empty', ['#type' => 'checkbox', '#title' => 'checkbox_exclude_empty']);\n $webform->save();\n\n // Check exclude empty is visible.\n $edit = [\n 'checkboxes_required_conditions[Yes]' => TRUE,\n 'checkboxes_other_required_conditions[checkboxes][Yes]' => TRUE,\n ];\n $this->postSubmission($webform, $edit, t('Preview'));\n $this->assertRaw('<label>checkbox_exclude_empty</label>');\n\n }",
"public function testMultipleTrueOptionchecker() {\n\n [$header, $options] = _form_test_tableselect_get_data();\n\n $form['tableselect'] = [\n '#type' => 'tableselect',\n '#header' => $header,\n '#options' => $options,\n ];\n\n // Test with a valid value.\n [, , $errors] = $this->formSubmitHelper($form, ['tableselect' => ['row1' => 'row1']]);\n $this->assertFalse(isset($errors['tableselect']), 'Option checker allows valid values for checkboxes.');\n\n // Test with an invalid value.\n [, , $errors] = $this->formSubmitHelper($form, ['tableselect' => ['non_existing_value' => 'non_existing_value']]);\n $this->assertTrue(isset($errors['tableselect']), 'Option checker disallows invalid values for checkboxes.');\n\n }",
"public function getTestTypeCheckboxes($lab_config_id=null, $allCompatibleCheckingOn=true)\n\t{\n\t\t# else only returns checkboxes with available test tpe names\n\t\t$lab_config = get_lab_config_by_id($lab_config_id);\n\t\tif($lab_config == null && $lab_config_id != \"\")\n\t\t{\n\t\t\t?>\n\t\t\t<div class='sidetip_nopos'>\n\t\t\tERROR: Lab configuration not found\n\t\t\t</div>\n\t\t\t<?php\n\t\t\treturn;\n\t\t}\n\t\t# Fetch all test types\n\t\t//if($lab_config_id == \"\")\n //{\n\t\t\t//$test_list = get_test_types_catalog(true);\n // $reff = 1;\n\t\t//\t$test_list = get_test_types_catalog($lab_config_id, $reff);\n //}\n // else\n //{\n //NC3065\n $reff = 1;\n\t\t$test_list = get_test_types_catalog($lab_config_id, $reff );\n //-NC3065\n // }\n $current_test_list = array();\n\t\tif($lab_config_id != \"\")\n\t\t\t$current_test_list = get_lab_config_test_types($lab_config_id)\n\t\t# For each test type, create a check box. Check it if test already in lab configuration\n\t\t?>\n\t\t<table class='hor-minimalist-b' style='width:700px;'>\n\t\t\t<tbody>\n\t\t\t<tr>\n\t\t\t<?php\n\t\t\t$count = 0;\n\t\t\tforeach($test_list as $key=>$value)\n\t\t\t{\n\t\t\t\t$test_type_id = $key;\n\t\t\t\t$test_name = $value;\n\t\t\t\t$count++;\n\t\t\t\t?>\n\t\t\t\t<td><input type='checkbox' class='ttype_entry' name='t_type_<?php echo $key; ?>' id='t_type_<?php echo $key; ?>'\n\t\t\t\t<?php\n\t\t\t\tif($allCompatibleCheckingOn==true) {\n\t\t\t\t\tif(in_array($test_type_id, $current_test_list))\n\t\t\t\t\t{\n\t\t\t\t\t\techo \" checked ><span class='clean-ok'>$test_name</span>\";\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\techo \">$test_name\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo \">$test_name\";\n\t\t\t\t?>\n\t\t\t\t</input></td>\n\n\t\t\t\t<?php\n\t\t\t\tif($count % 3 == 0)\n\t\t\t\t\techo \"</tr><tr>\";\n\t\t\t}\n\t\t\t?>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<?php\n\t}",
"public function test_checkbox() {\n\t\t$input1 = '<input id=\"\" type=\"checkbox\" name=\"\" value=\"\">'.PHP_EOL;\n\t\t$this->assertEquals($input1, Form::checkbox('', '', '', array()));\n\n\t\t$input2 = '<input type=\"checkbox\">'.PHP_EOL;\n\t\t$this->assertEquals($input2, Form::checkbox(null, null, null, array()));\n\n\t\t$input3 = '<input checked=\"checked\" type=\"checkbox\" name=\"ckbox\" value=\"Test Value\">'.PHP_EOL;\n\t\t$this->assertEquals($input3, Form::checkbox('ckbox', 'Test Value', 1, array()));\n\n\t\t$input4 = '<input class=\"inp_check\" checked=\"checked\" type=\"checkbox\" name=\"ckbox\" value=\"Test Value 2\">'.PHP_EOL;\n\t\t$this->assertEquals($input4, Form::checkbox('ckbox', 'Test Value 2', 1, array('class' => 'inp_check')));\n\t}",
"public function testCheckboxValue() {\n $this->drupalLogin($this->rootUser);\n $webform = Webform::load('test_element_checkbox');\n\n // Check submitted values.\n $edit = [\n 'checkbox' => TRUE,\n 'checkbox_raw' => TRUE,\n 'checkbox_return_value' => 'custom_return_value',\n 'checkbox_return_value_raw' => 'custom_return_value_raw',\n ];\n $sid = $this->postSubmission($webform, $edit);\n $this->assertRaw(\"checkbox: 1\ncheckbox_raw: 1\ncheckbox_return_value: custom_return_value\ncheckbox_return_value_raw: custom_return_value_raw\");\n\n // Check display of value and raw.\n $this->drupalGet('/admin/structure/webform/manage/test_element_checkbox/submission/' . $sid);\n $this->assertPattern('#<label>checkbox</label>\\s+Yes\\s+</div>#');\n $this->assertPattern('#<label>checkbox_raw</label>\\s+1\\s+</div>#');\n $this->assertPattern('#<label>checkbox_return_value</label>\\s+Yes\\s+</div>#');\n $this->assertPattern('#<label>checkbox_return_value_raw</label>\\s+custom_return_value_raw\\s+</div>#');\n }",
"function testGuessCheckbox() {\n\t\t$result = $this->helper->__guessInputType('Test.is_foo');\n\t\t$this->assertEqual($result, 'checkbox');\n\t}",
"function get_calcutors_checkboxes() {\n\t$calcs = get_available_calculators();\n\t\n\tforeach($calcs as $key=>$val) {\n\t\t\n\t\t\n\t}\n}",
"public function test_checkable() {\n\t\t$reflected = self::get_method('checkable');\n\t\t$form = new Form();\n\n\t\t$check1 = '<input type=\"checkbox\" name=\"chkbx\" value=\"Test Check 1\">'.PHP_EOL;\n\t\t$this->assertEquals($check1, $reflected->invokeArgs($form, array('checkbox', 'chkbx', 'Test Check 1', false, array())));\n\n\t\t$check2 = '<input checked=\"checked\" type=\"checkbox\" name=\"chkbx\" value=\"Test Check 2\">'.PHP_EOL;\n\t\t$this->assertEquals($check2, $reflected->invokeArgs($form, array('checkbox', 'chkbx', 'Test Check 2', true, array())));\n\n\t\t$check3 = '<input class=\"chkbox\" checked=\"checked\" type=\"checkbox\" name=\"chkbx\" value=\"Test Check 3\">'.PHP_EOL;\n\t\t$this->assertEquals($check3, $reflected->invokeArgs($form, array('checkbox', 'chkbx', 'Test Check 3', true, array('class' => 'chkbox'))));\n\n\t\t$radio1 = '<input type=\"radio\" name=\"radbtn\" value=\"Test Radio 1\">'.PHP_EOL;\n\t\t$this->assertEquals($radio1, $reflected->invokeArgs($form, array('radio', 'radbtn', 'Test Radio 1', false, array())));\n\n\t\t$radio2 = '<input checked=\"checked\" type=\"radio\" name=\"radbtn\" value=\"Test Radio 2\">'.PHP_EOL;\n\t\t$this->assertEquals($radio2, $reflected->invokeArgs($form, array('radio', 'radbtn', 'Test Radio 2', true, array())));\n\n\t\t$radio3 = '<input class=\"radbtn\" checked=\"checked\" type=\"radio\" name=\"radbtn\" value=\"Test Radio 3\">'.PHP_EOL;\n\t\t$this->assertEquals($radio3, $reflected->invokeArgs($form, array('radio', 'radbtn', 'Test Radio 3', true, array('class' => 'radbtn'))));\n\t}",
"function check_checkbox_filter($name = '',$allGet = '')\n {\n /*\n * define variable\n */\n $check = false;\n\n /*\n * check parameter data\n */\n if ($name == '' || $allGet == '')\n {\n return true;\n }\n\n if (count((array)$allGet) > 0)\n {\n foreach ($allGet as $key => $val)\n {\n if ($key == $key)\n {\n if($val == '1')\n {\n $check = true;\n }\n }\n }\n }\n\n\n if ($check)\n {\n /*\n * if checkbox checked\n */\n return 'checked';\n }\n else\n {\n return false;\n }\n }",
"public function testGetInputNoValueTwoChecked()\n\t{\n\t\t$formFieldCheckboxes = $this->getMockBuilder('JFormFieldCheckboxes')->setMethods(array('getOptions'))->getMock();\n\n\t\t$option1 = new JObject;\n\t\t$option1->set('value', 'red');\n\t\t$option1->set('text', 'red');\n\t\t$option1->set('checked', false);\n\n\t\t$option2 = new JObject;\n\t\t$option2->set('value', 'blue');\n\t\t$option2->set('text', 'blue');\n\t\t$option2->set('checked', false);\n\n\t\t$optionsReturn = array($option1, $option2);\n\t\t$formFieldCheckboxes->expects($this->any())\n\t\t\t->method('getOptions')\n\t\t\t->will($this->returnValue($optionsReturn));\n\n\t\t// Test with nothing checked, two values in checked element\n\t\tTestReflection::setValue($formFieldCheckboxes, 'id', 'myTestId');\n\t\tTestReflection::setValue($formFieldCheckboxes, 'name', 'myTestName');\n\t\tTestReflection::setValue($formFieldCheckboxes, 'value', '\"\"');\n\t\tTestReflection::setValue($formFieldCheckboxes, 'checkedOptions', 'red,blue');\n\n\t\t// Get the result once, we will perform multiple tests\n\t\t$result = TestReflection::invoke($formFieldCheckboxes, 'getInput');\n\n\t\t// Test that the tag exists\n\t\t$matcher = array('id' => 'myTestId');\n\n\t\t$this->assertTag(\n\t\t\t$matcher,\n\t\t\t$result,\n\t\t\t'The tag did not have the correct id.'\n\t\t);\n\n\t\t// Test that the 'red' option exists and is not checked\n\t\t$matcher['descendant'] = array(\n\t\t\t'tag' => 'input',\n\t\t\t'attributes' => array(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'name' => 'myTestName',\n\t\t\t\t'value' => 'red',\n\t\t\t\t'checked' => false\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->assertTag(\n\t\t\t$matcher,\n\t\t\t$result,\n\t\t\t'A descendant tag like <input type=\"checkbox\" name=\"color\" value=\"red\" /> was missing.'\n\t\t);\n\n\t\t// Test that the 'blue' option exists and is not checked\n\t\t$matcher['descendant'] = array(\n\t\t\t'tag' => 'input',\n\t\t\t'attributes' => array(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'name' => 'myTestName',\n\t\t\t\t'value' => 'blue',\n\t\t\t\t'checked' => false\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->assertTag(\n\t\t\t$matcher,\n\t\t\t$result,\n\t\t\t'A descendant tag like <input type=\"checkbox\" name=\"color\" value=\"blue\" /> was missing.'\n\t\t);\n\t}",
"function wpis_multicheck_callback($args) {\n\n\tglobal $wpis_options;\n\n\tforeach($args['options'] as $key => $option) :\n\t\tif(!empty($wpis_options[$args['id']][$key])) { $enabled = $option; } else { $enabled = NULL; }\n\t\techo '<input name=\"wpis_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\"\" id=\"wpis_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" type=\"hidden\" value=\"0\" />';\n\t\techo '<input name=\"wpis_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\"\" id=\"wpis_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\" type=\"checkbox\" value=\"' . $option . '\" ' . checked($option, $enabled, false) . '/> ';\n\t\techo '<label for=\"wpis_settings_' . $args['section'] . '[' . $args['id'] . '][' . $key . ']\">' . $option . '</label><br/>';\n\tendforeach;\n\techo '<p class=\"description\">' . $args['desc'] . '</p>';\n\n}",
"function checkboxes(){\n if($this->ChkReal->Checked){\n $this->avance_real = 'Si';\n }else{\n $this->avance_real = 'No';\n }\n if($this->ChkProg->Checked){\n $this->avance_prog = 'Si';\n }else{\n $this->avance_prog = 'No';\n }\n if($this->ChkComent->Checked){\n $this->comentario = 'Si';\n }else{\n $this->comentario = 'No';\n }\n if($this->ChkPermiso->Checked){\n $this->permiso = 'Si';\n }else{\n $this->permiso = 'No';\n }\n if($this->ChkTipoA->Checked){\n $this->tipo_admon = 'Si';\n }else{\n $this->tipo_admon = 'No';\n }\n }",
"function ivp_theme_multicheck_callback( $args ) {\n global $ivp_theme_options;\n\n if ( ! empty( $args['options'] ) ) {\n foreach( $args['options'] as $key => $option ):\n if( isset( $ivp_theme_options[$args['id']][$key] ) ) { $enabled = $option; } else { $enabled = NULL; }\n echo '<input name=\"ivp_theme_settings[' . $args['id'] . '][' . $key . ']\" id=\"ivp_theme_settings[' . $args['id'] . '][' . $key . ']\" type=\"checkbox\" value=\"' . $option . '\" ' . checked($option, $enabled, false) . '/> ';\n echo '<label for=\"ivp_theme_settings[' . $args['id'] . '][' . $key . ']\">' . $option . '</label><br/>';\n endforeach;\n echo '<p class=\"description\">' . $args['desc'] . '</p>';\n }\n}",
"public function test_checked_with_equal_values() {\n\t\t$this->assertSame( \" checked='checked'\", checked( 'foo', 'foo', false ) );\n\t}",
"function testChecked($post, $name, $value)\n{\n $isChecked = false;\n $fieldName = $name . '_' . $value;\n if (isSet ($post[$fieldName]))\n {\n $setValue = trim(strtolower($post[$fieldName]));\n if (strcmp($setValue, 'on') == 0)\n {\n $isChecked = true;\n }\n }\n return $isChecked;\n}",
"public function testCheckbox() {\n $result = $this->Form->checkbox('Model.field');\n $expected = [\n 'input' => ['type' => 'hidden', 'name' => 'Model[field]', 'value' => '0'],\n ['input' => [\n 'type' => 'checkbox', 'name' => 'Model[field]',\n 'value' => '1', 'class' => 'form-check-input']],\n ];\n $this->assertHtml($expected, $result);\n\n $result = $this->Form->checkbox('Model.field', [\n 'id' => 'theID',\n 'value' => 'myvalue',\n 'form' => 'my-form',\n ]);\n $expected = [\n 'input' => ['type' => 'hidden', 'name' => 'Model[field]', 'value' => '0', 'form' => 'my-form'],\n ['input' => [\n 'type' => 'checkbox', 'name' => 'Model[field]',\n 'value' => 'myvalue', 'id' => 'theID',\n 'form' => 'my-form', 'class' => 'form-check-input'\n ]]\n ];\n $this->assertHtml($expected, $result);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of the TotalOfferCount property. | public function setTotalOfferCount($value)
{
$this->_fields['TotalOfferCount']['FieldValue'] = $value;
return $this;
} | [
"public function withTotalOfferCount($value)\n {\n $this->setTotalOfferCount($value);\n return $this;\n }",
"public function setOfferCount($value)\n {\n if (!$this->_isNumericArray($value)) {\n $value = array ($value);\n }\n $this->_fields['OfferCount']['FieldValue'] = $value;\n return $this;\n }",
"public function setTotalItemCount($count);",
"public function getTotalOfferCount()\n {\n return $this->_fields['TotalOfferCount']['FieldValue'];\n }",
"public function setNumberOfOfferListings($value) \n {\n $this->_fields['NumberOfOfferListings']['FieldValue'] = $value;\n return;\n }",
"public function getOffersCount()\n {\n return $this->offersCount;\n }",
"public function setTotalDeviceCount($val)\n {\n $this->_propDict[\"totalDeviceCount\"] = intval($val);\n return $this;\n }",
"public function setTotalUpdateCount($val)\n {\n $this->_propDict[\"totalUpdateCount\"] = intval($val);\n return $this;\n }",
"public function getOfferCount()\n {\n if ($this->_fields['OfferCount']['FieldValue'] == null) {\n $this->_fields['OfferCount']['FieldValue'] = array();\n }\n return $this->_fields['OfferCount']['FieldValue'];\n }",
"public function getTotalOfferCount()\n {\n $totalOfferAlertCount = 0;\n \n if (in_array($this->categoryId, array(SELLER_ID, SHIPPER_ID))) {\n $offer = $this->CI->offerlib->getOfferByBusiId($this->busiId);\n } else {\n $offer = $this->CI->offerlib->getBuyerOfferByBusiId($this->busiId);\n }\n \n foreach ($offer as $key => $value) {\n if ($value['alert_viewed'] == 0) {\n $totalOfferAlertCount ++;\n }\n }\n return $totalOfferAlertCount;\n }",
"public function increaseNumberOfOffers() {\n $this->numberOfOffers++;\n }",
"public function setTotalUserCount($val)\n {\n $this->_propDict[\"totalUserCount\"] = intval($val);\n return $this;\n }",
"public function setTotalLicenseCount($val)\n {\n $this->_propDict[\"totalLicenseCount\"] = intval($val);\n return $this;\n }",
"protected function setTotalPages()\n {\n $this->totalPages = (int) ceil($this->items / $this->itemsPerPage);\n }",
"public function setTotalParticipantCount(?int $value): void {\n $this->getBackingStore()->set('totalParticipantCount', $value);\n }",
"function setEstimatedTotalResultsCount($m)\n\t{\n\t\t$this->result['estimatedTotalResultsCount'] = $m;\n\t}",
"public function setTotalItemCount(?int $value): void {\n $this->getBackingStore()->set('totalItemCount', $value);\n }",
"public function set_review_count( $count ) {\n $this->set_prop( 'review_count', absint( $count ) );\n }",
"public function setItemCount($itemCount)\n {\n foreach ($this as $pager) { /** @var PagerInterface $pager */\n $pager->setItemCount($itemCount);\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a single code matching the name, if any exists. Replace periods with hypens (e.g. 'R509' for 'R50.9') 'codes/v1/icd10/:code_name' GET | public function singleCode($code_name, array $options = array())
{
$body = (isset($options['query']) ? $options['query'] : array());
$body['code_name'] = $code_name;
$response = $this->client->get('codes/v1/icd10/'.rawurlencode($code_name).'', $body, $options);
return $response;
} | [
"public function get($code);",
"public function getByCode($code);",
"public function lookup($code)\n {\n return $this->client->get('discount_codes/lookup.json', null, [\n 'code' => $code,\n ], ['raw', 'headers']);\n }",
"public function findOneByCode($code);",
"public static function getCodeByName( $name = false ){\n\t\t\n\t\t$code = array_search( $name, Maps\\CountriesTables::$countryCodeToCountryNameMap ); \n\t\t\n\t\tif( !$code ){\n\t\t\tthrow new Exception('Country not found');\t\t\n\t\t}\n\t\t\n\t\treturn $code;\n\t}",
"function getLanguageNameByCode(string $code): string {\n $result = Database::query(\n 'SELECT name FROM `' . Database::tableName('languages') .\n \"` WHERE language_code = '\" . Database::escapeValue($code) . \"'\"\n );\n $retval = $code;\n if (Database::getNumRows($result) > 0) {\n $dataset = Database::fetchObject($result);\n $retval = $dataset->name;\n }\n\n return $retval;\n}",
"function name($code) {\n\t\t\treturn $code;\t\n\t\t}",
"abstract public function findByAlphabeticalCode(string $code): CurrencyInterface;",
"public function getbyCode($code)\n {\n return $this->model->get($code,'code');\n }",
"protected function getCode()\n {\n return $this->request->get('code');\n }",
"public function findByCode($code);",
"public function get_currency_name_by_iso4217_code( $name ) {\n $full_name = '';\n\n foreach ( $this->currencies as $currency ) {\n if ( $currency['short_name'] === $name ) {\n $full_name = $currency['full_name'];\n break;\n }\n }\n\n return $full_name;\n }",
"public function getLanguageNameByCode(string $code): string;",
"public function getCode(){\n return $this->getParameter('code');\n }",
"public function getCurrencyByCode($code);",
"public function getStateNameByCode($code) {\n $states = array(\n \"AC\" => \"Acre\",\n \"AL\" => \"Alagoas\",\n \"AM\" => \"Amazonas\",\n \"AP\" => \"Amapá\",\n \"BA\" => \"Bahia\",\n \"CE\" => \"Ceará\",\n \"DF\" => \"Distrito Federal\",\n \"ES\" => \"Espírito Santo\",\n \"GO\" => \"Goiás\",\n \"MA\" => \"Maranhão\",\n \"MT\" => \"Mato Grosso\",\n \"MS\" => \"Mato Grosso do Sul\",\n \"MG\" => \"Minas Gerais\",\n \"PA\" => \"Pará\",\n \"PB\" => \"Paraíba\",\n \"PR\" => \"Paraná\",\n \"PE\" => \"Pernambuco\",\n \"PI\" => \"Piauí\",\n \"RJ\" => \"Rio de Janeiro\",\n \"RN\" => \"Rio Grande do Norte\",\n \"RO\" => \"Rondônia\",\n \"RS\" => \"Rio Grande do Sul\",\n \"RR\" => \"Roraima\",\n \"SC\" => \"Santa Catarina\",\n \"SE\" => \"Sergipe\",\n \"SP\" => \"São Paulo\",\n \"TO\" => \"Tocantins\" \n );\n\n if (isset($states[$code])) {\n return $states[$code];\n } else {\n return false;\n }\n }",
"function get_code($name, $table)\n {\n $this->db->from($table);\n $this->db->select('code');\n\t\tif($table == 'budgets'){\n\t $this->db->where('budgetname =', $name);\n\t\t}elseif($table == 'projection'){\n\t\t\t$this->db->where('projection_name =', $name);\n\t\t}else{\n\t\t\t$this->db->where('name =', $name);\n\t\t}\n $query_r = $this->db->get();\n foreach($query_r->result() as $row)\n return $row->code;\n }",
"public function getSpecificCid(string $code)\n {\n\n return $this->select(\n 'codigo',\n 'nome'\n )\n ->where('codigo', $code);\n }",
"function findProductByIdentifier($name, $code);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove an admin user. Remove an admin user from the adminUsers database table by using their ID. | public function removeAdminUser($id) {
$stmt = $this->mysqli->prepare("DELETE FROM adminUsers WHERE adminID=?");
$stmt->bind_param("i", $id);
$stmt->execute();
var_dump($stmt);
if ($this->mysqli->affected_rows == -1) {
return false;
} else {
return true;
}
} | [
"private function remove_admin()\n\t{\n\t\t$this->login();\n\t\t$user = $this->auth->get_user();\n\t\tModel::factory('user_roles')->remove($user->user_id, 3); // 3 is admin in testing...\n\t\t$this->auth->logout();\n\t\t$this->login();\n\t}",
"static function deleteAdmin($idAdmin)\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('DELETE FROM admin WHERE _idAdmin=?');\n $req->execute(array($idAdmin));\n\n }",
"public function removeAdmin()\n\t{\n\t\t$this->is_admin = \"0\";\n\t\t$this->save();\n\t}",
"public function remove_admin($admin){\n $this->admin_model->remove_admin($admin);\n \n set_message('Admin removed succesfully.');\n redirect('/admins/admin');\n }",
"public function deleteAdminUserDeletable()\n {\n //Data\n $userData = $this->loadData('generic_admin_user', null, array('email', 'user_name'));\n $searchData = $this->loadData('search_admin_user',\n array('email' => $userData['email'], 'user_name' => $userData['user_name']));\n //Steps\n $this->adminUserHelper()->createAdminUser($userData);\n //Verifying\n $this->assertMessagePresent('success', 'success_saved_user');\n $this->assertTrue($this->checkCurrentPage('edit_admin_user'), $this->getParsedMessages());\n //Steps\n $this->clickButtonAndConfirm('delete_user', 'confirmation_for_delete');\n //Verifying\n $this->assertMessagePresent('success', 'success_deleted_user');\n }",
"public function deleteAdministrator($adminId = 0);",
"public function removeUser()\n\t{\n\t\tglobal $DataBase;\n\t\tglobal $Config;\n\t\t$DataBase->query(\"DELETE FROM \" . $Config->get(\"sql.prefix\") . \"`users` WHERE `userid`=\" . $this->userid);\n\t}",
"public static function deleteAdmin($id){\n return (new Database('admin'))->delete('id = ' . $id);\n }",
"public function remove_hospital_admin($user_id){\n \n }",
"public function DeleteAdmin(){\n\t\tinclude 'connect.php';\n\t\t$req = $bdd->prepare(\"DELETE FROM admin WHERE AID=:AID\");\n\t\t$req ->execute(array(\n\t\t\t\"AID\"=>$this->getAID()\n\t\t));\n\t}",
"function delUser($id) {\n $stm = $this -> db -> prepare('DELETE FROM my_users WHERE id = :id');\n $stm -> execute(array(':id' => $id));\n }",
"function deleteAdmin() {\n\t\ttry{\n\t\t\tglobal $database;\n\n\t\t\t$adminId = $_POST['adminId'];\n\n\t\t\t$admin = new admin($database, $adminId);\n\t\t\t$admin->delete();\n\t\t} catch(dbException $db){\n\t\t\t\techo $db->alert();\t\t\n\t\t}\n\t}",
"public function admin_delete($id = null)\r\n\t{\r\n\t\t$this->User->id = $id;\r\n\t\tif (!$this->User->exists())\r\n\t\t{\r\n\t\t\tthrow new NotFoundException(__('Invalid user'));\r\n\t\t}\r\n\t\tif ($this->User->delete())\r\n\t\t{\r\n\t\t\t$this->Session->setFlash(__('User deleted successfully'));\r\n\t\t\t$this->redirect(array ('action' => 'manage', 'admin' => true));\r\n\t\t}\r\n\t\t$this->Session->setFlash(__('User was not deleted'));\r\n\t\t$this->redirect(array ('action' => 'manage', 'admin' => true));\r\n\t}",
"public function removeUser()\n {\n $this->customer->users()->detach($this->userIdToRemove);\n\n $this->userIdToRemove = null;\n $this->notify(\n __('adminhub::notifications.customers.user_removed')\n );\n }",
"function delete_administrador($idAdmin)\n {\n return $this->db->delete('administrador',array('idAdmin'=>$idAdmin));\n }",
"function hapus_admin($id_admin)\n\t\t{\n\t\t\t$this->db->where('id_admin', $id_admin);\n\t\t\t$this->db->delete('admin');\n\t\t}",
"public function deleteUserById(int $id);",
"public function delete()\n {\n $database = new Database();\n $database->deleteUser($this->getId());\n }",
"public function deleteUserById($id);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all the members which are in this group as Person instances array | public function getMembers()
{
$group = $this;
return array_column(array_filter($this->parent->person_group_relations, function ($relation) use ($group) {
return $relation["group"] == $group;
}), "person");
} | [
"public function get_group_persons()\n\t{\n\t\t$persons = new object_list();\n\t\t$user_inst = get_instance(user_obj::CLID);\n\n\t\tforeach(get_instance(self::CLID)->get_group_members($this) as $o)\n\t\t{\n\t\t\t$persons->add($user_inst->get_person_for_user($o));\n\t\t}\n\t\treturn $persons;\n\t}",
"public function members() {\n $tm = new TeamsMembers;\n $_members = $tm->where('team_id', '=', $this->id)->get();\n $members = [];\n\n foreach ($_members as $member) {\n array_push($members, Member::find($member->member_id));\n }\n\n return $members;\n }",
"public function getMembers();",
"public function getPersons() {\n return $this->persons;\n }",
"public function getMembers()\n {\n return $this->findMembersBy([], ['id' => 'asc']);\n }",
"public function getMembers() {\n return $this -> db -> getGroupMembers($this -> id);\n }",
"public function GetMembers()\n {\n if($this->getGroupId())\n {\n $user = new User($this->sqlDataBase);\n $groupMembers = $user->GetGroupUsers($this->groupId);\n return $groupMembers;\n }\n return array();\n }",
"public function getMemberObjs()\n {\n if (!empty($this->members_objs) && ($this->members_objs[0] instanceof User)) {\n return $this->members_objs;\n }\n }",
"public function getAllMembers();",
"public static function getAllMembers()\n {\n\n $members = [];\n\n $object = self::getObject();\n\n // loop through every \"server\"?\n foreach($object->guilds as $guild){\n\n // loop through every member\n foreach($guild->members as $member){\n\n // make new member object\n $new_member = new Member($member);\n $members[] = $new_member;\n\n }\n }\n\n return $members;\n\n }",
"function findAllGroupMembers(){\n //creates an array\n $groupMembers = Array();\n \n //creates a database connection\n $db = new Connection();\n $conn = $db->open();\n \n //sends connection to data service\n $dbService = new GroupDataService($conn);\n \n //return the array\n $groupMembers = $dbService->findAllGroupMembers();\n return $groupMembers;\n }",
"public function getMembers()\n {\n return $this->members;\n }",
"public function GetAllMembers()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembers();\n }",
"public function getMembers()\r\n {\r\n \treturn Warecorp_Group_Members_Factory::create($this);\r\n }",
"public function getMembers() {\n if(empty($this->members) || empty($this->members[0])) {\n $this->fetchMembers();\n }\n\n return $this->members;\n }",
"public function listPersons()\n {\n $pgw = $this->di['personGateway'];\n return $pgw->fetchAll();\n }",
"public function getInstances()\n {\n $instances = array();\n foreach ($this->group_instances as $id) \n $instances[] = $id;\n return $this->group_instances = $instances;\n }",
"public function getMemberOfNames()\n {\n return $this->getMemberOf()->map(function (Group $group) {\n return $group->getCommonName();\n })->toArray();\n }",
"public function members(): array;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function copies a directory containing a valid photo gallery from some directory into a content item for the given trip iin the current whiteacorn system | function importJournalGallery(string $srcDir, string $trip) : void
{
$info = new \SplFileInfo($srcDir);
if (! $info-> isDir())
throw new \Exception("{$srcDir} is not a directory");
if (\Gallery\GalObject::isGallery($srcDir)) {
throw new \Exception("{$srcDir} is not a valid gallery");
}
$itemName = $info->getBasename();
} | [
"private function copyFiles($path,$passname) {\n \n if($this->logopath){\n copy($this->logopath,$path.$passname.\"/logo.png\");\n }\n if($this->logohdpath){\n copy($this->logohdpath,$path.$passname.\"/logo@2x.png\");\n }\n if($this->iconpath){\n copy($this->iconpath,$path.$passname.\"/icon.png\");\n }\n if($this->iconpathhd){\n copy($this->iconpathhd,$path.$passname.\"/icon@2x.png\");\n }\n if($this->background){\n copy($this->background,$path.$passname.\"/background.png\");\n }\n if($this->background_hd){\n copy($this->background_hd,$path.$passname.\"/background@2x.png\");\n }\n if($this->thumbnail){\n copy($this->thumbnail,$path.$passname.\"/thumbnail.png\");\n }\n if($this->thumbnail_hd){\n copy($this->thumbnail_hd,$path.$passname.\"/thumbnail@2x.png\");\n }\n if($this->strip){\n copy($this->strip,$path.$passname.\"/strip.png\");\n }\n if($this->strip_hd){\n copy($this->strip_hd,$path.$passname.\"/strip@2x.png\");\n } \n }",
"private function prepareItem ( &$item, $destDir, $deepness = 0 )\n {\n $thisItem = new item();\n if( ! $thisItem->load( $item['id'] ) )\n {\n $this->error = get_lang('Unable to load item %item', array( '%item' => $item['title'] ));\n return false;\n }\n \n switch( $item['type'])\n {\n // Create the directory in $destDir and all prepareItem if children exist for the item\n case 'CONTAINER' :\n {\n $destDir.= '/' . str_replace(',','_',replace_dangerous_char($item['title']));\n if( ! claro_mkdir( $destDir,CLARO_FILE_PERMISSIONS, true ) )\n {\n $this->error = get_lang('Unable to create directory %path in temporary directory.', $destDir);\n return false;\n }\n if( isset($item['children']) && !empty( $item['children'] ) )\n {\n $deepness++;\n foreach( $item['children'] as $itemChild )\n {\n if( ! $return = $this->prepareItem( $itemChild, $destDir, $deepness) )\n {\n return false;\n } \n } \n } \n }\n break;\n // Set $fromScorm to true (used after prepareItem to copy old Scorm Content in a specific directory )\n case 'SCORM' :\n {\n $this->fromScorm = true;\n }\n break;\n // Call the connector from the concerned module (cllp.scormexport.cnr.php) for copy concerned files\n case 'MODULE' :\n {\n $locator = ClarolineResourceLocator::parse($item['sys_path']);\n \n $connectorPath = get_module_path( $locator->getModuleLabel() ) . '/connector/cllp.scormexport.cnr.php';\n if( file_exists( $connectorPath ) )\n {\n include_once( $connectorPath );\n $class = $locator->getModuleLabel().'_ScormExport';\n $connector = new $class();\n if( ! $connector->prepareFiles($locator->getResourceId(), $thisItem, $destDir, $deepness) )\n {\n $this->error = $connector->getError();\n return false;\n }\n \n } \n }\n break;\n }\n return true;\n }",
"function copy_theme($theme_destination,$site_destination) {\n $dir = opendir($theme_destination);\n @mkdir($site_destination);\n while(( $file = readdir($dir)) !== false) {\n if (( $file != '.' ) && ( $file != '..' )) {\n if ( is_dir($theme_destination . '/' . $file) ) {\n copy_theme($theme_destination . '/' . $file,$site_destination . '/' . $file);\n }\n else {\n copy($theme_destination . '/' . $file,$site_destination . '/' . $file);\n }\n }\n }\n closedir($dir);\n}",
"private function setupUploadDir() {\n\t\tglobal $IP;\n\t\t$dir = wfTempDir() . \"/mwParser-\" . mt_rand() . \"-images\";\n\t\twfDebug( \"Creating upload directory $dir\\n\" );\n\t\tmkdir( $dir );\n\t\tmkdir( $dir . '/3' );\n\t\tmkdir( $dir . '/3/3a' );\n\t\tcopy( \"$IP/skins/monobook/headbg.jpg\", \"$dir/3/3a/Foobar.jpg\" );\n\t\treturn $dir;\n\t}",
"abstract protected function copyTargetsToStagingFolder();",
"function copyMobFiles()\n\t{\n\t\t$imp_dir = $this->content_object->getImportDirectory();\n\n\t\tforeach ($this->mob_mapping as $origin_id => $mob_id)\n\t\t{\n\t\t\tif(empty($origin_id))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t$origin_arr = explode(\"_\", $origin_id);\n\t\t\tif ($origin_arr[2] == \"el\") // imagemap\n\t\t\t{\n\t\t\t\t$obj_dir = \"imagemap\".$origin_arr[3];\n\t\t\t}\n\t\t\telse // normal media object\n\t\t\t{\n\t\t\t\t$obj_dir = \"mm\".$origin_arr[3];\n\t\t\t}*/\n\n\t\t\t$obj_dir = $origin_id;\n\t\t\t$source_dir = $imp_dir.\"/\".$this->subdir.\"/objects/\".$obj_dir;\n\t\t\t$target_dir = ilUtil::getWebspaceDir().\"/mobs/mm_\".$mob_id;\n\n//echo \"copy from $source_dir to $target_dir <br>\";\n\t\t\tif (@is_dir($source_dir))\n\t\t\t{\n\t\t\t\t// make target directory\n\t\t\t\tilUtil::makeDir($target_dir);\n\t\t\t\t//@mkdir($target_dir);\n\t\t\t\t//@chmod($target_dir, 0755);\n\n\t\t\t\tif (@is_dir($target_dir))\n\t\t\t\t{\n\t\t\t\t\tilUtil::rCopy($source_dir, $target_dir);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private function _copyImages()\n {\n if (!$this->_images) {\n return;\n }\n $imgDir = dirname(JPATH_BASE) . DIRECTORY_SEPARATOR . 'images';\n $contentDir = $imgDir . DIRECTORY_SEPARATOR . 'upage-images';\n if (!file_exists($contentDir)) {\n mkdir($contentDir);\n }\n if ($handle = opendir($this->_images)) {\n while (false !== ($file = readdir($handle))) {\n if ('.' == $file || '..' == $file || is_dir($file)) {\n continue;\n }\n if (!preg_match('~\\.(?:bmp|jpg|jpeg|png|ico|gif)$~i', $file)) {\n continue;\n }\n copy($this->_images . DIRECTORY_SEPARATOR . $file, $contentDir . DIRECTORY_SEPARATOR . $file);\n }\n closedir($handle);\n }\n }",
"private function process_demo_thumb($folder_name){\n\n\n\n if(is_file($this->theme_dir . $folder_name . '/screenshot.png'))\n\n return;\n\n\n\n if(!is_file(get_template_directory() . '/screenshot.png'))\n\n return;\n\n\n\n copy(get_template_directory() . '/screenshot.png' , $this->theme_dir . $folder_name . '/screenshot.png');\n\n }",
"function copy_to_media_library($image)\n {\n $retval = FALSE;\n // Get the image\n if (is_int($image)) {\n $imageId = $image;\n $mapper = C_Image_Mapper::get_instance();\n $image = $mapper->find($imageId);\n }\n if ($image) {\n $wordpress_upload_dir = wp_upload_dir();\n // $wordpress_upload_dir['path'] is the full server path to wp-content/uploads/2017/05, for multisite works good as well\n // $wordpress_upload_dir['url'] the absolute URL to the same folder, actually we do not need it, just to show the link to file\n $i = 1;\n // number of tries when the file with the same name is already exists\n $image_abspath = C_Gallery_Storage::get_instance()->get_image_abspath($image, \"full\");\n $new_file_path = $wordpress_upload_dir['path'] . '/' . $image->filename;\n $image_data = getimagesize($image_abspath);\n $new_file_mime = $image_data['mime'];\n while (file_exists($new_file_path)) {\n $i++;\n $new_file_path = $wordpress_upload_dir['path'] . '/' . $i . '_' . $image->filename;\n }\n if (@copy($image_abspath, $new_file_path)) {\n $upload_id = wp_insert_attachment(array('guid' => $new_file_path, 'post_mime_type' => $new_file_mime, 'post_title' => preg_replace('/\\\\.[^.]+$/', '', $image->alttext), 'post_content' => '', 'post_status' => 'inherit'), $new_file_path);\n update_post_meta($upload_id, '_ngg_image_id', intval($image->pid));\n // wp_generate_attachment_metadata() won't work if you do not include this file\n require_once ABSPATH . 'wp-admin/includes/image.php';\n $image_meta = wp_generate_attachment_metadata($upload_id, $new_file_path);\n // Generate and save the attachment metas into the database\n wp_update_attachment_metadata($upload_id, $image_meta);\n $retval = $upload_id;\n }\n }\n return $retval;\n }",
"function uploadThumbnail($files, $id)\n{\n $target_dir = 'upload/';\n $extention = pathinfo($files['thumbnail'][\"name\"], PATHINFO_EXTENSION);\n move_uploaded_file($files['thumbnail'][\"tmp_name\"], $target_dir . $id[0] . '_0.' . $extention);\n copy(($target_dir . $id[0] . '_0.' . $extention), ($target_dir . $id[0] . '_1.' . $extention));\n}",
"function migrate_product_photospath($product)\n{\n\tglobal $conf;\n\n\t$dir = $conf->product->multidir_output[$product->entity];\n\t$conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO = 1;\n\t$origin = $dir . '/' . get_exdir($product->id, 2, 0, 0, $product, 'product') . $product->id . \"/photos\";\n\t$destin = $dir . '/' . dol_sanitizeFileName($product->ref);\n\n\t$error = 0;\n\n\t$origin_osencoded = dol_osencode($origin);\n\t$destin_osencoded = dol_osencode($destin);\n\tdol_mkdir($destin);\n\n\tif (dol_is_dir($origin)) {\n\t\t$handle = opendir($origin_osencoded);\n\t\tif (is_resource($handle)) {\n\t\t\twhile (($file = readdir($handle)) !== false) {\n\t\t\t\tif ($file != '.' && $file != '..' && is_dir($origin_osencoded . '/' . $file)) {\n\t\t\t\t\t$thumbs = opendir($origin_osencoded . '/' . $file);\n\t\t\t\t\tif (is_resource($thumbs)) {\n\t\t\t\t\t\tdol_mkdir($destin . '/' . $file);\n\t\t\t\t\t\twhile (($thumb = readdir($thumbs)) !== false) {\n\t\t\t\t\t\t\tdol_move($origin . '/' . $file . '/' . $thumb, $destin . '/' . $file . '/' . $thumb);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// dol_delete_dir($origin.'/'.$file);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (dol_is_file($origin . '/' . $file)) {\n\t\t\t\t\t\tdol_move($origin . '/' . $file, $destin . '/' . $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"private static function replace_ids_image_path($shortcode, $post_id = false) {\n\n preg_match('/\\[gallery.*path.*?=.*?[\\'\"](.+?)[\\'\"].*?\\]/i', $shortcode, $path);\n if (!empty($path[1])) {\n $path = trim($path[1], '\\\\');\n $path = trim($path, '\"');\n $image_path = explode(',', $path);\n if (!empty($image_path)) {\n $attachment_id = array();\n $wp_upload_dir = themify_upload_dir();\n require_once( ABSPATH . 'wp-admin/includes/image.php' );\n foreach ($image_path as $img) {\n\n $img_id = self::get_attachment_id_by_url($img);\n if (!$img_id) {\n // extract the file name and extension from the url\n $file_name = basename($img);\n\n // get placeholder file in the upload dir with a unique, sanitized filename\n $upload = wp_upload_bits($file_name, NULL, '');\n if ($upload['error']) {\n continue;\n }\n // fetch the remote url and write it to the placeholder file\n $request = new WP_Http;\n $response = $request->request($img, array('sslverify' => false));\n\n // request failed and make sure the fetch was successful\n if (!$response || is_wp_error($response) || wp_remote_retrieve_response_code($response) != '200') {\n continue;\n }\n\n $access_type = get_filesystem_method();\n\n if ($access_type === 'direct') {\n $creds = request_filesystem_credentials(site_url() . '/wp-admin/', '', false, false, array());\n\n if (!WP_Filesystem($creds)) {\n continue;\n }\n\n global $wp_filesystem;\n $wp_filesystem->put_contents($upload['file'], wp_remote_retrieve_body($response));\n } else {\n continue;\n }\n\n clearstatcache();\n $filetype = wp_check_filetype($file_name, null);\n $attachment = array(\n 'guid' => $wp_upload_dir['url'] . '/' . $file_name,\n 'post_mime_type' => $filetype['type'],\n 'post_title' => preg_replace('/\\.[^.]+$/', '', $file_name),\n 'post_content' => '',\n 'post_status' => 'inherit'\n );\n\n $img_id = wp_insert_attachment($attachment, $upload['file'], 369);\n if ($img_id) {\n $attach_data = wp_generate_attachment_metadata($img_id, $upload['file']);\n wp_update_attachment_metadata($img_id, $attach_data);\n }\n }\n if ($img_id) {\n $attachment_id[] = $img_id;\n }\n }\n }\n $shortcode = str_replace('path=\"' . $path . '\"', '', $shortcode);\n if (!empty($attachment_id)) {\n $attachment_id = implode(',', $attachment_id);\n preg_match('/\\[gallery.*ids.*?=.*?[\\'\"](.+?)[\\'\"].*?\\]/i', $shortcode, $ids);\n $ids = trim($ids[1], '\\\\');\n $ids = trim($ids, '\"');\n $shortcode = str_replace('ids=\"' . $ids . '\"', 'ids=\"' . $attachment_id . '\"', $shortcode);\n }\n }\n return $shortcode;\n }",
"function copyimage($makefolder,$imagename,$copyfilename){\n\t\n\t\t\t\t\t//Split the Image Array\n\t\t\t\t\t\t\t\t$pImage_name=$imagename['name'];\n\t\t\t\t\t\t\t\t$x_file_name=$imagename['name'];\n\t\t\t\t\t\t\t\t$pImage_path=$imagename['tmp_name'];\n\t\t\t\t\t\t\t\t$pImage_type=$imagename['type'];\n\t\t\t\t\t\t\t\t//print $pImage_type;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Find the Directory\n\t\t\t\t\t\t\t\tCreateSubFolder($makefolder);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$exist=file_exists($copyfilename);\n\t\t\t\t\t\t\t\tif($exist!=1)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t if(!copy($pImage_path,$copyfilename))\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t echo \"Error:Can not copy the specified file into \".$copyfilename;\n\t\t\t\t\t\t\t\t\t\t\t\t\t exit;\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tunlink($copyfilename);\n\t\t\t\t\t\t\t\t\t\tif(!copy($pImage_path,$copyfilename))\n\t\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\t echo \"Error:Can not copy the specified file \".$copyfilename;\n\t\t\t\t\t\t\t\t\t\t\t\t\t exit;\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}",
"private function createFolder($url) {\n \n /* Create folders */\n mkdir(\"../conferences/\" . $url, 0700);\n mkdir(\"../conferences/\" . $url . \"/images\", 0700);\n \n /* Set a list of images to copy */\n $images = array(\n \"logo.jpg\",\n \"panorama.jpg\",\n \"bcg.png\",\n \"favicon.ico\",\n );\n \n /* Copy each image to the new folder */\n foreach ($images as $i => $filename) {\n \n copy(\"../templates/default/images/\" . $filename, \"../conferences/\" . $url . \"/images/\" . $filename);\n \n }\n\n }",
"public static function createPhotoDirectory($pid)\n {\n jimport('joomla.filesystem.folder');\n jimport('joomla.filesystem.file');\n if (!JFolder::exists(JPATH_ROOT . '/images/osproperty/properties/' . $pid)) {\n JFolder::create(JPATH_ROOT . '/images/osproperty/properties/' . $pid);\n //copy index.html to this folder\n JFile::copy(JPATH_COMPONENT . DS . 'index.html', JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/index.html');\n\t\t}\n\t\tif (!JFolder::exists(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/medium')) {\n\t\t\tJFolder::create(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/medium');\n\t\t\tJFile::copy(JPATH_COMPONENT . DS . 'index.html', JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/medium/index.html');\n\t\t}\n\t\tif (!JFolder::exists(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/thumb')) {\n\t\t\tJFolder::create(JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/thumb');\n\t\t\tJFile::copy(JPATH_COMPONENT . DS . 'index.html', JPATH_ROOT . '/images/osproperty/properties/' . $pid . '/thumb/index.html');\n\t\t}\n }",
"private function _copy() {\n\n\t\tif ( true !== $this->_image instanceof TIE_Image || empty( $this->_image->get_image_url() ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$image_name = $this->_image->get_post_parent_id() . '.' . TIE_Image::TYPE;\n\t\t$file_path = $this->get_upload_dir()['basedir'] . '/' . Thrive_Quiz_Builder::UPLOAD_DIR_CUSTOM_FOLDER . '/' . $image_name;\n\t\t$destination = trailingslashit( $this->get_path() ) . '/' . $image_name;\n\n\t\tWP_Filesystem();\n\n\t\t/** @var WP_Filesystem_Direct $wp_filesystem */\n\t\tglobal $wp_filesystem;\n\n\t\treturn $wp_filesystem->copy( $file_path, $destination );\n\t}",
"public function uploadItemPictures($itemPicturesSubMap,$file)\n {\n\n if (!file_exists(dirname($_SERVER['DOCUMENT_ROOT'],1,). '\\public\\Pictures'))\n {\n mkdir(dirname($_SERVER['DOCUMENT_ROOT'],1,). '\\public\\Pictures',0777);\n }\n if(!file_exists(dirname($_SERVER['DOCUMENT_ROOT'],1,). '\\public\\Pictures\\\\' .$itemPicturesSubMap)){\n mkdir(dirname($_SERVER['DOCUMENT_ROOT'],1,). '\\public\\Pictures\\\\' .$itemPicturesSubMap,0777);\n }\n $uploadDir = dirname($_SERVER['DOCUMENT_ROOT'],1,). '\\public\\Pictures\\\\' .$itemPicturesSubMap.'\\\\'. basename($file['name']);\n move_uploaded_file($file['tmp_name'],$uploadDir);\n }",
"function custom_upload_directory( $args ) {\n\t$id = $_REQUEST['post_id'];\n\t$parent = get_post( $id )->post_parent;\n\tif( \"music\" == get_post_type( $id ) || \"music\" == get_post_type( $parent ) ) {\n\t\t$args['path'] = plugin_dir_path(__FILE__) . \"uploads\";\n\t\t$args['url'] = plugin_dir_url(__FILE__) . \"uploads\";\n\t\t$args['basedir'] = plugin_dir_path(__FILE__) . \"uploads\";\n\t\t$args['baseurl'] = plugin_dir_url(__FILE__) . \"uploads\";\n\t}\n\treturn $args;\n}",
"public function copyAssetToTempFolder() : string;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recibe la id de una orden y cambia su estado a finalizada. | public function EndOrden($id) {
$query = "UPDATE trabajo SET estado='finalizada' where idtrabajo=" . $id;
$this->db->query($query);
} | [
"function nuevoIdInventarioUsuario() {\n\t\t$conUltimo=\"select id_inventario_usuario from inventario_usuario order by id_inventario_usuario desc limit 1\";\n\t\t$cons=new consecutivo(\"IIU\",$conUltimo);\n\t\t$this->idInventarioUsuario=$cons->retornar();\t\t\n\t}",
"private function getNewIdContato(){\n $sqlStmt = “SELECT MAX(ID) AS ID FROM {$this->tabela}”;\n try {\n $operacao = $this->instanciaConexaoPdoAtiva->prepare($sqlStmt);\n if($operacao->execute()) {\n if($operacao->rowCount() > 0){\n $getRow = $operacao->fetch(PDO::FETCH_OBJ);\n $idReturn = (int) $getRow->ID + 1;\n return $idReturn;\n } else {\n throw new Exception(“Ocorreu um problema com o banco de dados”);\n exit();\n }\n } else {\n throw new Exception(“Ocorreu um problema com o banco de dados”);\n exit();\n }\n } catch (PDOException $excecao) {\n echo $excecao->getMessage();\n }\n }",
"public function getIdOrateur() {\n\t\treturn $this->id_orateur;\n\t}",
"public function getIdExecutivo()\n {\n return $this->idExecutivo;\n }",
"public function GuardarEmpleado()\n {\n //Creo la conexion a la DB.\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n\n //Creo la consulta INSERT.\n $consulta = $objetoAccesoDato->RetornarConsulta(\"INSERT into empleado (nombre,turno,tipo)values('$this->nombre','$this->tipo','$this->turno')\");\n\n //Ejecuto la consulta.\n $consulta->execute();\n\n //Guardo su ID.\n $this->id = $objetoAccesoDato->RetornarUltimoIdInsertado();\n\n //Retorno\n return $this->id;\n }",
"public function GuardarEmpleado()\n {\n //Creo la conexion a la DB.\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n\n //Creo la consulta INSERT.\n $consulta = $objetoAccesoDato->RetornarConsulta(\"INSERT into empleado (nombre,turno,tipo)values('$this->nombre','$this->turno','$this->tipo')\");\n\n //Ejecuto la consulta.\n $consulta->execute();\n\n //Guardo su ID.\n $this->id = $objetoAccesoDato->RetornarUltimoIdInsertado();\n\n //Retorno\n return $this->id;\n }",
"public function buscarId( ){\n\t\t$sql = \"SELECT DISTINCT U.idusuario, U.nombres, U.apellidos, U.usuario, R.idrol, R.nombrerol\n\t\t\t\tFROM usuario U\n\t\t\t\tINNER JOIN usuariofacultad UF ON ( UF.usuario = U.usuario )\n\t\t\t\tINNER JOIN UsuarioTipo UT ON (UT.UsuarioId = U.idusuario)\n INNER JOIN usuariorol UR ON (UR.idusuariotipo = UT.UsuarioTipoId)\n\t\t\t\tINNER JOIN rol R ON ( R.idrol = UR.idrol )\n\t\t\t\tWHERE U.idusuario = ?\n\t\t\t\tAND U.codigorol = 13\";\n\t\t\t\t\n\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t$this->persistencia->setParametro( 0 , $this->getId( ) , false );\n\t\t$this->persistencia->ejecutarConsulta( );\n\t\tif( $this->persistencia->getNext( ) ){\n\t\t\t$this->setId( $this->persistencia->getParametro( \"idusuario\" ) );\n\t\t\t$this->setNombres( $this->persistencia->getParametro( \"nombres\" ) );\n\t\t\t$this->setApellidos( $this->persistencia->getParametro( \"apellidos\" ) );\n\t\t\t$this->setUser( $this->persistencia->getParametro( \"usuario\" ) );\n\t\t\t\n\t\t\t$rol = new Rol( null );\n\t\t\t$rol->setId( $this->persistencia->getParametro( \"idrol\" ) );\n\t\t\t$rol->setNombre( $this->persistencia->getParametro( \"nombrerol\" ) );\n\t\t\t$this->setRol( $rol );\n\t\t}\n\t\t//echo $this->persistencia->getSQLListo( );\n\t\t$this->persistencia->freeResult( );\n\t\t\n\t}",
"public function getIdVendedor()\n {\n return $this->idVendedor;\n }",
"public function getIdRelacionamento()\n {\n return $this->id_relacionamento;\n }",
"function traerNuevoId() {\n $usuarios = traerTodos();\n\n if (count($usuarios) == 0) {\n return 1;\n }\n $elUltimo = array_pop($usuarios);\n\n $id = $elUltimo[\"id\"];\n\n return $id + 1;\n }",
"public function getReacaoId()\n {\n return $this->reacaoId;\n }",
"private function getCuestionarioId(){\n\t\treturn $this->cuestionario_id;\n\t}",
"public function getIdEmpleadoRecive()\n {\n return $this->idEmpleadoRecive;\n }",
"public function procesar_traduccion(){\n\t\t//si existe hay que editar, sino crear nuevo\n\t\t$this->Builder->where('anuncio',$this->anuncio);\n\t\t$this->Builder->where('idioma',$this->idioma);\n\n\t\tif($salida = $this->Builder->getOne('anuncios_idiomas')){\n\t\t\t$this->id = $salida['id'];\n\t\t\t$this->actualizar_idioma();\n\t\t\t\n\t\t}else{\n\t\t\t$this->savenew_tradd();\t\t\t\n\t\t}\n\t}",
"public function getRecurso_id()\n {\n return $this->recurso_id;\n }",
"public function getIdcargo(){\n return $this->idcargo;\n }",
"public function getID()\n {\n return $this->idUsuario;\n }",
"public function idRetorno(){\r\n\t\treturn $this->retorno;\r\n\t}",
"public function getDenunciadoId()\n {\n return $this->denunciado_id;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add_plugin adds a plugin by its slug. | function add_plugin(string $plugin_slug)
{
// How do I get the plugin?
$current = get_option('active_plugins');
$plugin = plugin_basename(trim($plugin_slug));
if (
!in_array($plugin, $current)
&& replace_plugin($plugin_slug)
) {
return true;
}
return false;
} | [
"function add_plugin($plugin)\n {\n }",
"public function addPlugin(Plugin $plugin): void;",
"public function add_plugin($plugin)\n {\n $this->plugins[] = $plugin;\n }",
"function jetpack_register_plugin( $slug ) {\n\t_deprecated_function( __FUNCTION__, '7.1', 'Jetpack_Gutenberg::set_extension_available' );\n\n\tJetpack_Gutenberg::register_plugin( $slug );\n}",
"abstract public function register_plugin();",
"function addPlugin($a_plugin_name)\n\t{\n\t\tarray_push($this->plugins, $a_plugin_name);\n\t}",
"public function addPlugin(Sabre_DAV_ServerPlugin $plugin) {\n\n $this->plugins[get_class($plugin)] = $plugin;\n $plugin->initialize($this);\n\n }",
"public function addPlugin( Plugin $plugin ): void {\n\t\t$this->plugins[] = $plugin;\n\t\t$this->httpClientModified = true;\n\t}",
"static function registerPlugin( $plugin )\n\t{\n\t\trequire_once( BASEPATH.\"plugins/$plugin/$plugin.class.php\" ); \n\t\tarray_push( CORE_PluginManagement::$plugins_list, $plugin );\n\t\tlog_message('debug', \"Register Plugin:\".$plugin);\n \t}",
"public function addPlugin(ExtensionPluginInterface $plugin): void\n {\n $this->plugins[get_class($plugin)] = $plugin;\n }",
"public function addPlugin(Plugin $plugin): void\n {\n $this->plugins[] = $plugin;\n $this->httpClientModified = true;\n }",
"function cot_plugin_add($hook_bindings, $name, $title, $is_module = false)\n{\n\tglobal $db, $db_plugins;\n\n\tif (empty($title))\n\t{\n\t\t$title = $name;\n\t}\n\n\t$insert_rows = array();\n\tforeach ($hook_bindings as $binding)\n\t{\n\t\t$insert_rows[] = array(\n\t\t\t'pl_hook' => $binding['hook'],\n\t\t\t'pl_code' => $name,\n\t\t\t'pl_part' => $binding['part'],\n\t\t\t'pl_title' => $title,\n\t\t\t'pl_file' => empty($binding['file']) ? \"$name/$name.{$binding['part']}.php\" : $name . '/' . $binding['file'],\n\t\t\t'pl_order' => $binding['order'],\n\t\t\t'pl_active' => 1,\n\t\t\t'pl_module' => (int) $is_module\n\t\t);\n\t}\n\treturn $db->insert($db_plugins, $insert_rows);\n}",
"function addNamespacePlugin($namespace, $baseDir, $plugin);",
"public static function add_plugin_item($args)\n {\n }",
"public function register_addon($slug) {\n list ($t1, $t2) = explode('/', $slug);\n $this->addons[] = str_replace('.php', '', $t2);\n }",
"function addplugin($plugin_array) {\n $plugin_array['paralax'] = plugins_url ('/js/mybuttons.js', __FILE__ );\n\n return $plugin_array;\n}",
"public function addInstance(Plugin $instance)\n\t{\n\t\t$this->plugins[] = $instance;\n\t}",
"function registerPlugin() {\n\t\tif (func_num_args()) {\n\t\t\t$args = func_get_args();\n\t\t\t$this->__plugins[array_shift($args)] = $args;\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}",
"function up_add_enrol_plugin($name, $inserted, $course, $data)\n{\n\tglobal $CFG;\n\n\t$name = clean_param($name, PARAM_PLUGIN);\n\n\tif(empty($name)) {\n\t\treturn false;\n\t}\n\n\n\t$location = \"$CFG->dirroot/enrol/$name\";\n\tif(!file_exists(\"$location/lib.php\")) {\n\t\t//debug\n\t\t//echo \"<h1 style='font-weight:bold;font-size=32;color:#FF0000'>PLUGIN DOES NOT EXIST</h1>\";\n\t\treturn false;\n\t}\n\n\tinclude_once(\"$location/lib.php\");\n\t$class = \"enrol_{$name}_plugin\";\n\tif(!class_exists($class)) {\n\t\t//debug\n\t\t//echo \"<h1 style='font-weight:bold;font-size=32;color:#FF0000'>CLASS DOES NOT EXIST</h1>\";\n\t\treturn false;\n\t}\n\n\t$plugin = new $class();\n\n\tif($inserted) {\n\t\tif($plugin->get_config('defaultenrol')) {\n\t\t\t$plugin->add_default_instance($course);\n\t\t}\n\t}\n\n\t//debug\n\t//echo \"<h1 style='font-weight:bold;font-size=32'>Enrolment plugin added!</h1>\";\n\treturn true;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
makes sure the given DN contains exactly one space after each , | function normalize_dn($dn){
$dn = preg_replace('/,/',', ',$dn);
$dn = preg_replace('/,\s+/',', ',$dn);
return $dn;
} | [
"protected function escapeDN($dn) {\n\t\tif (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\tif (! trim($dn))\n\t\t\treturn $dn;\n\n\t\t# Check if the RDN has a comma and escape it.\n\t\twhile (preg_match('/([^\\\\\\\\]),(\\s*[^=]*\\s*),/',$dn))\n\t\t\t$dn = preg_replace('/([^\\\\\\\\]),(\\s*[^=]*\\s*),/','$1\\\\\\\\2C$2,',$dn);\n\n\t\t$dn = preg_replace('/([^\\\\\\\\]),(\\s*[^=]*\\s*)([^,])$/','$1\\\\\\\\2C$2$3',$dn);\n\n\t\tif (DEBUG_ENABLED)\n\t\t\tdebug_log('Returning (%s)',17,0,__FILE__,__LINE__,__METHOD__,$dn);\n\n\t\treturn $dn;\n\t}",
"public function sanitizeDN($dn);",
"function clncomma($myfdval) {\n\t\tif (@ereg(\",,\", $myfdval)) {\n\t\t\t// it has double comma, so clean up\n\t\t\t$samyf = trim($myfdval);\n $samyf = str_replace(\",,\",\",\",$myfdval);\n return $samyf;\n\t\t}\n\t\telse {\n\t\t\treturn $myfdval;\n\t\t}\n\n\t}",
"protected static function _correctDNSplitting($dn = array(),\n $separator = ',')\n {\n foreach ($dn as $key => $dn_value) {\n // Refresh value (foreach caches!)\n $dn_value = $dn[$key];\n // If $dn_value is not in attr=value format, we had an unescaped\n // separator character inside the attr name or the value. We assume\n // that it was the attribute value.\n\n // TODO: To solve this, we might ask the schema. The\n // Horde_Ldap_Util class must remain independent from the\n // other classes or connections though.\n if (!preg_match('/.+(?<!\\\\\\\\)=.+/', $dn_value)) {\n unset($dn[$key]);\n if (array_key_exists($key - 1, $dn)) {\n // Append to previous attribute value.\n $dn[$key - 1] = $dn[$key - 1] . $separator . $dn_value;\n } elseif (array_key_exists($key + 1, $dn)) {\n // First element: prepend to next attribute name.\n $dn[$key + 1] = $dn_value . $separator . $dn[$key + 1];\n } else {\n $dn[$key] = $dn_value;\n }\n }\n }\n return array_values($dn);\n }",
"public function sanitizeDN($dn) {\n\t\treturn $this->helper->sanitizeDN($dn);\n\t}",
"function getCN($dn) {\r\n preg_match('/[^,]*/', $dn, $matchs, PREG_OFFSET_CAPTURE, 3);\r\n return $matchs[0][0];\r\n}",
"function explodeDn($dn)\n {\n $strDn = $this->multiexplode(array(\",\", \";\", \"/\"), $dn);\n $dn = \"\";\n $cn = '';\n for ($i = count($strDn) - 1; $i >= 0; $i--) {\n $dn .= \"/\" . $strDn[$i];\n\n //Parse CN\n $start = 'CN=';\n $ini = strpos($strDn[$i], $start);\n\n if (isset($ini) && $ini !== false) {\n $cn = substr($strDn[$i], $ini + 3);\n }\n\n }\n\n return array(\"dn\" => $dn, \"cn\" => $cn);\n }",
"function dn2uri ($dn) {\n\tglobal $servers;\n\t$server = $servers[1]['host'];\n\t$dnParts = array_reverse(split(\",\", $dn));\n\tfor ($i = count($dnParts)-1; $i >= 0; $i--){\n\t\t$uri = $uri . trim($dnParts[$i]);\n\t\tif ($i != 0) $uri = $uri . \",\";\n\t}\n\t$uri = \"ldap://$server/\" . urlencode($uri);\n\t$uri = str_replace (\"%3D\", \"=\", $uri);\n\t$uri = str_replace (\"%2C\", \",\", $uri);\n\t$uri = str_replace (\"%20\", \"+\", $uri);\n\treturn $uri;\n}",
"private function stripDN($dn, $basedn, $stripuid) {\n $attrs = explode(\",\", rtrim(str_replace($basedn, \"\", $dn), \" ,\"));\n \n if(sizeof($attrs)>0) {\n $item = $attrs[0];\n \n if($stripuid) {\n $attrs=explode(\"=\",$attrs[0],2);\n if(sizeof($attrs)>1) {\n $item=$attrs[1];\n }\n }\n $dn=$item;\n }\n return $dn;\n }",
"function validate_field_contains_space(string $field_value, array &$field): bool\n{\n if (str_word_count(trim($field_value)) < 2) {\n $field['error'] = 'Field must contain space';\n return false;\n }\n\n return true;\n}",
"function ldap_explode_dn2($dn)\n{\n\t// explode $dn on \",\", except when escaped as \"\\,\")\n\t$dn = preg_split(\"~(?<!\\\\\\)\" . preg_quote(\",\",\"~\") . \"~\",$dn);\n\n\tfor($i=0;$i<count($dn);$i++)\n\t{\n\t\t$component_dn = \"\";\n\t\tfor($j=$i;$j<count($dn);$j++)\n\t\t\t$component_dn .= ($j>$i?\",\":\"\") . $dn[$j];\n\n\t\t// explode $dn[$i] on \"+\", except when escaped as \"\\+\")\n\t\t$rdn = preg_split(\"~(?<!\\\\\\)\" . preg_quote(\"+\",\"~\") . \"~\",$dn[$i]);\n\n\t\t$dn[$i] = array(\n\t\t\t\"attrib\"=>\"\",\n\t\t\t\"value\"=>\"\",\n\t\t\t\"dn\"=>$component_dn);\n\n\t\tfor($j=0;$j<count($rdn);$j++)\n\t\t{\n\t\t\t$dn[$i][\"attrib\"].=($j==0?\"\":\"+\") . substr($rdn[$j],0,strpos($rdn[$j],\"=\"));\n\t\t\t$dn[$i][\"value\"].=($j==0?\"\":\" + \") . substr($rdn[$j],strpos($rdn[$j],\"=\")+1);\n\t\t}\n\n\t\t$dn[$i][\"value\"]=ldap_unescape_dn_string($dn[$i][\"value\"]);\n\t}\n\t$dn = array(\"count\"=>count($dn)) + $dn;\n\n\treturn $dn;\n}",
"static function cleanaddress($address) {\n\t\t$address = trim($address,',');\n\t\t// remove suite suffix\n\t\t$address = preg_replace('/((Ste|Suite|PO|POBOX|PO Box|ll|office|room|floor)([ \\-\\.\\:]+)([0-9]+))/ie','',$address);\n\t\t// remove any prefix, before the numbers (like the mall name\n\t\t$address = preg_replace('/^([a-z ]+)([0-9]+)/i','${2}',$address);\n\t\t// clean whitespace\n\t\t$address = preg_replace('/\\t/', ' ',$address);\n\t\t$address = str_replace(\"\\n\",' ',$address);\n\t\t$address = preg_replace('/\\s\\s+/', ' ',$address);\n\t\t// clean double-commas\n\t\t$address = str_replace(',,', ', ',$address);\n\t\t$address = str_replace(', ,', ', ',$address);\n\t\t// clean whitespace (again)\n\t\t$address = preg_replace('/\\s\\s+/', ' ',$address);\n\t\treturn trim($address);\n\t}",
"function replaceDBlSpace($str='') {\r\n\t\tif(trim($str) == '')\r\n\t\t\treturn;\r\n\t\t\r\n\t\twhile ($pos = strpos($str,\" \")) {\r\n\t\t\t$str = str_replace(\" \",\" \",$str);\r\n\t\t}\r\n\r\n\t\treturn $str;\r\n\t}",
"private function getCN( $dn ) {\n\t\tpreg_match( '/[^,]*/', $dn, $matchs, PREG_OFFSET_CAPTURE, 3 );\n\t\tif ( ! empty( $matchs ) ) {\n\t\t\treturn $matchs[0][0];\n\t\t}\n\n\t\treturn false;\n\t}",
"function m_iscommadelimited($conn, $identifier){}",
"public static function implodeDn(array $dn)\n {\n foreach ($dn as $index => $piece) {\n $values = explode('=', $piece, 2);\n if (count($values) === 1) {\n throw new InvalidArgumentException(sprintf('Unable to parse DN piece \"%s\".', $values[0]));\n }\n $dn[$index] = $values[0].'='.self::escapeValue($values[1], null, LDAP_ESCAPE_DN);\n }\n\n return implode(',', $dn);\n }",
"function getCN($dn) {\n preg_match('/[^,]*/', $dn, $matchs, PREG_OFFSET_CAPTURE, 3);\n return $matchs[0][0];\n }",
"public function parseLdapDn($dn)\n\t{\n\t\t$parsr=ldap_explode_dn($dn, 0);\n\t\t//$parsr[] = 'EE=Sôme Krazï string';\n\t\t//$parsr[] = 'AndBogusOne';\n\t\t$out = array();\n\t\tforeach($parsr as $key=>$value){\n\t\t\tif(FALSE !== strstr($value, '=')){\n\t\t\t\tlist($prefix,$data) = explode(\"=\",$value);\n\t\t\t\t$data=preg_replace(\"/\\\\\\([0-9A-Fa-f]{2})/e\", \"''.chr(hexdec('\\\\1')).''\", $data);\n\t\t\t\tif(isset($current_prefix) && $prefix == $current_prefix){\n\t\t\t\t\t$out[$prefix][] = $data;\n\t\t\t\t} else {\n\t\t\t\t\t$current_prefix = $prefix;\n\t\t\t\t\t$out[$prefix][] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}",
"function domain_to_dcs($domain){\n $domain_dcs = explode(\".\", $domain);\n $dc_string = \"\";\n foreach ($domain_dcs as $key => $val) {\n $dc_string .= \"DC=\".$val;\n if ($key < count($domain_dcs)-1){\n $dc_string .= \",\";\n }\n }\n return $dc_string;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retorna los datos de heladera de todos los pacientes | public function datosHeladera(){
$answer = $this->queryList("SELECT heladera FROM paciente",[]);
return $answer;
} | [
"public function getPiezas(){\n\n\t\t$em = $this->getEntityManager(); \n\n\t\t$array = array(); \n \n $pieza = 'SELECT p FROM InformaticaBundle:Pieza p WHERE p.id <> 0 ORDER By p.id ASC';\n $pieza = $em->createQuery($pieza); \n $pieza = $pieza->getResult();\n\n return $pieza; \n\t}",
"private function cargar() {\n $this->omision();\n $res = Funciones::gEjecutarSQL(\"SELECT PR.CODAPAR,CONCAT(A.PORTAL,'-',A.PISO,A.LETRA) AS APARTAMENTO,PR.CODPERS,CONCAT(P.APELLIDOS,' ',P.NOMBRE) AS PERSONA,PR.BAJA,DATE_FORMAT(PR.BAJA,'%d-%m-%Y') AS FECHA,PR.ORDEN FROM PROPIETARIOS PR LEFT JOIN APARTAMENTOS A ON PR.CODAPAR=A.CODAPAR LEFT JOIN PERSONAS P ON PR.CODPERS=P.CODPERS ORDER BY CODAPAR ASC,IFNULL(BAJA,'9999-99-99') DESC, ORDEN ASC\");\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\n $this->aPropietarios[] = array($aRow['CODAPAR'],$aRow['APARTAMENTO'],$aRow['CODPERS'],$aRow['PERSONA'],$aRow['BAJA'],$aRow['FECHA'],$aRow['ORDEN']);\n }\n $res->closeCursor();\n }",
"protected function getAllDatas()\n {\n $result = array();\n \n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n $isActivePlayer = $current_player_id == self::getActivePlayerId();\n\n $result['game_number'] = self::getGameStateValue('game_number');\n\n $result['location_total'] = self::getGameStateValue('location_total');\n\n $result['location_number'] = self::getGameStateValue('location_number');\n\n $result['location_marker_total'] = $this->getLocation()['max_tokens'];\n\n $result['location_marker'] = self::getGameStateValue('location_marker');\n\n $result['players'] = self::getPlayerStats();\n\n $result['active_player'] = self::getActivePlayerId();\n\n $result['hogwarts_cards_descriptions'] = $this->hogwartsCardsLibrary->hogwartsCards;\n $result['villain_descriptions'] = $this->villainCardsLibrary->villainCards;\n $result['dark_arts_descriptions'] = $this->darkArtsCardsLibrary->darkArtsCards;\n\n $result['hand'] = $this->getDeck($current_player_id)->getCardsInLocation('hand');\n\n $result['played_cards'] = $this->getDeck(self::getActivePlayerId())->getCardsInLocation('played');\n\n $result['dark_arts_cards'] = $this->darkArtsCards->getCardsInLocation('hand');\n\n $result['hogwarts_cards'] = $this->hogwartsCards->getCardsInLocation('revealed');\n\n $result['effects'] = $this->getActiveEffects();\n\n if ($isActivePlayer == true) {\n $result['acquirable_hogwarts_cards'] = $this->getAcquirableHogwartsCards($current_player_id);\n }\n\n $result['villains_max'] = self::getGameStateValue('villains_max');\n $result['villains_left'] = $this->villainCards->countCardInLocation('deck');\n $villain1 = $this->villainCards->getPlayerHand(1);\n if (count($villain1) > 0) {\n $result['villain_1'] = reset($villain1);\n $result['villain_1_dmg'] = self::getGameStateValue('villain_1_dmg');\n }\n $villain2 = $this->villainCards->getPlayerHand(2);\n if (count($villain2) > 0) {\n $result['villain_2'] = reset($villain2);\n $result['villain_2_dmg'] = self::getGameStateValue('villain_2_dmg');\n }\n $villain3 = $this->villainCards->getPlayerHand(3);\n if (count($villain3) > 0) {\n $result['villain_3'] = reset($villain3);\n $result['villain_3_dmg'] = self::getGameStateValue('villain_3_dmg');\n }\n\n return $result;\n }",
"public function cargarPersonas(){\r\n\t\t$personaDB = new personasBD();\r\n \t\t$datos = $personaDB->traerDatosPersonas();\r\n \t\tforeach ($datos as $key => $value) {\r\n \t\t\textract($value);\r\n \t\t\t$pers = new Persona($nombre, $apellido);\r\n \t\t\tarray_push($this->listado, $pers);\t\t\r\n \t\t}\r\n\t}",
"public function datosEspectaculos(){\n\t\t\n\t\t$idUbicacion = 362;\n\t\t$idEje = 3486;\n\t\t\n\t\t//Sacamos el contenido\n\t\t$sql ='SELECT cTipo, p.cUrl as cUrlPrograma, p.cHorario, p.cNombre, idElemento, \n\t\t\t\t\t cH.cUrlEspecial, cH.idImagen, REPLACE(cH.cTitulo,\"\\'\",\"\\\\\\\\\\'\") as cTitulo,\n\t\t\t\t\t cTipo, cUrlImg, cPivotPoint, s.cUrl as seccionUrl, s.cDescripcion as seccion, \n\t\t\t\t\t cH.iVentanaNueva, dFechaPublicacion\n\t\t\t FROM contenidoHome cH \n\t\t\t\t\t LEFT JOIN programas p on p.idPrograma = cH.idPrograma \n\t\t\t\t\t LEFT JOIN seccion s on s.idSeccion = p.idSeccion\n\t\t\t\tWHERE cH.idEje = '.$idEje.' \n\t\t\t\t AND cH.idUbicacion = '.$idUbicacion.'\n\t\t\t \t\t AND dFechaPublicacion = (SELECT dFechaPublicacion \n\t\t\t\t\t\t\t \t\t\t FROM contenidoHome\n\t\t\t\t\t\t\t\t\t\t\t WHERE idEje = '.$idEje.' \n\t\t\t\t\t\t\t\t\t\t\t\t AND idUbicacion = '.$idUbicacion.' \n\t\t\t\t\t\t\t\t\t\t\t\t AND dFechaPublicacion <= now()\n\t\t\t\t\t\t\t\t\t\t\t\tGROUP BY dFechaPublicacion \n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY dFechaPublicacion DESC\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1) \n\t\t\t\tORDER BY cH.iPrioridad DESC';\n\t\t$result = $this->query($sql);\n\t\t\n\t\t$result = $this->trataDatos($result);\n\t\t\n\t\treturn $result;\n\t\t\n\t}",
"function fetchPais() {\n\n $paises = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM pais\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id = $row['id'];\n $nombre = $row['nombre'];\n $pais = new Pais($id, $nombre);\n array_push($paises, $pais);\n }\n\n return $paises;\n }",
"public static function findAll():array \r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"SELECT * FROM puesto;\");\r\n\r\n $datos=[];\r\n while ($puesto = $db->getObjeto(\"Puesto\")) {\r\n array_push($datos, $puesto); \r\n }\r\n\r\n return $datos;\r\n }",
"public function eventosPendientes(){\n $eventos=[];\n $filas=$this->citasPendientesQuery()->all();\n //var_dump(timeHelper::getDateTimeInitial(),$filas);die();\n foreach($filas as $filaCita){\n $eventos[]=$filaCita->evento();\n }\n //*aGRGA TAMBIEN LOS TALLRESE GRUPALES\n $filas=$this->talleresPendientes();\n foreach($filas as $fila){\n $eventos[]=[\n 'id' => $fila->id,\n 'title' => 'Sesión',\n 'start' => $fila->swichtDate('fecha', false),\n 'end' => $fila->toCarbon('fecha')->addHours(1)->format(timeHelper::formatMysqlDateTime()),\n 'color' => '#dddddd',\n 'codtra' => 'EEEEEE',//$fila->eventos->codtra \n \n ]; \n }\n \n \n \n \n \n \n return $eventos;\n }",
"function all_plazas()\n {\n $query='SELECT * from sistema.plazas order by plaza';\n $datos = $this->query($query);\n return $datos;\n }",
"protected function getAllDatas()\n {\n $result = array();\n \n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n \n // Get information about players\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\n $sql = \"SELECT player_id id, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb( $sql );\n \n // TODO: Gather all information about current game situation (visible by player $current_player_id).\n \n return $result;\n }",
"public function eventosPendientes(){\n $eventos=[];\n $filas=$this->citasPendientesQuery()->all();\n //var_dump(timeHelper::getDateTimeInitial(),$filas);die();\n foreach($filas as $filaCita){\n $eventos[]=$filaCita->evento();\n }\n return $eventos;\n }",
"private function obtenerPorDatos()\r\n {\r\n if ($this->nombre && $this->sector) {\r\n $consulta = \"SELECT * FROM aula WHERE nombre='{$this->nombre}' AND sector='{$this->sector}'\";\r\n $resultado = Conexion::getInstancia()->obtener($consulta);\r\n if (gettype($resultado[0]) == \"array\") {\r\n $fila = $resultado[0];\r\n $this->id = $fila['id'];\r\n $this->nombre = $fila['nombre'];\r\n $this->sector = $fila['sector'];\r\n return array(2, \"Se obtuvo la información del aula correctamente\");\r\n }\r\n return $resultado;\r\n }\r\n Log::guardar(\"INF\", \"AULA --> OBTENER POR DATOS :NOMBRE O SECTOR INVALIDO\");\r\n return array(0, \"No se pudo hacer referencia al aula por su nombre y sector\");\r\n }",
"protected function getAllDatas()\n {\n $result = array( 'players' => array() );\n \n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n \n // Get information about players\n // Note: you can retrieve some extra fields you added for \"player\" table in \"dbmodel.sql\" if you need them.\n $sql = \"SELECT player_id id, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb( $sql );\n \n // Gather all informations about current game situation (visible by player $current_player_id).\n\n // Intersections\n $sql = \"SELECT id, coord_x, coord_y, stone_color FROM intersection \";\n $result['intersections'] = self::getCollectionFromDb( $sql );\n\n // Constants\n $result['constants'] = $this->gameConstants;\n\n // Counters\n $result['counters'] = $this->getGameCounters($current_player_id);\n \n return $result;\n }",
"function getDatos(){\n $res = $this->Consulta('SELECT C.*, P.id_planta FROM '.$this->Table .' C\n INNER JOIN\n equipos E ON E.id_equipos = C.`id_equipos`\n INNER JOIN\n secciones S ON S.id_secciones = E.id_secciones\n INNER JOIN\n plantas P ON P.id_planta = S.id_planta\n \n WHERE '.$this->PrimaryKey.' = '.$this->_datos);\n $resultado = $res[0];\n // $resultado = array_map('utf8_encode',$resultado);\n \n print_r( json_encode( $resultado ) );\n }",
"function GetPeticionesAbiertas()\r\n{\r\n$maquinas = array();\r\n//recibimos las peticiones pendientes de finalizar\r\n$peticiones = GetPeticionesPendientes();\r\n\tforeach($peticiones as $v_peticion)\r\n\t{\r\n\t //comprobamos que realmente esta abierta realizando un peticion a la api\r\n\t if( comprobarPeticion($v_peticion[0]) != \"terminated\" and comprobarPeticion($v_peticion[0]) != \"shutting-down\" ){\r\n\t $maquinas[] = $v_peticion[0];\r\n\t }\r\n\t}\r\n return $maquinas;\r\n}",
"function obtener_horarios_disp (){\n \n //el formato de s__fecha_consulta es y-m-d.\n $anio_lectivo=date('Y', strtotime($this->s__fecha_consulta)); \n \n $aulas_ua=$this->dep('datos')->tabla('aula')->get_aulas_por_sede($this->s__id_sede);\n \n $periodo=$this->dep('datos')->tabla('periodo')->get_periodo_calendario($this->s__fecha_consulta, $anio_lectivo, $this->s__id_sede);\n \n $asignaciones=$this->procesar_periodo($periodo, 'hd'); \n \n //obtenemos todas las aulas involucradas \n $aulas=$this->obtener_aulas($asignaciones);\n toba::memoria()->set_dato_instancia(0, $this->s__id_sede);\n $horarios_disponibles=new HorariosDisponibles();\n \n $this->s__horarios_disponibles=$horarios_disponibles->calcular_horarios_disponibles($aulas, $aulas_ua, $asignaciones);\n \n if(count($this->s__horarios_disponibles)==0){\n $mensaje=\"No existen horarios disponibles para el día seleccionado\";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n }\n \n toba::memoria()->set_dato_operacion(0, $this->s__fecha_consulta);\n \n }",
"function buscarTurnos(){\n $listado = new Turnos();\n \n $conexion = GenerarConexion();\n try{\n // set the PDO error mode to exception\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $consulta = \"SELECT id, fechahora, estado FROM Turno WHERE estado='abierto' ORDER BY fechahora\";\n $sentencia = $conexion->prepare($consulta);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll();\n \n //Preprocesado de los datos\n //Por cada dato encontrado en el resultado... \n foreach($resultado as $dato){\n //Procesamos el medicamento\n $turno = new Turno();\n $turno->id = $dato['id'];\n $turno->estado = $dato['estado'];\n $turno->fechaHora=$dato['fechahora'];\n //Agregamos el medicamento al array.\n array_push($listado->turnos,$turno);\n }\n }\n catch(PDOException $e){\n $confirmacion = new Confirmacion();\n $confirmacion->mensaje = \"Error: \".$e->getMessage();\n $confirmacion->estado = \"ERROR\";\n array_push($listado->turnos,$confirmacion);\n }\n\n $conexion=null;\n return $listado;\n }",
"public function get_all(){\n $query = $this->db->query(\"SELECT calles.id as id, calles.nombre as nombre, calles.tipo as tipo, puntos.id as id_punto, puntos.punto_x as x, puntos.punto_y as y FROM calles LEFT JOIN puntos on calles.id = id_calle ORDER BY calles.id asc\");\n $data = array();\n if ($query->num_rows() > 0){\n foreach ($query->result_array() as $row){\n $data[] = $row;\n }\n }\n return $data;\n }",
"protected function getAllDatas()\n {\n $result = array();\n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n\n // Get information about players\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\n $sql = \"SELECT player_id id, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb($sql);\n //won cards for each player\n $players = self::loadPlayersBasicInfos();\n foreach ($players as $player) {\n $result['won'][$player[\"player_id\"]] = $this->guestcards->getCardsInLocation(DECK_LOC_WON, $player[\"player_id\"]);\n }\n\n // Gather all information about current game situation (visible by player $current_player_id).\n $result['cardsDescription'] = $this->getCardsDescription();\n $result['usefulColors'] = $this->getUsefulColors();\n $result['hand'] = $this->dessertcards->getCardsInLocation(DECK_LOC_HAND, $current_player_id);\n $result['guestsOnTable'] = $this->guestcards->getCardsInLocation(DECK_LOC_RIVER);\n $result['lastDiscardedGuest'] = $this->guestcards->getCardOnTop(DECK_LOC_DISCARD);\n $result['discardedDesserts'] = $this->dessertcards->getCardsInLocation(DECK_LOC_DISCARD);\n $result['counters'] = $this->argCardsCounters();\n $result['isOpeningABuffetOn'] = $this->isOpeningABuffetOn();\n $result['isPoachingOn'] = $this->isPoachingOn();\n $result['isExpansionBaconOn'] = $this->isExpansionBaconOn();\n $result['cardsAvailable'] = $this->getCardsAvailable();\n return $result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ProcessChargeAmountNotification function is a shell function for handling a . You will need to modify this function to relay the information in the to your internal systems that process that data. | function ProcessChargeAmountNotification($dom_response_obj) {
/*
* +++ CHANGE ME +++
* Charge amount notifications inform you that a customer has been
* charged for either the full amount or a partial amount of an
* order. A <charge-amount-notification> contains the order number
* that Google assigned to the order, the value of the most recent
* charge to the customer and the total amount that has been
* charged to the customer for the order. Google Checkout will send a
* <charge-amount-notification> after charging the customer.
*
* If you are implementing the Notification API, you need to
* modify this function to relay the information in the
* <charge-amount-notification> to your internal systems that
* process this order data.
*/
SendNotificationAcknowledgment();
} | [
"public function handleChargeUpdated()\n {\n return $this->processPayment();\n }",
"function ProcessRefundAmountNotification($dom_response_obj) {\n /*\n * +++ CHANGE ME +++\n * Refund amount notifications inform you that a customer has been\n * refunded either the full amount or a partial amount of an order\n * total. A <refund-amount-notification> contains the order number\n * that Google assigned to the order, the value of the most recent\n * refund to the customer and the total amount that has been\n * refunded to the customer for the order. Google Checkout will send a\n * <refund-amount-notification> after refunding the customer.\n *\n * If you are implementing the Notification API, you need to\n * modify this function to relay the information in the\n * <refund-amount-notification> to your internal systems that\n * process this order data.\n */\n SendNotificationAcknowledgment();\n}",
"private function AdminDoCharge() {\n\t$out = '<h3>Adding charges...</h3>';\n\t\n\t$out .= $this->DoCharges();\n\n\t/* 2016-09-11 old version\n\t$objLines = $this->LineRecords();\n\tif ($objLines->HasRows()) {\t// package lines\n\t $dlrSaleTot = 0;\n\t $dlrItmShTot = 0;\n\t $dlrPkgShTot = 0;\n\n\t $txtLog = 'charging for package '.$this->Number().' (ID='.$this->ID.')';\n\t $out .= $txtLog;\n\n\t $arEvent = array(\n\t 'descr'\t=> $txtLog,\n\t 'where'\t=> __METHOD__,\n\t 'code'\t=> '+PCH');\n\t $this->StartEvent($arEvent);\n\n\t $cntLines = 0;\t// for logging only\n\t $cntQty = 0;\t// for logging only\n\t while ($objLines->NextRow()) {\n\t\t$idRow = $objLines->KeyValue();\n\t\t$objItem = $objLines->ItemRecord();\t// item data\n\t\t// prices in package line data override catalog prices\n\t\t//$dlrSale = $objItem->PriceSell;\t// sale price\n\t\t//$objShCo = $objItem->ShipCostObj();\t// shipping cost data\n\t\t//$dlrItmSh = $objShCo->PerItem;\n\t\t//$dlrPkgSh = $objShCo->PerPkg;\n\t\t$dlrSale = $objLines->PriceSell();\t// sale price\n\t\t$dlrItmSh = $objLines->ShPerItm();\n\t\t$dlrPkgSh = $objLines->ShPerPkg();\n\t\t$qtyShp = $objLines->QtyShipped();\n\n\t\t$dlrSaleLine = $dlrSale * $qtyShp;\n\t\t$dlrItmShLine = $dlrItmSh * $qtyShp;\n\n\t\t$dlrSaleTot += $dlrSaleLine;\n\t\t$dlrItmShTot += $dlrItmShLine;\n\t\tif ($dlrPkgShTot < $dlrPkgSh) {\n\t\t $dlrPkgShTot = $dlrPkgSh;\n\t\t}\n\t\t// record the charges applied for this line:\n\t\t$arUpd = array(\n\t\t 'CostSale' => $dlrSale,\n\t\t 'CostShItm' => $dlrItmSh);\n\t\t$objLines->Update($arUpd);\n\n\t\t// stats for logging\n\t\t$cntLines++;\n\t\t$cntQty += $qtyShp;\n\t }\n\t // create transaction records:\n\t if ($cntQty == 1) {\n\t\t$txtItemShp = 'cost of item being shipped';\n\t } else {\n\t\t$txtItemShp = 'total cost of items being shipped';\n\t }\n\t $this->AddTrx(KI_ORD_TXTYPE_ITEM_SOLD,$txtItemShp,$dlrSaleTot);\n\t $this->AddTrx(KI_ORD_TXTYPE_PERITM_SH,'per-item shipping total',$dlrItmShTot);\n\t $this->AddTrx(KI_ORD_TXTYPE_PERPKG_SH,'per-package shipping',$dlrPkgShTot);\n\n\t // update package record:\n\t $arUpd = array(\n\t 'ChgShipItm'\t=> $dlrItmShTot,\n\t 'ChgShipPkg'\t=> $dlrPkgShTot,\n\t 'WhenFinished' => 'NOW()');\n\t $this->Update($arUpd);\n\n\t // log completion of event:\n\t $txtLog = 'sold: '\n\t\t.$cntLines.Pluralize($cntLines,' line').', '\n\t\t.$cntQty.Pluralize($cntQty,' item').': '\n\t\t.'$'.$dlrItmShTot.' itm s/h, $'.$dlrPkgShTot.' pkg s/h';\n\t $out .= '<br>'.$txtLog;\n\t $arUpd = array('descrfin' => $txtLog);\n\t $this->FinishEvent($arUpd);\n\t} else {\n\t $out = 'No items to charge!';\n\t}\n\t*/\n\treturn $out;\n }",
"public function charge($amount);",
"public function onCharge($order);",
"abstract public function getMessageCharge($messageId);",
"public function processChargeTransactionRequest()\n\t{\n\t\t$this->errors = array();\n\t\t$order_increment_id = Tools::getValue(self::PARAM_ORDER_INCREMENT_ID);\n\t\tif (empty($order_increment_id))\n\t\t{\n\t\t\t// TODO: create order (BuyNow button) ??\n\t\t\tbluesnap::log('IPN exception: order reference is empty');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$order_state = new OrderState(Configuration::get('BS_OS_PAYMENT_VALID'));\n\t\t\tif (!Validate::isLoadedObject($order_state))\n\t\t\t\t$this->errors[] = Tools::displayError('The new order status is invalid.');\n\t\t\telse\n\t\t\t{\n\t\t\t\t//save transactionId\n\t\t\t\t$bluesnap_order = new BluesnapOrder();\n\t\t\t\t$bluesnap_order->id_cart = $order_increment_id;\n\t\t\t\t$bluesnap_order->bluesnap_reference = Tools::getValue(self::PARAM_REFERENCE_NUMBER);\n\t\t\t\t$bluesnap_order->add();\n\n\t\t\t\t$obj_order = new Order(Order::getOrderByCartId($order_increment_id));\n\t\t\t\tif (!$obj_order->id)\n\t\t\t\t{\n\t\t\t\t\tbluesnap::log('IPN error: cannot load Order object with cart_id \"'.$order_increment_id.'\"');\n\t\t\t\t\t//throw new PrestaShopException('Cannot load Order object');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$current_order_state = $obj_order->getCurrentOrderState();\n\t\t\t\tif ($current_order_state->id != $order_state->id)\n\t\t\t\t\t$this->changeOrderStatus($obj_order, (int)Configuration::get('BS_OS_PAYMENT_VALID'), $this->errors);\n\t\t\t\telse\n\t\t\t\t\t$this->errors[] = Tools::displayError('The order has already been assigned this status.');\n\t\t\t}\n\t\t}\n\n\t\tif (count($this->errors))\n\t\t{\n\t\t\tforeach ($this->errors as $error)\n\t\t\t\tbluesnap::log('IPN error: '.$error);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function handleChargePaid()\n {\n return $this->processPayment();\n }",
"public function processPayment() {\n\t\t}",
"public function processPayment()\n\t {\n\t }",
"public function process_webhook_charge_succeeded( $notification ) {\n\t\t// The following payment methods are synchronous so does not need to be handle via webhook.\n\t\tif ( ( isset( $notification->data->object->source->type ) && 'card' === $notification->data->object->source->type ) || ( isset( $notification->data->object->source->type ) && 'three_d_secure' === $notification->data->object->source->type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$order = WC_Stripe_Helper::get_order_by_charge_id( $notification->data->object->id );\n\n\t\tif ( ! $order ) {\n\t\t\tWC_Stripe_Logger::log( 'Could not find order via charge ID: ' . $notification->data->object->id );\n\t\t\treturn;\n\t\t}\n\n\t\t$order_id = WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $order->id : $order->get_id();\n\n\t\tif ( 'on-hold' !== $order->get_status() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Store other data such as fees\n\t\tWC_Stripe_Helper::is_wc_lt( '3.0' ) ? update_post_meta( $order_id, '_transaction_id', $notification->data->object->id ) : $order->set_transaction_id( $notification->data->object->id );\n\n\t\tif ( isset( $notification->data->object->balance_transaction ) ) {\n\t\t\t$this->update_fees( $order, $notification->data->object->balance_transaction );\n\t\t}\n\n\t\t$order->payment_complete( $notification->data->object->id );\n\n\t\t/* translators: transaction id */\n\t\t$order->add_order_note( sprintf( __( 'Stripe charge complete (Charge ID: %s)', 'woocommerce-gateway-stripe' ), $notification->data->object->id ) );\n\n\t\tif ( is_callable( array( $order, 'save' ) ) ) {\n\t\t\t$order->save();\n\t\t}\n\t}",
"public function notifyAction() {\n try {\n // Get request variables\n $request = $this->Request();\n $plugin = $this->Plugin();\n $plugin->logAction(\"Notification received\\n\"\n . print_r($request->getPost(), true));\n $config = $plugin->Config();\n\n $channel = $this->getChannelById($request->getParam(\"payment_transaction_channel_token\"));\n if (empty($channel)) {\n $plugin->logAction('Could not find channel');\n throw new Enlight_Controller_Exception('No such channel');\n exit();\n }\n // Configure gateway\n Hypercharge\\Config::set(\n $channel['username']\n , $channel['password']\n , $config->hypercharge_test ? Hypercharge\\Config::ENV_SANDBOX : Hypercharge\\Config::ENV_LIVE\n );\n $notification = Hypercharge\\Payment::notification($request->getPost());\n\n if (!$notification->isVerified()) {\n $plugin->logAction('Notification is not verified');\n throw new Enlight_Controller_Exception('Notification is not verified');\n exit();\n }\n $paymentH = $notification->getPayment();\n\n if ($paymentH->isError() && $paymentH->error->status_code) {\n $message = \"ERROR: \" . $paymentH->error->status_code . \": \" . $paymentH->error->message . ' - ' . $paymentH->error->technical_message;\n $plugin->logAction($message);\n exit();\n }\n $plugin->logAction(\"payment OK\");\n $plugin->logAction(sprintf('payment status: %s', $paymentH->status));\n\n // Find the transaction\n $transaction_id_field = \"transactionId\";\n $trn = explode('---', $paymentH->transaction_id);\n list($transactionId, $paymentId) = explode(' ', $trn[0]);\n if (empty($transactionId) || empty($paymentId)) {\n $plugin->logAction('Incorrect transaction ID');\n throw new Enlight_Controller_Exception('Incorrect transaction id');\n exit();\n }\n //Find unique_id\n $uniqueId = $paymentH->unique_id;\n\n // Identify notification channel\n $transactionH = $notification->getTransaction();\n $plugin->logAction(sprintf('transaction type: %s', $transactionH->transaction_type));\n $plugin->logAction(sprintf('transaction unique_id: %s', $transactionH->unique_id));\n \n // Payment status mapping\n $newStatus = null;\n $isAuthorize = $transactionH->transaction_type == 'authorize' || $transactionH->transaction_type == 'authorize3d';\n switch ($paymentH->status) {\n case 'approved':\n case 'chargeback_reversed':\n $newStatus = 12;\n if ($isAuthorize)\n $newStatus = 18;\n break;\n case 'declined':\n case 'refunded':\n case 'chargebacked':\n case 'voided':\n case 'error':\n case 'rejected':\n $newStatus = 52;//35;\n break;\n case 'pending':\n case 'pending_async':\n case 'pre_arbitrated':\n $newStatus = 17;\n break;\n default:\n break;\n }\n if (null === $newStatus) {\n $plugin->logAction('Undefined transaction status: ' . $paymentH->status);\n exit();\n }\n \n $try = 1;\n //sometimes Hypercharge is faster than SW => we try more times to check the order\n while($try<4){\n //double-check if the order exists\n $plugin->logAction(sprintf('double-check if the order exists (try %s)', $try));\n $sql = '\n SELECT id FROM s_order\n WHERE transactionID=? AND temporaryID=?\n AND status!=-1\n ';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $transactionId,\n $paymentId\n ));\n\n if(!$orderId && $config->transactionId == \"uniqueId\"){\n //double-check if the order exists\n $sql = '\n SELECT id FROM s_order\n WHERE transactionID=? AND temporaryID=?\n AND status!=-1\n ';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $uniqueId,\n $paymentId\n ));\n if($orderId){\n $transaction_id_field = \"uniqueId\";\n }\n }\n if($orderId){\n $try = 10;\n } else{\n $try++;\n sleep(2);\n }\n }\n\n if (!$orderId) {\n $recoverOrder = in_array($newStatus, array(12,18,17));\n if(!$recoverOrder){\n $recoverOrder = $config->recover_rejected_orders;\n }\n if($recoverOrder){\n //check if it is a cancelled order\n //but only for approved or pending\n $sql = \"SELECT o.id AS orderId \n FROM hypercharge_orders AS ho\n JOIN s_order o ON ho.sessionId = o.temporaryID\n WHERE ho.transactionId = ?\n AND ho.uniquePaymentId = ?\n AND ho.uniqueId = ?\n AND o.status = -1\";\n $orderId = Shopware()->Db()->fetchOne($sql, array($transactionId, $paymentId, $uniqueId));\n if($orderId){\n $plugin->logAction(sprintf('The order having payment id %s , transaction id %s and unique id %s is a cancelled order', $paymentId, $transactionId, $uniqueId));\n if($config->transactionId == \"uniqueId\"){\n $plugin->logAction(sprintf('The transactionId is changed from %s to %s', $transactionId, $uniqueId));\n $transaction_id_field = \"uniqueId\";\n }\n $orderId = $this->convertOrder($orderId, ($transaction_id_field == \"uniqueId\")? $uniqueId: $transactionId, $paymentId);\n if($orderId){\n Shopware()->Db()->update(\"hypercharge_orders\", array('status' => 1), \"transactionId = '\" . $transactionId . \"' AND uniquePaymentId = '\" . $paymentId . \"'\");\n }\n }\n } else {\n $plugin->logAction(sprintf(\"The transaction is not approved; we don't check if it is a cancelled order\"));\n }\n }\n if (!$orderId) {\n if($config->transactionId == \"uniqueId\"){\n $plugin->logAction(sprintf('The order having payment id %s and transaction id %s or %s does not exist', $paymentId, $transactionId, $uniqueId));\n } else {\n $plugin->logAction(sprintf('The order having payment id %s and transaction id %s does not exist', $paymentId, $transactionId));\n }\n exit();\n }\n //the transactionID was changed to uniqueID\n if($transaction_id_field == \"uniqueId\"){\n $transactionId = $uniqueId;\n }\n\n // Update payment status\n $plugin->logAction(sprintf('Updating transaction %s with payment id %s to %s', $transactionId, $paymentId, $newStatus));\n $this->savePaymentStatus($transactionId, $paymentId, $newStatus, false);\n if($config->transactionId == \"transactionUniqueId\"){\n if($transactionH->unique_id){\n $sql = '\n UPDATE s_order\n SET transactionID = ?\n WHERE transactionID=? AND temporaryID=?\n ';\n Shopware()->Db()->query($sql, array($transactionH->unique_id, $transactionId, $paymentId));\n $plugin->logAction(sprintf('The transactionId is changed from %s to %s', $transactionId, $transactionH->unique_id));\n }else {\n $plugin->logAction(sprintf('The transaction unique Id is empty'));\n }\n }\n Shopware()->Db()->update(\"hypercharge_orders\", array('transactionUniqueId' => $transactionH->unique_id), \"$transaction_id_field = '\" . $transactionId . \"' AND uniquePaymentId = '\" . $paymentId . \"' AND status = 1\");\n\n $plugin->logAction('Notification finished');\n\n // Tell hypercharge the notification has been successfully processed\n // and ensure output ends here\n die($notification->ack());\n } catch (Exception $ex) {\n $plugin->logAction(\"ERROR: \" . $ex->getMessage());\n }\n exit();\n }",
"public function actionPaymentNotify() {\n\t\t$this->Donation->paymentNotify($this->transactionType);\n\t}",
"public function payment_notification()\r\n\t{\r\n\t\t$xml = file_get_contents('php://input');\r\n//\t\tvar_dump($this->checkout_model);\r\n\t\t$this->checkout_model->payment_notification($xml);\r\n\t}",
"function ProcessRiskInformationNotification($dom_data_root, $sn) {\n /*\n * +++ CHANGE ME +++\n * Risk information notifications provide financial information about\n * a transaction to help you ensure that an order is not fraudulent.\n * A <risk-information-notification> includes the customer's billing\n * address, a partial credit card number and other values to help you\n * verify that an order is not fraudulent. Google Checkout will send you a\n * <risk-information-notification> message after completing its\n * risk analysis on a new order.\n *\n * If you are implementing the Notification API, you need to\n * modify this function to relay the information in the\n * <risk-information-notification> to your internal systems that\n * process this order data.\n */\n \n global $db;\n \n $this->LogMessage (\"Google Checkout: Risk Information Notification #\" . $dom_data_root['google-order-number'], $debug_only_msg = false);\n \n $payment_id = $this->get_payment_by_data('google-order-number', $dom_data_root['google-order-number']);\n $ri = $dom_data_root['risk-information'];\n \n if ($payment_id > 0){\n $payment = $db->get_payment($payment_id);\n $payment['data']['google-risk-information'] = $ri;\n $err = $db->update_payment($payment_id, $payment);\n if ($err)\n $this->LogMessage($err, $debug_only_msg = false);\n \n /*\n <risk-information>\n Boolean.\n If true, order is covered by Google's Chargeback Resolution Policy and is eligible for Google's Payment Guarantee.\n If false, order is covered by Google's Chargeback Resolution Policy.\n (See Google Checkout Program Policies and Guidelines, section 7). \n http://checkout.google.com/seller/policies.html \n */\n if ( (is_bool($ri['eligible-for-protection']) && $ri['eligible-for-protection']) ||\n ($ri['eligible-for-protection'] == 'true') || $this->_debug){\n \n $xml = $this->CreateChargeOrder($dom_data_root['google-order-number'], $payment['amount']);\n $response = $this->SendRequest($xml, 'request');\n $res = $this->ProcessXmlData ($response);\n \n } else {\n \n $db->delete_payment($payment_id);\n $xml = $this->CreateCancelOrder($dom_data_root['google-order-number'], $reason=\"order is covered by Google's Chargeback Resolution Policy. (See http://checkout.google.com/seller/policies.html - Google Checkout Program Policies and Guidelines, section 7).\", $comment=\"\");\n $response = $this->SendRequest($xml, 'request');\n $res = $this->ProcessXmlData ($response);\n \n }\n }\n \n \n $this->SendNotificationAcknowledgment($sn);\n }",
"public function plgVmOnPaymentNotification()\n {\n $hashes = $_REQUEST['hash_codes'];\n\n if ($hashes)\n {\n $hashes = explode(',', $hashes);\n\n if (count($hashes) > 0)\n {\n // Setup EBANX settings\n $this->setupEbanx();\n\n foreach ($hashes as $hash)\n {\n $response = \\Ebanx\\Ebanx::doQuery(array('hash' => $hash));\n\n if (isset($response->status) && $response->status == 'SUCCESS')\n {\n $reference = (int) $response->payment->order_number;\n $status = $response->payment->status;\n $newStatus = $this->getPaymentStatus($status);\n\n if ($status == 'CO')\n {\n $this->updateOrderStatus($reference, $newStatus, 'Changed to Paid by IPN.');\n echo \"OK: Payment {$hash} was completed\";\n }\n else if ($status == 'CA')\n {\n $this->updateOrderStatus($reference, $newStatus, 'Changed to Cancelled by IPN.');\n echo \"OK: Payment {$hash} was cancelled via IPN\";\n }\n else\n {\n echo \"SKIP: Payment {$hash} is pending.\";\n }\n }\n }\n\n exit;\n }\n }\n }",
"function notify_receipt($donation, $campaign, $account) {\n\n\t$CI =& get_instance();\n\t$CI->load->library('email');\n\t$handler = false;\n\t$CI->load->library('email');\n\t$handler = $CI->email;\n\n\t$subject = '['.$campaign->title.'] Thank you for your recent donation';\n\t$from = $CI->config->item('email_from');\n\t$from = sprintf('Giving Impact <%s>', $from);\n\n\t$email_opts = $CI->config->item('email_opts');\n\n\t$account->thumb_url = _find_account_thumb($account);\n\n\t$message = $CI->load->view(\n\t\t'notifications/_donation_receipt',\n\t\tarray('donation' => $donation, 'campaign' => $campaign, 'account' => $account),\n\t\ttrue\n\t);\n\n\t$org_name = '';\n\tif( isset($campaign->campaign_id) && isset($campaign->campaign->email_org_name) ) {\n\t\t$org_name = $campaign->campaign->email_org_name;\n\t} elseif( isset($campaign->email_org_name) ) {\n\t\t$org_name = $campaign->email_org_name;\n\t}\n\n\t$handler->initialize($email_opts);\n\t$handler->from($from, $org_name);\n\n\tif( isset($campaign->campaign_id) && isset($campaign->campaign->reply_to_address) ) {\n\t\t$handler->reply_to($campaign->campaign->reply_to_address);\n\t} elseif( isset($campaign->reply_to_address) ) {\n\t\t$handler->reply_to($campaign->reply_to_address);\n\t}\n\n\tif( isset($campaign->campaign_id) && isset($campaign->campaign->bcc_address) ) {\n\t\t$handler->bcc($campaign->campaign->bcc_address);\n\t} elseif( isset($campaign->bcc_address) ) {\n\t\t$handler->bcc($campaign->bcc_address);\n\t}\n\n\t$handler->to($donation->email_address);\n\t$handler->subject($subject);\n\t$handler->message($message);\n\n\t$handler->send();\n}",
"public function calculateDeliveryCharge() {\n $remaining_miles = $this->distance - 5;\n $remaining_miles = round($remaining_miles / 5) * 5;\n if ($remaining_miles <= 0) {\n $this->deliveryCharge = 0;\n }\n else {\n $this->recursiveDelivery($remaining_miles, 0, 0);\n }\n }",
"abstract public function processPayment();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
default append filter chain | function appendFilterChain()
{
// Directed intercepting filter event (auto_append)
// see smart/actions/class.system_sys_append.php
M( MOD_SYSTEM, 'sys_append' );
} | [
"function appendFilterChain()\n { \n // do nothing\n }",
"public function appendFilter($filter)\n {\n return $this->addFilter($filter, self::CHAIN_APPEND);\n }",
"function stream_filter_append ($stream, $filtername, $read_write = null, $params = null) {}",
"protected function addFilters() {\n\n\t\t}",
"public function addFilters()\n {\n }",
"public function append_child_filters(array &$appended = array()) {\n if (!$this->filters) {\n return;\n }\n\n $fm = \\mod_dataform_filter_manager::instance($this->dataid);\n\n $appended[$this->id] = $this->id;\n foreach ($this->filters as $fid) {\n if (array_key_exists($fid, $appended)) {\n continue;\n }\n\n // Get the filter.\n $filter = $fm->get_filter_by_id($fid);\n\n // Append its child filters.\n $appended[$fid] = $fid;\n $filter->append_child_filters($appended);\n\n // Append to this filter.\n $this->append(array($filter));\n }\n }",
"public function &appendOr() {\n\t\tif ($this->current_conditions == 'where') {\n\t\t\t$this->where[] = $this->adapter->opOR();\n\t\t}\n\t\tif ($this->current_conditions == 'having') {\n\t\t\t$this->having[] = $this->adapter->opOR();\n\t\t}\n\t\treturn $this;\t\t\n\t}",
"function stream_filter_prepend($stream, $filtername, $filterparams) {}",
"public function addFilter($filter);",
"public function applyFilter();",
"function stream_filter_prepend ($stream, $filtername, $read_write, $filterparams) {}",
"function stream_filter_prepend ($stream, $filtername, $read_write = null, $params = null) {}",
"public function orFilterHavin()\n {\n }",
"protected function appendFiltersToStream($stream): void\n {\n foreach (static::$codeTransformers as $codeTransformer) {\n stream_filter_append($stream, $codeTransformer::NAME, \\STREAM_FILTER_READ);\n }\n }",
"function stream_filter_prepend($stream, string $filter_name, int $mode = 0, mixed $params) {}",
"public function addFilters() {\n\t\t$this->addFilter(new Generator\\Filters\\Upper);\n\t\t$this->addFilter(new Generator\\Filters\\Lower);\n\t\t$this->addFilter(new Generator\\Filters\\Date);\n\t\t$this->addFilter(new Generator\\Filters\\Number);\n\t}",
"protected function appendFiltersToStream($stream)\n {\n foreach (static::$filters as $filter) {\n stream_filter_append($stream, $filter::NAME, STREAM_FILTER_READ);\n }\n }",
"public function add_option_filters()\n {\n }",
"function prependFilterChain()\n {\n // Directed intercepting filter event (auto_prepend)\n // see smart/actions/class.system_sys_prepend.php\n M( MOD_SYSTEM, 'sys_prepend' ); \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the answer_choice field | function getAnswerChoice() {
return $this->answer_choice;
} | [
"public function getChoice() {\n\t\treturn $this->choice;\n\t}",
"public function getAnsweroption()\n {\n return $this->answeroption;\n }",
"private function getAnswerField() {\n return $this->answerField;\n }",
"function getChoice()\n {\n\t if (count($_POST) == 0)\n\t\t return \"\";\n\t return $_POST['choice'];\n }",
"public function getAnswer()\n {\n return $this->answer;\n }",
"public function getQuestionValue(): string\n {\n return $this->value;\n }",
"static function retrieveByAnswerChoice($value) {\n\t\treturn static::retrieveByColumn('answer_choice', $value);\n\t}",
"function getAnswerValue( $answer_id )\n{\n\t$result = mysql_query(\"SELECT value FROM answers WHERE id = $answer_id LIMIT 1\");\n\t\n\t$answer = mysql_fetch_array( $result );\n\t\n\treturn $answer['value'];\n}",
"function setAnswerChoice($value) {\n\t\treturn $this->setColumnValue('answer_choice', $value, Model::COLUMN_TYPE_INTEGER);\n\t}",
"public function getTheAnswerAttribute()\n {\n\n if ($this->attributes[\"answer\"] === null) {\n return null;\n }\n\n $answer = null;\n\n switch ($this->question->type) {\n\n case \"single_choice\":\n $answer = $this->aanswer->text;\n break;\n\n case \"multiple_choice\":\n $answer =\n self\n ::where(\"compilation_id\", $this->compilation_id)\n ->where(\"question_id\", $this->question_id)\n ->get()\n ->map(function ($item) {\n return $item->aanswer;\n })\n ->all();\n break;\n\n default:\n $answer = $this->attributes[\"answer\"];\n }\n\n return $answer;\n }",
"public function getChoiceLabel() {\n\t\treturn $this->getChoiceLabelByValue($this->value);\n\t}",
"public function choice() : string {\r\n if ($this->payload[\"actions\"][0][\"type\"] === \"button\") {\r\n return $this->payload[\"actions\"][0][\"name\"];\r\n }\r\n if ($this->payload[\"actions\"][0][\"type\"] === \"select\") {\r\n return $this->payload[\"actions\"][0][\"selected_options\"][0][\"value\"];\r\n }\r\n trigger_error(\"Unknown option\", E_USER_ERROR);\r\n }",
"public function getAnswerText(){\n\t\treturn($this->answerText);\n\t}",
"public function getProductChoice()\n {\n return $this->productChoice;\n }",
"public function validateAnswer($answer)\n\t\t{\n\t\t\t// We'll be doing case-insensitive matching so let's avoid some overhead.\n\t\t\t$ciAnswer = strtolower($answer);\n\n\t\t\t// If the value does not point to an existing choice, throw the exception right away.\n\t\t\tif(!isset($this->choices[$ciAnswer])) throw new exceptions\\dialog\\InvalidChoice($this, $answer);\n\n\t\t\t// Otherwise we can return the value.\n\t\t\treturn $this->choices[$ciAnswer];\n\t\t}",
"public function getAnswer()\n {\n return $this->answerModel;\n }",
"public function display()\n {\n\tif ( is_null($this->value) or !isset($this->choices))\n\t{\n\t return $this->getValue();\n\t}\n\telse\n\t{\n\t return $this->choices[$this->value];\n\t}\n }",
"public function getAnswer();",
"final function setAnswer_choice($value) {\n\t\treturn $this->setAnswerChoice($value);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of [tas_timeunit] column. | public function setTasTimeunit ($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ( $v !== null && !is_string ($v) )
{
$v = (string) $v;
}
if ( $this->tas_timeunit !== $v || $v === 'DAYS' )
{
$this->tas_timeunit = $v;
}
} | [
"function api_setTimeUnit($time_unit){\r\n\t\tglobal $ORIGINS,$DESTINATIONS,$TIMEUNIT,$TRAVELMODE,$KEY,$API_LINK;\r\n\t\t$TIMEUNIT = $time_unit;\r\n\t}",
"public function setTasSelfserviceTimeUnit ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->tas_selfservice_time_unit !== $v || $v === '' )\n {\n $this->tas_selfservice_time_unit = $v;\n }\n }",
"public function setTasDuration ($v)\n {\n\n if ( $this->tas_duration !== $v || $v === 0 )\n {\n $this->tas_duration = $v;\n }\n }",
"public function timeUnit(?string $value): self\n {\n $this->instance->setTimeUnit($value);\n return $this;\n }",
"public function setTasType ($v)\n {\n\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n\n if ( $this->tas_type !== $v || $v === 'NORMAL' )\n {\n $this->tas_type = $v;\n }\n }",
"function setAxisUnit($axis_id, $unit) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Unit\"] = $unit; \r\n } \r\n }",
"public function setTime($oVal = null)\n {\n modOxUtilsDate::getInstance()->UNITSetTime($oVal);\n }",
"function setTime($name, $value) {}",
"public function setTasSelfserviceTime ($v)\n {\n\n // Since the native PHP type for this column is integer,\n // we will cast the input value to an int (if it is not).\n if ( $v !== null && !is_int ($v) && is_numeric ($v) )\n {\n $v = (int) $v;\n }\n\n if ( $this->tas_selfservice_time !== $v || $v === 0 )\n {\n $this->tas_selfservice_time = $v;\n }\n }",
"public function updateTime( Inx_Api_Recipient_Attribute $oAttr, $tValue );",
"public function setAsOfTime($value)\n {\n return $this->set('AsOfTime', $value);\n }",
"function setPHPTime($t) \n {\n $this->setTime($t + self::$correction);\n }",
"public function set_unit($unit)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->item[$this->id]['unit'] = $unit;\n }",
"public function setTime($value) {\n\t\t$segments = explode(':',$value);\n\t\t$length = count($segments);\n\t\tswitch ($length) {\n\t\t\tcase 1:\n\t\t\t\t$time = \"0:00:\".sprintf('%02d',$segments[0]);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$time = \"0:\".sprintf('%02d',$segments[0]).\":\".sprintf('%02d',$segments[1]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$time = $value;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->_time = $time;\n\t}",
"public function setTimeDimension($value)\n {\n return $this->set('TimeDimension', $value);\n }",
"public function setTime($time) {\n $this->_time = $time;\n }",
"function setTimeSetFlag($boolean)\n\t{\n\t\t$this->TimeSet_Flag = $boolean;\n\t}",
"public function setUnit($unit) {\n\t\t$this->unit = $unit;\n\t}",
"public function setTime($time)\n {\n $this->time = $time;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case for gETReturnIdAttachments Retrieve the attachments associated to the return. | public function testGETReturnIdAttachments()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
} | [
"public function gETReturnIdAttachments($return_id)\n {\n $this->gETReturnIdAttachmentsWithHttpInfo($return_id);\n }",
"public function testGETGiftCardRecipientIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGETInventoryModelIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGETShipmentIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGETMarketIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGETGiftCardIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGETOrderIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function gETReturnIdAttachmentsAsync($return_id)\n {\n return $this->gETReturnIdAttachmentsAsyncWithHttpInfo($return_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getAttachments()\n {\n return (new CatchZohoCRM($this->token, 'Attachments'))\n ->getRelatedRecords($this->recordType, $this->checkId())->getRecordDetails();\n }",
"public function testGETSkuIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testGETExternalPromotionIdAttachments()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function get_attachments($attachments, $get_by_id = FALSE, $attach_details = TRUE)\n {\n if(!$get_by_id)\n {\n for ($i = 0, $count = count($attachments); $i < $count; $i++) \n { \n if($attachments[$i]['entity'] == 'political_party')\n {\n $attachments[$i]['entity_name'] = $this->political_party_model->get_political_party_by_id($attachments[$i]['entity_id'], FALSE, TRUE);\n }\n if($attachments[$i]['entity'] == 'politician')\n {\n $attachments[$i]['entity_name'] = $this->politician_model->get_politician_by_id($attachments[$i]['entity_id'], FALSE,array() , TRUE);\n }\n\n // TRUE is passed\n $attachments[$i]['user_details'] = $this->user_model->get_user_by_id($attachments[$i]['posted_by'], FALSE, array('full_name')); \n }\n }\n else\n {\n $attachments = call_user_func_array('array_merge', $attachments);\n $attachments['user_details'] = $this->user_model->get_user_by_id($attachments['posted_by'], FALSE, array('full_name')); \n // $attachments['posted_time_24hrs'] = $this->format_columned_time();\n }\n return $attachments;\n }",
"function get_attachments($id)\n\t{\n\t\t$id = (int)$id;\n\n\t\t$this->db->from('attachments')->where('article_id', $id);\n\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$data = $query->result_array();\n\n\t\t$i = 0;\n\t\tforeach ($data as $item)\n\t\t{\n\t\t\t$data[$i]['download_path'] = 'uploads/'.$id.'/'.$item['attach_file'];\n\t\t\t$i++;\n\t\t}\n\t\t$query->free_result();\n\n\t\treturn $data;\n\t}",
"public function getAttachments()\n {\n return isset($this->data['attachments']) ? $this->data['attachments'] : [];\n }",
"private function getAttachments() {\r\n if(isSet($this->request->data['attachment'])) {\r\n return $this->request->data['attachment'];\r\n }\r\n return array();\r\n }",
"public function getAttachments()\n {\n return $this->getMedia(\"attachment\");\n }",
"public function getAttachments()\n {\n return $this->attachment_list;\n }",
"public function get_attachments($attachments, $attach_columnist_details = TRUE)\n {\n for ($i = 0, $count = count($attachments); $i < $count; $i++) \n { \n // TRUE is passed \n $attachments[$i]['city'] = $this->autocomplete_model->get_city_by_id($attachments[$i]['city'], FALSE, TRUE); \n $attachments[$i]['newspaper_id'] = $this->newspaper_model->get_newspapers_by_columist($attachments[$i]['id'], FALSE, TRUE); \n }\n\n return $attachments;\n }",
"public function getAttachments()\n {\n return (isset($this->_metadata['_attachments']) ? $this->_metadata['_attachments'] : array());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loader constructor. Register autoloader in the stack SPL. | private function __construct()
{
spl_autoload_register(array(__CLASS__, '_load'));
} | [
"public function __construct() {\n spl_autoload_register(array($this, 'loader'));\n }",
"public function setupSplAutoloader()\n {\n spl_autoload_register([$this, 'load'], true, true);\n }",
"private function initLoader() {\n $this->_loader = new Loader();\n\t}",
"public function registerLoader()\n {\n spl_autoload_register([$this, 'loadClass'], true, true);\n }",
"protected function initLoader()\n {\n $this->versionParser = new VersionParser();\n\n if (!$this->loader) {\n $this->loader = new ArrayLoader($this->versionParser);\n }\n }",
"private function __construct() {\n\t\n\t\tini_set('unserialize_callback_func', 'spl_autoload_call');\n\t\tspl_autoload_register(array(self::getInstance(), 'loadClass'));\n\t}",
"public static function register_autoloader() {}",
"public static function registerAutoloader()\n {\n spl_autoload_register(array(new self, 'load'));\n }",
"static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }",
"public function registerLoader()\n {\n $wrapper = new \\Yana\\Core\\Autoloaders\\Wrapper();\n $wrapper->registerAutoLoader($this->_getLoader());\n }",
"public static function init() {\n\t\t$loaders = spl_autoload_functions();\n\n\t\tforeach ($loaders as &$loader) {\n\t\t\t$loaderToUnregister = $loader;\n\n\t\t\t// Only hook onto SilverStripe's SS_ClassLoader.\n\t\t\tif (is_array($loader) && ($loader[0] instanceof SS_ClassLoader)) {\n\t\t\t\t$originalLoader = $loader[0];\n\n\t\t\t\t// Configure library loader for doctrine annotation loader\n\t\t\t\tAnnotationRegistry::registerLoader(function ($class) use ($originalLoader) {\n\t\t\t\t\t$originalLoader->loadClass($class);\n\n\t\t\t\t\treturn class_exists($class, false);\n\t\t\t\t});\n\t\t\t\t$loader[0] = new AopSilverStripeLoader($loader[0]);\n\t\t\t}\n\t\t\tspl_autoload_unregister($loaderToUnregister);\n\t\t}\n\t\tunset($loader);\n\n\t\tforeach ($loaders as $loader) {\n\t\t\tspl_autoload_register($loader);\n\t\t}\n\t}",
"function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }",
"public function initialize()\n\t{\t\n\t\tspl_autoload_register([self::$instance,'registerAutoloader']);\n\t}",
"protected function initAutoLoader()\n {\n require dirname(__FILE__) . '/../../application/Autoloader.php';\n $this->autoloader = new Autoloader();\n $this->autoloader\n ->addNamespaces($this->getAutoloaderNamespaces())\n ->register(true)\n ;\n }",
"private function initLoader(): void\n {\n require_once __DIR__.'/vendor/autoload.php';\n }",
"public static function init(){\n if (self::$_instance === null) {\n self::$_instance = new loader();\n }\n }",
"public static function setLoader($loader){}",
"function init() {\n\t\tif(!function_exists('spl_autoload_register')){\n\t\t\tthrow new Exception('Function spl_autoload_register does not exist, do you have php\\'s SPL installed?');\n\t\t}\n\t\tif(!spl_autoload_register('\\\\'.__CLASS__.'::autoload')){\n\t\t\tthrow new Exception('Failed to register autoloader');\n\t\t}\n }",
"protected function initAutoloader()\n {\n if ($this->loader) {\n $this->loader->unregister();\n }\n \n $package = $this->composer->getPackage();\n $generator = $this->composer->getAutoloadGenerator();\n $packages = $this->composer->getRepositoryManager()->getLocalRepository()->getCanonicalPackages();\n $packageMap = $generator->buildPackageMap($this->composer->getInstallationManager(), $package, $packages);\n $map = $generator->parseAutoloads($packageMap, $package);\n \n $this->loader = $generator->createLoader($map);\n $this->loader->register();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get localization_code column for database table | protected static function localization_code(): mixed
{
return self::$query->localization_code;
} | [
"public function getLanguageIdColumnName() {}",
"public function getTranslationLocaleColumn()\n {\n return 'locale';\n }",
"protected static function localized_code(): mixed\n\t{\n\t\treturn self::$query->localized_code;\n\t}",
"public function getLanguageColumn()\n\t{\n\t\treturn $this->strLangColumn;\n\t}",
"private function getColumn()\n {\n $t_colums = array('ru_name', 'uk_name');\n switch ($this->locale) {\n case 'uk':\n return $t_colums[1];\n break;\n default:\n return $t_colums[0];\n }\n }",
"public function getCodeCol(): ?string {\n return $this->codeCol;\n }",
"function getColumnByLang($column){\n\t$result = \"\";\n\tif (isEN()){\n\t\t$result = $column.\"EN\";\n\t}\n\tif (isTW()){\n\t\t$result = $column.\"TW\";\n\t}\n\tif (isCN()){\n\t\t$result = $column.\"CN\";\n\t}\n\treturn $result;\n}",
"public function getQualifiedIsoColumn()\n {\n $translation = new Translation;\n\n return $translation->getTable().'.'.$translation->getIsoColumn();\n }",
"function getLanguageNameByCode(string $code): string {\n $result = Database::query(\n 'SELECT name FROM `' . Database::tableName('languages') .\n \"` WHERE language_code = '\" . Database::escapeValue($code) . \"'\"\n );\n $retval = $code;\n if (Database::getNumRows($result) > 0) {\n $dataset = Database::fetchObject($result);\n $retval = $dataset->name;\n }\n\n return $retval;\n}",
"function globallink_get_locale_name($locale_code) {\n $result = db_select('globallink_locale', 'tl')\n ->fields('tl')\n ->condition('locale_code', $locale_code, '=')\n ->execute();\n\n $locale_name = '';\n\n foreach ($result as $row) {\n $locale_name = $row->locale_desc;\n }\n\n return $locale_name;\n}",
"public function getTranslationOriginColumnName() {}",
"private function getLocaleCode()\n {\n return $this\n ->getLocale()\n ->getLocaleCode();\n }",
"protected function getForeignColumn()\n {\n $columns = $this->getI18nTable()->getBehavior('symfony_i18n_translation')->getForeignKey()->getLocalColumns();\n return $this->getI18nTable()->getColumn($columns[0]);\n }",
"abstract public function getLocaleCode();",
"public function getLocaleCode(): string\n {\n return $this->indexConfig->getLocaleCode();\n }",
"public function column_name();",
"public function getLocaleCode()\n {\n $store = $this->getStore();\n $languageCode = Mage::helper('smile_elasticsearch')->getLanguageCodeByStore($store);\n return $languageCode;\n }",
"public function get_code(){\n // Return the current locale language\n return substr($this->current_locale, 0, 2);\n }",
"public function getLangcode();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new Newsletter | public function create(Mailjet\Model\Newsletter &$Newsletter)
{
return parent::_create($Newsletter);
} | [
"public function createNewsletter();",
"public function createNewsletterAction()\n {\n $data = $this->Request()->getParams();\n if (empty($data)) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $this->translateMessage('error_msg/no_data_passed', 'No data passed'),\n ]);\n\n return;\n }\n\n $data['groups'] = $this->serializeGroup($data['groups']);\n $data['date'] = new \\DateTime();\n\n // Flatten the newsletter->containers->text field: Each container as only one text-field\n foreach ($data['containers'] as $key => $value) {\n $data['containers'][$key]['text'] = $data['containers'][$key]['text'][0];\n }\n\n $model = new \\Shopware\\Models\\Newsletter\\Newsletter();\n $model->fromArray($data);\n\n Shopware()->Models()->persist($model);\n Shopware()->Models()->flush();\n\n $data = [\n 'id' => $model->getId(),\n ];\n\n $this->View()->assign(['success' => true, 'data' => $data]);\n }",
"public function actionCreate()\n {\n $model = new Newsletter();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', __('Your changes have been saved successfully.'));\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function createnewsletter($args = array())\n {\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Newsletter::', '::', ACCESS_ADMIN));\n\n $Nextid = (int)FormUtil::getPassedValue('Nextid', (isset($args['Nextid']) && $args['Nextid']) ? $args['Nextid'] : 0);\n\n $newArchiveId = ModUtil::apiFunc('Newsletter', 'admin', 'createNewsletter', array(\n 'nextId' => $Nextid,\n 'language' => FormUtil::getPassedValue('language', '', 'GETPOST')\n ));\n LogUtil::registerStatus($this->__('The new newsletter is added to archive.').' Id: '.$newArchiveId);\n\n return System::redirect(ModUtil::url('Newsletter', 'admin', 'newsletters'));\n }",
"public function newAction()\r\n {\r\n $entity = new Newsletter();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n 'errores' => RpsStms::getErrorMessages($form),\r\n );\r\n }",
"public function add_new_newsletter_record() {\r\n\t\t$newsletter_html = $this->get_newsletter_html();\r\n\r\n\t\t$data = array(\r\n\t\t\t'data' => $newsletter_html,\r\n\t\t\t'created' => time(),\r\n\t\t\t'status' => 0,\r\n\t\t\t'type' => 'new post'\r\n\t\t);\r\n\r\n\t\t$this->db->insert($this->newsletter_table, $data);\r\n\t\t$newsletter_id = $this->db->insert_id();\r\n\r\n\t\t$newsletter_html = $this->get_newsletter_html($newsletter_id);\r\n\r\n\t\t$this->mail_model->set_records($newsletter_id);\r\n\r\n\t\techo $newsletter_html;\r\n\t}",
"public function createNewsletterGroupAction()\n {\n $data = $this->Request()->getParams();\n\n $groupModel = new Shopware\\Models\\Newsletter\\Group();\n $groupModel->fromArray($data);\n Shopware()->Models()->persist($groupModel);\n Shopware()->Models()->flush();\n\n $this->View()->assign(['success' => true]);\n }",
"public function create_announcement() {\n\t\t$this->set_info($_REQUEST, true);\n\t\t$this->insert_data();\n\t\t$this->insert_anno_subtype();\n\t\t$this->redirect();\n\t}",
"function add() {\n\t\t\n\t\t// title for view file\n\t\t$title_for_layout = 'Add Newsletter';\n\t\t\n\t\t/*\n\t\t * Get the newsletter template as list\n\t\t */\n\t\t$templateList = $this->NewsletterTemplate->find ( 'list' );\n\t\t\n\t\t/*\n\t\t * Get all the predefined tags\n\t\t */\n\t\t$tagList = array_combine ( $this->Newsletter->tags, $this->Newsletter->tags );\n\t\t\n\t\t// newsletter insert conents\n\t\t$detailsList = $this->Newsletter->insertContents;\n\t\t\n//\t\t$this->JQValidator->addValidation ( 'AddNewsletterForm', $this->Newsletter->validate, 'AddNewsletterForm' );\n\t\t$this->JQValidator->addValidation('Newsletter', $this->Newsletter->validate, 'AddNewsletterForm');\n\t\t\n\t\t$user_id = $this->Auth->user ( 'id' );\n\t\t\n\t\t/*\n\t\t * If the request data is not empty then save the data\n\t\t */\n\t\tif (! empty ( $this->data )) {\n\t\t\t\n\t\t\t/*\n\t\t\t * Save the newsletter\n\t\t\t */\t\t\t\n\t\t\tif ($this->addNewsletter()) {\n\t\t\t\t$this->Session->setFlash ( __ ( 'The newsletter has been saved', true ), 'success' );\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'action' => 'index' \n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash ( __ ( 'The newsletter could not be saved. Please, try again.', true ), 'error' );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->set ( compact ( 'title_for_layout', 'templateList', 'tagList', 'detailsList' ) );\n\t}",
"public function create()\n {\n $note_model = $this->loadModel('Note');\n $note_model->create($_POST['note_text']);\n header('location: ' . URL . 'note');\n }",
"function createMailing() {\n \n // Create the mailing and update the group/receipients\n $this->updateGroupandRecipients();\n \n // Update tracking options\n $this->updateTrackingOptions();\n \n // Update the templates and upload options\n $this->updateTemplateOptions();\n }",
"public function createRecipientAction()\n {\n $email = $this->Request()->getParam('email');\n $groupId = $this->Request()->getParam('groupId');\n\n if ($email === null || $groupId === null) {\n $this->View()->assign([\n 'success' => false,\n 'message' => $this->translateMessage('error_msg/mail_and_group_missing', 'Email and groupId needed'),\n ]);\n\n return;\n }\n\n $model = new \\Shopware\\Models\\Newsletter\\Address();\n $model->setGroupId($groupId);\n $model->setEmail($email);\n $model->setIsCustomer(false);\n Shopware()->Models()->persist($model);\n Shopware()->Models()->flush();\n\n $this->View()->assign(['success' => true, 'data' => Shopware()->Models()->toArray($model)]);\n }",
"public function add_newsletters($vars){\n\t\tglobal $db;\t\t\n\t\t$conf = getConfiguration();\n\t\t\n\t\tif($vars['nlName']=='' || $vars['nlAddr']){\n\t\t\t\t$vars['nlName'] = $conf['sender_name'];\n\t\t\t\t$vars['nlAddr'] = $conf['sender_addr'];\n\t\t\t\t\n\t\t$sQl = \"INSERT INTO cms_tbl_newslettter (`from_name`,`from_addr`,`subject`,`message`,`date_created`)\n\t\t\t\t\tVALUES ('\".addslashes($vars['nlName']).\"','\".addslashes($vars['nlAddr']).\"','\".addslashes($vars['nlSub']).\"','\".urlencode($vars['nlMessage']).\"',NOW())\";\n\t\t\n\t\t$result = $db->query($sQl);\n\t\tif($result){\n\t\t\t$this->message = \"Newsletter added successfully\";\n\t\t\treturn true;\n\t\t\t} else {\n\t\t\t$this->error = \"Cannot Add newsletter. Please try again\";\n\t\t}\n\t\t}\n\t}",
"public function newAction()\n {\n $entity = new NewsletterArticle();\n $form = $this->createForm(new NewsletterArticleType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function store(CreateInscricaoNewsletterRequest $request)\n {\n $input = $request->all();\n\n $inscricaoNewsletter = $this->inscricaoNewsletterRepository->create($input);\n\n Flash::success('Inscricao Newsletter saved successfully.');\n\n return redirect(route('inscricaoNewsletters.index'));\n }",
"public function createTopic();",
"public function actionCreate()\n {\n $model = new Mailing();\n\n $model->paused = 1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id, 'step' => '2']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'step' => 1,\n ]);\n }\n }",
"public function store(CreatenewslettersRequest $request){\n $input = $request->all();\n $newsletters = $this->newslettersRepository->create($input);\n return $newsletters;\n // Flash::success('Newsletters saved successfully.');\n // return redirect(route('newsletters.index'));\n }",
"public function testPostNewsletterTemplate()\n {\n $json = $this->testData->getNewsletterTemplateForPost();\n $resource = 'newsletter/template';\n $url = sprintf('%s/%s', $this->baseUrl, $resource);\n $response = $this->postJson($url, $json);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SRI for public file | public function getPublicFileSri(string $file): string
{
# Clean
$file = $this->clean($file);
# Handle real path
$path = realpath($this->Config->getPublicDirectory() . "/$file");
$content = (string) @file_get_contents($path);
# Subresource integrity hash
return $this->sri($content);
} | [
"public function RiceviFile($fileSdIAccoglienza);",
"public function isPublic($path = '');",
"function serve ()\n {\n // Get full file path\n $filepath = DIR_PUB . DS . $this->url_full;\n\n // Make sure it exists and is readable\n if (!is_file($filepath) or !is_readable($filepath))\n {\n die(\"Well, this is strange - it seems like that file used to exist, but now it's gone for some reason... sorry about that!\");\n }\n\n // TODO FINISH SERVE\n\n // Get mime type\n $mime = strtolower(mime_content_type($filepath));\n // Confirm acceptable mime type via config\n $acceptable = false;\n foreach (Config::$acceptable_mime_patterns as $_pattern)\n {\n if (preg_match('~^' . $_pattern . '$~i', $mime))\n {\n $acceptable = true;\n break;\n }\n }\n if (!$acceptable)\n {\n die(\"This file type is not allowed - please ask the person who sent you this link to fix the issue\");\n }\n\n // Get additional info for headers\n // TODO set last modified and status code\n $filesize = filesize($filepath);\n \n // Set Headers\n header('Content-Type: ' . $mime);\n header('Content-Length: ' . $filesize);\n \n // Read file to output\n readfile($filepath);\n\n // Shutdown - end of response\n _shutdown();\n }",
"public function getPublicPath();",
"public function public_path();",
"public function isPublicResource(): bool {\n // Long enough\n return count($this->elements) >= 2\n // Inside public directory\n && $this->startsWith(new self(App::getConfig('app.publicDir')))\n // Is readable file\n && $this->prepend(App::getRootDir())->isReadableFile();\n }",
"function set_file_public_access($name, $public_access)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter($name, 'FilePublicAccess', $public_access);\n }",
"public function fileAction()\n {\n $this->_helper->viewRenderer->setNoRender();\n $this->_helper->layout()->disableLayout();\n\n $mime = $this->_config->primitive->file->mime;\n\n $response = Sahara_Soap::getSchedServerSessionClient()->getSessionInformation(array(\n 'userQName' => $this->_auth->getIdentity()\n ));\n\n if (!$response->isInSession)\n {\n /* Not in session, so unable to determine the rig clients address. */\n echo 'FAILED';\n return;\n }\n\n /* Set up the correct object model. */\n list($junk, $allocUser) = explode(':', $this->_auth->getIdentity(), 2);\n $request = array(\n 'requestor' => $allocUser,\n \t'param' => array());\n\n foreach ($this->_request->getParams() as $key => $val)\n {\n switch ($key)\n {\n case 'pc':\n case 'primitiveController':\n $request['controller'] = $val;\n break;\n case 'pa':\n case 'primitiveAction':\n $request['action'] = $val;\n break;\n\n case 'rp':\n case 'responseParam':\n $responseParam = $val;\n break;\n\n /* MIME type of file. */\n case 'mime': // Mime type\n $mime = implode('/', explode('-', $val, 2));\n break;\n\n /* Filename of file (forces download). */\n case 'fn':\n case 'downloadedname':\n $filename = $val;\n break;\n\n /* Transform for string. */\n case 'tf':\n case 'transform':\n $transform = $val;\n break;\n\n /* These are Zend request parameters and irrelevant to the\n * primitive call. */\n case 'controller':\n case 'action':\n case 'module':\n break;\n\n /* Parameters to provide to primitive call. */\n default:\n $param = array(\n 'name' => $key,\n 'value' => $val\n );\n $request['param'][] = $param;\n break;\n }\n }\n\n /* Set header about the response. */\n header(\"Content-Type: $mime\");\n if (isset($filename)) header(\"Content-disposition: attachment; filename=$filename\");\n\n try\n {\n $rigClient = new Sahara_Soap($response->contactURL . '?wsdl');\n $response = $rigClient->performPrimitiveControl($request);\n if (!$response->success)\n {\n echo \"FAILED \" . $response->error->reason;\n return;\n }\n $response = $response->result;\n\n /* Return the specified response. */\n if ($responseParam)\n {\n if (isset($response->name) && $response->name == $responseParam)\n {\n echo $this->_echoWithTransform($response->value, $transform);\n return;\n }\n else\n {\n foreach ($response as $r)\n {\n if ($r->name == $responseParam)\n {\n echo $this->_echoWithTransform($r->value, $transform);\n return;\n }\n }\n }\n echo 'FAILED';\n return;\n }\n\n /** Return all the response parameters. */\n if (isset($response->name))\n {\n echo $this->_echoWithTransform($response->value, $transform);\n return;\n }\n\n foreach ($response as $r) $str .= $r->name . '=' . $r->value . ',';\n if (isset($str))\n {\n echo $this->_echoWithTransform(substr($str, 0, strlen($str) - 1), $transform);\n return;\n }\n echo 'FAILED';\n }\n catch (Exception $ex)\n {\n echo 'FAILED';\n }\n }",
"public function forceReplacePublic()\n\t{\n\t\treturn $this->forceReplaceFiles(\n\t\t\t$this->root().'/_install/public/',\n\t\t\tOKT_ROOT_PATH.'/'\n\t\t);\n\t}",
"private function stream ()\n\t{\n\t\t# Prelim\n\t\t$_file_processor_object = $this->Registry->loader(\"Data_Processors__File\");\n\t\t$file_info = $_file_processor_object->file__info__do_get( $this->running_subroutine['request']['identifier'] );\n\n\t\tif ( ! isset( $this->running_subroutine['request']['f_name'] ) )\n\t\t{\n\t\t\t$this->running_subroutine['request']['f_name'] = $file_info['f_hash'] . \".\" . $file_info['f_extension'];\n\t\t}\n\n\t\t$_file_location = $file_info['_f_location'];\n\n\t\t# Images - watermarked versions, thumbnails etc\n\t\tif ( $file_info['_f_type'] == 'image' )\n\t\t{\n\t\t\tif ( isset( $this->running_subroutine['request']['file_variation'] ) )\n\t\t\t{\n\t\t\t\tswitch ( $_file_variation = $this->running_subroutine['request']['file_variation'] )\n\t\t\t\t{\n\t\t\t\t\tcase 's':\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\tif ( ! $file_info['_diagnostics']['thumbs_ok'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_file__image__do_thumbnails( $file_info );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'w':\n\t\t\t\t\t\tif ( $file_info['_f_wtrmrk'] === FALSE )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_file__image__do_watermark( $file_info );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t# @todo User authorization [ACL]\n\t\t\t\t\t\t$_file_variation = null;\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t$this->Registry->http_redirect(\n\t\t\t\t\t\t\t\tSITE_URL\n\t\t\t\t\t\t\t\t\t. \"/static/download/l-\"\n\t\t\t\t\t\t\t\t\t. $this->running_subroutine['request']['identifier']\n\t\t\t\t\t\t\t\t\t. \"/\"\n\t\t\t\t\t\t\t\t\t. $this->running_subroutine['request']['f_name'],\n\t\t\t\t\t\t\t\t301\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t}\n\t\t\t$_file_location = ! empty( $_file_variation )\n\t\t\t\t?\n\t\t\t\t$this->Registry->Input->file__filename__attach_suffix( $file_info['_f_location'] , \"_\" . strtoupper( $_file_variation ) )\n\t\t\t\t:\n\t\t\t\t$file_info['_f_location']\n\t\t\t\t;\n\t\t}\n\t\t$_file_stats = stat( $_file_location );\n\t\t$_file_stats['etag'] = $file_info['f_hash'] . ( isset( $_file_variation ) ? \"-\" . $_file_variation : \"\" ) . \"-\" . $_file_stats['mtime'];\n\n\t\t# If-Modified-Since\n\t\t$_request_headers =& $this->Registry->Input->headers['request'];\n\t\tif ( isset( $_request_headers['IF-NONE-MATCH'] ) and $_request_headers['IF-NONE-MATCH'] == $_file_stats['etag'] )\n\t\t{\n\t\t\theader( \"ETag: \" . $_file_stats['etag'] );\n\t\t\theader( \"Last-modified: \" . date( \"r\" , $_file_stats['mtime'] ) );\n\t\t\theader( \"HTTP/1.1 304 Not modified\" );\n\t\t\texit;\n\t\t}\n\t\telseif ( isset( $_request_headers['IF-MODIFIED-SINCE'] ) )\n\t\t{\n\t\t\tif ( $_file_stats['mtime'] <= strtotime( $_request_headers['IF-MODIFIED-SINCE'] ) )\n\t\t\t{\n\t\t\t\theader( \"ETag: \" . $_file_stats['etag'] );\n\t\t\t\theader( \"Last-modified: \" . date( \"r\" , $_file_stats['mtime'] ) );\n\t\t\t\theader( \"HTTP/1.1 304 Not modified\" );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t# Is accessible?\n\t\tif ( ! is_readable( $_file_location ) )\n\t\t{\n\t\t\theader( \"HTTP/1.1 403 Forbidden\" ); // @todo Should be replaced with error-page-handlers\n\t\t\texit;\n\t\t}\n\n\t\t# Disable output-buffering\n\t\tif ( $this->Registry->ob_status )\n\t\t{\n\t\t\tif ( $this->Registry->ob_compression )\n\t\t\t{\n\t\t\t\tini_set( \"zlib.output_handler\" , \"0\" );\n\t\t\t}\n\t\t\tob_end_clean();\n\t\t}\n\n\t\t# Does file exist?\n\t\tif ( ! $file_info['_diagnostics']['file_exists'] )\n\t\t{\n\t\t\theader( \"HTTP/1.1 404 Resource not found\" ); // @todo Should be replaced with error-page-handlers\n\t\t\treturn null;\n\t\t}\n\n\t\t# Open file for reading\n\t\t$_fh = fopen( $_file_location , \"rb\" );\n\t\tif ( $_fh === FALSE )\n\t\t{\n\t\t\theader( \"HTTP/1.1 500 Internal server error!\" ); // @todo Should be replaced with error-page-handlers\n\t\t\treturn null;\n\t\t}\n\n\t\t$_transmission_begin = 0;\n\t\t$_transmission_end = $_file_stats['size'];\n\n\t\t# Are we resuming?\n\t\tif ( isset( $_SERVER['HTTP_RANGE'] ) )\n\t\t{\n\t\t\tif ( preg_match( '/bytes=\\h*(?P<begin>\\d+)-(?P<end>\\d*)[\\D.*]?/i' , $_SERVER['HTTP_RANGE'] , $_matches ) )\n\t\t\t{\n\t\t\t\t$_transmission_begin = intval( $_matches['begin'] );\n\t\t\t\tif ( ! empty( $_matches['end'] ) )\n\t\t\t\t{\n\t\t\t\t\t$_transmission_end = $_matches['end'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t# Little insurance\n\t\tset_time_limit( 0 );\n\n\t\t# Headers - Cache-control, Pragma and Expires headers are sent from Modules class; no need to set those here again\n\t\tif ( $_transmission_begin > 0 or $_transmission_end < $file_info['f_size'] )\n\t\t{\n\t\t\theader( \"HTTP/1.1 206 Partial content\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader( \"HTTP/1.1 200 Ok\" );\n\t\t}\n\t\theader( \"Accept-ranges: bytes\" );\n\t\theader( \"Content-description: Downloads powered by Audith CMS codename Persephone\" );\n\t\theader( \"Content-type: \" . $file_info['f_mime'] );\n\t\theader( \"Content-disposition: inline; filename=\\\"\" . $this->running_subroutine['request']['f_name'] . \"\\\"\" );\n\t\theader( \"Content-length: \" . $_file_stats['size'] );\n\t\theader( \"Content-range: bytes \" . $_transmission_begin . \"-\" . $_transmission_end . \"/\" . $file_info['f_size'] );\n\t\theader( \"Content-transfer-encoding: \" . ( $file_info['_f_type'] == 'text' ? \"ascii\" : \"binary\" ) );\n\t\theader( \"Last-modified: \" . date( \"r\" , $_file_stats['mtime'] ) );\n\t\theader( \"ETag: \" . $_file_stats['etag'] );\n\t\theader( \"X-Md5-checksum: \" . $file_info['f_hash'] );\n\t\theader( \"Connection: close\" );\n\n\t\t# File-cursor\n\t\t$_file_cursor = $_transmission_begin;\n\t\t$this->Registry->Input->file__fseek_safe( $_fh , $_transmission_begin , SEEK_SET );\n\n\t\t# Send data with bandwidth management\n\t\t$_chunk_size = intval( $this->Registry->config['performance']['download_chunk_size'] ) * 1024;\n\t\t$_transfer_quota = intval( $this->Registry->config['performance']['download_speed_limit'] ) * 1024;\n\t\t$_time_quota = 1000000;\n\t\t$_timestart = intval( $this->Registry->debug__timer_start() );\n\t\twhile( ! feof( $_fh ) and $_file_cursor < $_transmission_end and ( connection_status() == 0 ) )\n\t\t{\n\t\t\t# File-send\n\t\t\tprint fread( $_fh, min( $_chunk_size, $_transmission_end - $_file_cursor ) );\n\t\t\t$_file_cursor += $_chunk_size;\n\n\t\t\t# Bandwidth quota management\n\t\t\t$_time_quota -= intval( $this->Registry->debug__timer_stop( $_timestart ) );\n\t\t\t$_transfer_quota -= $_chunk_size;\n\n\t\t\t# Out of quota? Then wait for the remainder of 1 second :) and reset counters\n\t\t\tif ( $_transfer_quota <= 0 and $_time_quota > 0 )\n\t\t\t{\n\t\t\t\tusleep( $_time_quota );\n\t\t\t\t$_time_quota = 1000000;\n\t\t\t\t$_transfer_quota = intval( $this->Registry->config['performance']['download_speed_limit'] ) * 1024;\n\t\t\t}\n\t\t}\n\n\t\t# Close file\n\t\tfclose( $_fh );\n\t\texit;\n\t\t/*\n\t\t$_params = array(\n\t\t\t\t'f_name' => $this->running_subroutine['request']['f_name'],\n\t\t\t\t'time_to_die' => null, // @todo Later to be manipulated by Zend_ACL\n\t\t\t\t'm_id' => $this->Registry->member['id'],\n\t\t\t\t'm_ip_address' => $this->Registry->Session->ip_address,\n\t\t\t\t'_enable_ip_check' => FALSE,\n\t\t\t);\n\t\t$_link_info = $_file_processor_object->file__link__do_get( $file_info, $_params );\n\t\t*/\n\t}",
"public final function rawfileAction(){\n\t\t$path = $this->getApplication()->getRootDir() . '/' . $this->getApplication()->getRequest()->getRequestedURI();\n\t\t\n\t\tif(!file_exists($path)){\n\t\t\treturn $this->pageNotFoundAction();\n\t\t}\n\t\t// TODO add the right header\n\t\t\n\t\treturn file_get_contents($path);\n\t}",
"function read( string $_stream_path ): IStream;",
"function writePubliclet($data)\r\n {\r\n \tif(!defined('PUBLIC_DOWNLOAD_FOLDER') || !is_dir(PUBLIC_DOWNLOAD_FOLDER)){\r\n \t\treturn \"ERROR : Public URL folder does not exist!\";\r\n \t}\r\n \tif(!function_exists(\"mcrypt_create_iv\")){\r\n \t\treturn \"ERROR : MCrypt must be installed to use publiclets!\";\r\n \t}\r\n \tif($data[\"PASSWORD\"] && !is_file(PUBLIC_DOWNLOAD_FOLDER.\"/allz.css\")){ \t\t\r\n \t\t@copy(INSTALL_PATH.\"/\".AJXP_THEME_FOLDER.\"/css/allz.css\", PUBLIC_DOWNLOAD_FOLDER.\"/allz.css\");\r\n \t\t@copy(INSTALL_PATH.\"/\".AJXP_THEME_FOLDER.\"/images/actions/22/dialog_ok_apply.png\", PUBLIC_DOWNLOAD_FOLDER.\"/dialog_ok_apply.png\");\r\n \t\t@copy(INSTALL_PATH.\"/\".AJXP_THEME_FOLDER.\"/images/actions/16/public_url.png\", PUBLIC_DOWNLOAD_FOLDER.\"/public_url.png\"); \t\t\r\n \t}\r\n \tif(!is_file(PUBLIC_DOWNLOAD_FOLDER.\"/index.html\")){\r\n \t\t@copy(INSTALL_PATH.\"/server/index.html\", PUBLIC_DOWNLOAD_FOLDER.\"/index.html\");\r\n \t}\r\n $data[\"PLUGIN_ID\"] = $this->id;\r\n $data[\"BASE_DIR\"] = $this->baseDir;\r\n $data[\"REPOSITORY\"] = $this->repository;\r\n if(AuthService::usersEnabled()){\r\n \t$data[\"OWNER_ID\"] = AuthService::getLoggedUser()->getId();\r\n }\r\n if($this->hasMixin(\"credentials_consumer\")){\r\n \t$cred = AJXP_Safe::tryLoadingCredentialsFromSources(array(), $this->repository);\r\n \tif(isSet($cred[\"user\"]) && isset($cred[\"password\"])){\r\n \t\t$data[\"SAFE_USER\"] = $cred[\"user\"];\r\n \t\t$data[\"SAFE_PASS\"] = $cred[\"password\"]; \t\t\r\n \t}\r\n }\r\n // Force expanded path in publiclet\r\n $data[\"REPOSITORY\"]->addOption(\"PATH\", $this->repository->getOption(\"PATH\"));\r\n if ($data[\"ACTION\"] == \"\") $data[\"ACTION\"] = \"download\";\r\n // Create a random key\r\n $data[\"FINAL_KEY\"] = md5(mt_rand().time());\r\n // Cypher the data with a random key\r\n $outputData = serialize($data);\r\n // Hash the data to make sure it wasn't modified\r\n $hash = md5($outputData);\r\n // The initialisation vector is only required to avoid a warning, as ECB ignore IV\r\n $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);\r\n // We have encoded as base64 so if we need to store the result in a database, it can be stored in text column\r\n $outputData = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $hash, $outputData, MCRYPT_MODE_ECB, $iv));\r\n // Okay, write the file:\r\n $fileData = \"<\".\"?\".\"php \\n\".\r\n ' require_once(\"'.str_replace(\"\\\\\", \"/\", INSTALL_PATH).'/publicLet.inc.php\"); '.\"\\n\".\r\n ' $id = str_replace(\".php\", \"\", basename(__FILE__)); '.\"\\n\". // Not using \"\" as php would replace $ inside\r\n ' $cypheredData = base64_decode(\"'.$outputData.'\"); '.\"\\n\".\r\n ' $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND); '.\"\\n\".\r\n ' $inputData = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $id, $cypheredData, MCRYPT_MODE_ECB, $iv)); '.\"\\n\".\r\n ' if (md5($inputData) != $id) { header(\"HTTP/1.0 401 Not allowed, script was modified\"); exit(); } '.\"\\n\".\r\n ' // Ok extract the data '.\"\\n\".\r\n ' $data = unserialize($inputData); AbstractAccessDriver::loadPubliclet($data); ?'.'>';\r\n if (@file_put_contents(PUBLIC_DOWNLOAD_FOLDER.\"/\".$hash.\".php\", $fileData) === FALSE){\r\n return \"Can't write to PUBLIC URL\";\r\n }\r\n require_once(INSTALL_PATH.\"/server/classes/class.PublicletCounter.php\");\r\n PublicletCounter::reset($hash);\r\n if(defined('PUBLIC_DOWNLOAD_URL') && PUBLIC_DOWNLOAD_URL != \"\"){\r\n \treturn rtrim(PUBLIC_DOWNLOAD_URL, \"/\").\"/\".$hash.\".php\";\r\n }else{\r\n\t $http_mode = (!empty($_SERVER['HTTPS'])) ? 'https://' : 'http://';\r\n\t $fullUrl = $http_mode . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']); \r\n\t return str_replace(\"\\\\\", \"/\", $fullUrl.rtrim(str_replace(INSTALL_PATH, \"\", PUBLIC_DOWNLOAD_FOLDER), \"/\").\"/\".$hash.\".php\");\r\n }\r\n }",
"function OLDgetfile($fichier, $enrob)\n\t{\n\t\tif (session_id()==\"\") session_start();\n\n\t\t$nomFichier = $fichier;\n //telechargement d'un exemple\n\t\tif ($enrob!=\"\") $fichier = \"exemples/exec/\".$enrob.\"/\".$fichier;\n //telechargement d'un fichier compile par l'utilisateur\n\t\telse $fichier = $_SERVER['DOCUMENT_ROOT'].\"/onlinecompiler/tmp/\".$_SESSION['id'].\"/\".$_SESSION['appli_name'].\"/\".$fichier;\n\t\t$tailleFichier = filesize($fichier);\n\t\t//Configuration du navigateur\n\t\theader('Content-Type: application/x-executable-file');\n\t\t#header('Content-Type: application/octet-stream');\n\t\theader(\"Content-Length: $tailleFichier\");\n\t\theader(\"Content-Disposition: attachment; filename=\\\"$nomFichier\\\"\");\n\t\treadfile($fichier);\n\t}",
"private static function file(): void\n {\n Debug::setBacklog();\n\n self::fileCheckControllerData();\n\n if(Parameters::getDownloadable()){\n self::fileDownload();\n } else {\n self::filePrintContent();\n }\n }",
"public function getPublicUri (): string;",
"public function getPublicUrl()\n\t{\n\t\treturn $this->publicPath .'/'. $this->file->getName();\n\t}",
"function User_Private_Files() {\n\treturn User_Private_Files::instance();\n}",
"function inlineViewPhysicalDocument($iDocumentID) {\n //get the document\n $oDocument = & Document::get($iDocumentID);\t\t\n //get the path to the document on the server\n $sDocumentFileSystemPath = $oDocument->getPath();\n if (file_exists($sDocumentFileSystemPath)) {\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Length: \". $oDocument->getFileSize());\n // prefix the filename presented to the browser to preserve the document extension\n header('Content-Disposition: inline; filename=\"' . $oDocument->getFileName() . '\"');\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n header(\"Cache-Control: must-revalidate\");\n header(\"Content-Location: \".$oDocument->getFileName());\n return readfile($sDocumentFileSystemPath);\n } else {\n return false;\n }\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the testimonial table in the database | function create_table()
{
$sql = "CREATE TABLE {$this->table_testimonial} (
{$this->col_id} INT(2) PRIMARY KEY AUTO_INCREMENT,
{$this->col_source} VARCHAR(100) NOT NULL,
{$this->col_message} TEXT NOT NULL
)";
$query = $this->db->query($sql);
return $query;
} | [
"function ssTestiCheckCreateTestiTable() {\r\n global $wpdb;\r\n\r\n //-- check testimonial table exist or not, if not then create new table\r\n if( $wpdb->get_var(\"SHOW TABLES LIKE '$wpdb->base_prefix.$this->ss_testi_table_name'\") != $wpdb->base_prefix.$this->ss_testi_table_name ) {\r\n $ss_testi_charset_collate = $wpdb->get_charset_collate();\r\n\r\n $ss_testi_sql = \"CREATE TABLE \" . $wpdb->base_prefix.$this->ss_testi_table_name . \" (\r\n testimonial_id int(11) NOT NULL AUTO_INCREMENT,\r\n blog_id bigint(20) NOT NULL,\r\n testimonial_name varchar(500) NOT NULL,\r\n testimonial_email varchar(500) NOT NULL,\r\n testimonial_phone varchar(500) NOT NULL,\r\n testimonial_content text NOT NULL,\r\n PRIMARY KEY (testimonial_id)\r\n ) \" . $ss_testi_charset_collate . \";\";\r\n }\r\n \r\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n dbDelta( $ss_testi_sql );\r\n }",
"private function CreateTb_TestCase() {\n $tTestCase = new DbTable('TestCase');\n \n // Set id property\n $pId = new DbProperty('Id');\n $pId->SetType(DbType::Double());\n $pId->NotNull();\n $pId->PrimaryKey();\n $pId->AutoIncrement();\n // Add id to table\n $tTestCase->AddProperty($pId);\n \n // Set category property\n $pCategory = new DbProperty('Category');\n $pCategory->SetType(DbType::Double());\n $pCategory->NotNull();\n // Add category to table\n $tTestCase->AddProperty($pCategory);\n\n // Set category property\n $pStatus = new DbProperty('Status');\n $pStatus->SetType(DbType::Double());\n $pStatus->NotNull();\n // Add category to table\n $tTestCase->AddProperty($pStatus);\n \n // Set name property\n $pName = new DbProperty('Name');\n $pName->SetType(DbType::Varchar(255));\n $pName->NotNull();\n // Add name to table\n $tTestCase->AddProperty($pName);\n \n // Add table to database\n $this->Database->AddTable($tTestCase);\n }",
"public function addTestimonial()\n {\n // retrieve testimonials from db\n $content = Page::getAddTestimonialPageData();\n\n View::renderTemplate('Testimonials/add-testimonial.html', [\n 'addtestimonialindex' => 'true',\n 'content' => $content\n ]);\n }",
"protected function createTestTables()\n {\n $db = $this->getDb();\n\n $table = 'EmailTemplateAr';\n $columns = [\n 'id' => 'pk',\n 'name' => 'string',\n 'subject' => 'string',\n 'bodyHtml' => 'text',\n ];\n $db->createCommand()->createTable($table, $columns)->execute();\n\n $columns = [\n 'name' => 'TestActiveMessage',\n 'subject' => 'test subject',\n 'bodyHtml' => 'test body HTML',\n ];\n $db->createCommand()->insert($table, $columns)->execute();\n }",
"protected function prepareTestTableWithData()\n {\n $createTableSql = \"create table people (id INTEGER PRIMARY KEY AUTOINCREMENT, first_name TEXT NOT NULL, last_name TEXT NOT NULL)\";\n $statement = DatabaseManager::connection()->getPdo()->prepare($createTableSql);\n $statement->execute();\n\n $insertSql = \"insert into people (first_name,last_name) values ('john','doe'),('jane','doe')\";\n $statement = DatabaseManager::connection()->getPdo()->prepare($insertSql);\n $statement->execute();\n }",
"protected function createContent()\n {\n DB::table('text')->insert([\n 'name' => 'test.page',\n 'title' => 'Test page',\n 'page' => 'Test',\n 'content' => 'This is some freaking awesome content!',\n ]);\n }",
"private function createAndPopulateTable()\n {\n $fieldParams = array(\n 'id' => array (\n 'name' => 'id',\n 'type' => 'id',\n ),\n 'acl_team_set_id' => array (\n 'name' => 'acl_team_set_id',\n 'type' => 'varchar',\n 'len' => 36,\n ),\n );\n\n // Create test table with params\n $this->db->createTableParams($this->tableName, $fieldParams, array());\n\n // Insert some data to test table\n $this->db->insertParams($this->tableName, $fieldParams, array(\n 'id' => Uuid::uuid1(),\n 'acl_team_set_id' => Uuid::uuid1(),\n ));\n }",
"public function create()\n {\n $this->template->title(lang('testimonials:new'));\n\n $extra = array(\n 'return' => 'admin/testimonials',\n 'success_message' => lang('testimonials:submit_success'),\n 'failure_message' => lang('testimonials:submit_failure'),\n 'title' => lang('testimonials:new')\n );\n\n $this->streams->cp->entry_form('testimonials', 'testimonials', 'new', null, true, $extra);\n }",
"protected function createFactoryTestimonial()\n {\n return factory(Testimonial::class)->create();\n }",
"public function testCreateTable()\n {\n $this->todo('stub');\n }",
"private function newPostTable () {\n\t\t$query = \n\t\t\t\"CREATE TABLE IF NOT EXISTS a2_posts (hostname VARCHAR(100), url VARCHAR(100), date VARCHAR(20), image VARCHAR(100), text VARCHAR(100), PRIMARY KEY (url))\";\n\t\t$this->sendQuery($query);\n\t}",
"public function createTables();",
"function create_table()\n {\n }",
"private function _setupDb() {\n $table = 'produtos';\n if (!$this->_conn->exec(\"SELECT 1 FROM \" . $table . \" LIMIT 1\")) {\n $this->_conn->exec(\"CREATE TABLE `\" . $table . \"` (\n `id` bigint(20) NOT NULL AUTO_INCREMENT,\n `codigo` varchar(30) NOT NULL,\n `descricao` varchar(300) NOT NULL,\n `fornecedor` varchar(300) NOT NULL,\n `preco` decimal(7,2) NOT NULL,\n `datahoraatualizacao` datetime DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `codigo` (`codigo`)\n) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;\");\n }\n }",
"function create_table() {\n\t\t$sql = 'CREATE TABLE IF NOT EXISTS `ideas` (\n\t\t\t`id` int(11) NOT NULL auto_increment,\n\t\t\t`title` varchar(150) collate utf8_bin NOT NULL,\n\t\t\t`message` varchar(2000) collate utf8_bin NOT NULL,\n\t\t\t`aid` bigint(20) NOT NULL,\n\t\t\t`rating` tinyint(4) NOT NULL default \\'0\\',\n\t\t\t`votes` tinyint(4) NOT NULL default \\'0\\',\n\t\t\t`ratio` float NOT NULL default \\'0\\',\n\t\t\tPRIMARY KEY (`id`)\n\t\t ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;';\n\t\t//Create the table\n\t\t$this->db->exec($sql);\n\t}",
"function testimonials_create_post_type() {\n\tregister_post_type('testimonials', array(\n\t\t'labels' => array(\n\t\t\t'name' => __('Testimonials'),\n\t\t\t'singular_name' => __('Testimonial'),\n\t\t\t'new_item' => __('New Testimonial'),\n\t\t\t'add_new_item' => __('Add New Testimonial'),\n\t\t\t'all_item' => __('All Testimonials'),\n\t\t\t'not_found' => __('No Testimonials Found'),\n\t\t\t'search_items' => __('Search Testimonials')\n\t\t\t),\n\t\t'public' => true,\n\t\t'has_archive' => true,\n\t\t'rewrite' => array('slug' => 'testimonials'),\n\t\t'supports' => array('title','editor','thumbnail', 'author', 'comments'),\n\t\t'taxonomies' => array('category'), \n\t\t)\n\t\t);\n\t}",
"function create_table(){\n global $wpdb;\n\n require_once(ABSPATH . \"wp-admin\" . '/includes/upgrade.php');\n\n $table_name = $wpdb->base_prefix . $this->table;\n\n $sql = \"CREATE TABLE IF NOT EXISTS $table_name (\n id bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n post_id bigint(20) unsigned,\n blog_id mediumint(9) NOT NULL,\n post_author bigint(20) unsigned,\n post_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n post_date_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n post_content longtext,\n post_title text,\n post_excerpt text,\n post_status varchar(20) DEFAULT 'post_status',\n post_type varchar(20) DEFAULT 'post',\n post_modified_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n post_modified datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n guid varchar(255),\n UNIQUE KEY id (id)\n );\";\n\n dbDelta( $sql );\n }",
"function createCoursesTable() {\n return $this->query('CREATE TABLE courses (id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(256), instructor INT, owner INT, deleted TINYINT DEFAULT 0)');\n }",
"public function createDatabase() {\n\n // initialise the Provider table\n $model1 = new ClClient();\n $model1->createTable();\n\n $model2 = new ClCompany();\n $model2->createTable();\n\n $model3 = new ClPricing();\n $model3->createTable();\n\n $model5 = new ClClientUser();\n $model5->createTable();\n \n $model6 = new ClAddress();\n $model6->createTable();\n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the private 'parameter_bag' shared service. | protected function getParameterBagService()
{
return $this->privates['parameter_bag'] = new \Symfony\Component\DependencyInjection\ParameterBag\ContainerBag($this);
} | [
"public function getParameterBag()\n {\n return $this->parameterBag;\n }",
"public function createParameterBag()\n {\n return new ParameterBag();\n }",
"protected function getSylius_ProcessStorage_Session_BagService()\n {\n return $this->services['sylius.process_storage.session.bag'] = new \\Sylius\\Bundle\\FlowBundle\\Storage\\SessionFlowsBag();\n }",
"public function getBuilderParamManager()\n {\n return $this->getBuilder()->getParamManager();\n }",
"protected function getSession_Storage_MetadataBagService()\n {\n return $this->services['session.storage.metadata_bag'] = new \\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag('_sf2_meta', '0');\n }",
"protected function getForm_ServerParamsService()\n {\n return $this->services['form.server_params'] = new \\Symfony\\Component\\Form\\Util\\ServerParams($this->get('request_stack'));\n }",
"protected final function getParameterHolder() {\n\t\treturn Context::getParameterHolder();\n\t}",
"public function getParameterHolder(): sfParameterHolder\n {\n return $this->parameterHolder;\n }",
"public function getBag()\n {\n return $this->bag;\n }",
"public function getRequestBag() : RequestBagInterface;",
"public static function getBuildInParamBroker()\n {\n if (null === self::$buildInParamBroker) {\n self::$buildInParamBroker = ['array' => new param\\ArrayParamBroker(),\n 'bool' => new param\\BoolParamBroker(),\n 'customdatespan' => new param\\CustomDatespanParamBroker(),\n 'date' => new param\\DateParamBroker(),\n 'day' => new param\\DayParamBroker(),\n 'directory' => new param\\DirectoryParamBroker(),\n 'file' => new param\\FileParamBroker(),\n 'float' => new param\\FloatParamBroker(),\n 'httpuri' => new param\\HttpUriParamBroker(),\n 'integer' => new param\\IntegerParamBroker(),\n 'json' => new param\\JsonParamBroker(),\n 'mail' => new param\\MailParamBroker(),\n 'oneof' => new param\\OneOfParamBroker(),\n 'password' => new param\\PasswordParamBroker(),\n 'string' => new param\\StringParamBroker(),\n 'securestring' => new param\\SecureStringParamBroker(),\n 'text' => new param\\TextParamBroker(),\n ];\n }\n\n return self::$buildInParamBroker;\n }",
"public function getParameterBagModel()\n {\n return $this->parameterBagModelNode;\n }",
"protected function getLockedBackendGuardService()\n {\n return $this->services['TYPO3\\\\CMS\\\\Backend\\\\Middleware\\\\LockedBackendGuard'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Backend\\Middleware\\LockedBackendGuard::class);\n }",
"function getSharedSecretKey()\n {\n return $this->_sharedSecretKey;\n }",
"protected function _getVhostBuilderService()\n {\n return $this\n ->getContainer()\n ->get('jeboehm_lampcp_apache_config_vhostbuilder');\n }",
"public function getRequestBag() : RequestBagInterface\n {\n $event = new RequestBagGenerationEvent($this->serverRequest, new GenericRequestBagBuilder());\n $this->eventDispatcher->dispatch(self::EVENT_REQUEST_GENERATION, $event);\n\n return $event->getRequestBagBuilder()->getRequestBag();\n }",
"protected function getOroConfig_ConfigDefinitionBagService()\n {\n return $this->services['oro_config.config_definition_bag'] = new \\Oro\\Bundle\\ConfigBundle\\Config\\ConfigDefinitionImmutableBag(array('oro_ui' => array('resolved' => true, 'application_name' => array('value' => 'ORO', 'scope' => 'app'), 'application_title' => array('value' => 'ORO Business Application Platform', 'scope' => 'app')), 'oro_locale' => array('resolved' => true, 'locale' => array('value' => 'en', 'scope' => 'app'), 'language' => array('value' => 'en', 'scope' => 'app'), 'country' => array('value' => 'US', 'scope' => 'app'), 'currency' => array('value' => 'USD', 'scope' => 'app'), 'timezone' => array('value' => 'UTC', 'scope' => 'app'), 'format_address_by_address_country' => array('value' => true, 'scope' => 'app'), 'qwerty' => array('value' => array(), 'scope' => 'app'), 'languages' => array('value' => array(0 => 'en_US', 1 => 'fr_FR', 2 => 'uk_UA'), 'scope' => 'app')), 'oro_navigation' => array('resolved' => true, 'maxItems' => array('value' => 20, 'scope' => 'app'), 'title_suffix' => array('value' => '', 'scope' => 'app'), 'title_delimiter' => array('value' => '-', 'scope' => 'app'), 'breadcrumb_menu' => array('value' => 'application_menu', 'scope' => 'app'))));\n }",
"public function bag()\n {\n return $this->_bag;\n }",
"public function getServiceKey()\n {\n return $this->getParameter('serviceKey');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test updating a ticket | public function testUpdate() {
// Create
$ph_ticket = $this->phactory->create('tickets');
// Update test
$this->ticket->id = $ph_ticket->ticket_id;
$this->ticket->summary = 'Mumkins Go Jumping At Night';
$this->ticket->save();
// Get
$ph_ticket = $this->phactory->get( 'tickets', array( 'ticket_id' => $this->ticket->id ) );
// Assert
$this->assertEquals( $this->ticket->summary, $ph_ticket->summary );
} | [
"public function testUpdateOneTicket()\n {\n $crawler = $this->client->request('PATCH', '/api/tickets/1');\n\n $this->assertTrue($this->client->getResponse()->isOk());\n }",
"public function testCollectionTicketsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testUpdateTicket() {\n\t\t// first, verify mySQL connected OK\n\t\t$this->assertNotNull($this->mysqli);\n\n\t\t// second, create a ticket to post to mySQL\n\t\t$this->ticket = new Ticket(null, $this->profile->getProfileId(), $this->event->getEventId());\n\n\t\t// third, insert the ticket to mySQL\n\t\t$this->ticket->insert($this->mysqli);\n\n\t\t// fourth, update the ticket and post the changes to mySQL\n\t\t$newEventTest = new Event(null, $this->eventCategory->getEventCategoryId(), $this->venue->getVenueId(), \"Pandora\", \"2014-12-18 19:00:00\", 19.00);\n\t\t$newEventTest->insert($this->mysqli);\n\t\t$this->ticket->setEventId($newEventTest->getEventId());\n\t\t$this->ticket->update($this->mysqli);\n\n\t\t// finally, compare the fields\n\t\t$this->assertNotNull($this->ticket->getTicketId());\n\t\t$this->assertTrue($this->ticket->getTicketId() > 0);\n\t\t$this->assertIdentical($this->ticket->getProfileId(),\t\t\t$this->profile->getProfileId());\n\t\t$this->assertIdentical($this->ticket->getEventId(),\t\t\t$newEventTest->getEventId());\n\n\t\t$this->ticket->delete($this->mysqli);\n\t\t$newEventTest->delete($this->mysqli);\n\n\t}",
"public function testTicketsCanBeUpdated()\n {\n $ticket = factory(Ticket::class)->states('open')->create(['department_id' => 1]);\n $this->actingAs($this->user);\n\n $this->get(route('agent.tickets.show', $ticket));\n\n $department = 2;\n $status = TicketStatus::closed()->first()->id;\n $response = $this->put(route('agent.tickets.update', $ticket), [\n 'department' => $department,\n 'status' => $status,\n ]);\n\n $response->assertRedirect(route('agent.tickets.index'));\n\n $ticket = $ticket->fresh();\n $this->assertEquals($department, $ticket->department->id);\n $this->assertEquals($status, $ticket->status->id);\n }",
"public function testUpdateSupportTicketUsingPut()\n {\n }",
"abstract protected function doUpdateTicket(Model\\Ticket $ticket, Model\\TicketUpdate $update);",
"public function update($acTicket)\r\n\t{\r\n\t\t\r\n\t}",
"public function testUpdateTicketByTicketActionLock()\n {\n }",
"public function updated(Ticket $ticket)\n {\n //\n }",
"public function updated(Ticket $ticket)\n {\n //\n }",
"public function updated(Ticket $ticket)\n {\n //code...\n }",
"public function test_edit_entry() {\n $this->resetAfterTest(true);\n $entryid = $this->create_entry();\n $entrydata = tool_sumitnegi\\api::get($entryid);\n $entrydata->completed = 1;\n $entrydata->name = \"Test Entry 001 V.1\";\n $entrydata->description = 'Dummy Description V.1';\n $entrydata->timemodified = time();\n tool_sumitnegi\\api::update($entrydata);\n $updatedentry = tool_sumitnegi\\api::get($entrydata->id);\n $this->assertEquals('Test Entry 001 V.1', $updatedentry->name, 'Name is not updated');\n $this->assertEquals(1, $updatedentry->completed, 'Completion is not updated');\n $this->assertEquals($entrydata->timemodified, $updatedentry->timemodified, 'Entry modification time is not updated');\n $this->assertEquals('Dummy Description V.1', $updatedentry->description);\n }",
"public function testMeetingUpdate()\n {\n }",
"public function updateTicketById() {\n if (func_num_args() > 0):\n $ticketId = func_get_arg(0);\n $edit = func_get_arg(1);\n $where = \"ticket_id = \" . $ticketId;\n $check = $this->update($edit, $where);\n\n if ($check):\n return 1;\n endif;\n else:\n throw new Exception('Argument Not Passed');\n endif;\n }",
"public function testOpenTicket()\n {\n }",
"function updateTicket()\n {\n\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\n //declare\n $conditional_sql = '';\n\n //escape all post item\n foreach ($_POST as $key => $value) {\n $$key = $this->db->escape($this->input->post($key));\n }\n\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\n //_____SQL QUERY_______\n $query = $this->db->query(\"UPDATE tickets\n SET \n tickets_assigned_to_id = $tickets_assigned_to_id,\n tickets_department_id = $tickets_department_id,\n tickets_status = $tickets_status\n WHERE tickets_id = $tickets_id\");\n\n $results = $this->db->affected_rows();\n\n //----------benchmarking end------------------\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n\n //return\n if (is_numeric($results)) {\n return true;\n } else {\n return false;\n }\n }",
"public function testOrderUpdate()\n {\n $response = $this->json('PATCH', '/orders/5',\n ['status' => 'TAKEN']\n );\n\n $response->assertStatus(200);\n }",
"public function testUpdateTicketByTicketActionUnlock()\n {\n }",
"public function testInvitationTicketsIdReplacePost()\n {\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if changing the sheet works as expected and also if it handles faulty inputs correctly. | public function testChangeSheetFunction(): void
{
foreach ($this->reader->getSheets() as $index => $worksheet) {
$sheet_name_in_sheet_data = $worksheet->getName();
self::assertTrue(
$this->reader->changeSheet($index),
'Unable to switch to sheet [' . $index . '] => [' . $sheet_name_in_sheet_data . ']'
);
// For testing, the sheet name is written in each sheet's first cell of the first line
$content = $this->reader->current();
self::assertNotEmpty(
$content,
'No content found in sheet [' . $index . '] => [' . $sheet_name_in_sheet_data . ']'
);
$sheet_name_in_cell = $content[0];
self::assertSame(
$sheet_name_in_cell,
$sheet_name_in_sheet_data,
'Sheet has been changed to a wrong one'
);
}
// test index out of bounds
self::assertFalse(
$this->reader->changeSheet(-1),
'Error expected when stepping out of bounds'
);
} | [
"static function isValidSpreadSheet ($data) {\n\t\tJLog::add('entry validateSpreadSheet()', JLog::DEBUG, 'com_mfn');\n\t\n\t\t$valid = true;\n\t\n\t\t$size = count($data);\n\t\t\n\t\t// Dump the data array to find errors\n\t\tJLog::add('$data = '.print_r($data, true), JLog::DEBUG, 'com_mfn');\n\t\t\n\t\n\t\t// Ignore the headings in the conversion\n\t\tfor ($index = 1; $index < $size; ++$index) {\n\t\t\t\t\n\t\t\t// TODO Check that the category is correct\n\t\t\t\n\t\t\t// Check that the price is a float\n\t\t\tif (!filter_var($data[$index][Catalog::$columnMap[\"UnitPrice\"]], FILTER_VALIDATE_FLOAT)) {\n\t\t\t\t$rowNum = $index+1;\n\t\t\t\tJFactory::getApplication()->\n\t\t\t\t\tenqueueMessage (JText::sprintf('CATALOGUL_PROC_ERR_2', \n\t\t\t\t\t\t'Row '.$rowNum.' in spreadsheet. UnitPrice '.$data[$index][Catalog::$columnMap[\"UnitPrice\"]].\n\t\t\t\t\t\t' is not a valid currency amount'),\n\t\t\t\t\t\t'Error');\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\n\t\t\t// Check that the quantity price is a float or blank\n\t\t\tif (trim($data[$index][Catalog::$columnMap[\"QuantityPrice\"]]) != '' &&\n\t\t\t\t!filter_var($data[$index][Catalog::$columnMap[\"QuantityPrice\"]], FILTER_VALIDATE_FLOAT)) {\n\n\t\t\t\t$rowNum = $index+1;\n\t\t\t\tJFactory::getApplication()->\n\t\t\t\t\tenqueueMessage (JText::sprintf('CATALOGUL_PROC_ERR_2', \n\t\t\t\t\t\t'Row '.$rowNum.' in spreadsheet. QuantityPrice '.$data[$index][Catalog::$columnMap[\"QuantityPrice\"]].\n\t\t\t\t\t\t' is not a valid currency amount'),\n\t\t\t\t\t\t'Error');\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\n\t\t\t// Check that award is a y or n and convert it to boolean\n\t\t\tif (!(trim(strtolower($data[$index][Catalog::$columnMap[AWARD]])) == 'y' ||\n\t \t\t\ttrim(strtolower($data[$index][Catalog::$columnMap[AWARD]])) == 'n')) {\n\n\t\t\t\t$rowNum = $index+1;\n\t\t\t\tJFactory::getApplication()->\n\t\t\t\tenqueueMessage (JText::sprintf('CATALOGUL_PROC_ERR_2', \n\t\t\t\t\t'Row '.$rowNum.' in spreadsheet. Award column must have a value of y or n'),\n\t\t\t\t\t'Error');\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\n\t\t\t\t\n\t\t\t// Check that new is a y or n\n\t\t\tif (!(trim(strtolower($data[$index][Catalog::$columnMap[\"New\"]])) == 'y' ||\n\t\t\t\ttrim(strtolower($data[$index][Catalog::$columnMap[\"New\"]])) == 'n')) {\n\n\t\t\t\t$rowNum = $index+1;\n\t\t\t\tJFactory::getApplication()->\n\t\t\t\t\tenqueueMessage (JText::sprintf('CATALOGUL_PROC_ERR_2', \n\t\t\t\t\t'Row '.$rowNum.' in spreadsheet. New column must have a value of y or n'),\n\t\t\t\t\t'Error');\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\n\t\t\t// Height should be integer\n\t\t\tif (!filter_var($data[$index][Catalog::$columnMap[\"Height\"]], FILTER_VALIDATE_INT)) {\n\t\t\t\t$rowNum = $index+1;\n\t\t\t\tJFactory::getApplication()->\n\t\t\t\t\tenqueueMessage (JText::sprintf('CATALOGUL_PROC_ERR_2', \n\t\t\t\t\t'Row '.$rowNum.' in spreadsheet. Height column must be a number'),\n\t\t\t\t\t'Error');\n\t\t\t\t$valid = false;\n\t\t\t}\n\n\t\t\t// Spread should be integer\n\t\t\tif (!filter_var($data[$index][Catalog::$columnMap[\"Spread\"]], FILTER_VALIDATE_INT)) {\n\t\t\t\t$rowNum = $index+1;\n\t\t\t\tJFactory::getApplication()->\n\t\t\t\t\tenqueueMessage (JText::sprintf('CATALOGUL_PROC_ERR_2', \n\t\t\t\t\t'Row '.$rowNum.' in spreadsheet. Spread column must be a number'),\n\t\t\t\t\t'Error');\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t}\n\t\n\t\treturn \t$valid;\n\t}",
"public function valid(): bool\n {\n return $this->sheetKeeper->valid();\n }",
"protected function checkRequiredFields()\n\t{\n\t\t//\n\t\t// Init local storage.\n\t\t//\n\t\t$ok = TRUE;\n\t\t$worksheets = array_keys( $this->mParser->getWorksheets() );\n\t\t$count = count( $worksheets );\n\t\t\n\t\t//\n\t\t// Initialise progress.\n\t\t//\n\t\t$this->transaction()->offsetSet( kTAG_COUNTER_PROGRESS, 0 );\n\t\tUpdateProcessCounter( $start, $increment, kTAG_COUNTER_PROCESSED );\n\t\t\n\t\t//\n\t\t// Iterate worksheets.\n\t\t//\n\t\tforeach( $worksheets as $worksheet )\n\t\t{\n\t\t\t//\n\t\t\t// Create transaction.\n\t\t\t//\n\t\t\t$transaction\n\t\t\t\t= $this->transaction()\n\t\t\t\t\t->newTransaction( kTYPE_TRANS_TMPL_STRUCT_COLUMNS,\n\t\t\t\t\t\t\t\t\t kTYPE_STATUS_EXECUTING,\n\t\t\t\t\t\t\t\t\t $worksheet );\n\t\t\n\t\t\t//\n\t\t\t// Check required columns.\n\t\t\t//\n\t\t\tif( ! $this->mParser->checkRequiredColumns( $transaction, $worksheet ) )\n\t\t\t\t$transaction->offsetSet( kTAG_TRANSACTION_STATUS, kTYPE_STATUS_OK );\n\t\t\t\n\t\t\t//\n\t\t\t// Handle errors.\n\t\t\t//\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ok = FALSE;\n\t\t\t\t$transaction->offsetSet( kTAG_TRANSACTION_STATUS, kTYPE_STATUS_FATAL );\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\t// Close transaction.\n\t\t\t//\n\t\t\t$transaction->offsetSet( kTAG_COUNTER_PROGRESS, 100 );\n\t\t\t$transaction->offsetSet( kTAG_TRANSACTION_END, TRUE );\n\t\t\t\n\t\t\t//\n\t\t\t// Update progress.\n\t\t\t//\n\t\t\t$increment++;\n\t\t\tUpdateProcessCounter(\n\t\t\t\t$start, $increment,\n\t\t\t\tkTAG_COUNTER_PROCESSED,\n\t\t\t\t$this->transaction(), $count );\n\t\t\n\t\t} // Iterating worksheets.\n\t\t\n\t\treturn $ok;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\n\t}",
"public function testShowAndHideSheet()\n {\n $this->sheet->hideSheet();\n $this->assertEquals(true, $this->sheet->isHidden());\n self::$spreadsheet->pull();\n $this->assertEquals(true, $this->sheet->isHidden());\n\n $this->sheet->showSheet();\n $this->assertEquals(false, $this->sheet->isHidden());\n self::$spreadsheet->pull();\n $this->assertEquals(false, $this->sheet->isHidden());\n }",
"protected function recheckWizardsAndRowUpdaters() {}",
"public function cellCheck()\n {\n }",
"public function valid()\n\t{\n\t\treturn isset(self::$season_changes[$this->index]);\n\t}",
"public function testGetSheetsFunction(): void\n {\n $exp_sheets = array(\n 'First Sheet',\n 'Second Sheet',\n 'Third Sheet'\n );\n $sheet_name_list = array();\n foreach ($this->reader->getSheets() as $worksheet) {\n $sheet_name_list[] = $worksheet->getName();\n }\n self::assertSame($exp_sheets, $sheet_name_list, 'Sheet list differs');\n }",
"public function changeSheet($sheet_index)\n {\n $sheets = $this->getSheets(); // Note: Realigns indexes to an auto increment.\n if (!isset($sheets[$sheet_index])) {\n return false;\n }\n /** @var Worksheet $target_sheet */\n $target_sheet = $sheets[$sheet_index];\n\n // The path to the target worksheet file can be obtained via the relationship id reference.\n $target_relationship_id = $target_sheet->getRelationshipId();\n /** @var RelationshipElement $relationship_worksheet */\n foreach ($this->relationship_data->getWorksheets() as $relationship_worksheet) {\n if ($relationship_worksheet->getId() === $target_relationship_id) {\n $worksheet_path = $relationship_worksheet->getAccessPath();\n break;\n }\n }\n if (!isset($worksheet_path) || !is_readable($worksheet_path)) {\n return false;\n }\n\n // Initialize the determined target sheet as the new current sheet\n $this->worksheet_path = $worksheet_path;\n $this->rewind();\n return true;\n }",
"public function inStaleMate()\n {\n $this->startTransaction();\n $color = strtoupper($this->_move);\n if ($this->inCheck($color)) {\n $this->rollbackTransaction();\n return false;\n }\n $moves = $this->getPossibleChecks($color);\n foreach ($moves as $name => $canMove) {\n if (count($canMove)) {\n $a = $this->getPiece($name);\n foreach ($canMove as $move) {\n $this->_move = $color;\n\n if (!$this->isError($this->moveSquare($a, $move))) {\n $this->rollbackTransaction();\n return false;\n }\n }\n }\n }\n $this->rollbackTransaction();\n\n return true;\n }",
"public function testBaseValues()\n {\n $reader = new XLSX\\XLSXReader('test.xlsx');\n\n $sheets = $reader->getSheets();\n $this->assertTrue(count($sheets) === 3);\n $this->assertEquals($sheets[0]->getName(), 'hmmm');\n $this->assertEquals($sheets[0]->getPosition(), 1);\n $this->assertEquals($sheets[1]->getName(), 'Sheet2');\n $this->assertEquals($sheets[1]->getPosition(), 2);\n $this->assertEquals($sheets[2]->getName(), 'Sheet3');\n $this->assertEquals($sheets[2]->getPosition(), 3);\n }",
"public function testSyncActionAddSheetExisting() : void\n {\n $this->prepareDataFiles();\n\n // create spreadsheet\n $sheetTitle = 'titanic';\n $gdFile = $this->client->createFile(\n $this->dataPath . '/in/tables/titanic_1.csv',\n 'titanic',\n [\n 'parents' => [getenv('GOOGLE_DRIVE_FOLDER')],\n 'mimeType' => Client::MIME_TYPE_SPREADSHEET,\n ]\n );\n\n $config = $this->prepareConfig();\n $config['action'] = 'addSheet';\n $config['parameters']['tables'][] = [\n 'id' => 0,\n 'fileId' => $gdFile['id'],\n 'title' => 'titanic',\n 'folder' => ['id' => getenv('GOOGLE_DRIVE_FOLDER')],\n 'sheetTitle' => $sheetTitle,\n 'enabled' => true,\n 'action' => ConfigDefinition::ACTION_UPDATE,\n ];\n\n $process = $this->runProcess($config);\n $this->assertEquals(0, $process->getExitCode(), $process->getErrorOutput());\n $response = json_decode($process->getOutput(), true);\n\n $this->assertArrayHasKey('sheetId', $response['sheet']);\n $this->assertArrayHasKey('title', $response['sheet']);\n\n $gdSpreadsheet = $this->client->getSpreadsheet($gdFile['id']);\n $this->assertCount(1, $gdSpreadsheet['sheets']);\n $this->assertEquals($sheetTitle, $gdSpreadsheet['sheets'][0]['properties']['title']);\n\n $this->client->deleteFile($gdFile['id']);\n }",
"public function testSetAndGetSpreadsheetValidationRules(){\n\n\t}",
"public function canRepair()\n {\n return true;\n }",
"public function hasOldInput();",
"protected function checkExcel(): void\n {\n if ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' === $this->mimeType ||\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' === $this->mimeType ||\n 'application/vnd.ms-excel' === $this->mimeType ||\n 'xls' === $this->fileExtension ||\n 'xlsx' === $this->fileExtension\n ) {\n $this->iconClass = self::ICON_EXCEL;\n }\n }",
"public function testLoadXlsBug1592(): void\n {\n $filename = 'tests/data/Reader/XLS/bug1592.xls';\n $reader = new Xls();\n // When no fix applied, spreadsheet is not loaded\n $spreadsheet = $reader->load($filename);\n $sheet = $spreadsheet->getActiveSheet();\n $col = $sheet->getHighestColumn();\n $row = $sheet->getHighestRow();\n\n $newspreadsheet = $this->writeAndReload($spreadsheet, 'Xlsx');\n $newsheet = $newspreadsheet->getActiveSheet();\n $newcol = $newsheet->getHighestColumn();\n $newrow = $newsheet->getHighestRow();\n\n self::assertEquals($spreadsheet->getSheetCount(), $newspreadsheet->getSheetCount());\n self::assertEquals($sheet->getTitle(), $newsheet->getTitle());\n self::assertEquals($sheet->getColumnDimensions(), $newsheet->getColumnDimensions());\n self::assertEquals($col, $newcol);\n self::assertEquals($row, $newrow);\n\n $rowIterator = $sheet->getRowIterator();\n\n foreach ($rowIterator as $row) {\n foreach ($row->getCellIterator() as $cellx) {\n /** @var Cell */\n $cell = $cellx;\n $valOld = $cell->getFormattedValue();\n $valNew = $newsheet->getCell($cell->getCoordinate())->getFormattedValue();\n self::assertEquals($valOld, $valNew);\n }\n }\n $spreadsheet->disconnectWorksheets();\n $newspreadsheet->disconnectWorksheets();\n }",
"public function testEditDocumentXlsxCreateBlankSpreadsheet()\n {\n }",
"public function testDataSourceIsValidWithXls() {\n $datasource = new \\codename\\core\\io\\datasource\\spreadsheet(\n __DIR__ . \"/\" . 'testSpreadsheet1.xls',\n [\n 'custom_sheet_index' => 0,\n 'multisheet' => 0,\n 'skip_rows' => 3,\n 'header_row' => 2,\n ]\n );\n\n $datasource->next();\n\n $data = $datasource->current();\n $this->assertEquals($data['A'], 'Value2-1');\n $this->assertEquals($data['B'], 'Value2-2');\n $this->assertEquals($data['C'], 'Value2-3');\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the super admin status. | public function setSuperAdmin($boolean); | [
"public function getSuperAdminStatus()\r\n\r\n\t{\r\n\r\n\t\treturn $this->superAdmin;\r\n\r\n \t}",
"public static function setAdminMode () {\r\n self::$adminMode = true;\r\n }",
"private function setAdmin()\n {\n $_SESSION['admin'] = TRUE;\n }",
"public function setAdmin($val): void {\n $this->admin = (bool)$val;\n }",
"public function setSubUserStatus(int $status);",
"public function isSuperAdmin() {\n\t\tif ($this->admin_status > 1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function enableAdminMode()\n\t{\n\t\t$this->admin_god_mode = true;\n\t}",
"public function makeAdmin()\n\t{\n\t\t$this->is_admin = \"1\";\n\t\t$this->save();\n\t}",
"public function promoteToAdmin()\n {\n $this->admin_flag = 1;\n $this->save();\n }",
"public function change_subadmin_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_ENC_URL);\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$adminid = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('_id' => MongoID($adminid));\n\t\t\t$this->subadmin_model->update_details(SUBADMIN,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Sub Admin Status Changed Successfully','admin_subadmin_admin_status_change');\n\t\t\tredirect(ADMIN_ENC_URL.'/subadmin/display_sub_admin');\n\t\t}\n\t}",
"public function change_subadmin_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin_ror');\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$adminid = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $adminid);\n\t\t\t$this->subadmin_model->update_details(SUBADMIN,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Sub Admin Status Changed Successfully');\n\t\t\tredirect('admin/subadmin/display_sub_admin');\n\t\t}\n\t}",
"public function grantRoleAdmin()\n {\n $this->isAdmin = true;\n }",
"public function isSuperadmin()\n\t {\n\t return (Yii::app()->user->isGuest) ? FALSE : $this->level == 9;\n\t }",
"public function setAtAdminPanel()\n {\n $this->_blAtAdminPanel = true;\n }",
"private function ensureAdminStateOfManager()\n {\n if ($this->data['slug'] == 'manager') {\n $this->data['is_admin'] = true;\n }\n }",
"private function admin()\n\t {\n\n\t }",
"function onlyForAdmin() {\n if (!\\Ease\\Shared::user()->getSettingValue('admin')) {\n $this->addStatusMessage(_('Only for admin'), 'warning');\n $this->redirect('login.php');\n exit();\n }\n }",
"function admin()\n {\n if ($logado = get_sts(false)) {\n if (!$logado->id || !$logado->status) {\n redirect('admin');\n }\n } else {\n redirect('admin');\n }\n }",
"public function getAdminStatus() {\n return $this->isAdministrator;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the access rights for user on a folder. | public function deleteAcl($folder, $user)
{
$this->_failOnMissingAcl();
return $this->_driver->deleteAcl($folder, $user);
} | [
"public function deleteAcl($folder, $user)\n {\n $folder = $this->_convertToInternal($folder);\n $this->_failOnMissingFolder($folder);\n $this->_failOnNoAdmin($folder);\n if ($this->_data->hasUserPermissions($folder, $user)) {\n $this->_data->deleteUserPermissions($folder, $user);\n }\n }",
"public function deleteAcl($folder, $user)\n {\n Horde_Kolab_Storage_Exception_Pear::catchError(\n $this->getBackend()->deleteACL($this->encodePath($folder), $user)\n );\n }",
"public function clear_user_access() {\n\t\treturn delete_option($this->access_key);\n\t}",
"function delete_pm_folder($dir, $dest, $user) {\n\tglobal $sql;\n\tif (!is_array($dir)) { // If a single ID is given, convert it to an array\n\t\t$dir = [(int) $dir];\n\t}\n\t$movepm = $sql->prepare(\"UPDATE `pm_access` SET `folder` = '{$dest}' WHERE `folder` = ? AND user = {$user}\");\n\t$deldir = $sql->prepare(\"DELETE FROM `pm_folders` WHERE `folder` = ? AND user = {$user}\");\n\t$delread = $sql->prepare(\"DELETE FROM `pm_foldersread` WHERE `folder` = ? AND user = {$user}\");\n\tforeach ($dir as $del) {\n\t\t$sql->execute($movepm, [$del]);\n\t\t$sql->execute($deldir, [$del]);\n\t\t$sql->execute($delread, [$del]);\n\t}\t\n}",
"public function testDeleteFolderUser()\n {\n $this->client = static::makeclientWithLogin();\n $route = $this->getUrl('api_apiv1_folder_deletefolderuser');\n $this->client->request(\n 'DELETE',\n $route,\n [],\n [],\n $this->mandatoryHeaders,\n '{\"folId\":1,\"userId\":\"MyUsrLogin02\"}'\n );\n $response = $this->client->getResponse();\n $this->assertEquals(204, $response->getStatusCode());\n }",
"function exponent_permissions_revoke($user,$permission,$location) {\n\tglobal $db;\n\treturn $db->delete(\"userpermission\",\"uid=\" . $user->id . \" AND permission='$permission' AND module='\" . $location->mod . \"' AND source='\" . $location->src . \"' AND internal='\" . $location->int . \"'\");\n}",
"public function revokeAccess();",
"public function delete_acl($folder, $user)\n {\n if (!$this->get_capability('ACL')) {\n return false;\n }\n\n if (!$this->check_connection()) {\n return false;\n }\n\n return $this->conn->deleteACL($folder, $user);\n }",
"public function delete($folder);",
"public function removeAllPermissions()\n {\n DB::table('telegram_bot_pivot')\n ->where('telegram_bot_user_id', $this->id)\n ->delete();\n }",
"public function force_deleting_user_deletes_folders()\n {\n $user = factory(User::class)->create();\n\n Folder::create([\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n 'folder_type_id' => FolderType::generic()->first()->id,\n 'access_type_id' => AccessType::public()->first()->id,\n 'name' => 'Generic Test',\n ]);\n\n Folder::create([\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n 'folder_type_id' => FolderType::generic()->first()->id,\n 'access_type_id' => AccessType::unlisted()->first()->id,\n 'name' => 'Generic Test',\n ]);\n\n Folder::create([\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n 'folder_type_id' => FolderType::book()->first()->id,\n 'access_type_id' => AccessType::public()->first()->id,\n 'name' => 'Generic Test',\n ]);\n\n Folder::create([\n 'created_by_user_id' => $user->id,\n 'updated_by_user_id' => $user->id,\n 'folder_type_id' => FolderType::book()->first()->id,\n 'access_type_id' => AccessType::unlisted()->first()->id,\n 'name' => 'Generic Test',\n ]);\n\n $user->forceDelete();\n\n $this->assertEquals(0, Folder::withTrashed()->createdBy($user->id)->count());\n }",
"function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }",
"public function revokeAllPermissions();",
"public function removeAllPermissions($user): bool;",
"function delete_user_dir($userId) {\n\t$userDir=get_user_dir($userId);\t\n\tif($userDir) {\t\t\n\t\t//File destination\n\t\t$userPath=FS_PATH.$userDir;\"some/dir/*.txt\";\n\t\tarray_map('unlink', glob(FS_PATH.$userDir.\"/*.*\"));\n\t\tif(rmdir($userPath)) { \n\t\t\treturn true;\n\t\t} else return false;\t\t\n\t} else {\n\t\terror_log(\"delete_user_dir: user_dir could not be found.\",0);\n\t\treturn false;\n\t}\n}",
"public function removeAllPermissions()\n {\n }",
"public function revokeAllPrivileges();",
"function delete_user_access_menu($id)\n {\n return $this->db->delete('user_access_menu', array('id' => $id));\n }",
"function remove_user_permissions($user_id)\n\t{\n\t\t$this->db->where('sb_hotel_user_id',$user_id);\n\t\t$this->db->delete('sb_user_modules');\n\t\treturn 1;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the CbacInformeSemanalCac model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. | protected function findModel($id)
{
if (($model = CbacInformeSemanalCac::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
} | [
"protected function findModel($idColeta)\n {\n if (($model = Coleta::findOne($idColeta)) !== null)\n {\n return $model;\n } else\n {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }",
"protected function findModel($ID_CAR, $ID_SEM, $CODIGO_ASIG, $ID_PER) {\n if (($model = CarsemAsigPer::findOne(['ID_CAR' => $ID_CAR, 'ID_SEM' => $ID_SEM, 'CODIGO_ASIG' => $CODIGO_ASIG, 'ID_PER' => $ID_PER])) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('La página solicitada no existe.');\n }",
"protected function findModel($id)\n {\n if (($model = CbacConsolidadoMesCbac::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModel($id)\n {\n if(Yii::$app->session->get('Rules')['comp_id'] ==1){\n if (($model = Customer::findOne(['id' => $id])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }else{\n\n \n if (($model = Customer::findOne(['id' => $id,'comp_id' => Yii::$app->session->get('Rules')['comp_id']])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }\n }",
"protected function findModel($id)\r\n {\r\n if (($model = Comprasrealiz::findOne($id)) !== null) {\r\n return $model;\r\n }\r\n\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }",
"protected function findModel($id)\n {\n if (($model = MaterialCopiasAutGerencia::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('A página solicitada não existe.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = ArticuloComentario::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }",
"protected function findModel($id)\n {\n if (($model = MarcacaoConsulta::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModel($CID)\n\t{\n\t\tif (($model = Categories::findOne($CID)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}",
"protected function findModel($id) {\n if (($model = Comentarios::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModel($id)\n {\n if (($model = ComisionMixtaCap::findOne(['ID_COMISION_MIXTA'=>$id, 'ACTIVO'=>1])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Certificate::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, 'The requested page does not exist.');\n }\n }",
"protected function findModel($id_cita, $id_paciente) {\n if (($model = CitaMedica::findOne(['id_cita' => $id_cita, 'id_paciente' => $id_paciente])) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Compras::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findModelCae($id)\n\t{\n\t\tif(($model = CaE::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException(Yii::t('cms', 'The requested page does not exist.'));\n\t}",
"protected function findModel($id)\n {\n if (($model = ControlCaja::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id) {\n if (($model = Calculo::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }",
"protected function findModel($id)\n {\n if (($model = Conversaciones::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"protected function findCompletado($id)\n {\n if (($model = Completados::findOne($id)) !== null) {\n return $model;\n }\n throw new NotFoundHttpException('The requested page does not exist.');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make a multiple select widget, if options < 5 it will be expanded into radios by default Required parameters: 'id', 'options' (in array) Optional parameters: 'name', 'class', 'value' (selected value) or other html attributes 'expand' (true or false, by default 'auto') 'useEmpty', 'emptyText' (used in select mode) 'prefix', 'suffix' (used to wrap radios in expanded mode) 'labelOn' ('left' or 'right', by default 'right', used to identify radios in expanded mode) | protected static function builtInMultipleChoose(array $parameters)
{
static::checkRequiredParameters($parameters, ['id', 'options']);
$options = (array)$parameters['options'];
$parameters[0] = $id = $parameters['id'];
$expand = isset($parameters['expand']) ? $parameters['expand'] : 'auto';
unset($parameters['options'], $parameters['expand']);
// Expand select into radio buttons
if ($expand === true || ($expand == 'auto' && count($options) < 5)) {
$html = [];
$i = 0;
$radioParams = $parameters;
$labelOn = isset($radioParams['labelOn']) ? $radioParams['labelOn'] : 'right';
$prefix = isset($radioParams['prefix']) ? $radioParams['prefix'] : '';
$suffix = isset($radioParams['suffix']) ? $radioParams['suffix'] : '';
unset($radioParams['expand'], $radioParams['labelOn'], $radioParams['prefix'], $radioParams['suffix']);
unset($radioParams['options'], $radioParams['useEmpty'], $radioParams['emptyText']);
$selected = isset($parameters['value']) ? array_flip((array)$parameters['value']) : [];
foreach ($options as $value => $label) {
$radioParams['id'] = $radioId = $id . '_' . $i;
$radioParams['value'] = $value;
if (isset($selected[(string)$value])) {
$radioParams['checked'] = 'checked';
} else {
$radioParams['checked'] = null;
}
$checkbox = Tag::checkField($radioParams);
if ($labelOn == 'right') {
$checkbox .= PHP_EOL . $label;
} else {
$checkbox = $label . PHP_EOL . $checkbox;
}
$checkbox = static::label(['for' => $radioId], $checkbox);
++$i;
$html[] = $prefix . $checkbox . $suffix;
}
return implode(PHP_EOL, $html);
}
$parameters['multiple'] = true;
return Tag::select($parameters, $options);
} | [
"function add_multiselect($name, $label, $values, $strings, $selected = null, $size = 5, $params = null) \n {\n if (count((array)$values) != count((array)$strings)) {\n return;\n }\n $selected = explode(',', $selected);\n $options = null;\n for ($i = 1; $i <= count((array)$values); $i++) {\n $select_this = null;\n $num_selected = count($selected);\n for ($count = 0; $count < $num_selected; $count++) {\n if ($selected[$count] == $values[$i - 1]) {\n $select_this = 'selected';\n }\n }\n $options .= '<option value=\"'.$values[$i - 1].'\" '.$select_this.'>'.$strings[$i - 1].'</option>'.\"\\n\";\n }\n $form_var = '<div class=\"admin_form_element\">\n\t\t\t<label for=\"_'.$name.'\">'.$label.'</label>\n\t\t\t<select name=\"'.$name.'[]\" id=\"_'.$name.'\" '.$params.'\n\t\t\tsize=\"'.(int)$size.'\" multiple>'.$options.'</select>\n\t\t\t</div><br />';\n $this->form .= $form_var;\n }",
"function formMultipleSelect($name, $opt_array, $match = NULL, $ignore_index = FALSE, $match_to_value = FALSE, $size = 4, $label = NULL, $class = NULL) {\r\r\n\t$option_string = NULL;\r\r\n\tif ($class) $class = \" class=\\\"$class\\\"\";\r\n\r\n\tif ($label)\r $option_string = $label;\r\r\n \r\r\n\tif (is_array($opt_array)) {\r\r\n\t $name = $name . \"[]\";\r\r\n\t $option_string .= \"\\n<select name=\\\"$name\\\" id=\\\"$name\\\" multiple=\\\"multiple\\\" size=\\\"$size\\\" $class>\\n\";\r\r\n\r\n\t foreach ($opt_array as $value=>$option) {\r\r\n\t\t\tif($ignore_index)\r $option_string .= \"<option\";\r\r\n\t\t\telse\r $option_string .= \"<option value=\\\"$value\\\"\";\r\r\r\n\t\t\t\r\n\t\t\tif ($match_to_value) {\r\r\n\t\t\t\tif (is_array($match) && in_array($value, $match))\r\r\n\t\t\t\t\t$option_string .= \" selected\";\r\r\n\t\t\t}\r\n\t\t\telseif (is_array($match) && in_array($option, $match))\r $option_string .= \" selected\";\r\r\n\r\r\n\t\t\t$option_string .= \">\".$option.\"</option>\\n\";\r\r\n\t }\r\r\n\r\r\n\t $option_string .= \"</select>\\n\";\r\r\n\r\r\n\t return $option_string;\r\r\n\t}\r\r\n }",
"public function multiselect($items, $options = [])\n {\n $options['encode'] = false;\n $height = ArrayHelper::remove($options, 'height', self::MULTI_SELECT_HEIGHT);\n $selector = ArrayHelper::remove($options, 'selector', self::TYPE_CHECKBOX);\n $container = ArrayHelper::remove($options, 'container', []);\n Html::addCssStyle($container, 'height:' . $height, true);\n Html::addCssClass($container, 'form-control input-multiselect');\n $container['tabindex'] = 0;\n $this->_multiselect = Html::tag('div', '{input}', $container);\n return $selector == self::TYPE_RADIO ? $this->radioList($items, $options) : $this->checkboxList($items, $options);\n }",
"public static function multiselect( $args ) {\n \t$field_id = $args['id'];\n \t$value = self::get( $field_id, $args['default'] );\n \t?>\n \t<select multiple=\"multiple\" id=\"<?php echo self::$slug . $field_id; ?>\" <?php if ( isset( $args['class'] ) ) : echo 'class=\"' . esc_attr( $args['class'] ) . '\"'; endif; ?> name=\"<?php echo esc_attr( self::$slug . '[' . $field_id . ']' ); ?>\">\n \t\t<?php foreach( $args['options'] as $key => $_value ) : ?>\n \t\t\t<option value=\"<?php echo $key; ?>\" <?php selected( $value, $key ); ?>><?php echo $_value; ?></option>\n \t\t<?php endforeach; ?>\n \t</select>\n\n \t<?php if ( isset( $args['description'] ) ) : ?>\n \t\t<span class='howto'><?php echo wp_kses_post( $args['description'] ); ?></span>\n \t<?php endif;\n }",
"protected function multiple()\n {\n $html = '';\n $radio = clone($this);\n foreach ($this->options as $value => $label) {\n $this->attribs['value'] = $value;\n $this->attribs['label'] = $label;\n $html .= $radio(array(\n 'name' => $this->name,\n 'value' => $this->value,\n 'attribs' => $this->attribs\n ));\n }\n return $html;\n }",
"function config_add_multi_rtype_select($config_var, $label, $width=300)\n {\n return array('multi_rtype_select', $config_var, $label, $width);\n }",
"public function addMultiSelect(array $options)\n {\n return new Elements\\MultiSelect($options);\n }",
"function add_radios($name, $optionlist, $valuelist=false, $vertical=false, $default_option='', $class='', $style='', $display_toggles=false)\n\t{\n\t\tif($this->is_reposted)\n\t\t{\n\t\t\t$default_option = $this->get_repost_value($name, $default_option);\n\t\t\t$style = $this->restyle_if_failed($name, $style);\n\t\t}\n\t\t$class = ($class != '' ? ' class=\"' . $class . '\"' : '');\n\t\t$style = ($style != '' ? ' style=\"' . $style . '\"' : '');\n\t\t$count = count($optionlist);\n\t\tif(is_array($valuelist))\n\t\t{\n\t\t\tif($count != count($valuelist))\n\t\t\t{\n\t\t\t\t$valuelist = $optionlist;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$valuelist = $optionlist;\n\t\t}\n\t\tfor($i = 0; $i < $count; $i ++)\n\t\t{\n\t\t\t$checked = ($default_option === $optionlist[$i] ? ' checked' : '');\n\t\t\t$onclick = (isset($display_toggles[$i]) ? ' onclick=\"' . $this->external_js['radio_display_toggle'] . \"('\" . $display_toggles[$k] . \"'\" . ');\"' : '');\n\t\t\t$this->xecho('<input type=\"radio\" name=\"' . $name . '\" value=\"' . $thisvalue . '\"' . $checked . $class . $style . $onclick . '>');\n\t\t\t$this->label($thisvalue);\n\t\t\tif($vertical)\n\t\t\t{\n\t\t\t\t$this->br();\n\t\t\t}\n\t\t}\n\t}",
"public function viewDbRelationSingleSelectorMultipleEditMode(&$config) {\n \n $htmlArray = array();\n\n // Initializes the option element array\n $htmlOptionArray = array();\n\t\t$htmlOptionArray[] = '';\n\n\t\tif ($config['emptyitem']) {\n\t\t\t// Adds the Option element\n\t\t\t$htmlOptionArray[] = utils::htmlOptionElement(\n array(\n utils::htmlAddAttribute('value', '0'),\n ),\n ''\n );\n }\n\t\tforeach($config['items'] as $key => $item) {\n\t\t\t$selected = ($item['selected']) ? 'selected' : '';\n\n\t\t\t// Adds the Option element\n\t\t\t$htmlOptionArray[] = utils::htmlOptionElement(\n array(\n utils::htmlAddAttributeIfNotNull('style', $item['style']),\n utils::htmlAddAttributeIfNotNull('selected', $selected),\n utils::htmlAddAttribute('value', $item['uid']),\n ),\n stripslashes($item['label'])\n );\n\n\t\t}\n\t\t$htmlOptionArray[] = '';\n\n // Adds the select element\n\t\t$htmlArray[] = utils::htmlSelectElement(\n array(\n utils::htmlAddAttribute('multiple', 'multiple'),\n utils::htmlAddAttribute('name', $config['elementControlName'] .'[]'),\n utils::htmlAddAttribute('size', $config['size']),\n utils::htmlAddAttribute('onchange', 'document.changed=1;'),\n utils::htmlAddAttributeIfNotNull('class', $config['classhtmltag']),\n utils::htmlAddAttributeIfNotNull('style', $config['stylehtmltag']),\n ),\n $this->savlibrary->arrayToHTML($htmlOptionArray)\n );\n\n\t\treturn $this->savlibrary->arrayToHTML($htmlArray);\n\t}",
"abstract function defaultMultiSelect();",
"public function radios($args)\n {\n $defaults['class'] = $defaults['label'] = $defaults['description'] = '';\n $defaults['name'] = $this->plugin_name . '-options[' . $args['id'] . ']';\n $defaults['value'] = 0;\n\n apply_filters($this->plugin_name . '-field-radios-options-defaults', $defaults);\n\n $atts = wp_parse_args($args, $defaults);\n\n if (! empty($this->options[$atts['id']])) {\n $atts['value'] = $this->options[$atts['id']];\n }\n\n require plugin_dir_path(__FILE__) . 'partials/' . $this->plugin_name . '-field-radios.php';\n }",
"function multiple($code_set, $code_lang, $param=array()) {\n\n $var_name = $param['var_name'];\n $value = $param['value'];\n $default = $param['default'];\n $subset = $param['subset'];\n $options = $param['options'];\n $size = $param['size'];\n\n # Variable name.\n if (!$var_name) $var_name = $code_set;\n if (!isset($value)) {\n $value = $_POST ? $_POST[$var_name] : $_GET[$var_name];\n }\n if (!isset($value)) $value = $default;\n $Value = array();\n if (is_array($value)) {\n foreach ( $value as $val ) $Value[$val] = 1;\n } elseif ($value <> '') {\n $Value[$value] = 1;\n }\n if (is_array($subset)) {\n $Subset = array();\n foreach ( $subset as $val ) $Subset[$val] = 1;\n }\n if ($options) $options = \" $options\";\n\n # Select multiple box.\n $select = \"<select multiple name=\\\"$var_name\".\"[]\\\"$options\";\n if ($size) $select .= \" size=\\\"$size\\\"\";\n $select .= \">\\n\";\n\n # Show code set options.\n $set_list = $this->full_set($code_set, $code_lang);\n foreach ( $set_list as $row ) {\n list($code_code, $code_desc) = $row;\n if ($Subset && !$Subset[$code_code] && !$Value[$code_code])\n continue;\n $code_desc = htmlspecialchars(ucfirst($code_desc));\n if ( $Value[$code_code] ) {\n $select .= \"<option value=\\\"$code_code\\\" selected>$code_desc\\n\";\n unset($Value[$code_code]);\n } elseif ($row[3] <> 'd') {\n $select .= \"<option value=\\\"$code_code\\\">$code_desc\\n\";\n }\n }\n\n # Show missing values.\n foreach ( $Value as $code_code => $true ) {\n $select .= \"<option value=\\\"$code_code\\\" selected>$code_code\\n\";\n }\n\n $select .= \"</select>\\n\";\n return $select;\n }",
"public function testRenderMultipleSelected(): void\n {\n $select = new SelectBoxWidget($this->templates);\n $data = [\n 'multiple' => true,\n 'id' => 'BirdName',\n 'name' => 'Birds[name]',\n 'val' => ['1', '2', 'burp'],\n 'options' => [\n 1 => 'one',\n '1x' => 'one x',\n '2' => 'two',\n '2x' => 'two x',\n ],\n ];\n $result = $select->render($data, $this->context);\n $expected = [\n 'select' => [\n 'name' => 'Birds[name][]',\n 'multiple' => 'multiple',\n 'id' => 'BirdName',\n ],\n ['option' => ['value' => '1', 'selected' => 'selected']], 'one', '/option',\n ['option' => ['value' => '1x']], 'one x', '/option',\n ['option' => ['value' => '2', 'selected' => 'selected']], 'two', '/option',\n ['option' => ['value' => '2x']], 'two x', '/option',\n '/select',\n ];\n $this->assertHtml($expected, $result);\n }",
"public function multi_select() {\n\t}",
"public function testSelectMultiple() {\n $options = ['first', 'second', 'third'];\n $result = $this->Form->select(\n 'Model.multi_field',\n $options,\n ['form' => 'my-form', 'multiple' => true]\n );\n $expected = [\n 'input' => [\n 'type' => 'hidden',\n 'name' => 'Model[multi_field]',\n 'value' => '',\n 'form' => 'my-form',\n ],\n 'select' => [\n 'name' => 'Model[multi_field][]',\n 'multiple' => 'multiple',\n 'form' => 'my-form',\n 'class' => 'form-control'\n ],\n ['option' => ['value' => '0']],\n 'first',\n '/option',\n ['option' => ['value' => '1']],\n 'second',\n '/option',\n ['option' => ['value' => '2']],\n 'third',\n '/option',\n '/select'\n ];\n $this->assertHtml($expected, $result);\n\n $result = $this->Form->select(\n 'Model.multi_field',\n $options,\n ['multiple' => 'multiple', 'form' => 'my-form']\n );\n $this->assertHtml($expected, $result);\n }",
"public function OptionListFromArray ($values, $listname, $checked = array(), $sort = TRUE, $size = true, $extrahtml=\"\", $extraline = array(), $defaultItemClass = \"\") {\n\n\t\t// internal use only for ease of reading\n\t\t$OPTION_LIST_IS_POPUP = true;\n\t\t$OPTION_LIST_IS_MULTI = true;\n\n\t\tis_array($values) || $values = array();\n\t\n\t\tif ($sort)\n\t\t\tasort ($values);\n\t\n\t\tif (!is_array($checked))\n\t\t\t$checked = array ($checked);\n\t\n\t\t$optionlist = \"\";\n\t\n\t\t$extraline && $optionlist .= \"<OPTION VALUE=\\\"\" . $extraline['value'] . \"\\\" \" . $extraline['checked'] . \">\" . $extraline['label'] .\"</OPTION>\\n\";\n\n\t\tif ($defaultItemClass) {\n\t\t\t$class = \" class=\\\"$defaultItemClass\\\" \";\n\t\t} else {\n\t\t\t$class = \"\";\n\t\t}\n\n\t\n\t\treset($values);\n\t\t$k = 1;\n\t\twhile (list($ID, $name) = each ($values)) {\n\t\t\t$ID = trim($ID);\n\t\t\t$name = trim($name);\n\t\t\tif ($name && $name[0] != \"/\") {\n\t\t\t\tin_array($ID, $checked) ? $check = \" selected\" : $check = \"\";\n\t\t\t\t$optionlist .= \"<OPTION $class VALUE=\\\"$ID\\\" $check>$name</OPTION>\\n\";\n\t\t\t\t$k++;\n\t\t\t}\n\t\t}\n\t\tif ($size === $OPTION_LIST_IS_POPUP) {\n\t\t\t$size = \"\";\n\t\t} elseif (!$size) {\n\t\t\t$k > 10 ? $size = $OPTION_LIST_MAXSIZE : $size = $k;\n\t\t\t$size = 'SIZE=\"' . $size . '\" MULTIPLE';\n\t\t} else {\n\t\t\t$size = 'SIZE=\"' . $size . '\" MULTIPLE';\n\t\t}\n\t\t$block = \"\\n<SELECT NAME=\\\"$listname\\\" $size $extrahtml>\\n$optionlist</SELECT>\\n\";\n\t\n\t\treturn $block;\n\t\n\t}",
"function multiselect($key, $attributes = array(), $options = NULL) {\n\t\t$attributes['multiple'] = 'multiple';\n\n\t\treturn $this->select($key, $attributes, $options);\n\t}",
"public function multiSelectByKey(\n $label,\n $name,\n $elementKey,\n $data,\n $value = null,\n $attributes = [],\n $params = null\n ) {\n\n $pNode = $this->prepareParams($params);\n\n if (!$pNode->exists('firstFree'))\n $pNode->firstFree = ' ';\n\n if (isset($attributes['id'])) {\n \n $id = $this->inpIdPrefix.$attributes['id'];\n $inpName = $name;\n \n } else {\n \n $tmp = explode(',', $name);\n $tmpId = str_replace(array('[',']'), array('-',''), $tmp[0]);\n \n if (count($tmp) > 1) {\n \n $id = $this->inpIdPrefix.$tmpId.\"-\".$tmp[1];\n $inpName = $tmp[0].\"[{$tmp[1]}]\";\n } else {\n $id = $this->inpIdPrefix.$tmpId;\n $inpName = $tmp[0];\n }\n \n $attributes['id'] = \"wgt-input-{$id}\";\n }\n \n if ($pNode->inp_only && !isset($attributes['placeholder'])) {\n $attributes['placeholder'] = $label;\n }\n\n if (!BuizCore::classExists($elementKey))\n return '<!-- Missing '.$elementKey.' -->';\n\n $selectBoxNode = new $elementKey();\n\n $selectBoxNode->addAttributes([\n 'name' => $name,\n 'id' => $id,\n 'class' => 'asgd-'.$this->id,\n ]\n );\n $selectBoxNode->setWidth('small');\n\n $selectBoxNode->assignedForm = $this->id;\n\n $selectBoxNode->setActive($value);\n\n //$selectBoxNode->setReadonly($readOnly);\n //$selectBoxNode->setRequired($required);\n\n $selectBoxNode->setData($data);\n $selectBoxNode->setLabel($label);\n\n // set an empty first entry\n //if (!is_null($firstFree))\n //$selectBoxNode->setFirstFree($firstFree);\n return $this->out($selectBoxNode->build());\n\n }",
"function &_createSelectBox($fieldName, $options, $multiple = false)\n {\n if ($multiple) {\n $element = HTML_QuickForm::createElement($this->_getQFType('multiselect'),\n $this->_fb->getFieldName($fieldName),\n $this->_fb->getFieldLabel($fieldName),\n $options,\n array('multiple' => 'multiple'));\n } else {\n $element = HTML_QuickForm::createElement($this->_getQFType('select'),\n $this->_fb->getFieldName($fieldName),\n $this->_fb->getFieldLabel($fieldName),\n $options);\n $attr = $this->_getAttributes('select', $fieldName);\n $element->updateAttributes($attr);\n if (isset($this->linkNewValue[$fieldName])) {\n $links = $this->_fb->_do->links();\n if (isset($links[$fieldName])) {\n list($table,) = explode(':', $links[$fieldName]);\n require_once('DB/DataObject/FormBuilder/QuickForm/SubFormFB.php');\n $element->addOption($this->linkNewValueText, $this->linkNewValueText);\n $element->updateAttributes(array('onchange' => 'db_do_fb_'.$this->_fb->getFieldName($fieldName).'__subForm_display(this)'));\n $element->updateAttributes(array('id' => $element->getName()));\n $this->_prepareForLinkNewValue($fieldName, $table);\n $subFormElement = HTML_QuickForm::createElement($this->_getQFType('subForm'),\n $this->_fb->getFieldName($fieldName).'__subForm',\n '',\n $this->_linkNewValueForms[$fieldName]);\n $subFormElement->setPreValidationCallback(array(&$subFormElement, 'preValidationCallback'));\n $subFormElement->linkNewValueText = $this->linkNewValueText;\n $subFormElement->selectName = $this->_fb->getFieldName($fieldName);\n $el = $this->_form->addElement('hidden', $this->_fb->getFieldName($fieldName).'__subForm__displayed');\n $el->updateAttributes(array('id' => $el->getName()));\n //echo $this->_fb->getFieldName($fieldName).'<br/>';\n $element = HTML_QuickForm::createElement('group',\n $this->_fb->getFieldName($fieldName),\n $this->_fb->getFieldLabel($fieldName),\n array($element, $subFormElement),\n '',\n false);\n }\n }\n }\n return $element;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all users that are not agents. | public static function getAllNonAgents() {
return User::select(DB::raw('users.*, user_types.user_type'))
->leftJoin('user_types','user_types.id','=','users.user_type_id')
->whereRaw('users.agent_id = 0')
->get();
} | [
"public function get_all_user_not_regis()\n\t{\n\t\t$sql = \"SELECT * FROM $this->hr_db.`hr_person` WHERE ps_id not in (SELECT su_ps_id FROM $this->swm_db.`swm_user`)\";\n\t\t$query = $this->swm->query($sql);\n\n\t\treturn $query;\n\t}",
"public function findAllUsersWithoutProfiles();",
"public function getNonRegisteredUsers()\n {\n $q = Doctrine_Query::create()\n ->from('sfGuardUser u')\n ->innerJoin('u.Profile p')\n ->where('p.'.$this->getEmailHashColumn().' IS NULL');\n\n return $q->execute()->getData();\n }",
"public function usersNotIn()\n {\n if ($this->id > 0) {\n $userIds = $this->users()->lists('user_id');\n $users = User::where('deleted', '=', User::NOT_DELETED_USERS)->whereNotIn('id', $userIds)->get();\n } else {\n $users = User::where('deleted', '=', User::NOT_DELETED_USERS)->get();\n }\n\n return $users->lists('fullname', 'id');\n }",
"function getAllNonPublisherUsers() {\n\t\t$result = $this->_connection->selectAllFrom ( \"non_publisher_users_view\" );\n\t\t$output = [ ];\n\t\twhile ( $row = $result->fetch () ) {\n\t\t\tarray_push ( $output, new User ( $row ) );\n\t\t}\n\t\treturn $output;\n\t}",
"public static function findUsersWithoutConnections()\n {\n $connections = Connection::find()->where([\"patient_id\" => Yii::$app->user->id])->all();\n $connIDs = [];\n foreach ($connections as $connection) {\n $connIDs[] = $connection->user_id;\n }\n \n $users = self::find()->where(['NOT IN', 'id', $connIDs])->all();\n \n return $users;\n }",
"public function getNotModeratedUsers()\n {\n return $this->userRepository->getNotModeratedUsers();\n }",
"public function getAllExceptUser()\n {\n $conn = Db::getConnection();\n\n //<> is the same as !=\n $statement = $conn->prepare(\"SELECT * FROM users WHERE email <> :email\");\n $statement->bindValue(':email', $this->getEmail());\n $statement->execute();\n $users = $statement->fetchAll(\\PDO::FETCH_OBJ);\n\n return $users;\n }",
"private function get_not_active_users(){\n\n\t\tglobal $wpdb;\n\n\t\t$how_many = apply_filters( 'sfn_prune_how_many_users', 200 );\n\n\t\t$query = $wpdb->prepare( \"SELECT * FROM $wpdb->signups WHERE active = %d LIMIT %d\", 0, absint( $how_many ) );\n\t\t$users = $wpdb->get_results( $query );\n\n\t\treturn $users;\n\n\t}",
"public function getUsersToExcludeFromNotification();",
"public function getAllUsersExceptUserAuth()\n {\n $user = $this->getUserAuth();\n return $this->repository->findWhereNotIn('id', [$user->id]);\n }",
"public static function getNoRoleUser()\n {\n \t$users = User::whereNull('role_id')\n \t\t\t\t->whereNull('deleted_at')\n \t\t\t\t->get();\n\n \treturn $users;\n }",
"function Get_all_users_no_active(){\n $data = $this->model->Get_list_person_not_active();\n return $data;\n }",
"public static function getUsersNoBasestation() \n\t{\n $collection = new \\Illuminate\\Database\\Eloquent\\Collection;\n foreach (User::all() as $user) {\n \tif(!isset(Basestation::whereUserId($user->id)->first()->id) && !$user->isAdmin())\n \t\t$collection->add($user);\n }\n \n return $collection->reverse();\n\t}",
"protected function users() {\n\n $users = site()->users();\n\n if (!empty($this->exclude)) {\n $users = call([ $users, 'not' ], $this->exclude);\n }\n\n return $users;\n\n }",
"public function getUsersWithoutKids() {\n\t\t$users = array();\n\t\t$data = self::$connection->selectValues(\"SELECT email,name,vorname,registered,user.id,eltern.id \n\t\tFROM user,eltern \n\t\tWHERE user.id = eltern.userid order by registered\");\n\t\tif ($data) {\n\t\tforeach ($data as $d) {\n\t\t\t\t$users[] = array(\"name\"=>$d[1],\"vorname\"=>$d[2],\"mail\"=>$d[0],\n\t\t\t\t\"registered\"=>$d[3],\"id\"=>$d[4],\"eid\"=>$d[5]);\n\t\t\t\t}\t\t\n\t\t\t}\n\n\t\t$unused = array();\n\t\tforeach ($users as $u) {\n\t\t\t$data = self::$connection->selectValues(\"SELECT id FROM schueler WHERE eid = \".$u['eid'].\" OR eid2= \".$u['eid']);\n\t\t\tif (!$data[0][0] ) {\n\t\t\t\tarray_push($unused,$u);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\treturn $unused;\n\t}",
"public function getUnlockedUsers()\n {\n return $this->doctrine->getRepository('UserBundle:User')->findBy(['locked' => false]);\n }",
"public function getExcludeUserIds()\n {\n return array();\n }",
"Public Function getAllNonDeletedUsers()\n\t{\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll('SELECT * FROM bevomedia_user WHERE deleted = 0');\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set a callablecondition When set, debug output will be restricted to if the supplied condition evaluates to TRUE | public function setCondition($condition)
{
if( is_callable($condition) || is_null($condition) ):
$this->condition = $condition;
return $this;
endif;
throw new DebugException("Attempt to set a debug-condition failed: Supplied condition is not a a valid callback.");
} | [
"public function setCondition(callable $condition);",
"public function testGetCondition()\r\n {\r\n Debug::instance()->setCondition( function() {return TRUE;} );\r\n $this->assertTrue( Debug::instance()->getCondition() );\r\n Debug::instance()->setCondition( function() {return FALSE;} );\r\n $this->assertFalse( Debug::instance()->getCondition() );\r\n }",
"function call_if(bool $condition, \\Closure $callable)\n {\n if ($condition) {\n call_user_func($callable);\n }\n }",
"private function handleBooleanEnv($value, $condition, callable $callable)\n {\n if ((bool) $value == $condition) {\n call_user_func($callable);\n }\n }",
"function log_if($condition,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null,$a6=null,$a7=null,$a8=null,$a9=null,$a10=null)\n{\n\tif( $condition )\n\t\tlog_debug($a1,$a2,$a3,$a4,$a5,$a6,$a7,$a8,$a9,$a10);\n\treturn $condition;\n}",
"public function onCondition()\n {\n }",
"public function condition($condition) {\n }",
"function ifCondition(callable $callable, $methodArguments = [], $condition)\n{\n if (true === $condition) {\n return call_user_func_array(\n $callable,\n $methodArguments\n );\n }\n}",
"public function testDebugEnabled()\r\n {\r\n Debug::instance()->setDebugMode(TRUE);\r\n Debug::instance()->setCondition(NULL);\r\n $this->assertTrue( Debug::instance()->debugEnabled() );\r\n \r\n Debug::instance()->setDebugMode(FALSE);\r\n Debug::instance()->setCondition(NULL);\r\n $this->assertFalse( Debug::instance()->debugEnabled() );\r\n \r\n Debug::instance()->setDebugMode(TRUE);\r\n Debug::instance()->setCondition( function() { return TRUE;} );\r\n $this->assertTrue( Debug::instance()->debugEnabled() );\r\n \r\n Debug::instance()->setDebugMode(FALSE);\r\n Debug::instance()->setCondition( function() { return FALSE;} );\r\n $this->assertFalse( Debug::instance()->debugEnabled() );\r\n }",
"private function callIf($condition, callable $callback, array $arguments): bool {\n if ($condition) {\n $callback(...$arguments);\n return TRUE;\n }\n return FALSE;\n }",
"public function set_selection_filter($condition);",
"public static function addMessageIfTrue($message,$condition,$label='INFO'){\n\t\tif ( $condition===true ) {\n\t\t\tself::debugbar()->addMessage($message,$label);\n\t\t}\n\t}",
"function setDBCondition($condition) \n {\n $this->dbCondition = $condition;\n \n }",
"public function set_selection_filter($condition)\n {\n $this->selection_filter = $condition;\n }",
"public function initialCondition();",
"public function setCondition(){\r\n\t\t$tmpArgArr = func_get_args();\r\n\t\tif(!isset($tmpArgArr[0]) || !is_string($tmpArgArr[0]) || $tmpArgArr[0] == ''){\r\n\t\t\tSGF::eventLog('setCondition', 0, '$condition is invalid variable.', 'error');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->condition = $tmpArgArr[0] == 'ALL' ? '' : $tmpArgArr[0];\r\n\t\tSGF::eventLog('setCondition', 0, 'condition for update and delete was setted.');\r\n\t\treturn true;\r\n\t}",
"function _addIfCondition($condition) {\n\n array_push($this->if_conditions,$condition);\n\n $this->_updateTopIfCondition();\n\n ob_start();\n }",
"public function setcondition($value)\n {\n $this->_fields['condition']['FieldValue'] = $value;\n return $this;\n }",
"public function checkCondition(): void;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to send html for column dropdown list | function PMA_sendHtmlForColumnDropdownList()
{
$response = PMA_Response::getInstance();
$foreignTable = $_REQUEST['foreignTable'];
$table_obj = new PMA_Table($foreignTable, $_REQUEST['foreignDb']);
// Since views do not have keys defined on them provide the full list of columns
if (PMA_Table::isView($_REQUEST['foreignDb'], $foreignTable)) {
$columnList = $table_obj->getColumns(false, false);
} else {
$columnList = $table_obj->getIndexedColumns(false, false);
}
$columns = array();
foreach ($columnList as $column) {
$columns[] = htmlspecialchars($column);
}
$response->addJSON('columns', $columns);
// @todo should be: $server->db($db)->table($table)->primary()
$primary = PMA_Index::getPrimary($foreignTable, $_REQUEST['foreignDb']);
if (false === $primary) {
return;
}
$primarycols = array_keys($primary->getColumns());
$response->addJSON('primary', $primarycols);
} | [
"function display_select($table, $idx = NULL) {\n if ($table == NULL) {\n return false;\n }\n $table['data'] = $table;\n $table['column'] = current($table);\n $out = ''; // the return value\n $actual_id = 0; // actual index\n $fields_name[] = $table['column']; // contains the schema's columns\n // cross the different columns to get the future select\n foreach ($fields_name as $col) {\n foreach ($col as $col_key => $col_value) {\n if (strpos(strtolower($col_key), 'id') === false) {\n $out .= sprintf('<select class=\"custom-select\" data-toggle=\"dropdown\" id=\\'%s\\' name=\\'%s\\'><div class=\\'dropdown-menu\\'>', $col_key, $col_key);\n // table data\n foreach ($table['data'] as $record) {\n foreach ($record as $key => $value) {\n if (strpos(strtolower($key), 'id') === false && $key == $col_key) {\n if (stripos($value, $idx) !== false) {\n $out .= sprintf('<option value=\"%s\" selected=\"selected\">%s', $value, $value);\n } else {\n $out .= sprintf('<option value=\"%s\">%s', $value, $value);\n }\n } \n }\n $out .= '</option>';\n }\n $out .= '</div></select>';\n return $out;\n }\n }\n }\n}",
"function RenderColumnSelections( $ef ) {\n global $available_columns, $columns, $search_record;\n\n $flipped_columns = array_flip($columns);\n $html .= '<div id=\"columnselect\">';\n $html .= '<span class=\"srchp\">Columns:</span>';\n $i=0;\n foreach( $available_columns AS $k => $v ) {\n $ef->record->columns[$k] = (isset($flipped_columns[$k])?$k:'');\n error_log( \"DBG: $k => $v -- \" . $flipped_columns[$k] . \", \" . $ef->record->columns[$k] );\n $html .= $ef->DataEntryField( \"%s\", \"checkbox\", \"columns[$k]\",\n array(\"_label\" => $v, \"class\" => \"srchf\", \"value\" => $k ) );\n $i++;\n }\n $html .= \"</div>\\n\";\n\n return $html;\n}",
"function display_cell($data)\n\t{\n\t\t$this->EE->load->helper('custom_field');\n\n\t\t$values = decode_multi_field($data);\n\t\t$field_options = $this->_get_field_options($data);\n\t\t\n\t\t$r = form_dropdown(\n\t\t\t\"select_\".$this->cell_name,\n\t\t\t$field_options,\n\t\t\t$values,\n\t\t\t'dir=\"' . $this->settings['field_text_direction'] .\n\t\t\t'\"style=\"float:left;margin-right:10px;margin-top:3px\" id=\"' .\n\t\t\t$this->field_id.'\"'\n\t\t);\n\t\t\n\t\t$r.= \"<span style='float:left;margin-top:4px'><a class='wp_addselect_add' href='#' title='Add item'>add item</a></span>\";\n\t\t\n\t\t$r.= form_input(\n\t\t\tarray(\n\t\t\t\t'name' => $this->cell_name,\n\t\t\t\t'value' => html_entity_decode($data, ENT_QUOTES),\n\t\t\t\t'class' => 'wp_addselect_value field',\n\t\t\t\t'style' => 'display:none'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$r.= form_input(\n\t\t\tarray(\n\t\t\t\t'label' => 'Add new item',\n\t\t\t\t'name' => 'wp_addselect_'.$this->cell_name.'_new_item',\n\t\t\t\t'class' => 'wp_addselect_new field',\n\t\t\t\t'style' => 'width:200px; float:left;margin-right:10px; display:none'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$r.= \"<span style='float:left;margin-top:4px;display:none'><a class='wp_addselect_remove' href='#' title='Remove'>remove</a></span>\";\n\t\t\n\t\t$this->EE->load->library('javascript');\n\n\t\t$this->EE->javascript->output('\n\t\t\tMatrix.bind(\"wp_addselect\", \"display\", function(cell){\n\t\t\t\t\t\n\t\t\t\t\tvar name = cell.field.id+\"[\"+cell.row.id+\"][\"+cell.col.id+\"]\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tvar input = $(cell.dom.$td).find(\".wp_addselect_new:input\");\n\t\t\t\t\tif (input.length > 0 && input.attr(\"name\").match(new RegExp(/^wp_addselect.*_new_item$/))) {\n\t\t\t\t\t\t\t\tinput.attr(\"name\", input.attr(\"name\").replace(/[\\[\\]]/g, \"_\"));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$(\"a.wp_addselect_add\", cell.dom.$td).click(function(){\n\t\t\t\t\t\t$(this).parent().hide();\n\t\t\t\t\t\t$(this).parent().siblings(\"select\").hide();\n\t\t\t\t\t\t$(input, cell.dom.$td).show().parent(\"span\").show();\n\t\t\t\t\t\t$(this).parent().siblings(\"span\").show();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$(\"a.wp_addselect_remove\").click(function(){\n\t\t\t\t\t\t$(this).parent().hide();\n\t\t\t\t\t\t$(this).parent().siblings(\"select\").show();\n\t\t\t\t\t\t$(this).parent().siblings(\"input\").val(\"\").hide();\n\t\t\t\t\t\t$(this).parent().siblings(\"span\").show();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($(\".wp_addselect_value\", cell.dom.$td).val() !=\"\" && $(\"option\", $(\"select\", cell.dom.$td)).filter(function(){return this.value == $(\".wp_addselect_value\", cell.dom.$td).val();}).length == 0){\n\t\t\t\t\t\t$(\".wp_addselect_new\", cell.dom.$td).show().val($(\".wp_addselect_value\", cell.dom.$td).val());\n\t\t\t\t\t\t$(\".wp_addselect_add\", cell.dom.$td).parent(\"span\").hide();\n\t\t\t\t\t\t$(\"select\", cell.dom.$td).hide();\n\t\t\t\t\t\t$(\".wp_addselect_remove\", cell.dom.$td).parent(\"span\").show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(\"select\", cell.dom.$td).val($(\".wp_addselect_value\", cell.dom.$td).val());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$(\".wp_addselect\", cell.dom.$td).keypress(function(e){\n\t\t\t\t\t\tif(e.which == 13){\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$(\"select\", cell.dom.$td).change(function(){\n\t\t\t\t\t\t$(\".wp_addselect_value\", cell.dom.$td).attr(\"value\",$(\"select\", cell.dom.$td).val());\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$(input, cell.dom.$td).keyup(function(e){\n\t\t\t\t\t\tif(e.which == 13){\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$(input).prev().attr(\"value\", $(this).val());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t});\n\t\t');\n\t\t\n\t\treturn $r;\n\t}",
"function on_Edit (){\n $varname = \"tmodule_\" . $this->name;\n $content=\"<select name = \\\"$varname\\\" class=\\\"{$this->form->style}\\\">\";\n foreach ($this->options as $option) {\n $selected = $this->_value==$option ? \"selected=\\\"selected\\\"\" : \"\";\n $content .=\"<option class=\\\"{$this->form->style}\\\" value=\\\"$option\\\" $selected>$option</option>\"; \n }\n $content .= \"</select>\\n\"; \n return ($content);\n }",
"function pn_display_meta_select2($name, $data, $title, $values, $trClass = \"\"){\n ?>\n <tr class=\"<?php echo $trClass; ?>\">\n <td style='width: 100px'><?php echo $title; ?> : </td>\n <td>\n <select name=\"<?php echo $name; ?>\">\n <?php\n foreach($values as $value){\n $selected = ($value[0] == $data) ? \"selected\" : \"\";\n printf(\"<option value='%s' %s>%s</option>\", $value[0], $selected, $value[1]); \n }\n ?> \n </select>\n </td>\n </tr>\n <?php \n}",
"function dropDownto()\r\n {\r\n $queryArray = array();\r\n $html = \"\";\r\n\r\n $mysqli = $this->conn;\r\n $query = \"SELECT ID,lakeHostGroupName FROM lakehostgroup ORDER BY lakeHostGroupName ASC\";\r\n $stmt = $mysqli->query($query);\r\n\r\n /*\r\n // Prepared statement, stage 1: prepare\r\n if (!($stmt = $mysqli->prepare(\"SELECT ?, ? FROM ? ORDER BY ?))) {\r\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\r\n }\r\n\r\n // Prepared statement, stage 2: bind and execute\r\n if (!($stmt->bind_param('ssss', , , ,))) {\r\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\r\n }\r\n if (!$stmt->execute()) {\r\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\r\n }\r\n */\r\n\r\n if ($stmt->num_rows > 0) {\r\n while ($row = $stmt->fetch_assoc()) {\r\n $queryArrayID = $row['ID'];\r\n $queryArrayField = $row['lakeHostGroupName'];\r\n $queryArray[$queryArrayID] = $queryArrayField;\r\n }\r\n }\r\n $html .= \"<select id= groupID required>\";\r\n foreach ($queryArray as $key => $value) {\r\n $html .= \"<option value=$key>$value</option>\\n\";\r\n }\r\n return $html;\r\n }",
"function display_delete_dropdown()\n {\n $this->display_dropdowns();\n }",
"function getPrimaryColumns_AdvFilterHTML($module,$selected=\"\")\n{\n global $ogReport, $app_list_strings, $current_language;\n\t$mod_strings = return_module_language($current_language,$module);\n\t$block_listed = array();\n foreach($ogReport->module_list[$module] as $key=>$value)\n {\n \tif(isset($ogReport->pri_module_columnslist[$module][$value]) && !$block_listed[$value])\n \t{\n\t\t\t$block_listed[$value] = true;\n\t\t\t$shtml .= \"<optgroup label=\\\"\".$app_list_strings['moduleList'][$module].\" \".getTranslatedString($value).\"\\\" class=\\\"select\\\" style=\\\"border:none\\\">\";\n\t\t\tforeach($ogReport->pri_module_columnslist[$module][$value] as $field=>$fieldlabel)\n\t\t\t{\n\t\t\t\tif(isset($mod_strings[$fieldlabel]))\n\t\t\t\t{\n\t\t\t\t\t//fix for ticket 5191\n\t\t\t\t\t$selected = decode_html($selected);\n\t\t\t\t\t$field = decode_html($field);\n\t\t\t\t\t//fix ends\n\t\t\t\t\tif($selected == $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$shtml .= \"<option selected value=\\\"\".$field.\"\\\">\".$mod_strings[$fieldlabel].\"</option>\";\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t$shtml .= \"<option value=\\\"\".$field.\"\\\">\".$mod_strings[$fieldlabel].\"</option>\";\n\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tif($selected == $field)\n\t\t\t\t\t{\n\t\t\t\t\t\t$shtml .= \"<option selected value=\\\"\".$field.\"\\\">\".$fieldlabel.\"</option>\";\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t$shtml .= \"<option value=\\\"\".$field.\"\\\">\".$fieldlabel.\"</option>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n }\n return $shtml;\n}",
"function _make_editable_select($field) {\n if ($this->input->post('export')) \n return $field;\n\n $extra = '<select name=\"status\">';\n foreach ($this->node_statuses as $id => $name) {\n $extra .= '<option value=\"' . $id . '\">' . $name . '</option>';\n }\n\n $extra .= '</select>';\n \n $r = '<div class=\"editable_cell\">' . $field . '</div>';\n $r .= '<div style=\"display:none\" class=\"editable_extra\">' . $extra . '</div>';\n return $r;\n }",
"function showSelect($options, $name, $label, $column = 'name')\n{\n if(count($options) > 0)\n echo '<div id=\"'.$name.'select\" class=\"form-group form-group-sm \" >\n <label>'.$label.'</label>\n <select required id=\"'.$name.'\" name=\"'.$name.'\" class=\"form-control areaselect\">\n <option disabled selected value=\"\">Please Select an option</option>';\n foreach($options as $option)\n {\n ?>\n <option value=\"<?= $option['id']; ?>\"><?= $option[$column]; ?></option> \n <?php\n }\n echo ' </select>\n </div>';\n}",
"public function makeSelect(){\n echo \"<select name=\\\"\" .$this->getName(). \"\\\"><br>\";\n $this->makeOptions($this->getValue());\n echo \"</select>\" ;\n }",
"function edit_columns_html($column, $post_id){\n \n switch($column){\n \n // Name\n case 'name':\n \n echo '<code style=\"font-size: 12px;\">' . $this->get_name($post_id) . '</code>';\n break;\n \n // Post ID\n case 'post_id':\n \n $p_id = get_field('post_id', $post_id);\n \n if(empty($p_id))\n $p_id = 'options';\n \n echo '<code style=\"font-size: 12px;\">' . $p_id. '</code>';\n break;\n \n // Autoload\n case 'autoload':\n \n $al = __('No');\n $autoload = get_field('autoload', $post_id);\n \n if(!empty($autoload))\n $al = __('Yes');\n \n echo $al;\n break;\n \n }\n \n }",
"function writeSelectBox ($curr_el) {\n\t\t\techo \"<tr><td width=\\\"30%\\\" align=\\\"right\\\" valign=\\\"top\\\" class=\\\"formLabel\\\">\" . $curr_el->label . \": </td><td>\";\n\t\t\tif ($curr_el->multiple)\n\t\t\t\techo \"<select name=\\\"\" . $curr_el->name . \"[]\\\" multiple style=\\\"width: 230px;\\\">\";\n\t\t\telse\n\t\t\t\techo \"<select name=\\\"\" . $curr_el->name . \"\\\">\";\n\t\t\tif ($curr_el->query != \"\") {\n\t\t\t\tif (!$curr_el->multiple)\n\t\t\t\t\techo \"<option value=\\\"-1\\\"></option>\";\n\t\t\t\t$rs = mysql_query ($curr_el->query) or die (\"ERROR: \" . mysql_error());\n\t\t\t\twhile ($row = mysql_fetch_array ($rs)) {\n\t\t\t\t\techo \"<option value=\\\"\" . $row[$curr_el->valueColumn] . \"\\\" \";\n\t\t\t\t\tif (is_array ($curr_el->value) && is_numeric (array_search($row[$curr_el->valueColumn], $curr_el->value)))\n\t\t\t\t\t\techo \"selected>\";\n\t\t\t\t\telse if (!is_array($curr_el->value) && $row[$curr_el->valueColumn] == $curr_el->value)\n\t\t\t\t\t\techo \"selected>\";\n\t\t\t\t\telse\n\t\t\t\t\t\techo \">\";\n\t\t\t\t\tfor ($j=0; $j<count($curr_el->displayColumns); $j++) {\n\t\t\t\t\t\techo $row[$curr_el->displayColumns[$j]];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</select>\";\n\t\t\tif ($curr_el->instructions != \"\")\n\t\t\t\techo \"<br><span class=\\\"forminstructions\\\">\" . $curr_el->instructions . \"</span>\";\n\t\t\techo \"</td></tr>\";\n\t\t}",
"function searchydoo_render_sort_columns($return = false){\n $component = '\n <div class=\"sort-columns-area\">\n <label for=\"orderby\">Sort By:</label>\n <select id=\"orderby\" name=\"orderby\">\n <option value=\"title\">Alphabetical</option>\n <option value=\"date\">Post Date</option>\n </select>\n </div>';\n if($return) {\n return $component;\n }\n echo $component;\n}",
"function ArrayComboBoxTd($strLable, $strName, $nSelectedVal, $arr, $bIndexValue, $callBack ='')\n\t{\n\t\techo \"\t<td valign=top>\";\n\t\techo\t\t$strLable;\n\t\techo \"\t</td>\";\n\t\techo \"\t<td>\";\n\t\techo \"\t\t<select name=$strName $callBack>\";\n\t\tComboBox($nSelectedVal, $arr, $bIndexValue);\n\t\techo \"\t\t</select>\";\n\t\techo \"\t</td>\";\n\n\t}",
"private function render_select(): string\n\t{\n\t\treturn 'SELECT ' . ($this->select ? $this->select : '*');\n\t}",
"function html_selection_list($var, $label, $items, $value = '', $table = '') {\r\n global $ORDER, $TABLE;\r\n\r\n $html = html_label($var, $label);\r\n\r\n if(is_array($items) || db_fetch($table)) {\r\n $html .= '<select name=\"' . $var . '\">' . \"\\n\";\r\n \r\n if(is_array($items)) {\r\n foreach($items as $item) {\r\n $html .= '<option value=\"' . (is_array($item) ? $item['id'] : $item) . '\"' . (($value == (is_array($item) ? $item['id'] : $item)) ? ' selected' : '') . '>' . (is_array($item) ? $item['title'] : $item) . '</option>' . \"\\n\";\r\n }\r\n }\r\n \r\n if($items = db_fetch($table, $ORDER[strtoupper($table)])) {\r\n for($i = 1; $i <= mysql_num_rows($items); $i++) {\r\n $item = mysql_fetch_array($items);\r\n $html .= '<option value=\"' . $item['id'] . '\"' . (($value == $item['id']) ? ' selected' : '') . '>';\r\n\r\n if($table == $TABLE[COMMENTS]) {\r\n $entry = db_fetch($TABLE[ENTRIES], '', $item['entry']);\r\n $section = db_fetch($TABLE[SECTIONS], '', $entry['section']);\r\n $category = db_fetch($TABLE[CATEGORIES], '', $entry['category']);\r\n $html .= ($section['title'] ? $section['title'] : '') . ': ' . ($category['title'] ? $category['title'] : '') . ': ' . ($entry['title'] ? $entry['title'] : '') . ': ' . $item['name'] . ' (' . $item['date'] . ')';\r\n } elseif($table == $TABLE[ENTRIES]) {\r\n $section = db_fetch($TABLE[SECTIONS], '', $item['section']);\r\n $category = db_fetch($TABLE[CATEGORIES], '', $item['category']);\r\n $html .= ($section['title'] ? $section['title'] : '') . ': ' . ($category['title'] ? $category['title'] : '') . ': ' . $item['title'];\r\n } elseif($table == $TABLE[SEGMENTS]) {\r\n $entry = db_fetch($TABLE[ENTRIES], '', $item['entry']);\r\n $section = db_fetch($TABLE[SECTIONS], '', $entry['section']);\r\n $category = db_fetch($TABLE[CATEGORIES], '', $entry['category']);\r\n $html .= ($section['title'] ? $section['title'] : '') . ': ' . ($category['title'] ? $category['title'] : '') . ': ' . ($entry['title'] ? $entry['title'] : '') . ': ' . $item['title'];\r\n } elseif($table == $TABLE[TEMPLETS]) {\r\n $section = db_fetch($TABLE[SECTIONS], '', $item['section']);\r\n $category = db_fetch($TABLE[CATEGORIES], '', $item['category']);\r\n $html .= strtoupper($item['class']) . ': ' . ($item['section'] ? $section['title'] . ': ' : '') . ($item['category'] ? $category['title'] . ': ' : '') . ucwords($item['type']);\r\n } else {\r\n $html .= $item['title'];\r\n }\r\n\r\n $html .= '</option>' . \"\\n\";\r\n }\r\n }\r\n \r\n $html .= '</select>';\r\n } else {\r\n $html .= '<p>None available.</p>';\r\n }\r\n\r\n return $html . \"\\n\";\r\n}",
"function getSecondaryColumns_AdvFilterHTML($module,$selected=\"\")\n{\n global $ogReport;\n\tglobal $app_list_strings;\n global $current_language;\n\n if($module != \"\")\n {\n \t$secmodule = explode(\":\",$module);\n \tfor($i=0;$i < count($secmodule) ;$i++)\n \t{\n $mod_strings = return_module_language($current_language,$secmodule[$i]);\n if(vtlib_isModuleActive($secmodule[$i])){\n\t\t\t\t$block_listed = array();\n\t\t\t\tforeach($ogReport->module_list[$secmodule[$i]] as $key=>$value)\n {\n\t\t\t\t\tif(isset($ogReport->sec_module_columnslist[$secmodule[$i]][$value]) && !$block_listed[$value])\n\t\t\t\t\t{\n\t\t\t\t\t\t$block_listed[$value] = true;\n \t\t $shtml .= \"<optgroup label=\\\"\".$app_list_strings['moduleList'][$secmodule[$i]].\" \".getTranslatedString($value).\"\\\" class=\\\"select\\\" style=\\\"border:none\\\">\";\n\t\t\t\t\t\t foreach($ogReport->sec_module_columnslist[$secmodule[$i]][$value] as $field=>$fieldlabel)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\tif(isset($mod_strings[$fieldlabel]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($selected == $field)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$shtml .= \"<option selected value=\\\"\".$field.\"\\\">\".$mod_strings[$fieldlabel].\"</option>\";\n\t\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$shtml .= \"<option value=\\\"\".$field.\"\\\">\".$mod_strings[$fieldlabel].\"</option>\";\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{\n\t\t\t\t\t\t\t\tif($selected == $field)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$shtml .= \"<option selected value=\\\"\".$field.\"\\\">\".$fieldlabel.\"</option>\";\n\t\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$shtml .= \"<option value=\\\"\".$field.\"\\\">\".$fieldlabel.\"</option>\";\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 }\n }\n \t}\n }\n return $shtml;\n}",
"public function ajax_dropdown(){\n\t\t$output = $this->html->DropDown('raid_eventid', $this->pdh->aget('event', 'name', 0, array($this->pdh->get('event', 'id_list'))), $this->in->get('raidevent_id', 0), '', '', 'input resettemplate_input', 'input_eventid');\n\t\techo($output);\n\t\texit;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reset session. Sets _SESSION to empty array. | public function resetSession()
{
$_SESSION = [];
$_SESSION['active'] = false;
} | [
"public function reset() {\n if ($this->_active) {\n $_SESSION = array();\n }\n }",
"public function clearAll()\n {\n $_SESSION = [];\n }",
"public function reset() {\n $this->papaya()->session->setValue($this->_sessionIdentifier, NULL);\n }",
"public function destrySessions()\n\t\t{\n\t\t\t$_SESSION = [];\n\t\t}",
"public function clear() {\n\t\tforeach ( array_keys ( $_SESSION ) as $key )\n\t\t\tunset ( $_SESSION [$key] );\n\t}",
"function resetSession()\n {\n session_destroy();\n $this->sessionCookieDelete();\n $this->loggedIn = false;\n $this->cookie = null;\n $this->init();\n }",
"public function clearSession();",
"protected function reset_session()\n\t{\n\t\tif($_SESSION['style_edit_mode'] !== 'edit')\n\t\t{\n\t\t\txtc_session_destroy();\n\t\t}\n\n\t\tunset($_SESSION['customer_id']);\n\t\tunset($_SESSION['customer_default_address_id']);\n\t\tunset($_SESSION['customer_first_name']);\n\t\tunset($_SESSION['customer_country_id']);\n\t\tunset($_SESSION['customer_zone_id']);\n\t\tunset($_SESSION['comments']);\n\t\tunset($_SESSION['user_info']);\n\t\tunset($_SESSION['customers_status']);\n\t\tunset($_SESSION['selected_box']);\n\t\tunset($_SESSION['shipping']);\n\t\tunset($_SESSION['payment']);\n\t\tunset($_SESSION['ccard']);\n\n\t\t// GV Code Start\n\t\tunset($_SESSION['gv_id']);\n\t\tunset($_SESSION['cc_id']);\n\t\t// GV Code End\n\n\t\t$_SESSION['cart']->reset();\n\n\t\t// write customers status guest in session again\n\t\trequire(DIR_WS_INCLUDES . 'write_customers_status.php');\n\t}",
"public function reset()\n {\n unset($_SESSION['aesKey']);\n $this->createSessionKeys(); \n }",
"public static function reset()\n {\n self::$messages = array();\n if (isset($_SESSION[self::SESSION_NAME])) {\n unset($_SESSION[self::SESSION_NAME]);\n }\n }",
"function resetSession(&$session)\r\n {\r\n $session['user']=\"\";\r\n $session['failLogin']=0;\r\n }",
"public function unset_sessions(){\n\n\t\t$array_items = array('excel_data_array',\n\t\t\t\t'template_col_list_array',\n\t\t\t\t'up_file_col_list_array');\n\n\t\t$this->session->unset_userdata($array_items);\n\n\t\tsession_destroy();\n\n\t}",
"public function clear()\n {\n $this->data = [];\n $_SESSION = [];\n }",
"protected function clearSessionData()\n\t{\n\t\t$this->sessionData = array();\n \n\t\t$GLOBALS[ 'TSFE' ]->fe_user->setKey( 'ses', $this->sessionDataStorageKey, $this->sessionData );\n\t\t$GLOBALS[ 'TSFE' ]->fe_user->storeSessionData();\n\t}",
"protected function clearSessionValues()\n {\n unset($_SESSION[static::PHPCAS_SESSION_PREFIX]);\n }",
"public function clearSessionData()\n {\n foreach ($_SESSION as $key => $value) {\n unset($_SESSION[$key]);\n }\n }",
"public function emptySession() {\n\t\t$this->_EmptyCurrentSession();\n\t\t$this->newSession(FALSE);\n\t}",
"public function unsetAllSession()\n {\n $_SESSION=array();\n session_destroy();\n }",
"public function unsetAll() \r\n {\r\n session_unset();\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get data current score from getCurrentScore function with condition user_id session from user login | public function getCurrentScore()
{
return DB::table('scores')
->select('score','current_page')
->where('user_id', Auth::user()->id)
->first();
} | [
"function get_user_score(){\r\n $cat_id = $this->input->post('cat_id');\r\n if(!isset($_SESSION['user_id']) || !isset($cat_id) || $cat_id > 4 || $cat_id < -1){ echo -1; return;}\r\n $_SESSION['current_category_id'] = $cat_id = ($cat_id != -1)? $cat_id : $_SESSION['current_category_id'];\r\n // Get category name and refresh session variable\r\n $_SESSION['current_category_name'] = $cat_name = $this->category_model->get_category_name_by_id($cat_id);\r\n // Get user_category score\r\n $score = $this->scoreboard_model->get_user_category_score($cat_id,$_SESSION['user_id'])->row()->score;\r\n log_message('error','mo7eb get_user_score cat_id='.$cat_id.' user_id = '.$_SESSION['user_id'].' score = '.$score);\r\n echo $score;\r\n }",
"public function authUserScore() {\n\t\treturn $this->hasOne(Score::class)->where('user_id', Auth::id())->withDefault([\n\t\t\t'user_id' => Auth::id(),\n\t\t\t'card_id' => $this->id,\n\t\t]);\n\t}",
"protected function get_activity_score() {\n global $USER;\n }",
"function get_user_score() \n\t{\n\t\t$this->load->model('frontendmodel');\n\n\t\t$arrResult = $this->frontendmodel->FetchResult();\n\n\t\t$intCounter = 0;\n\n\t\tforeach ($arrResult as $key => $value) \n\t\t{\n\t\t\tif($value['result'] && $value['includeinscoring'])\n\t\t\t{\n\t\t\t\t$intCounter = $intCounter + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $intCounter;\n\t}",
"function _get_current_score($exsting_exam_data){\r\n\t\t\tif($exsting_exam_data){\r\n\t\t\t\t$score\t= 0;\r\n\t\t\t\t$question_answers\t=\t$this->session->userdata ('QUESTIONANSWER');\t\t\t\t\r\n\t\t\t\tforeach($exsting_exam_data as $question_id => $exam_data){\r\n\t\t\t\t\tif(isset($exam_data['option_id']) && $exam_data['option_id'] == $question_answers[$question_id]){\r\n\t\t\t\t\t\t$score++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn $score;\r\n\t\t\t}\r\n\t\t}",
"public function get_score($user_id) {\n global $connection;\n\n $user_id_param = $connection->escape_string($user_id);\n $sql = \"SELECT * FROM `users` WHERE `user_id`='$user_id_param'\";\n\n $result = $this->query($sql);\n\n foreach ($result as $user) {\n $user_object = new stdClass();\n $user_object->score = (int)($user['score']);\n return $user_object;\n }\n return FALSE;\n }",
"function get_bank_breaker_score(){\r\n global $res;\r\n $con = db_connect();\r\n session_start();\r\n\r\n $checkScore = $con->prepare(Query::CHECK_HIGH_SCORE);\r\n $checkScore->execute(array(\r\n ':user_id' => $_SESSION['user_id']\r\n ));\r\n $res = $checkScore->fetch();\r\n session_write_close();\r\n }",
"private function getScores() {\n $currentScore = $this->database->query(\"SELECT * FROM score LIMIT 0,1\")->fetch(PDO::FETCH_ASSOC);\n return $currentScore;\n }",
"public static function getScoreReading($id_session,$id_utilisateur)\n\t{\n\t\t$score_l = 0;\n\t\tfor($i=5;$i<=7;$i++){\n\t\t\t$score = DB::table('resultatsouspartie')\n\t \t\t\t->where('idUtilisateur',$id_utilisateur)\n\t \t\t\t->where('idSession',$id_session)\n\t \t\t\t->where('idSousPartie',$i)\n\t \t\t\t->pluck('scoreSousPartie');\n\t \t\t$score_l += $score[0];\n\t\t}\n\n\t\tif($score_l<=15){\n\t\t\t$score_read=5;\n\t\t} elseif ($score_l==16) {\n\t\t\t$score_read=10;\n\t\t} elseif ($score_l==17) {\n\t\t\t$score_read=15;\n\t\t} elseif ($score_l==18) {\n\t\t\t$score_read=20;\n\t\t} elseif ($score_l==19) {\n\t\t\t$score_read=25;\n\t\t} elseif ($score_l==20) {\n\t\t\t$score_read=30;\n\t\t} elseif ($score_l==21) {\n\t\t\t$score_read=35;\n\t\t} elseif ($score_l==22) {\n\t\t\t$score_read=40;\n\t\t} elseif ($score_l==23) {\n\t\t\t$score_read=45;\n\t\t} elseif ($score_l==24) {\n\t\t\t$score_read=50;\n\t\t} elseif ($score_l==25) {\n\t\t\t$score_read=60;\n\t\t} elseif ($score_l==26) {\n\t\t\t$score_read=65;\n\t\t} elseif ($score_l==27) {\n\t\t\t$score_read=70;\n\t\t} elseif ($score_l==28) {\n\t\t\t$score_read=80;\n\t\t} elseif ($score_l==29) {\n\t\t\t$score_read=85;\n\t\t} elseif ($score_l==30) {\n\t\t\t$score_read=90;\n\t\t} elseif ($score_l==31) {\n\t\t\t$score_read=95;\n\t\t} elseif ($score_l==32) {\n\t\t\t$score_read=100;\n\t\t} elseif ($score_l==33) {\n\t\t\t$score_read=110;\n\t\t} elseif ($score_l==34) {\n\t\t\t$score_read=115;\n\t\t} elseif ($score_l==35) {\n\t\t\t$score_read=120;\n\t\t} elseif ($score_l==36) {\n\t\t\t$score_read=125;\n\t\t} elseif ($score_l==37) {\n\t\t\t$score_read=130;\n\t\t} elseif ($score_l==38) {\n\t\t\t$score_read=140;\n\t\t} elseif ($score_l==39) {\n\t\t\t$score_read=145;\n\t\t} elseif ($score_l==40) {\n\t\t\t$score_read=150;\n\t\t} elseif ($score_l==41) {\n\t\t\t$score_read=160;\n\t\t} elseif ($score_l==42) {\n\t\t\t$score_read=165;\n\t\t} elseif ($score_l==43) {\n\t\t\t$score_read=170;\n\t\t} elseif ($score_l==44) {\n\t\t\t$score_read=175;\n\t\t} elseif ($score_l==45) {\n\t\t\t$score_read=180;\n\t\t} elseif ($score_l==46) {\n\t\t\t$score_read=190;\n\t\t} elseif ($score_l==47) {\n\t\t\t$score_read=195;\n\t\t} elseif ($score_l==48) {\n\t\t\t$score_read=200;\n\t\t} elseif ($score_l==49) {\n\t\t\t$score_read=210;\n\t\t} elseif ($score_l==50) {\n\t\t\t$score_read=215;\n\t\t} elseif ($score_l==51) {\n\t\t\t$score_read=220;\n\t\t} elseif ($score_l==52) {\n\t\t\t$score_read=225;\n\t\t} elseif ($score_l==53) {\n\t\t\t$score_read=230;\n\t\t} elseif ($score_l==54) {\n\t\t\t$score_read=235;\n\t\t} elseif ($score_l==55) {\n\t\t\t$score_read=240;\n\t\t} elseif ($score_l==56) {\n\t\t\t$score_read=250;\n\t\t} elseif ($score_l==57) {\n\t\t\t$score_read=255;\n\t\t} elseif ($score_l==58) {\n\t\t\t$score_read=260;\n\t\t} elseif ($score_l==59) {\n\t\t\t$score_read=265;\n\t\t} elseif ($score_l==60) {\n\t\t\t$score_read=270;\n\t\t} elseif ($score_l==61) {\n\t\t\t$score_read=280;\n\t\t} elseif ($score_l==62) {\n\t\t\t$score_read=285;\n\t\t} elseif ($score_l==63) {\n\t\t\t$score_read=290;\n\t\t} elseif ($score_l==64) {\n\t\t\t$score_read=300;\n\t\t} elseif ($score_l==65) {\n\t\t\t$score_read=305;\n\t\t} elseif ($score_l==66) {\n\t\t\t$score_read=310;\n\t\t} elseif ($score_l==67) {\n\t\t\t$score_read=320;\n\t\t} elseif ($score_l==68) {\n\t\t\t$score_read=325;\n\t\t} elseif ($score_l==69) {\n\t\t\t$score_read=330;\n\t\t} elseif ($score_l==70) {\n\t\t\t$score_read=335;\n\t\t} elseif ($score_l==71) {\n\t\t\t$score_read=340;\n\t\t} elseif ($score_l==72) {\n\t\t\t$score_read=350;\n\t\t} elseif ($score_l==73) {\n\t\t\t$score_read=355;\n\t\t} elseif ($score_l==74) {\n\t\t\t$score_read=360;\n\t\t} elseif ($score_l==75) {\n\t\t\t$score_read=365;\n\t\t} elseif ($score_l==76) {\n\t\t\t$score_read=370;\n\t\t} elseif ($score_l==77) {\n\t\t\t$score_read=380;\n\t\t} elseif ($score_l==78) {\n\t\t\t$score_read=385;\n\t\t} elseif ($score_l==79) {\n\t\t\t$score_read=390;\n\t\t} elseif ($score_l==80) {\n\t\t\t$score_read=395;\n\t\t} elseif ($score_l==81) {\n\t\t\t$score_read=400;\n\t\t} elseif ($score_l==82) {\n\t\t\t$score_read=405;\n\t\t} elseif ($score_l==83) {\n\t\t\t$score_read=410;\n\t\t} elseif ($score_l==84) {\n\t\t\t$score_read=415;\n\t\t} elseif ($score_l==85) {\n\t\t\t$score_read=420;\n\t\t} elseif ($score_l==86) {\n\t\t\t$score_read=425;\n\t\t} elseif ($score_l==87) {\n\t\t\t$score_read=430;\n\t\t} elseif ($score_l==88) {\n\t\t\t$score_read=435;\n\t\t} elseif ($score_l==89) {\n\t\t\t$score_read=445;\n\t\t} elseif ($score_l==90) {\n\t\t\t$score_read=450;\n\t\t} elseif ($score_l==91) {\n\t\t\t$score_read=455;\n\t\t} elseif ($score_l==92) {\n\t\t\t$score_read=465;\n\t\t} elseif ($score_l==93) {\n\t\t\t$score_read=470;\n\t\t} elseif ($score_l==94) {\n\t\t\t$score_read=480;\n\t\t} elseif ($score_l==95) {\n\t\t\t$score_read=485;\n\t\t} elseif ($score_l==96) {\n\t\t\t$score_read=490;\n\t\t} else {\n\t\t\t$score_read=495;\n\t\t} \n\t\t\n\t \treturn $score_read;\n\t}",
"public function getScore();",
"public function getLevel($id)\n\t {\n\t \t$query = $this->db->query(\"SELECT score \n\t\t\t\t\t\t\t\t FROM user_registered\n\t\t\t\t\t\t\t\t WHERE email = '$id'\");\n\t \treturn $query->result();\n\t }",
"public function FetchClassScore(){\n if (isset($this->session->userdata['Admin_login'])) {\n\n\t\t\t$data['classid'] = $this->input->post('classid');\n\t\t\t$data['moduleid'] = $this->input->post('moduleid');\n\n\t\t\t$query = $this->Home_model->FetchClassScore($data);\n\n\t\t\tif ($query == false) {\n\t\t\t\t$response['error'] = false;\n\t\t\t\t$response['message'] = $query;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$response['error'] = true;\n\t\t\t\t$response['message'] = 'No score found for this module';\n\t\t\t}\n\t\t\t\n }\n\n\t }",
"public function scoreAction(){\n if(isset($_COOKIE['player_id']) && isset($_COOKIE['level_id']) && isset($_COOKIE['score'])){\n \n // we need to find the level name\n $levelModel = new Level();\n $levelId = $_COOKIE[\"level_id\"];\n $levels = $levelModel->findAllByLevelId($levelId);\n $levelName = $levels[0]['name'];\n \n // here we need to extract the scores from the DB for a specific level id\n $scoreModel = new Scores();\n $scoreModel->getCookies();\n $scoreModel->insertScoreInDB();\n $scoreData = $scoreModel->findScoreByLevelId($levelId);\n\n $viewVars = [\n 'title' => 'Scores page',\n 'url' => '/scores',\n 'score_data' => $scoreData,\n 'level_name' => $levelName\n ];\n $this->show('scores', $viewVars);\n }\n else {\n // we display a 404 page\n header(\"HTTP/1.0 404 Not Found\");\n echo 'Error 404 : You need to insert your name and play at least once before being able to access the scores page.';\n exit();\n }\n }",
"public function getYourScores(){\n\t\t$nickname = $_SESSION['nickname'];\n\t\t$sql = \"SELECT score FROM scores WHERE nickname = '\".$nickname.\"' ORDER BY score ASC LIMIT 20\";\n\t\t$data = $this->db->query($sql);\n\t\treturn $data->fetchAll();\n\t}",
"public function calculate_score($id)\n\t{\n\n\t\t$counts = $this->encounter->select([\n\t\t\t\\DB::raw('count(*) as users_encountered_auth_user'),\n\t\t\t\\DB::raw('count(IF(likes=1,1,null)) as users_liked_auth_user') \n\t\t])->where('user2', $id)->first()->toArray();\n\n\t\t$score = ($counts['users_encountered_auth_user'] == 0) \n\t\t\t\t\t? 0 \n\t\t\t\t\t: (($counts['users_liked_auth_user'] / $counts['users_encountered_auth_user']) * 10); \n\n\t\t$obj = new stdClass;\n\t\t$obj->score = $score;\n\t\t$obj->likes = $counts['users_liked_auth_user'];\n\t\t$obj->dislikes = $counts['users_encountered_auth_user'] - $counts['users_liked_auth_user'];\n\n\t\treturn $obj;\n\t}",
"function get_score_by_customer_id($id){\n $this->db->where('id',$id);\n $this->db->select('total_score');\n $result = $this->db->get('rtm_customer_info')->result_array();\n if(isset($result) && count($result))\n return $result[0]['total_score'];\n else\n return 0;\n }",
"public function get_user_score($user_id, $attendance_id, $groupId = null)\n {\n $tbl_attendance_result \t= Database::get_course_table(TABLE_ATTENDANCE_RESULT);\n $tbl_attendance_sheet = Database::get_course_table(TABLE_ATTENDANCE_SHEET);\n $tbl_attendance_cal_rel_group = Database::get_course_table(TABLE_ATTENDANCE_CALENDAR_REL_GROUP);\n $tbl_attendance_cal = Database::get_course_table(TABLE_ATTENDANCE_CALENDAR);\n $user_id = intval($user_id);\n $attendance_id = intval($attendance_id);\n $course_id = api_get_course_int_id();\n if (empty($groupId)) {\n $sql = \"SELECT score FROM $tbl_attendance_result\n WHERE\n c_id = $course_id AND\n user_id='$user_id' AND\n attendance_id='$attendance_id'\";\n } else {\n $sql = \"SELECT count(presence) as score FROM $tbl_attendance_sheet\n WHERE\n c_id = $course_id AND\n user_id='$user_id' AND\n presence = 1 AND\n attendance_calendar_id IN (\n SELECT calendar_id FROM $tbl_attendance_cal_rel_group crg\n INNER JOIN $tbl_attendance_cal c\n ON (crg.calendar_id = c.id)\n WHERE\n crg.c_id = $course_id AND\n crg.group_id = $groupId AND\n c.attendance_id = $attendance_id\n )\n \";\n }\n $rs = Database::query($sql);\n $score = 0;\n if (Database::num_rows($rs) > 0) {\n $row = Database::fetch_array($rs);\n $score = $row['score'];\n }\n\n return $score;\n }",
"function update_score($user_ID, $score){\n\tglobal $mysqli;\n\t$query = \"UPDATE Users SET `Latest Session Score`=? WHERE ID=?\";\n\t$stmt = $mysqli->prepare($query);\n\t$stmt->bind_param(\"di\", $score, $user_ID);\n\t$result = $stmt->execute();\n\t$stmt->close();\n\treturn $result;\n}",
"public function getByProfileScore()\n {\n return $this->tutor\n ->live()\n ->whereHas('profile', function($q) {\n $q->where('quality', '!=', '0');\n })\n ->select('users.*', $this->database->raw(\"(\n select `profile_score`\n from `user_profiles`\n where `user_profiles`.`user_id` = `users`.`id`\n ) as `profile_score`\"))\n ->orderBy('profile_score')\n ->takePage($this->page, $this->perPage)\n ->get();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation getVariableInstanceAsync Get Variable Instance | public function getVariableInstanceAsync($id, $deserialize_value = null)
{
return $this->getVariableInstanceAsyncWithHttpInfo($id, $deserialize_value)
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function get($id)\n {\n return $this->getApi()\n ->execute(\"variable-instance/{$id}\");\n }",
"final public function GetVar() {\n\n return $this->\n connection->\n GetVar($this->\n Generate());\n }",
"public function getSingleProcessVariable() {\n $pi = self::$pis->getInstances(new ProcessInstanceRequest())->instance_0;\n\n $piv = new VariableRequest();\n $piv->setValue('testValue')->setType('String');\n self::$pis->putProcessVariable($pi->getId(),'testVariable', $piv);\n\n $this->assertNotEmpty(self::$pis->getProcessVariables($pi->getId()));\n $this->assertEquals('testValue', self::$pis->getProcessVariable($pi->getId(), 'testVariable')->getValue());\n\n self::$pis->deleteProcessVariable($pi->getId(), 'testVariable');\n }",
"public function getVariableInstancesRequest($variable_name = null, $variable_name_like = null, $process_instance_id_in = null, $execution_id_in = null, $case_instance_id_in = null, $case_execution_id_in = null, $task_id_in = null, $batch_id_in = null, $activity_instance_id_in = null, $tenant_id_in = null, $variable_values = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null, $deserialize_values = null)\n {\n\n $resourcePath = '/variable-instance';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($variable_name !== null) {\n if('form' === 'form' && is_array($variable_name)) {\n foreach($variable_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableName'] = $variable_name;\n }\n }\n // query params\n if ($variable_name_like !== null) {\n if('form' === 'form' && is_array($variable_name_like)) {\n foreach($variable_name_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNameLike'] = $variable_name_like;\n }\n }\n // query params\n if ($process_instance_id_in !== null) {\n if('form' === 'form' && is_array($process_instance_id_in)) {\n foreach($process_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceIdIn'] = $process_instance_id_in;\n }\n }\n // query params\n if ($execution_id_in !== null) {\n if('form' === 'form' && is_array($execution_id_in)) {\n foreach($execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['executionIdIn'] = $execution_id_in;\n }\n }\n // query params\n if ($case_instance_id_in !== null) {\n if('form' === 'form' && is_array($case_instance_id_in)) {\n foreach($case_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseInstanceIdIn'] = $case_instance_id_in;\n }\n }\n // query params\n if ($case_execution_id_in !== null) {\n if('form' === 'form' && is_array($case_execution_id_in)) {\n foreach($case_execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseExecutionIdIn'] = $case_execution_id_in;\n }\n }\n // query params\n if ($task_id_in !== null) {\n if('form' === 'form' && is_array($task_id_in)) {\n foreach($task_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['taskIdIn'] = $task_id_in;\n }\n }\n // query params\n if ($batch_id_in !== null) {\n if('form' === 'form' && is_array($batch_id_in)) {\n foreach($batch_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['batchIdIn'] = $batch_id_in;\n }\n }\n // query params\n if ($activity_instance_id_in !== null) {\n if('form' === 'form' && is_array($activity_instance_id_in)) {\n foreach($activity_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['activityInstanceIdIn'] = $activity_instance_id_in;\n }\n }\n // query params\n if ($tenant_id_in !== null) {\n if('form' === 'form' && is_array($tenant_id_in)) {\n foreach($tenant_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['tenantIdIn'] = $tenant_id_in;\n }\n }\n // query params\n if ($variable_values !== null) {\n if('form' === 'form' && is_array($variable_values)) {\n foreach($variable_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValues'] = $variable_values;\n }\n }\n // query params\n if ($variable_names_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_names_ignore_case)) {\n foreach($variable_names_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNamesIgnoreCase'] = $variable_names_ignore_case;\n }\n }\n // query params\n if ($variable_values_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_values_ignore_case)) {\n foreach($variable_values_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValuesIgnoreCase'] = $variable_values_ignore_case;\n }\n }\n // query params\n if ($sort_by !== null) {\n if('form' === 'form' && is_array($sort_by)) {\n foreach($sort_by as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortBy'] = $sort_by;\n }\n }\n // query params\n if ($sort_order !== null) {\n if('form' === 'form' && is_array($sort_order)) {\n foreach($sort_order as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortOrder'] = $sort_order;\n }\n }\n // query params\n if ($first_result !== null) {\n if('form' === 'form' && is_array($first_result)) {\n foreach($first_result as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstResult'] = $first_result;\n }\n }\n // query params\n if ($max_results !== null) {\n if('form' === 'form' && is_array($max_results)) {\n foreach($max_results as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['maxResults'] = $max_results;\n }\n }\n // query params\n if ($deserialize_values !== null) {\n if('form' === 'form' && is_array($deserialize_values)) {\n foreach($deserialize_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValues'] = $deserialize_values;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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 }",
"public function queryVariableInstancesAsyncWithHttpInfo($body = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\DataResponse';\n $request = $this->queryVariableInstancesRequest($body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\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 function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function getVariableInstancesWithHttpInfo($variable_name = null, $variable_name_like = null, $process_instance_id_in = null, $execution_id_in = null, $case_instance_id_in = null, $case_execution_id_in = null, $task_id_in = null, $batch_id_in = null, $activity_instance_id_in = null, $tenant_id_in = null, $variable_values = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null, $deserialize_values = null)\n {\n $request = $this->getVariableInstancesRequest($variable_name, $variable_name_like, $process_instance_id_in, $execution_id_in, $case_instance_id_in, $case_execution_id_in, $task_id_in, $batch_id_in, $activity_instance_id_in, $tenant_id_in, $variable_values, $variable_names_ignore_case, $variable_values_ignore_case, $sort_by, $sort_order, $first_result, $max_results, $deserialize_values);\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 (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : 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 (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\VariableInstanceDto[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\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 '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getVariableValue()\n {\n return $this->readOneof(2);\n }",
"public function getVariableInstanceWithHttpInfo($id, $deserialize_value = null)\n {\n $request = $this->getVariableInstanceRequest($id, $deserialize_value);\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 (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : 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 (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\VariableInstanceDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\VariableInstanceDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 404:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\VariableInstanceDto';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\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 '\\OpenAPI\\Client\\Model\\VariableInstanceDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getVariableInstanceRequest($id, $deserialize_value = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling getVariableInstance'\n );\n }\n\n $resourcePath = '/variable-instance/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($deserialize_value !== null) {\n if('form' === 'form' && is_array($deserialize_value)) {\n foreach($deserialize_value as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValue'] = $deserialize_value;\n }\n }\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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 }",
"public function createVariableInstanceQuery(): VariableInstanceQueryInterface;",
"public function queryVariableInstancesAsyncWithHttpInfo($first_result = null, $max_results = null, $deserialize_values = null, $variable_instance_query_dto = null)\n {\n $returnType = '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]';\n $request = $this->queryVariableInstancesRequest($first_result, $max_results, $deserialize_values, $variable_instance_query_dto);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"protected function createGetVariable(){\n\t\treturn new \\GetVariable();\n\t}",
"public function getHistoricVariableInstancesRequest($variable_name = null, $variable_name_like = null, $variable_value = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null, $variable_type_in = null, $include_deleted = null, $process_instance_id = null, $process_instance_id_in = null, $process_definition_id = null, $process_definition_key = null, $execution_id_in = null, $case_instance_id = null, $case_execution_id_in = null, $case_activity_id_in = null, $task_id_in = null, $activity_instance_id_in = null, $tenant_id_in = null, $without_tenant_id = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null, $deserialize_values = null)\n {\n\n $resourcePath = '/history/variable-instance';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($variable_name !== null) {\n if('form' === 'form' && is_array($variable_name)) {\n foreach($variable_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableName'] = $variable_name;\n }\n }\n // query params\n if ($variable_name_like !== null) {\n if('form' === 'form' && is_array($variable_name_like)) {\n foreach($variable_name_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNameLike'] = $variable_name_like;\n }\n }\n // query params\n if ($variable_value !== null) {\n if('form' === 'form' && is_array($variable_value)) {\n foreach($variable_value as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValue'] = $variable_value;\n }\n }\n // query params\n if ($variable_names_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_names_ignore_case)) {\n foreach($variable_names_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNamesIgnoreCase'] = $variable_names_ignore_case;\n }\n }\n // query params\n if ($variable_values_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_values_ignore_case)) {\n foreach($variable_values_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValuesIgnoreCase'] = $variable_values_ignore_case;\n }\n }\n // query params\n if ($variable_type_in !== null) {\n if('form' === 'form' && is_array($variable_type_in)) {\n foreach($variable_type_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableTypeIn'] = $variable_type_in;\n }\n }\n // query params\n if ($include_deleted !== null) {\n if('form' === 'form' && is_array($include_deleted)) {\n foreach($include_deleted as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['includeDeleted'] = $include_deleted;\n }\n }\n // query params\n if ($process_instance_id !== null) {\n if('form' === 'form' && is_array($process_instance_id)) {\n foreach($process_instance_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceId'] = $process_instance_id;\n }\n }\n // query params\n if ($process_instance_id_in !== null) {\n if('form' === 'form' && is_array($process_instance_id_in)) {\n foreach($process_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceIdIn'] = $process_instance_id_in;\n }\n }\n // query params\n if ($process_definition_id !== null) {\n if('form' === 'form' && is_array($process_definition_id)) {\n foreach($process_definition_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processDefinitionId'] = $process_definition_id;\n }\n }\n // query params\n if ($process_definition_key !== null) {\n if('form' === 'form' && is_array($process_definition_key)) {\n foreach($process_definition_key as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processDefinitionKey'] = $process_definition_key;\n }\n }\n // query params\n if ($execution_id_in !== null) {\n if('form' === 'form' && is_array($execution_id_in)) {\n foreach($execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['executionIdIn'] = $execution_id_in;\n }\n }\n // query params\n if ($case_instance_id !== null) {\n if('form' === 'form' && is_array($case_instance_id)) {\n foreach($case_instance_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseInstanceId'] = $case_instance_id;\n }\n }\n // query params\n if ($case_execution_id_in !== null) {\n if('form' === 'form' && is_array($case_execution_id_in)) {\n foreach($case_execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseExecutionIdIn'] = $case_execution_id_in;\n }\n }\n // query params\n if ($case_activity_id_in !== null) {\n if('form' === 'form' && is_array($case_activity_id_in)) {\n foreach($case_activity_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseActivityIdIn'] = $case_activity_id_in;\n }\n }\n // query params\n if ($task_id_in !== null) {\n if('form' === 'form' && is_array($task_id_in)) {\n foreach($task_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['taskIdIn'] = $task_id_in;\n }\n }\n // query params\n if ($activity_instance_id_in !== null) {\n if('form' === 'form' && is_array($activity_instance_id_in)) {\n foreach($activity_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['activityInstanceIdIn'] = $activity_instance_id_in;\n }\n }\n // query params\n if ($tenant_id_in !== null) {\n if('form' === 'form' && is_array($tenant_id_in)) {\n foreach($tenant_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['tenantIdIn'] = $tenant_id_in;\n }\n }\n // query params\n if ($without_tenant_id !== null) {\n if('form' === 'form' && is_array($without_tenant_id)) {\n foreach($without_tenant_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['withoutTenantId'] = $without_tenant_id;\n }\n }\n // query params\n if ($sort_by !== null) {\n if('form' === 'form' && is_array($sort_by)) {\n foreach($sort_by as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortBy'] = $sort_by;\n }\n }\n // query params\n if ($sort_order !== null) {\n if('form' === 'form' && is_array($sort_order)) {\n foreach($sort_order as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortOrder'] = $sort_order;\n }\n }\n // query params\n if ($first_result !== null) {\n if('form' === 'form' && is_array($first_result)) {\n foreach($first_result as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstResult'] = $first_result;\n }\n }\n // query params\n if ($max_results !== null) {\n if('form' === 'form' && is_array($max_results)) {\n foreach($max_results as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['maxResults'] = $max_results;\n }\n }\n // query params\n if ($deserialize_values !== null) {\n if('form' === 'form' && is_array($deserialize_values)) {\n foreach($deserialize_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValues'] = $deserialize_values;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\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 }",
"public function getVariable()\n {\n return $this->readOneof(10);\n }",
"public function getVariableInstanceBinaryAsyncWithHttpInfo($id)\n {\n $returnType = '\\SplFileObject';\n $request = $this->getVariableInstanceBinaryRequest($id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }",
"public function getVariable(): Variable\n {\n return new Variable($this->variables->top()->getVar());\n }",
"public function queryVariableInstancesWithHttpInfo($body = null)\n {\n $returnType = '\\Swagger\\Client\\Model\\DataResponse';\n $request = $this->queryVariableInstancesRequest($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()->getBody()->getContents()\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 '\\Swagger\\Client\\Model\\DataResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function getInstanceValue()\n {\n $value = $this->getValue();\n if (\n is_array($value) &&\n array_key_exists($this->instances, $this->value)\n ) {\n $value = $value[$this->instances];\n }\n return $value;\n }",
"public function getTheBinaryDataForHistoricTaskInstanceVariable($varInstanceId) {\n $requestBody = null;\n $inputArray = ['varInstanceId' => $varInstanceId];\n $ret = $this->fetch('GET', 'history/historic-variable-instances/{varInstanceId}/data', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates the variable instance was found and the requested variable data is returned.',\n 404 => 'Indicates the requested variable instance was not found or the variable instance doesn\\'t have a variable with the given name or the variable doesn\\'t have a binary stream available. Status message provides additional information.',\n ));\n return $ret;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the IDs of this object's children | public function getChildIds()
{
return $this->childIds;
} | [
"public function getChildrenIds()\n {\n return array_map(\n function ($value) {\n return $value->getId();\n }, $this->children\n );\n }",
"public function getChildrenIds()\n {\n $this->children = array();\n $this->getChildren($this->resource);\n\n /* prepare children ids for invokeEvents */\n $childrenIds = array();\n /** @var modResource $child */\n foreach ($this->children as $child) {\n $childrenIds[] = $child->get('id');\n }\n return $childrenIds;\n }",
"public function get_child_ids() {\n $childids = array();\n foreach ($this->items as $child) {\n $childids[] = $child->id;\n }\n return $childids;\n }",
"function getChildrenIds(){\n\t\treturn array_keys($this->_children);\n\t}",
"public function getRecursiveChildrenIds()\n {\n $children = array_map(\n function ($element) {\n return $element->getId();\n }, $this->getRecursiveChildren()\n );\n\n return $children;\n }",
"public function getChildIds()\n {\n if (array_key_exists(\"childIds\", $this->_propDict)) {\n return $this->_propDict[\"childIds\"];\n } else {\n return null;\n }\n }",
"public function getContainerChildrenIds() : array\n {\n return $this->container_children_ids;\n }",
"public function getFolderChildrenIds() : array\n {\n return $this->getContainerChildrenIds();\n }",
"public static function accessibleChildren() {\n return Arr::pluck(Caretaker::where('user_id', Auth::id())->get(), 'child_id');\n }",
"public function getParentIds()\n {\n /** @var ActiveRecord $owner */\n $owner = $this->owner;\n $ids = explode( $this->delimiter , $owner->{$this->pathAttribute});\n array_pop($ids);\n foreach ($ids as &$id) { $id = (int)$id; }\n return $ids;\n }",
"function getParentIds()\n {\n return array_diff($this->getPathIds(), [$this->getId()]);\n }",
"public function getter_children();",
"function getObjectIDs() {\n\t\t$tmp = array();\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$tmp[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\t\treturn $tmp;\n\t}",
"public function get_all_children() {\n $children = array();\n if (isset($this->children)) {\n if (isset($this->children->items)) {\n foreach ($this->children->items as $item) {\n $children[] = $item->id;\n $children = array_merge($children, $item->get_all_children());\n }\n }\n }\n return $children;\n }",
"public function getObjectIds() {\n\t\treturn $this->objectIds;\n\t}",
"public function getParentIdsByChild($id);",
"public function parentIds(): array\n {\n $this->queryVars['number'] = $this->queryVars['number'] ?? 0;\n $this->queryVars['fields'] = 'id=>parent';\n $this->queryVars['no_found_rows'] = true;\n\n return $this->runQuery()->get_terms();\n }",
"public function get_children() {\n $this->load();\n return $this->children;\n }",
"public function getChilds()\n {\n return $this->fields['childs'];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new room with the provided name and password, contained within the request body as JSON. | public function createRoom(Request $request) {
$body = $request->json()->all();
$name = isset($body['name']) ? $body['name'] : '';
$error = '';
if (empty($name)) {
$error = 'A name must be provided to create a room.';
} else if (!RoomHelper::isRoomNameUnique($name)) {
$error = 'A room with the name '.$name.' already exists.';
}
if (!empty($error)) {
return response()->json(["createNameError" => $error], Response::HTTP_BAD_REQUEST);
}
$password = isset($body['password']) ? $body['password'] : '';
$room = Room::create([
'id' => RoomHelper::generateNewRoomID(),
'name' => $name,
'password' => empty($password) ? '' : Hash::make($password)
]);
RoomHelper::createMembership($room, $password);
broadcast(new RoomCreated($room, Auth::id()));
return response()->json($room, Response::HTTP_OK);
} | [
"public function testRoomCreate()\n\t{\n\t\t$client = static::createClient([], [\n\t\t\t'PHP_AUTH_USER' => $this->username,\n\t\t\t'PHP_AUTH_PW' => $this->password,\n\t\t]);\n\n\t\t$client->request('POST', '/api/room/create', [\n\t\t\t'name' => 'name',\n\t\t\t'description' => 'description'\n\t\t]);\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}",
"public function testCreateRoomNameValid()\n {\n // login\n $response = $this->json('POST', '/api/login', ['email' => 'marek@marek.sk', 'password' => 'marek']);\n $response->assertStatus(200);\n $data = $response->json();\n $token = $data['data']['token'];\n\n // create room\n $capacity = random_int (1,50);\n $response = $this->withHeaders([\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $token,\n ])->json('POST', '/api/rooms', ['capacity' => $capacity]);\n $response->assertStatus(422);\n }",
"public function createRoom()\n {\n $data = $this->validate();\n \n if(boolval($this->property)){\n\n $room = $this->property->rooms()->create($data);\n\n if($room){\n\n $this->reset(['label', 'description', 'cost']);\n \n $this->emit('hideUpsertRoomModal');\n }\n \n }\n \n }",
"public function create($name, $room) {\n $fields = [\n 'privacy',\n 'delegate_admin_visibility',\n 'topic',\n 'owner_user_id',\n 'guest_access'\n ];\n\n $room = array_intersect_key($room, array_fill_keys($fields, true));\n $room['name'] = $name;\n\n $response = $this->client->put('room', $room);\n if (!$response->isSuccessful()) {\n return false;\n }\n\n $data = $response->getBody();\n $room['id'] = $data['id'];\n return $room;\n }",
"public function createGameRoomAction(){\n\n if(!array_key_exists('logged_in', $_SESSION)){\n header('Location: index.php');\n return;\n }\n\n if(array_key_exists('private', $_POST)){\n if($_POST['private']=='on')\n $private = 1;\n }\n else\n $private = 0;\n\n if(array_key_exists('roomPassword',$_POST))\n $password = $_POST['roomPassword'];\n else\n $password = \"\";\n \n $roomName = $_POST['roomName'];\n \n \n $gameRoomID = $this->db->newGameRoom($roomName, 1, $private, $password, $_SESSION['user']);\n $gameID = $this->db->insertGame($gameRoomID);\n $this->engine->initGameBoard($gameID);\n\n $_SESSION['roomID'] = $gameRoomID;\n $this->db->setGameRoom($gameRoomID, $_SESSION['user']);\n header('Location: index.php');\n }",
"public function createRoom(CreateForm $form)\n {\n $room = new Room($this->roomService->nextId());\n $room->setName(new Name($form->name));\n $room->setDescription(new Description($form->description));\n\n $this->roomService->add($room);\n\n return $room;\n }",
"function createRoomByName($name, $peigReturnURL=NULL) {\n return $this->exuse(\n AducidMethodName::CREATE_ROOM_BY_NAME,\n array( \"MeetingRoomName\" => $name),\n array(\n \"personalObjectTypeName\"=> \"peigMgmt\",\n \"personalObjectAlgorithmName\"=> AducidAlgorithmName::PEIG_MGMT\n ),\n $peigReturnURL\n );\n }",
"public function create(RoomCreateRequest $postBody, $optParams = array()) {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n $data = $this->__call('create', array($params));\n if ($this->useObjects()) {\n return new Room($data);\n } else {\n return $data;\n }\n }",
"public function addroom(){\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\tif(isset($_POST)){\n\t\t\t\tif(isset($_POST['name']) && isset($_POST['longitude']) && isset($_POST['latitude']) && isset($_POST['building_id']) && $_POST['name']!='' && $_POST['longitude']!='' && $_POST['latitude']!='' && $_POST['building_id']!=''){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$_POST['added_by_id'] = $_SESSION['user_id'];\n\t\t\t\t\t$insertroom = $this->mapModel->addBuilding($_POST);\n\t\t\t\t\t\n\t\t\t\t\techo json_encode(array('message'=>'room_added', 'result'=>array('room_id'=>$insertroom)));\n\t\t\t\t}else{\n\t\t\t\t\techo json_encode(array('message'=>'$_POST[\"name\"], $_POST[\"longitude\"], $_POST[\"latitude\"],$_POST[\"building_id\"] all need to be set and not empty'));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo json_encode(array('message'=>'use post'));\n\t\t\t}\t\n\t\t}else{\n\t\t\techo json_encode(array('message'=>'must_log_in'));\n\t\t}\n\t\t\n\t}",
"public function newRoom(){\n }",
"public function testCreatesRoom()\n {\n $this->makeHotel(1);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/hotel/1/room')\n ->click('#btn-add-room')\n ->assertPathIs('/admin/hotel/1/room/create')\n ->assertSee('Create room');\n });\n }",
"public function create()\n\t{\n\t\t$db = DbConnector::getInstance();\n\t\treturn $db->createRoom($this);\n\t}",
"public function testRoomMembershipCreatedWithRoom()\n {\n $user = factory(User::class)->create();\n\n $this->assertTrue(RoomMembership::count() == 0);\n $this->actingAs($user)->withHeaders([\n 'Authorization' => 'Bearer '.$user->api_token\n ])->json('POST', '/api/rooms', [\n 'name' => 'Test Room'\n ]);\n $this->assertTrue(RoomMembership::count() == 1);\n\n $room = Room::first();\n $room_membership = RoomMembership::first();\n $this->assertEquals($room->id, $room_membership->room_id);\n $this->assertEquals($user->id, $room_membership->user_id);\n }",
"public function create_chatroom_admin($id, Request $request) {\n \t$errors = array();\n $error = array();\n\n \t// check if the chatroom exists\n \t$admin_type_chatrooms = Chatroom::where('chatroom_type_id', 5)->get();\t// get all the chatrooms of type = admin\n \tforeach($admin_type_chatrooms as $admin_type_chatroom) {\n \t\tif($admin_type_chatroom->type_identifier == $id) {\n \t\t\t$error['message'] = 'The admin chatroom of this user exists.';\n \t\t\t$error['existChatroomId'] = $admin_type_chatroom->id;\n \t\t\tarray_push($errors, $error);\n \t\t}\n \t}\n \tif(!empty($errors)) {\n return response()->json($errors, 403);\n }\n\n // create a new chatroom\n \t$chatroom = new Chatroom();\n \t$chatroom->total_message = 1;\t// first message will be sent in this API\n \t$chatroom->title = 'Admin';\n \t$chatroom->chatroom_type_id = 5;\t// type = admin\n \t$chatroom->type_identifier = $id;\n \t$chatroom->save();\n\n \t// add the leader & house owner into the chatroom_participants table\n \t$chatroom_participant_user = new ChatroomParticipant();\n \t$chatroom_participant_user->chatroom_id = $chatroom->id;\n \t$chatroom_participant_user->user_id = $id;\n \t$chatroom_participant_user->save();\n \t$chatroom_participant_admin = new ChatroomParticipant();\n \t$chatroom_participant_admin->chatroom_id = $chatroom->id;\n \t$chatroom_participant_admin->user_id = -1;\n \t$chatroom_participant_admin->save();\n\n \t// send the message\n \t$message = new Message();\n \t$message->message = $request['message'];\n \t$message->sender = $id;\n \t$message->deleted = 0;\n \t$message->chatroom_id = $chatroom->id;\n \t$message->save();\n\n \t$result['chatroomId'] = $chatroom->id;\n\n \treturn $result;\n }",
"public function addRoom() {\n global $REQUEST_DATA;\n\t\t$eCap = trim($REQUEST_DATA['examCapacity'])!=''?trim($REQUEST_DATA['examCapacity']):\"NULL\";\n $query =\"\n INSERT INTO \n room \n SET \n roomName = '\".add_slashes(trim($REQUEST_DATA['roomName'])).\"', \n roomAbbreviation = '\".add_slashes(trim(strtoupper($REQUEST_DATA['roomAbbreviation']))).\"', \n roomTypeId = '\".$REQUEST_DATA['roomType'].\"',\n blockId = '\".$REQUEST_DATA['blockName'].\"', \n capacity = '\".trim($REQUEST_DATA['capacity']).\"', \n examCapacity = $eCap\" ;\n return SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query);\n }",
"protected function addARoomRequest($body = null)\n {\n\n $resourcePath = '/rooms';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\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 // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function create() {\r\n\t\t$this->checkMinMaxAlloc();\r\n\t\t$this->checkNameIsFree();\r\n\t\t$this->checkRoomNameValid();\r\n\t\t$this->checkPoolId();\r\n\r\n\t\tif (!ilRoomSharingNumericUtils::isPositiveNumber($this->min_alloc, true)) {\r\n\t\t\t$this->min_alloc = 0;\r\n\t\t}\r\n\r\n\t\t$this->id = $this->ilRoomsharingDatabase->insertRoom($this->name, $this->type, $this->min_alloc, $this->max_alloc, $this->file_id, $this->building_id);\r\n\t\t$this->insertAttributes();\r\n\r\n\t\treturn $this->id;\r\n\t}",
"public function postNew(){\n\t\t$room = new Room;\n\t\t$room->number = HTML::entities(Input::get('number'));\n\t\t$room->type = HTML::entities(Input::get('type'));\n\t\tif ($room->save())\n\t\t\treturn Redirect::action('RoomController@getIndex')\n\t\t\t\t->with('success','Stofa skráð!');\n\t\telse\n\t\t\treturn Redirect::back()\n\t\t\t\t->with('error','Gekk ekki að nýskrá stofu!');\n\n\t}",
"public function addRoom($room = null){\n $client = Yii::$app->roomService;\n $data = $client->add(['sid'=>$this->sid,'room'=>$room]);\n $this->room_id = $data->return->id;\n return $data;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Form submit function. Update the role weights. | function mobiiapp_security_role_order_submit($form, &$form_state) {
foreach ($form_state['values']['roles'] as $rid => $role_values) {
$role = $form['roles'][$rid]['#role'];
$role->weight = $role_values['weight'];
user_role_save($role);
}
drupal_set_message(t('The role settings have been updated.'));
} | [
"function recsys_wb_book_rating_form_submit($form, &$form_state) {\n // Get the rating from the form\n $rating = $form_state['values']['rating'];\n \n // Get the node\n $node = menu_get_object();\n \n // Get the books id\n $book_id = field_get_items(\"node\", $node, \"field_book_id\");\n $book_id = $book_id[0][\"value\"];\n \n // Get the books isbn\n $isbn = field_get_items(\"node\", $node, \"field_isbn\");\n $isbn = $isbn[0][\"value\"];\n \n // The database (add 25% of the users ratings to the test set)\n $database = BOOK_DB_TRAIN;\n if ( rand(0,100) > 75 )\n $database = BOOK_DB_TEST;\n\n // Insert the values into the database\n $result = db_insert( $database )->fields( array(\n 'BookID' => $book_id,\n 'UserID' => user_id,\n 'Rating' => $rating,\n 'ISBN' => $isbn,\n ))->execute();\n \n drupal_set_message(\"Book succesfully rated!\");\n}",
"function opensanmateo_sitecrawler_admin_form_submit($form, &$form_state) {\n // Because the form elements were keyed with the item ids from the database,\n // this can simply iterate through the submitted values.\n foreach ($form_state['values']['crawlers'] as $id => $item) {\n db_query(\n \"UPDATE {opensanmateo_sitecrawler_sites} SET weight = :weight WHERE id = :id\",\n array(':weight' => $item['weight'], ':id' => $id)\n );\n }\n}",
"function eve_api_admin_roles_form_submit($form, &$form_state) {\n if ((int) variable_get('eve_api_blue_role', 2) != 2) {\n $uids = array();\n $result = db_query('SELECT uid FROM {users_roles} WHERE rid = :rid', array(\n ':rid' => (int) variable_get('eve_api_blue_role', 2),\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $row) {\n $uids[] = $row->uid;\n }\n }\n\n if (!empty($uids)) {\n user_multiple_role_edit($uids, 'remove_role', (int) variable_get('eve_api_blue_role', 2));\n user_multiple_role_edit($uids, 'add_role', (int) $form_state['values']['blue_role']);\n }\n }\n\n if ((int) variable_get('eve_api_alliance_role', 2) != 2) {\n $uids = array();\n $result = db_query('SELECT uid FROM {users_roles} WHERE rid = :rid', array(\n ':rid' => (int) variable_get('eve_api_alliance_role', 2),\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $row) {\n $uids[] = $row->uid;\n }\n }\n\n if (!empty($uids)) {\n user_multiple_role_edit($uids, 'remove_role', (int) variable_get('eve_api_alliance_role', 2));\n user_multiple_role_edit($uids, 'add_role', (int) $form_state['values']['alliance_role']);\n }\n }\n\n if ((int) variable_get('eve_api_unverified_role', 2) != 2) {\n $uids = array();\n $result = db_query('SELECT uid FROM {users_roles} WHERE rid = :rid', array(\n ':rid' => (int) variable_get('eve_api_unverified_role', 2),\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $row) {\n $uids[] = $row->uid;\n }\n }\n\n if (!empty($uids)) {\n user_multiple_role_edit($uids, 'remove_role', (int) variable_get('eve_api_unverified_role', 2));\n user_multiple_role_edit($uids, 'add_role', (int) $form_state['values']['unverified_role']);\n }\n }\n\n if ((int) variable_get('eve_api_ceo_role', 2) != 2) {\n $uids = array();\n $result = db_query('SELECT uid FROM {users_roles} WHERE rid = :rid', array(\n ':rid' => (int) variable_get('eve_api_ceo_role', 2),\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $row) {\n $uids[] = $row->uid;\n }\n }\n\n if (!empty($uids)) {\n user_multiple_role_edit($uids, 'remove_role', (int) variable_get('eve_api_ceo_role', 2));\n user_multiple_role_edit($uids, 'add_role', (int) $form_state['values']['ceo_role']);\n }\n }\n\n if ((int) variable_get('eve_api_director_role', 2) != 2) {\n $uids = array();\n $result = db_query('SELECT uid FROM {users_roles} WHERE rid = :rid', array(\n ':rid' => (int) variable_get('eve_api_director_role', 2),\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $row) {\n $uids[] = $row->uid;\n }\n }\n\n if (!empty($uids)) {\n user_multiple_role_edit($uids, 'remove_role', (int) variable_get('eve_api_director_role', 2));\n user_multiple_role_edit($uids, 'add_role', (int) $form_state['values']['director_role']);\n }\n }\n\n variable_set('eve_api_blue_role', (int) $form_state['values']['blue_role']);\n variable_set('eve_api_alliance_role', (int) $form_state['values']['alliance_role']);\n variable_set('eve_api_unverified_role', (int) $form_state['values']['unverified_role']);\n variable_set('eve_api_ceo_role', (int) $form_state['values']['ceo_role']);\n variable_set('eve_api_director_role', (int) $form_state['values']['director_role']);\n\n drupal_set_message(t('The roles have been updated and will be updated with the next scheduled cron tasks.'));\n}",
"function profile_admin_overview_submit($form, &$form_state) {\n foreach (element_children($form_state['values']) as $fid) {\n if (is_numeric($fid)) {\n $weight = $form_state['values'][$fid]['weight'];\n $category = $form_state['values'][$fid]['category'];\n if ($weight != $form[$fid]['weight']['#default_value'] || $category != $form[$fid]['category']['#default_value']) {\n db_update('profile_field')\n ->fields(array(\n 'weight' => $weight,\n 'category' => $category,\n ))\n ->condition('fid', $fid)\n ->execute();\n }\n }\n }\n\n drupal_set_message(t('Profile fields have been updated.'));\n cache_clear_all();\n menu_rebuild();\n}",
"function handle_role_changes() {\n global $wp_roles, $current_user, $iwg_rolemanagement;\n // Handle cap-changes on a single role\n if (empty($_POST['role'])) {\n $iwg_rolemanagement->error_number = 1000;\n $iwg_rolemanagement->handle_error();\n }\n $role = $iwg_rolemanagement->check_input($_POST['role'], null, false, false, true);\n if ( !$role ) {\n $iwg_rolemanagement->error_number += 1000;\n $iwg_rolemanagement->handle_error();\n }\n if (empty($_POST['cap'])) {\n $iwg_rolemanagement->error_number = 2000;\n $iwg_rolemanagement->handle_error();\n }\n $cap = $iwg_rolemanagement->check_input($_POST['cap'], 'int_cap', true);\n if ( !$cap ) {\n\t $iwg_rolemanagement->error_number += 2000;\n\t\t\t$iwg_rolemanagement->handle_error();\n }\n if ( ! $iwg_rolemanagement->capmanager->cap_exists($cap) ) {\n \t$iwg_rolemanagement->error_number = 2010;\n \t$iwg_rolemanagement->handle_error();\n }\n $iwg_rolemanagement->check_admin_ref('iwg_rolemanager_edit_cap_on_role_'.$role.'_'.$cap);\n\n /*\n * need this check here for users with javascript switched off,\n * if javascript is on the check run before submit and no data aer submitted\n */\n if( ($cap == $iwg_rolemanagement->neededcap && in_array($role, $current_user->roles)) ||\n ($cap == 'edit_users' && in_array($role, $current_user->roles)) ) {\n $iwg_rolemanagement->error_number = 9001;\n $iwg_rolemanagement->handle_error();\n }\n\n if ($_POST['grant'] == 1) {\n $wp_roles->add_cap($role, $cap, true);\n } else {\n $wp_roles->remove_cap($role, $cap);\n }\n\n //Redirect them away\n if (isset($_POST['ajax'])) {\n $changed = addslashes($_POST['grant'] ? __('Capability granted', 'role-manager') : __('Capability denied', 'role-manager'));\n die('toggleCap(\"btn_' . $role . '__' . $cap . '\");\n setMessage(\"' . $changed . '\");\n ');\n } else {\n $changed = ($_POST['grant'] ? 'granted' : 'denied') . '=' . $role;\n header('Location: ' . $this->manage_roles_uri . '&' . $changed);\n }\n }",
"function _forum_access_user_admin_role_submit($form, &$form_state) {\n if ($form_state['values']['op'] == $form_state['values']['delete']) {\n $rid = $form_state['values']['rid'];\n db_query(\"DELETE FROM {forum_access} WHERE rid = %d\", $rid);\n db_query(\"DELETE FROM {node_access} WHERE gid = %d AND realm = 'forum_access'\", $rid);\n if ($rid === forum_access_query_moderator_rid()) {\n drupal_set_message(t('The role you have just deleted is required by !Forum_Access; it will be recreated automatically.', array('!Forum_Access' => 'Forum Access')), 'error');\n }\n }\n}",
"function save() {\n\t\tglobal $wpdb;\n\n\t\tcheck_admin_referer( 'edit-role', '_wpnonce_edit-role' );\n\t\tif ($this->_validate()) {\n\t\t\t$wpdb->update( $this->table, $this->role, array('id'=>$this->role['id']) );\n\t\t\twp_redirect( $this->url );\n\t\t\tdie();\n\t\t} else {\n\t\t\t$_REQUEST['action'] = 'edit';\n\t\t}\n\t}",
"public function update_role() {\n\t\t$table = new cli\\Table();\n\t\t$table->setHeaders( [ 'No Change', 'Upgrade', 'Resign' ] );\n\t\t$body = capitalp_update_bulk_role();\n\t\t$table->addRow( $body );\n\t\t$table->display();\n\t\tWP_CLI::success( sprintf( 'Above is the CCP %d members status.', $body[0] + $body[1] + $body[2] ) );\n\t}",
"public function updatePrivileges() { \r\n $result = $this->model->processPrivilegesUpdate($_POST);\r\n if($result){\r\n $this->session->sets('updateSucess','You are sucessfully updated privileges');\r\n $this->redirect('privileges');\r\n } else {\r\n $this->session->sets('updateFailure','Please check the details');\r\n $this->redirect('privileges/edit/'.$_POST['adminrole_id']);\r\n }\r\n }",
"function user_role_edit_form ($cid) {\n \n // Get user data\n $data = user_data(array('cid'=>$cid));\n $user = $data[0];\n \n // Get role data\n $roles = user_role_list();\n \n // Construct fields\n $fields = array();\n foreach ($roles as $role) {\n if ($role === 'authenticated') {\n continue;\n }\n $fields[] = array(\n 'type' => 'checkbox',\n 'label' => $role,\n 'name' => $role,\n 'checked' => in_array($role, $user['roles'])\n );\n }\n $fields[] = array(\n 'type' => 'submit',\n 'name' => 'submitted',\n 'value' => 'Update'\n );\n \n $form = array(\n 'type' => 'form',\n 'method' => 'post',\n 'command' => 'user_role_update',\n 'hidden' => array(\n 'cid' => $cid\n ),\n 'fields' => $fields\n );\n return $form;\n}",
"function cirro_core_multi_img_weight_form_submit($form, &$form_state) {\n\n\t// Init\n\t$values = $form_state['values'];\n\n\t$objects = array();\n\n\t// Loop through imgs\n\tforeach ( $values['imgs'] as $id => $data ) {\n\n\t\t// Cast fields object\n\t\t$fields_obj = (object) $data;\n\n\t\t// Update img\n\t\tentity_get_controller('multi_img')->update($fields_obj);\n\n\t}\n\n\t// Display success message\n\tdrupal_set_message('Images Updated');\n\n}",
"public function update()\n {\n $edit = $_POST['edit'];\n\n if ($edit == \"Submit\") {\n if (isset($_SESSION['roleID']) && ($_SESSION['roleID'] < 3)) {\n $model = new boatramp($_GET['id']);\n $model->updateBoatRamp($_POST[\"ramp\"]);\n }\n }\n /*** Redirect User to BoatRamp/Index ***/\n header(\"location: index.php?rt=boatramp/index\");\n }",
"function nexteuropa_user_management_change_user_roles_action_submit($form, $form_state) {\n return array(\n 'add_roles' => array_filter($form_state['values']['add_roles']),\n 'remove_roles' => array_filter($form_state['values']['remove_roles']),\n );\n}",
"public function perm_change(){\n\t\t//Check if we sent the data via an form\n\t\tif ($this->input->post('submit')) {\n\t\t\t//Formats the data from a form into an array\n\t\t\t$data = $this->user_m->array_from_post(array('privileges'));\n\t\t\t//Saves the data into the database and reidrects us\n\t\t\t$this->user_m->save($data, $this->input->post('id'));\n\t\t\tredirect($this->data['language'].'/admin/user');\n\t\t}\n\t\t//redirects us if we didnt use an form(Direct access)\n\t\tredirect($this->data['language'].'/admin/user');\n\t}",
"public function healthFormSubmit()\n {\n $this->validate(Request::instance(), [\n 'parent_name' => 'required',\n 'parent_phone' => 'required',\n ]);\n\n $user = Auth::user();\n $user->update(Request::only([\n 'parent_name',\n 'parent_phone',\n 'medical_allergies',\n 'medical_treatment',\n 'medical_note',\n ]));\n\n $user->save();\n\n return Redirect(route('dashboard.wei.pay'))->withSuccess('Vos modifications ont été enregistrées.');\n }",
"function fullcalendar_colors_admin_user_role_settings_submit($form, &$form_state) {\n $values = $form_state['values'];\n variable_set('fullcalendar_colors_user_roles_enabled', $values['fullcalendar_colors_user_roles_enabled']);\n\n // Save the user roles colors.\n foreach (user_roles() as $role_id => $role) {\n $class = 'fullcalendar_colors_user_role_' . $role_id;\n fullcalendar_colors_set_color($class, $values[$class]);\n }\n\n drupal_set_message(t('The configuration options have been saved.'));\n}",
"public function promoteUpdateAction(){\n $helper = $this->get('wchelper');\n $request = $helper->getRequest();\n // get username and role from request\n $username=$request->request->get('username', '');\n $role=$request->request->get('role', '');\n echo $username. \" \" . $role;\n $helper->setUserRole($username, $role);\n\n // Nothing to return really\n return new Response();\n }",
"function ding_library_admin_ordering_form_submit($form, &$form_state) {\n foreach ($form_state['values']['records'] as $nid => $val) {\n $orig_data = $form_state['values']['libraries'][$nid];\n\n // Since the library weight is NOT NULL in the database, it\n // being NULL here means that the node does not have a row in the\n // {ding_library} table.\n if (is_null($orig_data->library_weight)) {\n db_query(\"INSERT INTO {ding_library} (nid, vid, library_weight) VALUES (%d, %d, %d);\", $nid, $orig_data->vid, $val['library_weight']);\n }\n else {\n db_query(\"UPDATE {ding_library} SET library_weight = %d WHERE vid = %d\", $val['library_weight'], $orig_data->vid);\n }\n }\n}",
"function content_access_user_admin_perm_submit($form, $form_state) {\n // Check for each content type, which has per node access activated\n // whether permissions have been changed.\n $types = array();\n foreach (array_filter(content_access_get_settings('per_node')) as $type => $value) {\n foreach (_content_access_get_node_permissions($type) as $perm) {\n foreach (user_roles() as $rid => $role) {\n if (isset($form_state['values'][$rid]) && in_array($perm, $form['checkboxes'][$rid]['#default_value']) != in_array($perm, $form_state['values'][$rid])) {\n //permission changed!\n $types[$type] = node_get_types('name', $type);\n continue 2;\n }\n }\n }\n }\n if ($types && content_access_mass_update(array_keys($types))) {\n drupal_set_message(format_plural(count($types),\n 'Permissions have been successfully rebuilt for the content type @types.',\n 'Permissions have been successfully rebuilt for the content types @types.',\n array('@types' => implode(', ', $types))\n ));\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether the query is for an existing category archive page. If the $category parameter is specified, this function will additionally check if the query is for one of the categories specified. | public function is_category($category = '')
{
} | [
"protected function isCategoryPage()\n {\n return ($this->request->layout == 'category' || $this->request->task == 'category' || $this->request->view == 'latest');\n }",
"protected function isCategoryPage()\n {\n return ($this->request->view == $this->viewCategory);\n }",
"function existsInCategory( &$category )\r\n {\r\n $ret = false;\r\n if ( is_a( $category, \"eZMediaCategory\" ) )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $catID = $category->id();\r\n\r\n $db->array_query( $ret_array, \"SELECT ID FROM eZMediaCatalogue_MediaCategoryLink\r\n WHERE MediaID='$this->ID' AND CategoryID='$catID'\" );\r\n\r\n if ( count( $ret_array ) == 1 )\r\n {\r\n $ret = true;\r\n }\r\n }\r\n return $ret;\r\n }",
"public function isCategoryPage()\n {\n $isCategoryPage = false;\n if (!is_null($this->getFrontControllerName())\n && !is_null($this->getCurrentCategory())\n ) {\n $isCategoryPage = true;\n }\n\n return $isCategoryPage;\n }",
"protected static function _isCategory($category)\n\t{\n\t\treturn (\n\t\t\t!empty($category) &&\n\t\t\tis_array($category) &&\n\t\t\tarray_key_exists('product_category_id', $category) &&\n\t\t\tarray_key_exists('parent_category_id', $category)\n\t\t);\n\t}",
"protected function _isActiveMenuCategory($category)\n {\n $catalogLayer = Mage::getSingleton('catalog/layer');\n if (!$catalogLayer) {\n return false;\n }\n\n $currentCategory = $catalogLayer->getCurrentCategory();\n if (!$currentCategory) {\n return false;\n }\n\n $categoryPathIds = explode(',', $currentCategory->getPathInStore());\n return in_array($category->getId(), $categoryPathIds);\n }",
"function category_exists($category){\r\n\t\tglobal $mysqli;\r\n\t\t$result = $mysqli->query(\"SELECT 1 FROM categories WHERE cat_name = '$category'\");\r\n\t\tif($result && $result->num_rows > 0){\r\n\t\t\treturn true; // category already exists\r\n\t\t} else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected function _isCategory() {\n return $this->_getRouteName() == 'catalog'\n && $this->_getControllerName() == 'category';\n }",
"function has_category($category = '', $post = \\null)\n {\n }",
"function ec3_is_event_category_q(&$query) {\n global $ec3;\n // This bit nabbed from is_category()\n if($query->is_category) {\n $cat_obj = $query->get_queried_object();\n if($cat_obj->term_id == $ec3->event_category) {\n return true;\n }\n }\n return false;\n}",
"function ent_installer_check_archive_category_exists() {\n global $DB;\n\n if (!$DB->get_record('course_categories', array('idnumber' => 'ARCHIVE'))) {\n $archcat = new StdClass();\n $archcat->name = get_string('defaultarchivecatname', 'local_ent_installer');\n $archcat->idnumber = 'ARCHIVE';\n $archcat->visible = 0;\n $DB->insert_record('course_categories', $archcat);\n }\n}",
"function _check_category_exists($category_data) {\n $category_data['category_id'] = $this->input->post('category_id');\n $category_info = $this->category_model->get_categoryy_info($category_data);\n if (!empty($category_info)) {\n return true;\n }\n return false;\n }",
"function isCategoryPage($page_name) {\n // should this go up to the listmodule obj ?\n $sql = \"SELECT COUNT(*) FROM {$this->categoryTable} WHERE page_name='{$page_name}'\";\n $count = db_get_single_value($sql);\n if ($count > 0) {\n return true;\n } else {\n return false;\n }\n }",
"protected function _loadCategory()\r\n\t{\r\n\t\tif (empty($this->_category)) {\r\n\t\t\t// Lets get the information for the current category\r\n\t\t\t$query = 'SELECT *, ' \r\n\t\t\t\t.' CASE WHEN CHAR_LENGTH(alias) '\r\n\t\t\t\t.' THEN CONCAT_WS(\\':\\', id, alias) ELSE id END AS slug '\r\n\t\t\t\t.' FROM #__categories WHERE id = '. (int) $this->_id;\r\n\t\t\t$this->_db->setQuery($query);\r\n\t\t\t$this->_category = $this->_db->loadObject();\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"function isCategoryPage( $page_name ) {\n\t\t\t// should this go up to the listmodule obj ?\n\t\t\t$sql = \"SELECT COUNT(*) FROM {$this->categoryTable} WHERE page_name='{$page_name}'\";\n\t\t\t$count = db_get_single_value( $sql );\n\t\t\tif ( $count > 0 ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function _ifItemCategory($name = '', $value='') {\n global $catid, $manager;\n \n $b =& $manager->getBlog(getBlogIDFromItemID($this->currentItem->itemid));\n\n // when no parameter is defined, just check if a category is selected\n if (($name != 'catname' && $name != 'catid') || ($value == ''))\n return $b->isValidCategory($catid);\n \n $icatid = $this->currentItem->catid;\n //$icategory = $this->currentItem->category;\n\n // check category name\n if ($name == 'catname') {\n $value = $b->getCategoryIdFromName($value);\n if ($value == $icatid)\n return $b->isValidCategory($icatid);\n }\n\n // check category id\n if (($name == 'catid') && ($value == $icatid))\n return $b->isValidCategory($icatid);\n\n return false;\n }",
"protected function _hasCategoryArticles($category)\n {\n if (!$this->getConfig()->getConfigParam('styla_feed_no_empty_categories')) {\n return true;\n }\n\n if ($category->getNrOfArticles()) {\n return true;\n }\n\n foreach ($this->_getSubCategories($category->getId()) as $categoryId) {\n if (oxRegistry::get(\"oxUtilsCount\")->getCatArticleCount($categoryId)) {\n return true;\n }\n }\n\n return false;\n }",
"protected function checkCategory($category) {\n\t\tif (!empty($category['permissions'])) {\n\t\t\t$hasPermission = false;\n\t\t\t$permissions = explode(',', $category['permissions']);\n\t\t\tforeach ($permissions as $permission) {\n\t\t\t\tif (WCF::getUser()->getPermission($permission)) {\n\t\t\t\t\t$hasPermission = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!$hasPermission) return false;\n\t\t\t\n\t\t}\n\t\tif (!empty($category['options'])) {\n\t\t\t$hasEnabledOption = false;\n\t\t\t$options = explode(',', strtoupper($category['options']));\n\t\t\tforeach ($options as $option) {\n\t\t\t\tif (defined($option) && constant($option)) {\n\t\t\t\t\t$hasEnabledOption = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!$hasEnabledOption) return false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private function isValidCategory(string $category)\n {\n return in_array($category, $this->jokeClient->fetchCategories());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Create 1 or more users. $users is an array of 1 or more arrays, each with these fields as a minimum: username, password, firstname, lastname, email. E.g. to create a user, pass this in: array( array('username' => 'mine', 'password' => 'Password08!', 'firstname' => 'Michael', 'lastname' => 'Neidhardt', | function createuser($users) {
$functionname = 'core_user_create_users';
return $this->restcall($functionname, array('users' => $users));
} | [
"protected function create_users(array $users) {\n $session = $this->getSession();\n\n foreach ($users as $username) {\n if (is_array($username)) {\n $name = $username['username'];\n $password = array_key_exists('password', $username) ? $username['password'] : 'pass';\n $email = array_key_exists('email', $username) ? $username['email'] : str_replace(' ', '_', $name) . '@test.dev';\n } else {\n $name = $username;\n $password = 'pass';\n $email = str_replace(' ', '_', $name) . '@test.dev';\n }\n\n $this->visit( 'wp-admin/user-new.php' );\n $current_page = $session->getPage();\n\n // Fill in the form\n $current_page->findField('user_login')->setValue($name);\n $current_page->findField('email')->setValue($email);\n $current_page->findField('pass1')->setValue($password);\n $current_page->findField('pass2')->setValue($password);\n\n // Set role\n $role = ucfirst( strtolower( $this->role_map[$name] ) );\n $current_page->findField('role')->selectOption($role);\n\n // Submit form\n $current_page->findButton('Add New User')->click();\n }\n }",
"public function __construct(array $users = array())\n {\n foreach ($users as $username => $attributes) {\n $password = isset($attributes['password']) ? $attributes['password'] : null;\n $roles = isset($attributes['roles']) ? $attributes['roles'] : array();\n $adapter = $attributes['adapter'];\n $user = new User($username, $password, $roles, $adapter);\n\n $this->createUser($user);\n }\n }",
"public function usersResourcesCreate($users, $resources) {\n $users = $this->userNormalizeParam($users);\n $this->log('usersResourcesCreate()', 'users=' . implode(',', $users) . ' resources=' . $resources);\n\n foreach ($users as $user_name) {\n $user_obj = $this->userFactory($user_name);\n $user_obj->resourcesCreate($resources);\n\n $this->fireEvent('afterUserResourcesCreate', array('course' => $this, 'user' => $user_obj, 'resources' => $resources));\n }\n }",
"public function multipleAdd(array $users);",
"public function action_users()\n {\n $user_data = array(\n 'jlennon' => array('John', 'Lennon', 'john.lennon@beatles.com', 'jl', 'jl'),\n 'pmccartney' => array('Paul', 'McCartney', 'paul.mccartney@beatles.com', 'pmc', 'pmc'),\n 'gharrison' => array('George', 'Harrison', 'george.harrison@beatles.com', 'gh', 'gh'),\n 'rstarr' => array('Ringo', 'Starr', 'ringo.starr@beatles.com', 'rs', 'rs'),\n );\n\n foreach ($user_data as $data)\n {\n $user = ORM::factory('user');\n $user->first_name = $data[0];\n $user->last_name = $data[1];\n $user->email = $data[2];\n $user->username = $data[3];\n $user->password = $data[4];\n try {\n $user->save();\n var_dump(\"user {$data[3]} created successfully.\");\n } catch (ORM_Validation_Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n var_dump($e->errors());\n }\n }\n }",
"public function addUsers(array $users)\n\t{\n\t\tforeach($users as $user) {\n\t\t\tif(!($user instanceof User) && !is_array($user)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(is_array($user)) {\n\t\t\t\tif(!array_key_exists('username', $user) || \n\t\t\t\t !array_key_exists('passhash', $user)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$user = new User($user['username'], $user['passhash']);\n\t\t\t}\n\n\t\t\tif(in_array($user, $this->userlist)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->userlist[] = $user;\n\t\t}\n\t}",
"public function insert_users($user_ids);",
"public function usersCreate($data = null)\n {\n list($response) = $this->usersCreateWithHttpInfo($data);\n return $response;\n }",
"public static function generateUsers($users_list)\n {\n $total_users_created = 0;\n foreach ($users_list as $key => $userdata) {\n if ( self::validateUserData($userdata) ) {\n \n // Sanitize data before creating user\n $userdata = array_combine(\n array_keys($userdata), \n array_map( array('UsersGenerator', 'sanitizeUserdata' ), $userdata, array_keys($userdata) )\n );\n \n // Insert user and increment total users created number\n $user_id = wp_insert_user($userdata);\n if ( ! is_wp_error( $user_id ) ) {\n $total_users_created = $total_users_created + 1;\n }\n }\n }\n \n return $total_users_created;\n }",
"public function createUsers($num = 100)\n {\n $this->output(\"creating $num users...\");\n for ($i = 0; $i < $num; $i++) {\n list($name, $email) = $this->getUserNameAndEmail($i);\n $this->forceCredentialsToUser($email, $email, $name);\n }\n \n $this->forceCredentialsToDefaultUser();\n }",
"public function mutesUsersCreate($params = array())\n {\n return $this->post('mutes/users/create', $params);\n }",
"private function insertUsers($user_array) {\n foreach ($user_array as $user) {\n $first = $this->mysqli->real_escape_string($user->first_name);\n $last = $this->mysqli->real_escape_string($user->last_name);\n $email = $this->mysqli->real_escape_string($user->email);\n $phone = $this->mysqli->real_escape_string($user->phone);\n $lat = $this->mysqli->real_escape_string($user->latitude);\n $lon = $this->mysqli->real_escape_string($user->longitude);\n $pass = $this->mysqli->real_escape_string($user->password);\n\n $query =\"INSERT INTO Users (first_name, last_name, email, phone,\n latitude, longitude, password)\n VALUES ('$first', '$last', '$email', '$phone', '$lat', '$lon', '$pass')\";\n\n if (!$insert_result = $this->mysqli->query($query)) {\n echo \"Inserting a user failed \" . \\mysqli_error($this->mysqli) . PHP_EOL;\n }\n }\n }",
"private function users(array $users): void\n {\n $this->options[\"users\"] = $users;\n }",
"public function createUsersWithArrayInput(array[User] $body) {\n }",
"public function ensureUsers($users)\r\n {\r\n if (!is_array($users)) {\r\n $users = array($users);\r\n }\r\n\r\n $userIds = array();\r\n $userName = array();\r\n\t\t \r\n\t\t $table_name = $this->_tables['users'];\r\n\r\n // Anything already typed as an integer is assumed to be a user id.\r\n foreach ($users as $userIndex => $user) {\r\n if (is_int($user)) {\r\n $userIds[$userIndex] = $user;\r\n } else {\r\n $userName[$user] = $userIndex;\r\n }\r\n }\r\n\r\n // Get the ids for any users that already exist.\r\n \r\n if (count($userName)) {\r\n $userName;\r\n $sql = 'SELECT user_id, user_name FROM ' .$table_name\r\n . ' WHERE user_name IN (\"' . implode('\",\"', array_keys($userName)) . '\")';\r\n\r\n\r\n\t\t\t\t\t//$res =& $this->_db->exec($sql);\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t$res =& $this->_db->query($sql);\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\twhile ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {\r\n\t\t\t\t\t\t // Assuming MDB2's default fetchmode is MDB2_FETCHMODE_ORDERED\r\n\t\t\t\t\t\t $userIndex = $userName[$row['user_name']];\r\n unset($userName[$row['user_name']]);\r\n $userIds[$userIndex] = $row['user_id']; \r\n\t\t\t\t\t}\t \r\n\r\n }\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t$types = array('text');\r\n\t\t\t$this->_db->loadModule('Extended');\t\t\t\t\r\n\t\t\t\t\r\n\r\n // Create any users that didn't already exist\r\n\t\t foreach ($userName as $user => $userIndex) {\r\n\t\t \r\n\t\t\t\t$fields_values = array(\r\n\t\t\t\t\t'user_name' => \"$user\"\r\n\t\t\t\t);\r\n\t\t\r\n\t\t\t\t$affectedRows = $this->_db->extended->autoExecute($table_name, $fields_values,\r\n\t\t\t\t\t\t\t\t\t\tMDB2_AUTOQUERY_INSERT, null, $types);\r\n\t\t\t\tif ($affectedRows){\r\n\t\t\t\t\r\n\t\t\t\t\t$query = 'SELECT user_id FROM '. $table_name .' WHERE user_name = \"'.$user.'\"';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($id = $this->_db->queryOne($query)) {\r\n\t\t\t\t\t\t$userIds[$userIndex] = $id;\r\n\t\t\t\t\t} \r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\r\n\t\t }\t\t\t\t\t\t\r\n\r\n return $userIds;\r\n }",
"public function createChat($users)\n {\n $new = new Chat();\n $new->save();\n foreach ($users as $user) {\n $new->addUser($user);\n }\n // return all the object\n return Chat::find($new->id);\n }",
"protected function insertUsers()\n\t{\n\t\t//Raser la table\n\t\tUser::truncate();\n\n\t\t//Insérer 10 données\n\t\tfor($i = 0; $i<10; ++$i)\n\t\t{\n User::create($this->getUser());\n\t\t}\n\t}",
"public function initializeUsers($users)\n {\n foreach($users as $user){\n $userSkill = new UserSkills();\n $userSkill->setUser($user)\n ->setSkill($this);\n\n $this->addUserSkill($userSkill);\n }\n }",
"public function authenticateUsers(array $users);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an HTML image tag for a Collection object | function image_tag_collection($collection, $which = '150x150', $options = array())
{
if (is_null($collection) || !($collection instanceof Collection))
{
return image_tag('legacy/multimedia/'. get_class($collection) .'/'. $which .'.png');
}
$options = array_merge(
array('alt_title' => $collection->getName(), 'slug' => $collection->getSlug()),
$options
);
$multimedia = $collection->getThumbnail();
$image_tag = image_tag_multimedia($multimedia, $which, $options);
if (empty($image_tag))
{
$image_tag = image_tag('legacy/multimedia/'. get_class($collection) .'/'. $which .'.png', $options);
}
return $image_tag;
} | [
"function image_tag_collection($collection, $which = '150x150', $options = array())\n{\n if (is_null($collection) || !($collection instanceof Collection))\n {\n $class = is_object($collection) ? get_class($collection) : 'Collection';\n return cq_image_tag(sfConfig::get('sf_app') .'/multimedia/'. $class .'/'. $which .'.png');\n }\n\n $options = array_merge(\n array('alt_title' => $collection->getName(), 'slug' => $collection->getSlug()),\n $options\n );\n\n $multimedia = $collection->getThumbnail();\n $image_tag = image_tag_multimedia($multimedia, $which, $options);\n\n if (empty($image_tag))\n {\n $image_tag = cq_image_tag(\n sfConfig::get('sf_app') .'/multimedia/'. get_class($collection) .'/'. $which .'.png',\n $options\n );\n }\n\n return $image_tag;\n}",
"public function img()\n\t{\n\t\treturn HTML::image(\"oddro/images/product_category/\".$this->img, $this->title);\n\t}",
"public function getTag()\n {\n $image = '<img src=\"' . $this->get() . '\" border=0 width=\"' . $this->size . '\" alt=\"'.sprintf(L_CLICK,L_LINKS_19).'\" />';\n return $image;\n }",
"public function getImages()\n {\n /** @var \\Simi\\Simistorelocator\\Model\\ResourceModel\\Image\\Collection $collection */\n $collection = $this->imageCollectionFactory->create();\n $collection->addFieldToFilter('locator_id', $this->getId());\n return $collection;\n }",
"public function getImageCollection()\n {\n $collection = app()->make('Mosdef\\Attachments\\Images\\Collection');\n\n $imageConfiguration = $this->getImageConfiguration();\n\n if (empty($imageConfiguration)) {\n throw new \\InvalidArgumentException('no image configuration provided');\n }\n\n $sizes = $imageConfiguration->getSizes();\n\n $webPath = $this->getWebPath();\n $webDir = dirname($webPath);\n\n $collection->setSrc($webPath);\n\n $responsiveImages = [];\n foreach($sizes as $size) {\n $webPath = $webDir . '/' . $this->getResponsiveFilename($size);\n $responsiveImages[$size] = $webPath;\n }\n\n $collection->setSizes($responsiveImages);\n\n return $collection;\n }",
"function item_image($imageType = null, $props = array(), $index = 0, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n $imageFile = $item->getFile($index);\n $fileMarkup = new Omeka_View_Helper_FileMarkup;\n return $fileMarkup->image_tag($imageFile, $props, $imageType);\n}",
"protected function renderImg() {\n $originalProcessingConfiguration = $this->defaultProcessConfiguration;\n $originalProcessingConfiguration['width'] = isset($this->settings['sourceCollection']['default']['width']) ? $this->settings['sourceCollection']['default']['width'] : 600;\n\n if ($this->additionalConfig['image_format']) {\n $originalProcessingConfiguration['height'] = round(intval($originalProcessingConfiguration['width']) / $this->additionalConfig['image_format']);\n }\n\n $processedFile = $this->imageFile->process(\n ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $originalProcessingConfiguration\n );\n $src = $processedFile->getPublicUrl();\n $this->tagBuilder->reset();\n $this->tagBuilder->setTagName('img');\n $this->tagBuilder->addAttribute('src', $src);\n $this->tagBuilder->addAttribute('alt', $this->altText);\n $this->tagBuilder->addAttribute('width', $processedFile->getProperty('width'));\n $this->tagBuilder->addAttribute('height', $processedFile->getProperty('height'));\n\n if ($this->imageFile->getProperty('title')) {\n $this->tagBuilder->addAttribute('title', $this->imageFile->getProperty('title'));\n }\n if ($this->settings['cssClasses']['img']) {\n $this->tagBuilder->addAttribute('class', $this->settings['cssClasses']['img']);\n }\n\n if (!empty($this->srcset)) {\n $this->tagBuilder->addAttribute('srcset', implode(', ', $this->srcset));\n $this->tagBuilder->addAttribute('sizes', $this->formatSizes());\n }\n\n // add additionalAttributes\n if (is_array($this->additionalAttributes)) {\n foreach ($this->additionalAttributes as $key => $value) {\n $this->tagBuilder->addAttribute($key, $value);\n }\n }\n\n return $this->tagBuilder->render();\n }",
"public function imageCollection(): Collection\n {\n return $this->images ?: $this->images = new Collection();\n }",
"public function getImage(): ?CustomCollectionImage\n {\n return $this->image;\n }",
"public function index()\n {\n return ImageResource::collection($this->image->paginate());\n }",
"public function render()\n {\n $items = implode('', $this->getImages());\n\n return '<div class=\"gallery\">'.$items.'</div>';\n }",
"public function getImages() ;",
"public function getImages();",
"public function fetchImages(){\n\n\t\t\t\treturn $this->fetchTag(\"img\",\"src\");\n\n\t\t\t}",
"static public function getCollectionImages($theCollectionId){\n SingletonHolder::getInstance()->getObject('Logger')->trace(\"Enter\");\n SingletonHolder::getInstance()->getObject('Logger')->trace(\"Geting images from collection [ $theCollectionId ]\");\n $tbTypeCollectionImage = new TB_TypeCollectionImage();\n $tbTypeCollectionImage->open();\n $tbTypeCollectionImage->searchByColumn(TB_TypeCollectionImage::CollectionIdColumnC, $theCollectionId);\n $tbConfiguration = SingletonHolder::getInstance()->getObject(TB_Configuration::TB_ConfigurationTableC);\n $tbConfiguration->reset();\n $tbConfiguration->searchByKey('URL');\n $url = $tbConfiguration->getValue();\n $tbConfiguration->reset();\n $tbConfiguration->searchByKey('thumbnailsPath');\n $thumbnailPath = $tbConfiguration->getValue();\n \n?>\n <div style=\"width: 100%; height: 125px;\"></div>\n <section id=\"Main-Section\" class=\"Main-Section\">\n <h1 class=\"Class-H1\"><?php print($tbTypeCollectionImage->getTypeName());?></h1>\n <h2 class=\"Class-H2\"><?php print($tbTypeCollectionImage->getCollectionName());?></h2>\n <div id=\"CollectionImages-<?php print($theCollectionId);?>\" class=\"Grid\">\n<?php\n $numCols = self::NUM_GRID_COLUMNS_C;\n $closePrevious = false;\n \n while($tbTypeCollectionImage->next()){\n if ($numCols == self::NUM_GRID_COLUMNS_C){\n if ($closePrevious){\n?>\n </ul>\n<?php \n $closePrevious = false;\n }\n?>\n <ul class=\"Grid-Row\">\n<?php\n $numCols = 0;\n $closePrevious = true;\n }\n $arrayPathFilename = explode(\"/\",$tbTypeCollectionImage->getImagePath());\n $filePath = \"\";\n for ($idx = 0; $idx < count($arrayPathFilename); $idx++){\n if ($idx != count($arrayPathFilename) -1 ){\n $filePath .= $arrayPathFilename[$idx] . \"/\";\n }\n }\n $fileName = $arrayPathFilename[count($arrayPathFilename) -1 ];\n SingletonHolder::getInstance()->getObject('Logger')->trace(\"File Path [ $filePath ]. File Name [ $fileName ]\");\n \n?>\n <li class=\"Grid-Col Grid-3-Cols\">\n <img class=\"Gallery-Item\" alt=\"\" src=\"<?php print(createThumbnail($filePath, \n $fileName, 150, 150,\n $filePath.$thumbnailPath \n ,\"\",\n SingletonHolder::getInstance()->getObject('Logger')));?>\" title=\"<?php print($tbTypeCollectionImage->getImageDescription());?>\"\n data-image_source=\"<?php print($url.$filePath.$fileName);?>\"\n data-image_desc=\"<?php print($tbTypeCollectionImage->getImageDescription());?>\">\n </li>\n<?php\n $numCols ++;\n }\n if ($closePrevious){\n?>\n </ul>\n<?php \n } \n?>\n </div>\n <script type=\"text/javascript\">\n \n Gallery.init(\"CollectionImages-<?php print($theCollectionId);?>\", \n \"<?php print($url.\"images/ajax-loader.gif\");?>\");\n </script>\n </section> \n \n<?php\n SingletonHolder::getInstance()->getObject('Logger')->trace(\"Exit\");\n }",
"public function getImageUrl(){\n return Url::to($this->detailDir.$this->pic); \n }",
"public function images() {\n\t\t$this->_context->Html->applyFilter('image', function($self, $params, $chain) {\n\t\t\t$library = $this->_conf;\n\t\t\t// Set defaults\n\t\t\t$library += array('config' => array());\n\t\t\t$library['config'] += array('image' => array());\n\t\t\t$library['config']['image'] += array(\n\t\t\t\t'compression' => true,\n\t\t\t\t'allowed_formats' => array('jpeg', 'jpg', 'jpe', 'png', 'gif')\n\t\t\t);\n\n\t\t\t// If the image is not in the list of allowed formats or compression is false, don't encode it, just display it as normal\n\t\t\t$format = substr($params['path'], strrpos($params['path'], '.') + 1);\n\t\t\tif ((!in_array($format, $library['config']['image']['allowed_formats'])) || ($library['config']['image']['compression'] !== true)) {\n\t\t\t\treturn $chain->next($self, $params, $chain);\n\t\t\t}\n\n\t\t\t// Encode the image data\n\t\t\tif (substr($params['path'], 0, 4) == 'http') {\n\t\t\t\t$file = $params['path'];\n\t\t\t} else {\n\t\t\t\t$file = Media::webroot(true).Media::asset($params['path'], 'image');\n\t\t\t}\n\t\t\t$data = base64_encode(file_get_contents($file));\n\n\t\t\t// Set the html options that go within the img tag\n\t\t\t$html_options = '';\n\t\t\tforeach ($params['options'] as $k => $v) {\n\t\t\t\t$html_options .= $k.'=\"'.htmlspecialchars($v, ENT_QUOTES, 'UTF-8').'\" ';\n\t\t\t}\n\n\t\t\t// Return the image URI\n\t\t\treturn '<img src=\"data:image/'.$format.';base64,'.$data.'\" '.$html_options.'/>';\n\t\t});\n\t}",
"public function getImageHtml() { return $this->imageHtml; }",
"function htmlImages($src)\n{\n\treturn '<img src=' . $src . '>';\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the progress of the scanning (or initial ingest of scanned pages) AJAX: Gets the list of files for this book and their status as to being scanned and processed. The data comes from the database, which is in turn populated by the cron job. This also includes information about how many pages were found and how many are remaining to be imported. | function progress() {
if (!$this->common->check_session(true)) {
return;
}
$this->common->ajax_headers();
$bc = $this->session->userdata('barcode');
$this->book->load($bc);
// Strip out anything that's Processed. We want them to disappear from
// the list when they are done.
$raw_pages = $this->book->get_pages('filebase', 'asc');
$pages = array();
$c = 0;
foreach ($raw_pages as $p) {
if ($p->status != 'Processed') {
array_push($pages, $p);
$c++;
if ($c == 15) {
break;
}
}
}
// If we got no pages, let's see what's on disk.
if (count($pages) == 0) {
$incoming = $this->cfg['incoming_directory'];
$files = get_filenames($incoming.'/'.$bc);
sort($files);
$pages = array();
foreach ($files as $f) {
$info = get_file_info($incoming.'/'.$bc.'/'.$f, 'size');
$pages[] = array(
'filebase' => preg_replace('/\.(.+)$/', '', $f),
'size' => $info['size'],
'status' => 'New',
);
if (count($pages) >= 20) {
break;
}
} // foreach ($files as $f)
}
// Send out results
echo json_encode(array(
'Result' => $pages,
'Pages_Found' => ($this->book->pages_found ? $this->book->pages_found : 0) ,
'Pages_Imported' => ($this->book->pages_scanned ? $this->book->pages_scanned : 0),
'Time_Start' => $this->book->scan_time,
'Time_Now' => time(),
));
} | [
"public function get_scan_progress() {\n\t\t// We're not scanning or processing, return 0\n\t\tif ( ! $this->is_scanning() && ! $this->is_processing() ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$files = $this->count_files();\n\n\t\t// Only count unique file copy actions as remove's are generally paired with copy actions and require much less time.\n\t\t$to_process = array_unique(\n\t\t\tarray_map(\n\t\t\t\tfunction ( $job ) {\n\t\t\t\t\tif ( 'copy' === $job['action'] ) {\n\t\t\t\t\t\treturn $job['file'];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t},\n\t\t\t\t$this->process_assets->to_process()\n\t\t\t)\n\t\t);\n\n\t\t// There are no files to scan, return 0\n\t\tif ( 0 === $files ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// We have files to process, count them\n\t\tif ( false !== $to_process ) {\n\t\t\t$files_to_process = count( $to_process );\n\t\t} else {\n\t\t\t// There are no more files to scan, return 100\n\t\t\treturn 100;\n\t\t}\n\n\t\t// Calculate the percentage processed\n\t\t$percent_left = ( min( $files_to_process, $files ) / $files ) * 100;\n\t\t$progress = round( 100 - $percent_left, 2 );\n\n\t\treturn $progress;\n\t}",
"public function check_status() {\n\t\tif ( ! WD_Utils::check_permission() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( WD_Utils::http_post( 'wd_scan_nonce' ), 'query_scan_progress' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tob_start();\n\t\t//clear cache\n\t\t//if we has any cron, remove it immediatly\n\t\twp_clear_scheduled_hook( 'wd_scanning_hook' );\n\t\t//processing a scan here\n\t\t$this->process_a_scan();\n\t\t//the rest should act normal\n\n\t\t$model = WD_Scan_Api::get_active_scan( true );\n\t\tif ( ! is_object( $model ) ) {\n\t\t\t$model = WD_Scan_Api::get_last_scan();\n\t\t} else {\n\t\t\t$model->save();\n\t\t}\n\t\tob_clean();\n\n\t\t//trigger\n\t\t//$progress = get_site_transient( WD_Scan_Api::CACHE_SCAN_PERCENT ) == false ? 0 : get_site_transient( WD_Scan_Api::CACHE_SCAN_PERCENT );\n\t\t$progress = $model->get_percent();\n\t\t$alert = get_site_transient( WD_Scan_Api::ALERT_NESTED_WP );\n\t\t/*if ( $alert ) {\n\t\t\t$alert = implode( '<br/>', $alert );\n\t\t} else {\n\t\t\t$alert = 0;\n\t\t}*/\n\t\t$md5_alert = get_site_transient( WD_Scan_Api::ALERT_NO_MD5 );\n\t\twp_send_json( array(\n\t\t\t'progress' => $progress,\n\t\t\t'message' => $model->message,\n\t\t\t'complete' => $model->status == WD_Scan_Result_Model::STATUS_COMPLETE,\n\t\t\t'error' => $model->status == WD_Scan_Result_Model::STATUS_ERROR,\n\t\t\t'scanned' => $this->scanned_to_html( true ),\n\t\t\t'alert' => $alert,\n\t\t\t'md5_alert' => $md5_alert,\n\t\t\t'abs_path' => ABSPATH\n\t\t) );\n\t}",
"function get_progress() {\n\treturn '\"' . file_get_contents(get_ajax_progress_file_path()) . '\"';\n}",
"public function getProgress();",
"function exploitscanner_ajax_file_scan() {\n\tob_get_clean();\n\tcheck_ajax_referer( 'exploit-scanner_scan' );\n\n\tif ( ! isset($_POST['start']) )\n\t\tdie( json_encode( array( 'status' => 'error', 'data' => 'Error: start not set.' ) ) );\n\telse\n\t\t$start = (int) $_POST['start'];\n\n\t$fsl = ( ! isset($_POST['filesize_limit']) || ! is_numeric($_POST['filesize_limit']) ) ? 400 : (int) $_POST['filesize_limit'];\n\t$max = ( ! isset($_POST['max_batch_size']) || ! is_numeric($_POST['max_batch_size']) ) ? 100 : (int) $_POST['max_batch_size'];\n\t$display_pattern = ( $_POST['display_pattern'] != 'false' ) ? true : false;\n\n\t$args = compact( 'start', 'fsl', 'max', 'display_pattern' );\n\n\t$scanner = new File_Exploit_Scanner( ABSPATH, $args );\n\t$result = $scanner->run();\n\tif ( is_wp_error($result) ) {\n\t\t$message = $result->get_error_message();\n\t\t$data = $result->get_error_data();\n\t\techo json_encode( array( 'status' => 'error', 'message' => $message, 'data' => $data ) );\n\t} else if ( $result ) {\n\t\techo json_encode( array( 'status' => 'complete' ) );\n\t} else {\n\t\techo json_encode( array( 'status' => 'running', 'data' => 'Files scanned: ' . ($start+$max) . '...' ) );\n\t}\n\n\texit;\n}",
"public static function import_progress_details() {\n\t\t$import_in_progress = (bool) get_option( 'rank_math_csv_import_redirections' );\n\t\tif ( $import_in_progress ) {\n\t\t\t$total_lines = (int) get_option( 'rank_math_csv_import_redirections_total' );\n\t\t\t$remaining_items = Import_Background_Process::get()->count_remaining_items();\n\t\t\t$progress = $total_lines ? ( $total_lines - $remaining_items + 1 ) / $total_lines * 100 : 0;\n\t\t\t?>\n\t\t\t<p><?php esc_html_e( 'Import in progress...', 'rank-math-pro' ); ?></p>\n\t\t\t<p class=\"csv-import-redirections-status\">\n\t\t\t\t<?php // Translators: placeholders represent count like 15/36. ?>\n\t\t\t\t<?php printf( esc_html__( 'Items processed: %1$s/%2$s', 'rank-math-pro' ), min( $total_lines, $total_lines - $remaining_items + 1 ), $total_lines ); ?>\n\t\t\t</p>\n\t\t\t<div id=\"csv-import-redirections-progress-bar\">\n\t\t\t\t<div class=\"total\">\n\t\t\t\t\t<div class=\"progress-bar\" style=\"width: <?php echo absint( $progress ); ?>%;\"></div>\n\t\t\t\t</div>\n\t\t\t\t<input type=\"hidden\" id=\"csv-import-redirections-progress-value\" value=\"<?php echo absint( $progress ); ?>\">\n\t\t\t</div>\n\t\t\t<?php\n\t\t} else {\n\t\t\t$status = (array) get_option( 'rank_math_csv_import_redirections_status', [] );\n\n\t\t\t$classes = 'import-finished';\n\t\t\tif ( ! empty( $status['errors'] ) ) {\n\t\t\t\t$classes .= ' import-errors';\n\t\t\t}\n\n\t\t\t$message = self::get_import_complete_message();\n\t\t\t?>\n\t\t\t\t<p class=\"<?php echo esc_attr( $classes ); ?>\"><?php echo wp_kses_post( $message ); ?></p>\n\t\t\t<?php\n\t\t}\n\t}",
"function getThumbProgress()\n {\n // release the locks, session not needed\n $session = \\cmsSession::getInstance();\n $session->releaseLocks();\n session_write_close();\n \n $key = isset($_GET['key']) ? $_GET['key'] : '';\n $processFile = $session->getTempPath() .'/progress' . $key . '.txt';\n \n $process = 0;\n if (file_exists($processFile)) {\n $process = file_get_contents($processFile);\n if ($process == 100) {\n \\Cx\\Lib\\FileSystem\\FileSystem::delete_file($processFile);\n }\n }\n \n echo $process;\n die;\n }",
"function ajax_file_search() {\n\t\t\n\t\t$files_per_chunk = 500;\n\t\t$response = array(\n\t\t\t'search' => array(),\n\t\t\t'filenum' => absint( $_POST['filenum'] ),\n\t\t);\n\n\t\t$filenum = absint( $_POST['filenum'] );\n\t\t$next_file = $filenum + 1;\n\n\t\t$next_chunk = ( ceil( ( $next_file ) / $files_per_chunk ) - 1 );\n\t\t$chunk = ( ceil( $filenum / $files_per_chunk ) - 1 );\n\t\tif ( $chunk < 0 ) {\n\t\t\t$chunk = 0;\n\t\t}\n\t\tif ( $next_chunk < 0 ) {\n\t\t\t$next_chunk = 0;\n\t\t}\n\n\t\t$scan_data = get_transient( 'string-locator-search-overview' );\n\t\t$file_data = get_transient( 'string-locator-search-files-' . $chunk );\n\n\t\tif ( ! isset( $file_data[ $filenum ] ) ) {\n\t\t\treturnJsonHttpResponse(false, array(\n\t\t\t\t\t'continue' => false,\n\t\t\t\t\t'message' => sprintf(\n\t\t\t\t\t\t/* translators: %d: The numbered reference to a file being searched. */\n\t\t\t\t\t\t'The file-number, %d, that was sent could not be found.',\n\t\t\t\t\t\t$filenum\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif ( $this->nearing_execution_limit() ) {\n\t\t\treturnJsonHttpResponse(false, array(\n\t\t\t\t\t'continue' => false,\n\t\t\t\t\t'message' => sprintf(\n\t\t\t\t\t\t/* translators: %1$d: The time a PHP file can run, as defined by the server configuration. %2$d: The amount of time used by the PHP file so far. */\n\t\t\t\t\t\t'The maximum time your server allows a script to run (%1$d) is too low for the plugin to run as intended, at startup %2$d seconds have passed',\n\t\t\t\t\t\t$this->max_execution_time,\n\t\t\t\t\t\t$this->nearing_execution_limit()\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tif ( $this->nearing_memory_limit() ) {\n\t\t\treturnJsonHttpResponse(false,\n\t\t\t\tarray(\n\t\t\t\t\t'continue' => false,\n\t\t\t\t\t'message' => sprintf(\n\t\t\t\t\t\t/* translators: %1$d: Current amount of used system memory resources. %2$d: The maximum available system memory. */\n\t\t\t\t\t\t'The memory limit is about to be exceeded before the search has started, this could be an early indicator that your site may soon struggle as well, unfortunately this means the plugin is unable to perform any searches. Current memory consumption: %1$d of %2$d bytes',\n\t\t\t\t\t\t$this->nearing_memory_limit(),\n\t\t\t\t\t\t$this->max_memory_consumption\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$is_regex = false;\n\t\tif ( isset( $scan_data->regex ) ) {\n\t\t\t$is_regex = $this->absbool( $scan_data->regex );\n\t\t}\n\n\t\tif ( $is_regex ) {\n\t\t\tif ( false === @preg_match( $scan_data->search, '' ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged\n\t\t\t\treturnJsonHttpResponse(false,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'continue' => false,\n\t\t\t\t\t\t'message' => sprintf(\n\t\t\t\t\t\t\t/* translators: %s: The search string used. */\n\t\t\t\t\t\t\t'Your search string, <strong>%s</strong>, is not a valid pattern, and the search has been aborted.',\n\t\t\t\t\t\t\tesc_html( $scan_data->search )\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\twhile ( ! $this->nearing_execution_limit() && ! $this->nearing_memory_limit() && isset( $file_data[ $filenum ] ) ) {\n\t\t\t$filenum = absint( $_POST['filenum'] );\n\t\t\t$search_results = null;\n\t\t\t$next_file = $filenum + 1;\n\n\t\t\t$next_chunk = ( ceil( ( $next_file ) / $files_per_chunk ) - 1 );\n\t\t\t$chunk = ( ceil( $filenum / $files_per_chunk ) - 1 );\n\t\t\tif ( $chunk < 0 ) {\n\t\t\t\t$chunk = 0;\n\t\t\t}\n\t\t\tif ( $next_chunk < 0 ) {\n\t\t\t\t$next_chunk = 0;\n\t\t\t}\n\n\t\t\tif ( ! isset( $file_data[ $filenum ] ) ) {\n\t\t\t\t$chunk ++;\n\t\t\t\t$file_data = get_transient( 'string-locator-search-files-' . $chunk );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$file_name = explode( '/', $file_data[ $filenum ] );\n\t\t\t$file_name = end( $file_name );\n\n\t\t\t/*\n\t\t\t * Check the file type, if it's an unsupported type, we skip it\n\t\t\t */\n\t\t\t$file_type = explode( '.', $file_name );\n\t\t\t$file_type = strtolower( end( $file_type ) );\n\n\t\t\t/*\n\t\t\t * Scan the file and look for our string, but only if it's an approved file extension\n\t\t\t */\n\t\t\t$bad_file_types = $this->bad_file_types;\n\t\t\tif ( ! in_array( $file_type, $bad_file_types, true ) ) {\n\t\t\t\t$search_results = $this->scan_file( $file_data[ $filenum ], $scan_data->search, $file_data[ $filenum ], $scan_data->scan_path->type, '', $is_regex );\n\t\t\t}\n\n\t\t\t$response['last_file'] = $file_data[ $filenum ];\n\t\t\t$response['filenum'] = $filenum;\n\t\t\t$response['filename'] = $file_name;\n\t\t\tif ( $search_results ) {\n\t\t\t\t$response['search'][] = $search_results;\n\t\t\t}\n\n\t\t\tif ( $next_chunk !== $chunk ) {\n\t\t\t\t$file_data = get_transient( 'string-locator-search-files-' . $next_chunk );\n\t\t\t}\n\n\t\t\t$response['next_file'] = ( isset( $file_data[ $next_file ] ) ? $file_data[ $next_file ] : '' );\n\n\t\t\tif ( ! empty( $search_results ) ) {\n\t\t\t\t$history = array();\n\t\t\t\t$history = array_merge( $history, $search_results );\n\t\t\t\t//update_option( 'string-locator-search-history', $history, false );\n\t\t\t}\n\n\t\t\t$_POST['filenum'] ++;\n\t\t}\n\n\t\treturnJsonHttpResponse(true, $response );\n\t}",
"function _incrementalDbAction_getProgress() { \r\n $currentOperation = _incrementalDbAction_currentOperation();\r\n\r\n $filesize = filesize($currentOperation['filePath']);\r\n $offset = $currentOperation['fileOffset'];\r\n $percentageComplete = intval(($offset / $filesize) * 100);\r\n $elapsedSeconds = time() - $currentOperation['startTime'];\r\n $elapsedMinutes = intval($elapsedSeconds / 60);\r\n $elapsedTime = $elapsedSeconds < 60 ? \"$elapsedSeconds seconds\" : \"$elapsedMinutes minutes\";\r\n $actionName = ucfirst($currentOperation['action']);\r\n \r\n //$text = \"$actionName progress: $percentageComplete% complete, elapsed runtime: $elapsedTime<br>\\n\";\r\n return [$percentageComplete, $elapsedTime, $actionName];\r\n}",
"public static function import_progress_details() {\n\t\t$import_in_progress = (bool) get_option( 'rank_math_csv_import' );\n\t\tif ( $import_in_progress ) {\n\t\t\t$total_lines = (int) get_option( 'rank_math_csv_import_total' );\n\t\t\t$remaining_items = Import_Background_Process::get()->count_remaining_items();\n\t\t\t$progress = $total_lines ? ( $total_lines - $remaining_items + 1 ) / $total_lines * 100 : 0;\n\t\t\t?>\n\t\t\t<p><?php esc_html_e( 'Import in progress...', 'rank-math-pro' ); ?></p>\n\t\t\t<p class=\"csv-import-status\">\n\t\t\t\t<?php // Translators: placeholders represent count like 15/36. ?>\n\t\t\t\t<?php printf( esc_html__( 'Items processed: %1$s/%2$s', 'rank-math-pro' ), min( $total_lines, $total_lines - $remaining_items + 1 ), $total_lines ); ?>\n\t\t\t</p>\n\t\t\t<div id=\"csv-import-progress-bar\">\n\t\t\t\t<div class=\"total\">\n\t\t\t\t\t<div class=\"progress-bar\" style=\"width: <?php echo absint( $progress ); ?>%;\"></div>\n\t\t\t\t</div>\n\t\t\t\t<input type=\"hidden\" id=\"csv-import-progress-value\" value=\"<?php echo absint( $progress ); ?>\">\n\t\t\t</div>\n\t\t\t<?php\n\t\t} else {\n\t\t\t$status = (array) get_option( 'rank_math_csv_import_status', [] );\n\n\t\t\t$classes = 'import-finished';\n\t\t\tif ( ! empty( $status['errors'] ) ) {\n\t\t\t\t$classes .= ' import-errors';\n\t\t\t}\n\n\t\t\t$message = self::get_import_complete_message();\n\t\t\t?>\n\t\t\t\t<p class=\"<?php echo esc_attr( $classes ); ?>\"><?php echo wp_kses_post( $message ); ?></p>\n\t\t\t<?php\n\t\t}\n\t}",
"public function upload_progress()\n {\n $params = array(\n 'action' => $this->action,\n 'name' => rcube_utils::get_input_value('_progress', rcube_utils::INPUT_GET),\n );\n\n if (function_exists('uploadprogress_get_info')) {\n $status = uploadprogress_get_info($params['name']);\n\n if (!empty($status)) {\n $params['current'] = $status['bytes_uploaded'];\n $params['total'] = $status['bytes_total'];\n }\n }\n\n if (!isset($status) && filter_var(ini_get('apc.rfc1867'), FILTER_VALIDATE_BOOLEAN)\n && ini_get('apc.rfc1867_name')\n ) {\n $prefix = ini_get('apc.rfc1867_prefix');\n $status = apc_fetch($prefix . $params['name']);\n\n if (!empty($status)) {\n $params['current'] = $status['current'];\n $params['total'] = $status['total'];\n }\n }\n\n if (!isset($status) && filter_var(ini_get('session.upload_progress.enabled'), FILTER_VALIDATE_BOOLEAN)\n && ini_get('session.upload_progress.name')\n ) {\n $key = ini_get('session.upload_progress.prefix') . $params['name'];\n\n $params['total'] = $_SESSION[$key]['content_length'];\n $params['current'] = $_SESSION[$key]['bytes_processed'];\n }\n\n if (!empty($params['total'])) {\n $total = $this->show_bytes($params['total'], $unit);\n switch ($unit) {\n case 'GB':\n $gb = $params['current']/1073741824;\n $current = sprintf($gb >= 10 ? \"%d\" : \"%.1f\", $gb);\n break;\n case 'MB':\n $mb = $params['current']/1048576;\n $current = sprintf($mb >= 10 ? \"%d\" : \"%.1f\", $mb);\n break;\n case 'KB':\n $current = round($params['current']/1024);\n break;\n case 'B':\n default:\n $current = $params['current'];\n break;\n }\n\n $params['percent'] = round($params['current']/$params['total']*100);\n $params['text'] = $this->gettext(array(\n 'name' => 'uploadprogress',\n 'vars' => array(\n 'percent' => $params['percent'] . '%',\n 'current' => $current,\n 'total' => $total\n )\n ));\n }\n\n $this->output->command('upload_progress_update', $params);\n $this->output->send();\n }",
"public function rescanprogress()\n\t{\n\t\treturn $this->CLI->arrayQuery(\"rescanprogress\");\n\t}",
"public function getProgress()\n {\n /** @var $indexService \\ApacheSolrForTypo3\\Solr\\Domain\\Index\\IndexService */\n $indexService = GeneralUtility::makeInstance(IndexService::class, $this->site);\n $indexService->setContextTask($this);\n\n return $indexService->getProgress();\n }",
"public function scan_filesystem()\n {\n $data = array();\n\n $this->check_access();\n\n $params = json_decode(stripslashes($_POST['data']));\n\n $init = (int)$_POST['init'];\n\n if ($params === null) {\n $this->send_response('{\"status\":false,\"msg\":\"The post_data profile parameter must be valid JSON\"}');\n }\n\n $this->process_params($params);\n\n $this->xcloner_file_system->set_excluded_files($this->form_params['excluded_files']);\n\n $return = $this->xcloner_file_system->start_file_recursion($init);\n\n $data[\"finished\"] = !$return;\n $data[\"total_files_num\"] = $this->xcloner_file_system->get_scanned_files_num();\n $data[\"last_logged_file\"] = $this->xcloner_file_system->last_logged_file();\n $data[\"total_files_size\"] = sprintf(\n \"%.2f\",\n $this->xcloner_file_system->get_scanned_files_total_size() / (1024 * 1024)\n );\n\n return $this->send_response($data, $hash = 1);\n }",
"function monitor() {\n\t\t$this->common->check_session();\n\t\t// Permission Checking\n\t\tif (!$this->user->has_permission('scan')) {\n\t\t\t$this->session->set_userdata('errormessage', 'You do not have permission to access that page.');\n\t\t\tredirect($this->config->item('base_url').'main');\n\t\t\t$this->logging->log('error', 'debug', 'Permission Denied to access '.uri_string());\n\t\t\treturn;\n\t\t}\n\n\t\t$barcode = $this->session->userdata('barcode');\n\t\t// Get our book\n\t\t$this->book->load($barcode);\n\t\t$this->common->check_missing_metadata($this->book);\n\n\t\t// We found something!\n\t\t$data['item_title'] = $this->session->userdata('title');\n\t\t$data['ip_address'] = $_SERVER['REMOTE_ADDR'];\n\t\t$data['hostname'] = $this->common->_get_host($_SERVER['REMOTE_ADDR']);\n\t\t$data['incoming_path'] = $this->cfg['incoming_directory'].'/'.$barcode;\n\t\tif ($this->cfg['incoming_directory_remote'] == '') {\n\t\t\t$data['remote_path'] = $this->cfg['incoming_directory'].'/'.$barcode;\n\t\t} else {\n\t\t\t$data['remote_path'] = $this->cfg['incoming_directory_remote'].'/'.$barcode;\n\t\t}\n\t\t$status = $this->book->status;\n\t\tif ($status == 'new' || $status == 'scanning') {\n\t\t\t$data['book_has_missing_pages'] = false;\n\t\t} else {\n\t\t\t$data['book_has_missing_pages'] = true;\t\t\n\t\t}\n\n\t\t// The path can be blank, so we need to handle things properly.\n\t\tif ($this->cfg['incoming_directory'] && !file_exists($data['incoming_path'])) {\n\t\t\t// If the folder for the new pages is not there, we add it.\n\t\t\t// Assume that we've already checked for writability in this folder. (which we have, in the Common library)\n\t\t\tmkdir($data['incoming_path']);\n\t\t\t$this->logging->log('access', 'info', 'Created incoming directory: '.$data['incoming_path']);\n\t\t}\n\t\t$this->logging->log('access', 'info', 'Scanning monitor loaded for '.$barcode.'.');\n\n\t\t$this->load->view('scan/monitor_view', $data);\n\t}",
"public function csv_import_progress() {\n\t\tcheck_ajax_referer( 'rank_math_csv_progress' );\n\t\tif ( ! current_user_can( 'import' ) ) {\n\t\t\texit( '0' );\n\t\t}\n\n\t\tself::import_progress_details();\n\t\texit;\n\t}",
"public function getScanProgress(Request $request) {\n $this->requirePermission('library.scan-progress');\n\n set_time_limit(0);\n\n @ob_end_clean();\n\n $this->validate($request, [\n 'refreshInterval' => 'numeric'\n ]);\n\n $refreshInterval = clamp(\n $request->input('refreshInterval', DEFAULT_REFRESH_INTERVAL),\n MIN_REFRESH_INTERVAL,\n MAX_REFRESH_INTERVAL\n );\n\n $sharedScanInfo = new SharedMemory(new StorageFile(LibraryActor::getSyncFilePath()));\n\n $response = new StreamedResponse(function() use ($refreshInterval, &$sharedScanInfo) {\n while(1) {\n if (!isset($sharedScanInfo->currentState) || $sharedScanInfo->currentState === LibraryActorState::FINISHED) {\n echo 'data: ' . json_encode([\n 'running' => false,\n 'details' => []\n ]) . PHP_EOL . PHP_EOL;\n\n } else {\n echo 'data: ' . json_encode([\n 'running' => true,\n 'details' => [\n 'type' => $sharedScanInfo->type,\n 'currentState' => $sharedScanInfo->currentState,\n 'currentItem' => is_string($sharedScanInfo->currentItem) ? $sharedScanInfo->currentItem : '',\n 'totalItemCount' => is_int($sharedScanInfo->totalItemCount) ? $sharedScanInfo->totalItemCount : 0,\n 'processedItemCount' => is_int($sharedScanInfo->processedItemCount) ? $sharedScanInfo->processedItemCount : 0\n ]\n ]) . PHP_EOL . PHP_EOL;\n }\n\n @ob_flush();\n @flush();\n\n usleep($refreshInterval * 1000000);\n }\n });\n\n $response->headers->set('Content-Type', 'text/event-stream');\n $response->headers->set('Cache-Control', 'no-cache');\n $response->headers->set('X-Accel-Buffering', 'no');\n\n return $response;\n }",
"private function getDownloadStatus(){\n $this->MySql->getUrls();\n if ($this->MySql->resultUrl && !empty($this->MySql->resultUrl)) {\n foreach ($this->MySql->resultUrl as $value) {\n $this->domainData[$value['id']] = $value;\n $this->MySql->countFileElement($value['id']);\n $this->downlodedResult[$value['id']] = $this->MySql->result;\n $this->MySql->percentage($value['id']);\n $this->percentage[$value['id']] = $this->MySql->result2;\n $this->calculate($value['id']);\n }\n }\n }",
"function progress()\n {\n $this->isParent();\n $page_data['page_name'] = 'progress';\n $page_data['page_title'] = getEduAppGTLang('progress');\n $this->load->view('backend/index', $page_data);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the windowsKioskForceUpdateSchedule force update schedule for Kiosk devices. | public function getWindowsKioskForceUpdateSchedule()
{
if (array_key_exists("windowsKioskForceUpdateSchedule", $this->_propDict)) {
if (is_a($this->_propDict["windowsKioskForceUpdateSchedule"], "\Beta\Microsoft\Graph\Model\WindowsKioskForceUpdateSchedule") || is_null($this->_propDict["windowsKioskForceUpdateSchedule"])) {
return $this->_propDict["windowsKioskForceUpdateSchedule"];
} else {
$this->_propDict["windowsKioskForceUpdateSchedule"] = new WindowsKioskForceUpdateSchedule($this->_propDict["windowsKioskForceUpdateSchedule"]);
return $this->_propDict["windowsKioskForceUpdateSchedule"];
}
}
return null;
} | [
"public function getWindows10AppsForceUpdateSchedule(): ?Windows10AppsForceUpdateSchedule {\n $val = $this->getBackingStore()->get('windows10AppsForceUpdateSchedule');\n if (is_null($val) || $val instanceof Windows10AppsForceUpdateSchedule) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'windows10AppsForceUpdateSchedule'\");\n }",
"public function getUpdateScheduleType()\n {\n if (array_key_exists(\"updateScheduleType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"updateScheduleType\"], \"\\Beta\\Microsoft\\Graph\\Model\\MacOSSoftwareUpdateScheduleType\") || is_null($this->_propDict[\"updateScheduleType\"])) {\n return $this->_propDict[\"updateScheduleType\"];\n } else {\n $this->_propDict[\"updateScheduleType\"] = new MacOSSoftwareUpdateScheduleType($this->_propDict[\"updateScheduleType\"]);\n return $this->_propDict[\"updateScheduleType\"];\n }\n }\n return null;\n }",
"public function getAppleWatchForceWristDetection()\n {\n if (array_key_exists(\"appleWatchForceWristDetection\", $this->_propDict)) {\n return $this->_propDict[\"appleWatchForceWristDetection\"];\n } else {\n return null;\n }\n }",
"public static function getKiosk() {\n\t return self::getPathParams()['kiosk'];\n\t}",
"public function getWeeklySchedule()\n {\n return $this->weekly_schedule;\n }",
"public function getKioskModeAllowAutoLock()\n {\n if (array_key_exists(\"kioskModeAllowAutoLock\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeAllowAutoLock\"];\n } else {\n return null;\n }\n }",
"public function getDaysUntilForcedReboot()\n {\n if (array_key_exists(\"daysUntilForcedReboot\", $this->_propDict)) {\n return $this->_propDict[\"daysUntilForcedReboot\"];\n } else {\n return null;\n }\n }",
"public function getKioskModeApps()\n {\n if (array_key_exists(\"kioskModeApps\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeApps\"];\n } else {\n return null;\n }\n }",
"public function getDefenderSystemScanSchedule(): ?WeeklySchedule {\n $val = $this->getBackingStore()->get('defenderSystemScanSchedule');\n if (is_null($val) || $val instanceof WeeklySchedule) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'defenderSystemScanSchedule'\");\n }",
"public function getWFScheduleTime()\n\t{\n\t\treturn $this->schtime;\n\t}",
"public function getCriticalUpdateBehavior()\n {\n if (array_key_exists(\"criticalUpdateBehavior\", $this->_propDict)) {\n if (is_a($this->_propDict[\"criticalUpdateBehavior\"], \"\\Beta\\Microsoft\\Graph\\Model\\MacOSSoftwareUpdateBehavior\") || is_null($this->_propDict[\"criticalUpdateBehavior\"])) {\n return $this->_propDict[\"criticalUpdateBehavior\"];\n } else {\n $this->_propDict[\"criticalUpdateBehavior\"] = new MacOSSoftwareUpdateBehavior($this->_propDict[\"criticalUpdateBehavior\"]);\n return $this->_propDict[\"criticalUpdateBehavior\"];\n }\n }\n return null;\n }",
"public function getWindowsUpdate()\n {\n return $this->windows_update;\n }",
"public function getDefaultSchedule()\n {\n return $this->default_schedule;\n }",
"public function getScheduleInfo()\n {\n if (array_key_exists(\"scheduleInfo\", $this->_propDict)) {\n if (is_a($this->_propDict[\"scheduleInfo\"], \"\\Beta\\Microsoft\\Graph\\Model\\RequestSchedule\") || is_null($this->_propDict[\"scheduleInfo\"])) {\n return $this->_propDict[\"scheduleInfo\"];\n } else {\n $this->_propDict[\"scheduleInfo\"] = new RequestSchedule($this->_propDict[\"scheduleInfo\"]);\n return $this->_propDict[\"scheduleInfo\"];\n }\n }\n return null;\n }",
"public function getScheduledUpdator()\n {\n $this->_checkBuildRequirement();\n return $this->scheduledUpdater;\n }",
"public function getKioskModeScreenSaverConfigurationEnabled()\n {\n if (array_key_exists(\"kioskModeScreenSaverConfigurationEnabled\", $this->_propDict)) {\n return $this->_propDict[\"kioskModeScreenSaverConfigurationEnabled\"];\n } else {\n return null;\n }\n }",
"public function getRecurrence()\n {\n if (array_key_exists(\"recurrence\", $this->_propDict)) {\n if (is_a($this->_propDict[\"recurrence\"], \"\\Beta\\Microsoft\\Graph\\Model\\Windows10AppsUpdateRecurrence\") || is_null($this->_propDict[\"recurrence\"])) {\n return $this->_propDict[\"recurrence\"];\n } else {\n $this->_propDict[\"recurrence\"] = new Windows10AppsUpdateRecurrence($this->_propDict[\"recurrence\"]);\n return $this->_propDict[\"recurrence\"];\n }\n }\n return null;\n }",
"protected function _getSchedule()\n {\n // Get frequency and offset from posted data\n $data = Mage::app()->getRequest()->getPost('groups');\n $frequency = !empty($data['mailup']['fields']['mailup_cron_frequency']['value'])?\n $data['mailup']['fields']['mailup_cron_frequency']['value']:\n MailUp_MailUpSync_Model_Adminhtml_System_Source_Cron_Frequency::HOURLY;\n $offset = !empty($data['mailup']['fields']['mailup_cron_offset']['value'])?\n $data['mailup']['fields']['mailup_cron_offset']['value']:\n 0;\n\n // Get period between calls and calculate explicit hours using this and offset\n $period = MailUp_MailUpSync_Model_Adminhtml_System_Source_Cron_Frequency::getPeriod($frequency);\n if ($period === null) {\n Mage::log(\"MailUp: Could not find cron frequency in valid list. Defaulted to hourly\", Zend_Log::ERR);\n $period = 1;\n }\n $hoursStr = $this->_calculateHourFreqString($period, $offset);\n\n return \"0 {$hoursStr} * * *\";\n }",
"public function getSystemUpdateWindowStartMinutesAfterMidnight()\n {\n if (array_key_exists(\"systemUpdateWindowStartMinutesAfterMidnight\", $this->_propDict)) {\n return $this->_propDict[\"systemUpdateWindowStartMinutesAfterMidnight\"];\n } else {\n return null;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the resource has a link set | public function hasLink()
{
return $this->ResourceLink !== null;
} | [
"public function hasLink() {\n return $this->link!=null;\n }",
"public function hasHref();",
"public function hasLinks()\n {\n return ! empty($this->links);\n }",
"public function hasLink()\n {\n return !starts_with($this->attributes['link'], LARACRUMB_NOLINK_PREFIX);\n }",
"public function has_set_url() {\r\n return ($this->_url!==null);\r\n }",
"public function isLink();",
"protected function hasLinks(): bool\n {\n return $this->links->isNotEmpty();\n }",
"public function hasLink()\n {\n return (boolean) $this->getLink();\n }",
"public function hasLink()\n {\n return (boolean) $this->owner->getLink();\n }",
"public function checkLink(ResourceInterface $resource);",
"public function hasLinkWithKey($key) {\n return array_key_exists($key, $this->links);\n }",
"protected function cardHasLinkedButton(): bool {\n $button = $this->getCardButton();\n return !is_null($button) &&\n $button->getText() === 'Get started' &&\n $button->getTagName() === 'a' &&\n $button->getAttribute('href') === 'https://uiowa.edu';\n }",
"public function hasResource()\n {\n return !is_null($this->resource);\n }",
"public function hasAclResource()\n {\n return array_key_exists(EntityDefinitionConfig::ACL_RESOURCE, $this->items);\n }",
"public function hasHyperlinks()\n\t{\n\t\treturn $this->getNumHyperlinks() > 0;\n\t}",
"protected function isContainerMetaDataRequired()\n\t{\n\t\tinclude_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';\n\t\treturn ilLinkResourceItems::lookupNumberOfLinks($this->object->getId()) == 1;\n\t}",
"public static function supportsLink()\n {\n return function_exists( 'link' );\n }",
"public function anyLinkPressed() {\n if(\n isset($_GET[self::$lengthLink]) || \n isset($_GET[self::$areaLink])|| \n isset($_GET[self::$massLink])|| \n isset($_GET[self::$temperatureLink])|| \n isset($_GET[self::$currencyLink])|| \n isset($_GET[self::$volumeLink])||\n isset($_GET[self::$caseLink])||\n isset($_GET[self::$caseLink])||\n isset($_GET[self::$speedLink])||\n isset($_GET[self::$timeLink])||\n isset($_GET[self::$angleLink])||\n isset($_GET[self::$bytesLink])) \n return true;\n else\n return false;\n }",
"function validateLinks()\r\n {\r\n if (empty($this->handler->table_link) || empty($this->handler->field_link)) {\r\n trigger_error(\"The linked table is not set yet.\", E_USER_WARNING);\r\n return null;\r\n }\r\n if (empty($this->handler->field_object)) {\r\n $this->handler->field_object = $this->handler->field_link;\r\n }\r\n \r\n return true;\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new array containing all elements from source except any that are also present in exclude. Both input arrays must be sorted. This function will reset the pointer for both arrays. | public static function exclude_sorted(&$source, &$exclude) {
$output = array();
$countSrc = count($source);
$countExl = count($exclude);
$valSrc = reset($source);
$valExl = reset($exclude);
while (($countSrc > 0) || ($countExl > 0)) {
$cmp = ($countSrc > 0 && $countExl > 0) ? strcmp($valSrc, $valExl) : 0;
if (($countExl == 0) || ($cmp < 0)) {
$output[] = $valSrc;
$countSrc--;
$valSrc = next($source);
} elseif (($countSrc == 0) || ($cmp > 0)) {
$countExl--;
$valExl = next($exclude);
} else {
$countSrc--;
$countExl--;
$valSrc = next($source);
$valExl = next($exclude);
}
}
reset($source);
reset($exclude);
return $output;
} | [
"function array_except(array $array, array $exclude)\n {\n return collect($array)->except($exclude)->toArray();\n }",
"public function testArrayExcept()\n {\n // Remove the following lines when you implement this test.\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }",
"function my_array_diff($array1, $array2) {\n\t//Test to make sure that both inputs are arrays\n\tif(! is_array($array1))\n\t\texit(\"The first input to my_array_diff is not an array!\");\n\tif(! is_array($array2))\n\t\texit(\"The second input to my_array_diff is not an array!\");\n\t\n\t//Declare a new array to hold elements from array1 not in array2\n\t$surplusElements = array();\n\t\n\tfor($i=0; $i<count($array1); $i++) {\n\t\tif(! in_array( $array1[$i], $array2)) {\n\t\t\tarray_push($surplusElements, $array1[$i] );\n\t\t}\n\t}\n\treturn $surplusElements;\n}",
"public function getSourceExcludes();",
"function removeBothExistingElements($arrOriginal, $arrComparing)\n{\n\tforeach($arrOriginal as &$elem)\n\t{\n\t\tif(in_array($elem, $arrComparing))\n\t\t{\n\t\t\t// [COMPARING] Get an index of element in comparing array\n\t\t\t$elemIndexInComparingArray = getIndexOfElementInArray($elem, $arrComparing);\n\t\t\t// [ORIGINAL] Get an index of element in original array\n\t\t\t$elemIndexInOriginalArray = getIndexOfElementInArray($elem, $arrOriginal);\n\t\t\t\t\n\t\t\t// [COMPARING] Remove that element from comparing array\n\t\t\tremoveElementAtIndexFromArray($elemIndexInComparingArray, $arrComparing);\n\t\t\t// [ORIGINAL] Remove that element from original array\n\t\t\tremoveElementAtIndexFromArray($elemIndexInOriginalArray, $arrOriginal);\n\t\t}\n\t}\n\t\n\treturn $arrOriginal;\n}",
"function getExclusion()\n{\n // return array(); // default\n return array(7,20,32,33,34,23,41,42,43,31,65,66,67,22,38,39,40);\n}",
"function array_subtraction($array1, $array2)\n{\n $intersection = array_intersect($array1, $array2);\n\n return array_diff($array1, $intersection);\n}",
"function arrayDiff($a, $b) {\n $arr = [];\n for ($i = 0; $i < count($a); $i++) {\n if (!in_array($a[$i], $b)) {\n array_push($arr, $a[$i]);\n }\n }\n return $arr;\n }",
"function array_except(array $array, $values)\r\n{\r\n return array_diff($array, $values);\r\n}",
"function array_exclude($array,$excludeKeys){\n foreach($excludeKeys as $key){\n unset($array[$key]);\n }\n return $array;\n}",
"function array_diff (array $array1, array $array2) {}",
"public function compileExcludes(): array\n {\n return array_diff(\n $this->getExcludes(),\n $this->getIncludes()\n );\n }",
"function remove_excluded_from_patterns($excluded, $patterns) {\n if ($excluded) {\n foreach ($excluded as $exc) {\n // array_search($needle, $haystack);\n $posn = array_search($exc, $patterns);\n if ($posn > -1) {\n unset($patterns[$posn]);\n }\n }\n }\n // Reassign keys numerically if any now missing.\n return array_values($patterns);\n }",
"protected function excludeResources(array $exclude): array\n {\n return array_diff_key(\n $this->searchable,\n array_flip($exclude)\n );\n }",
"function arrays_exor($a1, $a2)\n{\n $r = array();\n for ($i = 0; $i < count($a1); $i++) {\n if ($a1[$i] != '' and !in_array($a1[$i], $a2)) {\n $r[] = $a1[$i];\n }\n }\n for ($j = 0; $j < count($a2); $j++) {\n if ($a2[$j] != '' and !in_array($a2[$j], $a1)) {\n $r[] = $a2[$j];\n }\n }\n return $r;\n}",
"private function deDupePaths(array $rawExcludePaths)\n {\n $filteredArray = $rawExcludePaths;\n $count = count($filteredArray);\n for ($i = 0; $count > $i; $i++) {\n if (!isset($filteredArray[$i])) {\n continue;\n }\n $item = $filteredArray[$i];\n $filteredArray = array_filter(\n $filteredArray,\n function ($value) use ($item) {\n return !(strlen($value) !== strlen($item) && strpos($value, $item) === 0);\n }\n );\n }\n $filteredArray = array_values($filteredArray);\n\n return $filteredArray;\n }",
"function minus_array_values($old_item_array, $item_array) {\n\t// In order to work out what to remove from the $session_array, the $old_item_array\n\t// must exist.\n\tif (is_not_empty_array ( $old_item_array ) && is_not_empty_array ( $item_array )) {\n\t\t$new_array = array ();\n\t\t\n\t\treset ( $old_item_array );\n\t\twhile ( list ( , $value ) = each ( $old_item_array ) ) {\n\t\t\tif (! in_array ( $value, $item_array )) {\n\t\t\t\tarray_push ( $new_array, $value );\n\t\t\t}\n\t\t}\n\t\treturn $new_array;\n\t} else\n\t\treturn $old_item_array;\n}",
"private static function fastArrayDiff($array1, $array2)\n {\n $missing_values = array();\n $flipped_array2 = array_flip($array2); # swaps indexes and values\n \n foreach ($array1 as $value) {\n if (!isset($flipped_array2[$value])) {\n $missing_values[] = $value;\n }\n }\n \n return $missing_values;\n }",
"public function testExclude() {\n $this->assertEquals(array('foo' => 123), Hash::exclude(array('foo' => 123, 'bar' => 456, 'baz' => 789), array('bar', 'baz')));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the maximum review rating. | public function get_max_rating()
{
return 5;
} | [
"public function getMaxRating()\n {\n return $this->sMaxRating;\n }",
"public function getRatingMax();",
"static function get_max_rating()\n\t\t{\n\t\t\t}",
"public function getMaxStarRating()\n {\n return $this->maxRating;\n }",
"function maximum_rating() {\n $options = get_option( 'post_rating_options' );\n $maximum_rating = floatval( $options['maximum_rating'] );\n \n if ( empty( $maximum_rating ) or $maximum_rating == 0 )\n $maximum_rating = 5;\n \n return $maximum_rating;\n }",
"public function getReviewRating(){\n\t\treturn $this->reviewRating;\n\t}",
"function wc_product_reviews_pro_get_highest_rating( $product_id ) {\n\n\tif ( false === ( $rating = get_transient( 'wc_product_reviews_pro_highest_rating_' . $product_id ) ) ) {\n\n\t\tglobal $wpdb;\n\n\t\t$rating = $wpdb->get_var( $wpdb->prepare(\"\n\t\t SELECT MAX(meta_value) FROM $wpdb->commentmeta\n\t\t LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID\n\t\t WHERE comment_post_ID = %d\n\t\t AND comment_approved = '1'\n\t\t AND comment_type = 'review'\n\t\t AND meta_key = 'rating'\n\t\t AND meta_value > 0\n\t\t\", $product_id ) );\n\n\t\tset_transient( 'wc_product_reviews_pro_highest_rating_' . $product_id, $rating, YEAR_IN_SECONDS );\n\t}\n\n\treturn $rating;\n}",
"function getMaxReviewRound($monographId, $reviewType) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT MAX(round) FROM review_rounds WHERE submission_id = ? AND review_type = ?', array($monographId, $reviewType)\n\t\t);\n\t\t$returner = isset($result->fields[0]) ? $result->fields[0] : 0;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}",
"public function getReviewRating()\n {\n return $this->reviewRating;\n }",
"public function getRating()\n {\n $reviewCount = count($this->reviews);\n $reviewTotal = 0;\n foreach($this->reviews as $review){\n $reviewTotal += $review->rating;\n }\n $rating = $reviewTotal/$reviewCount;\n return round($rating);\n }",
"public function get_feedback_maxscore() {\n if ($this->valid_feedback()) {\n $maxscore = 0;\n $nbchoices = count($this->choices);\n foreach ($this->nameddegrees as $value => $label) {\n if ($value > $maxscore) {\n $maxscore = $value;\n }\n }\n // The maximum score needs to be multiplied by the number of items to rate.\n $maxscore = $maxscore * $nbchoices;\n } else {\n $maxscore = false;\n }\n return $maxscore;\n }",
"function getMaxReviewRound($articleId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT MAX(round) FROM review_rounds WHERE submission_id = ?', $articleId\n\t\t);\n\t\t$returner = isset($result->fields[0]) ? $result->fields[0] : 0;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}",
"public function getMaxScore()\n\t{\n\t\treturn $this->max_score;\n\t}",
"public function getMaxRate()\n {\n return isset($this->max_rate) ? $this->max_rate : 0;\n }",
"function getMaxReviewRound($articleId) {\n\t\t$result = &$this->retrieve(\n\t\t\t'SELECT MAX(round) FROM review_rounds WHERE article_id = ?', $articleId\n\t\t);\n\t\t$returner = isset($result->fields[0]) ? $result->fields[0] : 0;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}",
"public function can_find_maximum_rating()\n {\n factory(ContentRating::class, 5)->create();\n\n $max_order = ContentRating::max('order');\n $max_rating_id = ContentRating::where('order', $max_order)->first()->id;\n\n $this->assertEquals($max_order, ContentRating::maximum()->first()->order);\n $this->assertEquals($max_rating_id, ContentRating::maximum()->first()->id);\n }",
"public function getMaxNightRate()\n\t{\n\t\t$select = $this->getDbTable()\t->select()\n\t\t\t\t\t\t\t\t\t\t->from(\tarray('ratesAppt3'),\n\t\t\t\t\t\t\t\t\t\t\t\tarray('end', 'night'))\n\t\t\t\t\t\t\t\t\t\t->order(array('end DESC'))\n\t\t\t\t\t\t\t\t\t\t->limit(13, 0);\n\t\t//print $select->__toString();\n\t\t$stmt = $select->query();\n\t\t$resultSet = $stmt->fetchAll();\n\t\t\n\t\t$maxRate = 0;\n\t\t\n foreach ($resultSet as $row) {\n\t\t\tif ($row['night'] > $maxRate) {\n\t\t\t\t$maxRate = $row['night'];\n\t\t\t}\n }\n return $maxRate;\t\n\t}",
"public function getMaxScore() {\n return $this->maxScore;\n }",
"function getMaxScore() {\n return $this->maxScore;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display a listing of the OrganizationGroup. GET|HEAD /organizationGroups | public function index(Request $request)
{
$organizationGroups = $this->organizationGroupRepository->all(
$request->except(['skip', 'limit']),
$request->get('skip'),
$request->get('limit')
);
return response()->success($organizationGroups->toArray(), 'Organization Groups retrieved successfully');
} | [
"public function listAction()\n {\n $this->action = 'list';\n\n /** @var ObjectManager $objectManager */\n $objectManager = $this->get('twomartens.core.db_manager');\n $repository = $objectManager->getRepository('TwoMartensCoreBundle:Group');\n $groups = $repository->findAll();\n\n $this->assignVariables();\n $this->templateVariables['groups'] = $groups;\n $this->templateVariables['area']['title'] = $this->get('translator')\n ->trans('acp.group.list', [], 'TwoMartensCoreBundle');\n\n return $this->render(\n 'TwoMartensCoreBundle:ACPGroup:list.html.twig',\n $this->templateVariables\n );\n }",
"function ad_groups_list( )\n {\n return $this->hook( \"/ad_groups.json\", \"ad_group\", null, \"GET\" );\n }",
"function gadget_organization_groups()\n{\n\tglobal $db, $main;\n\t\n\t$groups = $db->get('*',\"usergroups\",null,8);\n\tif(!$groups) return '';\n\tif(isset($groups['gid'])) $groups = array($groups);\n\t\n\t$list = '';\n\tforeach($groups as $group)\n\t{\n\t\t$gmarkup = markup($group['name'], $group['style_start'], $group['style_end'], $group['is_multi_colour']);\n\t\tif(!$main->settings['enable_stafflist']) $list .= \"<tr><td class='tbody'>{$gmarkup}</td></tr>\";\n\t\telse $list .= \"<tr><td class='tbody'><a itemprop='url' href='//{$main->settings['site_url']}/group.php?gid={$group['gid']}'>{$gmarkup}</a></td></tr>\";\n\t}\n\t\n\treturn \"<div itemscope itemtype='http://schema.org/Organization'>\n\t<link itemprop='sameAs' href='//{$main->settings['site_url']}/pages/?area={$main->settings['about_page']}' />\n\t<table>\n\t\t<tr><td class='thead'>Groups</td></tr>{$list}\n\t</table>\n</div>\";\n}",
"public function getGroupsAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n $groups = $em->getRepository('CatMSAdminBundle:ImageGroup')\r\n ->findBy(array(), array('description' => 'asc'));\r\n \r\n $groupsArr = array();\r\n foreach ($groups as $key => $obj) {\r\n $groupsArr[$key]['slug'] = $obj->getSlug();\r\n $groupsArr[$key]['description'] = $obj->getDescription();\r\n $groupsArr[$key]['id'] = $obj->getId();\r\n }\r\n\r\n $groupsJson = json_encode($groupsArr);\r\n return new Response(\r\n $groupsJson, \r\n 200, \r\n array('Content-Type' => 'application/json')\r\n );\r\n }",
"public function index()\n {\n return view('admin.groups.listing', [\n 'title' => Lang::get('groups.manage'),\n 'groups' => $this->repository->getAll(),\n ]);\n }",
"public function listGroupsCommand()\n {\n $validAttributes = $this->settings['additionalAttributes']['group'];\n $headerRow = ['Name', 'Description'];\n\n foreach ($validAttributes as $attribute) {\n $headerRow[] = $this->translator->translateById('attribute.' . $attribute, [], null, null, 'CrowdApi',\n 'Neos.NeosIo');\n }\n\n $groups = $this->crowdApiConnector->fetchGroups(false);\n $tableRows = array_map(function ($item) use ($validAttributes) {\n $attributes = [\n $item['name'],\n $item['description'],\n ];\n\n foreach ($validAttributes as $attribute) {\n $attributes[] = array_key_exists($attribute, $item) ? $item[$attribute] : '';\n }\n return $attributes;\n }, $groups);\n\n $this->output->outputTable($tableRows, $headerRow);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $groups = $em->getRepository('ApplicationSonataUserBundle:Group')->findAll();\n\n dump($groups);\n die;\n\n\n return $this->render('group/index.html.twig', array(\n 'groups' => $groups,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $groups = $em->getRepository('DoCarmoAppBundle:Group')->findAll();\n\n return $this->render('group/index.html.twig', array(\n 'groups' => $groups,\n ));\n }",
"public function showAllGroups()\n {\n $groups = Group::paginate(10);\n return view('admin.groups.index', compact('groups'));\n }",
"public function list_groups(){\r\n\t\t\t return $this->module_list_groups();\r\n\t\t }",
"public function index()\n {\n return view('groups.listing', [\n 'title' => Lang::get('groups.manage'),\n 'groups' => $this->groupRepository->getAll()\n ]);\n }",
"public function groupingIndexAction()\n {\n $groupings = $this->getDoctrine()->getRepository(Grouping::class)->findAll();\n\n return $this->render('default/list.html.twig', array(\n 'groupings' => $groupings\n ));\n }",
"public function list() {\n\t\t$groups = $this->groupsTable->findAll(groupName);\n\t\t$title = 'Groups';\n\t\treturn [\n\t\t\t'template' => 'grouplist.html.php',\n\t\t\t'title' => $title,\n\t\t\t'variables' => ['groups' => $groups]\n\t\t];\n\t}",
"public function retrieveGroups()\n {\n return $this->start()->uri(\"/api/group\")\n ->get()\n ->go();\n }",
"public function getGroups()\n {\n # GET /accounts/{accountId}/groups\n }",
"public function getAllGroups();",
"public function allGroup() {\n $data['pageTitle'] = 'View All Groups';\n $data['breadcrumbs'] = array(\n 'Security and access' => '#',\n 'Groups' => '#'\n );\n $data[\"groups\"] = $this->utilities->findAllByAttribute(\"sa_user_group\", array(\"ORG_ID\" => $this->user_session[\"SES_ORG_ID\"], \"ACTIVE_STATUS\" => 1));\n $data['content_view_page'] = 'security_access/all_groups';\n $this->template->display($data);\n }",
"public function grpIndexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $groups = $em->getRepository('AcmeUserBundle:Grp')->findAll();\n\t\t//return $this->render('admin/blog/groupIndex.html.twig');\n return $this->render('admin/blog/grpIndex.html.twig', array('groups' => $groups));\n }",
"public function getAllGroups()\n {\n return $this->get(sprintf(\n '%d/groups?fields=id,name&limit=%d',\n SS_WORKPLACE_COMMUNITY_ID,\n Config::inst()->get('WorkplaceGateway', 'workplace_group_limit')\n ));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process the previous contents of the file from the current position through the callback. | public function readPreviousCallback(callable $func): void; | [
"protected function readPreviousIndex()\n\t{\n\t\t$position = ftell($this->indexHandle) - 1;\n\n\t\tif ($position <= 0) return;\n\n\t\t$line = '';\n\n\t\t// reads 1024B chunks of the file backwards from the current position, until a newline is found or we reach the top\n\t\twhile ($position > 0) {\n\t\t\t// find next position to read from, make sure we don't read beyond file boundary\n\t\t\t$position -= $chunkSize = min($position, 1024);\n\n\t\t\t// read the chunk from the position\n\t\t\tfseek($this->indexHandle, $position);\n\t\t\t$chunk = fread($this->indexHandle, $chunkSize);\n\n\t\t\t// if a newline is found, append only the part after the last newline, otherwise we can append the whole chunk\n\t\t\t$line = ($newline = strrpos($chunk, \"\\n\")) === false\n\t\t\t\t? $chunk . $line : substr($chunk, $newline + 1) . $line;\n\n\t\t\t// if a newline was found, fix the position so we read from that newline next time\n\t\t\tif ($newline !== false) $position += $newline + 1;\n\n\t\t\t// move file pointer to the correct position (revert fread, apply newline fix)\n\t\t\tfseek($this->indexHandle, $position);\n\n\t\t\t// if we reached a newline and put together a non-empty line we are done\n\t\t\tif ($newline !== false) break;\n\t\t}\n\n\t\treturn $this->makeRequestFromIndex(str_getcsv($line));\n\t}",
"protected function _process()\n {\n $this->_file_readable();\n $this->_file_open();\n \n $this->_set_file_contents(fread($this->_file_handle, filesize($this->get_file_path() . $this->get_file_name())));\n \n $this->_file_close();\n }",
"public function rewind() {\n\t\t// Set the line pointer to 1 as that is the first entry in the data array\n\t\t$this->setFilePos(1);\n\t}",
"protected function processChangedAndNewFiles() {}",
"public function getPreviousFile()\n {\n return $this->previousFile;\n }",
"public function fileNeedsProcessing();",
"public function rewind(){}",
"function rewind($fp) {}",
"public function prev(): void\n {\n if ($this->current instanceof TerminalBucket) {\n return;\n }\n\n $this->current = $this->current->prev();\n $this->offset--;\n }",
"function processFile( $callback, $expiry = false, $extraData = null )\n {\n $result = $this->processCache( $callback, false, null, $expiry, $extraData );\n if ( $result instanceof eZClusterFileFailure )\n {\n return null;\n }\n return $result;\n }",
"public function setCurrentFile_getCurrentFile() : void {}",
"function setPreviousPosition($prev) {\r\n $this->prevpos = $prev;\r\n }",
"public function getPreviousChunk()\n\t{\n\t\t$offset = --$this->index * $this->size;\n\t\t\n\t\tif ($offset >= 0) {\n\t\t\t$chunk = $this->getChunk($offset);\n\t\t} else {\n\t\t\t$chunk = false;\n\t\t}\n\t\t\n\t\treturn $chunk;\n\t}",
"public function skipToPrevious() {\n\n //Get the instance of MPlayerWrapper so we can call methods on it.\n $MPlayer = MPlayerWrapper::getInstance();\n $MPlayer->skipToPreviousFile(); //Get and set the previous record to play.\n\n }",
"function readPreviousSegmentWithBreak()\n\t\t{\n\t\t\t$str = \"\";\n\t\t\t\n\t\t\tif (!$this->stopReading)\n\t\t\t{\n\t\t\t\t//Read the last character.\n\t\t\t\t$nextCharacter = fgetc($this->file);\n\t\t\t\t\n\t\t\t\t//Check for EOF.\n\t\t\t\tif ($nextCharacter === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$this->stopReading = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Continue to prepend characters to the segment and read characters until there is an error,\n\t\t\t\t\t//the beginning of the file is reached, or any of the delimiting character are reached.\n\t\t\t\t\twhile ($nextCharacter !== FALSE && $nextCharacter !== $this->delimiter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$str = $nextCharacter . $str;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (ftell($this->file) < 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->stopReading = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfseek($this->file, -2, SEEK_CUR);\n\t\t\t\t\t\t$nextCharacter = fgetc($this->file);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Read and discard one delimiting character.\n\t\t\t\t\tif (!$this->stopReading && $nextCharacter === $this->delimiter)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (ftell($this->file) < 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->stopReading = true;\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\tfseek($this->file, -2, SEEK_CUR);\n\t\t\t\t\t\t\t$nextCharacter = fgetc($this->file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!$this->stopReading)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Don't ask.\n\t\t\t\t\t\tfseek($this->file, -1, SEEK_CUR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $str;\n\t\t}",
"public function fileEnd();",
"public function testFseekIndicatesFailureIfInvalidRelativePositionIsRequested()\n {\n $handle = fopen($this->stream, 'rb+');\n $result = fseek($handle, -2 * strlen(self::INITIAL_CONTENT), SEEK_CUR);\n fclose($handle);\n $this->assertSame(-1, $result);\n }",
"public function get_file_position();",
"public function testGetPreviousCharacter_returnsString_ifPreviousDoesExistInCurrentChunk()\n\t{\n\t\t$chunker = new Chunker\\Text('foo');\n\t\t\n\t\t$stream = new Stream($chunker);\n\t\t\n\t\t$stream->getNextCharacter();\n\t\t\n\t\t$this->assertEquals('f', $stream->getPreviousCharacter());\n\t\t\n\t\treturn;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.