query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Check that the language used by the application is at the required version. | public function language(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function checkIfLanguagesExist() {}",
"public function appLanguageVersion() {\n // get version\n $this->loadModel('Versions');\n $version = $this->Versions->findAppLanguageVersion();\n\n // get language\n $this->loadModel('AppLanguages');\n $arrayLanguages = $this->AppLanguages->findAllLanguages();\n $this->set(compact(\"version\", \"arrayLanguages\"));\n }",
"public function hasLanguage() : bool;",
"function check_language () {\n \n global $CONF;\n $supported_languages \t\t\t= array ('de', 'en');\n $lang_array \t\t\t\t\t\t= preg_split ('/(\\s*,\\s*)/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \n if (is_array ($lang_array)) {\n \n $lang_first \t\t\t\t\t= strtolower ((trim (strval ($lang_array[0]))));\n $lang_first \t\t\t\t\t= substr ($lang_first, 0, 2);\n \n if (in_array ($lang_first, $supported_languages)) {\n \n $lang \t\t\t\t\t\t= $lang_first;\n \n } else {\n \n $lang \t\t\t\t\t\t= $CONF['default_language'];\n \n }\n } else {\n \n $lang\t\t\t\t\t\t\t = $CONF['default_language'];\n \n }\n \n return $lang;\n}",
"private function checkFrontendLanguage() {\r\n\t\t// search for the corresponding Joomla language \r\n\t\t// Read the languages dir to find new installed languages\r\n\t\t// This method returns a list of JLanguage objects with the related inforamtion\r\n\t\t$systemLanguages = JLanguage::getKnownLanguages(JPATH_SITE);\r\n\t\tif(array_key_exists($this->lang_code, $systemLanguages)) {\r\n\t\t\t$this->jLanguage = JLanguage::getInstance($this->lang_code);\r\n\t\t\tif($this->jLanguage != null) {\r\n\t\t\t\t$this->iso = $this->jLanguage->get('locale');\r\n\t\t\t\t$this->backwardlang = $this->jLanguage->get('backward');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->jLanguage = null;\r\n\t\t}\r\n\t}",
"public function testLanguageConsistency(): void\n\t{\n\t\tstatic::assertEquals('en', app()->getLocale());\n\t\tstatic::assertEquals('OK', __('lychee.SUCCESS'));\n\n\t\t$msgSection = (new ConsoleOutput())->section();\n\n\t\t$englishDictionary = include base_path('lang/en/lychee.php');\n\t\t$availableDictionaries = config('app.supported_locale');\n\t\t$failed = false;\n\n\t\tforeach ($availableDictionaries as $locale) {\n\t\t\t$dictionary = include base_path('lang/' . $locale . '/lychee.php');\n\t\t\t$missingKeys = array_diff_key($englishDictionary, $dictionary);\n\t\t\tforeach ($missingKeys as $key => $value) {\n\t\t\t\t$msgSection->writeln(sprintf('<comment>Error:</comment> Locale %s misses the following key: %s', str_pad($locale, 8), $key));\n\t\t\t\t$failed = true;\n\t\t\t}\n\n\t\t\t$extraKeys = array_diff_key($dictionary, $englishDictionary);\n\t\t\tforeach ($extraKeys as $key => $value) {\n\t\t\t\t$msgSection->writeln(sprintf('<comment>Error:</comment> Locale %s has the following extra key: %s', str_pad($locale, 8), $key));\n\t\t\t\t$failed = true;\n\t\t\t}\n\t\t}\n\t\tstatic::assertFalse($failed);\n\t}",
"function alertcloud_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 126) {\n return false;\n }\n return true;\n}",
"public function page_check_version()\n\t{\n\t\tif (!$content = Http::get_file_on_server(FSB_REQUEST_SERVER, FSB_REQUEST_VERSION, 10))\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\t$content = explode(\"\\n\", $content);\n\n\t\tif (count($content) < 3)\n\t\t{\n\t\t\tDisplay::message('adm_unable_check_version');\n\t\t}\n\n\t\tif (strpos('http', $content[2]) === false)\n\t\t{\n\t\t\tarray_shift($content);\n\t\t}\n\n\t\t@list($last_version, $url, $level) = $content;\n\t\t$last_version = trim($last_version);\n\n\t\t// Aucune redirection\n\t\tFsb::$session->data['u_activate_redirection'] = 2;\n\n\t\tif (!is_last_version(Fsb::$cfg->get('fsb_version'), $last_version))\n\t\t{\n\t\t\tDisplay::message(sprintf(Fsb::$session->lang('adm_old_version'), $last_version, Fsb::$cfg->get('fsb_version'), $url, $url, Fsb::$session->lang('adm_version_' . trim($level))) . '<br /><br />' . sprintf(Fsb::$session->lang('adm_click_view_newer'), $url));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDisplay::message('adm_version_ok', 'index.' . PHPEXT, 'index_adm');\n\t\t}\n\t}",
"function mrl_check_versions()\r\n{\r\n $versions = get_option('MyReadingLibraryVersions');\r\n if (empty($versions) ||\r\n\t\t$versions['db'] < MY_READING_LIBRARY_DB ||\r\n\t\t$versions['options'] < MY_READING_LIBRARY_OPTIONS ||\r\n\t\t$versions['rewrite'] < MY_READING_LIBRARY_REWRITE)\r\n {\r\n\t\tmrl_install();\r\n }\r\n}",
"public function hasLang() {\n return $this->_has(5);\n }",
"abstract public function get_app_language();",
"public function validateLanguage(string $language): bool;",
"function admin_check_version()\n{\n global $app, $globalSettings;\n $versionAnswer = [];\n $contents = file_get_contents(VERSION_URL);\n if ($contents == false) {\n $versionClass = 'error';\n $versionAnswer = sprintf(getMessageString('admin_new_version_error'), $globalSettings['version']);\n } else {\n $versionInfo = json_decode($contents);\n $version = $globalSettings['version'];\n if (strpos($globalSettings['version'], '-') === false) {\n $v = preg_split('/-/', $globalSettings['version']);\n $version = $v[0];\n }\n $result = version_compare($version, $versionInfo->{'version'});\n if ($result === -1) {\n $versionClass = 'success';\n $msg1 = sprintf(getMessageString('admin_new_version'), $versionInfo->{'version'}, $globalSettings['version']);\n $msg2 = sprintf(\"<a href=\\\"%s\\\">%s</a>\", $versionInfo->{'url'}, $versionInfo->{'url'});\n $msg3 = sprintf(getMessageString('admin_check_url'), $msg2);\n $versionAnswer = $msg1 . '. ' . $msg3;\n } else {\n $versionClass = '';\n $versionAnswer = sprintf(getMessageString('admin_no_new_version'), $globalSettings['version']);\n }\n }\n $app->render('admin_version.html', [\n 'page' => mkPage(getMessageString('admin_check_version'), 0, 2),\n 'versionClass' => $versionClass,\n 'versionAnswer' => $versionAnswer,\n 'isadmin' => true,\n ]);\n}",
"public function checkVersionsAndWarn() {\n\t\t//PHP\n\t\t$php = $this->checkPHPVersion();\n\t\tif ($php == self::VERSION_DEPRECATED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'phpVersionCheckDeprecationEmail_' . self::PHP_DEPRECATING,\n\t\t\t\t__('PHP version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a PHP version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'phpVersionCheckDeprecationNotice_' . self::PHP_DEPRECATING,\n\t\t\t\t'phpVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a PHP version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse if ($php == self::VERSION_UNSUPPORTED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'phpVersionCheckUnsupportedEmail_' . self::PHP_MINIMUM,\n\t\t\t\t__('PHP version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a PHP version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'phpVersionCheckUnsupportedNotice_' . self::PHP_MINIMUM,\n\t\t\t\t'phpVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a PHP version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of PHP 7.x or 5.6 but will currently support PHP versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), phpversion(), self::PHP_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_PHP) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\twfAdminNoticeQueue::removeAdminNotice(false, 'phpVersionCheck');\n\t\t}\n\t\t\n\t\t//OpenSSL\n\t\t$openssl = $this->checkOpenSSLVersion();\n\t\tif ($openssl == self::VERSION_DEPRECATED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'opensslVersionCheckDeprecationEmail_' . self::OPENSSL_DEPRECATING,\n\t\t\t\t__('OpenSSL version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using an OpenSSL version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'opensslVersionCheckDeprecationNotice_' . self::OPENSSL_DEPRECATING,\n\t\t\t\t'opensslVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using an OpenSSL version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse if ($openssl == self::VERSION_UNSUPPORTED) {\n\t\t\t$this->_alertEmail(\n\t\t\t\t'opensslVersionCheckUnsupportedEmail_' . self::PHP_MINIMUM,\n\t\t\t\t__('OpenSSL version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using an OpenSSL version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'opensslVersionCheckUnsupportedNotice_' . self::PHP_MINIMUM,\n\t\t\t\t'opensslVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using an OpenSSL version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of OpenSSL but will currently support OpenSSL versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), self::openssl_make_text_version(), self::OPENSSL_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_OPENSSL) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\twfAdminNoticeQueue::removeAdminNotice(false, 'opensslVersionCheck');\n\t\t}\n\t\t\n\t\t//WordPress\n\t\t$wordpress = $this->checkWordPressVersion();\n\t\tif ($wordpress == self::VERSION_DEPRECATED) {\n\t\t\trequire(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */\n\t\t\t\n\t\t\t$this->_alertEmail(\n\t\t\t\t'wordpressVersionCheckDeprecationEmail_' . self::WORDPRESS_DEPRECATING,\n\t\t\t\t__('WordPress version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a WordPress version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'wordpressVersionCheckDeprecationNotice_' . self::WORDPRESS_DEPRECATING,\n\t\t\t\t'wordpressVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a WordPress version (%s) that will no longer be supported by Wordfence in an upcoming release and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse if ($wordpress == self::VERSION_UNSUPPORTED) {\n\t\t\trequire(ABSPATH . 'wp-includes/version.php'); /** @var string $wp_version */\n\t\t\t\n\t\t\t$this->_alertEmail(\n\t\t\t\t'wordpressVersionCheckUnsupportedEmail_' . self::WORDPRESS_MINIMUM,\n\t\t\t\t__('WordPress version too old', 'wordfence'),\n\t\t\t\tsprintf(__('Your site is using a WordPress version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' ' . sprintf(__('Learn More: %s', 'wordfence'), wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS))\n\t\t\t);\n\t\t\t\n\t\t\t$this->_adminNotice(\n\t\t\t\t'wordpressVersionCheckUnsupportedNotice_' . self::WORDPRESS_MINIMUM,\n\t\t\t\t'wordpressVersionCheck',\n\t\t\t\tsprintf(__('<strong>WARNING: </strong> Your site is using a WordPress version (%s) that is no longer supported by Wordfence and needs to be updated. We recommend using the newest version of WordPress but will currently support WordPress versions as old as %s. Version checks are run regularly, so if you have successfully updated, you can dismiss this notice or check that the update has taken effect later.', 'wordfence'), $wp_version, self::WORDPRESS_DEPRECATING) . ' <a href=\"' . wfSupportController::esc_supportURL(wfSupportController::ITEM_VERSION_WORDPRESS) . '\" target=\"_blank\" rel=\"noopener noreferrer\">' . __('Learn More', 'wordfence') . '</a>'\n\t\t\t);\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\twfAdminNoticeQueue::removeAdminNotice(false, 'wordpressVersionCheck');\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function supportsLanguageSwitch(): bool;",
"private function _checkLanguage($needed_language)\n\t{\n\t\tglobal $txt;\n\n\t\tif (empty($this->current_language) || $this->current_language !== $needed_language)\n\t\t{\n\t\t\t$lang_loader = new Loader($needed_language, $txt, database());\n\t\t\t$lang_loader->load('Post', false);\n\t\t\t$this->current_language = $needed_language;\n\t\t}\n\t}",
"protected function _version_check()\n\t{\n\t\tee()->load->library('el_pings');\n\t\t$version_file = ee()->el_pings->get_version_info();\n\n\t\tif ( ! $version_file)\n\t\t{\n\t\t\tee('CP/Alert')->makeBanner('notices')\n\t\t\t\t->asWarning()\n\t\t\t\t->withTitle(lang('cp_message_warn'))\n\t\t\t\t->addToBody(sprintf(\n\t\t\t\t\tlang('new_version_error'),\n\t\t\t\t\tee()->cp->masked_url(DOC_URL.'troubleshooting/error_messages/unexpected_error_occurred_attempting_to_download_the_current_expressionengine_version_number.html')\n\t\t\t\t))\n\t\t\t\t->now();\n\t\t}\n\t}",
"public function check_wp_version_check_exists()\n {\n }",
"function testLanguage()\r\n {\r\n\t\tglobal $webUrl, $SERVER, $DATABASE;\r\n\r\n // Locate the list page of language.\r\n\t\t$this->assertTrue($this->get(\"$webUrl/languages.php\", array(\r\n\t\t\t 'server' => $SERVER,\r\n\t\t\t\t\t\t'database' => $DATABASE,\r\n\t\t\t\t\t\t'subject' => 'database'))\r\n\t\t\t\t\t);\r\n\r\n $this->assertWantedPattern('/sql/');\r\n\r\n return TRUE;\r\n }",
"public function versionCheckAction()\n {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n\n $currentVersion = \"1.6.3\";\n $clientVersion = $_GET['ver'];\n\n if ($clientVersion < $currentVersion) {\n echo \"upgrade\";\n } elseif ($clientVersion == $currentVersion) {\n echo \"latest\";\n } elseif ($clientVersion > $currentVersion) {\n echo \"development\";\n } else {\n echo \"unknown-version\";\n }\n }",
"static private function DetectLanguage() {\n\t\tself::$language = substr(basename($_SERVER['REQUEST_URI']), 0, 2);\n\t\tif (self::$language != 'de' && self::$language != 'us') {\n\t\t\tself::$language = 'us';\n\t\t}\n\t}",
"public function check_version() {\n\n\t\tif ( ! self::compatible_version() ) {\n\t\t\tif ( is_plugin_active( plugin_basename( THEMECOMPLETE_EPO_PLUGIN_FILE ) ) ) {\n\t\t\t\tdeactivate_plugins( plugin_basename( THEMECOMPLETE_EPO_PLUGIN_FILE ) );\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'disabled_notice' ) );\n\t\t\t\tif ( isset( $_GET['activate'] ) ) {\n\t\t\t\t\tunset( $_GET['activate'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( self::old_version() ) {\n\t\t\tdeactivate_plugins( 'woocommerce-tm-custom-price-fields/tm-woo-custom-prices.php' );\n\t\t\tadd_action( 'admin_notices', array( $this, 'deprecated_notice' ) );\n\t\t}\n\n\t\tif ( ! self::woocommerce_check() ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'disabled_notice_woocommerce_check' ) );\n\t\t}\n\n\t}",
"protected function checkPcreVersion() {}",
"private function hasLanguage()\n {\n if(!$this->language instanceof LanguageInterface) {\n throw new \\ErrorException('This person has not been assigned a language.');\n }\n\n return true;\n }",
"public function test_get_supported_languages()\n {\n $ocr = new \\App\\Modules\\OCR\\OCR();\n\n $lang = $ocr->supportedLanguages();\n\n PHPUnit::assertContains(\n 'eng',\n $lang,\n );\n\n }",
"function plugin_chkVersion_japanize() {\n global $_JPN_CONF;\n\n return $_JPN_CONF['version'];\n}",
"public function hasLanguages() {\n return $this->_has(2);\n }",
"public function hasLang() {\n return $this->_has(1);\n }",
"private function validateVersion()\n {\n return preg_match('/[0-99]+\\.[0-99]+\\.[0-99]+.*/', $this->version);\n }",
"function versionCheck($template) {\n\tglobal $communitySettings;\n\n\tif ( $template['MinVer'] && ( version_compare($template['MinVer'],$communitySettings['unRaidVersion']) > 0 ) ) return false;\n\tif ( $template['MaxVer'] && ( version_compare($template['MaxVer'],$communitySettings['unRaidVersion']) < 0 ) ) return false;\n\treturn true;\n}",
"function tidypics_is_upgrade_available() {\n\t// sets $version based on code\n\trequire_once elgg_get_plugins_path() . \"tidypics/version.php\";\n\n\t$local_version = elgg_get_plugin_setting('version', 'tidypics');\n\tif ($local_version === false) {\n\t\t// no version set so either new install or really old one\n\t\tif (!get_subtype_class('object', 'image') || !get_subtype_class('object', 'album')) {\n\t\t\t$local_version = 0;\n\t\t} else {\n\t\t\t// set initial version for new install\n\t\t\telgg_set_plugin_setting('version', $version, 'tidypics');\n\t\t\t$local_version = $version;\n\t\t}\n\t} elseif ($local_version === '1.62') {\n\t\t// special work around to handle old upgrade system\n\t\t$local_version = 2010010101;\n\t\telgg_set_plugin_setting('version', $local_version, 'tidypics');\n\t}\n\n\tif ($local_version == $version) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"public function has_language() {\r\n\t\treturn (is_lang($this->language));\r\n\t}",
"public function languageConditionMatchesCompleteLanguagesExpression() {}",
"public function languageConditionMatchesCompleteLanguagesExpression() {}",
"function _checkLanguageExistence($language) {\n global $basePath;\n\n if (file_exists($basePath.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.$language.'.lang.php')) {\n return true;\n } else {\n return false;\n }\n }",
"public function test_library_language() {\n\t\t$path = route('v2_library_language', [], false);\n\n\t\techo \"\\nTesting: \" . route('v2_library_language');\n\t\t$response = $this->get(route('v2_library_language'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure([$this->getSchemaKeys('v2_library_language')]);\n\t\t$this->compareToOriginal($path,[$this->getSchemaKeys('v2_library_language')]);\n\t}",
"protected function checkPhpVersion() {}",
"function is_wp_version_compatible($required)\n {\n }",
"public function hasVersion(){\n return $this->_has(3);\n }",
"private static function checkLanguages()\n {\n $acceptLanguage = self::getAcceptLanguage();\n self::$languages = array();\n\n if (!empty($acceptLanguage)) {\n $httpLanguages = preg_split('/q=([\\d\\.]*)/', $acceptLanguage, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\n $languages = array();\n $key = 0;\n foreach (array_reverse($httpLanguages) as $value) {\n $value = trim($value, ',; .');\n if (is_numeric($value)) {\n $key = $value;\n } else {\n $languages[$key] = explode(',', $value);\n }\n }\n krsort($languages);\n\n foreach ($languages as $value) {\n self::$languages = array_merge(self::$languages, $value);\n }\n }\n }",
"function install_languages() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/languages.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the installation of the languages supported by core'));\n }\n return false;\n}",
"public function checkRequiredVersion() {\n if (version_compare(PHP_VERSION, '4.3.2', '>=')) {\n return TRUE;\n }\n $this->logMsg(\n MSG_ERROR,\n PAPAYA_LOGTYPE_MODULES,\n 'Could not get HTML Purifier instance because this PHP version is too old.'\n );\n return FALSE;\n }",
"protected function checkSystemLocale() {}",
"function multilingual(): bool\n {\n return count(supportedLocaleKeys()) > 1;\n }",
"private static function _checkProjectVersion() {\n $composer_openfed = json_decode(file_get_contents('composer.openfed.json'), TRUE);\n $current_version = $composer_openfed['require']['openfed/openfed8'];\n preg_match('/(?:[\\d+\\.?]+[a-zA-Z0-9-]*)/', $current_version, $matches);\n // If current version is dev, we should ignore version check.\n if (strpos($current_version, 'dev') !== FALSE) {\n return FALSE;\n }\n\n return version_compare($matches[0], '10.0', '>=');\n }",
"function detectLangCode() {\n\t\t// If HTTP_ACCEPT_LANGUAGE is empty use defaultLangCode:\n\t\tif(empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n\t\t\t$this->_langCode = $this->_defaultLangCode;\n\t\t\treturn;\n\t\t}\n\n\t\t// Split up the HTTP_ACCEPT_LANGUAGE header:\n\t\t$acceptedLanguages = preg_split('/,\\s*/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\t\n\t\t$currentLangCode = $this->_defaultLangCode;\n\t\t$currentLangQuality = 0.0;\n\t\t\n\t\tforeach($acceptedLanguages as $acceptedLanguage) {\n\t\t\t// Parse the language string:\n\t\t\t$match = preg_match($this->_regExpAcceptLangCode, $acceptedLanguage, $matches);\n\t\t\t// Check if the syntax is valid:\n\t\t\tif(!$match) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Get and split the language code:\t\n\t\t\t$langCodeParts = explode ('-', $matches[1]);\n\t\t\t\n\t\t\t// Get the language quality given as float value:\n\t\t\tif(isset($matches[2])) {\n\t\t\t\t$langQuality = (float)$matches[2];\n\t\t\t} else {\n\t\t\t\t// Missing language quality value is maximum quality:\n\t\t\t\t$langQuality = 1.0;\n\t\t\t}\n\n\t\t\t// Go through it until the language code is empty:\n\t\t\twhile(count($langCodeParts)) {\n\t\t\t\t// Join the current langCodeParts:\n\t\t\t\t$langCode = strtolower(join('-', $langCodeParts));\n\t\t\t\t// Check if the langCode is in the available list:\n\t\t\t\tif(in_array($langCode, $this->_availableLangCodes)) {\n\t\t\t\t\t// Check the quality setting:\n\t\t\t\t\tif ($langQuality > $currentLangQuality) {\n\t\t\t\t\t\t$currentLangCode = $langCode;\n\t\t\t\t\t\t$currentLangQuality = $langQuality;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If strict mode is set, don't minimalize the language code:\n\t\t\t\tif($this->_strictMode) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// else chop off the right part:\n\t\t\t\tarray_pop($langCodeParts);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_langCode = $currentLangCode;\n\t}",
"protected function checkPHPVersion()\n {\n // Init\n $current = ( false === strpos( phpversion(), '-' ) ? phpversion() : substr( phpversion(), 0, strpos( phpversion(), '-' ) ) );\n $required = '5.3.10';\n \n if( 0 > strnatcmp( $current, $required ) )\n {\n throw new Exception( sprintf( 'NNScripts'. PHP_EOL .'Error: PHP version %s is required but version %s is found.', $required, $current ) );\n }\n }",
"protected function checkCMS()\n {\n if (defined('LEPTON_VERSION')) {\n self::$cms_type = 'LEPTON';\n self::$cms_version = LEPTON_VERSION;\n }\n elseif (defined('CAT_VERSION')) {\n self::$cms_type = 'BlackCat';\n self::$cms_version = CAT_VERSION;\n }\n elseif (defined('WB_VERSION')) {\n self::$cms_type = 'WebsiteBaker';\n self::$cms_version = WB_VERSION;\n // fix for WB 2.8.4\n if ((self::$cms_version == '2.8.3') && file_exists(WB_PATH.'/setup.ini.php')) {\n self::$cms_version = '2.8.4';\n }\n }\n else {\n self::$cms_type = '- unknown -';\n self::$cms_version = '0.0.0';\n }\n }",
"function signup_get_available_languages()\n {\n }",
"function alertstream_component_checkversion()\n{\n if(!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 500) {\n return false;\n }\n return true;\n}",
"public function min_php_version_check()\n {\n }",
"function wp_can_install_language_pack()\n {\n }",
"private function _checkCompatibility(){\n\n\t\t$pageContent = new Page\\Content;\n\t\t$model = Advertikon::getCurrentModel();\n\t\t$mock = false;\n\n\t\tif( $mock || version_compare( PHP_VERSION , self::MIN_PHP_VER ) === -1 ) {\n\t\t\t$contentRecord = new Page\\Content\\Record;\n\t\t\t$contentRecord->setTypeWarning();\n\t\t\t$record = $model->__( 'PHP version needed at least %s, current version %s.' , self::MIN_PHP_VER , PHP_VERSION );\n\t\t\t$record .= sprintf( ' <a href=\"%s\" target=\"_blank\">%s</a>' , 'http://php.net/manual/install.php' , $model->__( 'More details' ) );\n\t\t\t$contentRecord->setRecord( $record );\n\t\t\t$pageContent->addRecord( $contentRecord );\n\t\t}\n\n\t\t$this->_childCheckCompatibility( $pageContent , $mock );\n\n\t\tif( $pageContent->recordCount() > 0 ) {\n\t\t\t$pageContent->setHeader( $model->__( 'The library incompatibility, with the runtime environment, detected. The following must be corrected for the continuation:' ) );\n\t\t\tthrow new Exception\\Transport( $pageContent );\n\t\t}\n\n\t\treturn true;\n\t}",
"function birdseye_component_checkversion()\n{\n if (!function_exists('get_product_release'))\n return false;\n if (get_product_release() < 207)\n return false;\n\n return true;\n}",
"public function testCurrentLanguage() {\n\t\t$router = $this->getRouter('/en/test', array());\n\t\t$this->assertEquals('en', $router->getLanguage());\n\n\t\t$router = $this->getRouter('/test', array());\n\t\t$this->assertEquals($this->defaultLanguage, $router->getLanguage());\n\n\t\t$router = $this->getRouter('/de/test', array());\n\t\t$this->assertEquals('de', $router->getLanguage());\n\t}",
"public function languageLoaded(string $language): bool\n\t{\n\t\treturn $this->selectedLanguage == $language;\n\t}",
"function checkLanguage($lang) {\n\t\t$lang_path = sprintf('%s%2$s/%2$s.%%s.php', LANG_FOLDER, $lang);\n\t\t$test_path = sprintf($lang_path, defined('USER_ADMIN')? 'admin':'gallery');\n\t\treturn (empty($lang) || !is_readable($test_path))?\n\t\t\t\t false\n\t\t\t\t :\n\t\t\t\t $lang_path;\n\t}",
"function resolveLanguageFromBrowser()\n {\n $ret = false;\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $env = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n $aLangs = preg_split(\n ';[\\s,]+;',\n substr($env, 0, strpos($env . ';', ';')), -1,\n PREG_SPLIT_NO_EMPTY\n );\n foreach ($aLangs as $langCode) {\n $lang = $langCode . '-' . SGL_Translation::getFallbackCharset();\n if (SGL_Translation::isAllowedLanguage($lang)) {\n $ret = $lang;\n break;\n }\n }\n }\n return $ret;\n }",
"function scheduledreporting_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 512) {\n return false;\n }\n return true;\n}",
"function checkPhpVersion()\n\t{\n\t\t$version = explode('.', PHP_VERSION);\n\n\t\t$message = 'Php version must be at least 5.3.7 for wpdiontheme to work. Please upgrade.';\n\n\t\tif (strnatcmp(phpversion(),'5.3.7') >= 0) \n\t { \n\t \t// do nothing\n\t } \n\t else \n\t { \n\t\t\tdie($message); \n\t } \n\t}",
"public function compatVersionConditionDoesNotMatchNewerRelease() {}",
"public function compatVersionConditionDoesNotMatchNewerRelease() {}",
"abstract function has_premium_version();",
"public function isAvailable()\n\t{\n\t\treturn parent::isAvailable() && ( $this->values['languageid'] === null\n\t\t\t|| $this->getLanguageId() === null\n\t\t\t|| $this->getLanguageId() === $this->values['languageid'] );\n\t}",
"function plugin_estimation_check_prerequisites() {\n\n //Version check is not done by core in GLPI < 9.2 but has to be delegated to core in GLPI >= 9.2.\n $version = preg_replace('/^((\\d+\\.?)+).*$/', '$1', GLPI_VERSION);\n if (version_compare($version, '9.2', '<')) {\n echo \"This plugin requires GLPI >= 9.2\";\n return false;\n }\n return true;\n}",
"public static function check($lang) {\n return file_exists(__DIR__ . \"/../../langs/\" . $lang . \".php\") ? $lang : self::DEFAULT_LANG;\n }",
"public function getAvailableLanguages() {}",
"function checkLanguage($lang) {\n global $DIR_LANG;\n # important note that '\\' must be matched with '\\\\\\\\' in preg* expressions\n\n return file_exists($DIR_LANG . remove_all_directory_separator($lang) . '.php');\n}",
"public static function getCurrentTypo3Version() {}",
"private function isOldVersion() {\r\n\t\treturn $this->getRequest ()->getParam ( \"oldversion\", null ) == 1;\r\n\t}",
"public function testLanguages()\n {\n $languages = $this->translator->getSupportedLanguages();\n\n $this->assertTrue(is_array($languages), 'Check that getSupportedLanguages response is an array');\n\n $this->assertContains('en', $languages, 'Check that getSupportedLanguages response contains \"en\"');\n\n $this->assertContains('fr', $languages, 'Check that getSupportedLanguages response contains \"fr\"');\n }",
"public function checkRequirements()\n\t{\n\t\t$tests = array('result' => true);\n\t\t$tests['curl'] = array('name' => $this->l('PHP cURL extension must be enabled on your server'), 'result' => extension_loaded('curl'));\n\t\t$tests['mbstring'] = array('name' => $this->l('PHP Multibyte String extension must be enabled on your server'), 'result' => extension_loaded('mbstring'));\n\t\tif (Configuration::get('STRIPE_MODE'))\n\t\t\t$tests['ssl'] = array('name' => $this->l('SSL must be enabled on your store (before entering Live mode)'), 'result' => Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) && Tools::strtolower($_SERVER['HTTPS']) != 'off'));\n\t\t$tests['php52'] = array('name' => $this->l('Your server must run PHP 5.3.3 or greater'), 'result' => version_compare(PHP_VERSION, '5.3.3', '>='));\n\t\t$tests['configuration'] = array('name' => $this->l('You must sign-up for Stripe and configure your account settings in the module (publishable key, secret key...etc.)'), 'result' => $this->checkSettings());\n\n\t\tif (_PS_VERSION_ < 1.5)\n\t\t{\n\t\t\t$tests['backward'] = array('name' => $this->l('You are using the backward compatibility module'), 'result' => $this->backward, 'resolution' => $this->backward_error);\n\t\t\t$tmp = Module::getInstanceByName('mobile_theme');\n\t\t\tif ($tmp && isset($tmp->version) && !version_compare($tmp->version, '0.3.8', '>='))\n\t\t\t\t$tests['mobile_version'] = array('name' => $this->l('You are currently using the default mobile template, the minimum version required is v0.3.8').' (v'.$tmp->version.' '.$this->l('detected').' - <a target=\"_blank\" href=\"http://addons.prestashop.com/en/mobile-iphone/6165-prestashop-mobile-template.html\">'.$this->l('Please Upgrade').'</a>)', 'result' => version_compare($tmp->version, '0.3.8', '>='));\n\t\t}\n\n\t\tforeach ($tests as $k => $test)\n\t\t\tif ($k != 'result' && !$test['result'])\n\t\t\t\t$tests['result'] = false;\n\n\t\treturn $tests;\n\t}",
"protected function _autoLanguage() {\n\t\t$_detectableLanguages = CakeRequest::acceptLanguage();\n\t\tforeach ($_detectableLanguages as $langKey) {\n\t\t\tif (isset($this->_l10nCatalog[$langKey])) {\n\t\t\t\t$this->_setLanguage($langKey);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (strpos($langKey, '-') !== false) {\n\t\t\t\t$langKey = substr($langKey, 0, 2);\n\t\t\t\tif (isset($this->_l10nCatalog[$langKey])) {\n\t\t\t\t\t$this->_setLanguage($langKey);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function lixlpixel_detect_lang()\n{\n lixlpixel_get_env_var('HTTP_ACCEPT_LANGUAGE');\n lixlpixel_get_env_var('HTTP_USER_AGENT');\n\n $_AL=strtolower($GLOBALS['HTTP_ACCEPT_LANGUAGE']);\n $_UA=strtolower($GLOBALS['HTTP_USER_AGENT']);\n\n // Try to detect Primary language if several languages are accepted.\n foreach($GLOBALS['_LANG'] as $K)\n {\n if(strpos($_AL, $K)===0)\n return $K;\n }\n \n // Try to detect any language if not yet detected.\n foreach($GLOBALS['_LANG'] as $K)\n {\n if(strpos($_AL, $K)!==false)\n return $K;\n }\n foreach($GLOBALS['_LANG'] as $K)\n {\n if(preg_match(\"//[\\[\\( ]{$K}[;,_\\-\\)]//\",$_UA))\n return $K;\n }\n\n // Return default language if language is not yet detected.\n return $GLOBALS['_DLANG'];\n}",
"function moodle_minimum_php_version_is_met($haltexecution = false) {\n // PLEASE NOTE THIS FUNCTION MUST BE COMPATIBLE WITH OLD UNSUPPORTED VERSIONS OF PHP.\n // Do not use modern php features or Moodle convenience functions (e.g. localised strings).\n\n $minimumversion = '7.1.0';\n $moodlerequirementchanged = '3.7';\n\n if (version_compare(PHP_VERSION, $minimumversion) < 0) {\n if ($haltexecution) {\n $error = \"Moodle ${moodlerequirementchanged} or later requires at least PHP ${minimumversion} \"\n . \"(currently using version \" . PHP_VERSION .\").\\n\"\n . \"Some servers may have multiple PHP versions installed, are you using the correct executable?\\n\";\n\n // Our CLI scripts define CLI_SCRIPT before running this test, so make use of\n // to send error on STDERR.\n if (defined('CLI_SCRIPT') && defined('STDERR')) {\n fwrite(STDERR, $error);\n } else {\n echo $error;\n }\n exit(1);\n } else {\n return false;\n }\n }\n return true;\n}",
"public static function check()\n\t\t{\n\t\t\tif(!($v = get_option(\"ws_plugin__s2member_activated_version\")) || !version_compare($v, WS_PLUGIN__S2MEMBER_VERSION, \">=\"))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"version\");\n\n\t\t\telse if(is_multisite() && is_main_site() && (!($mms_v = get_option(\"ws_plugin__s2member_activated_mms_version\")) || !version_compare($mms_v, WS_PLUGIN__S2MEMBER_VERSION, \">=\")))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"mms_version\");\n\n\t\t\telse if(!($l = (int)get_option(\"ws_plugin__s2member_activated_levels\")) || $l !== $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"])\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"levels\");\n\t\t}",
"function check() {\n\t\tglobal $wp_version;\n\t\t$requirements_met = true;\n\n\t\tif ( version_compare( $wp_version, $this->install_requirements['WordPress Version'], '<' ) ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_wp_version_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( version_compare( PHP_VERSION, $this->install_requirements['PHP Version'], '<' ) ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_php_version_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( $this->install_requirements['Multibyte'] && ! $this->check_multibyte_support() ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_mbstring_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( $this->install_requirements['UTF-8'] && ! $this->check_utf8_support() ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_charset_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t}\n\n\t\tif ( ! $requirements_met && is_admin() ) {\n\t\t\t// Load text domain to ensure translated admin notices.\n\t\t\tload_plugin_textdomain( 'wp-typography', false, dirname( $this->local_plugin_path ) . '/translations/' );\n\t\t\t/* add_action( 'admin_init', array( $this, 'deactivate_plugin' ) ); */\n\t\t}\n\n\t\treturn $requirements_met;\n\t}",
"public function checkVersions() {\n\t\treturn ($this->checkPHPVersion() == self::VERSION_COMPATIBLE) && ($this->checkOpenSSLVersion() == self::VERSION_COMPATIBLE) && ($this->checkWordPressVersion() == self::VERSION_COMPATIBLE);\n\t}",
"public function compatVersionConditionMatchesOlderRelease() {}",
"public function compatVersionConditionMatchesOlderRelease() {}",
"function shIsMultilingual()\n{\n\tShlSystem_Log::debug('sh404sef', 'Using deprecated ' . __FUNCTION__ . ', removed as not applicable anymore');\n}",
"public function upgrade_check(){\n $this->upgrade_site();\n }",
"final public function meets_minimum_requirements()\n\t{\n\t\treturn version_compare($this->minimum_core_version(), CMS_VERSION) < 1;\n\t}",
"public static function isSupportedLanguage() {\n\t\tglobal $wgLanguageCode;\n\n\t\t// \"Publishers are also not permitted to place AdSense code on pages\n\t\t// with content primarily in an unsupported language\"\n\t\t// @see https://www.google.com/adsense/support/bin/answer.py?answer=9727\n\t\t$supportedAdLanguages = [\n\t\t\t// Arabic -> Dutch (+some Chinese variants)\n\t\t\t'ar', 'bg', 'zh', 'zh-hans', 'zh-hant', 'hr', 'cs', 'da', 'nl',\n\t\t\t// English and its variants\n\t\t\t'en', 'en-gb', 'en-ca', 'en-x-piglatin',\n\t\t\t// Finnish -> Polish\n\t\t\t'fi', 'fr', 'de', 'el', 'he', 'hu', 'hu-formal', 'it', 'ja', 'ko', 'no', 'pl',\n\t\t\t// Portuguese -> Turkish\n\t\t\t'pt', 'pt-br', 'ro', 'ru', 'sr', 'sr-ec', 'sr-el', 'sk', 'es', 'sv', 'th', 'tr',\n\t\t\t// http://adsense.blogspot.com/2009/08/adsense-launched-in-lithuanian.html\n\t\t\t'lt', 'lv', 'uk',\n\t\t\t// Vietnamese http://adsense.blogspot.co.uk/2013/05/adsense-now-speaks-vietnamese.html\n\t\t\t'vi',\n\t\t\t// Slovenian & Estonian http://adsense.blogspot.co.uk/2012/06/adsense-now-available-for-websites-in.html\n\t\t\t'sl', 'et',\n\t\t\t// Indonesian http://adsense.blogspot.co.uk/2012/02/adsense-now-speaks-indonesian.html\n\t\t\t'id',\n\t\t\t// Languages added post 2013 -\n\t\t\t'bn', 'ca', 'tl', 'hi', 'ms', 'ml', 'mr', 'es-419', 'ta', 'te', 'ur',\n\t\t\t'gu', 'kn', 'ko-kp', 'pnb', 'pa'\n\t\t];\n\n\t\tif ( in_array( $wgLanguageCode, $supportedAdLanguages ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function hasVersions(): bool;",
"private function _detectLanguage() {\n if (isset($_GET['language']) && is_file('lang/'. $_GET['language'] .'.lang.php'))\n return $_GET['language'];\n\n $session = PHPSession::getInstance();\n\n if (isset($session['language']))\n return $session['language'];\n\n return $this->_getWebBrowserLanguage();\n }",
"public function hasVersion(){\n return $this->_has(1);\n }",
"public static function checkPhpVersion()\n{\nif (version_compare(PHP_VERSION,'5.3.0') < 0)\n\t{\n\techo PHP_VERSION.': Unsupported PHP version '\n\t\t.'- PHK needs at least version 5.3.0';\n\texit(1);\n\t}\n}",
"public function upgradePossible () {\n $locale = git::getTagsInstallLatest();\n $repo = conf::getModuleIni('system_repo');\n $remote = git::getTagsRemoteLatest($repo);\n if ($remote > $locale) {\n return true;\n }\n return false;\n }",
"public function setYiiLang(){\r\n $get_lang = Yii::app()->getRequest()->getParam(Yii::app()->urlManager->languageParam);//check if we have lang in url\r\n if (!in_array($get_lang,array_keys(Yii::app()->params['translatedLanguages'])) &&\r\n isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $langList = Util::sortByPriority($_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach ($langList as $lang => $quality) {\r\n foreach (Defaults::$supportedLanguages as $supported) {\r\n if (strcasecmp($supported, $lang) == 0) {\r\n Yii::app()->language = $supported;\r\n break 2;\r\n }\r\n }\r\n }\r\n }\r\n }",
"protected function checkVersion(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Version) && $this->_Version !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Version} is not a valid value for Version\";\n\t\t\t$isValid = false;\n\t\t}\n\t\treturn $isValid;\n\t}",
"public function languageConditionMatchesSingleLanguageExpression() {}",
"public function languageConditionMatchesSingleLanguageExpression() {}",
"public function check() {\r\n\t\t$retValue = $this->jLanguageTable->check();\r\n\t\treturn $retValue & $this->jfLanguageExt->check();\r\n\t}",
"function verify_version($version) // Colorize: green\n { // Colorize: green\n return isset($version) // Colorize: green\n && // Colorize: green\n is_int($version) // Colorize: green\n && // Colorize: green\n $version >= 20190101000000 // Colorize: green\n && // Colorize: green\n $version <= 99999999999999; // Colorize: green\n }",
"function check_language($lang)\n{\n\tif(!isset($_SESSION[\"lang\"]))\n\t{\n\t\t$langs = explode(\";\", $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\tif(strpos($langs[0], \"es\") !== false)\n\t\t\t$_SESSION[\"lang\"] = \"es\";\n\t\telse\n\t\t\t$_SESSION[\"lang\"] = \"en\";\t\t\n\t}\n\t\t\n\t//drozas: Check if the user has tried to set the language, and change it then\n\tif(isset($lang))\n\t\t$_SESSION[\"lang\"] = $lang;\n\t\n}",
"function wp_version_check($extra_stats = array(), $force_check = \\false)\n {\n }",
"public function has_versions()\n {\n return ($this->get_current() != 1);\n }",
"public function checkLanguage($language){\n global $Core;\n if($language == false){\n return false;\n }\n\n if(empty($language)){\n throw new Exception ($Core->language->error_please_define_a_language);\n }\n\n if(is_array($language)){\n throw new Exception ($Core->language->error_language_must_a_string_or_numeric);\n }\n\n if(!is_numeric($language) && !isset($Core->language->langMap[$language])){\n throw new Exception ($Core->language->error_undefined_or_inactive_language);\n }\n if(!is_numeric($language)){\n $language = $Core->language->langMap[$language]['id'];\n }\n return $language;\n }",
"function validateBeforeUpgrade($params) {\n $this->cleanUpValidationLog();\n\n if(version_compare(PHP_VERSION, '5.3.3', '<')) {\n $this->validationLogError('PHP version that is required to run the system is 5.3.3. You have ' . PHP_VERSION);\n } // if\n\n if(extension_loaded('phar')) {\n $this->validationLogOk('Phar extension is available');\n } else {\n $this->validationLogError('Required Phar PHP extension was not found. Please install it before continuing');\n } // if\n\n // Check memory limit\n $memory_limit = php_config_value_to_bytes(ini_get('memory_limit'));\n\n if($memory_limit == -1 || $memory_limit >= 67108864) {\n $formatted_memory_limit = $memory_limit == -1 ? \"unlimited\" : format_file_size($memory_limit);\n $this->validationLogOk('Your memory limit is: ' . $formatted_memory_limit);\n } else {\n $this->validationLogError('Your memory is too low to complete the upgrade. Minimal value is 64MB, and you have it set to ' . format_file_size($memory_limit));\n } // if\n\n // Check whether ROOT is writable\n if(folder_is_writable(ROOT)) {\n $this->validationLogOk('/activecollab folder is writable');\n } else {\n $this->validationLogError('/activecollab folder is not writable. Make it writable to continue');\n } // if\n\n // Check if public/assets folder is writable\n if (defined('PROTECT_ASSETS_FOLDER') && PROTECT_ASSETS_FOLDER) {\n $this->validationLogOk(\"Assets folder is protected, skipping writable check\");\n } else {\n if(folder_is_writable(PUBLIC_PATH . '/assets')) {\n $this->validationLogOk('public/assets folder is writable');\n } else {\n $this->validationLogError('public/assets folder is not writable. Make it writable to continue');\n } // if\n } // if\n\n // Check versions.php\n if(file_is_writable(CONFIG_PATH . '/version.php')) {\n $this->validationLogOk('config/version.php is writable');\n } else {\n $this->validationLogError('config/version.php is not writable. Make it writable to continue');\n } // if\n\n // Validate login parameters\n $email = $params['email']; \n $password = $params['pass'];\n \n if(php_sapi_name() !== 'cli' && $email && $password) {\n if(is_valid_email($email)) {\n $user_table_fields = DB::listTableFields(TABLE_PREFIX . 'users');\n\n // Version 4.0.0 or newer\n if(in_array('type', $user_table_fields)) {\n $user = DB::executeFirstRow('SELECT type, password FROM ' . TABLE_PREFIX . 'users WHERE email = ?', $email);\n\n // Versions older than 4.0.0\n } else {\n $user = DB::executeFirstRow('SELECT role_id, password FROM ' . TABLE_PREFIX . 'users WHERE email = ?', $email);\n } // if\n\n if(is_array($user)) {\n if($this->checkUserPassword($password, $user['password'])) {\n if($this->isUserAdministrator($user)) {\n $this->validationLogOk(\"User '$email' authenticated\");\n } // if\n } else {\n $this->validationLogError(\"Invalid password\");\n } // if\n } else {\n $this->validationLogError(\"User '$email' not found\");\n } // if\n } else {\n $this->validationLogError(\"'$email' is not a valid email address\");\n } // if\n } else {\n $this->validationLogError('Authentication data not provided');\n } // if\n \n return $this->everythingValid();\n }",
"function _getLanguage() {\n global $basePath, $arrLanguages;\n\n $language = $this->defaultLanguage;\n\n if (isset($_SESSION['installer']['langId'])) {\n $language = $arrLanguages[$_SESSION['installer']['langId']]['lang'];\n } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $browserLanguage = substr(strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']),0,2);\n\n foreach ($arrLanguages as $arrLang) {\n if ($browserLanguage == $arrLang['lang']) {\n $language;\n break;\n }\n }\n }\n\n if ($this->_checkLanguageExistence($language)) {\n return $language;\n } else {\n return $this->defaultLanguage;\n }\n }"
] | [
"0.7021248",
"0.65808654",
"0.65651554",
"0.64186203",
"0.6378637",
"0.6366941",
"0.63584083",
"0.6309358",
"0.62619865",
"0.62583864",
"0.6251327",
"0.62208813",
"0.6188067",
"0.61478674",
"0.6139712",
"0.6139004",
"0.61294913",
"0.61153954",
"0.61045176",
"0.61017513",
"0.610137",
"0.6087231",
"0.60837525",
"0.6049297",
"0.59815",
"0.5974591",
"0.59703046",
"0.5963733",
"0.59600127",
"0.5959283",
"0.5941576",
"0.59317285",
"0.59241056",
"0.5923303",
"0.59225804",
"0.59217596",
"0.5915758",
"0.58591765",
"0.5855002",
"0.58469003",
"0.58412564",
"0.58217883",
"0.58190835",
"0.5813185",
"0.5812921",
"0.5808887",
"0.57991666",
"0.5793418",
"0.57915246",
"0.5782611",
"0.5782553",
"0.5770636",
"0.57680583",
"0.5767409",
"0.57599264",
"0.57503444",
"0.5747142",
"0.57187414",
"0.5716116",
"0.57125354",
"0.5705052",
"0.5704348",
"0.5704277",
"0.57011414",
"0.5679134",
"0.56782615",
"0.5677918",
"0.56734353",
"0.56726754",
"0.5671269",
"0.5654302",
"0.5644273",
"0.564399",
"0.56336117",
"0.5630601",
"0.56277764",
"0.5627148",
"0.56251353",
"0.5624455",
"0.5623068",
"0.5621557",
"0.5619896",
"0.56197554",
"0.5617668",
"0.5615366",
"0.560971",
"0.56047",
"0.5603856",
"0.55896705",
"0.558327",
"0.5573163",
"0.55704653",
"0.5568553",
"0.5553892",
"0.55537367",
"0.5549978",
"0.55431336",
"0.5541848",
"0.5536219",
"0.55338526",
"0.5533504"
] | 0.0 | -1 |
Check for the required extensions. | public function extensions(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }",
"private static function checkRequiredPhpExtensions(): void\n {\n /**\n * Warning about mbstring.\n */\n if (! function_exists('mb_detect_encoding')) {\n Core::warnMissingExtension('mbstring');\n }\n\n /**\n * We really need this one!\n */\n if (! function_exists('preg_replace')) {\n Core::warnMissingExtension('pcre', true);\n }\n\n /**\n * JSON is required in several places.\n */\n if (! function_exists('json_encode')) {\n Core::warnMissingExtension('json', true);\n }\n\n /**\n * ctype is required for Twig.\n */\n if (! function_exists('ctype_alpha')) {\n Core::warnMissingExtension('ctype', true);\n }\n\n /**\n * hash is required for cookie authentication.\n */\n if (function_exists('hash_hmac')) {\n return;\n }\n\n Core::warnMissingExtension('hash', true);\n }",
"public function checkExtensions()\r\n\t{\r\n\t\treturn (strcasecmp(pathinfo($this->targetFile, PATHINFO_EXTENSION), pathinfo($this->referenceFile, PATHINFO_EXTENSION)) === 0);\r\n\t}",
"protected function checkExtension() {\n\t\t\n\t\t//If no extensions set, all are valid\n\t\tif(empty($this->valid_extensions)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$extension = $this->getExtension();\n\t\t\n\t\treturn in_array($extension, $this->valid_extensions) ? true : false;\n\t\t\n\t}",
"public static function check_required_ext() {\r\n $shmop = extension_loaded('shmop');\r\n $sysvsem = extension_loaded('sysvsem');\r\n if ($shmop && $sysvsem) {\r\n return true;\r\n }\r\n $missing = array();\r\n if (!$shmop) {\r\n array_push($missing, 'shmop');\r\n }\r\n if (!$sysvsem) {\r\n array_push($missing, 'sysvsem');\r\n }\r\n if (count($missing) == 1) {\r\n throw new Exception('The PHP extension ' . $missing[0] . ' required by class ' . __CLASS__ . ' is not loaded or built into PHP.');\r\n }\r\n throw new Exception('The PHP extensions ' . implode(' and ', $missing) . ' required by class ' . __CLASS__ . ' are not loaded or built into PHP.');\r\n }",
"public function validExtension() {\t\n\t\tif(in_array($this->extension, $this->extensions)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function testPhpExtensionsAreValid()\n {\n $this->assert->php->extensions\n ->isLoaded('simplexml')\n ->isLoaded('fileinfo')\n ->isLoaded('xsl');\n // validate that fileinfo is loaded and configured properly\n $this->assert->php->extensions->fileinfo->isAlive();\n }",
"protected function checkRequiremets () {\n\t\t// Check if `finfo_file()` function exists. File info extension is \n\t\t// presented from PHP 5.3+ by default, so this error probably never happened.\n\t\tif (!function_exists('finfo_file')) \n\t\t\treturn $this->handleUploadError(\n\t\t\t\tstatic::UPLOAD_ERR_NO_FILEINFO\n\t\t\t);\n\t\t\n\t\t// Check if mimetypes and extensions validator class\n\t\t$extToolsMimesExtsClass = static::MVCCORE_EXT_TOOLS_MIMES_EXTS_CLASS;\n\t\tif (!class_exists($extToolsMimesExtsClass)) \n\t\t\treturn $this->handleUploadError(\n\t\t\t\tstatic::UPLOAD_ERR_NO_MIMES_EXT\n\t\t\t);\n\n\t\t// Complete uploaded files temporary directory:\n\t\t$this->GetUploadsTmpDir();\n\t\t\n\t\treturn TRUE;\n\t}",
"protected function checkExtensions($extensionList) {\n\t\tforeach($extensionList as $extensionPath )\n\t\t\t$this->checkExtension($extensionPath);\n\t}",
"protected function checkIfNoConflictingExtensionIsInstalled() {}",
"public function extensionValid() \n\t{\n\t\tif (!in_array($this->extension_of_file, $this->file_types)) //{\n\t\t\tthrow new Exception(\"Invalid file Extension\",5);\n\t\t//}\n\t}",
"public function checkExtension($extension)\n {\n $message = function ($ext) {\n sprintf('Warning: %s extension is not loaded', $ext);\n };\n\n if (is_array($extension)) {\n foreach ($extension as $ext) {\n if (!extension_loaded($ext)) {\n $this->markTestSkipped($message($ext));\n break;\n }\n }\n } elseif (!extension_loaded($extension)) {\n $this->markTestSkipped($message($extension));\n }\n }",
"public function isExtensionLoaded($ext='gd') { \n return extension_loaded($ext); \n }",
"protected function checkWebsocExtensions($extensions) \n\t{\n\t\treturn true; // Override and return false if an extension is not found that you would expect.\n\t}",
"protected function checkPhpExtensions()\n\t{\n\t\tif (!extension_loaded('pcntl'))\n\t\t{\n\t\t\techo \"Extension pcntl not loaded\";\n\t\t\texit(1);\n\t\t}\n\n\t\t// This is used to kill processes\n\t\tif (!extension_loaded('posix'))\n\t\t{\n\t\t\techo \"Extension posix not loaded\";\n\t\t\texit(1);\n\t\t}\n\t}",
"public function getValidExtensions();",
"public function hasExtension()\n {\n \treturn ( $this->_extension !== '' );\n }",
"protected static function checkFileinfoExtension()\n {\n // Make sure that the \"fileinfo\" extension is loaded/enabled\n if (!extension_loaded('fileinfo')) {\n throw new RuntimeException('Required \"fileinfo\" extension not loaded');\n }\n }",
"public function extension_validation($file_ext,$extensions){\n\t\tif(in_array($file_ext,$extensions) == false){\n\t\t\treturn true;\n\t\t}\n\t}",
"public function extension_validation($file_ext,$extensions){\n\t\tif(in_array($file_ext,$extensions) == false){\n\t\t\treturn true;\n\t\t}\n\t}",
"function checkExtension($params = array(), $options = array()) {\n\t\t$val = array_shift($params);\n\t\tif (!empty($val['name'])) {\n\t\t\t$pathinfo = pathinfo($val['name'], PATHINFO_EXTENSION);\n\t\t\tif (in_array($pathinfo, $options)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function cemhub_check_required_php_extensions($set_message = TRUE, $extensions_list = array(CEMHUB_EXTENSION_SSH_NAME, CEMHUB_EXTENSION_GNUPG_NAME)) {\n $return = FALSE;\n $return_extensions_status = array();\n\n foreach ($extensions_list as $extension) {\n $extension_loaded = extension_loaded($extension);\n $return_extensions_status[$extension] = $extension_loaded;\n\n if (empty($extension_loaded) && $set_message) {\n drupal_set_message(t('The extension \"%extension\" must be installed and enabled on the server.', array('%extension' => $extension)), 'warning');\n }\n }\n\n // Check results\n if (!empty($return_extensions_status)) {\n $return = in_array(FALSE, $return_extensions_status) ? FALSE : TRUE;\n }\n\n return $return;\n}",
"public function extens(){\n $this->typefl = pathinfo($this->filename, PATHINFO_EXTENSION);\n\n if(!in_array($this->typefl, $this->type)){\n echo \"Wrong extension!!!\";\n return false;\n }\n else{\n return true;\n }\n }",
"protected function validateExtension($ext,$addional_ext = [])\n\t{\n\t\t$ext = strtolower($ext);\n $valid_extensions = array_merge(['png', 'jpg', 'jpeg', 'gif', 'webp'],$addional_ext);\n\t\treturn in_array($ext,$valid_extensions);\n\t}",
"function setupExtensionsInstall() {\r\n\t\t\t// We need to find the files to install\r\n\t\t\tif (!$this->_findExtensionFiles()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}",
"public function isAllowedExtension()\n {\n if (!empty($this->allowed_upload_file_ext)) {\n if (!is_array($this->allowed_upload_file_ext)) {\n NUCLEUS_Exceptions::catcher(FILE_TYPE_LIST_ERROR);\n return false;\n }\n else {\n if (!in_array($this->_file_info['ext'], $this->allowed_upload_file_ext)) {\n NUCLEUS_Exceptions::catcher(UPLOAD_FILE_TYPE_DENIED);\n return false;\n }\n }\n }\n\n return true;\n }",
"public function extIsAllowed( $ext )\n {\n if ( !mb_strlen($ext) )\n {\n return false;\n }\n\n return in_array($ext, self::$ext);\n }",
"protected function checkPhpExtensionEnabled($ext)\n {\n return extension_loaded($ext);\n }",
"function is_valid_extension ($ext) {\n $ext = strtolower($ext);\n return (is_valid_image_extension($ext) || is_valid_audio_extension($ext)\n || is_valid_video_extension($ext));\n }",
"public function checkExtObj() {}",
"public function checkExtObj() {}",
"protected function checkIfDbalExtensionIsInstalled() {}",
"public function validateExtensionplan(){\n $allowed = array('jpeg', 'jpg', 'png');\n $filename = $this->getplanFloor('name');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n if(!in_array($ext,$allowed)) {\n return false;\n } else {\n return true;\n }\n }",
"public function testSetAllowedExtensionsFail() {\n $dl2 = new downloader();\n $dl2->setAllowedExtensions(array('jpg' => 'image/jpeg',\n 'pl' => 'application/x-perl'));\n $this->assertTrue($dl2->areErrors());\n\n // one invalid extension will invalidate the entire list\n $this->assertFalse($dl2->checkExtension('jpg'));\n $this->assertFalse($dl2->checkExtension('jpeg'));\n $this->assertFalse($dl2->checkExtension('pl'));\n }",
"protected function getExtensionsToLoad() {}",
"protected function getMissingPhpModulesOfExtensions() {}",
"protected function _loadExtensions()\n {\n }",
"public function getAvailableExtensions() {}",
"public function hasExtension($name);",
"private function checkRequirements()\n {\n if (!function_exists('mime_content_type') && !function_exists('finfo_file') && version_compare(PHP_VERSION, '5.3.0') < 0){\n add_action('admin_notices', array($this, 'displayFunctionMissingNotice'));\n return TRUE;\n }\n return TRUE;\n }",
"public function testRequiredExtentions() {\n\t\tif (!$this->_hasTrigger('setupExtensions')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('setupExtensions', $this->ObjectEvent);\n\n\t\t$result = $this->Event->trigger($this->ModelObject, $this->plugin . '.setupExtensions');\n\t\t$this->assertEquals($expected, $result);\n\t}",
"public function getSupportedFileExtensions() {}",
"public function notice_missing_extensions() {\n\n ?>\n <div class=\"error\">\n <p><strong><?php _e( 'The GD or Imagick libraries are not installed on your server. Envira Gallery requires at least one (preferably Imagick) in order to crop images and may not work properly without it. Please contact your webhost and ask them to compile GD or Imagick for your PHP install.', 'envira-gallery' ); ?></strong></p>\n </div>\n <?php\n\n }",
"function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::files($this->_extensionsPath, '\\.gz$', false, false);\r\n\t\t\t$bz2Fies = JFolder::files($this->_extensionsPath, '\\.bz2$', false, false);\r\n\t\t\t$files = array_merge($zipFiles, $gzFiles, $bz2Fies);\r\n\t\r\n\t\t\tif (count($files) > 0) {\r\n\t\t\t\t$this->_packageFiles = $files;\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public function check_dependencies() {\n\n $dependencies = [];\n\n /**\n * Sample plugin dependency\n *\n * Depends on ACF plugin active\n */\n// if ( ! class_exists( 'acf' ) ) {\n// $dependencies[] = [\n// 'type' => 'error',\n// 'message' => $this->name . ' ' . __( 'requires ACF PRO plugin activated', 'goapostas' )\n// ];\n// }\n\n /**\n * Depends on ACF plugin active\n */\n if ( false === version_compare( PHP_VERSION, '7.0.0', '>=' ) ) {\n $dependencies[] = [\n 'type' => 'error',\n 'message' => $this->name . ' ' . __( 'requires PHP 7.0.0 or higher. Your PHP version is ' . PHP_VERSION, 'goapostas' )\n ];\n }\n\n if ( ! empty( $dependencies ) ) {\n $this->show_admin_notices( $dependencies );\n\n return false;\n }\n\n return true;\n }",
"public function testExtensionLoaded(): void\n {\n $info = $this->createProvider(false)->getInformation();\n $this->assertEquals(true, $info['extension_loaded']);\n }",
"function allowed_extensions($url) {\n\n\t}",
"function check_file_extension($ext, $allowed) {\nif (in_array($ext, $allowed)) {\nreturn true;\n}else {\necho \"Only .txt file allow to be uploaded\";\n}\n}",
"public function isValidType( $ext=null ){\n global $VALID_FILES;\n if (!$ext)\n $ext = $this->ext; \n return (in_array( $ext, $VALID_FILES )); \n }",
"protected function checkSupports($ext, $resource)\n {\n if (!is_string($resource)) {\n return false;\n }\n\n $info = pathinfo($resource);\n $extension = $info['extension'];\n\n if ('dist' === $extension) {\n $extension = pathinfo($info['filename'], PATHINFO_EXTENSION);\n }\n\n if (is_string($ext)) {\n return ($ext === $extension);\n }\n\n if (is_array($ext)) {\n $supported = false;\n\n foreach ($ext as $value) {\n if ($value === $extension) {\n $supported = true;\n break;\n }\n }\n\n return $supported;\n }\n\n return false;\n }",
"protected function checkExt(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Ext) && $this->_Ext !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Ext} is not a valid value for Ext\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && strlen($this->_Ext) > 8 ) {\n\t\t\t$inMessage .= \"Ext cannot be more than 8 characters\";\n\t\t\t$isValid = false;\n\t\t}\n\t\tif ( $isValid && strlen($this->_Ext) <= 1 ) {\n\t\t\t$inMessage .= \"Ext must be more than 1 character\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\t\t\t\n\t\treturn $isValid;\n\t}",
"static function isKnownExtension($strExtension)\n {\n if (empty(self::$arrExtensions2Mimetypes)) self::init();\n return isset(self::$arrExtensions2Mimetypes[$strExtension]);\n }",
"protected function setAvailableExtensions() {}",
"public static function checkRequirements()\n {\n $extensions = array('curl', 'json');\n \n foreach ($extensions as $extension) {\n if (!extension_loaded($extension)) {\n throw new Everypay_Exception_RuntimeException(\n 'You need the PHP ' . $extension\n . ' extension in order to use EveryPay PHP Library'\n );\n }\n }\n }",
"public function checkRequirements()\n {\n }",
"function is_valid_file_extension($value, $set){\n if (in_array($value, $set)) {\n return true;\n }\n}",
"protected function _extensionLoaded() {}",
"private function extension_is_allowed( $extension = null )\n\t{\n\t\tif( $this->config['content_types'] === false || is_null($this->config['content_types']) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn ( is_null($extension) || ! in_array($extension, $this->config['content_types']) ) ? false : true;\n\t}",
"public function checkOperationality()\n {\n if (!extension_loaded('gd')) {\n throw new SystemRequirementsNotMetException('Required Gd extension is not available.');\n }\n\n if (!function_exists('imagewebp')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without webp support.'\n );\n }\n }",
"public function checkDependencies() {\n if ((float) t3lib_extMgm::getExtensionVersion('extension_builder') < 2) {\n throw new Tx_Clitools_Exception_Dependency('This generator depends on extension_builder 2 higher');\n }\n }",
"public function isValidExtension($extension): bool\n {\n $extension = (string)$extension;\n\n return $extension !== '' && in_array($extension, Utils::getSupportPageTypes(), true);\n }",
"function knowsExtension ($anExtension)\n\t{\n\t\t$result = in_array ($anExtension, $this->extensions);\n\t\treturn $result;\n\t}",
"function checkCurlExtension()\n\t{\n\t\tif ( ! extension_loaded('curl') or ! is_callable('curl_init'))\n\t\t{\n\t\t\techo '<h3>' . __('cURL Error !', 'Gr_Integration') . '</h3>';\n\t\t\techo '<h3>' . __('GetResponse Integration Plugin requires PHP cURL extension', 'Gr_Integration') . '</h3>';\n\n\t\t\treturn;\n\t\t}\n\t}",
"protected function checkRequiredModules()\n\t{\n\t\t$result = true;\n\n\t\tif(!Loader::includeModule('crm'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage(\"CRM_CLE2_CRM_MODULE_NOT_INSTALL\");\n\t\t\t$result = false;\n\t\t}\n\n\t\tif(!Loader::includeModule('sale'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage(\"CRM_CLE2_SALE_MODULE_NOT_INSTALL\");\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}",
"private static function checkRequirements()\n {\n $checker = (new envChecker)\n ->requirePhpVersion('>=7.1')\n ->requirePhpExtensions(self::$required_extensions)\n ->requireDirectory(SYST_DIR, envChecker::CHECK_IS_READABLE)\n ->requireDirectory(APP_DIR, envChecker::CHECK_IS_READABLE);\n\n $output = $checker->check();\n if (! $checker->isSatisfied()) \n {\n echo '<h3>An error encourred</h3>';\n exit(join('<br/> ', $checker->getErrors()));\n }\n }",
"function is_valid_audio_extension ($ext) {\n switch ($ext = strtolower($ext)) {\n //Sounds (HTML5 <audio> formats)\n case 'mp3':\n case 'ogg':\n case 'aac':\n case 'wav':\n case 'wave':\n return true;\n\n //Denied extension\n default:\n return false;\n }\n }",
"function availableFileTypes($ext) {\n //checking file type extension\n switch ($ext) {\n //checking txt extention\n case \"txt\":\n $type[0] = \"text/plain\";\n break;\n\n //checking xml extention\n case \"xml\":\n $type[0] = \"text/xml\";\n $type[1] = \"application/xml\";\n break;\n\n //checking csv extention\n case \"csv\":\n $type[0] = \"text/x-comma-separated-values\";\n $type[1] = \"application/octet-stream\";\n $type[2] = \"text/plain\";\n break;\n\n //checking zip extention\n case \"zip\":\n $type[0] = \"application/zip\";\n break;\n\n //checking tar extention\n case \"tar\":\n $type[0] = \"application/x-gzip\";\n break;\n\n //checking ctar extention\n case \"ctar\":\n $type[0] = \"application/x-compressed-tar\";\n break;\n\n //checking pdf extention\n case \"pdf\":\n $type[0] = \"application/pdf\";\n break;\n\n //checking doc extention\n case \"doc\":\n $type[0] = \"application/msword\";\n $type[1] = \"application/octet-stream\";\n break;\n\n //checking xls extention\n case \"xls\":\n $type[0] = \"application/vnd.ms-excel\";\n $type[1] = \"application/vnd.oasis.opendocument.spreadsheet\";\n break;\n\n //checking ppt extention\n case \"ppt\":\n $type[0] = \"application/vnd.ms-powerpoint\";\n break;\n\n //checking jpg extention\n case \"jpg\":\n $type[0] = \"image/jpg\";\n $type[1] = \"image/jpeg\";\n $type[2] = \"image/pjpeg\";\n break;\n\n //checking gif extention\n case \"gif\":\n $type[0] = \"image/gif\";\n break;\n\n //checking png extention\n case \"png\":\n $type[0] = \"image/png\";\n break;\n\n //checking bmp extention\n case \"bmp\":\n $type[0] = \"image/bmp\";\n break;\n\n //checking icon extention\n case \"icon\":\n $type[0] = \"image/x-ico\";\n break;\n\n //checking tfontt extention\n case \"font\":\n $type[0] = \"application/x-font-ttf\";\n break;\n }\n\n return $type;\n }",
"private function isExtensionSupported(string $extension): bool\n {\n return in_array($extension, $this->supportedExtensions);\n }",
"public function get_test_php_extensions()\n {\n }",
"function is_valid_image_extension ($ext) {\n switch ($ext = strtolower($ext)) {\n //Pictures\n case 'jpg':\n case 'gif':\n case 'png':\n case 'bmp':\n case 'xbm':\n return true;\n\n //Denied extension\n default:\n return false;\n }\n }",
"public function checkImportPrerequisites() {}",
"public function get_supported_extensions() {\n return array();\n }",
"public function validateExtensions($attribute){\n $infoFile = $this->$attribute;\n if (!in_array(pathinfo($infoFile['file']['name'], PATHINFO_EXTENSION), ['png', 'jpg', 'jpeg'])) {\n $this->addError($attribute, \\Yii::t('app', 'extensions',['attribute' => $this->attributeLabels()[$attribute]]));\n }\n }",
"public function satisfiesJSONExtension(): bool\n {\n if (function_exists('extension_loaded') && extension_loaded('json')) {\n return true;\n } else if (function_exists('json_encode')) {\n return true;\n }\n\n return false;\n }",
"public function getExtensionAllowed()\n {\n return array_merge($this->imageTypes, $this->videoTypes, $this->documentTypes);\n }",
"static function chkFileExtension($str='') {\n $match= preg_match('/.swf/i', $str);\n if($match>0){\n return \"yes\";\n }else{\n return \"no\";\n }\n }",
"public function testCheckExtensionNotAllowedDefault() {\n $this->assertFalse($this->dl->checkExtension('jpg'));\n }",
"public function checkRequirements()\n\t{\n\t\t$tests = array('result' => true);\n\t\t$tests['curl'] = array('name' => $this->l('PHP cURL extension must be enabled on your server'), 'result' => extension_loaded('curl'));\n\t\t$tests['mbstring'] = array('name' => $this->l('PHP Multibyte String extension must be enabled on your server'), 'result' => extension_loaded('mbstring'));\n\t\tif (Configuration::get('STRIPE_MODE'))\n\t\t\t$tests['ssl'] = array('name' => $this->l('SSL must be enabled on your store (before entering Live mode)'), 'result' => Configuration::get('PS_SSL_ENABLED') || (!empty($_SERVER['HTTPS']) && Tools::strtolower($_SERVER['HTTPS']) != 'off'));\n\t\t$tests['php52'] = array('name' => $this->l('Your server must run PHP 5.3.3 or greater'), 'result' => version_compare(PHP_VERSION, '5.3.3', '>='));\n\t\t$tests['configuration'] = array('name' => $this->l('You must sign-up for Stripe and configure your account settings in the module (publishable key, secret key...etc.)'), 'result' => $this->checkSettings());\n\n\t\tif (_PS_VERSION_ < 1.5)\n\t\t{\n\t\t\t$tests['backward'] = array('name' => $this->l('You are using the backward compatibility module'), 'result' => $this->backward, 'resolution' => $this->backward_error);\n\t\t\t$tmp = Module::getInstanceByName('mobile_theme');\n\t\t\tif ($tmp && isset($tmp->version) && !version_compare($tmp->version, '0.3.8', '>='))\n\t\t\t\t$tests['mobile_version'] = array('name' => $this->l('You are currently using the default mobile template, the minimum version required is v0.3.8').' (v'.$tmp->version.' '.$this->l('detected').' - <a target=\"_blank\" href=\"http://addons.prestashop.com/en/mobile-iphone/6165-prestashop-mobile-template.html\">'.$this->l('Please Upgrade').'</a>)', 'result' => version_compare($tmp->version, '0.3.8', '>='));\n\t\t}\n\n\t\tforeach ($tests as $k => $test)\n\t\t\tif ($k != 'result' && !$test['result'])\n\t\t\t\t$tests['result'] = false;\n\n\t\treturn $tests;\n\t}",
"public function check_files()\n {\n }",
"public function canGetExtensionKey() {\n\t\t$provider = $this->getConfigurationProviderInstance();\n\t\t$record = $this->getBasicRecord();\n\t\t$extensionKey = $provider->getExtensionKey($record);\n\t\t$this->assertNull($extensionKey);\n\t}",
"private function matchExtensions(array $extensions): bool\n {\n $mimeTypes = array_map(\n static fn (string $extension): string => MimeType::fromExtension($extension),\n $extensions\n );\n return in_array($this->mimeType, $mimeTypes, true);\n }",
"public function checkExtension($fileName){\n \t\t$extName = explode(\".\", $fileName);\n \t\t$extension = end($extName);\n \t\tif ($extension == \"java\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}",
"public final function getAcceptedExtensions() { \n return $this->acceptedExtensions; }",
"private function checkGDLibrary(){\n\t//Check for GD support\n\t\treturn extension_loaded('gd');\n\t}",
"function rtasset_check_plugin_dependecy() {\n\n\tglobal $rtasset_plugin_check;\n\t$rtasset_plugin_check = array(\n\t\t'rtbiz' => array(\n\t\t\t'project_type' => 'all',\n\t\t\t'name' => esc_html__( 'WordPress for Business.', RT_ASSET_TEXT_DOMAIN ),\n\t\t\t'active' => class_exists( 'Rt_Biz' ),\n\t\t\t'filename' => 'index.php',\n\t\t),\n\t);\n\n\t$flag = true;\n\n\tif ( ! class_exists( 'Rt_Biz' ) || ! did_action( 'rt_biz_init' ) ) {\n\t\t$flag = false;\n\t}\n\n\tif ( ! $flag ) {\n\t\tadd_action( 'admin_enqueue_scripts', 'rtasset_plugin_check_enque_js' );\n\t\tadd_action( 'wp_ajax_rtasset_activate_plugin', 'rtasset_activate_plugin_ajax' );\n\t\tadd_action( 'admin_notices', 'rtasset_admin_notice_dependency_not_installed' );\n\t}\n\n\treturn $flag;\n}",
"public static function hasExtension( $ext )\n {\n if( !empty( $ext ) && is_string( $ext ) )\n {\n $ext = strtolower( trim( $ext ) );\n return array_key_exists( $ext, self::loadedExtensions() );\n }\n return false;\n }",
"public function test_requirements()\n\t{\n\t\t// Look for ACF\n\t\tif ( ! class_exists('acf') && ! class_exists('Acf') ) { return false; }\n\t\treturn true;\n\t}",
"private function _has_extension($filename) {\n\t\t$exploded = explode(\".\", $filename);\n\t\tif(sizeof($exploded) > 1)\n\t\t\treturn $exploded;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function mimeTypeValid()\n\t{\n\t\tif (!in_array($this->files['type'], $this->mime_types)) {\n\t\t\tthrow new Exception(\"Invalid file Extension\",6);\n\t\t}\n\t}",
"function is_extension_activated( $extension, $autoload = true ) {\n\t\treturn class_exists( $extension, $autoload );\n\t}",
"public function supportsExtension($extension)\n {\n return !empty($this->convertersByExtension[$extension]);\n }",
"function check_upload_mimes($mimes)\n {\n }",
"protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\n }",
"public function checkSubExtObj() {}",
"function extension_loaded()\n{\n global $is_curl_mocked, $mocked_extension_loaded;\n return $is_curl_mocked ? $mocked_extension_loaded : call_user_func_array('\\curl_loaded', func_get_args());\n}",
"public function getAllowedExtensions(){\n return $this->allowedExtensions;\n }",
"function validateFileExtension(&$model, $fieldData, $fieldName, $allowedExts = array()) {\n if (empty($fieldData[$fieldName]['tmp_name'])) return true;\n \n $extension = strtolower(pathinfo($fieldData[$fieldName]['name'], PATHINFO_EXTENSION));\n \n if (!is_array($allowedExts) || (!in_array('*', $allowedExts) && !in_array($extension, $allowedExts))) return false;\n \n return true;\n }",
"public function getSupportedFileExtensions()\n {\n return array_keys($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['onlineMediaHelpers']);\n }",
"function check() {\n\t\tglobal $wp_version;\n\t\t$requirements_met = true;\n\n\t\tif ( version_compare( $wp_version, $this->install_requirements['WordPress Version'], '<' ) ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_wp_version_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( version_compare( PHP_VERSION, $this->install_requirements['PHP Version'], '<' ) ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_php_version_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( $this->install_requirements['Multibyte'] && ! $this->check_multibyte_support() ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_mbstring_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t} elseif ( $this->install_requirements['UTF-8'] && ! $this->check_utf8_support() ) {\n\t\t\tif ( is_admin() ) {\n\t\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices_charset_incompatible' ) );\n\t\t\t}\n\t\t\t$requirements_met = false;\n\t\t}\n\n\t\tif ( ! $requirements_met && is_admin() ) {\n\t\t\t// Load text domain to ensure translated admin notices.\n\t\t\tload_plugin_textdomain( 'wp-typography', false, dirname( $this->local_plugin_path ) . '/translations/' );\n\t\t\t/* add_action( 'admin_init', array( $this, 'deactivate_plugin' ) ); */\n\t\t}\n\n\t\treturn $requirements_met;\n\t}",
"public function loadExtensionNode()\n {\n $extensions = $this->xml->xpathQuery('//ns:archive/ns:extension');\n\n if ($this->loopExtensions($extensions))\n {\n return true;\n }\n\n throw new \\Exception(trans('errors.missing_meta_extension', ['file' => $this->file]));\n }"
] | [
"0.8116604",
"0.7901163",
"0.7873443",
"0.78547615",
"0.77574605",
"0.7597541",
"0.7415215",
"0.7384415",
"0.7373312",
"0.73700166",
"0.7320419",
"0.71613866",
"0.70539176",
"0.7036733",
"0.7033759",
"0.7022527",
"0.6991644",
"0.698146",
"0.6974277",
"0.6974277",
"0.69378865",
"0.6930089",
"0.69217116",
"0.6850776",
"0.68343306",
"0.68111545",
"0.6787144",
"0.6761977",
"0.6744088",
"0.6740242",
"0.67384523",
"0.67300594",
"0.6663847",
"0.6625422",
"0.6605259",
"0.65997446",
"0.6591079",
"0.65734607",
"0.65723675",
"0.64791405",
"0.64787394",
"0.64468527",
"0.6437979",
"0.6428742",
"0.6421688",
"0.63820595",
"0.63432115",
"0.63401717",
"0.6288907",
"0.6279169",
"0.62718827",
"0.62445295",
"0.623197",
"0.6224601",
"0.62148744",
"0.6207354",
"0.6185344",
"0.61853063",
"0.61676586",
"0.61657953",
"0.6150916",
"0.6149622",
"0.6146814",
"0.6143145",
"0.61412424",
"0.61320275",
"0.61289227",
"0.61236566",
"0.6119899",
"0.6114252",
"0.60999906",
"0.6097489",
"0.6095169",
"0.60945797",
"0.60844505",
"0.60800606",
"0.6067283",
"0.6065006",
"0.60461104",
"0.60372734",
"0.6014834",
"0.6009381",
"0.60092205",
"0.60070163",
"0.60066986",
"0.5988705",
"0.59854895",
"0.597815",
"0.5977232",
"0.59711057",
"0.5957558",
"0.595597",
"0.595414",
"0.5949429",
"0.59455234",
"0.59430563",
"0.5921635",
"0.59148884",
"0.5912759",
"0.59120303"
] | 0.5955151 | 92 |
currently client can not send any data. | public function onData($data, $client)
{
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function send() {\n if (!$this->client) {\n return false;\n }\n }",
"protected function send() {}",
"abstract function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"abstract function doSend();",
"public function send() {}",
"public function send() {}",
"public function send() {}",
"public function send() {}",
"public function send() {}",
"public function send()\n {\n }",
"private function send_msg() {\r\n }",
"abstract public function send($data);",
"public function harSending() {\n try {\n $this->getSending();\n return true;\n } catch( Exception $e ) {\n if( $e->getCode() == 144001 ) {\n return false;\n }\n throw $e;\n }\n }",
"public function send()\n {\n }",
"public function send()\n {\n }",
"public function send()\n {\n }",
"protected function beforeSending()\n {\n }",
"public function isSent() {}",
"public function preSend()\n {\n }",
"public function baseWrite()\n {\n $len = @fwrite($this->_socket, $this->_sendBuffer);\n if($len === strlen($this->_sendBuffer))\n {\n Worker::$globalEvent->del($this->_socket, EventInterface::EV_WRITE);\n $this->_sendBuffer = '';\n if($this->_status == self::STATUS_CLOSING)\n {\n $this->destroy();\n }\n return true;\n }\n if($len > 0)\n {\n $this->_sendBuffer = substr($this->_sendBuffer, $len);\n }\n else\n {\n if(feof($this->_socket))\n {\n self::$statistics['send_fail']++;\n $this->destroy();\n }\n }\n }",
"public function send() {\n if (!$this->client) {\n return false;\n }\n\n $this->addInt8($this->value);\n\n Sockets::out($this->client, $this);\n return true;\n\n }",
"public function client_send($data, $command = '')\n {\n }",
"public function isClientSafe()\n {\n }",
"public function testSendDataOnly()\n {\n $expectedBody = $this->getExpectedBody(\n [\n ['SKU' => 'test123']\n ],\n []\n );\n\n $this->mockEndpoint();\n $this->mockCurl($expectedBody);\n\n $this->subject->addData(['SKU' => 'test123']);\n $responses = $this->subject->send();\n\n $this->assertEquals(1, count($responses));\n\n $this->assertEquals(\n [\n 'status' => 200,\n 'body' => ''\n ],\n $responses[0]\n );\n }",
"public function send() {\r\n\t\t\t$this->sent = true;\r\n\t\t}",
"abstract public static function send(array $data);",
"function send_read($data){\n\t\n\t\t$address = gethostbyname($this->vars['host']);\n\t\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t$result = socket_connect($socket, $address, $this->vars['port']);\n\n\t\t$transfer = json_encode($this->vars[function_list]);\n\t\t\n\t\t$count = strlen($transfer);\n\t\tprint \"abc\";\n\t\tsocket_send($socket,$count,strlen($count),MSG_DONTROUTE); #send length data to server\n\n\t\tsocket_recv($socket , $buf , 2 , MSG_WAITALL ); #become ack\n\n\t\tsocket_send($socket,$transfer,$count,MSG_DONTROUTE); #send data to server\n\t\t\n\t\tsocket_recv($socket , $count , 30 , MSG_WAITALL ); #income char lentgh\n\t\t\n\t\tsocket_send($socket,'ok',2,MSG_DONTROUTE); #send ack\n\t\t\n\t\tsocket_recv($socket , $buf , $count , MSG_WAITALL ); #income new data\n\n\t\t$returner = json_decode($buf,true);\n\t\tsocket_close($socket);\n\t\treturn($returner);\n\t\t\n\t}",
"protected function socketPerform() {}",
"function Write($data=null) \r\n{ \r\n//** no connection is available, zero bytes can be sent. \r\n\r\nif(!$this->isOpen()) \r\n{ \r\n$this->LastError = \"No connection available for writing\"; \r\nreturn 0; \r\n} \r\n$data = strval($data); //** ensure that data is available. \r\nif(strlen($data) == 0) //** no data to be sent. \r\nreturn 0; //** zero bytes were sent. \r\nelse //** connection and data, set timeout and send. \r\n{ \r\n//$this->_SetTimeout(); //** set timeout. \r\nreturn fwrite($this->Socket, $data, strlen($data)); //** write data. \r\n} \r\n}",
"public function sendMsg($data,$config=\"one\"){\r\n $sokectConfig = config(\"socket.connect.one\");\r\n $socket =new Socket($sokectConfig);\r\n \r\n $sendJson = json_encode($data);\r\n $len = strlen($sendJson);\r\n $head = str_pad($len,4,\"0\",STR_PAD_LEFT);//根sever协商发过去的前四个字节是字符串的长度\r\n $socket->sendRequest($head.$sendJson);\r\n return true;\r\n }",
"public function processWrite()\n {\n if (!$this->hasPendingWrite()) {\n return;\n }\n\n if (!$this->pendingWriteBuffer) {\n $this->pendingWriteBuffer .= array_shift($this->pendingWrites)->toRawData();\n }\n\n $this->log('Writing data to client, buffer contents: ' . $this->pendingWriteBuffer, Loggable::LEVEL_DEBUG);\n\n $bytesWritten = fwrite($this->socket, $this->pendingWriteBuffer);\n\n if ($bytesWritten === false) {\n $this->log('Data write failed', Loggable::LEVEL_ERROR);\n $this->trigger('error', $this, 'Data write failed');\n\n $this->disconnect();\n } else if ($bytesWritten > 0) {\n $this->pendingWriteBuffer = (string) substr($this->pendingWriteBuffer, $bytesWritten);\n }\n }",
"public function trySend(mixed $message): void;",
"private function write($data) {\n if (!fwrite($this->_socket, $data)) \n throw new Predis_ClientException(sprintf(\n 'An error has occurred while writing data %s on the network stream'),\n $data\n );\n }",
"function send_data($data) \n {\n \n \t if (354 != ($errno = $this->smtp_command(\"DATA\"))) {\n return $this->report_error($this->_smtp_msg,$errno);\n\t }\n\t \n \t socket_write($this->_socket, $data,strlen($data));\n \n if ($this->smtp_command(\"\\r\\n.\") != 250) {\n return $this->report_error(\"Could not finish data input.\");\n }\n \n return true;\n }",
"public function send() {\n while ($this->socketPerform()) {\n if ($this->socketSelect() === -1) {\n return false;\n }\n }\n return true;\n }",
"public static function shouldReceive()\n {\n }",
"public static function shouldReceive()\n {\n }",
"public static function shouldReceive()\n {\n }",
"public static function shouldReceive()\n {\n }",
"function send($data);",
"function send($data);",
"public function send($data){\n $this->cServ->send($data) ;\n $this->close() ;\n }",
"public function isClientSafe();",
"public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }",
"public function test_send_returnsSelf_ifNoService()\n\t{\n\t\t$request = new Request\\Get('http://x.x.x.x');\n\t\t\n\t\t$client = new Client();\n\t\t\n\t\t$this->assertSame($client, $client->send($request));\n\t\t\n\t\treturn;\t\n\t}",
"public function isSent() {\n\treturn $this->status != self::$WAITING;\n }",
"protected function sendResponse() {}",
"public function postSend()\n {\n }",
"public function sendData($data)\n {\n // TODO: Implement sendData() method.\n }",
"public function sendRequest()\n {\n }",
"public function send() :bool {\n // Is the Agent enabled ?\n if ($this->config->get('active') === false) {\n return true;\n }\n\n if ($this->config->get('defaultConnector') === 'udp') {\n return $this->sendUDP(UDP::UDP_USE_CONFIG_SETTINGS);\n }else{\n // Send Using TCP\n return $this->sendTCP();\n }\n }",
"public function testSend()\n {\n }",
"public function testSend()\n {\n }",
"private function send_message($msg)\n\t{\n\t\t\tforeach ($this->clients as $changed_socket) {\n\t\t\t\t\t@socket_write($changed_socket, $msg, strlen($msg));\n\t\t\t}\n\t\t\treturn true;\n\t}",
"public function client_send($data)\n {\n $this->edebug(\"CLIENT -> SERVER: $data\", self::DEBUG_CLIENT);\n return fwrite($this->smtp_conn, $data);\n }",
"function en_send_transdata() {\n\t// Handle sending of data\n}",
"private function send(): void\n {\n $data = [\n 'code' => $this->status,\n 'message' => $this->message,\n 'datetime' => Carbon::now()\n ];\n\n $config = config(\"tebot.$this->channelConfig\");\n\n $data['title'] = $this->title . ' ' . $config['name'];\n\n if (!empty($this->detail)) $data['detail'] = json_encode($this->detail);\n\n Http::withHeaders(['x-api-key' => $config['key']])->post($config['url'] . '/api/message', $data);\n }",
"public function send($send_buffer, $raw = false)\n {\n if($this->_status == self::STATUS_CLOSED)\n {\n return false;\n }\n if(false === $raw && $this->protocol)\n {\n $parser = $this->protocol;\n $send_buffer = $parser::encode($send_buffer, $this);\n }\n \n if($this->_sendBuffer === '')\n {\n $len = @fwrite($this->_socket, $send_buffer);\n if($len === strlen($send_buffer))\n {\n return true;\n }\n \n if($len > 0)\n {\n $this->_sendBuffer = substr($send_buffer, $len);\n }\n else\n {\n if(feof($this->_socket))\n {\n self::$statistics['send_fail']++;\n if($this->onError)\n {\n call_user_func($this->onError, $this, WORKERMAN_SEND_FAIL, 'client closed');\n }\n $this->destroy();\n return false;\n }\n $this->_sendBuffer = $send_buffer;\n }\n \n Worker::$globalEvent->add($this->_socket, EventInterface::EV_WRITE, array($this, 'baseWrite'));\n return null;\n }\n else\n {\n // check send buffer size\n if(self::$maxSendBufferSize <= strlen($this->_sendBuffer) + strlen($send_buffer))\n {\n self::$statistics['send_fail']++;\n if($this->onError)\n {\n call_user_func($this->onError, $this, WORKERMAN_SEND_FAIL, 'send buffer full');\n }\n return false;\n }\n $this->_sendBuffer .= $send_buffer;\n }\n }",
"public function send()\n {\n $this->jsonManager->domain = $this->uri;\n $this->jsonManager->port = $this->port;\n $this->jsonManager->online = $this->isOnline();\n $this->jsonManager->send();\n }",
"private function sendData($message)\n {\n if ($this->debug) {\n echo \"Sending data[{$message}]... \";\n }\n $message = $message . \"\\r\\n\";\n if (!socket_send($this->socket, $message, strlen($message), 0)) {\n throw new Exception(\"Could not send data. Reason: \" . socket_strerror(socket_last_error()));\n }\n }",
"function send($str) {\r\n @fwrite($this->handler,$str);\r\n \r\n return true;\r\n }",
"public function sendContent();",
"public function send()\n {\n http_response_code($this->statusCode);\n $this->sendContent();\n }",
"public function testFailedSend()\n {\n $gateway = $this->app[CoinmarketcapGateway::class];\n $response = $gateway->send('/v1/cryptocurrency/info');\n $this->assertIsString($response);\n $response = json_decode($response, true);\n $this->assertGreaterThan(0, array_get($response, 'status.error_code'));\n }",
"public abstract function send(Hermes_Message_Data $message);",
"public function allowMessage()\n {\n $this->_data['Mensaje'] = 1;\n }",
"function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}",
"protected abstract function receive();",
"function send_request() { \n if(!$this->connect()) { \n return false; \n } \n else { \n $this->result = $this->request($this->data);\n return $this->result; \n } \n }",
"public function sendTCP() : bool {\n try {\n // Is the Agent enabled ?\n if ($this->config->get('active') === false) {\n return true;\n }\n\n $connector = new TCP($this->config);\n $status = true;\n\n if ($this->payload->isEmpty() === false) {\n $status = $status && $connector->send($this->payload);\n }\n\n if ($status === true) {\n $this->payload->reset();\n }\n\n return $status;\n }catch (\\Exception $ex) {\n // Call Error Handler\n if ($this->tcpErrorHandler) {\n $this->tcpErrorHandler->handleException($ex);\n }\n return false;\n }\n }",
"function _sendCmd($cmd)\n {\n $status = $this->_sock->getStatus();\n if (PEAR::isError($status) || $status['eof']) {\n return new PEAR_Error( 'Failed to write to socket: (connection lost!) ' );\n }\n if ( PEAR::isError( $error = $this->_sock->write( $cmd . \"\\r\\n\" ) ) ) {\n return new PEAR_Error( 'Failed to write to socket: ' . $error->getMessage() );\n }\n\n if( $this->_debug ){\n // C: means this data was sent by the client (this class)\n echo \"C:$cmd\\n\";\n }\n return true;\n }",
"public function send()\n {\n $this->trigger(self::EVENT_BEFORE_SEND);\n $this->prepare();\n $this->trigger(self::EVENT_AFTER_PREPARE);\n $this->sendHeaders();\n $this->sendContent();\n $this->trigger(self::EVENT_AFTER_SEND);\n $this->isSent = true;\n }",
"function tcp_write(&$info) {\n\t$sock=$info['sock'];\n\t$buf=&$info['buf'];\n\t$sockid=$info['sockid'];\n\tif (!isset($GLOBALS['SOCKETS'][$sockid])) return false; // shutdown this socket !\n\tif (!$buf) return true;\n\tif (defined('IN_ERROR')) {\n\t\tkill_socket($sockid);\n\t\treturn false;\n\t}\n\t$w=array($sock);\n\t$ret=socket_select($r=null,$w,$e=null,0);\n\tif ($ret===false) {\n\t\t// error !\n\t\t$GLOBALS['BtWindow']->gtk_error(socket_strerror(socket_last_error($sock)).' on socket_select [write]');\n\t\treturn;\n\t}\n\tif ($ret<=0) return true; // can't write yet !\n\t// ok, we can send data !\n\t$ret=@socket_write($sock,$buf);\n\tif ($ret===false) {\n//\t\t$GLOBALS['BtWindow']->gtk_error(socket_strerror(socket_last_error($sock)).' on socket_write');\n\t\techo 'Non-fatal error: '.socket_strerror(socket_last_error($sock)).\"\\n\";\n\t\tkill_socket($sockid);\n\t\treturn;\n\t}\n\t$GLOBALS['COUNTERS']['up']+=$ret;\n\t$GLOBALS['COUNT']['up']+=$ret;\n\t$buf=substr($buf,$ret);\n\tif ($buf===false) $buf='';\n\treturn true;\n}",
"public function send($socket)\n\t{\n\t}",
"public function fjernSending() {\n $this->sending = null;\n }",
"public function sendTest()\n\t{\n\t\t$id = Input::get('device');\n\t\t$device = Device::find($id);\n\t\t$lock = cURL::post('http://localhost:3000/send',['name' => $device->tcpName,'data' => '**,imei:'.$device->imei.',L']);\n if($lock->statusCode != 200){\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error de Comunicacion con el Dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #03)','type' => 'status'));\n }\n sleep(10);\n $data = Data::join('datatypes','datatypes.id','=','data.datatypes_id')->where('datatypes.name','lt')->orderBy('data.id', 'DESC')->take(1)->select('data.created_at')->get()->first();\n if((time()-strtotime($data->created_at)) <10){\n $unlock = cURL::post('http://localhost:3000/send',['name' => $device->tcpName,'data' => '**,imei:'.$device->imei.',M']);\n if($unlock->statusCode != 200){\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error de Comunicacion con el Dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #03)','status' => 'error'));\n }\n sleep(10);\n $data = Data::join('datatypes','datatypes.id','=','data.datatypes_id')->where('datatypes.name','mt')->orderBy('data.id', 'DESC')->take(1)->select('data.created_at')->get()->first();\n if((time()-strtotime($data->created_at)) <10) {\n return json_encode(array('text' => 'Exitosa','msg' => 'Prueba Ejecutada Correctamente','status' => 'success'));\n }\n else{\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error al Consultar por el Estado del dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #02)','status' => 'error'));\n }\n }\n else{\n return json_encode(array('text' => 'Error','msg' => 'Hubo un Error al Consultar por el Estado del dispositivo, Porvafor Comuniquese con el Servicio Tecnico (Error Code #01)','status' => 'error'));\n }\n\t}",
"public abstract function sendMessage();",
"private function smtpData()\n { \n $this->writeCommand('DATA' . $this->breakLine);\n \n $response = $this->getSmtpResponse();\n $code = substr($response, 0, 3);\n \n $this->debugMessages[] = 'Success: ' . $response;\n \n if($code != 354) {\n \n $this->debugMessages[] = 'Error: DATA command not accepted from server! Error number: ' .$code . ' (' . substr($response, 4) . ')';\n \n return false;\n }\n \n $this->header();\n \n // Attachment?\n\t\tif (count($this->attachment) > 0)\n\t\t{\n\t\t\t$body = '--'.$this->boundary.$this->breakLine\n\t\t\t\t.'Content-type: text/plain; charset='.$this->charset.$this->breakLine\n\t\t\t\t.'Content-Transfer-Encoding: '.$this->encoding.$this->breakLine.$this->breakLine\n\t\t\t\t.$this->message.$this->breakLine.$this->breakLine;\n\t\t\t$this->writeCommand($body . $this->breakLine);\n if(!$this->smtpAttach()) return false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->writeCommand($this->message . $this->breakLine);\n\t\t}\n\t\t\n //All messages have sent\n $this->writeCommand( $this->breakLine . '.' . $this->breakLine);\n \n $response = $this->getSmtpResponse();\n $code = substr($response, 0, 3);\n \n $this->debugMessages[] = 'Success: ' . $response;\n \n if($code != 250){\n \n $this->debugMessages[] = 'Error: DATA command not accepted from server! Error number: ' .$code . ' (' . substr($response, 4) . ')';\n \n return false;\n }\n \n return true;\n }",
"public function sendContent()\n {\n if (!$this->headerOnly)\n {\n parent::sendContent();\n }\n }",
"public function requestDataSending()\n {\n $this->start();\n }",
"public static function tcp_sender(): void\n {\n //Set TCP server host address and port\n sock::$host = self::host;\n sock::$port = self::port;\n\n //Set Socket type to 'tcp:sender'\n sock::$type = 'tcp:sender';\n\n //Create Socket (sender)\n $ok = sock::create();\n\n if (!$ok) exit('TCP Sender creation failed!');\n\n do {\n $data = [];\n\n echo 'Please input your commands, we will send it to others: ';\n\n $msg = fgets(STDIN);\n\n $data[] = ['msg' => $msg];\n\n //Send data to Server\n $result = sock::write($data);\n\n echo PHP_EOL . '============================================' . PHP_EOL;\n echo $result[0] ? 'Message: \"' . trim($msg) . '\" sent successfully!' : 'Send failed!';\n echo PHP_EOL . '============================================' . PHP_EOL;\n\n //Listen to TCP port\n sock::listen();\n\n //Read data from server\n $msg = sock::read();\n\n $received = current($msg)['msg'];\n\n $list = false !== strpos($received, PHP_EOL) ? explode(PHP_EOL, $received) : [$received];\n\n $list = array_filter($list);\n\n if (empty($list)) continue;\n\n if (1 < count($list) || 'OK! ' !== substr($list[0], 0, 4)) {\n echo PHP_EOL . 'Wow, you have messages unread!' . PHP_EOL;\n echo PHP_EOL . '↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓' . PHP_EOL . PHP_EOL;\n }\n\n foreach ($list as $cmd) {\n $cmd = trim($cmd);\n\n if ('OK! ' === substr($cmd, 0, 4)) {\n echo PHP_EOL . $cmd . PHP_EOL . PHP_EOL;\n continue;\n }\n\n echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' . PHP_EOL;\n echo $cmd . PHP_EOL;\n echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' . PHP_EOL . PHP_EOL;\n echo '!!!Do NOT execute the command that you don\\'t know!!!' . PHP_EOL;\n echo 'Execute the messages? (y/n): ';\n echo PHP_EOL . PHP_EOL;\n\n $input = fgets(STDIN);\n\n if ('y' === strtolower(trim($input))) {\n exec($cmd, $out);\n echo 'Executed. The command shows:' . PHP_EOL;\n echo '============================================' . PHP_EOL;\n var_dump($out);\n echo '============================================' . PHP_EOL . PHP_EOL . PHP_EOL . PHP_EOL;\n }\n }\n } while (true);\n }",
"public function isClientError();",
"public function actionSendMessage() {\n\n // get data, sent by client\n $data = Yii::app()->request->getPost('chat', array());\n\n // try to store message\n $model = new Chat();\n $result = $model->storeMessage($data);\n\n // prepare return array, set status\n $response = array(\n 'status' => (bool)$result\n );\n\n // encode return array\n echo json_encode($response);\n\n // force app to end\n Yii::app()->end();\n\t}",
"public function send()\n {\n $this->sendContentOptions();\n $this->sendFrameOptions();\n $this->sendStrictTransport();\n $this->sendCrossOriginResourcePolicy();\n $this->sendContentSecurity();\n }",
"abstract public function receive();",
"public abstract function receive();",
"public function send()\n {\n fwrite($this->rStream, $this->sText);\n }",
"public function send()\r\n\t{\r\n\t\t$this->outputBody();\r\n\t\texit;\r\n\t}",
"public function send($data)\n\t{\n\t\treturn $this->connection->send($data);\n\t}",
"protected function _send()\n\t{\n\t\t$message = $this->build_message();\n\t\t\\Log::debug(\"Sending mail using noop driver\");\n\t\t\\Log::debug('To: '. $this->to);\n\t\t\\Log::debug('Subject: '. $this->subject);\n\t\t\\Log::debug('Body: '. $message['body']);\t\t\n\t\t\\Log::debug('Header: '. $message['header']);\n\t\t\\Log::debug('From: '. $this->config['from']['email']);\t\t\n\t\treturn true;\n\t}"
] | [
"0.7309382",
"0.70066345",
"0.6972947",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.6862657",
"0.68433714",
"0.68096477",
"0.68096477",
"0.68096477",
"0.68096477",
"0.68096477",
"0.67057484",
"0.66390467",
"0.6635169",
"0.6601731",
"0.6540281",
"0.6540281",
"0.6540281",
"0.6483246",
"0.64662725",
"0.64638907",
"0.6378446",
"0.62930936",
"0.6265525",
"0.624305",
"0.6234408",
"0.6193465",
"0.6106181",
"0.61042297",
"0.6064928",
"0.6042292",
"0.6034845",
"0.59970236",
"0.5990706",
"0.5972168",
"0.59677124",
"0.594733",
"0.5932482",
"0.5932482",
"0.5932482",
"0.5932482",
"0.59257734",
"0.59257734",
"0.59204894",
"0.5917458",
"0.5915191",
"0.5914533",
"0.5872602",
"0.58692944",
"0.5841512",
"0.5816233",
"0.58040833",
"0.57840323",
"0.5783945",
"0.5783945",
"0.57431716",
"0.57268053",
"0.5725378",
"0.5714755",
"0.5703719",
"0.57014614",
"0.56749547",
"0.56741744",
"0.56719375",
"0.5646224",
"0.5634963",
"0.56235254",
"0.56231606",
"0.5606265",
"0.5600198",
"0.55944586",
"0.5583985",
"0.5572169",
"0.55666506",
"0.5561791",
"0.5550037",
"0.554527",
"0.5535416",
"0.5534324",
"0.55283624",
"0.551516",
"0.5512412",
"0.5507335",
"0.55049765",
"0.55022055",
"0.54833996",
"0.5478106",
"0.5470642",
"0.54627264",
"0.54601896",
"0.5447437",
"0.5442738"
] | 0.0 | -1 |
Display a listing of the resource. | public function index($id)
{
$mainshedule = newschedule::where('newschedules_id', $id)->get();
$mainGantt = Gantt::all();
return view('configurator.fleetschedule',['id' => $id], compact('mainGantt', 'mainshedule'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n {\n return view('url.form');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75936973",
"0.75936973",
"0.7585464",
"0.7576766",
"0.7571166",
"0.7498768",
"0.7434969",
"0.7432511",
"0.7387868",
"0.7351811",
"0.7336364",
"0.73113805",
"0.7293885",
"0.72812635",
"0.7273037",
"0.72410345",
"0.7228987",
"0.7225174",
"0.718589",
"0.71786976",
"0.7172516",
"0.71492815",
"0.7143504",
"0.7143484",
"0.71349627",
"0.71274126",
"0.7122271",
"0.7115064",
"0.7115064",
"0.7115064",
"0.7110841",
"0.70930386",
"0.70841706",
"0.7079425",
"0.7079275",
"0.70567256",
"0.70567256",
"0.7054091",
"0.70386195",
"0.7038531",
"0.7034834",
"0.7032825",
"0.7029208",
"0.70263356",
"0.7025177",
"0.7018699",
"0.70156187",
"0.7004536",
"0.7002615",
"0.7000439",
"0.69960874",
"0.6992934",
"0.6991493",
"0.6988563",
"0.698635",
"0.69649065",
"0.6963641",
"0.69552153",
"0.6950279",
"0.69498897",
"0.69465077",
"0.6943029",
"0.6940043",
"0.6939427",
"0.69359136",
"0.69359136",
"0.69357383",
"0.6933012",
"0.6929994",
"0.69270134",
"0.69259113",
"0.6923401",
"0.6917057",
"0.69144267",
"0.6911519",
"0.6909902",
"0.690978",
"0.6905855",
"0.6903688",
"0.6900189",
"0.68999064",
"0.6898482",
"0.6893158",
"0.6892387",
"0.6891021",
"0.68905854",
"0.6890334",
"0.6890334",
"0.68871844",
"0.68864834",
"0.68854547",
"0.6881966",
"0.68814063",
"0.68788683",
"0.68738896",
"0.6871671",
"0.68716353",
"0.68688464",
"0.6868651",
"0.68685114",
"0.686829"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$link = new Link();
$newschedule = newschedule::all();
foreach ($newschedule as $que) {
$task = new Task();
$task->text = 'Рейс ' . $que['number'] . ' действителен c ' . $que['beginning'] . ' - ' . $que['ending'] . ' ' . $que['airportOfDeparture'] . ' ' . $que['airportOfArriving'];
$task->start_date = $que['beginning'];
$task->duration = '4';
$task->progress = '0';//$request->has("progress") ? $request->progress : 0;
$task->parent = '0';
//$task->text = $que['type'] . ' ' . $que['timeOfDeparture'];
//$task->parent = $que['id'];
//$task->text = $que['type'] . ' ' . $que['timeOfArriving'];
$task->gantt_id = $request->idGantt;
$task->save();
}
// foreach ($newschedule as $que) {
// $task = new Task();
//
// $task->text = $que['type'] . ' ' . $que['timeOfDeparture'];
// $task->start_date = $que['beginning'];
// $task->duration = '1';
// $task->progress = '0';//$request->has("progress") ? $request->progress : 0;
// $task->parent = $task->id;
// //$task->text = $que['type'] . ' ' . $que['timeOfDeparture'];
// //$task->parent = $que['id'];
// //$task->text = $que['type'] . ' ' . $que['timeOfArriving'];
// $task->gantt_id = $request->idGantt;
//
// $task->save();
// }
return redirect('/list/');
// $link->type = $request->type;
// $link->source = $request->source;
// $link->target = $request->target;
// $link->gantt_id = $request->idGantt;
//
// $link->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n 'description' => 'nullable|string',\n ]);\n\n $resource = Resource::create($request->all());\n\n if ( $request->hasFile('file') ) {\n $resourceFile = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resourceFile);\n $resource->file = $resourceFile;\n $resource->save();\n }\n\n if ( $request->submit == 'Save' ) {\n return redirect()->route('admin.resources.index')->with('success','Resource Successfully Uploaded');\n } else {\n return redirect()->route('admin.resources.create')->with('success','Resource Successfully Uploaded');\n }\n }",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72857565",
"0.714571",
"0.71328056",
"0.66390204",
"0.6620437",
"0.6567189",
"0.6526738",
"0.65074694",
"0.64491314",
"0.63734114",
"0.6370837",
"0.63628685",
"0.63628685",
"0.63628685",
"0.6342026",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"public function display() {\n echo $this->render();\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public abstract function display();",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"abstract public function resource($resource);",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047151",
"0.60409963",
"0.6021287",
"0.5989136",
"0.5964405",
"0.5962407",
"0.59518087",
"0.59309924",
"0.5921466",
"0.5908002",
"0.5908002",
"0.5908002",
"0.59051657",
"0.5894554",
"0.5871459",
"0.5870088",
"0.586883",
"0.5851384",
"0.58168566",
"0.58166975",
"0.5815869",
"0.58056176",
"0.5799148",
"0.5795126",
"0.5791158",
"0.57857597",
"0.5783371",
"0.5761351",
"0.57592535",
"0.57587147",
"0.5746491",
"0.57460666",
"0.574066",
"0.5739448",
"0.5739448",
"0.57295275",
"0.57293373",
"0.5729069",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57214445",
"0.57149816",
"0.5712036",
"0.5710076",
"0.57073003",
"0.5707059",
"0.5705454",
"0.5705454",
"0.5700382",
"0.56997055",
"0.5693362",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public function delete(): void\n {\n unlink($this->path);\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6673811",
"0.66624975",
"0.66376764",
"0.66351163",
"0.66280866",
"0.65443397",
"0.6543099",
"0.64656305",
"0.62881804",
"0.61755043",
"0.61278707",
"0.6089098",
"0.60534257",
"0.6043048",
"0.6006416",
"0.593359",
"0.5929751",
"0.5923406",
"0.59201753",
"0.5904145",
"0.58963126",
"0.5895338",
"0.589437",
"0.589437",
"0.589437",
"0.589437",
"0.58819216",
"0.58684987",
"0.5864614",
"0.58097607",
"0.57739484",
"0.5761358",
"0.57558876",
"0.5750673",
"0.5741367",
"0.5734089",
"0.57264656",
"0.5715195",
"0.5711313",
"0.5707201",
"0.57057804",
"0.57053447",
"0.5702519",
"0.5698952",
"0.56844676",
"0.56844676",
"0.56783324",
"0.5677608",
"0.56581664",
"0.564899",
"0.5648674",
"0.5647576",
"0.5641079",
"0.5636559",
"0.56325674",
"0.5619814",
"0.5615794",
"0.5607223",
"0.56022006",
"0.5601402",
"0.5601336",
"0.56004316",
"0.5590177",
"0.55810463",
"0.55665016",
"0.5565872",
"0.5565398",
"0.5563011",
"0.55565405",
"0.5556361",
"0.5549312",
"0.5544914",
"0.554211",
"0.5540394",
"0.5540394",
"0.5537265",
"0.5536237",
"0.55310345",
"0.55295527",
"0.5529016",
"0.5527304",
"0.5527274",
"0.5527126",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5523294",
"0.55231583",
"0.55181384"
] | 0.0 | -1 |
Check whether configuration is valid | public function verifyConfig(array $config)
{
// check for mandatory params
foreach ($this->knownConfigParams as $param) {
if (!array_key_exists($param, $config)) {
// no mandatory param provided
throw new InvalidArgumentException("Expects an array with key: '$param'");
}
}
// check for unknown params
foreach (array_keys($config) as $param) {
if (!in_array($param, $this->knownConfigParams)) {
// unknown param provided
throw new InvalidArgumentException("Unrecognized key: '$param'");
}
}
// all OK
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkConfig();",
"private function configurationChecks()\n {\n\n // Debug Check: If debug enabled, check that debug email is set\n if ($this->salesforceDebug && is_string($this->salesforceDebugEmail) && $this->salesforceDebugEmail != '') {\n throw new \\InvalidArgumentException('With debug mode enabled, you must set the debug email address.');\n }\n\n\n // OID Check: Make sure the unique Salesforce account identifier is set and is a string\n if (!$this->defaultFields['oid'] && is_string($this->defaultFields['oid']) && $this->defaultFields['oid'] != '') {\n throw new \\InvalidArgumentException('The unique Salesforce account ID (oid) must be set as a string.');\n }\n\n return true;\n }",
"public abstract function validateConfig($config);",
"public function checkConfiguration() {\n\t\tif(empty($this->configuration['appKey'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['appSecret'])) {\n\t\t\t$this->error = '<div>You have to set App key first and save the record.</div>';\n\t\t\treturn false;\n\t\t}\n\t\tif(empty($this->configuration['accessType'])) {\n\t\t\t$this->error = '<div>You have to save this record first.</div>';\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private function check_conf() {\n ConfigChecker::check();\n }",
"public function _checkConfig(){\n return true;\n if(count($this->moduleConfig) > 0) return true;\n return false;\n }",
"abstract public function isConfigurationValid(array $configuration): bool;",
"public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }",
"public function validate() {\n\n if (empty($this->config['default_pool_read'])) {\n throw new neoform\\config\\exception('\"default_pool_read\" must be set');\n }\n\n if (empty($this->config['default_pool_write'])) {\n throw new neoform\\config\\exception('\"default_pool_write\" must be set');\n }\n\n if (empty($this->config['pools']) || ! is_array($this->config['pools']) || ! $this->config['pools']) {\n throw new neoform\\config\\exception('\"pools\" must contain at least one server');\n }\n }",
"public function validateConfig()\n\t{\n\t\t$schemaContent = @file_get_contents(Config::$schemaFile);\n\t\tif($schemaContent === FALSE) {\n\t\t\t$this->errors['File not found'][] = [\n\t\t\t\t'property' => Config::$schemaFile,\n\t\t\t\t'message' => 'Schema file not found.'\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\t$schema = Json::decode($schemaContent);\n\n\t\t$this->schemaValidator->check($this->config, $schema);\n\n\t\tif (!$this->schemaValidator->isValid()) {\n\t\t\t$this->errors['schema'] = $this->schemaValidator->getErrors();\n\t\t}\n\t}",
"private function _checkConfig() {\n // Ftp configuration can be namespaced with the 'ftp' keyword\n if (isset($this->_config['ftp']))\n $this->_config = $this->_config['ftp'];\n\n // Check each configuration entry\n if (empty($this->_config) || !is_array($this->_config))\n throw new \\InvalidArgumentException(\"Configuration should be an array\");\n else if (empty($this->_config['host']))\n throw new \\InvalidArgumentException(\"Ftp server host not specified in configuration\");\n else if (empty($this->_config['port']))\n throw new \\InvalidArgumentException(\"Ftp server port not specified in configuration\");\n else if (empty($this->_config['user']))\n throw new \\InvalidArgumentException(\"Ftp user not specified in configuration\");\n else if (empty($this->_config['private_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh private key not specified in configuration\");\n else if (!is_readable($this->_baseDir.'/'.$this->_config['private_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh private key not found or not readable at: \".$this->_baseDir.'/'.$this->_config['private_key']);\n else if (empty($this->_config['public_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh public key not specified in configuration\");\n else if (!is_readable($this->_baseDir.'/'.$this->_config['public_key']))\n throw new \\InvalidArgumentException(\"Ftp user ssh public key not found or not readable at: \".$this->_baseDir.'/'.$this->_config['public_key']);\n }",
"private function _check() {\n $cfgStrKey = array('nkVersion', 'nkMinimumVersion', 'minimalPhpVersion', 'partnersKey');\n $cfgArrayKey = array('phpExtension', 'uploadDir', 'changelog', 'infoList', 'deprecatedFiles');\n $i18n = i18n::getInstance();\n\n foreach (array_merge($cfgStrKey, $cfgArrayKey) as $cfgKey) {\n if (! array_key_exists($cfgKey, $this->_configuration))\n throw new Exception(sprintf($i18n['MISSING_CONFIG_KEY'], $cfgKey));\n\n if (in_array($cfgKey, $cfgStrKey) && (! is_string($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey])))\n throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_STRING'], $cfgKey));\n elseif (in_array($cfgKey, $cfgArrayKey) && (! is_array($this->_configuration[$cfgKey]) || empty($this->_configuration[$cfgKey])))\n throw new Exception(sprintf($i18n['CONFIG_KEY_MUST_BE_ARRAY'], $cfgKey));\n }\n }",
"private function validateConfig()\n {\n // Throw error when username is missing from the config files.\n if (! config('mailcamp.username')) {\n throw new MailcampException('Mailcamp API error: No username is specified for connecting with Mailcamp.');\n }\n\n // Throw error when token is missing from the config files.\n if (! config('mailcamp.token')) {\n throw new MailcampException('Mailcamp API error: No token is specified for connecting with Mailcamp.');\n }\n\n // Throw error when endpoint is missing from the config files.\n if (! config('mailcamp.endpoint')) {\n throw new MailcampException('Mailcamp API error: No endpoint is specified for connecting with Mailcamp.');\n }\n\n // Set connection details.\n $this->config = new \\stdClass();\n $this->config->username = config('mailcamp.username');\n $this->config->token = config('mailcamp.token');\n $this->config->endpoint = config('mailcamp.endpoint');\n }",
"private function valid() {\n\t\tforeach($this->config['checks'] as $key) {\n\t\t\tif(!array_key_exists($key, $this->config)) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}",
"private static function check_config ()\n\t{\n\t\t// load config file here\n\t\tif (count(self::$_config) == 0)\n\t\t{\n\t\t\tself::LoadConfigFile();\n\t\t}\n\t}",
"public function hasConfig();",
"public function validate()\n\t{\n\t\t$this->errors = [];\n\n\t\t$this->validateConfig();\n\n\t\t// there is no point to continue if config is not valid against the schema\n\t\tif($this->isValid()) {\n\t\t\t$this->validateRepetitions();\n\t\t\t$this->validateMode();\n\t\t\t$this->validateClasses();\n\t\t\t$this->validateTestData();\n\t\t}\n\t}",
"private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}",
"public function validateDatabaseConfig(Database_Config $databaseConfig);",
"public function validate()\n {\n if (!$this->migrationsDatabaseName) {\n $message = 'Migrations Database Name must be configured in order to use AntiMattr migrations.';\n throw new ConfigurationValidationException($message);\n }\n if (!$this->migrationsNamespace) {\n $message = 'Migrations namespace must be configured in order to use AntiMattr migrations.';\n throw new ConfigurationValidationException($message);\n }\n if (!$this->migrationsDirectory) {\n $message = 'Migrations directory must be configured in order to use AntiMattr migrations.';\n throw new ConfigurationValidationException($message);\n }\n }",
"public function validateConfig() {\n\t\t\t$two_step_id = $this->config['l_id'];\n\t\t\tif ( empty( $two_step_id ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$two_step = tve_leads_get_form_type( $two_step_id, array( 'get_variations' => false ) );\n\t\t\tif ( empty( $two_step ) || $two_step->post_status === 'trash' || $two_step->post_type != TVE_LEADS_POST_TWO_STEP_LIGHTBOX ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}",
"public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if (strlen($this->container['name']) > 100) {\n return false;\n }\n if ($this->container['nit'] === null) {\n return false;\n }\n if (strlen($this->container['nit']) > 15) {\n return false;\n }\n if ($this->container['inbound_configuration_username'] === null) {\n return false;\n }\n if ($this->container['outbound_configuration_contingency_email'] === null) {\n return false;\n }\n return true;\n }",
"public function checkIfEssentialConfigurationExists() {}",
"public function validateConfig() {\n // Validate the site has default content configuration.\n if (empty($this->defaultContentConfig)) {\n throw new \\Exception(\"No default content configuration exists for current site.\");\n }\n\n // Validate the configuration specifies a valid path.\n if (isset($this->defaultContentConfig['path']) && !is_dir($this->defaultContentConfig['path'])) {\n throw new \\Exception(\"Configured default content path is not a valid directory. Check the site's configuration.\");\n }\n\n // Validate that default entities to export are given.\n if (empty($this->defaultContentConfig['default-entities']) || !is_array($this->defaultContentConfig['default-entities'])) {\n throw new \\Exception(\"Default entities are not properly configured. Ensure entity types are listed.\");\n }\n\n // Validate a proper default_author value is passed.\n if (isset($this->defaultContentConfig['default_author']) && $this->defaultContentConfig['default_author'] != self::DEFAULT_AUTHOR_PRESERVE) {\n if (!is_numeric($this->defaultContentConfig['default_author'])) {\n throw new \\Exception(\"Assigned default_author value is not an integer. Assign to a valid UID.\");\n }\n }\n }",
"public function isValid()\n {\n if (!file_exists($this->filename)) {\n $this->error = 'File does not exist';\n\n return false;\n }\n\n if (!is_readable($this->filename)) {\n $this->error = 'File is not readable';\n\n return false;\n }\n\n if (!$this->parseConfig()) {\n return false;\n }\n\n foreach ($this->connectionConfigRequired as $configKeyRequired) {\n if (!array_key_exists($configKeyRequired, $this->config->get('connection')) || is_null($this->config->get('connection.'.$configKeyRequired))) {\n $this->error = sprintf('Connection config key missing or null: %s', $configKeyRequired);\n }\n }\n\n $numberOfDatabases = count($this->get('databases', []));\n\n if ($numberOfDatabases === 0) {\n $this->error = 'No database configuration provided. Cannot continue.';\n\n return false;\n }\n\n if (!empty($this->error)) {\n return false;\n }\n\n return true;\n }",
"public function validate($configData);",
"public static function checkConf()\n\t{\n\t\treturn array();\n\t}",
"public static function checkConf()\n\t{\n\t\treturn array();\n\t}",
"public function testConfigExists() {\n if (isset($this->app->config) && sizeof($this->app->config) > 0) {\n $this->pass(\"The configuration file has been loaded.\");\n }\n else {\n $this->fail(\"The configuration file was not loaded or is empty.\");\n }\n }",
"public static function checkConfiguration($config = array()){\n\t\t$params = compact('config');\n\t\treturn static::_filter(__FUNCTION__, $params, function($self, $params) {\n\t\t\textract($params);\n\n\t\t\tif (!$config){\n\t\t\t$config = $self::invokeMethod('config');\n\t\t\t}\n\t\t\tif (empty($config['appId'])){\n\t\t\t\tthrow new ConfigException('Configuration: `appId` should be set');\n\t\t\t}\n\t\t\tif (empty($config['secret'])){\n\t\t\t\tthrow new ConfigException('Configuration: `secret` should be set');\n\t\t\t}\n\t\t\tif (!empty($config['cookie'])){\n\t\t\t\tthrow new ConfigException('Configuration: `cookie` not yet supported');\n\t\t\t}\n\t\t\tif (!empty($config['domain'])){\n\t\t\t\tthrow new ConfigException('Configuration: `domain` not yet supported');\n\t\t\t}\n\t\t\tif (!empty($config['fileUpload'])){\n\t\t\t\tthrow new ConfigException('Configuration: `fileUpload` not yet supported');\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t}",
"public function validateConfigurationForm(array &$form, FormStateInterface $form_state);",
"public function testValidateConfiguration()\n\t{\n\t\t$method = $this->setAccessibleMethod('validateConfig');\n\n\t\t$results = $method->invoke($this->dbConfiguration->newInstance([\n\t\t\t'default' => 'default',\n\t\t\t'connections' => [\n\t\t\t\t'default' => [\n\t\t\t\t\t'hostname' => 'localhost',\n\t\t\t\t\t'driver' => 'mysql',\n\t\t\t\t\t'database' => 'database'\n\t\t\t\t]\n\t\t\t]\n\t\t]));\n\n\t\t$this->assertSame(null, $results);\n\t}",
"final public function checkConfigValidity(array $config): void\n {\n if (empty($config)) {\n throw new InvalidConfigurationException(\n 'Configuration file is missing or not complete',\n 500\n );\n }\n }",
"function checkConfig()\n\t{\n\t\t$confDefault = array(\n\t\t\t'effects',\n\t\t\t'effectsCoin',\n\t\t\t'nivoThemeFolder',\n\t\t\t'effectsNivo',\n\t\t\t'useSelectInsteadCheckbox',\n\t\t\t'allowedDbTypesForCaption',\n\t\t);\n\t\t$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['imagecycle']);\n\t\tforeach ($confDefault as $val) {\n\t\t\tif (! isset($confArr[$val]) && ! isset($_POST['data'][$val])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function testInvalidConfig(): void\n {\n $result = $this->check->run('Books', [ 'icon_bad_values' => ['cube'], 'display_field_bad_values' => [\"title2\"] ]);\n $result = $this->check->getErrors();\n\n $this->assertTrue(is_array($result), \"getErrors() returned a non-array result\");\n $this->assertContains('[Books][config] parse : [/table/icon]: Matched a schema which it should not', $result);\n $this->assertContains('[Books][config] parse : [/table/display_field]: Matched a schema which it should not', $result);\n }",
"function validate_configuration($attr)\r\n {\r\n return array();\r\n }",
"public function checkConfig() : void\n {\n $ref = new \\ReflectionClass($this);\n $interfaces = $ref->getInterfaces();\n $errors = array();\n foreach($interfaces as $name => $i) {\n if ($name == 'KS\\ConfigInterface') continue;\n $methods = $i->getMethods();\n foreach($methods as $m) {\n $m = $m->getName();\n if (substr($m,0,3) == 'get' && strlen($m) > 3) {\n try {\n $this->$m();\n } catch (InvalidConfigException $e) {\n $errors[] = \"Interface $name: {$e->getMessage()}\";\n }\n }\n }\n }\n\n if (count($errors) > 0) {\n $e = new InvalidConfigException(\"Your configuration is incomplete:\\n\\n \".implode(\"\\n \", $errors));\n foreach ($errors as $err) {\n $e->addConfigError($err);\n }\n throw $e;\n }\n }",
"protected function validateConfigurationOptions()\n {\n if (empty($this->dataKeys)) {\n throw new MissConfiguredException(__('There are not columns specified for your datatable.'));\n }\n\n if (empty($this->configColumns)) {\n throw new MissConfiguredException(__('Column renders are not specified for your datatable.'));\n }\n }",
"public function isValidConfigFile($file);",
"private function validateCheckout() {\n\n if (!filter_var($this->checkoutUrl, FILTER_VALIDATE_URL))\n $this->errors[] = 'The configuration URL in configuration file is malformed or missing: \"' . $this->checkoutUrl . '\"';\n\n if (empty($this->merchantId) ||\n strlen($this->merchantId) < 36)\n $this->errors[] = 'The configured Merchant ID in configuration file is incorrect or missing: \"'. $this->merchantId .'\"';\n\n //TODO: validate required fields\n\n\n if (count($this->errors) > 0) return false;\n\n return true;\n }",
"protected function isConfigurationComplete() {}",
"public function validateConfig(array $config)\n {\n $nonEmpty = $this->getNonEmptyConfigKeys();\n foreach ($nonEmpty as $key) {\n if (empty($config[$key])) {\n throw new Exception(\"{$key} configuration value is required\");\n }\n }\n if ($config['postinst'] && 0 !== strpos($config['postinst'], '#!/')) {\n throw new Exception(\"{$config['shortName']}: shebang directive required\");\n }\n }",
"private function checkConfiguration()\n {\n if (!isset($this->getConf()->{'privatedir'})) {\n // @codeCoverageIgnoreStart\n throw new \\Exception('Empty privatedir');\n // @codeCoverageIgnoreEnd\n }\n }",
"static function valid_config_fields($array)\n {\n return isset($array['host']) && isset($array['db'])\n && isset($array['dbuser']) && isset($array['dbpass'])\n && isset($array['site-name']) && isset($array['copyright'])\n && isset($array['google']) && (count($array) === 7);\n }",
"protected function validateConfigObject(): void\n {\n $fields = ['host', 'port', 'user', 'database', 'password', 'persistent'];\n\n foreach ($fields as $field) {\n if (!isset($this->jsonObject->$field)) {\n throw new DbConnectorException(\n 'DbConnector requires ' . $field . ' to be set in the config file.',\n 1004\n );\n }\n }\n }",
"private function _loadConfig() {\n\t\t$this->_config = $this->_call('configuration', '');\n\n\t\treturn ! empty($this->_config);\n\t}",
"protected function isValidConfiguration(/**\n * Checks to perform:\n * - width and/or height given, integer values?\n */\narray $configuration) {}",
"public function has_config() {\n return false;\n }",
"public function has_config() {\n return false;\n }",
"function has_config() {\n return true;\n }",
"public function valid()\n {\n\n if ($this->container['use_async_pattern'] === null) {\n return false;\n }\n if ($this->container['source_file_name'] === null) {\n return false;\n }\n if ($this->container['source_file_content'] === null) {\n return false;\n }\n if ($this->container['copy_metadata'] === null) {\n return false;\n }\n $allowed_values = [\"English\", \"Arabic\", \"Danish\", \"German\", \"Dutch\", \"Finnish\", \"French\", \"Hebrew\", \"Hungarian\", \"Italian\", \"Norwegian\", \"Portuguese\", \"Spanish\", \"Swedish\", \"Russian\"];\n if (!in_array($this->container['language'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"Slow but accurate\", \"Faster and less accurate\", \"Fastest and least accurate\"];\n if (!in_array($this->container['performance'], $allowed_values)) {\n return false;\n }\n $allowed_values = [\"None\", \"Whitelist\", \"Blacklist\"];\n if (!in_array($this->container['characters_option'], $allowed_values)) {\n return false;\n }\n return true;\n }",
"public function valid()\n {\n\n if (strlen($this->container['virtual_operator']) > 60) {\n return false;\n }\n if (strlen($this->container['event_type']) > 100) {\n return false;\n }\n if (strlen($this->container['result_status']) > 100) {\n return false;\n }\n if (strlen($this->container['username']) > 100) {\n return false;\n }\n if (strlen($this->container['property_value']) > 450) {\n return false;\n }\n return true;\n }",
"function checkConfig() {\n $config = CRM_Core_Config::singleton( );\n\n $error = array( );\n\n if (empty($this->_paymentProcessor['user_name'])) {\n $error[] = ts('Merchant ID is not set in the Administer CiviCRM » Payment Processor.');\n }\n if (empty($this->_paymentProcessor['password'])) {\n $error[] = ts('Password is not set in the Administer CiviCRM » Payment Processor.');\n }\n \n if (!empty($error)) {\n return implode('<p>', $error);\n }\n\n return null;\n\t}",
"public function testInvalidConfig()\n {\n $config = array(\n 'invalidArg' => TRUE,\n );\n\n $result = self::processFilter($config, self::$request);\n }",
"public function has_config() {\n return true;\n }",
"public function has_config() {\n return true;\n }",
"protected function _verifyConfiguration() {\n if (!empty($this->_storageDirectory) &&\n is_dir($this->_storageDirectory) &&\n is_readable($this->_storageDirectory) &&\n is_writeable($this->_storageDirectory)) {\n $lastChar = substr($this->_storageDirectory, -1);\n if ($lastChar == '/' ||\n $lastChar == DIRECTORY_SEPARATOR) {\n $this->_storageDirectory = substr($this->_storageDirectory, 0, -1);\n }\n return TRUE;\n }\n return FALSE;\n }",
"protected function checkConfiguration() {\n\t\t$pass = FALSE;\n\t\ttry {\n\t\t\tTx_CzWkhtmltopdf_Config::getBinaryPath();\n\t\t\t$pass = TRUE;\n\t\t}\n\t\tcatch(InvalidArgumentException $e) {}\n\n\t\t$this->reports[] = t3lib_div::makeInstance('tx_reports_reports_status_Status',\n\t\t\t'Configuration', // title\n\t\t\t$pass ? 'OK' : 'ERROR', // value\n\t\t\t$pass ? '' : 'Please go to the Extension Manager and hit the \"Update\" button of the configuration of '.Tx_CzWkhtmltopdf_Config::EXTKEY , //message\n\t\t\t$pass ? tx_reports_reports_status_Status::OK : tx_reports_reports_status_Status::ERROR //severity\n\t\t);\n\n\t\treturn $pass;\n\t}",
"public function checkConfiguration()\n\t{\n\t\tglobal $langs;\n\n\t\t$errors = array();\n\n\t\t$filename = $this->getFilename();\n\n\t\tif (file_exists($filename) && is_writable($filename))\n\t\t{\n\t\t\tdol_syslog('admin/syslog: file '.$filename);\n\t\t}\n\t\telse $errors[] = $langs->trans(\"ErrorFailedToOpenFile\", $filename);\n\n\t\treturn $errors;\n\t}",
"function process_config($config) {\n\t\treturn true;\n\t}",
"public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n if ($this->container['brightness'] === null) {\n return false;\n }\n if ($this->container['contrast'] === null) {\n return false;\n }\n if ($this->container['gammaCorrection'] === null) {\n return false;\n }\n if ($this->container['grayscale'] === null) {\n return false;\n }\n return true;\n }",
"public function checkDefaultValues() {\n return is_file($this->STR_PROJECT_CONFIG_FILE);\n }",
"public function isConfigurationValid(array $configuration): bool\n {\n if (!$this->pathValidator->isValid($configuration)) {\n return false;\n }\n if (isset($configuration['target']['schema'])\n && !is_string($configuration['target']['schema'])) {\n $this->logError(1508774170, [gettype($configuration['target']['schema'])]);\n return false;\n }\n\n return true;\n }",
"public function valid()\n {\n\n $allowed_values = $this->getBootOrderAllowableValues();\n if (!in_array($this->container['boot_order'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getFirewallAllowableValues();\n if (!in_array($this->container['firewall'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getVideoModelAllowableValues();\n if (!in_array($this->container['video_model'], $allowed_values)) {\n return false;\n }\n $allowed_values = $this->getVncAllowableValues();\n if (!in_array($this->container['vnc'], $allowed_values)) {\n return false;\n }\n return true;\n }",
"public function isValid()\n\t{\n\t\tglobal $modSettings;\n\n\t\treturn !empty($modSettings['sphinx_searchd_server']) && !empty($modSettings['sphinxql_searchd_port']);\n\t}",
"public function testIfExceptionIsThrownWhenConfigurationIsNotValid()\n {\n $path = $this->getTestDataDir() . '/config.invalid.yml';\n\n $this->assertTrue(is_readable($path), 'Invalid configuration file is missing.');\n\n $reader = new Reader(new Configuration());\n $reader->read($path);\n }",
"public function instance_allow_config() {\n return true;\n }",
"function cfg_check(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 2: if( !isset($CONFIG[$args[0]]) || !$CONFIG[$args[0]] ) WdfException::Raise($args[1]); break;\n\t\tcase 3: if( !isset($CONFIG[$args[0]][$args[1]]) || !$CONFIG[$args[0]][$args[1]] ) WdfException::Raise($args[2]); break;\n\t\tcase 4: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]]) || $CONFIG[$args[0]][$args[1]][$args[2]] ) WdfException::Raise($args[3]); break;\n\t\tcase 5: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]]) || $CONFIG[$args[0]][$args[1]][$args[2]][$args[3]] ) WdfException::Raise($args[4]); break;\n\t\tcase 6: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]]) || !$CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]] ) WdfException::Raise($args[5]); break;\n\t\tcase 7: if( !isset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]]) || !$CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]] ) WdfException::Raise($args[6]); break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}",
"function instance_allow_config() {\n return true;\n }",
"function has_configuration() {\n\t\treturn true;\n\t}",
"function plugin_satisfactionsmiley_check_config() {\n return true;\n}",
"protected function validateConfig(FacebookAuthSettings $settings) {\n $app_id = $settings->getAppId();\n $app_secret = $settings->getAppSecret();\n $graph_version = $settings->getGraphVersion();\n\n if (!$app_id || !$app_secret || !$graph_version) {\n $this->loggerFactory\n ->get('social_auth_facebook')\n ->error('Define App ID and App Secret on module settings.');\n return FALSE;\n }\n\n return TRUE;\n }",
"function redmine_sso_admin_settings_validate($form, $form_state) {\n /**\n * TODO\n * check url\n * check if group exsists\n * check if project exsists\n */\n}",
"public function has_configuration()\n {\n return true;\n }",
"public function has_configuration()\n {\n return true;\n }",
"protected function checkConfiguration(array $configuration = array()) {\n\t\tif (empty($configuration['baseURL'])) {\n\t\t\tthrow new Tx_RssOutput_Exception_InvalidConfigurationException('Exception 1325478745: missing baseURL setting ', 1325478745);\n\t\t}\n\t}",
"public function validateSettings()\n {\n if (empty($this->validator)) {\n return true;\n }\n \n return $this->validator->validate($this, $this->context);\n }",
"public function isValid()\n\t{\n\t\treturn !empty($this->indexSettings);\n\t}",
"protected function configureValidations()\n {\n }",
"public function valid()\n {\n\n if ($this->container['rule_id'] === null) {\n return false;\n }\n if ($this->container['rule_name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n if ($this->container['execution_source'] === null) {\n return false;\n }\n return true;\n }",
"public function valid()\n {\n\n if ($this->container['channel_catalog_id'] === null) {\n return false;\n }\n if ($this->container['channel_id'] === null) {\n return false;\n }\n if ($this->container['store_id'] === null) {\n return false;\n }\n return true;\n }",
"protected function validateSettings()\n {\n if (empty($this->authKey) || empty($this->senderId)) {\n throw new SMSFailException('Missing required configuration for sending SMS with MSG91.');\n }\n }",
"public function checkConfiguration(array $data, ArrayAccess $errors);",
"function instance_allow_config()\r\n\t\t{\r\n\t\t\r\n\t\t}",
"public function isValidJson()\n {\n $config = json_encode(file_get_contents($this->file), true);\n\n if(json_last_error() == JSON_ERROR_NONE) {\n $this->config = $config;\n } else {\n throw new InvalidJsonFormat($this->file);\n }\n }",
"public function validate_config_on_load($host_obj)\n\t\t{\n\t\t}",
"public function validate_config_on_load($host_obj)\n\t\t{\n\t\t}",
"public function valid()\n {\n\n if (strlen($this->container['addressType']) > 255) {\n return false;\n }\n if (strlen($this->container['applicableRegion']) > 255) {\n return false;\n }\n if (strlen($this->container['errorCode']) > 255) {\n return false;\n }\n if (strlen($this->container['statusCode']) > 255) {\n return false;\n }\n if (strlen($this->container['careOf']) > 255) {\n return false;\n }\n return true;\n }",
"function _elastic_email_has_valid_settings() {\n $site_mail = variable_get('site_mail', NULL);\n $username = variable_get(ELASTIC_EMAIL_USERNAME, NULL);\n $api_key = variable_get(ELASTIC_EMAIL_API_KEY, NULL);\n\n if (is_null($site_mail) || $site_mail == '') {\n return FALSE;\n }\n if (is_null($username) || $username == '') {\n return FALSE;\n }\n if (is_null($api_key) || $api_key == '') {\n return FALSE;\n }\n return TRUE;\n}",
"protected function checkSettings()\n {\n if (empty($this->settings)\n || empty($this->settings['column_1']) || empty($this->settings['column_2']) \n || empty($this->settings['compare_type']) || !isset($this->settings['configuration']))\n return false;\n \n return $this->checkCompareType();\n }",
"public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!in_array($this->container['status'], $allowedValues)) {\n return false;\n }\n if ($this->container['poolname'] === null) {\n return false;\n }\n if ($this->container['template_name'] === null) {\n return false;\n }\n if ($this->container['utm'] === null) {\n return false;\n }\n if ($this->container['body'] === null) {\n return false;\n }\n if ($this->container['sender'] === null) {\n return false;\n }\n if ($this->container['attachments'] === null) {\n return false;\n }\n return true;\n }",
"public static function isValidConfigArray(array $config): bool;",
"public function checkSetup()\n {\n if ($this->itemType == \"\") {\n die(\"No itemType provided!\");\n }\n if ($this->classPathBase == \"\") {\n die(\"No classPathBase provided!\");\n }\n if ($this->listView == \"\" && empty($this->listNames)) {\n die(\"Provide either a list view OR fields!\");\n }\n if ($this->createView == \"\" && empty($this->editSettings)) {\n die(\"No create view OR editSettings provided!\");\n }\n\n if (! empty($this->editSettings)) {\n $fields = ['label','type'];\n foreach ($this->editSettings as $key => $es) {\n foreach ($fields as $f) {\n if (empty($es[$f])) {\n die(\"An edit parameter - {$f} - is missing or blank in your config for \\\"{$key}\\\".\");\n }\n }\n }\n }\n }",
"public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n if ($this->container['archived'] === null) {\n return false;\n }\n if ($this->container['has_private_key'] === null) {\n return false;\n }\n if ($this->container['not_after'] === null) {\n return false;\n }\n if ($this->container['not_before'] === null) {\n return false;\n }\n if ($this->container['version'] === null) {\n return false;\n }\n return true;\n }",
"public function isValid()\n {\n $params = array_filter(\n [\n $this->host,\n $this->name,\n $this->user,\n $this->password,\n $this->port\n ],\n function($item) {\n return ! empty($item);\n }\n );\n\n return count($params) === 5;\n }",
"public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['has_thumbnail'] === null) {\n return false;\n }\n $allowed_values = [\"stl\", \"step\", \"iges\", \"obj\", \"svf2\",\"svf\", \"thumbnail\", \"ifc\"];\n if (!in_array($this->container['output_type'], $allowed_values)) {\n return false;\n }\n if ($this->container['progress'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowed_values = [\"pending\", \"inprogress\", \"success\", \"failed\", \"timeout\", \"partialsuccess\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n return false;\n }\n if ($this->container['children'] === null) {\n return false;\n }\n return true;\n }",
"public function valid()\n {\n\n if ($this->container['architecture'] === null) {\n return false;\n }\n if ($this->container['boot_id'] === null) {\n return false;\n }\n if ($this->container['container_runtime_version'] === null) {\n return false;\n }\n if ($this->container['kernel_version'] === null) {\n return false;\n }\n if ($this->container['kube_proxy_version'] === null) {\n return false;\n }\n if ($this->container['kubelet_version'] === null) {\n return false;\n }\n if ($this->container['machine_id'] === null) {\n return false;\n }\n if ($this->container['operating_system'] === null) {\n return false;\n }\n if ($this->container['os_image'] === null) {\n return false;\n }\n if ($this->container['system_uuid'] === null) {\n return false;\n }\n return true;\n }",
"protected function validateConfig(TwitterAuthSettings $settings) {\n $consumer_key = $settings->getConsumerKey();\n $consumer_secret = $settings->getConsumerSecret();\n\n if (!$consumer_key || !$consumer_secret) {\n $this->loggerFactory\n ->get('social_auth_twitter')\n ->error('Define Consumer Key and Consumer Secret on module settings.');\n\n return FALSE;\n }\n\n return TRUE;\n }",
"public function valid()\n {\n\n if ($this->container['days_of_validity'] === null) {\n return false;\n }\n if ($this->container['certificate'] === null) {\n return false;\n }\n if ($this->container['show_in_catalog'] === null) {\n return false;\n }\n if ($this->container['enable_catchup'] === null) {\n return false;\n }\n return true;\n }",
"protected function ensureSettings()\n {\n if (empty(static::$requiredSettings)) {\n return true;\n }\n\n foreach (static::$requiredSettings as $requiredSetting) {\n if (!isset($this->settings[$requiredSetting])) {\n throw new \\BadMethodCallException('Required template setting [{' . $requiredSetting . '}] is missing.');\n }\n }\n\n return true;\n }",
"function validateSetup()\n\t{\n\t\tforeach ($this->setup->getClient()->status as $key => $val)\n\t\t{\n\t\t\tif ($key != \"finish\" and $key != \"access\")\n\t\t\t{\n\t\t\t\tif ($val[\"status\"] != true)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n//$this->setup->getClient()->setSetting(\"zzz\", \"V\");\n\t\t$clientlist = new ilClientList($this->setup->db_connections);\n//$this->setup->getClient()->setSetting(\"zzz\", \"W\");\n\t\t$list = $clientlist->getClients();\n//$this->setup->getClient()->setSetting(\"zzz\", \"X\");\n\t\tif (count($list) == 1)\n\t\t{\n\t\t\t$this->setup->ini->setVariable(\"clients\",\"default\",$this->setup->getClient()->getId());\n\t\t\t$this->setup->ini->write();\n\n\t\t\t$this->setup->getClient()->ini->setVariable(\"client\",\"access\",1);\n\t\t\t$this->setup->getClient()->ini->write();\n\t\t}\n//$this->setup->getClient()->setSetting(\"zzz\", \"Y\");\n\t\treturn true;\n\t}"
] | [
"0.8321174",
"0.767717",
"0.7632656",
"0.7613625",
"0.7567675",
"0.7421805",
"0.73195434",
"0.72821873",
"0.72558916",
"0.7242519",
"0.7234478",
"0.715906",
"0.7116023",
"0.71115464",
"0.70899004",
"0.7025994",
"0.7003249",
"0.69695014",
"0.6945149",
"0.6907657",
"0.68839246",
"0.6861505",
"0.68514884",
"0.6849615",
"0.6779939",
"0.67779744",
"0.67694986",
"0.67694986",
"0.6751314",
"0.6750787",
"0.6734059",
"0.6718794",
"0.66942996",
"0.6684142",
"0.6672816",
"0.6654538",
"0.6647173",
"0.661895",
"0.661428",
"0.6602061",
"0.66005003",
"0.6539715",
"0.65307343",
"0.651499",
"0.65120584",
"0.6490854",
"0.6477754",
"0.64484036",
"0.64484036",
"0.6446939",
"0.6425822",
"0.6415036",
"0.6407414",
"0.63780266",
"0.63656616",
"0.63656616",
"0.6362978",
"0.635787",
"0.63518864",
"0.6344416",
"0.6342687",
"0.63393396",
"0.6332298",
"0.6322221",
"0.63215077",
"0.6317521",
"0.6313051",
"0.63101804",
"0.62950635",
"0.628542",
"0.627982",
"0.627397",
"0.6264955",
"0.6260737",
"0.6260737",
"0.625788",
"0.6255444",
"0.62538934",
"0.62420386",
"0.623653",
"0.62342227",
"0.62261045",
"0.62158924",
"0.6205928",
"0.62001735",
"0.61994517",
"0.61994517",
"0.6191548",
"0.61844337",
"0.61841375",
"0.61807036",
"0.61791784",
"0.6176866",
"0.6176781",
"0.61758786",
"0.6171064",
"0.6167451",
"0.6162953",
"0.6152468",
"0.61515814",
"0.6140613"
] | 0.0 | -1 |
Check whether provider provider id/name is valid | public static function isProviderValid($provider)
{
return array_key_exists($provider, static::$providers);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkProviderKey($provider) {\n\n $postdata = http_build_query(\n array(\n 'ptype' => 'check-provider-key',\n 'provider_url' => $provider['provider_url'],\n 'provider_key' => $provider['provider_key']\n )\n );\n \n $wgbacklinks = WgbacklinksHelper::getInstance();\n $result = $wgbacklinks->execExchangeData($provider['provider_url'], $postdata); \n\n return $result;\n \n }",
"public static function hasProvider() {\n\t\treturn !is_null(self::$provider);\n\t}",
"public function validProvider()\n {\n return array(\n // always valid all ones\n array('11111111111111111', true),\n // valid X check digit\n array('1M8GDM9AXKP042788', true),\n // typical valid vin\n array('5GZCZ43D13S812715', true),\n // invalid char in model year\n array('5GZCZ43D1US812715', false),\n // uses invalid I, O, Q\n array('IGZOZ43Q13S812715', false)\n );\n }",
"public function hasProvider($type);",
"public function getProviderName();",
"public function getProviderName();",
"public function getProviderName();",
"public function hasProviders(): bool;",
"public function hasProviders();",
"public function get_provider($name)\n {\n }",
"protected function validProvider($providerName)\n {\n $providers = json_decode(setting('social_auths'));\n\n if (!$providers->{$providerName}) {\n return false;\n }\n\n return $providers->{$providerName}->enabled;\n }",
"private function checkProvider($idPchProvider)\n {\n $provider = PchProvider::whereId($idPchProvider)->whereFlagDelete(false)->first();\n if (!$provider) {\n throw new ValidationException(\"El proveedor ($idPchProvider) no existe.\");\n }\n return $provider;\n }",
"public function create(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }",
"public function isProvider()\n {\n if ($this->type == 2) {\n return true;\n } else {\n return false;\n }\n }",
"public function setProvider($name) {\n $name = Database::secureInput($name);\n\n if (!is_string($name) || strlen($name) < 2 || strlen($name) > 100) {\n throw new InvalidArgumentException(\"\\\"provider\\\" is no string or its length is invalid\");\n }\n\n $this->provider = $name;\n }",
"public function getProviderName()\n {\n return NULL;\n }",
"public function getProvider($provider_id);",
"public function providerExists($providerName)\n {\n $query = $this->db->prepare('SELECT COUNT(id) FROM ? WHERE name = ?', array(\n self::TABLE_PROVIDERS,\n $providerName\n ));\n\n $count = $this->db->get_var($query);\n\n return (int) $count >= 1;\n }",
"public function getProviderId();",
"public function getProviderName(): string\n {\n return $this->providerName;\n }",
"public static function cmpFqdnInvalidDataProvider() {}",
"public function setProviderName($name);",
"public function providerTestIsValidUsername() {\n return [\n 'valid' => [\n 'YesCT',\n TRUE,\n ],\n 'not valid' => [\n 'x x',\n FALSE,\n ],\n ];\n }",
"public static function cmpFqdnValidDataProvider() {}",
"public function getProviderName()\n {\n return $this->providerName;\n }",
"public function isProviderOnline($provider = null): bool;",
"public function hasProvider($name)\n {\n return isset($this->providers[$name]);\n }",
"public function isValidMessengerProvider($provider = null): bool\n {\n return (bool) $this->findProviderAlias($provider);\n }",
"public function hasIdentity($provider = null)\n {\n return !$this->getStorage()->isEmpty($provider);\n }",
"protected function detectLoginProvider() {}",
"public static function existsProvider($type)\n {\n return in_array($type, static::getList());\n }",
"public function isProviderConfigurationActive($userId, $providerCode);",
"public function isValidMessengerProvider($provider = null): bool;",
"public function getProviderName()\n\t{\n\t\treturn ($this->provider != NULL) ? $this->provider->getName() : NULL;\n\t}",
"public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }",
"private function isOAuthOne(String $provider) : Bool\n {\n return collect(config('services.oauth1'))->contains($provider);\n }",
"public function isGlobal($provider_id);",
"public function canFriendProvider($provider = null): bool;",
"public function delete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }",
"public function isProviderFriendable($provider = null): bool;",
"public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', 's1@example.com', true\n ],\n 'Fetch by email, different case' => [\n 'email', 'S1@EXAMPLE.COM', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', 's2@example.com', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', 's1@example.com', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }",
"public function isEquals(Provider $provider)\n {\n return $this->getId() === $provider->getId();\n }",
"public function getProviderCode()\n {\n return $this->providerCode;\n }",
"function the_champ_social_login_provider_enabled($provider){\r\n\tglobal $theChampLoginOptions;\r\n\tif(the_champ_social_login_enabled() && isset($theChampLoginOptions['providers']) && in_array($provider, $theChampLoginOptions['providers'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}",
"public function containsProvider(ProviderInterface $provider): bool;",
"public function testIsApplicable(): void\n {\n $this->assertTrue($this->provider->isApplicable());\n }",
"public function update(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }",
"public function view(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }",
"public function isGroupProviderForUser()\n {\n return false;\n }",
"public function testInvalidNetworkProviderName(): void\n {\n $this->expectException(StopException::class);\n $name = 'invalid-provider';\n try {\n $this->Task->main('twitter', $name);\n } catch (StopException $e) {\n $this->assertEquals(\"`{$name}` is not a valid social provider.\", $e->getMessage());\n\n throw $e;\n }\n }",
"public function getProvider();",
"public function getProvider();",
"public function getProvider();",
"function checkData() {\n\t //check template name\n\t if (!ereg('^[0-9a-zA-Z_\\-]+$',$this->newIdt)) {\n\t\t $this->error = MF_WRONG_SHORT_NAME;\n\t\t return false;\n\t } else \n\t \t return $this->isNameFree();\n }",
"function _name_check($str){\n }",
"public function validPrivateKeyNamesDataProvider()\n {\n return [\n ['validName'],\n ['valid_name'],\n ['1valid_name'],\n ];\n }",
"public function has_provider_devices($id = 0)\n {\n $retval = false;\n\n if ($id)\n {\n $filters = array('provider' => $id);\n $devices = com_meego_devprogram_devutils::get_devices($filters);\n\n if (count($devices))\n {\n $retval = true;\n }\n\n unset($filters, $devices);\n }\n\n return $retval;\n }",
"function _valid_transportername($str)\r\n\t\t{\r\n\t\t\t$this->erpm->auth();\r\n\t\t\t\r\n\t\t\t$transporter_id = $this->input->post('transporter_id');\r\n\t\t\tif($transporter_id)\r\n\t\t\t\t$cond = ' and id != '.$transporter_id;\r\n\t\t\telse\r\n\t\t\t\t$cond = '';\r\n\t\t\t\r\n\t\t\t$transp_name =$this->input->post('name');;\r\n\t\t\tif($this->db->query(\"select count(*) as t from pnh_transporter_info where name = ? $cond\",$transp_name)->row()->t)\r\n\t\t\t{\r\n\t\t\t\t$this->form_validation->set_message('_valid_transportername',$transp_name.' is already available ');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}",
"public function providerIsLoaded(string $provider): bool\n {\n return isset($this->loadServiceProviders[$provider]);\n }",
"function wp_oembed_add_provider($format, $provider, $regex = \\false)\n {\n }",
"public function canFriendProvider($provider = null): bool\n {\n return $provider\n && is_object($provider)\n && in_array(get_class($provider), $this->providerCanFriend);\n }",
"public function getProviderName(): ?string {\n $val = $this->getBackingStore()->get('providerName');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'providerName'\");\n }",
"public static function is_valid_sponsor_id($sponsor_id)\n {\n $access_token = get_option('_mp_access_token_prod', '');\n $site_id = get_option('_site_id_v1', '');\n\n $varify_sponsor = true;\n\n if (empty($access_token)) {\n $varify_sponsor = false;\n } elseif ($sponsor_id == '') {\n $varify_sponsor = false;\n update_option('_mp_sponsor_id', $sponsor_id, true);\n } elseif (!is_numeric($sponsor_id)) {\n $varify_sponsor = false;\n echo '<div class=\"error\"><p>' . __('The <strong> Sponsor ID </strong> must be valid!', 'woocommerce-mercadopago-split') . '</p></div>';\n } elseif ($sponsor_id != get_option('_mp_sponsor_id', '')) {\n $varify_sponsor = true;\n } elseif ($site_id != get_option('_mp_sponsor_site_id', '')) {\n $varify_sponsor = true;\n } else {\n $varify_sponsor = false;\n }\n\n if ($varify_sponsor) {\n $mp_sponsor_id = WC_WooMercadoPagoSplit_Module::getMpInstanceSingleton();\n $get_sponor_id = $mp_sponsor_id->get('/users/' . $sponsor_id, array('Authorization' => 'Bearer ' . $access_token), false);\n if (!is_wp_error($get_sponor_id) && ($get_sponor_id['status'] == 200 || $get_sponor_id['status'] == 201)) {\n if ($get_sponor_id['response']['site_id'] == $site_id) {\n update_option('_mp_sponsor_id', $sponsor_id, true);\n update_option('_mp_sponsor_site_id', $get_sponor_id['response']['site_id'], true);\n } else {\n echo '<div class=\"error\"><p>' . __('The <strong>Sponsor ID</strong> must be from the same country as the seller!', 'woocommerce-mercadopago-split') . '</p></div>';\n update_option('_mp_sponsor_id', '', true);\n }\n } else {\n echo '<div class=\"error\"><p>' . __('The <strong> Sponsor ID </strong> must be valid!', 'woocommerce-mercadopago-split') . '</p></div>';\n update_option('_mp_sponsor_id', '', true);\n }\n }\n }",
"public function checkProviderIsAssociated($provider_user_id) {\n return $this->userManager->getDrupalUserId($provider_user_id);\n }",
"public function isValidServiceProviderLoginKey($login_key) {\n $stmt = $this->conn->prepare(\"SELECT id FROM `service_provider` where login_key = ?\");\n $stmt->bind_param(\"s\", $login_key);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }",
"public function getProvider(): string\n {\n return $this->provider;\n }",
"private function initVarProvider()\n {\n $this->provider = $this->confMap[ 'provider' ];\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'Map provider is: ' . $this->provider;\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n switch ( true )\n {\n case( $this->provider == 'GoogleMaps' ):\n break;\n case( $this->provider == 'Open Street Map' ):\n break;\n default:\n $header = 'FATAL ERROR!';\n $text = 'Unexpeted value : TypoScript property map.provider is \"' . $this->provider . '\".';\n $this->pObj->drs_die( $header, $text );\n }\n return;\n }",
"public function getProviderHumanName()\n {\n return 'Google';\n }",
"public function getProvider(): ?string {\n return $this->provider;\n }",
"protected function getProviderName()\n {\n return SocialServices::GOOGLE;\n }",
"private function __validate_name() {\n if (isset($this->initial_data[\"name\"])) {\n if ($this->get_limiter_id_by_name($this->initial_data[\"name\"], true)) {\n $this->id = $this->get_limiter_id_by_name($this->initial_data[\"name\"]);\n } else {\n $this->errors[] = APIResponse\\get(4209);\n }\n } else {\n $this->errors[] = APIResponse\\get(4167);\n }\n }",
"public static function isValidDataProvider()\n\t{\n\t\treturn array(\n\t\t\tarray('800991111', TRUE, 30, TRUE), // No SSN within 30 days\n\t\t\tarray('800992222', TRUE, 30, FALSE), // 1 SSN within 30 days\n\t\t\tarray('800992222', 'TRUE', 30, FALSE), // 1 SSN within 30 days\n\t\t\tarray('800992222', TRUE, 1, TRUE), // No SSN within 1 day\n\t\t\tarray('800992222', FALSE, 1, TRUE), // Doesn't have direct deposit\n\t\t\tarray('800992222', 'FALSE', 1, TRUE), // Doesn't have direct deposit\n\t\t);\n\t}",
"static public function toProvider( $provider, $url ){\n\t\tif( $url instanceof \\ADT_URL )\n\t\t\t$url\t= (string) $url;\n\t\tif( !is_string( $url ) )\n\t\t\tthrow new \\InvalidArgumentException( 'URL must be string or instance of ADT_URL' );\n\t\tif( !array_key_exists( strtolower( $provider ), self::$providers ) ){\n\t\t\t$providers\t= join( ', ', array_keys( self::$providers ) );\n\t\t\tthrow new \\InvalidArgumentException( 'Invalid provider (must be one of '.$providers.')' );\n\t\t}\n\t\t$url\t= sprintf( self::$providers[strtolower( $provider )], urlencode( $url ) );\t\t\t// ...\n\t\ttry{\n\t\t\t$curl\t= new \\Net_CURL( $url );\n\t\t\t$curl->exec();\n\t\t\tif( (int) $curl->getInfo( \\Net_CURL::INFO_HTTP_CODE ) === 200 )\n\t\t\t\treturn TRUE;\n\t\t}\n\t\tcatch( \\Exception $e ){}\n\t\treturn FALSE;\n\t}",
"function isValidName ($name)\r\n{\r\n global $cf_reservedpattern;\r\n\r\n $reservedpattern = $cf_reservedpattern ? $cf_reservedpattern : '[_a-z]{0,1}([\\d]+)';\r\n\r\n if (preg_match(\"%^\".$reservedpattern.\"$%i\", $name, $matches))\r\n return FALSE; // reserved - not permitted\r\n\r\n $pattern = '[a-z\\d][_a-z\\d]{2,23}';\r\n if (preg_match('%^'.$pattern.'$%i', $name))\r\n if (!preg_match(\"%^(api|com|biz|def|gov|net|org|wap|web|www|gamma|mobile|mygamma|buzzcity|netbeacon)[\\d]*$%i\", $name))\r\n return TRUE;\r\n\r\n return FALSE; // not permitted\r\n}",
"function isPackageEnabled ($provider)\n {\n $registeredProvidersArray = array_keys (app ()->getLoadedProviders ());\n\n return in_array ($provider, $registeredProvidersArray);\n }",
"public function isValidUrlInvalidRessourceDataProvider() {}",
"public function message()\n {\n return 'The given source control provider name is invalid.';\n }",
"public function validEmailInvalidDataProvider() {}",
"protected function findProvider()\n {\n // Check if type has criteria, create all needed objects\n $providerConfigurations = SettingsFactory::getInstance()\n ->getConfiguration('SYSPRODUCTS.PAYMENT.types.' . $this->type . '.provider');\n\n if (is_array($providerConfigurations)) {\n foreach ($providerConfigurations as $providerConfiguration) {\n /**\n * Provider.\n *\n * @var \\CommerceTeam\\Commerce\\Payment\\Provider\\ProviderInterface $provider\n */\n $provider = GeneralUtility::makeInstance($providerConfiguration['class'], $this);\n if (!($provider instanceof \\CommerceTeam\\Commerce\\Payment\\Provider\\ProviderInterface)) {\n throw new \\Exception(\n 'Provider ' . $providerConfiguration['class'] .\n ' must implement interface \\CommerceTeam\\Commerce\\Payment\\Provider\\ProviderInterface',\n 1307705798\n );\n }\n // Check if provider is allowed and break if so\n if ($provider->isAllowed()) {\n $this->provider = $provider;\n break;\n }\n }\n }\n }",
"public function handleProviderCallback($provider)\n {\n $user = Socialite::driver($provider)->user();\n\n $selectProvider = Provider::where('provider_id', $user->getId())->first();\n\n if(!$selectProvider)//new user\n {\n $registeredUser = User::where('email', $user->getEmail())->first();//the user is already registered with the same email\n\n if(!$registeredUser) {//totally new user\n $registeredUser = new User();\n $registeredUser->name = $user->getName();\n $registeredUser->email = $user->getEmail();\n $registeredUser->save();\n }\n\n $newProvider = new Provider();\n $newProvider->provider_id = $user->getId();\n $newProvider->provider_name = $provider;\n $newProvider->user_id = $registeredUser->id;\n $newProvider->save();\n }\n else //registered user\n {\n $registeredUser = User::find($selectProvider->user_id);\n }\n\n auth()->login($registeredUser);\n return Redirect('/');\n\n }",
"function is_valid_name( $name, $id = 0, $language_id=0 )\n\t{\t\n\t\t$conds['key'] = $name;\n\t\t$conds['language_id'] = $language_id;\n\n\t\t \tif( $id != \"\") {\n\t\t\t\tif ( strtolower( $this->Language_string->get_one( $id )->key ) == strtolower( $name )) {\n\t\t\t\t// if the name is existing name for that user id,\n\t\t\t\t\treturn true;\n\t\t\t\t} \n\t\t\t} else {\n\t\t\t\tif ( $this->Language_string->exists( ($conds ))) {\n\t\t\t\t// if the name is existed in the system,\n\t\t\t\t\t$this->form_validation->set_message('is_valid_name', get_msg( 'err_dup_name' ));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t}",
"public function handleProviderCallback()\n {\n $user = Socialite::driver('google')->user();\n /* \n 1) Store the user details if not exists else just redirect\n 2) if Auth is using then login using Auth::login($user)\n 3) for passport, store some standard passport for all users\n 4) For multiple socialite option, make param route and replace everywhere option is hard coded\n */\n return $user->name;\n }",
"public function forceDelete(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }",
"public function validEmailValidDataProvider() {}",
"function name_exists($str){\n\n\t\tif(strlen($str)<3 || strlen($str)>30){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} must be between 3 and 30 characters in length');\n\t\t\treturn false;\n\t\t}\n\t\t$nameExists = $this->DAO->entitySelection('station',array('nameStation'=>$str),TRUE);\n\t\tif($nameExists['data']){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} already exists');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"public static function isValidName($name) {}",
"protected function persisteProviderData(Provider $provider)\n {\n $driver = $this->getDriver();\n\n $params = $this->processParams($provider);\n\n if ($driver->rowExistsInDatabase('provider', $provider->getId())) {\n /** actualizar */\n $driver->update('provider', $params['provider'], ['id' => $provider->getId()]);\n } else {\n /** insertar */\n $driver->insert('provider', $params['provider']);\n }\n $this->persistentity()->persistData($params['provider_address'], 'id', 'provider_address', 'id');\n return true;\n }",
"public function restore(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }",
"public function verify($name)\n {\n }",
"public function check()\n\t{\n\t\tif (trim($this->cn) == '')\n\t\t{\n\t\t\t$this->setError(\\Lang::txt('COM_GROUPS_ERROR_EMPTY_TITLE'));\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function isProviderFriendable($provider = null): bool\n {\n $baseClass = $this->getClassNameString($provider);\n\n return (bool) $this->providers->search(\n fn (MessengerProviderDTO $item) => $this->isBaseOrMorphClass($item, $baseClass)\n && $item->friendable\n );\n }",
"private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }",
"public function providerIsLoaded(string $provider)\n {\n return isset($this->loadedProviders[$provider]);\n }",
"function verify_person () {\n $bh=new gs_base_handler($this->data,$this->params);\n $f=$bh->validate();\n if (!is_object($f) || !is_a($f,'g_forms')) return $f;\n $d=$f->clean();\n\n $rec=person($this->params['role']);\n if (!$rec) {\n $f->trigger_error('FORM_ERROR','REC_NOTFOUND');\n return $bh->showform($f);\n }\n\n $fname=$this->params['field_name'].'_secret';\n $ga=new GoogleAuthenticator;\n $code=$ga->getCode($rec->$fname);\n\n\n if ($code!=$d['ga_code']) {\n $f->trigger_error('FORM_ERROR','GA_INCORRECT_CODE');\n return $bh->showform($f);\n }\n\n $person=person();\n $fname=$this->params['field_name'].'_verified';\n $person->$fname=TRUE;\n return true;\n }",
"public function isValidSource($source) {\nif ($source['name']=='livewhale') {\n\treturn true;\n};\nif (!empty($source['host']) && !empty($source['username']) && !empty($source['password']) && !empty($source['database'])) {\n\treturn true;\n}\nelse {\n\t$this->error='Source must specify a minimum of: host, username, password, database';\n\treturn false;\n};\n}",
"function validateName($name)\n {\n return (mb_strlen($name) <= CUSTOMER_NAME_MAX_LENGTH && mb_strlen($name) !== 0);\n }",
"public function isProviderSearchable($provider = null): bool;",
"public function isEuRegistered();",
"public function facebook_id_check($str) {\n // return FALSE;\n return TRUE;\n }",
"public function handleProviderCallback($provider)\n {\n try {\n\n $user = Socialite::driver($provider)->user();\n\n $find_user = User::where('provider_id', $user->id)\n ->where('provider',$provider)\n ->first();\n\n if($find_user){\n\n Auth::login($find_user);\n\n // return redirect('/home');\n return redirect()->back();\n\n }\n else{\n\n// dd($user);\n $newUser = User::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'provider_id'=> $user->id,\n 'provider'=> $provider,\n 'email_verified_at' => Carbon::now(),\n ]);\n\n Auth::login($newUser);\n return redirect()->back();\n }\n\n } catch (Exception $e) {\n return redirect('login/$provider');\n }\n\n }"
] | [
"0.63221335",
"0.62779325",
"0.6265286",
"0.6205485",
"0.61896044",
"0.61896044",
"0.61896044",
"0.60886633",
"0.60876095",
"0.60855556",
"0.60406965",
"0.60148853",
"0.60049236",
"0.5953346",
"0.5939193",
"0.59316665",
"0.5893126",
"0.585801",
"0.5856962",
"0.583204",
"0.5819401",
"0.5818838",
"0.5768652",
"0.5750044",
"0.57389003",
"0.5684394",
"0.5662631",
"0.56567615",
"0.5650341",
"0.5645111",
"0.5644379",
"0.56427914",
"0.56315625",
"0.5625932",
"0.5619409",
"0.5615209",
"0.5598463",
"0.558641",
"0.55779564",
"0.55679923",
"0.55544597",
"0.55520767",
"0.55328584",
"0.5531961",
"0.55222213",
"0.54940087",
"0.54740477",
"0.54691696",
"0.5452492",
"0.54434645",
"0.5441552",
"0.5441552",
"0.5441552",
"0.5417048",
"0.54144007",
"0.5380375",
"0.5373577",
"0.5371581",
"0.53560466",
"0.5345289",
"0.53419363",
"0.53394896",
"0.53390867",
"0.5338674",
"0.53344554",
"0.53344",
"0.53322893",
"0.532143",
"0.5320616",
"0.5304974",
"0.53027785",
"0.52984774",
"0.52825564",
"0.528008",
"0.5278478",
"0.5273699",
"0.52726233",
"0.5259578",
"0.5251313",
"0.5251284",
"0.52367806",
"0.5232039",
"0.5231223",
"0.52265036",
"0.5222737",
"0.5215805",
"0.5210663",
"0.5204264",
"0.5195719",
"0.5191961",
"0.51822644",
"0.51803815",
"0.51766396",
"0.51746106",
"0.51686716",
"0.51641",
"0.5160917",
"0.51597714",
"0.5142334",
"0.512727"
] | 0.7011916 | 0 |
Get unified user attribute based on unified attribute name | protected function getUserAttribute($attribute)
{
// do we have requested attribute?
if (isset($this->userInfo[$this->fieldsMap[$attribute]])) {
// yes, we have requested attribute
return $this->userInfo[$this->fieldsMap[$attribute]];
}
// we do not have requested attribute, just return something
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAttribute($name)\n {\n $user = $this->getUserRecord();\n if($user === false)\n return false;\n\n if(isset($user[$name]))\n return $user[$name];\n return false;\n }",
"public function getUserAttr()\n {\n return $this->UserAttr;\n }",
"public function getIdentifyingAttribute();",
"abstract protected function getAttributeName($attribute);",
"function get_user_attribute( $user_id, $meta_key ) {\n _deprecated_function( __FUNCTION__, '2.0.0', 'get_user_meta' );\n\n if ( !$usermeta = get_user_meta( $user_id, $meta_key ) )\n return false;\n\n if ( count($usermeta) == 1 )\n return reset($usermeta);\n\n return $usermeta;\n}",
"public function getAttribute(string $attribute): string;",
"public function get_attribute($name)\n {\n }",
"public function attribute()\n {\n return $this->hasOne(UserAttribute::class);\n }",
"function get_atribute_by_name($name,$name_attr)\n {\n return $this->get_attribute_by_name($name,$name_attr);\n }",
"public function getAttribute($name);",
"function get_atribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr)\n {\n return $this->get_attribute_by_attribute($attr_name,$attr_value,$exactly,$name_attr);\n }",
"function get_attribute($attribute)\n\t{\n\t\t$attribute = $this->db->getAttribute(constant(\"PDO::\".$attribute.\"\"));\n\n\t\treturn $attribute;\n\t}",
"public function get_attribute($key, $defaut = NULL);",
"public function __get($name)\n\t{\n\t\tif(array_key_exists($name, $this->_attributes))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}",
"public function getAttribute(string $name);",
"public function attribute(string $name) {\n\t\treturn $this->m_attributes[$name] ?? null;\n\t}",
"public function get($name): Attribute {\n $name = str_replace([\"-\", \" \"], \"_\", strtolower($name));\n if (isset($this->attributes[$name])) {\n return $this->attributes[$name];\n }\n\n return new Attribute($name);\n }",
"public function __get($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t\telse\n\t\t\treturn parent::__get($name);\n\t}",
"public function getAttribute($name) {\n\t\tif (isset ( $this->$name ))\treturn $this->$name;\n\t}",
"public function __attribute($name)\n {\n return $this->__attributes[$name];\n }",
"function getAttribute($Model, $attribute_name) {\n extract($this->settings[$Model->alias]);\n\n return ($Model->{$with}->Attribute->find(\n 'first',\n array(\n 'fields' => array(\n 'Datatype.name',\n 'Datatype.table',\n 'Datatype.validation_proc',\n 'Datatype.format',\n 'Attribute.name',\n 'Attribute.id'\n ),\n 'conditions' => array(\n 'Attribute.name' => $attribute_name,\n ),\n 'recursive' => 0\n )\n )\n );\n }",
"function getTableName_userattributes() \n\t{\n\t\t$success = false;\n\t\t$phplist_user_prefix = PhplistHelperPhplist::getUserTablePrefix();\n\t\t$success = \"{$phplist_user_prefix}_user_attribute\";\n\t\treturn $success;\n\t}",
"public function getAttribute($name)\n {\n if (in_array($name, static::$fields)) {\n return $this->attributes[$name];\n }\n }",
"public function __get($name)\n {\n return $this->attributes[$name];\n }",
"public function get($attribute);",
"function getAttributeValue($name) {\n if(array_key_exists($name, $this->_attributes)) {\n return $this->_attributes[$name];\n } else {\n return null;\n }\n }",
"public function getUserAttribute()\n {\n return User::where('id', $this->user_id)->first();\n }",
"public function getAttributes() {\n\t\tif(NULL === $this->cachedAttributes) {\n\t\t\t$this->cachedAttributes = [];\n\t\t\tforeach($this->PDO->select(\"SELECT\n SKY_USER_ATTRIBUTE.id,\n valueType,\n SKY_USER_ATTRIBUTE.name,\n SKY_USER_ATTRIBUTE.description,\n icon,\n multiple,\n enabled,\n SKY_USER_ATTRIBUTE_GROUP.name as groupName,\n SKY_USER_ATTRIBUTE_GROUP.description as groupDescription,\n SKY_USER_ATTRIBUTE_GROUP.id as gid\nFROM SKY_USER_ATTRIBUTE\nLEFT JOIN SKY_USER_ATTRIBUTE_GROUP on attr_group = SKY_USER_ATTRIBUTE_GROUP.id\nORDER BY indexing, name\") as $record) {\n\t\t\t\t$attr = AbstractAttribute::create($record);\n\t\t\t\tif ($attr) {\n\t\t\t\t\t$this->cachedAttributes[$record[\"id\"] * 1] = $attr;\n\t\t\t\t\t$this->attributeName2ID[strtolower($record[\"name\"])] = $record[\"id\"] * 1;\n\n\t\t\t\t\tif($gid = $record[\"gid\"]) {\n\t\t\t\t\t\t$this->cachedAttributeGroups[$gid*1][\"name\"] = $name = $record[\"groupName\"];\n\t\t\t\t\t\t$this->cachedAttributeGroups[$gid*1][\"description\"] = $record[\"groupDescription\"];\n\t\t\t\t\t\t$this->cachedAttributeGroupNames2ID[strtolower($name)] = $gid*1;\n\t\t\t\t\t\t$this->attribute2Group[$attr->getId()] = $gid*1;\n\t\t\t\t\t\t$this->group2Attribute[$gid*1][] = $attr->getId();\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\ttrigger_error(\"Can not create user attribute {$record[\"name\"]}\", E_USER_NOTICE);\n\t\t\t}\n\t\t}\n\t\treturn $this->cachedAttributes;\n\t}",
"public function get_attribute($field){\n\t\treturn $this->{$field};\n\t}",
"public function getIdentityAttribute(): string;",
"public function get($name) {\n\t\t// See if its in our base attribute\n\t\tif (array_key_exists($name, $this->attributes)) {\n\t\t\treturn $this->attributes[$name];\n\t\t}\n\n\t\t// No, so see if its in the private data store.\n\t\t$meta = $this->getPrivateSetting($name);\n\t\tif ($meta) {\n\t\t\treturn $meta;\n\t\t}\n\n\t\t// Can't find it, so return null\n\t\treturn null;\n\t}",
"public function readAttribute($attribute) {}",
"protected function initUserAttributes()\n {\n return $this->api('people/~:(' . implode(',', $this->attributeNames) . ')', 'GET');\n }",
"public function getAttributeByName($attributeName);",
"public function getAttribute($name)\r\n\t{\r\n\t\treturn $this->__get($name);\r\n\t}",
"public function getAttribute($name)\n\t{\n\t\tif(property_exists($this,$name))\n\t\t\treturn $this->$name;\n\t\telseif(isset($this->_attributes[$name])) {\n\t\t\treturn $this->_attributes[$name];\n\t\t}\n\t}",
"function umnshib_getAttributeValue($name, $use_headers = false, $prefix = '')\n{\n $shib = _umnshib_get_object($use_headers, $prefix);\n return $shib->getAttributeValue($name);\n}",
"protected function _lookupAttribute($attr)\n {\n if (preg_match('/^[0-9]+$/', $attr)) {\n $attr = (int)$attr;\n } else {\n $textLabels = $this->_getTextLabels();\n foreach ($textLabels as $index => $label) {\n $labels = array($label);\n $func = create_function('$c', 'return strtoupper($c[1]);');\n $camelCase = preg_replace_callback('/_([a-z])/', $func, $label);\n $labels[] = $camelCase;\n\n if (in_array($attr, $labels)) {\n $attr = $index;\n break;\n }\n }\n }\n\n return $attr;\n }",
"public function attr($attribute) {\n if (array_key_exists($attribute, $this->attributes)) {\n return $this->attributes[$attribute];\n } else {\n return 'PopShops API Error: Invalid attribute passed to ' . get_class($this) . '->attr: ' . $attribute;\n }\n }",
"public function getAttribute($attribute) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t'*', tx_newspaper::getTable($this), $this->getCondition()\n\t\t\t);\n\t\t\t$this->setUid($this->attributes['uid']);\n\t\t}\n\n \t\tif (!array_key_exists($attribute, $this->attributes)) {\n \tthrow new tx_newspaper_WrongAttributeException($attribute);\n \t\t}\n \t\treturn $this->attributes[$attribute];\n \t}",
"public function getAttribute($name) {\n\t\tif (property_exists($this, $name))\n\t\t\treturn $this->$name;\n\t\telse if ($this->hasAttribute($name))\n\t\t\treturn $this->_attributes[$name];\n\t}",
"public function get($attr) {\n return array_key_exists($attr, $this->_private_attributes) ? $this->_private_attributes[$attr] : null;\n }",
"protected function resolveAttribute($resource, $attribute)\n {\n return data_get($resource, str_replace('->', '.', $attribute));\n }",
"public function getAttribute(): string\n {\n return $this->attribute;\n }",
"public function __get($name)\n\t{\n\t\tif (isset($this->attributes[$name])) {\n\t\t\treturn $this->attributes[$name];\n\t\t} \n\t\treturn null;\n\t\t\n\t}",
"public function getAttributes($name);",
"private function attr($name)\n {\n if (!$this->attrs) {\n $this->attrs = $this->metadata['attrs'];\n }\n\n try {\n return $this->attrs->get($name);\n } catch (InvalidAttrException $e) {\n return null;\n }\n }",
"public function __get($attribute)\n {\n if ( isset($this->attributes[$attribute]) ) return $this->attributes[$attribute];\n }",
"public function getUserRoleNameAttribute()\n { \n return $this->hasOne('App\\Models\\UserRoles','id', 'user_role')->pluck('name')[0];\n }",
"function getAttributeValue( $userId, $attribId )\n\t{\n\t\t$success = false;\n\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t$tablename_userattributes = PhplistHelperAttribute::getTableName_userattributes();\n\t\tPhplist::load( 'PhplistQuery', 'library.query' );\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_phplist' . DS . 'tables' );\n\t\t\n\t\t$query = new PhplistQuery( );\n\t\t$query->select( \"value\" );\n\t\t$query->from( $tablename_userattributes . \" AS tbl\" );\t\t\n\t\t$query->where( 'tbl.userid = '.$userId );\n\t\t$query->where( 'tbl.attributeid = '.$attribId );\n\t\t\n\t\t$database->setQuery( ( string ) $query );\n\t\t$data = $database->loadObject();\n\t\t$success = $data->value;\n\t\treturn $success;\n\t}",
"public function __get($name)\n\t{\n\t\tif (isset($this->_attributes[$name]))\n\t\t\treturn $this->_attributes[$name];\n\t\treturn null;\n\t}",
"public function getUserfield();",
"public function findAttrByName ($strAttrId){}",
"public function attr($name) {\n\tif( count($this->selectList) > 0 && isset($this->selectList[0]->attrList[$name])) return $this->selectList[0]->attrList[$name];\n\tif( isset($this->attrList[$name]) ) return $this->attrList[$name];\n\treturn '';\n }",
"public function __get($name)\n {\n $attribute = parent::__get($name);\n if ($name == 'values' && $attribute) {\n return $attribute[0]['value'];\n }\n return $attribute;\n }",
"public function getUserAttribute()\n {\n return $this->user()->first();\n }",
"public function __get($name)\n {\n if (isset($this->_attributes[$name]) || array_key_exists($name, $this->_attributes)) {\n return $this->_attributes[$name];\n } elseif ($this->hasAttribute($name)) {\n return null;\n } else {\n return parent::__get($name);\n }\n }",
"public function getAttribute($attribute)\n {\n }",
"public function get_attr_by_name( $name ) {\n\t\tforeach ( $this->component as $item ) {\n\t\t\tif ( ( $item['name'] == $name ) ) {\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"abstract public function getAttribute($key);",
"public function getAttribute($name)\n {\n SERVICES_HYPERESTRAIER_DEBUG && Services_HyperEstraier_Utility::checkTypes(\n array($name, 'string')\n );\n return (isset($this->_attrs[$name])) ? $this->_attrs[$name] : null;\n }",
"public function getAttribute($name)\n {\n $value = false;\n $name = htmlspecialchars($name, ENT_QUOTES);\n if (isset($this->attributes[$name])) {\n $value = $this->attributes[$name];\n }\n return $value;\n }",
"public function getViaTableAttributesValue();",
"public function __get(string $name)\n {\n if (array_key_exists($name, $this->attributes)) {\n return $this->attributes[$name];\n }\n \n return null;\n }",
"public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }",
"public function getAttribute($key);",
"public function getRawAttribute($key);",
"public function getUsername() {\n return @$this->attributes['username'];\n }",
"public function __get($attribute)\n {\n return array_get($this->attributes, $attribute);\n }",
"public function getLocaleFromAuthenicatedUser()\n {\n return auth()->user()->{self::getAttributeName()};\n }",
"public function getAttribute($attribute)\r\n\t{\r\n\t\t\r\n\t}",
"public function getAttribute($attr_name)\n {\n return false === $this->hasAttribute($attr_name) ? null : $this->attributes[$attr_name];\n }",
"public function get($attributeName);",
"public function getAuthData($attribute = null);",
"function get_attribute( $key ) {\n\t\treturn isset( $this->attributes[$key] ) ? $this->attributes[$key] : null;\n\t}",
"function getUserIdentifier()\n\t{\n\t\tif ($this->serverType == \"activedirectory\") {\n\t\t\treturn $this->attr_sambalogin;\n\t\t} else {\n\t\t\treturn $this->attr_login;\n\t\t}\n\t}",
"public function getAttributeWithLocale(string $attribute) {\n try {\n $locale = App::getLocale();\n $attributeWithLocale = $attribute.'_'.$locale;\n if(!is_null($attributeWithLocale)) {\n return $this->$attributeWithLocale;\n } else {\n return $this->getAttributeWithFallBackLocale($attribute);\n }\n\n } catch (\\Exception $exception) {\n\n }\n\n }",
"public function getAttribute()\n {\n return $this->attribute;\n }",
"public function getAttribute()\n {\n return $this->attribute;\n }",
"public function get_attribute($key) {\n\t\treturn array_get($this->attributes, $key);\n\t}",
"public function read_attribute($attribute)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]) )\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'R')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\treturn $this->$var;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' not readable');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function getProtectionTypeIdByAttrName($attr_name, $show_hidden = false, $user_id = null) {\r\n if (empty($attr_name))\r\n return null; //there is no attr_name\r\n\r\n if (empty($user_id)) {\r\n if (!isset($this->accaunt))\r\n $this->load->model('accaunt_model', 'accaunt');\r\n $user_id = $this->accaunt->get_user_id();\r\n }\r\n if (empty($user_id))\r\n return null; //there is no user_id\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// echo 'hello';\r\n if (0) {\r\n $this->db->select('n.id')\r\n ->from($this->attributes_values_table . ' AS v')\r\n ->join($this->attributes_names_table . ' AS n', 'n.id = v.attribute_id', 'inner')\r\n ->where('n.machine_name', $attr_name)\r\n ->where('n.is_active', self::ATTRIBUTE_IS_ACTIVE);\r\n if (TRUE !== $show_hidden) {\r\n $this->db->where('n.hidden', self::ATTRIBUTE_NOT_HIDDEN);\r\n }\r\n\r\n $values = $this->db->select('n.id')\r\n ->where('v.user_id', $user_id)\r\n// ->where( \"( v.user_id = $user_id OR v.user_id IS NULL )\" )\r\n ->get()\r\n ->row('id');\r\n }\r\n\r\n $this->db->select('id')\r\n ->where('machine_name', $attr_name)\r\n ->where('is_active', self::ATTRIBUTE_IS_ACTIVE);\r\n\r\n if (TRUE !== $show_hidden) {\r\n $this->db->where('hidden', self::ATTRIBUTE_NOT_HIDDEN);\r\n }\r\n\r\n $values = $this->db->get($this->attributes_names_table)->row('id');\r\n\r\n\r\n return $values;\r\n }",
"public function getAttribute($oi, $attribute) {\n\n // we support attribute:type configurations to allow for testing a specific email address \n $values = explode(':',$attribute);\n $type=null;\n if(sizeof($values) > 1) {\n $attribute=$values[0];\n $type=$values[1];\n }\n\n $valuefound=null;\n // if the attribute is a model name, check for the related fields\n if(isset($oi[$attribute])) {\n\n // To distinguish between a non-existing attribute and a supported attribute\n // for which we do not have a value, we set $valuefound to the empty array at this point.\n $valuefound=array();\n\n // loop over all recovered models of this attribute (ie: all email addresses)\n $models = $oi[$attribute];\n if($attribute == \"PrimaryName\") {\n // PrimaryName is a hasOne association\n $models = array($models);\n }\n foreach($models as $model) {\n switch($attribute) {\n case 'TelephoneNumber':\n if($type === null || $type == $model['type']) {\n $valuefound[] = formatTelephone($model);\n }\n break;\n case 'Address':\n if(in_array($type, array('street','state','postal_code','room','locality','country'))) {\n if($model[$type] !== null) {\n $valuefound[] = $model[$type];\n }\n }\n break;\n case 'PrimaryName':\n $valuefound[] = generateCn($model);\n break;\n case 'Name':\n if( ($type !== null && $type == $model['type']) \n || ($type === null)) {\n $valuefound[] = generateCn($model);\n }\n break;\n case 'Identifier':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['identifier'];\n }\n break;\n case 'EmailAddress':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['mail'];\n }\n break;\n case 'Url':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['url'];\n }\n break;\n }\n }\n }\n return $valuefound;\n }",
"function util_getAttribute($in_haystack, $in_tag, $in_attr)\r\n{\r\n\t$attrs = util_innerString($in_haystack, \"<{$in_tag} \", '>', FALSE);\r\n\tif ($attrs) {\r\n\t\tif (substr($attrs, -1) == '/') {\r\n\t\t\t$attrs = substr($attrs, 0, -1);\r\n\t\t}\r\n\t}else {\r\n\t\treturn NULL;\r\n\t}\r\n\tforeach (explode(' ', util_whitespace($attrs)) as $candidate) {\r\n\t\t$attr = explode('=', $candidate, 2);\r\n\t\tif (count($attr) != 2) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ($attr[0] == $in_attr) {\r\n\t\t\treturn substr($attr[1], 1, strlen($attr[1]) - 2);\r\n\t\t}\r\n\t}\r\n\treturn NULL;\r\n}",
"public function getAttribute($name)\n {\n if ($name != 'value') {\n return parent::getAttribute($name);\n }\n $validator = $this->getValidator();\n return $validator->getHash();\n }",
"public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}",
"protected function avatar(): Attribute\n {\n return new Attribute(get: static function (mixed $value, array $attributes): ?string {\n return isset($attributes['email']) ? sprintf('https://www.gravatar.com/avatar/%s?d=mp', md5($attributes['email'])) : null;\n });\n }",
"public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }",
"public function __get($attribute) {\n return $this->getAttribute($attribute);\n }",
"public function getAttribute($name, $inherited = true) {}",
"public function __get($key)\n {\n // is the requested keyiable in the fields array?\n if(isset($this->fields[$key]))\n {\n // if so, find out what it's database column name is\n $db_column_name = $this->fields[$key]['name'];\n // return $this->attributes->string1 (or text3, decimal5 etc.)\n if(isset($this->attributes[$db_column_name]))\n return $this->attributes[$db_column_name];\n \n // otherwise, check if its in the attributes as named (such as $this->id)\n }elseif(isset($this->attributes[$key])){\n return $this->attributes[$key];\n }\n\n return parent::__get($key);\n }",
"public function __get($name)\n {\n if ($name === 'display_name') {\n return (!is_null($this->user)) ? $this->user->getFullNameAttribute() : '';\n } elseif ($name === 'email') {\n return (!is_null($this->user)) ? $this->user->email : '';\n } else {\n return parent::__get($name);\n }\n }",
"protected function getAttribute($attribute)\n {\n if (isset( $this->customAttributes[$attribute] )) {\n return $this->customAttributes[$attribute];\n }\n\n $key = \"validation.attributes.{$attribute}\";\n\n if (( $line = trans($key) ) !== $key) {\n return $line;\n } else {\n return str_replace('_', ' ', snake_case($attribute));\n }\n }",
"public function getAttributeName()\n {\n return 'AgriculturalInsuranceDiscountFactor';\n }",
"final protected function f(string $k) {return df_config_field()->getAttribute($k);}",
"private function getAttribute($attribute)\n\t{\n\t\treturn isset($this->_data->{$attribute}) ? $this->_data->{$attribute} : '';\n\t}",
"public function getValue(string $attr)\n {\n $this->checkAttribute($attr);\n return $this->attributes[$attr];\n }",
"public function getAttribute($key)\n {\n // Check if the key is an array dot notation.\n if (str_contains($key, '.') and array_has($this->attributes, $key)) {\n return $this->getAttributeValue($key);\n }\n\n $camelKey = camel_case($key);\n\n // If the \"attribute\" exists as a method on the model, it may be an\n // embedded model. If so, we need to return the result before it\n // is handled by the parent method.\n if (method_exists($this, $camelKey)) {\n $method = new ReflectionMethod(get_called_class(), $camelKey);\n }\n\n return parent::getAttribute($key);\n }",
"function getAttribute( $name, $element ) \r\n\t\t{\r\n\t\t $return = null;\r\n \t\tif(version_compare(JVERSION,'1.6.0','ge')) {\r\n // Joomla! 1.6+ code here\r\n $return = $element->getAttribute( $name );\r\n } else {\r\n // Joomla! 1.5 code here\r\n $return = $element->attributes( $name );\r\n }\r\n return $return;\r\n\t\t}",
"function _get_attribute($name, $tag)\n\t{\n\t\t// Look for the name value pair, parse it out. Backreferences here provides\n\t\t// flexibility so the user can use either single or double quotes, as\n\t\t// long as their balanced, this will parse. \n\t\t$tag = str_replace(array(\"″\", \"′\"), array('\"', \"'\"), $tag);\n\t\t$hasAttribute = preg_match( \"/$name=('|\\\")([^\\\\1]*?)\\\\1/i\", $tag, $matches );\n\t\tif ( $hasAttribute ) {\n\t\t\t$quote = $matches[1];\n\t\t\t$value = \"$quote$matches[2]$quote\";\n\t\t} else {\n\t\t\t$value = '\"' . get_option(\"chitikap_${name}\") . '\"';\n\t\t}\n\n\t\treturn $value;\n\t}"
] | [
"0.6732487",
"0.67118496",
"0.66759706",
"0.6352132",
"0.63333344",
"0.6241906",
"0.62288773",
"0.6212016",
"0.6210523",
"0.61787534",
"0.6169093",
"0.6156412",
"0.61411065",
"0.6109545",
"0.60890454",
"0.6085997",
"0.60473293",
"0.60297585",
"0.599938",
"0.5969465",
"0.5950929",
"0.5947545",
"0.59422994",
"0.590668",
"0.59034574",
"0.5884171",
"0.5826892",
"0.5821217",
"0.5810847",
"0.58070356",
"0.5789038",
"0.57864803",
"0.57768655",
"0.57682335",
"0.57404965",
"0.5735244",
"0.57308257",
"0.57243246",
"0.5700268",
"0.5680319",
"0.5679876",
"0.5674958",
"0.56705326",
"0.5667363",
"0.5665226",
"0.56540793",
"0.56514597",
"0.5647142",
"0.56384695",
"0.563535",
"0.56328005",
"0.5629661",
"0.56197673",
"0.5618516",
"0.5616763",
"0.5614755",
"0.5604035",
"0.55991817",
"0.5595842",
"0.55860347",
"0.5585803",
"0.55857503",
"0.5564383",
"0.55631393",
"0.55537045",
"0.55532765",
"0.55464953",
"0.55460507",
"0.55443287",
"0.5540661",
"0.55382586",
"0.55365723",
"0.5533255",
"0.5531041",
"0.55306244",
"0.5530314",
"0.5530096",
"0.5525989",
"0.5525989",
"0.55156577",
"0.5513313",
"0.5513197",
"0.5512509",
"0.55109566",
"0.5505028",
"0.5500963",
"0.5495262",
"0.54950917",
"0.54920894",
"0.5490266",
"0.5481715",
"0.5480756",
"0.5472821",
"0.54718494",
"0.5469193",
"0.5462926",
"0.5453489",
"0.5451848",
"0.544609",
"0.5445233"
] | 0.65728647 | 3 |
Return all user info available | public function getUserInfo()
{
return array(
static::ATTRIBUTE_ID => $this->getUserId(),
static::ATTRIBUTE_EMAIL => $this->getUserEmail(),
static::ATTRIBUTE_NAME => $this->getUserName(),
static::ATTRIBUTE_PAGE_URL => $this->getUserPageUrl(),
static::ATTRIBUTE_AVATAR_URL => $this->getUserAvatarUrl(),
static::ATTRIBUTE_SEX => $this->getUserSex(),
static::ATTRIBUTE_BIRTHDAY => $this->getUserBirthday(),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_all_user_info()\n {\n $query = $this->db->get('users');\n return $query->result();\n }",
"public function getUserInfo() {}",
"private function getUserInfo()\n\t{\n\t\t$user = Sentry::user();\n\t\t$result = array(\n\t\t\t'username' => $user->get('username'),\n\t\t\t'isAdmin' => $user->in_group('admin'),\n\t\t);\n\t\treturn $result;\n\t}",
"public function getUserInfo(): array;",
"abstract public function getUserInfo();",
"static function getUserInfo(){\n $result = Array();\n return $result;\n }",
"private function get_userInfo() {\n $params = [ 'user_ids' => $this->user_id ];\n $result = $this->api->users->get($params);\n $params['fields'] = '';\n $result2 = $this->api2->users->get($params);\n $result['hidden'] = (int)array_has($result2, 'hidden');\n return $result;\n }",
"function get_user_info(){\t\t\n\t\t// Fetch user data from database\n\t\t$user_data_array=$this->UserModel->get_user_data(array('member_id'=>$this->session->userdata('member_id')));\n\t\techo $user_data_array[0]['company'].\"|\".$user_data_array[0]['address_line_1'].\"|\".$user_data_array[0]['city'].\"|\".$user_data_array[0]['state'].\"|\".$user_data_array[0]['zipcode'].\"|\".$user_data_array[0]['country_id'].\"|\".$user_data_array[0]['country_name'];\n\t}",
"public function getUserInfo()\n {\n }",
"private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }",
"public static function get_user_data()\n {\n }",
"public function allUser(){\n\n\t\t\t$data=$this->all('oops');\n\t\t\treturn $data;\n\t\t}",
"function user_details() {\r\n\t\t\t$query = $this->pdo->prepare(\"select * from user_account\");\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}",
"function paces_get_users_all_details( $user_id ){\n return get_metadata( 'user', $user_id );\n}",
"public function listUsers()\n {\n global $db;\n $user_db_data = array();\n $cache = Cache::getInstance();\n // $cache->flush();\n if($cache->exists(\"user_info_data\"))\n {\n $user_db_data = $cache->get(\"user_info_data\");\n } else { \n $e = $db->prepare(\"SELECT * FROM user_info\");\n $e->execute();\n $user_data = $e->fetchAll(); \n // cache will clear in every 1 min.\n $cache->set(\"user_info_data\", $user_data, 60 * 60 * 0.1);\n $user_db_data = $user_data;\n }\n return $user_db_data;\n }",
"public function getUserInformation() {\n /** @var User $user */\n $user = auth()->user() ;\n\n return $user->toArray() ;\n }",
"function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}",
"public function getUserData()\n {\n exit(json_encode(['data' => $this->users_model->get_users()]));\n }",
"protected function getUserInfo()\n {\n return [\n \"channel\" => self::getSdkChannel(),\n \"uid\" => $this->request_param[\"user_id\"],\n \"server_id\" => $this->request_param[\"server_id\"],\n \"role_id\" => is_null($this->role_id)?\"?\":$this->role_id,\n ];\n }",
"public function index()\n {\n return $this->user->all();\n }",
"public function getUserInfo ()\n\t{\n\t\t$info[\"id\"]\t\t\t\t\t\t= $this->id;\t\t\t\t\t//The unique id of the user in the database\n\t\t$info[\"user_id\"] \t\t\t\t= $this->userId;\t\t\t\t//The id of the user includes API id's\n\t\t$info[\"email\"]\t\t\t\t\t= $this->email;\t\t\t\t\t//The email of the user\n\t\t$info[\"description\"]\t\t\t= $this->description;\t\t\t//The description of the user\n\t\t$info[\"location\"]\t\t\t\t= $this->location;\t\t\t\t//The location of the user\n\t\t$info[\"first_name\"]\t\t\t\t= $this->firstName;\t\t\t\t//The first name of the user\n\t\t$info[\"last_name\"]\t\t\t\t= $this->lastName;\t\t\t\t//The last name of the user\n\t\t$info[\"name\"]\t\t\t\t\t= $this->fullName;\t\t\t\t//The full name of the user\n\t\t$info[\"username\"]\t\t\t\t= $this->username;\t\t\t\t//The username of the user\n\t\t$info[\"type\"]\t\t\t\t\t= $this->type;\t\t\t\t\t//The type of user registration\n\t\t$info[\"thumbnail\"]\t\t\t\t= $this->thumbnail;\t\t\t\t//The user's image thumbnail\n\t\t$info[\"gender\"]\t\t\t\t\t= $this->gender;\t\t\t\t//The gender of the user\n\t\t$info[\"num_calendars\"]\t\t\t= $this->numCalendarsCreated;\t//The number of calendars the user has created\n\t\t$info[\"num_followed_calendars\"]\t= $this->numCalendarsFollowed;\t//The number of calendars the user is following\n\t\t$info[\"primary_calendar\"]\t\t= $this->primaryCalendar;\t\t//The primary calendar that a user is using\n\t\t\n\t\treturn $info;\n\t}",
"function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}",
"private function get_user_info() {\n $user_info = $this->_api_call('https://api.twitter.com/1.1/account/settings.json');\n return $user_info;\n }",
"public function index()\n {\n return response()->responseUtil(User::all(['id', 'name', 'realName', 'openId', 'nickName', 'avatarUrl', 'cellphone', 'officephone','regTime', 'email']));\n }",
"function get_user_list(){\n\t\treturn array();\n\t}",
"public function getAllUsers(){\n\t\treturn $this->user;\n\t}",
"public function getUserInformation()\n {\n return $this->userInformation;\n }",
"private function get_user_data()\n {\n $sql_query = \"select * from users\";\n $users = DB::select($sql_query);\n return $users;\n }",
"public function user_info(){\n $_username = '';\n $_email = '';\n $_level = '';\n\n if($_SESSION['login']){\n $userID = filter_var($_SESSION['userid'], FILTER_SANITIZE_STRING);\n $session_key = filter_var($_SESSION['session_key'], FILTER_SANITIZE_STRING);\n $query = \"SELECT * FROM users WHERE username='$userID' AND session_key='$session_key'\";\n $info_result = $this->connect()->query($query);\n $user_info = $info_result->fetch_array();\n\n $_username = $user_info['username'];\n $_email = $user_info['email'];\n $_level = $user_info['level'];\n }\n\n return array(\"username\"=>$_username, \"email\"=>$_email, \"level\"=>$_level);\n }",
"public function info()\n {\n return array(\n 'title' => 'Users',\n 'functions' => array(\n 'Users' => 'search'\n )\n );\n }",
"protected function initUserInfoAttributes()\n {\n return $this->api(\"user/get_user_info\", 'GET', ['oauth_consumer_key'=>$this->getUserAttributes()['client_id'], 'openid'=>$this->getUserAttributes()['openid']]);\n }",
"public function index()\n {\n $user_id = Auth::id();\n $user_info = Profile::where('user_id', $user_id)->get();\n\n return $user_info;\n }",
"public function getUsers()\n {\n return Security::getUserList();\n }",
"public function getUserData()\n {\n \n $user = MasterUser::latest()->get();\n return response([\n 'success' => true,\n 'message' => 'List All User',\n 'data' => $user\n ], 200);\n }",
"protected function getAllUsers() {\n\t\t\t$query = \"SELECT username, f_name, l_name, phone, email FROM Stomper\";\n\t\t\treturn $this->EndpointResponse($query, true);\n\t\t}",
"function getUsers(){\n }",
"function getUsers(){\n }",
"public function getUserInfo()\n {\n $request = new Resource('GET', 'https://api.dropbox.com/1/account/info', array(\n 'oauth_consumer_key' => $this->consumer->client_id,\n 'oauth_token' => $this->token->access_token,\n ));\n\n // Sign the request using the consumer and token\n $request->sign($this->signature, $this->consumer, $this->token);\n\n $user = json_decode($request->execute());\n\n // Create a response from the request\n return array(\n 'uid' => $this->token->uid,\n 'name' => $user->display_name,\n 'email' => $user->email,\n 'location' => $user->country,\n );\n }",
"public function getUsers();",
"public function getUsers();",
"public function getUsers();",
"function UserInfo(){\r\n\r\n\t//get user\r\n\tif(Helpers::is_logged_in()){\r\n\r\n\t//get the id of current user\r\n\t$uid=Helpers::uid();\r\n\r\n\t//get app's meta info\r\n\t$app_meta=$this->GetMetaInfo();\r\n\r\n\t/*\r\n\t**Boolean variable to check wether user is logged in based on the App_meta info \r\n\t**It Also helps find out wether a user was om Landing Page or on Dashboard\r\n\t*/\r\n\t$meta_logged_in=!empty($app_meta['logged_in']) && $app_meta['logged_in'];\r\n\r\n\t//get the User object\r\n\t$user=Helpers::get_controller(USERS)->GetUserById($uid);\r\n\t\t\r\n\t//Lets decide wether to show the user (that just logged in) the Welcome message\r\n\tif(!empty(Yii::app()->session['logged_in']) && !Helpers::IsToday($user->registration_date) && $meta_logged_in){\r\n\t\r\n\t$welcome=true;\t\r\n\tunset(Yii::app()->session['logged_in']);\r\n\t\r\n\t}\r\n\r\n\t/**\r\n\t** check wether user is to go through the Site Tour\r\n\t** After the first login\r\n\t**/\r\n\tif($user->tour_enabled && $meta_logged_in){\r\n\r\n\t$tour_enabled=true;\t\r\n\r\n\t$user->tour_enabled=0;\r\n\t\r\n\t$user->save();\t\r\n\r\n\t}\r\n\r\n\treturn array(\r\n\r\n\t\t\"id\"=>$uid,\r\n\t\t\"message\"=>!empty($welcome)?\"Welcome back \".Helpers::get_controller(USERS)->UserName($uid):false,\r\n\t\t\"tour_enabled\"=>!empty($tour_enabled),\r\n\r\n\t\t);\r\n\r\n\t}\r\n\r\n\treturn array();\r\n}",
"public function get_all_hotspot_user(){\n return $this->query('/ip/hotspot/user/getall');\n }",
"function getAllInfo(){\n //Creamos la consulta\n $sql = \"SELECT * FROM usuarios;\";\n //obtenemos el array con toda la información\n return $this->getArraySQL($sql);\n }",
"public function index()\n {\n return response()->json(UserInformation::get());\n }",
"function get_users()\n {\n //Unimplemented\n }",
"public function getUserList()\n {\n return $this->userDao->getUserList();\n }",
"public function getInfo()\n {\n $user = User::with(['optician'])->find(auth()->id());\n\n return api_resource('mobile\\User')->make($user);\n }",
"public function getUserInfo()\r\n {\r\n return self::makeCall('getUserInfo', array(), null, false, $this->sessionID);\r\n }",
"public function get_userInfo()\n {\n return $this->call_method(\"get/userInfo\",\n array()\n );\n }",
"public function getAllUsers(){\n $response = User::getAllUserData();\n return json_encode($response);\n }",
"public function getMyAccountInfo()\n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n\n if ($user_id) {\n $user = $this->user_logic->getUserById($user_id);\n if ($user !== false) {\n if (! empty($user) AND is_array($user)) {\n $user = array_pop($user);\n $ajax_data['code'] = 0;\n $ajax_data['data']['user'] = $user;\n $ajax_data['message'] = 'Successfully retrieved user info';\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'User does not exist'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Failed to get user info'; \n } \n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid user id';\n }\n \n $this->ajax_respond($ajax_data);\n }",
"public function get_user_info()\n {\n try {\n $user_info = self::api(\"me\");\n } catch (Exception $e) {\n // TODO: Handle the error\n // Set the return value to be an empty array\n $user_info = array();\n }\n\n return $this->convert_array_to_object($user_info);\n }",
"public function getAllUser(){\n return $this->users;\n }",
"public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }",
"public function get_user_data() {\n\t\t$email = '';\n\t\t$name = '';\n\n\t\tif ( ! empty( $this->current_user->user_email ) ) {\n\t\t\t$email = $this->current_user->user_email;\n\t\t}\n\n\t\tif ( ! empty( $this->current_user->user_firstname ) && ! empty( $this->current_user->user_lastname ) ) {\n\t\t\t$name = $this->current_user->user_firstname . ' ' . $this->current_user->user_lastname;\n\t\t} else {\n\t\t\t$name = $this->current_user->user_login;\n\t\t}\n\n\t\treturn array(\n\t\t\t'name' => $name,\n\t\t\t'email' => $email,\n\t\t);\n\t}",
"public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }",
"public function index_get()\n {\n $response = $this->UserM->all_user();\n $this->response($response);\n }",
"public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }",
"function getUser(){\n $db=new connect();\n $select=\"select * from users\";\n return $db->getList($select);\n }",
"public function getAllUsers() {\n //Example of the auth class (you have to change the functionality for yourself)\n AuthHandler::needsAuth(array(\n 'auth' => true\n ));\n\n return ModelLoader::getModel('UserData')->getMultipleUsers(array(\n 1, 2, 3\n ));\n }",
"public function getUserInfo(Request $request)\n\t{\n\t\t$id = $request->input('id');\n\n\t\tif ($id) {\n\t\t\t$userInfo = User::select('name', 'phone', 'address', 'longitude as lng', 'latitude as lat')->find($id);\n\t\t\treturn $userInfo->toJson();\n\t\t} else {\n\t\t\t$allUserInfo = User::select('name', 'phone', 'address', 'longitude as lng', 'latitude as lat')->get();\n\t\t\treturn $allUserInfo->toJson();\n\t\t}\n\n\t}",
"public function profileInfo()\n {\n\n return response()->json(User::where('id', '=', Auth::user()->id)->get());\n }",
"public static function getAllUser()\n\t{\n\t\treturn array(self::_getDao()->count(), self::_getDao()->getAll());\n\t}",
"function extract_all_users() {\n\t\t$db = connect_to_db();\n\n\t\t$select_statement = \n\t\t\t\"select users.id, users.username from users\";\n\t\t;\n\n\t\t$stmt = $db->prepare($select_statement);\n\n\t\tif ( !($stmt->execute()) ) {\n\t\t\techo \"Error: Could not get users.\";\n\t\t\t$db->close();\n\t\t\texit;\n\t\t}\n\n\t\t$json = \"[\";\n\n\t\t$stmt->bind_result($id, $username);\n\n\t\twhile ( $stmt->fetch() ) {\n\t\t\t$info = array('id' => $id, 'username' => $username);\n\t\t\t$json = $json . json_encode($info) . \",\";\n\t\t}\n\n\t\techo substr_replace($json, \"]\", -1);\n\n\t\t$db->close();\n\t}",
"public function getUserDetails() {\n $where = [];\n $this->usersModel->setTableName(\"cvd_users\");\n $username = $this->request->input(\"username\");\n if ($username) {\n $where[] = [\"username\", \"=\", $username];\n }\n\n $userIdEqual = $this->request->input(\"user_id_equal\");\n if ($userIdEqual) {\n $where[] = [\"user_id\", \"=\", $userIdEqual];\n }\n\n $userIdNotEqual = $this->request->input(\"user_id_not_equal\");\n if ($userIdNotEqual) {\n $where[] = [\"user_id\", \"!=\", $userIdNotEqual];\n }\n\n\n $this->usersModel->setWhere($where);\n $users = $this->usersModel->getData();\n\n return $users;\n }",
"function d4os_io_db_070_os_user_load_all() {\n $users = array();\n d4os_io_db_070_set_active('os_robust');\n $result = db_query(\"SELECT *, ua.FirstName AS username, ua.LastName AS lastname, ua.PrincipalID AS UUID, ua.Email AS email, CONCAT_WS(' ', FirstName, LastName) AS name FROM {UserAccounts} AS ua\");\n while ($user = db_fetch_object($result)) {\n $users[] = $user;\n }\n d4os_io_db_070_set_active('default');\n return $users;\n}",
"public function getAllUserDetails()\n {\n $userdata = Register::join(\"logins\",\"logins.id\",\"=\",\"registers.login_id\")\n ->join(\"addresses\",\"addresses.id\",\"=\",\"registers.reg_id\")->get();\n return $userdata;\n }",
"public function getLTIUsers();",
"public function getAllUsers()\n {\n return \"users from mongo\";\n }",
"function get_all_user_settings()\n {\n }",
"public function getUserInfo() {\n\t\t$session = Yii::$app->session;\n\t\t$session->open();\n\t\t$session->regenerateID();\n\t\t\n\t\treturn $session['accountInfo'];\n\t}",
"public function all_userdata()\n\t{\n\t\treturn $this->userdata;\n\t}",
"function getUserInfo()\n {\n return $this->userinfo;\n }",
"public function getAllUsers()\n {\n $result = self::$dbInterface -> query(\"SELECT userID, userName, email FROM user\");\n return $result;\n }",
"public function getUserList() {\n $users = DB::select(\"select * from users\");\n $count = DB::table(\"users\") -> count();\n $data = [];\n foreach ($users as $user) {\n array_push($data, array(\n \"id\" => $user -> id,\n \"role\" => ($user -> role == 0)?\"Inactive\":($user -> role == 1?\"Active\":'[ Admin ]'),\n \"fname\" => $user -> fname,\n \"lname\" => $user -> lname,\n \"affiliation\" => $user -> affiliation,\n \"email\" => $user -> email,\n \"created_at\" => $user -> created_at,));\n };\n return array(\"code\" => 0, \"msg\" => \"\", \"count\" => $count, \"data\" => $data);\n }",
"public function getAllUsers() {\n $sql = \"SELECT `pk_users`, `name_users`, `password_users`, `mail_users`, `symbol_users`, `first_name_users`, `last_name_users` FROM `users`\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }",
"public function getUserInfo()\n {\n return $this->userInfo;\n }",
"public function getUserInfo()\n {\n return $this->userInfo;\n }",
"public function getUserInfo()\n {\n return $this->userInfo;\n }",
"public function getInfo()\n {\n if(Sentry::check())\n {\n $user = Sentry::getUser();\n $data = $this->app->json([\n \"username\" => $user->first_name,\n \"password\" => \" \",\n \"email\" => $user->email\n ]);\n return $data;\n } else {\n return false;\n }\n }",
"public function allUsers()\n {\n // $sql = 'SELECT * FROM '.$db_name;\n return $this->queryAll();\n }",
"public function getAll()\n {\n return $this->appUser->orderBy('first_name')->get()->toArray();\n }",
"public function getAllUsers()\n {\n $sql = \"SELECT `user_id`, `user_fname`, `user_lname`, `user_password_hash`, `user_email`, `user_role` FROM users\";\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }",
"public function getUserInfo() {\n $endpoint = '/users';\n $client = $this->_constructClient($endpoint . '/self');\n try {\n $response = $client->request();\n } catch (Zend_Http_Client_Exception $e) { // timeout or host not accessible\n return;\n }\n\n // error in response\n if ($response->isError()) return;\n\n $result = Zend_Json::decode($response->getBody());\n\n // foursquare returned an error\n if ($result['meta']['code'] != 200) return;\n\n $entry = $result['response']['user'];\n $user = array(\n 'name' => $entry['firstName'] . ' ' . $entry['lastName'],\n 'id' => $entry['id'],\n 'avatar' => $entry['photo']\n );\n return $user;\n }",
"public function get_user_list() {\n\n $sql = \" SELECT userId, concat(firstName, ' ', surname) AS `name`\n FROM time_user\"; \n return $this->db->query( $sql );\n }",
"public static function retrieveAllUsers() {\n return R::getAll('SELECT * FROM user');\n }",
"public function index()\n {\n return $this->users->getAll('first_name', 'asc', ['departments', 'sectors', 'meta']);\n }",
"public function getAllUser(){\n $users = $this->bdd->query('SELECT * FROM users');\n $users->execute();\n\t\treturn $users->fetchALL(\\PDO::FETCH_ASSOC);\n }",
"public function info()\n {\n return $this->query($this->userEndpoint);\n }",
"public function userDetails(){\n\t\t\techo $this->name .\"<br>\";\n\t\t\techo $this->age .\"<br>\";\n\t\t\techo $this->dept .\"<br>\";\n\t\t}",
"public function getUsersList()\n {\n }",
"public function read()\n {\n // show all users\n return User::with('handset')->get();\n }",
"public function users();",
"public function users();",
"public function users();",
"public function users();",
"public function getAllUsers() {\n\n $users = $this->repoProvider->Users()->findAll();\n return MapperHelper::getMapper()->getDTOs($users); // tomorrow first priority. \n }",
"public function getInfosUser()\n\t{\n\t\t$sql = \"SELECT * FROM utilisateur WHERE ut_mail=?\";\n\t\t$res = $this -> executerRequete($sql,array($this->email));\n\t\tif($result = $res->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse return false;\n\t}",
"public function getAllUserData() {\n $conn = $this->getConnection();\n $getQuery = \"SELECT Email, Parcel FROM userdata\";\n $q = $conn->prepare($getQuery);\n $q->execute();\n return $q->fetchAll();\n }"
] | [
"0.81399924",
"0.79606336",
"0.78374976",
"0.7827238",
"0.78079367",
"0.77872777",
"0.7775272",
"0.7751578",
"0.76985025",
"0.76906866",
"0.7601779",
"0.7589388",
"0.7522777",
"0.7465305",
"0.7426594",
"0.7424809",
"0.7402705",
"0.7395036",
"0.738747",
"0.73867804",
"0.73817736",
"0.73811686",
"0.73498756",
"0.7266808",
"0.7261717",
"0.724614",
"0.72273815",
"0.72270364",
"0.72014374",
"0.71997344",
"0.71896285",
"0.71891916",
"0.7186717",
"0.7184216",
"0.717977",
"0.71678257",
"0.71678257",
"0.71669394",
"0.7165511",
"0.7165511",
"0.7165511",
"0.7162765",
"0.71627074",
"0.715954",
"0.71505165",
"0.71417147",
"0.71349937",
"0.7117978",
"0.71161586",
"0.7109487",
"0.7107672",
"0.7099508",
"0.709898",
"0.70955133",
"0.7084008",
"0.70836675",
"0.7081354",
"0.70787436",
"0.70444584",
"0.7039683",
"0.70304924",
"0.70282006",
"0.70144427",
"0.70125",
"0.7010405",
"0.7008515",
"0.7003839",
"0.699978",
"0.6987979",
"0.6985594",
"0.6980711",
"0.697976",
"0.6974562",
"0.6970056",
"0.6960452",
"0.6957596",
"0.6957282",
"0.69543815",
"0.69543815",
"0.69543815",
"0.6938713",
"0.69363004",
"0.69341874",
"0.69312155",
"0.69179904",
"0.6910937",
"0.6908617",
"0.69037616",
"0.68880004",
"0.68864805",
"0.68803215",
"0.686887",
"0.68683046",
"0.6866923",
"0.6866923",
"0.6866923",
"0.6866923",
"0.6865375",
"0.6860339",
"0.6853234"
] | 0.7373256 | 22 |
Get user social id or null if it is not set | public function getUserId()
{
return $this->getUserAttribute(static::ATTRIBUTE_ID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSocialId(): Uuid {\n\t\treturn $this->socialId;\n\t}",
"public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }",
"public function getUserId()\r\n\t{\r\n\t\t$user = parent::getUser();\r\n\t\tif(!($user instanceof User))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $user->getId();\r\n\t}",
"public function id() {\n return isset($this->_adaptee->user_info['user_id']) ? $this->_adaptee->user_info['user_id'] : null;\n }",
"public function get_id_user()\n {\n return (isset($this->_id_user)) ? $this->_id_user : null;\n }",
"public function getUserId() {\n return $this->user === null ? null : $this->user->id;\n }",
"function getMyID()\n{\n $ci =& get_instance();\n $user = $ci->ion_auth->user()->row();\n if(isset($user->id)) {\n return $user->id;\n }else{\n \treturn null;\n }\n}",
"public function getUserId() {\n\t\t\tif ($this->getUser() !== null) {\n\t\t\t\treturn $this->getUser()->getId();\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public function get_user_id();",
"public static function getUserId()\n {\n // sfGuardPlugin detection and guard user id retrieval\n $session = sfContext::getInstance()->getUser();\n if (class_exists('sfGuardSecurityUser') && $session instanceof sfGuardSecurityUser && method_exists($session, 'getGuardUser'))\n {\n $guard_user = $session->getGuardUser();\n if (!is_null($guard_user))\n {\n $guard_user_id = $guard_user->getId();\n if (!is_null($guard_user_id))\n {\n return $guard_user_id;\n }\n }\n }\n\t\treturn null;\n\t}",
"protected function getUserId(): int|string|null\n {\n if (!isset($this->userId)) {\n $this->userId = Auth::guard(config('nova.guard'))->id() ?? null;\n }\n\n return $this->userId;\n }",
"protected function determine_user_id() {\n\t\t$user_id = $this->context->site_user_id;\n\n\t\t/**\n\t\t * Filter: 'wpseo_schema_person_user_id' - Allows filtering of user ID used for person output.\n\t\t *\n\t\t * @api int|bool $user_id The user ID currently determined.\n\t\t */\n\t\treturn apply_filters( 'wpseo_schema_person_user_id', $user_id );\n\t}",
"static public function get_user_id()\n\t{\n\t\tif (isset($_SESSION[self::$cookie_name_prefix .self::USER_ID]))\n\t\t\treturn $_SESSION[self::$cookie_name_prefix .self::USER_ID];\n\t\telse\n\t\t\treturn null;\n\t}",
"public function user_id()\n {\n if($this->logged_in())\n {\n $this->uid = $this->fb->getUser();\n\n return $this->uid;\n } \n else \n {\n return FALSE;\n }\n }",
"public function getUserId()\n {\n if (array_key_exists(\"userId\", $this->_propDict)) {\n return $this->_propDict[\"userId\"];\n } else {\n return null;\n }\n }",
"public function getUserId(): ?int;",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserId() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USER_ID])) {\n return $_SESSION[self::SESSION_FIELD_USER_ID];\n } else {\n return null;\n }\n }",
"function user_id () {\r\n\t$info = user_info();\r\n\treturn (isset($info[0]) ? $info[0] : 0);\r\n}",
"public function getUserExternalId(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_USER_EXTERNAL_ID);\n }",
"public function user_id()\n\t{\n\t\tif ($this->logged_in())\n\t\t{\n\t\t\treturn $this->_facebook->getUser();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->login_url();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public static function getUserId() {\n if(self::$_identity) {\n return self::$_identity->userid;\n }\n return null;\n }",
"public function getUserId(): ?string;",
"public function getUserID($context)\n {\n if(isset($context['user'])) {\n return $context['user']->id;\n }\n if(isset($context['user_id'])) {\n return $context['user_id'];\n }\n if(isset($GLOBALS['current_user'])) {\n return $GLOBALS['current_user']->id;\n }\n return null;\n }",
"public static function getUserId(): ?string\n {\n if (Self::checkIsLogged()) {\n if (!isset($auth)) {\n $auth = new Auth(DbManager::openDB(), null, null, false);\n }\n return $auth->getUserId();\n } else {\n return null;\n }\n\n }",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }",
"public function getUserId(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_USER_ID);\n }",
"public function getUserId()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $userId = $CI->session->userdata('user_id');\n return $userId;\n }\n }",
"protected static function getCurrentUserId()\n {\n return null;\n }",
"public function getUserId(): ?int\n {\n return $this->userId;\n }",
"protected function getUserIdAttribute(): ?string\n {\n if (isset($this->attributes['user_id'])) {\n return $this->attributes['user_id'];\n }\n\n if (isset($this->attributes['user']->id)) {\n return $this->attributes['user']->id;\n }\n\n return null;\n }",
"public function getUserId()\r\r\n {\r\r\n return $this->signedRequest ? $this->signedRequest->getUserId() : null;\r\r\n }",
"public static function get_user_id(){\n return isset(\\Yii::$app->user->id)?\\Yii::$app->user->id:'';\n }",
"function getUserID()\n{ \n return ($user = Auth::user())?$user->id : null;\n}",
"function userSocial($social){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT $social FROM employes WHERE iduser=\".$this->userInfo('id'));\r\n\t\t\ttry{\r\n\t\t\t\t$req->execute();\r\n\t\t\t\t$data = $req->fetch();\r\n\r\n\t\t\t\tif(isset($data->$social)){\r\n\t\t\t\t\treturn $data->$social;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\treturn \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (PDOException $e){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t}",
"private function get_identity( $user = null ) {\n\n\t\t// WP_User or user_id\n\t\tif ( isset ( $user ) ) {\n\n\t\t\t// instantiate new user if not WP_User object\n\t\t\tif ( ! is_object( $user ) ) {\n\t\t\t\t$user = new WP_User( $user );\n\t\t\t}\n\n\t\t\treturn ( $this->identity_pref == 'email' ? $user->user_email : $user->user_login );\n\t\t}\n\n\t\t// user is logged in\n\t\tif ( is_user_logged_in() ) {\n\n\t\t\t$user = get_user_by( 'id', get_current_user_id() );\n\t\t\treturn ( $this->identity_pref == 'email' ? $user->user_email : $user->user_login );\n\n\t\t} else {\n\n\t\t\t//nothing to identify on\n\t\t\treturn 'null';\n\t\t}\n\t}",
"public function getUserId() {\n $response = $this->execute(array('method' => 'flickr.auth.checkToken'), 60);\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['auth']['user']['nsid'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n }",
"public function get_user_id()\n {\n return self::getUser();\n }",
"public function id()\n {\n if ($this->user()) {\n return $this->user()->getAuthIdentifier();\n }\n return null;\n }",
"public function getUid()\n {\n if (true === is_array($this->auth) && true === isset($this->auth[1])) {\n return $this->auth[1];\n }\n\n return null;\n }",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"private function getGlobalProfileId()\n {\n $identity = $this->getIdentity();\n \n return $identity !== null && $identity->getGlobalProfile() ? $identity->getGlobalProfile()->profile_id : null;\n }",
"public static function GetUserID()\n\t{\n\t\treturn self::GetFB()->getUser();\n\t}",
"private function getUserIdGivenSocialId($socialNetwork, $socialNetworkId) {\n\t\tif(! in_array($socialNetwork, $this->allowableSocialAuths))\n\t\t\treturn false;\n\t\t$user_id = User::where($socialNetwork . '_id', '=', $socialNetworkId)->first();\n\t\tif($user_id)\n\t\t\treturn $user_id;\n\t\treturn false;\n\t}",
"private function getProfileId()\n {\n $identity = $this->getIdentity();\n \n return $identity !== null && $identity->getCurrentProfile() ? $identity->getCurrentProfile()->profile_id : null;\n }",
"function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }",
"public function loadUserBySocialId($socialId);",
"public function getUserID () {\n return $this->id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->idTokenClaims[$this->userIdKey] ?? null;\n }",
"public static function resolveId()\n {\n return Auth::check() ? Auth::user()->getAuthIdentifier() : null;\n }",
"public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"protected static function getUserID()\r\n {\r\n $userID = \\CAT\\Helper\\Validate::sanitizePost('user_id','numeric');\r\n\r\n if(!$userID)\r\n $userID = \\CAT\\Helper\\Validate::sanitizeGet('user_id','numeric');\r\n\r\n if(!$userID)\r\n $userID = self::router()->getParam(-1);\r\n\r\n if(!$userID || !is_numeric($userID) || !\\CAT\\Helper\\Users::exists($userID))\r\n Base::printFatalError('Invalid data')\r\n . (self::$debug ? '(\\CAT\\Backend\\Users::getUserID())' : '');;\r\n\r\n return $userID;\r\n }",
"public static function getCurrentUserId(){\n $user_data = parent::getSession('curent_user');\n $_get_id_user = isset($_GET['id_user']) ? $_GET['id_user'] : null;\n $_post_id_user = isset($_POST['id_user']) ? $_POST['id_user'] : null;\n return\n self::is_SuperUserSession()\n ? ($_post_id_user ? $_post_id_user : ( $_get_id_user ? $_get_id_user : $user_data['id_user'] ))\n : parent::getSession('id_user');\n }",
"public static function resolveId()\n {\n return auth()->check() ? auth()->user()->getAuthIdentifier() : null;\n }",
"static public function getUserId(){\n if (!isset($_SESSION['id']) || empty($_SESSION['id']) ){\n return false;\n } else {\n return $_SESSION['id'];\n }\n }",
"public function getUserNumber(): ?int {\n return $this->userNumber;\n }",
"public function getFbUserId()\n {\n if ($this->getConfig()->getConfigParam(\"bl_showFbConnect\")) {\n $oFb = oxRegistry::get(\"oxFb\");\n\n return $oFb->getUser();\n }\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"private function getUserCompanyId(){\n $id = NULL;\n\n if(isset($this->user_id) && !empty($this->user_id)){\n $query = $this->companies->get_company_id($this->user_id);\n if(!is_null($query)){\n $id = $query->id;\n }\n }\n return $id;\n }",
"public function getUserId(): ?string\n {\n }",
"public function getUserId(){\n \n if ($user = JWTAuth::parseToken()->authenticate()) {\n $userId = $user->id;\n return $userId;\n }\n }",
"function get_current_user_id()\n {\n }",
"function getUserid(){\n\t\terror_reporting(0);\n\t\tif(!isset($_COOKIE['fbsr_123059651225050'])){\n\t\t\tthrow new Exception('Invalid player');\n\t\t} \n\t\t$data = parse_signed_request($_COOKIE['fbsr_123059651225050']);\n\t\tif($data[\"user_id\"] == null){\n\t\t\tthrow new Exception('Invalid Cookie');\n\t\t}\n\t\treturn $data[\"user_id\"];\n\t}",
"public function GetId() {\n\t\t\n\t\t$user = self::GetUserProfile();\n\t\treturn $user['id'];\n\t}",
"public function get_id_user()\n\t{\n\t\treturn $this->id_user;\n\t}",
"public static function getLoggedInUserId(): ?int\n {\n // Check whether user is logged in\n if (!self::loggedIn()) {\n return null;\n }\n // If loggedIn return ID\n return self::getUser()->id;\n }",
"public function getDrupalUserId($provider_user_id);",
"public static function resolveId()\n\t{\n\t\treturn auth()->guard('api')->check() ? auth()->guard('api')->user()->getAuthIdentifier() : null;\n\t}",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"function get_user_id() {\n\tif (!empty($_SESSION['user_id'])) {\n\t\treturn (int) $_SESSION['user_id'];\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"private function getUserId()\n {\n $company = $this->getCompany();\n\n if (!isset($company['user']['id'])) {\n throw new BiglionException('User \"id\" not defined', 1);\n }\n\n return $company['user']['id'];\n }",
"public function getSystemUserId()\n {\n $systemUser = $this->getSystemUser();\n\n if (is_null($systemUser)) {\n return $systemUser;\n }\n\n try {\n if (is_array($systemUser)) {\n if (isset($systemUser['id'])) {\n return $systemUser['id'];\n }\n }\n\n throw new \\Exception('No `id` found for the authenticated system user.');\n } catch (\\Exception $e) {\n $this->reportException($e);\n }\n\n return null;\n }",
"function get_user_id_by_provider_uid($h, $provider_uid ){\n \n $sql = \"SELECT user_id FROM \" . TABLE_USERS . \" WHERE user_hybridauth_id =%s \";\n $query = $h->db->prepare($sql, $provider_uid);\n \n\treturn $userId = $h->db->get_var($query);; \n }",
"public function getUserid()\n {\n if ($this->_userid === false) {\n $this->_userid = Userlogin::find()->where(['id' => Yii::$app->user->identity->id])->one();\n }\n return $this->_userid;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getId_user()\n {\n return $this->id_user;\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public function identity()\r\n {\r\n\t\t$storage = $this->get_storage();\r\n\r\n if ($storage->is_empty()) {\r\n return null;\r\n }\r\n if( is_null(self::$login_user) ){\r\n $u = $storage->read();\r\n\t\t\tself::$login_user = Model_User::instance()->user($u['uid']);\r\n \r\n global $VIEW_AUTH_USERID;\r\n $VIEW_AUTH_USERID = idtourl(self::$login_user['uid']);\r\n }\r\n return self::$login_user; \r\n }",
"public function check_user_social(){\n\t\t\treturn $this->dao->check_user_social($this->db, $_POST['iduser']);\n\t\t}",
"function getRHUL_UserID() {\n\n\tglobal $RHUL_Non_Stu_ID;\n\n\n\tif ( is_user_logged_in() ) {\n\n\t\tglobal $wpdb;\n\t\t$wp_user = strtoupper(wp_get_current_user()->user_login); // Get currently logged-in Wordpress user\n\n\t\t$sql = \"SELECT meta_value FROM cswp_usermeta WHERE meta_key = 'adi_studentno' AND user_id = \"\n\t\t\t. \"(SELECT user_id FROM cswp_usermeta WHERE meta_key = 'adi_samaccountname' AND meta_value = '\" . $wp_user . \"');\";\n\n\t\t$results = $wpdb->get_results($sql);\n\n\n\t\t// In case the \"adi_studentno\" key does not exist (i.e. a staff member)\n\t\t// returns -1 for this!\n\n\t\tif (!$results) { return $RHUL_Non_Stu_ID; };\n\n\t\ttry {\n\t\t\treturn $results[0]->meta_value;\n\n\t\t} catch (Exception $e)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\n\n\n\n\n\t} else {\n\t\treturn -1;\n\t}\n}",
"public function getUserID() {\n\t\treturn $this->_user_id;\n\t}",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserIdFromAPI() {\n $facebook = $this->facebookService->getFacebook();\n $userId = $facebook->getUser();\n\n if ($userId) {\n try {\n // Proceed knowing you have a logged in user who's authenticated.\n $user_profile = $facebook->api('/me');\n } catch (FacebookApiException $e) {\n error_log($e);\n $userId = null;\n }\n }\n return $userId;\n }",
"public function get_user_id() {\n\t\treturn $this->user_id;\n\t}",
"public function getOppoUserid()\n {\n return $this->get(self::_OPPO_USERID);\n }",
"public static function getUserId($user = null)\n {\n $db = Database::getInstance();\n\n if(empty($user)) {\n $app = \\Slim\\Slim::getInstance();\n $req = $app->request();\n $user = $app->currentUser;\n }\n\n $sql = \"SELECT user_id FROM users\n WHERE user_name = :user_name LIMIT 1\";\n\n $tkn = $db->prepare($sql);\n $tkn->execute(array(':user_name' => $user));\n $result = $tkn->fetch();\n\n if($result !== false) {\n return $result->user_id;\n }\n return false;\n }"
] | [
"0.73893046",
"0.7262947",
"0.70886433",
"0.70082384",
"0.69774115",
"0.69473016",
"0.6913323",
"0.6885049",
"0.6857952",
"0.6850451",
"0.684587",
"0.6838322",
"0.6746954",
"0.6733413",
"0.67274886",
"0.6726086",
"0.671502",
"0.67052805",
"0.6704902",
"0.6682006",
"0.66754127",
"0.6659563",
"0.6653493",
"0.6612304",
"0.6603716",
"0.659494",
"0.6564288",
"0.6556459",
"0.6553747",
"0.6549707",
"0.6533011",
"0.653286",
"0.6528602",
"0.6483004",
"0.6455539",
"0.6445373",
"0.6444679",
"0.63952255",
"0.6394865",
"0.63887626",
"0.6373406",
"0.6369085",
"0.6368162",
"0.6350055",
"0.63446504",
"0.6318258",
"0.63164055",
"0.63152546",
"0.63146645",
"0.63128704",
"0.631178",
"0.631178",
"0.6310012",
"0.6305495",
"0.6299322",
"0.62919116",
"0.6282346",
"0.6280694",
"0.6275398",
"0.6275037",
"0.6272228",
"0.6268051",
"0.62666595",
"0.6259284",
"0.62553096",
"0.6254417",
"0.62539494",
"0.6235942",
"0.62305135",
"0.62227845",
"0.6221479",
"0.62208277",
"0.62005025",
"0.61833984",
"0.6179075",
"0.6177859",
"0.61746144",
"0.6172278",
"0.6164217",
"0.61623114",
"0.61623114",
"0.61623114",
"0.61623114",
"0.6160093",
"0.615863",
"0.6157704",
"0.6150765",
"0.61444193",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61353093",
"0.61306745",
"0.6128385",
"0.6122318",
"0.6120393"
] | 0.0 | -1 |
Get user email or null if it is not set | public function getUserEmail()
{
return $this->getUserAttribute(static::ATTRIBUTE_EMAIL);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEmail() {\r\n\t\t\t$email = null;\r\n\t\t\tif( $user != null ) {\r\n\t\t\t\t$email = $user->getEmail();\r\n\t\t\t}\r\n\t\t\treturn $email;\r\n\t\t}",
"public function getEmail()\n {\n // Look for value only if not already set\n if (!isset($this->email)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->email = $user['email'];\n }\n return $this->email;\n }",
"public function userEmail($value = null)\n\t{\n\t\tif ($value != null)\n\t\t{\n\t\t\t$this->_userEmail = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_userEmail;\n\t\t}\n\t}",
"protected function getUserEmail()\r\n {\r\n // TODO: this should probably be offloaded\r\n if (isset($_SESSION['user']['useremail'])) {\r\n return $_SESSION['user']['useremail'];\r\n }\r\n }",
"public function getuserEmail()\n {\n return $this->userEmail;\n }",
"public function get_email()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->user[static::_column('email')];\n\t}",
"public function getEmail()\n {\n return isset($this->user['email']) ? $this->user['email'] : $this->user['id'].'@mail.com';\n }",
"public function getUserEmail () {\n\t\treturn ($this->userEmail);\n\t}",
"public function getUserEmail() {\n\t\treturn ($this->userEmail);\n\t}",
"public function getUserEmail()\n {\n return $this->user_email;\n }",
"public function getUserEmail()\n {\n return $this->user_email;\n }",
"public function getUserProfileEmail(): ?string {\n\t\treturn ($this->userProfileEmail);\n\t}",
"public function getUserEmail() {\n\t\treturn $this->userEmail;\n\t}",
"public function getUserEmail() {\n\t\treturn $this->userEmail;\n\t}",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->email;\n }",
"public function getEmail(): ?string\n {\n return $this->data->email;\n }",
"public function getEmail_user()\r\n {\r\n return $this->email_user;\r\n }",
"public function getEmail(): ?string\n {\n return $this->_email;\n }",
"public function getEmail(): ?string {\n return $this->_email;\n }",
"public function getEmail()\n {\n if (array_key_exists(\"email\", $this->_propDict)) {\n return $this->_propDict[\"email\"];\n } else {\n return null;\n }\n }",
"public static function getEmail(): ?string\n {\n if (Self::checkIsLogged()) {\n if (!isset($auth)) {\n $auth = new Auth(DbManager::openDB(), null, null, false);\n }\n\n return $auth->getEmail();\n } else {\n return null;\n }\n }",
"public function getEmail() {\n return $this->get('email', 'user');\n }",
"public function getEmail()\n {\n return $this->attributes['email'] ?? null;\n }",
"public static function getEmail() {\n return $_SESSION['user']['email'];\n }",
"public function getEmail() {\n\t\treturn $this->response['email'] ?: NULL;\n\t}",
"public function getEmail() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_EMAIL])) {\n return $_SESSION[self::SESSION_FIELD_EMAIL];\n } else {\n return null;\n }\n }",
"public function getEmail(): ?string;",
"public function getEmail(): ?string;",
"public function getEmail(): ?string;",
"public function getEmail(): ?string\n {\n return (string) $this->email;\n }",
"public function get_user_email($id) {\n $users = TableRegistry::get('Administrator.Users');\n\n if(isset($id) && !empty($id)) {\n $user = $users->get($id);\n if(!empty($user->email)) {\n return $user->email;\n } else {\n return NULL;\n }\n } else {\n return NULL;\n }\n\n }",
"public function getEmailForUserUpdate(): ?string\n {\n return $this->get(\"email\");\n }",
"public function getEmail() {}",
"public function getEmail() {}",
"public function getEmail() {}",
"public function getEmail() {}",
"public function getEmail() {}",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmail();",
"public function getEmailAddress()\n {\n return $this->_getVar('user_email');\n }",
"public function get_email() {\r\n return $this->email;\r\n }",
"public static function RetornarEmail() : ?string\n {\n if (self::$obj_entidade instanceof OBJ_Entidade) {\n return self::$obj_entidade->get_usuario()->get_email();\n } else {\n return null;\n }\n }",
"function get_user_email(){\n\t$current_user = wp_get_current_user();\n\t$user_info = get_userdata($current_user->ID);\n\treturn $current_user->user_email;\n}",
"public function get_email() \n {\n return $this->email;\n }",
"public function getEmail() {\n\t\tif (!$this->_email) {\n\t\t\tthrow new System_Exception('User email is not set');\n\t\t}\n\t\treturn $this->_email;\n\t}",
"public function getEmail() {\n return $this->getValue('email');\n }",
"public function getEmail()\r\n {\r\n return $this->email;\r\n }",
"public function getEmail()\n {\n \treturn $this->email;\n }",
"public function getEmail() { return $this->email; }",
"public function getEmail()\r\n {\r\n return $this->email;\r\n }",
"public function getEmail()\r\n {\r\n return $this->email;\r\n }",
"public function getEmail()\n {\n return $this->get(self::EMAIL);\n }",
"public function getEmail() {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }",
"public function getEmail()\n {\n return $this->email;\n }"
] | [
"0.8397961",
"0.82463115",
"0.81660837",
"0.8137748",
"0.8045918",
"0.80221957",
"0.80181164",
"0.80104977",
"0.8009183",
"0.8008261",
"0.8008261",
"0.80042744",
"0.7983284",
"0.7983284",
"0.79805696",
"0.79805696",
"0.79805696",
"0.79805696",
"0.79805696",
"0.79805696",
"0.79805696",
"0.79805696",
"0.7922026",
"0.7903141",
"0.78485715",
"0.783807",
"0.7831133",
"0.77364707",
"0.7729403",
"0.7717648",
"0.76948285",
"0.76791686",
"0.76692164",
"0.76614237",
"0.76614237",
"0.76614237",
"0.7627356",
"0.7552634",
"0.75068974",
"0.74721396",
"0.74721396",
"0.74721396",
"0.7471911",
"0.7471911",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.74102813",
"0.740152",
"0.7391969",
"0.7380281",
"0.73413426",
"0.7326374",
"0.7301025",
"0.7293556",
"0.7282423",
"0.7279299",
"0.72765565",
"0.72668695",
"0.72668695",
"0.7240309",
"0.72377074",
"0.72347456",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584",
"0.72274584"
] | 0.7621591 | 37 |
Get user name or null if it is not set | public function getUserName()
{
return $this->getUserAttribute(static::ATTRIBUTE_NAME);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserName()\n {\n if (array_key_exists(\"userName\", $this->_propDict)) {\n return $this->_propDict[\"userName\"];\n } else {\n return null;\n }\n }",
"function get_user_name()\n {\n return isset($_SESSION['username']) ? $_SESSION['username'] : null;\n }",
"public static function getUsername(): ?string\n {\n return self::getOption('username');\n }",
"function get_user_name() {\n\treturn isset($_SESSION['username']) ? $_SESSION['username'] : null;\n}",
"public function getUserName() {\n\t\tif(($username=$this->getState('__username'))!==null) return $username;\n\t\telse return NULL;\n\t}",
"function get_user_name() {\n return $this->call('get_user_name', array(), TRUE);\n }",
"function user_name () {\r\n\t$info = user_info();\r\n\treturn (isset($info[1]) ? $info[1] : 'default');\r\n}",
"public function getUsername(): ?string\n {\n return $this->username;\n }",
"public function getUsername(): ?string\n {\n return $this->username;\n }",
"public function getUsername(): ?string\n {\n return $this->username;\n }",
"public function getUserUsername(): ?string\n {\n return $this->getClaimSafe(SSODataClaimsInterface::CLAIM_USER_USERNAME);\n }",
"public function getNameOrUsername() {\n return $this->getName() ?: $this->username;\n }",
"public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }",
"public function getUser(): ?string\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\\sprintf(\n __METHOD__ . \" get '%s'\",\n $this->user === null\n ? \"null\"\n : $this->user\n ));\n return $this->user;\n }",
"public function getNameOrUsername() {\n return $this->getName() ? : $this->username;\n }",
"public function getUsername() : ?string ;",
"function get_name() {\n if(is_valid_user()) {\n return $_SESSION['username'];\n } else {\n return null;\n }\n}",
"public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }",
"public static function getUsername(): ?string\n {\n if (Self::checkIsLogged()) {\n if (!isset($auth)) {\n $auth = new Auth(DbManager::openDB(), null, null, false);\n }\n return $auth->getUsername();\n } else {\n return null;\n }\n }",
"function get_user_name(){\n return isset($_SESSION['username']) ? $_SESSION['username'] : null;\n}",
"public function getUserName()\n {\n return $this->user_name;\n }",
"public function username() : ?string\n {\n return (isset($this->data['identity'])) ? $this->data['identity'] : null;\n }",
"public function getDefaultUsername() : ?string;",
"public function getUsername():? string;",
"public function getUsername(): ?string\n {\n // return (string) $this->email;\n return $this->username;\n }",
"static public function get_username()\n\t{\n\t\tif (isset($_SESSION[self::$cookie_name_prefix .self::USERNAME]))\n\t\t\treturn $_SESSION[self::$cookie_name_prefix .self::USERNAME];\n\t\telse\n\t\t\treturn null;\n\t}",
"public function getUsername() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USERNAME])) {\n return $_SESSION[self::SESSION_FIELD_USERNAME];\n } else {\n return null;\n }\n }",
"public function getUserName()\n {\n return $this->user->name;\n }",
"public function getuserName()\n {\n return $this->userName;\n }",
"public function getUserName() {\n\t\treturn ($this->userName);\n\t}",
"public function getUsername() {\n\t\treturn $this->response['username'] ?: NULL;\n\t}",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUserName() {}",
"function getUserName() {\n\t\treturn $this->nickname;\n\t\t/*\n\t\tif(!$this->user_name) {\n\t\t\t$this->sql(\"SELECT nickname FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_name = $this->getQueryResult(0, \"nickname\");\n \t\t}\n\t\treturn $this->user_name;\n\t\t*/\n\t}",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public static function getUserName()\n {\n $user = static::get();\n if (isset($user->noPessoa)) {\n return $user->noPessoa;\n }\n }",
"public function getUsername() {}",
"public function getUsername()\n {\n if (! isset($this->basicAuth[\"username\"]))\n return null;\n\n return $this->basicAuth[\"username\"];\n }",
"public function getName()\n {\n // Look for value only if not already set\n if (!isset($this->name)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->name = $user['name'];\n }\n return $this->name;\n }",
"public function username ( $name = null ) {\n\t\t\treturn $this->user_name( $name );\n\t\t}",
"public function getUserName() {\n return $this->userName;\n }",
"public function getUserName() {\r\n return $this->userName;\r\n }",
"public function getUserName() {\n return $this->userName;\n }",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername()\n {\n return empty($this->username) ? 'anonymous' : $this->username;\n }",
"final public function getUserName():string \n {\n return $this->userState->getUserName();\n }",
"public function getUserName() {\n\t\treturn $this->userName;\n\t}",
"public function getUserName() {\n\t\treturn $this->userName;\n\t}",
"function getUserName()\r\n\t{\r\n\t\treturn $this->UserName;\r\n\t}",
"public function getUserName()\r\n {\r\n return $this->user->username;\r\n }",
"Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}",
"public function getUserName();",
"public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}",
"public function getUserName()\n {\n return $this->getName();\n }",
"public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }",
"public function getUserName()\n {\n return $this->formattedData['username'];\n }",
"public function getUserName() {\n if (isset($this->rUser)) {\n return $this->rUser->getFullName();\n }\n return '';\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"function getUsername()\n\t{\n\t\treturn $this->Info['Username'];\n\t}",
"public function getUsername() {\n return $this->getConfig('username', $this->defaults['username']);\n }",
"public function getUserUsername () {\n\t\treturn ($this->userUsername);\n\t}",
"public static function getUser(): ?string {\r\n return $_SERVER['PHP_AUTH_USER'] ?? null;\r\n }",
"public static function getNameIdentification() {\n global $advancedCustomUser;\n if (self::isLogged()) {\n if (!empty(self::getName()) && empty($advancedCustomUser->doNotIndentifyByName)) {\n return self::getName();\n }\n if (!empty(self::getMail()) && empty($advancedCustomUser->doNotIndentifyByEmail)) {\n return self::getMail();\n }\n if (!empty(self::getUserName()) && empty($advancedCustomUser->doNotIndentifyByUserName)) {\n return self::getUserName();\n }\n if (!empty(self::getUserChannelName())) {\n return self::getUserChannelName();\n }\n }\n return __(\"Unknown User\");\n }",
"public function fullName(): ?string {\n if (null === $this->user) {\n return null;\n }\n $user = $this->user;\n\n return $user->first_name.' '.$user->last_name;\n }",
"public function get_user_name() { \n\n\t\tif ($this->user == '-1') { return _('All'); } \n\t\t\n\t\t$user = new User($this->user);\n\t\treturn $user->fullname . \" (\" . $user->username . \")\";\n\t\t\n\t}",
"public function loginUsername()\n {\n return property_exists($this, 'username') ? $this->username : 'email';\n }",
"function user_name($user = false)\n{\n $user = $user ? $user : $GLOBALS['user'];\n\n // first check if the name is in the DB\n if ($info = user_info($user))\n return $info['name'];\n\n //no, it isn't. fetch it from the master server\n return master_user_name($user);\n}",
"public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }",
"public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }",
"public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }",
"public function getUsername() {\n return $this->getValue('username');\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername()\n {\n return $this->getName();\n }",
"public function getUsername() {\n if (isset($_REQUEST['username']))\n return $_REQUEST['username'];\n else\n return false;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getExternalUserName();",
"public function getUsername()\n\t{\n\t\treturn $this->{config('auth.username.field')};\n\t}",
"public function getUsername()\n {\n return $this->getLogin();\n }",
"public function getUsername() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[0];\n }",
"public function getCurrentUserName()\n {\n $currentUserName = '';\n try {\n $loggedInUser = $this->getLoggedInUser();\n if ($loggedInUser) {\n $currentUserName = $loggedInUser['name'];\n }\n } catch (FamilyGraphException $ex) {\n // ignore error\n }\n \n return $currentUserName;\n }",
"function getUserName()\n {\n if($this->isLogin())\n {\n $personId =$this->ci->session->userdata('personId');\n return $this->ci->Util_model->getUserName($personId);\n }\n else\n {\n return false;\n } \n }",
"function GetUsername ()\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n return $this->username;\n }",
"public function name(): string {\n return (string) $this->user?->first_name;\n }",
"public function getUsername() {\n // TODO: Implement getUsername() method.\n return $this->getLogin();\n }",
"private function getUsername()\n {\n return $this->_username;\n }",
"function getUsername() {\n //return $REMOTE_USER\n //DOES NOT CHECK IF IT'S A VALID USERNAME\n global $PHP_AUTH_USER;\n global $loginName;\n global $serverScriptHelper;\n global $isMonterey;\n if ((!$isMonterey) && $serverScriptHelper->hasCCE()) {\n return $loginName;\n } else {\n return $PHP_AUTH_USER;\n }\n}",
"public function getRequestUserName() {\n if(isset($_POST[self::$name])){\n return trim($_POST[self::$name]);\n }\n\t}",
"public function GetUserName ();",
"public static function user()\n {\n if (isset($_SESSION['LOGGED_IN_USER'])){\n return $username;\n }\n }"
] | [
"0.83176637",
"0.8163982",
"0.81516105",
"0.8139892",
"0.80432045",
"0.79979205",
"0.79851705",
"0.7879795",
"0.7879795",
"0.7879795",
"0.78723836",
"0.7862283",
"0.7861708",
"0.786052",
"0.78291756",
"0.7795948",
"0.77762973",
"0.7747659",
"0.7697129",
"0.76923704",
"0.7683476",
"0.7673535",
"0.7629549",
"0.759308",
"0.7591261",
"0.75761336",
"0.75684977",
"0.7543271",
"0.75220174",
"0.75212073",
"0.7521104",
"0.75196135",
"0.75196135",
"0.7517306",
"0.7504585",
"0.7491412",
"0.7491412",
"0.74875414",
"0.74842405",
"0.7478329",
"0.74771065",
"0.7463923",
"0.7459934",
"0.7447692",
"0.7430238",
"0.7429522",
"0.7429522",
"0.7429522",
"0.7429522",
"0.7429522",
"0.7421654",
"0.7410228",
"0.74101526",
"0.74101526",
"0.74095315",
"0.74033725",
"0.7399897",
"0.73878926",
"0.73729813",
"0.73670954",
"0.7361292",
"0.7356963",
"0.73481643",
"0.7329045",
"0.729476",
"0.7291021",
"0.7290837",
"0.7278125",
"0.72777605",
"0.72650445",
"0.7255895",
"0.72529536",
"0.72498834",
"0.72327745",
"0.72327745",
"0.72327745",
"0.7202334",
"0.71979403",
"0.71979403",
"0.71979403",
"0.71979403",
"0.71912986",
"0.7187924",
"0.7185402",
"0.7185402",
"0.7185402",
"0.718051",
"0.71740437",
"0.7173335",
"0.7162617",
"0.71605986",
"0.71589303",
"0.7156152",
"0.71378094",
"0.7137077",
"0.7133428",
"0.7129672",
"0.7120099",
"0.7102804",
"0.71023834"
] | 0.7345937 | 63 |
Get user social page url or null if it is not set | public function getUserPageUrl()
{
return $this->getUserAttribute(static::ATTRIBUTE_PAGE_URL);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSocialPage()\n {\n $result = null;\n if (isset($this->userInfo['screen_name'])) {\n $result = 'http://vk.com/' . $this->userInfo['screen_name'];\n }\n return $result;\n }",
"public function getSocialUrl(): string {\n\t\treturn ($this->socialUrl);\n\t}",
"public function link() {\n return isset($this->_adaptee->user_info['user_username']) ? \"profile.php?user=\".$this->_adaptee->user_info['user_username'] : null;\n }",
"protected function url_social_site( $social_site, $user_id = false ) {\n\t\t$url = get_the_author_meta( $social_site, $user_id );\n\n\t\tif ( ! empty( $url ) ) {\n\t\t\tswitch ( $social_site ) {\n\t\t\t\tcase 'twitter':\n\t\t\t\t\t$url = 'https://twitter.com/' . $url;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $url;\n\t}",
"function souvvi_get_author_url(){\n\n if(!get_the_author_meta('user_url')){\n return get_author_posts_url(get_the_author_meta('ID'));\n };\n return get_the_author_meta('user_url', get_the_author_meta('ID') );\n\n }",
"public function getUrl(): ?string\n {\n if ($this->page_id || $this->page) {\n $oPage = $this->page();\n }\n\n return $oPage->published->url ?? $this->url;\n }",
"public function getUrl() {\n return $this->getProfileUri();\n }",
"public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}",
"public function getFacebookUrl()\n {\n return $this->facebook_url;\n }",
"public function getPageUrl()\n {\n if ($this->hasData(static::REGISTRATION_URL)) {\n return $this->getData(static::REGISTRATION_URL);\n } elseif ($this->hasData(static::CONFIGURATION_URI)) {\n return $this->getData(static::CONFIGURATION_URI);\n } elseif ($this->hasData(static::REGISTRATION_URI)) {\n return $this->getData(static::REGISTRATION_URI);\n }\n\n return '';\n }",
"public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }",
"public function getUserWebsite(){\n return($this->userWebsite);\n }",
"public function getUrl(){\r\n\t\t\r\n\t\tif ($this->url != '')\t\r\n\t\t\treturn Yii::app()->baseUrl.'/'.$this->url;\r\n\t\treturn Yii::app()->createUrl('user/profile/perfil',array('id'=>$this->user_id));\t\t\r\n\t}",
"public function getURL($pagenum = null)\n {\n $app = App::getInstance();\n\n $output = $app->getOption('base_url') . 'user/'.$this->getUser().'/';\n if ($pagenum != null) {\n $output .= $pagenum.'/';\n }\n return $output;\n }",
"function nsh_social() {\n\n\t$social = nsh_get_social();\n\n\tif ( $social ) {\n\t\techo $social;\n\t}\n\n}",
"public function getFrontPageUrl();",
"public function url() {\n\n if(isset($this->cache['url'])) return $this->cache['url'];\n\n // Kirby is trying to remove the home folder name from the url\n if($this->isHomePage()) {\n // return the base url\n return $this->cache['url'] = $this->site->url();\n } else if($this->parent->isHomePage()) {\n return $this->cache['url'] = $this->site->url() . '/' . $this->parent->uid . '/' . $this->uid;\n } else {\n $purl = $this->parent->url();\n return $this->cache['url'] = $purl == '/' ? '/' . $this->uid : $this->parent->url() . '/' . $this->uid;\n }\n\n }",
"public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}",
"public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}",
"public function getFacebook(): ?string;",
"public function AvatarURL() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['avatar150'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"function getAvatarUrl($fbUserId, $nullForDefault = true, $params = null)\n {\n return null;\n }",
"public function facebookRedirect(){\n $github_user = Socialite::driver('facebook')->redirect();\n }",
"function get_user_profile_image_url($user_id){\n\t$image_url = THEME_URI.'/images/profile_placeholder.png';\n\tif($image_relative_path = get_user_meta($user_id, 'profile_image_url', true))\n\t{\n\t\t$image_url = $image_relative_path;\n\t}\n\treturn $image_url;\n}",
"protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }",
"function getURL($theTweet) {\n\n\t\t\t$url_location = $theTweet['entities']['urls'][0];\n\t\t\t$media_location = $theTweet['entities']['media'][0];\n\n\t\t\tif (!(empty($url_location))) {\n\n\t\t\t\treturn $url_location['expanded_url'];\n\n\t\t\t} else if (!(empty($media_location))) {\n\n\t\t\t\treturn $media_location['media_url'];\n\n\t\t\t} else {\n\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t}",
"public static function getReferrerURL() {\n $page = self::getParam(Login::$_referrer);\n return !empty($page) ? \"?page={$page}\" : null;\n }",
"public function getSocialUrls()\n {\n return $this->social_urls;\n }",
"public function getLinkedIn(): ?string;",
"public function url() {\n\t\tif ( ! isset( $this->url ) ) {\n\t\t\t$url = add_query_arg( 'page', $this->page_slug, 'sites.php' );\n\t\t\t$this->url = network_admin_url( $url );\n\t\t}\n\n\t\treturn $this->url;\n\t}",
"public function userSite($value = null)\n\t{\n\t\tif ($value != null)\n\t\t{\n\t\t\t$this->_userSite = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_userSite;\n\t\t}\n\t}",
"static function get_social_link( $network ) {\n\t\t$networks = get_field( 'social_networks', 'option' );\n\n\t\tforeach ( $networks as $n ) {\n\t\t\tif ( $n['network'] == $network ) {\n\t\t\t\treturn $n['url'];\n\t\t\t}\n\t\t}\n\t}",
"function profileUrl()\r\n {\r\n return \"/user/show/{$this->id}\";\r\n }",
"function get_profile_home_url()\r\n {\r\n return $this->get_url(array(self :: PARAM_ACTION => self :: ACTION_BROWSE_PROFILES));\r\n }",
"public function getSiteURL()\r\n {\r\n return $this->siteURL;\r\n }",
"public function getCallbackUrl(): ?string\n {\n return $this->callback_url;\n }",
"function p4_px_single_post_site_url() {\n\tif ( is_multisite() ) {\n\t\treturn network_home_url();\n\t} else {\n\t\treturn get_bloginfo_rss( 'url' );\n\t}\n}",
"function pfk_login_url() { echo bloginfo('url'); }",
"public function getSocialAuthCallback($provider=null)\n {\n if ($user = Socialite::with($provider)->user()) {\n $authUser = $this->findOrCreateUser($user);\n\n if (!empty($authUser)) {\n Auth::login($authUser, true);\n }\n\n if (session()->has('last_page')) {\n return redirect(session()->pull('last_page'));\n } else {\n return redirect($this->redirectTo);\n }\n\n } else {\n return 'something went wrong';\n }\n }",
"public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path ?: $this->defaultProfilePhotoUrl();\n }",
"public function getUrl()\n {\n if (array_key_exists(\"url\", $this->_propDict)) {\n return $this->_propDict[\"url\"];\n } else {\n return null;\n }\n }",
"function messaging_user_primary_blog_url($tmp_uid){\n\tglobal $wpdb;\n\n\tif (is_multisite()) {\n\t\t$tmp_blog_id = $wpdb->get_var($wpdb->prepare(\"SELECT meta_value FROM \" . $wpdb->base_prefix . \"usermeta WHERE meta_key = 'primary_blog' AND user_id = %d\", $tmp_uid));\n\t\tif ($tmp_blog_id == ''){\n\t\t\treturn;\n\t\t}\n\t\t$tmp_blog_domain = $wpdb->get_var($wpdb->prepare(\"SELECT domain FROM \" . $wpdb->base_prefix . \"blogs WHERE blog_id = %d\", $tmp_blog_id));\n\t\t$tmp_blog_path = $wpdb->get_var($wpdb->prepare(\"SELECT path FROM \" . $wpdb->base_prefix . \"blogs WHERE blog_id = %d\", $tmp_blog_id));\n\t\treturn 'http://' . $tmp_blog_domain . $tmp_blog_path;\n\t} else {\n\t\treturn get_option('siteurl');\n\t}\n}",
"public function getBaseUrl() {\n if(empty($this->customUrl)) {\n return \"http://steamcommunity.com/profiles/{$this->steamId64}\";\n } else {\n return \"http://steamcommunity.com/id/{$this->customUrl}\";\n }\n }",
"public function getWelcomePageUrl()\n {\n if (array_key_exists(\"welcomePageUrl\", $this->_propDict)) {\n return $this->_propDict[\"welcomePageUrl\"];\n } else {\n return null;\n }\n }",
"function getSocialNetworkFromDomain($url)\n{\n $domain = cleanSocialUrl($url);\n\n if (isset($GLOBALS['Piwik_socialUrl'][$domain])) {\n return $GLOBALS['Piwik_socialUrl'][$domain];\n } else {\n return Piwik::translate('General_Unknown');\n }\n}",
"function AvatarUrl($avatar_url, $facebook, $facebook_id) {\n\tglobal $setting;\n\tif($avatar_url == '') { \n\t\tif ($facebook == 1) {\n\t\t\t$avatar = 'http://graph.facebook.com/'.$facebook_id.'/picture';\n\t\t}\n\t\telse {\n\t\t\t$avatar = $setting['site_url'].'/uploads/avatars/default.png';\n\t\t}\n\t}\n\telse {\n\t\t$avatar = $setting['site_url'].'/uploads/avatars/'.$avatar_url;\n\t}\n\treturn $avatar;\n}",
"public function getFirstPageUrl();",
"function cacap_get_commons_profile_url( $user_id ) {\n\t$url = trailingslashit( bp_core_get_user_domain( $user_id ) . buddypress()->profile->slug );\n\t$url = add_query_arg( 'commons-profile', '1', $url );\n\treturn apply_filters( 'cacap_get_commons_profile_url', $url, $user_id );\n}",
"public function getUrl() : ?string\n {\n return $this->url;\n }",
"public function getUrl() {\n\t\treturn $this->siteURL;\n\t}",
"function getUserProfileUrl($userid){\n\tglobal $database;\n\t$url = 'index.php?p=12&u='.$userid;\n\t$username = $database->getUserNameById($userid);\n\t$username = str_replace(' ','-',$username);\n\tif(empty($username)) {\n\t\tLogger(\"uname_empty_url_rewrite\".$_SERVER['HTTP_REFERER']);\n\t}else {\n\t\t$url = \"microfinance/profile/$username.html\";\n\t}\n\treturn $url;\n}",
"function vcex_get_user_social_links( $user_id = '', $display = 'icons', $attr = '', $before = '', $after = '' ) {\n\tif ( function_exists( 'wpex_get_user_social_links' ) ) {\n\t\treturn wpex_get_user_social_links( $user_id, $display, $attr, $before, $after );\n\t}\n}",
"protected function getRedirectUrl()\n {\n return null;\n }",
"function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}",
"public function getUrl() {\n\t\t//$url = \"https://www.facebook.com/dialog/oauth?client_id=\".$this->appId.\"&redirect_uri=\".$this->redirectUrl.\"&scope=\".$this->permission.\"&state=\".$_SESSION['state'];\n\t\treturn $this->redirectUrl;\n\t}",
"public function getTwitterUrl()\n {\n return $this->twitter_url;\n }",
"public function getOauthUri(): string\r\n {\r\n return 'https://www.facebook.com/dialog/oauth?';\r\n }",
"function cosmetics_get_social_url() {\n\n global $cosmetics_options;\n $cosmetics_social_networks = cosmetics_get_social_network();\n\n foreach( $cosmetics_social_networks as $cosmetics_social ) :\n $cosmetics_social_url = $cosmetics_options['cosmetics_social_network_' . $cosmetics_social['id']];\n\n if( $cosmetics_social_url ) :\n?>\n\n <div class=\"social-network-item item-<?php echo esc_attr( $cosmetics_social['id'] ); ?>\">\n <a href=\"<?php echo esc_url( $cosmetics_social_url ); ?>\">\n <i class=\"fa fa-<?php echo esc_attr( $cosmetics_social['id'] ); ?>\" aria-hidden=\"true\"></i>\n </a>\n </div>\n\n\n<?php\n endif;\n\n endforeach;\n}",
"function ryno_change_wplogin_url() {\n return get_bloginfo('url');\n}",
"static public function login_url() {\n\t\t$facebook = FacebookApp::get()->first();\n\t\tif($facebook && $facebook->EnableFacebookLogin == 1)\n\t\t\treturn Controller::join_links(\"facebook\", \"login\");\n\t\treturn false;\n\t}",
"public function getJoinWebUrl()\n {\n if (array_key_exists(\"joinWebUrl\", $this->_propDict)) {\n return $this->_propDict[\"joinWebUrl\"];\n } else {\n return null;\n }\n }",
"public function getLoginUrl()\n {\n if (array_key_exists(\"loginUrl\", $this->_propDict)) {\n return $this->_propDict[\"loginUrl\"];\n } else {\n return null;\n }\n }",
"protected function getPageURL()\n {\n global $post_id;\n try {\n if (defined('TOPIC_ID')) {\n // this is a TOPICS page\n $SQL = \"SELECT `link` FROM `\".TABLE_PREFIX.\"mod_topics` WHERE `topic_id`='\".TOPIC_ID.\"'\";\n $link = $this->app['db']->fetchColumn($SQL);\n // include TOPICS settings\n global $topics_directory;\n include_once WB_PATH . '/modules/topics/module_settings.php';\n return WB_URL . $topics_directory . $link . PAGE_EXTENSION;\n }\n elseif (!is_null($post_id) || defined('POST_ID')) {\n // this is a NEWS page\n $id = (defined('POST_ID')) ? POST_ID : $post_id;\n $SQL = \"SELECT `link` FROM `\".TABLE_PREFIX.\"mod_news_posts` WHERE `post_id`='$id'\";\n $link = $this->app['db']->fetchColumn($SQL);\n return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;\n }\n else {\n $SQL = \"SELECT `link` FROM `\".TABLE_PREFIX.\"pages` WHERE `page_id`='\".PAGE_ID.\"'\";\n $link = $this->app['db']->fetchColumn($SQL);\n return WB_URL.PAGES_DIRECTORY.$link.PAGE_EXTENSION;\n }\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }",
"function get_the_author_url()\n {\n }",
"public function getUrl(): ?string\n {\n return $this->Url ?? null;\n }",
"public function get_github_url() {\n\t\treturn $this->get_meta( 'github_url' );\n\t}",
"public function getLinkedinUrl()\n {\n return $this->linkedin_url;\n }",
"function userSocial($social){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT $social FROM employes WHERE iduser=\".$this->userInfo('id'));\r\n\t\t\ttry{\r\n\t\t\t\t$req->execute();\r\n\t\t\t\t$data = $req->fetch();\r\n\r\n\t\t\t\tif(isset($data->$social)){\r\n\t\t\t\t\treturn $data->$social;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\treturn \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (PDOException $e){\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t}",
"function pzdc_hub_community_home_url($echo = TRUE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('hub_community', 'home_url', $echo);\n}",
"protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}",
"static public function connect_url() {\n\t\treturn Controller::join_links(\"facebook\", \"connect\");\n\t}",
"protected function getHomeUrl()\n\t{\n\t\t$enableHomeLink = value($this->config->get('c::enable-home-link', false));\n\n\t\tif ($enableHomeLink) {\n\t\t\t$url = $this->config->get('c::redirect-login', '/');\n\t\t\treturn $this->url->to($url);\n\t\t}\n\n\t\treturn null;\n\t}",
"function getURL()\n {\n if (!empty($this->url)) {\n return $this->url;\n }\n if (!empty($this->canonical)) {\n return $this->canonical;\n }\n if (!$this->getSlug() && ($this->getID())) {\n return \\Idno\\Core\\site()->config()->url . 'moves/' . $this->getID() . '/' . $this->getPrettyURLTitle();\n } else {\n return parent::getURL();\n }\n }",
"function user_url(User $user, $controller=null, $action=null, $params='', $includeDomain=false, $module=null)\r\n{\r\n if ($module == null) {\r\n $module = $user->getDefaultModule();\r\n }\r\n\n if ($module == null) {\n \t$module = 'default';\n }\r\n return build_url($controller, $action, $params, $includeDomain, $module);\r\n}",
"public function getLoginURL(){\r\n\t\treturn $this->facebook_obj->getLoginURL($this->getParamsForLogin());\r\n\t}",
"function getSocialsLogoFromUrl($domain)\n{\n $domain = cleanSocialUrl($domain);\n\n if (isset($GLOBALS['Piwik_socialUrl'][$domain])) {\n // image names are by first domain in list, so make sure we use the first if $domain isn't it\n $firstDomain = $domain;\n foreach ($GLOBALS['Piwik_socialUrl'] as $domainKey => $name) {\n if ($name == $GLOBALS['Piwik_socialUrl'][$domain]) {\n $firstDomain = $domainKey;\n break;\n }\n }\n\n $pathWithCode = 'plugins/Referrers/images/socials/' . $firstDomain . '.png';\n return $pathWithCode;\n } else {\n return 'plugins/Referrers/images/socials/xx.png';\n }\n}",
"public function getWebsiteURL() {\n return $this->getChaveValor('WEBSITE_URL');\n }",
"public function providerUrl($provider)\n {\n return Socialite::driver($provider)->stateless()->redirect()->getTargetUrl();\n }",
"public function getOfficialLink();",
"public function getProfileImageURL()\n {\n return 'https://s.gravatar.com/avatar/9ff2a97e7faf3529f1b78f1f737ebca0?s=80';\n }",
"function current_page_url() {\n\tglobal $CONFIG;\n\n\t$url = parse_url($CONFIG->wwwroot);\n\n\t$page = $url['scheme'] . \"://\";\n\n\t// user/pass\n\tif ((isset($url['user'])) && ($url['user'])) {\n\t\t$page .= $url['user'];\n\t}\n\tif ((isset($url['pass'])) && ($url['pass'])) {\n\t\t$page .= \":\".$url['pass'];\n\t}\n\tif ((isset($url['user']) && $url['user']) ||\n\t\t(isset($url['pass']) && $url['pass'])) {\n\t\t$page .=\"@\";\n\t}\n\n\t$page .= $url['host'];\n\n\tif ((isset($url['port'])) && ($url['port'])) {\n\t\t$page .= \":\" . $url['port'];\n\t}\n\n\t//$page.=\"/\";\n\t$page = trim($page, \"/\");\n\n\t$page .= $_SERVER['REQUEST_URI'];\n\n\treturn $page;\n}",
"public function getSocialRedirect( $provider )\n {\n $providerKey = \\Config::get('services.' . $provider);\n if(empty($providerKey))\n return view('pages.status')\n ->with('error','No such provider');\n\n return Socialite::driver( $provider )->redirect();\n\n }",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getFsSocial(): ?string {\n return $this->fsSocial;\n }",
"private function getURL(){\n if(!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'],'/');\n }\n }",
"public function getWebsite(): ?string;",
"public function getUrl(): ?string {\n return $this->url;\n }",
"public function urlSocialAuthRedirect($provider) {\n //Session::put('url.failed', URL::previous());\n return Socialite::driver($provider)->redirect();\n }",
"public function get_url();",
"public function get_callback_url(){\n\t\treturn $this->callback_url;\n\t}",
"function faculty_get_social( $metaArray, $social ) {\n if ( 'youtube' == $social ) {\n if ( $metaArray['youtube_channel'][0] && $metaArray['youtube_link'][0] ) {\n return '<a href=\"'.$metaArray['youtube_link'][0].'\">'.$metaArray['youtube_channel'][0].'</a>';\n }\n\n if ( $metaArray['youtube_link'][0] ) {\n return '<a href=\"'.$metaArray['youtube_link'][0].'\">'.$metaArray['youtube_link'][0].'</a>';\n }\n\n return 'N/A';\n }\n\n if ( 'twitter' == $social ) {\n if ( $metaArray['twitter_url'][0] && $metaArray['twitter_handle'][0] ) {\n return '<a href=\"'.$metaArray['twitter_url'][0].'\">'.$metaArray['twitter_handle'][0].'</a>';\n }\n\n if ( $metaArray['twitter_url'][0] ) {\n return '<a href=\"'.$metaArray['twitter_url'][0].'\">'.$metaArray['twitter_url'][0].'</a>';\n }\n\n return 'N/A';\n }\n}",
"function ProfileUrl($id, $seo_name) {\n\tglobal $setting;\n\n\tif ($setting['seo_on'] == 0) {\n\t\t$url = 'index.php?task=profile&id='.$id;\n\t}\n\telse if ($setting['seo_on'] == 3) {\n\t\t$url = 'profile/'.$seo_name.$setting['seo_extension'];\n\t}\n\telse {\n\t\t$url = 'profile/'.$id.'/'.$seo_name.$setting['seo_extension'];\n\t}\n\treturn $setting['site_url'].'/'.$url;\n}",
"public function woo_slg_linkedin_auth_url() {\n\t\t\t\n\t\t\t//Remove unused scope for login\n\t\t\t\n\t\t\t$scope\t= array( 'r_emailaddress', 'r_liteprofile' );\n\t\t\t\n\t\t\t//load linkedin class\n\t\t\t$linkedin = $this->woo_slg_load_linkedin();\n\t\t\t\n\t\t\t//check linkedin loaded or not\n\t\t\tif( !$linkedin ) return false;\n\t\t\t\n\t\t\t//Get Linkedin config\n\t\t\t$config\t= $this->linkedinconfig;\n\t\t\t\n\t\t\ttry {//Prepare login URL\n\t\t\t\t$preparedurl\t= $this->linkedin->getAuthorizeUrl( $config['appKey'], $config['callbackUrl'], $scope );\n\t\t\t} catch( Exception $e ) {\n\t\t\t\t$preparedurl\t= '';\n\t }\n\t \n\t\t\treturn $preparedurl;\n\t\t}",
"function thrive_get_redirect_page_url() {\n\n\t$selected_login_post_id = intval( get_option( 'thrive_login_page' ) );\n\n\tif ( $selected_login_post_id === 0 ) {\n\n\t\treturn;\n\n\t}\n\n\t$login_post = get_post( $selected_login_post_id );\n\n\tif ( ! empty( $login_post ) ) {\n\n\t\treturn get_permalink( $login_post->ID );\n\n\t}\n\n\treturn false;\n\n}",
"private function getSocialUserName($social_link)\n {\n $path = parse_url($social_link, PHP_URL_PATH);\n if ($path && !is_null($path)) {\n $f_n_array = explode('/', $path);\n if (count($f_n_array) > 0) {\n return $f_n_array[(count($f_n_array) - 1)];\n } else {\n return $path;\n }\n }\n\n return '';\n }",
"public function get_urlChannel () {\r\n\t\treturn $this->get_info()['author_url'];\r\n\t}"
] | [
"0.7830812",
"0.7291481",
"0.6710422",
"0.6585223",
"0.6455965",
"0.6424321",
"0.64123684",
"0.6377663",
"0.63366735",
"0.6283951",
"0.62809014",
"0.61773324",
"0.6171965",
"0.6130776",
"0.610084",
"0.6082877",
"0.59831244",
"0.5960559",
"0.595489",
"0.59398514",
"0.58958584",
"0.5876807",
"0.5872782",
"0.5871279",
"0.5858493",
"0.5856809",
"0.5837443",
"0.5833334",
"0.5819842",
"0.5811459",
"0.581005",
"0.5796093",
"0.5793509",
"0.57916063",
"0.5753112",
"0.57383335",
"0.573094",
"0.5730548",
"0.5717297",
"0.57100636",
"0.5709251",
"0.5702266",
"0.570016",
"0.5698402",
"0.5690197",
"0.56899345",
"0.5686056",
"0.5683689",
"0.5677297",
"0.5672782",
"0.5668008",
"0.5667808",
"0.56677526",
"0.56674594",
"0.5665402",
"0.56517166",
"0.56418097",
"0.5638587",
"0.5638051",
"0.5637444",
"0.56313354",
"0.56304365",
"0.5624532",
"0.5622509",
"0.5621261",
"0.56094015",
"0.5602395",
"0.55972755",
"0.5595914",
"0.5595662",
"0.5595",
"0.5593329",
"0.5586122",
"0.5575429",
"0.5568522",
"0.55672115",
"0.5561833",
"0.55580145",
"0.5549908",
"0.5547755",
"0.55459964",
"0.5541705",
"0.5540147",
"0.5540147",
"0.5540147",
"0.5540147",
"0.5540147",
"0.5536063",
"0.5523401",
"0.55202603",
"0.55168647",
"0.5511995",
"0.55022156",
"0.55014986",
"0.5500915",
"0.5498168",
"0.5498126",
"0.54947835",
"0.5494202",
"0.5490913"
] | 0.6958454 | 2 |
Get url of user's avatar or null if it is not set | public function getUserAvatarUrl()
{
return $this->getUserAttribute(static::ATTRIBUTE_AVATAR_URL);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AvatarURL() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['avatar150'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public function getAvatarUrlAttribute(): ?string\n {\n return $this->avatar()->exists() ? $this->avatar->url : null;\n }",
"protected function _getAvatar()\n {\n $avatar = null;\n if (isset($this->social_accounts[0])) {\n $avatar = $this->social_accounts[0]['avatar'];\n }\n\n return $avatar;\n }",
"public function getAvatarUrl()\n {\n return $this->getData('avatar_url');\n }",
"public function getAvatarUrl()\n {\n return $this->avatar_url;\n }",
"public function getAvatarUrl()\n {\n return $this->avatar_url;\n }",
"public function getAvatar()\n {\n return $this->getFirstMediaUrl() ?: get_gravatar($this->email);\n }",
"public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }",
"public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }",
"public function getAvatarUrl()\n {\n if (!is_null($this->getLastAvatar()) && Storage::disk('s3')->exists($this->getLastAvatar()->link)) {\n return Storage::disk('s3')->url($this->getLastAvatar()->link);\n }\n\n return $this->sex ? Storage::disk('s3')->url('avatars/user_woman.png') : Storage::disk('s3')->url('avatars/user_man.png');\n }",
"public function getAvatar()\n {\n return $this->getImageurl();\n }",
"public function getAvatar()\n {\n return $this->attributes['avatar'] ?? null;\n }",
"public function getAvatar() {\n\t\tif ( !empty($this->_rowData[config::get('userAvatar', 'avatar')]) ) {\n\t\t\t$this->_avatar = $this->_rowData[config::get('userAvatar', 'avatar')]->path;\n\t\t}\n\t\treturn $this->_avatar;\n\t}",
"public function getUserAvatar(){\n return($this->userAvatar);\n }",
"public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }",
"public function getAvatar()\n {\n return $this->user['avatar'];\n }",
"public function getAvatarUrl()\n {\n return Url::to(\"/img/avatars/{$this->avatar}\");\n }",
"function getAvatarUrl($fbUserId, $nullForDefault = true, $params = null)\n {\n return null;\n }",
"public function getAvatarImage() : string\n {\n $imagePlaceholder = asset('storage/images/profiles') . '/' . Auth::user()->avatar;\n\n if(empty(Auth::user()->avatar)) {\n $imagePlaceholder = asset('img/user-image-placeholder.png');\n }\n\n return $imagePlaceholder;\n }",
"public function getAvatarUrlAttribute()\n {\n if (\\Storage::disk('local')->exists($this->avatar)) {\n return url(\\Storage::disk('local')->url($this->avatar));\n }\n \n return asset('images/no-image.png');\n }",
"public function getAvatar()\n {\n return $this->getProfilePicture();\n }",
"public function getProfilePictureUrlAttribute()\n {\n if (empty($this->profile_picture)) {\n return null;\n }\n\n return Storage::url(file_path($this->uploadPath(), $this->profile_picture));\n }",
"public function getAvatar()\n {\n // so that updated images happen when users change their avatar. Also fixes #9822\n if (!isset($this->data['avatar'])) {\n $ui = app(UserInfoRepository::class)->getByID($this->data['id']);\n if ($ui) {\n $this->data['avatar'] = $ui->getUserAvatar()->getPath();\n }\n }\n return $this->data['avatar'];\n }",
"public function avatar($size = 100) {\n if (null === $this->user) {\n return null;\n }\n\n if ('PFed' == $this->xot->main_module) {\n /**\n * @var PfedModelProfileContract $profile\n */\n $profile = $this->getProfile();\n\n if ($profile->getMedia('avatar')->count() > 0) {\n return $profile->getMedia('avatar')->last()->original_url;\n }\n }\n\n $email = md5(mb_strtolower(trim((string) $this->user->email)));\n $default = urlencode('https://tracker.moodle.org/secure/attachment/30912/f3.png');\n\n return \"https://www.gravatar.com/avatar/$email?d=$default&s=$size\";\n }",
"public function getAvatarHash(): ?string\n {\n return $this->avatar;\n }",
"public function getAvatarHash(): ?string\n {\n return $this->avatar;\n }",
"public function getAvatarUri()\n {\n return $this->avatar_uri;\n }",
"public function getAvatar()\n {\n return $this->profile->getAvatar();\n }",
"public function getAvatar( User $user = null ){\n if( $user == null )\n $user = $this->getUser();\n \n if( $user->getAvatar() == null )\n return \"/img/avatar.png\";\n \n return $this->getUploaderHelper()->asset($user, \"avatar\");\n }",
"function fc_get_jomSocial_avatar(){\r\n\t$user =& CFactory::getUser($userid);\r\n\t\r\n\t// Retrieve the avatar.\r\n\treturn correct_avatar_path($user->getThumbAvatar());\r\n}",
"public function getAvatarUrl() {\n return \"http://www.gravatar.com/avatar/{{ md5($this->email) }}\n ?d=mm&s=40\";\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n\t{\n\t\treturn $this->instance->profile;\n\t}",
"public function getAvatarUrlAttribute()\n {\n if (count(Media::all()) === 0) {\n return;\n }\n return $this->avatar->getUrl('thumb');\n }",
"public function getProfileImageURL()\n {\n return 'https://avatars3.githubusercontent.com/u/4479918?v=4&s=460';\n }",
"function fc_get_easySocial_avatar(){\r\n\t$user = Foundry::user();\r\n\t\r\n\t// Retrieve the avatar.\r\n\treturn correct_avatar_path($user->getAvatar());\r\n}",
"public function getAvatarThumbUrlAttribute(): ?string\n {\n return $this->getFirstMediaUrl('avatar', 'thumb_150') ?: null;\n }",
"public function avatar() {\n return $this->avatar_path ? Storage::url($this->avatar_path) : '/images/svg/avatar_default.svg';\n }",
"public function get_avatar()\n\t{\n\t\treturn $this->user_loader->get_avatar($this->get_data('from_user_id'));\n\t}",
"public function getAvatarFullPathAttribute()\n {\n if ($this->avatar && Storage::exists('users/avatars/'.$this->avatar)) {\n $avatar = Storage::url('users/avatars/'.$this->avatar);\n }else {\n// $avatar = asset('assets/images/no-avatar.png');\n $avatar = asset('assets/site/images/user.png');\n }\n return $avatar;\n }",
"protected function getAvatar()\n\t{\n\t\treturn $this->avatar();\n\t}",
"function cjpopups_wp_avatar_url($user_id_or_email, $size = 150){\n\t$user_id = cjpopups_user_info($user_id_or_email, 'ID');\n\t$get_avatar = get_avatar( $user_id, $size );\n preg_match(\"/src='(.*?)'/i\", $get_avatar, $matches);\n return ( $matches[1] );\n}",
"public function getAvatar(): string;",
"public function getRiderProfilePictureAttribute()\n {\n $profile_picture=ProfilePicture::where('user_id',$this->attributes['user_id'])->first();\n return isset($profile_picture)?$profile_picture->src:url('images/user.jpeg');\n }",
"public function picture_url() {\n return $this->_adaptee->user_photo(\"\", true);\n }",
"public function getAvatarURL(){\r\n\t\treturn $this->buildCharacterAvatarURL($this->armoryAdapter->getWowArmoryUrl(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getLevel(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getGenderId(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getRaceId(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getWowClassId());\r\n }",
"public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path ?: $this->defaultProfilePhotoUrl();\n }",
"public function avatarUser()\n {\n return asset(\"storage/images/$this->avatar\");\n }",
"public function defaultAvatarUrl()\n {\n $providerURL = 'https://ui-avatars.com/api/';\n $url = $providerURL . '?' . http_build_query([\n 'name' => urlencode($this->name),\n 'size' => $this->getAvatarSize(),\n 'color' => $this->getAvatarTextColor(),\n 'background' => $this->getAvatarBackgroundColor(),\n ]);\n \n return $url;\n }",
"function upm_get_avatar($avatar = '') {\r\n global $current_user;\r\n wp_get_current_user();\r\n\r\n if( $current_user && is_object($current_user) && is_a($current_user, 'WP_User')) {\r\n if ($current_user->has_cap('partner') && !empty($current_user->user_image)) {\r\n $avatar = wp_get_attachment_image_url($current_user->user_image,'thumbnail', false);\r\n } else {\r\n $avatar = get_avatar_url($current_user->ID);\r\n }\r\n }\r\n return \"<img class='avatar avatar-64 photo' src='\" . $avatar . \"'>\";\r\n}",
"function ct_critic_get_avatar_url( $get_avatar ) {\n\t\tif ( class_exists( 'WP_User_Avatar' ) ) {\n\t\t\tpreg_match( '/src=\"([^\"]*)\"/i', $get_avatar, $matches );\n\t\t} else {\n\t\t\tpreg_match( \"/src='([^']*)'/i\", $get_avatar, $matches );\n\t\t}\n\n\t\treturn $matches[1];\n\t}",
"public function getAvatar()\n {\n return $this->Avatar;\n }",
"public function getAvatar()\n {\n return $this->Avatar;\n }",
"public function getAvatar() {\n\t\treturn $this->avatar;\n\t}",
"public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }",
"public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }",
"public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }",
"public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }",
"public function getAvatar()\n {\n return $this->avatar;\n }",
"public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }",
"function get_user_profile_image_url($user_id){\n\t$image_url = THEME_URI.'/images/profile_placeholder.png';\n\tif($image_relative_path = get_user_meta($user_id, 'profile_image_url', true))\n\t{\n\t\t$image_url = $image_relative_path;\n\t}\n\treturn $image_url;\n}",
"public function getProfilePhotoUrlAttribute()\n {\n return $this->profile_photo_path\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->defaultProfilePhotoUrl();\n }",
"public function getProfileImageURL()\n {\n return 'https://s.gravatar.com/avatar/9ff2a97e7faf3529f1b78f1f737ebca0?s=80';\n }",
"public function avatar(){\n if($this->avatar){\n return asset('/avatars/patients/'.$this->avatar);\n }else{\n return \"https://www.gravatar.com/avatar/{{md5(trim($this->fname))}}?d=mm&s=150\" ;\n }\n }",
"public function getAvatarPath()\n {\n return $this->avatar_path;\n }",
"public static function get_avatar_url($user_id_or_email, $size = 30) {\n return get_avatar_url($user_id_or_email, array('size'=> $size));\n }",
"public function getAvatar() {\n return (new Query())->select('profile_photo')->from('user_cv')\n ->where(['user_id' => $this->id, 'is_default' => true])\n ->limit(1)->scalar();\n }",
"public function avatarUrl(): string\n {\n $sizes = ['xl', 'l', 'm', 's'];\n\n foreach ($sizes as $size) {\n if (array_key_exists($size, $this->avatarUrls())) {\n return $this->avatarUrls()[$size];\n }\n }\n\n // Could not find any of the sizes specified, just return the first one in the array.\n return current($this->avatarUrls());\n }",
"public function avatarUrl(): string\n {\n $sizes = ['xl', 'l', 'm', 's'];\n\n foreach ($sizes as $size) {\n if (array_key_exists($size, $this->avatarUrls())) {\n return $this->avatarUrls()[$size];\n }\n }\n\n // Could not find any of the sizes specified, just return the first one in the array.\n return current($this->avatarUrls());\n }",
"public function getImg_avatar()\r\n {\r\n return $this->img_avatar;\r\n }",
"public function getOppoAvatar()\n {\n return $this->get(self::_OPPO_AVATAR);\n }",
"public function getImageAvatarUrl() {\n return CommonProcess::getHostUrl() . $this->getImageAvatarPath();\n }",
"public function getFullAvatarUrl() {\n return $this->imageUrl . '_full.jpg';\n }",
"public function avatar()\n {\n if (setting('enable_external_dependencies')) {\n return sprintf('https://www.gravatar.com/avatar/%s?size=%d', md5(strtolower($this->email)), 200);\n }\n\n return Avatar::create($this->username)->toBase64();\n }",
"function getAvatarUrl($providerId, $nullForDefault = true, $params = null)\n {\n $nullString = $nullForDefault ? 'null' : 'notnull';\n $avatarUrl = JFBCFactory::cache()->get('vk.avatar.' . $nullString . '.' . $providerId);\n if ($avatarUrl === false)\n {\n $data = $this->fetchProfile($providerId, \"photo_big\");\n $avatarUrl = $data->get('photo_big', null);\n if ($nullForDefault && (!$avatarUrl || strpos($avatarUrl, 'vk.com/images/camera_')))\n $avatarUrl = null;\n JFBCFactory::cache()->store($avatarUrl, 'vk.avatar.' . $nullString . '.' . $providerId);\n }\n return $avatarUrl;\n }",
"public function getAvatarAttribute()\n {\n return 'https://i.pravatar.cc/50?u='.$this->email;\n }",
"public function get_member_avatar_url($member)\n {\n $avatar_path = get_forum_base_url();\n\n $type = $this->get_member_row_field($member, 'avatartype');\n $filename = $this->get_member_row_field($member, 'avatar');\n\n switch ($type) {\n //Type could be: 'gallery', 'upload','remote'\n case 'gallery': // Avatar from Avatars Gallery\n return get_forum_base_url() . '/' . $filename;\n case 'remote': // URL of Remote image Avatar\n return $filename;\n case 'upload': // Uploaded Avatar\n return get_forum_base_url() . preg_replace('/\\.\\//', '/', $filename);\n }\n return ''; //the avatar is not set\n }",
"public function getAvatar()\r\n\t{\r\n\t\t$avatar = null;\r\n\t\t$avatars = $this->getAvatars();\r\n\t\tif(count($avatars) == 0)\r\n\t\t{\r\n\t\t\t$avatar = new Avatar();\r\n\t\t\t$avatar->setProfile($this);\r\n\t\t\t$avatar->save();\r\n\t\t}\r\n\t\telse\r\n\t\t\t$avatar = $avatars[0];\r\n\t\t\r\n\t\treturn $avatar;\r\n\t}",
"function getAvatarUrl($providerId, $nullForDefault = true, $params = null)\n {\n $nullString = $nullForDefault ? 'null' : 'notnull';\n $avatarUrl = JFBCFactory::cache()->get('instagram.avatar.' . $nullString . '.' . $providerId);\n if ($avatarUrl === false)\n {\n $token = $this->provider->client->getToken();\n\n if(!empty($token))\n {\n //instragram token includes user data\n //get username from token\n $user = (array) $token['user'];\n $avatarUrl = $user['profile_picture'];\n\n //http://images.ak.instagram.com/profiles/anonymousUser.jpg\n if ($nullForDefault && (!$avatarUrl || strpos($avatarUrl, 'instagram.com/profiles/anonymousUser')))\n $avatarUrl = null;\n JFBCFactory::cache()->store($avatarUrl, 'instagram.avatar.' . $nullString . '.' . $providerId);\n }\n }\n return $avatarUrl;\n }",
"public function profilePicture()\n {\n if ($this->picture) {\n return \"/storage/{$this->picture}\";\n }\n\n return 'http://i.pravatar.cc/200';\n }",
"public function getAvatarFile()\n {\n return $this->avatarFile;\n }",
"public function getAvatarAttribute($value)\n {\n return $this->timeline->avatar ? $this->timeline->avatar->source : url('user/avatar/default-'.$this->gender.'-avatar.png');\n }",
"public function getAvatarUploadUrl()\n {\n return $this->avatarUploadUrl;\n }",
"public function getProfPic() {\n $response = $this->getRequest(\"me\");\n $response = json_decode($response->getBody()->getContents());\n \n if (count($response->{\"images\"}) == 0) {\n return null;\n } else {\n return $response->{\"images\"}[0]->{\"url\"};\n }\n }",
"public function getIconAvatarUrl() {\n return $this->imageUrl . '.jpg';\n }",
"public function getProfileImage() {\r\n $profileImage = SystemSetting::getByKey(\"ARC_USER_IMAGE\", $this->id);\r\n if (!empty($profileImage->value)) {\r\n return system\\Helper::arcGetPath() . \"assets/profile/\" . $profileImage->value;\r\n }\r\n return system\\Helper::arcGetPath() . \"assets/profile/placeholder.png\";\r\n }",
"public function picture()\n {\n if ($this->image->exists()) {\n return resource_url('images/users/' .basename($this->image->path));\n }\n\n // Fallback to AdminLTE's default image.\n return vendor_url('dist/img/avatar5.png', 'almasaeed2010/adminlte');\n }",
"public function get_user_image() {\n\t\tloggedOnly();\n\n\t\t// Pega o usuario logado\n\t\t$user = auth();\n\n\t\t// Busca a imagem\n\t\tif( $user->midia_id ) {\n\t\t\tif( $image = $user->belongsTo( 'midia' ) ) {\n\t\t\t\treturn resolve( $image->path() );\n\t\t\t} return resolve( base_url( 'public/images/empty.jpg' ) );\n\t\t} return resolve( base_url( 'public/images/empty.jpg' ) );\n\t}",
"protected function defaultProfilePhotoUrl(): string\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=7F9CF5&background=EBF4FF';\n }",
"public function getAvatarUrlAttribute()\n {\n if ( $this->avatar ) {\n $testimonial_avatar = $this->avatar;\n } else {\n $testimonial_avatar = 'testimonial-default.png';\n }\n return asset('storage/images/'.$testimonial_avatar);\n }",
"public function getAvatarPathAttribute()\n {\n return asset($this->avatar ? \"/storage/{$this->avatar}\" : '/storage/images/avatars/no-avatar.png');\n }",
"protected function defaultProfilePhotoUrl()\n {\n return 'https://ui-avatars.com/api/?name='.urlencode($this->name).'&color=252f3f&background=EBF4FF';\n }",
"public function getDefaultAvatar()\n\t{\n\t\t$event = new Event('onApplicationGetDefaultAvatar');\n\t\tFactory::getDispatcher()->triggerEvent($event);\n\n\t\treturn $event->getArgument('avatar', false);\n\t}",
"public function getAvatarUrl(bool $fullUrl = false): ?string\n {\n $avatar = $this->getAvatarMedia();\n\n if ($avatar === null) {\n return null;\n }\n\n if ($fullUrl) {\n return $avatar->getFullUrl(self::MEDIA_AVATAR_CONVERSION);\n }\n\n return $avatar->getUrl(self::MEDIA_AVATAR_CONVERSION);\n }",
"public static function getUserLoginAvatar() {\n return Yii::$app->session->get(UserHelper::SESSION_AVATAR);\n }"
] | [
"0.8325968",
"0.8106889",
"0.770614",
"0.77053094",
"0.76909536",
"0.76909536",
"0.7686753",
"0.76304084",
"0.76304084",
"0.7567911",
"0.7525242",
"0.7480854",
"0.74695784",
"0.74043787",
"0.7402077",
"0.73952687",
"0.73800653",
"0.73449355",
"0.7339244",
"0.7324274",
"0.7312471",
"0.7297528",
"0.72949207",
"0.7274566",
"0.7259785",
"0.7259785",
"0.7238887",
"0.72345394",
"0.72074926",
"0.7191312",
"0.71253777",
"0.71198976",
"0.71198976",
"0.71198976",
"0.71198976",
"0.71198976",
"0.71198976",
"0.7101973",
"0.7098121",
"0.709673",
"0.7095703",
"0.70681554",
"0.70664483",
"0.7060598",
"0.70600027",
"0.70563215",
"0.704194",
"0.7037385",
"0.70298356",
"0.70288676",
"0.701524",
"0.70051897",
"0.7001422",
"0.69882333",
"0.69824797",
"0.69709504",
"0.69650316",
"0.69650316",
"0.69625646",
"0.69574416",
"0.69574416",
"0.69574416",
"0.69574416",
"0.6957406",
"0.6957285",
"0.6948854",
"0.6943468",
"0.69395435",
"0.6921004",
"0.6913909",
"0.68421555",
"0.68417776",
"0.6839462",
"0.6839462",
"0.6839239",
"0.68385863",
"0.6833869",
"0.6810507",
"0.68104976",
"0.6801144",
"0.67947066",
"0.67910546",
"0.6780317",
"0.67773753",
"0.67730325",
"0.67715496",
"0.6766871",
"0.6750942",
"0.6746356",
"0.6734808",
"0.6730097",
"0.67232156",
"0.66995686",
"0.6686097",
"0.66828597",
"0.66767",
"0.6663951",
"0.6659756",
"0.6653045",
"0.66444725"
] | 0.8016835 | 2 |
Get user sex or null if it is not set | public function getUserSex()
{
return $this->getUserAttribute(static::ATTRIBUTE_SEX);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSex()\n {\n $result = null;\n if (isset($this->userInfo['sex'])) {\n $result = $this->userInfo['sex'] == 1;\n }\n return $result;\n }",
"public function getsex()\n {\n return $this->sex;\n }",
"function getGender($userid) {\n return NULL;\n }",
"public function getSex()\n {\n return $this->sex;\n }",
"public function getSex()\n {\n return $this->sex;\n }",
"public function getSex()\n {\n return $this->sex;\n }",
"public function getSex()\n {\n return $this->sex;\n }",
"public function getSex()\n {\n return $this->sex;\n }",
"public function getSex() {\n return (new Query())->select('sex')->from('user_cv')\n ->where(['user_id' => $this->id, 'is_default' => true])\n ->limit(1)->scalar();\n }",
"public function getCsex()\n {\n return $this->csex;\n }",
"public function getSex()\n {\n return self::SEX[$this->sex];\n }",
"public function hasSex(){\n return $this->_has(2);\n }",
"public function hasSex(){\n return $this->_has(2);\n }",
"public function hasSex(){\n return $this->_has(3);\n }",
"public function setSex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sex !== $v) {\n $this->sex = $v;\n $this->modifiedColumns[UserTableMap::COL_SEX] = true;\n }\n\n return $this;\n }",
"public function hasSex(){\r\n return $this->_has(6);\r\n }",
"public function getCustomerGender();",
"public function getCustomerGender()\n {\n $user = Shopware()->Modules()->Admin()->sGetUserData();\n\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $customerGender = $user[\"billingaddress\"][\"salutation\"];\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $customerGender = $user[\"additional\"][\"user\"][\"salutation\"];\n }\n\n return $customerGender;\n }",
"function getGender() {\n return $this->gender;\n }",
"public function getGender()\n {\n return $this->getParameter('gender');\n }",
"function vSex ( $sex ) \r\n\t\t{\r\n\t\t\t# Strip string down to first character\r\n\t\t\t$sex = strtolower( substr( $sex, 0, 1) );\r\n\t\t\t\r\n\t\t\t# Checks if result is 'f' or 'm'\r\n\t\t\tif ( $sex != \"f\" OR $sex != \"m\" )\r\n\t\t\t\t$sex = true;\r\n\t\t\t\t\r\n\t\t\telse \r\n\t\t\t\t$sex = false;\r\n\t\t\t\r\n\t\t\treturn $sex;\r\n\t\t\t\r\n\t\t}",
"public function getGender()\n {\n return $this->gender;\n }",
"public function getGender()\n {\n return $this->gender;\n }",
"public function getGender()\n {\n return $this->gender;\n }",
"public function getGender()\n {\n return $this->gender;\n }",
"public function getGender(){\n $name = '';\n if ($this->gender =='N') {\n $name = 'Preferred not to tell';\n }elseif ($this->gender =='M') {\n $name = 'Male';\n }else{\n $name = 'Female';\n }\n return $name;\n }",
"public function getGender(){ // fungsi get untuk mengambil nilai dari gender\n printNumC();//\n return $this->gender;\n }",
"function female() \n { \n $this->sex_id=\"F\";\n $this->sex_name=\"Female\";\n return($this->sex_id);\n }",
"public static function getTextGender($oUser)\n {\n $gender = null;\n switch ($oUser->gender) {\n case 'M':\n $gender = 'Homme';\n break;\n case 'F':\n $gender = 'Femme';\n break;\n }\n return $gender;\n }",
"function isGenderUnknown() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they aren't\n if($USER['gender']==\"u\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function getGender() {\n return $this->gender;\n }",
"public function getGender()\n {\n return $this->gender;\n }",
"public function getGender()\n {\n return $this->gender;\n }",
"public function getGender()\n\t{\n\t\treturn $this->gender;\n\t}",
"function sSex ( $sex ) \r\n\t\t{\r\n\t\t\treturn strtolower(substr($sex, 0, 1));\r\n\t\t\t\r\n\t\t}",
"public function setSex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sex !== $v) {\n $this->sex = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_SEX] = true;\n }\n\n return $this;\n }",
"public function getGender() {\n\t\treturn $this->gender;\n\t}",
"public function callGender() {\n\n\t\t$app_id = Yii::$app->params['app_id'];\n\t\t$app_secret = Yii::$app->params['app_secret'];\n\n\t\tFacebookSession::setDefaultApplication($app_id, $app_secret);\n\n\t\t$session = new FacebookSession($_SESSION['facebook_token']);\n\n\t\tif ($session) {\n\t\t\t$user_profile = (new FacebookRequest(\n\t\t\t\t\t$session, 'GET', '/' . $this->get('uid')\n\t\t\t\t\t))->execute()->getGraphObject(GraphUser::className());\n\n\t\t\tif (!empty($user_profile)) {\n\t\t\t\t$user_profile = $user_profile->asArray();\n\t\t\t\t//print_r($user_profile);\n\t\t\t}\n\t\t}\n\t}",
"public function getGender() {\n\t\treturn $this->_gender;\n\t}",
"public function getShowGender()\n\t{\n\t\treturn $this->show_gender;\n\t}",
"function getFieldGender(){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_sex');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_sex');\n\t\t$tooltip = setToolTipNotification(\"gender\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('gender') === 'gender' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input class='gender' type='radio' name='sex' value='M' data-value='Male' checked> Male</br><input class='gender' type='radio' name='sex' data-value='Female' value='F'> Female<br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}",
"function getGender($user, $name, $description) {\r\n\t$api = 'http://textalytics.com/core/userdemographics-1.0';\r\n\t$key = '0e70ff2a84eab3fda9019ab2202cd91e';\r\n\t\r\n\t// We make the request and parse the response to an array\r\n\t$response = sendPost($api, $key, $user, $name, $description);\r\n\t$json = json_decode($response, true);\r\n\r\n\t$gd = '';\r\n\tif(isset($json['gender'])) {\r\n\t if($json['gender'] == 'M')\r\n\t\t$gd = 'MALE';\r\n\t else if($json['gender'] == 'F')\r\n\t\t$gd = 'FEMALE';\r\n\t}\r\n\t\r\n\treturn $gd;\r\n\r\n}",
"private function getGender(){\n $gender_array= array(\"male\",\"female\");\n return $gender_array[rand(0,1)];\n }",
"function info($sexId) \n { \n $oaux=new sex();\n if($sexId==$oaux->male())\n \t$this->male();\n if($sexId==$oaux->female())\n $this->female();\n return($this->sex_id);\n }",
"public function getGender(): Gender\n {\n return $this->gender;\n }",
"protected function getGenderHello($locale = null)\n {\n $greetings = $this->util->getTranslated()->getGenderHello($locale);\n\n if (isset($greetings[$this->_getVar('user_gender')])) {\n return $greetings[$this->_getVar('user_gender')];\n }\n }",
"public function hasGender() {\n return $this->_has(1);\n }",
"public function setSex($var)\n {\n GPBUtil::checkEnum($var, \\Greeter\\Sex::class);\n $this->sex = $var;\n\n return $this;\n }",
"public function setSexo($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->sexo !== $v) {\n\t\t\t$this->sexo = $v;\n\t\t\t$this->modifiedColumns[] = UsuarioPeer::SEXO;\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function getWholeGender()\n\t{\n\t\tif($this->gender == \"m\"){\n\t\t\treturn \"muž\";\n\t\t}elseif($this->gender == \"f\"){\n\t\t\treturn \"žena\";\n\t\t}\n\t\treturn;\n\t}",
"public function getGenderAttribute($val) {\n return $val == 1 ? \"male\" : \"female\";\n }",
"public function sex()\n {\n return $this->belongsTo(\\App\\Models\\Sex::class, 'sex_uuid');\n }",
"public function getUserGender($user, $driver)\n {\n if ($driver === 'Facebook') {\n $gender = $user->getInfo()[\"gender\"] ?? null;\n return $gender;\n }\n\n return null;\n }",
"function sex($sex)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT sex FROM students WHERE id_student = %s \",\n\t\t GetSQLValueString($sex, \"int\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"sex\"];\t\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}",
"static function cat_gender()\n {\n global $post;\n\n // Nonce field to validate form request came from current site\n wp_nonce_field(basename(__FILE__), 'cat_fields');\n\n // Get the gender data if it's already been entered\n $gender = get_post_meta($post->ID, 'gender', true);\n\n // Output the field\n echo sprintf('<input type=\"radio\" id=\"male\" name=\"gender\" %s value=\"male\">\n <label for=\"male\">Male</label><br>\n <input type=\"radio\" id=\"female\" name=\"gender\" %s value=\"female\">\n <label for=\"female\">Female</label><br><br>', $gender == 'male' ? 'checked' : '', $gender == 'female' ? 'checked' : '');\n }",
"public function getNombreSexoPeople( ){\n\t\treturn $this->nombreSexoPeople;\n\t}",
"function userType() {\n if (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'doctor' ) {\n\t\treturn 2;\n\t}else if(isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'patient' ) {\n return 3;\n }else if(isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'guardian' ) {\n return 4;\n }\n}",
"function isGirl() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return false; //If we don't know guess they aren't\n if($USER['gender']==\"f\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"function smarty_function_PUBLICA_printSex($params, &$smarty) {\n\t// Verifica a validade do parametro\n\tswitch(intval($params['var'])) {\n\t\tcase 0:\n\t\tdefault:\n\t return $smarty->_tpl_vars['T_feminino'];\n break;\n \n\t\tcase 1:\n\t return $smarty->_tpl_vars['T_masculino'];\n break;\n\t}\n}",
"public function getGenderName(): string\n {\n return match ($this->gender) {\n 1 => 'Laki-laki',\n 2 => 'Perempuan'\n };\n }",
"function getGender($user, $gender) {\n\t$result = dbQuery(\"SELECT * FROM users WHERE username = '$user'\");\n\t$row = mysql_fetch_array($result);\n\n\t if( $row['gender'] == $gender ) \n\t {\n\t\t return true;\n\t\t } \n\t\t else\n\t\t {\n\t\t \t return false;\n\t\t }\n}",
"public function get_user_type() {\n return $this->session->userdata('user_type');\n}",
"public function check_gender($gen){\n\t\tif($gen == '1'){\n\t\t\t$txt = 'Male';\n\t\t}else if($gen == '2'){\n\t\t\t$txt = 'Female';\n\t\t}\n\t\treturn $txt;\n }",
"function __cek_gender() {\r\n $user_id = func_arg(0);\r\n $gender = \"male\";\r\n $lilo_mongo = new LiloMongo();\r\n $lilo_mongo->selectDB('Users');\r\n $lilo_mongo->selectCollection('Avatar');\r\n $data = $lilo_mongo->findOne(array('user_id' => $user_id));\r\n if ($data) {\r\n $conf_ = json_decode(str_replace(\"'\", '\"', $data['configuration']));\r\n if (is_array($conf_)) {\r\n foreach ($conf_ as $dt) {\r\n if ($dt->tipe == 'gender') {\r\n return str_replace(\"_base\", \"\", $dt->element);\r\n }\r\n }\r\n }\r\n } else {\r\n $lilo_mongo->selectCollection('Avatar');\r\n $data2 = $lilo_mongo->findOne(array('lilo_id' => $user_id));\r\n if (!isset($data2['sex'])) {\r\n $gender = \"male\";\r\n } else {\r\n $gender = $data2['sex'];\r\n }\r\n }\r\n return $gender;\r\n}",
"protected function createGender($value) {\r\n switch ($value) {\r\n case \"m\":\r\n return Person::TYPE_GENDER_MALE;\r\n break;\r\n case \"f\":\r\n return Person::TYPE_GENDER_FEMALE;\r\n break;\r\n case \"c\":\r\n return Person::TYPE_GENDER_UNDEFINED;\r\n break;\r\n default:\r\n return null;\r\n break;\r\n }\r\n }",
"public function getProfession() {\n $profession = UserDataExtra::findOne(['user_id' => $this->id]);\n return ($profession) ? $profession->profession : '';\n }",
"public function getIdGender();",
"public static function getUserNoProfile()\n {\n $user = static::get();\n if (isset($user->noPerfil)) {\n return $user->noPerfil;\n }\n }",
"public static function getUserLevel(){\n if (self::isSuper()){\n return \"super\";\n }\n if (self::isAdmin()){\n return \"admin\";\n }\n if (self::isUser()){\n return \"user\";\n }\n return null;\n }",
"public function getGenderTextAttribute()\n {\n return static::genderTextMap[$this->gender];\n }",
"function isBoy() {\n\tglobal $USER;\n\tif(!isset($USER['gender'])) return true; //If we don't know guess they are\n if($USER['gender']==\"m\") {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function setCsex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->csex !== $v) {\n $this->csex = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_CSEX] = true;\n }\n\n return $this;\n }",
"public function getGender()\n {\n $this->checkJMBG();\n\n $arr = $this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $nr = (int)($J . $K . $L);\n\n return ($nr < 500) ? self::GENDER_MALE : self::GENDER_FEMALE;\n }",
"public function getGenderAttribute($value)\n {\n return $value === 'L' ? 'Laki-laki' : 'Perempuan';\n }",
"public function getGenderFieldDefault ()\n {\n $genderDefault = $this->scopeConfig->getValue(\n 'customer/address/gender_show',\n ScopeInterface::SCOPE_STORE\n );\n return $genderDefault;\n }",
"protected function getGender() {\n\t\treturn array(\n\t\t\t'1' => TranslateUtility::assureLabel('application.gender.w', 'Profession'),\n\t\t\t'2' => TranslateUtility::assureLabel('application.gender.m', 'Profession')\n\t\t);\n\t}",
"public function getGenderString()\n\t{\n\t\tswitch ($this->getGender()) {\n\t\t\tcase self::G_MALE:\n\t\t\t\treturn 'Male';\n\t\t\tcase self::G_FEMALE:\n\t\t\t\treturn 'Female';\n\t\t\tcase self::G_OTHER:\n\t\t\t\treturn 'Other';\n\t\t\tdefault:\n\t\t\t\treturn 'Other';\n\t\t}\n\t}",
"function user_level () {\r\n\t$info = user_info();\r\n\treturn (isset($info[3]) ? $info[3] : 0);\r\n}",
"public function getEstadoSexoPeople( ){\n\t\treturn $this->estadoSexoPeople;\n\t}",
"static function getFemale(){\n global $link;\n $result = mysqli_query($link, \"SELECT COUNT(*) AS number_of_loans, SUM(loan_info.balance) AS total_loans\n FROM loan_info, borrowers\n WHERE loan_info.borrower=borrowers.id\n AND borrowers.gender='Female'\n AND loan_info.`status` = ''\") or die(mysqli_error($link));\n if(mysqli_num_rows($result))\n return mysqli_fetch_assoc($result);\n else\n return null;\n }",
"function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }",
"function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }",
"public function getGenderCode()\n {\n return $this->genderCode;\n }",
"public function getUser(): ?string\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\\sprintf(\n __METHOD__ . \" get '%s'\",\n $this->user === null\n ? \"null\"\n : $this->user\n ));\n return $this->user;\n }",
"public function getApiProfession()\n {\n return Gender::functionGenderFormatter($this->getProfession(), $this->getGender());\n }",
"public function getNom_user()\r\n {\r\n return $this->nom_user;\r\n }",
"public function getUserInfo()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->user_model->get($id);\n }\n }",
"private function setGenderValue()\n {\n $value = $this->getData(self::$genderAttributeCode);\n \n if (!$value) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n return;\n }\n\n try {\n $attributeMetadata = $this->customerMetadata->getAttributeMetadata(self::$genderAttributeCode);\n $option = $attributeMetadata->getOptions()[$value];\n $this->setCustomAttribute(self::$genderAttributeCode, $option->getLabel());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$genderAttributeCode, 'N/A');\n }\n }",
"public function getGender()\n {\n return $this->hasOne(Gender::class, ['id' => 'gender_id']);\n }",
"function set_gender($gender='*')\r\n{\r\n\t$this->gender = 0;\t\t// return\r\n\r\n\t// normalize gender\r\n\tif ( is_string($gender) )\r\n\t{\r\n\t\t$gender = substr($gender,0,1);\r\n\t\t$gender = strtoupper($gender);\r\n\t}\r\n\r\n\t// validity check\r\n\tif ( $gender != '*' && !in_array($gender, $this->VALID['GENDER']) )\r\n\t{\r\n\t\ttrigger_error('invalid value -- gender will be picked at random', E_USER_NOTICE);\r\n\t\t$gender = '*';\r\n\t}\r\n\t\r\n\t// random gender\r\n\tif ( $gender == '*' )\r\n\t{\r\n\t\t$this->gender = mt_rand(1,2);\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telseif ( is_numeric($gender) )\r\n\t{\r\n\t\t$this->gender = $gender;\r\n\t\t$this->_normalize_gender($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->gender_name = $gender;\r\n\t\t$this->_normalize_gender($this->gender_name);\r\n\t}\r\n\r\n\treturn $this->gender;\r\n}",
"function get_user_name(){\n return isset($_SESSION['username']) ? $_SESSION['username'] : null;\n}",
"function nb_get_student_meta(){\n\tglobal $current_user;\n\n\tif( $current_user->ID != null){\n\t\t$sid = $current_user->ID;\n\t\t$student = get_userdata($sid); \n\n\t}\n\t\n\treturn $student;\n\n}",
"public function get_profil()\n {\n return $this->_profil;\n }",
"function validate($userType=''){\n if(isset($_SESSION['user'])){\n return $_SESSION['user'];\n }else{\n return false;\n }\n }",
"public function getDescripcionSexoPeople( ){\n\t\treturn $this->descripcionSexoPeople;\n\t}",
"public static function isUser(){\n if(isset($_SESSION['role'])) {\n $status = Validation::Nettoyer_string($_SESSION['role']);\n if($status==\"user\"){\n return \"user\";\n } else {\n return \"visiteur\";\n }\n }else{\n return \"visiteur\";\n }\n }",
"public function getUserType();",
"public function getUserType();",
"public function useGender($flag = false) {\n $this->use_gender = ($flag !== false);\n }",
"function _is_staff()\n {\n $user = $this->visitor->get();\n\t\t//echo $user['ugrade'];\n\t\t//1.普通會員 2.VIP 3.Staff\n\t\tif($user['ugrade'] == 3){\n\t\t\treturn $user['ugrade'];\n\t\t}\n\t}"
] | [
"0.7810267",
"0.75179243",
"0.72500116",
"0.71574724",
"0.71574724",
"0.71574724",
"0.71574724",
"0.71574724",
"0.6864054",
"0.6777187",
"0.6545667",
"0.6400071",
"0.6400071",
"0.6380897",
"0.63448596",
"0.62781256",
"0.62503695",
"0.61736095",
"0.6143012",
"0.61328506",
"0.6120611",
"0.6076327",
"0.6076327",
"0.6076327",
"0.6076327",
"0.6062665",
"0.6040551",
"0.60386467",
"0.60138345",
"0.6004832",
"0.5986836",
"0.5961976",
"0.5961976",
"0.5949797",
"0.5920155",
"0.5904239",
"0.58913064",
"0.5887376",
"0.5776044",
"0.5774659",
"0.5774216",
"0.5749218",
"0.5744949",
"0.57281667",
"0.5728006",
"0.56881183",
"0.56674707",
"0.56469494",
"0.56291443",
"0.5627248",
"0.55988497",
"0.5598649",
"0.5591208",
"0.55813086",
"0.55683875",
"0.5559878",
"0.5548266",
"0.55316895",
"0.55144894",
"0.5507907",
"0.550331",
"0.5500881",
"0.54908514",
"0.547172",
"0.5461291",
"0.545801",
"0.5457379",
"0.5452555",
"0.5451712",
"0.54167205",
"0.54165214",
"0.5414306",
"0.537074",
"0.53691036",
"0.5351686",
"0.5346472",
"0.53304285",
"0.5320327",
"0.5313793",
"0.53135335",
"0.5301171",
"0.5301171",
"0.52850753",
"0.52845037",
"0.52504003",
"0.52440953",
"0.5231191",
"0.5225518",
"0.5216029",
"0.5213472",
"0.5213358",
"0.52092844",
"0.52081925",
"0.5190799",
"0.51825714",
"0.51816684",
"0.51787287",
"0.51787287",
"0.51780194",
"0.51658416"
] | 0.76433337 | 1 |
Get user birthday in format dd.mm.YYYY or null if it is not set | public function getUserBirthday()
{
$result = $this->getUserAttribute(static::ATTRIBUTE_BIRTHDAY);
if (!empty($result)) {
return date('d.m.Y', strtotime($result));
}
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBirthdayDate():?string\n {\n return $this->birthday_date ? (new \\DateTime($this->birthday_date))->format('d/m/Y') : null;\n }",
"public function getBirthDay() {\n \tif($this->birthDay == null)\n\t\t\treturn \"\";\n\t\telse\n \treturn $this->birthDay;\n }",
"function getDayOfBirth() {\n global $USER;\n\t$dayOfBirth = date(\"d\", $USER['dob']);\n\treturn $dayOfBirth;\n}",
"protected function getDateOfBirthAttribute()\n {\n if (isset($this->attributes['date_of_birth'])) {\n $value = $this->attributes['date_of_birth'] ?? null;\n } else {\n $value = null;\n }\n\n if ($value !== null) {\n return date('d.m.Y', strtotime($value));\n } else {\n return null;\n }\n }",
"public function getBirthDate()\n {\n if ($this->birthDate) {\n return $this->birthDate;\n }\n\n $centuryCode = substr($this->personal_code, 0, 1);\n if ($centuryCode < 3) {\n $century = 19;\n } elseif ($centuryCode < 5) {\n $century = 20;\n } else {\n $century = 21;\n }\n\n $this->birthDate = new \\DateTime(($century - 1) . substr($this->personal_code, 1, 6));\n\n return $this->birthDate;\n }",
"public function getBirthday() : string\r\n\t{\r\n\t\treturn $this->birthday;\r\n\t}",
"public function getBirthday($format = 'Y-m-d')\n {\n $value = $this->getParameter('birthday');\n\n return $value ? $value->format($format) : null;\n }",
"public function getDateOfBirth() {\n\t\treturn empty( $this->container['dates_of_birth'] ) ? null : $this->container['dates_of_birth'][0];\n\t}",
"public function getBirthDate()\n {\n return $this->getProfile() ? $this->getProfile()->getBirthDate() : null;\n }",
"public function getUserDateOfBirth () {\n\t\treturn ($this->userDateOfBirth);\n\t}",
"public function getBirthDate()\n\t{\n\t\treturn $this->getIfSetDate('birthDate');\n\t}",
"public function getBirthday()\n {\n return $this->birthday;\n }",
"public function getBirthday()\n {\n return $this->birthday;\n }",
"public function getBirthday()\n {\n return $this->birthday;\n }",
"public function getBirthday()\n {\n return $this->birthday;\n }",
"public function getBirthday()\n {\n return $this->birthday;\n }",
"public function getBirthday($format = 'Y-m-d H:i:s')\n\t{\n\t\tif ($this->birthday === null) {\n\t\t\treturn null;\n\t\t}\n\n\n\t\tif ($this->birthday === '0000-00-00 00:00:00') {\n\t\t\t// while technically this is not a default value of NULL,\n\t\t\t// this seems to be closest in meaning.\n\t\t\treturn null;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$dt = new DateTime($this->birthday);\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException(\"Internally stored date/time/timestamp value could not be converted to DateTime: \" . var_export($this->birthday, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ($format === null) {\n\t\t\t// Because propel.useDateTimeClass is TRUE, we return a DateTime object.\n\t\t\treturn $dt;\n\t\t} elseif (strpos($format, '%') !== false) {\n\t\t\treturn strftime($format, $dt->format('U'));\n\t\t} else {\n\t\t\treturn $dt->format($format);\n\t\t}\n\t}",
"public function getDateofBirth() {\n return $this->dateOfBirth;\n }",
"public function getBirthdate()\n\t{\n\t\treturn $this->birthdate;\n\t}",
"public function getBirthdate($format = 'Y-m-d')\n\t{\n\t\tif ($this->birthdate === null) {\n\t\t\treturn null;\n\t\t}\n\n\n\t\tif ($this->birthdate === '0000-00-00') {\n\t\t\t// while technically this is not a default value of NULL,\n\t\t\t// this seems to be closest in meaning.\n\t\t\treturn null;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$dt = new DateTime($this->birthdate);\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException(\"Internally stored date/time/timestamp value could not be converted to DateTime: \" . var_export($this->birthdate, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ($format === null) {\n\t\t\t// Because propel.useDateTimeClass is TRUE, we return a DateTime object.\n\t\t\treturn $dt;\n\t\t} elseif (strpos($format, '%') !== false) {\n\t\t\treturn strftime($format, $dt->format('U'));\n\t\t} else {\n\t\t\treturn $dt->format($format);\n\t\t}\n\t}",
"public function getBirthDate()\n {\n return $this->birth_date;\n }",
"public function getBirthdate()\n {\n return $this->birthdate;\n }",
"public function getBirthdate()\r\n {\r\n return $this->birthdate;\r\n }",
"public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }",
"public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }",
"public function getBirthDate() : Datetime\n {\n if (is_null($this->birthDate)) {\n $year = $this->getBirthCentury() + substr($this->code, 1, 2);\n $month = substr($this->code, 3, 2);\n $day = substr($this->code, 5, 2);\n\n $this->birthDate = new Datetime($year.'-'.$month.'-'.$day);\n }\n\n return $this->birthDate;\n }",
"public function getBirthdayDate()\n {\n return $this->birthdayDate;\n }",
"public function getBirthdate()\n {\n return $this->birthdate;\n }",
"public function getBirthday($format = 'd.m.Y.')\n {\n return date($format, $this->getBirthdayTimeStamp());\n }",
"public function getBirthDate()\n {\n return $this->birthDate;\n }",
"public function getBirthDate()\n\t{\n\t\treturn $this->birthDate;\n\t}",
"function getYearOfBirth() {\n global $USER;\n\t$yearOfBirth = date(\"Y\", $USER['dob']);\n\treturn $yearOfBirth;\n}",
"public function getBirthDate()\n {\n return $this->birthDate;\n }",
"public function getBirthdate(): \\DateTimeInterface|null;",
"protected function _getDob()\n {\n $dob = '';\n \n // First check if form birthday is set else get the birthday of the customer, otherwise error\n if ( isset( $this->_additionalFields['dob'] ) || isset( $this->_additionalFields['dob_year'] ) )\n {\n // Logics if javascript worked\n if ( array_key_exists( 'dob', $this->_additionalFields ) )\n {\n $dobTimestamp = strtotime( $this->_additionalFields['dob'], time() );\n $dob = date( 'Y-m-d\\TH:i:s', $dobTimestamp );\n }\n // Logics if javascript for date has not worked\n elseif ( \n array_key_exists( 'dob_year', $this->_additionalFields )\n && array_key_exists( 'dob_month', $this->_additionalFields )\n && array_key_exists( 'dob_day', $this->_additionalFields )\n )\n {\n $dobdate = $this->_additionalFields['dob_year'] . '-' . $this->_additionalFields['dob_month'] . '-' . \n $this->_additionalFields['dob_day'];\n $dobTimestamp = strtotime($dobdate, time());\n $dob = date('Y-m-d\\TH:i:s', $dobTimestamp);\n }\n }\n // No birthday sent through form fields, look if a birthday was sent using Magento default fields\n elseif( $this->_order->getCustomerDob() )\n {\n $dobdate = $this->_order->getCustomerDob();\n $dobTimestamp = strtotime( $dobdate, time() );\n $dob = date('Y-m-d\\TH:i:s', $dobTimestamp);\n }\n // If the variable $dob is not filled, then there was a problem with getting the correct date of birth\n // Because sending an empty value will cause SOAP error, do Mage Exception instead\n if ($dob == '')\n {\n // Cancel the order to prevent pending orders\n $this->_order->cancel()->save();\n // Restore the quote to keep cart information\n $this->restoreQuote();\n // Sent back error\n Mage::throwException($this->_helper->__('The date of birth is missing invalid. Please check your date or birth or contact our customer service.'));\n }\n \n return $dob;\n }",
"protected function formatDob($dob)\n {\n return $dob ? $dob->format('d/m/Y') : null;\n }",
"private function calculateBirthDateAndGender()\n {\n $year = $this->subject->getBirthDate()->format('y');\n $month = $this->months[$this->subject->getBirthDate()->format('n')];\n $day = $this->subject->getBirthDate()->format('d');\n if (strtoupper($this->subject->getGender()) == self::CHR_WOMEN) {\n $day += 40;\n }\n\n return $year . $month . $day;\n }",
"public function getDefaultBirthdate(): \\DateTimeInterface|null;",
"public static function convertBirthday($string) {\n $string = trim($string);\n\n // Birthday: Jan 23, 2017\n $date = DateTime::createFromFormat('!M j, Y', $string);\n if($date) {\n return $date->format('Y-m-d');\n }\n\n // Birthday: Feb, 2001\n $date = DateTime::createFromFormat('!M, Y', $string);\n if($date) {\n return $date->format('Y-m');\n }\n\n // Birthday: 6, 2006\n $date = DateTime::createFromFormat('!j, Y', $string);\n if($date) {\n return $date->format('Y-d');\n }\n\n // Birthday: Jan 5\n $date = DateTime::createFromFormat('!M j', $string);\n if($date) {\n return $date->format('m-d');\n }\n\n // Birthday: 2001\n $date = DateTime::createFromFormat('!Y', $string);\n if($date) {\n return $date->format('Y');\n }\n\n return false;\n \n }",
"public function getInternationalBirthDate()\n {\n return $this->internationalBirthDate;\n }",
"public function get_user_birthday($em){\r\n $this->db->select('birthday');\r\n $this->db->where('email', $em);\r\n $query = $this->db->get('users');\r\n foreach ($query->result() as $row)\r\n {\r\n return $row->birthday;\r\n }\r\n }",
"public function getBirthdate(): DateTime\n {\n return $this->birthdate;\n }",
"public function get_birth_date()\n\t{\n\t\t$date = DateTime::createFromFormat(LocalizedDate::STORED_DATE_FORMAT, $this->get_attribute('birth_date'));\n\t\treturn new LocalizedDate($date, null, IntlDateFormatter::SHORT, IntlDateFormatter::NONE);\n\t}",
"public function setBirthday($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->birthday !== $v) {\n $this->birthday = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_BIRTHDAY] = true;\n }\n\n return $this;\n }",
"public function getBirth()\n {\n return $this->birth;\n }",
"function age_to_birthdate($age)\n{\n $age_int = intval(trim((string)$age));\n $now = new \\DateTime();\n $bday = $now->sub(new \\DateInterval(\"P\" . $age_int . \"Y6M\"));\n return $bday->format(\\DateTime::ATOM);\n}",
"public function getDob()\n {\n return $this->dob;\n }",
"public function transform($birthday)\n {\n \tif (null === $birthday) {\n \t\treturn '';\n \t}\n \n return $birthday->format('Y-m-d');\n }",
"public function getDob()\n {\n return $this->dob;\n }",
"public function getDob()\n {\n return $this->dob;\n }",
"public function getShowBirthdate()\n\t{\n\t\treturn $this->show_birthdate;\n\t}",
"public function getDatesOfBirth() {\n\t\treturn empty( $this->container['dates_of_birth'] ) ? null : $this->container['dates_of_birth'];\n\t}",
"public function setDateOfBirth($value)\n {\n $this->_date_of_birth = $value;\n }",
"function setDayOfBirth( $sDayOfBirth_ ) {\n\t\t\tif (\n\t\t\t\t! is_string( $sDayOfBirth_ )\n\t\t\t\t|| FALSE == ( $iDayOfBirthUnix = strtotime( $sDayOfBirth_ ) )\n\t\t\t) {\n\t\t\t\tthrow new Exception( 'Address.DayOfBirth.Invalid', 'invalid day of birth: ' . $sDayOfBirth_ );\n\t\t\t}\n\t\t\treturn parent::setDayOfBirth( strftime( '%m/%d/%Y', $iDayOfBirthUnix ) );\n\t\t}",
"function born() {\n if (empty($this->birthday)) {\n if ($this->page[\"Name\"] == \"\") $this->openpage (\"Name\",\"person\");\n if (preg_match(\"/Date of Birth:<\\/h5>\\s*<a href=\\\"\\/OnThisDay\\?day\\=(\\d{1,2})&month\\=(.*?)\\\">.*?<a href\\=\\\"\\/BornInYear\\?(\\d{4}).*?href\\=\\\"\\/BornWhere\\?.*?\\\">(.*?)<\\/a>/ms\",$this->page[\"Name\"],$match))\n $this->birthday = array(\"day\"=>$match[1],\"month\"=>$match[2],\"year\"=>$match[3],\"place\"=>$match[4]);\n }\n return $this->birthday;\n }",
"public function getDobFieldDefault ()\n {\n $dobDefault = $this->scopeConfig->getValue(\n 'customer/address/dob_show',\n ScopeInterface::SCOPE_STORE\n );\n return $dobDefault;\n }",
"protected function getDateOfBirth($dateOfBirth, $customerId)\n {\n if ($dateOfBirth === null && ! empty($customerId)) {\n $customer = $this->_customerRegistry->retrieve($customerId);\n $dateOfBirth = $customer->getDob();\n }\n\n if ($dateOfBirth !== null) {\n $date = new \\DateTime($dateOfBirth);\n return $date->format(\\DateTime::W3C);\n }\n }",
"function getMonthOfBirth() {\n global $USER;\n\t$monthOfBirth = date(\"m\", $USER['dob']);\n\t//echo $monthOfBirth;\n\treturn $monthOfBirth;\n}",
"function enforce_birthdate(&$user)\n\t\t{\n\t\t\tglobal $phpbb_root_path, $phpEx;\n\n\t\t\tif (!defined('IN_ADMIN') && !defined('ADMIN_START') && !defined('IN_LOGIN') && !empty($user->data['is_registered']))\n\t\t\t{\n\t\t\t\t// Make sure we're not already where we need to be.\n\t\t\t\tif ($user->page['page_name'] != \"ucp.$phpEx\" || strpos($user->page['query_string'], 'mode=profile_info') === false)\n\t\t\t\t{\n\t\t\t\t\t// Don't redirect if the user is in the middle of posting, as we wouldn't want them to lose everything they've typed.\n\t\t\t\t\tif ($user->page['page_name'] != \"posting.$phpEx\" || (strpos($user->page['query_string'], 'mode=post') === false && strpos($user->page['query_string'], 'mode=reply') === false && strpos($user->page['query_string'], 'mode=edit') === false))\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude($phpbb_root_path . 'includes/prime_birthdate.' . $phpEx);\n\t\t\t\t\t\tif ($this->birthdate_required() && $this->birthdate_error($user->data['user_birthday']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tredirect(append_sid(\"{$phpbb_root_path}ucp.$phpEx\", 'i=profile&mode=profile_info&required=birthday'));\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}",
"function birthdate_error($date_of_birth) //day-month-year\n\t\t{\n\t\t\tglobal $config;\n\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\t\t\tif (!$day || !$month || !$year || $day < 1 || $day > 31 || $month < 1 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()))\n\t\t\t{\n\t\t\t\treturn 'INVALID_USER_BIRTHDAY';\n\t\t\t}\n\t\t\tif (checkdate($month, $day, $year) === false)\n\t\t\t{\n\t\t\t\treturn 'INVALID_USER_BIRTHDAY';\n\t\t\t}\n\t\t\tif ($this->get_age($date_of_birth) < $config['minimum_age'])\n\t\t\t{\n\t\t\t\treturn 'PRIME_BIRTHDATE_YOUNG';\n\t\t\t}\n\t\t\tif (!empty($config['maximum_age']) && $this->get_age($date_of_birth) > $config['maximum_age'])\n\t\t\t{\n\t\t\t\treturn 'PRIME_BIRTHDATE_OLD';\n\t\t\t}\n\t\t\treturn(false);\n\t\t}",
"public function setBirthday($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->birthday !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->birthday !== null && $tmpDt = new DateTime($this->birthday)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->birthday = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::BIRTHDAY;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"public function getBirthdayTimeStamp()\n {\n $this->checkJMBG();\n\n $arr = $this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = $v;\n\n $d = \"$A$B\";\n $m = \"$C$D\";\n $y = \"$E$F$G\";\n if ((int)$y > 900) $y = '1' . $y;\n else $y = '2' . $y;\n\n return mktime(0, 0, 0, (int)$m, (int)$d, (int)$y);\n }",
"public function getSubscriberDob()\n {\n $dob = parent::getSubscriberDob();\n return $dob;\n }",
"public function setDateOfBirth()\n {\n $dateOfBirth = request('dob_year') . '-' . request('dob_month') . '-' . request('dob_day');\n\n $this->date_of_birth = $dateOfBirth;\n $this->save();\n }",
"public function getBirthdayPlace():?string\n {\n return $this->birthday_place;\n }",
"public function setBirthdate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->birthdate !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->birthdate !== null && $tmpDt = new DateTime($this->birthdate)) ? $tmpDt->format('Y-m-d') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->birthdate = ($dt ? $dt->format('Y-m-d') : null);\n\t\t\t\t$this->modifiedColumns[] = UserPeer::BIRTHDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}",
"private function getDOB()\n {\n $this->db->select('dob');\n //from the users table\n $query = $this->db->get('users');\n \n return $query;\n }",
"public function reverseTransform($birthday)\n {\n if (!$birthday) {\n return null;\n }\n\n try{\n $d = new \\DateTime($birthday);\n \n $d->format('Y-m-d');\n \n return $d;\n }catch(\\Exception $e){\n return $birthday;\n }\n }",
"public function getAge()\n\t{\n\t\t$date_birthday = $this->getAnswer('birthday');\n\t\t$date_birthday = convert_date_to_age($date_birthday);\n\t\treturn $date_birthday;\n\n\t}",
"function dateOfBirthCheck($day,$month,$year)\r\n{\r\n if($day > 0 && $day < 32 && $month > 0 && $month < 13) {\r\n if (is_numeric($day) && is_numeric($month) && is_numeric($year)) {\r\n if ($year > 1900 && $year < 2001) {\r\n if ($month == 1 || $month == 3 || $month == 5 || $month == 7 || $month == 9 || $month == 11 && $day <= 30) {\r\n return \"$year-$month-$day\";\r\n } else if ($month == 4 || $month == 6 || $month == 8 || $month == 10 || $month == 12 || $month == 1 && $day <= 31) {\r\n return \"$year-$month-$day\";\r\n } else if ($month == 2 && $day <= 28 || $month == 2 && $year % 4 == 0 && $day <=29) {\r\n return \"$year-$month-$day\";\r\n }\r\n } else {\r\n $_Session['hasPassed'] = False;\r\n return popUp(\"You need to be at least 16 to use this service\");\r\n\r\n }\r\n }\r\n else {\r\n $_Session['hasPassed'] = False;\r\n return popUp(\"Please ensure that the date is written in the correct format 01/01/2017\");\r\n}\r\n}else {\r\n $_Session['hasPassed'] = False;\r\n return popUp(\"Please ensure you Date of Birth is correct\");\r\n\r\n}\r\n}",
"public function saveBirthDate()\n {\n $this->updateValue(\n 'birth_date',\n $this->birthDate,\n 'Customer birth date updated successfully.'\n );\n\n $this->birthDateUpdate = false;\n $this->birthDateFormatted = $this->customer->birth_date_formatted;\n }",
"public function setBirthday($value)\n {\n if ($value) {\n $value = new DateTime($value, new DateTimeZone('UTC'));\n } else {\n $value = null;\n }\n\n return $this->setParameter('birthday', $value);\n }",
"public function getCbirthday()\n {\n return $this->cbirthday;\n }",
"public function setBirthdayAttribute($value)\n {\n $this->attributes['birthday'] = trim($value) ?: null;\n }",
"function get_birthdate_options($date_of_birth)\n\t\t{\n\t\t\tglobal $user;\n\t\t\t$bdate = explode(\"-\", $date_of_birth); //day-month-year\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\n\t\t\t$s_birthday_day_options = '<option value=\"0\"' . ((!$day) ? ' selected=\"selected\"' : '') . '>' . $user->lang['DAY'] . '</option>';\n\t\t\tfor ($i = 1; $i < 32; $i++)\n\t\t\t{\n\t\t\t\t$selected = ($i == $day) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_day_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t\t}\n\n\t\t\t$s_birthday_month_options = '<option value=\"0\"' . ((!$month) ? ' selected=\"selected\"' : '') . '>' . $user->lang['MONTH'] . '</option>';\n\t\t\t$lang_dates = array(1 => $user->lang['datetime']['Jan'], $user->lang['datetime']['Feb'], $user->lang['datetime']['Mar'], $user->lang['datetime']['Apr'], $user->lang['datetime']['May_short'], $user->lang['datetime']['Jun'], $user->lang['datetime']['Jul'], $user->lang['datetime']['Aug'], $user->lang['datetime']['Sep'], $user->lang['datetime']['Oct'], $user->lang['datetime']['Nov'], $user->lang['datetime']['Dec']);\n\t\t\tfor ($i = 1; $i < 13; $i++)\n\t\t\t{\n\t\t\t\t$selected = ($i == $month) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_month_options .= \"<option value=\\\"$i\\\"$selected>{$lang_dates[$i]}</option>\";\n\t\t\t}\n\n\t\t\t$now = getdate();\n\t\t\t$s_birthday_year_options = '<option value=\"0\"' . ((!$year) ? ' selected=\"selected\"' : '') . '>' . $user->lang['YEAR'] . '</option>';\n\t\t\tfor ($i = $now['year']; $i > $now['year'] - 100; $i--)\n\t\t\t{\n\t\t\t\t$selected = ($i == $year) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_year_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t\t}\n\t\t\tunset($now);\n\t\t\treturn(array($s_birthday_day_options, $s_birthday_month_options, $s_birthday_year_options));\n\t\t}",
"public function animalRegistrationDate() {\n $registration = $this->animalRegistration();\n\n if (!isset($registration)) {\n return null;\n }\n\n return (new DateTime($registration->created_at))->format('d.m.Y');\n }",
"public function birthday(bool $age = false)\n {\n // If age is requested calculate it\n if ($age) {\n // Create dates\n $birthday = date_create($this->birthday);\n $now = date_create(date('Y-m-d'));\n\n // Get the difference\n $diff = date_diff($birthday, $now);\n\n // Return the difference in years\n return (int) $diff->format('%Y');\n }\n\n // Otherwise just return the birthday value\n return $this->birthday;\n }",
"public function setProfileBirthdateAttribute($value)\n {\n if(is_string($value)){\n $this->attributes['profile_birthdate'] = $this->setDate($value);\n } else {\n $this->attributes['profile_birthdate'] = null;\n }\n }",
"public function getBornDate() {\n\t\treturn $this->born_date;\n\t}",
"public function setUserDateOfBirth ($newUserDateOfBirth = null) {\n\t\t// base case: if the date is null, ask user to enter date of birth\n\t\tif($newUserDateOfBirth === null) {\n\t\t\tthrow (new \\OutOfBoundsException(\"You must enter your date of birth\"));\n\t\t}\n\n\t\t$newUserDateOfBirth = self::validateDate($newUserDateOfBirth);\n\t\t$drinkDate = new \\DateTime();\n\t\t$drinkDate = $drinkDate->sub(new \\DateInterval('P21Y'));\n\t\tif($drinkDate < $newUserDateOfBirth) {\n\t\t\tthrow (new \\OutOfRangeException(\"You are too young.\"));\n\t\t}\n\t\t// store the userDateOfBirth date\n\t\t$this->userDateOfBirth = $newUserDateOfBirth;\n\n\t}",
"public function getPlaceOfBirth() : string;",
"function DetermineAgeFromDOB ($YYYYMMDD_In)\n{\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n}",
"public function getDOBStringAttribute() {\n return Carbon::createFromDate($this->attributes['DOB'])->toFormattedDateString();\n }",
"public function age(){\n return $this->dob->age;\n }",
"private function getFormmatedDob($date)\r\n {\r\n return $date ? date(\"d/m/Y\", strtotime($date)) : null;\r\n }",
"public function validateDateOfBirth($dob_day, $dob_month, $dob_year)\r\n {\r\n //Confirm that all dob inputs are numeric.\r\n if(!is_numeric($dob_day) || !is_numeric($dob_month) || !is_numeric($dob_year)){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob-invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n //Check that the day input is no higher than 31\r\n if($dob_day > \"31\"){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob-day-invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n //Check that the month input is no higher than 12\r\n if($dob_month > \"12\"){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob-month-invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n \r\n //Check that the user is older than 13 (or close enough)\r\n if($dob_year > date('Y') - 13){\r\n $rtn = array(\r\n 'status'=>false,\r\n 'error'=>\"dob_year_invalid\"\r\n );\r\n \r\n return $rtn;\r\n }\r\n \r\n $rtn['status'] = true;\r\n return $rtn;\r\n }",
"public function getTodayBirthday()\n\t{\n\t $query = $this->db->query(\"SELECT * FROM users WHERE DATE_FORMAT( `birthday` , '%m-%d' ) = DATE_FORMAT( NOW( ) , '%m-%d' ) \");\n\t\t\t// echo $this->db->last_query();\n\t\t\t// die();\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$data = array();\n\t\t\t\t$i=0;\n\t\t\t\tforeach ($query->result() as $row)\n\t\t\t\t{\n\t\t\t\t\t$data[$i]['id'] = $row->id;\n\t\t\t\t\t$data[$i]['full_name'] = $row->full_name;\n\t\t\t\t\t$data[$i]['user_file'] = $row->user_file;\n\t\t\t\t\t$data[$i]['sex'] = $row->sex;\n\t\t\t\t\t$data[$i]['vchDigitalWalletStatus'] = $row->vchDigitalWalletStatus;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}",
"function dob2age($myTimestamp) {\n // Separate parts of DOB timestamp\n $matches = array();\n preg_match('/(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)/',\n $myTimestamp, $matches\n );\n //var_dump($matches);\n $dobYear = (int)$matches[1];\n $dobMonth = (int)$matches[2];\n $dobDay = (int)$matches[3];\n //echo \"DOB year=$dobYear month=$dobMonth day=$dobDay<br>\";\n\n $nowYear = (int)strftime('%Y');\n $nowMonth = (int)strftime('%m');\n $nowDay = (int)strftime('%d');\n //echo \"Now year=$nowYear month=$nowMonth day=$nowDay<br>\";\n // Calculate age\n if ($dobMonth < $nowMonth) {\n\n // Born in a month before this month\n $age = $nowYear - $dobYear;\n }\n elseif ($dobMonth == $nowMonth) {\n // Born in this month\n if ($dobDay <= $nowDay) {\n // Born before or on this day\n $age = $nowYear - $dobYear;\n }\n else {\n // Born after today in this month\n $age = $nowYear - $dobYear - 1;\n }\n }\n else {\n // Born in a month after this month\n $age = $nowYear - $dobYear - 1;\n }\n //echo \"age=$age years<br>\";\n return $age;\n }",
"function edituserdob($data){\n\t\t\t$conn = $this->connect();\n\t\t\t$dob = mysqli_real_escape_string($conn, $data['dob']);\n\t\t\tif(empty($dob)) {\n\t\t\t\t$this->re_direct(\"profile\", \"input=empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[0-9]+(\\/|:|-)[0-9]+(\\/|:|-)[0-9]+$/\", $dob)) {\n\t\t\t\t\t$result = $this->change(\"user_login\", \"user_dob\", $dob , $_SESSION['userid']);\n\t\t\t\t\tif($result == false) {\n\t\t\t\t\t\t$this->re_direct(\"profile\", \"invalid=dob\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"profile\", \"Successfull\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"profile\", \"invalid=date\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function DetermineAgeGET_DOB_Prod ($YYYYMMDD_In) {\n $yIn=substr($YYYYMMDD_In, 0, 4);\n $mIn=substr($YYYYMMDD_In, 4, 2);\n $dIn=substr($YYYYMMDD_In, 6, 2);\n\n $ddiff = date(\"d\") - $dIn;\n $mdiff = date(\"m\") - $mIn;\n $ydiff = date(\"Y\") - $yIn;\n\n // Check If Birthday Month Has Been Reached\n if ($mdiff < 0)\n {\n // Birthday Month Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n } elseif ($mdiff==0)\n {\n // Birthday Month Currently\n // Check If BirthdayDay Passed\n if ($ddiff < 0)\n {\n //Birthday Not Reached\n // Subtract 1 Year From Age\n $ydiff--;\n }\n }\n return $ydiff;\n }",
"public function getUsingFormatDefault(){\n\t\t$config = CoreConfig::readAppConfig();\n\t\t$format = strtolower($config->application->dbdate);\n\t\t$dateFormat = new DateFormat($format, $this);\n\t\treturn $dateFormat->getDate();\n\t}",
"public function testCanGetBirthDay() : void\n {\n $this->assertSame('10', $this->personalCodeObj->getBirthDay());\n\n $formatsAndExpectedValues = [\n 'D' => 'Sat', // A textual representation of a day, three letters\n 'j' => 10, // Day of the month without leading zeros\n 'l' => 'Saturday', // A full textual representation of the day of the week\n 'N' => 6, // ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0)\n 'S' => 'th', // English ordinal suffix for the day of the month, 2 characters\n 'w' => 6, // Numeric representation of the day of the week\n 'z' => 40, // The day of the year (starting from 0)\n ];\n\n foreach ($formatsAndExpectedValues as $format => $expectedValue) {\n $this->assertEquals($expectedValue, $this->personalCodeObj->getBirthDay($format));\n }\n }",
"public function hasBirthdate(): bool;",
"function getFieldDOB($val = null){\n\t\tinclude('axcelerate_link_array_list.php');\n\t\t$val_ar = explode(\"-\", $val);\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_dob');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_dob');\n\t\t$tooltip = setToolTipNotification('dob');\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('dob') === 'dob' ? '<span class=\"red\">*</span>' : '').$tooltip.\" </label><br>\";\t\t\t\t\t\n\t\t\t$form_ret .= \"<select id='day' style='width:30%;'><option value=''> -- Day --</option>\";\n\t\t\tforeach ($days as $key => $value) {\n\t\t\t\t$form_ret .= \"<option value='\".$key.\"' \".($val_ar[2] == $key ? 'selected' : '').\">\".$value.\"</option>\";\n\t\t\t}\n\t\t\t$form_ret .= \"</select> \";\n\t\t\t$form_ret .= \"<select id='month' style='width:30%;'><option value=''> -- Month -- </option>\";\n\t\t\tforeach ($months as $key => $value) {\n\t\t\t\t$form_ret .= \"<option value='\".$key.\"' \".($val_ar[1] == $key ? 'selected' : '').\">\".$value.\"</option>\";\n\t\t\t}\n\t\t\t$form_ret .= \"</select> \";\n\t\t\t$form_ret .= \"<select id='year' style='width:30%;'><option value=''> -- Year -- </option>\";\n\t\t\tforeach ($years as $key => $value) {\n\t\t\t\t$form_ret .= \"<option value='\".$key.\"' \".($val_ar[0] == $key ? 'selected' : '').\">\".$value.\"</option>\";\n\t\t\t}\n\t\t\t$form_ret .= \"</select></br>\";\n\t\t\t$form_ret .= \"<input type='hidden' name='dob' id='dob' value='\".$val.\"' class='srms-field \".(get_axl_req_fields('dob') === 'dob' ? 'input-text-required' : '').\"' data-value='\".$val.\"'>\";\n\t\t}\n\t\treturn $form_ret;\n\t}",
"public function get_long_birth_date()\n\t{\n\t\t$date = DateTime::createFromFormat(LocalizedDate::STORED_DATE_FORMAT, $this->get_attribute('birth_date'));\n\t\treturn new LocalizedDate($date, null, IntlDateFormatter::LONG, IntlDateFormatter::NONE);\n\t}",
"function validate_dob($dob) {\n if (isset($dob) && !$this->isValidDateTimeString($dob, 'm/d/Y', 'UTC') && !empty($dob)) {\n $this->form_validation->set_message('validate_dob', 'This {field} should in m/d/Y format');\n return false;\n } else {\n return true;\n }\n }",
"public function getBirthNation()\n {\n return $this->birthNation;\n }",
"function getFieldCityOfBirth($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_CityofBirth');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_CityofBirth');\n\t\t$tooltip = setToolTipNotification(\"CityofBirth\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('birth_city') === 'birth_city' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input type='text' name='CityofBirth' id='CityofBirth' value='\".$value.\"' class='srms-field \".(get_axl_req_fields('birth_city') === 'birth_city' ? 'input-text-required' : '').\"'></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}",
"public function getBirthCentury() : int\n {\n $firstNo = substr($this->code, 0, 1);\n return 1700 + ceil($firstNo / 2) * 100;\n }",
"public function getBirthPlace()\n {\n return $this->birthPlace;\n }"
] | [
"0.81020474",
"0.8087841",
"0.78028715",
"0.77632535",
"0.7634923",
"0.75612813",
"0.7509031",
"0.74697196",
"0.74228454",
"0.73496985",
"0.7268432",
"0.7224518",
"0.7224518",
"0.7224518",
"0.7224518",
"0.7224518",
"0.72205245",
"0.71527565",
"0.7133127",
"0.71291655",
"0.7126509",
"0.7122136",
"0.7108115",
"0.7067304",
"0.7067304",
"0.7059581",
"0.70539707",
"0.7014363",
"0.70128477",
"0.7005834",
"0.69802725",
"0.69204575",
"0.6914704",
"0.678417",
"0.6782149",
"0.6744283",
"0.6741028",
"0.66869223",
"0.66681695",
"0.66256666",
"0.65940213",
"0.65820575",
"0.65581113",
"0.64877844",
"0.64811945",
"0.64205706",
"0.64158976",
"0.6405686",
"0.64047086",
"0.64047086",
"0.637728",
"0.6326542",
"0.62270886",
"0.616844",
"0.6167078",
"0.6166718",
"0.61511326",
"0.6148711",
"0.6142067",
"0.60815",
"0.6065858",
"0.6063764",
"0.60453236",
"0.60407495",
"0.6033511",
"0.601322",
"0.5975839",
"0.5950931",
"0.594821",
"0.59384644",
"0.59150887",
"0.5882735",
"0.5848779",
"0.58342963",
"0.5827058",
"0.57965624",
"0.578567",
"0.57696176",
"0.5727011",
"0.5722368",
"0.5722122",
"0.57209235",
"0.5720662",
"0.57143396",
"0.5706539",
"0.565682",
"0.5648681",
"0.56470513",
"0.56410015",
"0.56058395",
"0.5602047",
"0.5585169",
"0.5545065",
"0.55426365",
"0.552338",
"0.55172944",
"0.55128676",
"0.5510957",
"0.55017996",
"0.54977393"
] | 0.8222234 | 0 |
Get userfriendly name of the provider | public function getName($provider = null)
{
$provider = empty($provider) ? $this->provider : $provider;
return array_key_exists($provider, static::$providers) ? static::$providers[$provider] : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProviderName();",
"public function getProviderName();",
"public function getProviderName();",
"public function getProviderName()\n\t{\n\t\treturn ($this->provider != NULL) ? $this->provider->getName() : NULL;\n\t}",
"public function getProviderName(): string\n {\n return $this->providerName;\n }",
"public function getProviderHumanName()\n {\n return 'Google';\n }",
"public function getProviderName()\n {\n return $this->providerName;\n }",
"public function getProviderName()\n {\n return NULL;\n }",
"public function getProvider(): string\n {\n return $this->provider;\n }",
"public function getUserDisplayName();",
"public function getName(): string {\n\t\treturn $this->l10nFactory->get('user_ldap')->t('LDAP User backend');\n\t}",
"public function getDisplayName() { $n = $this->data->get(\"displayName\", null);\n if (!empty($n)) {\n return $n;\n }\n \n // I have google's name?\n if (($g = $this->getGoogleInfo())) {\n if (isset($g->givenName) && !empty($g->givenName)) {\n return $g->givenName;\n }\n if (isset($g->name) && !empty($g->name)) {\n return $g->name;\n }\n }\n \n // user is current user?? load his name if he is\n $currentUser = JFactory::getUser();\n if ((int)($currentUser->id) == (int)$this->userid) {\n return ucwords(strtolower($currentUser->name));\n }\n \n // load user and get his name\n $user = F_User::getUserById((int)$this->$userid);\n if ($user) {\n return ucwords(strtolower($user->name));\n }\n \n // wtf\n return \"???\";\n }",
"public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }",
"public function getDisplayName() {}",
"public function displayName()\n {\n if (isset($this->data['name']) && config('gzero.use_users_nicks')) {\n return $this->data['name'];\n }\n\n if (isset($this->data['first_name']) || isset($this->data['last_name'])) {\n return $this->data['first_name'] . ' ' . $this->data['last_name'];\n }\n\n return trans('gzero-core::common.anonymous');\n }",
"public function getDisplayName();",
"public static function displayName(): string;",
"public function getFriendlyName();",
"public function getDisplayName(): string\n {\n return $this->displayName;\n }",
"public function getDisplayName() {\n return $this->display_names[$this->access_level];\n }",
"public function get_label() {\n\t\treturn _x( 'Backup Authentication Codes', 'Provider Label', 'it-l10n-ithemes-security-pro' );\n\t}",
"function GetFriendlyName()\n {\n return $this->Lang('friendlyname');\n }",
"public function get_friendly_name()\n\t{\n\t\treturn $this->get_name();\n\t}",
"public function getProviderMachineName()\n {\n return 'Google';\n }",
"public function getDisplayName(): string;",
"function getDisplayName() {\n return lang('Module Name Display Name');\n }",
"function getDisplayName() {\r\n\t\treturn __('plugins.generic.markup.displayName');\r\n\t}",
"function getDisplayName() {\n\t\treturn __('plugins.block.user.displayName');\n\t}",
"function getDisplayName() {\n\t\treturn __('plugins.generic.thesisfeed.displayName');\n\t}",
"public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}",
"public function DisplayName() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['displayName'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"function name()\n\t{\n\t\t$name = $this->CI->session->userdata(AUTH_USER_FRIENDLY_NAME);\n\t\tif ($name)\n\t\t{\n\t\t\treturn $name;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn AUTH_DEFAULT_FRIENDLY_NAME;\t\n\t\t}\n\t}",
"public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }",
"function getDisplayName(){\n\t\treturn $this->display_name;\n\t}",
"public function get_name();",
"public function get_name();",
"public function get_name();",
"public function name() : string\n {\n return call_user_func([get_called_class(), 'resolveName']);\n }",
"public function getName() {\n\n list(,$name) = URLUtil::splitPath($this->principalInfo['uri']);\n return $name;\n\n }",
"function getDisplayName() {\n\t\treturn __('plugins.generic.announcementfeed.displayName');\n\t}",
"public function getName()\n {\n return implode(',', $this->components['CN']);\n }",
"public function getMemberName() {\n return Html::a( $this->user->username, Yii::$app->params['url_admin'].'/user/view?id='.$this->user->id );\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"public function getDisplayName()\n {\n return $this->display_name;\n }",
"protected function getProviderName()\n {\n return SocialServices::GOOGLE;\n }",
"public function getDisplayName() {\n\t\tif ($this->displayName == '') {\n\t\t\treturn ucfirst($this->codeName);\n\t\t}\n\t\treturn ucfirst($this->displayName);\n\t}",
"private function retrieve_name() {\n\t\t$replacement = null;\n\n\t\t$user_id = $this->retrieve_userid();\n\t\t$name = get_the_author_meta( 'display_name', $user_id );\n\t\tif ( $name !== '' ) {\n\t\t\t$replacement = $name;\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"public function getGivenName(): string\n {\n return $this->export('GivenNamePart');\n }",
"function getDisplayName() {\n return lang('Mobile Access');\n }",
"protected function getName()\n {\n return $this->getRequest()->args('name') ?: $this->profile->code . '_' . $this->tpl['name'];\n }",
"public function getRealName() {}",
"public function getDisplayName()\n {\n return $this['display_name'];\n }",
"function getNameHelper(){\n\treturn 'Ejercicio de aprendizaje';\n}",
"public function getDisplayName()\n\t{\n\t\treturn $this->display_name;\n\t}",
"public function getDisplayName()\n\t{\n\t\treturn $this->display_name;\n\t}",
"public function getStrDisplayName() {\n return $this->getStrName();\n }",
"public function getStrDisplayName() {\n return $this->getStrName();\n }",
"public function getNameForDisplay()\n {\n if (null !== $this->getName() && '' !== $this->getName()) {\n return $this->getName();\n } elseif (1 == $this->getRealUserName()) {\n return $this->getUsername();\n }\n\n return $this->getEmail();\n }",
"public function getDisplayHolderNameAttribute()\n {\n if ($this->user_id) return $this->user->displayName;\n return '<a href=\"http://'.$this->alias.'.deviantart.com\">'.$this->alias.'@dA</a>';\n }",
"public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }",
"public function getFriendlyName()\n {\n return $this->friendly_name;\n }",
"public function getFriendlyName()\n {\n return $this->friendly_name;\n }",
"public function GetName() {\n\t\treturn __( 'DB & Integrations ⇪', 'wp-security-audit-log' );\n\t}",
"public function display_name() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn $class::_object()->display_name;\r\n }",
"public function getFullname(): string\n {\n return $this->product->lang->title . ' ' . $this->lang->title;\n }",
"public function getDisplayName()\n {\n return $this->getProperty(\"DisplayName\");\n }",
"public function getDisplayName()\n\t{\n\t\treturn $this->m_oUser->DisplayName;\n\t}",
"public function getShortName() {\r\n $displayName = $this->fname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }",
"public static function displayName(): string\n {\n return Craft::t('enupal-socializer','Socializer');\n }",
"public function display_name() {\r\n\t$class = __CLASS__;\r\n\treturn $class::_object()->display_name;\r\n }",
"public function get_name() {\n return get_string('pluginname', 'local_catmembers');\n }",
"public function getDisplayName()\n {\n return $this->DisplayName;\n }",
"public function getName(): string\n {\n return $this->account->account_name ?? '';\n }",
"function FriendlyName($user,$platform = NULL) {\n\t\t$user = strtolower($user);\n\t\t$platform = strtolower($platform);\n\n\t\t$config = $this->loadPwConfig();\n\t\tif (is_object($config)) {\n\t\t\t$fn = $config->{'user_display'};\n\t\t\tif (is_object($fn)) {\n\t\t\t\tif (isset($fn->{$user.'+'.$platform})) {\n\t\t\t\t\t//print \"user+platform match\";\n\t\t\t\t\treturn $fn->{$user.'+'.$platform};\n\t\t\t\t}\n\t\t\t\telse if (isset($fn->{$user})) {\n\t\t\t\t\t//print \"user match\";\n\t\t\t\t\treturn $fn->{$user};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $user;\n\t}",
"public function handleProviderCallback()\n {\n $user = Socialite::driver('google')->user();\n /* \n 1) Store the user details if not exists else just redirect\n 2) if Auth is using then login using Auth::login($user)\n 3) for passport, store some standard passport for all users\n 4) For multiple socialite option, make param route and replace everywhere option is hard coded\n */\n return $user->name;\n }",
"public function __toString()\n {\n return $this->provider->__toString();\n }",
"public function getDisplayNameAttribute()\n {\n $display_name = $this->profile->display_name;\n \n if (! $display_name) {\n $display_name = explode('@', $this->email)[0];\n }\n\n return $display_name;\n }",
"public function getProviderAlias(): ?string;",
"public function getDisplayname()\n\t{\n\t\treturn $this->displayname;\n\t}",
"public function getName(): string {\n\t\treturn $this->l10nFactory->get($this->appName)->t('Nextcloud announcements');\n\t}",
"function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}",
"public static function getDisplayName()\n {\n return null;\n }",
"public function getName()\n {\n return $this->item['friendly_name'];\n }",
"public function getHumanName();",
"public function get_name() {\n\t\treturn parent::get_widget_slug( 'Team_Member' );\n\t}",
"public function getProvider(): ?string {\n return $this->provider;\n }"
] | [
"0.85860145",
"0.85860145",
"0.85860145",
"0.7950859",
"0.7944409",
"0.7939616",
"0.77767116",
"0.7401992",
"0.7355963",
"0.73398817",
"0.7236504",
"0.7126173",
"0.7097952",
"0.70698315",
"0.7067926",
"0.7067328",
"0.6988047",
"0.6962606",
"0.6920967",
"0.691212",
"0.68840116",
"0.68495095",
"0.6840736",
"0.6838874",
"0.6827359",
"0.6818783",
"0.68087673",
"0.679352",
"0.6790172",
"0.67733955",
"0.6764204",
"0.67633164",
"0.67554146",
"0.67552793",
"0.67485106",
"0.67485106",
"0.67485106",
"0.6742794",
"0.67340666",
"0.67279965",
"0.6717872",
"0.6711481",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.6681212",
"0.66772574",
"0.6628304",
"0.6624897",
"0.662165",
"0.66024315",
"0.660233",
"0.66013676",
"0.65954584",
"0.6593871",
"0.65926856",
"0.65926856",
"0.65921694",
"0.65921694",
"0.65870565",
"0.6579537",
"0.6577032",
"0.6570821",
"0.6570821",
"0.6566689",
"0.6566671",
"0.6564615",
"0.65641",
"0.6557237",
"0.6553321",
"0.65387046",
"0.6537415",
"0.6533072",
"0.65319794",
"0.6530323",
"0.65264726",
"0.6516518",
"0.6508136",
"0.64976156",
"0.6495646",
"0.6495096",
"0.64900565",
"0.6479818",
"0.64744085",
"0.64567196",
"0.64453465",
"0.64435506",
"0.644231"
] | 0.68627405 | 21 |
Return name of parameter which service returns | public function getResponseType()
{
return $this->responseType;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getParameterName();",
"private function getNamedParam()\n {\n return self::BINDING_PREFIX . $this->getLetterBinding();\n }",
"public function getParameterName()\n {\n return $this->parameterName;\n }",
"public function getParameterName(): string\n {\n return \\str_replace('-', '_', $this->parameter->parameter->__toString());\n }",
"function get_parameter($name)\r\n {\r\n if (array_key_exists($name, $this->parameters))\r\n return $this->parameters[$name];\r\n }",
"public function getName()\n {\n return $this->getParameter('name');\n }",
"public function getParam($name);",
"public function getServiceKey()\n {\n return $this->getParameter('serviceKey');\n }",
"protected function getServiceName()\n {\n return $this->argument('service');\n }",
"public function getParameter($name);",
"public function getParameter($name);",
"public function getParameter($name);",
"protected function getName()\n {\n return $this->arguments['name'];\n }",
"public function getParameter()\n\t{\n\t\treturn $this->parameter;\n\t}",
"public static function getParam() {\n\n\t}",
"public function getIdParameter(): string;",
"public function getParam($name) {\n return $this->params[$name];\n }",
"protected function getParameter($name)\n {\n return $this->container->getParameter($name);\n }",
"public function getParameter($name)\n {\n return $this->container->getParameter($name);\n }",
"public function getParameter($name)\n {\n return $this->container->getParameter($name);\n }",
"public function getName() {\n\t\treturn $this->selectedEndpoint['name'];\n\t}",
"public function getParam($name) {\n if (isset($this->parameter[$name])) {\n return $this->parameter[$name];\n }\n }",
"public function getParamNames();",
"protected function get_parameter( $name ) {\n\t\treturn $this->has_parameter( $name ) ? $this->parameters[ $name ] : null;\n\t}",
"function _getParameter( $name, $default='' ) {\n\t\t$return = \"\";\n\t\t$return = $this->params->get( $name, $default );\n\t\treturn $return;\n\t}",
"abstract public function getServiceTypeName();",
"public function getParam($name) {\n return $this->app->getParam($name);\n }",
"public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }",
"public function getParam($name)\n {\n return Tools::getValue($name);\n }",
"public function getBindingMemberName();",
"public function getParam($name)\n {\n return $this->getResponseParam($name);\n }",
"public function getParameter($name){\n\t\treturn Registry::get('router')->get($name);\n\t}",
"public function getPathParamName()\n {\n return $this->path_param_name;\n }",
"protected function infoOfOne(ReflectionParameter $param)\n {\n $class = $param->getClass();\n $hasDefault = $param->isDefaultValueAvailable();\n\n if ($class) return $class->name;\n\n if ($hasDefault) return $param->getDefaultValue();\n\n return '$'.$param->getName();\n }",
"function __get( $name )\n {\n return $this->getParameters( $name );\n }",
"public function getParam($name){\n\t\treturn array_key_exists($name, $this->params) ? $this->params[$name] : NULL;\n\t}",
"public function getParam()\n {\n return $this->param;\n }",
"public function getParam()\n {\n return $this->param;\n }",
"protected function getNameInput()\n {\n return preg_replace('/Endpoint$/', '', trim($this->argument('name'))) . \"Endpoint\";\n }",
"function getParam($name) {\n\t\treturn isset($this->params[$name]) ? $this->params[$name] : null;\n\t}",
"public function getParameter($name)\n {\n return $this->parameters[$name] ?? null;\n }",
"public static function getParameterKeyToken()\n {\n return config('consts.ParameterToken');\n }",
"public function getTranslationParam(string $name);",
"private function getParameterName($serviceName, $configName)\n {\n return sprintf('%s.%s.%s', $this->getAlias(), $serviceName, $configName);\n }",
"public function getParameterType(): string\n {\n return \\str_replace('-', '_', $this->parameter->type->__toString());\n }",
"public function getParameter();",
"public function getParameter();",
"public function getParamDirect($name = \"\");",
"public function genericParam() {\n return $this->_genericParam;\n }",
"public function getNamedStringArgument($name);",
"function param($name)\n{\n return Yii::app()->params[$name];\n}",
"public function paramsNamed()\r\n {\r\n return $this->params_named;\r\n }",
"private function getPageParamName()\n {\n if ($this->pageParam) {\n return $this->pageParam;\n }\n\n return 'page';\n }",
"public function getParameter($name){\n\t\tif(!isset($this->inputParameters[$name])){\n\t\t\tthrow new ValidationException(\"Could not find parameter: {$name}\");\n\t\t}\n\t\treturn $this->inputParameters[$name];\n\t}",
"public function getTesterParameter();",
"public function getParam($name)\n {\n // TODO: Implement getParam() method.\n }",
"public function getConfigName();",
"public function getParameterNames ()\n {\n\n return array_keys($this->parameters);\n\n }",
"function getParam($name) {\n if (isset($this->params[$name])) {\n return $this->params[$name];\n }\n return null;\n }",
"function param($name)\n{\n return Yii::app()->params[$name];\n}",
"public function getNamedValue(): string {\n return self::$namedValues[$this->value];\n }",
"function getParameterNames();",
"private function getParameter($key)\n {\n return $this->parameters->get($key);\n }",
"public function getNamedTypeArgument($name);",
"public function getParameter(string $name): mixed\n {\n return $this->parameters[$name] ?? null;\n }",
"public function getParam1()\n {\n return $this->get(self::_PARAM1);\n }",
"public function getParam1()\n {\n return $this->get(self::_PARAM1);\n }",
"public function getParam1()\n {\n return $this->get(self::_PARAM1);\n }",
"public function getParam1()\n {\n return $this->get(self::_PARAM1);\n }",
"public function getParam1()\n {\n return $this->get(self::_PARAM1);\n }",
"public function getParam1()\n {\n return $this->get(self::_PARAM1);\n }",
"public function serviceName(): string\n {\n return $this->serviceName ??= $this->pluck('npServiceName');\n }",
"public function getProgressParameterOptionName()\n {\n $controller = $this->getController();\n return $controller::SETTING_ID;\n }",
"public function getName () {\n\treturn $this->get('name');\n }",
"public function getNamedParameter($name)\n {\n $name = strtolower($name);\n return isset($this->namedParameters[$name]) ? $this->namedParameters[$name] : null;\n }",
"public function getParameter($name)\n {\n $name = strtolower($name);\n if (isset($this->parameters[$name])) {\n return $this->parameters[$name];\n }\n return null;\n }",
"public function __get($name)\n {\n return $this->getParam($name);\n }",
"function param($name) \n{\n return Yii::app()->params[$name];\n}",
"public function getParam($param);",
"public function getParam (string $key)\n {\n return $this->params[$key];\n }",
"public function get_name();",
"public function get_name();",
"public function get_name();",
"function get_param($name) {\n \n if (isset($_REQUEST[$name])) return $_REQUEST[$name];\n else return \"\";\n}",
"function param($name)\n{\n static $dbParams;\n if(isset(Yii::app()->params[$name]))\n return Yii::app()->params[$name];\n\telse\n return \"\"; \n}",
"public function get_parameter($parameter) {\n\t if (isset($this->decodedWebhook['queryResult']['parameters'][$parameter])) {\n\t\t return $this->decodedWebhook['queryResult']['parameters'][$parameter];\n\t }\n\t\treturn false;\n }",
"public function getParam(string $name)\n {\n if (! isset($this->getParameters()[$name])) {\n throw (new \\Exception('Parameter ' . $name . ' was not found in route', - 1));\n }\n\n return $this->getParameters()[$name];\n }",
"public function getParam($param_name){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}",
"protected function getReflectionParameterName(\\ReflectionParameter $parameter)\n {\n // parameter is a class\n if ($class = $parameter->getClass()) {\n return $class->getName() . ' \\$' . $parameter->getName();\n }\n\n return $parameter->getName();\n }",
"private function generateParameterName(\\ReflectionParameter $parameter)\n {\n $name = $parameter->getName();\n if ($name === '...' && version_compare(PHP_VERSION, '5.6', 'lt')) {\n $name = 'x' . dechex(crc32($name));\n }\n\n return '$' . $name . $parameter->getPosition();\n }",
"public function getArgument(string $name);",
"public function name()\n\t{\n\t\treturn $this->something;\n\t}",
"public function getParameter($name)\n {\n $name = strtolower($name);\n if (isset($this->parameters[$name])) {\n return $this->parameters[$name];\n }\n\n return null;\n }",
"function getServiceName() { return $this->_servicename; }",
"protected function get_param($param) {\n if ($this->params !== null && isset($this->params[$param])) {\n return $this->params[$param];\n } else {\n $staticname = \"default$param\";\n assert(isset(static::$$staticname));\n return static::$$staticname;\n }\n }",
"public function get_parameter(Application $application, $name)\n {\n $parameters = &$this->determine_level($application);\n\n if (array_key_exists($name, $parameters))\n {\n return $parameters[$name];\n }\n }",
"public function getParameters() {}",
"public function getName() {}",
"public function getName() {}",
"public function getName() {}",
"public function getName() {}"
] | [
"0.7640029",
"0.7356018",
"0.7206104",
"0.71635526",
"0.70573443",
"0.67864513",
"0.6783879",
"0.66880584",
"0.6638111",
"0.6614838",
"0.6614838",
"0.6614838",
"0.6573774",
"0.6537814",
"0.6533069",
"0.64999276",
"0.6481746",
"0.64809465",
"0.6474495",
"0.6474495",
"0.6462604",
"0.64322984",
"0.6380363",
"0.63707715",
"0.6367311",
"0.63576317",
"0.63010436",
"0.6288623",
"0.62846756",
"0.62791157",
"0.6268049",
"0.6265501",
"0.6263368",
"0.62595946",
"0.62456894",
"0.6239611",
"0.62320334",
"0.62320334",
"0.6214362",
"0.6197195",
"0.6183037",
"0.61788255",
"0.6168825",
"0.6165899",
"0.6154287",
"0.61460817",
"0.61460817",
"0.6119059",
"0.61183006",
"0.61088777",
"0.6099871",
"0.6098893",
"0.60850686",
"0.60813975",
"0.6074557",
"0.60651326",
"0.606157",
"0.6058217",
"0.60414684",
"0.6038451",
"0.6026633",
"0.6018602",
"0.5996868",
"0.5993611",
"0.5983994",
"0.59715486",
"0.59715486",
"0.59715486",
"0.59715486",
"0.59715486",
"0.59715486",
"0.59702575",
"0.59700143",
"0.5954091",
"0.59446627",
"0.5925309",
"0.5918549",
"0.5917497",
"0.5916545",
"0.5914977",
"0.59016216",
"0.59016216",
"0.59016216",
"0.58977187",
"0.58912355",
"0.5887131",
"0.58818257",
"0.5881411",
"0.5873687",
"0.5872164",
"0.58715606",
"0.5867396",
"0.5852613",
"0.58494544",
"0.5844098",
"0.58412725",
"0.58333784",
"0.5824502",
"0.5824502",
"0.5824502",
"0.5823108"
] | 0.0 | -1 |
Get all components required to build authentication url | abstract public function getAuthUrlComponents(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function auth_url();",
"public function getAuthUrl();",
"public function get_auth_url()\n\t{\n\t\treturn $this->auth_url.'?oauth_token='.$this->get_request_token();\n\t}",
"abstract public function getAuthUri(): string;",
"public function getAuthUrl()\n\t{\n\t\t$tokenData = $this->getRequestToken();\n\t\treturn rtrim($this->_authoriseUrl,'/').'?'.$tokenData;\n\t}",
"public function getAuthUrl()\n\t{\n\t\treturn $this->createAuthUrl();\n\t}",
"abstract protected function getAuthUrl($state);",
"protected function _getAuthUrl()\n {\n\t\t$url = CS_REST_General::authorize_url(\n\t\t\t$this->_getClientId(),\n\t\t\t$this->_getAuthRedirectUri(),\n\t\t\t'ImportSubscribers,ManageLists'\n\t\t);\n\t\t\n return $url;\n }",
"public function get_auth_url()\r\n\t{\r\n\t\treturn PicasaAPI::$QUERY_URLS['auth'];\r\n\t}",
"public function get_auth_string()\n {\n }",
"private function getAuthURL() : string {\n $payload = [\n \"client_id\" => $this->client_data->getClientId(),\n \"scope\" => $this->scope->toString(),\n ];\n\n if ($this->with_redirect) {\n $redirect = $this->client_data->getRedirectUri(1);\n $payload['response_type'] = self::RESPONSE_TYPE_TOKEN;\n } else {\n $redirect = $this->client_data->getRedirectUri(0);\n $payload['response_type'] = self::RESPONSE_TYPE_CODE;\n }\n\n $payload[\"redirect_uri\"] = (empty($this->redirect_params)) ?\n $redirect : $redirect.'?'.http_build_query($this->redirect_params);\n return $this->client_data->getAuthURI(). '?'. http_build_query($payload);\n }",
"function umnshib_buildLoginURL(array $options = array())\n{\n $shib = new BasicAuthenticator();\n return $shib->buildLoginURL($options);\n}",
"public function getAuthUrl()\n {\n return $this->authUrl;\n }",
"public function getAuthUrl()\n {\n return $this->authUrl;\n }",
"public function authenticationURL()\n {\n $clientId = config('twitch-api.client_id');\n $scopes = implode('+', config('twitch-api.scopes'));\n $redirectURL = config('twitch-api.redirect_url');\n return config('twitch-api.api_url') . '/kraken/oauth2/authorize?api_version=5&response_type=code&client_id=' . $clientId . '&redirect_uri=' . $redirectURL . '&scope=' . $scopes;\n }",
"public function getLoginUrl();",
"public function getAuthUrl()\n {\n return $this->client->createAuthUrl();\n }",
"public function getAuthUrl()\n {\n $return = $this->baseUrl .\n '/' . $this->authNamespace .\n '/' . $this->authVersion .\n '/token?url=' . $this->baseUrl . '/' . $this->apiNamespace;\n\n return $return;\n }",
"public function buildPasswordUri(): string;",
"abstract public function getAuthorizeUrl(): string;",
"abstract protected function getTokenUrl();",
"public function getAuthURL() {\n\t\treturn $this->authorization_url.\"?response_type=code&client_id=\".$this->clientID.\"&state=\".$this->state.\"&scope=\".$this->scope;\n\t}",
"public function create_auth_url() {\n\t\t$params = array(\n\t\t\t'response_type' => 'code',\n\t\t\t'redirect_uri' => $this->get_redirect_uri(),\n\t\t\t'client_id' => urlencode( $this->config['client_id'] ),\n\t\t\t'scope' => implode( \" \", $this->config['scopes'] ),\n\t\t\t'access_type' => urlencode( $this->config['access_type'] ),\n\t\t\t'approval_prompt' => urlencode( $this->config['approval_prompt'] )\n\t\t);\n\n\t\treturn self::OAUTH2_AUTH_ENDPOINT . \"?\" . http_build_query( $params );\n\t}",
"public function getAuth();",
"public function getAuth();",
"public static function getAuthUrl() {\n $queryString = http_build_query(\n array( 'client_id' => self::CLIENT_ID,\n 'response_type' => 'code',\n 'redirect_uri' => self::getAbsoluteUrl(array(\n 'controller' => 'oauth',\n 'action' => 'callback',\n 'service' => self::TYPE\n ))\n ));\n $url = self::OAUTH_URL . '?' . $queryString;\n return $url;\n }",
"public function buildLoginUrl(Request $request): string;",
"function fsl_gauth_getauthurl()\n\t{\n\t\n\t$gClient = new Google_Client();\n $gClient->setApplicationName('Login');\n $gClient->setClientId(option('clientId'));\n $gClient->setClientSecret(option('clientSecret'));\n $gClient->setRedirectUri(option('redirectURL')); \n\t//\t$gClient->setHd(option('hd')); \n $google_oauthV2 = new Google_Oauth2Service($gClient);\n $authUrl = $gClient->createAuthUrl();\n return $authUrl;\n}",
"public function getAuthAsString();",
"public function getURL()\n {\n return Config::get('URL') . 'auth/unl/';\n }",
"private function url_params()\n {\n return \"?user={$this->login}&password={$this->password}&answer=json\";\n }",
"function authGet() { }",
"function generate_api_url(){\n\t\t$parameters = array(\n\t\t\t'uid' \t\t => $this->uid,\n\t\t\t'pswd' \t\t => $this->pswd,\n\t\t\t'api' \t\t => $this->api,\n\t\t\t'apiversion' => $this->apiversion\t\t\t\n\t\t);\n\t\t\n\t\tif(!empty($this->sid) && !empty($this->encrypted_pswd)){\n\t\t\t$parameters['sid'] = $this->sid;\n\t\t\t$parameters['pswd'] = $this->encrypted_pswd;\n\t\t}\n\t\t\n\t\t//var_dump($parameters);\n\t\t\n\t\treturn self::api_end_point . '?' . http_build_query($parameters);\n\t}",
"public function getLoginUrl() {\n return $this->client->createAuthUrl();\n }",
"abstract public function getAuthenticator();",
"private function buildUrl() : string\n {\n $redirectUri = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n $params = http_build_query([\n 'openid.ns' => self::OPENID_NS,\n 'openid.mode' => 'checkid_setup',\n 'openid.return_to' => (string) $redirectUri,\n 'openid.realm' => (string) $redirectUri,\n 'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select',\n 'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',\n ]);\n\n return (string) (new Uri($this->getOpenIdUrl().'/login'))->withQuery($params);\n }",
"protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase('https://auth.kodular.io/oska/authorize', $state);\n }",
"function build_url($parts)\n{\n return ( isset($parts['scheme']) ? \"{$parts['scheme']}:\" : '' ) .\n ( ( isset($parts['user']) || isset($parts['host']) ) ? '//' : '' ) .\n ( isset($parts['user']) ? \"{$parts['user']}\" : '' ) .\n ( isset($parts['pass']) ? \":{$parts['pass']}\" : '' ) .\n ( isset($parts['user']) ? '@' : '' ) .\n ( isset($parts['host']) ? \"{$parts['host']}\" : '' ) .\n ( isset($parts['port']) ? \":{$parts['port']}\" : '' ) .\n ( isset($parts['path']) ? \"{$parts['path']}\" : '' ) .\n ( isset($parts['query']) ? \"?{$parts['query']}\" : '' ) .\n ( isset($parts['fragment']) ? \"#{$parts['fragment']}\" : '' );\n}",
"abstract protected function token_url();",
"public function getAuthString()\n {\n }",
"abstract protected function getTokenUrl(): string;",
"public function getAuthorizationUrl(ServerRequest $request);",
"abstract public function getCredentials();",
"public function __construct()\n {\n $this->protocol = api_get_setting('sso_authentication_protocol');\n // There can be multiple domains, so make sure to take only the first\n // This might be later extended with a decision process\n $domains = explode(',', api_get_setting('sso_authentication_domain'));\n $this->domain = trim($domains[0]);\n $this->auth_uri = api_get_setting('sso_authentication_auth_uri');\n $this->deauth_uri = api_get_setting('sso_authentication_unauth_uri');\n //cut the string to avoid recursive URL construction in case of failure\n $this->referer = $this->protocol.$_SERVER['HTTP_HOST'].substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'],'sso'));\n $this->deauth_url = $this->protocol.$this->domain.$this->deauth_uri;\n $this->master_url = $this->protocol.$this->domain.$this->auth_uri;\n $this->referrer_uri = base64_encode($_SERVER['REQUEST_URI']);\n $this->target = api_get_path(WEB_PATH);\n }",
"function buildUrl($parts=array()){\r\n\t$uparts=array();\r\n\tforeach($parts as $key=>$val){\r\n\t\tif(preg_match('/^(PHPSESSID|GUID|debug|error|username|password|add_result|domain_href|add_id|add_table|edit_result|edit_id|edit_table|)$/i',$key)){continue;}\r\n\t\tif(preg_match('/^\\_(login|pwe|try|formfields|action|view|formname|enctype|fields|csuid|csoot)$/i',$key)){continue;}\r\n\t\tif(!is_string($val) && !isNum($val)){continue;}\r\n\t\tif(!strlen(trim($val))){continue;}\r\n\t\tif($val=='Array'){continue;}\r\n\t\tarray_push($uparts,\"$key=\" . encodeURL($val));\r\n \t}\r\n $url=implode('&',$uparts);\r\n return $url;\r\n\t}",
"function authenticateURL() { return 'http://www.tumblr.com/oauth/authorize'; }",
"abstract public function url_authorize();",
"public function urlAuthorize() {\n return $this->host . '/oauth/authorize';\n }",
"public function getAuthorizationURL()\n {\n return $this->get('AuthorizationURL');\n }",
"protected function getLoginUrl(): string\n {\n return $this->urlGenerator->generate(self::LOGIN_ROUTE);\n }",
"function _build_url() {\n\t\t// Add transaction ID for better detecting double requests in AUTH server\n\t\tif($GLOBALS['config']['application']['tid'] == '') $GLOBALS['config']['application']['tid'] = rand(0, 10000);\n\n\t\t$url = $this->url.'&action='.$this->action.'&tid='.$GLOBALS['config']['application']['tid'];\n\t\t\n\t\treturn $url;\n\t}",
"public function prepareAuthParams()\n {\n return [\n 'auth_url' => 'https://accounts.google.com/o/oauth2/v2/auth',\n 'auth_params' => [\n 'client_id' => $this->appId,\n 'redirect_uri' => $this->redirectUri,\n 'response_type' => 'code',\n 'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile'\n ]\n ];\n }",
"function _http_build_url($parts) { \n return implode(\"\", array(\n isset($parts['scheme']) ? $parts['scheme'] . '://' : '',\n isset($parts['user']) ? $parts['user'] : '',\n isset($parts['pass']) ? ':' . $parts['pass'] : '',\n (isset($parts['user']) || isset($parts['pass'])) ? \"@\" : '',\n isset($parts['host']) ? $parts['host'] : '',\n isset($parts['port']) ? ':' . intval($parts['port']) : '',\n isset($parts['path']) ? $parts['path'] : '',\n isset($parts['query']) ? '?' . $parts['query'] : '',\n isset($parts['fragment']) ? '#' . $parts['fragment'] : ''\n ));\n}",
"private function _getLoginUrl(){\r\n\t\t\r\n\t\t$settings = $this->getConnectionSettings();\r\n\t\t\r\n\t\t$base = $this->_loginInstance['production'];\r\n\t\tif ($settings['type'] !== 'production')\r\n\t\t\t$base = $this->_loginInstance['sandbox'];\r\n\t\t\r\n\t\treturn $base . $this->_authUri;\r\n\t}",
"public function GetAuthReqUrl($_endPointURL, array $_params)\r\n\t{\r\n\t\t$_params = $this->CheckAuthRequestParams($_params);\r\n\r\n\t\t//change parameter names\r\n\t\t$_params = $this->ChangeParamNames($_params);\r\n\r\n\t\t//constuct and return url\r\n\t\treturn $_endPointURL . '?' . http_build_query($_params, null, '&');\r\n\t}",
"function build_url(array $parts) {\n return (isset($parts['scheme']) ? \"{$parts['scheme']}:\" : '') . \n ((isset($parts['user']) || isset($parts['host'])) ? '//' : '') . \n (isset($parts['user']) ? \"{$parts['user']}\" : '') . \n (isset($parts['pass']) ? \":{$parts['pass']}\" : '') . \n (isset($parts['user']) ? '@' : '') . \n (isset($parts['host']) ? \"{$parts['host']}\" : '') . \n (isset($parts['port']) ? \":{$parts['port']}\" : '') . \n (isset($parts['path']) ? \"{$parts['path']}\" : '') . \n (isset($parts['query']) ? \"?{$parts['query']}\" : '') . \n (isset($parts['fragment']) ? \"#{$parts['fragment']}\" : '');\n}",
"public function getAuthorizationURL() {\n\t\treturn $this->selectedEndpoint['authorization_url'];\n\t}",
"public function getBaseAuthorizationUrl()\n {\n return 'https://acesso.dgp.eb.mil.br/authorize';\n }",
"public function getUrl()\n {\n if ($this->urlPartsModified) {\n $scheme = $this->getScheme();\n $host = $this->getHost();\n $port = $this->getPort();\n #$user = isset($parsed_url['user']) ? $parsed_url['user'] : '';\n #$pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';\n #$pass = ($user || $pass) ? \"$pass@\" : '';\n $path = $this->getPath();\n $query = !empty($this->urlParts['query']) ? '?' . $this->urlParts['query'] : '';\n\n if ($scheme == 'http' && $port != 80) {\n $port = ':' . $port;\n } else if ($scheme == 'https' && $port != 443) {\n $port = ':' . $port;\n }\n\n $this->url = \"$scheme://$host$port$path$query\";\n }\n\n return $this->url;\n }",
"protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase('https://open.weixin.qq.com/connect/oauth2/authorize', $state);\n }",
"public function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase($this->withStoreName('admin/user/auth'), $state);\n }",
"public function get_user_authorization_url()\n\t{\n\t\tif ($this->auth_oauth_response != SPOAuthClient::OAUTH_USER_AUTH || !$this->oauth_token)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $this->auth_url_userauth . (strpos($this->auth_url_userauth, \"?\") === false ? \"?oauth_token=\" : \"&oauth_token=\") . rawurlencode($this->oauth_token);\n\t}",
"protected function prepareAuthParams()\n {\n return array(\n 'auth_url' => 'https://accounts.google.com/o/oauth2/auth',\n 'auth_params' => array(\n 'redirect_uri' => $this->redirectUri,\n 'response_type' => 'code',\n 'client_id' => $this->clientId,\n 'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.me'\n )\n );\n }",
"public function getBaseAuthorizationUrl()\n {\n return 'https://app.intercom.io/oauth';\n }",
"protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase(\n 'https://login.eveonline.com/oauth/authorize', $state\n );\n }",
"public function getAuthorizationUrl(): string\n {\n // urlAuthorize option and generates and applies any necessary parameters\n // (e.g. state).\n $authorizationUrl = $this->provider->getAuthorizationUrl([\n // Optional, only use this if you want to ask for scopes the user previously denied.\n 'approval_prompt' => 'force',\n // Optional, a list of scopes. Defaults to only 'organizations.read'.\n 'scope' => [\n Mollie::SCOPE_PAYMENTS_READ,\n Mollie::SCOPE_PAYMENTS_WRITE,\n Mollie::SCOPE_REFUNDS_READ,\n Mollie::SCOPE_REFUNDS_WRITE,\n Mollie::SCOPE_CUSTOMERS_READ,\n Mollie::SCOPE_CUSTOMERS_WRITE,\n Mollie::SCOPE_MANDATES_READ,\n Mollie::SCOPE_MANDATES_WRITE,\n Mollie::SCOPE_SUBSCRIPTIONS_READ,\n Mollie::SCOPE_SUBSCRIPTIONS_WRITE,\n Mollie::SCOPE_PROFILES_READ,\n Mollie::SCOPE_PROFILES_WRITE,\n Mollie::SCOPE_INVOICES_READ,\n Mollie::SCOPE_SETTLEMENTS_READ,\n Mollie::SCOPE_ORDERS_READ,\n Mollie::SCOPE_ORDERS_WRITE,\n Mollie::SCOPE_SHIPMENTS_READ,\n Mollie::SCOPE_SHIPMENTS_WRITE,\n Mollie::SCOPE_ORGANIZATIONS_READ,\n Mollie::SCOPE_ORGANIZATIONS_WRITE,\n Mollie::SCOPE_ONBOARDING_READ,\n Mollie::SCOPE_ONBOARDING_WRITE,\n ],\n ]);\n\n return $authorizationUrl;\n }",
"public function authLink() {\n return $this->direct();\n }",
"public function getLoginUrlParams() {\n\t\treturn array(\n\t\t\t\"scope\" => array_values($this->config()->get(\"permissions\"))\n\t\t);\n\t}",
"public function getAuthorizationUrl()\n {\n // Check for required items\n if (!$this->clientId) {\n throw new Exception('Client ID is required');\n }\n if (!$this->scope) {\n throw new Exception('Scope is required');\n }\n if (!$this->redirectUri) {\n throw new Exception('Redirect URI is required');\n }\n\n // Start building url (enpoint is the same for public and member APIs)\n $url = 'https://';\n $url .= (!empty($this->environment)) ? $this->environment . '.' : '';\n $url .= self::HOSTNAME . '/' . self::AUTHORIZE;\n $url .= '?client_id=' . $this->clientId;\n $url .= '&scope=' . $this->scope;\n $url .= '&redirect_uri=' . urlencode($this->redirectUri);\n $url .= '&response_type=code';\n\n // Process non-required fields\n $url .= ($this->showLogin) ? '&show_login=true' : '';\n $url .= (isset($this->state)) ? '&state=' . $this->state : '';\n $url .= (isset($this->familyNames)) ? '&family_names=' . $this->familyNames : '';\n $url .= (isset($this->givenNames)) ? '&given_names=' . $this->givenNames : '';\n $url .= (isset($this->email)) ? '&email=' . urlencode($this->email) : '';\n\n return $url;\n }",
"public function urlAuthorize() {\n return $this->api_location.\"/authorize\";\n }",
"public function urlAuthorization()\n {\n return 'https://api.twitter.com/oauth/authenticate';\n }",
"public function getBaseAuthorizationUrl()\n {\n return $this->webUrl . '/oauth/authorize';\n }",
"public function getBaseAuthorizationUrl()\n {\n return 'https://redbooth.com/oauth2/authorize';\n }",
"protected function getAuthUrl($state): string\n {\n return $this->buildAuthUrlFromBase($this->getAuthorizeUrl(), $state);\n }",
"function url_with_auth_token($url) {\n // use global $query_params that was initialized during auth check on page load\n global $query_params;\n\n // no auth info, return original url\n if ($query_params['token'] == \"\" || $query_params['uuid'] == \"\") {\n echo $url;\n return;\n }\n\n $uri_parts = explode('?', $url, 2);\n if (isset($uri_parts[1]) && ($uri_parts[1] == \"\")) {\n $url .= \"?\";\n } else {\n $url .= \"&\";\n }\n\n $url .= \"token=\".$query_params['token'].\"&uuid=\".$query_params['uuid'];\n echo $url;\n}",
"public function woo_slg_linkedin_auth_url() {\n\t\t\t\n\t\t\t//Remove unused scope for login\n\t\t\t\n\t\t\t$scope\t= array( 'r_emailaddress', 'r_liteprofile' );\n\t\t\t\n\t\t\t//load linkedin class\n\t\t\t$linkedin = $this->woo_slg_load_linkedin();\n\t\t\t\n\t\t\t//check linkedin loaded or not\n\t\t\tif( !$linkedin ) return false;\n\t\t\t\n\t\t\t//Get Linkedin config\n\t\t\t$config\t= $this->linkedinconfig;\n\t\t\t\n\t\t\ttry {//Prepare login URL\n\t\t\t\t$preparedurl\t= $this->linkedin->getAuthorizeUrl( $config['appKey'], $config['callbackUrl'], $scope );\n\t\t\t} catch( Exception $e ) {\n\t\t\t\t$preparedurl\t= '';\n\t }\n\t \n\t\t\treturn $preparedurl;\n\t\t}",
"public function getTokenUrl();",
"protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase('https://bitbucket.org/site/oauth2/authorize', $state);\n }",
"public function authentication() {\n return $this->username() . ':' . $this->password();\n }",
"public function getBaseAuthorizationUrl(): string\n {\n return $this->domain . '/id/authorize';\n }",
"protected function _generateOpauthCompleteUrl()\n {\n $url = Configure::read('Opauth.complete_url');\n if (!is_array($url)) {\n $url = Router::parse($url);\n }\n $url['?'] = ['social' => $this->request->query('code')];\n return Router::url($url, true);\n }",
"public function getLoginUrl() {\n $url = CURL::urljoin($this->authorization_uri, array(\n 'client_id' => $this->client_id,\n 'scope' => $this->scope,\n 'response_type' => 'code',\n 'redirect_uri' => $this->getConnectUrl(),\n 'state' => $this->state,\n 'display' => 'popup',\n ));\n return $url;\n }",
"public function getAuthUrl ()\n {\n\n $url = 'https://oauth.vk.com/authorize?client_id='.$this->client_id.'&scope=photos,friends&redirect_uri='.$this->redirect_uri.'&response_type=code&v=5.0';\n return $url;\n }",
"protected function getAuthUrl($state)\n {\n return $this->buildAuthUrlFromBase($this->baseUrl.'/oauth2.0/authorize', $state);\n }",
"public function getAuthEndpoint()\n\t{\n\t\treturn $this->authEndpoint;\n\t}",
"public function doAuthentication();",
"public function get_endpoint_login_url() {\n\t\treturn $this->endpoint_login;\n\t}",
"protected function getAuthBase() {\n $region = $this->client->getClassConfig($this, 'region');\n if ($region == BattleNet_Config::REGION_CN) {\n return self::BATTLENET_URL_BASE_CHINA;\n }\n return str_replace('{region}', $region, self::BATTLENET_URL_BASE);\n }",
"protected function generateString()\n\t{\n\t\t// start with the scheme\n\t\t$url = $this->scheme . '://';\n\t\t\n\t\t// user and password\n\t\tif( !empty( $this->user ) )\n\t\t{\n\t\t\t$url .= $this->user;\n\t\t\tif( !empty( $this->pass ) ) $url .= ':'.$this->pass.'@';\n\t\t\telse $url .= '@';\n\t\t}\n\t\t\n\t\t// add the host and path\n\t\t$url .= $this->host . '/';\n\t\t$url .= $this->path;\n\t\t\n\t\t// add the URL-encoded parameters\n\t\tif( !empty( $this->params ) )\n\t\t{\n\t\t\t$url .= '?';\n\t\t\tforeach( $this->params as $f => $v ) $url .= $f . '=' . urlencode( $v ) . '&';\n\t\t\t$url = rtrim( $url, '&' );\n\t\t}\n\t\t\n\t\t// add the anchor if any\n\t\tif( !empty( $this->anchor ) ) $url .= '#' . $this->anchor;\n\t\t\n\t\t$this->url = $url;\n\t\t$this->modified = false;\n\t\treturn $url;\n\t}",
"public function getPathAuthRequired()\n {\n }",
"public function setAuthenticationParams() {\n }",
"public function buildAuthUrl(array $params = [])\n {\n\n $defaultParams = [\n 'appid' => $this->clientId,\n 'redirect_uri' => $this->getReturnUrl(),\n 'response_type' => 'code',\n 'scope' => $this->scope,\n 'state' => $this->getredirectSuccessUrl(),\n '#wechat_redirect',\n ];\n return $this->composeUrl($this->authUrl, array_merge($defaultParams, $params));\n }",
"function buildAuthUrl($frob ='', $key = '', $secret = '', $perms = 'delete') {\n\t\t$params = array();\n if ($frob != '') {\n $params['frob'] = $frob;\n }\n\t\tif ($key == '') {\n\t\t\t$key = $this->modx->getOption('xflickr.api_key');\n\t\t}\n\t\tif ($secret == '') {\n\t\t\t$secret = $this->modx->getOption('xflickr.api_secret');\n\t\t}\n\t\t$params['api_key'] = $key;\n\t\t$params['perms'] = $perms;\n //return 'http://flickr.com/services/auth/?'.$this->signParams($params);\n $signing = '';\n $values = array();\n ksort($params);\n foreach($params as $key => $value) {\n\t\t\t$signing .= $key . $value;\n\t\t\t$values[] = $key . '=' . urlencode($value);\n }\n $values[] = 'api_sig=' . md5($secret . $signing);\n return 'http://flickr.com/services/auth/?'.implode('&', $values);\n }",
"abstract public function getUrlForAuthorizeInTokenService($mode = 'modal');",
"public function getUsers()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'user%2c password from users%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}",
"public function get_url_params()\n {\n }",
"public function getUserAuthorizationUrl()\n {\n return $this->getAuthorizeUrl();\n }",
"function genAuthURL($perms)\n\t{\n\t\t$args['perms'] = $perms;\n\t\t$api_sig = md5($this->api_sig(false,$args));\n\t\treturn 'http://www.rememberthemilk.com/services/auth/?api_key='.$this->apikey.'&perms='.$perms.'&api_sig='.$api_sig;\n\t}",
"protected function buildAuthUrlFromBase($url, $state): string\n {\n return $url . '?' . http_build_query($this->getCodeFields($state), '', '&', $this->encodingType);\n }",
"public function generateAuthUrl(Request $request)\n {\n return $this->setCurrentBankInSession($request, 'monzo')->authorizer->generateAuthUrl('https://auth.monzo.com/');\n }"
] | [
"0.73218894",
"0.7157372",
"0.6832804",
"0.67731714",
"0.64764035",
"0.6465385",
"0.64473003",
"0.62885475",
"0.6278464",
"0.62723607",
"0.6253919",
"0.6215553",
"0.617608",
"0.617608",
"0.6171891",
"0.61702204",
"0.6094732",
"0.6073644",
"0.60662067",
"0.6051898",
"0.6014222",
"0.60117775",
"0.59924567",
"0.59795237",
"0.59795237",
"0.59658504",
"0.593165",
"0.5868144",
"0.5852302",
"0.58340997",
"0.5817533",
"0.57942814",
"0.57824945",
"0.57761216",
"0.57661366",
"0.57587284",
"0.57446706",
"0.57098895",
"0.5709407",
"0.57092094",
"0.5702464",
"0.5690217",
"0.56462455",
"0.5641976",
"0.5628777",
"0.56048846",
"0.5604271",
"0.56036925",
"0.56026787",
"0.55932385",
"0.55917555",
"0.55887645",
"0.5588438",
"0.55854857",
"0.55778074",
"0.5561199",
"0.55596715",
"0.5556071",
"0.5543172",
"0.5524079",
"0.5518602",
"0.55013347",
"0.54992586",
"0.5491224",
"0.54895127",
"0.5483414",
"0.5481659",
"0.5477075",
"0.54745704",
"0.54733187",
"0.5462582",
"0.5462571",
"0.5458484",
"0.5457751",
"0.54575616",
"0.54536283",
"0.545335",
"0.5452281",
"0.5449539",
"0.54484123",
"0.544191",
"0.54381764",
"0.5429897",
"0.5421172",
"0.5417435",
"0.5407016",
"0.54053336",
"0.5403526",
"0.54019487",
"0.5391104",
"0.53893673",
"0.53836757",
"0.5381646",
"0.5375195",
"0.53678083",
"0.5360964",
"0.53565955",
"0.5351981",
"0.5351157",
"0.5343723"
] | 0.85969174 | 0 |
Make post request and return result | protected function post($url, $params, $parse = true)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, urldecode(http_build_query($params)));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
curl_close($curl);
if ($parse) {
$result = json_decode($result, true);
}
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function post_post()\n\t{\n\t\ttry {\n\t\t\t$results = Articles::regist( self::$_JSON );\n\t\t\t//\\Log::warning(print_r($results, true));\n\n\t\t\treturn $this->response($results, 200);\n\t\t} catch (\\MarcoPandaException $e) {\n\t\t\t$this->error($e);\n\t\t}\n\t}",
"public function post() {\n\t\treturn $this->execute(true);\n\t}",
"public function post();",
"public function post();",
"public function post();",
"function post(Request &$request, Response &$response);",
"public function postData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken();\n\t\t$ch = curl_init($url);\n\t\t$requestBody = $this->bodyBuilder();\n\t\t//debug\n\t\t//print_r($requestBody);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json','Content-Type: application/json'));\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);\n\t\tcurl_getinfo($ch);\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}",
"public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }",
"abstract public function post($data);",
"public function post()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'POST';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData($this->getData());\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_POSTFIELDS, $this->getData());\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'POST::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'POST::DATA', $this->getData());\n Log::write('WebRequest', 'POST::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'POST::RESPONSE', $sOutput);\n\n $this->setData('');\n\n if (!in_array($iHTTPCode, [200, 201, 204])) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200|201 on [POST] ' . $this->getApiRoot() . $this->getApiResource());\n }\n return $sOutput;\n }",
"private function POST() {\n global $_POST;\n $postData = array();\n foreach($_POST as $key => $value) {\n $postData[$key] = $value;\n }\n $this -> response[\"response\"] = $postData;\n return;\n }",
"abstract public function post();",
"public function postRequest(SS_HTTPRequest $request, SS_HTTPResponse $response, DataModel $model);",
"function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }",
"function post_request($url, $param)\n{\n //リクエスト時のオプション指定\n $options = array(\n 'http' => array(\n 'method' => 'POST', //ここでPOSTを指定\n 'header' => array(\n 'Content-type: application/x-www-form-urlencoded',\n 'User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1'\n ),\n 'content' => http_build_query($param),\n 'ignore_errors' => true,\n 'protocol_version' => '1.1'\n ),\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false\n )\n );\n\n //リクエスト実行\n $contents = @file_get_contents($url, false, stream_context_create($options));\n\n //ステータスコード抜粋\n preg_match('/HTTP\\/1\\.[0|1|x] ([0-9]{3})/', $http_response_header[0], $matches);\n $statusCode = (int)$matches[1];\n\n //配列で返すためにjsonのエンコード\n $contents_array = array();\n if($statusCode === 200){\n $contents_array = json_decode($contents);\n }\n return $contents_array;\n}",
"private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }",
"public function login_post(){\n\t\t$data=($_POST);\n\n\t\t$result = $this->login_model->login($data);\n\t\treturn $this->response($result);\t\t\t\n\t}",
"function PPHttpPost($url_, $postFields_, $parsed_)\n\t{\n\t\t//setting the curl parameters.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL,$url_);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t\t//turning off the server and peer verification(TrustManager Concept).\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t\t//setting the nvpreq as POST FIELD to curl\n\t\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$postFields_);\n\n\t\t//getting response from server\n\t\t$httpResponse = curl_exec($ch);\n\n\t\tif(!$httpResponse) {\n\t\t\treturn array(\"status\" => false, \"error_msg\" => curl_error($ch), \"error_no\" => curl_errno($ch));\n\t\t}\n\n\t\tif(!$parsed_) {\n\t\t\treturn array(\"status\" => true, \"httpResponse\" => $httpResponse);\n\t\t}\n\n\t\t$httpResponseAr = explode(\"\\n\", $httpResponse);\n\n\t\t$httpParsedResponseAr = array();\n\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t}\n\t\t}\n\n\t\tif(0 == sizeof($httpParsedResponseAr)) {\n\t\t\t$error = \"Invalid HTTP Response for POST request($postFields_) to $url_.\";\n\t\t\treturn array(\"status\" => false, \"error_msg\" => $error, \"error_no\" => 0);\n\t\t}\n\t\treturn array(\"status\" => true, \"httpParsedResponseAr\" => $httpParsedResponseAr);\n\n\t}",
"public function post($t);",
"public function post($url, $body){\n\t\t\n\t\t// do we even need this?\n\t\t// $headers = array('Content-Type: application/x-www-form-urlencoded')\n\t\t\n\t\treturn $this->doRequest('POST', $url, $body);\n }",
"public function post($request);",
"public function post(): ModifiedResourceResponse {\n\n //get parameters\n $id = null; // is assigned with create\n $datum = Drupal::request()->query->get('datum');\n $instructeur = Drupal::request()->query->get('instructeur');\n $weer = Drupal::request()->query->get('weer');\n $verslag = Drupal::request()->query->get('verslag');\n\n $dagverslagRecord = $this->processDagverslag(\n $id,\n $datum,\n $instructeur,\n $weer,\n $verslag);\n\n // write dagverslag record to database\n $id = $dagverslagRecord->create();\n return new ModifiedResourceResponse($id, 200);\n }",
"function post($url, $args = array()) {\n\t\t$defaults = array('method' => 'POST');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}",
"public function post($url, $data = array()) {\n\t\treturn $this->request($url, $data, true);\n\t}",
"function post($url, $parameters = array()) {\n\t\t$response = $this->oAuthRequest($url, 'POST', $parameters);\n\t\tif ($this->type === 'json' && $this->decode_json) {\n\t\t\treturn json_decode($response);\n\t\t}elseif($this->type == 'xml' && function_exists('simplexml_load_string')){\n\t\t\treturn simplexml_load_string($response);\n\t\t}\n\t\treturn $response;\n\t}",
"function callRemitaApiPost($endPoint, $postData) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endPoint);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen(json_encode($postData)))\n );\n $output = curl_exec($ch);\n return $output;\n}",
"function do_post_request($url, $data, $optional_headers = null)\n {\n\t \n$params = array('http' => array(\n 'method' => 'POST',\n 'content' => $data\n ));\n if ($optional_headers !== null) {\n $params['http']['header'] = $optional_headers;\n }\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) {\n throw new Exception(\"Problem with $url, $php_errormsg\");\n }\n $response = @stream_get_contents($fp);\n if ($response === false) {\n throw new Exception(\"Problem reading data from $url, $php_errormsg\");\n }\n\t //print_r($response);\n return $response;\n }",
"protected function execCurl() \n\t{\t\t\t\n\t\tif ( $this->sandbox == true )\n\t\t{\n\t\t\t$server = $this->_server['sandbox'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$server = $this->_server['live'];\n\t\t}\n\n\t\t$url = $server . $this->adhocPostUrl;\n\t\t\n\t\t$headers = array(\n\t\t\t'Content-type: application/x-www-form-urlencoded',\n\t\t\t'Authorization: GoogleLogin auth=' . $this->getAuthToken(),\n\t\t\t'developerToken: ' . $this->developerToken,\n\t\t\t'clientCustomerId: ' . $this->clientCustomerId,\n\t\t\t'returnMoneyInMicros: true',\n\t\t\t\t\t\t\n\t\t);\n\n\t\t$data = '__rdxml=' . urlencode( $this->__rdxml );\n\t\t\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $data );\n\t\tcurl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, FALSE );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );\n\t\tcurl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );\n\t\t\n\t\t$response = curl_exec( $ch );\n\t\t$httpCode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\t$error = curl_error( $ch );\n\t\tcurl_close( $ch );\n\t\t\n\t\tif( $httpCode == 200 || $httpCode == 403 )\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( !empty( $error ) )\n\t\t\t{\n\t\t\t\tthrow new exception( $httpCode . ' - ' . $error );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new exception( $httpCode . ' - Unknow error occurred while post operation.' ); \n\t\t\t}\n\t\t}\n\t}",
"function request_post_api($url=\"\",$post=\"\") {\n\tif(empty($url))\n\t\treturn false;\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tif($post){\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); \t\t\n\t}\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}",
"function post($request, $key=VANCO_KEY, $session = FALSE, $user_id = VANCO_USER_ID, $password = VANCO_PASSWORD) {\n ##Data Post\n $request_id = generateRequestID();\n $postfields = array('nvpvar' => \"$request&requestid=$request_id\");\n #echo $postfields['nvpvar'].\"<br>\";\n if($session) { #Only used if the post needs a sessionid as specified by VANCO's API\n $postfields['sessionid'] = open_session($user_id, $password, $key);\n }\n $result = new_post($postfields, VANCO_WSNVP);\n $result = str_replace('nvpvar=', '', $result);\n try {\n $result = my_unpack($result, $key);\n } catch (Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"<BR>\\n\";\n }\n parse_str($result, $value);\n if($request_id != $value['requestid']) {\n throw new Exception(\"Invalid requestid returned by server. Original id: '$request_id', response: '$result'\");\n }\n return $value;\n}",
"static function post($url, $body = null, $headers = array()) {\n $request = new NiceHTTP\\PostRequest($url, $body, $headers);\n return $request->send();\n }",
"function httpPOST($url, $data)\n{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n return $response;\n}",
"public function post()\n\t{\n\t\t\n\t\t$this->plugin->setResponse( $result );\n\t}",
"public function post($post);",
"function post($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'POST', 'body' => $data), $options));\n\t}",
"function post($key)\n{\n\treturn System::request()->post($key);\n}",
"function doPost($url, $post = array() , $format = 'plain')\n{\n return curlExecute($url, 'post', $post, $format);\n}",
"public function postCurlCall($url, $post_params){\n return $this->utilities->curlPost($url, $post_params);\n }",
"private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }",
"public function postAction()\n {\n return $this->handleCreateRequest();\n }",
"function http_post($url, $params = array()) {\n $postData = '';\n //create name value pairs seperated by &\n foreach ($params as $k => $v) {\n $postData .= $k . '=' . $v . '&';\n }\n $postData = rtrim($postData, '&');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_POST, count($postData));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n $output = curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}",
"public function post(){\n $app = JFactory::getApplication();\n $db = JFactory::getDbo();\n\n $body = json_decode(file_get_contents('php://input'), TRUE);\n\n if (!array_key_exists('syncResponse', $body)) {\n $ex = new ApiException('missing response',400);\n throw $ex;\n }\n\n $syncResponse = $body['syncResponse'];\n $RR = json_encode( $syncResponse);\n\n // table data to sync\n $spResult = null;\n $db->setQuery('CALL SyncPullResponse(' .\n $db->quote($syncResponse['DeviceId']) . ',' .\n $db->quote($syncResponse['TableName']) . ',' .\n $db->quote($syncResponse['State']) . ',' .\n $db->quote($syncResponse['CurrentSyncId']) . ',' .\n $db->quote($RR) . ');');\n\n $resi = $db->loadResult();\n\n // TODO: what to return?\n $response = new stdClass();\n $response->result = $resi;\n $this->plugin->setResponse( $response );\n\n if (strcmp($resi, \"success\") <> 0) {\n $ex = new ApiException('wrong response',400, $syncResponse);\n throw $ex;\n }\n\n }",
"function restPost($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}",
"public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}",
"function submit($returnArray = false) { if (!function_exists('curl_init')) {\r\n die('Sorry cURL is not installed!');\r\n }\r\n\r\n // OK cool - then let's create a new cURL resource handle\r\n $ch = curl_init();\r\n\r\n // Now set some options (most are optional)\r\n // Set URL to download\r\n curl_setopt($ch, CURLOPT_URL, BUGZILLA_URL);\r\n\r\n $post = $this->toXML();\r\n\r\n //Identifies the call by its method name\r\n $name = new SimpleXMLElement($post);\r\n $this->requestID = (string) $name->methodName;\r\n \r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post); \r\n\r\n //echo $post;\r\n // Include header in result? (1 = yes, 0 = no)\r\n curl_setopt($ch, CURLOPT_HEADER, 0);\r\n\r\n // Should cURL return or print out the data? (true = return, false = print)\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml'));\r\n\r\n // Timeout in seconds\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 100000);\r\n\r\n // Download the given URL, and return output\r\n $output = curl_exec($ch);\r\n \r\n \r\n //For 1500 bugs: 3784845\r\n //For 1000 bugs: 2686061\r\n //echo $output;\r\n // Close the cURL resource, and free system resources\r\n curl_close($ch);\r\n if ($returnArray) {\r\n return $this->toPHP($output);\r\n } else {\r\n return $this->toJson($output);\r\n }\r\n }",
"function post_to_url($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server \n return $result; //output from server displayed \n curl_close($post);\n}",
"function post($url, $parameters = array(), $multi = false) {\n\t\t$response = $this->oAuthRequest($url, 'POST', $parameters, $multi );\n\t\tif ($this->format === 'json' && $this->decode_json) {\n\t\t\treturn json_decode($response, true);\n\t\t}\n\t\treturn $response;\n\t}",
"public function postAction()\n {\n $manager = new \\Art4\\JsonApiClient\\Utils\\Manager();\n $manager->setConfig('optional_item_id', true);\n // @todo handle validation errors\n $document = $manager->parse($this->request->getRawBody());\n $resource = $this->resource->getModel();\n\n // basic attributes\n foreach ($document->get('data')->get('attributes')->asArray(true) as $key => $value) {\n $resource->{$key} = $value;\n }\n\n // @todo handle saving errors\n $resource->save();\n\n return $this->renderSerialized($resource);\n }",
"public function postExecution($request){}",
"public static function sendPostRequest(String $resource, array $data)\n {\n static::init();\n $curl = new UKMCURL();\n $curl->json($data);\n $curl->requestType(\"POST\");\n $curl->user('userpwd:' . static::$api_key);\n\n return new Result($curl->request(static::_getUrl($resource)));\n }",
"private function getPost()\n {\n if ($this->end_point === null) {\n throw new \\DomainException('End-point can\\'t be null when call '.__METHOD__);\n }\n \n if ($this->filesize === null) {\n throw new \\DomainException('Filesize can\\'t be null when call '.__METHOD__);\n }\n \n $handle = curl_init();\n $custom_headers = array();\n \n curl_setopt($handle, CURLOPT_URL, $this->end_point);\n curl_setopt($handle, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_POST, true);\n curl_setopt($handle, CURLOPT_FAILONERROR, true);\n curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, self::TIMEOUT);\n curl_setopt($handle, CURLOPT_BUFFERSIZE, 64000);\n curl_setopt($handle, CURLOPT_HTTPHEADER, array(\n 'Content-Length: 0',\n 'Final-Length: '.$this->filesize,\n ));\n curl_setopt($handle, CURLOPT_HEADERFUNCTION, function($ch, $header) use (&$custom_headers){\n $headers = array();\n $extract = explode(\"\\r\\n\", $header);\n foreach ($extract as $line) {\n if (preg_match('/^([a-z0-9_-]+): (.*)$/i', $line, $matches)) {\n list($null, $key, $value) = $matches;\n $headers[$key] = $value;\n }\n }\n\n $custom_headers = array_merge($custom_headers, $headers);\n\n return strlen($header);\n });\n \n if (curl_exec($handle) === false) {\n throw new Exception\\Curl('Error while request POST into '.$this->end_point.' : '.curl_error($handle), curl_errno($handle));\n }\n \n $http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n \n if ($http_code !== 201) {\n throw new Exception\\BadHeader('Error while request POST - excepted HTTP Code 201 - get HTTP Code '.$http_code);\n }\n \n $info = array_merge($custom_headers, curl_getinfo($handle));\n curl_close($handle);\n \n return $info;\n }",
"function submitOrder() {\n\techo \"Submitting Order </br>\";\n\t$data = createOrder();\n\t$response = postRequest('/api/order', $data);\n\tprintInfo($response);\n}",
"public function perform()\n\t\t{\n##\t\t\t$data_string = json_encode($data);\n\t\t\t$ch = curl_init($this->endpoint);\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request_type);\n\n\t\t\tif ($this->payload != NULL)\n\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this->payload);\n\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t#curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json'));\n\t\t\t\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\t\t\t\n\t\t\t$this->result = curl_exec($ch);\n\t\t\t\n\t\t\tif ($ret = json_decode($this->result,true))\n\t\t\t\treturn $ret;\n\t\t\telse\n\t\t\t\tdie(\"ERROR: $this->result\");;\n\t\t\treturn json_decode($this->result,true);\n\t\t}",
"function post_request($url, $port, $dataid, $tStamp, $encodedSignature, $data, $referer = '')\n {\n //$data = http_build_query($data);\n\n // parse the given URL\n $url = parse_url($url);\n\n if ($url['scheme'] != 'http') {\n die('Error: Only HTTP request are supported !');\n }\n\n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n\n // open a socket connection on port 80 - timeout: 50 sec\n $fp = fsockopen($host, $port, $errno, $errstr, 50);\n\n if ($fp) {\n\n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n\n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n\n fputs($fp, \"x-cons-id: \" . $dataid . \"\\r\\n\");\n fputs($fp, \"x-timestamp: \" . $tStamp . \"\\r\\n\");\n fputs($fp, \"x-signature: \" . $encodedSignature . \"\\r\\n\");\n fputs($fp, \"Content-Type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \" . strlen($data) . \"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n\n $result = '';\n while (!feof($fp)) {\n // receive the results of the request, 128 char\n $result .= fgets($fp, 128);\n }\n } else {\n return array(\n 'status' => 'err',\n 'error' => \"$errstr ($errno)\"\n );\n }\n\n // close the socket connection:\n fclose($fp);\n\n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n\n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n\n }",
"protected function postRequest($data) {\n $ch = curl_init($this->post_url);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type:application/xml',\n 'Gepg-Com:default.sp.in',\n 'Gepg-Code:' . $this->sp_code,\n 'Content-Length:' . strlen($data))\n );\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n $resultCurlPost = curl_exec($ch);\n curl_close($ch);\n\t\t\n\t\t//to be separated\n\t\t$date_createdsc=date(\"Y-m-d H:i:s\");\n\t\t\tYii::$app->db->createCommand()\n ->insert('gepg_bill7', [\n 'response_message' =>$data,\n 'date_created' =>$date_createdsc, \n ])->execute();\n\t\t//end to be separate\t\t\n return $resultCurlPost;\n }",
"function postDataToServerUsingCurl( $post, $rel_url )\n\t{\n\t\t$url\t\t= \"https://api.razorpay.com/v1/\" . $rel_url;\n\t\t$post_json = json_encode($post);\n\t\t$headers = array();\n\t\t$headers[] = \"Content-Type: application/json\";\n\t\t$options = array(\n\t\t\tCURLOPT_POST\t\t => true,\n\t\t\tCURLOPT_POSTFIELDS\t => $post_json,\n\t\t\tCURLOPT_URL\t\t\t => $url,\n\t\t\tCURLOPT_USERPWD\t\t => $this->password,\n\t\t\tCURLOPT_RETURNTRANSFER => true, // return web page\n\t\t\tCURLOPT_HTTPHEADER\t => $headers,\n\t// CURLOPT_HEADER => false, // don't return headers\n\t// CURLOPT_FOLLOWLOCATION => true, // follow redirects\n\t// CURLOPT_ENCODING => \"\", // handle all encodings\n\t// CURLOPT_USERAGENT => \"spider\", // who am i\n\t// CURLOPT_AUTOREFERER => true, // set referer on redirect\n\t\t\tCURLOPT_CONNECTTIMEOUT => 20, // timeout on connect\n\t\t\tCURLOPT_TIMEOUT => 120, // timeout on response\n\t\t\tCURLOPT_MAXREDIRS => 10, // stop after 10 redirects\n\t\t\tCURLOPT_SSL_VERIFYPEER => true, // enable SSL Cert checks\n\t\t\tCURLOPT_SSL_VERIFYHOST => 2,\n\t\t\tCURLOPT_SSLVERSION\t => CURL_SSLVERSION_TLSv1_2\n\t\t);\n\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt_array( $ch, $options );\n\t\t$result = curl_exec( $ch );\n\t\tif (curl_errno($ch))\n\t\t {\n\t\t\techo 'Error:' . curl_error($ch);\n\t\t }\n\t\tcurl_close( $ch );\n\t\treturn json_decode($result);\n\t}",
"public function doPost(array $parsed_body);",
"public function post() {\n if (!$this->data instanceof stdClass)\n throw new Exception('Invalid Request Object', 400);\n\n $this->data->accountId = models\\Account::current()->id;\n\n $locker = models\\Locker::new($this->data)->validate()->save();\n\n // send the response\n $this->send($locker);\n }",
"public function request_post($uri, array $options = array()) {\n $options['method'] = 'POST';\n return $this->request($uri, $options);\n }",
"function do_post_request($url, $data, $optional_headers = null)\n{\n $params = array('http' => array(\n 'method' => 'POST',\n 'content' => $data\n ));\n if ($optional_headers !== null) {\n $params['http']['header'] = $optional_headers;\n }\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) {\n throw new Exception(\"Problem with $url, $php_errormsg\");\n }\n $response = @stream_get_contents($fp);\n if ($response === false) {\n throw new Exception(\"Problem reading data from $url, $php_errormsg\");\n }\n return $response;\n}",
"public function _POST($url, $params = null, $username = null, $password = null, $contentType = null)\n {\n $response = $this->call($url, 'POST', $params, $username, $password, $contentType);\n //$this->convertEncoding($response,'utf-8',$this->_encode)\n return $this->json_foreach($this->parseResponse($response));\n }",
"public function post($data = null)\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest($data);\n }",
"public function httpPost($redirectTo = null) : string;",
"private function makeRequest()\n {\n $credentials = $this->generateCredentials();\n\n return $this->engine->client->request('POST', $this->endpoint, [\n 'json' => $credentials,\n 'headers' => [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json',\n ],\n ]);\n }",
"function httpPOST($url, array $data, $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n $query = http_build_query($data, '', '&');\n ($headers = trim($headers) === '') or $headers .= \"\\r\\n\";\n\n $headers = \"POST $url HTTP/1.0\\r\\n\".\n $headers.\n \"Content-Type: application/x-www-form-urlencoded\\r\\n\".\n \"Content-Length: \".strlen($query).\"\\r\\n\".\n \"$query\\r\\n\";\n\n $this->write($headers);\n return $this->readAllAndClose();\n }",
"function ccweb_httpPost2($url, $data, &$outResponse) { \r\n $params = array('http' => array('method' => 'POST', 'content' => $data)); \r\n $context = stream_context_create($params);\r\n\r\n $fh = fopen($url, 'rb', false, $context);\r\n if (!$fh) {return FALSE;} \r\n \r\n $response = stream_get_contents($fh); \r\n if ($response === false) {return FALSE;} \r\n \r\n $outResponse = $response; \r\n return TRUE; \r\n}",
"public function post($request){\n\n global $db,$funky_db;\n\n $module = $request->url_elements[0];\n $http_method = $request->method;\n $http_params = $request->parameters;\n\n switch ($action){\n\n case 'add':\n\n $error = \"\";\n\n if (!$error){\n\n $response = null;\n\n } else {# is array\n\n return null;\n $response = null;\n\n } \n\n break; # auth case action\n\n } # switch action\n\n return $response;\n\n }",
"public function post(array $params);",
"private function post (string $url)\r\n\t{\r\n\t\ttry {\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t$handle = curl_init();\t\t\t\r\n\t\t\tcurl_setopt_array($handle, array(\r\n\t\t\t\tCURLOPT_URL => $url,\r\n\t\t\t\tCURLOPT_CONNECTTIMEOUT => 5,\r\n\t\t\t\tCURLOPT_TIMEOUT => 60,\r\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\tCURLOPT_POST => true,\r\n\t\t\t\tCURLOPT_POSTFIELDS => $this->paramUrl\r\n\t\t\t\t));\t\t\r\n\t\t\t//curl_setopt($ch, CURLOPT_ENCODING ,\"\");\r\n\t\t\t//curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8'));\r\n\t\t\t\r\n\t\t\t$response = curl_exec($handle);\t\t\r\n\t\t\t$resp = json_decode($response);\t\t\t\r\n\t\t\tif ($resp['ok'] == false)\r\n\t\t\t\tthrow new \\Exception($resp['description']);\t\t\t\r\n\t\t\t\r\n\t\t} catch ( \\Exception $e) {\r\n\t\t\t$Logger = new \\Logger('TelegramMain.txt');\r\n\t\t\t$Logger -> log($response, $url.$this->paramUrl);\r\n\t\t}finally{\t\t\t\r\n\t\t\tcurl_close($handle);\t\t\r\n\t\t\treturn $response;\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public static function post(array $data) {\n return self::call(\"POST\", $data);\n }",
"public function execute(): object\n {\n $this->buildRequest();\n $client = new HttpClient();\n Log::debug('Creating Digicert Request', [\n 'Method' => $this->requestMethod,\n 'RequestURI' => $this->requestUri,\n 'Options' => $this->options,\n ]);\n RateLimiter::checkLimit();\n $request = $client->request($this->requestMethod, $this->requestUri, $this->options);\n \n return json_decode($request->getBody());\n }",
"public function post($url, $body = array(), $query = array(), $headers = array());",
"public static function post($uri,$params=[],$options=[]) {\n return self::request('POST',$uri,$params,$options);\n }",
"function post_day($httpClient, $base_url, $day) {\r\n error_log('post_day to server: ' . $day);\r\n $url = $base_url . '/day/';\r\n $response = $httpClient->request('POST', $url,['json' => $day]); //guzzale part\r\n// $request = $httpClient->createRequest('POST', $url);\r\n// $request->setBody(Stream::factory('9'));\r\n// $response = $request->send();\r\n return $response;\r\n //echo $response; die();\r\n error_log('post_day to server: ' . $day);\r\n \r\n// $url = 'http://' . $base_url . '/day/';\r\n// $day1['day'] = $day;\r\n// //$response = $httpClient->request('POST', $url, ['json' => $day1]);\r\n// return $response;\r\n \r\n}",
"public function post($url, $payload = array(), $do_not_exit = true)\n {\n if($do_not_exit)\n {\n $this->do_not_exit = true;\n }\n\n $this->url = $url;\n $this->curl_handle = curl_init();\n $payload = http_build_query($payload);\n curl_setopt($this->curl_handle, CURLOPT_URL, $this->url);\n curl_setopt($this->curl_handle, CURLOPT_POST, true);\n curl_setopt($this->curl_handle, CURLOPT_HTTPHEADER, $this->header);\n curl_setopt($this->curl_handle, CURLOPT_POSTFIELDS, $payload);\n curl_setopt($this->curl_handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->curl_handle, CURLOPT_HEADER, true);\n $this->curl_response = curl_exec($this->curl_handle);\n\n $this->parse_curl_response();\n return $this->http_body;\n }",
"public function post(): Response {\n try {\n return $this->client->post($this->resource, $this->parameters);\n }\n catch (ClientException $e) {\n if ($e->getCode() == 401) {\n //attempt new login\n $this->auth = $this->auth->login();\n $this->createClient($this->auth->token());\n\n //retry query\n return $this->client->post($this->resource, $this->parameters);\n }\n }\n }",
"protected function makePostRequest($uri, $params) {\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL,$this->server_url . $uri);\n curl_setopt($curl, CURLOPT_POST, 1);\n curl_setopt($curl, CURLOPT_POSTFIELDS,\n http_build_query($params));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($curl);\n $this->response = $output;\n $this->response_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close ($curl);\n }",
"protected function _execute(){\n\t\t\t$this->_getUrl();\n\n\t\t\t$c = curl_init($this->_url);\n\t\t\tob_start();\n\t\t\tif(!empty($this->_postFields)) {\n\t\t\t\tcurl_setopt($c, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($c, CURLOPT_POSTFIELDS, json_encode($this->_postFields));\n\t\t\t}\n\n\t\t\tcurl_exec($c);\n\t\t\tcurl_close($c);\n\t\t\t$this->_result = trim(ob_get_contents());\n\t\t\tob_end_clean();\n\t\t}",
"function post($url, $parameters = array(), $multi = false) {\n $response = $this->oAuthRequest($url, 'POST', $parameters, $multi);\n if ($this->format === 'json' && $this->decode_json) {\n return json_decode($response, true);\n }\n return $response;\n }",
"protected function post($url, $params) {\n $client = new Emory_Http_Client($url,\n array('timeout' => 60)\t// increase timeout to 60 seconds (default is 10)\n );\n $client->setParameterPost($params);\n $client->setEncType(Zend_Http_Client::ENC_FORMDATA);\n $client->setMethod(Zend_Http_Client::POST);\n $response = $client->request();\n if ($response->isSuccessful())\n return $response->getRawBody();\t// don't do any decoding, etc\n else {\n // FIXME: is this exception-worthy?\n throw new SolrException($response->getMessage());\n }\n }",
"public function post(array $parameters);",
"public function post(array $parameters);",
"public function post(array $parameters);",
"public function testMakePostRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse(['teacher' => 'Charles Xavier'], 201),\n ]);\n\n $this->assertEquals($client->post('teachers'), ['teacher' => 'Charles Xavier']);\n }",
"private function _httpPost($fields)\n {\n $fields_string = http_build_query($fields);\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$this->_getFullUrl());\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return $result;\n }",
"function PPHttpPost($methodName_, $nvpStr_) {\n\tglobal $environment;\n\n\t$API_UserName = urlencode('tuhins_1351114574_biz_api1.gmail.com');\n\t$API_Password = urlencode('1351114606');\n\t$API_Signature = urlencode('AdfcyT4sNBLU3ISgRRnYiJXaGd4hAjDiSEgVQesi8ykS-6Sp5pC4c5bM');\n\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t}\n\t$version = urlencode('58.0');\n\n\t// setting the curl parameters.\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $API_Endpoint);\n\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t// turning off the server and peer verification(TrustManager Concept).\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t// NVPRequest for submitting to server\n\t$nvpreq = \"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_\";\n\t\n\n\t// setting the nvpreq as POST FIELD to curl\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);\n\n\t// getting response from server\n\t$httpResponse = curl_exec($ch);\n\n\tif(!$httpResponse) {\n\t\texit(\"$methodName_ failed: \".curl_error($ch).'('.curl_errno($ch).')');\n\t}\n\n\t// Extract the RefundTransaction response details\n\t$httpResponseAr = explode(\"&\", $httpResponse);\n\n\t$httpParsedResponseAr = array();\n\tforeach ($httpResponseAr as $i => $value) {\n\t\t$tmpAr = explode(\"=\", $value);\n\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t}\n\t}\n\n\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t}\n\n\treturn $httpParsedResponseAr;\n}",
"static public function post($method, $params)\n {\n $client = new Client;\n $signedParams = ['form_params' => [\n 'id' => 1,\n 'user_id' => getenv('AMTEL_USER_ID'),\n 'request' => self::getRequestString($params)\n ]];\n Log::info('POST: ' . self::URI . $method . ', params=' . json_encode($params));\n $res = $client->post(self::URI . $method, $signedParams);\n\n if ($res->getStatusCode() == 200) {\n Log::info('result 200');\n $content = $res->getBody()->getContents();\n\n return $content;\n } else {\n Log::error('GET: ' . self::URI . $method . ', params=' . json_encode($params) . '. result: ' . $res->getStatusCode());\n //Log::error(new \\Exception('amtel GET ' . self::URI . $method . ', params=' . json_encode($params) . '. result ' . $res->getStatusCode()));\n throw new HttpException('bad request ' . $res->getStatusCode());\n }\n }",
"private function postRequest($data) {\n $header = array('Content-Type' => self::POST_CONTENT_TYPE);\n try {\n $r = Requests::post($this->url, $header, json_encode($data));\n if ($this->debug) {\n $this->storeRequestResults($r->status_code, $data);\n if ($r->status_code != 200) {\n return \"Sync POST Request Failed: \".$r->status_code;\n }\n }\n return true;\n }\n catch (Exception $e) {\n if ($this->debug) {\n $this->storeRequestResults(404, $data);\n }\n return \"Sync POST Request Failed: \".$e;\n }\n }",
"public function request() {\r\n\t\t$this->verbose('protocol', $this->protocol);\r\n\t\t$this->verbose('method', $this->method);\r\n\t\t$this->verbose('host', $this->host);\r\n\t\t$this->verbose('path', $this->path);\r\n\t\t$this->verbose('query', $this->query);\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('body', $this->body);\r\n\t\t$this->verbose('timeout', $this->timeout);\r\n\r\n\t\t$this->addQueryToPath();\r\n\t\t$this->verbose('path + query', $this->path);\r\n\t\t$this->cleanHost();\r\n\t\t$this->verbose('cleanHost', $this->host);\r\n\r\n\t\t$url = $this->protocol . '://' . $this->host . $this->path;\r\n\t\t$this->verbose('url', $url);\r\n\r\n\t\t$this->headers['Authorization'] = $this->makeAuthHeader();\r\n\r\n\r\n\t\tforeach ($this->headers as $header_key => $header_value) {\r\n\t\t\t$header_array[] = $header_key . \":\" . $header_value;\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\t$options = array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\r\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->method,\r\n\t\t\tCURLOPT_POSTFIELDS => $this->body,\r\n\t\t\tCURLOPT_HEADER => false,\r\n\t\t\tCURLINFO_HEADER_OUT => true,\r\n\t\t\tCURLOPT_HTTPHEADER => $header_array,\r\n\t\t\tCURLOPT_TIMEOUT => $this->timeout\r\n\t\t);\r\n\t\tcurl_setopt_array($ch, $options);\r\n\r\n\t\t$this->verbose('body at exec', $this->body);\r\n\t\t$response_body = curl_exec($ch);\r\n\t\t$response_error = curl_error($ch);\r\n\t\t$response_headers = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$response['error'] = $response_error;\r\n\t\t$response['body'] = $response_body;\r\n\t\t$response['header'] = $response_headers;\r\n\t\treturn $response;\r\n\t}",
"public function post()\n {\n $title = isset($_POST['title']) ? $_POST['title'] : false;\n $description = isset($_POST['description']) ? $_POST['description'] : false;\n\n $loggedin = $this->checkLoggedIn();\n $permissions = $this->checkPermissions();\n\n if (empty($title) || empty($description)) {\n http_response_code(400);\n $answer = [\"error\" => \"MissingValues\"];\n } elseif (!$loggedin) {\n http_response_code(403);\n $answer = [\"error\" => \"NotLoggedIn\"];\n } elseif (!$permissions) {\n http_response_code(403);\n $answer = [\"error\" => \"NoPermissions\"];\n } else {\n $project = new ProjectObj($this->getDb());\n $project->setTitle($title);\n $project->setDescription($description);\n $project->create();\n\n $array = $project->toArray();\n // add url to server to image\n $array['image'] = Ettc\\Ettc::getServerUrl() . \"/assets/images/projects/\" . $array['image'];\n $answer = [\"project\" => $array];\n }\n\n return $answer;\n }",
"public function httpPost()\n {\n return $this->method(\"POST\");\n }",
"function post($url, $headers, $params)\n{\n $data = json_encode($params);\n\n $curl = curl_init();\n\n array_push($headers, \"Content-Type: application/json\");\n array_push($headers, \"Content-Length: \" . strlen($data));\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n // print_r(\"=========请求信息 start =========\\n\");\n // print_r($url . \"\\n\");\n // print_r(json_encode($headers) . \"\\n\");\n // print_r($data . \"\\n\");\n $response = curl_exec($curl);\n curl_close($curl);\n // print_r(\"==============================\\n\");\n // print_r($response);\n // print_r(\"\\n=========请求信息 end =========\\n\");\n return $response;\n}",
"public function post()\n {\n //\n }",
"private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}",
"function testSimplePost() {\n \n $curlAdapter = new CurlAdapter();\n \n $post = array (\n 'SECURITY.SENDER' => '31HA07BC8142C5A171745D00AD63D182',\n 'USER.LOGIN' => '31ha07bc8142c5a171744e5aef11ffd3',\n 'USER.PWD' => '93167DE7',\n 'TRANSACTION.MODE' => 'CONNECTOR_TEST',\n 'TRANSACTION.CHANNEL' => '31HA07BC8142C5A171744F3D6D155865',\n 'PAYMENT.CODE' => 'CC.RG',\n 'FRONTEND.MODE' => 'WHITELABEL',\n 'FRONTEND.ENABLED' => 'TRUE',\n 'FRONTEND.LANGUAGE' => 'EN',\n 'FRONTEND.RESPONSE_URL' => 'http://dev.heidelpay.de',\n 'CONTACT.IP' => '127.0.0.1',\n 'REQUEST.VERSION' => '1.0'\n \n );\n \n $result = $curlAdapter->sendPost('https://test-heidelpay.hpcgw.net/ngw/post', $post);\n \n \n $this->assertTrue(is_array($result[0]), 'First result key should be an array.');\n $this->assertTrue(is_object($result[1]), 'Secound result key should be an object.');\n \n \n $this->assertFalse($result[1]->isError(), 'isError should return true');\n $this->assertTrue($result[1]->isSuccess(), 'isSuccess should return false');\n \n }",
"function PPHttpPost($methodName_, $nvpStr_) {\n\t\t\tglobal $gateway_environment;\n\t\t\t$environment = $gateway_environment;\n\n\t\t\t$API_UserName = pmpro_getOption(\"apiusername\");\n\t\t\t$API_Password = pmpro_getOption(\"apipassword\");\n\t\t\t$API_Signature = pmpro_getOption(\"apisignature\");\n\t\t\t$API_Endpoint = \"https://api-3t.paypal.com/nvp\";\n\t\t\tif(\"sandbox\" === $environment || \"beta-sandbox\" === $environment) {\n\t\t\t\t$API_Endpoint = \"https://api-3t.$environment.paypal.com/nvp\";\n\t\t\t}\n\n\t\t\t$version = urlencode('72.0');\n\n\t\t\t//NVPRequest for submitting to server\n\t\t\t$nvpreq = \"METHOD=\" . urlencode($methodName_) . \"&VERSION=\" . urlencode($version) . \"&PWD=\" . urlencode($API_Password) . \"&USER=\" . urlencode($API_UserName) . \"&SIGNATURE=\" . urlencode($API_Signature) . \"&BUTTONSOURCE=\" . urlencode(PAYPAL_BN_CODE) . $nvpStr_;\n\n\t\t\t//post to PayPal\n\t\t\t$response = wp_remote_post( $API_Endpoint, array(\n\t\t\t\t\t'timeout' => 60,\n\t\t\t\t\t'sslverify' => FALSE,\n\t\t\t\t\t'httpversion' => '1.1',\n\t\t\t\t\t'body' => $nvpreq\n\t\t\t )\n\t\t\t);\n\n\t\t\tif ( is_wp_error( $response ) ) {\n\t\t\t $error_message = $response->get_error_message();\n\t\t\t die( \"methodName_ failed: $error_message\" );\n\t\t\t} else {\n\t\t\t\t//extract the response details\n\t\t\t\t$httpParsedResponseAr = array();\n\t\t\t\tparse_str(wp_remote_retrieve_body($response), $httpParsedResponseAr);\n\n\t\t\t\t//check for valid response\n\t\t\t\tif((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {\n\t\t\t\t\texit(\"Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $httpParsedResponseAr;\n\t\t}",
"function send_request($postdata = \"\") {\n\t\tif(!is_array($postdata) ) $postdata = array();\n\t\t\n\t\t$url = $this->_build_url();\n\t\t\n\t\tif(!isset($postdata['ip_address'])) $postdata['ip_address'] = $this->_get_client_ip();\n\t\tif(!isset($postdata['user_agent'])) $postdata['user_agent'] = $this->_get_client_user_agent();\n\t\t$postdata['api_key'] = $this->api_key;\n\n\t\t$ch = curl_init($url);\n\n\t\tcurl_setopt($ch, CURLOPT_POST ,1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'json='.$this->_json_encode($postdata));\n\t\tcurl_setopt($ch, CURLOPT_HEADER ,0); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT ,10);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\t\t\n\n\t\t$return_data = curl_exec($ch);\n\n\t\treturn $return_data;\n\t}",
"public function showRequestPost();",
"private function execute() {\n\t\t// Max exec time of 1 minute.\n\t\tset_time_limit(60);\n\t\t// Open cURL request\n\t\t$curl_session = curl_init();\n\n\t\t// Set the url to post request to\n\t\tcurl_setopt ($curl_session, CURLOPT_URL, $this->url);\n\t\t// cURL params\n\t\tcurl_setopt ($curl_session, CURLOPT_HEADER, 0);\n\t\tcurl_setopt ($curl_session, CURLOPT_POST, 1);\n\t\t// Pass it the query string we created from $this->data earlier\n\t\tcurl_setopt ($curl_session, CURLOPT_POSTFIELDS, $this->curl_str);\n\t\t// Return the result instead of print\n\t\tcurl_setopt($curl_session, CURLOPT_RETURNTRANSFER,1);\n\t\t// Set a cURL timeout of 30 seconds\n\t\tcurl_setopt($curl_session, CURLOPT_TIMEOUT,30);\n\t\tcurl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n\t\t// Send the request and convert the return value to an array\n\t\t$response = preg_split('/$\\R?^/m',curl_exec($curl_session));\n\n\t\t// Check that it actually reached the SagePay server\n\t\t// If it didn't, set the status as FAIL and the error as the cURL error\n\t\tif (curl_error($curl_session)){\n\t\t\t$this->status = 'FAIL';\n\t\t\t$this->error = curl_error($curl_session);\n\t\t}\n\n\t\t// Close the cURL session\n\t\tcurl_close ($curl_session);\n\n\t\t// Turn the response into an associative array\n\t\tfor ($i=0; $i < count($response); $i++) {\n\t\t\t// Find position of first \"=\" character\n\t\t\t$splitAt = strpos($response[$i], '=');\n\t\t\t// Create an associative array\n\t\t\t$this->response[trim(substr($response[$i], 0, $splitAt))] = trim(substr($response[$i], ($splitAt+1)));\n\t\t}\n\n\t\t// Return values. Assign stuff based on the return 'Status' value from SagePay\n\t\tswitch($this->response['Status']) {\n\t\t\tcase 'OK':\n\t\t\t\t// Transactino made succssfully\n\t\t\t\t$this->status = 'success';\n\t\t\t\t$_SESSION['transaction']['VPSTxId'] = $this->response['VPSTxId']; // assign the VPSTxId to a session variable for storing if need be\n\t\t\t\t$_SESSION['transaction']['TxAuthNo'] = $this->response['TxAuthNo']; // assign the TxAuthNo to a session variable for storing if need be\n\t\t\t\tbreak;\n\t\t\tcase '3DAUTH':\n\t\t\t\t// Transaction required 3D Secure authentication\n\t\t\t\t// The request will return two parameters that need to be passed with the 3D Secure\n\t\t\t\t$this->acsurl = $this->response['ACSURL']; // the url to request for 3D Secure\n\t\t\t\t$this->pareq = $this->response['PAReq']; // param to pass to 3D Secure\n\t\t\t\t$this->md = $this->response['MD']; // param to pass to 3D Secure\n\t\t\t\t$this->status = '3dAuth'; // set $this->status to '3dAuth' so your controller knows how to handle it\n\t\t\t\tbreak;\n\t\t\tcase 'REJECTED':\n\t\t\t\t// errors for if the card is declined\n\t\t\t\t$this->status = 'declined';\n\t\t\t\t$this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n\t\t\t\tbreak;\n\t\t\tcase 'NOTAUTHED':\n\t\t\t\t// errors for if their card doesn't authenticate\n\t\t\t\t$this->status = 'notauthed';\n\t\t\t\t$this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n\t\t\t\tbreak;\n\t\t\tcase 'INVALID':\n\t\t\t\t// errors for if the user provides incorrect card data\n\t\t\t\t$this->status = 'invalid';\n\t\t\t\t$this->error = 'One or more of your card details where invalid. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 'FAIL':\n\t\t\t\t// errors for if the transaction fails for any reason\n\t\t\t\t$this->status = 'fail';\n\t\t\t\t$this->error = 'An unexpected error has occurred. Please try again.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// default error if none of the above conditions are met\n\t\t\t\t$this->status = 'error';\n\t\t\t\t$this->error = 'An error has occurred. Please try again.';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// set error sessions if the request failed or was declined to be handled by controller\n\t\tif($this->status !== 'success') {\n\t\t\t$_SESSION['error']['status'] = $this->status;\n\t\t\t$_SESSION['error']['description'] = $this->error;\n\t\t}\n\t}",
"private function _api_call_post( $url, $params = array() ) {\n\n $connection = new OAuthDamnit( $this->_config['consumer_key'], $this->_config['consumer_secret'],\n $this->_token['token1'], $this->_token['token2'] );\n\n $data_json = $connection->post($url, $params);\n $data = json_decode($data_json);\n return $data;\n }",
"function post();"
] | [
"0.7271194",
"0.7184211",
"0.71510756",
"0.71510756",
"0.71510756",
"0.7068729",
"0.68226117",
"0.67729324",
"0.6747302",
"0.66837823",
"0.66566765",
"0.65943265",
"0.6537652",
"0.6528032",
"0.65205866",
"0.6491419",
"0.6447373",
"0.6397669",
"0.63846445",
"0.6372782",
"0.6365989",
"0.63432497",
"0.6333805",
"0.63151354",
"0.62927514",
"0.6282131",
"0.6267395",
"0.6262676",
"0.62491626",
"0.62368584",
"0.6236255",
"0.6233268",
"0.6233012",
"0.6229488",
"0.6220188",
"0.62163836",
"0.62128943",
"0.621087",
"0.6206169",
"0.6185216",
"0.61800987",
"0.61678535",
"0.6148843",
"0.61480623",
"0.61467844",
"0.6144727",
"0.6130469",
"0.6122807",
"0.61182266",
"0.6116817",
"0.61128205",
"0.610947",
"0.61089337",
"0.6105844",
"0.61036533",
"0.6096015",
"0.60919356",
"0.60914296",
"0.6084379",
"0.60790086",
"0.6078989",
"0.6078909",
"0.60715103",
"0.6067707",
"0.60627824",
"0.60598683",
"0.605849",
"0.60551023",
"0.6053492",
"0.60519475",
"0.60457367",
"0.604297",
"0.6041242",
"0.6033919",
"0.6031596",
"0.6017205",
"0.6012173",
"0.60042983",
"0.60024905",
"0.6001758",
"0.5982975",
"0.5982975",
"0.5982975",
"0.5981355",
"0.59597003",
"0.59583646",
"0.5957812",
"0.5957461",
"0.5956508",
"0.59543407",
"0.59486294",
"0.5945081",
"0.5941889",
"0.59300286",
"0.59296227",
"0.5929458",
"0.5926954",
"0.59235895",
"0.59232616",
"0.5923122",
"0.59213305"
] | 0.0 | -1 |
Make get request and return result | protected function get($url, $params, $parse = true)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url . '?' . urldecode(http_build_query($params)));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
curl_close($curl);
if ($parse) {
$result = json_decode($result, true);
}
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get() {\n return self::call(\"GET\");\n }",
"public function get() {\n try {\n\n /**\n * Set up request method\n */\n $this->method = 'GET';\n /**\n * Process request and call for response\n */\n return $this->requestProcessor();\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }",
"public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }",
"public function getme(){\n return $this->make_http_request(__FUNCTION__);\n }",
"function get(Request &$request, Response &$response);",
"public function sendGet()\n\t{\n\t\t$ch = curl_init(\"http://localhost/rest/index.php/book\");\n\t\t//a true, obtendremos una respuesta de la url, en otro caso, \n\t\t//true si es correcto, false si no lo es\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t//establecemos el verbo http que queremos utilizar para la petición\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\t\t//obtenemos la respuesta\n\t\t$response = curl_exec($ch);\n\t\t// Se cierra el recurso CURL y se liberan los recursos del sistema\n\t\tcurl_close($ch);\n\t\tif(!$response) {\n\t\t return false;\n\t\t}else{\n\t\t\tvar_dump($response);\n\t\t}\n\t}",
"function make_get_call($mid_url) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_HEADER, false);\n \n $output = json_decode(curl_exec($curl));\n curl_close($curl);\n \n return $output;\n }",
"public function get()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'GET';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData('');\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'GET::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'GET::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'GET::RESPONSE', $sOutput);\n\n if ($iHTTPCode !== 200) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200');\n }\n\n return $sOutput;\n }",
"function get($url, $options = array()) {\n\t\treturn $this->request($url, $options);\n\t}",
"private function GET() {\n global $_GET;\n $getData = array();\n foreach($_GET as $key => $value) {\n $getData[$key] = $value;\n }\n $this -> response[\"response\"] = $getData;\n return;\n }",
"public function get()\n\t\t{\n\t\t\t$aArgument = func_get_args();\n\t\t\t$sURL = array_shift( $aArgument );\n\t\t\t$aData = (bool) count( $aArgument ) ? array_shift( $aArgument ) : Array();\n\t\t\t$mReferer = (bool) count( $aArgument ) ? array_shift( $aArgument ) : false;\n\n\t\t\treturn $this->request( \"get\", $sURL, $aData, $mReferer );\n\t\t}",
"public function testBasicGET()\n\t{\n\t\t$Request = new Request(\n\t\t\tnew URL('http://' . self::TESTHOST . '/hallo'),\n\t\t\tnull, // method. Default GET\n\t\t\tnull, // Payload\n\t\t\t$this->_getDefaultOptions());\n\n\t\t// Return the body as string\n\t\t$Result = $Request->getResponseAs(new StringValue());\n\n\t\t$this->assertEquals('hallo', (string)$Result);\n\t}",
"public function get()\n\t{\n\t\t$response = $this->builder->get( $this->buildParameters(), $this->buildUrlAdditions() );\n\n\t\treturn $response;\n\t}",
"public function getrequest()\n {\n $request = User::getrequest();\n return result::repsonse(true,$request);\n }",
"public static function _call_get($url){\n $curl = curl_init();\n // Set curl opt as array\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n // No more than 30 sec on a website\n CURLOPT_TIMEOUT=>10,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n ));\n // Run curl\n $response = curl_exec($curl);\n //Check for errors \n if(curl_errno($curl)){\n $errorMessage = curl_error($curl);\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n // Log error message .\n $return = array('success'=>FALSE,'error'=>$errorMessage,'status'=>$statusCode);\n } else {\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n // Log success\n $return = array('success'=>TRUE,'response'=>$response,'status'=>$statusCode);\n }\n //close request\n curl_close($curl);\n //Return\n return $return;\n }",
"function Get( $url )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Get( $url )\\n\";\r\n\t\t$this->responseHeaders = $this->responseBody = \"\";\r\n\t\t$uri = $this->makeUri( $url );\r\n\t\t\r\n\t\tif( $this->sendCommand( \"GET $uri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}",
"private function GET($url,$params=false){\n return $this->Request($url,$params,HTTP_GET);\n }",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }",
"public function sendGet ()\n {\n return $this->handleQuery();\n }",
"public function request_get($uri, array $options = array()) {\n $options['method'] = 'GET';\n return $this->request($uri, $options);\n }",
"public function getResponse()\n {\n $url = $this->_url;\n\n if (count($this->_params)) {\n $query_string = http_build_query($this->_params);\n $url .= '?' . $query_string;\n }\n\n $ch = curl_init();\n\n // set some default values\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\n // set user generated values\n foreach ($this->_options as $key => $value) {\n curl_setopt($ch, $key, $value);\n }\n\n curl_setopt($ch, CURLOPT_URL, $url);\n\n $result = curl_exec($ch);\n\n curl_close($ch);\n\n return $result;\n }",
"public function get($url, $query = array(), $headers = array());",
"function get($url, $args = array()) {\n\t\t$defaults = array('method' => 'GET');\n\t\t$r = array_merge( $defaults, $args );\n\t\treturn $this->request($url, $r);\n\t}",
"public static function Get($url)\r\n {\r\n return self::doRequest('GET', $url);\r\n }",
"public function get()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }",
"function curl_get($url, array $get = NULL, array $headers = NULL, array $options = array()) { \n $defaults = array( \n CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). http_build_query($get), \n CURLOPT_HEADER => 0, \n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => TRUE, \n CURLOPT_TIMEOUT => 4,\n $headers\n ); \n \n $ch = curl_init(); \n curl_setopt_array($ch, ($options + $defaults));\n \n if ( ! $result = curl_exec($ch)) { \n trigger_error(curl_error($ch)); \n } \n curl_close($ch); \n return $result; \n}",
"public function & GetResponse ();",
"public static function curlGET($url,$dato){\n$query = http_build_query($dato);\n$url=$url.\"?\".$query;\n$ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n $response = curl_exec($ch);\n curl_close($ch);\n if(!$response)\n {\n return false;\n }\n else\n {\n return $response;\n }\n}",
"protected function get($uri){\n // $method = 'GET';\n\n // $res = $client->request($method, $uri);\n // $res = $res->getBody()->getContents();\n // $res = json_decode($res);\n // return $res;\n // }\n try {\n $client = new Client();\n $res = $client->request('GET', $uri);\n return json_decode($res->getBody()->getContents());\n } catch (\\Exception $e) {\n //$e stock les erreures\n return abort(500);\n } \n\n /*$client = new Client(['http_errors' => false]);\n $res = $client->request('GET', $url);\n $statuscode = $res->getStatusCode();\n\n if (200 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (304 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (404 === $statuscode) {\n return abort(500);\n }\n else {\n return abort(500);\n }*/\n }",
"private function do_get_request($ch,$url,$params=array()){ \n if(is_array($params) && count($params)>0){\n $url.='?';\n foreach($params as $key=>$val){\n $url.='&'.$key.'='.urlencode($val);\n }\n }\n $ch=curl_init();\n $timeout=5;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n $result=curl_exec($ch);\n return $result;\n }",
"function getrequest($url){\n\t// gets cURL resource\n\t$curl = curl_init();\n\t// Set some options - we are passing in a useragent too here\n\tcurl_setopt_array($curl, array(\n\t\tCURLOPT_RETURNTRANSFER => 1,\n\t\tCURLOPT_URL => $url,\n\t\tCURLOPT_USERAGENT => 'BenGreenlineApp'\n\t));\n\t// Send the request & save response to $resp\n\t$resp = curl_exec($curl);\n\t// Close request to clear up some resources\n\tcurl_close($curl);\n\t//returns the json encoded response\n\t\n\t\n\t$httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\tif($httpCode == 404) {\n $resp[0]= \"MetroTransit API gave 404\" ;\n\t};\n\t\n\t\n\treturn json_decode($resp);\n}",
"public function execGET($url, $params = []){\n\t\t#Parse URL params\n\t\t$url = $this->parseURL($url, $params);\n\t\t#Initialize a CURL session. \n\t\t$ch = curl_init();\n\t\t#Set body (empty on GET)\n\t\t$curlBody = json_encode([]);\n\t\t#Set curl headers\n\t\t$curlHeaders = [\n\t\t\t'User-Agent: ' . $this->getRandAgent(), #Set the user agent with a random-selected real one\n\t\t];\n\t\t#Set CURL options\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $curlHeaders); #Set headers\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); #Retrieve output instead of displaying it\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30); #Set timeout to 30 seconds\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); #Disable SSL host verification\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); #Disable SSL peer verification\n\t\tcurl_setopt($ch, CURLOPT_URL, $url); #Set URL\n\t\t#Return raw CURL request output\n\t\treturn curl_exec($ch);\n\t}",
"private function get($url) {\n\t\t$url = $this->api_url . $url;\n\n\t\t// Open curl.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $this->api_username . \":\" . $this->api_password);\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$output = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $output;\n\t}",
"protected function getContents() {\n $opts = array(\n 'http' => array(\n 'method' => \"GET\",\n 'header' => $this->user_agent . \"\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n return file_get_contents($this->query, false, $context);\n }",
"public function search()\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->getUrl());\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n ob_start();\n curl_exec($ch);\n $response = ob_get_contents();\n ob_end_clean();\n\n curl_close($ch);\n\n return $response;\n }",
"function httpGet($url){\n $ch = curl_init();\n\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n// curl_setopt($ch,CURLOPT_HEADER, false);\n\n $output=curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}",
"function km200_GetData( $REST_URL ) \n{ \n $options = array( \n 'http' => array( \n 'method' => \"GET\", \n 'header' => \"Accept: application/json\\r\\n\" .\n \"User-Agent: TeleHeater/2.2.3\\r\\n\" \n ) \n ); \n $context = stream_context_create( $options ); \n $content = @file_get_contents( \n 'http://' . km200_gateway_host . ':' . km200_gateway_port . $REST_URL, \n false, \n $context \n );\n\n if ( false === $content ) \n return false; \n return json_decode( \n km200_Decrypt( \n $content \n ) \n ); \n}",
"function api_get($url, $identifier = null, $shared_secret = null)\n {\n $curl_auth = $identifier . \":\" . $shared_secret;\n $ch = curl_init($url);\n\n curl_setopt($ch, CURLOPT_HTTPGET, TRUE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, $curl_auth);\n\n return $this->gather_response($ch);\n }",
"public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}",
"protected function doGet($url)\n\t{\n\t\t// Make the docs requestrequest.\n\t\t$curlOpts = array(CURLOPT_SSL_VERIFYPEER => false);\n\t\t$request = new XingOAuthRequester($url, 'GET', array());\n\t\t//$request = new OAuthRequester($url, 'GET', array());\n\n\t\t$result = $request->doRequest(0, $curlOpts);\n\t\tif (in_array((int) $result['code'], array(200, 201)))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<pre>fabrik rest parse error =\";print_r($result);echo \"</pre>\";//exit;\n\t\t\t//throw new RuntimeException('Fabrik REST form: error parsing result', $result['code']);\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getGet ();",
"public function & GetRequest ();",
"function getResponse();",
"function getResponse();",
"function rest_get_data($url)\n{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}",
"public function getResponse() {}",
"public function getResponse() {}",
"public function get()\n {\n return $this->apiCall('get', '', [], ['auto-fill' => true]);\n }",
"public function get()\n {\n return $this->apiCall('get', '', [], ['auto-fill' => true]);\n }",
"public function get()\n {\n return $this->apiCall('get', '', [], ['auto-fill' => true]);\n }",
"public function get($url)\n {\n $url = $this->baseUrl . \"/\" . $url;\n Request::ini($this->template);\n $request = Request::get($url);\n $response = $request->send();\n\n if ($response->hasErrors()) {\n if (isset($response->body->winstrom->message)) {\n $message = \"Error during GET from Flexibee: \" .\n $response->body->winstrom->message .\n \" (\" . $url . \")\";\n } else {\n $message = \"Error during GET from Flexibee\" .\n \" (\" . $url . \")\";\n }\n throw new FlexibeeException($message, $request);\n }\n\n if (isset($response->body->winstrom)) {\n $result = $response->body->winstrom;\n } else {\n $result = $response->body;\n }\n\n // Check if request failed\n if (isset($result->success) && $result->success === \"false\") {\n throw new FlexibeeException($result->message, $request);\n }\n return $result;\n }",
"function hsend_get(&$app, &$c) {\n\t\t$app->logger->debug(sprintf('%s::%s', __CLASS__, __FUNCTION__));\n\n\t\t$this->_http->setMethod(HTTP_REQUEST_METHOD_GET);\n\n\t\t$this->_http->setURL($c->param('app.view_http.request.uri'));\n\n\t\t$this->_set_basic_auth($app, $c);\n\n\t\t$this->_load_get_params($app, $c);\n\n\t\t$this->_load_headers($app, $c);\n\n\t\t$this->_http->sendRequest();\n\n\t\t$this->_handler_response($app, $c);\n\n\t\treturn $app->status->handled;\n\t}",
"function getRequest($url) {\n // url to GET info for this table\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $output = curl_exec($ch);\n if (curl_errno($ch)) { // Check if any error occurred\n echo 'Curl error: ' . curl_error($ch);\n }\n curl_close($ch); // close curl resource to free up system resources\n $res = json_decode($output, true); // json to array\n return $res;\n }",
"public function get() {\n // $this->isAdmin();\n\n $data = \"This is a test\";\n\n $this->sendHeaders();\n \n $resBody = (object) array();\n $resBody->status = \"200\";\n $resBody->message = \"valid request\";\n $resBody->data = \"This is the data\";\n echo json_encode($resBody);\n\n }",
"public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }",
"public function get($url) {\n $request = $this->getRequest($url, HttpRequest::METH_GET);\n try {\n // this could be parametrized using optional options interface\n $options = array(\n 'useragent' => \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; MS-RTC LM 8)\",\n 'connecttimeout' => 120, // timeout in seconds on connect \n 'timeout' => 120, // timeout in seconds on response \n 'redirect' => 5, // stop after 5 redirects\n 'compress' => true, // allow compression or not\n 'referer' => \"https://www.google.com/#output=search&sclient=psy-ab&q=jachty&fp=1\",\n );\n $request->setOptions($options);\n $request->send();\n } catch (Exception $e) {\n throw new Exception('Loading failed with exception', $request->getResponseCode(), $e);\n }\n $code = $request->getResponseCode();\n $body = $request->getResponseBody();\n\n // make sure we did not fail\n if ($code >= 500) {\n throw new Exception('Error response code recieved: ' . $body, $code);\n } elseif ($code >= 400) {\n throw new Exception('Permanent failure' . $body, $code);\n } elseif (trim($body) == '') {\n throw new Exception('Empty response', $code);\n }\n\n return $body;\n }",
"public function get($url, $params);",
"function curlGet($url) {\n\t\t$ch = curl_init();\t// Initialising cURL session\n\t\t// Setting cURL options\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t$results = curl_exec($ch);\t// Executing cURL session\n\t\tcurl_close($ch);\t// Closing cURL session\n\t\treturn $results;\t// Return the results\n\t}",
"public function get ($url, $headers = null, $options = null);",
"public function lookup() { return $this->doRequest(); }",
"function httpGET($url = '/', $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n ($headers = trim($headers)) === '' or $headers .= \"\\r\\n\";\n\n // Note: in HTTP/1.1 Connection defaults to Keep Alive which will keep\n // the connection hanging unless you send 'Connection: close'. Its output\n // also changes due to chunked transfer encoding.\n $headers = \"GET $url HTTP/1.0\\r\\n\".\n $headers.\"\\r\\n\";\n\n $this->write($headers);\n return $this->readAll();\n }",
"private function _get($path)\n {\n $this->_logIn();\n\n // @TODO we can access beyond page 1 by adding ?page=pX where X is the number\n // of the page requested\n $this->_curlUrl = self::GV_SERVER_URL . $path;\n \n // Send HTTP POST request.\n curl_setopt($this->_ch, CURLOPT_URL, $this->_curlUrl);\n curl_setopt($this->_ch, CURLOPT_POST, false);\n curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);\n\n $this->_result = curl_exec($this->_ch);\n \n return $this->_result;\n }",
"public function doGet($path = '', array $query = array());",
"function curlGet($url){\n $ch = curl_init();\n\n //setting curl options\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_URL, $url);\n /*\n Additional curl_setopt\n CURLOPT_USERAGENT \n CURLOPT_HTTPHEADER\n */\n $result = curl_exec($ch);\n \n //$httpResponse = curl_getinfo($ch,CURLINFO_HTTP_CODE);\n //echo $httpResponse;\n\n curl_close($ch);\n return $result;\n }",
"function curl_get($url, $get = false, $options = array()) { \n $defaults = array(\n CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : '') . (is_array($get) ? http_build_query($get) : ''),\n CURLOPT_HEADER => 0,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_TIMEOUT => 4,\n\t\tCURLOPT_FOLLOWLOCATION => true\n );\n \n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if( ! $result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n}",
"public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}",
"function get($name) {\r\n\t\treturn $this->_send(array('cmd'=>'get', 'name'=>$name));\r\n\t}",
"function http_get($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //curl_setopt($ch,CURLOPT_HEADER, false); \n $output = curl_exec($ch);\n curl_close($ch);\n return $output;\n}",
"public function get($url, $data = array()) {\n\t\treturn $this->request($url, $data, false);\n\t}",
"public function get() {\n \n if (!isset($this->request->args[0])) {\n exit;\n }\n\n $url = $this->request->args[0];\n\n //add the $_GET vars to the request\n $query_string = http_build_query($this->request->get);\n $destination_url = $url . ($query_string ? '?'.$query_string : '');\n\n //exit if onBeforeGet doesn't pass\n if($this->onBeforeGet($destination_url) === false){\n return false;\n }\n \n //logs to file if enabled\n if($this->log_to_file){\n $logger = new \\sb\\Logger\\CommandLine();\n $log_name = preg_replace(\"~[^\\w+]~\", \"_\", get_called_class());\n $logger->{$log_name}(json_encode([\"ip\" => \\sb\\Gateway::$remote_addr, \"url\" => $destination_url, \"get\" => $query_string, \"post\" => $this->request->post])); \n }\n \n //proxy to site and return response\n $ch = curl_init();\n \n //set the url to grab the data from\n curl_setopt($ch, CURLOPT_URL, $destination_url);\n \n //set the function to pass the headers from the destination back to the client\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, array($this, 'headerCallBack'));\n \n //set the agent to be used for request\n curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);\n \n //wait 10 seconds for timeout\n curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout);\n \n //forward any post requests if they exist\n if(count($this->request->post)){\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->request->post);\n }\n \n //follow any redirects\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n \n //return the result\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \n //ignore ssl errors if set to true\n if($this->ignore_ssl_errors){\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n }\n \n //set any additional curl_opts given\n foreach($this->curl_opts as $key=>$val){\n curl_setopt($ch, $key, $val);\n }\n \n //display the output\n return curl_exec($ch);\n }",
"public function httpGet()\n {\n return $this->method(\"GET\");\n }",
"function get (string $url, array $args = []): string {\n\t$append = '';\n\tif (count($args) > 0) {\n\t\t$append .= '/'.parseUrlGet($args);\n\t}\n\n\t$curlCall = curl_init($url.$append);\n\n\tcurl_setopt($curlCall, CURLOPT_RETURNTRANSFER, 1);\n\n\t$return = curl_exec($curlCall);\n\tcurl_close($curlCall);\n\n\treturn $return;\n}",
"function getInfo($string){\n $sym = $string;\n try {\n //Create a request but don't send it immediately\n $client = new Client();\n\n //$Client is server we are using to connect server API\n $client = new GuzzleHttp\\Client(['base_url' => '192.168.1.109']);\n\n //This 'page' is the one we use to gather Stock Information\n $response = $client->get('192.168.1.109:9090/stocks?sym='.$sym);\n \n $getInfo = $response->getBody();\n } catch (Exception $e) {\n echo \"ay, caught exception \", $e->getMessage();\n }\n return $getInfo;\n}",
"protected function requestGet($route) {\n $this->client->request('GET', $route, array('ACCEPT' => 'application/json'));\n return $this->client->getResponse();\n }",
"function doGet($url)\n{\n $return = curlExecute($url);\n return $return;\n}",
"public function testRequestGet()\n {\n $url = 'http://localhost:8080';\n $req = new HttpHeadRequest($url);\n \n $hopper = new Grasshopper();\n \n $hopper->addRequest($req);\n \n $result = $hopper->waitForAll();\n \n $res = $result[$url];\n \n if ($res instanceof SuccessEvent){\n $headers = $res->getResponse()->getHeadersParsed();\n echo print_r($headers,true) . PHP_EOL;\n \n $this->assertEquals(200, $res->getResponse()->getStatusCode());\n }\n else{\n $this->fail('GET request returned failure result');\n }\n }",
"function get($url, $parameters = array()) {\n\t\t$response = $this->oAuthRequest($url, 'GET', $parameters);\n\t\tif ($this->type == 'json' && $this->decode_json) {\n\t\t\treturn json_decode($response);\n\t\t}elseif($this->type == 'xml' && function_exists('simplexml_load_string')){\n\t\t\treturn simplexml_load_string($response);\n\t\t}\n\t\treturn $response;\n\t}",
"public function get($params = []);",
"public static function get($uri,$params=[],$options=[]) {\n return self::request('GET',$uri,$params,$options);\n }",
"public function request();",
"public function _get($url = null, $parameters = []);",
"protected function makeRequest()\n {\n $this->buildRequestURL();\n \n $ch = curl_init($this->requestUrl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($ch);\n \n if ($output === false) {\n throw new \\ErrorException(curl_error($ch));\n }\n\n curl_close($ch);\n return $output;\n\n }",
"protected function Request($url)\n {\n $guzzle = new Client;\n\n return $guzzle->get($url, ['http_errors' => false]);\n }",
"static function get($url, $body = null, $headers = array()) {\n $request = new NiceHTTP\\GetRequest($url, $body, $headers);\n return $request->send();\n }",
"protected function sendViaGet(): self\n {\n $this->response = $this->callApi('GET', $this->getUrl(), $this->body());\n\n return $this->parseResponse();\n }",
"function getRequest();",
"function get($url, $headers=array(), $userPW=0, $params=array())\n{\n $paramLength = count($params);\n // only set params if there are some else url is fine\n if ($paramLength > 0)\n {\n $url = $url.'?'.http_build_query($params,'','&');\n }\n echo $url . \"<br/>\";\n $ch = curl_init();\n // set the url\n curl_setopt($ch, CURLOPT_URL, $url);\n // set http method\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n if ($userPW <> 0)\n {\n curl_setopt($ch, CURLOPT_USERPWD, User_Creds::PingUser . \":\" . User_Creds::PingPass);\n }\n $headerLength = count($headers);\n if ($headerLength > 0)\n {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);\n //get response\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n}",
"protected function getApiResult()\n {\n return Singleton::class('ZN\\Services\\Restful')->get($this->address);\n }",
"function request($host_url, $id, $entity, $auth)\n {\n $url = \"$host_url/v1/checkouts/$id/payment?entityId=$entity\";\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Authorization:Bearer $auth\"));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // this should be set to true in production\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $responseData = curl_exec($ch);\n if (curl_errno($ch)) {\n return curl_error($ch);\n }\n curl_close($ch);\n return $responseData;\n }",
"public function getResponse() {\n $url = self::API_URL . $this->urlPath;\n \ttry {\n \t $client = \\Drupal::httpClient();\n $request = $client->get($url, array('headers' => array('Content-Type' => 'application/json', 'Authorization' => self::API_KEY)));\n $data = json_decode((string) $request->getBody(), true);\n if (empty($data)) {\n return FALSE;\n }\n }\n catch (RequestException $e) {\n return FALSE;\n }\n return $data;\n }"
] | [
"0.75161093",
"0.73780215",
"0.71908015",
"0.71778965",
"0.7122921",
"0.70723283",
"0.6969746",
"0.69367665",
"0.68779355",
"0.68628347",
"0.6840119",
"0.6815398",
"0.6811503",
"0.68036973",
"0.679793",
"0.67408484",
"0.6730184",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6686879",
"0.6678538",
"0.6673684",
"0.66703784",
"0.66687787",
"0.66352093",
"0.6618609",
"0.6558328",
"0.65494",
"0.65173787",
"0.6507667",
"0.6505077",
"0.6500892",
"0.64986634",
"0.6475035",
"0.6464471",
"0.64628774",
"0.64617664",
"0.64421034",
"0.6440081",
"0.6422621",
"0.6414028",
"0.64138734",
"0.64101934",
"0.64073366",
"0.6396268",
"0.6388146",
"0.6388146",
"0.6387267",
"0.6385626",
"0.6385626",
"0.63833135",
"0.63833135",
"0.63833135",
"0.6382965",
"0.6381152",
"0.6380207",
"0.6379559",
"0.6368135",
"0.6363755",
"0.6344869",
"0.6339644",
"0.6332695",
"0.63305634",
"0.63086617",
"0.6297955",
"0.62970805",
"0.6284581",
"0.62816995",
"0.62773985",
"0.6266167",
"0.6265325",
"0.6263954",
"0.6257906",
"0.625334",
"0.62523013",
"0.624764",
"0.6245284",
"0.62385005",
"0.62332094",
"0.6231068",
"0.62291205",
"0.6225224",
"0.6221037",
"0.620962",
"0.62057304",
"0.6199835",
"0.6199125",
"0.6194996",
"0.61897874",
"0.6176639",
"0.6170501",
"0.61632806",
"0.6156236"
] | 0.0 | -1 |
Create a Delegate object | protected function createDelegate(
callable $callback,
string $implementation = Delegate::class
): DelegateInterface {
return new $implementation($callback);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDelegate();",
"abstract protected function createDelegate($source, $dest);",
"public function __construct(callable $delegate)\n {\n $this->delegate = $delegate;\n }",
"private function createExtractorDelegate()\n {\n return $this->extractorDelegate ?: $this->extractorDelegate = function () {\n return get_object_vars($this);\n };\n }",
"public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}",
"function __construct(IDelegate $callback)\n\t{\n\t\t$this->callback = $callback;\n\t}",
"public function testDelegateClosure()\n {\n $delegateClosure = \\Auryn\\Test\\getDelegateClosureInGlobalScope();\n $injector = new Injector();\n $injector->delegate('Auryn\\Test\\DelegateClosureInGlobalScope', $delegateClosure);\n $injector->make('Auryn\\Test\\DelegateClosureInGlobalScope');\n }",
"function add($delegate)\n {\n $this->delegates[] = lmbDelegate::objectify($delegate);\n }",
"public static function setDelegate($object, callable $delegate) {\n $uid = self::identify($object);\n self::$delegates[$uid] = $delegate;\n }",
"public function createDelegatorWithName(ServiceLocatorInterface $container, $name, $requestedName, $callback)\n {\n return $this($container, $requestedName, $callback);\n }",
"public function AddDelegate($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }",
"public static function make(\\Closure $callback = null);",
"public function create(callable $resolver);",
"public static function callable()\n {\n return new self;\n }",
"public function addDelegate(string $id, PsrContainerInterface $container) {\n\t\treturn $this->setEntry($id, $this->createObject(\n\t\t\tEntry\\DelegateEntry::class,\n\t\t\t$container,\n\t\t\t$id\n\t\t));\n\t}",
"public function createSubscriber();",
"public function __construct(callable $value);",
"public static function make(Closure $callback)\n\t{\n\t\treturn new static($callback);\n\t}",
"abstract public function __construct(Closure $callback);",
"function &_getDaoDelegateForObject(&$object) {\n\t\treturn $this->_getDaoDelegate(get_class($object));\n\t}",
"public function createCallable()\n {\n $mock = $this->getMockBuilder('MyCallable')\n ->setMethods(['__invoke'])\n ->getMock();\n\n return $mock;\n }",
"public function getCreateCallable(): callable;",
"public function & dm2_create_callback(&$controller);",
"public function newInstance();",
"public function newInstance();",
"protected function newLog() : \\Closure {\n return function(string $action, string $level = 'warning') : logging\\LogInterface {\n $log = new logging\\ApiLog($action, $level);\n $log->addHandler('stream', 'json', $this->getStreamConfig($action));\n return $log;\n };\n }",
"abstract protected function createHandler();",
"protected function setUp() {\n $this->object = new CallableActionProxy(function() {\n return 'test_proxy';\n });\n }",
"static function create(): self;",
"public function __invoke()\n {\n $params = array_merge($this->params, func_get_args());\n return $this->factory->newInstance(\n $this->class,\n $params,\n $this->setter\n );\n }",
"public function makeListener($listener, $wildcard = false): Closure;",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n\t ->getStateMachine()\n ->getTransition()\n ->abortTransition()\n ->isTransitionAborted()\n // EventInterface\n ->getName()\n ->setName()\n ->getTarget()\n ->setTarget()\n ->getParams()\n ->setParams()\n ->getParam()\n ->setParam()\n ->stopPropagation()\n ->isPropagationStopped();\n\n return $mock->new();\n }",
"public function make() {}",
"function &_getDaoDelegate($fileImplementation) {\n\t\t// Normalize the file implementation name.\n\t\t$fileImplementation = strtolower_codesafe($fileImplementation);\n\n\t\t// Did we already instantiate the requested delegate?\n\t\tif (!isset($this->_delegates[$fileImplementation])) {\n\t\t\t// Instantiate the requested delegate.\n\t\t\t$delegateClasses = $this->getDelegateClassNames();\n\t\t\tassert(isset($delegateClasses[$fileImplementation]));\n\t\t\t$delegateClass = $delegateClasses[$fileImplementation];\n\t\t\t$this->_delegates[$fileImplementation] =& instantiate($delegateClass, 'SubmissionFileDAODelegate', null, null, $this);\n\t\t}\n\n\t\t// Return the delegate.\n\t\treturn $this->_delegates[$fileImplementation];\n\t}",
"public abstract function make();",
"final private static function makeEvent(Sincronizacao $sincronizacao)\n {\n $endpoint = self::getEventEndpoint($sincronizacao->sym_table, $sincronizacao->sym_action);\n\n $dependencies = self::getDependencies($sincronizacao);\n $eventClass = self::getEventClass($endpoint);\n\n return new $eventClass($dependencies['entry'], $dependencies['extra']);\n }",
"abstract function &create();",
"public static function createInstance()\n {\n return new GridCsvExporterEventManager('ISerializable');\n }",
"public static function make($data = null)\n {\n if ($data instanceof Closure) {\n $data = call_closure($data, new static());\n }\n if ($data instanceof self) {\n return $data;\n }\n return new static($data);\n }",
"public static function create()\r\n\t{\r\n\t\t$validator = Validation::forge('callback');\r\n\t\t\r\n\t\t$validator->add('event', 'Event Name')->add_rule('trim')->add_rule('required')->add_rule(array('invalid_event_name' => function ($event_name) {\r\n\t\t\t$event = Service_Event::find_one(array('name' => $event_name));\r\n\t\t\tif (!$event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}));\r\n\t\t\r\n\t\t$validator->add('url', 'Callback URL')->add_rule('trim')->add_rule('valid_url')->add_rule('required');\r\n\t\t\r\n\t\treturn $validator;\r\n\t}",
"public static function make($callFunctionName): self;",
"public function make();",
"public static function instance(\\Closure $callback = null);",
"public function testContainerAddsAndGetsFromDelegate()\n {\n $delegate = new ReflectionContainer;\n $container = new Container;\n\n $container->delegate($delegate);\n\n $foo = $container->get(Foo::class);\n\n $this->assertInstanceOf(Foo::class, $foo);\n }",
"public static function create(callable $cb)\n {\n if (!ServerHelper::coroutineIsEnabled()) {\n return false;\n }\n\n $tid = self::tid();\n\n return SwCoroutine::create(function() use($cb, $tid) {\n $id = SwCoroutine::getuid();\n self::$idMap[$id] = $tid;\n\n PhpHelper::call($cb);\n });\n }",
"public function __construct(EventBase $base, callable $cb, mixed $data, int $flags, int $backlog, mixed $target) {}",
"public function callable($callable)\n {\n $this->target = $callable;\n $this->is_callable = true;\n return $this;\n }",
"public function create(string $name, callable $callback);",
"public function as_factory($obj,$val){\n if(!$val instanceof \\Closure){\n $val = function($app) use($val){\n return $app->resolve_dependencies($val);\n };\n }//if\n $this[$obj] = $this->factory($val);\n }",
"public function make($factory);",
"public function __invoke()\n {\n $closure = $this->closure;\n return $closure();\n }",
"public function __invoke($arg) {\r\n return self::factory($arg);\r\n }",
"public function maker()\n {\n $name = $this->_name;\n return function ($class) use ($name) {\n $table = TableRegistry::get($name);\n return $table->newEntity();\n };\n }",
"public function createAs(Closure $callback)\n {\n $this->callback = $callback;\n\n return $this;\n }",
"public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }",
"public function newInstance(): object;",
"public static function make($data = null): self\n {\n if ($data instanceof Closure) {\n $data = call_closure($data, new static());\n }\n\n return $data instanceof self ? $data : new static($data);\n }",
"private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }",
"public function after(callable $delegate) {\n\t\t\t$this->after = $delegate;\n\t\t\treturn $this;\n\t\t}",
"public function create_target () {\n\t\t$this->opts['create_target'] = true;\n\t\treturn $this;\n\t}",
"public function attachObserver(Delegate_1 $d)\n\t{\n\t\t// get a unique hash for this delegate\n\t\t$hash = spl_object_hash($d);\n\t\t\n\t\t// add to our list of observers\n\t\t$this->observers[$hash] = $d;\n\t}",
"public function __invoke();",
"public function __invoke();",
"public function __invoke();",
"public function __invoke();",
"public function __construct( ?callable$main=null )\n\t{\n\t\tif( $main )\n\t\t{\n\t\t\t$this->push( function()use( $main ){\n\t\t\t\t$main( new EventLoop\\Proxy( $this ) );\n\t\t\t} );\n\t\t\t\n\t\t\t$this->run();\n\t\t}\n\t}",
"public static function createVisitor()\r\n\t{\r\n\t\t$x = new Visitor();\r\n\t\treturn $x;\r\n\t}",
"public function create() {\n\t\treturn $this->textHandler;\n\t}",
"public static function create(callable $factory)\n {\n return function (RequestInterface $request, ResponseInterface $response, callable $next) use ($factory) {\n $middleware = $factory($request, $response);\n\n if ($middleware === false) {\n return $next($request, $response);\n }\n\n if (!is_callable($middleware)) {\n throw new RuntimeException(sprintf('Factory returned \"%s\" instead of a callable or FALSE.', gettype($middleware)));\n }\n\n return $middleware($request, $response, $next);\n };\n }",
"#[Pure]\n public function __construct(EventBase $base, $fd, int $what, callable $cb, $arg = null) {}",
"function invoke()\n {\n $args = func_get_args();\n return lmbDelegate::invokeChain($this->delegates, $args); \n }",
"public function test_constructor_with_valid_parameters()\n {\n $data_class_mock = $this->createMock(DataClass::class_name());\n $method_mapping = array(ImplementationNotifierDataClassListener::BEFORE_DELETE => 'delete_method');\n \n new ImplementationNotifierDataClassListener($data_class_mock, __NAMESPACE__, $method_mapping);\n \n $this->assertTrue(true);\n }",
"public function create()/*# : CreateInterface */;",
"public function addFactory(string $name, Closure $callable): self\n {\n $this->factory[$name] = $callable;\n return $this;\n }",
"public function GetDelegate($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }",
"public function createClassListener($listener)\n {\n return function () use ($listener) {\n\n // If the listener has an \".\" sign, we will assume it is being used to delimit\n // the class name from the handle method name. This allows for handlers\n // to run multiple handler methods in a single class for convenience.\n $segments = explode('@', $listener);\n $method = count($segments) == 2 ? $segments[1] : 'handle';\n $handler = $segments[0];\n\n // We will make a callable of the listener instance and a method that should\n // be called on that instance, then we will pass in the arguments that we\n // received in this method into this listener class instance's methods.\n $data = func_get_args();\n\n if ( ! isset($this->subscribers[$handler])) { // Lazy loading\n $this->subscribers[$handler] = new $handler($this->c);\n }\n return call_user_func_array(array($this->subscribers[$handler], $method), $data); // Container make\n };\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"function &_getDaoDelegateForGenreId($genreId) {\n\t\t// Find the required file implementation.\n\t\t$fileImplementation = $this->_getFileImplementationForGenreId($genreId);\n\n\t\t// Return the DAO delegate.\n\t\treturn $this->_getDaoDelegate($fileImplementation);\n\t}",
"public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }",
"public function createInstance()\n {\n $mock = $this->getMockForTrait(static::TEST_SUBJECT_CLASSNAME);\n $mock->method('_createInvalidArgumentException')\n ->will($this->returnCallback(function ($message = null) {\n return $this->createInvalidArgumentException($message);\n }));\n $mock->method('__')\n ->will($this->returnArgument(0));\n\n return $mock;\n }",
"function __construct($invoker) {\n\t\t$this->invoker = $invoker;\n\t\t$this->dao = new BookmarkDAO();\n\t\t$this->haveBookmark = false;\n\n\n\t}",
"public function __construct(callable $responseFactory)\n {\n $this->responseFactory = function () use ($responseFactory) : ResponseInterface {\n return $responseFactory();\n };\n }",
"public function target($target)\n {\n $this->target = $target;\n $this->is_callable = false;\n return $this;\n }",
"public function getCustomConstructor(): callable;",
"public function accept()\n {\n $url = URIResource::Make($this->path, array($this->id));\n $data = new DataPacket(array(\"state\" => CALL_STATES::active));\n $id = Locator::Find($this->client->post($url, $data->get()));\n $data->add(\"id\", $id);\n\n return Constructor::Make($this, $data->get());\n }",
"public static function createInstance()\n {\n return new GridOxmlExporterEventManager('ISerializable');\n }",
"public static function factory($name, \\Closure $closure)\n {\n $container = static::getInstance();\n $container->offsetSet($name, $closure);\n $container->factories[$name] = true;\n }",
"public function __invoke()\n {\n $callable = $this->callable;\n return $callable(...$this->arguments);\n }",
"public static function createInstance()\n {\n return new GridBiffExporterEventManager('ISerializable');\n }",
"public function __construct(callable $closure = null, $default = null)\n {\n $this->closure = $closure;\n $this->default = $default;\n }",
"final public static function factory(Sincronizacao $sincronizacao)\n {\n $event = self::makeEvent($sincronizacao);\n\n // O evento equivale a uma nova tentativa de migracao\n $event->setAttemptAsNew();\n\n return $event;\n }",
"public function createInstance()\n {\n $mock = $this->getMockBuilder(static::TEST_SUBJECT_CLASSNAME)\n ->setMethods(\n [\n 'setup',\n 'run',\n ]\n )\n ->getMockForAbstractClass();\n\n return $mock;\n }",
"public function __construct($role, callable $callback = null);",
"public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }",
"abstract protected function create ();",
"public static function share($callable)\n {\n if (! is_object($callable) || ! method_exists($callable, '__invoke')) {\n throw new InvalidArgumentException(\n 'Service definition is not a Closure or invokable object.'\n );\n }\n\n return function ($c) use ($callable) {\n static $object;\n\n if (null === $object) {\n $object = $callable($c);\n }\n\n return $object;\n };\n }",
"protected function createHandler($id, $config)\n {\n $config['id'] = $id;\n\n return \\Yii::createObject($config);\n }",
"public function createProtocol()\n {\n }"
] | [
"0.74412537",
"0.7384471",
"0.6722676",
"0.6596427",
"0.61962175",
"0.6050739",
"0.57009536",
"0.54285944",
"0.51821905",
"0.5156536",
"0.5135747",
"0.5134291",
"0.51333123",
"0.51258516",
"0.51014304",
"0.504907",
"0.50425494",
"0.50001407",
"0.49962223",
"0.4962092",
"0.48910308",
"0.48905048",
"0.48671508",
"0.4848513",
"0.4848513",
"0.48471117",
"0.48437122",
"0.48346668",
"0.48340318",
"0.4804193",
"0.47932127",
"0.4791857",
"0.47825676",
"0.4781661",
"0.4781258",
"0.4773915",
"0.47578874",
"0.47569218",
"0.47459245",
"0.47389692",
"0.47333738",
"0.47216532",
"0.4713686",
"0.47082785",
"0.47047633",
"0.46850574",
"0.46788722",
"0.4660653",
"0.46577734",
"0.46573055",
"0.4647852",
"0.4624405",
"0.46046072",
"0.4591632",
"0.45907846",
"0.45884988",
"0.45877066",
"0.45812997",
"0.45739207",
"0.4572122",
"0.45575723",
"0.4553388",
"0.4553388",
"0.4553388",
"0.4553388",
"0.455186",
"0.4544616",
"0.4539805",
"0.45361704",
"0.45298004",
"0.45240653",
"0.45200595",
"0.45198408",
"0.45134085",
"0.4503573",
"0.44967997",
"0.44949073",
"0.44949073",
"0.44949073",
"0.4493645",
"0.44929123",
"0.4490345",
"0.44869834",
"0.4478314",
"0.4475858",
"0.44749385",
"0.44719756",
"0.44679824",
"0.44524756",
"0.44481745",
"0.44269767",
"0.44263905",
"0.4419667",
"0.44163272",
"0.44107056",
"0.44096115",
"0.44058436",
"0.4403744",
"0.43980923",
"0.43951666"
] | 0.6149349 | 5 |
Get a middleware from the iterator | protected function getMiddleware() {
$ret = null;
if ($this->middleware->valid()) {
$ret = $this->middleware->current();
$this->middleware->next();
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMiddleware();",
"protected function callback()\n {\n return GuzzleMiddleware::mapRequest(function (RequestInterface $request) {\n return $request->withHeader('T-middleware', $request->getHeaderLine('T-middleware') . 'B');\n });\n }",
"public function get(): Middleware;",
"public function getMiddleware()\n {\n return $this->middleware;\n }",
"public function getMiddleware()\n {\n return $this->middleware;\n }",
"private function getMiddleware()\n {\n if (isset($this->middlewareLayers[$this->middlewareIndex])) {\n return $this->middlewareLayers[$this->middlewareIndex];\n }\n\n return null;\n }",
"public function shift()\n {\n return array_shift($this->middlewares);\n }",
"public function getMiddleware() : LinkedList {\n return $this->assignedMiddlewareList;\n }",
"protected function mockNextMiddleware()\n {\n return function ($request, $response) {\n return $response;\n };\n }",
"public function middlewareNameCollection(): MiddlewaresInterface;",
"public function getMiddlewares();",
"public function popMiddleware()\n {\n return array_shift($this->middlewares);\n }",
"public function getMiddleware($name)\n\t{\n\t\tif (array_key_exists($name, $this->middlewares))\n\t\t{\n\t\t\treturn $this->middlewares[$name];\n\t\t}\n\t}",
"public function getAuthMiddleware(): callable{\n if($this->hasAuthMiddleware())\n return $this->_authorisationMiddleware;\n else\n return function(){ return true; };\n }",
"public function next()\n {\n if (($middleware = next($this->middlewares))) {\n call_user_func($middleware, $this->request, $this->response, $this);\n } elseif ($this->parent !== null) {\n $this->parent->next();\n }\n }",
"public function middleware($middleware, int $position = self::BOTH): self\n {\n return $this->filter($middleware, $position);\n }",
"private function runMiddlewares()\n {\n $middleware = $this->getMiddleware();\n $this->middlewareIndex++;\n if (null === $middleware) {\n $this->runRoute();\n } else {\n return $middleware([$this, 'run']);\n }\n }",
"public function middleware($middlewareDefinition): self;",
"public function handle($request, Closure $next)\n {\n $result = Manager::middleware();\n return $result?$result:$next($request);\n }",
"public function getThrowableHandler(): MiddlewareInterface;",
"public function parse() : Middleware\n {\n $middlewareKey = $this->extractMiddlewareKey();\n $event = $this->extractEvent();\n $parameters = $this->extractParameters();\n\n $middleware = new Middleware($middlewareKey);\n if ($event) {\n $middleware->event($event);\n }\n if ($parameters) {\n $middleware->parameters($parameters);\n }\n\n return $middleware;\n }",
"public function getExceptionHandler(): MiddlewareInterface;",
"public function getMiddlewares() {\n\t\treturn $this->middlewares;\n\t}",
"protected function step(): ResponseInterface {\n\t\t$current = $this->getMiddleware();\n\n\t\tif ($current !== null) {\n\t\t\t$delegate = $this->createDelegate(\n\t\t\t\tfunction(ServerRequestInterface $request) {\n\t\t\t\t\treturn $this->setRequest($request)->step();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$request = $this->getRequest();\n\n\t\t\treturn $current->process($request, $delegate);\n\t\t}\n\n\t\tthrow new Exception\\OutOfMiddlewareException(\n\t\t\t\"Middleware iterator exhausted.\"\n\t\t);\n\t}",
"private static function middleware()\n {\n $files = ['Filters', 'Middleware'];\n $folder = static::$root.'Http/Middleware'.'/';\n\n self::call($files, $folder);\n\n $files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];\n $folder = static::$root.'Http/Middleware/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"protected static function middleware()\n {\n foreach (self::fetch('http/middleware') as $file) {\n Bus::need($file);\n }\n\n Middleware::ini();\n }",
"private function getMiddleware(CollectionAbstract $fieldItem): array {\r\n\r\n $middleware = $fieldItem -> getMiddleware();\r\n\r\n if(null !== $middleware) {\r\n\r\n if(count($middleware) > 0) {\r\n return $middleware;\r\n }\r\n\r\n return $this -> middleware;\r\n }\r\n\r\n return [];\r\n }",
"public function middlewares()\n {\n }",
"public function sampleMiddleware($request, $response, $next)\n {\n return $response;\n }",
"protected function getMiddleware(EndpointCollection $endpoints): array\n {\n return $this->extractFromEndpoints($endpoints, 'middleware');\n }",
"public function middleware()\n {\n // TODO: Implement middleware() method.\n }",
"public function getMiddlewares(): array\n {\n return $this->middlewares;\n }",
"public function getMiddlewares(): array\n {\n return $this->middlewares;\n }",
"protected function parseMiddleware()\n {\n return function (callable $handler) {\n return function (Request $request, array $options) use ($handler) {\n // Skip if option 'parse' isn't set\n if (empty($options['parse'])) return $handler($request, $options);\n\n $options['http_errors'] = false;\n $request = $request->withHeader('Accept', \"{$options['parse']}; q=1.0, text/plain; q=0.5\");\n \n $promise = $handler($request, $options);\n \n return $promise->then(function(Response $response) use ($request, $options) {\n return $this->parseResponse($request, $response, $options);\n });\n };\n };\n }",
"private function getNextExecutionHandlerAdapter(Request $request, Closure $next): NextHandlerAdapter\n {\n return $this->nextHandlerFactory->getHandler(\n $this->httpFoundationFactory,\n $this->psrHttpFactory,\n $request,\n $next\n );\n }",
"private function getMiddlewareClosureResoult()\n {\n return function ($nextClosure, $middlewareClassName){\n return function ($request) use ($nextClosure, $middlewareClassName)\n {\n return $this->callMiddleware($this->getMiddlewareObject($middlewareClassName),$nextClosure);\n };\n };\n }",
"private function setupMiddleware()\n {\n $this->getSlim()->add(new Model\\Middleware( $this ));\n }",
"public function run()\n {\n foreach ($this->middleware as $middleware) {\n $middleware = $this->bootstrapMiddleware($middleware);\n\n if (method_exists($middleware, 'handle')) {\n $middleware->handle($this->request, function (Request $request) {\n $this->request = $request;\n });\n }\n }\n\n return $this->request;\n }",
"public function handle(Request $request, Closure $next);",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}",
"public function handle($request, $next);",
"public function __invoke($request)\n {\n $next = $this->middleware->get($this->index);\n\n if ($next)\n {\n $name = ($next['n']) ?? '';\n $mParams = explode(',',($next['p']) ?? '');\n\n // check if the middleware class actually exist,\n // otherwise we will need to close out this.\n if (!class_exists($name)) return false;\n\n // increment the middelware we instantiate\n $this->index++;\n\n // begin our middleware instance\n $middleware = new $name();\n\n // load our middelware handle instance for the request\n if (method_exists($middleware, 'handle'))\n {\n $this->middlewareInstances[] = $middleware;\n\n return $middleware->handle($request, $this, ...$mParams);\n }\n else\n {\n // if the middleware does not have a handle, we will need to end the script.\n // All middlewares must have a handle.\n return false;\n }\n }\n\n // return the updated response\n return $this->response;\n }",
"public function handle($request, Closure $next)\n {\n return parent::handle($request, $next); // defer to the right stuff\n }",
"protected function middleware() {\n return array('auth');\n }",
"public function handle($request,Closure $next,$var=null)\n {\n if ($var==\"bb\")\n {\n echo \"<br> MyMiddleware\";\n\n }\n else\n {\n return $next($request);\n }\n\n }",
"public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }",
"public function next()\n {\n next($this->requests);\n }",
"public function pop()\n {\n return array_pop($this->middlewares);\n }",
"protected function get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c(): \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher\n {\n return $this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] = new \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher();\n }",
"protected function get584908ff464e7559233910f9ef37cbbc81593674d92ff5b6e814b73127f8e05c(): \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher\n {\n return $this->services[\\Viserio\\Contract\\Routing\\Dispatcher::class] = new \\Viserio\\Component\\Routing\\Dispatcher\\MiddlewareBasedDispatcher();\n }",
"public function handle($request, Closure $next)\n {\n if(JWTAuth::parseToken()->authenticate()->hasRole('User'))\n {\n\n return $next($request);\n\n }//end of if\n \n }",
"protected function lastResponseMiddleware()\n {\n return function (callable $handler) {\n return function (Request $request, array $options) use ($handler) {\n $promise = $handler($request, $options);\n \n return $promise->then(function(Response $response) use ($request) {\n $response->request = $request;\n $this->lastResponse = $response;\n return $response;\n });\n };\n };\n }",
"public function handle($request, Closure $next)\n {\n $bearerToken = $request->bearerToken();\n $apiKey = ApiKey::where('key', $bearerToken)->where('active', true)->first();\n if (!$apiKey) {\n abort(403, 'Invalid API Key');\n }\n return $next($request);\n }",
"protected function extractMiddlewareKey() : string\n {\n return current(\n explode(\n static::MIDDLEWARE_KEY_DELIMITER,\n $this->middlewareNotation,\n -1\n )\n );\n }",
"public function middleware($middleware, array $options = []);",
"public function getMiddlewares(): array\n {\n return [];\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n \n }",
"public function handle($request, Closure $next)\n {\n return Event::fire('interceptor.response', $next(Event::fire('interceptor.request', $request)));\n }",
"public function middleware($name){\n\n $middlewares = [\n 'auth' => 'Middleware\\Authentication'\n ];\n\n $middleware = new $middlewares[$name]();\n $middleware->handle();\n }",
"public function handle($request, Closure $next, $authorization)\n {\n try {\n //Verficia la existencia del token\n $token = JWTAuth::parseToken();\n //Autoriza al usuario al ser autenticado el token\n $user = $token->authenticate();\n } catch (TokenExpiredException $e) {\n //Si el token expira\n return $this->unauthorized('Tu sesion ha expirado, por favor realiza el loguin nuevamente.');\n } catch (TokenInvalidException $e) {\n //Si el token no es valido\n return $this->unauthorized('Tu credenciales son invalidad, por favor vuelve a loguearte.');\n }catch (JWTException $e) {\n //Si el token expira\n return $this->unauthorized('Por favor, inicia sesion para continuar.');\n }\n //If user was authenticated successfully and user is in one of the acceptable roles, send to next request.\n/*\n $data = EstudianteProceso::distinct()->select('ProcesoActividad.Nombre')->join('ProcesoActividad','ProcesoActividad.IdProcesoActividad' ,'=','EstudianteProceso.IdProcesoActividad')->where('EstudianteProceso.IdEstudiante','=',$user->id)->get();\n\n foreach ($data as $dat) {\n if ($user && strcmp($dat->Nombre, $authorization) === 0) {\n return $next($request);\n }\n }\n\n*/\n //consulta los permisos del token enviado, si el permiso se encuentra en su tabla de la BD\n //permite continuar con el request\n $data = EstudianteProceso::distinct()->select('ProcesoActividad.Nombre')->join('ProcesoActividad','ProcesoActividad.IdProcesoActividad' ,'=','EstudianteProceso.IdProcesoActividad')->where([['EstudianteProceso.IdEstudiante',$user->id],['EstudianteProceso.Permiso','1'],['ProcesoActividad.Nombre',$authorization]])->first();\n\n\n if ($data) {\n return $next($request);\n }\n\n return $this->unauthorized();\n }",
"public function __invoke(RequestInterface $request, ResponseInterface $response, Callable $next)\n {\n $headers = getallheaders();\n // getServerParams();\n $headersFromSlim = $request->getHeader('Authorization');\n\n $jwt = $request->getHeaders();\n echo $jwt['HTTP_AUTHORIZATION'][0];\n //$token = JWT::decode(['HTTP_AUTHORIZATION'][0], getenv('SECRET_KEY_JWT'), array('HS256'));\n//echo '<br>';\n//var_dump($token);\ndie();\n // return $next($request, $response);\n }",
"public function handle($request, Closure $next)\n {\n $this->request = $request;\n\n info(\"================== FeMiddleware: [\".$request->path().\"] ====================\");\n $this->process($this->request);\n info(\"================== End============================================\");\n \n return $next($this->request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n\n }",
"public function middleware(object $middleware, Closure $next)\n {\n if (\n $middleware->thisRouteController() === 'security' && \n $middleware->thisRouteAction() === 'index') {\n $userID = $middleware->getSession()->get('user_id');\n if (isset($userID) && $userID !== 0) {\n $middleware->flashMessage(sprintf('%s You are already logged in.', '<strong class=\\\"uk-text-danger\\\">Action Rejected: </strong>'), $middleware->flashInfo());\n $middleware->redirect(Authorized::getReturnToPage());\n }\n }\n return $next($middleware);\n }",
"public function handle($request, Closure $next) {\n $pid = $request->route('partner_id');\n $ks = $request->route('ks');\n if ($this->validateTokenSession($pid, $ks)) {\n return $next($request);\n }\n throw new SmhAPIException('not_authorized');\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next, $guard = null)\n {\n// var_dump($request->route());\n return $next($request);\n }",
"public function getNotFoundDecorator(\n NotFoundException $exception\n ): MiddlewareInterface;",
"public function prependMiddleware($middlewareDefinition): self;",
"public function handle($request, Closure $next)\n\t{\n//\t\t$member = Member::current();\n//\t\t$broadcast_read =TenderBroadcastRead::where('member_id', $member->id)\n//\t\t\t->where('broad_id', 1)->first();\n//\t\tif(empty($broadcast_read)) {\n//\t\t\treturn redirect('/tender/contract');\n//\t\t}\n\t\treturn $next($request);\n\t}",
"public function handle($request, Closure $next)\n {\n $device = device::where('deviceID','=',$request->input('device_id'))->firstOrFail();\n if( $device->user_id == $request->user()->id || $request->user()->role->id == 1){\n return $next($request);\n }\n return response()->json(['Message' => 'Not Allowed To Control This Device'],401);\n \n }",
"public function handle($request, Closure $next) {\n\n if (JWTAuth::parseToken()->authenticate()->identity !== 1) {\n return $this->forbidden(NULL, ResponseMessage::$message[403000]);\n }\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n //znaci 1. napravimo midleware preko php artisan make:midleware\n //2. napravimo ovaj uslov ovde\n // 3. registrujemo midleware u Kernel.php fajlu\n //4. odemo u web.php i vezemo middleware('admin'); metod za user/admin rutu na kraju - bolje ne (ne radi u oba pravca)\n // ili!: u UsersControleru napravimo konstruktor i stavimo middleware u njega\n // public function __construct(){ \n // $this->middleware('admin');\n // }\n\n // ! Proverimo da li autentifikovani user ima access za odredjenu rutu\n //ako nema, vratimo ga odakle je dosao\n if(Auth::user()->admin){\n \n return $next($request);\n\n } else{\n \n Session::flash('info', 'You do not have permissions to acces!');\n\n return redirect()->back();\n }\n\n \n }",
"protected function logMiddleware()\r\n {\r\n $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG);\r\n\r\n return Middleware::log($this->app['logger'], $formatter, LogLevel::DEBUG);\r\n }",
"public function handle($request, Closure $next)\n {\n if (!empty($request->header('jwt'))) {\n $get = User::where('jwt',$request->header('jwt'))->count();\n if ($get == 1) {\n return $next($request);\n }\n else{\n return ApiResponse(404,['jwt' => 'is invalid'],[]);\n }\n }\n \n }",
"abstract public function apply(Request $request, Response $response, Closure $next);",
"public function handle($request, Closure $next)\n {\n $this->startTime = microtime(true);\n\n return $next($request);\n }",
"public function handle(Request $request, Closure $next)\n {\n $key = 'request|'.$request->url();\n if(!$this->checkIfCached($key)) {\n $response = $next($request);\n Cache::put($key, $response, 300);\n return $response;\n } else {\n return Cache::get($key);\n }\n\n }",
"public function handle($request, Closure $next)\n {\n $this->start_execution = microtime(true);\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n if (auth('worker')->user()->type === 'worker' ) \n return $next($request);\n \n return $this->response('not_auth' , __('auth.not_authorized'));\n }",
"public function handle($request, Closure $next)\n {\n return $this->encrypt($next($this->decrypt($request)));\n }",
"function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n \n if ($auth_line = $request->getHeaderLine('Authorization')) {\n if (preg_match(\"#^Bearer (.+)$#\", $auth_line, $p)) {\n $token = $p[1];\n \n // is it a valid token?\n $jwt = new JWT();\n $id = $jwt->parseToken($token);\n \n container()->set('authenticated_user_identity', $id); // authenticate user\n \n }\n }\n \n if (is_null(current_authenticated_user_id())) {\n $response = $response->withStatus(403);\n \n return $response;\n }\n \n $response = $next($request, $response);\n \n return $response;\n }",
"public function middleware($middleware): self\n {\n $next = $this->tip;\n $node = new MiddlewareNode($this->getCallable($middleware), $next);\n $this->tip = $node;\n return $this;\n }",
"protected function parseMiddleware($name)\n {\n list ($name, $payload) = array_pad(explode(':', $name, 2), 2, '');\n\n //\n $callable = array_get($this->middleware, $name, $name);\n\n if (empty($payload)) {\n return $callable;\n } else if (is_string($callable)) {\n return $callable .':' .$payload;\n }\n\n return function ($passable, $stack) use ($callable, $payload)\n {\n $parameters = array_merge(\n array($passable, $stack), explode(',', $payload)\n );\n\n return call_user_func_array($callable, $parameters);\n };\n }",
"public function getMiddlewareStack() : array;",
"public function handle($request, Closure $next)\n {\n $lesson_id = $request->route('lesson');\n $lesson = Lesson1::find($lesson_id)->first();\n $user= User::find(Auth::id());\n $a = $user->topics()->where('topics.id',$lesson->topic_id)->first();\n if(empty($a)){\n return response()->view('error');\n }\n return $next($request);\n }",
"public function next() \n {\n $node = next($this->dispatchables);\n return ($node !== false ? $node['route'] : false);\n }",
"public function handle($request, Closure $next)\n {\n if(!$request->hasHeader('Authorization')){\n throw new JWTException('Token not found in request',400);\n }\n\n $authHeader = $request->header('Authorization');\n\n try{\n list($jwt) = (sscanf($authHeader,'Bearer %s'));\n $token = JWT::decode($jwt, getenv('APP_KEY'), [getenv('APP_ENCRYPT_ALGORITHM')]);\n\n //success on decode the token\n return $next($request);\n\n }catch (Exception $e){\n throw new JWTException('Unauthorized',401);\n }\n }",
"public function unshift(callable $middleware)\n {\n array_unshift($this->middlewares, $middleware);\n }",
"public function prepare($middleware): MiddlewareInterface\n {\n if ($middleware instanceof MiddlewareInterface) {\n return $middleware;\n }\n\n if ($middleware instanceof RequestHandlerInterface) {\n return $this->addHandler($middleware);\n }\n\n if (is_callable($middleware)) {\n return $this->addCallable($middleware);\n }\n\n if (is_array($middleware)) {\n return $this->pipeline(...$middleware);\n }\n\n if (!is_string($middleware) || $middleware === '') {\n throw InvalidMiddlewareException::forMiddleware($middleware);\n }\n }",
"function __invoke(Request $request, Response $response, callable $next)\n {\n if (isset($_SESSION['errors'])) {\n $this->view->getEnvironment()->addGlobal('errors', $_SESSION['errors']);\n unset($_SESSION['errors']);\n }\n\n // Next Middleware\n $response = $next($request, $response);\n return $response;\n }",
"public function handle($request, Closure $next)\n {\n if ($request->input(\"access_token\") == null) {\n return response()->json([\"status_code\" => 401, \"message\" => \"Not found access_token Error!(middleware)\"], 401);\n }\n try {\n JWT::decode($request->input(\"access_token\"), config(\"app.secret_form_template\"), ['HS256']);\n return $next($request);\n } catch (Exception $e) {\n return response()->json([\"status_code\" => 401, \"message\" => $e->getMessage(), 'error' => 'middleware(auth web)'], 401);\n }\n }",
"public function handle($request, Closure $next)\n {\n // ---------------\n // return $next($request); // no filters set, anyone can access /admin\n // -----------------------\n\n // Easy way to Restrict Access is to use AUTH FACADE\n if(!Auth::check()) \n {\n return redirect('users/login');\n } \n else \n {\n $user = Auth::user(); // Fetch logged in user\n\n if($user->hasRole('manager'))\n {\n return $next($request);\n } \n else\n {\n return redirect('/');\n }\n }\n\n }",
"public function handle($request, Closure $next, $guard = null)\n {\n $access_token = $request->header('access-token') ;\n\n $request = (array)json_decode($request->getContent(), true);\n if(array_key_exists('lang_id',$request)) {\n Helpers::Set_locale($request['lang_id']);\n }\n if($access_token)\n {\n $access_token=$access_token;\n \n \n if ($access_token) \n { $user= User::where('api_token', $access_token)->first();\n //dd($access_token);\n }\n if ($user) \n { \n return $next($request);\n }else{\n\n // return response('Unauthorized.', 401);\n return Helpers::Get_Response(400,'error',trans('messages.logged'),[],[]);\n }\n \n } \n return Helpers::Get_Response(400,'error',trans('messages.logged'),[],[]);\n }",
"public function handle($request, Closure $next){\n if(!is_array($request->requestMap)){\n $request->requestMap = [];\n }\n\n $payments = Payments::selectAdapterByService($request->serviceID);\n if(!$payments['status']){\n return response($payments, 403);\n }\n\n $inputValidate = Payments::$adapter::inputValidation($request->serviceID,$request->clientAmount,$request->requestMap);\n if($inputValidate !== true){\n return response($inputValidate, 403);\n }\n\n $Validate = Payments::$adapter::transactionMiddleware(PaymentServices::find($request->serviceID)->payment_service_apis()->where('service_type',$request->serviceType)->first()->external_system_id,$request->clientAmount,$request->requestMap);\n if($Validate['error']){\n return response($Validate, 403);\n }else{\n $Validate['payment_transaction']->requestMap = $request->requestMap;\n $request->PaymentTransaction = $Validate['payment_transaction'];\n }\n\n return $next($request);\n }"
] | [
"0.6752117",
"0.66690207",
"0.6622647",
"0.65207684",
"0.65207684",
"0.63957626",
"0.63761896",
"0.6352436",
"0.62916",
"0.62613744",
"0.615779",
"0.61190957",
"0.60768324",
"0.5982674",
"0.59793043",
"0.59714884",
"0.5905679",
"0.5836984",
"0.58001155",
"0.57484573",
"0.56683236",
"0.5661904",
"0.56503856",
"0.5627947",
"0.56013876",
"0.5590276",
"0.5547651",
"0.5534208",
"0.5517323",
"0.5480123",
"0.54593027",
"0.54384553",
"0.54384553",
"0.5395658",
"0.5393726",
"0.5383973",
"0.53687644",
"0.53675663",
"0.5354579",
"0.53393143",
"0.52919114",
"0.5271013",
"0.52424914",
"0.5237028",
"0.52211857",
"0.52177066",
"0.52177066",
"0.5212593",
"0.5210179",
"0.5160502",
"0.5160502",
"0.51585907",
"0.5155083",
"0.51436335",
"0.5129966",
"0.512489",
"0.5120513",
"0.5117932",
"0.51140535",
"0.51069754",
"0.5099796",
"0.5097946",
"0.5085401",
"0.5082604",
"0.5056953",
"0.504373",
"0.50408274",
"0.50408274",
"0.50408274",
"0.50408274",
"0.50408274",
"0.503627",
"0.5032848",
"0.5019052",
"0.50110996",
"0.4995951",
"0.4992866",
"0.49923918",
"0.49814874",
"0.49664098",
"0.49614492",
"0.4959251",
"0.49538335",
"0.49528307",
"0.49522343",
"0.49511728",
"0.49332905",
"0.49323726",
"0.4932217",
"0.49180686",
"0.49150598",
"0.49111447",
"0.49072632",
"0.49044466",
"0.49030864",
"0.4902788",
"0.48917285",
"0.48891664",
"0.48877722",
"0.48875818"
] | 0.70806575 | 0 |
Get the current ServerRequestInterface object | protected function getRequest() {
return $this->request;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getCurrentRequest():ServerRequestInterface {\n return $this->requestStack->getCurrentRequest();\n }",
"protected function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function getRequest(): RequestInterface;",
"public function request() : ServerRequestInterface;",
"public function &getRequest() : RequestInterface\n {\n return $this->request;\n }",
"public function createServerRequestFromGlobals(): ServerRequestInterface;",
"public function createServerRequestFromGlobals(): ServerRequestInterface;",
"public function getFromRequest(ServerRequestInterface $request);",
"public static function getServerRequest() {\n\t\tif (is_null(self::$serverRequest)) {\n\t\t\tself::$serverRequest = ServerRequest::fromGlobals();\n\t\t}\n\t\t\n\t\treturn self::$serverRequest;\n\t}",
"public function setRequest(ServerRequestInterface $request);",
"public function getIncomingRequest(): IRequest {\n\t\treturn $this->incomingRequest;\n\t}",
"public function getRequest()\n {\n return $this->getService('request');\n }",
"public function getRequestHandler(): RequestHandlerInterface;",
"protected function _request() {\n\t\treturn $this->_container->request;\n\t}",
"function getRequest()\n {\n return $this->current_request;\n }",
"private function getRequest()\n {\n if ($this->request === null) {\n $this->request = $this->container->get('request_stack')->getCurrentRequest();\n }\n return $this->request;\n }",
"public function getCurrentRequest()\n {\n return $this->container['request'];\n }",
"public function getRequest()\n {\n return $this->_request;\n }",
"public function getRequest()\n {\n return $this->_request;\n }",
"public function get_request()\n\t{\n\t\treturn $this->request;\n\t}",
"public function get_request()\n\t{\n\t\treturn $this->request;\n\t}",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"protected function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->requestFactory->getRequest();\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"protected function setRequest(ServerRequestInterface $request) {\n\t\t$this->request = $request;\n\n\t\treturn $this;\n\t}",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n return $this->request;\n }",
"public function getRequest()\n {\n if (is_null($this->_request)) {\n $this->_request = new Request();\n }\n return $this->_request;\n }",
"public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}",
"public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}",
"public function getRequest()\n\t{\n\t\treturn $this->request;\n\t}",
"public function getRequest(): ?RequestInterface;",
"public function getRequest(): Request\n {\n return $this->request;\n }",
"public function getRequest(): Request\n {\n return $this->request;\n }",
"public function getRequest() {\n\t\treturn $this->request;\n\t}",
"public function __invoke(\n ServerRequestInterface $request\n );",
"public function getRequest() {\n return $this->request;\n }",
"function getRequest() {\n\t\treturn $this->m_request;\n\t}",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest()\n {\n return $this->get('request');\n }",
"public function getRequest() {\n return $this->_request;\n }",
"public function request()\n\t{\n\t\treturn $this->request;\n\t}",
"protected function getRequest() {\n return $this->request;\n }",
"public function getRequest() {\n return $this->request;\n }",
"public function getRequest()\n {\n return isset($this->request) ? $this->request : null;\n }",
"public function request()\r\n {\r\n return $this->request;\r\n }",
"public function getRequest() {\r\n\t\treturn $this->context->getState('request');\r\n\t}",
"public function getRequest()\n\t{\n\t\treturn $this->compose('Request', 'Http\\Requests');\n\t}",
"public function getRequest()\n {\n if (! $this->request) {\n $this->request = \\Zend_Controller_Front::getInstance()->getRequest();\n }\n return $this->request;\n }",
"function getRequest() {\n\t\treturn $this->Request;\n\t}",
"public function getRequest()\n {\n return $this->getComponent('request');\n }",
"public function getRequest() {\n return $this->Request;\n }",
"function getRequest() {\n return $this->request;\n }",
"public function request()\n {\n return $this->request;\n }",
"public function request()\n {\n return $this->request;\n }",
"public function incomingRequest()\n\t{\n\t\treturn $this->request;\n\t}",
"public function request()\n {\n return $this->context->getRequest();\n }",
"protected function getRequest()\n {\n return $this->req;\n }",
"public function getRequest()\n {\n assert(null != $this->request, 'Request must not be null');\n\n return $this->request;\n }",
"public function getRequest()\n {\n return static::app()->request;\n }",
"public function getRequest()\n\t{\n\t\treturn $this->getComponent('request');\n\t}",
"private function getRequest()\n {\n $controller = $this->getController();\n return $controller->getRequest();\n }",
"public function getRequest()\n {\n return $this->req;\n }",
"public function &request() : \\Amvisie\\Core\\HttpRequest\n {\n return $this->request;\n }",
"public function getReq()\n\t{\n\t\treturn $this->_request;\n\t}",
"public function getRequest()\n {\n return $this->data->request;\n }",
"function getRequest()\n {\n if ( !$this->_request )\n {\n if ( method_exists( $this, '_getRequest' ) )\n {\n $object = $this->_getRequest();\n if ( $object instanceof \\Hotlink\\Framework\\Model\\Api\\Request )\n {\n $this->setRequest( $object );\n }\n }\n if ( !$this->_request )\n {\n //$request = Mage::getModel('hotlink_framework/api_request');\n $request = $this->interactionApiRequestFactory->create();\n $this->setRequest( $request );\n }\n }\n return $this->_request;\n }",
"public function getRequest(): Request|\\Symfony\\Component\\HttpFoundation\\Request\n {\n return $this->request ?: Request::createFromGlobals();\n }",
"public function getRequest(): Request\n {\n return BackendModel::getRequest();\n }",
"public function request() {\n return $this->requestStack->getCurrentRequest();\n }",
"public function getFromServerRequestAttribute(ServerRequestInterface $request): ?string;",
"public function getRequest()\r\n {\r\n return $this->_controller->getApplication()->getRequest();\r\n }",
"public function getCurrentRequest()\n\t\t{\n\t\t\treturn $this->currentRequest;\n\t\t}",
"public function getRequest(): Request\n {\n return Model::getRequest();\n }"
] | [
"0.832709",
"0.8216281",
"0.81265247",
"0.81265247",
"0.79964876",
"0.7783456",
"0.7683295",
"0.75505924",
"0.75505924",
"0.750584",
"0.73708427",
"0.73535985",
"0.7287063",
"0.72131014",
"0.7136395",
"0.71035033",
"0.70918846",
"0.7066601",
"0.7059956",
"0.703765",
"0.703765",
"0.70319974",
"0.70319974",
"0.70121783",
"0.70121783",
"0.70121783",
"0.7008425",
"0.7007907",
"0.7007907",
"0.7007792",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.700728",
"0.70052755",
"0.70017576",
"0.70017576",
"0.70017576",
"0.699409",
"0.6981668",
"0.6981668",
"0.6964952",
"0.69640684",
"0.6963352",
"0.6962585",
"0.69605535",
"0.69605535",
"0.69605535",
"0.69605535",
"0.6958379",
"0.69560283",
"0.6945584",
"0.69438905",
"0.69413817",
"0.69373554",
"0.69206184",
"0.6907526",
"0.69044524",
"0.69026154",
"0.69009507",
"0.68963337",
"0.6893138",
"0.68901104",
"0.68901104",
"0.6872483",
"0.6862438",
"0.6857232",
"0.68531764",
"0.6853027",
"0.6852311",
"0.6845241",
"0.6844609",
"0.68337286",
"0.6825985",
"0.67924803",
"0.67865413",
"0.67769724",
"0.67713004",
"0.67615193",
"0.67476016",
"0.67439634",
"0.672826",
"0.67274314"
] | 0.6977724 | 58 |
Start the middleware pipeline If a delegate is given, will pass on the possibly modified request object when the iterator is no longer valid. | protected function run(
ServerRequestInterface $request,
DelegateInterface $delegate = null,
Dispatcher $that = null
): ResponseInterface {
$that = $that ?: clone $this;
$that->setRequest($request);
try {
$response = $that->step();
}
catch (Exception\OutOfMiddlewareException $ex) {
if ($delegate === null) {
throw $ex;
}
$response = $delegate->process(
$that->getRequest()
);
}
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function next()\n {\n if (($middleware = next($this->middlewares))) {\n call_user_func($middleware, $this->request, $this->response, $this);\n } elseif ($this->parent !== null) {\n $this->parent->next();\n }\n }",
"public function process(ServerRequestInterface $request, DelegateInterface $delegate)\n {\n if ($this->bootstrap) {\n $bootstrap = (microtime(true) - $this->start) * 1000;\n $this->stopwatch->set($this->bootstrap, $bootstrap);\n }\n\n /* Call all the other middlewares. */\n if ($this->process) {\n $this->stopwatch->start($this->process);\n $response = $delegate->process($request);\n $this->stopwatch->stop($this->process);\n }\n\n /* Time spent from starting the request to exiting last middleware. */\n if ($this->total) {\n $total = (microtime(true) - $this->start) * 1000;\n $this->stopwatch->set($this->total, (integer) $total);\n }\n $this->stopwatch->stopAll();\n\n return $response->withHeader(\n \"Server-Timing\",\n $this->generateHeader($this->stopwatch->values())\n );\n }",
"public function run()\n {\n foreach ($this->middleware as $middleware) {\n $middleware = $this->bootstrapMiddleware($middleware);\n\n if (method_exists($middleware, 'handle')) {\n $middleware->handle($this->request, function (Request $request) {\n $this->request = $request;\n });\n }\n }\n\n return $this->request;\n }",
"public function __invoke(\n RequestInterface $request,\n ResponseInterface $response,\n DelegateInterface $next = null\n )/*# : ResponseInterface */ {\n return $this->process($request, $response, $next);\n }",
"protected function step(): ResponseInterface {\n\t\t$current = $this->getMiddleware();\n\n\t\tif ($current !== null) {\n\t\t\t$delegate = $this->createDelegate(\n\t\t\t\tfunction(ServerRequestInterface $request) {\n\t\t\t\t\treturn $this->setRequest($request)->step();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$request = $this->getRequest();\n\n\t\t\treturn $current->process($request, $delegate);\n\t\t}\n\n\t\tthrow new Exception\\OutOfMiddlewareException(\n\t\t\t\"Middleware iterator exhausted.\"\n\t\t);\n\t}",
"public function next()\n {\n next($this->requests);\n }",
"public function process(HTTPRequest $request, callable $delegate)\n {\n /** @var HTTPResponse $response */\n $response = $delegate($request);\n\n // Ignore by regexes.\n if ($this->shouldCheckHttpHost() && $this->isIgnoredDomain($_SERVER['HTTP_HOST'])) {\n return $response;\n }\n\n foreach ($this->requestedPolicies as $requestedPolicy) {\n /** @var ControllerPolicy $policyInstance */\n $policyInstance = $requestedPolicy['policy'];\n\n $policyInstance->applyToResponse(\n $requestedPolicy['originator'],\n $request,\n $response\n );\n }\n\n return $response;\n }",
"public function __invoke($request)\n {\n $next = $this->middleware->get($this->index);\n\n if ($next)\n {\n $name = ($next['n']) ?? '';\n $mParams = explode(',',($next['p']) ?? '');\n\n // check if the middleware class actually exist,\n // otherwise we will need to close out this.\n if (!class_exists($name)) return false;\n\n // increment the middelware we instantiate\n $this->index++;\n\n // begin our middleware instance\n $middleware = new $name();\n\n // load our middelware handle instance for the request\n if (method_exists($middleware, 'handle'))\n {\n $this->middlewareInstances[] = $middleware;\n\n return $middleware->handle($request, $this, ...$mParams);\n }\n else\n {\n // if the middleware does not have a handle, we will need to end the script.\n // All middlewares must have a handle.\n return false;\n }\n }\n\n // return the updated response\n return $this->response;\n }",
"public function process(ServerRequestInterface $request, DelegateInterface $delegate): ResponseInterface {\n $path = $request->getUri()->getPath();\n if (strpos($path, $this->prefix) === 0) {\n return $this->container->get($this->middleware)->process($request, $delegate);\n }\n return $delegate->process($request);\n }",
"public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next);",
"abstract public function apply(Request $request, Response $response, Closure $next);",
"function __invoke(Request $request, Response $response, callable $next)\n {\n if (isset($_SESSION['errors'])) {\n $this->view->getEnvironment()->addGlobal('errors', $_SESSION['errors']);\n unset($_SESSION['errors']);\n }\n\n // Next Middleware\n $response = $next($request, $response);\n return $response;\n }",
"abstract function __invoke(RequestInterface $request, ResponseInterface $response, callable $next);",
"public function call()\n {\n // Get the reference to the application\n $app = $this->app;\n\n // Get the application request without trailing slashes \n $requesturi = ltrim($app->request->getPathInfo(), '/');\n\n if($requesturi != 'unauthorized') {\n // Check if the user is authorized to execute this request\n if(!Security::isUserAuthorized($requesturi)) {\n $app->redirect('/unauthorized');\n }\n }\n\n // Run the inner middleware and application\n $this->next->call();\n }",
"public function before(callable $delegate) {\n\t\t\t$this->before = $delegate;\n\t\t\treturn $this;\n\t\t}",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}",
"public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}",
"public function handle($request, Closure $next)\n {\n $this->start_execution = microtime(true);\n return $next($request);\n }",
"public function start()\n {\n foreach ($this->routes as $route) {\n if ($route->match()) {\n $this->applyRoute($route); \n }\n\n if (!$route->continue) {\n break;\n }\n }\n }",
"public function next()\n {\n next($this->_filters);\n if (($closure = current($this->_filters)) === false) {\n return false;\n }\n $params = $this->_params = func_get_args() + $this->_params;\n array_unshift($params, $this);\n return call_user_func_array($closure, $params);\n }",
"private function runMiddlewares()\n {\n $middleware = $this->getMiddleware();\n $this->middlewareIndex++;\n if (null === $middleware) {\n $this->runRoute();\n } else {\n return $middleware([$this, 'run']);\n }\n }",
"public function handle($request, Closure $next)\n {\n Log::info(\n 'Beginning request',\n [\n 'time' => microtime(true),\n 'method' => $request->method(),\n 'uri' => $request->url()\n ]\n );\n\n return $next($request);\n }",
"private static function middleware()\n {\n $files = ['Filters', 'Middleware'];\n $folder = static::$root.'Http/Middleware'.'/';\n\n self::call($files, $folder);\n\n $files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];\n $folder = static::$root.'Http/Middleware/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function handle($request, Closure $next)\n {\n $this->request = $request;\n\n info(\"================== FeMiddleware: [\".$request->path().\"] ====================\");\n $this->process($this->request);\n info(\"================== End============================================\");\n \n return $next($this->request);\n }",
"public function process(ServerRequestInterface $request, RequestHandlerInterface $delegate)\n {\n if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::'\n . __LINE__ . ' processing...');\n\n $dispatcher = $this->_getDispatcher();\n\n $uri = $request->getUri()->getPath();\n\n // remove trailing slashes - FastRoute is not handling uris with them correctly it seems\n $uri = preg_replace('/\\/+$/', '', $uri);\n\n // if the tine20 server is located in a subdir, we need to remove the server path from the uri\n $serverPath = Tinebase_Core::getUrl('path');\n $uri = preg_replace('/^' . preg_quote($serverPath, '/') . '/', '', $uri);\n\n if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::'\n . __LINE__ . ' FastRoute dispatching on method: ' . $request->getMethod() . ' and uri: '\n . $uri);\n\n $routeInfo = $dispatcher->dispatch($request->getMethod(), $uri);\n switch ($routeInfo[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::'\n . __LINE__ . ' returning 404 not found');\n\n // 404 not found\n return new Response('php://memory', 404);\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::'\n . __LINE__ . ' returning 405 method not allowed');\n\n //$allowedMethods = $routeInfo[1];\n // 405 method not allowed\n return new Response('php://memory', 405);\n case FastRoute\\Dispatcher::FOUND:\n if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::'\n . __LINE__ . ' FastRoute dispatching result: ' . print_r($routeInfo, true));\n\n $handler = Tinebase_Expressive_RouteHandler::fromArray($routeInfo[1]);\n $handler->setVars($routeInfo[2]);\n return $delegate->handle($request->withAttribute(Tinebase_Expressive_Const::ROUTE_HANDLER, $handler));\n break;\n default:\n throw new Tinebase_Exception_UnexpectedValue('fast route dispatcher returned unexpected route info');\n }\n\n // in case you ever want to call $delegate->process without add the Tinebase_Expressive_Const::ROUTE_HANDLER\n // then do it like this: $delegate->process($request->withoutAttribute(Tinebase_Expressive_Const::ROUTE_HANDLER)\n }",
"public function handle($request, Closure $next)\n {\n return parent::handle($request, $next); // defer to the right stuff\n }",
"public function setUp()\n {\n $this->middleware = new ForbiddenWordsFilterMiddleware(['badword']);\n $this->request = Phake::mock(ServerRequestInterface::class);\n $this->delegate = Phake::mock(DelegateInterface::class);\n\n // the class needs to know which route it matched. Create a fake result and tell the request to return that\n $this->route_result = Phake::mock(RouteResult::class);\n Phake::when($this->request)->getAttribute(RouteResult::class)->thenReturn($this->route_result);\n Phake::when($this->route_result)->getMatchedParams()->thenReturn([]);\n\n // return an empty body stream\n Phake::when($this->request)->getBody()->thenReturn(new BufferStream());\n\n // when try try to replace the body just return the same request as before.\n Phake::when($this->request)->withBody($this->anything())->thenReturn($this->request);\n }",
"public function handle(Builder $builder, Closure $next)\n {\n if (!$this->request->has($this->filterName()) || $this->request->input($this->filterName(), '') === '') {\n return $next($builder);\n }\n return $this->applyFilters($next($builder));\n }",
"public function handle($request, Closure $next)\n {\n $this->startTime = microtime(true);\n\n return $next($request);\n }",
"public function handle(Request $request, Closure $next)\n {\n foreach (static::$skipCallbacks as $callback) {\n if ($callback($request)) {\n return $next($request);\n }\n }\n\n return parent::handle($request, $next);\n }",
"protected function forwardToReferringRequest() {}",
"public function handle($request, Closure $next)\n {\n $result = Manager::middleware();\n return $result?$result:$next($request);\n }",
"public function handle(Request $request, Closure $next);",
"protected function mockNextMiddleware()\n {\n return function ($request, $response) {\n return $response;\n };\n }",
"public function handle($request, $next);",
"public function run() {\r\n $this->routeRequest(new Request());\r\n }",
"public function handle($request, Closure $next)\n {\n\n\n echo \"<h4>\" . \"touched the moddle ware\" .\"</h4>\";\n\n // if(1){\n // // return \"interupted\";\n // return view('test.index');\n // }\n\n return $next($request);\n }",
"protected function before()\n {\n $object = new self($this->routeParams);\n (new Middleware())->middlewares($this->callBeforeMiddlewares())\n ->middleware($object, function ($object) {\n return $object;\n });\n }",
"public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)\n {\n return $this;\n }",
"function beforeFilterHandler($request, stdClass $context) {\n $self = $this;\n try {\n $afterFilterHandler = $this->afterFilterHandler;\n $response = $afterFilterHandler($this->inputFilter($request, $context), $context)\n ->then(null, function($error) use ($self, $context) {\n return $self->delayError($error, $context);\n });\n }\n catch (Exception $error) {\n $response = $this->delayError($error, $context);\n }\n return $response->then(function($value) use ($self, $context) {\n return $self->outputFilter($value, $context);\n });\n }",
"public function handle($request, Closure $next)\n {\n $criterio_id = $request->route()->parameter('criterios');\n $criterio = \\App\\Criterio::findOrFail($criterio_id);\n if (isset($criterio)) {\n $request->{'criterio'} = $criterio;\n return $next($request);\n } else {\n abort(404);\n }\n }",
"public function handle(Request $request, Closure $next)\n {\n echo 'the middle ware called';\n if($request->all()) {\n echo 'Message from middleware:You have something in request';\n }\n else {\n echo 'Message from middleware:your request is empty';\n }\n return $next($request);\n }",
"public function middleware()\n {\n // TODO: Implement middleware() method.\n }",
"public function process(Request $request, Delegate $delegate) : Response\n {\n try {\n return $delegate->process($request);\n } catch (\\Throwable $e) {\n $this->log->error($e->getMessage(), ['trace' => $e->getTraceAsString(), 'line' => $e->getLine(), 'file' => $e->getFile(), 'code' => $e->getCode()]);\n throw $e;\n }\n }",
"public function __invoke($request, $response, $next)\n {\n LogFacade::info(\"before request: \" . $request->getUri());\n $response = $next($request, $response);\n LogFacade::info(\"after request: \" . $request->getUri());\n\n return $response;\n }",
"public function start()\n {\n $this->dataValidator->setData($this->dataFromRequest, $this->currentBlockMetadata);\n }",
"public function handle($request, Closure $next)\n {\n $requestId = $this->requestContext->getId();\n $userId = Auth::user() ? Auth::user()->id : 'n/a';\n\n $monolog = Log::getMonolog();\n $monolog->pushProcessor(function ($record) use ($userId, $requestId) {\n $record['extra']['user'] = $userId;\n $record['extra']['request_id'] = $requestId;\n\n return $record;\n });\n\n $response = $next($request);\n \n if (!$this->shouldSample()){\n return $response;\n }\n\n $responseContent = $response->getContent();\n\n $headers = collect($request->headers)\n ->keys()\n ->flip()\n ->map(function ($i, $header) use ($request) {\n return $request->header($header);\n })\n ->all();\n\n $requestResponseData = new RequestResponseData(\n $this->requestContext->getId(),\n Auth::id(),\n json_encode($request->all()), // This should not be all should be getContent()\n $request->method(),\n $request->fullUrl(),\n $request->ip(),\n $response->status(),\n $responseContent,\n $this->getResponseTimeInMs(),\n $headers,\n $this->requestContext->getStartedAt()\n );\n\n\n try {\n $this->dispatch(new StoreRequestData($requestResponseData));\n } catch (Exception $e) {\n // An exception in logging shouldn't terminate\n // the session and cause a 500 response!\n // Move on -->\n Log::error($e);\n }\n\n try {\n $this->dispatch(new StoreQueries($this->requestContext));\n } catch (Exception $e) {\n // An exception in logging shouldn't terminate\n // the session and cause a 500 response!\n // Move on -->\n Log::error($e);\n }\n\n return $response;\n }",
"public function preProcessRequest(RequestInterface &$request) {}",
"public function middleware($middleware, int $position = self::BOTH): self\n {\n return $this->filter($middleware, $position);\n }",
"public function handle($request, Closure $next)\n {\n $this->startSpiderManager($request);\n $response = $next($request);\n\n return $response;\n }",
"public function handle($request, Closure $next)\n {\n // echo \"aa\";\n $url_hash=substr(md5($_SERVER['REQUEST_URI']),0,10);//获得访问路径 域名以外的东西\n $key='firm_filter:url'.$url_hash;\n Redis::incr($key);\n Redis::expire($key,60);\n $num=Redis::get($key);\n echo \"num:\";echo $num;\n if($num>20){\n //超过限制一天以后才能再次请求\n Redis::expire($key,68400);\n die(\"请求超过限制\");\n }\n return $next($request);\n }",
"static function start() {\n self::instance()->klein->dispatch(self::instance()->request);\n exit;\n }",
"public function __invoke($request, $response, $next)\n {\n\n// $response->getBody()->write('BEFORE');\n $response = $next($request, $response);\n// $response->getBody()->write('AFTER');\n return $response;\n }",
"public function process()\n {\n if ($this->request->isCancelled() === true) {\n $this->setSessionData();\n $this->response->send();\n return;\n }\n \n $this->interceptorInitializer->setDescriptor($this->processorResolver->getInterceptorDescriptor($this->request))\n ->init();\n foreach ($this->interceptorInitializer->getPreInterceptors() as $preInterceptor) {\n $preInterceptor->preProcess($this->request, $this->session, $this->response);\n if ($this->request->isCancelled() === true) {\n $this->setSessionData();\n $this->response->send();\n return;\n }\n }\n \n $processor = null;\n try {\n $processor = $this->processorResolver->resolve($this->request, $this->session, $this->response);\n $processor->startup(new stubDummyUriRequest($this->request->readHeader('REQUEST_URI')->unsecure()));\n if ($processor->forceSsl() === true && $processor->isSsl() === false) {\n $this->response->addHeader('Location', 'https://' . $this->request->getURI());\n $this->request->cancel();\n $this->response->send();\n return;\n }\n \n $processor->process();\n } catch (stubProcessorException $pe) {\n $this->response->setStatusCode($pe->getStatusCode());\n }\n \n if (null !== $processor) {\n $processor->cleanup();\n }\n \n if ($this->request->isCancelled() === false) {\n foreach ($this->interceptorInitializer->getPostInterceptors() as $postInterceptor) {\n $postInterceptor->postProcess($this->request, $this->session, $this->response);\n if ($this->request->isCancelled() === true) {\n break;\n }\n }\n }\n \n $this->setSessionData();\n $this->response->send();\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n \n }",
"private function setupMiddleware()\n {\n $this->getSlim()->add(new Model\\Middleware( $this ));\n }",
"public function handle($request, Closure $next)\n\t{\n//\t\t$member = Member::current();\n//\t\t$broadcast_read =TenderBroadcastRead::where('member_id', $member->id)\n//\t\t\t->where('broad_id', 1)->first();\n//\t\tif(empty($broadcast_read)) {\n//\t\t\treturn redirect('/tender/contract');\n//\t\t}\n\t\treturn $next($request);\n\t}",
"protected function callMiddleware()\n {\n if (count($this->middleware) > 0) {\n foreach ($this->middleware as $middleware) {\n $controller = new $middleware;\n call_user_func_array([$controller, 'handle'], []);\n }\n }\n }",
"public function handle($request, Closure $next){\n if(!is_array($request->requestMap)){\n $request->requestMap = [];\n }\n\n $payments = Payments::selectAdapterByService($request->serviceID);\n if(!$payments['status']){\n return response($payments, 403);\n }\n\n $inputValidate = Payments::$adapter::inputValidation($request->serviceID,$request->clientAmount,$request->requestMap);\n if($inputValidate !== true){\n return response($inputValidate, 403);\n }\n\n $Validate = Payments::$adapter::transactionMiddleware(PaymentServices::find($request->serviceID)->payment_service_apis()->where('service_type',$request->serviceType)->first()->external_system_id,$request->clientAmount,$request->requestMap);\n if($Validate['error']){\n return response($Validate, 403);\n }else{\n $Validate['payment_transaction']->requestMap = $request->requestMap;\n $request->PaymentTransaction = $Validate['payment_transaction'];\n }\n\n return $next($request);\n }",
"public function pipe($middleware_or_path, $middleware = null): void;",
"private function requestGenerator($total){\n\t $uri = 'https://atomic.incfile.com/fakepost';\n\t for ($i = 0; $i < $total; $i++) {\n\t yield new Request('POST', $uri);\n\t }\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n\n }",
"public function middleware($middlewareDefinition): self;",
"public function handle($request, Closure $next)\n {\n // Pre-Middleware Action\n\n $response = $next($request);\n\n // Post-Middleware Action\n\n return $this->logActivity($request, $response);\n }",
"public function process(ServerRequestInterface $request, DelegateInterface $delegate)\n {\n /** @var Request $sendRequest */\n $sendRequest = $request->getAttribute(RequestResolver::ATTR_SEND_REQUEST);\n\n $client = new MeshHttpClient();\n $response = $client->send($sendRequest);\n $request = $request->withAttribute(static::ATTR_SERVICE_RESPONSE, $response);\n $response = $delegate->process($request);\n return $response;\n }",
"private function middlewareProcess($controller, $action)\n {\n $routeName = $controller->getId() . '/' . $action->getId();\n $middlewares = $this->getMiddlewareGroups();\n\n if (isset($middlewares[$routeName]) && is_array($middlewares[$routeName])) {\n $protocolFactory = new ProtocolFactory();\n $this->middlewareRequest = (new Middleware($middlewares[$routeName], $protocolFactory))->middlewareProcess();\n }\n\n }",
"public function __invoke($err = null)\n {\n $dispatch = $this->dispatch;\n $done = $this->done;\n\n if ($this->slashAdded) {\n $uri = $this->request->getUrl();\n $path = substr($uri->path, 1);\n $request->setUrl($uri->setPath($path));\n $this->slashAdded = false;\n }\n\n if ($this->removed) {\n $uri = $this->request->getUrl();\n $path = $this->removed . $uri->path;\n $request->setUrl($uri->setPath($path));\n $this->removed = '';\n }\n\n // No middleware remains; done\n if (! isset($this->stack[$this->index])) {\n return $done($err);\n }\n\n $layer = $this->stack[$this->index++];\n $path = $this->request->getUrl()->path ?: '/';\n $route = $layer->path;\n\n // Skip if layer path does not match current url\n if (substr(strtolower($path), 0, strlen($route)) !== strtolower($route)) {\n return $this($err);\n }\n\n // Skip if match is not at a border ('/', '.', or end)\n $border = (strlen($path) > strlen($route))\n ? $path[strlen($route)]\n : '';\n $border = ($route === '/') ? '/' : $border;\n if ($border && '/' !== $border && '.' !== $border) {\n return $this($err);\n }\n\n // Trim off the part of the url that matches the layer route\n if (strlen($route) !== 0 && $route !== '/') {\n $this->removed = $route;\n\n $uri = $this->request->getUrl();\n $path = substr($uri->path, strlen($route));\n $this->request->setUrl($uri->setPath($path));\n\n if ($path[0] !== '/') {\n $path = '/' . $path;\n $this->request->setUrl($uri->setPath($path));\n $this->slashAdded = true;\n }\n }\n\n $dispatch($layer, $err, $this->request, $this->response, $this);\n }",
"public function process(\n ServerRequestInterface $request,\n DelegateInterface $frame\n );",
"public function startChain(){\n\t\treturn $this;\n\t}",
"public function startChain(){\n\t\treturn $this;\n\t}",
"public function handle($request,Closure $next,$var=null)\n {\n if ($var==\"bb\")\n {\n echo \"<br> MyMiddleware\";\n\n }\n else\n {\n return $next($request);\n }\n\n }",
"public function startChain() {\n\t\treturn $this;\n\t}",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function run(): void\n {\n $requestBody = $this->getConfig()->getInputAdapter()::getParsedBody();\n $request = ServerRequestFactory::fromGlobals(\n $_SERVER,\n $_GET,\n $requestBody,\n $_COOKIE,\n $_FILES\n );\n\n $queue = [];\n\n $queue[] = new \\Middlewares\\Emitter();\n $queue[] = new ErrorHandler([new JsonFormatter()]);\n $queue[] = (new \\Middlewares\\PhpSession())->name('VENUSSESSID')\n ->regenerateId(60); // Prevent session fixation attacks\n\n $queue[] = (new \\Middlewares\\FastRoute(\n $this->getConfig()->getDispatcher()\n ))->attribute('handler');\n\n $queue = array_merge($queue, $this->getConfig()->getMiddlewares());\n\n // Use router access permission check\n if ($this->getConfig()->usePermission()) {\n $queue[] = (new Permission(\n $this->getConfig()->getContainer()\n ))->handlerAttribute('handler');\n }\n\n $queue[] = (new RequestHandler(\n $this->getConfig()->getContainer()\n ))->handlerAttribute('handler');\n\n $dispatcher = new Dispatcher($queue);\n $dispatcher->dispatch($request);\n }",
"public function handle($request, Closure $next)\n {\n if(!$request->has('per_page')){\n $request->per_page = config('crm.items_per_page');\n }\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $this->request = $request;\n \n $this->page = $request->path();\n\n $this->_pushStat();\n\n //dd($request);\n \n return $next($request);\n }",
"protected function callback()\n {\n return GuzzleMiddleware::mapRequest(function (RequestInterface $request) {\n return $request->withHeader('T-middleware', $request->getHeaderLine('T-middleware') . 'B');\n });\n }",
"public function handle($request, Closure $next)\n {\n $this->log($request);\n return $next($request);\n }",
"public function before(\\Closure $before);",
"public function handle($request, Closure $next)\n {\n if (empty(Session::get('phone'))) {\n return redirect('/phone'); \n }\n\n $row = Customer::where('phone', Session::get('phone'))->first();\n if ($row) {\n return $next($request); \n }\n \n }",
"public function handle(ServerRequestInterface $request, DelegateInterface $next)\n {\n\n //只做解密不做校验\n $key_string = file_get_contents(\"/media/raid10/htdocs/development_framwork/data/rsa_key/demo\");\n $private_key = new PrivateKey($key_string);\n $data = (string)$request->getBody();\n $data = EasyRSA::decrypt($data,$private_key);\n $data = json_decode($data,true);\n if ('GET' === $request->getMethod()) {\n $request->withQueryParams($data);\n } else {\n $request->withParsedBody($data);\n }\n return $next($request);\n\n }",
"private function beforeRoutingMiddleWare()\n {\n if (isset($this->before[$_SERVER['REQUEST_METHOD']])) {\n $this->handle($this->before[$_SERVER['REQUEST_METHOD']]);\n }\n }",
"public function handle($request, Closure $next)\n {\n if (\n !Session::has('clientRealIp') &&\n !Session::has('clientRealName') &&\n !Session::has('clientId')\n ) {\n\n foreach (RealIp::all() as $ip) {\n $startTime = strtotime($ip->client->start_ip);\n $endTime = strtotime($ip->client->end_ip);\n\n if(\n Tools::check($ip->ip,$request->getClientIp())\n// Tools::check($ip->ip,'192.168.0.255')\n && ($startTime < time() && time() < $endTime)\n ) {\n Session::put('clientRealIp', $ip->ip);\n Session::put('clientRealName', $ip->client->name);\n Session::put('clientId', $ip->client->id);\n Session::put('clientLogo',$ip->client->logo);\n Session::put('navclient',$ip->client);\n return $next($request);\n }\n }\n return redirect('/member/sign');\n }\n return $next($request);\n }",
"public function call()\n {\n if (is_string($this->callable)) {\n $params = explode('#', $this->callable);\n $controller = Router::$controllersPath . $params[0];\n $controller = new $controller;\n extract($this->globals);\n $this->callMiddleware();\n\n call_user_func_array([$controller, $params[1]], $this->matches);\n } else {\n $this->callMiddleware();\n call_user_func_array($this->callable, $this->matches);\n }\n\n return request();\n }",
"function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n \n if ($auth_line = $request->getHeaderLine('Authorization')) {\n if (preg_match(\"#^Bearer (.+)$#\", $auth_line, $p)) {\n $token = $p[1];\n \n // is it a valid token?\n $jwt = new JWT();\n $id = $jwt->parseToken($token);\n \n container()->set('authenticated_user_identity', $id); // authenticate user\n \n }\n }\n \n if (is_null(current_authenticated_user_id())) {\n $response = $response->withStatus(403);\n \n return $response;\n }\n \n $response = $next($request, $response);\n \n return $response;\n }",
"public function next(): void\n {\n next($this->payload);\n }",
"public function handle($request, Closure $next)\n {\n $logined_trainee = $request->session()->get('logined_trainee', null);\n if (is_null($logined_trainee)) {\n return $next($request);\n } else {\n return redirect('/trainee/mytrain/mytrains/list');\n }\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n $this->helper->setUri($request->getUri());\n return $next($request, $response);\n }",
"function run(callable $onStart = null) {\n return getReactor()->run($onStart);\n}",
"public function prepend($middleware): void;",
"public function handle($request, Closure $next)\n {\n /*\n * redirect to CustomAudienceCustomerListController if record is a customer list type\n */\n $ad_creative = AdCreative::find($request->id);\n \n if($ad_creative->ad_type == 'link_ad'){\n return redirect()->action('AdManager\\AdCreativeController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'link_ad_call_to_action'){\n return redirect()->action('AdManager\\AdCreativeCallToActionController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'link_ad_connected_to_page'){\n return redirect()->action('AdManager\\AdCreativeLinkAdController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'video_page_like_ad'){\n return redirect()->action('AdManager\\AdCreativeVideoPageController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'ad_from_existing_page_post'){\n return redirect()->action('AdManager\\AdCreativePagePostController@edit', [$request->id]); \n }elseif($ad_creative->ad_type == 'carousel_ad'){\n return redirect()->action('AdManager\\AdCreativeCarouselAdController@edit', [$request->id]);\n }else{\n die('no ad type found');#temporary\n }\n \n return $next($request);\n }",
"protected static function middleware()\n {\n foreach (self::fetch('http/middleware') as $file) {\n Bus::need($file);\n }\n\n Middleware::ini();\n }",
"public function handle($request, Closure $next)\n {\n $uri = $request->getRequestUri();\n if (isset($_COOKIE['adm_token']) && $_COOKIE['adm_token'] && Redis::get('adm_punch_token_'.$_COOKIE['adm_token'])) {\n if($_COOKIE['account'] == 'anta11' && strpos($uri, 'team11') === false){\n return redirect('adm/login');\n }\n return $next($request);\n } else {\n return redirect('adm/login');\n }\n //return $next($request);\n }",
"abstract protected function process(Request $request);"
] | [
"0.5794255",
"0.5558549",
"0.550864",
"0.54824185",
"0.5475669",
"0.545505",
"0.54468197",
"0.5331015",
"0.52557105",
"0.5231224",
"0.5231224",
"0.5162262",
"0.51076806",
"0.5057811",
"0.50243485",
"0.49876884",
"0.49771276",
"0.49744737",
"0.49687684",
"0.495803",
"0.49214035",
"0.48839045",
"0.4867241",
"0.48664066",
"0.4858104",
"0.48579293",
"0.4810056",
"0.48058653",
"0.47977063",
"0.47962677",
"0.47621524",
"0.47501785",
"0.47372004",
"0.47320607",
"0.47318125",
"0.47003648",
"0.46814266",
"0.46797287",
"0.46649247",
"0.4663878",
"0.46607757",
"0.46586767",
"0.4654439",
"0.46532643",
"0.46510836",
"0.4648047",
"0.46398658",
"0.46093425",
"0.45988995",
"0.45977294",
"0.45952654",
"0.45912635",
"0.45774597",
"0.45738682",
"0.4572704",
"0.45724303",
"0.4566429",
"0.45648885",
"0.45543104",
"0.45542607",
"0.4553583",
"0.45083094",
"0.44981617",
"0.4489055",
"0.44716755",
"0.4464597",
"0.44628313",
"0.4462266",
"0.44620493",
"0.44617656",
"0.44553322",
"0.44553322",
"0.44545528",
"0.4451786",
"0.4440337",
"0.4440337",
"0.4440337",
"0.4440337",
"0.4440337",
"0.44259015",
"0.44255078",
"0.44122022",
"0.44113648",
"0.44065025",
"0.4403248",
"0.4401659",
"0.43889877",
"0.4387295",
"0.4386612",
"0.438523",
"0.4382225",
"0.43803123",
"0.4376755",
"0.43705365",
"0.43690282",
"0.43682593",
"0.43667457",
"0.4365927",
"0.4365707",
"0.43589678"
] | 0.5926326 | 0 |
Set the current ServerRequestInterface object | protected function setRequest(ServerRequestInterface $request) {
$this->request = $request;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRequest(ServerRequestInterface $request);",
"public function setRequest(RequestInterface $request);",
"public static function setRequest(RequestInterface $request)\n {\n $coroutineId = self::getCoroutineId();\n self::$context[$coroutineId][self::REQUEST_KEY] = $request;\n }",
"public function setRequest(RequestInterface $request)\n {\n $this->request = $request;\n }",
"public static function setRequestContext(ServerRequestInterface $request)\n {\n $uri = $request->getUri();\n static::$_requestContext = [\n '_base' => $request->getAttribute('base'),\n '_port' => $uri->getPort(),\n '_scheme' => $uri->getScheme(),\n '_host' => $uri->getHost(),\n ];\n }",
"public function __invoke(\n ServerRequestInterface $request\n );",
"protected function setRequest(RequestInterface $request): ResponseHandler\n {\n $this->request = $request;\n\n return $this;\n }",
"public function __construct(PsrServerRequestInterface $request)\n {\n $this->request = $request;\n }",
"function setRequest($request) {\n\t\t$this->m_request = $request;\n\t}",
"function setRequest($value) {\n $this->request = $value;\n }",
"public function process(ServerRequestInterface $request)\n {\n }",
"public function setRequest($request);",
"public function request() : ServerRequestInterface;",
"public function setRequestEngine(RequestEngineInterface $requestEngine) {\n\t\t$this->requestEngine = $requestEngine;\n\t}",
"function setRequest($request) {\n $this->request = $request;\n }",
"public function forRequest(ServerRequestInterface $request): self\n {\n if ($request->getMethod() !== 'POST') {\n return $this;\n }\n\n $requestData = json_decode($request->getBody()->read(8192), true);\n if (empty($requestData)) {\n return $this;\n }\n\n $this->setSearchTerm($requestData['term']['label']);\n $this->setOriginalSearchValue($requestData['term']['search']);\n $this->setExcludeTerms($requestData['exclude'] ?? []);\n\n return $this;\n }",
"public function __invoke(\n ServerRequestInterface $request,\n ResponseInterface $response\n );",
"public function createServerRequestFromGlobals(): ServerRequestInterface;",
"public function createServerRequestFromGlobals(): ServerRequestInterface;",
"public function setResponse(ResponseInterface $request);",
"public function setRequest(RequestInterface $request): ControllerInterface;",
"public static function setRequestInfo($request)\n {\n if ($request instanceof ServerRequest) {\n static::pushRequest($request);\n } else {\n $requestData = $request;\n $requestData += [[], []];\n $requestData[0] += [\n 'controller' => false,\n 'action' => false,\n 'plugin' => null\n ];\n $request = new ServerRequest();\n $request->addParams($requestData[0])->addPaths($requestData[1]);\n static::pushRequest($request);\n }\n }",
"public function prepareRequest(RequestInterface $request);",
"private function setRequest() {\n // Create request object\n $this->request = Request::createFromGlobals();\n // Check caching and exit if so\n // - create a dummy response for possible 304\n $response = new Response();\n $seconds = Config::get()->pagecachetime;\n $response->setLastModified(new DateTime('-' . $seconds . ' seconds'));\n if ($response->isNotModified($this->getRequest())) {\n $response\n ->setSharedMaxAge($seconds)\n ->send();\n exit();\n }\n // Add better json request support\n // check request Content-Type\n $ctCheck = 0 === strpos(\n $this->request->headers->get('CONTENT_TYPE')\n , 'application/json'\n );\n // check request Method\n $methodCheck = in_array(\n strtoupper($this->request->server->get('REQUEST_METHOD', 'GET'))\n , array('PUT', 'DELETE', 'POST')\n );\n if ($ctCheck && $methodCheck) {\n $params = (array) json_decode($this->request->getContent());\n $this->request->request = new ParameterBag($params);\n }\n }",
"public function __construct(ServerRequestInterface $serverRequest)\n {\n $userAgent = '';\n $serverParams = $serverRequest->getServerParams();\n\n if (isset($serverParams['REMOTE_ADDR'])) {\n $userAgent = $serverParams['REMOTE_ADDR'];\n }\n\n $this->userAgent = $userAgent;\n }",
"public function setData(ServerRequestInterface $request) : void\n\t{\n\t\t$this->baseController->setBaseVariables($request);\n\n\t\t$month = $request->getAttribute('month');\n\t\t$formatIdentifier = $request->getAttribute('formatIdentifier');\n\t\t$rating = (int) $request->getAttribute('rating');\n\t\t$languageId = new LanguageId((int) $request->getAttribute('languageId'));\n\n\t\t$myFormat = $request->getCookieParams()[CookieNames::FORMAT] ?? '';\n\t\t$myRating = $request->getCookieParams()[CookieNames::RATING] ?? '';\n\n\t\t$this->statsUsageModel->setData(\n\t\t\t$month,\n\t\t\t$formatIdentifier,\n\t\t\t$rating,\n\t\t\t$myFormat,\n\t\t\t$myRating,\n\t\t\t$languageId\n\t\t);\n\t}",
"public function setRequest(namespace\\Request $request)\n {\n $this->request = $request;\n }",
"public function setRequest($request)\n {\n $this->request = $request;\n }",
"public static function set_request($request){\n\t\t\tself::$request = $request;\n\t\t}",
"public static function setAttribute(ServerRequestInterface $request, $name, $value)\n {\n $attributes = $request->getAttribute(self::KEY, []);\n $attributes[$name] = $value;\n\n return $request->withAttribute(self::KEY, $attributes);\n }",
"public function handle(ServerRequestInterface $request);",
"public function sendRequest(RequestInterface $request);",
"public function sendRequest(RequestInterface $request);",
"public function setRequest(Zend_Controller_Request_Abstract $request)\n {\n $this->_request = $request;\n }",
"private function __construct(ServerRequest $request)\n {\n $this->request = $request;\n }",
"protected function _setSessionUser(ServerRequestInterface $request, ArrayAccess $user)\n {\n /** @var \\Cake\\Http\\Session $session */\n $session = $request->getAttribute('session');\n $session->write($this->getConfig('userSessionKey'), $user);\n }",
"public function __invoke(\n ServerRequestInterface $request,\n $default = null\n );",
"public function setRequest(Request $request);",
"public function setRequest( $request ){\n \n $this->request = $request;\n \n }",
"public function setRequest(Request $request) {\r\n $this->request = $request;\r\n }",
"function setRequest($inRequest) {\n\t\tif ( $inRequest !== $this->_Request ) {\n\t\t\t$this->_Request = $inRequest;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}",
"public function setRequest(Request $request)\n\t{\n\t\t$this->request = $request;\n\t}",
"public function setDispatcher(RequestHandlerInterface $dispatcher): void {\n $this->dispatcher = $dispatcher;\n }",
"public function __construct(ServerRequestInterface $request){\n\n //recupera a rota atual\n $route = $request->getAttribute('route');\n\n //verifica se é uma rota válida\n if($route and $route instanceof Routable){\n\n //salva a rota\n $this->route = $route;\n\n //salva o nome\n $this->name = $route->getName();\n\n //recupera os atributos\n $attrs = explode('.', $route->getName());\n $this->level = Arr::last($attrs);\n $this->module = Arr::first($attrs);\n\n //recupera os argumentos\n $this->args = $route->getArguments();\n\n //salva os grupos\n $this->groups = collect($route->getGroups())->map(function($group){\n return $group->getPattern();\n });\n\n }else{\n $this->groups = collect([]);\n }\n\n }",
"public function setRequest(Request $request)\n {\n $this->_request = $request;\n }",
"public function setRequest(Request $request)\n\t{\n\t\t/* null */\n\t}",
"public function preProcessRequest(RequestInterface &$request) {}",
"public function __construct(ServerRequestInterface $request, $vesion = '2.1')\n {\n $this->request = $request;\n $this->version = $vesion;\n $this->UserAgent = 'Keypic PHP Class, Version: '.$this->version;\n $this->host = 'ws.keypic.com';\n }",
"public function logRequest(ServerRequestInterface $request);",
"public function setRequest(Request $request) {\n $this->request = $request;\n }",
"public function setRequest(Request $request) {\n $this->request = $request;\n }",
"public function injectHttpRequest(HttpServletRequestInterface $request)\n {\n $this->injectRequest($request);\n }",
"public function put( ServerRequestInterface $request, ResponseInterface $response )\n\t{\n\t\treturn $this->client->put( $request, $response );\n\t}",
"function __construct() {\n $this->init();\n \\base\\RequestRegistry::setRequest($this);\n }",
"public function manage(RequestInterface $eventRequest)\n {\n $this->eventRequest = $eventRequest;\n $this->manageEvent();\n }",
"public function setRequest(Request $request)\n {\n $this->request = $request;\n }",
"public function setRequest(Request $request)\n {\n $this->request = $request;\n }",
"public function setRequest(Request $request)\n {\n $this->request = $request;\n }",
"public function setRequest(Request $request)\n {\n $this->request = $request;\n }",
"public function setRequest(Request $request)\n {\n $this->request = $request;\n }",
"public function init(RequestInterface $request)\n {\n if (!session_id()) {\n session_cache_limiter(false);\n session_start();\n }\n\n // Initialize data with GET / POST parameters.\n $this->setData($request->getParams());\n\n if ($this->authRequired() !== false) {\n // Test action vs. ACL roles\n if (!$this->isAuthorized()) {\n header('HTTP/1.0 403 Forbidden');\n exit;\n }\n }\n\n return parent::init($request);\n }",
"public function void(RequestInterface $request);",
"protected function prepareRequest(RequestInterface $request)\n {\n $request->setClient($this);\n\n foreach ($this->getConfig()->getAll() as $key => $value) {\n // Add any curl options that might in the config to the request\n if (strpos($key, 'curl.') === 0 && $key != 'curl.blacklist') {\n $curlOption = str_replace('curl.', '', $key);\n if (defined($curlOption)) {\n $curlValue = is_string($value) && defined($value) ? constant($value) : $value;\n $request->getCurlOptions()->set(constant($curlOption), $curlValue);\n }\n }\n // Add any cache options from the config to the request\n // Add any curl options that might in the config to the request\n if (strpos($key, 'cache.') === 0) {\n $request->getParams()->set($key, $value);\n }\n }\n\n // Attach client observers to the request\n $request->setEventDispatcher(clone $this->getEventDispatcher());\n\n $this->dispatch('client.create_request', array(\n 'client' => $this,\n 'request' => $request\n ));\n\n return $request;\n }",
"public function setRequest()\n\t{\n\n\t\t/** http://localhost/molajo/index.php returns 'http' */\n\t\t$this->set('scheme', $this->symfony_request->getScheme());\n\n\t\t/** http://localhost/molajo/index.php returns 'http' */\n\t\t$this->set('is_secure', $this->symfony_request->isSecure());\n\n\t\t/** http://localhost:99/molajo/index.php retursn http:://localhost:99 (non-standard port) */\n\t\t$this->set('host', $this->symfony_request->headers->get('host'));\n\n\t\t/** http://localhost/molajo/index.php returns '/molajo' */\n\t\t$this->set('base_path', $this->symfony_request->getBasePath());\n\n\t\t/** http://localhost/molajo/index.php returns '/molajo' */\n\t\t$this->set('base_url', $this->symfony_request->getBaseURL());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('port', $this->symfony_request->getPort());\n\n\t\t/** http://localhost/molajo/index.php return http:://localhost */\n\t\t/** http://localhost/molajo:88/index.php return http:://localhost:88 */\n\t\t$this->set('http_host', $this->symfony_request->getHttpHost());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('request_uri', $this->symfony_request->getRequestUri());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('uri', $this->symfony_request->getUri());\n\n\t\t/** POST: Create GET: Read PUT: Update, DELETE: Delete */\n\t\t/** Many browsers do not support PUT or DELETE, $_SERVER['REQUEST_METHOD] supplements */\n\t\t$this->set('method', $this->symfony_request->getMethod());\n\n\t\t/** http://localhost/molajo/index.php returns 80 */\n\t\t$this->set('port', $this->symfony_request->getPort());\n\n\t\t$this->set('path_info', $this->symfony_request->getPathInfo());\n\n\t\t$this->set('query_string', $this->symfony_request->getQueryString());\n\n\t\tif ($this->symfony_request->getQueryString() == '') {\n\t\t\t$tempQueryParameters = array();\n\t\t} else {\n\t\t\t$tempQueryParameters = explode('&', $this->get('query_string'));\n\t\t}\n\n\t\t$query_parameters = array();\n\t\tif (count($tempQueryParameters) > 0) {\n\t\t\tforeach ($tempQueryParameters as $item) {\n\t\t\t\t$pair = explode('=', $item);\n\t\t\t\t$query_parameters[$pair[0]] = $pair[1];\n\t\t\t}\n\t\t}\n\t\t$this->set('query_parameters', $query_parameters);\n\n\t\t/** http://localhost/molajo/index.php returns '/molajo/index.php' */\n\t\t$this->set('base_url_path', $this->get('http_host') . $this->get('base_url')\n\t\t);\n\n\t\t/** http://localhost/molajo/index.php returns 'http://molajo/index.php' */\n\t\t$this->set('base_url_path_with_scheme',\n\t\t\t$this->get('scheme')\n\t\t\t\t. '://'\n\t\t\t\t. $this->get('http_host')\n\t\t\t\t. $this->get('base_url')\n\t\t);\n\n\t\t$this->set('ajax', $this->symfony_request->isXmlHttpRequest());\n\n\t\t$this->set('request_format', $this->symfony_request->getRequestFormat());\n\n\t\t$this->set('mime_type', $this->symfony_request->getMimeType($this->get('request_format')));\n\n\t\t$this->set('format', $this->symfony_request->getFormat($this->get('mime_type')));\n\n\t\t$this->set('content_type', $this->symfony_request->getContentType());\n\n\t\t/** Client */\n\t\t$this->set('client_ip', $this->symfony_request->getClientIp());\n\n\t\t/** Server */\n\t\t$this->set('user', $this->symfony_request->getUser());\n\n\t\t$this->set('password', $this->symfony_request->getPassword());\n\n\t\t$this->set('document_root', $this->symfony_request->server->get('DOCUMENT_ROOT'));\n\n\t\t$this->set('entry_point', $this->symfony_request->server->get('SCRIPT_FILENAME'));\n\n\t\t/** Language */\n\n\t\treturn true;\n\t}",
"public function setRequest( Request $request )\n {\n $this->request = $request;\n \n # Return object to preserve method-chaining:\n return $this;\n }",
"public function __construct(RequestHandlerInterface $requestHandler)\n {\n $this->requestHandler = $requestHandler;\n }",
"protected function populateRequest (CAS_RequestInterface $request) {\n\t\t// do nothing, since the URL has already been sent and that is our\n\t\t// only data.\n\t}",
"public function request_from_globals(): ServerRequestInterface {\n\n\t\t$psr17_factory = new Psr17Factory();\n\n\t\treturn ( new ServerRequestCreator(\n\t\t\t$psr17_factory,\n\t\t\t$psr17_factory,\n\t\t\t$psr17_factory,\n\t\t\t$psr17_factory\n\t\t) )->fromGlobals()\n\t\t\t->withBody( $this->stream_from_scalar( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing\n\t}",
"protected function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"protected function setRequest(Request $request)\n {\n $this->request = $request;\n }",
"public function setServer( $server )\r\n {\r\n $this->_server = $server;\r\n }",
"public function __construct(RequestInterface $request, ResponseInterface $response)\n {\n $this->request = $request;\n $this->response = $response;\n }",
"public final function set_request($request = array()) {\n\t \t\n\t \t/* set vars from the server request */\n\t\t$this->request = $request;\n\t\t\n\t\t/* extracts the method, but this is not really importand to do at this point, as it will be set later too */\n\t\t/* $this method is also set when the corresponding action ($this-read, create, ...) is called */\n\t\tif( isset($request['method']))\n\t\t\t$this->request_method = $request['method'];\n\t\t\n\t\t/* extract query vars */\n\t\tif( isset($request['queryvars']))\n\t\t\t$this->request_query_vars = (array) $request['queryvars']; // array is expected\n\n\t\t/* looking for model ids in the request */\n\t\t$this->id = $this->_find_in_request($this->properties->id_attribute);\n\t\t$this->parent_id = $this->_find_in_request($this->properties->parent_id_attribute);\t\n\t\t\n\n\t\t/* USER HANDLING */\n\n\t \t/* is the user allowed to make this request */\n\t \tif ( ( $this->properties->access == \"loggedin\" ) && ( ! is_user_logged_in() ) ) {\n\t\t\t$this->set_error( 56, 'user must be logged in for this request' );\t\t\t\t \t\n\t \t}\n\t\t\n\t \t/* some extra authentication */\n\t \t/* is the uer allowed to make this request */\n \t\t$allowed = $this->is_authenticated($request, $this->request_method);\n \t\tif(! $allowed)\n\t\t\t$this->set_error( 56, 'user is not authenticated' );\t\t\t\t \t\n\t \t\t\n\t\t\n\t}",
"public function setRequest(Request $request = null)\n {\n $this->request = $request ?? \\Request::instance();\n }",
"private function setResource()\n {\n $path = $_SERVER['PATH_INFO'];\n $params = explode('/', $path);\n $this->_requestResource = $params[2];\n if (!in_array($this->_requestResource, $this->_allowResource)) {\n throw new Exception(\"Request resource not allowed!\", 405);\n }\n\n $this->_version = $params[1];\n\n if (!$this->notValid($params[3])) {\n $this->_requestUri = $params[3];\n }\n }",
"protected function setDataFromRequest(RequestInterface $request)\n {\n $keys = $this->validDataFromRequest();\n $data = $request->getParams($keys);\n\n if (isset($data['obj_type'])) {\n $this->objType = filter_var($data['obj_type'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($data['obj_id'])) {\n $this->objId = filter_var($data['obj_id'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($data['property'])) {\n $this->propertyIdent = filter_var($data['property'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($data['assets'])) {\n $this->showAssets = !!$data['assets'];\n }\n\n if (isset($data['callback'])) {\n $this->callbackIdent = filter_var($data['callback'], FILTER_SANITIZE_STRING);\n }\n\n if (isset($this->elfinderConfig['translations'])) {\n $this->setLocalizations(array_replace_recursive(\n $this->defaultLocalizations(),\n $this->elfinderConfig['translations']\n ));\n }\n\n return true;\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, array $data = []);",
"public function __construct(ServerRequestInterface $serverRequest) {\n $this->serverRequest = $serverRequest;\n \n $inputStreamResource = fopen('php://input', 'rb');\n $this->tempFile = $this->tempFile();\n $destStreamResource = fopen($this->tempFile, 'w+b');\n if (stream_copy_to_stream($inputStreamResource, $destStreamResource) === FALSE) {\n throw new \\RuntimeException('php://input stream could not be copied to file with unique filename to make the stream seekable.');\n }\n fclose($inputStreamResource);\n fclose($destStreamResource);\n \n parent::__construct($this->tempFile, 'rb');\n }",
"public function getRequest(): RequestInterface;",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->Request ??= (new ServerRequest())\n ->withParam('action', 'add')\n ->withParam('controller', 'myController')\n ->withParam('prefix', 'myPrefix');\n }",
"public function set_request($request) : self\n {\n if (!isset($this->request)) {\n $this->request = $request;\n }\n return $this;\n }",
"public function setLastRequest(RequestHandler $request): void\n {\n $this->base->lastApiRequest = $request;\n }",
"public function withServerParameters(array $parameters): RequestInterface;",
"public function setServer(ServerVO $server) {\n\t\t$this->server = $server;\n\t}",
"public function match(ServerRequestInterface $request);",
"public function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function getRequest(): RequestInterface\n {\n return $this->request;\n }",
"public function setRequest(Request $request = null)\n {\n $this->request = $request;\n }",
"public function setServer(Server $server)\n\t\t{\n\t\t\t$this->server = $server;\n\t\t}",
"public function setServer($Server)\r\n {\r\n $this->Server = $Server;\r\n }",
"public function getFromRequest(ServerRequestInterface $request);",
"public function initialize(ServerRequestInterface $request, TypoScriptFrontendController $controller);",
"public function setRequest(\\Zend_Controller_Request_Abstract $request)\n {\n $this->request = $request;\n\n return $this;\n }",
"public function setServer(ResourceServer $server) {\n $this->server = $server;\n }",
"public function setServer($server)\n {\n $this->server = $server;\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $args);",
"public function register(\n ServerRequestInterface $request, ResponseInterface $response\n );",
"public function sendRequest(RequestInterface $request): ResponseInterface;",
"protected function setMethod(string $method): RequestInterface\n {\n $this->method = $method;\n return $this;\n }",
"public function setRequestFactory(RequestFactoryInterface $factory)\n {\n $this->requestFactory = $factory;\n\n return $this;\n }"
] | [
"0.8789558",
"0.78180313",
"0.77397805",
"0.76855034",
"0.74649894",
"0.7052358",
"0.6970045",
"0.68101746",
"0.67305535",
"0.66011596",
"0.65865564",
"0.6568458",
"0.6544348",
"0.64832836",
"0.6470893",
"0.64315104",
"0.6385715",
"0.63439685",
"0.63439685",
"0.6340564",
"0.63030493",
"0.6259971",
"0.6251736",
"0.6237574",
"0.6230486",
"0.6214483",
"0.62110156",
"0.6202675",
"0.6112948",
"0.610075",
"0.60973644",
"0.6085462",
"0.6085462",
"0.6035826",
"0.6018952",
"0.59947574",
"0.597534",
"0.597032",
"0.5961176",
"0.5934785",
"0.5922118",
"0.5914252",
"0.5905287",
"0.5901586",
"0.58998317",
"0.58886087",
"0.5841701",
"0.5836934",
"0.58301175",
"0.58251643",
"0.58251643",
"0.58240294",
"0.5823141",
"0.5818303",
"0.5795346",
"0.5780047",
"0.5780047",
"0.5780047",
"0.5780047",
"0.5780047",
"0.577598",
"0.577462",
"0.5770915",
"0.5757791",
"0.57576233",
"0.5748815",
"0.5746259",
"0.57434016",
"0.57176477",
"0.5713094",
"0.5711194",
"0.57075036",
"0.5688745",
"0.56810313",
"0.5678655",
"0.56696844",
"0.5664656",
"0.56553465",
"0.5645169",
"0.56357867",
"0.5631996",
"0.5617014",
"0.56120974",
"0.5606567",
"0.5598283",
"0.55870664",
"0.55870664",
"0.5581786",
"0.55750054",
"0.5571674",
"0.5569608",
"0.55689746",
"0.5564753",
"0.5542435",
"0.554171",
"0.55395323",
"0.55290127",
"0.55209154",
"0.5513304",
"0.5507425"
] | 0.82014227 | 1 |
Invoke the next middleware in the pipeline | protected function step(): ResponseInterface {
$current = $this->getMiddleware();
if ($current !== null) {
$delegate = $this->createDelegate(
function(ServerRequestInterface $request) {
return $this->setRequest($request)->step();
}
);
$request = $this->getRequest();
return $current->process($request, $delegate);
}
throw new Exception\OutOfMiddlewareException(
"Middleware iterator exhausted."
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function next()\n {\n if (($middleware = next($this->middlewares))) {\n call_user_func($middleware, $this->request, $this->response, $this);\n } elseif ($this->parent !== null) {\n $this->parent->next();\n }\n }",
"public function call()\n {\n // Get the reference to the application\n $app = $this->app;\n\n // Get the application request without trailing slashes \n $requesturi = ltrim($app->request->getPathInfo(), '/');\n\n if($requesturi != 'unauthorized') {\n // Check if the user is authorized to execute this request\n if(!Security::isUserAuthorized($requesturi)) {\n $app->redirect('/unauthorized');\n }\n }\n\n // Run the inner middleware and application\n $this->next->call();\n }",
"protected function callMiddleware()\n {\n if (count($this->middleware) > 0) {\n foreach ($this->middleware as $middleware) {\n $controller = new $middleware;\n call_user_func_array([$controller, 'handle'], []);\n }\n }\n }",
"private function runMiddlewares()\n {\n $middleware = $this->getMiddleware();\n $this->middlewareIndex++;\n if (null === $middleware) {\n $this->runRoute();\n } else {\n return $middleware([$this, 'run']);\n }\n }",
"public function handle($request, $next);",
"public function next()\n {\n next($this->requests);\n }",
"public function handle($request, Closure $next)\n {\n $result = Manager::middleware();\n return $result?$result:$next($request);\n }",
"public function handle($request, Closure $next)\n {\n return parent::handle($request, $next); // defer to the right stuff\n }",
"public function handle(Request $request, Closure $next);",
"public function handle($request, Closure $next)\n {\n $this->request = $request;\n\n info(\"================== FeMiddleware: [\".$request->path().\"] ====================\");\n $this->process($this->request);\n info(\"================== End============================================\");\n \n return $next($this->request);\n }",
"private static function middleware()\n {\n $files = ['Filters', 'Middleware'];\n $folder = static::$root.'Http/Middleware'.'/';\n\n self::call($files, $folder);\n\n $files = ['MiddlewareNotFoundException', 'MiddlewareWallException'];\n $folder = static::$root.'Http/Middleware/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"abstract public function apply(Request $request, Response $response, Closure $next);",
"public function handle($request, Closure $next)\n {\n\n\n echo \"<h4>\" . \"touched the moddle ware\" .\"</h4>\";\n\n // if(1){\n // // return \"interupted\";\n // return view('test.index');\n // }\n\n return $next($request);\n }",
"function __invoke(Request $request, Response $response, callable $next)\n {\n if (isset($_SESSION['errors'])) {\n $this->view->getEnvironment()->addGlobal('errors', $_SESSION['errors']);\n unset($_SESSION['errors']);\n }\n\n // Next Middleware\n $response = $next($request, $response);\n return $response;\n }",
"public function handle($request, Closure $next) {\n\n $routeArray = $request->route()->getAction();\n $controllerAction = class_basename($routeArray['controller']);\n list($controller, $action) = explode('@', $controllerAction);\n \n if (Auth::user()->hasPermissionTo('Administer roles & permissions'))\n {\n return $next($request);\n }\n\n if ($request->is('services'))\n {\n if (Auth::user()->hasPermissionTo('view services')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('subscriptions'))\n {\n if (Auth::user()->hasPermissionTo('view subscriptions')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('plans'))\n {\n if (Auth::user()->hasPermissionTo('view plans')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('countries'))\n {\n if (Auth::user()->hasPermissionTo('view countries')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('blog'))\n {\n if (Auth::user()->hasPermissionTo('view blog')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('configurations'))\n {\n if (Auth::user()->hasPermissionTo('View Configurations')) return $next($request);\n else abort('401');\n }\n\n if ($request->is('services/create'))\n {\n if (Auth::user()->hasPermissionTo('add services')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('subscriptions/create'))\n {\n if (Auth::user()->hasPermissionTo('add subscriptions')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('plans/create'))\n {\n if (Auth::user()->hasPermissionTo('add plans')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('countries/create'))\n {\n if (Auth::user()->hasPermissionTo('add countries')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('blog/create'))\n {\n if (Auth::user()->hasPermissionTo('add blog')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('configurations/create'))\n {\n if (Auth::user()->hasPermissionTo('Add Configurations')) return $next($request);\n else abort('401');\n }\n\n if ($request->is('services/*/edit'))\n {\n if (Auth::user()->hasPermissionTo('edit services')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('subscriptions/*/edit'))\n {\n if (Auth::user()->hasPermissionTo('edit subscriptions')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('plans/*/edit'))\n {\n if (Auth::user()->hasPermissionTo('edit plans')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('countries/*/edit'))\n {\n if (Auth::user()->hasPermissionTo('edit countries')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('blog/*/edit'))\n {\n if (Auth::user()->hasPermissionTo('edit blog')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('configurations/*/edit'))\n {\n if (Auth::user()->hasPermissionTo('Edit Configurations')) return $next($request);\n else abort('401');\n }\n\n if ($request->is('settings') || $request->is('settings/*'))\n {\n if (Auth::user()->hasPermissionTo('update account')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('settings/account'))\n {\n if (Auth::user()->hasPermissionTo('update account')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('settings/profile'))\n {\n if (Auth::user()->hasPermissionTo('update profile')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('settings/picture'))\n {\n if (Auth::user()->hasPermissionTo('update picture')) return $next($request);\n else abort('401');\n }\n elseif ($request->is('settings/connection'))\n {\n if (Auth::user()->hasPermissionTo('update social connection')) return $next($request);\n else abort('401');\n }\n\n if ($request->isMethod('Delete'))\n {\n if (Auth::user()->hasPermissionTo('delete services') && $controller=='ServicesController') return $next($request);\n elseif (Auth::user()->hasPermissionTo('delete subscriptions') && $controller=='SubscriptionsController') return $next($request);\n elseif (Auth::user()->hasPermissionTo('delete plans') && $controller=='PlansController') return $next($request);\n elseif (Auth::user()->hasPermissionTo('delete countries') && $controller=='CountriesController') return $next($request);\n elseif (Auth::user()->hasPermissionTo('delete blog') && $controller=='BlogsController') return $next($request);\n elseif (Auth::user()->hasPermissionTo('Delete Configurations') && $controller=='ConfigurationsController') return $next($request);\n else abort('401');\n }\n\n abort('401');\n }",
"public function middleware()\n {\n // TODO: Implement middleware() method.\n }",
"public function next(): void\n {\n next($this->payload);\n }",
"public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}",
"public function handle($request, Closure $next)\n {\n return $next($request);\n \n }",
"public function handle(Request $request, Response $response, $next)\n {\n echo 'second';\n return $next($request, $response);\n }",
"public function handle($request, Closure $next)\n {\n \n // Perform action\n if(isset($_SESSION) && isset($_SESSION['WHILLO']['COMPAnyID']))\n {\n $userid=$_SESSION['WHILLO']['USERID'];\n $companyid=$_SESSION['WHILLO']['COMPAnyID'];\n $type= $companyid=$_SESSION['WHILLO']['TYPE'];\n $res = DB::table('commaster') \n ->where('userId', $userid )\n ->first();\n if($res->accountStatus == 0 && $type=\"C\")\n {\n //return response('frontend.myaccount.companyplans');\n //return redirect()->route('company/choose_plans');\n return redirect('company/choose_plans');\n }\n else if($res->accountStatus == 2 && $type=\"C\")\n {\n //return response('frontend.myaccount.companyplans');\n //return redirect()->route('company/choose_plans');\n return redirect('company/plan_expiry');\n }\n else\n {\n return $next($request);\n }\n } \n return $next($request);\n }",
"protected function mockNextMiddleware()\n {\n return function ($request, $response) {\n return $response;\n };\n }",
"public function handle($request, Closure $next)\n {\n $user = $request->user(); \n if ($user && ($user->role_id == 'inventory' || $user->role_id == 'admin') ) {\n return $next($request);\n }else if ($user && $user->role_id == 'hr') {\n return redirect('admin/manpower');\n }else if ($user && $user->role_id == 'venue') {\n return redirect('admin/venue');\n }else if ($user && $user->role_id == 'reservation') {\n return redirect('/admin/reservation');\n }else if ($user && $user->role_id == 'sales') {\n return redirect('/admin/sales');\n }else if ($user && $user->role_id == 'audit') {\n return redirect('/admin/audit');\n }else if ($user && $user->role_id == 'account') {\n return redirect('/admin/user');\n }\n return redirect('/admin');\n \n }",
"public function handle($request, Closure $next)\n {\n // Pre-Middleware Action\n\n $response = $next($request);\n\n // Post-Middleware Action\n\n return $this->logActivity($request, $response);\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface\n\t{\n\t\tif ($this->isWhitelisted($request)) {\n\t\t\treturn $next($request, $response);\n\t\t}\n\n\t\t$user = $this->authenticator->authenticate($request);\n\n\t\t// If we have a identity, then go to next middlewares,\n\t\t// otherwise stop and return current response\n\t\tif ($user === null) {\n\t\t\treturn $this->denied($request, $response);\n\t\t}\n\n\t\t// Add info about current logged user to request attributes\n\t\t$request = $request->withAttribute(RequestAttributes::APP_LOGGED_USER, $user);\n\n\t\t// Pass to next middleware\n\t\treturn $next($request, $response);\n\t}",
"public function handle($request, Closure $next)\n {\n $current_user = Auth::user()->indexno;\n //query last UN Language Course enrolled in the past based on PASHQ table\n $repos_lang = Repo::orderBy('Term', 'desc')->where('INDEXID', $current_user)->first();\n //query the current term based on year and Term_End column is greater than today's date\n //whereYear('Term_End', $now_year) \n //->first();\n $now_date = Carbon::now()->toDateString();\n $terms = Term::orderBy('Term_Code', 'desc')\n ->whereDate('Term_End', '>=', $now_date)\n ->get()->min();\n $next_term_code = Term::orderBy('Term_Code', 'desc')->where('Term_Code', '=', $terms->Term_Next)->get()->min('Term_Code');\n //query submitted forms based from tblLTP_Enrolment table\n $forms_submitted = Preenrolment::distinct('Te_Code')\n ->where('INDEXID', '=', $current_user)\n ->where('Term', $next_term_code )->get();\n $next_term = Term::orderBy('Term_Code', 'desc')->where('Term_Code', '=', $terms->Term_Next)->get()->min();\n // query placement exam table if data exists or not\n $placementData = null; \n\n $difference = $next_term->Term_Code - $repos_lang->Term;\n\n if (($repos_lang->Term == null || $difference >= 9) && $placementData == null) {\n return redirect()->route('placementinfo');\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n\n }",
"public function handle($request, Closure $next)\n {\n $unpaid = Order::LockedOrdersWithoutOrder()->notCanceledOrders()->where('already_paid', 0)->get();\n\n $counter = 0;\n\n foreach($unpaid as $order)\n {\n $payments = $order->payments()->count();\n\n if ($payments > 0)\n {\n $counter++;\n }\n }\n\n if ($counter == 0)\n {\n return redirect()->action('MasterBox\\Admin\\EasyGoController@getIndex');\n }\n \n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n /*\n * redirect to CustomAudienceCustomerListController if record is a customer list type\n */\n $ad_creative = AdCreative::find($request->id);\n \n if($ad_creative->ad_type == 'link_ad'){\n return redirect()->action('AdManager\\AdCreativeController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'link_ad_call_to_action'){\n return redirect()->action('AdManager\\AdCreativeCallToActionController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'link_ad_connected_to_page'){\n return redirect()->action('AdManager\\AdCreativeLinkAdController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'video_page_like_ad'){\n return redirect()->action('AdManager\\AdCreativeVideoPageController@edit', [$request->id]);\n }elseif($ad_creative->ad_type == 'ad_from_existing_page_post'){\n return redirect()->action('AdManager\\AdCreativePagePostController@edit', [$request->id]); \n }elseif($ad_creative->ad_type == 'carousel_ad'){\n return redirect()->action('AdManager\\AdCreativeCarouselAdController@edit', [$request->id]);\n }else{\n die('no ad type found');#temporary\n }\n \n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n parent::filter();\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $uri = $request->getRequestUri();\n if (isset($_COOKIE['adm_token']) && $_COOKIE['adm_token'] && Redis::get('adm_punch_token_'.$_COOKIE['adm_token'])) {\n if($_COOKIE['account'] == 'anta11' && strpos($uri, 'team11') === false){\n return redirect('adm/login');\n }\n return $next($request);\n } else {\n return redirect('adm/login');\n }\n //return $next($request);\n }",
"public function handle($request, Closure $next, ...$level)\n {\n\n if (Auth::check()) {\n\n if (!empty($level)) {\n\n $whoIs = $this->meWithRole(Auth::user()->id,$level);\n\n if (!$whoIs) {\n\n return response()->json([\"code\"=>401,\"msg\"=>\"Unauthorized\"],401);\n\n }\n\n\n }else {\n\n return response()->json([\"code\"=>500,\"msg\"=>\"Wrong Route Configuration\"],500);\n\n }\n\n $response = $next($request);\n\n return $response;\n\n }else {\n return response()->json([\"code\"=>401,\"msg\"=>\"Unauthorized\"],401);\n }\n\n\n // Post-Middleware Action\n\n }",
"public function handle($request, Closure $next)\n {\n if (!Auth::check()) {\n return new Response(view('auth.login'));\n }\n elseif ((Auth::check() && Auth::user()->role != 'admin') && (Auth::check() && Auth::user()->role != 'editor')) {\n\n return new Response(view('unauthorized')->with('role', 'Authorized Users'));\n }\n else{\n\n $posts = Post::latest();\n $posts = $posts->get();\n\n $types = Type::latest();\n $types = $types->get();\n\n $comments = Comment::latest();\n $comments = $comments->get();\n\n $users = User::latest();\n $users = $users->get();\n\n $tags = Tag::all();\n\n $request->merge(compact('posts','types','tags','comments','users'));\n \n return $next($request);\n } \n }",
"public function handle($request, Closure $next)\n {\n $me = session('user');\n $role = session('role');\n if (!$me) {\n return redirect('login');\n }\n $auth = session('auth');\n $current = '/' . $request->path();\n $admin = [\n '/user/list', '/user/add',\n '/menu/list', '/menu/add', '/menu/edit',\n '/role/list', '/permission/list', '/oprate/logs',\n '/api/menu/save', '/api/menu/change', '/api/menu/delete',\n '/api/permission/save', '/api/permission/change', '/api/permission/delete',\n '/api/role/save', '/api/role/change', '/api/role/delete', '/api/role/one',\n '/api/user/save','/api/user/delete',\n ];\n $dev = [\n '/demo/table/list','/demo/form/base','/demo/form/advance','/demo/icons',\n ];\n $user_info = ['/user/edit', '/api/user/change', '/api/upload/avatar'];\n if ($current != '//') {\n if (in_array($current, $admin)) {\n if (!in_array(1, $role)) {\n echo 'not admin';\n die;\n }\n } else if (in_array($current, $dev)) {\n if (!in_array(2, $role)) {\n echo 'not developer';\n die;\n }\n } else if (in_array($current, $user_info)) {\n if (!in_array(1, $role) && $request->id != $me['id']) {\n echo 'no permissions';\n die;\n }\n } else if (!in_array($current, $auth)) {\n echo 'forbidden';\n die;\n }\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n\t{\n//\t\t$member = Member::current();\n//\t\t$broadcast_read =TenderBroadcastRead::where('member_id', $member->id)\n//\t\t\t->where('broad_id', 1)->first();\n//\t\tif(empty($broadcast_read)) {\n//\t\t\treturn redirect('/tender/contract');\n//\t\t}\n\t\treturn $next($request);\n\t}",
"public function handle(Request $request, Closure $next)\n {\n echo 'the middle ware called';\n if($request->all()) {\n echo 'Message from middleware:You have something in request';\n }\n else {\n echo 'Message from middleware:your request is empty';\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $user = Auth::user();\n \n \n foreach($user->roles as $rol){\n \n foreach ($rol->modulos_rol as $modulo_rol) {\n if($modulo_rol->Co_Modulo==11){\n if($modulo_rol->St_Insertar=='A' && $modulo_rol->St_Modificar=='A' && $modulo_rol->St_Consultar=='A' && $modulo_rol->St_Eliminar=='A' && $modulo_rol->St_Modulo_Rol=='A'){\n return $next($request);\n }\n }\n }\n\n \n }\n \n return response(view('denegado'));\n \n }",
"public function __invoke($request)\n {\n $next = $this->middleware->get($this->index);\n\n if ($next)\n {\n $name = ($next['n']) ?? '';\n $mParams = explode(',',($next['p']) ?? '');\n\n // check if the middleware class actually exist,\n // otherwise we will need to close out this.\n if (!class_exists($name)) return false;\n\n // increment the middelware we instantiate\n $this->index++;\n\n // begin our middleware instance\n $middleware = new $name();\n\n // load our middelware handle instance for the request\n if (method_exists($middleware, 'handle'))\n {\n $this->middlewareInstances[] = $middleware;\n\n return $middleware->handle($request, $this, ...$mParams);\n }\n else\n {\n // if the middleware does not have a handle, we will need to end the script.\n // All middlewares must have a handle.\n return false;\n }\n }\n\n // return the updated response\n return $this->response;\n }",
"public function testInvokeUsingNext()\n {\n $this->createBridge($this->getPsr7HelloWorld());\n\n $psr7Middleware = function (RequestInterface $request, ResponseInterface $response, $next = null) {\n $this->assertEquals($this->defaultPsr7Request, $request);\n\n return $this->defaultPsr7Response;\n };\n\n $response = $this->bridge->__invoke($this->defaultPsr7Request, $this->defaultPsr7Response, $psr7Middleware);\n\n $this->assertInstanceOf('\\Psr\\Http\\Message\\ResponseInterface', $response);\n $this->assertEquals(200, $response->getStatusCode());\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n return $next($request);\n }",
"public function handle(Request $request, Closure $next){\n $this->ilogger1 = new MyLogger1;\n $this->ilogger1->info2();\n $path = $request->path();\n MyLogger1::info3();\n $secureCheck = true;\n if ($request->is('/') || $request->is('login3') || $request->is('dologin3') ||\n $request->is('usersrest') || $request->is('usersrest/*') ||\n $request->is('loggingservice'))\n { $secureCheck = false;}\n MyLogger1::info4();\n if($secureCheck){\n MyLogger1::info5();\n return redirect('/login3');\n }\n return $next($request);\n }",
"public function handle($request, Closure $next, $authorization)\n {\n try {\n //Verficia la existencia del token\n $token = JWTAuth::parseToken();\n //Autoriza al usuario al ser autenticado el token\n $user = $token->authenticate();\n } catch (TokenExpiredException $e) {\n //Si el token expira\n return $this->unauthorized('Tu sesion ha expirado, por favor realiza el loguin nuevamente.');\n } catch (TokenInvalidException $e) {\n //Si el token no es valido\n return $this->unauthorized('Tu credenciales son invalidad, por favor vuelve a loguearte.');\n }catch (JWTException $e) {\n //Si el token expira\n return $this->unauthorized('Por favor, inicia sesion para continuar.');\n }\n //If user was authenticated successfully and user is in one of the acceptable roles, send to next request.\n/*\n $data = EstudianteProceso::distinct()->select('ProcesoActividad.Nombre')->join('ProcesoActividad','ProcesoActividad.IdProcesoActividad' ,'=','EstudianteProceso.IdProcesoActividad')->where('EstudianteProceso.IdEstudiante','=',$user->id)->get();\n\n foreach ($data as $dat) {\n if ($user && strcmp($dat->Nombre, $authorization) === 0) {\n return $next($request);\n }\n }\n\n*/\n //consulta los permisos del token enviado, si el permiso se encuentra en su tabla de la BD\n //permite continuar con el request\n $data = EstudianteProceso::distinct()->select('ProcesoActividad.Nombre')->join('ProcesoActividad','ProcesoActividad.IdProcesoActividad' ,'=','EstudianteProceso.IdProcesoActividad')->where([['EstudianteProceso.IdEstudiante',$user->id],['EstudianteProceso.Permiso','1'],['ProcesoActividad.Nombre',$authorization]])->first();\n\n\n if ($data) {\n return $next($request);\n }\n\n return $this->unauthorized();\n }",
"public function handle($request, Closure $next)\n {\n // Pre-Middleware Action\n\n if($request->input('status') != 1){\n return redirect('api/login');\n }\n\n $response = $next($request);\n\n // Post-Middleware Action\n\n return $response;\n }",
"public function handle($request, Closure $next)\n {\n $keywords = DB::table('csearchrank')->orderBy('hits','desc')->get(['keyword']);\n if(!$request->session()->get('id')){\n return redirect()->route('loginP')->with('Alert', Lang::get('user_definition.yet_login') );\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n if ( Utils::getRole() <= LoginClass::PUNONJES){\n return $next($request);\n }else{\n return Redirect::back();\n }\n }",
"public function next() {\n next($this->rules);\n }",
"public function handle($request, Closure $next)\n {\n $this->log($request);\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $this->startSpiderManager($request);\n $response = $next($request);\n\n return $response;\n }",
"public function handle($request, Closure $next)\n {\n Log::info(\n 'Beginning request',\n [\n 'time' => microtime(true),\n 'method' => $request->method(),\n 'uri' => $request->url()\n ]\n );\n\n return $next($request);\n }",
"public\n function handle($request, Closure $next)\n {\n $name = $request->route()->action['as'];\n $role = $request->user()->role_id;\n $permission = Permission::where('name', $name)->first();\n\n if ($permission) {\n $permissionRole = RolePermission::where('role_id', $role)->where('permission_id', $permission->id)->first();\n if ($permissionRole) {\n return $next($request);\n } else {\n return redirect()->back();\n }\n } else {\n return redirect()->back();\n }\n }",
"public function handle($request, Closure $next)\n {\n $prefix = $request->route()->getPrefix();\n $currentRoleID = \\Auth::user()->roll_id;\n switch($currentRoleID){\n case 1:\n if(!($prefix=='/provider' && $currentRoleID==1)){\n return redirect('provider/dashboard'); \n }\n break;\n case 2:\n if(!($prefix=='/admin' && $currentRoleID==2)){\n return redirect('admin/dashboard'); \n }\n break;\n case 3:\n if(!($prefix=='' && $currentRoleID==3)){\n return redirect('/'); \n }\n }\n return $next($request);\n }",
"public function handle($request,Closure $next,$var=null)\n {\n if ($var==\"bb\")\n {\n echo \"<br> MyMiddleware\";\n\n }\n else\n {\n return $next($request);\n }\n\n }",
"public function handle($request, Closure $next)\n {\n $actionName = explode('\\\\', $request->route()->getActionName())[count(explode('\\\\', $request->route()->getActionName())) - 1];\n\n $controller = explode('@', $actionName)[0];\n $action = explode('@', $actionName)[1];\n\n $requiredPermissions = !empty(Role::CONTROLLERS[$controller][$action]) ? Role::CONTROLLERS[$controller][$action] : [];\n\n if(!Auth::user()) {\n Session::flash('flash_error', 'You are not login!');\n return redirect('/');\n }\n if(Auth::user()->isAdmin()){\n return $next($request);\n }\n\n $allPermissionsOfUser = Auth::user()->allPermissions();\n Auth::user()->load(['restaurants' => function($query){\n $query->select(DB::raw('restaurants.*,restaurants.slug as res_Slug'));\n }]);\n\n if(Auth::user()->isRestaurant() && Auth::user()->restaurants->count() == 0){\n Session::forget('res');\n Auth::logout();\n Session::flash('flash_error', 'Bạn không quản lý nhà hàng nào!');\n return redirect('/login');\n }\n\n if(Permissions\\CheckService::doCheck($allPermissionsOfUser,$requiredPermissions)){\n return $next($request);\n }\n\n if(Auth::user()->isManageAllRestaurant()){\n Session::flash('flash_error', 'Bạn không được cấp quyền này!');\n return redirect('/admin');\n }\n\n Session::flash('flash_error', 'Bạn không có quyền vào trang!');\n return redirect('/login');\n }",
"public function handle($request, Closure $next)\n {\n \n $users_token=request()->input('users_token');\n if(!$users_token){\n echo json_encode([\n 'code'=>202,\n 'msg'=>'token为空!',\n ]);die;\n }\n $data=UsersModel::where([\"users_token\"=>$users_token])->first();\n if(!$data){\n echo json_encode([\n 'code'=>203,\n 'msg'=>'token不对!',\n ]);die;\n }\n if(time()>$data['expire_time']){\n echo json_encode([\n 'code'=>204,\n 'msg'=>'token时间过期!',\n ]);die;\n }\n $data->expire_time=time()+7200;\n $data->save();\n \n $mid_params = ['mid_params'=>'this is mid_params'];\n $request->attributes->add($mid_params);//添加参数件产生的参数\n return $next($request);\n }",
"public function next()\n {\n $method = $this->getMethodForNext();\n call_user_func([$this->result, $method]);\n }",
"public function handle($request, Closure $next)\n {\n // 查询员工的职位是否具有该后台操作的权限\n // 获取传递的员工id和权限url\n $em_id = $request->input('user_id');\n $power_url = $request->input('power_str');\n // dd($power_url);\n if($power_url == 'common'){\n // 无需验证权限的接口\n return $next($request);\n }else{\n // 查询该员工所属职位是否有该功能权限\n $record = DB::table(\"role_power\")\n ->join('role',\"role.role_id\",'=','role_power.bind_role_id')\n ->join('employee',\"role.role_id\",'=','employee.em_role_id')\n ->join('power',\"power.power_id\",'=','role_power.bind_power_id')\n ->where([[\"employee.em_id\",'=',$em_id],['power.power_url','=',$power_url]])\n ->select(\"role_power.bind_id\")\n ->first();\n\n if(isset($record)){\n // 如果有权限记录,说明该员工有该权限,放行\n return $next($request);\n }else{\n // 如果没有权限,阻止\n return redirect(\"middlewareRefuse/3\");\n }\n }\n \n }",
"public function handle($request, Closure $next)\n {\n if (Permitido::where('usu_permitidos',$request->input('usuario'),'permiso')->first()!=0 ) {\n\n\n return $next($request);\n }\n\n return redirect('sinpermiso');\n\n\n\n }",
"public function handle($request, Closure $next)\n {\n /*dd(Session::get('operationId'));*/\n $player_id = Session::get('player_id');\n $subscriber = Subscriber::where('player_id', $player_id)->first();\n $error_code = Session::get('error_code');\n $operationId = Session::get('operationId');\n if(!empty($subscriber)) {\n if ($subscriber->is_subscribed == 0) {\n return redirect(route('frontend.msisdn'));\n } else {\n if ($error_code == null && $operationId == null) {\n return redirect(route('frontend.msisdn'));\n }\n }\n } else {\n return redirect(route('frontend.msisdn'));\n }\n return $next($request);\n }",
"public function handle(Request $request, Closure $next)\n {\n $response = $next($request);\n echo $response;\n // $target = User::find($id);\n // $user = Auth::user();\n // if ($user->role < $target->role)\n // return $next($request);\n // else \n // return redirect(\"dashboard\");\n }",
"public function handle($request, Closure $next)\n {\n $user = User::all()->count();\n if (!($user == 1)) {\n if (!Auth::user()->hasPermissionTo('View User')) //If user does //not have this permission\n {\n// abort('401');\n return redirect('/home');\n }\n }\n\n if ($request->is('users/create'))\n {\n if (!Auth::user()->hasPermissionTo('Add User'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->is('users'))\n {\n if (!Auth::user()->hasPermissionTo('View User'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->is('users/*/edit'))\n {\n if (!Auth::user()->hasPermissionTo('Edit User'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->isMethod('Delete'))\n {\n if (!Auth::user()->hasPermissionTo('Delete User'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->is('permissions/create'))\n {\n if (!Auth::user()->hasPermissionTo('Add Permission'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->is('permissions'))\n {\n if (!Auth::user()->hasPermissionTo('View Permission'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->is('permissions/*/edit'))\n {\n if (!Auth::user()->hasPermissionTo('Edit Permission'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->isMethod('Delete'))\n {\n if (!Auth::user()->hasPermissionTo('Delete Permission'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->is('roles/create'))\n {\n if (!Auth::user()->hasPermissionTo('Add Role'))\n {\n return redirect('/home');\n }\n }\n\n// if ($request->is('roles'))\n// {\n// if (!Auth::user()->hasPermissionTo('View Role'))\n// {\n// return redirect('/home');\n// }\n// }\n\n if ($request->is('roles/*/edit'))\n {\n if (!Auth::user()->hasPermissionTo('Edit Role'))\n {\n return redirect('/home');\n }\n }\n\n if ($request->isMethod('Delete'))\n {\n if (!Auth::user()->hasPermissionTo('Delete Role'))\n {\n return redirect('/home');\n }\n }\n\n return $next($request);\n }",
"public function __invoke($request, $response, $next)\n {\n\n// $response->getBody()->write('BEFORE');\n $response = $next($request, $response);\n// $response->getBody()->write('AFTER');\n return $response;\n }",
"public function handle($request, Closure $next)\n {\n //znaci 1. napravimo midleware preko php artisan make:midleware\n //2. napravimo ovaj uslov ovde\n // 3. registrujemo midleware u Kernel.php fajlu\n //4. odemo u web.php i vezemo middleware('admin'); metod za user/admin rutu na kraju - bolje ne (ne radi u oba pravca)\n // ili!: u UsersControleru napravimo konstruktor i stavimo middleware u njega\n // public function __construct(){ \n // $this->middleware('admin');\n // }\n\n // ! Proverimo da li autentifikovani user ima access za odredjenu rutu\n //ako nema, vratimo ga odakle je dosao\n if(Auth::user()->admin){\n \n return $next($request);\n\n } else{\n \n Session::flash('info', 'You do not have permissions to acces!');\n\n return redirect()->back();\n }\n\n \n }",
"public function handle($request, Closure $next)\n {\n $validator = Validator::make($request->all(), [\n 'username' => 'required',\n 'password' => 'required'\n ]);\n\n if ($validator->fails()) {\n return redirect()->back()\n ->withErrors($validator)\n ->withInput();\n }\n else{\n if($request->get('username') == 'master'){\n if (Hash::check($request->get('password'), Admin::where('username', 'master')->value('password'))){\n return redirect('admin/main');\n }\n\n else{\n return redirect()->back()\n ->with('badPassword', 'Your password was incorrect!');\n }\n }\n\n else{\n $admin = Admin::where('username', $request->get('username'))->first();\n if ($admin == null) {\n return redirect()->back()\n ->with('badUsername', 'Your username was incorrect!');\n }\n else{\n if(Hash::check($request->get('password'), $admin-> password)){\n return redirect()->route('mainAdmin', [ $admin -> user_alley ]); \n }\n else{\n return redirect()->back()\n ->with('badPassword', 'Your password was incorrect!'); \n }\n }\n }\n \n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n app('events')->fire('booted');\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n \tif(Auth::user()->membre == 1){\n return $next($request);\n }\n\n\treturn new RedirectResponse(url('home'));\n }",
"public function handle($request, Closure $next)\n {\n $this->start_execution = microtime(true);\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n \n if(!empty(Request::get('user_key')) && !empty(Request::get('api_key'))){ \n\n $user = User::where('api_user_key',Request::get('user_key'))->first();\n\n if($user){\n if($user->is_active === 1){\n if($user->api->first()->api_key == Request::get('api_key')){\n\n if(Auth::loginUsingId($user->id)){\n return $next($request);\n }\n else\n {\n return response(['Error: Authentication Failed']);\n }\n }\n else{\n return response(['Error: Posted Api Key does not match Stored Api Key']);\n }\n }\n else{\n return response(['Error: User is no longer active']);\n }\n\n }\n else{\n return response(['Error: Posted User Key does not match Stored User Key']);\n }\n }\n else\n {\n return response(['Warning: Invalid Credentials']);\n }\n }",
"public function handle($request, Closure $next)\n {\n //左側\n Menu::make('left', function (Builder $menu) {\n });\n\n Menu::make('right', function (Builder $menu) {\n if (auth()->check()) {\n /** @var User $user */\n $user = auth()->user();\n // 會員\n\n// // 信箱驗證\n if (!$user->hasVerifiedEmail()) {\n $menu->add('尚未完成信箱驗證', ['route' => 'verification.notice'])\n ->link->attr(['class' => 'text-danger']);\n }\n//\n// // 管理員\n if (Laratrust::can('menu.view') && $user->hasVerifiedEmail()) {\n /** @var \\Lavary\\Menu\\Builder $adminMenu */\n $adminMenu = $menu->add('管理選單', 'javascript:void(0)');\n\n if (Laratrust::can('user.manage')) {\n $adminMenu->add('會員管理', ['route' => 'user.index'])->active('user/*');\n }\n if (Laratrust::can('role.manage')) {\n $adminMenu->add('角色管理', ['route' => 'role.index'])->active('role/*');\n }\n\n if (Laratrust::can('activity-log.access')) {\n $adminMenu->add('活動紀錄', ['route' => 'activity-log.index'])->active('activity-log/*');\n }\n\n if (Laratrust::can('log-viewer.access')) {\n $adminMenu->add(\n '記錄檢視器<i class=\"fas fa-external-link-alt ml-2\"></i>',\n ['route' => 'log-viewer::dashboard']\n )->link->attr('target', '_blank');\n }\n//\n// if (Laratrust::can('telescope.access')) {\n// $adminMenu->add(\n// 'Telescope<i class=\"fas fa-external-link-alt ml-2\"></i>',\n// ['url' => config('telescope.path')]\n// )->link->attr('target', '_blank');\n// }\n }\n\n /** @var \\Lavary\\Menu\\Builder $userMenu */\n $userMenu = $menu->add(auth()->user()->name, 'javascript:void(0)');\n $userMenu->add('個人資料', ['route' => 'profile'])->active('profile/*');\n $userMenu->add('登出', 'javascript:void(0)')\n ->link\n ->attr('onclick', 'event.preventDefault(); document.getElementById(\\'logout-form\\').submit();');\n } else {\n // 遊客\n $menu->add('登入', ['route' => 'login']);\n }\n });\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n\n try {\n\n $user = JWTAuth::parseToken()->authenticate();\n\n\n $name = $request->route()->getAction();\n $controllerAction = class_basename($name['controller']);\n list($controller, $action) = explode('@', $controllerAction);\n //echo $user->hasAnyPermission([$action]);\n echo $controller, $action ;\n\n\n // echo $user->permission('Store Brand')->get();\n //echo $user->getRoleNames();\n //echo $user->getAllPermissions();\n // echo $user->hasPermissionTo('Store Brand');\n // if($user->hasPermissionTo($action)){\n // return $next($request);\n // }else{\n // return null ;\n // }\n // if ($user && in_array($user->role, $roles)) {\n // return $next($request);\n // }\n\n // return $this->unauthorized();\n\n\n } catch (Exception $e) {\n if ($e instanceof \\Tymon\\JWTAuth\\Exceptions\\TokenInvalidException){\n return response()->json(['status' => 'Token is Invalid'],401);\n }else if ($e instanceof \\Tymon\\JWTAuth\\Exceptions\\TokenExpiredException){\n return response()->json(['status' => 'Token is Expired'],401);\n }else{\n return response()->json(['status' => 'Authorization Token not found'],404);\n }\n }\n return $next($request);\n\n // $user = JWTAuth::parseToken()->authenticate();\n // // echo json_encode($user->getRoleNames());\n // // echo json_encode($user->getPermissionsViaRoles());\n // return $next($request);\n }",
"abstract function __invoke(RequestInterface $request, ResponseInterface $response, callable $next);",
"public function handle($request, Closure $next)\n {\n //current User\n $currentUser = $request->user();\n\n //get the current action name\n $currentActionName = $request->route()->getActionName();\n //separate controller name and function name \n list($controller, $method) = explode('@', $currentActionName);\n //replace string from this: \"App\\Http\\Controllers\\Backend\\PermissionsController\n // to be like this: Permissions \n $controller = str_replace([\"App\\\\Http\\\\Controllers\\\\Backend\\\\\", \"Controller\"], \"\", $controller);\n \n \n $classesMap = [\n 'Permissions' => 'permission',\n 'Roles' => 'role',\n 'Users' => 'user',\n 'Rooms' => 'room',\n 'Home' => 'home',\n 'Events' => 'event',\n 'Calendar' => 'calendar',\n 'Bookings' => 'booking',\n 'Balance' => 'balance',\n 'Transactions' => 'transaction',\n\n ];\n\n $className = $classesMap[$controller];\n\n //check if te current user has permission\n //dd(\"{$className}-{$method}\");\n if(!$currentUser->isAbleTo(\"{$className}-{$method}\"))\n {\n abort(403, \"Forbidden acces!\");\n }\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n \n if(Auth::user()->is_2fa_active == 1 && Auth::user()->google2fa_secret !== ''){ \n return app(\\PragmaRX\\Google2FALaravel\\Middleware::class)->handle($request, $next);\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $admin_info = $this->getAdminInfo();\n\n $route = $request->route()->uri();\n\n// var_dump($route);exit;\n # 没有登陆跳转到Login\n if (empty($admin_info) && $route != 'login') {\n return redirect('login');\n }\n\n # 取出对应用户的权限信息\n $power_list = $this->getAdminPower( );\n\n view()->composer('*',function($view)use($power_list,$route){\n $view->with(\n array(\n 'node_list'=> $power_list,\n 'route' => $route\n )\n );\n });\n\n # 判断用户是否有权限访问对应的方法\n if( $this -> checkAdminPower() ){\n return $next($request);\n }else{\n return response() -> view('admin.nopower');\n }\n\n }",
"public function handle($request, Closure $next)\n {\n $reponse = $next($request);\n if(auth()->check()){\n $role = Users_role::find(auth()->user()->idusers_roles);\n // $prefixe = Helper::getPrefixeRoute($request);\n $prefixe = trim(\\Route::current()->action['prefix'],'/');\n if ($role->lib != $prefixe) {\n return redirect()->route($role->lib.'.index');\n }\n }\n return $reponse;\n }",
"public function handle($request, Closure $next)\n {\n if(Auth::user()->roles_id==1||Auth::user()->roles_id==2){\n return $next($request);\n }else{\n return redirect('/home')->with(['fail'=>'The requested action is not authorised. Contact your teacher/librarian']);\n }\n\n }",
"public function handle($request, Closure $next)\n {\n // echo \"aa\";\n $url_hash=substr(md5($_SERVER['REQUEST_URI']),0,10);//获得访问路径 域名以外的东西\n $key='firm_filter:url'.$url_hash;\n Redis::incr($key);\n Redis::expire($key,60);\n $num=Redis::get($key);\n echo \"num:\";echo $num;\n if($num>20){\n //超过限制一天以后才能再次请求\n Redis::expire($key,68400);\n die(\"请求超过限制\");\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $user=$request->user();\n if(($user->role->name)==\"vendor\" && !Route::is('vendor.getLogout') && !Route::is('vendor.resendotp')){\n $vendor=$user->vendor;\n if($vendor->isverified==0){\n if($vendor->step==0 && !Route::is('vendor.step1')){\n return redirect()->route('vendor.step1');\n }else if($vendor->step==1 && !Route::is('vendor.step2')){\n return redirect()->route('vendor.step2');\n }else if($vendor->step==2 && !Route::is('vendor.step3')){\n return redirect()->route('vendor.step3');\n }\n }\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n //return $next($request);\n //$this->checkPermission();\n if(isset(Route::current()->getAction()['controller'])) {//如果为重定向 直接返回真,不进行权限检查\n return $next($request) ;\n }\n return $this->checkPermission() ? $next($request) : abort(500, '没有权限访问');\n }",
"public function handle($request, Closure $next)\n {\n if(Auth::check())\n {\n\n if(Auth::user()->user_type_id==1)\n {\n// dd(\"What1\");\n return redirect()->route('adminProfile');\n }\n if(Auth::user()->user_type_id==2)\n {\n if(session()->has('jobapplyid'))\n {\n// dd(\"What3\");\n return redirect()->route('viewjob',session()->get('jobapplyid'));\n }\n else\n {\n// dd(\"What4\");\n return redirect()->route('applicantProfile');\n }\n }\n if(Auth::user()->user_type_id==3)\n {\n// dd(\"What5\");\n return redirect()->route('employerProfile');\n }\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $POST = Session::get('TAG');\n\n if ($POST != '1') {\n // die('aa');\n return redirect('admin/dashboard');\n } else {\n return $next($request);\n }\n }",
"public function handle($request, Closure $next)\n {\n if (!$request->session()->has('autor')) {\n return redirect('home/author/login');\n }\n if(empty($_SESSION['autor'][$_SESSION['id']])) {\n return redirect('home/author/login');\n }\n\n $name = \\Illuminate\\Support\\Facades\\Route::currentRouteAction();\n $name = ltrim(strrchr($name,'\\\\'),'\\\\');\n //获取方法名\n $fname = ltrim(strrchr($name,'@'),'@');\n //获取控制器名\n $cname = strtok($name,'@');\n if ($fname =='add' && $cname == 'ChapterController') {\n// dd($fname,$cname);\n $data = $request->only('id');\n $result = DB::table('chapter')->where('bid',$data)->where('status',2)->value('id');\n// dd($result);\n if ($result >0 ) {\n return back()->with('error','您还有章节未审核');\n }\n\n }\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n $company_id = $request->route('company_id');\n $company = is_null($company_id) ? false : \\App\\Models\\Company::find($company_id);\n if ($company) {\n \\App::instance('currentCompany', $company);\n// $this->checkNOA($company);\n return $next($request);\n } else {\n if (Auth::user()->role === \\App\\Constanats\\UserRoles::SuperAdmin) {\n return redirect('/companies');\n } else {\n return redirect('/'.Auth::user()->company_id);\n }\n }\n }",
"public function next()\n {\n next($this->rules);\n }",
"public function handle($request, Closure $next)\n {\n // 判断后台是否登录\n\n if (session('AdminUserInfo')) {\n # code...\n $action = \\Route::current()->getActionName();\n list($class, $action) = explode('@', $action);\n $controller = substr(strrchr($class,'\\\\'),1);\n $controller = substr($controller,0,-10);\n\n // // 设置权限\n \n \n if(session('AdminUserInfo.ids')){\n $ids = session('AdminUserInfo.ids');\n }else{\n $ids = ['Admi'];\n }\n \n $c = ['Admin','Accounts','Advert','Adverttype','Advices','Advicestype','Article','Comment_type','Comment','Coupon','Coupontype','DiscountActive','GoodsCity','Goods','GoodsTravel','Goodstype','Level','Leveltype','Links_contacts','Links','Message','Navigate_First','Navigate_Second','Order','Payconfig','Pay','Personal','Servicelist','Servicenews','Servicesend','System_log','System_set','User','GoodsLabel','Insurance'];\n $a = ['index','store','edit','destroy','loading_order','success_order','return','indexs','add'];\n if(in_array($controller,$c)){\n if(in_array($action,$a)){\n if(!in_array($controller.$action,$ids)){\n echo \"<script>location.href = '/admin/error'</script>\";\n }else{\n return $next($request);\n }\n }\n }\n \n \n \n return $next($request);\n \n }else{\n return redirect('admin/login');\n }\n }",
"public function handle($request, Closure $next){\n\t\t//get users from the requested token\n\t\ttry {\n if (! $user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['user_not_found'], 404);\n }\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\TokenExpiredException $e) {\n return response()->json(['token_expired'], $e->getStatusCode());\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\TokenInvalidException $e) {\n return response()->json(['token_invalid'], $e->getStatusCode());\n }\n\t\tcatch (Tymon\\JWTAuth\\Exceptions\\JWTException $e) {\n return response()->json(['token_absent'], $e->getStatusCode());\n }\n\t\t\n\t\t//get controller from route\n\t\t$currentAction = \\Route::currentRouteAction();\n\t\t\n\t\t//explode the route above into method and controller\n\t\tlist($controller, $method) = explode('@', $currentAction);\n\n\t\t//replace the redundant information\n\t\t$controller = preg_replace('/.*\\\\\\/', '', $controller);\t\n\t\t\n\t\t//check if the requested controller and user's group id are matched\n\t\t$permissionID\t=\tDB::select(\"select permissions.id from permissions, controllers \n\t\t\t\t\t\t\t\t\t\twhere permissions.groupid = ?\n\t\t\t\t\t\t\t\t\t\tand permissions.controllerid = controllers.id\n\t\t\t\t\t\t\t\t\t\tand controllers.name = ?\" \n\t\t\t\t\t\t\t\t\t\t,\t[(int)$user->groupid , $controller]\n\t\t\t\t\t\t\t\t\t); \n\t\t//if nothing found, terminate the request\n\t\tif($permissionID == NULL){\n\t\t\t$returnArray\t=\tarray(\t\"result\"\t=>\tfalse,\n\t\t\t\t\t\t\t\t\t\t\"reason\"\t=>\t\"Permission denied\"\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\treturn response()->json($returnArray , 400);\t\t\t\n\t\t}\n\t\t\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n// route('system','',false) ;\n $route = \\Route::current() ;\n //var_dump($route) ;\n $action = \\Route::currentRouteAction() ;\n //var_dump($action) ;\n// return false ;\n return $next($request);\n }",
"public function handle(Request $request, Closure $next)\n {\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n\n \n\n //Check for admin users\n $user = \\TCG\\Voyager\\Models\\User::find(\\Auth::id());\n\n if($user == null)\n return redirect('login');\n\n $is_admin_user = $user->hasPermission(\n config('voyager.user.admin_role', 'browse_admin')\n );\n\n if($is_admin_user)\n {\n\n if($user->activated == '1')\n return $next($request);\n else\n return redirect('inactive_account')->with('data', ['reason' => $user->not_activated_reason]);\n }\n else \n //end check for admin users\n {\n\n if($request->user() == null)\n {\n return redirect('login');\n }\n else\n {\n\n if($request->user()->activated == '0')\n return redirect('inactive_account')->with('data', ['reason' => $request->user()->not_activated_reason]);\n\n if( $request->user()->parent_user()->subscribed('main') == false && \n $request->user()->parent_user()->onTrial() == false )\n {\n if( $request->user()->company_owner == '1' )\n return redirect('billing');\n else\n return view('inactive_account')->with('data', ['reason' => 'Subscription Expired']);\n }\n }\n }\n\n return $next($request);\n }",
"public function handle($request, Closure $next)\n {\n if (Payment::where('state', '1')->get()->count() < 1) {\n return redirect(route('payment.create'))\n ->with('info', __('Add new payment gateway'))\n ->with('warning', __('Activate payment gateway'));\n }\n\n if (Auth::user()->chapters->where('status', '1')->all()) {\n return $next($request);\n }\n return redirect(route('chapter.create'))\n ->with('warning', __('Did not open sale register'));\n }",
"public function handle($request, Closure $next, $guard = null)\n {\n $access_token = $request->header('access-token') ;\n\n $request = (array)json_decode($request->getContent(), true);\n if(array_key_exists('lang_id',$request)) {\n Helpers::Set_locale($request['lang_id']);\n }\n if($access_token)\n {\n $access_token=$access_token;\n \n \n if ($access_token) \n { $user= User::where('api_token', $access_token)->first();\n //dd($access_token);\n }\n if ($user) \n { \n return $next($request);\n }else{\n\n // return response('Unauthorized.', 401);\n return Helpers::Get_Response(400,'error',trans('messages.logged'),[],[]);\n }\n \n } \n return Helpers::Get_Response(400,'error',trans('messages.logged'),[],[]);\n }",
"public function call()\n {\n if (false === $this->shouldAuthenticate()) {\n return $this->next->call();\n }\n\n $app = \\Slim\\Slim::getInstance(getenv('APP_NAME'));\n\n $app->hook('slim.before.dispatch', function() use ($app)\n {\n $resource = $app->router()->getCurrentRoute()->getName();\n $permission = $app->request->getMethod();\n\n $auth = $app->auth;\n $acl = $app->acl;\n\n if (!$auth->hasIdentity()) {\n return $app->redirectTo('intranet.login');\n }\n\n $identity = $auth->getIdentity();\n $app->view()->getInstance()->addGlobal('identity', $identity);\n\n if (!$acl->isAllowed($identity['role'], $resource, $permission)) {\n return $app->redirectTo('intranet.unauthorized');\n }\n });\n\n $this->next->call();\n }",
"public function handle($request, Closure $next)\n {\n return Event::fire('interceptor.response', $next(Event::fire('interceptor.request', $request)));\n }",
"public function handle($request, Closure $next)\n {\n if (auth('worker')->user()->type === 'worker' ) \n return $next($request);\n \n return $this->response('not_auth' , __('auth.not_authorized'));\n }",
"public function handle($request, Closure $next)\n {\n $req = $next($request);\n $sit = Session::get('current_sit', 0);\n if ($sit > 0 && Session::get('logued', false)) {\n return redirect('/buy/'.$sit);\n } else {\n redirect()->action('homeController@index');\n }\n }",
"public function handle($request, Closure $next)\n {\n //be redirect to home page.\n if (Auth::guard()->check()) {\n return redirect('/');\n }\n\n //If request comes from logged in seller, he will\n //be redirected to seller's home page.\n if (Auth::guard('web_societe')->check()) {\n return redirect('/societe/index');\n }\n return $next($request);\n }"
] | [
"0.7877431",
"0.6895964",
"0.6475088",
"0.64572096",
"0.64411354",
"0.63446134",
"0.6324159",
"0.63163024",
"0.63081664",
"0.6279044",
"0.6267998",
"0.625005",
"0.62320393",
"0.62249714",
"0.61180604",
"0.61071503",
"0.60936975",
"0.60840696",
"0.60749",
"0.60710466",
"0.6040025",
"0.60341406",
"0.60329723",
"0.60298485",
"0.60202044",
"0.6018308",
"0.6013517",
"0.5965339",
"0.59641826",
"0.596184",
"0.596184",
"0.59542716",
"0.5953212",
"0.5950777",
"0.59146816",
"0.5906807",
"0.5906128",
"0.58853936",
"0.5869469",
"0.5869205",
"0.5865525",
"0.5865525",
"0.5865525",
"0.5865525",
"0.5865525",
"0.58620185",
"0.5861375",
"0.58571327",
"0.58569384",
"0.5852112",
"0.5847718",
"0.58440423",
"0.5827857",
"0.5810824",
"0.58005357",
"0.5788802",
"0.57823014",
"0.57816494",
"0.5779665",
"0.57743806",
"0.5770259",
"0.5767892",
"0.5762123",
"0.57574874",
"0.5752899",
"0.5734896",
"0.5731183",
"0.57254714",
"0.57230854",
"0.5720567",
"0.572036",
"0.5720266",
"0.57178515",
"0.5714057",
"0.57104826",
"0.57054967",
"0.5699827",
"0.56979597",
"0.5694654",
"0.56897515",
"0.5687586",
"0.56867987",
"0.5686362",
"0.5685268",
"0.5683352",
"0.56787485",
"0.5678069",
"0.567439",
"0.5670121",
"0.56701183",
"0.56683207",
"0.56682277",
"0.56635416",
"0.56634897",
"0.56632036",
"0.5662619",
"0.5660516",
"0.5655896",
"0.56544536",
"0.56503344"
] | 0.5976964 | 27 |
Show the form for creating a new resource. | public function create()
{
$cbd='---Seleccione Distrito---';
$cbid="";
$distritos = Distrito::all();
return view('proveedores.create', [
'proveedor' => new Proveedor,
'distritos'=> $distritos,
'cbid' => $cbid,
'cbd' => $cbd
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n {\n return view('url.form');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75936973",
"0.75936973",
"0.7585464",
"0.7576766",
"0.7571166",
"0.7498768",
"0.7434969",
"0.7432511",
"0.7387868",
"0.7351811",
"0.7336364",
"0.73113805",
"0.7293885",
"0.72812635",
"0.7273037",
"0.72410345",
"0.7228987",
"0.7225174",
"0.718589",
"0.71786976",
"0.7172516",
"0.71492815",
"0.7143504",
"0.7143484",
"0.71349627",
"0.71274126",
"0.7122271",
"0.7115064",
"0.7115064",
"0.7115064",
"0.7110841",
"0.70930386",
"0.70841706",
"0.7079425",
"0.7079275",
"0.70567256",
"0.70567256",
"0.7054091",
"0.70386195",
"0.7038531",
"0.7034834",
"0.7032825",
"0.7029208",
"0.70263356",
"0.7025177",
"0.7018699",
"0.70156187",
"0.7004536",
"0.7002615",
"0.7000439",
"0.69960874",
"0.6992934",
"0.6991493",
"0.6988563",
"0.698635",
"0.69649065",
"0.6963641",
"0.69552153",
"0.6950279",
"0.69498897",
"0.69465077",
"0.6943029",
"0.6940043",
"0.6939427",
"0.69359136",
"0.69359136",
"0.69357383",
"0.6933012",
"0.6929994",
"0.69270134",
"0.69259113",
"0.6923401",
"0.6917057",
"0.69144267",
"0.6911519",
"0.6909902",
"0.690978",
"0.6905855",
"0.6903688",
"0.6900189",
"0.68999064",
"0.6898482",
"0.6893158",
"0.6892387",
"0.6891021",
"0.68905854",
"0.6890334",
"0.6890334",
"0.68871844",
"0.68864834",
"0.68854547",
"0.6881966",
"0.68814063",
"0.68788683",
"0.68738896",
"0.6871671",
"0.68716353",
"0.68688464",
"0.6868651",
"0.68685114",
"0.686829"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(SaveProveedorRequest $request)
{
Proveedor::create($request->validated());
return redirect()->route('proveedores.index')->with('status', 'El proveedor ha sido guardado');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n 'description' => 'nullable|string',\n ]);\n\n $resource = Resource::create($request->all());\n\n if ( $request->hasFile('file') ) {\n $resourceFile = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resourceFile);\n $resource->file = $resourceFile;\n $resource->save();\n }\n\n if ( $request->submit == 'Save' ) {\n return redirect()->route('admin.resources.index')->with('success','Resource Successfully Uploaded');\n } else {\n return redirect()->route('admin.resources.create')->with('success','Resource Successfully Uploaded');\n }\n }",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72857565",
"0.714571",
"0.71328056",
"0.66390204",
"0.6620437",
"0.6567189",
"0.6526738",
"0.65074694",
"0.64491314",
"0.63734114",
"0.6370837",
"0.63628685",
"0.63628685",
"0.63628685",
"0.6342026",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964",
"0.63394964"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$distritos = Distrito::all();
$temp = Proveedor::Findorfail($id);
$id_distrito = ($temp->distrito_id);
$dist = Distrito::Findorfail($id_distrito);
return view('proveedores.show', [
'proveedor' => Proveedor::Findorfail($id),
'distritos'=> $distritos,
'dist'=> $dist
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"public function display() {\n echo $this->render();\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public abstract function display();",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"abstract public function resource($resource);",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047151",
"0.60409963",
"0.6021287",
"0.5989136",
"0.5964405",
"0.5962407",
"0.59518087",
"0.59309924",
"0.5921466",
"0.5908002",
"0.5908002",
"0.5908002",
"0.59051657",
"0.5894554",
"0.5871459",
"0.5870088",
"0.586883",
"0.5851384",
"0.58168566",
"0.58166975",
"0.5815869",
"0.58056176",
"0.5799148",
"0.5795126",
"0.5791158",
"0.57857597",
"0.5783371",
"0.5761351",
"0.57592535",
"0.57587147",
"0.5746491",
"0.57460666",
"0.574066",
"0.5739448",
"0.5739448",
"0.57295275",
"0.57293373",
"0.5729069",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57214445",
"0.57149816",
"0.5712036",
"0.5710076",
"0.57073003",
"0.5707059",
"0.5705454",
"0.5705454",
"0.5700382",
"0.56997055",
"0.5693362",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(Proveedor $proveedor)
{
$distritos = Distrito::all();
$cb = Distrito::Findorfail($proveedor->distrito_id);
$cbid = ($cb->id);
$cbd = ($cb->distrito);
return view('proveedores.edit', [
'proveedor' => $proveedor,
'distritos'=> $distritos,
'cbid' => $cbid,
'cbd' => $cbd
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Proveedor $proveedor, SaveProveedorRequest $request)
{
$proveedor->update($request->validated());
return redirect()->route('proveedores.show', $proveedor)->with('status', 'El proveedor ha sido actualizado');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy(Proveedor $proveedor)
{
$proveedor -> delete();
return redirect()->route('proveedores.index')->with('status', 'El proveedor fue eliminado');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public function delete(): void\n {\n unlink($this->path);\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6673811",
"0.66624975",
"0.66376764",
"0.66351163",
"0.66280866",
"0.65443397",
"0.6543099",
"0.64656305",
"0.62881804",
"0.61755043",
"0.61278707",
"0.6089098",
"0.60534257",
"0.6043048",
"0.6006416",
"0.593359",
"0.5929751",
"0.5923406",
"0.59201753",
"0.5904145",
"0.58963126",
"0.5895338",
"0.589437",
"0.589437",
"0.589437",
"0.589437",
"0.58819216",
"0.58684987",
"0.5864614",
"0.58097607",
"0.57739484",
"0.5761358",
"0.57558876",
"0.5750673",
"0.5741367",
"0.5734089",
"0.57264656",
"0.5715195",
"0.5711313",
"0.5707201",
"0.57057804",
"0.57053447",
"0.5702519",
"0.5698952",
"0.56844676",
"0.56844676",
"0.56783324",
"0.5677608",
"0.56581664",
"0.564899",
"0.5648674",
"0.5647576",
"0.5641079",
"0.5636559",
"0.56325674",
"0.5619814",
"0.5615794",
"0.5607223",
"0.56022006",
"0.5601402",
"0.5601336",
"0.56004316",
"0.5590177",
"0.55810463",
"0.55665016",
"0.5565872",
"0.5565398",
"0.5563011",
"0.55565405",
"0.5556361",
"0.5549312",
"0.5544914",
"0.554211",
"0.5540394",
"0.5540394",
"0.5537265",
"0.5536237",
"0.55310345",
"0.55295527",
"0.5529016",
"0.5527304",
"0.5527274",
"0.5527126",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5527044",
"0.5523294",
"0.55231583",
"0.55181384"
] | 0.0 | -1 |
Find a redirect code in the codes | function is_redirect_http_codes($http_codes) {
foreach ($http_codes as $http_code) {
if ( is_redirect_http_code($http_code) ) {
return TRUE;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function check_url($url) {\r\n $http_codes = array();\r\n $urls = array();\r\n while (TRUE) {\r\n // Initialise curl and get the header\r\n $ch = curl_init($url);\r\n curl_setopt($ch, CURLOPT_HEADER, true);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);\r\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\r\n $content = curl_exec($ch);\r\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n \r\n // Add urls and http codes to the arrays\r\n array_push($urls, $url);\r\n array_push($http_codes, $http_code);\r\n \r\n if ( is_redirect_http_code($http_code) ) {\r\n // Check for redirects, if found, follow the redirected URL\r\n if ( preg_match('/(?<=Location: )[^ \\s]*/i', $content, $matches) ) {\r\n $url = $matches[0];\r\n continue;\r\n }\r\n }\r\n \r\n // We can't do anything else\r\n break;\r\n }\r\n \r\n // Contains all the http_codes and urls encountered\r\n $ret['http_codes'] = $http_codes;\r\n $ret['urls'] = $urls;\r\n // For easy access, contains the last http_code and url encountered\r\n $ret['http_code'] = $http_code;\r\n $ret['url'] = $url;\r\n return $ret;\r\n}",
"private function get_redirect( $line, $target, $code, $source ) {\n\t\t$line = ltrim( $line, '^' );\n\t\t$line = rtrim( $line, '$' );\n\n\t\tif ( isset( $source['flag_case'] ) && $source['flag_case'] ) {\n\t\t\t$line = '(?i)^' . $line;\n\t\t} else {\n\t\t\t$line = '^' . $line;\n\t\t}\n\n\t\t$line = preg_replace( \"/[\\r\\n\\t].*?$/s\", '', $line );\n\t\t$line = preg_replace( '/[^\\PC\\s]/u', '', $line );\n\t\t$target = preg_replace( \"/[\\r\\n\\t].*?$/s\", '', $target );\n\t\t$target = preg_replace( '/[^\\PC\\s]/u', '', $target );\n\n\t\treturn 'rewrite ' . $line . '$ ' . $target . ' ' . $code . ';';\n\t}",
"function changeRedirectorUrlTag(&$codes = [])\n{\n foreach ($codes as $codeId => $code) {\n if ($code['tag'] == 'url' && $code['type'] == 'unparsed_content') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedContentCode($tag, $data);\n };\n } elseif ($code['tag'] == 'url' && $code['type'] == 'unparsed_equals') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedEqualsCode($tag, $data);\n };\n } elseif ($code['tag'] == 'iurl' && $code['type'] == 'unparsed_content') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedContentCode($tag, $data);\n };\n } elseif ($code['tag'] == 'iurl' && $code['type'] == 'unparsed_equals') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedEqualsCode($tag, $data);\n };\n }\n }\n}",
"private function get_redirect_source() {\n\t\t$ignore = [\n\t\t\t'WP_Hook',\n\t\t\t'template-loader.php',\n\t\t\t'wp-blog-header.php',\n\t\t];\n\n\t\t// phpcs:ignore\n\t\t$source = wp_debug_backtrace_summary( null, 5, false );\n\n\t\treturn array_filter( $source, function( $item ) use ( $ignore ) {\n\t\t\tforeach ( $ignore as $ignore_item ) {\n\t\t\t\tif ( strpos( $item, $ignore_item ) !== false ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\t}",
"public static function checkCode($code)\n {\n return static::where('short_url', $code)\n ->first();\n }",
"private static function pay($code, $redirect)\n {\n $url = URL::getUrl('Pay');\n\n $location = \"{$url}{$code}\";\n\n /** */\n if ($redirect)\n {\n return redirect()->away($location);\n }\n\n return $location;\n }",
"protected function getAccessCode()\n {\n return $_GET[self::RESPONSE_CODE_PARAM];\n }",
"public function GetRedirect ();",
"private function getIdFromRedirectedUrl(): string\n {\n $url = $this->getResponse()\n ->getHeader('Location')\n ->getFieldValue();\n $pattern = '!/id/(.*?)/!';\n $result = preg_match($pattern, $url, $matches);\n\n return $result ? $matches[1] : '';\n }",
"abstract protected function get_redirect_page();",
"function getHttpResponseCode_using_getheaders($url, $followredirects = true){\n // NOTE: could potentially take up to 0-30 seconds , blocking further code execution (more or less depending on connection, target site, and local timeout settings))\n // if $followredirects == false: return the FIRST known httpcode (ignore redirects)\n // if $followredirects == true : return the LAST known httpcode (when redirected)\n if(! $url || ! is_string($url)){\n return false;\n }\n $headers = @get_headers($url);\n if($headers && is_array($headers)){\n if($followredirects){\n // we want the the last errorcode, reverse array so we start at the end:\n $headers = array_reverse($headers);\n }\n foreach($headers as $hline){\n // search for things like \"HTTP/1.1 200 OK\" , \"HTTP/1.0 200 OK\" , \"HTTP/1.1 301 PERMANENTLY MOVED\" , \"HTTP/1.1 400 Not Found\" , etc.\n // note that the exact syntax/version/output differs, so there is some string magic involved here\n if(preg_match('/^HTTP\\/\\S+\\s+([1-9][0-9][0-9])\\s+.*/', $hline, $matches) ){// \"HTTP/*** ### ***\"\n $code = $matches[1];\n return $code;\n }\n }\n // no HTTP/xxx found in headers:\n return false;\n }\n // no headers :\n return false;\n }",
"public function GetCode()\n {\n if($this->_correctHttpLine != null)\n {\n preg_match(\"|^HTTP/[\\d\\.x]+ (\\d+)|\", $this->_correctHttpLine, $m);\n if (isset($m[1])) { return (int)$m[1]; }\n }\n\n return false;\n }",
"protected function getMethodRedirectUrl($code)\n {\n return $this->_methods[$code]->getCheckoutRedirectUrl();\n }",
"public function getCode()\n {\n $this->code = $_GET['code'];\n return $this->code;\n\n }",
"function detect_link(&$comcode,$pos)\n{\n\t$link_end_pos=strpos($comcode,' ',$pos-1);\n\t$link_end_pos_2=strpos($comcode,chr(10),$pos-1);\n\t$link_end_pos_3=strpos($comcode,'[',$pos-1);\n\t$link_end_pos_4=strpos($comcode,')',$pos-1);\n\t$link_end_pos_5=strpos($comcode,'\"',$pos-1);\n\t$link_end_pos_6=strpos($comcode,'>',$pos-1);\n\t$link_end_pos_7=strpos($comcode,'<',$pos-1);\n\t$link_end_pos_8=strpos($comcode,'.'.chr(10),$pos-1);\n\t$link_end_pos_9=strpos($comcode,',',$pos-1);\n\tif (($link_end_pos_2!==false) && (($link_end_pos===false) || ($link_end_pos_2<$link_end_pos))) $link_end_pos=$link_end_pos_2;\n\tif (($link_end_pos_3!==false) && (($link_end_pos===false) || ($link_end_pos_3<$link_end_pos))) $link_end_pos=$link_end_pos_3;\n\tif (($link_end_pos_4!==false) && (($link_end_pos===false) || ($link_end_pos_4<$link_end_pos))) $link_end_pos=$link_end_pos_4;\n\tif (($link_end_pos_5!==false) && (($link_end_pos===false) || ($link_end_pos_5<$link_end_pos))) $link_end_pos=$link_end_pos_5;\n\tif (($link_end_pos_6!==false) && (($link_end_pos===false) || ($link_end_pos_6<$link_end_pos))) $link_end_pos=$link_end_pos_6;\n\tif (($link_end_pos_7!==false) && (($link_end_pos===false) || ($link_end_pos_7<$link_end_pos))) $link_end_pos=$link_end_pos_7;\n\tif (($link_end_pos_8!==false) && (($link_end_pos===false) || ($link_end_pos_8<$link_end_pos))) $link_end_pos=$link_end_pos_8;\n\tif (($link_end_pos_9!==false) && (($link_end_pos===false) || ($link_end_pos_9<$link_end_pos))) $link_end_pos=$link_end_pos_9;\n\tif ($link_end_pos===false) $link_end_pos=strlen($comcode);\n\t$auto_link=preg_replace('#keep_session=\\d*#','filtered=1',substr($comcode,$pos-1,$link_end_pos-$pos+1));\n\n\treturn array($link_end_pos,$auto_link);\n}",
"public static function getDrupalGotoCode() {\n global $drupal_goto;\n return !empty($drupal_goto['http_response_code']) ?\n $drupal_goto['http_response_code'] : '';\n }",
"public static function getOriginalUrl($code)\n {\n $url = static::checkCode($code);\n if (!empty($url)) {\n $url->hits++;\n $url->save();\n\n return $url->original_url;\n }\n\n return false;\n }",
"public function getPermanentRedirectStatuscode(): MwRedirectResponseStatuscode\n {\n return $this->findStatuscodeBy(['type' => self::REDIRECT_STATUSCODE_301]);\n }",
"protected function _extractHttpCode($header) {\n\t\tpreg_match(\n\t\t\t'#^HTTP/[0-9\\.]+\\s(?P<code>[0-9]+)#i',\n\t\t\t$header,\n\t\t\t$matches\n\t\t);\n\n\t\treturn isset($matches['code'])\n\t\t\t? $matches['code']\n\t\t\t: $this->_defaultCode;\n\t}",
"public function customRedirect($param, $redirectcode) {\n\t$redirect = $this->trimSlash(Mage::getUrl($param));\n if($redirectcode == 0 || $redirectcode == 'default' || $redirectcode == 302 ){\n\t\tMage::app()->getFrontController()->getResponse()->setRedirect($redirect, 302);\n\t\t} else { \n\t\tMage::app()->getFrontController()->getResponse()->setRedirect($redirect, 301);\n\t\t} \n Mage::app()->getResponse()->sendResponse();\n exit;\n }",
"function get_oauth_code($wpoa) {\n\t$params = array(\n\t\t'response_type' => 'code',\n\t\t'client_id' => CLIENT_ID,\n\t\t'scope' => SCOPE,\n\t\t'state' => uniqid('', true),\n\t\t'redirect_uri' => REDIRECT_URI,\n\t);\n\t$_SESSION['WPOA']['STATE'] = $params['state'];\n\t$url = URL_AUTH . http_build_query($params);\n\theader(\"Location: $url\");\n\texit;\n}",
"protected function checkRedirect() {}",
"public function isRedirect(): bool\n {\n return $this->code >= 300 && $this->code < 400;\n }",
"public function getRedirect(): ?string\n {\n if ($this->getText() && preg_match('/^#REDIRECT(?:ION)? ?\\[\\[([^]]+)]]/i', $this->getText(), $matches)) {\n return (string)trim($matches[1]);\n }\n\n return null;\n }",
"private function hasReferralCode()\n {\n if (self::isLogin()) {\n $model = $this->model->where('user_id', Auth::id());\n\n if ($model->count() > 0) {\n $this->code = $model->first()->code;\n return true;\n }\n }\n\n return false;\n }",
"function is_redirect ($sc) { \n return $sc >= 300 && $sc < 400; \n}",
"public function getCode()\n\t{\n\t\t$matches = array();\n\t\tif (isset($this->headers) && isset($this->headers[0]))\n\t\t\tpreg_match('|HTTP/\\d\\.\\d\\s+(\\d+)\\s+.*|', $this->headers[0], $matches);\n\t\treturn isset($matches[1]) ? (int)$matches[1] : 0;\n\t}",
"function redirected(){ return strlen((string)$this->getLocation())>0; }",
"public function checkFavebookInsightsCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $code = $result[1];\r\n }\r\n }\r\n\r\n if (strpos($code, 'facebook.com/') !== false) {\r\n preg_match('/facebook.com\\/([^\\/]+)/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $json = SQ_Tools::sq_remote_get('http://graph.facebook.com/' . $result[1]);\r\n if ($json <> '') {\r\n if ($json = @json_decode($json)) {\r\n if (isset($json->id)) {\r\n $code = $json->id;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $code = $result[1];\r\n }\r\n }\r\n\r\n if ($code == '') {\r\n SQ_Error::setError(__(\"The code for Facebook is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n }\r\n return $code;\r\n }",
"protected function processRedirect() {}",
"protected function _getCode()\n {\n // filter code from response\n return (int)substr($this->_getServerResponse(), 0, 3);\n }",
"function setRedirectUri($uri, $code = Codes::HTTP_FOUND);",
"public function setRedirect($url, $code = 302);",
"protected function _getNextCode() {}",
"protected function scanCode()\n {\n $matches = array();\n\n if (preg_match('/^(!?=|-)([^\\n]+)/', $this->input, $matches)) {\n $this->consumeInput(mb_strlen($matches[0]));\n\n $flags = $matches[1];\n $token = $this->takeToken('code', $matches[2]);\n $token->buffer = (isset($flags[0]) && '=' === $flags[0]) || (isset($flags[1]) && '=' === $flags[1]);\n\n return $token;\n }\n }",
"public function handleCode()\n {\n if (isset($_GET['code'])) {\n Session::put('spotify_code', $_GET['code']);\n $this->requestToken();\n }\n\n return Session::get('spotify_code');\n }",
"function extractHoldingLibraryCode($data){\r\n\t$instHref = '<a href=\"/institutions/';\r\n\t$start \t = strpos($data, $instHref) + strlen($instHref);\r\n\r\n\t$libCode = \"[code:\";\r\n\t$libCode .= strtoupper(substr($data, $start, 3)); //pull the actual code\r\n\t$libCode .= \"]\";\r\n\r\n\techo \"\\n\" . $libCode . \"\\n\";\r\n\treturn $libCode;\r\n}",
"function getRedirectLocation($response){\n\tif(preg_match(\"~Location: (.+)\\r\\n~\", $response, $match)){\n\t\treturn $match[1];\n\t}\n\n\t_log(\"getRedirectLocation: unparsable HTTP headers\", true);\n\treturn false;\n}",
"private function code_exists($code) {\n\t\t$code = $this->db->escape_str($code);\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as num_rows FROM exp_shortee_urls WHERE BINARY code = '$code'\");\n\n\t\t$row = $query->row_array();\n\n\t\treturn ($row['num_rows'] > 0) ? true : false;\n\t}",
"public function getCode() {\n return $this->request->query->get(\"code\") != NULL ? $this->request->query->get(\"code\") : \"\";\n }",
"public function storeCodeRequestURI() {\n update_option(self::CODE_REDIRECT_URI_OPTION_NAME, $this->getRedirectUri());\n }",
"function getHttpCode();",
"protected function getUrlFromDb($code) \n\t{\n $query = \"SELECT id, long_url FROM \" . self::$table . \" WHERE short_url = :short_url LIMIT 1\";\n $stmt = $this->pdo->prepare($query);\n $params=array(\n \"short_url\" => $code\n );\n $stmt->execute($params);\n \n $result = $stmt->fetch();\n return (empty($result)) ? false : $result;\n }",
"protected function validateShortUrl($code) \n\t{\n return preg_match(\"|[\" . self::$chars . \"]+|\", $code);\n }",
"protected function getCode(): ?string\n {\n return $this->request->query('code');\n }",
"function extract_real_url_from_cloaker_response() {\n global $response;\n\n $redirect_pattern = \"|window.location='(.*?)';|\";\n if (preg_match($redirect_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $iframe_pattern = \"|<iframe src='(.*?)'|\";\n if (preg_match($iframe_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $paste_html_pattern = '|ru=\"(.*?)\";|';\n if (preg_match($paste_html_pattern, $response, $matches)) {\n return base64_decode($matches[1]);\n }\n}",
"function extract_real_url_from_cloaker_response() {\n global $response;\n\n $redirect_pattern = \"|window.location='(.*?)';|\";\n if (preg_match($redirect_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $iframe_pattern = \"|<iframe src='(.*?)'|\";\n if (preg_match($iframe_pattern, $response, $matches)) {\n return $matches[1];\n }\n\n $paste_html_pattern = '|ru=\"(.*?)\";|';\n if (preg_match($paste_html_pattern, $response, $matches)) {\n return base64_decode($matches[1]);\n }\n}",
"private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }",
"function SM_checkReferer($errorFunction, $customReferer=\"\") {\n\n global $SM_siteManager, $SM_siteID;\n\n $referer = getenv(\"HTTP_REFERER\");\n\n if ($referer == \"\")\n $referer = \"None\";\n\n if (empty($customReferer)) {\n \n // if refList wasn't defined, return\n $refList = $SM_siteManager->siteConfig->getVar('security','validReferers',$SM_siteID);\n if (!is_array($refList))\n return;\n \n while (list($key, $val) = each($refList)) {\n if (eregi($val,$referer)) {\n return;\n }\n }\n \n // NO MATCH\n $errorFunction();\n \n }\n else {\n if (!eregi($customReferer, $referer))\n $errorFunction();\n }\n\n}",
"public function isRedirect()\n {\n $codes = [\n static::STATUS_MOVED_PERMANENTLY,\n static::STATUS_FOUND,\n static::STATUS_SEE_OTHER,\n static::STATUS_TEMPORARY_REDIRECT,\n ];\n\n return (\n in_array($this->code, $codes) &&\n $this->getHeaderLine('Location')\n );\n }",
"function getDefaultSiteCode() {\n $pos = strpos($_SERVER[\"HTTP_HOST\"], \"relaxfil\");\n if (!$pos === false) {\n return (\"fra\");\n }\n \n\t// Seems to want to connect to AFP/RELAX\n\t\n\t// If code is \"fra\" redirect to AFP/RELAX in French\n\tif(isset($_REQUEST[\"code\"])) {\n\t\t$code = $_REQUEST[\"code\"];\n\t\t\n\t\tif ($code == \"fra\") {\n\t\t\theader(\"Location: /fr\");\n\t\t}\n\t\treturn ($code);\n\t}\n\t\n\t// Looking for french access to international newswire\n\t if(!isset($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]))\n\t return (\"en\");\n $pos = strpos($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"], \"fr;\");\n if (!$pos === false) {\n return (\"fr\");\n }\n \n\t// Default access to english version of afprelaxnews.com\n return (\"en\");\n}",
"public function checkRedirectStringAndRedirect() {\n if($this->check404ModuleStatus() == 1) {\n $urlPart = $this->getUrlString();\n // Check if url part is empty or not,\n if (empty($urlPart)) {\n // Redirect user on root level \t\t\n $this->customRedirect('/', 'default');\n } else {\n // Get configured category suffix (we are considering that product/category/page all have same)\n $suffix = Mage::helper('catalog/category')->getCategoryUrlSuffix();\n $string = $this->trimSlash($urlPart);\n\n $plorp = substr(strrchr($string, '/'), 1);\n $string = $this->trimSlash(substr($string, 0, - strlen($plorp))) . $suffix;\n // Check string part is equal to suffix or not\n if ($string != $suffix) {\n // Redirect user according to url part\n $this->customRedirect($string, 'default');\n } else {\n // Redirect customer to base url \n $this->customRedirect('/', 'default');\n }\n }\n\t}\n }",
"final function getCode();",
"static function matchUrl($_non404=True){\n\t\t$cBindA = $_non404? self::$bindA : self::$bind404A;\n\n\t\t//collect detected url's\n\t\t$bondA = [];\n\t\tforeach ($cBindA as $cBind)\n\t\t\tif ($cBind->match())\n\t\t\t\t$bondA[] = $cBind;\n\n\t\tif (!count($bondA))\n\t\t\treturn;\n\t\t\n\t\treturn $bondA;\n\t}",
"public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }",
"public function redirectToUrl($urlCode)\n {\n $paths = explode('/', $urlCode);\n $id = self::urlToIndex($paths[0]);\n $url = Url::find($id);\n $url->increment('num_visits');\n $redirectUrl = $url->long_url;\n\n $length = count($paths);\n if ($length > 1) // user isn't just using url code but extended url path\n {\n // prevents double slashes if shortened url ends with /\n $redirectUrl = rtrim($redirectUrl, '/');\n for ($i = 1; $i < $length; $i++)\n {\n $redirectUrl .= '/' . $paths[$i];\n }\n }\n\n return redirect()->away($redirectUrl);\n }",
"private function rewrite($data) {\n\t\t@preg_match('@^(?:http://)?([^/]+)@i', $data[0], $domain);\n\t\t\t\n\t\t$q = mysql_query(\"SELECT id,redirecturl,statuscode FROM rewriterules WHERE '$domain[1]' REGEXP urlexpr\"); //or die (mysql_error());\n\t\t$r = mysql_fetch_object($q);\n\t\t\n\t\tif (isset($r->id)) {\n\t\t\t\n\t\t\tif(DEBUG)\n\t\t\t\t@$this->log(\"Tried: \".$domain[1]);\n\t\t\t\n\t\t\techo $r->statuscode.\":\".$r->redirecturl.\"\\n\";\n\t\t\t\n\t\t\treturn TRUE;\n\t\t}\n\t\n\t}",
"public function parseCode(string $code): array\n {\n $arrayImg = [];\n $regex = self::REGEX;\n preg_match_all($regex, $code, $arrayImg);\n $imageUrl = $arrayImg[1];\n\n return $imageUrl;\n }",
"public function getRedirect()\n {\n return $this->secureInput($_GET['redirect']);\n }",
"public function checkPageForShortcutRedirect() {}",
"function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n\t}",
"protected function getAuthorizationCode()\n {\n $code = null;\n if ($this->responseMode === 'query' && isset($_GET['code'])) {\n $code = $_GET['code'];\n } else if ($this->responseMode === 'form_post' && isset($_POST['code'])) {\n $code = $_POST['code'];\n }\n\n return $code;\n }",
"function getNewAuthCodeFinal($authDetails)\n{\n $params = array('response_type'=>'code', 'client_id'=> $authDetails['client_id'], 'redirect_uri'=> $authDetails['redirect_uri'], 'state'=> 'xyz');\n header('Location: ' . $authDetails['authorization_code_endpoint'] . '?' . http_build_query($params));\n die();\n}",
"function findPageUrls();",
"function curl_code($curl) {\n return curl_info($curl, CURLINFO_HTTP_CODE);\n}",
"protected function isValidRedirect()\n {\n $savedState = $this->loadState();\n if (!$this->getCode() || !isset($_GET['state'])) {\n return false;\n }\n $givenState = $_GET['state'];\n $savedLen = mb_strlen($savedState);\n $givenLen = mb_strlen($givenState);\n if ($savedLen !== $givenLen) {\n return false;\n }\n $result = 0;\n for ($i = 0; $i < $savedLen; $i++) {\n $result |= ord($savedState[$i]) ^ ord($givenState[$i]);\n }\n return $result === 0;\n }",
"protected function followRedirect()\n\t\t{\n\t\t\tif (!$this->followRedirect)\n\t\t\t\treturn false; /* disabled */\n\t\t\tif (!isset($this->responseHeaders['Location']) || !is_string($this->responseHeaders['Location'])) {\n\t\t\t\tSERIA_Base::debug('HTTP protocol violation: No location header with response code: '.$this->responseCode);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$redirectPoint = $this->url;\n\t\t\t$location = $this->responseHeaders['Location'];\n\n\t\t\tif(strpos($location, '://')===false)\n\t\t\t{ // handling illegal redirects (Location: /path)\n\t\t\t\t$pi = parse_url($this->url);\n\t\t\t\t$location = $pi['scheme'].'://'.$pi['host'].$location;\n\t\t\t}\n\n\t\t\tif ($this->responseCode == 301 || $this->responseCode == 307) {\n\t\t\t\t/*\n\t\t\t\t * Check whether this is a post request:\n\t\t\t\t */\n\t\t\t\tif (isset($this->currentRequest['postFields']) && $this->currentRequest['postFields'])\n\t\t\t\t\t$post = $this->currentRequest['postFields'];\n\t\t\t\telse {\n\t\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t\t$post = true;\n\t\t\t\t\telse\n\t\t\t\t\t\t$post = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->currentRequest['postFiles']) && $this->currentRequest['postFiles'])\n\t\t\t\t\t$postFiles = $this->currentRequest['postFiles'];\n\t\t\t\telse\n\t\t\t\t\t$postFiles = array();\n\t\t\t} else {\n\t\t\t\t$post = false;\n\t\t\t\t$postFiles = array();\n\t\t\t}\n\t\t\t$connectToHost = false;\n\t\t\t$port = false;\n\t\t\t$from = parse_url($redirectPoint);\n\t\t\t$to = parse_url($location);\n\t\t\tif ($from['scheme'] == $to['scheme'] && $from['host'] == $to['host'] && $from['port'] == $to['port']) {\n\t\t\t\tif (isset($this->currentRequest['connectToHost']))\n\t\t\t\t\t$connectToHost = $this->currentRequest['connectToHost'];\n\t\t\t\t$port = $this->currentRequest['port'];\n\t\t\t}\n\t\t\t$this->navigateTo($location, $post, $connectToHost, $port);\n\t\t\tforeach ($postFiles as $name => $file)\n\t\t\t\t$this->postFile($name, $file);\n\t\t\tif ($this->responseCode == 301)\n\t\t\t\t$this->movedPermanently[$redirectPoint] = $location;\n\t\t\treturn true;\n\t\t}",
"public function getReceptionCode($code)\r\n {\r\n static $codes = array();\r\n\r\n if (! isset($codes[$code])) {\r\n $codes[$code] = $this->_loadClass('receptionCode', true, array($code));\r\n }\r\n\r\n return $codes[$code];\r\n }",
"abstract public function getReceptionCodes();",
"abstract public function getReceptionCodes();",
"public function isRedirect();",
"public function getCode(string $hook): string;",
"function fct_decode_lien_url ($urlpage) {\nglobal $url_parlante;\n\t// recupere ligne de produits et criteres (separes par _)\n\t$pos = strpos($urlpage, \"_\");\n\tif ($pos === false) {\n\t\t$gauche = $urlpage;\n\t} else {\n\t\t$gauche= substr($urlpage,0,$pos);\n\t\t$droite = substr($urlpage,$pos+1);\n\t\tif (substr($droite,-5) == \".html\") $droite = substr($droite,0,-5);\n\t}\n\t// remplace libelles criteres par ref et code critere (ex: tho = 00801)\n\tif (isset($droite)) {\n\t\t$paramd = explode(\"_\", $droite);\n\t\tforeach ($paramd as $libelle) {\t\n//echo \"url\";print_r($libelle);\n\n\t\t\t$code_paire = array_search($libelle, $url_parlante);\n//echo \"code $code_paire - \";\n\t\t\tif ($code_paire === false) $code_paire = $libelle;\n\t\t\t$pos = strpos($code_paire,\"~\"); \n\t\t\t$couple = explode(\"~\",$code_paire);\n\t\t\t$_GET[$couple[0]] = $couple[1]; \n\t\t}\n\t}\n}",
"function get_response_code($header) {\r\n\t$parts = explode(\"\\r\\n\", $header);\r\n\treturn $part[0];\r\n}",
"public function getRedirects();",
"function url_contains($string) {\n\n $url = URL;\n //check for string in url\n $lookup = strpos($url, $string);\n\n\n //If string is found, set the value of found_context\n if($lookup > 1 || $lookup !== false) {\n return true;\n }\n\n //If not found, set UNSET the value of found_context\n else {return false; }\n}",
"public function getFirstCode() {}",
"public function automaticStatusCode($data)\n\t{\n\t\t// Redirects must be either a 301 or 302\n\t\tif (isset($data['new_url']) && $data['new_url'] && !in_array($data['status_code'], array(301, 302)))\n\t\t{\n\t\t\t$data['status_code'] = 301;\n\t\t}\n\t\treturn $data['status_code'];\n\t}",
"public function redirect($url = '', $code = 302)\n {\n $referrer = $this->uri();\n\n if (strpos($referrer, '://') === FALSE)\n {\n $referrer = URL::site($referrer, TRUE, ! empty(Kohana::$index_file));\n }\n\n if (strpos($url, '://') === FALSE)\n {\n // Make the URI into a URL\n $url = URL::site($url, TRUE, ! empty(Kohana::$index_file));\n }\n\n if (($response = $this->response()) === NULL)\n {\n $response = $this->create_response();\n }\n\n echo $response->status($code)\n ->headers('Location', $url)\n ->headers('Referer', $referrer)\n ->send_headers()\n ->body();\n\n // Stop execution\n exit;\n }",
"public function checkBingWTCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Bing is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }",
"function get_request_contains($request_url,$search_string) {\n //get the current url\n $string = $search_string;\n $url = $request_url;\n //~ echo $request_url;\n //check for string in url\n $lookup = strpos($url, $string);\n\n\n //If string is found, set the value of found_context\n if($lookup > 1 || $lookup !== false) {\n //~ echo 'is_component request';\n return true;\n }\n\n //If not found, set UNSET the value of found_context\n else {\n //~ echo 'is_not component request';\n return false; \n }\n}",
"public function show($code)\n {\n $links = ShortLink::where('short_codes',$code)->first();\n\n $long_link = $links->long_links;\n\n return redirect($long_link);\n\n\n }",
"function getHttpResponseCode_using_curl($url, $followredirects = true){\n // NOTE: could potentially take up to 0-30 seconds , blocking further code execution (more or less depending on connection, target site, and local timeout settings))\n // if $followredirects == false: return the FIRST known httpcode (ignore redirects)\n // if $followredirects == true : return the LAST known httpcode (when redirected)\n if(! $url || ! is_string($url)){\n return false;\n }\n $ch = @curl_init($url);\n if($ch === false){\n return false;\n }\n @curl_setopt($ch, CURLOPT_HEADER ,true); // we want headers\n @curl_setopt($ch, CURLOPT_NOBODY ,true); // dont need body\n @curl_setopt($ch, CURLOPT_RETURNTRANSFER ,true); // catch output (do NOT print!)\n if($followredirects){\n @curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,true);\n @curl_setopt($ch, CURLOPT_MAXREDIRS ,10); // fairly random number, but could prevent unwanted endless redirects with followlocation=true\n }else{\n @curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,false);\n }\n // @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,5); // fairly random number (seconds)... but could prevent waiting forever to get a result\n // @curl_setopt($ch, CURLOPT_TIMEOUT ,6); // fairly random number (seconds)... but could prevent waiting forever to get a result\n // @curl_setopt($ch, CURLOPT_USERAGENT ,\"Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1\"); // pretend we're a regular browser\n @curl_exec($ch);\n if(@curl_errno($ch)){ // should be 0\n @curl_close($ch);\n return false;\n }\n $code = @curl_getinfo($ch, CURLINFO_HTTP_CODE);\n @curl_close($ch);\n return $code;\n }",
"public static function isRedirect() {\n\t return in_array(self::getStatus(),[301,302,303,307,308]);\n\t}",
"public static function findMainCode($codes)\n {\n foreach (static::mainCodes() as $code) {\n if (in_array($code, $codes)) {\n return $code;\n }\n }\n\n return null;\n }",
"public function findCodeType($codeBlock) {\n\t\t$codeBlock = ltrim(rtrim($codeBlock, \" \"),\" \");\n\t\t$arr = explode(\" \", $codeBlock);\n\t\treturn strtoupper($arr[0]); \n\t}",
"public function getReceptionCode($code)\n {\n static $codes = array();\n\n if (! isset($codes[$code])) {\n $codes[$code] = $this->_loadClass('receptionCode', true, array($code));\n }\n\n return $codes[$code];\n }",
"function location($page) {\r\n\r\n\t}",
"function loc($message) {\n return Mvc::getInstance()->getView()->translateCodeMessage($message);\n}",
"protected function _checkCode($code)\n {\n $code = (int)$code;\n if ((300 > $code) || (307 < $code) || (304 == $code) || (306 == $code)) {\n require_once 'Zend/Controller/Action/Exception.php';\n throw new Zend_Controller_Action_Exception('Invalid redirect HTTP status code (' . $code . ')');\n }\n\n return true;\n }",
"public function validationSha($code){\r\n\t\t//variables\r\n\t\t$error = '';\r\n\t\t$user_browser = $_SERVER['HTTP_USER_AGENT']; //navegador\r\n\t\t$ip = $_SERVER['REMOTE_ADDR']; //ip\r\n\t\r\n\t\t$this->where('macro_sha', $code);\r\n\t\tif($salida = $this->getOne('solicitudes_clave')){\r\n\t\t\t\r\n\t\t\tif($salida['navegador'] != $user_browser){\t$error = 'navegador no concide';\t}\r\n\t\t\tif($salida['ip'] != $ip){\t\t\t\t\t$error = 'remote ip no concide';\t}\r\n\t\t\t\r\n\t\t\tif($error != ''){\r\n\t\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t$nuevo_sha = hash('sha512', $salida['email'].$user_browser.$salida['telefono'].$ip);\r\n\t\t\t\tif($nuevo_sha != $salida['macro_sha']){\r\n\t\t\t\t\t$error = 'Shas no coinciden';\r\n\t\t\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//succes!!\r\n\t\t\t\t\t$_SESSION['email_val'] = $salida['email'];\r\n\t\t\t\t\t$_SESSION['corrector'] = $salida['salt'];\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$error = 'no hubo conexion a db';\r\n\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function getCode()\n {\n return curl_getinfo($this->handler)['http_code'];\n }",
"function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n}",
"function curl_require_code($curl, $code = 200) {\n if (curl_code($curl) !== intval($code)) {\n error(curl_url($curl) . ' responded with code ' . curl_code($curl) . ' instead of code ' . spy($code) . '.');\n }\n}",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"public function getRedirectUrl();",
"function getLineOfCode($tokens,$stackPtr)\n {\n try {\n // Get the line Start position.//\n $startPos = $stackPtr;\n while (\n $tokens[$startPos]['line'] == $tokens[$stackPtr]['line'] \n && $startPos > 0\n ) {\n $startPos--;\n }\n if ($startPos == 0) {\n $startPos--;\n }\n \n //Get the line ending position.//\n $endPos = $stackPtr;\n while (\n $tokens[$endPos]['line'] == $tokens[$stackPtr]['line'] \n && $endPos < sizeof($tokens)-1\n ) {\n $endPos++;\n }\n $lineCode='';\n //Get the line content from startPosition to EndPosition.//\n for ($i = $startPos + 1; $i < $endPos; $i++) {\n if ($tokens[$i]['code'] == T_COMMENT ) {\n continue;\n }\n $lineCode .= ($tokens[$i]['content']);\n // Remove the WhiteSpace for first content only.//\n if ($i == $startPos) {\n $lineCode = trim($lineCode);\n }\n }\n $lineCode = trim(str_replace(\"%\", \"%%\", $lineCode));\n \n return $lineCode;\n } catch (Exception $e){\n echo \"Exception found for Function - \".$tokens[$stackPtr]['code'];\n exit;\n }\n }"
] | [
"0.5923443",
"0.5621442",
"0.55835414",
"0.55640584",
"0.54911375",
"0.5490793",
"0.5484887",
"0.54746276",
"0.5465752",
"0.54568994",
"0.54501665",
"0.54036313",
"0.5374671",
"0.53691274",
"0.5354483",
"0.53535295",
"0.5334649",
"0.5333545",
"0.52064425",
"0.5204692",
"0.5199307",
"0.5179773",
"0.51458484",
"0.51305836",
"0.51275104",
"0.5114682",
"0.5111576",
"0.5109506",
"0.5103006",
"0.50689906",
"0.50613534",
"0.50544983",
"0.5054412",
"0.5054194",
"0.505134",
"0.50393295",
"0.5035527",
"0.50340927",
"0.50242645",
"0.5012069",
"0.4994214",
"0.499221",
"0.49891418",
"0.49852917",
"0.4979004",
"0.4969612",
"0.4969612",
"0.49675885",
"0.49442035",
"0.49353307",
"0.49340564",
"0.49305183",
"0.49235487",
"0.49143994",
"0.49059185",
"0.49021128",
"0.49020636",
"0.4900474",
"0.4889131",
"0.48656037",
"0.4864345",
"0.48625246",
"0.48552486",
"0.48507562",
"0.48375687",
"0.48214817",
"0.48206228",
"0.48162755",
"0.4808011",
"0.4808011",
"0.48027885",
"0.48015022",
"0.48009717",
"0.47944134",
"0.47926423",
"0.478749",
"0.47872326",
"0.47859013",
"0.47740418",
"0.47726434",
"0.4771137",
"0.4762823",
"0.47607696",
"0.47562027",
"0.4742853",
"0.47397226",
"0.4736723",
"0.47292835",
"0.47279057",
"0.47231466",
"0.47219113",
"0.4721065",
"0.4717697",
"0.4710108",
"0.47099572",
"0.47099572",
"0.47099572",
"0.47099572",
"0.47099572",
"0.4709735"
] | 0.62229073 | 0 |
Find an invalid code in the codes | function is_invalid_http_codes($http_codes) {
foreach ($http_codes as $http_code) {
if ( is_invalid_http_code($http_code) ) {
return TRUE;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function check_if_code_is_valid($code){\n\n $query = $this->db->get_where('tbl_doctor_code',array('dc_code' => $code));\n return $query->result_array();\n }",
"public function check($code) {\n $code = trim($code);\n // last token should be ;\n if(substr($code, -1) != ';') {\n $this->error = ['line' => (substr_count($code, \"\\n\") + 1), 'prev' => ']', 'token' => ';', 'must' => true];\n return false;\n }\n // exclude last token\n $code = substr($code, 0, -1);\n // get all tokens\n $tokens = token_get_all($code);\n $prev = false;\n $this->error['line'] = false;\n foreach($tokens as $token) {\n if(is_array($token)) {\n $tn = token_name($token['0']);\n if(in_array($tn, ['T_WHITESPACE', 'T_COMMENT']))\n continue;\n $this->error = ['line' => $token[2], 'prev' => $prev, 'token' => $tn];\n if(!in_array($tn, self::$valid_tokens))\n return false;\n elseif($tn == 'T_STRING' && !in_array(strtolower($token[1]), ['true', 'false']))\n return false;\n if($this->validSequence($prev, $tn))\n $prev = $tn;\n else\n return false; \n } else {\n // line will be defined in any case, so no needed to define it here \n $this->error['prev'] = $prev;\n $this->error['token'] = $token;\n if(in_array($token, self::$valid_symbols) && $this->validSequence($prev, $token))\n $prev = $token;\n else\n return false;\n }\n }\n // chek pairs of $braces\n $braces = 0;\n $inString = 0;\n $this->error['line'] = 0;\n foreach($tokens as $token) {\n if($inString & 1) {\n switch ($token) {\n case '`':\n case '\"': --$inString; break;\n }\n } else {\n switch ($token) {\n case '`':\n case '\"': ++$inString; break;\n \n case '[': case '(': ++$braces; break;\n case ']': case ')':\n if ($inString) {\n --$inString;\n }\n else {\n --$braces;\n if ($braces < 0) {\n return false;\n }\n }\n break;\n }\n }\n }\n if ($braces) {\n return false;\n }\n return true;\n }",
"function reservedCodes($data) {\n\t\tif(in_array($data['code'], Configure::read('InvalidCodes'))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function verifyCode($code,$id)\n\t{\n\t\ttry{\n\t\t\t$select = $this->getDbTable()->select();\n\t\t\t$select->from('rd.location_boundaries',array('COUNT(id) as count'))\n\t\t\t->where('code ILIKE ?',$code);\n\t\t\tif($id != 0){\n\t\t\t\t$select->where('id <> ?',$id);\n\t\t\t}\n\t\t\t$rowset = $this->getDbTable()->fetchAll($select);\n\t\t\t$count = 0;\n\n\t\t\tforeach($rowset as $row){\n\t\t\t\t$count = $row->count;\n\t\t\t}\n\t\t\tif($count == 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $ex){\n\t\t\tthrow new Exception($ex->getMessage()) ;\n\t\t}\n\n\t}",
"function codecheck($code){\n\t\t// echo 'Code Check wordt uitgevoerd!';\n\t\t\n\t\t$con=mysqli_connect(\"localhost\",\"durftean\",\"SSander123\",\"durftean\");\n\t\t$query = \"SELECT * FROM codes WHERE code = $code\";\t\t\n\t\t$result = mysqli_query($con, $query);\n\t\t$data = mysqli_fetch_assoc($result);\n\t\t\n\t\tif($result->num_rows > 0) {\n\t\t\t$ja = true; // Wel iets gevonden\n\t\t}else{\n\t\t\t$nee = false; // Niks gevonden\n\t\t}\n\t\treturn array($ja,$nee,$data);\n\t}",
"public function testNonPlusPrefixedNumbersNotFoundForInvalidRegion()\n {\n $iterable = $this->phoneUtil->findNumbers('1 456 764 156', RegionCode::ZZ);\n\n $iterable->next();\n $this->assertFalse($iterable->valid());\n }",
"protected function scanCode()\n {\n $matches = array();\n\n if (preg_match('/^(!?=|-)([^\\n]+)/', $this->input, $matches)) {\n $this->consumeInput(mb_strlen($matches[0]));\n\n $flags = $matches[1];\n $token = $this->takeToken('code', $matches[2]);\n $token->buffer = (isset($flags[0]) && '=' === $flags[0]) || (isset($flags[1]) && '=' === $flags[1]);\n\n return $token;\n }\n }",
"public function code_check($code)\n\t{\n\t\t$this->db->where('code', trim($code));\n\t\t$datas = $this->db->get($this->datas_table);\n\n\t\treturn $datas;\n\t}",
"abstract public function checkCode(string $uuid, string $code, int $successFlag = self::NOTHING_ON_SUCCESS);",
"public static function checkForIllegalCodepoints($data)\n {\n // Vestigal error handling.\n $errors = array();\n\n /*\n * All U+0000 null characters in the input must be replaced by U+FFFD REPLACEMENT CHARACTERs.\n * Any occurrences of such characters is a parse error.\n */\n for ($i = 0, $count = substr_count($data, \"\\0\"); $i < $count; ++$i) {\n $errors[] = 'null-character';\n }\n\n /*\n * Any occurrences of any characters in the ranges U+0001 to U+0008, U+000B, U+000E to U+001F, U+007F\n * to U+009F, U+D800 to U+DFFF , U+FDD0 to U+FDEF, and characters U+FFFE, U+FFFF, U+1FFFE, U+1FFFF,\n * U+2FFFE, U+2FFFF, U+3FFFE, U+3FFFF, U+4FFFE, U+4FFFF, U+5FFFE, U+5FFFF, U+6FFFE, U+6FFFF, U+7FFFE,\n * U+7FFFF, U+8FFFE, U+8FFFF, U+9FFFE, U+9FFFF, U+AFFFE, U+AFFFF, U+BFFFE, U+BFFFF, U+CFFFE, U+CFFFF,\n * U+DFFFE, U+DFFFF, U+EFFFE, U+EFFFF, U+FFFFE, U+FFFFF, U+10FFFE, and U+10FFFF are parse errors.\n * (These are all control characters or permanently undefined Unicode characters.)\n */\n // Check PCRE is loaded.\n $count = preg_match_all(\n '/(?:\n [\\x01-\\x08\\x0B\\x0E-\\x1F\\x7F] # U+0001 to U+0008, U+000B, U+000E to U+001F and U+007F\n |\n \\xC2[\\x80-\\x9F] # U+0080 to U+009F\n |\n \\xED(?:\\xA0[\\x80-\\xFF]|[\\xA1-\\xBE][\\x00-\\xFF]|\\xBF[\\x00-\\xBF]) # U+D800 to U+DFFFF\n |\n \\xEF\\xB7[\\x90-\\xAF] # U+FDD0 to U+FDEF\n |\n \\xEF\\xBF[\\xBE\\xBF] # U+FFFE and U+FFFF\n |\n [\\xF0-\\xF4][\\x8F-\\xBF]\\xBF[\\xBE\\xBF] # U+nFFFE and U+nFFFF (1 <= n <= 10_{16})\n )/x', $data, $matches);\n for ($i = 0; $i < $count; ++$i) {\n $errors[] = 'invalid-codepoint';\n }\n\n return $errors;\n }",
"function validate(){\n\t\treturn true; //use this to bypass barcode validation\n\n\t\t$value = preg_match($this->REGEX, $this->code);\n\t\tif($value != 1)\n\t\t{\n\t\t\t$this->error = 'The barcode <strong>'.$this->code.'</strong> is not valid';\n\t\t}\n\n\t\treturn $value;\n\t}",
"function verify_code($rec_num, $checkstr)\n\t{\n\t\tif ($user_func = e107::getOverride()->check($this,'verify_code'))\n\t\t{\n\t \t\treturn call_user_func($user_func,$rec_num,$checkstr);\n\t\t}\n\t\t\n\t\t$sql = e107::getDb();\n\t\t$tp = e107::getParser();\n\n\t\tif ($sql->db_Select(\"tmp\", \"tmp_info\", \"tmp_ip = '\".$tp -> toDB($rec_num).\"'\")) {\n\t\t\t$row = $sql->db_Fetch();\n\t\t\t$sql->db_Delete(\"tmp\", \"tmp_ip = '\".$tp -> toDB($rec_num).\"'\");\n\t\t\t//list($code, $path) = explode(\",\", $row['tmp_info']);\n\t\t\t$code = intval($row['tmp_info']);\n\t\t\treturn ($checkstr == $code);\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function checkBingWTCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Bing is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }",
"function acucDecodeSubstitutionCipher( $arrayCode )\r\n{\r\n\tglobal $acucCodeChangeTable;\r\n\t\r\n\t$arrayReturnCode = $arrayCode;\r\n\t\r\n\tfor( $idx = 0; $idx < 21; $idx++ )\r\n\t{\r\n\t\t$arrayReturnCode[$idx] = array_search($arrayCode[$idx], $acucCodeChangeTable);\r\n\t}\r\n\t\r\n\treturn $arrayReturnCode;\r\n}",
"private function searchCodeThreeLevels($code){\n\t \t$codigosTresNiveles = array('020.010.010','020.010.020','020.010.030','050.020.010','050.020.020',\n\t\t\t\t\t\t\t\t\t'050.020.030','050.030.010','050.030.020','060.010.010','060.010.020',\n\t\t\t\t\t\t\t\t\t'060.010.030','060.010.040','060.010.050','060.020.010','060.020.020',\n\t\t\t\t\t\t\t\t\t'060.020.030','060.020.040','060.020.050','060.020.060','060.030.010',\n\t\t\t\t\t\t\t\t\t'060.030.020');\n\t\treturn in_array($code, $codigosTresNiveles);\n\t}",
"public function deleteInvalidCodes() {\n\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\n\t\t\t$invalid_codes = array();\n\t\t\tforeach($this->subjects as $subject) {\n\t\t\t\tif (!in_array($subject['ID'], $this->valid_subject_codes)) {\n\t\t\t\t\t$invalid_codes[] = $subject['ID'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// For each invalid topic code we want to delete them\n\t\t\t$error = TRUE;\n\t\t\tforeach($invalid_codes as $code) {\n\t\t\t\t$query = \"DELETE FROM tblsubject WHERE ID = '$code'\";\n\t\t\t\t$sql->query($query, $this->debug);\n\t\t\t\tif ($sql->num_rows_affected() < 0) {\n\t\t\t\t\t$error = FALSE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $error;\n\n\t\t}",
"public static function validateCode()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}",
"function check_code($str)\n\t{\n\t\t$code = $this->Coupon_model->check_code($str, $this->coupon_id);\n if ($code)\n \t{\n\t\t\t$this->form_validation->set_message('check_code', lang('error_already_used'));\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODEDIFICIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}",
"function isValidCodeMachine($codeMachine) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM Machine WHERE codeMachine LIKE :codeMachine\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'codeMachine' => $codeMachine\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\tif($request->rowCount() != 0)\n\t\treturn false;\n\treturn true;\n}",
"final function getCode();",
"public function code_check($code)\n {\n if( $this->MItems->get_by_code($code))\n {\n $this->form_validation->set_message('code_check', 'Item code can\\'t be duplicate. Please choose different item code.');\n return false;\n }\n else\n {\n return true;\n }\n }",
"function code_issue_find($code) {\n\t\t$issues = array();\n\t\tif (preg_match('/DEBUG/', $code)) {\n\t\t\t// http://book.cakephp.org/view/577/Configure\n\t\t\t$issues[] = \"configure::read('debug') constant found, need to switch to configure::read('debug')\";\n\t\t}\n\t\tif (preg_match('/->renderElement\\(/', $code)) {\n\t\t\t// http://book.cakephp.org/view/577/Configure\n\t\t\t$issues[] = \"->renderElement() needs to change to ->element()\";\n\t\t}\n\t\tif (preg_match('/->del\\(/', $code)) {\n\t\t\t// http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3\n\t\t\t$issues[] = \"->del() needs to change to ->delete()\";\n\t\t}\n\t\tif (preg_match('/->getReferrer\\(/', $code)) {\n\t\t\t// http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3\n\t\t\t$issues[] = \"->getReferrer() needs to change to ->getReferer()\";\n\t\t}\n\t\tif (preg_match('/->(mkdir|mv|ls|cp|rm)\\(/', $code)) {\n\t\t\t// http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3\n\t\t\t$issues[] = \"->(mkdir|mv|ls|cp|rm) needs to change to ->(create|move|read|copy|delete) Folder Methods\";\n\t\t}\n\t\tif (preg_match('/\\$(this->)?(H|h)tml->(input|hidden|value|label|checkbox)\\(/i', $code, $matches)) {\n\t\t\t// http://book.cakephp.org/view/578/HTML-Helper-to-Form-Helper\n\t\t\t$issues[] = \"Html helper migrated to Form helper\";\n\t\t}\n\t\tif (preg_match('/->generateList\\(/i', $code, $matches)) {\n\t\t\t// http://book.cakephp.org/view/580/Model-generateList\n\t\t\t$issues[] = \"generateList() needs to be migrated to find('list', array())\";\n\t\t}\n\t\tif (preg_match('/(VALID_EMAIL|VALID_NOT_EMPTY|VALID_NUMBER|PEAR|INFLECTIONS|CIPHER_SEED)/i', $code, $matches)) {\n\t\t\t// http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3\n\t\t\t$issues[] = \"Old Validation constants need to be updated (cakephp 1.3) \".json_encode($matches);\n\t\t}\n\t\treturn $issues;\n\t}",
"public function lint($code);",
"function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->codedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}",
"private function validateCodes($lists, $code, $type)\n {\n $errorMsg = '';\n if (!$lists->isValid($code)) {\n $errorMsg = '<error>' . 'Command option \\'' . $type . '\\': Invalid value. To see possible values, '\n . \"run command 'bin/magento info:\" . $type . ':list\\'.</error>';\n }\n return $errorMsg;\n }",
"public function checkGoogleWTCode($code) {\r\n\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Google Webmaster Tool is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }",
"protected function checksum_code93($code) {\n\t\t$chars = array(\n\t\t\t'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\n\t\t\t'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',\n\t\t\t'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%',\n\t\t\t'<', '=', '>', '?');\n\t\t// translate special characters\n\t\t$code = strtr($code, chr(128).chr(131).chr(129).chr(130), '<=>?');\n\t\t$len = strlen($code);\n\t\t// calculate check digit C\n\t\t$p = 1;\n\t\t$check = 0;\n\t\tfor ($i = ($len - 1); $i >= 0; --$i) {\n\t\t\t// FIXME: use strpos() instead and check result\n\t\t\t$k = array_keys($chars, $code[$i]);\n\t\t\t$check += ( (int) $k[0] * $p);\n\t\t\t++$p;\n\t\t\tif ($p > 20) {\n\t\t\t\t$p = 1;\n\t\t\t}\n\t\t}\n\t\t$check %= 47;\n\t\t$c = $chars[$check];\n\t\t$code .= $c;\n\t\t// calculate check digit K\n\t\t$p = 1;\n\t\t$check = 0;\n\t\tfor ($i = $len; $i >= 0; --$i) {\n\t\t\t// FIXME: use strpos() instead and check result\n\t\t\t$k = array_keys($chars, $code[$i]);\n\t\t\t$check += ( (int) $k[0] * $p);\n\t\t\t++$p;\n\t\t\tif ($p > 15) {\n\t\t\t\t$p = 1;\n\t\t\t}\n\t\t}\n\t\t$check %= 47;\n\t\t$checksum = $c.$chars[$check];\n\t\t// restore special characters\n\t\t$checksum = strtr($checksum, '<=>?', chr(128).chr(131).chr(129).chr(130));\n\t\treturn $checksum;\n\t}",
"protected function _getNextCode() {}",
"public static function checkPartnerCode($code){\n $status = array('stat'=>'error', 'msg'=>'Something went wrong');\n $ports = array();\n\n $ports = DB::table('sb24_partnercode')->where('code', strtoupper($code) )->select('id')->orderBy\n ('id', 'desc')->take(1)->get();\n if(count($ports)>0){\n $status = array('stat'=>'error', 'msg'=>'Code already exists');\n } else {\n $status = array('stat'=>'ok', 'msg'=>'');\n }\n return $status;\n }",
"function getErrorText($code){\n $errorText = array(\"good\",\"account not existed\",\"insufficient fund\",\"invalid account format\",\"duplicate account record\",\"invalid tranzaction format\",\"unknown error\");\n return $errorText[$code];\n }",
"function MCW_plausibility_check($widget){\n // error message if code is incorrect\n $res = false; // = 0 = ''\n $code = stripslashes($widget['code']);\n $kind = $widget['kind'];\n \n //check 0\n $rec_check = MCW_check_chain($widget);\n if ($rec_check['clean']==false){\n $res=$res.'DANGER: Current widget configuration would lead to infinite loops: <code>'.$rec_check['chain'].'</code>';\n }\n \n //check 1\n $code_a='<?php';\n $code_b='?'.'>';\n $code_a_count=substr_count($code, $code_a);\n $code_b_count=substr_count($code, $code_b);\n if ($code_a_count <> $code_b_count) \n $res=$res.$code_a_count.' php-open-tag (<code>'.MCW_make_html_writeable($code_a).'</code>) vs. '.$code_b_count.' php-close-tag (<code>'.MCW_make_html_writeable($code_b).'</code>)';\n \n //check 2\n if ($kind=='html'){\n $code_a='?'.'>';\n $code_b='<?php'; \n } else {\n $code_a='<?php';\n $code_b='?'.'>'; \n }\n $code_a_pos=strpos($code, $code_a);\n $code_b_pos=strpos($code, $code_b);\n if ($code_a_pos < $code_b_pos){\n if ($res) $res=$res.',<br>';\n $res=$res.'You should not use <code>'.MCW_make_html_writeable($code_a).'</code> before <code>'.MCW_make_html_writeable($code_b).'</code> in '.$kind.'-code. Please select html or remove these tags.';\n }\n \n return $res;\n //return false; \n }",
"function codesInGroup($code,$codeType)\n{\n if(strpos($code,\"992\")==0)\n {\n $c=substr($code,3,1);\n if(($c==\"0\")||($c==\"1\"))\n {\n $retval=\"\";\n foreach($GLOBALS['OVC'] as $c)\n {\n $retval=$retval.\",\".\"'\".$c.\"'\";\n }\n $retval=substr($retval,1);\n }\n \n }\n else {\n $retval=\"'\".$code.\"'\";\n }\n \n return \"(\".$retval.\")\";\n}",
"public function hasCodeType(){\n return $this->_has(3);\n }",
"public static function isValid( $code )\n {\n return in_array(\n strtoupper( $code ),\n [\n self::AFRICA,\n self::ASIA,\n self::EUROPE,\n self::NORTH_AMERICA,\n self::OCEANIA,\n self::SOUTH_AMERICA,\n self::ANTARCTICA,\n ]\n );\n }",
"public static function verifyCode($code){\n\n if(!is_string($code) && !is_int($code)){\n\n return false;\n }\n\n $code=trim(''.$code);\n $codeLen=strlen($code);\n\n $totalW=array_sum(self::$WIDTH_SETTING);\n if($codeLen>$totalW){\n\n return false;\n }\n\n $flagInvalid=true;\n $curW=0;\n for($i=0; $i<count(self::$WIDTH_SETTING); $i++){\n\n $curW+=self::$WIDTH_SETTING[$i];\n if($curW==$codeLen){\n $flagInvalid=false;\n break;\n }\n }\n\n return !$flagInvalid;\n\n }",
"public function hasCode(){\n return $this->_has(3);\n }",
"function _getValidationCode()\n {\n $code = \"$('#error_file').html('').parent().hide();\\n\";\n $code .= \"if(!$('#imgFile').val()) {\";\n $code .= \"$('#error_file').html('You must select an image file');\\n\";\n $code .= \"$('#error_file').parent().show();\\n\";\n $code .= \"error = true;}\\n\";\n\n //TODO: Make this a setting in an essay\n //$code .= \"$('#error_text').html('').parent().hide();\\n\";\n // $code .= \"if(getWordCount('textEdit') > 150) {\";\n // $code .= \"$('#error_text').html('Your text can not be longer than 100 words. (Note: Some editors add phantom characters to your document, try cleaning the text by copying it into a program like notepad then pasting it in if you feel you receive this message in error)');\\n\";\n // $code .= \"$('#error_text').parent().show();\\n\";\n // $code .= \"error = true;}\";\n return $code;\n }",
"public function isInvalidCategoryCode(): bool\n {\n return strpos(\"[CATEGORY-NOT-MATCH]\", trim($this->getBody())) !== false;\n }",
"function getUnusedCode()\n{\n $newcode = createLuhnCheckedRandomString(10);\n\n// while the new string exists, get a new code\n while (file_exists('results/' . $newcode . '-response.json')) {\n $newcode = createLuhnCheckedRandomString(10);\n }\n\n return $newcode;\n}",
"public static function findMainCode($codes)\n {\n foreach (static::mainCodes() as $code) {\n if (in_array($code, $codes)) {\n return $code;\n }\n }\n\n return null;\n }",
"private function findElByCode($code) {\n\t $result = false;\n\n\t foreach ($this->currencies as $el) {\n\t\t if ((string) $el->code === strtoupper($code)) {\n\t\t\t $result = $el;\n\t\t }\n\t }\n\n return $result;\n }",
"function InviteValidation($icode) {\n \n //DO:\n // Static MySQL query that returns all non claimed codes.\n // iterate through each code and check for match.\n \n //force icode to uppercase.\n $icode = strtoupper($icode);\n \n // Do we claim the invite code yet?\n $today = date(\"Y-m-d\");\n if (!preg_match(\"/^[23456789ABCDEFGHJKLMNPQRSTUVWXYZ]{6}$/\",$icode)) {\n //invalid code.\n\t\t\t\t$_SESSION['alert'] = \"Invalid invite code.\";\n return false;\n }\n\t\t\t$inviteToday = queryInvites($today);\n\t\t\t$inviteAlways = queryInvites(\"NEVER\");\n\t\t\t$return = array_merge($inviteToday, $inviteAlways);\n foreach ($return as $invite) {\n if ($invite['claimedBy'] != null) {\n continue; //This is needed because of the never expire code.\n }\n if ($invite['code'] == $icode) {\n //Match found.\n $_SESSION['inviteCode'] = $invite['code'];\n $_SESSION['sponsor'] = $invite['genUser'];\n return true;\n }\n }\n\t\t\t$_SESSION['alert'] = \"Invalid invite code.\";\n return false;\n }",
"protected function validateCodes() {\r\n if (empty($this->passcode)) {\r\n throw new \\Exception(\"Passcode has not been set.\");\r\n }\r\n if (empty($this->merchant_code)) {\r\n throw new \\Exception(\"merchant_code has not been set.\");\r\n }\r\n\r\n if (empty($this->secret_key)) {\r\n throw new \\Exception(\"secret_key has not been set.\");\r\n }\r\n }",
"function checkPostcode(&$toCheck) {\n\t$alpha1 = \"[abcdefghijklmnoprstuwyz]\"; // Character 1\n\t$alpha2 = \"[abcdefghklmnopqrstuvwxy]\"; // Character 2\n\t$alpha3 = \"[abcdefghjkpmnrstuvwxy]\"; // Character 3\n\t$alpha4 = \"[abehmnprvwxy]\"; // Character 4\n\t$alpha5 = \"[abdefghjlnpqrstuwxyz]\"; // Character 5\n\t// Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA with a space\n\t$pcexp[0] = '/^(' . $alpha1 . '{1}' . $alpha2 . '{0,1}[0-9]{1,2})([[:space:]]{0,})([0-9]{1}' . $alpha5 . '{2})$/';\n\n\t// Expression for postcodes: ANA NAA\n\t$pcexp[1] = '/^(' . $alpha1 . '{1}[0-9]{1}' . $alpha3 . '{1})([[:space:]]{0,})([0-9]{1}' . $alpha5 . '{2})$/';\n\n\t// Expression for postcodes: AANA NAA\n\t$pcexp[2] = '/^(' . $alpha1 . '{1}' . $alpha2 . '{1}[0-9]{1}' . $alpha4 . ')([[:space:]]{0,})([0-9]{1}' . $alpha5 . '{2})$/';\n\n\t// Exception for the special postcode GIR 0AA\n\t$pcexp[3] = '/^(gir)(0aa)$/';\n\n\t// Standard BFPO numbers\n\t$pcexp[4] = '/^(bfpo)([0-9]{1,4})$/';\n\n\t// c/o BFPO numbers\n\t$pcexp[5] = '/^(bfpo)(c\\/o[0-9]{1,3})$/';\n\n\t// Overseas Territories\n\t$pcexp[6] = '/^([a-z]{4})(1zz)$/';\n\n\t// Load up the string to check, converting into lowercase\n\t$postcode = strtolower($toCheck);\n\n\t// Assume we are not going to find a valid postcode\n\t$valid = false;\n\n\t// Check the string against the six types of postcodes\n\tforeach ($pcexp as $regexp) {\n\t\tif (preg_match($regexp, $postcode, $matches)) {\n\n\t\t\t// Load new postcode back into the form element\n\t\t\t$postcode = strtoupper($matches[1] . ' ' . $matches [3]);\n\n\t\t\t// Take account of the special BFPO c/o format\n\t\t\t$postcode = str_replace('C\\/O', 'c/o ', $postcode);\n\n\t\t\t// Remember that we have found that the code is valid and break from loop\n\t\t\t$valid = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return with the reformatted valid postcode in uppercase if the postcode was\n\t// valid\n\tif ($valid) {\n\t\t$toCheck = $postcode;\n\t\t$data['post_code'] = $postcode;\n\t\t$_POST['post_code'] = $postcode;\n\t\treturn true;\n\t} else\n\t\treturn false;\n}",
"public function getFirstCode() {}",
"public function hasCodeType(){\n return $this->_has(4);\n }",
"public function hasCodeType(){\n return $this->_has(4);\n }",
"function validCode($request_code): bool {\n\t\t\t# Test to See Session Code is 32 character hexadecimal\n\t\t\tif (preg_match(\"/^[0-9a-f]{64}$/i\",$request_code)) return true;\n\t\t\t#error_log(\"Invalid session code: $request_code\");\n\t\t\treturn false;\n\t\t}",
"private function parse_code_value($code_value) {\n $is_starting = false;\n\n switch ($code_value) {\n case 'CLSB': // LSU_SEM\n case 'CLSE': // LSU_FINAL\n $campus = 'LSU';\n $is_starting = ($code_value == 'CLSB');\n break;\n case 'LAWB': // LAW_SEM\n case 'LAWE': // LAWE\n $campus = 'LAW';\n $is_starting = ($code_value == 'LAWB');\n break;\n default:\n $campus = '';\n break;\n }\n\n return [$campus, $is_starting];\n }",
"function ValidVisualVerifyCode($vvcid, $enteredcode)\n{\n global $DB;\n\n $vvcid = empty($vvcid) ? 0 : (int)$vvcid;\n $enteredcode = empty($enteredcode) ? '' : trim((string)$enteredcode);\n if(($vvcid > 0) && (strlen($enteredcode) == SD_VVCLEN))\n {\n $verifycode = $DB->query_first(\"SELECT verifycode FROM {vvc} WHERE vvcid = %d\", $vvcid);\n $DB->query_first(\"DELETE FROM {vvc} WHERE vvcid = %d\", $vvcid);\n if(!empty($verifycode))\n {\n return (strtolower(trim($verifycode['verifycode'])) == strtolower($enteredcode));\n }\n }\n\n return false;\n\n}",
"function codeUsed($a_cp_id, $a_code)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$set = $ilDB->query(\"SELECT id\".\n\t\t\t\" FROM adn_ep_assignment\".\n\t\t\t\" WHERE cp_professional_id = \".$ilDB->quote($a_cp_id, \"integer\").\n\t\t\t\" AND access_code = \".$ilDB->quote($a_code, \"text\")\n\t\t\t);\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function validaemisor($emisor){\n\tif($emisor!=\"SME100125GR4\"){return -3;}else{return 0;}\n}",
"function acucPassToCode( $arrayPasscode )\r\n{\r\n\tglobal $acucUsableChars;\r\n\t\r\n\t$arrayReturnPasscode = $arrayPasscode;\r\n\t\r\n\tif( count($arrayPasscode) < 28 )\r\n\t\treturn false;\r\n\t\r\n\tfor( $idx = 0; $idx < 28; $idx++ )\r\n\t{\r\n\t\t$arrayReturnPasscode[$idx] = array_search( $arrayPasscode[$idx], $acucUsableChars);\r\n\t\tif( $arrayReturnPasscode[$idx] === false )\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn $arrayReturnPasscode;\r\n}",
"public function testInvalidBBcode()\n\t{\n\t\t$parsers = ParserWrapper::instance();\n\t\tforeach ($this->bbcInvalidTestCases as $testcase)\n\t\t{\n\t\t\t$name = 'Broken ' . $testcase[0];\n\t\t\t$test = $testcase[1];\n\n\t\t\t$result = $parsers->parseMessage($test, true);\n\n\t\t\t$this->assertEquals($test, $result, $name);\n\t\t}\n\t}",
"function clean_sortcodes($val)\n{\n switch ($val) {\n case substr_count($val,'RS') > 1: //revised statutes; duplicate rs line\n $sortcode = substr($val,10); \n return $sortcode;\n break;\n case substr_count($val,'CE') > 1: //code of evidence; duplicate \"CE\"\n $sortcode = substr($val,3); \n return $sortcode;\n break;\n case strstr($val,'CC 000200'): //civil code; mysterious \"000200\" \n $sortcode = str_replace('CC 000200','CC',$val); \n return $sortcode;\n break;\n case substr_count($val,'CHC') > 1: //children's code; duplicate \"CHC\"\n $sortcode = substr($val,4); \n return $sortcode;\n break;\n case substr_count($val,'CCP') > 1: //code of civil proc.; duplicate \"CCP\"\n $sortcode = substr($val,4); \n return $sortcode;\n break;\n case substr_count($val,'CCRP') > 1: //code of criminal proc; duplicate \"CCRP\"\n $sortcode = substr($val,5); \n return $sortcode;\n break;\n case substr_count($val,'CONST') > 1: //constitution; duplicate \"CONST\"\n $sortcode = substr($val,13); \n return $sortcode;\n break;\n case substr_count($val,'LAC') > 1: //admin code;duplicate \"LAC\"\n $sortcode = substr($val,11); \n return $sortcode;\n break;\n case substr_count($val,'CA') > 1: //constit. amends; duplicate \"CA\" \n $sortcode = substr($val,3); \n return $sortcode;\n break;\n case substr_count($val,'ERC') > 1: //ERC?; duplicate \"ERC\" \n $sortcode = substr($val,4); \n return $sortcode;\n break;\n case substr_count($val,'CJP') > 1: //duplicate \"CJP\" \n $sortcode = substr($val,4); \n return $sortcode;\n break;\n default:\n return $val;\n break;\n }\n}",
"public function checkPinterestCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Pinterest is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }",
"public function validationSha($code){\r\n\t\t//variables\r\n\t\t$error = '';\r\n\t\t$user_browser = $_SERVER['HTTP_USER_AGENT']; //navegador\r\n\t\t$ip = $_SERVER['REMOTE_ADDR']; //ip\r\n\t\r\n\t\t$this->where('macro_sha', $code);\r\n\t\tif($salida = $this->getOne('solicitudes_clave')){\r\n\t\t\t\r\n\t\t\tif($salida['navegador'] != $user_browser){\t$error = 'navegador no concide';\t}\r\n\t\t\tif($salida['ip'] != $ip){\t\t\t\t\t$error = 'remote ip no concide';\t}\r\n\t\t\t\r\n\t\t\tif($error != ''){\r\n\t\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t$nuevo_sha = hash('sha512', $salida['email'].$user_browser.$salida['telefono'].$ip);\r\n\t\t\t\tif($nuevo_sha != $salida['macro_sha']){\r\n\t\t\t\t\t$error = 'Shas no coinciden';\r\n\t\t\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//succes!!\r\n\t\t\t\t\t$_SESSION['email_val'] = $salida['email'];\r\n\t\t\t\t\t$_SESSION['corrector'] = $salida['salt'];\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$error = 'no hubo conexion a db';\r\n\t\t\t$this->rewrite_attempt($ip, $error);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function validateCode(CodeRequest $request)\n {\n $user = Client::where('code', $request->input('code'))->first();\n if ($user) {\n return response()->json(['success' => 'success']);\n } else {\n return response()->json(['success' => false, 'message' => trans('admin/message.bad_code')]);\n }\n }",
"public function checkCodeForDuplicate($code)\n {\n if($code != null)\n {\n $this->db->select('*', FALSE);\n $this->db->from('items');\n $query = $this->db->where('items.code', $code)->get();\n\n if($query->num_rows() > 0)\n {\n return $query->result()[0];\n }\n else {\n return null;\n }\n }\n }",
"function check_reffer_code() {\n\t\t$reffer_code = $_REQUEST['reffer_code'];\n\t\tif (!empty($reffer_code)) {\n\t\t\t$reffer_records = $this -> conn -> get_table_row_byidvalue('user', 'user_refferal_code', $reffer_code);\n\t\t\tif (!empty($reffer_records)) {\n\t\t\t\t$user_id = $reffer_records[0]['user_id'];\n\t\t\t\t$user_reffer_code = $reffer_records[0]['user_refferal_code'];\n\n\t\t\t\t//if($user_reffer_code==$reffer_code){\n\t\t\t\tif (strcmp($user_reffer_code, $reffer_code) == 0) {\n\t\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Reffer code avalible\", 'reffer_code' => $reffer_code, 'user_id' => $user_id);\n\t\t\t\t} else {\n\t\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid reffer code\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'reffer_code' => $reffer_code);\n\t\t}\n\t\techo $this -> json($post);\n\t}",
"function createCode() {\n\t\t/* New code. */\n\t\t$code = \"\";\n\t\t$codeAlphabet = \"1234567890\";\n\n\t\t$count = strlen($codeAlphabet) - 1;\n\t\t\n\t\tfor($i=0;$i<5;$i++){\n\t\t\t$code .= $codeAlphabet[rand(0,$count)];\n\t\t}\n\t\t/* First check if it exists or not. */\n\t\t$commentCheck = $this->getCode($code);\n\t\t\n\t\tif($commentCheck) {\n\t\t\t/* It exists. check again. */\n\t\t\t$this->createCode();\n\t\t} else {\n\t\t\treturn $code;\n\t\t}\n\t}",
"private function invalidResetCode($user, $code)\r\n {\r\n return $user->reminders()->where('code', $code)->doesntExist();\r\n }",
"public function checkFavebookInsightsCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $code = $result[1];\r\n }\r\n }\r\n\r\n if (strpos($code, 'facebook.com/') !== false) {\r\n preg_match('/facebook.com\\/([^\\/]+)/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $json = SQ_Tools::sq_remote_get('http://graph.facebook.com/' . $result[1]);\r\n if ($json <> '') {\r\n if ($json = @json_decode($json)) {\r\n if (isset($json->id)) {\r\n $code = $json->id;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n $code = '';\r\n if (isset($result[1]) && !empty($result[1])) {\r\n $code = $result[1];\r\n }\r\n }\r\n\r\n if ($code == '') {\r\n SQ_Error::setError(__(\"The code for Facebook is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n }\r\n return $code;\r\n }",
"function VerifyDiscountCode($DiscountCode, $i, $Errors) {\n\t\tif (mb_strlen($DiscountCode)>2) {\n\t\t\t$Errors[$i] = InvalidDiscountCode;\n\t\t}\n\t\treturn $Errors;\n\t}",
"public function testGetLanguageByInvalidCode() {\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('getLanguageByCode')\n ->will($this->returnValue(NULL));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->getLanguageByCode('language_code');\n $this->assertNull($result);\n }",
"public function getCode() {}",
"function at_affilinet_validate_ean($barcode){\n if (!preg_match(\"/^[0-9]{13}$/\", $barcode)) {\n return false;\n }\n\n $digits = $barcode;\n\n // 1. Add the values of the digits in the\n // even-numbered positions: 2, 4, 6, etc.\n $even_sum = $digits[1] + $digits[3] + $digits[5] +\n $digits[7] + $digits[9] + $digits[11];\n\n // 2. Multiply this result by 3.\n $even_sum_three = $even_sum * 3;\n\n // 3. Add the values of the digits in the\n // odd-numbered positions: 1, 3, 5, etc.\n $odd_sum = $digits[0] + $digits[2] + $digits[4] +\n $digits[6] + $digits[8] + $digits[10];\n\n // 4. Sum the results of steps 2 and 3.\n $total_sum = $even_sum_three + $odd_sum;\n\n // 5. The check character is the smallest number which,\n // when added to the result in step 4, produces a multiple of 10.\n $next_ten = (ceil($total_sum / 10)) * 10;\n $check_digit = $next_ten - $total_sum;\n\n // if the check digit and the last digit of the\n // barcode are OK return true;\n if ($check_digit == $digits[12]) {\n return true;\n }\n\n return false;\n }",
"private function checkCode(Int $code) {\n if ($code === 200) :\n return true;\n endif;\n\n return false;\n }",
"private function codeInjectionCheck(){\n foreach($this->blackListCommands['python'] as $command){\n $this->code = str_replace( $command, '', $this->code);\n if ($this->debugLevel > 3){\n echo \"-------------------------\\n\";\n echo \"CODE: \" . $this->code;\n echo \"-------------------------\\n\";\n }\n }\n }",
"private function getCodeMsg($code)\n\t{\n\t\t$codeMsg = [\n\t\t\t/* 100+ */\n\t\t\t100 => 'Continue', 101 => 'Switching Protocols',\n\n\t\t\t/* 200+ */\n\t\t\t200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information',\n\t\t\t204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content',\n\n\t\t\t/* 300+ */\n\t\t\t300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n\t\t\t304 => 'Not Modified', 305 => 'Use Proxy', 306 => '(Unused)', 307 => 'Temporary Redirect',\n\n\t\t\t/* 400+ */\n\t\t\t400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden',\n\t\t\t404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable',\n\t\t\t407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone',\n\t\t\t411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large',\n\t\t\t414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable',\n\t\t\t417 => 'Expectation Failed',\n\n\t\t\t/* 500+ */\n\t\t\t500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway',\n\t\t\t503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported'\n\t\t];\n\n\t\treturn $codeMsg[$code];\n\t}",
"function getErrorMessages($codes) {\n //Tableau associant codes et messages\n $references = [\n \"0\" => \"Il faut remplir le formulaire\",\n \"1\" => \"Certains champs sont vides\",\n \"2\" => \"Le nom utilisateur est trop court\",\n \"3\" => \"Le mot de passe ne correspond pas à sa confirmation\",\n \"4\" => \"Le mot de passe ne respecte pas les conditions indiquées\",\n \"5\" => \"Ce nom d'utilisateur est déjà pris\"\n ];\n //Démarrage standard du message\n $message = \"Nous avons trouvé les erreurs suivantes : \";\n //Sécurisation de l'argument\n $codes = htmlspecialchars($codes);\n //On boucle sur la string et on ajoute à $message les message associés au code erreur\n for ($i=0; $i < strlen($codes) ; $i++) {\n $message .= \"<p>\" . $references[$codes[$i]] . \"</p>\";\n }\n //On renvoi le message fini\n return $message;\n}",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function errorcode();",
"private static function validateUserSuppliedExceptionCode($code){\r\n\r\n\t\t\t\t$code\t=\t(int)$code;\r\n\r\n\t\t\t\tif($code<0){\r\n\r\n\t\t\t\t\tthrow new \\InvalidArgumentException(\"Exception code must be greater than 0\");\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }",
"public function getReasonCode();",
"function validate2(){\n\t\tif(strlen($this->code) != $this->BARCODE_LENGTH)\n\t\t{\n\t\t\t//echo 'Strlen('.strlen($this->code).')';\n\t\t\t$this->error = 'Barcode <strong>'.$this->code.'</strong> must be of length: '.$this->BARCODE_LENGTH;\n\t\t\treturn false;\n\t\t}\n\t\t$pos = strpos($this->code, $this->PREFIX);\n\t\t\n\t\tif ($pos === false) {\n\t\t $this->error = 'The prefix <strong>'.$this->PREFIX.'</strong> was not found in the barcode <strong>'.$this->code.'</strong>';\n\t\t return false;\n\t\t} \n\t\t\n\t\tif ($pos !== 0) {\n\t\t $this->error = 'The prefix of <strong>'.$this->code.'</strong> is not valid';\n\t\t return false;\n\t\t}\n\t\treturn true;\n\t}",
"public function checkVerificationCode() {\n $request_params = Request::all();\n $validation = Validator::make($request_params, $this->getRulesUtils()->check_verification_code, $this->getRulesUtils()->selectLanguageForMessages('check_verification_code', $request_params['lang']));\n if ($validation->fails()) {\n return $this->getCommonUtils()->jsonErrorResponse($validation->errors()->first());\n }\n $verficationCode = $this->getVerificationModel()->getConfirmationCode($request_params);\n if (empty($verficationCode)) {\n return $this->getCommonUtils()->jsonErrorResponse($this->getMessageUtils()->getMessageData('error', $request_params['lang'])['verification_code_invalid']);\n }\n return $this->validationProcess($request_params, $verficationCode);\n }",
"public function validateCode($users_pro_id, $code) {\n $codeExists = $this->db->where(array(\n $this->table.'.code' => $code,\n PREFIXDB.'deals.users_pro_id' => $users_pro_id\n ))\n ->join(PREFIXDB.'deals', PREFIXDB.'deals.id = '.$this->table.'.deals_id')\n ->get($this->table)\n ->row();\n \n if($codeExists) {\n $this->db->where(array(\n 'orders_id' => $codeExists->orders_id,\n 'deals_id' => $codeExists->deals_id\n ))->update($this->table, array(\n 'validated' => 1\n ));\n return true;\n } else {\n return false;\n }\n }",
"function v1_check_dupli_sd_evn($name, $key, $code, $sn_id, $sd_evn_tech, $owners, &$error) {\n\t\n\tglobal $checked_data;\n\t\n\t// If such code was found before\n\tif (isset($checked_data[$key][$code])) {\n\t\t// Compare data\n\t\tforeach ($checked_data[$key][$code] as $cmp_data) {\n\t\t\t// Check sn_id\n\t\t\tif ($cmp_data['sn_id']!=$sn_id) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Check location technique\n\t\t\tif ($cmp_data['sd_evn_tech']!=$sd_evn_tech) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Check owners\n\t\t\tforeach ($owners as $owner) {\n\t\t\t\tforeach ($cmp_data['owners'] as $cmp_owner) {\n\t\t\t\t\tif ($owner['id']==$cmp_owner['id']) {\n\t\t\t\t\t\t// Duplication found\n\t\t\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner=\\\"\".$owner['code'].\"\\\"> is duplicated\";\n\t\t\t\t\t\treturn FALSE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}",
"function isPostcodeValid($postcode)\n{\n //remove all whitespace\n $postcode = preg_replace('/\\s/', '', $postcode);\n \n //make uppercase\n $postcode = strtoupper($postcode);\n \n if(preg_match(\"/^[A-Z]{1,2}[0-9]{2,3}[A-Z]{2}$/\",$postcode)\n || preg_match(\"/^[A-Z]{1,2}[0-9]{1}[A-Z]{1}[0-9]{1}[A-Z]{2}$/\",$postcode)\n || preg_match(\"/^GIR0[A-Z]{2}$/\",$postcode))\n {\n return true;\n }\n else {\n return false;\n }\n}",
"function damm32Check($code) {\r\n\tglobal $base32;\r\n\treturn (damm32Encode($code) == $base32[0]) ? 1 : 0;\r\n\t}",
"public function checkgiftcardcode() {\n global $loguser;\n $curr_email = $loguser['email'];\n $code = $_GET['gfcode_value'];\n $getgfcardval = TableRegistry::get('Giftcards')->find()->where(['giftcard_key' => $code])->first();\n if (!empty($getgfcardval)) {\n $recEmail = $getgfcardval->reciptent_email;\n $gfcardId = $getgfcardval->id;\n $gfcardAmt = $getgfcardval->avail_amount;\n if ($gfcardAmt <= 0) {\n echo \"2\";\n die;\n } else if ($recEmail == $curr_email) {\n echo '1' . '*|*' . $gfcardId;\n die;\n } else {\n echo '0';\n die;\n }\n } else {\n echo '0';\n die;\n }\n }",
"function http_get_response_code_error($code)\n\t{\n\t\t$errors = array(\n\t\t200 => 'Success - The request was successful',\n\t\t201 => 'Created (Success) - The request was successful. The requested object/resource was created.',\n\t\t400 => 'Invalid Request - There are many possible causes for this error, but most commonly there is a problem with the structure or content of XML your application provided. Carefully review your XML. One simple test approach is to perform a GET on a URI and use the GET response as an input to a PUT for the same resource. With minor modifications, the input can be used for a POST as well.',\n\t\t401 => 'Unauthorized - This is an authentication problem. Primary reason is that the API call has either not provided a valid API Key, Account Owner Name and Associated Password or the API call attempted to access a resource (URI) which does not match the same as the Account Owner provided in the login credientials.',\n\t\t404 => 'URL Not Found - The URI which was provided was incorrect. Compare the URI you provided with the documented URIs. Start here.',\n\t\t409 => 'Conflict - There is a problem with the action you are trying to perform. Commonly, you are trying to \"Create\" (POST) a resource which already exists such as a Contact List or Email Address that already exists. In general, if a resource already exists, an application can \"Update\" the resource with a \"PUT\" request for that resource.',\n\t\t415 => 'Unsupported Media Type - The Media Type (Content Type) of the data you are sending does not match the expected Content Type for the specific action you are performing on the specific Resource you are acting on. Often this is due to an error in the content-type you define for your HTTP invocation (GET, PUT, POST). You will also get this error message if you are invoking a method (PUT, POST, DELETE) which is not supported for the Resource (URI) you are referencing.\n\t\tTo understand which methods are supported for each resource, and which content-type is expected, see the documentation for that Resource.',\n\t\t500 => 'Server Error',\n\t\t);\n\n\t\tif(array_key_exists($code, $errors)):\n\t\t\treturn $errors[$code];\n\t\tendif;\n\n\t\treturn '';\n\t}",
"public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }",
"public function checkCode(User $user, $code);",
"protected function validateShortUrl($code) \n\t{\n return preg_match(\"|[\" . self::$chars . \"]+|\", $code);\n }",
"private function codeToChar($code) {\n if ($code < 10) {\n return (string) $code;\n } else if ($code === self::PADDING) {\n return '';\n }\n\n $key = array_search($code, self::$codes);\n if ($key === false) {\n throw new Exception('Unknown code \"' . htmlspecialchars($code) . '\"');\n }\n return $key;\n }",
"function code_getcodeID($bdd, $code_text)\n\t{\n\t\techo_debug(\"CODE getcodeID | Start<br>\");\n\t\ttry\n\t\t{ \n\t\t\t$response = $bdd->prepare('SELECT id FROM code where text =:tt');\n\t\t\t$response->execute(array(\n\t\t\t\t'tt' => $code_text\n\t\t\t));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tdie('Error : '.$e->getMessage());\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$nb_rows = $response->rowCount();\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$nb_rows = 0;\n\t\t}\n\t\t\n\t\t$codeID=0;\n\t\tif($nb_rows > 0)\n\t\t{\t\n\t\t\tif($nb_rows > 0)\n\t\t\t{\n\t\t\t\twhile ($data = $response->fetch())\n\t\t\t\t{\n\t\t\t\t\t$codeID = $data['id'];\n\t\t\t\t}\n\t\t\t}\n\t\t\techo_debug(\"CODE getcodeID | End with CodeId=\".$codeID.\"<br>\");\n\t\t\treturn $codeID;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo_debug(\"CODE getcodeID | End - No Code found<br>\");\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function getCode(): int;",
"public function codeIsValid(string $code): bool\n {\n return $this->constantValueExists($code);\n }",
"function error($code) {\n\tswitch ($code) {\n\t\tcase 'EntityExists':\n\t\t\t$str = 'Cannot complete that action because the entity already exists';\n\t\t\tbreak;\n\t\tcase 'EntityDoesNotExist':\n\t\t\t$str = 'Cannot complete that action because that entity does not exist';\n\t\t\tbreak;\n\t\tcase 'InvalidPassword':\n\t\t\t$str = 'The password supplied is not valid';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$str = $code;\n\t}\n\treturn $str;\n}",
"function isBadPhone( string $field )\r\n {\r\n \r\n return ( array_search( $field, BAD_PHONES ) !== false || !preg_match( ALLOWED_CODES, $field ) ); \r\n }",
"public function getExceptionByCode($code)\n {\n $code = (int) $code;\n $exceptions = [];\n foreach ($this->_exceptions as $e) {\n if ($code == $e->getCode()) {\n $exceptions[] = $e;\n }\n }\n\n if (empty($exceptions)) {\n $exceptions = false;\n }\n\n return $exceptions;\n }"
] | [
"0.6232527",
"0.6053732",
"0.5995396",
"0.5882779",
"0.5839085",
"0.579839",
"0.5793934",
"0.5730614",
"0.5689528",
"0.56472814",
"0.563137",
"0.56308454",
"0.5601879",
"0.5598712",
"0.5573343",
"0.5567668",
"0.55655617",
"0.5560928",
"0.5535387",
"0.5523847",
"0.55072284",
"0.5506954",
"0.5499899",
"0.5484571",
"0.54733974",
"0.5469513",
"0.54659015",
"0.5457938",
"0.5445017",
"0.5440071",
"0.5434312",
"0.54278326",
"0.5426437",
"0.54156035",
"0.54141647",
"0.54071254",
"0.5388397",
"0.5365914",
"0.53616834",
"0.5359008",
"0.53533316",
"0.5350226",
"0.53420687",
"0.5339231",
"0.5334171",
"0.5333753",
"0.5331571",
"0.5331571",
"0.532829",
"0.5323365",
"0.5309559",
"0.53077114",
"0.529501",
"0.5293492",
"0.5282537",
"0.52791744",
"0.5257753",
"0.5252312",
"0.52444285",
"0.523725",
"0.5230466",
"0.522591",
"0.520889",
"0.52035093",
"0.52020556",
"0.51964104",
"0.5196035",
"0.51897717",
"0.5187477",
"0.51829356",
"0.5179271",
"0.51736504",
"0.51653236",
"0.51653236",
"0.51653236",
"0.51653236",
"0.51653236",
"0.51653236",
"0.5147784",
"0.5145323",
"0.5144805",
"0.5142236",
"0.51374733",
"0.513644",
"0.51363283",
"0.5131923",
"0.512589",
"0.5124785",
"0.51241964",
"0.51156163",
"0.5112201",
"0.51078284",
"0.51033455",
"0.5101486",
"0.5096716",
"0.5089134",
"0.50879157",
"0.5085329",
"0.50670624",
"0.5063281"
] | 0.54990184 | 23 |
Array of urls and http codes | function check_url($url) {
$http_codes = array();
$urls = array();
while (TRUE) {
// Initialise curl and get the header
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$content = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
// Add urls and http codes to the arrays
array_push($urls, $url);
array_push($http_codes, $http_code);
if ( is_redirect_http_code($http_code) ) {
// Check for redirects, if found, follow the redirected URL
if ( preg_match('/(?<=Location: )[^ \s]*/i', $content, $matches) ) {
$url = $matches[0];
continue;
}
}
// We can't do anything else
break;
}
// Contains all the http_codes and urls encountered
$ret['http_codes'] = $http_codes;
$ret['urls'] = $urls;
// For easy access, contains the last http_code and url encountered
$ret['http_code'] = $http_code;
$ret['url'] = $url;
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUrls(): array;",
"public function getUrls(): array;",
"function urls($data)\r\n{\r\n $result = array();\r\n if (is_array($data)) {\r\n if (isset($data['href']))\r\n $result[] = $data['href']; else\r\n foreach ($data as $d)\r\n if (is_array($d))\r\n $result[] = $d['href']; else\r\n $result[] = $d;\r\n } else $result[] = $data;\r\n\r\n // Make URLs full\r\n $result2 = array();\r\n global $last_url, $last_base;\r\n $last_domain = substr($last_url, 0, strpos($last_url, '/', 10));\r\n if ($p = strpos($last_url,'?'))\r\n $last_php = substr($last_url,0,$p);\r\n else $last_php = $last_url;\r\n\r\n foreach ($result as $url) {\r\n $url = trim($url);\r\n if (!$url)\r\n continue;\r\n $url = str_replace('./','',$url);\r\n if (substr($url,0,2)=='//') $url = 'http:'.$url;\r\n if (strpos($url, '://') === false)\r\n if ($url[0] == '/')\r\n $url = $last_domain . $url;\r\n elseif ($url[0] == '?') $url = $last_php . $url;\r\n else $url = $last_base . $url;\r\n // Check for right donor\r\n //if (strpos(domain($url),$GLOBALS['instruction']['host'])===false) continue;\r\n $result2[] = $url;\r\n }\r\n $r = $result2;\r\n\r\n if (DEV)\r\n xlogc('urls', $r, $data);\r\n\r\n return $r;\r\n}",
"public function getWebsiteCodes()\n {\n return $this->websiteCodes;\n }",
"public function httpCodes($code = null) {\n\t\tif (empty($code)) {\n\t\t\treturn $this->_statusCodes;\n\t\t}\n\t\tif (is_array($code)) {\n\t\t\t$codes = array_keys($code);\n\t\t\t$min = min($codes);\n\t\t\tif (!is_int($min) || $min < 100 || max($codes) > 999) {\n\t\t\t\tthrow new CakeException(__d('cake_dev', 'Invalid status code'));\n\t\t\t}\n\t\t\t$this->_statusCodes = $code + $this->_statusCodes;\n\t\t\treturn true;\n\t\t}\n\t\tif (!isset($this->_statusCodes[$code])) {\n\t\t\treturn null;\n\t\t}\n\t\treturn array($code => $this->_statusCodes[$code]);\n\t}",
"static public function getCodes(){\n return array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Moved Temporarily',\n 307 => 'Temporary Redirect',\n 310 => 'Too many Redirects',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Time-out',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested range unsatisfiable',\n 417 => 'Expectation failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Time-out',\n 508 => 'Loop detected',\n );\n }",
"private function codes()\n {\n $a_http_status_codes = array(\n 100 => 'Continue', 102 => 'Processing',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content',\n 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported',\n 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other',\n 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found',\n 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout',\n 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 421 => 'Misdirected Request',\n 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 426 => 'Upgrade Required',\n 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large',\n 451 => 'Unavailable For Legal Reasons', 500 => 'Internal Server Error', 501 => 'Not Implemented',\n 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates', 507 => 'Insufficient Storage', 508 => 'Loop Detected',\n 510 => 'Not Extended', 511 => 'Network Authentication Required'\n );\n return $a_http_status_codes;\n }",
"function getHttpCode();",
"public function getUrls()\r\n {\r\n }",
"function is_redirect_http_codes($http_codes) {\r\n foreach ($http_codes as $http_code) {\r\n if ( is_redirect_http_code($http_code) ) {\r\n return TRUE;\r\n }\r\n }\r\n}",
"public function httpStatusDataProvider()\n {\n return [\n [\"badGateway\", 502, \"Bad gateway\"],\n [\"badRequest\", 400, \"Bad request\"],\n [\"conflict\", 409, \"Conflict\"],\n [\"expectationFailed\", 417, \"Expectation failed\"],\n [\"forbidden\", 403, \"Forbidden\"],\n [\"gatewayTimeout\", 504, \"Gateway timeout\"],\n [\"gone\", 410, \"Gone\"],\n [\"httpVersionNotSupported\", 505, \"Http version not supported\"],\n [\"internalServerError\", 500, \"Internal server error\"],\n [\"lengthRequired\", 411, \"Length required\"],\n [\"methodNotAllowed\", 405, \"Method not allowed\"],\n [\"notAcceptable\", 406, \"Not acceptable\"],\n [\"notFound\", 404, \"Not found\"]\n // TODO: Add the remaining status codes.\n ];\n }",
"function getList($urls){\n\t\t$urls = preg_split(\"[\\r\\n]\",$urls);\n\t\t$output = array();\n\t\t$counter = 0;\n\t\tforeach($urls as $url){\n\t\t\t$url = trim($url);\n\t\t\tif($url){\n\t\t\t\t$counter++;\n\t\t\t\t$output[$this->fixurl($url)] = $this->getPRInfo($url);\n\t\t\t}\n\t\t\tif($counter >= 10) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}",
"function get_internal_links($array){\r\n $result = array();\r\n $count = count($array);\r\n for($i=0;$i<$count;$i++){\r\n if(!empty($array[$i])){ \r\n if(strpos($array[$i],\"www\",0) === false){\r\n if(strpos($array[$i],\"http\",0) === false){ \r\n array_push($result,$array[$i]);\r\n }\r\n }\r\n }\r\n }\r\n return $result;\r\n}",
"public function getAll(): array\n {\n\n\t$url = new Url();\n\n return array_merge(\n apache_request_headers(),\n apache_response_headers(),\n get_headers($url->hostWithSchema($url->getHostIp()), 1)\n );\n\n }",
"protected function getHttpResponseCodes() {\n return array (\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 102 => 'Processing',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 207 => 'Multi-Status',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => 'Switch Proxy',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 418 => 'I\\'m a teapot',\n 422 => 'Unprocessable Entity',\n 423 => 'Locked',\n 424 => 'Failed Dependency',\n 425 => 'Unordered Collection',\n 426 => 'Upgrade Required',\n 449 => 'Retry With',\n 450 => 'Blocked by Windows Parental Controls',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported',\n 506 => 'Variant Also Negotiates',\n 507 => 'Insufficient Storage',\n 509 => 'Bandwidth Limit Exceeded',\n 510 => 'Not Extended'\n );\n }",
"public function getUrls() {\n return $this->urls;\n }",
"public function getRedirects();",
"public function getPageUris();",
"public function badUrlProvider() {\n\n $badRedirects[\"ip: 127.0.0.1\"] = array(\"http://127.0.0.1\", false);\n\n // Anything that resolves to zero needs to be tested carefully due to falsiness\n $badRedirects[\"ip: 0\"] = array(\"http://0/data.json\", false);\n\n // Hex is bad\n $badRedirects[\"ip: hex\"] = array(\"http://0x7f000001/data.json\", false);\n\n // So is octal\n $badRedirects[\"ip: octal\"] = array(\"http://0123/data.json\", false);\n\n // We don't like mixed hex and octal either\n $badRedirects[\"ip: mixed hex/octal/decimal\"] = array(\"http://0x7f.0x0.0.0/data.json\", false);\n\n // We don't even like dotted-quads\n $badRedirects[\"ip: dotted-quad\"] = array(\"http://111.22.34.56/data.json\", false);\n\n // Don't you come around here with any of that IPv6 crap\n $badRedirects[\"ipv6: localhost\"] = array(\"http://[::1]\", false);\n\n // Domains that resolve to IPv4 localhost? NFW.\n $badRedirects[\"localhost.ip4\"] = array(\"https://localhost.ip4/\", [['type' => 'A', 'ip' => '127.0.0.1']]);\n\n // Domains that resolve to IPv6 localhost? Get out!\n $badRedirects[\"localhost.ip6\"] = array(\"https://localhost.ip6:443\", [['type' => 'AAAA', 'ipv6' => '::1']]);\n\n // Domains that resolve to IPv6 addresses that represent IPv4 private ranges? Not on our watch!\n $badRedirects[\"localhost2.ip6\"] = array(\"http://localhost2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.1']]);\n $badRedirects[\"private1.ip6\"] = array(\"https://private1.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:192.168.1.18']]);\n $badRedirects[\"private2.ip6\"] = array(\"https://private2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:10.0.0.1']]);\n $badRedirects[\"private3.ip6\"] = array(\"http://private3.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.2']]);\n\n // Domains that resolve to IPv6 link-local adddresses? Hell no!\n $badRedirects[\"linklocal.ip6\"] = array(\"https://linklocal.ip6/\", [['type' => 'AAAA', 'ipv6' => 'fe80::']]);\n\n return $badRedirects;\n }",
"public function requests() {\n return array(\n // Format:\n // array('expected', 'YOURLS_SITE', '/request_uri'),\n\n // 1. short URL without www\n array('blah', 'http://sho.rt', '/blah'),\n array('bleh', 'https://sho.rt', '/bleh'),\n array('bloh', 'http://www.sho.rt', '/bloh'),\n array('bluh', 'https://www.sho.rt', '/bluh'),\n\n // 2. short URL with www\n array('meeh', 'http://sho.rt', '/meeh'),\n array('maah', 'https://sho.rt', '/maah'),\n array('muuh', 'http://www.sho.rt', '/muuh'),\n array('mooh', 'https://www.sho.rt', '/mooh'),\n\n // 3. Same as 1, with YOURLS in subdir\n array('hehe', 'http://sho.rt/yourls', '/yourls/hehe'),\n array('haha', 'https://sho.rt/yourls', '/yourls/haha'),\n array('hoho', 'http://www.sho.rt/yourls', '/yourls/hoho'),\n array('huhu', 'https://www.sho.rt/yourls', '/yourls/huhu'),\n\n // 4. Same as 2, with YOURLS in subdir\n array('ozhy', 'http://sho.rt/yourls', '/yourls/ozhy'),\n array('yhzo', 'https://sho.rt/yourls', '/yourls/yhzo'),\n array('zohy', 'http://www.sho.rt/yourls', '/yourls/zohy'),\n array('zoyh', 'https://www.sho.rt/yourls', '/yourls/zoyh'),\n\n\n // All the same tests, with a trailing slash on YOURLS_SITE\n\n array('blah', 'http://sho.rt/', '/blah'),\n array('bleh', 'https://sho.rt/', '/bleh'),\n array('bloh', 'http://www.sho.rt/', '/bloh'),\n array('bluh', 'https://www.sho.rt/', '/bluh'),\n\n array('meeh', 'http://sho.rt/', '/meeh'),\n array('maah', 'https://sho.rt/', '/maah'),\n array('muuh', 'http://www.sho.rt/', '/muuh'),\n array('mooh', 'https://www.sho.rt/', '/mooh'),\n\n array('hehe', 'http://sho.rt/yourls/', '/yourls/hehe'),\n array('haha', 'https://sho.rt/yourls/', '/yourls/haha'),\n array('hoho', 'http://www.sho.rt/yourls/', '/yourls/hoho'),\n array('huhu', 'https://www.sho.rt/yourls/', '/yourls/huhu'),\n\n array('ozhy', 'http://sho.rt/yourls/', '/yourls/ozhy'),\n array('yhzo', 'https://sho.rt/yourls/', '/yourls/yhzo'),\n array('zohy', 'http://www.sho.rt/yourls/', '/yourls/zohy'),\n array('zoyh', 'https://www.sho.rt/yourls/', '/yourls/zoyh'),\n\n\n // For people having fun with MixEd case UrLs\n array('MiXeD', 'http://SHO.rt/', '/MiXeD'),\n array('CaSe', 'http://SHO.rt/Yourls/', '/Yourls/CaSe'),\n\n\n // Internal pages, sort of\n // Note that in a real case use, this won't happen since the client request won't trigger the .htaccess rewrite rules\n array('admin/index.php', 'https://www.sho.rt', '/admin/index.php'),\n array('admin/tools.php', 'http://www.sho.rt/yourls', '/yourls/admin/tools.php'),\n array('admin/plugins.php', 'https://sho.rt/yourls/', '/yourls/admin/plugins.php'),\n\n\n // Unexpected URI (out of YOURLS base) should return itself\n // Note that in a real case use, this won't happen since the client request won't trigger the .htaccess rewrite rules\n array('something.else/blah', 'http://sho.rt', '/something.else/blah'),\n array('something.else/blah', 'https://www.sho.rt', '/something.else/blah'),\n array('/oops', 'https://www.sho.rt/yourls', '/oops'),\n\n\n // Query strings which should be ignored\n array('behemoth', 'http://sho.rt', '/behemoth?sho.rt'),\n array('behemoth', 'http://sho.rt/behemoth', '/behemoth/behemoth?behemoth'),\n\n\n // \"Prefix and shorten\" scenarios (query strings which should be preserved)\n array('http://longurl', 'http://sho.rt', '/http://longurl'),\n array('http://longurl', 'https://sho.rt/yourls', '/yourls/http://longurl'),\n array('http://longurl?https://sho.rt/yourls', 'https://sho.rt/yourls', '/yourls/http://longurl?https://sho.rt/yourls'),\n array('http://sho.rt/somepage', 'http://sho.rt', '/http://sho.rt/somepage'),\n array('http://www.sho.rt/sub/dir/', 'http://www.sho.rt/sub/dir/', '/sub/dir///http://www.sho.rt/sub/dir/'),\n );\n }",
"public function list(){\n\n $urls = Urls::all();\n \n $capturas = array();\n foreach($urls as $key=>$val){\n $status = $this->status_url($val['url']);\n $conteudo = $this->content_url($val['url']);\n /* bem simples. salva os dados no banco */\n $capturas[] = array('conteudo' => $conteudo, 'status' => $status, 'url_id' => $val['id']);\n }\n\n $this->salvar($capturas);\n }",
"function getHttpResponseCode_using_getheaders($url, $followredirects = true){\n // NOTE: could potentially take up to 0-30 seconds , blocking further code execution (more or less depending on connection, target site, and local timeout settings))\n // if $followredirects == false: return the FIRST known httpcode (ignore redirects)\n // if $followredirects == true : return the LAST known httpcode (when redirected)\n if(! $url || ! is_string($url)){\n return false;\n }\n $headers = @get_headers($url);\n if($headers && is_array($headers)){\n if($followredirects){\n // we want the the last errorcode, reverse array so we start at the end:\n $headers = array_reverse($headers);\n }\n foreach($headers as $hline){\n // search for things like \"HTTP/1.1 200 OK\" , \"HTTP/1.0 200 OK\" , \"HTTP/1.1 301 PERMANENTLY MOVED\" , \"HTTP/1.1 400 Not Found\" , etc.\n // note that the exact syntax/version/output differs, so there is some string magic involved here\n if(preg_match('/^HTTP\\/\\S+\\s+([1-9][0-9][0-9])\\s+.*/', $hline, $matches) ){// \"HTTP/*** ### ***\"\n $code = $matches[1];\n return $code;\n }\n }\n // no HTTP/xxx found in headers:\n return false;\n }\n // no headers :\n return false;\n }",
"function sdppi_url($year)\n\t{\n\t\tfor ($i=1; $i < 13; $i++)\n\t\t{ \n\t\t\tif ($i < 10)\n\t\t\t{\n\t\t\t\t$url = 'http://sdppi.kominfo.go.id/downloads/43/RHU-'.$year.'0'.$i.'.htm';\n\t\t\t\t$headers = get_headers($url);\n\t\t\t\t$status = substr($headers[0], 9, 3);\n\n\t\t\t\t//Memastikan link yang dihasilkan dapat diakses\n\t\t\t\tif ($status == '200')\n\t\t\t\t\t$result[$i-1] = $url;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$url = 'http://sdppi.kominfo.go.id/downloads/43/RHU-'.$year.$i.'.htm';\n\t\t\t\t$headers = get_headers($url);\n\t\t\t\t$status = substr($headers[0], 9, 3);\n\n\t\t\t\tif ($status == '200')\n\t\t\t\t\t$result[$i-1] = $url;\n\t\t\t}\n\t\t}\n\n\t\treturn array_values($result);\n\t}",
"public function parseCode(string $code): array\n {\n $arrayImg = [];\n $regex = self::REGEX;\n preg_match_all($regex, $code, $arrayImg);\n $imageUrl = $arrayImg[1];\n\n return $imageUrl;\n }",
"public function getUriList();",
"function findPageUrls();",
"public function getStatusCodes(): array\n {\n $rep = $this->em->getRepository(StatusCodes::class)->findAll();\n $arr = [];\n foreach ($rep as $item)\n {\n $arr[] = ['code' => $item->getScode(), 'title' => $item->getTitle()];\n }\n return $arr;\n }",
"public function getUrls(string $html, string $parts='base.dir.file.ext.query') : array\n {\n if ($this->domainAcceptedCache->count() > $this->domainAcceptedCacheSize) {\n $this->domainAcceptedCache = $this->domainAcceptedCache\n ->slice(- $this->domainAcceptedCacheSize + $this->domainAcceptedCacheChunkSize);\n }\n return array_map(\n function ($url) {\n return (string) $url;\n },\n $this->filterExtensions(\n $this->filterDomains(\n $this->filterSchemes(\n $this->getAllUrls($html, $parts)\n )\n )\n )->toArray()\n );\n }",
"public static function get_img_links($url) {\n // reset error and warnings;\n self::$error_msg = array();\n self::$warning_msg = array();\n self::$curl = curl_init();\n\n // check url\n if (!self::_url_is_valid($url)) {\n self::$error_msg[] = \"Invalid or empty URL Received, please try again.\";\n return array();\n }\n\n // url is valid, continue parsing\n $content = self::_fetch_url_content($url);\n $domain = self::_get_domain($url);\n $dom = self::_get_parsed_dom($content);\n\n $sanitized_img_links = self::_get_sanitized_img_links($dom, $domain);\n curl_close(self::$curl);\n\n return $sanitized_img_links;\n }",
"public function providerRetriableCodes() {\n return array(\n array(Response::STATUS_CODE_429),\n array(Response::STATUS_CODE_503),\n array(Response::STATUS_CODE_504)\n );\n }",
"function mustsee_get_social_links() {\n\n\t$social_links = array();\n\t$social_links['youtube'] = mustsee_get_agent_info('youtube_url');\n\t$social_links['facebook'] = mustsee_get_agent_info('facebook_url');\n\t$social_links['twitter'] = mustsee_get_agent_info('twitter_url');\n\t$social_links['pinterest'] = mustsee_get_agent_info('pinterest_url');\n\t$social_links['linkedin'] = mustsee_get_agent_info('linkedin_url');\n\t$social_links['google_plus'] = mustsee_get_agent_info('googleplus_url');\n\t$social_links['email'] = mustsee_get_agent_info('email');\n\n\treturn $social_links;\n}",
"private function readUrls() {\n $urlList = array();\n if(file_exists('kiosks/urls.list')) {\n $handle = @fopen('kiosks/urls.list', \"r\");\n\n if ($handle) {\n while (($line = fgets($handle, 4096)) !== false) {\n if(trim($line) != '') {\n array_push($urlList,trim($line));\n }\n }\n if (!feof($handle)) {\n echo \"Erreur: fgets() a échoué\\n\";\n }\n fclose($handle);\n }\n }\n return $urlList;\n }",
"public function get_url_list() {\n\t\t$home_no_www = str_replace( '://www.', '://', get_option( 'home' ) );\n\t\t$home_yes_www = str_replace( '://', '://www.', $home_no_www );\n\n\t\t// Build the search links.\n\t\t$search = array(\n\t\t\tstr_replace( 'https://', 'http://', $home_yes_www ),\n\t\t\tstr_replace( 'https://', 'http://', $home_no_www ),\n\t\t\t\"src='http://\",\n\t\t\t'src=\"http://',\n\t\t);\n\n\t\treturn array(\n\t\t\t'search' => $search, // The search links.\n\t\t\t'replace' => str_replace( 'http://', 'https://', $search ), // The replace links.\n\t\t);\n\t}",
"public function getURLs()\n {\n $retVal = [];\n\n // Which fields/subfields should we check for URLs?\n $fieldsToCheck = [\n '856' => ['y', 'z'], // Standard URL\n '555' => ['a'] // Cumulative index/finding aids\n ];\n\n foreach ($fieldsToCheck as $field => $subfields) {\n $urls = $this->marcRecord->getFields($field);\n if ($urls) {\n foreach ($urls as $url) {\n // Is there an address in the current field?\n $address = $url->getSubfield('u');\n if ($address) {\n $address = $address->getData();\n\n // Is there a description? If not, just use the URL itself.\n foreach ($subfields as $current) {\n $desc = $url->getSubfield($current);\n if ($desc) {\n break;\n }\n }\n if ($desc) {\n $desc = $desc->getData();\n } else {\n $desc = $address;\n }\n\n $retVal[] = ['url' => $address, 'desc' => $desc];\n }\n }\n }\n }\n\n return $retVal;\n }",
"public function run() {\n\t\t$result = array();\n\t\t\n\t\t// This could take a while to run, so set no time limit\n\t\tset_time_limit(0);\n\t\t\n\t\t// This is used for ob_flush to work\n\t\tif(ob_get_length() === false && $this->showMessages) ob_start();\n\t\t\n\t\t$html = $this->fetchHTML($this->url);\n\n\t\tif(!$html) {\n\t\t\tif($this->showMessages) echo \"$this->url doesn't appear to exist.\\r\\n\";\n\t\t}\n\n\t\t$links = $this->extractLinks($html, $this->url);\n\t\t\n\t\t// HTML stored in memory is no longer required, discard it\n\t\tunset($html);\n\t\n\t\tif($this->showMessages) echo \"Getting HTML from {$this->url}\\r\\n\";\n\n\t\tif(empty($links)) {\n\t\t\tif($this->showMessages) {\n\t\t\t\techo \"$this->url doesn't appear to have any links.\\r\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// We only need unique links, so take any duplicates and discard them\n\t\t$links = array_values(array_unique($links));\n\t\t$linkCount = count($links);\n\t\t\n\t\tif($this->showMessages) echo \"Found {$linkCount} links on {$this->url}\\r\\n\";\n\n\t\tif($this->showMessages) {\n\t\t\tflush();\n\t\t\tob_flush();\n\t\t}\n\n\t\t// Each unique link needs to be checked to see what status code is returned\n\t\tfor($i = 0; isset($links[$i]) && !connection_aborted(); ++$i) {\n\t\t\t\t\n\t\t\t// First, we need to check the URL exists, before we can get the status\n\t\t\tif($this->urlExists(html_entity_decode($links[$i]))) {\n\t\t\t\t// Get the headers for the link\n\t\t\t\t$headers = $this->fetchHeaders(html_entity_decode($links[$i]));\n\t\n\t\t\t\t// Get the status code from the headers\n\t\t\t\t$status = $this->extractStatusCode($headers);\n\t\t\t\t\n\t\t\t\t// Build the results (link, code, status)\n\t\t\t\t$result[$i]['Link'] = $links[$i];\n\t\t\t\t$result[$i]['Code'] = $status[0];\n\t\t\t\t$result[$i]['Status'] = $status[1];\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// URL doesn't exist, result is a 404.\n\t\t\t\t$result[$i]['Link'] = $links[$i];\n\t\t\t\t$result[$i]['Code'] = '404';\n\t\t\t\t$result[$i]['Status'] = 'Page not found';\n\t\t\t}\n\n\t\t\tif($this->showMessages) {\n\t\t\t\tflush();\n\t\t\t\tob_flush();\n\t\t\t}\n\t\t}\n\n\t\tif($this->showMessages) {\n\t\t\tob_end_flush();\n\t\t}\n\n\t\treturn $result;\n\t}",
"function is_invalid_http_codes($http_codes) {\r\n foreach ($http_codes as $http_code) {\r\n if ( is_invalid_http_code($http_code) ) {\r\n return TRUE;\r\n }\r\n }\r\n}",
"function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n\t}",
"public function get_allowed_urls()\n {\n }",
"public static function urls($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_URL . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}",
"public static function provideUris(): array\n {\n return [\n 'default' => [\n 'http://domain.com',\n 'http://domain.com',\n ],\n\n 'without scheme' => [\n 'domain.com/path',\n 'domain.com/path',\n ],\n\n 'with port' => [\n 'domain.com:8080/path',\n 'domain.com:8080/path',\n ],\n\n 'with query' => [\n 'https://domain.com:8081/path?key=value',\n 'https://domain.com:8081/path?key=value',\n ],\n\n 'with fragment' => [\n 'https://domain.com:8081/path?key=value#some',\n 'https://domain.com:8081/path?key=value#some',\n ],\n\n 'with username' => [\n 'https://username@domain.com/ping',\n 'https://username@domain.com/ping',\n ],\n\n 'with password' => [\n 'https://user:pass@domain.com/ping',\n 'https://user:***@domain.com/ping',\n ],\n ];\n }",
"public static function health() {\n\t\t$https = strpos(network::getNetworkAccess('external'), 'https') !== false;\n\t\t$return[] = array(\n\t\t\t'test' => __('HTTPS', __FILE__),\n\t\t\t'result' => ($https) ? __('OK', __FILE__) : __('NOK', __FILE__),\n\t\t\t'advice' => ($https) ? '' : __('Votre Jeedom ne permet pas le fonctionnement de Telegram sans HTTPS', __FILE__),\n\t\t\t'state' => $https,\n\t\t);\n\t\treturn $return;\n\t}",
"public function validUrlProvider() : array\n {\n return Yaml::parseFile(__DIR__ . DIRECTORY_SEPARATOR . 'urls.yml')['valid'];\n }",
"public function extractAllUrls($baseUrl)\n\t{\n\t\t$allUrls = array();\n\t\t\n\t\tif ($this->isHtml() && preg_match_all('/' . str_replace('/', '\\/', $baseUrl) . '[^\"\\'#\\? ]+/i', $this->_response['body'], $matches))\n\t\t{\n\t\t\t$allUrls = array_unique($matches[0]);\n\t\t}\n\t\t\n\t\treturn $allUrls;\n\t}",
"public function getUrlAsArray(): array\n {\n return \\explode('/', $this->url);\n }",
"public static function getUrlInfo(string $url) : array\n {\n // Create cURL resource, get HTML document\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n $htmlPage = curl_exec($ch);\n\n // Parsing HTML document\n $htmlDocument = new DOMDocument();\n @$htmlDocument->loadHTML($htmlPage);\n $nodes = $htmlDocument->getElementsByTagName('title');\n\n // Get title\n $title = $nodes->item(0)->nodeValue ?? '';\n\n // Get status code\n $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE) ?? 0;\n\n return compact('title', 'statusCode');\n }",
"public function getPhotoUrls () {\n\t\t\n\t}",
"public function getFileUrls($filename)\n {\n if ($file = $this->findFile($filename)) {\n $parser = new Rails\\Assets\\Parser\\Base($file);\n $parser->parse(Rails\\Assets\\Parser\\Base::PARSE_TYPE_GET_PATHS);\n $urls = [];\n foreach ($parser->urlPaths() as $url) {\n $urls[] = $url . '?body=1';\n }\n return $urls;\n }\n return false;\n }",
"function get_http_response_code($url) {\n $headers = get_headers($url);\n return substr($headers[0], 9, 3);\n}",
"public function getStatus()\n {\n foreach($this->data as $domain => $rang)\n {\n //init work with curl\n $ch = curl_init($domain);\n\n //return answer in string unless showing in brows \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //for redirects\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n //take a headers in answer (status coming)\n curl_setopt($ch, CURLOPT_HEADER, false);\n\n //make request to curk\n curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $time = round(curl_getinfo($ch, CURLINFO_CONNECT_TIME), 2);\n\n curl_close($ch);\n\n //complited array with result\n $this->result[] = [\n 'domain' => $domain,\n 'rang' => $rang,\n 'http_code' => $http_code,\n 'time' => $time\n ];\n\n }\n\n return $this->result; \n }",
"function getUrls(){\n $urls = $this->all('schema:url');\n return $urls;\n }",
"public function getAllImagesUrls() {\n $matches = [];\n preg_match_all('@src=\"([^\"]+)\"@', $this->description, $matches);\n return $matches[1];\n }",
"public static function getColorSchemeByStatusCode(int $statusCode) : array\n {\n switch ($statusCode) {\n case 0:\n default:\n $colorScheme = [\n 'backgroundColor' => \"rgba(176,48,96,0.2)\",\n 'borderColor' => \"rgba(176,48,96,1)\",\n 'pointBackgroundColor' => \"rgba(176,48,96,1)\",\n 'pointBorderColor' => \"#fff\",\n 'pointHoverBackgroundColor' => \"#fff\",\n 'pointHoverBorderColor' => \"rgba(176,48,96,1)\",\n ];\n break;\n\n // 1XX codes\n case (preg_match('/1\\d\\d/', $statusCode) ? true : false):\n $colorScheme = [\n 'backgroundColor' => \"rgba(255,99,71,0.2)\",\n 'borderColor' => \"rgba(255,99,71,1)\",\n 'pointBackgroundColor' => \"rgba(255,99,71,1)\",\n 'pointBorderColor' => \"#fff\",\n 'pointHoverBackgroundColor' => \"#fff\",\n 'pointHoverBorderColor' => \"rgba(255,99,71,1)\",\n ];\n break;\n\n // 2XX codes\n case (preg_match('/2\\d\\d/', $statusCode) ? true : false):\n $colorScheme = [\n 'backgroundColor' => \"rgba(0,100,0,0.2)\",\n 'borderColor' => \"rgba(0,100,0,1)\",\n 'pointBackgroundColor' => \"rgba(0,100,0,1)\",\n 'pointBorderColor' => \"#fff\",\n 'pointHoverBackgroundColor' => \"#fff\",\n 'pointHoverBorderColor' => \"rgba(0,100,0,1)\",\n ];\n break;\n\n // 3XX codes\n case (preg_match('/3\\d\\d/', $statusCode) ? true : false):\n $colorScheme = [\n 'backgroundColor' => \"rgba(100,149,237,0.2)\",\n 'borderColor' => \"rgba(100,149,237,1)\",\n 'pointBackgroundColor' => \"rgba(100,149,237,1)\",\n 'pointBorderColor' => \"#fff\",\n 'pointHoverBackgroundColor' => \"#fff\",\n 'pointHoverBorderColor' => \"rgba(100,149,237,1)\",\n ];\n break;\n\n // 4XX codes\n case (preg_match('/4\\d\\d/', $statusCode) ? true : false):\n $colorScheme = [\n 'backgroundColor' => \"rgba(218,165,32,0.2)\",\n 'borderColor' => \"rgba(218,165,32,1)\",\n 'pointBackgroundColor' => \"rgba(218,165,32,1)\",\n 'pointBorderColor' => \"#fff\",\n 'pointHoverBackgroundColor' => \"#fff\",\n 'pointHoverBorderColor' => \"rgba(218,165,32,1)\",\n ];\n break;\n\n // 5XX codes\n case (preg_match('/5\\d\\d/', $statusCode) ? true : false):\n $colorScheme = [\n 'backgroundColor' => \"rgba(47,79,79,0.2)\",\n 'borderColor' => \"rgba(47,79,79,1)\",\n 'pointBackgroundColor' => \"rgba(47,79,79,1)\",\n 'pointBorderColor' => \"#fff\",\n 'pointHoverBackgroundColor' => \"#fff\",\n 'pointHoverBorderColor' => \"rgba(47,79,79,1)\",\n ];\n break;\n }\n\n return $colorScheme;\n }",
"function http_response_headers($ret_str) {\n\t$hdrs = array();\n $arr = explode(\"\\r\\n\\r\\n\", $ret_str);\n foreach ($arr as $each)\n\t\tif (substr($each, 0, 4) == 'HTTP')\n\t\t\t$hdrs[] = $each;\n return $hdrs;\n}",
"public function get_scan_urls() {\r\n\t\t// Calculate URLs to Check.\r\n\t\t$args = array(\r\n\t\t\t'orderby' => 'rand',\r\n\t\t\t'posts_per_page' => '1',\r\n\t\t\t'ignore_sticky_posts' => true,\r\n\t\t\t'post_status' => 'publish',\r\n\t\t);\r\n\r\n\t\t$urls = array();\r\n\r\n\t\t$urls[] = home_url();\r\n\r\n\t\t$post_types = get_post_types();\r\n\t\t$post_types = array_diff( $post_types, array( 'attachment', 'nav_menu_item', 'revision' ) );\r\n\r\n\t\tforeach ( $post_types as $post_type ) {\r\n\t\t\t$args['post_type'] = $post_type;\r\n\t\t\t$posts = get_posts( $args );\r\n\t\t\tif ( $posts ) {\r\n\t\t\t\t$urls[] = get_permalink( $posts[0] );\r\n\t\t\t}\r\n\r\n\t\t\t$archive_link = get_post_type_archive_link( $post_type );\r\n\t\t\tif ( $archive_link ) {\r\n\t\t\t\t$urls[] = $archive_link;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$post = get_post( get_option( 'page_for_posts' ) );\r\n\t\tif ( get_option( 'show_on_front' ) && $post ) {\r\n\t\t\t$urls[] = get_permalink( $post->ID );\r\n\t\t}\r\n\r\n\t\t$urls = array_unique( $urls );\r\n\r\n\t\t$urls_list = array();\r\n\t\t// Duplicate every URL 3 times. This will be enough to generate all the files for most of the sites.\r\n\t\tfor ( $i = 0; $i < 3; $i++ ) {\r\n\t\t\t$urls_list = array_merge( $urls_list, $urls );\r\n\t\t}\r\n\r\n\t\tsort( $urls_list );\r\n\t\treturn $urls_list;\r\n\t}",
"public function getCrlAccessUrls()\n {\n return $this->crl_access_urls;\n }",
"function parseURLMAP($url_maps){\n\t$url_maps = explode(\",\", $url_maps);\n\n\t$links = array();\n\n\tforeach($url_maps as $url_map){\n\t\t$link = array();\n\n\t\tif(preg_match(\"/\\bsig=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['sig'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\bs=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['s'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\bitag=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['itag'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\burl=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['url'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\bquality=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['quality'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(preg_match(\"/\\btype=([^&]+)/s\", $url_map, $match)){\n\t\t\t$link['type'] = urldecode($match[1]);\n\t\t}\n\n\t\tif(isset($link['url'])){\n\t\t\t$links[] = $link;\n\t\t}\n\t}\n\n\treturn $links;\n}",
"public function getUrlVariants($urls)\n {\n $output = array();\n\n foreach ($urls as $url) {\n $output[] = $url;\n\n // HTTPS Equiv\n if (strstr($url, \"http://\") && !in_array(str_replace(\"http://\", \"https://\", $url), $output)) {\n $output[] = str_replace(\"http://\", \"https://\", $url);\n }\n\n // HTTP Equiv\n if (strstr($url, \"https://\") && !in_array(str_replace(\"https://\", \"http://\", $url), $output)) {\n $output[] = str_replace(\"http://\", \"https://\", $url);\n }\n }\n\n $this->extend(\"onAfterGetUrlVariants\", $output);\n\n return $output;\n }",
"public function httpConnections()\n {\n if (function_exists('exec')) {\n $www_total_count = 0;\n $unique = [];\n $command = 'netstat -an '\n . '| egrep \\':80|:443\\' '\n . '| awk \\'{print $5}\\' '\n . '| grep -v \\':::\\*\\' '\n . '| grep -v \\'0.0.0.0\\'';\n @exec($command, $results);\n foreach ($results as $result) {\n $array = explode(':', $result);\n $www_total_count ++;\n if (preg_match('/^::/', $result)) {\n $ipaddr = $array[3];\n } else {\n $ipaddr = $array[0];\n }\n if (!in_array($ipaddr, $unique)) {\n $unique[] = $ipaddr;\n $www_unique_count ++;\n }\n }\n unset($results);\n $this->httpconnections = count($unique);\n return $this->httpconnections;\n }\n return 0;\n }",
"public function getArrayLinkUrls($data = null)\n {\n $array_data = explode(',', $data);\n $array_link_urls = [];\n foreach ($array_data as $val) {\n $array_link_urls[] = array(\n 'link_url' => $val\n );\n }\n \n return $array_link_urls;\n }",
"function spider($url)\n {\n global $http_urls;\n $url_array = array();\n\n //判断url是否有效,这个方法效率太低,不能用\n /*$array = get_headers($url,1); \n if(preg_match('/200/',$array[0])){ \n echo \"<pre/>\";\n print_r($array);\n }\n else\n {\n echo \"无效url资源!\";\n }*/\n $first_content = file_get_contents($url);\n $second_content = file_get_contents($url);\n \n $first_pattern = \"/^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/\";\n $second_pattern = \"/http:\\/\\/[a-zA-Z0-9\\.]+/\";\n \n preg_match_all($first_pattern, $first_content, $first_match);\n preg_match_all($second_pattern, $second_content, $second_match);\n \n $result1 = array_unique($first_match[0]);\n $result2 = array_unique($second_match[0]);\n \n $final_urls = array_merge($result1, $result2);\n \n //print_r($final_urls);\n \n for($n = 0; $n < count($final_urls); $n++)\n {\n //echo $final_urls[$i].\"<br/>\";\n if(@file_get_contents($final_urls[$n])) $http_urls[] = $final_urls[$n];\n //spider($final_urls[$i]);\n }\n //print_r($http_urls);\n //spider($final_urls[0]);\n //parser($url);\n }",
"function get_http_response_code()\n\t{\n\t\t//最后一个收到的HTTP代码\n\t\treturn curl_getinfo($this->ch, CURLINFO_HTTP_CODE);\n\t}",
"function process_urls($urls) {\n\tif (count($urls) > 0) {\n\t\techo '<p>Getting url:'.$urls[0].', '. count($urls) .' remaining</p>';\n\t\tget_url_info($urls[0], $urls);\n\t}\n}",
"function links() {\n return array(\n\n );\n }",
"public function invalidUrlProvider() : array\n {\n return Yaml::parseFile(__DIR__ . DIRECTORY_SEPARATOR . 'urls.yml')['invalid'];\n }",
"private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}",
"public function provideUrlTests() {\n $result = [\n [[\n 'descr' => \"[url=...] (with no protocol given) gets converted.\",\n 'bbcode' => \"This is a test of the [url=fleeb.html]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"fleeb.html\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=http:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=http:...] gets converted correctly in plain mode.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com\\\">emergency broadcasting system</a>.\",\n 'plainmode' => true,\n ]],\n [[\n 'descr' => \"Unquoted [url=http:...] with parameters gets converted.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com?q=broadcasting&y=foo&x=bar]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com?q=broadcasting&y=foo&x=bar\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=https:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=https://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"https://www.google.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=ftp:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=ftp://www.google.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"ftp://www.google.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=mailto:...] gets converted.\",\n 'bbcode' => \"This is a test of the [url=mailto:john@example.com]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"mailto:john@example.com\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n [[\n 'descr' => \"[url=javascript:...] is prohibited.\",\n 'bbcode' => \"This is a test of the [url=javascript:alert()]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the [url=javascript:alert()]emergency broadcasting system[/url].\",\n ]],\n [[\n 'descr' => \"[url=(unknown protocol):...] is prohibited.\",\n 'bbcode' => \"This is a test of the [url=flooble:blarble]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the [url=flooble:blarble]emergency broadcasting system[/url].\",\n ]],\n [[\n 'descr' => \"The [url]http://...[/url] form works correctly.\",\n 'bbcode' => \"The [url]http://www.google.com[/url] form works correctly.\",\n 'html' => \"The <a href=\\\"http://www.google.com\\\" class=\\\"bbcode_url\\\">http://www.google.com</a> form works correctly.\",\n ]],\n [[\n 'descr' => \"The [url]http://...[/url] form works correctly in plain mode.\",\n 'bbcode' => \"The [url]http://www.google.com[/url] form works correctly.\",\n 'html' => \"The <a href=\\\"http://www.google.com\\\">http://www.google.com</a> form works correctly.\",\n 'plainmode' => true,\n ]],\n [[\n 'descr' => \"The [url]malformed...url...[/url] form is fully unprocessed.\",\n 'bbcode' => \"The [url]a.imagehost.org/view/egdgdo[/url] form is fully unprocessed.\",\n 'html' => \"The <a href=\\\"a.imagehost.org/view/egdgdo\\\" class=\\\"bbcode_url\\\">a.imagehost.org/view/egdgdo</a> form is fully unprocessed.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...=...\\\"] contains an embedded equal sign (quotes work correctly).\",\n 'bbcode' => \"The [url=\\\"http://www.google.com/?foo=bar&baz=frob\\\" bar=foo]link[/url] works correctly.\",\n 'html' => \"The <a href=\\\"http://www.google.com/?foo=bar&baz=frob\\\" class=\\\"bbcode_url\\\">link</a> works correctly.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...=...\\\"] contains an embedded equal sign (test #2).\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\">Opinion</a> is funny.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...\\\" target=\\\"...\\\"] has its target ignored by default.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=_blank]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\">Opinion</a> is funny.\",\n ]],\n [[\n 'descr' => \"[url=\\\"...\\\" target=\\\"...\\\"] has its target used when URL targeting is enabled.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=_blank]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"_blank\\\">Opinion</a> is funny.\",\n 'urltarget' => true,\n ]],\n [[\n 'descr' => \"[url] has a target applied when forced URL targeting is enabled.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"somewhere\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n ]],\n [[\n 'descr' => \"[url target=\\\"...\\\"] has its target ignored when forced URL targeting is enabled.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=\\\"_blank\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"somewhere\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n ]],\n [[\n 'descr' => \"[url] has a target applied even with URL target overriding.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"somewhere\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n 'urltarget' => 'override',\n ]],\n [[\n 'descr' => \"[url target=\\\"...\\\"] has its target applied with URL target overriding.\",\n 'bbcode' => \"The [url=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" target=\\\"_blank\\\"]Opinion[/url] is funny.\",\n 'html' => \"The <a href=\\\"http://www.demourl.com/opinion.php?idopinion=234\\\" class=\\\"bbcode_url\\\" target=\\\"_blank\\\">Opinion</a> is funny.\",\n 'urlforcetarget' => \"somewhere\",\n 'urltarget' => 'override',\n ]],\n [[\n 'descr' => \"[url=(includes a smiley)] is not converted into a smiley.\",\n 'bbcode' => \"This is a test of the [url=http://www.google.com/foo:-P]emergency broadcasting system[/url].\",\n 'html' => \"This is a test of the <a href=\\\"http://www.google.com/foo:-P\\\" class=\\\"bbcode_url\\\">emergency broadcasting system</a>.\",\n ]],\n ];\n return $result;\n }",
"public function canonicalURLProvider()\n {\n return [[\"http://example.com\"], [\"https://example.com\"]];\n }",
"public function provideUrls()\n {\n return array(\n array('/'),\n array('/login'),\n array('/contact/1'),\n array('/contact/add'),\n array('/contact/1/edit'),\n array('/adresse/1/add'),\n array('/adresse/1/edit'),\n array('/validate/prefixe@suffixe.extension')\n );\n }",
"public function getResourceURIs()\n {\n $resources = array();\n\n $resources['logo'] = $this->getUrl('/resources/logo.png');//URI\n $resources['requestHandlerUrl'] = $this->getUrl('requestHandler.php');//URI //TODO: this should be an API URI (not sure if that will break something)\n $resources['self_apiUrl'] = self::$apiUrl;//URI\n\n return $resources;\n }",
"static public function getUrlArray()\n {\n \tstatic $url_array = NULL;\n \tif( is_null( $url_array ) ) {\n\t\t\t$url_array = explode( '/', ltrim( parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ), '/' ) );\n\t\t\tforeach( $url_array as &$url_part ) {\n\t\t\t\t$url_part = ( $url_part !== \"\" ) ? strtolower( $url_part ) : \"index\";\n\t\t\t}\n\t\t}\n\t\treturn $url_array;\n }",
"public function get_url(): array\n {\n // get the full url as an array\n $url['raw'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $url['array'] = explode(\"/\", $url['raw']);\n\n // shift the array to remove the first useless array key and remove blank values\n array_shift($url['array']);\n $url['array'] = array_filter($url['array']);\n\n // return the url array\n return $url['array'];\n }",
"public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }",
"public function getMalformedURISchemes()\n {\n return array(\"\",);\n }",
"public static function arrErrors()\n {\n $a[PHP_INT_MAX] = 'This is the end!';\n $a[] = 'Off the deep end';\n\n // Offsets in non-array variables\n $url = 'https://unlikelysource.com/';\n if ($url[-1] == '/') {\n $url = substr($url, 0, -1);\n }\n\n echo $url;\n }",
"public function getServerUrls() {\n $publicKey = md5(microtime());\n\n return array(\n array('http://imbo', $publicKey, 'http://imbo/users/' . $publicKey),\n array('http://imbo/prefix', $publicKey, 'http://imbo/prefix/users/' . $publicKey),\n array('http://imbo:81', $publicKey, 'http://imbo:81/users/' . $publicKey),\n array('http://imbo:81/prefix', $publicKey, 'http://imbo:81/prefix/users/' . $publicKey),\n array('http://imbo:80', $publicKey, 'http://imbo/users/' . $publicKey),\n array('http://imbo:80/prefix', $publicKey, 'http://imbo/prefix/users/' . $publicKey),\n\n array('https://imbo', $publicKey, 'https://imbo/users/' . $publicKey),\n array('https://imbo/prefix', $publicKey, 'https://imbo/prefix/users/' . $publicKey),\n array('https://imbo:444', $publicKey, 'https://imbo:444/users/' . $publicKey),\n array('https://imbo:444/prefix', $publicKey, 'https://imbo:444/prefix/users/' . $publicKey),\n array('https://imbo:443', $publicKey, 'https://imbo/users/' . $publicKey),\n array('https://imbo:443/prefix', $publicKey, 'https://imbo/prefix/users/' . $publicKey),\n );\n }",
"private function loadURLs() {\r\n $status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\tforeach ($this->_url as $scriptname => $modes)\r\n\t{\r\n\t\t$this->url[$scriptname] = $modes[$status];\r\n\t}\r\n }",
"abstract function detect(array $http);",
"static function matchUrl($_non404=True){\n\t\t$cBindA = $_non404? self::$bindA : self::$bind404A;\n\n\t\t//collect detected url's\n\t\t$bondA = [];\n\t\tforeach ($cBindA as $cBind)\n\t\t\tif ($cBind->match())\n\t\t\t\t$bondA[] = $cBind;\n\n\t\tif (!count($bondA))\n\t\t\treturn;\n\t\t\n\t\treturn $bondA;\n\t}",
"public function badRedirectProvider() {\n $badUrls = $this->badUrlProvider();\n $badRedirects = array();\n foreach($badUrls as $name => $badUrl) {\n $urlParts = parse_url(array_shift($badUrl));\n unset($urlParts['scheme']);\n\n // The redir.xpoc.pro tool is provided by sp1d3R in the HackerOne Bug Bounty program\n // If it goes away, we'll need some other way to easily generate a redirect to an internal URL\n $badRedirects[$name] = array(\"http://redir.xpoc.pro/\".implode($urlParts), array_shift($badUrl));\n }\n return $badRedirects;\n }",
"public function getRedirect_urls()\r\n {\r\n return $this->redirect_urls;\r\n }",
"public function extractStatusCode($headers) {\n\t\tforeach($headers as $header) {\n\t\t\t// Checks if the header is the status header\n\t\t\tif(preg_match(\"/HTTP\\/[0-9A-Za-z +]/i\", $header)) {\n\t\t\t\t// If it is save the status\n\t\t\t\t$status = preg_match(\"/HTTP\\/[0-9]\\.[0-9] ([^ ]*) (.*)/i\", $header, $matches);\n\t\t\t\t\n\t\t\t\treturn array($matches[1], $matches[2]);\n\t\t\t}\n\t\t}\n\t}",
"private function __parseUrl()\n {\n if (isset($_GET['url'])) {\n return explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n }\n return [];\n }",
"protected function extractUrls($data){\n\t\tif(isset($data['body']) && isset($data['body']['status']) && $data['body']['status'] == 'available'){\n\t\t\t// fetch source resolution\n\t\t\t$sourceMeasures = array();\n\t\t\t$biggestWidth = 0;\n\t\t\t$biggestHeight = 0;\n\t\t\tforeach($data['body']['download'] as $dl){\n\t\t\t\tif($biggestWidth < $dl['width']) $biggestWidth = $dl['width'];\n\t\t\t\tif($biggestHeight < $dl['height']) $biggestHeight = $dl['height'];\n\t\t\t\t\n\t\t\t\t// check if source is still existent\n\t\t\t\tif(isset($dl['type']) && $dl['type'] == 'source'){\n\t\t\t\t\t$sourceMeasures['width'] = $dl['width'];\n\t\t\t\t\t$sourceMeasures['height'] = $dl['height'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!(isset($sourceMeasures['width']) && isset($sourceMeasures['height']))){\n\t\t\t\t$sourceMeasures['width'] = $biggestWidth;\n\t\t\t\t$sourceMeasures['height'] = $biggestHeight;\n\t\t\t}\n\t\t\t\n\t\t\t// fetch available resolution\n\t\t\t$availRes = array();\n\t\t\tforeach($data['body']['files'] as $f){\n\t\t\t\tif(isset($f['quality']) && isset($f['width']) && isset($f['height']) && isset($f['link']) && isset($f['link_secure'])){\n\t\t\t\t\tif($f['quality'] == 'sd' && $f['height'] == 360){\n\t\t\t\t\t\t$availRes['mobile'] = $f['link'];\n\t\t\t\t\t\t$availRes['mobile_secure'] = $f['link_secure'];\n\t\t\t\t\t}else if($f['quality'] == 'sd' && $f['height'] == 540){\n\t\t\t\t\t\t$availRes['hd'] = $f['link'];\n\t\t\t\t\t\t$availRes['hd_secure'] = $f['link_secure'];\n\t\t\t\t\t}else if($f['quality'] == 'hd' && $f['height'] == 720){\n\t\t\t\t\t\t$availRes['hd'] = $f['link'];\n\t\t\t\t\t\t$availRes['hd_secure'] = $f['link_secure'];\n\t\t\t\t\t}else if($f['quality'] == 'hd' && $f['height'] == 1080){\n\t\t\t\t\t\t$availRes['fullhd'] = $f['link'];\n\t\t\t\t\t\t$availRes['fullhd_secure'] = $f['link_secure'];\n\t\t\t\t\t}\n\t\t\t\t}else if(isset($f['quality']) && $f['quality'] == 'hls' && isset($f['link']) && isset($f['link_secure'])){\n\t\t\t\t\t$availRes['hls'] = str_replace('https', 'http', $f['link']);\n\t\t\t\t\t$availRes['hls_secure'] = $f['link_secure'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($sourceMeasures['width']) && isset($sourceMeasures['height'])){\n\t\t\t\t// source file and measurements found\n\t\t\t\t// check for highest resolution\n\t\t\t\tif($sourceMeasures['width'] >= 1920 && $sourceMeasures['height'] >= 1080){\n\t\t\t\t\t// Video is full HD, so Full HD should be availalbe\n\t\t\t\t\tif(isset($availRes['fullhd']) && isset($availRes['hd']) && isset($availRes['sd'])){\n\t\t\t\t\t\t$this->VimeoFullHDUrl = $availRes['fullhd'];\n\t\t\t\t\t\t$this->VimeoFullHDUrlSecure = $availRes['fullhd_secure'];\n\t\t\t\t\t\t$this->VimeoHDUrl = $availRes['hd'];\n\t\t\t\t\t\t$this->VimeoHDUrlSecure = $availRes['hd_secure'];\n\t\t\t\t\t\t$this->VimeoSDUrl = $availRes['sd'];\n\t\t\t\t\t\t$this->VimeoSDUrlSecure = $availRes['sd_secure'];\n\t\t\t\t\t\t$this->VimeoMobileUrl = $availRes['mobile'];\n\t\t\t\t\t\t$this->VimeoMobileUrlSecure = $availRes['mobile_secure'];\n\t\t\t\t\t\t$this->VimeoPicturesURI = $data['body']['pictures']['uri'];\n\t\t\t\t\t\tif(isset($availRes['hls'])){\n\t\t\t\t\t\t\t$this->VimeoHLSUrl = $availRes['hls'];\n\t\t\t\t\t\t\t$this->VimeoHLSUrlSecure = $availRes['hls_secure'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->VimeoProcessingStatus = 'finished';\n\t\t\t\t\t\t$this->write();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else if($sourceMeasures['width'] >= 1280 && $sourceMeasures['height'] >= 720){\n\t\t\t\t\t// Video is HD, so at least HD schould be available\n\t\t\t\t\tif(isset($availRes['hd']) && isset($availRes['sd'])){\n\t\t\t\t\t\t$this->VimeoFullHDUrl = null;\n\t\t\t\t\t\t$this->VimeoFullHDUrlSecure = null;\n\t\t\t\t\t\t$this->VimeoHDUrl = $availRes['hd'];\n\t\t\t\t\t\t$this->VimeoHDUrlSecure = $availRes['hd_secure'];\n\t\t\t\t\t\t$this->VimeoSDUrl = $availRes['sd'];\n\t\t\t\t\t\t$this->VimeoSDUrlSecure = $availRes['sd_secure'];\n\t\t\t\t\t\t$this->VimeoMobileUrl = $availRes['mobile'];\n\t\t\t\t\t\t$this->VimeoMobileUrlSecure = $availRes['mobile_secure'];\n\t\t\t\t\t\t$this->VimeoPicturesURI = $data['body']['pictures']['uri'];\n\t\t\t\t\t\tif(isset($availRes['hls'])){\n\t\t\t\t\t\t\t$this->VimeoHLSUrl = $availRes['hls'];\n\t\t\t\t\t\t\t$this->VimeoHLSUrlSecure = $availRes['hls_secure'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->VimeoProcessingStatus = 'finished';\n\t\t\t\t\t\t$this->write();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t// Video is SD, so at least SD schould be available\n\t\t\t\t\tif(isset($availRes['sd'])){\n\t\t\t\t\t\t$this->VimeoFullHDUrl = null;\n\t\t\t\t\t\t$this->VimeoFullHDUrlSecure = null;\n\t\t\t\t\t\t$this->VimeoHDUrl = null;\n\t\t\t\t\t\t$this->VimeoHDUrlSecure = null;\n\t\t\t\t\t\t$this->VimeoSDUrl = $availRes['sd'];\n\t\t\t\t\t\t$this->VimeoSDUrlSecure = $availRes['sd_secure'];\n\t\t\t\t\t\t$this->VimeoMobileUrl = $availRes['mobile'];\n\t\t\t\t\t\t$this->VimeoMobileUrlSecure = $availRes['mobile_secure'];\n\t\t\t\t\t\t$this->VimeoPicturesURI = $data['body']['pictures']['uri'];\n\t\t\t\t\t\tif(isset($availRes['hls'])){\n\t\t\t\t\t\t\t$this->VimeoHLSUrl = $availRes['hls'];\n\t\t\t\t\t\t\t$this->VimeoHLSUrlSecure = $availRes['hls_secure'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->VimeoProcessingStatus = 'finished';\n\t\t\t\t\t\t$this->write();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else if(isset($data['body']) && isset($data['body']['status']) && ($data['body']['status'] == 'quota_exceeded' || $data['body']['status'] == 'uploading_error' || $data['body']['status'] == 'transcoding_error')){\n\t\t\t$this->VimeoProcessingStatus = 'processingerror';\n\t\t\t$this->write();\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"protected function _getImageUrls($images) {\n\n $data = array();\n\n foreach ($images as $image) {\n $data[] = $image['url'];\n }\n\n return $data;\n }",
"public function urlList(): Collection\n {\n return $this->range()->mapWithKeys(function (int $page) {\n return [$page => $this->url($page)];\n });\n }",
"function getServerURLs() {\n\t\treturn $this->m_serverURLs;\n\t}",
"public static function runtimeScriptUrls(): array {\n\t\treturn [];\n\t}",
"private function enrich_additional_urls(array $urls): array {\n return f\\unique(f\\concat(\n $urls,\n $this->fetch_password_protected_posts(),\n $this->fetch_yoast_noindex_posts()\n ));\n }",
"function get_urls(){\n\tglobal $urllist;\n\t$list = file($urllist);\n\t//print_r($list);\n\treturn $list;\n}",
"public function getURIs($source) {\n $source_config = $source->getConfigFor($this);\n \n $arc = ARC2::getRDFParser();\n $arc->parse($source_config['url']);\n \n $uri_list = array();\n foreach ($arc->getSimpleIndex() as $uri => $data) {\n $uri_list[] = $uri;\n }\n return $uri_list;\n }",
"public function schemeProvider()\n {\n return [\n ['http://'],\n ['https://'],\n ];\n }",
"public function setLinksFoundArray()\n { \n $cnt = count($this->links_found_url_descriptors);\n for ($x=0; $x<$cnt; $x++)\n {\n $UrlDescriptor = $this->links_found_url_descriptors[$x];\n \n // Convert $UrlDescriptor-object to an array\n $object_vars = get_object_vars($UrlDescriptor);\n \n $this->links_found[] = $object_vars;\n }\n }",
"public static function getCodes()\n\t{\n\t\treturn [\n\t\t\tBase::Mail,\n\t\t\tBase::Call,\n\t\t\tBase::Imol,\n\t\t\tBase::Site,\n\t\t\tBase::Site24,\n\t\t\tBase::Shop24,\n\t\t\tBase::SiteDomain,\n\t\t\tBase::Button,\n\t\t\tBase::Form,\n\t\t\tBase::Callback,\n\t\t\tBase::FbLeadAds,\n\t\t\tBase::VkLeadAds,\n\t\t\tBase::Rest,\n\t\t\tBase::Order,\n\t\t\tBase::SalesCenter,\n\t\t];\n\t}",
"public function getLinks($text)\n {\n $links = array();\n\n $text = preg_replace(\"#www\\.#\", \"http://www.\", $text);\n $text = preg_replace(\"#http://http://www\\.#\", \"http://www.\", $text);\n $text = preg_replace(\"#https://http://www\\.#\", \"https://www.\", $text);\n $reg_url = \"!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i\";\n\n if (preg_match_all($reg_url, $text, $aMatch)) {\n $match = $aMatch[0];\n foreach ($match as $url) {\n $links[] = $url;\n }\n }\n\n return $links;\n }",
"public function getProductUrls() {\n\t\t$urls = $this->crawler->filter( 'div.productInfo h3 a' )->each( function ( Crawler $node, $i ) {\n\t\t\treturn $node->attr( 'href' );\n\t\t} );\n\n\t\treturn $urls;\n\t}",
"public function getRedirectUrls()\r\n {\r\n return $this->redirect_urls;\r\n }",
"public static function provideServerURLs () : iterable {\n yield [[], \"http://localhost\"];\n yield [[\"UNRELATED\" => \"ANYTHING\"], \"http://localhost\"];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n ],\n \"http://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"443\",\n \"SERVER_NAME\" => \"acme.tld\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTP_X_FORWARDED_PROTO\" => \"https\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"80\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTP_FORWARDED\" => \"for=192.0.2.43, for=\\\"[2001:db8:cafe::17]\\\", proto=https, by=203.0.113.43\",\n ],\n \"https://acme.tld\"\n ];\n\n yield [\n [\n \"SERVER_PORT\" => \"8443\",\n \"SERVER_NAME\" => \"acme.tld\",\n \"HTTPS\" => \"on\",\n ],\n \"https://acme.tld:8443\"\n ];\n\n\n }",
"function changeRedirectorUrlTag(&$codes = [])\n{\n foreach ($codes as $codeId => $code) {\n if ($code['tag'] == 'url' && $code['type'] == 'unparsed_content') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedContentCode($tag, $data);\n };\n } elseif ($code['tag'] == 'url' && $code['type'] == 'unparsed_equals') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedEqualsCode($tag, $data);\n };\n } elseif ($code['tag'] == 'iurl' && $code['type'] == 'unparsed_content') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedContentCode($tag, $data);\n };\n } elseif ($code['tag'] == 'iurl' && $code['type'] == 'unparsed_equals') {\n $codes[$codeId]['validate'] = function (&$tag, &$data) {\n changeUrlUnparsedEqualsCode($tag, $data);\n };\n }\n }\n}",
"public static function get_response_links($response)\n {\n }",
"private function getAllUrls(string $html, string $parts) : \\Ds\\Sequence\n {\n $urls = [];\n // Prevent HTML errors from bubbling up.\n libxml_use_internal_errors(true);\n $doc = new \\DOMDocument();\n $doc->loadHTML($html);\n $doc->preserveWhiteSpace = false;\n // look for <base> tag and change context URL if necessary\n $baseTags = $doc->getElementsByTagName('base');\n if ($baseTags->length > 0 && $baseTags->item(0)->hasAttribute('href')) {\n $this->context = $baseTags->item(0)->getAttribute('href');\n }\n foreach ((new \\DOMXPath($doc))->query($this->hrefQuery) as $href) {\n $url = (new UrlHelper($href->nodeValue))->getNormalised()->get($parts);\n if (!empty($this->options->distinctUrls)) {\n $urls[(string) $url] = $url;\n } else {\n $urls[] = $url;\n }\n }\n return new Vector(array_values($urls));\n }"
] | [
"0.6547203",
"0.6547203",
"0.61781675",
"0.6152183",
"0.6105734",
"0.6052675",
"0.600427",
"0.600287",
"0.5984404",
"0.5958778",
"0.585329",
"0.58336395",
"0.5811",
"0.5805932",
"0.5791834",
"0.5785595",
"0.57458806",
"0.5737714",
"0.57219404",
"0.5711406",
"0.5698449",
"0.56954277",
"0.56746966",
"0.5653655",
"0.564077",
"0.56044537",
"0.5602478",
"0.5574225",
"0.5559524",
"0.55504316",
"0.5537602",
"0.5525381",
"0.5524605",
"0.55061215",
"0.550588",
"0.55052584",
"0.54881173",
"0.54788774",
"0.5469037",
"0.54683566",
"0.5466433",
"0.5457039",
"0.5453951",
"0.545177",
"0.54401976",
"0.5424194",
"0.5423524",
"0.5418668",
"0.5405216",
"0.53988004",
"0.5382347",
"0.53723544",
"0.5360519",
"0.5356609",
"0.53375137",
"0.5334588",
"0.5334087",
"0.5327638",
"0.5323558",
"0.5318592",
"0.53030246",
"0.53026944",
"0.53001064",
"0.5293265",
"0.5291134",
"0.52778804",
"0.52735305",
"0.5272078",
"0.5250665",
"0.52431905",
"0.52329975",
"0.5230674",
"0.52264726",
"0.5215064",
"0.52088696",
"0.51857615",
"0.5185048",
"0.5182097",
"0.5178001",
"0.51769006",
"0.5175527",
"0.51738685",
"0.5169358",
"0.5166627",
"0.5156362",
"0.5135049",
"0.51072496",
"0.5105991",
"0.5103669",
"0.51007867",
"0.5093849",
"0.50880283",
"0.50736225",
"0.50696385",
"0.5064778",
"0.5059845",
"0.505528",
"0.50518864",
"0.5047131",
"0.5046734"
] | 0.6714659 | 0 |
/ 1.2 ON LOAD RUN / | public function __construct() {
// update default vars with configuration file
SELF::updateVars();
// add custom fields
if($this->WPimgAttr_Alt_content == 1 || $this->WPimgAttr_Alt_attachment == 1):
// add custom fields
add_filter( 'attachment_fields_to_edit', array( $this, 'WPimgAttr_Alt_meta_CustomFields' ), null, 2 );
// update custom fields
add_action('add_attachment', array( $this, 'WPimgAttr_Alt_meta_Attachments_Save' ), 10, 2 );
add_action('edit_attachment', array( $this, 'WPimgAttr_Alt_meta_Attachments_Save' ), 10, 2 );
endif;
// alt img in the_content
if($this->WPimgAttr_Alt_content == 1):
add_filter('the_content', array( $this, 'IMGalt_Content' ) );
endif;
// alt img in do_shortcode
if($this->WPimgAttr_Alt_shortcode == 1):
add_filter('do_shortcode', array( $this, 'IMGalt_Content' ) );
endif;
// alt img for attachments
if($this->WPimgAttr_Alt_attachment == 1):
add_filter( 'wp_get_attachment_image_attributes', array( $this, 'IMGalt_Attachment' ), 10, 2 );
endif;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _preExec()\n {\n }",
"public function preExec()\n {\n }",
"abstract protected function _run();",
"abstract protected function _run();",
"function public_load() {\n\n\t}",
"function load() {\n\n\t}",
"function needsExecution() ;",
"public function preProcess();",
"public function preProcess();",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"protected function preProcess() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"abstract public function run() ;",
"function run()\r\n {\r\n }",
"public function testPreprocessingBinarize()\n {\n }",
"public static function pre_process() {}",
"public function before_run() {}",
"function we_load($from=LOAD_MAID_DB){\n\t\twe_binaryDocument::we_load($from);\n\t}",
"public function __load();",
"public function before_run(){}",
"abstract protected function _preProcess();",
"function load()\n {\n }",
"public function preExecute(){\n\n\t\n\t}",
"function load();",
"public function testLoad()\n {\n $this->todo('stub');\n }",
"public function testLoad()\n {\n $this->todo('stub');\n }",
"public function testLoad()\n {\n $this->todo('stub');\n }",
"abstract public function run(): void;",
"function run();",
"function run();",
"public function extProc_init() {}",
"public function extProc_init() {}",
"protected function childLoad() {}",
"abstract function run();",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"function _CPULoad()\n\t{\n/*\n\ncpu 524152 2662 2515228 336057010\ncpu0 264339 1408 1257951 168025827\ncpu1 259813 1254 1257277 168031181\npage 622307 25475680\nswap 24 1891\nintr 890153570 868093576 6 0 4 4 0 6 1 2 0 0 0 124 0 8098760 2 13961053 0 0 0 0 0 0 0 0 0 0 0 0 0 16 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\ndisk_io: (3,0):(3144904,54369,610378,3090535,50936192) (3,1):(3630212,54097,633016,3576115,50951320)\nctxt 66155838\nbtime 1062315585\nprocesses 69293\n\n*/\n\t\t// Algorithm is taken from\n\t\t// http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/414b0e1b-499c-411e-8a02-6a12e339c0f1/\n\t\tif (strncmp(PHP_OS,'WIN',3)==0) {\n\t\t\tif (PHP_VERSION == '5.0.0') return false;\n\t\t\tif (PHP_VERSION == '5.0.1') return false;\n\t\t\tif (PHP_VERSION == '5.0.2') return false;\n\t\t\tif (PHP_VERSION == '5.0.3') return false;\n\t\t\tif (PHP_VERSION == '4.3.10') return false; # see http://bugs.php.net/bug.php?id=31737\n\n\t\t\tstatic $FAIL = false;\n\t\t\tif ($FAIL) return false;\n\n\t\t\t$objName = \"winmgmts:{impersonationLevel=impersonate}!\\\\\\\\.\\\\root\\\\CIMV2\";\n\t\t\t$myQuery = \"SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total'\";\n\n\t\t\ttry {\n\t\t\t\t@$objWMIService = new COM($objName);\n\t\t\t\tif (!$objWMIService) {\n\t\t\t\t\t$FAIL = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$info[0] = -1;\n\t\t\t\t$info[1] = 0;\n\t\t\t\t$info[2] = 0;\n\t\t\t\t$info[3] = 0;\n\t\t\t\tforeach($objWMIService->ExecQuery($myQuery) as $objItem) {\n\t\t\t\t\t\t$info[0] = $objItem->PercentProcessorTime();\n\t\t\t\t}\n\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$FAIL = true;\n\t\t\t\techo $e->getMessage();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $info;\n\t\t}\n\n\t\t// Algorithm - Steve Blinch (BlitzAffe Online, http://www.blitzaffe.com)\n\t\t$statfile = '/proc/stat';\n\t\tif (!file_exists($statfile)) return false;\n\n\t\t$fd = fopen($statfile,\"r\");\n\t\tif (!$fd) return false;\n\n\t\t$statinfo = explode(\"\\n\",fgets($fd, 1024));\n\t\tfclose($fd);\n\t\tforeach($statinfo as $line) {\n\t\t\t$info = explode(\" \",$line);\n\t\t\tif($info[0]==\"cpu\") {\n\t\t\t\tarray_shift($info); // pop off \"cpu\"\n\t\t\t\tif(!$info[0]) array_shift($info); // pop off blank space (if any)\n\t\t\t\treturn $info;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}",
"public function _loadRealInstance() {}",
"protected function _exec()\n {\n }",
"public function postLoad() {}",
"function admin_load() {\n\n\t}",
"protected function _preload() {\n }",
"abstract protected function requiredOperations1(): void;",
"private function before_execute()\n {\n }",
"public static function import_process() {}",
"private function public_hooks()\n\t{\n\t}",
"function load()\n{\n\t\n}",
"public function loadInit() {}",
"public function defaultLoading() {}"
] | [
"0.5842563",
"0.58228374",
"0.56333256",
"0.56333256",
"0.55635273",
"0.5529471",
"0.5491936",
"0.54754484",
"0.54754484",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.5373239",
"0.53725356",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.537213",
"0.5341624",
"0.5334838",
"0.53234255",
"0.5314392",
"0.5303499",
"0.5301671",
"0.52906394",
"0.5284208",
"0.5276553",
"0.5271744",
"0.5239976",
"0.5217761",
"0.5207961",
"0.5207961",
"0.5207961",
"0.5206281",
"0.5177775",
"0.5177775",
"0.5176239",
"0.5173699",
"0.5173459",
"0.51680046",
"0.51658833",
"0.51658833",
"0.51658833",
"0.51658833",
"0.5165871",
"0.5149343",
"0.51476103",
"0.5135459",
"0.51321715",
"0.5129507",
"0.5127759",
"0.5125923",
"0.5122825",
"0.51099753",
"0.50929266",
"0.5092557",
"0.5090388"
] | 0.0 | -1 |
/================================================================================== 2.0 FUNCTIONS ================================================================================== / 2.1 GET CONFIGURATION FORM CONFIG FILE / | private function updateVars(){
// get configuration
global $configuration;
// if configuration file exists && class-settings
if($configuration && array_key_exists('WPimgAttr', $configuration)):
// class configuration
$myConfig = $configuration['WPimgAttr'];
// update vars
$this->WPimgAttr_Alt_content = array_key_exists('Alt_content', $myConfig) ? $myConfig['Alt_content'] : $this->WPimgAttr_Alt_content;
$this->WPimgAttr_Alt_attachment = array_key_exists('Alt_attachment', $myConfig) ? $myConfig['Alt_attachment'] : $this->WPimgAttr_Alt_attachment;
$this->WPimgAttr_Alt_shortcode = array_key_exists('Alt_shortcode', $myConfig) ? $myConfig['Alt_shortcode'] : $this->WPimgAttr_Alt_shortcode;
SELF::$WPimgAttr_Alt_languages = array_key_exists('Alt_languages', $myConfig) ? $myConfig['Alt_languages'] : SELF::$WPimgAttr_Alt_languages;
endif;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getConfigFile();",
"public function getConfigFilePath();",
"public function getConfig()\r\n {\r\n return $this->_file;\r\n }",
"public function getConfigForm() {\r\n\t\treturn parent::getConfigForm()->addElementPath(dirname(__FILE__));\r\n\t}",
"abstract protected function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"function acapi_get_option_file() {\n $defaults = acapi_common_options();\n return drush_get_option('ac-config', $defaults['ac-config']['default_value']);\n}",
"abstract public function getConfig();",
"public function config_path();",
"public function getConfig()\n {\n return $this->_getConfigFile();\n }",
"public function getConfigFile()\n\t{\n\t\treturn $this->configfile;\n\t}",
"private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }",
"private static function getConfig(){\n return parse_ini_file(__DIR__ . \"/../config/config.ini\");\n }",
"private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}",
"public function getConfig() {}",
"function getConfiguration() ;",
"public function getConfigFile() {\n \t\n \t// Return our configuration file\n \treturn $this->sConfigFile;\n }",
"public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}",
"public function getConfig()\n { // Try the template specific path first\n $fname = APPLICATION_PATH.$this->_paths['pkg_template'].'/config.json';\n if( file_exists($fname) ) {\n return json_decode(file_get_contents($fname));\n }\n // Next try the domain common path\n $fname = APPLICATION_PATH.$this->_paths['pkg_common'].'/config.json';\n if( file_exists($fname) ) {\n return json_decode(file_get_contents($fname));\n }\n // Finally, try the app common path\n $fname = APPLICATION_PATH.$this->_paths['app_common'].'/config.json';\n if( file_exists($fname) ) {\n return json_decode(file_get_contents($fname));\n }\n // If none of these files were found, return false to indicate failure\n if( !$this->_config) throw new CException('Configuration not found');\n }",
"function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }",
"public static function getConfiguration();",
"public function getConfig()\r\n {\r\n $configFile = GeneralUtility::getFileAbsFileName(\"EXT:centauri_core/Configuration/core.php\");\r\n return (include $configFile);\r\n }",
"public function GetConfigurationForm()\n {\n $form = json_decode(file_get_contents(__DIR__ . '/form.json'), true);\n\n $ConfigVars = json_decode($this->ReadPropertyString('Variables'), true);\n \n return json_encode($form);\n }",
"abstract protected function getConfigPath();",
"function getConfig() {\n $config = parse_ini_file(\"config/config.ini\", true);\n\n return $config;\n}",
"public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}",
"public static function getConfig()\n {\n }",
"public function getConfig() {\r\n\r\n\t}",
"protected function getConfigFile()\n\t{\n\t\treturn $this->_configFile;\n\t}",
"function load_config() {\n $config_file = \"scripts/i-erp.conf\";\n $comment = \"#\";\n // open the config file\n $fp = fopen($config_file, \"r\");\n if (!$fp) {\n echo(\"Failed to open file\");\n return 0;\n }\n // loop through the file lines and pull out variables\n while (!feof($fp)) {\n $line = trim(fgets($fp));\n if ($line && $line[0] != $comment) {\n $pieces = explode(\"=\", $line);\n $option = trim($pieces[0]);\n $value = trim($pieces[1]);\n $config_values[$option] = $value;\n }\n }\n fclose($fp);\n $_SESSION['install_lib'] = $config_values['install_lib'];\n $_SESSION['server'] = $config_values['server'];\n $_SESSION['timeout'] = $config_values['timeout'];\n $_SESSION['appname'] = $config_values['appname'];\n $_SESSION['h_logo'] = $config_values['h_logo'];\n $_SESSION['si_logo'] = $config_values['si_logo'];\n $_SESSION['copyr'] = $config_values['copyr'];\n return 1;\n}",
"public static function getConfigFile()\n\t\t{\n\t\t\treturn SOFTWARE_PATH . DS . 'wp-config.php';\n\t\t}",
"public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}",
"private function get_config() {\n if (isset($this->config)) {\n return $this->config;\n }\n\n $this->config = get_config('tool_coursebank');\n\n return $this->config;\n }",
"public function getConfigForm()\r\n {\r\n $form = parent::getConfigForm();\r\n $form->addElementPath(dirname(__FILE__) . '/fields');\r\n return $form;\r\n }",
"function getConfigObj(){\n $fh = fopen($GLOBALS['configFileName'],'r')\n\t\t\tor die(\"Unable to open file!\");\n\n $configJson = fread($fh, filesize($GLOBALS['configFileName']));\n fclose($fh);\n // print($configJson);\n // $configObj = json_decode($configJson);\n // var_dump($configObj); //->{'devices'}[0]->{'name'};\n return json_decode($configJson);\n }",
"public function readConfigAction()\n {\n $this->getResponse()->setBody(self::getHelper()->readconfig());\n\n }",
"public function getConfig()\n {\n return parse_ini_file(__DIR__ . \"/../php.ini\", true);\n }",
"public static function getConfig() {\n return parse_ini_file(__DIR__ . '/config.ini');\n }",
"function config_path()\n {\n $paths = getPaths();\n\n return $paths['config'];\n }",
"public static function config();",
"public function getConfiguration() {\n\t\treturn $this->_getResponse(self::URL_CONFIGURATION);\n\t}",
"function getConfig($file) {\n echo $config;\n $config = parse_ini_file($file, true);\n if (! $config) {\n fatal(\"Configuration file missing or incorrect.\"); \n }\n return $config;\n }",
"public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }",
"static function config() {\n\t\t//\t\tif (self::$configuration === null) {\n\t\t//\t\t\tself::$configuration = include self::themepath().'wpgrade-config'.EXT;\n\t\t//\t\t}\n\t\t//\n\t\t//\t\treturn self::$configuration;\n\t\treturn self::get_config();\n\t}",
"private function getConfig() {\n // call the GetConfig API\n $args = array('hostname' => $this->hostname);\n $api = new \\xmlAPI('GetConfig', $this->_default_key, 'xml', $args);\n $api->server_url = $this->_default_server;\n $api->send();\n\n // change hostname if found by custom_name\n $this->hostname = $api->hostname;\n \n // save fields in metadata\n $this->key = $api->api_key ? $api->api_key : $this->_default_key;\n $this->server = $api->api_server ? $api->api_server : $this->_default_server;\n $this->controller_path = $api->controller_path;\n $this->controller = $api->controller;\n $this->error_page = $api->error_page ? $api->error_page : '404';\n $this->mode = $api->mode ? $api->mode : 'test';\n $this->site_path = $api->site_path ? $api->site_path : $this->hostname;\n $this->default_site_path = $api->default_site_path;\n $this->secure_domain = $api->secure_domain;\n \n // set the list of controllers this site can use\n $this->setRights($api->row);\n }",
"public static function read()\n {\n return self::$config;\n }",
"public function getConfiguration();",
"public function getConfiguration();",
"public function getConfiguration();",
"public function getConfig()\n\t{\n\t\treturn include __DIR__ . '/../../../config/module.config.php';\n\t}",
"function get_config($filename)\n{\n\t$config = parse_ini_file($filename);\n\n\tif ($config === FALSE) {\n\t\tthrow new Exception(\"could not read configuration from '{$filename}'\");\n\t}\n\n\tif (!isset($config['url'])) {\n\t\tthrow new Exception(\"url not found in '{$filename}'\");\n\t}\n\tif (!isset($config['username'])) {\n\t\tthrow new Exception(\"username not found in '{$filename}'\");\n\t}\n\tif (!isset($config['password'])) {\n\t\tthrow new Exception(\"password not found in '{$filename}'\");\n\t}\n\tif (!isset($config['source'])) {\n\t\tthrow new Exception(\"source project not found in '{$filename}'\");\n\t}\n\tif (!isset($config['destination'])) {\n\t\tthrow new Exception(\"destination project not found in '{$filename}'\");\n\t}\n\n\treturn $config;\n}",
"private function configuration() {\n\n $f = \"includes/expr.ini\";\n\n return parse_ini_file($f);\n\n }",
"private static function _getConfig()\n\t{\n\t\treturn \\Config::get('app.fqdn', '');\n\t}",
"public function getConfiguration() {}",
"public function getConfiguration() {}",
"static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}",
"public function getConfig(){\r\n return include __DIR__ . '/config/module.config.php';\r\n }",
"public static function getConfig() {\n\t\tif (self::$temp_config !== null) {\n\t\t\treturn self::$temp_config;\n\t\t}\n\n\t\t$config_file = self::getConfigFile();\n\t\treturn (!file_exists($config_file)) ? array() : json_decode(file_get_contents($config_file), true);\n\t}",
"protected function getConfigFile()\n {\n return realpath($this->getBasePath() . \"/config/{$this->package}.php\");\n }",
"protected abstract static function getConfig(): array;",
"public function getConfig(){\n return include __DIR__ . '/config/module.config.php';\n }",
"private function parseConfig(){\n\t\t\treturn parse_ini_file(BASE_PATH . 'config' . DIRECTORY_SEPARATOR . 'config.ini');\n\t\t}",
"function config_path()\n {\n return base_path() . '/config';\n }",
"protected function get_config_path()\n\t{\n\t\treturn $this->config_path ?: $this->phpbb_root_path . 'config';\n\t}",
"protected function getConfigFromFile()\n {\n if (! file_exists(CONFIG_FILE)) {\n throw new RuntimeException('File ' . CONFIG_FILE . ' does not exist');\n }\n\n return include CONFIG_FILE;\n }",
"public function getLocalConfigurationFileLocation() {}",
"function conf($path) {\n\t$config = $GLOBALS['config'];\n\n\tif(strstr($path, '.')) {\n\t\t$config = array_get($config, $path);\n\t\tif(!$config) Log::caller('path: ' . $path);\n\t}\n\telse if(!isset($config[$path])) {\n\t\tLog::caller('Cannot find configuration parameter | path: ' . $path);\n\t\t//die('Cannot find configuration parameter | $path: ' . $path);\n\t\treturn '';\n\t}\n\telse $config = $config[$path];\n\n\treturn $config;\n}",
"public function getConfig() {\n if ($this->config) {\n return $this->config;\n }\n \n $this->config = $this->parse($this->configFile);\n return $this->config;\n }",
"protected function getConfiguration() {}",
"public static function config() {\n $access_token = getenv(\"access_token\");\n if($access_token) {\n return [\n \"access_token\" => $access_token,\n \"base_url\" => \"https://www.formstack.com/api/v2/\"\n ];\n }\n else if(function_exists(\"config\")) {\n\n return [\n \"access_token\" => config(\"formstack.access_token\"),\n \"base_url\" => config(\"formstack.base_url\")\n ];\n }\n else if(!file_exists(realpath(\"./formstack.php\")) ) {\n throw new \\Exception(\"ERROR: config file [formstack.php] not found in package root's dir. \n \\nFile is expected here in this dir:\n \". realpath ( \".\"));\n }\n return include realpath(\"./formstack.php\");\n }",
"public static function load_app_conf() {\n $app_config = include(CONFIGPATH.'app.conf.php');\n return $app_config;\n }",
"protected function getFactoryConfigurationFileLocation() {}",
"protected function _getSettingFile()\n {\n $settingFile = Globals::getDataFilePath(self::API_SETTING_FILE);\n \n // If file no exist\n if (!file_exists($settingFile)) {\n $config = new Zend_Config(array(), true);\n $this->_write2Json($config, $settingFile);\n }\n \n return $settingFile;\n }",
"private static function readConfig()\n {\n $handler = self::getHandler();\n if (null == $handler->arrConfigGlobal && null == $handler->arrConfigLocal && null == $handler->arrConfigSecure) {\n include dirname(__FILE__) . '/../../config/default.php';\n\n $handler->arrConfigLocal = $APPCONFIG;\n\n $db = Base_Database::getConnection();\n try {\n // This is just for things like API keys, password salts etc.\n // If we have, at a later point, a function to export the database\n // en masse, then we can encrypt all the output from the secureconfig\n // table. It shouldn't overide the global or local config settings\n $sql = \"SELECT * FROM secureconfig\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigSecure = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n // This is just the regular global configuration settings.\n $sql = \"SELECT * FROM config\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigGlobal = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n foreach ($handler->arrConfigGlobal as $key => $value) {\n $handler->arrConfig[$key] = array('isLocal' => false, 'isOverriden' => false, 'value' => $value[0]);\n }\n \n // This is the configuration settings local to this individual machine.\n foreach ($handler->arrConfigLocal as $key => $value) {\n if (isset($handler->arrConfig[$key])) {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => true, 'value' => $value);\n } else {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => false, 'value' => $value);\n }\n }\n } catch(Exception $e) {\n error_log($e);\n die();\n }\n }\n }",
"function read_config($file = false)\n{\n global $config, $databases;\n $ret = false;\n if (!$file) {\n $file = $config['config_file'];\n }\n // protect from including external files\n $search = array(':', 'http', 'ftp', ' ');\n $replace = array('', '', '', '');\n $file = str_replace($search, $replace, $file);\n\n if (is_readable($config['paths']['config'] . $file . '.php')) {\n // to prevent modern server from caching the new configuration we need to evaluate it this way\n clearstatcache();\n $f = implode('', file($config['paths']['config'] . $file . '.php'));\n $f = str_replace('<?php', '', $f);\n $f = str_replace('?>', '', $f);\n eval($f);\n $config['config_file'] = $file;\n $_SESSION['config_file'] = $config['config_file'];\n $ret = true;\n }\n\n return $ret;\n}",
"public static function systemConfig()\n {\n return DirPaths::systemConfig().\n FileNames::CONFIG;\n }",
"function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\r\n //print_r($arraycfg['aduserinv']);\r\n return $arraycfg;\r\n }",
"public function getConfig(){\n\t\t$request = $this->_sendPacketToController(self::GET_CONFIG);\n\t\tif ($request->getState() == self::STATE_OK) // If the packet is send sucefully\n\t\t\treturn $this->_getResponse(); // TODO mettre en forme la sortie\n\t\telse\n\t\t\treturn $request;\n\t}",
"public function getAdditionalConfigurationFileLocation() {}",
"public function getMFConfig() {\n\t\treturn MediaWikiServices::getInstance()->getService( 'Minerva.Config' );\n\t}",
"public function getConfiguration()\n {\n return $this->getResponse(self::URL_CONFIGURATION);\n }",
"function &get_config()\r\n{\t\r\n\t$config_file_name = $_SERVER[\"DOCUMENT_ROOT\"] .'/logs/config';\r\n\tstatic $main_conf;\r\n\t\t\r\n\tif ( ! isset($main_conf))\r\n\t{\r\n\t\tif ( ! file_exists($config_file_name.EXT))\r\n\t\t{\r\n\t\t\tshow_error('The configuration file '.$config_file_name .EXT.' does not exist.');\r\n\t\t}\r\n\t\t\r\n\t\trequire($config_file_name .EXT);\r\n\t\t\r\n\t\tif ( ! isset($config) OR ! is_array($config))\r\n\t\t{\r\n\t\t\tshow_error('Your config file does not appear to be formatted correctly.');\r\n\t\t}\r\n\r\n\t\t$main_conf[0] =& $config;\r\n\t}\r\n\treturn $main_conf[0];\r\n}",
"function getConfig($file) {\n\t\t$config\t= parse_ini_file($file, true);\n\t\tif (! $config) {\n\t\t\t fatal(\"Configuration file missing or incorrect.\"); \n\t\t}\n\t return $config;\n\t}",
"private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}",
"protected function _getConfig()\n {\n $configFile = Mtool_Magento::getHomeDir() . DIRECTORY_SEPARATOR . self::CONFIG_FILE_NAME;\n\n try {\n $iniConfig = new Zend_Config_Ini($configFile);\n } catch (Zend_Config_Exception $e) {\n $iniConfig = $this->_createConfig($configFile);\n }\n\n if ((is_null($iniConfig->projects))\n || !($iniConfig->projects instanceof Zend_Config)\n ) {\n // no 'projects' in the config file\n $iniConfig = $this->_createConfig($configFile);\n } else {\n $projectConfigId = null;\n // find id of current project\n foreach ($iniConfig->projects->toArray() as $key => $_projectConfig) {\n if (is_array($_projectConfig)) {\n if ((isset($_projectConfig['path']))\n && ($_projectConfig['path'] == Mtool_Magento::getRoot())\n ) {\n $projectConfigId = $key;\n break;\n }\n }\n }\n\n if (!is_null($projectConfigId)) {\n $configs = $iniConfig->projects->{$projectConfigId}->toArray();\n } else {\n // no config for the current project\n $iniConfig = $this->_createConfig($configFile);\n }\n }\n if (!isset($configs['license_path'])) {\n $configs['license_path'] = '';\n }\n list($configs['license'], $configs['license_short']) = $this->_getLicenseStrings($configs['license_path']);\n return $configs;\n }",
"private function config()\n {\n return $this->app['config'];\n }",
"private function config()\n {\n return $this->app['config'];\n }",
"function get_config_array();",
"function Event_Config_File()\n {\n return join(\"/\",array($this->Event_Config_Path,$this->Event_Config_File));\n }",
"public function getConfigPath () {\n\t\tif (!isset(self::$configPath))\n\t\t\tself::$configPath = BASE_PATH.'/configuration.plist';\n\t\t\n\t\treturn self::$configPath;\n\t}",
"public static function siteConfig()\n {\n return DirPaths::siteConfig().\n FileNames::CONFIG;\n }",
"static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}",
"public function getConfig ()\n {\n return $this->web->getConfig();\n }",
"public static function getConfig()\n {\n return self::$config;\n }"
] | [
"0.75502646",
"0.75166035",
"0.7432217",
"0.7239127",
"0.7227589",
"0.7179488",
"0.7179488",
"0.7179488",
"0.7179488",
"0.7179488",
"0.7179488",
"0.7179488",
"0.7179488",
"0.71528363",
"0.7141366",
"0.7138566",
"0.7128693",
"0.710064",
"0.70982504",
"0.70982504",
"0.70500225",
"0.7020137",
"0.69707406",
"0.69281465",
"0.68820196",
"0.6878233",
"0.68706346",
"0.6822446",
"0.6800965",
"0.6795127",
"0.6788379",
"0.67872727",
"0.6777676",
"0.67753685",
"0.6754566",
"0.6747686",
"0.67469305",
"0.67417145",
"0.6717146",
"0.6702187",
"0.66887873",
"0.6667567",
"0.66615003",
"0.6660301",
"0.66503555",
"0.6623467",
"0.66225296",
"0.66179466",
"0.6606981",
"0.6599452",
"0.65941256",
"0.65834147",
"0.65786475",
"0.65496236",
"0.65496236",
"0.65496236",
"0.6545784",
"0.6536886",
"0.6535946",
"0.6532956",
"0.65157264",
"0.651424",
"0.6497263",
"0.64747536",
"0.6465723",
"0.6448557",
"0.6446481",
"0.64439964",
"0.64431965",
"0.6433278",
"0.6427316",
"0.6418257",
"0.64145106",
"0.6405941",
"0.640499",
"0.64025193",
"0.63907826",
"0.6388438",
"0.6386564",
"0.6386383",
"0.63849354",
"0.6380008",
"0.63727593",
"0.63656366",
"0.6362341",
"0.635965",
"0.6355407",
"0.6355241",
"0.63472754",
"0.6342476",
"0.63382816",
"0.6336668",
"0.6336361",
"0.6336361",
"0.6325087",
"0.63171065",
"0.6304302",
"0.6296995",
"0.62945104",
"0.62934625",
"0.62877315"
] | 0.0 | -1 |
/ 2.2 ADD CUSTOM FIELDS / | function WPimgAttr_Alt_meta_CustomFields( $form_fields, $post ) {
//output for each language
if(is_array(SELF::$WPimgAttr_Alt_languages)):
// repeat output for each language (exept first one - is default)
foreach (SELF::$WPimgAttr_Alt_languages as $key => $lang) {
if($key > 0):
// get saved value
$var_name = SELF::$WPimgAttr_Alt_prefix . $lang;
$value = get_post_meta($post->ID, $var_name, true);
// create custom field
$form_fields[$var_name] = array(
'value' => $value ? $value : '',
'label' => __( 'Alternative Text', 'WPimgAttr' ) . ' (' . $lang . ')',
'input' => 'text'
);
endif;
}
endif;
// output
return $form_fields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addField();",
"private function addCustomFields() {\n if (function_exists('get_fields')) {\n foreach (self::getPostTypes() as $post_type) {\n register_rest_field($post_type, 'fields', [\n 'get_callback' => function ($post) {\n if (is_object($post)) {\n return get_fields($post->id);\n } elseif (is_array($post) && array_key_exists('id', $post)) {\n return get_fields($post['id']);\n }\n },\n ]);\n }\n }\n }",
"protected function addFields()\n {\n $groupCustomOptionsName = CustomOptions::GROUP_CUSTOM_OPTIONS_NAME;\n $optionContainerName = CustomOptions::CONTAINER_OPTION;\n $commonOptionContainerName = CustomOptions::CONTAINER_COMMON_NAME;\n\n // Add fields to the option\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'] = array_replace_recursive(\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'],\n $this->getOptionFieldsConfig()\n );\n\n // Add fields to the values\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'] = array_replace_recursive(\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'],\n // $this->getValueFieldsConfig()\n // );\n }",
"public function add_field( $name, $field ) {\n\n\t\t$this->custom_fields[ $name ] = $field;\n\n\t}",
"function createCustomField($fieldName, $fieldType, $configId, $attributes = NULL,\n $default_value = '', $possible_values = '') {\n global $fieldList;\n\n if (NULL == $attributes) {\n $attributes = array();\n\n $attributes[\"access_level_r\"] = 10;\n $attributes[\"access_level_rw\"] = 25;\n $attributes[\"require_report\"] = 1;\n $attributes[\"require_update\"] = 1;\n $attributes[\"require_resolved\"] = 0;\n $attributes[\"require_closed\"] = 0;\n $attributes[\"display_report\"] = 1;\n $attributes[\"display_update\"] = 1;\n $attributes[\"display_resolved\"] = 0;\n $attributes[\"display_closed\"] = 0;\n\n echo \"<span class='warn_font'>WARN: using default attributes for CustomField $fieldName</span><br/>\";\n }\n\n $query = \"SELECT id, name FROM `mantis_custom_field_table`\";\n $result = execQuery($query);\n while ($row = mysql_fetch_object($result)) {\n $fieldList[\"$row->name\"] = $row->id;\n }\n\n $fieldId = $fieldList[$fieldName];\n if (!$fieldId) {\n $query2 = \"INSERT INTO `mantis_custom_field_table` \" .\n \"(`name`, `type` ,`access_level_r`,\" .\n \" `access_level_rw` ,`require_report` ,`require_update` ,`display_report` ,`display_update` ,`require_resolved` ,`display_resolved` ,`display_closed` ,`require_closed` \";\n $query2 .= \", `possible_values`, `default_value`\";\n\n $query2 .= \") VALUES ('$fieldName', '$fieldType', '\" . $attributes[\"access_level_r\"] . \"', '\" .\n $attributes[\"access_level_rw\"] . \"', '\" .\n $attributes[\"require_report\"] . \"', '\" .\n $attributes[\"require_update\"] . \"', '\" .\n $attributes[\"display_report\"] . \"', '\" .\n $attributes[\"display_update\"] . \"', '\" .\n $attributes[\"require_resolved\"] . \"', '\" .\n $attributes[\"display_resolved\"] . \"', '\" .\n $attributes[\"display_closed\"] . \"', '\" .\n $attributes[\"require_closed\"] . \"'\";\n\n $query2 .= \", '$possible_values', '$default_value'\";\n $query2 .= \");\";\n\n #echo \"DEBUG INSERT $fieldName --- query $query2 <br/>\";\n\n $result2 = execQuery($query2);\n $fieldId = mysql_insert_id();\n\n #echo \"custom field '$configId' created.<br/>\";\n } else {\n echo \"<span class='success_font'>INFO: custom field '$configId' already exists.</span><br/>\";\n }\n\n // add to codev_config_table\n Config::getInstance()->setValue($configId, $fieldId, Config::configType_int);\n}",
"function create_field($field)\n{\n}",
"public function addField(Field $field);",
"public function addField(Field $field);",
"function brag_add_meta_field($args) {\n \n $args['fields']['referral'] = '';\n $args['fields']['notes'] = '';\n $args['fields']['type'] = '';\n $args['fields']['lead_status'] = '';\n\n return $args;\n}",
"function createCustomField($fieldName, $fieldType, $configId, $attributes = NULL,\n $default_value = '', $possible_values = '') {\n global $fieldList;\n\n if (NULL == $attributes) {\n $attributes = array();\n\n $attributes[\"access_level_r\"] = 10;\n $attributes[\"access_level_rw\"] = 25;\n $attributes[\"require_report\"] = 1;\n $attributes[\"require_update\"] = 1;\n $attributes[\"require_resolved\"] = 0;\n $attributes[\"require_closed\"] = 0;\n $attributes[\"display_report\"] = 1;\n $attributes[\"display_update\"] = 1;\n $attributes[\"display_resolved\"] = 0;\n $attributes[\"display_closed\"] = 0;\n\n echo \"<script type=\\\"text/javascript\\\">console.warn(\\\"WARN: using default attributes for CustomField $fieldName\\\");</script>\";\n }\n\n $query = \"SELECT id, name FROM `mantis_custom_field_table`\";\n $result = SqlWrapper::getInstance()->sql_query($query);\n if (!$result) {\n throw new Exception (\"create custom field FAILED\");\n }\n while ($row = mysql_fetch_object($result)) {\n $fieldList[\"$row->name\"] = $row->id;\n }\n\n $fieldId = $fieldList[$fieldName];\n if (!$fieldId) {\n $query2 = \"INSERT INTO `mantis_custom_field_table` \" .\n \"(`name`, `type` ,`access_level_r`,\" .\n \" `access_level_rw` ,`require_report` ,`require_update` ,`display_report` ,`display_update` ,`require_resolved` ,`display_resolved` ,`display_closed` ,`require_closed` \";\n $query2 .= \", `possible_values`, `default_value`\";\n\n $query2 .= \") VALUES ('$fieldName', '$fieldType', '\" . $attributes[\"access_level_r\"] . \"', '\" .\n $attributes[\"access_level_rw\"] . \"', '\" .\n $attributes[\"require_report\"] . \"', '\" .\n $attributes[\"require_update\"] . \"', '\" .\n $attributes[\"display_report\"] . \"', '\" .\n $attributes[\"display_update\"] . \"', '\" .\n $attributes[\"require_resolved\"] . \"', '\" .\n $attributes[\"display_resolved\"] . \"', '\" .\n $attributes[\"display_closed\"] . \"', '\" .\n $attributes[\"require_closed\"] . \"'\";\n\n $query2 .= \", '$possible_values', '$default_value'\";\n $query2 .= \");\";\n\n #echo \"DEBUG INSERT $fieldName --- query $query2 <br>\";\n\n $result2 = SqlWrapper::getInstance()->sql_query($query2);\n if (!$result2) {\n throw new Exception (\"create custom field failed: $configId\");\n }\n $fieldId = mysql_insert_id();\n\n #echo \"custom field '$configId' created.<br>\";\n } else {\n echo \"<script type=\\\"text/javascript\\\">console.info(\\\"INFO: custom field '$configId' already exists.\\\");</script>\";\n }\n\n // add to codev_config_table\n Config::getInstance()->setValue($configId, $fieldId, Config::configType_int);\n}",
"function add_custom_field($args) {\n register_rest_field( array(\"post\", \"page\"), 'wpnext', \n array(\n 'get_callback' => array( &$this, 'custom_field_get' ),\n 'update_callback' => array( &$this, 'custom_field_update' ),\n 'schema' => array(\n 'description' => \"Components and listed values.\",\n 'type' => 'object',\n 'context' => array('view', 'edit')\n )\n )\n );\n }",
"public function addCustomFields( $fields )\n {\n\n $customFields = $this->getCustomFields();\n\n foreach ( $fields as $field ) {\n\n if ( ! isset( $customFields[ $field->handle ] ) ) {\n $customFields[ $field->handle ] = $field;\n }\n\n }\n\n $this->_customFields = $customFields;\n\n }",
"public abstract function createFields();",
"function fill_in_additional_list_fields()\r\n\t{\r\n\t}",
"abstract protected function createFields();",
"protected function createFormFields() {\n\t}",
"function add_field($table_name, $field_name, $data_type, $length, $comment = \"\")\r\n{\r\n\tif($length != \"\")\r\n\t{\r\n\t\t$type = $data_type.\"(\".$length.\")\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$type = $data_type;\r\n\t}\r\n\r\n\t$alter = \"ALTER TABLE \".$table_name.\" ADD \".strtoupper($field_name).\" \".strtoupper($type).\" \";\r\n\tdb::query($alter);\r\n\r\n\tif($comment != \"\")\r\n\t{\r\n\t\tif(db::$_dbType == \"ORACLE\")\r\n\t\t{\r\n\t\t\t$comment_sql = \"COMMENT ON COLUMN \".$table_name.\".\".$field_name.\" IS '\".$comment.\"' \";\r\n\t\t}\r\n\t\telseif(db::$_dbType == \"MYSQL\")\r\n\t\t{\r\n\r\n\t\t}\r\n\t\telseif(db::$_dbType == \"MSSQL\")\r\n\t\t{\r\n\r\n\t\t}\r\n\r\n\t\tdb::query($comment_sql);\r\n\t}\r\n}",
"function addToField(\\Foundation\\Form\\Field $field);",
"public function register_field()\n {\n }",
"public function addCustomFields()\n {\n if (!($enabled_custom_fields = $this->getDataManager()->getOption('custom_fields'))) {\n $enabled_custom_fields = array();\n }\n if (!($enabled_profile_fields = $this->getDataManager()->getOption('custom_fields_additional'))) {\n $enabled_profile_fields = array();\n }\n ?>\n <fieldset data-rm-target=\"#custom-fields .custom-field-select option\" id=\"profile-fields\" class=\"checkbox-list rm-ctrl syncstate\"<?php echo !$this->getDataManager()->getOption('enable_sync') ? ' disabled=\"disabled\"' : '' ?>>\n <?php foreach ($this->custom_fields as $custom_field): ?>\n <div>\n <label>\n <input class=\"profile-field-checkbox\" type=\"checkbox\" name=\"<?php echo $this->getViewKey().'[custom_fields_additional][]' ?>\" value=\"<?php echo $custom_field->getId() ?>\"<?php echo in_array($custom_field->getId(), $enabled_profile_fields) ? ' checked=\"checked\"' : '' ?> />\n <?php echo $custom_field->getName() ?> (<?php _e('customfield.type.'.$custom_field->getFieldType(), 'mgrt-wordpress') ?>)\n </label>\n </div>\n <?php endforeach; ?>\n </fieldset>\n <p class=\"description\"><?php _e('form.sync.field.custom.more.help', 'mgrt-wordpress') ?></p>\n <?php\n }",
"function add_additional_field($details) {\r\n\t\t$sql = \"INSERT INTO sys_man_additional_fields (field_name, field_type, field_placement, group_id) VALUES (?, ?, ?, ?)\";\r\n\t\t$data=array(\"$details->field_name\", \"$details->field_type\", \"$details->field_placement\", \"$details->group_id\");\r\n\t\t$query = $this->db->query($sql, $data);\r\n\t\treturn;\r\n\t}",
"public function addField($field_name){\n\t\t$this->Fields[$field_name] = new Field($field_name);\n\t}",
"function add_field($field, $value) {\n // sent to paypal as POST variables. If the value is already in the \n // array, it will be overwritten.\n \n $this->fields[\"$field\"] = $value;\n }",
"function add_sections_and_fields(): void {}",
"function create_custom_fields() {\n // Get all components to be listed\n $this->get_components();\n // Add components meta box\n if ( function_exists( 'add_meta_box' ) ) {\n foreach ( $this->postTypes as $postType ) {\n add_meta_box( 'wpnext', 'WPNext Builder', array( &$this, 'display_custom_fields' ), $postType, 'normal', 'high' );\n }\n }\n }",
"function add_field($field, $value) \n {\n // sent to paypal as POST variables. If the value is already in the \n // array, it will be overwritten.\n \n $this->fields[\"$field\"] = $value;\n }",
"function add_field($field, $value) {\n // sent to paypal as POST variables. If the value is already in the\n // array, it will be overwritten.\n\n $this->fields[\"$field\"] = $value;\n }",
"private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }",
"public function addField($data) {\n $field = $data['field'];\n $class = 'AetherORM' . ucfirst($data['type']) . 'Field';\n $this->fields[$field] = new $class($data['default'], $data['null']);\n }",
"public function addCustomField()\r\n {\r\n $data['field'] = array('custom_field_id' => '', 'label' => '', 'value' => '');\r\n echo $this->load->view('admin/jobs/custom-field', $data, TRUE);\r\n }",
"function add_form_field($field, $error = \"\", $prefill = \"\"){\n\t\t$this->form_row($field, $error , $prefill );\n\t}",
"protected function addOrderCustomFields(): void\n {\n $custom_field_set_id = md5('Viacash custom_field_set');\n\n $this->container->get('custom_field_set.repository')->upsert(\n [\n [\n 'id' => $custom_field_set_id,\n 'name' => 'custom_viacash',\n 'config' => [\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Viacash\", \"en-GB\" => \"Viacash\"]),\n \"translated\" => true\n ],\n 'active' => true,\n 'global' => false,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field_set_relation.repository')->upsert(\n [\n [\n 'id' => md5('Viacash custom_field_set_relation'),\n 'customFieldSetId' => $custom_field_set_id,\n 'entityName' => 'order',\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_checkout_token'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_checkout_token',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Checkout-Token\", \"en-GB\" => \"Viacash Checkout-Token\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 1\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_slip_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_slip_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Slip-ID\", \"en-GB\" => \"Viacash Slip-ID\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 2\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_division_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_division_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Interne Barzahlen Divisions-Nummer\", \"en-GB\" => \"Internal Viacash division number\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 3\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_is_sandboxed'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_is_sandboxed',\n 'type' => 'switch',\n 'config' => [\n 'type' => 'switch',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Sandbox-Transaktion\", \"en-GB\" => \"Viacash sandboxed transaction\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"switch\",\n \"customFieldPosition\" => 4\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_refundable_amount'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_refundable_amount',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\n \"de-DE\" => \"Verbleibender per Barzahlen erstattbarer Betrag\",\n \"en-GB\" => \"Remaining amount that can be refunded with Viacash\",\n ]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_validity_days'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_validity_days',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Gültigkeitsdauer des Zahlscheins in Tagen\", \"en-GB\" => \"Days of payslip validity.\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n }",
"function my_custom_field($field, $value){\n\tprint_r($field);\n\tprint_r($value);\n\n}",
"function my_custom_field($field, $value){\r\n\tprint_r($field);\r\n\tprint_r($value);\r\n\r\n}",
"public function addPostFields(array $post_data) {}",
"public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}",
"public function add_custom_fields($custom_fields, $category_id, $product_id)\n {\n foreach ($custom_fields as $key => $val) {\n if($val) {\n $key = str_replace(['house_', 'job_', 'description_'], ['', '', ''], $key);\n $field_id = $this->get_field_id($key, $category_id);\n $data = array(\n 'field_id' => $field_id,\n 'product_id' => $product_id,\n 'product_filter_key' => strtolower($key),\n 'field_value' => $val,\n );\n $this->db->insert('custom_fields_product', $data);\n }\n }\n }",
"function acf_add_local_fields($fields = array())\n{\n}",
"public function addFields($fields ) {\n foreach( $fields as $field ) {\n $this->addField( $field );\n }\n }",
"public function addExtraField($field,$value){\n $this->extraFields[$field] = $value;\n }",
"function add_custom_fields_columns ( $columns ) {\n return array_merge ( $columns, array (\n 'ingredienti' => __ ( 'Ingredienti' ),\n 'prezzo' => __ ( 'Prezzo' )\n ) );\n}",
"public function testFields()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$fdef = array(\r\n\t\t\t'title'=>'unittest_custom', \r\n\t\t\t'type'=>'text', \r\n\t\t\t'subtype'=>'32', \r\n\t\t\t'system'=>false, \r\n\t\t\t'use_when'=>\"owner_id:\".$this->user->id\r\n\t\t);\r\n\t\t$newName = $obj->addField(\"unittest_custom\", $fdef);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertNotEquals($field, false);\r\n\t\t$this->assertEquals($field->getUseWhen(), \"owner_id:\".$this->user->id);\r\n\t\t$obj->removeField(\"unittest_custom_owner_id_minus1\");\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertTrue(empty($field));\r\n\t}",
"public function addField( $table, $field, $type, $default=NULL );",
"function register_fields(string $section, array $fields)\n {\n }",
"function simply_add_custom_general_fields()\n{\n // You can create text, textarea, select, checkbox and custom fields\n global $woocommerce, $post;\n // Custom fields will be created here...\n ?>\n <div class=\"options_group\">\n <p class=\"form-field custom_field_type\">\n <label for=\"custom_field_family_code\"><?php echo __('Family Code', 'p18a'); ?></label>\n <span class=\"wrap\">\n\t\t<?php\n $family_code = get_post_meta($post->ID, 'family_code', true);\n\n echo $family_code;\n\n ?>\n\n </p>\n <p class=\"form-field custom_field_type\">\n <label for=\"custom_field_mpartname\"><?php echo __('Mpartname', 'p18a'); ?></label>\n <span class=\"wrap\">\n\t\t<?php\n\t\t$mpartname = get_post_meta($post->ID, 'mpartname', true);\n\n\t\techo $mpartname;\n\n\t\t?>\n\n </p>\n </div>\n <?php\n}",
"function cp_add_core_fields($form_id) {\r\n\tglobal $wpdb;\r\n\r\n // check to see if any rows already exist for this form. If so, don't insert any data\r\n $wpdb->get_results( $wpdb->prepare( \"SELECT form_id FROM \" . $wpdb->prefix . \"cp_ad_meta WHERE form_id = %s\", $form_id ) );\r\n\r\n // no fields yet so let's add the defaults\r\n if ( $wpdb->num_rows == 0 ) {\r\n\r\n $insert = \"INSERT INTO \" . $wpdb->prefix . \"cp_ad_meta\" .\r\n \" (form_id, field_id, field_req, field_pos) \" .\r\n \"VALUES ('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('1'). \"','\" // post_title\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('1')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('2'). \"','\" // cp_price\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('2')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('3'). \"','\" // cp_street\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('3')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('4'). \"','\" // cp_city\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('4')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('5'). \"','\" // cp_state\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('5')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('6'). \"','\" // cp_country\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('6')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('7'). \"','\" // cp_zipcode\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('7')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('8'). \"','\" // tags_input\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('8')\r\n . \"'),\"\r\n . \"('\"\r\n . $wpdb->escape($form_id). \"','\"\r\n . $wpdb->escape('9'). \"','\" // post_content\r\n . $wpdb->escape('1'). \"','\"\r\n . $wpdb->escape('9')\r\n . \"')\";\r\n\r\n $results = $wpdb->query( $insert );\r\n\r\n }\r\n}",
"function addFields($entity, $name, $not_for_field_list = \"\")\n{\n $fields = array();\n $page_info = getPageInfo($entity['pagename']);\n global $db;\n \n $link = getDBLink();\n \n //do we know where to look at all?\n if ($name == \"\") {\n $entity['fields'] = array();\n return $entity;\n }\n \n // -- first, we see what we find in the database's metadata\n \n //test for Information_schema.columns (SQL-92 standard)\n $client_api = explode('.', mysqli_get_server_info(getDBLink()));\n if ($client_api[0] >= 5) {\n //test for existence of/access to INFORMATION_SCHEMA database\n $info_schema_accessible = false;\n $db_list = pp_run_query('Show databases;');\n foreach($db_list as $row){\n if ($row[\"Database\"] == \"information_schema\") {\n $info_schema_accessible = true;\n }\n }\n if ($info_schema_accessible) {\n // information_schema exists\n //we align the columns that we'd also find in the \"SHOW COLUMNS\"-\n //Query (see below) to the standard query with \" AS \"\n $query = \" SELECT\nCOLUMN_NAME AS `Field`,\nCOLUMN_KEY AS `Key`,\nCOLUMN_TYPE AS `Type`,\nCHARACTER_MAXIMUM_LENGTH,\nNUMERIC_PRECISION,\nCOLUMN_DEFAULT AS `Default`,\nEXTRA AS `Extra`,\nCOLUMN_COMMENT\nFROM information_schema.COLUMNS WHERE TABLE_NAME = '\".$entity[\"tablename\"].\"' AND TABLE_SCHEMA = '\".$db.\"'\";\n }\n }\n //if we can't use it, do it the old way, with less information, sadly\n if ($query == \"\") {\n $query = \"SHOW COLUMNS FROM `\".$entity[\"tablename\"].\"`\";\n }\n \n $res = pp_run_query($query);\n $i = 0;\n foreach($res as $row){\n \n //primary key\n if ($row['Key']=='PRI') {\n if ($entity['pk']!=\"\") {\n // seems to be a 2-field PK - not supported!\n $entity['pk_multiple'] = true;\n }\n $entity[\"pk\"] = $row['Field'];\n //overwriting the first!\n $entity[\"pk_type\"] = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n }\n \n \n if (!eregi($row['Field'], $not_for_field_list)) {\n //determine length - use only \"Type\" due to http://polypager.nicolashoening.de/?bugs&nr=318\n //$len = $row['CHARACTER_MAXIMUM_LENGTH'];\n //if ($len == \"\" or $len == \"NULL\") {\n // $len = $row['NUMERIC_PRECISION'];\n //}\n //those fields are not there when we said SHOW COLUMNS, so...\n //if ($len == \"\" or $len == \"NULL\") {\n $hits = array();\n eregi('[0-9]+',$row['Type'],$hits);\n $len = $hits[0];\n //}\n //support sets or enums,\n //but we save the valuelist - PolyPager can handle those\n if (eregi('^set\\(', $row['Type']) or eregi('^enum\\(', $row['Type'])) {\n $type = preg_replace('@\\((\\'.+\\'\\,?)+(\\'.+\\')\\)$@', '', $row['Type']);\n eregi('\\((\\'.*\\')\\)', $row['Type'], $hits);\n $hlist = explode(',', $hits[1]);\n $valuelist = array();\n //remove '' on outsets\n foreach($hlist as $l) $valuelist[] = trim($l,\"'\");\n $valuelist = implode(',', $valuelist);\n $valuelist = str_replace(\",,\", \",\", $valuelist);\n } else {\n $type = preg_replace('@\\([0-9]+\\,?[0-9]*\\)$@', '', $row['Type']);\n $valuelist = \"\";\n }\n $field = array(\"name\"=>$row['Field'],\n \"data_type\"=>$type,\n \"size\"=>$len,\n \"order_index\"=>''.$i,\n \"help\"=>$row['COLUMN_COMMENT'],\n \"default\"=>$row['Default'],\n \"valuelist\"=>$valuelist);\n \n //if default is CURRENT_TIMESTAMP, then retrieve it\n if ($type=\"timestamp\" and $row['Default']==\"CURRENT_TIMESTAMP\") {\n $field['default'] = date(\"Y-m-d H:i:s\");\n }\n \n if ($row['Extra'] == 'auto_increment') {\n $entity['hidden_form_fields'].=','.$row['Field'];\n $field['auto'] = 1;\n } else {\n $field['auto'] = 0;\n }\n \n //IMPORTANT: In MySQL we code a boolean as int(1) !!!\n if (($row['Type'] == \"int(1)\" or $row['Type'] == \"tinyint(1)\")) {\n $field[\"data_type\"] = \"bool\";\n }\n \n //set some defaults\n $field['formgroup'] = \"\";\n \n $fields[count($fields)] = $field;\n \n $i++;\n }\n \n }\n \n // -- now we enrich with data from the _sys_fields table\n if ($page_info != \"\") {\n $query = \"SELECT * FROM _sys_fields WHERE pagename = '\".$page_info[\"name\"].\"'\";\n $res = pp_run_query($query);\n foreach($res as $row){\n for ($i=0; $i<count($fields); $i++) {\n \n if ($fields[$i][\"name\"] == $row[\"name\"]) {\n $fields[$i][\"label\"] = $row[\"label\"];\n $fields[$i][\"validation\"] = $row[\"validation\"];\n if ($fields[$i][\"valuelist\"] == \"\") {\n //if from db (set/enum-type), it shouldn't be overwritten\n $fields[$i][\"valuelist\"] = stripCSVList($row[\"valuelist\"]);\n }\n $fields[$i][\"not_brief\"] = $row[\"not_brief\"];\n $fields[$i][\"order_index\"] = $row[\"order_index\"];\n $fields[$i][\"embed_in\"] = $row[\"embed_in\"];\n }\n if (eregi('int',$fields[$i][\"data_type\"]) and $fields[$i][\"size\"] != 1) {\n $fields[$i][\"validation\"] = 'number';\n }\n }\n }\n }\n \n // group field : valuelist stuff\n for ($i=0; $i<count($fields); $i++) {\n // remember from where the values come\n if ($fields[$i][\"valuelist\"] != \"\") {\n $fields[$i]['valuelist_from_db'] = true;\n } else {\n $fields[$i]['valuelist_from_db'] = false;\n }\n }\n \n uasort($fields,\"cmpByOrderIndexAsc\");\n $entity[\"fields\"] = $fields;\n \n return $entity;\n}",
"function register_field(string $section, array $field)\n {\n }",
"public function makeFieldList() {}",
"public function testUpdateOrderCustomFields()\n {\n }",
"function imbaf_properties_create_add_fields(){\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[imbaf_property_type]\">Typ</label>\n\n <select name=\"term_meta[imbaf_property_type]\">\n\n <?php\n\n foreach($this -> property_types as $property){\n\n ?> <option style=\"width:100%;\" value=\"<?php echo $property['value']; ?>\"><?php echo $property['label']; ?></option> <?php\n\n }\n\n\n ?>\n </select>\n\n <p class=\"description\"><?php _e('Vergleichswert-Typ','imb_affiliate'); ?></p>\n\n\n\n <label for=\"term_meta[imbaf_property_icon]\">Icon</label>\n <input type=\"text\" name=\"term_meta[imbaf_property_icon]\">\n\n <p class=\"description\"><?php _e('Font Awesome Icon','imb_affiliate'); ?></p>\n\n\n <label for=\"term_meta[imbaf_property_prefix]\"><?php _e('Präfix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_prefix]\">\n\n <p class=\"description\"><?php _e('Vorgestellter Wert (ca.)','imb_affiliate'); ?></p>\n\n <label for=\"term_meta[imbaf_property_suffix]\"><?php _e('Suffix','imb_affiliate'); ?></label>\n <input type=\"text\" name=\"term_meta[imbaf_property_suffix]\">\n <p class=\"description\"><?php _e('Nachgestellter Wert (z.B. kg, MhZ etc.)','imb_affiliate'); ?></p>\n\n\n\n </div>\n <?php\n\n\n }",
"protected function addField($name, $type, $id, $auto_inc){\n\t\t$this->fields[$name]=array(\"type\" => $type, \"id\" => $id, \"auto\" => $auto_inc);\n\t\tif ($id){\n\t\t\t$this->id=$name;\n\t\t}\n\t}",
"public function getFormCustomFields(){\n\t}",
"public function getCustomFields() {\n }",
"public function getCustomFields() {\n }",
"private function exampleFields()\n {\n }",
"public function create_custom_fields() {\n \n /* Custom H1 */\n $custom_h1 = new_cmb2_box( array(\n 'id' => '_custom_h1',\n 'title' => 'Custom H1',\n 'object_types' => array_keys( get_post_types( '', 'names' ) ),\n 'context' => 'normal',\n 'priority' => 'high',\n 'show_names' => true\n ) );\n $custom_h1->add_field( array(\n 'id' => '_custom_h1',\n 'desc' => 'Custom Title',\n 'type' => 'text',\n ) );\n }",
"public function AddField()\n {\n echo 'Создалась VirtualCategory - метод Field <hr>';\n }",
"function acf_add_local_field($field, $prepared = \\false)\n{\n}",
"function add($data){\n if(array_key_exists($data['id'], $this->fields)){\n exit(\"Field with ID: '\".$data['id'].\"' already exists.\");\n }\n if(!isset($data['validate'])){\n $data['validate'] = false;\n }\n if(!isset($data['inline'])){\n $data['inline'] = null;\n }\n if(!isset($data['value'])){\n $data['value'] = null;\n }\n if(!isset($data['readonly'])){\n $data['readonly'] = false;\n }\n\n $this->fields[$data['id']] = $data;\n }",
"function db_add_field(&$ret, $table, $field, $spec, $keys_new = array()) {\n $fixnull = FALSE;\n if (!empty($spec['not null']) && !isset($spec['default'])) {\n $fixnull = TRUE;\n $spec['not null'] = FALSE;\n }\n $query = 'ALTER TABLE {'. $table .'} ADD ';\n $query .= _db_create_field_sql($field, _db_process_field($spec));\n if (count($keys_new)) {\n $query .= ', ADD '. implode(', ADD ', _db_create_keys_sql($keys_new));\n }\n $ret[] = update_sql($query);\n if (isset($spec['initial'])) {\n // All this because update_sql does not support %-placeholders.\n $sql = 'UPDATE {'. $table .'} SET '. $field .' = '. db_type_placeholder($spec['type']);\n $result = db_query($sql, $spec['initial']);\n $ret[] = array('success' => $result !== FALSE, 'query' => check_plain($sql .' ('. $spec['initial'] .')'));\n }\n if ($fixnull) {\n $spec['not null'] = TRUE;\n db_change_field($ret, $table, $field, $field, $spec);\n }\n}",
"protected function _updatefields() {}",
"public function testUpdateExtraFields(): void { }",
"function pnAddressBook_admin_incCustomfields()\r\n{\r\n // Get parameters\r\n $id = pnVarCleanFromInput('id');\r\n\r\n // Confirm authorisation code\r\n if (!pnSecConfirmAuthKey()) {\r\n pnSessionSetVar('errormsg', _BADAUTHKEY);\r\n pnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'main'));\r\n return true;\r\n }\r\n\r\n // Pass to API\r\n if (pnModAPIFunc(__PNADDRESSBOOK__, 'admin', 'incCustomFields', array('id' => $id))) {\r\n // Success\r\n //pnSessionSetVar('statusmsg', _BLOCKLOWER);\r\n }\r\n\r\n // Redirect\r\n pnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'customfields'));\r\n return true;\r\n}",
"public function create_fields() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\t\t$method = $this->determine_method( $v, 'form' );\n\t\t\t\t$name = $v['name'];\n\t\t\t\tif ( $v['type'] == 'info' ) { $name = ''; }\n\t\t\t\tadd_settings_field( $k, $name, $method, $this->token, $v['section'], array( 'key' => $k, 'data' => $v ) );\n\n\t\t\t\t// Let the API know that we have a colourpicker field.\n\t\t\t\tif ( $v['type'] == 'range' && $this->_has_range == false ) { $this->_has_range = true; }\n\t\t\t}\n\t\t}\n\t}",
"public function custom_fields_for_feed_setting() {\n\t\t\n\t\t$fields = array();\n\t\t\n\t\t/* If iContact API credentials are invalid, return the fields array. */\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\treturn $fields;\n\t\t}\n\t\t\n\t\t/* Get available iContact fields. */\n\t\t$icontact_fields = $this->api->get_custom_fields();\n\t\t\n\t\t/* If no iContact fields exist, return the fields array. */\n\t\tif ( empty( $icontact_fields ) || is_wp_error( $icontact_fields ) || ! is_array( $icontact_fields ) ) {\n\t\t\treturn $fields;\n\t\t}\n\t\t\t\n\t\t/* Add iContact fields to the fields array. */\n\t\tforeach ( $icontact_fields as $field ) {\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'label' => $field['publicName'],\n\t\t\t\t'value' => $field['customFieldId']\n\t\t\t);\n\t\t\t\n\t\t}\n\n\t\t/* Add new custom fields to the fields array. */\n\t\tif ( ! empty( $this->_new_custom_fields ) ) {\n\t\t\t\n\t\t\tforeach ( $this->_new_custom_fields as $new_field ) {\n\t\t\t\t\n\t\t\t\t$found_custom_field = false;\n\t\t\t\tforeach ( $fields as $field ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( $field['value'] == $new_field['value'] )\n\t\t\t\t\t\t$found_custom_field = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( ! $found_custom_field )\n\t\t\t\t\t$fields[] = array(\n\t\t\t\t\t\t'label' => $new_field['label'],\n\t\t\t\t\t\t'value' => $new_field['value']\t\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif ( empty( $fields ) ) {\n\t\t\treturn $fields;\n\t\t}\n\t\t\t\t\t\t\n\t\t/* Add \"Add Custom Field\" to array. */\n\t\t$fields[] = array(\n\t\t\t'label' => esc_html__( 'Add Custom Field', 'gravityformsicontact' ),\n\t\t\t'value' => 'gf_custom'\t\n\t\t);\n\t\t\n\t\treturn $fields;\n\t\t\n\t}",
"protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }",
"public function addFields($field_names){\n\t\tforeach($field_names as $field_name){\n\t\t\t$this->Fields[$field_name] = new Field($field_name);\n\t\t}\n\t}",
"public function addField($field) {\n\t\t$this->fields[] = $field;\n\t}",
"function add_specific_form_fields() {\n\t\treturn false;\n\t}",
"function save_customfields($data, array $extra_cols=array())\n\t{\n\t\tforeach (array_keys((array)$this->customfields) as $name)\n\t\t{\n\t\t\tif (!isset($data[$field = $this->get_cf_field($name)])) continue;\n\n\t\t\t$where = array(\n\t\t\t\t$this->extra_id => isset($data[$this->autoinc_id]) ? $data[$this->autoinc_id] : $data[$this->db_key_cols[$this->autoinc_id]],\n\t\t\t\t$this->extra_key => $name,\n\t\t\t);\n\t\t\t$is_multiple = $this->is_multiple($name);\n\n\t\t\t// we explicitly need to delete fields, if value is empty or field allows multiple values or we have no unique index\n\t\t\tif(empty($data[$field]) || $is_multiple || !$this->extra_has_unique_index)\n\t\t\t{\n\t\t\t\t$this->db->delete($this->extra_table,$where,__LINE__,__FILE__,$this->app);\n\t\t\t\tif (empty($data[$field])) continue;\t// nothing else to do for empty values\n\t\t\t}\n\t\t\tforeach($is_multiple && !is_array($data[$field]) ? explode(',',$data[$field]) :\n\t\t\t\t// regular custom fields (!$is_multiple) eg. addressbook store multiple values comma-separated\n\t\t\t\t(array)(!$is_multiple && is_array($data[$field]) ? implode(',', $data[$field]) : $data[$field]) as $value)\n\t\t\t{\n\t\t\t\tif (!$this->db->insert($this->extra_table,array($this->extra_value => $value)+$extra_cols,$where,__LINE__,__FILE__,$this->app))\n\t\t\t\t{\n\t\t\t\t\treturn $this->db->Errno;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\t// no error\n\t}",
"public function testUpdateReplenishmentCustomFields()\n {\n }",
"function add(){\n global $wpdb;\n global $DOPBSP;\n \n $field_id = $_POST['field_id'];\n $position = $_POST['position'];\n $language = $_POST['language'];\n \n $wpdb->insert($DOPBSP->tables->forms_fields_options, array('field_id' => $field_id,\n 'position' => $position,\n 'translation' => $DOPBSP->classes->translation->encodeJSON('FORMS_FORM_FIELD_SELECT_ADD_OPTION_LABEL')));\n $id = $wpdb->insert_id;\n $select_option = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n \n $DOPBSP->views->backend_form_field_select_option->template(array('select_option' => $select_option,\n 'language' => $language));\n \n die();\n }",
"function add_local_field_group(){\n // ...\n }",
"private function add_acf_fields() {\n\t\trequire_once plugin_dir_path( __FILE__ ) . 'wpcampus-network-fields.php';\n\t}",
"public function add_field(form_item $field) {\n $this->_fields[] = $field;\n }",
"function external_url_taxonomy_add_new_meta_field() {\n ?>\n <div class=\"form-field\">\n <label for=\"term_meta[custom_term_meta]\"><?php _e( 'External URL:', 'external_url' ); ?></label>\n <input type=\"text\" name=\"term_meta[custom_term_meta]\" id=\"term_meta[custom_term_meta]\" value=\"\">\n <p class=\"description\"><?php _e( 'Enter a value for this field','external_url' ); ?></p>\n </div>\n<?php\n}",
"static function custom_get_creatable_fields() {\n # use this functionality to get a list of all field in the table\n return self::default_get_updatable_fields();\n }",
"function add_extra_field_to_checkout( $fields ) {\n\n\t$depto_args = wp_parse_args( array(\n\t\t'type' => 'select',\n\t\t'options' => array(\n\t\t\t'Seleccione' => 'Seleccione',\n\t\t\t'Francisco Morazan' => 'Francisco Morazan',\n\t\t\t'Olancho' => 'Olancho',\n\t\t\t'Valle' => 'Valle',\n\t\t),\n\t), $fields['shipping']['shipping_depto'] );\n\n\t$fields['shipping']['shipping_depto'] = $depto_args;\n\t$fields['billing']['billing_depto'] = $depto_args; \n\t$fields['billing']['billing_depto']['priority'] = 80;\n\n\treturn $fields;\n\n}",
"function writeCustomFieldsToDB(&$db,$tprojectID,$tsuiteID,&$hash)\r\n{\r\n $ENABLED = 1;\r\n $NO_FILTERS = null;\r\n\r\n $cfield_mgr = new cfield_mgr($db);\r\n $cf_map = $cfield_mgr->get_linked_cfields_at_design($tprojectID,$ENABLED,\r\n $NO_FILTERS,'testsuite');\r\n $cfield_mgr->design_values_to_db($hash,$tsuiteID,$cf_map);\r\n}",
"public function add(string $fieldName): static;",
"function install_fields() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/fields.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the creation of the default content type fields'));\n }\n return false;\n}",
"function fn_giftreg_add_fields($fields)\n{\n if (empty($fields)) {\n return false;\n }\n\n foreach ($fields as $v) {\n\n if (empty($v['description'])) {\n continue;\n }\n\n // Insert main data\n $field_id = db_query(\"INSERT INTO ?:giftreg_fields ?e\", $v);\n // Insert descriptions\n $_data = array(\n 'object_id' => $field_id,\n 'object_type' => 'F',\n 'description' => $v['description'],\n );\n\n foreach (fn_get_translation_languages() as $_data['lang_code'] => $_v) {\n db_query(\"INSERT INTO ?:giftreg_descriptions ?e\", $_data);\n }\n\n if (substr_count('SR', $v['field_type']) && is_array($v['variants'])) {\n fn_giftreg_add_field_variants($v['variants'], $field_id);\n }\n }\n\n return true;\n}",
"public function create_new_custom_fields( $field, $field_value ) {\n\n\t\tglobal $_gaddon_posted_settings;\n\n\t\t// If no custom fields are set or if the API credentials are invalid, return settings. */\n\t\tif ( empty( $field_value ) || ! $this->initialize_api() ) {\n\t\t\treturn $field_value;\n\t\t}\n\t\n\t\t// Loop through defined custom fields, create new ones.\n\t\tforeach ( $field_value as $index => &$field ) {\n\n\t\t\t// If no custom key is set, skip.\n\t\t\tif ( ! rgar( $field, 'custom_key' ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Prepare field name.\n\t\t\t$custom_key = $field['custom_key'];\n\t\t\t$private_name = strtolower( str_replace(\n\t\t\t\tarray( ' ', '\"', \"'\", '\\\\', '/', '[', ']' ),\n\t\t\t\t'',\n\t\t\t\t$custom_key\n\t\t\t) );\n\t\t\t\n\t\t\t// Prepare new field to add.\n\t\t\t$custom_field = array(\n\t\t\t\t'fieldType' => 'text',\n\t\t\t\t'displayToUser' => 1,\n\t\t\t\t'privateName' => $private_name,\n\t\t\t\t'publicName' => $custom_key\n\t\t\t);\n\n\t\t\t// Add custom field.\n\t\t\t$new_field = $this->api->add_custom_field( $custom_field );\n\n\t\t\t// If field could not be added, log error and skip.\n\t\t\tif ( is_wp_error( $new_field ) ) {\n\t\t\t\t$this->log_error( __METHOD__ . '(): Unable to create custom field; ' . $new_field->get_error_message() );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Replace key for field with new shortcut name and reset custom key.\n\t\t\t$field['key'] = $private_name;\n\t\t\t$field['custom_key'] = '';\n\t\t\t\n\t\t\t// Update POST field to ensure front-end display is up-to-date.\n\t\t\t$_gaddon_posted_settings['custom_fields'][ $index ]['key'] = $private_name;\n\t\t\t$_gaddon_posted_settings['custom_fields'][ $index ]['custom_key'] = '';\n\t\t\t\n\t\t\t// Push to new custom fields array to update the UI.\n\t\t\tif ( version_compare( GFForms::$version, '2.5-dev-1', '<' ) ) {\n\t\t\t\t$this->_new_custom_fields[] = array(\n\t\t\t\t\t'label' => $custom_key,\n\t\t\t\t\t'value' => $private_name,\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn $field_value;\n\t\t\n\t}",
"function mb_fields()\n {\n }",
"function save() {\n //save the added fields\n }",
"public function fieldCreate()\n\t{\n\t\t$fields=array();\n\t\tforeach($this->getTable()->result_array() as $row)\n\t\t{\n\t\t\tif($row['Extra']!=='auto_increment')\n\t\t\t{\n\t\t\t\t$fields[]=array(\n\t\t\t\t\t'field'=>$row['Field'],\n\t\t\t\t\t'max_length'=>preg_match('/varchar/',$row['Type']) ? (preg_replace('/[A-Za-z()]/','',$row['Type'])!=='' ? '\\'maxlength\\'=>'.preg_replace('/[A-Za-z()]/','',$row['Type']).',' : false) : false,\n\t\t\t\t\t'type'=>preg_match('/text/',$row['Type']) ? 'Area' : 'Field',\n\t\t\t\t\t'required'=>$row['Null']=='NO' ? true : false,\n\t\t\t\t\t'input'=>preg_match('/^(password|pass|passwd|passcode)$/i',$row['Field']) ? 'password' : 'text',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}",
"function wds_bb_custom_field_hook() {\n\tif ( ! class_exists( 'FLBuilder' ) ) {\n\t\treturn;\n\t}\n\n\t$plugin = wds_bb_custom_field_plugin();\n\t$plugin->register_hooks();\n}",
"function fmp_attachment_field_credit( $form_fields, $post ) {\n\t$form_fields['fmp-artist-first-name'] = array(\n\t\t'label' => 'Artist First Name',\n\t\t'input' => 'text',\n\t\t'value' => get_post_meta( $post->ID, 'fmp_artist_first_name', true )\n\t);\n\n\t$form_fields['fmp-artist-last-name'] = array(\n\t\t'label' => 'Artist Last Name',\n\t\t'input' => 'text',\n\t\t'value' => get_post_meta( $post->ID, 'fmp_artist_last_name', true )\n\t);\n\n\treturn $form_fields;\n}",
"private function add_field($field_name, $field_description = '', $field_default_value = '', $field_type = 'text')\n\t{\n\t\tif(!is_array($this->fields))\n\t\t\t$this->fields = array();\n\n\t\t$this->fields[$field_name] = array('name' => $field_name, 'description' => $field_description, 'default_value' => $field_default_value, 'type' => $field_type);\n\t}",
"protected function add_additional_fields_schema($schema)\n {\n }",
"public function addMetaFields()\n\t{\n\t\tadd_action('slideshow_add_form_fields', [$this, 'addMetaFieldsToAddForm']);\n\t\tadd_action('slideshow_edit_form_fields', [$this, 'addMetaFieldsToEditForm']);\n\t}",
"public function xadmin_createfield() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$field_title = $args [1];\n\t\t$field_type = $args [2];\n\t\t\n\t\t/* Load Model */\n\t\t$field = $this->getModel ( 'field' );\n\t\t$this->session->returnto ( 'fields' );\n\t\t\n\t\t/* create the form */\n\t\t$field->createNewField ( $field_title, $field_type );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t$plug = Plugins_Fields::getInstance ();\n\t\t\n\t\t/* allow changes to be made by plugin */\n\t\t$plug->trigger ( 'onAfterCreateField', $field );\n\t\t\n\t\t/* allow changes to be made by plugin - extend schema of data table */\n\t\t$plug->trigger ( 'onAfterCreateField_ExtendDataTable', $field );\n\t\t\n\t\t$plug->trigger ( 'onAfterSaveNewField', $field );\n\t\t\n\t\t$this->setArguments ( array ($field->id ) );\n\t\t\n\t\t$this->_registry->setValue ( 'usedTabs', 1 );\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( '_editField' );\n\t}",
"public function addField($fieldName,$fieldValue,$fieldParams=array()){\r\n if($fieldName=='CodSegRegDetalhe_G039' and $fieldValue==\"P\"){ \r\n $this->QtdeTitulos++; \r\n } else if($fieldName==\"QtdeTitCobranca1_C070\"){ //Informa o numero de titulos para o campo QtdeTitCobranca_C070\r\n $fieldValue = $this->QtdeTitulos;\r\n }\r\n //Se o campo informado for o valor do titulo soma com o valor anterior para totalizar\r\n if($fieldName=='VlrNominalTit_G070'){ \r\n //echo \"<h3>\".$fieldValue.\"</h3>\";\r\n $this->vlrTotTitulos = $fieldValue + $this->vlrTotTitulos;\r\n } else if($fieldName==\"ValorTotTitCart1_C071\"){ //Informa a soma dos titulos para o campo ValorTotTitCart1_C071\r\n $fieldValue = $this->vlrTotTitulos;\r\n } \r\n //Soma quantidade de registros do arquivo conforme o tipo 0,1,3,5,9 \r\n if($fieldName=='QtdeRegistArquivo_G056'){ \r\n $fieldValue = $this->QtdeRegsArquivo_G056;\r\n }\r\n //Numero sequencial de registros do lote (Ex: 1P, 2Q, 3P, 4Q)\r\n if($fieldName=='NumSeqRegLote_G038'){\r\n $fieldValue = $this->NumSeqRegLote_G038++;\r\n } \r\n //Soma quantidade de lotes do arquivo conforma o tipo 1,3,4,5\r\n if($fieldName=='TipoRegistro_G003' and $fieldValue>=1 and $fieldValue<=5){\r\n $this->QtdeRegistLote_G057++;\r\n } else if($fieldName=='QtdeRegistLote_G057'){\r\n $fieldValue=$this->QtdeRegistLote_G057;\r\n }\r\n //Verifica se o campo informado existe no dataset\r\n if(array_key_exists($fieldName, $this->dataSet)){\r\n $this->castType = new castType($this->dataSet[$fieldName]);\r\n \r\n //var_dump($this->dataSet[$fieldName]); exit;\r\n //var_dump($this->castType->value($fieldValue)); exit;\r\n \r\n if($this->castType->value($fieldValue)['status']){\r\n $this->lineArray[$fieldName]=$this->castType->value($fieldValue)['retorno'];\r\n $this->lineString .= $this->castType->value($fieldValue)['retorno'];\r\n //$this->lineString .= \"-\".$this->castType->value($fieldValue)['retorno']; \r\n }\r\n }else{//se nao existe o campo no dataset verifica qual o nome mais próximo para o campo \r\n $words = array_keys($this->dataSet);\r\n $msg = \"Campo \".$fieldName.\" inexistente, o mais proximo seria o campo \".$this->wordMatch($words, $fieldName, 2);\r\n $this->Exception($msg);\r\n $this->logMsg($msg);\r\n return $msg;\r\n }\r\n }",
"function add_vendor_custom_fields() {\n\n\twp_nonce_field( basename( __FILE__ ), 'vendor_custom_fields_nonce' );\n\t?>\n\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-firstname\"><?php esc_html_e( 'First Name', 'woocommerce-product-vendors' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" class=\"input-text\" name=\"firstname\" id=\"wcpv-firstname\" value=\"<?php if ( ! empty( $_POST['firstname'] ) ) echo esc_attr( trim( $_POST['firstname'] ) ); ?>\" tabindex=\"1\" />\n\t</div>\n\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-lastname\"><?php esc_html_e( 'Last Name', 'woocommerce-product-vendors' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" class=\"input-text\" name=\"lastname\" id=\"wcpv-lastname\" value=\"<?php if ( ! empty( $_POST['lastname'] ) ) echo esc_attr( trim( $_POST['lastname'] ) ); ?>\" tabindex=\"2\" />\n\t</div>\n\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-date_of_birth\"><?php esc_html_e( 'Date of birth', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"date\" name=\"date_of_birth\" id=\"wcpv-date_of_birth\" value=\"<?php if ( ! empty( $_POST['date_of_birth'] ) ) echo esc_attr( trim( $_POST['date_of_birth'] ) ); ?>\" placeholder=\"DD / MM / YY\" />\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-address\"><?php esc_html_e( 'Personal Address', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"address\" id=\"wcpv-address\" value=\"<?php if ( ! empty( $_POST['address'] ) ) echo esc_attr( trim( $_POST['address'] ) ); ?>\" />\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-city\"><?php esc_html_e( 'City', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"city\" id=\"wcpv-city\" value=\"<?php if ( ! empty( $_POST['city'] ) ) echo esc_attr( trim( $_POST['city'] ) ); ?>\" />\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-zipcode\"><?php esc_html_e( 'Zip', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"zipcode\" id=\"wcpv-zipcode\" value=\"<?php if ( ! empty( $_POST['zipcode'] ) ) echo esc_attr( trim( $_POST['zipcode'] ) ); ?>\" />\n\t</div>\n\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-taxid\"><?php esc_html_e( 'Tax ID', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"taxid\" id=\"wcpv-taxid\" value=\"<?php if ( ! empty( $_POST['taxid'] ) ) echo esc_attr( trim( $_POST['taxid'] ) ); ?>\" />\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-business_address\"><?php esc_html_e( 'Business Address', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"business_address\" id=\"wcpv-business_address\" value=\"<?php if ( ! empty( $_POST['business_address'] ) ) echo esc_attr( trim( $_POST['business_address'] ) ); ?>\" />\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-bcity\"><?php esc_html_e( 'Business City', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"bcity\" id=\"wcpv-bcity\" value=\"<?php if ( ! empty( $_POST['bcity'] ) ) echo esc_attr( trim( $_POST['bcity'] ) ); ?>\" />\n\t</div>\n\t<div class=\"form-field\">\n\t\t<label for=\"wcpv-bzipcode\"><?php esc_html_e( 'Business Zip', 'stillactive' ); ?> <span class=\"required\">*</span></label>\n\t\t<input type=\"text\" name=\"bzipcode\" id=\"wcpv-bzipcode\" value=\"<?php if ( ! empty( $_POST['bzipcode'] ) ) echo esc_attr( trim( $_POST['bzipcode'] ) ); ?>\" />\n\t</div>\n\n\t<?php\n}",
"public function addCustomField($index, $value) {\n $this->customField[$index] = $value;\n }",
"function _addMetadataFields()\n {\n $config =& NDB_Config::singleton();\n $this->dateOptions = array(\n 'language' => 'en',\n 'format' => 'YMd',\n 'minYear' => $config->getSetting('startYear'),\n 'maxYear' => $config->getSetting('endYear'),\n 'addEmptyOption' => true,\n 'emptyOptionValue' => null\n );\n\n $this->form->addElement('date', 'Date_taken', 'Date of Administration', $this->dateOptions);\n\n $examiners = $this->_getExaminerNames();\n $this->form->addElement('select', 'Examiner', 'Radiologist', $examiners);\n\n \t$this->form->addGroupRule('Date_taken', 'Date of Administration is required', 'required');\n\n $this->form->registerRule('checkdate', 'callback', '_checkDate');\n $this->form->addRule('Date_taken', 'Date of Administration is invalid', 'checkdate');\n\n $this->form->addRule('Examiner', 'Examiner is required', 'required');\n }",
"public function buildFields()\n {\n $this->addField('name', 'kuma_menu.menu.adminlist.field.name', true);\n }",
"public function testAddCustomFields(){\n $constituentFields = new ConstituentFields();\n $constituentFields->addFields(array(1211=>\"test\"));\n $xml = $constituentFields->generateXML();\n $xmlObject = simplexml_load_string($xml);\n $consField = $xmlObject->children()->cons_field;\n $this->assertNotEquals(empty($consField), true);\n $consFieldXML = $consField->asXML();\n $expectation = '<cons_field id=\"1211\"><value>test</value></cons_field>';\n $this->assertEquals($expectation, $consFieldXML);\n }",
"public function addField(DataField $field)\r\n\t{\r\n\t\t$this->fields[] = $field;\r\n\t\tif ($field instanceOf TableField && $field->isPrimaryKey)\r\n\t\t{\r\n\t\t\t$this->primaryKey = $field->name;\r\n\t\t}\r\n\t}",
"function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}"
] | [
"0.8254478",
"0.7122423",
"0.71163917",
"0.7104441",
"0.7024229",
"0.7019351",
"0.7013509",
"0.7013509",
"0.7008495",
"0.7005112",
"0.69479126",
"0.6937515",
"0.69035953",
"0.6886714",
"0.6862101",
"0.68538237",
"0.6853246",
"0.6822653",
"0.6821339",
"0.68084425",
"0.68017447",
"0.67856175",
"0.6762943",
"0.6757345",
"0.6746679",
"0.67286915",
"0.6688032",
"0.66814536",
"0.6680289",
"0.66625136",
"0.6644636",
"0.66333675",
"0.663018",
"0.661926",
"0.6598891",
"0.65987676",
"0.6593601",
"0.6593361",
"0.6586738",
"0.65795475",
"0.6531369",
"0.6527435",
"0.65123314",
"0.64913476",
"0.6491231",
"0.64791405",
"0.64771914",
"0.6466285",
"0.6460472",
"0.64595866",
"0.6457816",
"0.6456898",
"0.6456575",
"0.644902",
"0.644902",
"0.6446578",
"0.64402455",
"0.64312816",
"0.6416046",
"0.64104694",
"0.64001924",
"0.63906014",
"0.635145",
"0.6346367",
"0.63204473",
"0.63126886",
"0.6304566",
"0.6304498",
"0.63021135",
"0.62953675",
"0.62934446",
"0.62934047",
"0.6288345",
"0.62872255",
"0.62828857",
"0.62701625",
"0.62648946",
"0.6263498",
"0.62631625",
"0.626222",
"0.6255647",
"0.6253768",
"0.6252247",
"0.6250238",
"0.6240358",
"0.62354755",
"0.623278",
"0.6232698",
"0.62276644",
"0.6225107",
"0.6218786",
"0.6215826",
"0.6213906",
"0.6212507",
"0.62062436",
"0.6192602",
"0.619173",
"0.616701",
"0.61647785",
"0.61568856",
"0.6154121"
] | 0.0 | -1 |
/ 2.3 SAVE METABOXES / | public function WPimgAttr_Alt_meta_Attachments_Save($post_id) {
if( isset( $_POST['attachment'] ) ):
//Not save if the user hasn't submitted changes
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ):
return;
endif;
// Verifying whether input is coming from the proper form
if ( ! wp_verify_nonce ( $_POST['WPimgAttr_Alt_lang_de'] ) ):
return;
endif;
// Making sure the user has permission
if( 'post' == $_POST['attachment'] ):
if( ! current_user_can( 'edit_post', $post_id ) ):
return;
endif;
endif;
endif;
// save fields
SELF::WPimgAttr_Alt_saveAltAttributes($post_id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function save_meta() {}",
"function saveMetadata(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $metadataJSON = $this->generateJSON();\n\t\t \n\t\t $where = \"source_id = '\".$this->penelopeTabID.\"' \";\n\t\t $db->delete(\"export_tabs_meta\", $where);\n\t\t \n\t\t if(!$this->tableGroupID){\n\t\t\t\t$this->tableGroupID = false;\n\t\t }\n\t\t if(!$this->tablePage){\n\t\t\t\t$this->tablePage = false;\n\t\t }\n\t\t \n\t\t if($this->tablePage < 1){\n\t\t\t\tif(strstr($this->tableID, \"/\")){\n\t\t\t\t\t $tableEx = explode(\"/\", $this->tableID);\n\t\t\t\t\t $this->tablePage = $tableEx[1];\n\t\t\t\t\t $this->tableGroupID = $tableEx[0];\n\t\t\t\t}\n\t\t }\n\t\t if(strstr($this->tableGroupID, \"/\")){\n\t\t\t\t$tableEx = explode(\"/\", $this->tableGroupID);\n\t\t\t\t$this->tableGroupID = $tableEx[0];\n\t\t }\n\t\t \n\t\t $data = array(\t\"source_id\" => $this->penelopeTabID,\n\t\t\t\t\t\t\t\t\"tableID\" => $this->tableID,\n\t\t\t\t\t\t\t\t\"tableGroupID\" => $this->tableGroupID,\n\t\t\t\t\t\t\t\t\"page\" => $this->tablePage,\n\t\t\t\t\t\t\t\t\"title\" => $this->tableName,\n\t\t\t\t\t\t\t\t\"published\" => $this->published,\n\t\t\t\t\t\t\t\t\"pub_created\" => $this->pubCreated,\n\t\t\t\t\t\t\t\t\"pub_update\" => $this->pubUpdate,\n\t\t\t\t\t\t\t\t\"metadata\" => $metadataJSON\n\t\t\t\t\t\t );\n\t\t \n\t\t $db->insert(\"export_tabs_meta\", $data);\n\t }",
"function saveVister()\n {\n \n }",
"function save()\n {\n }",
"function save()\n {\n }",
"public function save():void;",
"function save();",
"function save();",
"function storePackageContents()\n {\n }",
"function persist() ;",
"protected function save_meta() {\n\t\t// save report meta details\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->get_meta() );\n\t}",
"function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\n//echo '<textarea style=\"width:800px;height:600px;\">';print_r( $_POST['_translation'] );echo '</textarea>';\n//die('dead');\n\n\t\t\t// Stash all the post meta\n\t\t\tif ( isset( $_POST['_translation'] ) ) {\n\t\t\t\t$_translation = $_POST['_translation'];\n\t\t\t\tdelete_post_meta( $post_ID, '_translation' );\n\t\t\t\tforeach( $_translation as $key => $trans ) {\n\t\t\t\t\t$trans = wp_kses( $trans, '', '' );\n\t\t\t\t\tif ( $trans != '' )\n\t\t\t\t\t\tadd_post_meta( $post_ID, '_translation', $trans );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public final function save() {\n\t\t\treturn SERIA_Meta::save($this);\n\t\t}",
"private function _saveExt() {\r\n\r\n }",
"function meta_box_save_func_store($post_id){\n\n\t# Doing autosave then return.\n\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\n\t\treturn;\n\n\t# If the nonce is not present there or we can not versify it.\n\tif ( !isset($_POST['product_nonce_name']) || !wp_verify_nonce($_POST['product_nonce_name'], 'product_nonce_action' ))\n\t\treturn;\n\n\t# Save Author Name \n\tif (isset($_POST['author_name']) && ($_POST['author_name'] != '') ) {\n\t \tupdate_post_meta($post_id, 'author_name', esc_html($_POST['author_name']));\n\t } \n\n\t# Save data Product name.\n\tif (isset($_POST['product_name']) && ($_POST['product_name'] != '')) {\n\t\tupdate_post_meta($post_id, 'product_name', esc_html($_POST['product_name']));\n\t}\n\n\t# Save data Product Description.\n\tif (isset($_POST['product_description']) && ($_POST['product_description'] != '')) {\n\t\tupdate_post_meta($post_id, 'product_description', esc_html($_POST['product_description']));\n\t}\n\n\n}",
"function save(ezcWorlflow $workflow) {\n\t\t\n\t}",
"function Save();",
"public function saveData($data)\n\t {\n\t \t$name = self::getNameMetaBox($data['_title_meta_box']);\n\n\t \t$content = self::getDataMetas();\n\t \t$data['_name_meta_box'] = $name;\n\t \t$content[$name] = $data;\n\t \tupdate_option('metas-custom', $content);\n\t }",
"protected function save_meta() {\n\n\t\t// save all data in array\n\t\tupdate_post_meta( $this->post_id, APP_REPORTS_P_DATA_KEY, $this->meta );\n\n\t\t// also save total reports in separate meta for sorting queries\n\t\tupdate_post_meta( $this->post_id, APP_REPORTS_P_TOTAL_KEY, $this->total_reports );\n\t}",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}",
"protected function saving() {\n // This will get reimplemented by children when necessary\n }",
"public function save()\n {\n // For V2.0\n }",
"function _wp_rest_api_autosave_meta($autosave)\n {\n }",
"public function save_all() {\n\t\t$this->save_api();\n\t\t$this->save_field_map();\n\t\t$this->save_import();\n\t\t$this->save_requirement_set();\n\t}",
"function archive_SaveMetaData( $post_id ) {\n\t\tglobal $archive_fields;\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {return;}\n\n\t\tif ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {return;}\n\t\t}else {\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {return;}\n\t\t}\n\n\t\tforeach ($archive_fields as $key => $value) {\n\t\t\t$slug = $value['slug'];\n\t\t\t//print_r($value);\n\n\t\t\tif (isset( $_POST['archive_'.$value['slug'].'_nonce'] ) ) {\n\n\t\t\t\tforeach($value['fields'] as $key => $value){\n\t\t\t\t\t$name = 'archive_'.$slug.'_'.$value['name'];\n\t\t\t\t\tif($value['type'] == 'checkbox'){\n\t\t\t\t\t\tif(isset($_POST[$name])){\n\t\t\t\t\t\t\tupdate_post_meta($post_id, $name, 'true');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tupdate_post_meta($post_id, $name, 'false');\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif(isset($_POST[$name])){\n\t\t\t\t\t\t$value = esc_html($_POST[$name]);\n\t\t\t\t\t\tupdate_post_meta($post_id, $name, $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function save_postdata( $post_id ) {\n\tglobal $post, $new_meta_boxes;\n\n\tif(isset($post) && $post->post_type=='page'){\n\t\t$new_meta_boxes=$GLOBALS['new_meta_boxes'];\n\t\tpexeto_save_meta_data($new_meta_boxes, $post_id);\n\t}\n}",
"function liblynx_save_meta_box_data($post_id)\n{\n\n /*\n * We need to verify this came from our screen and with proper authorization,\n * because the save_post action can be triggered at other times.\n */\n\n // Check if our nonce is set.\n if (!isset($_POST['liblynx_meta_box_nonce'])) {\n return;\n }\n\n\n\n // Verify that the nonce is valid.\n if (!wp_verify_nonce($_POST['liblynx_meta_box_nonce'], 'liblynx_save_meta_box_data')) {\n return;\n }\n\n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return;\n }\n\n // Check the user's permissions.\n if (isset($_POST['post_type']) && 'page'==$_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) {\n return;\n }\n } else {\n if (!current_user_can('edit_post', $post_id)) {\n return;\n }\n }\n\n /* OK, it's safe for us to save the data now. */\n\n //is our metabox is being submitted?\n if (!isset($_POST['liblynx_metabox'])) {\n return;\n }\n\n //determine new state\n $protect=isset($_POST['liblynx_protect'])?true:false;\n $unit=trim($_POST['liblynx_custom_unit']);\n\n // Update the meta field in the database.\n update_post_meta($post_id, '_liblynx_protect', $protect);\n update_post_meta($post_id, '_liblynx_unit', $unit);\n}",
"public function save_toolset()\n\t{\n\t\tee()->rte_lib->save_toolset();\n\t}",
"function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"function save()\r\n {\r\n // read the template\r\n\t $str = dirname(__FILE__); \r\n $content = file_get_contents(dirname(__FILE__).'/partinfo.php'); \r\n if (!$content){\r\n return \"fail read template\";\r\n } \t\r\n \r\n\t $tags = array(\"#TITLE#\", \r\n\t \t\"#BRAND#\", \r\n\t \t\"#MODULE#\", \r\n\t \t\"#ENGINE#\", \r\n \"#TYPE#\", \r\n \"#NAME#\", \r\n \"ADDRESS\", \r\n \"#DATE#\", \r\n \"#PRICE#\", \r\n \"DESCRIPTION\");\r\n\t \r\n $fields[0] = $this->title;\r\n $fields[1] = $this->brand;\r\n $fields[2] = $this->series;\r\n $fields[3] = $this->module;\r\n $fields[4] = \"配件\";\r\n $fields[5] = $this->module;\r\n $fields[6] = \"广州\";\r\n $fields[7] = $this->date;\r\n $fields[8] = $this->price;\r\n $fields[9] = $this->description;\r\n \r\n $content = str_replace($tags,$fields,$content); \r\n \r\n $date = date(\"Ymd-Hms\");\r\n $filename = sprintf(\"publish/%d-%d-%s.php\", $this->id, $this->uid, $date);\r\n $fp = fopen($filename, \"w\");\r\n if (!$fp) {\r\n return \"fail create file\";\r\n }\r\n \r\n if (fwrite($fp, $content) == FALSE) { \t \r\n fclose($fp);\r\n return \"fail wirte content\";\r\n }\r\n \r\n fclose($fp);\r\n return $filename;\r\n }",
"static function save_metabox_data($post_id){\n\t\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$keywords = array();\t\t\t\n\t\t\t//now it's safe to save info\n\t\t\tif(isset($_POST['affiliate_keywords'])){\n\t\t\t\tforeach($_POST['affiliate_keywords'] as $key => $value){\n\t\t\t\t\t$keywords[$key] = trim($value);\n\t\t\t\t}\n\t\t\t\tself::save_keywords($post_id, $keywords);\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['local_position_enabled'])){\n\t\t\t\tupdate_post_meta($post_id, 'local_position_enabled', 'y');\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupdate_post_meta($post_id, 'local_position_enabled', '');\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['position'])){\n\t\t\t\t$positions = array();\n\t\t\t\tforeach($_POST['position'] as $key => $value){\n\t\t\t\t\t$positions[$key] = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tupdate_post_meta($post_id, 'local_positions', $positions);\n\t\t\t}\n\t\t\t\n\t\t\t//saving loal links\n\t\t\tif(isset($_POST['local_links'])){\n\t\t\t\tupdate_post_meta($post_id, 'local_links', $_POST['local_links']);\n\t\t\t}\n\t\t}",
"function persistAll() ;",
"protected function MetaAfterSave() {\n\t\t}",
"function save_meta_box( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }",
"public function SaveXMLFile();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"public function saveData()\r\n {\r\n \r\n }",
"function apprenants_save_meta_box_data($post_id)\r\n {\r\n // verify taxonomies meta box nonce\r\n if (!isset($_POST['apprenants_meta_box_nonce']) || !wp_verify_nonce($_POST['apprenants_meta_box_nonce'], basename(__FILE__))) {\r\n return;\r\n }\r\n\r\n // return if autosave\r\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\r\n return;\r\n }\r\n\r\n // Check the user's permissions.\r\n if (!current_user_can('edit_post', $post_id)) {\r\n return;\r\n }\r\n\r\n // store custom fields values\r\n // nom string\r\n if (isset($_REQUEST['nom'])) {\r\n update_post_meta($post_id, '_apprenants_nom', sanitize_text_field($_POST['nom']));\r\n }\r\n\r\n // store custom fields values\r\n // prénom string\r\n if (isset($_REQUEST['prenom'])) {\r\n update_post_meta($post_id, '_apprenants_prenom', sanitize_text_field($_POST['prenom']));\r\n }\r\n\r\n // store custom fields values\r\n // github string\r\n if (isset($_REQUEST['github'])) {\r\n update_post_meta($post_id, '_apprenants_github', sanitize_text_field($_POST['github']));\r\n }\r\n\r\n // store custom fields values\r\n //linkedIn string\r\n if (isset($_REQUEST['linkedIn'])) {\r\n update_post_meta($post_id, '_apprenants_linkedIn', sanitize_text_field($_POST['linkedIn']));\r\n }\r\n\r\n // store custom fields values\r\n //portfolio string\r\n if (isset($_REQUEST['portfolio'])) {\r\n update_post_meta($post_id, '_apprenants_portfolio', sanitize_text_field($_POST['portfolio']));\r\n }\r\n }",
"function wpdocs_save_meta_box( $post_id ) {\r\n\r\n}",
"public function saveDataToFile()\n {\n\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }",
"function save()\n {\n /* remove objectclass GOhard if this is an ogroup tab */\n if(isset($this->parent->by_object['ogroup'])){\n $this->objectclasses = array();\n }\n\n plugin::save();\n\n /* Strip out 'default' values */\n foreach(array(\"gotoXMethod\",\"gotoXDriver\", \"gotoXResolution\", \"gotoXColordepth\",\n \"gotoLpdServer\", \"gotoXKbModel\", \"gotoXKbLayout\",\n \"gotoXKbVariant\", \"gotoXMouseType\", \"gotoXMouseport\") as $val){\n\n if ($this->attrs[$val] == \"default\"){\n $this->attrs[$val]= array();\n }\n }\n\n if($this->gotoXMethod == \"default\"){\n $this->attrs['gotoXdmcpServer'] = array();\n $this->attrs['gotoXMethod'] = array();\n }else{\n $this->attrs['gotoXdmcpServer'] = array_values($this->selected_xdmcp_servers);\n }\n\n\n if($this->AutoSync){\n $this->attrs['gotoXHsync'] = \"30+55\";\n $this->attrs['gotoXVsync'] = \"50+70\";\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n new log(\"modify\",\"terminal/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));\n }\n $this->handle_post_events(\"modify\");\n\n /* Send goto reload event */\n if(count($this->attrs)){\n $this->send_goto_reload();\n }\n }",
"public function save()\n\t{\n\n\t}",
"function meta_box_save( $post_id )\n{\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n \n // if our nonce isn't there, or we can't verify it, bail\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'meta_box_nonce' ) ) return;\n \n // if our current user can't edit this post, bail\n //if( !current_user_can( 'edit_post' ) ) return;\n\t\n\t// now we can actually save the data\n $allowed = array(\n 'a' => array( // on allow a tags\n 'href' => array() // and those anchors can only have href attribute\n )\n );\n // Make sure your data is set before trying to save it\n if( isset( $_POST['meta_box_manufacturer'] ) )\n update_post_meta( $post_id, 'meta_box_manufacturer', $_POST['meta_box_manufacturer'] );\n}",
"public function save()\n {\n $this->save_meta_value('_sim_city_main_info', $this->city_main_info);\n\n $this->save_meta_value('_sim_city_shops', $this->city_shops);\n }",
"function saveObject($object, $xmlPath)\r\n {\r\n $class_vars = get_object_vars($object);\r\n\r\n $xml = domxml_new_doc(\"1.0\");\r\n $elements = $xml->create_element(get_class($object));\r\n $elementsNode = $xml->append_child($elements);\r\n\r\n foreach ($class_vars as $name => $value)\r\n {\r\n $element = $xml->create_element($name);\r\n $element->set_content($value);\r\n $elementsNode->append_child($element);\r\n }\r\n\r\n $xml->dump_file($xmlPath, false, true);\r\n }",
"function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}",
"public abstract function save();",
"protected function save_meta() {\n\n\t\t// save all data in array\n\t\tupdate_user_meta( $this->user_id, APP_REPORTS_U_DATA_KEY, $this->meta );\n\n\t\t// also save total reports in separate meta for sorting queries\n\t\tupdate_user_meta( $this->user_id, APP_REPORTS_U_TOTAL_KEY, $this->total_reports );\n\t}",
"public final function save()\n {\n }",
"function meta_box_save($post_id)\n {\n\n// if($post_id == 245)\n// {\n// debugvar($_FILES);\n// debugvar($_POST);\n// exit;\n// }\n\n if (in_array(get_post_type($post_id), $this->post_types)) {\n\n if(!isset($_POST['_inline_edit']))\n {\n\n $product = SIM_Product::getById($post_id);\n\n if(isset($_POST['product_declarations']) && $_POST['product_declarations'])\n {\n\n delete_post_meta($post_id, '_sim_declaration_pdf');\n foreach($_POST['product_declarations'] as $id_manufacturer => $attachments)\n {\n\n if($attachments['_sim_declaration_pdf'] != '')\n {\n $attach_ids = array();\n\n if(isset($attachments['_sim_declaration_pdf']['new']))\n {\n\n $arr_ids = array_filter(explode(',', $attachments['_sim_declaration_pdf']['new']));\n\n foreach($arr_ids as $id)\n {\n array_push($attach_ids, $id);\n }\n }\n\n\n\n unset($attachments['_sim_declaration_pdf']['new']);\n\n if(is_array($attachments['_sim_declaration_pdf']))\n {\n foreach ($attachments['_sim_declaration_pdf'] as $attach) {\n $attach_ids[] = $attach;\n }\n\n }\n\n debugvar(array($id_manufacturer =>$attach_ids));\n// exit;\n\n /*\n * Array\n (\n [0] => 1095\n [1] => 1092\n )\n */\n add_post_meta($post_id, '_sim_declaration_pdf', serialize(array($id_manufacturer =>$attach_ids)));\n }\n }\n\n// exit;\n\n\n }\n }\n\n }\n\n }",
"public function save(MetaInfo $metaInfo)\n {\n $this->assertPermission($metaInfo); \n $this->repository->save($metaInfo, $this->getCardinality($metaInfo));\n }",
"public final function save() {\n }",
"public function save() {\n\t\t\t\n\t\t}",
"function meta_boxes_save() {\n\n\t\t// Bail out now if something not set\n\t\tif (\n\t\t\tisset( $_POST['_wpnonce'] ) &&\n\t\t\tisset( $_POST['post_ID'] ) &&\n\t\t\tisset( $_POST['_lingo_hidden'] ) // This is required to ensure that auto-saves are not processed\n\t\t) {\n\n\t\t\t// Do nonce security check\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\n\n\t\t\t// Grab post ID\n\t\t\t$post_ID = (int) $_POST['post_ID'];\n\t\t\t\n\t\t\t// Set wrong answers\n\t\t\tdelete_post_meta( $post_ID, '_wrong_answers' );\n\t\t\tforeach( $_POST['_wrong_answers'] as $key => $value ) {\n\t\t\t\tif ( $value != '' && $value != 0 ) {\n\t\t\t\t\t$value = (int) $value;\n\t\t\t\t\tadd_post_meta( $post_ID, '_wrong_answers', $value );\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// Stash all the post meta\n\t\t\tforeach( $this->post_meta as $key => $x ) {\n\t\t\t\tif ( isset( $_POST[$key] ) ) {\n\t\t\t\t\t$value = (int) $_POST[$key];\n\t\t\t\t\tif ( $value != 0 )\n\t\t\t\t\t\tupdate_post_meta( $post_ID, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"function wp_register_persisted_preferences_meta()\n {\n }",
"function prfx_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'prfx_nonce' ] ) && wp_verify_nonce( $_POST[ 'prfx_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n \r\n // Checks for input and sanitizes/saves if needed\r\n if( isset( $_POST[ 'meta-text' ] ) ) {\r\n update_post_meta( $post_id, 'meta-text', sanitize_text_field( $_POST[ 'meta-text' ] ) );\r\n }\r\n \r\n}",
"private function save() \n {\n $content = \"<?php\\n\\nreturn\\n[\\n\";\n\n foreach ($this->arrayLang as $this->key => $this->value) \n {\n $content .= \"\\t'\".$this->key.\"' => '\".$this->value.\"',\\n\";\n }\n\n $content .= \"];\";\n\n file_put_contents($this->path, $content);\n\n }",
"function italystrap_meta_box_save( $post_id ){\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\n\t// if our nonce isn't there, or we can't verify it, bail\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\n\t\n\t// if our current user can't edit this post, bail\n\t//http://code.tutsplus.com/tutorials/how-to-create-custom-wordpress-writemeta-boxes--wp-20336#comment-802227555\n\t//prevents undefined offset notice and cannot modify header warning - add second parameters $post_id\n\tif( !current_user_can( 'edit_post' , $post_id ) ) return;\n\t\n\t// now we can actually save the data\t\n\t// Probably a good idea to make sure your data is set\n\t// This is purely my personal preference for saving checkboxes\n\t$chk = ( isset( $_POST['slide'] ) && $_POST['slide'] ) ? 'on' : 'off';\n\tupdate_post_meta( $post_id, 'slide', $chk );\n}",
"function construction_realestate_posttype_bn_metadesig_save( $post_id ) {\n if( isset( $_POST[ 'meta-desig' ] ) ) {\n update_post_meta( $post_id, 'meta-desig', esc_html($_POST[ 'meta-desig' ]) );\n }\n if( isset( $_POST[ 'meta-call' ] ) ) {\n update_post_meta( $post_id, 'meta-call', esc_html($_POST[ 'meta-call' ]) );\n }\n // Save facebookurl\n if( isset( $_POST[ 'meta-facebookurl' ] ) ) {\n update_post_meta( $post_id, 'meta-facebookurl', esc_url($_POST[ 'meta-facebookurl' ]) );\n }\n // Save linkdenurl\n if( isset( $_POST[ 'meta-linkdenurl' ] ) ) {\n update_post_meta( $post_id, 'meta-linkdenurl', esc_url($_POST[ 'meta-linkdenurl' ]) );\n }\n if( isset( $_POST[ 'meta-twitterurl' ] ) ) {\n update_post_meta( $post_id, 'meta-twitterurl', esc_url($_POST[ 'meta-twitterurl' ]) );\n }\n // Save googleplusurl\n if( isset( $_POST[ 'meta-googleplusurl' ] ) ) {\n update_post_meta( $post_id, 'meta-googleplusurl', esc_url($_POST[ 'meta-googleplusurl' ]) );\n }\n}",
"public function save()\r\n {\r\n \r\n }",
"function save()\n {\n parent::save();\n }",
"function save()\n {\n parent::save();\n }",
"function save()\n {\n parent::save();\n }",
"public static function save() {\n\t\t\t$page_title = $_POST['page_title'];\n\t\t\t$meta['dod_custom_css'] = $_POST['custom_css'];\n\t\t\t$meta['_wp_page_template'] = $_POST['page_template'];\n\t\t\treturn dd_update_page(get_option('dod_page_id'), $page_title, '', $meta);\n\t\t}",
"function download_metabox_save($post_id){\r\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n\r\n // if our nonce isn't there, or we can't verify it, bail\r\n if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;\r\n\r\n // if our current user can't edit this post, bail\r\n if( !current_user_can( 'edit_post' ) ) return;\r\n\r\n\tif(isset($_POST['download_metaboxu'])){\r\n\t\tupdate_post_meta($post_id, 'download_metaboxu', wp_kses( $_POST['download_metaboxu'], $allowed ));\r\n\t}\r\n\r\n}",
"function save() {\n //save the added fields\n }",
"function savePostMeta($post_id)\n\t\t{\n\t\t\t$dataMetas = self::getDataMetas();\n\n\t\t\tforeach ($dataMetas as $key => $meta) {\n\t\t\t\t$nameMeta = $meta['_name_meta_box'];\n\t\t\t\tif ( isset($_POST[$nameMeta]) ) { \n\t\t\t\t\tupdate_post_meta( $post_id, $nameMeta, $_POST[$nameMeta] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}",
"public function saveSettings()\n {\n $this->store->save($this->data);\n }",
"public function save($filename = null)\n {\n $storage = $this->storage;\n $storage->setContentDom($this->contentDOM);\n $storage->setMetaDom($this->metaDOM);\n $storage->setSettingsDom($this->settingsDOM);\n $storage->setStylesDom($this->stylesDOM);\n $storage->save($filename);\n }",
"public function saveMetadata(){\n foreach ($this->_metadata as $metadatum) {\n $metadatum->save();\n }\n return $this;\n }",
"function sample_save_metabox( $post_id, $post ) {\n\t// Add nonce for security and authentication.\n\t$nonce_name = isset( $_POST['custom_nonce'] ) ? $_POST['custom_nonce'] : '';\n\t$nonce_action = 'custom_nonce_action';\n\n\t// Check if nonce is set.\n\tif ( ! isset( $nonce_name ) ) {\n\t\treturn;\n\t}\n\n\t// Check if nonce is valid.\n\tif ( ! wp_verify_nonce( $nonce_name, $nonce_action ) ) {\n\t\treturn;\n\t}\n\n\t// Check if user has permissions to save data.\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Check if not an autosave.\n\tif ( wp_is_post_autosave( $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Check if not a revision.\n\tif ( wp_is_post_revision( $post_id ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! isset( $_POST['notes'] ) ) {\n\t\treturn;\n\t}\n\n\tupdate_post_meta( $post_id, 'notes', wp_unslash( sanitize_text_field( $_POST['notes'] ) ) );\n}",
"function emb_save_options() {\n\t}",
"function save_meta_box_custompost( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }",
"function metabox_store($post){\n\t\tglobal $postmec;\n\t\tinclude $postmec->get_postmec_dir() . 'metaboxes/metabox.store.php';\n\t}"
] | [
"0.7012829",
"0.6330845",
"0.626479",
"0.62023014",
"0.62023014",
"0.61780995",
"0.6174957",
"0.6174957",
"0.6162104",
"0.6053119",
"0.60290456",
"0.6026802",
"0.6019811",
"0.60017914",
"0.5973457",
"0.5966111",
"0.5954616",
"0.59420156",
"0.59212404",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.589848",
"0.58851516",
"0.5878832",
"0.5867958",
"0.5867671",
"0.58628327",
"0.5850368",
"0.5847155",
"0.58465487",
"0.58385754",
"0.5826764",
"0.5821163",
"0.58202875",
"0.58096755",
"0.5785094",
"0.57756627",
"0.5773845",
"0.57580423",
"0.57580423",
"0.57580423",
"0.57580423",
"0.57580423",
"0.5754314",
"0.5748353",
"0.5745576",
"0.57355845",
"0.5723692",
"0.57086194",
"0.5707765",
"0.56984943",
"0.56914777",
"0.56790626",
"0.5677079",
"0.56763744",
"0.5675698",
"0.56687057",
"0.56489354",
"0.56401193",
"0.56385297",
"0.56329226",
"0.5613874",
"0.5612998",
"0.5612741",
"0.5612741",
"0.5611038",
"0.559966",
"0.5597353",
"0.55756134",
"0.55691",
"0.55663615",
"0.55643713",
"0.5562607",
"0.5562607",
"0.5562607",
"0.5560607",
"0.55601937",
"0.55410516",
"0.55400455",
"0.5535024",
"0.55305845",
"0.55173886",
"0.55044055",
"0.5501017",
"0.54976636",
"0.54945624"
] | 0.0 | -1 |
/ 2.4 SAVE CUSTOM FIELDS / | public function WPimgAttr_Alt_saveAltAttributes(int $id = 0){
// save field for each language
foreach (SELF::$WPimgAttr_Alt_languages as $key => $lang) {
if($key > 0):
// get field name
$var_name = SELF::$WPimgAttr_Alt_prefix . $lang;
// save value
if ( isset( $_REQUEST['attachments'][ $id ][$var_name] ) ):
$new_value = $_REQUEST['attachments'][ $id ][$var_name];
update_post_meta( $id, $var_name, $new_value );
endif;
endif;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function save() {\n //save the added fields\n }",
"public function saveCustom()\n {\n // Look through all of the updated fields to see if there are any Custom fields\n foreach ($this->updatedFields as $id => $updatedField) {\n\n // Translates WarrantyExpiration to \"Warranty Expiration\" for use with searching for the customID\n if (array_key_exists($updatedField, $this->customFieldMap)) {\n $realField = $this->customFieldMap[$updatedField];\n } else {\n $realField = $updatedField;\n }\n\n // Now see if Warranty Expiration is in the list of Custom fields\n if (array_key_exists($realField, $this->customFields)) {\n\n // If it is, get the ID needed for the API call\n $customID = $this->customFields[$realField];\n\n $args = [];\n $args['fieldId'] = $customID;\n // The value is stored in the main details array using WarrantyExpiration\n $args['value'] = $this->details->$updatedField;\n $args['id'] = $this->ID;\n $this->api->_request('POST', '/api/SetCustomFieldForAsset'.\"?\".http_build_query($args));\n // Remove it from the updatedFields list so the main save() doesn't try to update it\n unset($this->updatedFields[$id]);\n }\n }\n\n }",
"public function save(){\n\t\tglobal $wpdb;\n\t\t$wpdb->insert( $wpdb->prefix . 'cf_form_entry_values', $this->to_array() );\n\t\treturn (int) $wpdb->insert_id;\n\n\t}",
"function save_customfields($data, array $extra_cols=array())\n\t{\n\t\tforeach (array_keys((array)$this->customfields) as $name)\n\t\t{\n\t\t\tif (!isset($data[$field = $this->get_cf_field($name)])) continue;\n\n\t\t\t$where = array(\n\t\t\t\t$this->extra_id => isset($data[$this->autoinc_id]) ? $data[$this->autoinc_id] : $data[$this->db_key_cols[$this->autoinc_id]],\n\t\t\t\t$this->extra_key => $name,\n\t\t\t);\n\t\t\t$is_multiple = $this->is_multiple($name);\n\n\t\t\t// we explicitly need to delete fields, if value is empty or field allows multiple values or we have no unique index\n\t\t\tif(empty($data[$field]) || $is_multiple || !$this->extra_has_unique_index)\n\t\t\t{\n\t\t\t\t$this->db->delete($this->extra_table,$where,__LINE__,__FILE__,$this->app);\n\t\t\t\tif (empty($data[$field])) continue;\t// nothing else to do for empty values\n\t\t\t}\n\t\t\tforeach($is_multiple && !is_array($data[$field]) ? explode(',',$data[$field]) :\n\t\t\t\t// regular custom fields (!$is_multiple) eg. addressbook store multiple values comma-separated\n\t\t\t\t(array)(!$is_multiple && is_array($data[$field]) ? implode(',', $data[$field]) : $data[$field]) as $value)\n\t\t\t{\n\t\t\t\tif (!$this->db->insert($this->extra_table,array($this->extra_value => $value)+$extra_cols,$where,__LINE__,__FILE__,$this->app))\n\t\t\t\t{\n\t\t\t\t\treturn $this->db->Errno;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\t// no error\n\t}",
"public function afterCreate()\n {\n $this->saveCustomFields();\n }",
"public function saveAction()\n {\n $field = '';\n $this->_initOrder();\n if (Mage::registry('current_order')->getCustomerId() != Mage::getSingleton('customer/session')->getCustomerId()) {\n $this->getResponse()->setBody('Error');\n exit;\n }\n\n /*\n * decide what form submitted: product field || order field\n * product fields have field names like: \"amProduct_%orderItemID%_%fieldID%\"\n */\n $productSubmit = strpos($this->getRequest()->getPost('field'), 'amProduct_') !== FALSE ? 1 : 0;\n // process product fields\n if ($productSubmit) {\n // extract all data from POST (stored value like \"xyz_orderItemID_FieldCode\"\n $itemData = explode('_', $this->getRequest()->getPost('field'), 3);\n $itemId = $itemData[1];\n $code = $itemData[2];\n\n // load product item data\n $fieldModel = Mage::getModel('amorderattach/field')->load($code, 'code');\n $field = Mage::getModel('amorderattach/order_products')->load($itemId, 'order_item_id');\n\n if ($fieldModel->getId()) {\n // triggering on save new row if OrderItemId is not set\n if (!$field->getOrderItemId()) {\n $field->setOrderItemId($itemId);\n }\n\n $this->itemCode = $fieldModel->getItemCode($itemId);\n } else {\n die('Error on filed load: no such field found');\n }\n } else {\n $fieldModel = Mage::getModel('amorderattach/field')->load($this->getRequest()->getPost('field'), 'code');\n if ($fieldModel->getId()) {\n // load order item data\n $field = Mage::getModel('amorderattach/order_field')->load(Mage::registry('current_order')->getId(), 'order_id');\n $code = $this->getRequest()->getPost('field');\n $this->itemCode = $code;\n\n // triggering on save new row if OrderItemId is not set\n if (!$field->getOrderId()) {\n $field->setOrderId(Mage::registry('current_order')->getId());\n }\n } else {\n die('Error on filed load: no such field found');\n }\n }\n\n if ('date' == $code) {\n if ($this->getRequest()->getPost('value')) {\n $data = $this->getRequest()->getPost();\n $valueToFilter = $this->_filterDates($data, array('value'));\n $itemValue = date('Y-m-d', strtotime($valueToFilter['value']));\n } else {\n $itemValue = null;\n }\n } else {\n $itemValue = $this->getRequest()->getPost('value');\n }\n // set data\n $this->itemValue = $itemValue;\n $field->setData($code, $itemValue);\n\n // save if customer can edit\n if ('edit' == $fieldModel->getCustomerVisibility()) {\n $field->save();\n } else {\n die('Error on field save: no privileges for action');\n }\n\n\n Mage::register('current_attachment_order_field', $field); // required for renderer\n $this->_sendResponse($fieldModel);\n }",
"public function save(){\r\n // Need the post type name again\r\n $post_type_name = $this->post_type_name;\r\n\r\n add_action( 'save_post',\r\n function() use( $post_type_name ){\r\n // Deny the WordPress autosave function\r\n if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\r\n\r\n if ( ! wp_verify_nonce( $_POST['custom_post_type'], plugin_basename(__FILE__) ) ) return;\r\n\r\n global $post;\r\n\r\n if( isset( $_POST ) && isset( $post->ID ) && get_post_type( $post->ID ) == $post_type_name ){\r\n global $custom_fields;\r\n\r\n // Loop through each meta box\r\n foreach( $custom_fields as $title => $fields ){\r\n // Loop through all fields\r\n foreach( $fields as $label => $type ){\r\n $field_id_name = strtolower( str_replace( ' ', '_', $title ) ) . '_' . strtolower( str_replace( ' ', '_', $label ) );\r\n if($_POST['custom_meta'][$field_id_name] != ''){//Check Entry is not empty\r\n update_post_meta( $post->ID, $field_id_name, $_POST['custom_meta'][$field_id_name] );\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n );\r\n }",
"public function save()\n {\n // Quantity is reset to 1 if it's not specified, so make sure it's included\n if (count($this->updatedFields) AND !in_array('Quantity', $this->updatedFields)) {\n $this->updatedFields[] = 'Quantity';\n }\n\n // Need to save custom fields first\n $this->saveCustom();\n parent::save();\n }",
"function onAfterSaveField( &$field, &$post, &$file, &$item ) {\n\t}",
"function onAfterSaveField( &$field, &$post, &$file, &$item ) {\r\n\t}",
"function wpbm_extra_field_save( $post_id ){\n\n// Checks save status\n $is_autosave = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = ( isset( $_POST[ 'wpbm_blog_nonce' ] ) && wp_verify_nonce( $_POST[ 'wpbm_blog_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\n// Exits script depending on save status\n if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {\n return;\n }\n if ( isset( $_POST[ 'wpbm_extra_option' ] ) ) {\n\n $wpbm_extra = ( array ) $_POST[ 'wpbm_extra_option' ];\n\n $extra_field = $this -> sanitize_array( $wpbm_extra );\n// save data\n update_post_meta( $post_id, 'wpbm_extra_option', $extra_field );\n }\n return;\n }",
"protected function save_meta() {}",
"public function save() {\n $configdata = $this->get('configdata');\n if (!array_key_exists('defaultvalue_editor', $configdata)) {\n $this->field->save();\n return;\n }\n\n if (!$this->get('id')) {\n $this->field->save();\n }\n\n // Store files.\n $textoptions = $this->value_editor_options();\n $tempvalue = (object) ['defaultvalue_editor' => $configdata['defaultvalue_editor']];\n $tempvalue = file_postupdate_standard_editor($tempvalue, 'defaultvalue', $textoptions, $textoptions['context'],\n 'customfield_textarea', 'defaultvalue', $this->get('id'));\n\n $configdata['defaultvalue'] = $tempvalue->defaultvalue;\n $configdata['defaultvalueformat'] = $tempvalue->defaultvalueformat;\n unset($configdata['defaultvalue_editor']);\n $this->field->set('configdata', json_encode($configdata));\n $this->field->save();\n }",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"protected function _updatefields() {}",
"public function save () {\r\n\t\tif (isset($_POST['data'])) {\r\n\t\t\t$data = stripslashes_deep($_POST['data']);\r\n\t\t\tif (!empty($data['preset']) && !empty($data['id'])) $data['preset'] = $data['id']; // Also override whatever preset we're seding\r\n\t\t\t$_POST['data'] = $data;\r\n\t\t}\r\n\t\tparent::save();\r\n\t}",
"public function save($exclude_post=false) {\n $fields = stripslashes($this->get('fields'));\n while(!is_array($fields)) {\n $fields = unserialize($fields);\n\n if (!$fields) {\n $fields = [];\n break;\n }\n }\n\n $this->set('fields', serialize($fields));\n return parent::save($exclude_post);\n }",
"function save_user_fields ($user_id) {\n if ( isset($_POST['billing_first_name']) ){\n update_user_meta($user_id, 'billing_first_name', sanitize_text_field($_POST['billing_first_name']));\n }\n \n if ( isset($_POST['billing_last_name']) ){\n update_user_meta($user_id, 'billing_last_name', sanitize_text_field($_POST['billing_last_name']));\n }\n\n if ( isset($_POST['billing_tipo_documento']) ){\n update_user_meta($user_id, 'billing_tipo_documento', sanitize_text_field($_POST['billing_tipo_documento']));\n }\n\n if ( isset($_POST['billing_numero_documento']) ){\n update_user_meta($user_id, 'billing_numero_documento', sanitize_text_field($_POST['billing_numero_documento']));\n }\n \n}",
"function woo_add_custom_general_fields_save( $post_id ){\n\t\n\t// Text Field\n\t$woocommerce_text_field = $_POST['_nameofrunner'];\n\tif( !empty( $woocommerce_text_field ) )\n\t\tupdate_post_meta( $post_id, '_nameofrunner', esc_attr( $woocommerce_text_field )\n\t);\n}",
"public static function save_custom_fields( $post_id, $post ) \n\t{\n\t\t// The 2nd arg here is important because there are multiple nonces on the page\n\t\tif ( !empty($_POST) && check_admin_referer('update_custom_content_fields','custom_content_fields_nonce') )\n\t\t{\t\t\t\n\t\t\t$custom_fields = self::_get_custom_fields($post->post_type);\n\t\t\t\n\t\t\tforeach ( $custom_fields as $field ) {\n\t\t\t\tif ( isset( $_POST[ self::$prefix . $field['name'] ] ) )\n\t\t\t\t{\n\t\t\t\t\t$value = trim($_POST[ self::$prefix . $field['name'] ]);\n\t\t\t\t\t// Auto-paragraphs for any WYSIWYG\n\t\t\t\t\tif ( $field['type'] == 'wysiwyg' ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$value = wpautop( $value );\n\t\t\t\t\t}\n\t\t\t\t\tupdate_post_meta( $post_id, $field[ 'name' ], $value );\n\t\t\t\t}\n\t\t\t\t// if not set, then it's an unchecked checkbox, so blank out the value.\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tupdate_post_meta( $post_id, $field[ 'name' ], '' );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"protected function _postSave()\r\n\t{\r\n\t}",
"public function saveCustomFields()\n\t{\n\t\t$state = $this->getStateVariables();\n\t\t$validation = $this->getValidation();\n\n\t\t$user = JFactory::getUser();\n\t\t$user = $this->getState('user', $user);\n\n\t\t// Find an existing record\n\t\t$list = FOFModel::getTmpInstance('Users','AkeebasubsModel')\n\t\t\t->user_id($user->id)\n\t\t\t->getItemList();\n\n\t\tif(!count($list)) {\n\t\t\t$id = 0;\n\t\t} else {\n\t\t\t$thisUser = array_pop($list);\n\t\t\t$id = $thisUser->akeebasubs_user_id;\n\t\t}\n\n\t\t$data = array(\n\t\t\t'akeebasubs_user_id' => $id,\n\t\t\t'user_id'\t\t=> $user->id,\n\t\t\t'isbusiness'\t=> $state->isbusiness ? 1 : 0,\n\t\t\t'businessname'\t=> $state->businessname,\n\t\t\t'occupation'\t=> $state->occupation,\n\t\t\t'vatnumber'\t\t=> $state->vatnumber,\n\t\t\t'viesregistered' => $validation->validation->vatnumber,\n\t\t\t// @todo Ask for tax authority\n\t\t\t'taxauthority'\t=> '',\n\t\t\t'address1'\t\t=> $state->address1,\n\t\t\t'address2'\t\t=> $state->address2,\n\t\t\t'city'\t\t\t=> $state->city,\n\t\t\t'state'\t\t\t=> $state->state,\n\t\t\t'zip'\t\t\t=> $state->zip,\n\t\t\t'country'\t\t=> $state->country,\n\t\t\t'params'\t\t=> $state->custom\n\t\t);\n\n\t\t// Allow plugins to post-process the fields\n\t\tJLoader::import('joomla.plugin.helper');\n\t\tJPluginHelper::importPlugin('akeebasubs');\n\t\t$app = JFactory::getApplication();\n\t\t$jResponse = $app->triggerEvent('onAKSignupUserSave', array((object)$data));\n\t\tif(is_array($jResponse) && !empty($jResponse)) foreach($jResponse as $pResponse) {\n\t\t\tif(!is_array($pResponse)) continue;\n\t\t\tif(empty($pResponse)) continue;\n\t\t\tif(array_key_exists('params', $pResponse)) {\n\t\t\t\tif(!empty($pResponse['params'])) foreach($pResponse['params'] as $k => $v) {\n\t\t\t\t\t$data['params'][$k] = $v;\n\t\t\t\t}\n\t\t\t\tunset($pResponse['params']);\n\t\t\t}\n\t\t\t$data = array_merge($data, $pResponse);\n\t\t}\n\n\t\t// Serialize custom fields\n\t\t$data['params'] = json_encode($data['params']);\n\n\t\t$status = FOFModel::getTmpInstance('Users','AkeebasubsModel')\n\t\t\t->setId($id)\n\t\t\t->getItem()\n\t\t\t->save($data);\n\n\t\treturn $status;\n\t}",
"public\tfunction\tsave()\n\t\t{\n\t\t}",
"function main_save($type='edit')\n\t{\n\t\t$id = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($this->ipsclass->input['cf_title'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"You must enter a field title.\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// check-da-motcha\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif( !$id )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"Could not resolve the field id\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$content = \"\";\n\t\t\n\t\tif ( $_POST['cf_content'] != \"\")\n\t\t{\n\t\t\t$content = $this->func->method_format_content_for_save( $_POST['cf_content'] );\n\t\t}\n\t\t\n\t\t$db_string = array( 'cf_title' => $this->ipsclass->input['cf_title'],\n\t\t\t\t\t\t 'cf_desc' => $this->ipsclass->input['cf_desc'],\n\t\t\t\t\t\t 'cf_content' => $this->ipsclass->txt_stripslashes($content),\n\t\t\t\t\t\t 'cf_type' => $this->ipsclass->input['cf_type'],\n\t\t\t\t\t\t 'cf_not_null' => $this->ipsclass->input['cf_not_null'],\n\t\t\t\t\t\t 'cf_max_input' => $this->ipsclass->input['cf_max_input'],\n\t\t\t\t\t\t 'cf_input_format' => $this->ipsclass->input['cf_input_format'],\n\t\t\t\t\t\t 'cf_topic'\t\t => $this->ipsclass->input['cf_topic'],\n\t\t\t\t\t\t 'cf_search'\t\t => $this->ipsclass->input['cf_search'],\n\t\t\t\t\t\t );\n\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->DB->do_update( 'downloads_cfields', $db_string, 'cf_id=' . $id );\n\t\t\t\n\t\t\t$this->rebuild_cache();\n\t\t\t\n\t\t\t$this->ipsclass->main_msg = \"Custom Field Edited\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'MAX(cf_position) as newpos',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from' => 'downloads_cfields' ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\t\t\t\n\t\t\t$max = $this->ipsclass->DB->fetch_row();\n\t\t\t\n\t\t\t$db_string['cf_position'] = $max['newpos']+1;\n\t\t\t\n\t\t\t$this->ipsclass->DB->do_insert( 'downloads_cfields', $db_string );\n\t\t\t\n\t\t\t$id = $this->ipsclass->DB->get_insert_id();\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_add_field( 'downloads_ccontent', \"field_{$id}\", 'text' );\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_optimize_table( 'downloads_ccontent' );\n\t\t\t\n\t\t\t$this->rebuild_cache();\n\t\t\t\n\t\t\t$this->ipsclass->main_msg = \"Custom Field Added\";\n\t\t}\n\t\t\n\t\tif( is_array($this->ipsclass->input['cats_apply']) AND count($this->ipsclass->input['cats_apply']) )\n\t\t{\n\t\t\t$did_at_least_one = 0;\n\t\t\t\n\t\t\tforeach( $this->lib->cat_lookup as $cid => $cdata )\n\t\t\t{\n\t\t\t\t$cfields = explode( ',', $cdata['ccfields'] );\n\t\t\t\t\n\t\t\t\tif( !in_array( $id, $cfields ) )\n\t\t\t\t{\n\t\t\t\t\tif( in_array( $cid, $this->ipsclass->input['cats_apply'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push( $cfields, $id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'downloads_categories', array( 'ccfields' => implode( ',', $cfields ) ), 'cid=' . $cid );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$did_at_least_one = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( !in_array( $cid, $this->ipsclass->input['cats_apply'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_cfields = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach( $cfields as $fid )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif( $fid != $id )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_cfields[] = $fid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->do_update( 'downloads_categories', array( 'ccfields' => implode( ',', $new_cfields ) ), 'cid=' . $cid );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$did_at_least_one = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( $did_at_least_one )\n\t\t\t{\n\t\t\t\t$this->lib->rebuild_cat_cache();\n\t\t\t}\n\t\t}\n\n\t\t$this->ipsclass->admin->redirect_noscreen( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code.'&req=customfields' );\n\t}",
"protected function hook_afterSave(){}",
"function saveConfiguration() {\n//\t\t$field_value = DevblocksPlatform::importGPC($_POST['field_value']);\n//\t\t$this->params['field_name'] = $field_value;\n\t}",
"function prfx_meta_save( $post_id ) {\r\n \r\n // Checks save status\r\n $is_autosave = wp_is_post_autosave( $post_id );\r\n $is_revision = wp_is_post_revision( $post_id );\r\n $is_valid_nonce = ( isset( $_POST[ 'prfx_nonce' ] ) && wp_verify_nonce( $_POST[ 'prfx_nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\r\n \r\n // Exits script depending on save status\r\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\r\n return;\r\n }\r\n \r\n // Checks for input and sanitizes/saves if needed\r\n if( isset( $_POST[ 'meta-text' ] ) ) {\r\n update_post_meta( $post_id, 'meta-text', sanitize_text_field( $_POST[ 'meta-text' ] ) );\r\n }\r\n \r\n}",
"function save($keys=null,$extra_where=null)\n\t{\n\t\tif (is_array($keys) && count($keys) && !isset($keys[0]))\t// allow to use an etag, eg array('etag=etag+1')\n\t\t{\n\t\t\t$this->data_merge($keys);\n\t\t\t$keys = null;\n\t\t}\n\t\t$ret = parent::save($keys,$extra_where);\n\n\t\tif ($ret == 0 && $this->customfields)\n\t\t{\n\t\t\t$this->save_customfields($this->data);\n\t\t}\n\t\treturn $ret;\n\t}",
"public function saveFields( $term_id ) \n\t{\n\t\tif ( isset( $_POST[self::CUSTOM_FIELDS_PREFIX] ) ) {\t\t\t\t\n\t\t\t$meta_data = $_POST[self::CUSTOM_FIELDS_PREFIX];\n\t\t\t$term_meta = get_option( sprintf( '%s_%d', $this->taxomomyStr, $term_id ) );\t\t\t\t\n\t\t\t$field_names = array_keys( $meta_data );\n\t\t\t\t\n\t\t\tforeach ( $field_names as $name ) {\n\t\t\t\tif ( isset ( $meta_data[$name] ) ) {\t\t\t\t\t\t\n\t\t\t\t\t$data = $meta_data[$name];\n\t\t\t\t\t\t\n\t\t\t\t\tif( is_string( $var ) ) {\n\t\t\t\t\t\t$data = wp_unslash( $data );\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$term_meta[$name] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t// save the option array.\n\t\t\tupdate_option( sprintf( '%s_%d', $this->taxomomyStr, $term_id ), $term_meta );\n\t\t}\n\t}",
"function writeCustomFieldsToDB(&$db,$tprojectID,$tsuiteID,&$hash)\r\n{\r\n $ENABLED = 1;\r\n $NO_FILTERS = null;\r\n\r\n $cfield_mgr = new cfield_mgr($db);\r\n $cf_map = $cfield_mgr->get_linked_cfields_at_design($tprojectID,$ENABLED,\r\n $NO_FILTERS,'testsuite');\r\n $cfield_mgr->design_values_to_db($hash,$tsuiteID,$cf_map);\r\n}",
"function mv_save_wc_order_other_fields( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return $post_id;\n }\n\n // Check the user's permissions.\n if ( 'page' == $_POST[ 'post_type' ] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return $post_id;\n }\n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return $post_id;\n }\n }\n // --- Its safe for us to save the data ! --- //\n\n // Sanitize user input and update the meta field in the database.\n update_post_meta( $post_id, '_reference_field', $_POST[ 'dhl_reference_field' ] );\n }",
"function save_custom_fields( $post_id, $post ) {\n if ( !isset($_POST['wpnext_wpnonce']) || !wp_verify_nonce($_POST['wpnext_wpnonce'], 'wpnext') )\n return;\n if ( !current_user_can( 'edit_post', $post_id ) )\n return;\n\n if ( isset($_POST['wpn_post_data']) ) {\n update_post_meta( $post_id, 'wpnext', $_POST['wpn_post_data']);\n } else {\n delete_post_meta( $post_id, 'wpnext');\n }\n }",
"function save_custom_fields( $type, $job_id, $values ) {\r\n\r\n\t\t$custom_fields = $this->get_custom_fields( true, $type );\r\n\t\t// Save Package/Product ID if POSTed from submit page\r\n\t\t$wcpl_pid = isset( $_POST['wcpl_jmfe_product_id'] ) ? intval( $_POST['wcpl_jmfe_product_id'] ) : false;\r\n\t\tif( $wcpl_pid ) update_post_meta( $job_id, '_wcpl_jmfe_product_id', $wcpl_pid );\r\n\r\n\t\tif ( ! empty( $custom_fields ) ) {\r\n\t\t\t$custom_enabled_fields = wp_list_filter( $custom_fields, array( 'status' => 'disabled' ), 'NOT' );\r\n\r\n\t\t\tforeach ( $custom_enabled_fields as $custom_field => $custom_field_config ) {\r\n\r\n\t\t\t\t$field_value = isset( $values[ $type ][ $custom_field ] ) ? $values[ $type ][ $custom_field ] : false;\r\n\r\n\t\t\t\tif ( ! isset( $field_value ) ) continue;\r\n\r\n\t\t\t\t$_meta_key = '_' . $custom_field;\r\n\r\n\t\t\t\t// Date Format Saving/Handling\r\n\t\t\t\tif( $custom_field_config['type'] == 'date' ) $field_value = WP_Job_Manager_Field_Editor_Fields_Date::convert_to_save( $field_value, $custom_field_config, $_meta_key, $job_id );\r\n\r\n\t\t\t\t// Featured image\r\n\t\t\t\tif( $_meta_key === '_featured_image' && ! empty( $field_value ) ){\r\n\t\t\t\t\t$attach_id = get_attachment_id_from_url( $field_value );\r\n\r\n\t\t\t\t\tif ( $attach_id !== get_post_thumbnail_id( $job_id ) ) {\r\n\t\t\t\t\t\tset_post_thumbnail( $job_id, $attach_id );\r\n\t\t\t\t\t} elseif ( '' == $field_value && has_post_thumbnail( $job_id ) ) {\r\n\t\t\t\t\t\tdelete_post_thumbnail( $job_id );\r\n\t\t\t\t\t\tdelete_post_meta( $job_id, $_meta_key );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Don't update post meta for default fields\r\n\t\t\t\tif( isset( $custom_field_config['origin'] ) && $custom_field_config['origin'] != \"default\" ){\r\n\t\t\t\t\tupdate_post_meta( $job_id, $_meta_key, $field_value );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Auto save auto populate field to user meta\r\n\t\t\t\tif( isset( $custom_field_config[ 'populate_save' ] ) && ! empty( $custom_field_config[ 'populate_save' ] ) ){\r\n\t\t\t\t\t// Only update user meta if actual value is different from default value\r\n\t\t\t\t\tif( $custom_field_config['populate_default'] !== $field_value ) {\r\n\t\t\t\t\t\tif( isset( $custom_field_config['populate_save_as'] ) ) $_meta_key = $custom_field_config['populate_save_as'];\r\n\t\t\t\t\t\tupdate_user_meta( get_current_user_id(), $_meta_key, $field_value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"public function save( $value = null ) {\n\t\t$submited_value = json_decode( stripslashes( $_REQUEST['customized'] ) );\n\t\tparent::save( explode( ',', $submited_value->{$this->field->alias} ) );\n\t\t/* dirty hack to make multiple elms on customize.php page */\n\n\t}",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"function psc_save_form($data) {\n\tglobal $wpdb, $psc;\n\t\n\t$old_fields = $data['data'];\n\t$fields = array();\n\tforeach($old_fields as $field) {\n\t\t$fields[] = $field;\n\t}\n\t\n\tforeach($fields as $key => $value) {\n\t\tif(empty($value['options']) || !in_array($value['type'], array('select', 'multiselect', 'radio', 'checkbox'))) {\n\t\t\tunset($fields[$key]['options']);\n\t\t}\n\t\t\n\t\tif(isset($fields[$key]['options'])) {\n\t\t\t$fields[$key]['options'] = explode(',', $fields[$key]['options']);\n\t\t\t$fields[$key]['options'] = array_map('trim', $fields[$key]['options']);\n\t\t}\n\t\t\n\t\t$fields[$key]['slug'] = 'psc_'.str_replace('psc_', '', $value['slug']);\n\t\tif(isset($value['required']) && $value['required']=='on') {\n\t\t\t$fields[$key]['required'] = 'true';\n\t\t} else {\n\t\t\t$fields[$key]['required'] = 'false';\n\t\t}\n\t\t\n\t\tif(isset($value['maps_as']) && $value['maps_as']=='on') {\n\t\t\t$fields[$key]['maps_as'] = 'content';\n\t\t} else {\n\t\t}\n\t}\n\t\n \tif(isset($data['captcha']) && $data['captcha']=='on') {\n\t\t// nothing\n\t\t$data['captcha'] = 1;\n\t} else {\n\t\t$data['captcha'] = 0;\n\t}\n\t\n\tif(isset($data['thanks_url']) && !empty($data['thanks_url'])) {\n\t\t// nothing\n\t} else {\n\t\t$data['thanks_url'] = null;\n\t}\n\t\n\t// echo '<br /><br />';\n\t// var_dump('SET data=\\''.mysql_escape_string(serialize($fields)).'\\', name=\"'.mysql_escape_string($data['title']).'\", slug=\"'.mysql_escape_string($data['slug']).'\", thanks_url=\"'.mysql_escape_string($data['thanks_url']).'\", default_status=\"'.mysql_escape_string($data['default_status']).'\", default_category=\"'.mysql_escape_string($data['default_category']).'\", captcha=\"'.mysql_escape_string($data['captcha']).'\"');\n\t\n\tif(isset($data['psc_id'])) {\n\t\t$wpdb->query('UPDATE '.$psc->forms.' SET data=\\''.serialize($fields).'\\', name=\"'.$data['title'].'\", slug=\"'.$data['slug'].'\", thanks_url=\"'.$data['thanks_url'].'\", default_status=\"'.$data['default_status'].'\", default_category=\"'.$data['default_category'].'\", captcha=\"'.$data['captcha'].'\" WHERE id=\"'.$data['psc_id'].'\"');\n\t\treturn true;\n\t} else {\n\t\t$insert_array = array('data' => serialize($fields), 'name' => $data['title'], 'slug' => $data['slug'], 'thanks_url' => $data['thanks_url'], 'default_status' => $data['default_status'], 'default_category' => $data['default_category'], 'captcha' => $data['catpcha']);\n\t\t$wpdb->insert($psc->forms, $insert_array);\n\t\treturn $wpdb->insert_id;\n\t}\n}",
"public abstract function save();",
"public function save()\n {\n update_option($this->optionKey, $this->fields);\n }",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"public function save() {\n\t\t\t\n\t\t}",
"public function save()\n\t{\n\n\t}",
"function hometown_woocommerce_product_custom_fields_save($post_id)\n{\n $woocommerce_custom_product_text_field = $_POST['_custom_product'];\n update_post_meta($post_id, '_custom_product', esc_attr($woocommerce_custom_product_text_field));\n}",
"function projectpentagon_save_postdata($post_id) {\n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n\n if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) )\n return;\n\n // Check permissions\n\n if ( 'page' == $_POST['post_type'] ) \n {\n if ( !current_user_can( 'edit_page', $post_id ) )\n return;\n }\n else\n {\n if ( !current_user_can( 'edit_post', $post_id ) )\n return;\n }\n\n\t//update the tasting notes\n \t$outside_newvalue = $_POST['tasting-notes'];\n\tupdate_post_meta($post_id, 'tasting-notes', $outside_newvalue);\n\n // Do something with $mydata \n // probably using add_post_meta(), update_post_meta(), or \n // a custom table (see Further Reading section below)\n for($hh=1;$hh<6;$hh++)\n\n \t{\n \t//do an update for each of the potential 5 fields....\n\n \t$get_field_name\t\t\t\t\t=\t\"myplugin_new_field\" . $hh .\"\";\t\n \t$create_variable_name\t\t\t=\t\"pentagon-field-\". $hh .\"\";\t\n\t$create_name_of_field_to_update =\t\"mydata\" . $hh .\"\";\n\t$newvalue = $_POST[$get_field_name];\n\t//echo \"$newvalue is returning ---\". \t$newvalue\t.\"<br />\";//DEBUG\n\tupdate_post_meta($post_id, $create_variable_name, $newvalue);\t\n\n\t//echo \"get field name is returning --- \". $get_field_name\t.\"<br />\";//DEBUG\n\t//echo \"create variable name name is returning --- \". \t$create_variable_name\t\t.\"<br />\";//DEBUG\n\t//echo \"$create_name_of_field_to_update is returning --- \". \t$create_name_of_field_to_update\t.\"<br />\";//DEBUG\n\t}\n\n\n\n //echo \"$mydata is mydata....\";//debug\n\n}",
"public function save_field( $post_id ) {\n $product = wc_get_product( $post_id );\n $barcode = isset( $_POST['_wepos_barcode'] ) ? sanitize_text_field( $_POST['_wepos_barcode'] ) : '';\n if ( $product->is_type( 'simple' ) ) {\n $product->update_meta_data( '_wepos_barcode', $barcode );\n } else {\n $product->update_meta_data( '_wepos_barcode', '' );\n }\n $product->save();\n }",
"function nsbr_save_custom_data( $post_id ) {\r\n // verify if this is an auto save routine.\r\n // If it is our form has not been submitted, so we dont want to do anything\r\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\r\n return $post_id;\r\n\r\n // verify this came from the our screen and with proper authorization,\r\n // because save_post can be triggered at other times\r\n if ( !isset( $_POST['nsbr_noncename'] ) )\r\n return $post_id;\r\n\r\n if ( !wp_verify_nonce( $_POST['nsbr_noncename'], plugin_basename( __FILE__ ) ) )\r\n return $post_id;\r\n \r\n // Check this is the Contact Custom Post Type\r\n if ( 'nsbr' != $_POST['post_type'] ) {\r\n return $post_id;\r\n }\r\n \r\n // if our current user can't edit this post, bail\r\n if( !current_user_can( 'edit_nsbr' ) ) return $post_id;\r\n\r\n $boat = new nmmc_nsbr_helper();\r\n // OK to save meta data\r\n $history = $_POST['history'];\r\n $boat->save_boat_history($post_id, $history);\r\n \r\n $gallery = $_POST['gallery'];\r\n $boat->save_boat_gallery($post_id,$gallery);\r\n \r\n $nsbr_reg_no = sanitize_text_field( $_POST['nsbr_reg_no'] );\r\n $boat->save_boat_nsbr_registration($post_id,$nsbr_reg_no);\r\n\r\n \r\n $length_m = sanitize_text_field( $_POST['nsbr_length_m'] );\r\n update_post_meta( $post_id, '_nsbr_length_m', $length_m );\r\n \r\n $length_ft = sanitize_text_field( $_POST['nsbr_length_ft'] );\r\n update_post_meta( $post_id, '_nsbr_length_ft', $length_ft );\r\n \r\n $breadth_m = sanitize_text_field( $_POST['nsbr_breadth_m'] );\r\n update_post_meta( $post_id, '_nsbr_breadth_m', $breadth_m );\r\n \r\n $breadth_ft = sanitize_text_field( $_POST['nsbr_breadth_ft'] );\r\n update_post_meta( $post_id, '_nsbr_breadth_ft', $breadth_ft );\r\n \r\n $location = sanitize_text_field( $_POST['nsbr_location'] );\r\n update_post_meta( $post_id, '_nsbr_location', $location );\r\n \r\n $current_use = sanitize_text_field( $_POST['nsbr_current_use'] );\r\n update_post_meta( $post_id, '_nsbr_current_use', $current_use );\r\n \r\n $build_date = sanitize_text_field( $_POST['nsbr_build_date'] );\r\n update_post_meta( $post_id, '_nsbr_build_date', $build_date );\r\n \r\n $copyright = sanitize_text_field( $_POST['nsbr_copyright'] );\r\n update_post_meta( $post_id, '_nsbr_copyright', $copyright );\r\n}",
"function meta_boxes_save() {\r\n\t\t\r\n\t\t// Only process if the form has actually been submitted\r\n\t\tif (\r\n\t\t\tisset( $_POST['_wpnonce'] ) &&\r\n\t\t\tisset( $_POST['post_ID'] )\r\n\t\t) {\r\n\t\t\t\r\n\t\t\t// Do nonce security check\r\n\t\t\twp_verify_nonce( '_wpnonce', $_POST['_wpnonce'] );\r\n\t\t\t\r\n\t\t\t// Grab post ID\r\n\t\t\t$post_ID = (int) $_POST['post_ID'];\r\n\t\t\t\r\n\t\t\t// Iterate through each possible piece of meta data\r\n\t\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\t\tif ( isset( $_POST['_' . $key] ) ) {\r\n\t\t\t\t\t$data = esc_html( $_POST['_' . $key] ); // Sanitise data input\r\n\t\t\t\t\tupdate_post_meta( $post_ID, '_' . $key, $data ); // Store the data\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public function testUpdateReplenishmentCustomFields()\n {\n }",
"public function ecf_save_meta_box( $post_id ) {\r\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\r\n\t\t\tif ( $parent_id = wp_is_post_revision( $post_id ) ) {\r\n\t\t\t\t$post_id = $parent_id;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$fields = array();\r\n\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tarray_push( $fields, $customField['name'] );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ( $fields as $field ) {\r\n\t\t\t\tif ( array_key_exists( $field, $_POST ) ) {\r\n\t\t\t\t\tupdate_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"function save_c_p_tab_field($field){\n if (isset($_POST[$field['id']])){\n $option_value = $_POST[$field['id']];\n update_option($field['id'],$option_value);\n }else{\n delete_option($field['id']);\n }\n }",
"public function addField();",
"public function save() {\n\t\t/** @var FieldtypeFile $fieldtype */\n\t\t$fieldtype = $this->field->type;\n\t\treturn $fieldtype->saveFile($this->page, $this->field, $this);\n\t}",
"function save() {\n $name_changed = in_array('name', $this->modified_fields);\n \n \t$save = parent::save();\n \tif($name_changed && $save && !is_error($save)) {\n \t cache_remove('companies_id_name'); // remove ID - name map from cache\n \t} // if\n \treturn $save;\n }",
"function _acf_do_save_post($post_id = 0)\n{\n}",
"public function onAfterSaveField(&$field, &$post, &$file, &$item)\n\t{\n\t}",
"public function saveField($value) {\n return $this->setProperty('saveField', $value);\n }",
"public function saveField($value) {\n return $this->setProperty('saveField', $value);\n }",
"function wpcurriculos_save_postdata( $post_id ) {\n\n if ( !wp_verify_nonce( $_POST['pessoais_noncename'], plugin_basename(__FILE__) )) { return $post_id;}\n\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $post_id;\n \t\t\n\t\t\t$textfield2 = $_POST[\"textfield2\"];\n\t\t\tdelete_post_meta($post_id, 'textfield2');\n\t\t\tif (isset($textfield2) && !empty($textfield2)) \t{ add_post_meta($post_id, 'textfield2', $textfield2);}\n\t\t\t\n\t\t\t$textfield3 = $_POST[\"textfield3\"];\n\t\t\tdelete_post_meta($post_id, 'textfield3');\n\t\t\tif (isset($textfield3) && !empty($textfield3)) \t{ add_post_meta($post_id, 'textfield3', $textfield3);}\n\t\t\t$sexo = $_POST[\"sexo\"];\n\t\t\tdelete_post_meta($post_id, 'sexo');\n\t\t\tif (isset($sexo) && !empty($sexo)) \t \t\t\t{ add_post_meta($post_id, 'sexo', $sexo);}\n\t\t\t\n\t\t\t$e_civil = $_POST[\"e_civil\"];\n\t\t\tdelete_post_meta($post_id, 'e_civil');\n\t\t\tif (isset($e_civil) && !empty($e_civil)) \t \t{ add_post_meta($post_id, 'e_civil', $e_civil);}\n\n\t\t\t$textfield5 = $_POST[\"textfield5\"];\n\t\t\tdelete_post_meta($post_id, 'textfield5');\n\t\t\tif (isset($textfield5) && !empty($textfield5)) \t{ add_post_meta($post_id, 'textfield5', $textfield5);}\n\t\t\t\n\t\t\t$textfield6 = $_POST[\"textfield6\"];\n\t\t\tdelete_post_meta($post_id, 'textfield6');\n\t\t\tif (isset($textfield6) && !empty($textfield6)) \t{ add_post_meta($post_id, 'textfield6', $textfield6);}\n\t\t\t\n\t\t\t$textfield7 = $_POST[\"textfield7\"];\n\t\t\tdelete_post_meta($post_id, 'textfield7');\n\t\t\tif (isset($textfield7) && !empty($textfield7)) \t{ add_post_meta($post_id, 'textfield7', $textfield7);}\n\t\t\t\n\t\t\t$textfield8 = $_POST[\"textfield8\"];\n\t\t\tdelete_post_meta($post_id, 'textfield8');\n\t\t\tif (isset($textfield8) && !empty($textfield8)) \t{ add_post_meta($post_id, 'textfield8', $textfield8);}\n\t\t\t\n\t\t\t$textfield9 = $_POST[\"textfield9\"];\n\t\t\tdelete_post_meta($post_id, 'textfield9');\n\t\t\tif (isset($textfield9) && !empty($textfield9)) \t{ add_post_meta($post_id, 'textfield9', $textfield9);}\n\n\t\t\t$select4 = $_POST[\"select4\"];\n\t\t\tdelete_post_meta($post_id, 'select4');\n\t\t\tif (isset($select4) && !empty($select4)) \t{ add_post_meta($post_id, 'select4', $select4);}\n\t\t\t\n\t\t\t$select5 = $_POST[\"select5\"];\n\t\t\tdelete_post_meta($post_id, 'select5');\n\t\t\tif (isset($select5) && !empty($select5)) \t{ add_post_meta($post_id, 'select5', $select5);}\n\n\t\t\t$select6 = $_POST[\"select6\"];\n\t\t\tdelete_post_meta($post_id, 'select6');\n\t\t\tif (isset($select6) && !empty($select6)) \t{ add_post_meta($post_id, 'select6', $select6);}\n\t\t\t\n\t\t\t$select7 = $_POST[\"select7\"];\n\t\t\tdelete_post_meta($post_id, 'select7');\n\t\t\tif (isset($select7) && !empty($select7)) \t{ add_post_meta($post_id, 'select7', $select7);}\n\t\t\t\n\t\t\t$ensino = $_POST[\"ensino\"];\n\t\t\tdelete_post_meta($post_id, 'ensino');\n\t\t\tif (isset($ensino) && !empty($ensino)) \t{ add_post_meta($post_id, 'ensino', $ensino);}\n\t\t\t\n\t\t\t$textfield10 = $_POST[\"textfield10\"];\n\t\t\tdelete_post_meta($post_id, 'textfield10');\n\t\t\tif (isset($textfield10) && !empty($textfield10)) \t{ add_post_meta($post_id, 'textfield10', $textfield10);}\n\t\t\t\n\t\t\t$textfield11 = $_POST[\"textfield11\"];\n\t\t\tdelete_post_meta($post_id, 'textfield11');\n\t\t\tif (isset($textfield11) && !empty($textfield11)) \t{ add_post_meta($post_id, 'textfield11', $textfield11);}\n\t\t\t\n\t\t\t$textfield12 = $_POST[\"textfield12\"];\n\t\t\tdelete_post_meta($post_id, 'textfield12');\n\t\t\tif (isset($textfield12) && !empty($textfield12)) \t{ add_post_meta($post_id, 'textfield12', $textfield12);}\n\t\t\t\n\t\t\t$textfield13 = $_POST[\"textfield13\"];\n\t\t\tdelete_post_meta($post_id, 'textfield13');\n\t\t\tif (isset($textfield13) && !empty($textfield13)) \t{ add_post_meta($post_id, 'textfield13', $textfield13);}\n\t\t\t\n\t\t\t$textfield14 = $_POST[\"textfield14\"];\n\t\t\tdelete_post_meta($post_id, 'textfield14');\n\t\t\tif (isset($textfield14) && !empty($textfield14)) \t{ add_post_meta($post_id, 'textfield14', $textfield14);}\n\t\t\t\n\t\t\t$textfield15 = $_POST[\"textfield15\"];\n\t\t\tdelete_post_meta($post_id, 'textfield15');\n\t\t\tif (isset($textfield15) && !empty($textfield15)) \t{ add_post_meta($post_id, 'textfield15', $textfield15);}\n\t\t\t\n\t\t\t$textfield16 = $_POST[\"textfield16\"];\n\t\t\tdelete_post_meta($post_id, 'textfield16');\n\t\t\tif (isset($textfield16) && !empty($textfield16)) \t{ add_post_meta($post_id, 'textfield16', $textfield16);}\n\t\t\t\n\t\t\t$textfield17 = $_POST[\"textfield17\"];\n\t\t\tdelete_post_meta($post_id, 'textfield17');\n\t\t\tif (isset($textfield17) && !empty($textfield17)) \t{ add_post_meta($post_id, 'textfield17', $textfield17);}\n\t\t\t\n\t\t\t$ano = $_POST[\"ano\"];\n\t\t\tdelete_post_meta($post_id, 'ano');\n\t\t\tif (isset($ano) && !empty($ano)) \t{ add_post_meta($post_id, 'ano', $ano);}\n\t\t\t\n\t\t\t$textarea = $_POST[\"textarea\"];\n\t\t\tdelete_post_meta($post_id, 'textarea');\n\t\t\tif (isset($textarea) && !empty($textarea)) \t{ add_post_meta($post_id, 'textarea', $textarea);}\n\t\t\t\n\t\t\t$atual = $_POST[\"atual\"];\n\t\t\tdelete_post_meta($post_id, 'atual');\n\t\t\tif (isset($atual) && !empty($atual)) \t{ add_post_meta($post_id, 'atual', $atual);}\n\t\t\t\n\t\t\t$textfield30 = $_POST[\"textfield30\"];\n\t\t\tdelete_post_meta($post_id, 'textfield30');\n\t\t\tif (isset($textfield30) && !empty($textfield30)) \t{ add_post_meta($post_id, 'textfield30', $textfield30);}\n\n\t\t\t$textfield31 = $_POST[\"textfield31\"];\n\t\t\tdelete_post_meta($post_id, 'textfield31');\n\t\t\tif (isset($textfield31) && !empty($textfield31)) \t{ add_post_meta($post_id, 'textfield31', $textfield31);}\n\n\t\t\t$textfield32 = $_POST[\"textfield32\"];\n\t\t\tdelete_post_meta($post_id, 'textfield32');\n\t\t\tif (isset($textfield32) && !empty($textfield32)) \t{ add_post_meta($post_id, 'textfield32', $textfield32);}\n\n\t\t\t$textfield33 = $_POST[\"textfield33\"];\n\t\t\tdelete_post_meta($post_id, 'textfield33');\n\t\t\tif (isset($textfield33) && !empty($textfield33)) \t{ add_post_meta($post_id, 'textfield33', $textfield33);}\n\t\t\t\t\n\t\t\t$textarea2 = $_POST[\"textarea2\"];\n\t\t\tdelete_post_meta($post_id, 'textarea2');\n\t\t\tif (isset($textarea2) && !empty($textarea2)) \t{ add_post_meta($post_id, 'textarea2', $textarea2);}\n\t\t\t\n\t\t\t$profissao = $_POST[\"profissao\"];\n\t\t\tdelete_post_meta($post_id, 'profissao');\n\t\t\tif (isset($profissao) && !empty($profissao)) \t{ add_post_meta($post_id, 'profissao', $profissao);}\n\t\t\t\t\n\t\t\t$textarea3 = $_POST[\"textarea3\"];\n\t\t\tdelete_post_meta($post_id, 'textarea3');\n\t\t\tif (isset($textarea3) && !empty($textarea3)) \t{ add_post_meta($post_id, 'textarea3', $textarea3);}\n\t\t\t\n\t\t\t$email = $_POST[\"email\"];\n\t\t\tdelete_post_meta($post_id, 'email');\n\t\t\tif (isset($email) && !empty($email)) \t{ add_post_meta($post_id, 'email', $email);}\n\t\t\t\n}",
"public function save()\r\n {\r\n \r\n }",
"public function postSave() {}",
"public function save()\n\t{\n\t\tparent::save();\n\t\t\\IPS\\Widget::deleteCaches( 'donations', 'nexus' );\n\t\tstatic::recountCustomerFields();\n\t}",
"function save_meta_box_custompost( $post_id ) {\n if ( defined( 'DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;\n if ( $parent_id = wp_is_post_revision( $post_id ) ) {\n $post_id = $parent_id;\n }\n $fields = ['published_date'];\n foreach ( $fields as $field ) {\n if ( array_key_exists( $field, $_POST ) ) {\n update_post_meta( $post_id, $field, sanitize_text_field( $_POST[$field] ) );\n }\n }\n }",
"private function before_custom_save()\n\t\t{\n\t\t\t$fields = self::$db->table_info($this->table_name);\n\t\t\tforeach($fields AS $field)\n\t\t\t{\n\t\t\t\tif(!strlen($this->$field['name'])) {\n\t\t\t\t\t$this->$field['name'] = 'NULL';\n\t\t\t\t}\n\t\t\t\tif(method_exists($this, 'preSave_'.$field['name'])) {\n\t\t\t\t\t$this->{'preSave_'.$field['name']}($field);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function save()\r\n {\r\n //\r\n }",
"public function save()\n {\n // For V2.0\n }",
"function wooc_save_extra_register_fields( $customer_id ) {\n\tif ( isset( $_POST['first_name'] ) ) {\n\t\t// WordPress default first name field.\n\t\tupdate_user_meta( $customer_id, 'first_name', sanitize_text_field( $_POST['first_name'] ) );\n\n\t\t// WooCommerce billing first name.\n\t\tupdate_user_meta( $customer_id, 'billing_first_name', sanitize_text_field( $_POST['first_name'] ) );\n\n\t\t// WooCommerce shipping first name.\n\t\tupdate_user_meta( $customer_id, 'shipping_first_name', sanitize_text_field( $_POST['first_name'] ) );\n\t}\n\n\tif ( isset( $_POST['last_name'] ) ) {\n\t\t// WordPress default last name field.\n\t\tupdate_user_meta( $customer_id, 'last_name', sanitize_text_field( $_POST['last_name'] ) );\n\n\t\t// WooCommerce billing last name.\n\t\tupdate_user_meta( $customer_id, 'billing_last_name', sanitize_text_field( $_POST['last_name'] ) );\n\n\t\t// WooCommerce shipping last name.\n\t\tupdate_user_meta( $customer_id, 'shipping_last_name', sanitize_text_field( $_POST['last_name'] ) );\n\t}\n\n\tif ( isset( $_POST['contact_number'] ) ) {\n\t\t// WooCommerce billing phone\n\t\tupdate_user_meta( $customer_id, 'billing_phone', sanitize_text_field( $_POST['contact_number'] ) );\n\t}\n\n\tif ( isset( $_POST['address'] ) ) {\n\t\t// WooCommerce billing address line 1\n\t\tupdate_user_meta( $customer_id, 'billing_address_1', sanitize_text_field( $_POST['address'] ) );\n\n\t\t// WooCommerce shipping address line 1\n\t\tupdate_user_meta( $customer_id, 'shipping_address_1', sanitize_text_field( $_POST['address'] ) );\n\t}\n\n\tif ( isset( $_POST['city'] ) ) {\n\t\t// WooCommerce billing city\n\t\tupdate_user_meta( $customer_id, 'billing_city', sanitize_text_field( $_POST['city'] ) );\n\n\t\t// WooCommerce shipping city\n\t\tupdate_user_meta( $customer_id, 'shipping_city', sanitize_text_field( $_POST['city'] ) );\n\t}\n\n\tif ( isset( $_POST['zip_code'] ) ) {\n\t\t// WooCommerce billing postcode\n\t\tupdate_user_meta( $customer_id, 'billing_postcode', sanitize_text_field( $_POST['zip_code'] ) );\n\n\t\t// WooCommerce shipping postcode\n\t\tupdate_user_meta( $customer_id, 'shipping_postcode', sanitize_text_field( $_POST['zip_code'] ) );\n\t}\n\n\tif ( isset( $_POST['country'] ) ) {\n\t\t// WooCommerce billing country\n\t\tupdate_user_meta( $customer_id, 'billing_country', sanitize_text_field( $_POST['country'] ) );\n\n\t\t// WooCommerce shipping country\n\t\tupdate_user_meta( $customer_id, 'shipping_country', sanitize_text_field( $_POST['country'] ) );\n\t}\n}",
"public function saveCustomFields($fields, $category) {\n // usuwanie dotychczasowych powiazan\n if($this->getPrimaryKey()) {\n $q = Doctrine_Query::create()\n ->delete('ArticleCustomFieldValue acfv')\n ->where('acfv.article_id = ?', $this->getPrimaryKey());\n\n $q->execute();\n }\n\n // pobranie dozwolonych pol na podstawie kategorii\n $q = Doctrine::getTable('ArticleCustomFields2ArtCategories')\n ->createQuery('cf2ac')\n ->leftJoin('cf2ac.ArticleCustomField acf')\n// ->where('artcategory_id = ?', $category);\n ->andWhereIn('artcategory_id', array_keys(Doctrine::getTable('ArtCategories')->find($category)->getAncestorsArrayByIds(true)));\n\n $validFields = $q->execute();\n\n foreach($validFields as $validField) {\n\n foreach($fields as $field => $value) {\n\n if($field == $validField->ArticleCustomField->getName()) {\n $this->setCustomField($field, $value);\n }\n }\n }\n }",
"function save();",
"function save();",
"function okra_form_single_save() {\n\n\tif ($_POST[\"action\"] === \"okra_form_single_save\") {\n\n\t\tglobal $wpdb;\n\t\t$id = $_POST[\"id\"];\n\t\t//echo $id;\n\t\t$name = sanitize_text_field($_POST[\"name\"]);\n\t\t$page = sanitize_text_field($_POST[\"page\"]);\n\t\t$btn_text = sanitize_text_field($_POST[\"btn_text\"]);\n\t\t$short_code = sanitize_text_field($_POST[\"short_code\"]);\n\n\t\t$array = array(\n\t\t\t\"name\" => $name,\n\t\t\t\"page\" => $page,\n\t\t\t\"btn_text\"=>$btn_text,\n\t\t\t\"short_code\" => $short_code\n\t\t);\n\n\t\t$wpdb->update($wpdb->prefix . \"okra_all_forms\", $array, array(\"id\" => $id));\n\t\twp_redirect(admin_url() . \"?page=okra_wordpress_plugin&&update=true\");\n\n\t}\n}",
"function foodpress_save_meta_data($post_id, $post){\n\t\t\tglobal $pagenow;\n\n\t\t\tif ( empty( $post_id ) || empty( $post ) ) return;\n\t\t\tif($post->post_type!='menu') return;\n\t\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return;\n\n\t\t\t// Prevent quick edit from clearing custom fields\n\t\t\tif (defined('DOING_AJAX') && DOING_AJAX) return;\n\t\t\tif ( is_int( wp_is_post_revision( $post ) ) ) return;\n\t\t\tif ( is_int( wp_is_post_autosave( $post ) ) ) return;\n\t\t\t\n\t\t\t// verify this came from the our screen and with proper authorization,\n\t\t\t// because save_post can be triggered at other times\n\t\t\tif( isset($_POST['fp_noncename']) ){\n\t\t\t\tif ( !wp_verify_nonce( $_POST['fp_noncename'], plugin_basename( __FILE__ ) ) ){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$_allowed = array( 'post-new.php', 'post.php' );\n\t\t\tif(!in_array($pagenow, $_allowed)) return;\n\n\t\t\t/* Get the post type object. */\n\t\t\t$post_type = get_post_type_object( $post->post_type );\n\t\t\t\n\t\t\t\n\t\t\t// Check permissions\n\t\t\tif ( !current_user_can( $post_type->cap->edit_post, $post_id ) )\n\t\t\t\treturn;\t\n\n\t\t\t\n\t\t\t//save the post meta values\n\t\t\t//$fields_ar =apply_filters();\n\t\t\t\n\t\t\t$meta_fields = $this->foodpress_menu_metabox_array();\t\t\t\n\t\t\t\n\t\t\t// run through all the custom meta fields\n\t\t\tforeach($meta_fields as $mb=>$f_val){\n\t\t\t\t\n\t\t\t\tif(!empty($f_val)){\n\t\t\t\t\tif( $f_val['type']=='multiinput'){\n\t\t\t\t\t\tforeach($f_val['ids'] as $fvals){\n\t\t\t\t\t\t\t$this->fp_individual_post_values($fvals, $post_id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->fp_individual_post_values($f_val['id'], $post_id);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//update_post_meta($post_id, 'test', $_POST['fp_menuicons']);\n\t\t\t\n\t\t\t// save user closed meta field boxes\n\t\t\t$fp_closemeta_value = (isset($_POST['fp_collapse_meta_boxes']))? $_POST['fp_collapse_meta_boxes']: '';\n\t\t\t\n\t\t\tfoodpress_save_collapse_metaboxes($post_id, $fp_closemeta_value );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// (---) hook for addons\n\t\t\tdo_action('foodpress_save_meta', $post_id);\t\n\t\t\t\t\n\t\t}",
"function save_custom_field_brand( $post_id ) {\n $product = wc_get_product( $post_id );\n $details_brand = isset( $_POST['custom_field_brand'] ) ? $_POST['custom_field_brand'] : '';\n $product->update_meta_data( 'custom_field_brand', sanitize_textarea_field( $details_brand ) );\n $product->save();\n}",
"protected function save()\n\t{\n\t\t$this->saveItems();\n\t\t//$this->saveAssignments();\n\t\t//$this->saveRules();\n\t}",
"function vw_hospital_bn_appointdesig_saveDoc( $post_id ) {\n\tif( isset( $_POST[ 'meta-area' ] ) ) {\n\t update_post_meta( $post_id, 'meta-area', $_POST[ 'meta-area' ] );\n\t}\n\tif( isset( $_POST[ 'meta-Time' ] ) ) {\n\t update_post_meta( $post_id, 'meta-Time', $_POST[ 'meta-Time' ] );\n\t}\n\tif( isset( $_POST[ 'meta-pname' ] ) ) {\n\t update_post_meta( $post_id, 'meta-pname', $_POST[ 'meta-pname' ] );\n\t}\n\tif( isset( $_POST[ 'meta-pemail' ] ) ) {\n\t update_post_meta( $post_id, 'meta-pemail', $_POST[ 'meta-pemail' ] );\n\t}\t\n}",
"function vw_hospital_bn_metadesig_saveDoc( $post_id ) {\n\tif( isset( $_POST[ 'meta-Day' ] ) ) {\n\t update_post_meta( $post_id, 'meta-Day', $_POST[ 'meta-Day' ] );\n\t}\n\tif( isset( $_POST[ 'meta-Time' ] ) ) {\n\t update_post_meta( $post_id, 'meta-Time', $_POST[ 'meta-Time' ] );\n\t}\n}",
"public function testUpdateOrderCustomFields()\n {\n }",
"public function save( $post_id ) {\n global $wp_session;\n\n # ensure data exists and is valid request from user\n if ( array_key_exists('verifyGSC_field', $_POST ) && wp_verify_nonce( $_REQUEST['verifyGSC_nonce'], __FILE__ ) ) {\n\n # check if array is empty\n $fields = array_filter( $_POST['verifyGSC_field'] );\n\n # update meta with new data\n if (empty($fields)) {\n update_post_meta( $post_id, '_verifyGSC_field', array( $o_source ) );\n }\n\n }\n }",
"public function save_custom_fields( $post_id, $data = array(), $allow_log = true ) {\n\n\t\t/* We store all the data to log in here */\n\t\t$log = array();\n\n\t\t/* Store all fields saved to DB and the value saved */\n\t\t$saved = array();\n\n\t\t$fields = $this->get_custom_fields();\n\n\t\t/**\n\t\t * dev_save_custom_fields_before hook\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\tdo_action( 'dev_save_custom_fields_before', $post_id );\n\n\t\tforeach ( $fields as $field_id => $field ) {\n\n\t\t\t/**\n\t\t\t * All name attributes are prefixed with dev_\n\t\t\t * so we need to add it to get the real field ID.\n\t\t\t */\n\t\t\t$field_form_id = \"dev_$field_id\";\n\n\t\t\t/* Process core fields differently. */\n\t\t\tif ( true === $field['args']['core'] ) {\n\n\t\t\t\tif ( isset( $data[ $field_form_id ] ) ) {\n\t\t\t\t\t$this->save_core_field( $post_id, $field, $data[ $field_form_id ] );\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Ignore fields in \"no edit\" mode.\n\t\t\t *\n\t\t\t * If we're on the admin and the custom field is set as\n\t\t\t * \"no edit\" (by restricting the capability), then the field\n\t\t\t * won't be passed in the $_POST, which as a result would have\n\t\t\t * the field deleted.\n\t\t\t *\n\t\t\t * If the no edit mode is enabled for the current field, we simply ignore it.\n\t\t\t */\n\t\t\tif ( is_admin() && ! current_user_can( $field['args']['capability'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Get the custom field object.\n\t\t\t */\n\t\t\t$custom_field = new CustomField( $field_id, $field );\n\n\t\t\tif ( isset( $data[ $field_form_id ] ) ) {\n\n\t\t\t\t$value = $custom_field->get_sanitized_value( $data[ $field_form_id ] );\n\t\t\t\t$result = $custom_field->update_value( $value, $post_id );\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * This is actually important as passing an empty value\n\t\t\t\t * for custom fields that aren't set in the form allows\n\t\t\t\t * for deleting values that aren't used from the database.\n\t\t\t\t * An unchecked checkbox for instance will not be set\n\t\t\t\t * in the form even though the value has to be deleted.\n\t\t\t\t */\n\t\t\t\t$value = '';\n\t\t\t\t$result = $custom_field->update_value( $value, $post_id );\n\t\t\t}\n\n\t\t\tif ( 1 === $result || 2 === $result ) {\n\t\t\t\t$saved[ $field['name'] ] = $value;\n\t\t\t}\n\n\t\t\tif ( true === $field['args']['log'] && true === $allow_log ) {\n\n\t\t\t\t/**\n\t\t\t\t * If the custom field is a taxonomy we need to convert the term ID into its name.\n\t\t\t\t *\n\t\t\t\t * By checking if $result is different from 0 we make sure that the term actually exists.\n\t\t\t\t * If the term didn't exist the save function would have seen it and returned 0.\n\t\t\t\t */\n\t\t\t\tif ( 'taxonomy' === $field['args']['field_type'] && 0 !== $result ) {\n\t\t\t\t\t$term = get_term( (int) $value, $field['name'] );\n\t\t\t\t\t$value = $term->name;\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * If the \"options\" parameter is set for this field, we assume it is because\n\t\t\t\t * the field type has multiple options. In order to make is more readable,\n\t\t\t\t * we try to replace the field value by the value label.\n\t\t\t\t *\n\t\t\t\t * This process is based on the fact that field types options always follow\n\t\t\t\t * the schema option_id => option_label.\n\t\t\t\t */\n\t\t\t\tif ( isset( $field['args']['options'] ) && is_array( $field['args']['options'] ) ) {\n\n\t\t\t\t\t/* Make sure arrays are still readable */\n\t\t\t\t\tif ( is_array( $value ) ) {\n\n\t\t\t\t\t\t$new_values = array();\n\n\t\t\t\t\t\tforeach ( $value as $val ) {\n\t\t\t\t\t\t\tif ( array_key_exists( $val, $field['args']['options'] ) ) {\n\t\t\t\t\t\t\t\tarray_push( $new_values, $field['args']['options'][ $val ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Only if all original values were replaced we update the $value var. */\n\t\t\t\t\t\tif ( count( $new_values ) === count( $value ) ) {\n\t\t\t\t\t\t\t$value = $new_values;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$value = implode( ', ', $value );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( array_key_exists( $value, $field['args']['options'] ) ) {\n\t\t\t\t\t\t\t$value = $field['args']['options'][ $value ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$tmp = array(\n\t\t\t\t\t'action' => '',\n\t\t\t\t\t'label' => dev_get_field_title( $field ),\n\t\t\t\t\t'value' => $value,\n\t\t\t\t\t'field_id' => $field['name']\n\t\t\t\t);\n\n\t\t\t\tswitch ( (int) $result ) {\n\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$tmp['action'] = 'added';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t$tmp['action'] = 'updated';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t$tmp['action'] = 'deleted';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\t/* Only add this to the log if something was done to the field value */\n\t\t\t\tif ( ! empty( $tmp['action'] ) ) {\n\t\t\t\t\t$log[] = $tmp;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/**\n\t\t * Log the changes if any.\n\t\t */\n\t\tif ( ! empty( $log ) ) {\n\t\t\tdev_log( $post_id, $log );\n\t\t}\n\n\t\t/**\n\t\t * dev_save_custom_fields_before hook\n\t\t *\n\t\t * @since 1.0.0\n\t\t */\n\t\tdo_action( 'dev_save_custom_fields_after', $post_id );\n\n\t\treturn $saved;\n\n\t}",
"function do_save(){\n\t\t// check that number and post_ID is set\n\t\tif( empty($this->post_ID) || empty($this->number) ) return false;\n\t\t\n\t\t// check that we have data in POST\n\t\tif( $this->id_base != 'checkbox' && (\n\t\t\t\tempty($_POST['field-'.$this->id_base][$this->number]) ||\n\t\t\t\t!is_array($_POST['field-'.$this->id_base][$this->number])\n\t\t\t)\n\t\t )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$input = @$_POST['field-'.$this->id_base][$this->number];\n\t\t// get real values\n\t\t$values = $this->save( $input );\n\t\t// save to post meta\n\t\tupdate_post_meta($this->post_ID, $this->slug, $values);\n\t\treturn true;\n\t}"
] | [
"0.77478546",
"0.71502805",
"0.680388",
"0.6733931",
"0.6707489",
"0.66934514",
"0.6637578",
"0.6630833",
"0.65892756",
"0.65819794",
"0.65817565",
"0.657542",
"0.65376043",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.65298855",
"0.6511848",
"0.6504516",
"0.65039647",
"0.6496027",
"0.6488725",
"0.64694893",
"0.64549965",
"0.6449421",
"0.6447482",
"0.6413893",
"0.6408111",
"0.6401725",
"0.6392281",
"0.63829243",
"0.63773435",
"0.6364179",
"0.6355224",
"0.6350643",
"0.6342192",
"0.6327618",
"0.63247037",
"0.63247037",
"0.63247037",
"0.63247037",
"0.63247037",
"0.6293399",
"0.6283376",
"0.62798667",
"0.6269347",
"0.6269347",
"0.62666947",
"0.62635195",
"0.62583804",
"0.62514913",
"0.624123",
"0.62392557",
"0.62363243",
"0.6231716",
"0.62286586",
"0.62118363",
"0.62099534",
"0.619728",
"0.61833864",
"0.6177589",
"0.6174326",
"0.6171795",
"0.6169205",
"0.6169205",
"0.61680984",
"0.6164047",
"0.61639386",
"0.61597764",
"0.6143977",
"0.6140842",
"0.613512",
"0.61335623",
"0.6130599",
"0.6121122",
"0.6116511",
"0.6116511",
"0.61087656",
"0.6105898",
"0.60934204",
"0.60933256",
"0.6081677",
"0.60530406",
"0.60459614",
"0.60447305",
"0.60346836",
"0.6033998"
] | 0.0 | -1 |
/ 2.5 IMG ALT TAG / | public static function getAltAttribute(int $id = 0){
// vars
$output = '';
$lang = prefix_core_BaseFunctions::getCurrentLang();
// check if active lang is default or not
if($lang == SELF::$WPimgAttr_Alt_languages[0]):
// default language
$output .= get_post_meta($id, '_wp_attachment_image_alt', TRUE);
else:
// alternative text
$name = SELF::$WPimgAttr_Alt_prefix . $lang;
$output .= get_post_meta($id, $name, true);
endif;
// output
return $output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function IMGalt_Content($content) {\n if($content):\n // encode content\n $content = mb_convert_encoding($content, 'HTML-ENTITIES', \"UTF-8\");\n $document = new \\DOMDocument();\n // Disable libxml errors and allow user to fetch error information as needed\n libxml_use_internal_errors(true);\n $document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n // get img tag from content\n $images = $document->getElementsByTagName('img');\n foreach ($images as $image) {\n // get orginal from srcset\n if( $image->hasAttribute('srcset') ):\n $orginal = '';\n // get srcset from content and explode to array\n $srcset = $image->getAttribute('srcset');\n $srcset_array = explode(\", \", $srcset);\n // get orginal size\n foreach ($srcset_array as $key => $value) {\n $single_srcset = explode(\" \", $value);\n $src_size = str_replace(\"w\", \"\", end($single_srcset));\n if(strpos($single_srcset[0], $src_size) !== false):\n // not the orginal size\n // $orginal .= $single_srcset[0] . ' ' . $src_size;\n else:\n $orginal .= $single_srcset[0];\n endif;\n }\n else:\n $orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src');\n endif;\n // get orginal img id and call alt\n $id = attachment_url_to_postid($orginal);\n $alt = SELF::getAltAttribute($id);\n $image->removeAttribute('alt');\n $image->setAttribute('alt', $alt);\n }\n // output\n return $document->saveHTML();\n endif;\n }",
"function IMGalt_Attachment($attributes, $attachment){\n // print_r($attributes);\n // print_r($attachment);\n // get up to date alt attribute\n $alt = SELF::getAltAttribute($attachment->ID);\n // set alt tag\n $attributes['alt'] = $alt;\n // output\n return $attributes;\n }",
"public function getAlt()\n {\n return $this->alt;\n }",
"public function getImageTag();",
"function cbv_get_image_alt( $url ){\n if( isset( $url ) ){\n $output = '';\n $id = attachment_url_to_postid($url);\n $image_title = get_the_title($id);\n $image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n $image_alt = str_replace('-', ' ', $image_alt);\n $output = $image_alt;\n\n return $output;\n }\n return false;\n}",
"public function getAlt(): string\n {\n return htmlspecialchars($this->getDescription(), ENT_QUOTES);\n }",
"function iti_get_image_alt_from_url( $url = '' ) {\n\tglobal $wpdb;\n\n\t$url = esc_url( $url );\n\n\t/** @noinspection PhpUndefinedMethodInspection */\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $url ) );\n\n\t$post_id = isset( $attachment[0] ) ? $attachment[0] : 0;\n\t$alt = get_post_meta( absint( $post_id ), '_wp_attachment_image_alt', true );\n\n\treturn $alt;\n}",
"public function setAlt($alt)\n {\n $this->alt = $alt;\n $this->setAttributes(\"Alt\");\n }",
"function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}",
"public static function img($img, $alt, $title = '') {\r\n\t\t\t$file = WEB_ROOT . '/' . $img;\r\n\t\t\tif(!file_exists($file)) {\r\n\t\t\t\tABPF::logger()->error(\"Image file $file doesn't exist!\");\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\t$v = filemtime($file);\r\n\t\t\treturn sprintf('<img src=\"%s/%s?v=%d\" alt=\"%s\" title=\"%s\" />', BASE_URL, $img, $v, $alt, $title);\r\n\t\t}",
"function cws_get_alt_text( $image_url ) {\n\tglobal $wpdb;\n\n\tif( ! isset( $image_url ) ) {\n\t\techo \"Please add an image.\";\n\t\treturn;\n\t}\n\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\t$alt_text = get_post_meta( $attachment[0], '_wp_attachment_image_alt', true );\n\t$alt_default = 'CWS default alt tag';\n\n\tif( ! empty( $alt_text ) ) {\n\t\treturn $alt_text;\n\t} else {\n\t\treturn $alt_default;\n\t}\n}",
"function getSrcAltImage($postID,$size=false){\n\t$imgID = get_post_thumbnail_id($postID);\n\t$img = wp_get_attachment_image_src($imgID,$size, false, '');\n\t$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);\n\t$imgAttr = array(\n\t\t'url' => $img,\n\t\t'alt' => $imgAlt\n\t);\n\tif(is_shop()){\n\t\techo '<section class=\"shop-image\">';\n\t\techo '<img class=\"img-max\" src=\"' . $imgAttr['url'][0] . '\" alt=\"\" />';\n\t\techo '</section>';\n\t}else{\n\t\treturn $imgAttr;\n\t}\n}",
"public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}",
"function img($src = '', $attributes = '', $index_page = false)\n\t{\n\t\tif ( ! is_array($src) )\n\t\t{\n\t\t\t$src = array('src' => $src);\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset($src['alt']))\n\t\t{\n\t\t\t$src['alt'] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ($src as $k => $v)\n\t\t{\n\t\t\tif ($k === 'src' && ! preg_match('#^(data:[a-z,;])|(([a-z]+:)?(?<!data:)//)#i', $v))\n\t\t\t{\n\t\t\t\tif ($index_page === true)\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->site_url($v).'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->slash_item('base_url').$v.'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img._stringify_attributes($attributes).' />';\n\t}",
"public function img($src = \"\", $alt = \"\") {\n echo \"<img src=assets/img/'\" . $src . \"' alt='\" . $alt . \"'>\";\n }",
"function cbv_get_image_tag( $id, $size = 'full', $title = false ){\n\tif( isset( $id ) ){\n\t\t$output = '';\n\t\t$image_title = get_the_title($id);\n\t\t$image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n\t\t$image_src = wp_get_attachment_image_src( $id, $size, false );\n\n\t\tif( $title ){\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\" title=\"'.$image_title.'\">';\n\t\t}else{\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\">';\n\t\t}\n\n\t\treturn $output;\n\t}\n\treturn false;\n}",
"function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}",
"function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' “%2$s”\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}",
"function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }",
"function initialize () {\n $this->set_openingtag ( \"<IMG alt=\\\"\" );\n\t $this->set_closingtag ( \"\\\"[attributes]/>\" );\n }",
"function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}",
"public static function img($src = NULL, $alt = NULL) {\n\t\t// Create attribute list\n\t\t$attributes = is_array($src) ? $src : array('src' => $src);\n\n\t\tif (is_array($alt)) {\n\t\t\t$attributes += $alt;\n\t\t} elseif ( ! empty($alt)) {\n\t\t\t// Add alt to attributes\n\t\t\t$attributes['alt'] = $alt;\n\t\t}\n\t\tif(!isset($attributes['alt'])) $attributes['alt'] = '';\n\t\tif (strpos($attributes['src'], '://') === FALSE) {\n\t\t\t// Make the src attribute into an absolute URL\n\t\t\t$attributes['src'] = url::asset('img/'.$attributes['src']);\n\t\t}\n\n\t\treturn '<img'.html::attributes($attributes).'>';\n\t}",
"public function image($src,$alt = null)\r\n {\r\n $element = $this->element('img')->attribute('src',$src);\r\n\r\n if(!is_null($alt))\r\n {\r\n $element->attribute('alt',$alt);\r\n }\r\n\r\n return $element;\r\n }",
"function swap_image($msg){\n\n\tif(preg_match(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",$msg)){\n\t\t$msg=preg_replace(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",\"$2\",$msg);\n\t}\n\nreturn $msg;\n}",
"public static function img($src, $alt = '', $attrs = '')\n {\n return '<img src=\"'.PUBLIC_PATH.\"img/$src\\\" alt=\\\"$alt\\\" \".Tag::getAttrs($attrs).'/>';\n }",
"function get_image_alt($file){\r\n $h1count = preg_match_all('/(alt=.)([a-zA-Z0-9\\s]{1,})/',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}",
"protected function img($url, $alt = null)\r\n {\r\n return sprintf('<img src=\"%s\" alt=\"%s\" style=\"width:%spx;height:%spx;\" />', $url, $alt, $this->size[0], $this->size[1]);\r\n }",
"function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}",
"function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }",
"function theme_img($uri, $tag=false)\n{\n \n\tif($tag)\n\t{\n\t\treturn '<img src=\"'.theme_url('assets/images/'.$uri).'\" alt=\"'.$tag.'\">';\n\t}\n\telse\n\t{\n\t\treturn theme_url('assets/images/'.$uri);\n\t}\n\t\n}",
"public static function getContentImageAlt($model)\n {\n $imageAlt = BaseAmosModule::t('amoscore', '#amos_carousel_widget_default_content_image_alt');\n if ($model instanceof ModelLabelsInterface) {\n $modelGrammar = $model->getGrammar();\n if ($modelGrammar instanceof ModelGrammarInterface) {\n $imageAlt = BaseAmosModule::t('amoscore', '#amos_carousel_widget_image_of') . $modelGrammar->getArticleSingular() . ' ' . strtolower($modelGrammar->getModelSingularLabel());\n }\n }\n return $imageAlt;\n }",
"function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}",
"public function setAltText($alt)\n {\n $this->_alt = $alt;\n }",
"function img_tag($src, array $attributes = array())\r\n{\r\n $attributes['src'] = $src;\r\n\r\n return tag('img', $attributes);\r\n}",
"function get_header_image_tag($attr = array())\n {\n }",
"function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}",
"public function createImgTag() {\n\t\t$this->imgNeko = '<img src=\"';\n\t\t$this->imgNeko .= $this->imgUri;\n\t\t$this->imgNeko .= '\" width=\"';\n\t\t$this->imgNeko .= $this->imgSize[0];\n\t\t$this->imgNeko .= '\" height=\"';\n\t\t$this->imgNeko .= $this->imgSize[1];\n\t\t$this->imgNeko .= '\" alt=\"';\n\t\t$this->imgNeko .= $this->creditInfo;\n\t\t$this->imgNeko .= '\">';\n\t}",
"public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }",
"public function getIconTag() {\n\t\treturn '<img class=\"languageIcon jsTooltip\" src=\"' . $this->getIconPath() . '\" title=\"' . $this->getTitle() . '\" alt=\"' . $this->getTitle() . '\" />';\n\t}",
"protected function getImageMeta(int $id){\n $image_alt=get_post_meta($id, '_wp_attachment_image_alt', true);\n return $image_alt;\n }",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"public static function image($url, $alt = '', $attributes = array()) {\n\t\t$attributes['alt'] = $alt;\n\n\t\treturn '<img src=\"'.URL::to_asset($url).'\"'.static::attributes($attributes).'>';\n\t}",
"function acd_add_img_title( $attr, $attachment = null ) {\n\t$img_title = trim( strip_tags( $attachment->post_title ) );\n\t$img_title = str_replace(\"-\", \" \", $img_title); //remove hyphens\n\t$img_title = str_replace(\"_\", \" \", $img_title); //remove underscores\n\t$img_title = preg_replace('/[0-9]+/', '', $img_title); //remove numbers\n\t$img_title = ucwords($img_title); //capitalize first letter of each word\n\n\t$attr['title'] = $img_title; //add image title attribute\n\t// or get the title instead of image title $attr['title'] = the_title_attribute( 'echo=0' );\n\t$attr['alt'] = $img_title; //add alt attribute\n\treturn $attr;\n}",
"static function img($source, $id = Null, $class = Null) \n {\n $file_name = array_pop(explode(\"/\", $source));\n $name = array_shift(explode(\".\", $file_name));\n return '<img' . self::_id($id) . self::_class($class) . ' src=\"'.$source.'\" title=\"'.$name.'\" alt=\"'.$name.'\" />'.self::$_nl;\n }",
"public function get_image_link()\n {\n }",
"function theme_img($uri, $tag = false) {\n if ($tag) {\n return '<img src=\"' . theme_url('assets/img/' . $uri) . '\" alt=\"' . $tag . '\">';\n } else {\n return theme_url('assets/img/' . $uri);\n }\n}",
"function jcr_image_custom($atts)\n {\n global $thisimage;\n\n assert_image();\n\n extract(lAtts(array(\n 'escape' => 'html',\n ), $atts));\n\n return ($escape == 'html')\n ? txpspecialchars($thisimage['jcr_image_custom'])\n : $thisimage['jcr_image_custom'];\n }",
"public function get_image_title()\n {\n }",
"function img($src = '', bool $indexPage = false, $attributes = ''): string\n {\n if (! is_array($src)) {\n $src = ['src' => $src];\n }\n if (! isset($src['src'])) {\n $src['src'] = $attributes['src'] ?? '';\n }\n if (! isset($src['alt'])) {\n $src['alt'] = $attributes['alt'] ?? '';\n }\n\n $img = '<img';\n\n // Check for a relative URI\n if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {\n if ($indexPage === true) {\n $img .= ' src=\"' . site_url($src['src']) . '\"';\n } else {\n $img .= ' src=\"' . slash_item('baseURL') . $src['src'] . '\"';\n }\n\n unset($src['src']);\n }\n\n // Append any other values\n foreach ($src as $key => $value) {\n $img .= ' ' . $key . '=\"' . $value . '\"';\n }\n\n // Prevent passing completed values to stringify_attributes\n if (is_array($attributes)) {\n unset($attributes['alt'], $attributes['src']);\n }\n\n return $img . stringify_attributes($attributes) . _solidus() . '>';\n }",
"public function icon($name , $alt)\n {\n return Wgt::icon($name,'xsmall',$alt);\n }",
"public function getAltTalentIconURL(){\r\n\t\treturn $this->buildTalentIconURL($this->armoryAdapter->getWowArmoryUrl(),\r\n\t\t\t\t\t\t\t\t\t\t$this->characterObject->getWowClassId(),\r\n\t\t\t\t\t\t\t\t\t\t$this->characterObject->getAltTalentBranch());\r\n }",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-' . esc_attr($align) . '\">';\n\n \t\t$html_str .= \"<p><img src='$url' alt='$title' /></p>\";\n\n\t\tif($caption) $html_str .= '\n\t\t<p class=\"wp-caption-text\">' . $caption . '</p>\n\t\t';\n\n\t$html_str .= '</div>';\n\n return $html_str;\n}",
"public function getDescriptionImages() {\n preg_match( '@src=\"([^\"]+)\"@' , $this->description, $match);\n return $match;\n }",
"function attachment_image_attributes_aload($attr) {\n\n if ( isset($attr['data-aload-on']) ) :\n\n $attr['data-aload'] = $attr['src'];\n $attr['src'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\n\n if ( $attr['srcset'] ) :\n $attr['data-aload-set'] = $attr['srcset'];\n $attr['srcset'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\n endif;\n endif;\n return $attr;\n}",
"function cdn_html_alter_image_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#((<img\\s+|<img\\s+[^>]*\\s+)src\\s*=\\s*[\\\"|\\'])($url_prefix_regex)([^\\\"|^\\']*)([\\\"|\\'])#i\";\n _cdn_html_alter_file_url($html, $pattern, 0, 4, 5, 1, '');\n}",
"function my_post_image_html( $html, $post_id, $post_image_id )\r\n{\r\n\t$src = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ));\r\n\t\r\n\t$html = '<img src=\"'.$src[0].'\" alt=\"'.esc_attr( get_post_field( 'post_title', $post_id ) ).'\">';\r\n\t\r\n\treturn $html;\r\n}",
"function get_img_src ($img) {\n return (preg_match('~\\bsrc=\"([^\"]++)\"~', $img, $matches)) ? $matches[1] : '';\n}",
"function dizzy_featured_ogimg () { \n\t $thumb = get_the_post_thumbnail($post->ID);\n\t\t$pattern= \"/(?<=src=['|\\\"])[^'|\\\"]*?(?=['|\\\"])/i\";\n\t\tpreg_match($pattern, $thumb, $thePath);\n\t\t$theSrc = $thePath[0];\n}",
"public function tag($attr = array()) {\n\n // don't return the tag if the url is not available\n if(!$this->result->url()) return false;\n\n return html::img($this->result->url(), array_merge(array(\n 'alt' => isset($this->options['alt']) ? $this->options['alt'] : ' ',\n 'class' => isset($this->options['class']) ? $this->options['class'] : null,\n ), $attr));\n\n }",
"protected function getImageAttributes() {}",
"public function addImg ($src, $attributes = array ())\n\t{\n\t\tif (!preg_match('#^(\\w+://)# i', $src)) {\n\n\t\t\t// Trim the trailing slash\n\t\t\t$src = ltrim($src, \"\\t\\n\\r\");\n\t\t}\n\t\t$attributes['src'] = $src;\n\t\t$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($src, PATHINFO_FILENAME);\n\n\t\treturn html_tag('img', $attributes);\n\t}",
"function htmlImages($src)\n{\n\treturn '<img src=' . $src . '>';\n}",
"function image($path, $phpThumbAttributes = array(), $htmlAttributes = array(), $useAltSyntax = false) {\n $thumb_attr = NULL;\n $w = NULL;\n $h = NULL;\n\n foreach ($phpThumbAttributes as $attr => $value) {\n if ($useAltSyntax) {\n if ($attr == 'w' || $attr == 'h') {\n $res = $attr;\n $$res = $value;\n } else {\n $thumb_attr .= $attr.'='.$value.';';\n }\n } else {\n $thumb_attr .= '&'.$attr.'='.$value;\n }\n }\n\n if ($useAltSyntax) {\n $thumb_path = $this->phpThumb.'/'.$thumb_attr.$w.'x'.$h.';'.$path;\n } else {\n $thumb_path = $this->phpThumb.'&src='.$path.$thumb_attr;\n }\n\n return $this->Html->image($thumb_path, $htmlAttributes);\n }",
"function zen_image_OLD($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir;\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n if (zen_not_null($width) && zen_not_null($height)) {\n $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n }\n\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }",
"private function getIcon($link, $image, $text, $target = '', $title = null, $class = null) {\n\t\t$mainframe = JFactory::getApplication ();\n\t\t$lang = JFactory::getLanguage ();\n\t\t?>\n\t\t<div style=\"float:<?php echo ($lang->isRTL()) ? 'right' : 'left'; ?>;\">\n\t\t\t<div class=\"icon\">\n\t\t\t\t<a <?php echo $title . $class;?> <?php echo $target;?> href=\"<?php echo JFilterOutput::ampReplace($link); ?>\">\n\t\t\t\t\t<img src=\"components/com_jmap/images/<?php echo $image;?>\" />\n\t\t\t\t\t<span><?php echo $text; ?></span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}",
"function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }",
"public function icon($name , $alt)\n {\n return Wgt::icon($name, 'xsmall', $alt);\n }",
"function imagecustom($im, $text) {\n}",
"public function getAlias()\n {\n return 'imagine';\n }",
"public function getAlias()\n {\n return 'imagine';\n }",
"public function introTextImage(){\n if(isset($this->imageIntro)){\n return $this->imageIntro;\n }\n $this->fetchIntroImage();\n return $this->imageIntro;\n }",
"private function _build_img_tag($data)\n\t{\n\t\treturn '<img ' . $this->_assets_attributes($data['attributes']) . ' />';\n\t}",
"public static function img(string $src, array $attr = []): string\n {\n $attr = array_merge([\n 'src' => $src,\n 'alt' => ' '\n ], $attr);\n\n return static::tag('img', '', $attr);\n }",
"private function getAltText($icon)\n {\n if (array_key_exists($icon, $this->altText())) {\n return $this->altTextPrefix() . $this->altText()[$icon];\n }\n return $this->altTextPrefix() . $this->altTextUndefined();\n }",
"function img($file = NULL, $attrs = '', $folder = NULL)\n {\n if (strlen($file) > 0) {\n return '<img src=\"'.img_url($file, $folder).'\"'._stringify_attributes($attrs).' />';\n }\n return NULL;\n }",
"function base64_png_img_tag($base64_png) {\n $tag = \"<img style='display:block;' id='base64image' \" . \n \"src='data:image/png;base64, \" . $base64_png . \"' />\";\n return $tag;\n}",
"function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir, $zco_notifier;\n\n // soft clean the alt tag\n $alt = zen_clean_html($alt);\n\n // use old method on template images\n if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0') {\n return zen_image_OLD($src, $alt, $width, $height, $parameters);\n }\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n // hook for handle_image() function such as Image Handler etc\n if (function_exists('handle_image')) {\n $newimg = handle_image($src, $alt, $width, $height, $parameters);\n list($src, $alt, $width, $height, $parameters) = $newimg;\n $zco_notifier->notify('NOTIFY_HANDLE_IMAGE', array($newimg));\n }\n\n // Convert width/height to int for proper validation.\n // intval() used to support compatibility with plugins like image-handler\n $width = empty($width) ? $width : intval($width);\n $height = empty($height) ? $height : intval($height);\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( ((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n\n if (zen_not_null($width) && zen_not_null($height) and file_exists($src)) {\n// $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n// proportional images\n $image_size = @getimagesize($src);\n // fix division by zero error\n $ratio = ($image_size[0] != 0 ? $width / $image_size[0] : 1);\n if ($image_size[1]*$ratio > $height) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } else {\n $height = $image_size[1] * $ratio;\n }\n// only use proportional image when image is larger than proportional size\n if ($image_size[0] < $width and $image_size[1] < $height) {\n $image .= ' width=\"' . $image_size[0] . '\" height=\"' . intval($image_size[1]) . '\"';\n } else {\n $image .= ' width=\"' . round($width) . '\" height=\"' . round($height) . '\"';\n }\n } else {\n // override on missing image to allow for proportional and required/not required\n if (IMAGE_REQUIRED == 'false') {\n return false;\n } else if (substr($src, 0, 4) != 'http') {\n $image .= ' width=\"' . intval(SMALL_IMAGE_WIDTH) . '\" height=\"' . intval(SMALL_IMAGE_HEIGHT) . '\"';\n }\n }\n\n // inject rollover class if one is defined. NOTE: This could end up with 2 \"class\" elements if $parameters contains \"class\" already.\n if (defined('IMAGE_ROLLOVER_CLASS') && IMAGE_ROLLOVER_CLASS != '') {\n $parameters .= (zen_not_null($parameters) ? ' ' : '') . 'class=\"rollover\"';\n }\n // add $parameters to the tag output\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }",
"protected function imageName() {}",
"public function img($class = '', $src= '')\n\t{\n\t\treturn sprintf('<img src= html-2.png>',$src, $class);\n\t}",
"public function getIcon_ImageTag($imgTitle = null, $imgClass = null, $v = null, $tooltip = null) {\n return \\LolApi\\LolApi::globalApi()->ImagesApi->item($this->id, $imgTitle ? $imgTitle : $this->name, $imgClass, $v, $tooltip);\n }",
"public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}",
"function set_caption($alt, $title, $iptc_caption, $filename)\n {\n $values = array($this->_params->get('caption_type_iptc') => $iptc_caption,\n $this->_params->get('caption_type_filename') => $filename,\n $this->_params->get('caption_type_title') => $title,\n $this->_params->get('caption_type_alt') => $alt);\n\n ksort($values);\n $caption = '';\n foreach ($values as $key => $val) {\n if ($key and $val) {\n $caption = $val;\n break;\n }\n }\n\n\n return $caption;\n }",
"function wp_img_tag_add_loading_attr($image, $context)\n {\n }",
"function getImageRegex()\r\n\t{\r\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', \r\n\t\t\t$this->description, $matches);\r\n\t\t$first_img = $matches [1] [0];\r\n\t\t\r\n\t\t//Defines a default image\r\n\t\tif(empty($first_img)){ \r\n\t\t\t$first_img = \"/images/default.jpg\";\r\n\t\t}\r\n\t\t$this->picture = $first_img;\r\n\t}",
"function the_header_image_tag($attr = array())\n {\n }",
"function vve_tpl_langImage($lang){\n\n return \"<img src=\\\"images/langs/{$lang}.png\\\" alt=\\\"{$lang}\\\" />\";\n\n}",
"function view_logo_project($img,$w,$h,$alt)\n{\n if(file_exists(\"logo/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../logo/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../logo/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\t\t\t}",
"public function imgTag($src = NULL, $options = NULL, $html_potions = NULL)\n {\n $mode = isset($options['mode']) ? $options['mode'] : '';\n\n /* Generate html options */\n $html_options = $this->options2str($html_potions);\n\n if ($mode == \"imagemanager\" || $mode == \"filemanager\") {\n //$filemanager_path = App::Helper('Config')->get('filemanager_base_dir');\n\n return '<img src=\"' . App::Helper('Config')->filemanagerurl(\"/{$src}\") . '\"' . $html_options . ' />';\n }\n else {\n return '<img src=\"' . $src . '\"' . $html_options . ' />';\n }\n }",
"function view_builder_logo($img,$w,$h,$alt)\n{\n if(file_exists(\"builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='mar7L' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='mar7L'/>\";\n \n\treturn $temp;\t\t\t}",
"function get_the_post_thumbnail_src($img)\n\n{\n\n return (preg_match('~\\bsrc=\"([^\"]++)\"~', $img, $matches)) ? $matches[1] : '';\n\n}",
"function wp_img_tag_add_srcset_and_sizes_attr($image, $context, $attachment_id)\n {\n }",
"function _adRenderBuildImageUrlPrefix()\n{\n $conf = $GLOBALS['_MAX']['CONF'];\n return $GLOBALS['_MAX']['SSL_REQUEST'] ? 'https://' . $conf['webpath']['imagesSSL'] : 'http://' . $conf['webpath']['images'];\n}",
"function image($filename='',$attrs='')\n{\n $img_path = get_stylesheet_directory_uri() . \"/images\" . \"/${filename}\";\n $attrs = $attrs == '' ? \"src='${img_path}'\" : (\"src='${img_path}' \" . $attrs);\n output_single_tag('img',$attrs);\n}",
"function editor_insert_image($html, $id, $caption, $title, $align, $url, $size) {\r\n\tlist($imgsrc) = image_downsize($id, 'hero-review');\r\n//\tlist($imgsrc) = image_downsize($id, $size);\r\n\r\n\t$html = \"<div class=\\\"photo-gallery\\\">\";\r\n\t$html .= \"<img src=\\\"$imgsrc\\\" alt=\\\"$caption\\\">\";\r\n\tif ($caption) {\r\n\t\t$html .= \"<div class=\\\"caption\\\">$caption</div>\";\r\n\t}\r\n\t$html .= \"</div><!-- photo-gallery -->\";\r\n\treturn $html;\r\n}",
"function theme_img($uri, $tag=true)\n{\n\t$path_img = theme_url(assets_dir('img').'/'.$uri);\n\treturn _img($path_img,$uri,$tag);\n}",
"public function html_attr_image_src( $image_src, $image_link = true ) \n\t\t{\n\t\t\tif( ! is_array( $image_src ) )\n\t\t\t{\n\t\t\t\treturn $image_link ? 'src=\"' . esc_attr( $image_src ) . '\"' : 'href=\"' . esc_attr( $image_src ) . '\"';\n\t\t\t}\n\t\t\t\n\t\t\t$atts = array();\n\t\t\t\n\t\t\tforeach( $image_src as $key => $value ) \n\t\t\t{\n\t\t\t\t//\tPHP fix < 8.0: case does not compare string and int -> force to string and compare strings !!!\n\t\t\t\t$key .= '';\n\t\t\t\t\n\t\t\t\tswitch( $key )\n\t\t\t\t{\n\t\t\t\t\tcase '0':\t\t\t\t//\t= url\n\t\t\t\t\t\t$a = $image_link ? 'src' : 'href';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'srcset':\n\t\t\t\t\tcase 'sizes':\n\t\t\t\t\t\t$a = $image_link ? $key : 'data-' . $key;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$a = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( is_null( $a ) || empty( $value ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$atts[] = $a . '=\"' . esc_attr( $value ) . '\"';\n\t\t\t}\n\t\t\t\n\t\t\treturn implode( ' ', $atts );\n\t\t}",
"public function getCvvImgHtml() {\r\n return '<img src=' . $this->ccConfig->getCvvImageUrl() . ' />';\r\n }",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"public function set_login_logo_alt() {\n return get_option( 'blogname' );\n }"
] | [
"0.7211252",
"0.7119902",
"0.6939392",
"0.68722725",
"0.66553277",
"0.6593555",
"0.65538",
"0.65101254",
"0.6497176",
"0.6496141",
"0.64957166",
"0.64408207",
"0.6425709",
"0.642347",
"0.6421273",
"0.64058113",
"0.640349",
"0.6360163",
"0.63558084",
"0.63507175",
"0.6346629",
"0.6329724",
"0.6305174",
"0.62642723",
"0.6248555",
"0.6223775",
"0.6217348",
"0.62142456",
"0.62139803",
"0.6194101",
"0.61939746",
"0.6185413",
"0.6174813",
"0.6137706",
"0.6110293",
"0.61074877",
"0.6065211",
"0.6049811",
"0.60353726",
"0.6026798",
"0.602666",
"0.6017495",
"0.60099053",
"0.60075915",
"0.600176",
"0.5996769",
"0.5989062",
"0.5981479",
"0.59581673",
"0.59493077",
"0.59434724",
"0.5924788",
"0.5918712",
"0.59178907",
"0.59121704",
"0.5874426",
"0.5860771",
"0.5856929",
"0.58506554",
"0.5847313",
"0.58251673",
"0.58154356",
"0.58069205",
"0.58030707",
"0.58016557",
"0.57894444",
"0.57821196",
"0.57779443",
"0.5772219",
"0.5764055",
"0.5764055",
"0.5760208",
"0.57577485",
"0.5748418",
"0.573555",
"0.573379",
"0.5729648",
"0.57280195",
"0.5727948",
"0.5725763",
"0.5717811",
"0.5716505",
"0.5707594",
"0.57064503",
"0.5705805",
"0.5704141",
"0.57022184",
"0.5684156",
"0.5678883",
"0.5676422",
"0.5675837",
"0.5668277",
"0.5658489",
"0.5654769",
"0.5646518",
"0.56435764",
"0.5631694",
"0.5614873",
"0.56116605",
"0.56006926"
] | 0.6588177 | 6 |
/ 2.6 IMG ALT TAG ATTACHMENT / | function IMGalt_Attachment($attributes, $attachment){
// print_r($attributes);
// print_r($attachment);
// get up to date alt attribute
$alt = SELF::getAltAttribute($attachment->ID);
// set alt tag
$attributes['alt'] = $alt;
// output
return $attributes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }",
"function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-' . esc_attr($align) . '\">';\n\n \t\t$html_str .= \"<p><img src='$url' alt='$title' /></p>\";\n\n\t\tif($caption) $html_str .= '\n\t\t<p class=\"wp-caption-text\">' . $caption . '</p>\n\t\t';\n\n\t$html_str .= '</div>';\n\n return $html_str;\n}",
"public function getImageTag();",
"function IMGalt_Content($content) {\n if($content):\n // encode content\n $content = mb_convert_encoding($content, 'HTML-ENTITIES', \"UTF-8\");\n $document = new \\DOMDocument();\n // Disable libxml errors and allow user to fetch error information as needed\n libxml_use_internal_errors(true);\n $document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n // get img tag from content\n $images = $document->getElementsByTagName('img');\n foreach ($images as $image) {\n // get orginal from srcset\n if( $image->hasAttribute('srcset') ):\n $orginal = '';\n // get srcset from content and explode to array\n $srcset = $image->getAttribute('srcset');\n $srcset_array = explode(\", \", $srcset);\n // get orginal size\n foreach ($srcset_array as $key => $value) {\n $single_srcset = explode(\" \", $value);\n $src_size = str_replace(\"w\", \"\", end($single_srcset));\n if(strpos($single_srcset[0], $src_size) !== false):\n // not the orginal size\n // $orginal .= $single_srcset[0] . ' ' . $src_size;\n else:\n $orginal .= $single_srcset[0];\n endif;\n }\n else:\n $orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src');\n endif;\n // get orginal img id and call alt\n $id = attachment_url_to_postid($orginal);\n $alt = SELF::getAltAttribute($id);\n $image->removeAttribute('alt');\n $image->setAttribute('alt', $alt);\n }\n // output\n return $document->saveHTML();\n endif;\n }",
"function attachment_image_attributes_aload($attr) {\n\n if ( isset($attr['data-aload-on']) ) :\n\n $attr['data-aload'] = $attr['src'];\n $attr['src'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\n\n if ( $attr['srcset'] ) :\n $attr['data-aload-set'] = $attr['srcset'];\n $attr['srcset'] = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\n endif;\n endif;\n return $attr;\n}",
"function cbv_get_image_alt( $url ){\n if( isset( $url ) ){\n $output = '';\n $id = attachment_url_to_postid($url);\n $image_title = get_the_title($id);\n $image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n $image_alt = str_replace('-', ' ', $image_alt);\n $output = $image_alt;\n\n return $output;\n }\n return false;\n}",
"function acd_add_img_title( $attr, $attachment = null ) {\n\t$img_title = trim( strip_tags( $attachment->post_title ) );\n\t$img_title = str_replace(\"-\", \" \", $img_title); //remove hyphens\n\t$img_title = str_replace(\"_\", \" \", $img_title); //remove underscores\n\t$img_title = preg_replace('/[0-9]+/', '', $img_title); //remove numbers\n\t$img_title = ucwords($img_title); //capitalize first letter of each word\n\n\t$attr['title'] = $img_title; //add image title attribute\n\t// or get the title instead of image title $attr['title'] = the_title_attribute( 'echo=0' );\n\t$attr['alt'] = $img_title; //add alt attribute\n\treturn $attr;\n}",
"function wp_get_attachment_link($post = 0, $size = 'thumbnail', $permalink = \\false, $icon = \\false, $text = \\false, $attr = '')\n {\n }",
"function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}",
"public function get_image_link()\n {\n }",
"function cbv_get_image_tag( $id, $size = 'full', $title = false ){\n\tif( isset( $id ) ){\n\t\t$output = '';\n\t\t$image_title = get_the_title($id);\n\t\t$image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n\t\t$image_src = wp_get_attachment_image_src( $id, $size, false );\n\n\t\tif( $title ){\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\" title=\"'.$image_title.'\">';\n\t\t}else{\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\">';\n\t\t}\n\n\t\treturn $output;\n\t}\n\treturn false;\n}",
"function newsletter_image($ref, $size){\r\n\t\r\n\t$default_attr = array(\r\n\t\t'class'\t=> \"attachment-$size\",\r\n\t\t'alt' => trim(strip_tags( get_post_meta($ref, '_wp_attachment_image_alt', true) ))\r\n\t);\r\n\t\r\n\t$retour->image\t\t= wp_get_attachment_image( $ref, $size , false, $default_attr);\r\n\t$retour->legende\t= '<p style=\"font-family:Tahoma, Arial, sans-serif;color:#666666;font-size:11px;margin:7px 0;padding:0;font-style:italic;\">' . get_post_meta($ref, '_wp_attachment_image_alt', true) . '</p>';\r\n\t\r\n\treturn $retour;\r\n}",
"function image($img,$attribute = array()){\r\n\t\t$tmp = '';\r\n\t\t$attribute = $this->convertStringAtt($attribute);\r\n\r\n\t\t$default = ''; $width = 0;\r\n\t\t$folder = ''; $height = 0;\r\n\r\n\t\t$att = array();\r\n\t\tif(isset($attribute['default'])){\r\n\t\t\t$att['default'] = $attribute['default'];\r\n\t\t\tunset($attribute['default']);\r\n\t\t}\r\n\t\tif(isset($attribute['folder'])){\r\n\t\t\t$att['folder'] = $attribute['folder'];\r\n\t\t\tunset($attribute['folder']);\r\n\t\t}\r\n\t\tif(isset($attribute['fixed'])){\r\n\t\t\t$att['fixed'] = $attribute['fixed'];\r\n\t\t\tunset($attribute['fixed']);\r\n\t\t}\r\n\t\tif(isset($attribute['absolute'])){\r\n\t\t\t$att['absolute'] = $attribute['absolute'];\r\n\t\t\tunset($attribute['absolute']);\r\n\t\t}\r\n\t\tif(isset($attribute['fullpath'])){\r\n\t\t\t$att['fullpath'] = $attribute['fullpath'];\r\n\t\t\tunset($attribute['fullpath']);\r\n\t\t}else{\r\n\t\t\t$att['fullpath'] = 'true';\r\n\t\t}\r\n\r\n\t\tBASIC::init()->imported('media.mod');\r\n\t\t$media = new BASIC_MEDIA($img, $att);\r\n\r\n\t\tif(isset($attribute['width'])) $width = $attribute['width'];\r\n\t\tif(isset($attribute['height'])) $height = $attribute['height'];\r\n\r\n\t\tif($media->info['type'] == 13 || $media->info['type'] == 4){\r\n\t\t\t$this->headSpecial('<!--[if IE]><script type=\"text/javascript\" src=\"'.BASIC::init()->ini_get('root_virtual').BASIC::init()->ini_get('basic_path').'scripts/flash/flash.js\" defer=\"defer\"></script><![endif]-->','Flash');\r\n\t\t}\r\n\t\treturn $media->view($width,$height,$attribute) . $tmp;\r\n\t}",
"function getSrcAltImage($postID,$size=false){\n\t$imgID = get_post_thumbnail_id($postID);\n\t$img = wp_get_attachment_image_src($imgID,$size, false, '');\n\t$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);\n\t$imgAttr = array(\n\t\t'url' => $img,\n\t\t'alt' => $imgAlt\n\t);\n\tif(is_shop()){\n\t\techo '<section class=\"shop-image\">';\n\t\techo '<img class=\"img-max\" src=\"' . $imgAttr['url'][0] . '\" alt=\"\" />';\n\t\techo '</section>';\n\t}else{\n\t\treturn $imgAttr;\n\t}\n}",
"function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }",
"public static function img($img, $alt, $title = '') {\r\n\t\t\t$file = WEB_ROOT . '/' . $img;\r\n\t\t\tif(!file_exists($file)) {\r\n\t\t\t\tABPF::logger()->error(\"Image file $file doesn't exist!\");\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\t$v = filemtime($file);\r\n\t\t\treturn sprintf('<img src=\"%s/%s?v=%d\" alt=\"%s\" title=\"%s\" />', BASE_URL, $img, $v, $alt, $title);\r\n\t\t}",
"function dizzy_featured_ogimg () { \n\t $thumb = get_the_post_thumbnail($post->ID);\n\t\t$pattern= \"/(?<=src=['|\\\"])[^'|\\\"]*?(?=['|\\\"])/i\";\n\t\tpreg_match($pattern, $thumb, $thePath);\n\t\t$theSrc = $thePath[0];\n}",
"protected function getImageAttributes() {}",
"function get_attachment_icon_src($id = 0, $fullsize = \\false)\n {\n }",
"function getName() \t\t { return 'NP_ImageCreateThumbnail'; }",
"function iti_get_image_alt_from_url( $url = '' ) {\n\tglobal $wpdb;\n\n\t$url = esc_url( $url );\n\n\t/** @noinspection PhpUndefinedMethodInspection */\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $url ) );\n\n\t$post_id = isset( $attachment[0] ) ? $attachment[0] : 0;\n\t$alt = get_post_meta( absint( $post_id ), '_wp_attachment_image_alt', true );\n\n\treturn $alt;\n}",
"function wp_img_tag_add_srcset_and_sizes_attr($image, $context, $attachment_id)\n {\n }",
"function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' “%2$s”\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}",
"function swap_image($msg){\n\n\tif(preg_match(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",$msg)){\n\t\t$msg=preg_replace(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",\"$2\",$msg);\n\t}\n\nreturn $msg;\n}",
"function essence_attachment_link( $link, $id ) {\n\tif ( is_feed() || is_admin() )\n\t\treturn $link;\n\n\t$post = get_post( $id );\n\n\tif ( 'image' == substr( $post->post_mime_type, 0, 5 ) )\n\t\treturn wp_get_attachment_url( $id );\n\telse\n\t\treturn $link;\n}",
"function cws_get_alt_text( $image_url ) {\n\tglobal $wpdb;\n\n\tif( ! isset( $image_url ) ) {\n\t\techo \"Please add an image.\";\n\t\treturn;\n\t}\n\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\t$alt_text = get_post_meta( $attachment[0], '_wp_attachment_image_alt', true );\n\t$alt_default = 'CWS default alt tag';\n\n\tif( ! empty( $alt_text ) ) {\n\t\treturn $alt_text;\n\t} else {\n\t\treturn $alt_default;\n\t}\n}",
"function get_attachment_link($post = \\null, $leavename = \\false)\n {\n }",
"function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"function bethel_filter_image_attributes_for_gallery ($attr, $attachment) {\n $attr ['id'] = \"gallery-image-id-{$attachment->ID}\";\n $attr ['class'] .= ' gallery-thumbnail';\n return $attr;\n}",
"function img($src = '', $attributes = '', $index_page = false)\n\t{\n\t\tif ( ! is_array($src) )\n\t\t{\n\t\t\t$src = array('src' => $src);\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset($src['alt']))\n\t\t{\n\t\t\t$src['alt'] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ($src as $k => $v)\n\t\t{\n\t\t\tif ($k === 'src' && ! preg_match('#^(data:[a-z,;])|(([a-z]+:)?(?<!data:)//)#i', $v))\n\t\t\t{\n\t\t\t\tif ($index_page === true)\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->site_url($v).'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->slash_item('base_url').$v.'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img._stringify_attributes($attributes).' />';\n\t}",
"function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}",
"function jcr_image_custom($atts)\n {\n global $thisimage;\n\n assert_image();\n\n extract(lAtts(array(\n 'escape' => 'html',\n ), $atts));\n\n return ($escape == 'html')\n ? txpspecialchars($thisimage['jcr_image_custom'])\n : $thisimage['jcr_image_custom'];\n }",
"function photonfill_get_image_attribute( $attachment_id, $img_size = 'full', $attr_name = 'srcset' ) {\n\treturn Photonfill()->get_responsive_image_attribute( $attachment_id, $img_size, $attr_name );\n}",
"public function getAlt()\n {\n return $this->alt;\n }",
"function load_image_to_edit($attachment_id, $mime_type, $size = 'full')\n {\n }",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"function img_tag($src, array $attributes = array())\r\n{\r\n $attributes['src'] = $src;\r\n\r\n return tag('img', $attributes);\r\n}",
"function my_post_image_html( $html, $post_id, $post_image_id )\r\n{\r\n\t$src = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ));\r\n\t\r\n\t$html = '<img src=\"'.$src[0].'\" alt=\"'.esc_attr( get_post_field( 'post_title', $post_id ) ).'\">';\r\n\t\r\n\treturn $html;\r\n}",
"function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }",
"function image($path, $phpThumbAttributes = array(), $htmlAttributes = array(), $useAltSyntax = false) {\n $thumb_attr = NULL;\n $w = NULL;\n $h = NULL;\n\n foreach ($phpThumbAttributes as $attr => $value) {\n if ($useAltSyntax) {\n if ($attr == 'w' || $attr == 'h') {\n $res = $attr;\n $$res = $value;\n } else {\n $thumb_attr .= $attr.'='.$value.';';\n }\n } else {\n $thumb_attr .= '&'.$attr.'='.$value;\n }\n }\n\n if ($useAltSyntax) {\n $thumb_path = $this->phpThumb.'/'.$thumb_attr.$w.'x'.$h.';'.$path;\n } else {\n $thumb_path = $this->phpThumb.'&src='.$path.$thumb_attr;\n }\n\n return $this->Html->image($thumb_path, $htmlAttributes);\n }",
"function image_media_send_to_editor($html, $attachment_id, $attachment)\n {\n }",
"function wp_get_attachment_image_url($attachment_id, $size = 'thumbnail', $icon = \\false)\n {\n }",
"public static function getAltAttribute(int $id = 0){\n // vars\n $output = '';\n $lang = prefix_core_BaseFunctions::getCurrentLang();\n // check if active lang is default or not\n if($lang == SELF::$WPimgAttr_Alt_languages[0]):\n // default language\n $output .= get_post_meta($id, '_wp_attachment_image_alt', TRUE);\n else:\n // alternative text\n $name = SELF::$WPimgAttr_Alt_prefix . $lang;\n $output .= get_post_meta($id, $name, true);\n endif;\n // output\n return $output;\n }",
"public function get_image_attached($post){\n\t\n\tpreg_match_all('/src=([\"\\'])(.*?)\\1/', $post, $matches);\n\t$img = $matches[2];\n\t\n\treturn $img;\n\t\n\treturn false;\n }",
"function img($personid, $personimageid, $thumb) {\n\n\tif(isset($thumb)) {\n\t\t$class = $thumb;\n\t\t$thumb=\"&type=$thumb\";\n\t} else {\n\t\t$class = $thumb;\n\t\t$thumb = \"\";\n\t}\n\n\t$raw = \"picture.php?person_id=$personid&person_image_id=$personimageid\";\n\t$src = \"$raw$thumb\";\n\n\treturn(\"<a href=\\\"contact.php?person_id=$personid\\\"><img alt=\\\"person\\\" src=\\\"$src\\\" class=\\\"$class\\\" /></a>\");\n}",
"function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}",
"public function actionimages()\n {\n $module = \"DocumentAttachments\";\n $urlquerystring = $_SERVER['QUERY_STRING'];\n $paraArr = explode(\"/\", $urlquerystring);\n $ticketId = $paraArr['2'];\n $model = new Troubleticket;\n $imagedata = $model->getimage($module, $ticketId);\n header(\"Content-Type: image/jpeg\");\n header(\"Content-Disposition: inline;filename=\" . $imagedata['result']['filename']);\n echo base64_decode($imagedata['result'][filecontent]);\n die;\n }",
"function img($file = NULL, $attrs = '', $folder = NULL)\n {\n if (strlen($file) > 0) {\n return '<img src=\"'.img_url($file, $folder).'\"'._stringify_attributes($attrs).' />';\n }\n return NULL;\n }",
"public function img($src = \"\", $alt = \"\") {\n echo \"<img src=assets/img/'\" . $src . \"' alt='\" . $alt . \"'>\";\n }",
"function imagecustom($im, $text) {\n}",
"public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}",
"function the_attachment_link($post = 0, $fullsize = \\false, $deprecated = \\false, $permalink = \\false)\n {\n }",
"public function fullTextImage(){\n if(isset($this->imageFullText)){\n return $this->imageFullText;\n }\n $this->fetchFullTextImage();\n return $this->imageFullText;\n }",
"function wp_img_tag_add_width_and_height_attr($image, $context, $attachment_id)\n {\n }",
"public function set_embedded_image($cid, $file, $alias = '');",
"function get_header_image_tag($attr = array())\n {\n }",
"public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }",
"function get_attachment_icon($id = 0, $fullsize = \\false, $max_dims = \\false)\n {\n }",
"function do_comcode_attachments($original_comcode,$type,$id,$previewing_only=false,$connection=NULL,$insert_as_admin=NULL,$for_member=NULL)\n{\n\trequire_lang('comcode');\n\n\tglobal $COMCODE_ATTACHMENTS;\n\tunset($COMCODE_ATTACHMENTS[$id]); // In case we have some kind of conflict\n\n\tif (is_null($connection)) $connection=$GLOBALS['SITE_DB'];\n\n\tif ($for_member!==NULL)\n\t{\n\t\t$member=$for_member;\n\t\tif (is_null($insert_as_admin)) $insert_as_admin=false;\n\t} else\n\t{\n\t\tif (function_exists('get_member'))\n\t\t{\n\t\t\t$member=get_member();\n\t\t\tif (is_null($insert_as_admin)) $insert_as_admin=false;\n\t\t} else\n\t\t{\n\t\t\t$member=0;\n\t\t\tif (is_null($insert_as_admin)) $insert_as_admin=true;\n\t\t}\n\t}\n\n\t$comcode_text=(substr($original_comcode,0,8)!='<comcode');\n\n\t// Handle data URLs for attachment embedding\n\tif ((function_exists('imagecreatefromstring')) && (strpos($original_comcode,'[html]')===false))\n\t{\n\t\t$matches=array();\n\t\t$matches2=array();\n\t\t$num_matches=preg_match_all('#<img[^<>]*src=\"data:image/\\w+;base64,([^\"]*)\"[^<>]*>#',$original_comcode,$matches);\n\t\t$num_matches2=preg_match_all('#\\[img[^\\[\\]]*\\]data:image/\\w+;base64,([^\"]*)\\[/img\\]#',$original_comcode,$matches2);\n\t\tfor ($i=0;$i<$num_matches2;$i++)\n\t\t{\n\t\t\t$matches[0][$num_matches]=$matches2[0][$i];\n\t\t\t$matches[1][$num_matches]=$matches2[1][$i];\n\t\t\t$num_matches++;\n\t\t}\n\t\tfor ($i=0;$i<$num_matches;$i++)\n\t\t{\n\t\t\tif (strpos($original_comcode,$matches[0][$i])!==false) // Check still here (if we have same image in multiple places, may have already been attachment-ified)\n\t\t\t{\n\t\t\t\t$data=@base64_decode($matches[1][$i]);\n\t\t\t\tif (($data!==false) && (function_exists('imagepng')))\n\t\t\t\t{\n\t\t\t\t\t$image=@imagecreatefromstring($data);\n\t\t\t\t\tif ($image!==false)\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$new_filename=uniqid('',true).'.png';\n\t\t\t\t\t\t\t$new_path=get_custom_file_base().'/uploads/attachments/'.$new_filename;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (file_exists($new_path));\n\t\t\t\t\t\timagepng($image,$new_path);\n\t\n\t\t\t\t\t\t$attachment_id=$GLOBALS['SITE_DB']->query_insert('attachments',array(\n\t\t\t\t\t\t\t'a_member_id'=>get_member(),\n\t\t\t\t\t\t\t'a_file_size'=>strlen($data),\n\t\t\t\t\t\t\t'a_url'=>'uploads/attachments/'.$new_filename,\n\t\t\t\t\t\t\t'a_thumb_url'=>'',\n\t\t\t\t\t\t\t'a_original_filename'=>basename($new_filename),\n\t\t\t\t\t\t\t'a_num_downloads'=>0,\n\t\t\t\t\t\t\t'a_last_downloaded_time'=>time(),\n\t\t\t\t\t\t\t'a_description'=>'',\n\t\t\t\t\t\t\t'a_add_time'=>time()),true);\n\t\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment_id));\n\t\n\t\t\t\t\t\t$original_comcode=str_replace($matches[0][$i],'[attachment type=\"inline\" thumb=\"0\"]'.strval($attachment_id).'[/attachment]',$original_comcode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tglobal $ATTACHMENTS_ALREADY_REFERENCED;\n\t$old_already=$ATTACHMENTS_ALREADY_REFERENCED;\n\t$ATTACHMENTS_ALREADY_REFERENCED=array();\n\t$before=$connection->query_select('attachment_refs',array('a_id','id'),array('r_referer_type'=>$type,'r_referer_id'=>$id));\n\tforeach ($before as $ref)\n\t{\n\t\t$ATTACHMENTS_ALREADY_REFERENCED[$ref['a_id']]=1;\n\t}\n\n\t$has_one=false;\n\t$may_have_one=false;\n\tforeach($_POST as $key=>$value)\n\t{\n\t\tif (is_string($key) && preg_match('#^hidFileID\\_#i',$key)!=0)\n\t\t{\n\t\t\trequire_code('uploads');\n\t\t\t$may_have_one=is_swf_upload();\n\t\t}\n\t}\n\tif ($may_have_one)\n\t{\n\t\trequire_code('uploads');\n\t\tis_swf_upload(true);\n\n\t\trequire_code('comcode_from_html');\n\t\t$original_comcode=preg_replace_callback('#<input [^>]*class=\"ocp_keep_ui_controlled\" [^>]*title=\"([^\"]*)\" [^>]*type=\"text\" [^>]*value=\"[^\"]*\"[^>]*/?'.'>#siU','debuttonise',$original_comcode);\n\t}\n\t$myfile=mixed();\n\tforeach ($_FILES as $key=>$file)\n\t{\n\t\t$matches=array();\n\t\tif ((($may_have_one) && (is_swf_upload()) || (is_uploaded_file($file['tmp_name']))) && (preg_match('#file(\\d+)#',$key,$matches)!=0))\n\t\t{\n\t\t\t$has_one=true;\n\n\t\t\t$atype=post_param('attachmenttype'.$matches[1],'');\n\t\t\t$is_extract=(preg_match('#\\[attachment [^\\]]*type=\"\\w+_extract\"[^\\]]*\\]new_'.$matches[1].'\\[/#',$original_comcode)!=0) || (preg_match('#<attachment [^>]*type=\"\\w+_extract\"[^>]*>new_'.$matches[1].'</#',$original_comcode)!=0);\n\n\t\t\tif ((substr($atype,-8)=='_extract') || ($is_extract))\n\t\t\t{\n\t\t\t\trequire_code('uploads');\n\t\t\t\trequire_code('files');\n\t\t\t\trequire_code('files2');\n\t\t\t\t$thumb=(preg_match('#\\[(attachment|attachment_safe) [^\\]]*thumb=\"1\"[^\\]]*\\]new_'.$matches[1].'\\[/#',$original_comcode)!=0) || (preg_match('#<(attachment|attachment_safe) [^>]*thumb=\"1\"[^>]*>new_'.$matches[1].'</#',$original_comcode)!=0);\n\n\t\t\t\t$arcext=get_file_extension($_FILES[$key]['name']);\n\t\t\t\tif (($arcext=='tar') || ($arcext=='zip'))\n\t\t\t\t{\n\t\t\t\t\tif ($arcext=='tar')\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('tar');\n\t\t\t\t\t\t$myfile=tar_open($file['tmp_name'],'rb');\n\t\t\t\t\t\t$dir=tar_get_directory($myfile,true);\n\t\t\t\t\t} elseif ($arcext=='zip')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((!function_exists('zip_open')) && (get_option('unzip_cmd')=='')) warn_exit(do_lang_tempcode('ZIP_NOT_ENABLED'));\n\t\t\t\t\t\tif (!function_exists('zip_open'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trequire_code('m_zip');\n\t\t\t\t\t\t\t$mzip=true;\n\t\t\t\t\t\t} else $mzip=false;\n\n\t\t\t\t\t\t$myfile=zip_open($file['tmp_name']);\n\t\t\t\t\t\tif (is_integer($myfile))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trequire_code('failure');\n\t\t\t\t\t\t\twarn_exit(zip_error($myfile,$mzip));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dir=array();\n\t\t\t\t\t\twhile (($zip_entry=zip_read($myfile))!==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dir[]=array(\n\t\t\t\t\t\t\t\t'zip_entry'=>$zip_entry,\n\t\t\t\t\t\t\t\t'path'=>zip_entry_name($zip_entry),\n\t\t\t\t\t\t\t\t'size'=>zip_entry_filesize($zip_entry),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (count($dir)>100)\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('site');\n\t\t\t\t\t\tattach_message(do_lang_tempcode('TOO_MANY_FILES_TO_EXTRACT'),'warn');\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($dir as $entry)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (substr($entry['path'],-1)=='/') continue; // Ignore folders\n\n\t\t\t\t\t\t\t$_file=preg_replace('#\\..*\\.#','.',basename($entry['path']));\n\n\t\t\t\t\t\t\tif (!check_extension($_file,false,NULL,true)) continue;\n\t\t\t\t\t\t\tif (should_ignore_file($entry['path'],IGNORE_ACCESS_CONTROLLERS | IGNORE_HIDDEN_FILES)) continue;\n\n\t\t\t\t\t\t\t$place=get_custom_file_base().'/uploads/attachments/'.$_file;\n\t\t\t\t\t\t\t$i=2;\n\t\t\t\t\t\t\t// Hunt with sensible names until we don't get a conflict\n\t\t\t\t\t\t\twhile (file_exists($place))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_file=strval($i).basename($entry['path']);\n\t\t\t\t\t\t\t\t$place=get_custom_file_base().'/uploads/attachments/'.$_file;\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$i=2;\n\t\t\t\t\t\t\t$_file_thumb=basename($entry['path']);\n\t\t\t\t\t\t\t$place_thumb=get_custom_file_base().'/uploads/attachments_thumbs/'.$_file_thumb;\n\t\t\t\t\t\t\t// Hunt with sensible names until we don't get a conflict\n\t\t\t\t\t\t\twhile (file_exists($place_thumb))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_file_thumb=strval($i).basename($entry['path']);\n\t\t\t\t\t\t\t\t$place_thumb=get_custom_file_base().'/uploads/attachments_thumbs/'.$_file_thumb;\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($arcext=='tar')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$file_details=tar_get_file($myfile,$entry['path'],false,$place);\n\t\t\t\t\t\t\t} elseif ($arcext=='zip')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tzip_entry_open($myfile,$entry['zip_entry']);\n\t\t\t\t\t\t\t\t$file_details=array(\n\t\t\t\t\t\t\t\t\t'size'=>$entry['size'],\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t$out_file=@fopen($place,'wb') OR intelligent_write_error($place);\n\t\t\t\t\t\t\t\t$more=mixed();\n\t\t\t\t\t\t\t\tdo\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$more=zip_entry_read($entry['zip_entry']);\n\t\t\t\t\t\t\t\t\tif ($more!==false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (fwrite($out_file,$more)<strlen($more)) warn_exit(do_lang_tempcode('COULD_NOT_SAVE_FILE'));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twhile (($more!==false) && ($more!=''));\n\t\t\t\t\t\t\t\tfclose($out_file);\n\n\t\t\t\t\t\t\t\tzip_entry_close($entry['zip_entry']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$description=do_lang('EXTRACTED_FILE');\n\t\t\t\t\t\t\tif (strpos($entry['path'],'/')!==false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$description=do_lang('EXTRACTED_FILE_PATH',dirname($entry['path']));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Thumbnail\n\t\t\t\t\t\t\t$thumb_url='';\n\t\t\t\t\t\t\trequire_code('images');\n\t\t\t\t\t\t\tif (is_image($_file))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gd=((get_option('is_on_gd')=='1') && (function_exists('imagetypes')));\n\t\t\t\t\t\t\t\tif ($gd)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trequire_code('images');\n\t\t\t\t\t\t\t\t\tif (!is_saveable_image($_file)) $ext='.png'; else $ext='.'.get_file_extension($_file);\n\t\t\t\t\t\t\t\t\t$thumb_url='uploads/attachments_thumbs/'.$_file_thumb;\n\t\t\t\t\t\t\t\t\tconvert_image(get_custom_base_url().'/uploads/attachments/'.$_file,$place_thumb,-1,-1,intval(get_option('thumb_width')),true,NULL,false,true);\n\n\t\t\t\t\t\t\t\t\tif ($connection->connection_write!=$GLOBALS['SITE_DB']->connection_write) $thumb_url=get_custom_base_url().'/'.$thumb_url;\n\t\t\t\t\t\t\t\t} else $thumb_url='uploads/attachments/'.$_file;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$url='uploads/attachments/'.$_file;\n\t\t\t\t\t\t\tif (addon_installed('galleries'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_code('images');\n\t\t\t\t\t\t\t\tif ((is_video($url)) && ($connection->connection_read==$GLOBALS['SITE_DB']->connection_read))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\trequire_code('transcoding');\n\t\t\t\t\t\t\t\t\t$url=transcode_video($url,'attachments','a_url','a_original_filename',NULL,NULL);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$attachment_id=$connection->query_insert('attachments',array(\n\t\t\t\t\t\t\t\t'a_member_id'=>get_member(),\n\t\t\t\t\t\t\t\t'a_file_size'=>$file_details['size'],\n\t\t\t\t\t\t\t\t'a_url'=>$url,\n\t\t\t\t\t\t\t\t'a_thumb_url'=>$thumb_url,\n\t\t\t\t\t\t\t\t'a_original_filename'=>basename($entry['path']),\n\t\t\t\t\t\t\t\t'a_num_downloads'=>0,\n\t\t\t\t\t\t\t\t'a_last_downloaded_time'=>time(),\n\t\t\t\t\t\t\t\t'a_description'=>$description,\n\t\t\t\t\t\t\t\t'a_add_time'=>time()),true);\n\t\t\t\t\t\t\t$connection->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment_id));\n\n\t\t\t\t\t\t\tif ($comcode_text)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$original_comcode.=chr(10).chr(10).'[attachment type=\"'.comcode_escape(str_replace('_extract','',$atype)).'\" description=\"'.comcode_escape($description).'\" thumb=\"'.($thumb?'1':'0').'\"]'.strval($attachment_id).'[/attachment]';\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\trequire_code('comcode_xml');\n\t\t\t\t\t\t\t\t//$original_comcode.=chr(10).chr(10).'<attachment type=\"'.comcode_escape(str_replace('_extract','',$atype)).'\" thumb=\"'.($thumb?'1':'0').'\"><attachmentDescription>'.comcode_text__to__comcode_xml($description).'</attachmentDescription>'.strval($attachment_id).'</attachment>';\t\t\tWould go in bad spot\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($arcext=='tar')\n\t\t\t\t\t{\n\t\t\t\t\t\ttar_close($myfile);\n\t\t\t\t\t} elseif ($arcext=='zip')\n\t\t\t\t\t{\n\t\t\t\t\t\tzip_close($myfile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif ((strpos($original_comcode,']new_'.$matches[1].'[/attachment]')===false) && (strpos($original_comcode,'>new_'.$matches[1].'</attachment>')===false) && (strpos($original_comcode,']new_'.$matches[1].'[/attachment_safe]')===false) && (strpos($original_comcode,'>new_'.$matches[1].'</attachment_safe>')===false))\n\t\t\t\t{\n\t\t\t\t\tif ((preg_match('#\\]\\d+\\[/attachment\\]#',$original_comcode)==0) && (preg_match('#>\\d+</attachment>#',$original_comcode)==0)) // Attachment could have already been put through (e.g. during a preview). If we have actual ID's referenced, it's almost certainly the case.\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($comcode_text)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$original_comcode.=chr(10).chr(10).'[attachment]new_'.$matches[1].'[/attachment]';\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//$original_comcode.=chr(10).chr(10).'<attachment>new_'.$matches[1].'</attachment>';\t\tWould go in bad spot\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tglobal $LAX_COMCODE;\n\t$temp=$LAX_COMCODE;\n\tif ($has_one) $LAX_COMCODE=true; // We don't want a simple syntax error to cause us to lose our attachments\n\t$tempcode=comcode_to_tempcode($original_comcode,$member,$insert_as_admin,60,$id,$connection,false,false,false,false,false,NULL,$for_member);\n\t$LAX_COMCODE=$temp;\n\t$ATTACHMENTS_ALREADY_REFERENCED=$old_already;\n\n\t/*if ((array_key_exists($id,$COMCODE_ATTACHMENTS)) && (array_key_exists(0,$COMCODE_ATTACHMENTS[$id])))\n\t{\n\t\t$original_comcode=$COMCODE_ATTACHMENTS[$id][0]['comcode'];\n\t}*/\n\n\t$new_comcode=$original_comcode;\n\n\tif (array_key_exists($id,$COMCODE_ATTACHMENTS))\n\t{\n\t\t$ids_present=array();\n\t\tfor ($i=0;$i<count($COMCODE_ATTACHMENTS[$id]);$i++)\n\t\t{\n\t\t\t$attachment=$COMCODE_ATTACHMENTS[$id][$i];\n\n\t\t\t// If it's a new one, we need to change the comcode to reference the ID we made for it\n\t\t\tif ($attachment['type']=='new')\n\t\t\t{\n\t\t\t\t$marker=$attachment['marker'];\n//\t\t\t\techo $marker.'!'.$new_comcode;\n\t\t\t\t$a_id=$attachment['id'];\n\n\t\t\t\t$old_length=strlen($new_comcode);\n\n\t\t\t\t// Search backwards from $marker\n\t\t\t\t$tag_end_start=$marker-strlen('[/'.$attachment['tag_type'].']'); // </attachment> would be correct if it is Comcode-XML, but they have the same length, so it's irrelevant\n\t\t\t\t$tag_start_end=$tag_end_start;\n\t\t\t\twhile (($tag_start_end>1) && ((!isset($new_comcode[$tag_start_end-1])) || (($new_comcode[$tag_start_end-1]!=']') && ($new_comcode[$tag_start_end-1]!='>')))) $tag_start_end--;\n\t\t\t\t$param_keep=substr($new_comcode,0,$tag_start_end-1);\n\t\t\t\t$end_keep=substr($new_comcode,$tag_end_start);\n\t\t\t\tif ($comcode_text)\n\t\t\t\t{\n\t\t\t\t\t$new_comcode=$param_keep;\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'[')),' type=')===false) $new_comcode.=' type=\"'.comcode_escape($attachment['attachmenttype']).'\"';\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'[')),' description=')===false) $new_comcode.=' description=\"'.comcode_escape($attachment['description']).'\"';\n\t\t\t\t\t$new_comcode.=']'.strval($a_id).$end_keep;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\trequire_code('comcode_xml');\n\t\t\t\t\t$new_comcode=$param_keep;\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'<')),' type=')===false) $new_comcode.=' type=\"'.comcode_escape($attachment['attachmenttype']);\n\t\t\t\t\t$new_comcode.='\">';\n\t\t\t\t\tif (strpos(substr($param_keep,strrpos($param_keep,'<')),' description=')===false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('comcode_xml');\n\t\t\t\t\t\t$new_comcode.='<attachmentDescription>'.comcode_text__to__comcode_xml($attachment['description'],true).'</attachmentDescription>';\n\t\t\t\t\t}\n\t\t\t\t\t$new_comcode.=strval($a_id).$end_keep;\n\t\t\t\t}\n//\t\t\t\techo $new_comcode.'<br />!<br />';\n\n\t\t\t\t// Update other attachment markers\n\t\t\t\t$dif=strlen($new_comcode)-$old_length;\n\t\t\t\tfor ($j=$i+1;$j<count($COMCODE_ATTACHMENTS[$id]);$j++)\n\t\t\t\t{\n//\t\t\t\t\techo $COMCODE_ATTACHMENTS[$id][$i]['marker'].'!';\n\t\t\t\t\t$COMCODE_ATTACHMENTS[$id][$j]['marker']+=$dif;\n\t\t\t\t}\n\n\t\t\t\tif (!is_null($type))\n\t\t\t\t\t$connection->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$a_id));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t// (Re-)Reference it\n\t\t\t\t$connection->query_delete('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment['id']),'',1);\n\t\t\t\t$connection->query_insert('attachment_refs',array('r_referer_type'=>$type,'r_referer_id'=>$id,'a_id'=>$attachment['id']));\n\t\t\t}\n\n\t\t\t$ids_present[]=$attachment['id'];\n\t\t}\n\n\t\tif ((!$previewing_only) && (get_value('disable_attachment_cleanup')!=='1'))\n\t\t{\n\t\t\t// Clear any de-referenced attachments\n\t\t\tforeach ($before as $ref)\n\t\t\t{\n\t\t\t\tif ((!in_array($ref['a_id'],$ids_present)) && (strpos($new_comcode,'attachment.php?id=')===false) && (!multi_lang()))\n\t\t\t\t{\n\t\t\t\t\t// Delete reference (as it's not actually in the new comcode!)\n\t\t\t\t\t$connection->query_delete('attachment_refs',array('id'=>$ref['id']),'',1);\n\n\t\t\t\t\t// Was that the last reference to this attachment? (if so -- delete attachment)\n\t\t\t\t\t$test=$connection->query_value_null_ok('attachment_refs','id',array('a_id'=>$ref['a_id']));\n\t\t\t\t\tif (is_null($test))\n\t\t\t\t\t{\n\t\t\t\t\t\trequire_code('attachments3');\n\t\t\t\t\t\t_delete_attachment($ref['a_id'],$connection);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn array(\n\t\t'comcode'=>$new_comcode,\n\t\t'tempcode'=>$tempcode\n\t);\n}",
"function newsdot_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail mb-4\">\n\t\t\t\t<figure>\n\t\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail();\n\t\t\t\t\tif ( get_the_post_thumbnail_caption() ) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<figcaption><?php the_post_thumbnail_caption(); ?></figcaption>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</figure>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t\t<?php\n\t\t\t\t\tthe_post_thumbnail(\n\t\t\t\t\t\t'newsdot-wide-image',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'alt' => the_title_attribute(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'echo' => false,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</a>\n\n\t\t\t<?php\n\t\tendif; // End is_singular().\n\t}",
"function file_image($imageType, $props = array(), $file = null)\n{\n if (!$file) {\n $file = get_current_record('file');\n }\n $fileMarkup = new Omeka_View_Helper_FileMarkup;\n return $fileMarkup->image_tag($file, $props, $imageType);\n}",
"public function addImg ($src, $attributes = array ())\n\t{\n\t\tif (!preg_match('#^(\\w+://)# i', $src)) {\n\n\t\t\t// Trim the trailing slash\n\t\t\t$src = ltrim($src, \"\\t\\n\\r\");\n\t\t}\n\t\t$attributes['src'] = $src;\n\t\t$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($src, PATHINFO_FILENAME);\n\n\t\treturn html_tag('img', $attributes);\n\t}",
"public function getAlt(): string\n {\n return htmlspecialchars($this->getDescription(), ENT_QUOTES);\n }",
"public static function img($src = NULL, $alt = NULL) {\n\t\t// Create attribute list\n\t\t$attributes = is_array($src) ? $src : array('src' => $src);\n\n\t\tif (is_array($alt)) {\n\t\t\t$attributes += $alt;\n\t\t} elseif ( ! empty($alt)) {\n\t\t\t// Add alt to attributes\n\t\t\t$attributes['alt'] = $alt;\n\t\t}\n\t\tif(!isset($attributes['alt'])) $attributes['alt'] = '';\n\t\tif (strpos($attributes['src'], '://') === FALSE) {\n\t\t\t// Make the src attribute into an absolute URL\n\t\t\t$attributes['src'] = url::asset('img/'.$attributes['src']);\n\t\t}\n\n\t\treturn '<img'.html::attributes($attributes).'>';\n\t}",
"function build_attach_image_html($type)\n\t{\n\t\tglobal $userdata, $template, $db, $SID, $lang, $phpEx, $phpbb_root_path, $garage_config, $board_config;\n\t\n\t\tif (!$this->check_permissions('UPLOAD',''))\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\n\t\t$maximum_image_file_size = $garage_config['max_image_kbytes'];\n\t\t$maximum_image_resolution = $garage_config['max_image_resolution'];\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'L_IMAGE_ATTACH' => $lang['Image_Attach'],\n\t\t\t'L_MAXIMUM_IMAGE_FILE_SIZE' => $lang['Maximum_Image_File_Size'],\n\t\t\t'L_MAXIMUM_IMAGE_RESOLUTION' => $lang['Maximum_Image_Resolution'],\n\t\t\t'L_IMAGE_ATTACHMENTS' => $lang['Image_Attachments'],\n\t\t\t'L_ENTER_IMAGE_URL' => $lang['Enter_Image_Url'],\n\t\t\t'L_Kbytes' => $lang['kbytes'],\n\t\t\t'MAXIMUM_IMAGE_FILE_SIZE' => $maximum_image_file_size,\n\t\t\t'MAXIMUM_IMAGE_RESOLUTION' => $maximum_image_resolution,\n\t\t\t'Add_New_Image' => $lang['Add_New_Image'])\n\t\t);\n\t\n\t\tif ( $type == 'modification' )\n\t\t{\n\t\t\tif ( $garage_config['allow_mod_image'] ) \n\t\t\t{\n\t\t \t\t$template->assign_block_vars('allow_images', array());\n\t\t\t\tif ( $garage_config['allow_image_upload'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.upload_images', array());\n\t\t\t\n\t\t\t\t}\n\t\t\t\tif ( $garage_config['allow_image_url'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.remote_images', array());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if ( $type == 'vehicle' )\n\t\t{\n\t\t\tif ( $garage_config['allow_image_upload'] || $garage_config['allow_image_url'])\n\t\t\t{\n\t\t \t\t$template->assign_block_vars('allow_images', array());\n\t\t\t\tif ( $garage_config['allow_image_upload'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.upload_images', array());\n\t\t\t\t}\n\t\t\t\tif ( $garage_config['allow_image_url'] )\n\t\t\t\t{\n\t\t \t\t\t$template->assign_block_vars('allow_images.remote_images', array());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn;\n\t}",
"public static function image($url, $alt = '', $attributes = array()) {\n\t\t$attributes['alt'] = $alt;\n\n\t\treturn '<img src=\"'.URL::to_asset($url).'\"'.static::attributes($attributes).'>';\n\t}",
"function set_caption($alt, $title, $iptc_caption, $filename)\n {\n $values = array($this->_params->get('caption_type_iptc') => $iptc_caption,\n $this->_params->get('caption_type_filename') => $filename,\n $this->_params->get('caption_type_title') => $title,\n $this->_params->get('caption_type_alt') => $alt);\n\n ksort($values);\n $caption = '';\n foreach ($values as $key => $val) {\n if ($key and $val) {\n $caption = $val;\n break;\n }\n }\n\n\n return $caption;\n }",
"function putIMG($imgID) {\r\n // WIP\r\n}",
"public function setAlt($alt)\n {\n $this->alt = $alt;\n $this->setAttributes(\"Alt\");\n }",
"function attachment_preview($original) {\r\n\t\t\t$file = str_replace(get_site_url().'/','' ,$original);\r\n\t\t\t$file = str_replace('//','/',ABSPATH . $file);\r\n\t\t\t// check if file exists\r\n\t\t\tif (file_exists($file) && ($file != ABSPATH)) {\r\n\t\t\t\t$thumb = wp_get_attachment_image( $this->get_attachment_id($original), array(80,80),1);\r\n\t\t\t\t\r\n\t\t\t\t$ext = pathinfo($original, PATHINFO_EXTENSION);\r\n\t\t\t\t// If the file hasnt been upload through wordpress\r\n\t\t\t\tif (($this->get_attachment_id($original) == '') && ( in_array($ext ,$this->image_extensions))) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$size = getimagesize($file);\r\n\t\t\t\t\r\n\t\t\t\t\tif (($size[0] < 80) && ( $size[1] < 80)) {\r\n\t\t\t\t\t\t$thumb = \"<img src='\" . $original . \"' />\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$thumb = \"<img src='\" . wp_create_thumbnail( $file, 40 ) . \"' />\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//print var_export(wp_create_thumbnail( $file, 4 ),true);\r\n\t\t\t\t\r\n\t\t\t\t} \r\n\t\t\t\tprint \"<div class='option_preview' ><a href='\" . $original . \"'>\" . $this->filetourl($thumb) . \"<br/>\" .basename($original) . \"</a></div>\";\r\n\t\t\t}\r\n\t\t}",
"function rex_com_mediaaccess_EP_images($params)\n{\n global $REX;\n\n if($params['extension_point'] == 'IMAGE_RESIZE_SEND')\n $file = $params['filename'];\n else\n $file = $params['img']['file'];\n\n ## get auth - isn't loaded yet\n require_once $REX[\"INCLUDE_PATH\"].\"/addons/community/plugins/auth/inc/auth.php\";\n \n $media = rex_com_mediaaccess::getMediaByFilename($file);\n if($media->checkPerm())\n return true;\n\n return false;\n}",
"function pendrell_image_wrap_attributes( $attributes, $html, $id, $caption, $class, $align, $contents, $context, $width, $height ) {\n if ( ubik_imagery_context( $context, 'related' ) && isset( $attributes['schema'] ) )\n $attributes['schema'] = str_replace( ' itemprop=\"image\"', '', $attributes['schema'] );\n if ( !empty( $width ) )\n $attributes['style'] = 'style=\"width: ' . $width . 'px;\"'; // Setting an explicit width for use with the intrinsic ratio technique\n return $attributes;\n}",
"function img($src = '', bool $indexPage = false, $attributes = ''): string\n {\n if (! is_array($src)) {\n $src = ['src' => $src];\n }\n if (! isset($src['src'])) {\n $src['src'] = $attributes['src'] ?? '';\n }\n if (! isset($src['alt'])) {\n $src['alt'] = $attributes['alt'] ?? '';\n }\n\n $img = '<img';\n\n // Check for a relative URI\n if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {\n if ($indexPage === true) {\n $img .= ' src=\"' . site_url($src['src']) . '\"';\n } else {\n $img .= ' src=\"' . slash_item('baseURL') . $src['src'] . '\"';\n }\n\n unset($src['src']);\n }\n\n // Append any other values\n foreach ($src as $key => $value) {\n $img .= ' ' . $key . '=\"' . $value . '\"';\n }\n\n // Prevent passing completed values to stringify_attributes\n if (is_array($attributes)) {\n unset($attributes['alt'], $attributes['src']);\n }\n\n return $img . stringify_attributes($attributes) . _solidus() . '>';\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}",
"public function getLinkToImg()\n {\n return ImgUpload::getLinkToImg($this);\n }",
"function get_term_attachment_image( $term_id = '', $size = 'thumbnail', $icon = false, $attr = '' ) {\r\n\r\n if ( !$term_id && ( is_tax() || is_tag() || is_category() ) ) {\r\n $term_id = get_queried_object()->term_id;\r\n }\r\n\r\n return wp_get_attachment_image( get_post_thumbnail_id( get_post_for_extended_term( $term_id )->ID ), $size, $icon, $attr );\r\n }",
"function theme_img($uri, $tag=false)\n{\n \n\tif($tag)\n\t{\n\t\treturn '<img src=\"'.theme_url('assets/images/'.$uri).'\" alt=\"'.$tag.'\">';\n\t}\n\telse\n\t{\n\t\treturn theme_url('assets/images/'.$uri);\n\t}\n\t\n}",
"function image($filename='',$attrs='')\n{\n $img_path = get_stylesheet_directory_uri() . \"/images\" . \"/${filename}\";\n $attrs = $attrs == '' ? \"src='${img_path}'\" : (\"src='${img_path}' \" . $attrs);\n output_single_tag('img',$attrs);\n}",
"function wp_get_attachment_caption($post_id = 0)\n {\n }",
"protected function imageName() {}",
"function GrabImage($url,$originname,$dir1, $dir2) {\n\tglobal $_SC;\n\tif($url==\"\"|| $originname==\"\") return false; \n\tchdir(dirname(dirname(dirname(__FILE__))));//change to the ihome dir.\n\tchdir($_SC['attachdir'].$dir1.'/'.$dir2);\n\t//echo $_SC['attachdir'].$dir1.'/'.$dir2;exit();\n\t$ext=strrchr($url,\".\"); \n\tif($ext!=\".gif\" && $ext!=\".jpg\" && $ext!=\".jpeg\" && $ext!=\".png\") return false; \n\t$filename=\"foreign\".$originname; \n\n\tob_start(); \n\treadfile($url); \n\t$img = ob_get_contents(); \n\tob_end_clean(); \n\t$size = strlen($img); \n\n\t$fp2=@fopen($filename, \"a\"); \n\tfwrite($fp2,$img); \n\tfclose($fp2); \n\n\treturn $filename; \n}",
"function get_image_alt($file){\r\n $h1count = preg_match_all('/(alt=.)([a-zA-Z0-9\\s]{1,})/',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}",
"function get_the_post_thumbnail_src($img)\n\n{\n\n return (preg_match('~\\bsrc=\"([^\"]++)\"~', $img, $matches)) ? $matches[1] : '';\n\n}",
"public function image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\r\n if(strpos($html, '<img data-id=\"')===false){\r\n $html = str_replace('<img', '<img data-id=\"'.$id.'\" ', $html);\r\n }\r\n return $html;\r\n }",
"function get_the_attachment_link($id = 0, $fullsize = \\false, $max_dims = \\false, $permalink = \\false)\n {\n }",
"public function getImageAttribute()\n {\n if (! is_null($this->thumbnail) && ! is_null($attachment = $this->thumbnail->attachment)) {\n return $attachment->guid;\n }\n }",
"protected function getImageMeta(int $id){\n $image_alt=get_post_meta($id, '_wp_attachment_image_alt', true);\n return $image_alt;\n }",
"function item_image_gallery($attrs = array(), $imageType = 'square_thumbnail', $filesShow = null, $item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n\n $files = $item->Files;\n if (!$files) {\n return '';\n }\n\n $defaultAttrs = array(\n 'wrapper' => array('id' => 'item-images'),\n 'linkWrapper' => array(),\n 'link' => array(),\n 'image' => array()\n );\n if ($filesShow === null) {\n $filesShow = get_option('link_to_file_metadata');\n }\n $attrs = array_merge($defaultAttrs, $attrs);\n\n $html = '';\n if ($attrs['wrapper'] !== null) {\n $html .= '<div ' . tag_attributes($attrs['wrapper']) . '>';\n }\n foreach ($files as $file) {\n if ($attrs['linkWrapper'] !== null) {\n $html .= '<div ' . tag_attributes($attrs['linkWrapper']) . '>';\n }\n\n $image = file_image($imageType, $attrs['image'], $file);\n if ($filesShow) {\n $html .= link_to($file, 'show', $image, $attrs['link']);\n } else {\n $linkAttrs = $attrs['link'] + array('href' => $file->getWebPath('original'));\n $html .= '<a ' . tag_attributes($linkAttrs) . '>' . $image . '</a>';\n }\n\n if ($attrs['linkWrapper'] !== null) {\n $html .= '</div>';\n }\n }\n if ($attrs['wrapper'] !== null) {\n $html .= '</div>';\n }\n return $html;\n}",
"function base64_png_img_tag($base64_png) {\n $tag = \"<img style='display:block;' id='base64image' \" . \n \"src='data:image/png;base64, \" . $base64_png . \"' />\";\n return $tag;\n}",
"function video_cck_dailymotion_thumbnail($field, $item, $formatter, $node, $width, $height) {\n return 'http://www.dailymotion.com/thumbnail/160x120/video/'. $item['value'];\n}",
"public function get_image_title()\n {\n }",
"function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}",
"public function image($src,$alt = null)\r\n {\r\n $element = $this->element('img')->attribute('src',$src);\r\n\r\n if(!is_null($alt))\r\n {\r\n $element->attribute('alt',$alt);\r\n }\r\n\r\n return $element;\r\n }",
"function editor_insert_image($html, $id, $caption, $title, $align, $url, $size) {\r\n\tlist($imgsrc) = image_downsize($id, 'hero-review');\r\n//\tlist($imgsrc) = image_downsize($id, $size);\r\n\r\n\t$html = \"<div class=\\\"photo-gallery\\\">\";\r\n\t$html .= \"<img src=\\\"$imgsrc\\\" alt=\\\"$caption\\\">\";\r\n\tif ($caption) {\r\n\t\t$html .= \"<div class=\\\"caption\\\">$caption</div>\";\r\n\t}\r\n\t$html .= \"</div><!-- photo-gallery -->\";\r\n\treturn $html;\r\n}",
"function wp_get_attachment( $attachment_id ) {\n $a = str_replace( 'attachment_', '', $attachment_id );\n\t$attachment = get_post($a);\n\treturn array(\n\t\t'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),\n\t\t'caption' => $attachment->post_excerpt,\n\t\t'description' => $attachment->post_content,\n\t\t'href' => get_permalink( $attachment->ID ),\n\t\t'src' => $attachment->guid,\n\t\t'title' => $attachment->post_title\n\t);\n}",
"public static function insertNotificationImageAsAttachment() {\n $url = '';\n if(isset($_FILES['image'])) {\n $file = wp_upload_bits($_FILES['image']['name'], null, file_get_contents($_FILES['image']['tmp_name']));\n if($file['error'] === false) {\n $url = $file['url'];\n }\n }\n return $url;\n }",
"public function setEmbeddedImages($mail,$projectId,$email_text){\n preg_match_all('/src=[\\\"\\'](.+?)[\\\"\\'].*?/i',$email_text, $result);\n $result = array_unique($result[1]);\n foreach ($result as $img_src){\n preg_match_all('/(?<=file=)\\\\s*([0-9]+)\\\\s*/',$img_src, $result_img);\n $edoc = array_unique($result_img[1])[0];\n if(is_numeric($edoc)){\n $mail = $this->addNewAttachment($mail,$edoc,$projectId,'images');\n\n if(!empty($edoc)) {\n $src = \"cid:\" . $edoc;\n $email_text = str_replace($img_src, $src, $email_text);\n }\n }\n }\n return $mail;\n }",
"function wp_get_attachment_thumb_url($post_id = 0)\n {\n }",
"function image($imgId,$type='thumbs') {\n if(is_file($this->core->_SYS['CONF']['FTP_QUOTATIONS'].\"/\".$type.\"/\".$imgId)) {\n $imgUrl = $this->core->_SYS['CONF']['URL_IMAGES_QUOTATIONS'].\"/\".$type.\"/\".$imgId;\n }\n\n return $imgUrl;\n }"
] | [
"0.6808126",
"0.63869506",
"0.6359961",
"0.63204473",
"0.6179372",
"0.6098405",
"0.60709876",
"0.60480756",
"0.60252535",
"0.6022915",
"0.6002773",
"0.59758204",
"0.58942604",
"0.5855631",
"0.58382475",
"0.58003324",
"0.5790051",
"0.57877487",
"0.5761844",
"0.57565975",
"0.57403344",
"0.57317847",
"0.57304716",
"0.57120067",
"0.5692528",
"0.5683302",
"0.5678282",
"0.5676166",
"0.56652063",
"0.5653678",
"0.5649359",
"0.5646483",
"0.5634699",
"0.5634364",
"0.563388",
"0.5631205",
"0.56246793",
"0.56190413",
"0.56185484",
"0.56041867",
"0.5603451",
"0.5598275",
"0.55867076",
"0.55867016",
"0.55837274",
"0.55762345",
"0.5574514",
"0.5573604",
"0.5571498",
"0.5534057",
"0.5530359",
"0.5528892",
"0.5523981",
"0.5494947",
"0.54942274",
"0.5493819",
"0.54852897",
"0.54774946",
"0.54750395",
"0.54741263",
"0.5464904",
"0.5459719",
"0.54592276",
"0.5457224",
"0.54539776",
"0.54523015",
"0.5445607",
"0.54316276",
"0.5430702",
"0.5427321",
"0.5424726",
"0.5420507",
"0.54198533",
"0.5415129",
"0.5413701",
"0.54109067",
"0.54102385",
"0.54084957",
"0.54051244",
"0.53987914",
"0.53974396",
"0.5394818",
"0.53946435",
"0.5392127",
"0.5380857",
"0.53760546",
"0.53758717",
"0.5370556",
"0.53685075",
"0.5368291",
"0.53677046",
"0.53655946",
"0.536446",
"0.53630537",
"0.5355855",
"0.53547245",
"0.53436553",
"0.53382766",
"0.5330877",
"0.5330049"
] | 0.7443384 | 0 |
/================================================================================== 3.0 OUTPUT ================================================================================== / 3.1 IMG ALT TAG CONTENT / | function IMGalt_Content($content) {
if($content):
// encode content
$content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8");
$document = new \DOMDocument();
// Disable libxml errors and allow user to fetch error information as needed
libxml_use_internal_errors(true);
$document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
// get img tag from content
$images = $document->getElementsByTagName('img');
foreach ($images as $image) {
// get orginal from srcset
if( $image->hasAttribute('srcset') ):
$orginal = '';
// get srcset from content and explode to array
$srcset = $image->getAttribute('srcset');
$srcset_array = explode(", ", $srcset);
// get orginal size
foreach ($srcset_array as $key => $value) {
$single_srcset = explode(" ", $value);
$src_size = str_replace("w", "", end($single_srcset));
if(strpos($single_srcset[0], $src_size) !== false):
// not the orginal size
// $orginal .= $single_srcset[0] . ' ' . $src_size;
else:
$orginal .= $single_srcset[0];
endif;
}
else:
$orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src');
endif;
// get orginal img id and call alt
$id = attachment_url_to_postid($orginal);
$alt = SELF::getAltAttribute($id);
$image->removeAttribute('alt');
$image->setAttribute('alt', $alt);
}
// output
return $document->saveHTML();
endif;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function IMGalt_Attachment($attributes, $attachment){\n // print_r($attributes);\n // print_r($attachment);\n // get up to date alt attribute\n $alt = SELF::getAltAttribute($attachment->ID);\n // set alt tag\n $attributes['alt'] = $alt;\n // output\n return $attributes;\n }",
"public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }",
"private function getImg()\n\t{\n\t\t$buffer = ' ';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t$buffer = '<img src=\"../../thumbs/'.$this->aImg['sFilename'].'\" />';\t\t\n\t\t\n\t\treturn $buffer;\n\t}",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}",
"public function getImageTag();",
"function cbv_get_image_alt( $url ){\n if( isset( $url ) ){\n $output = '';\n $id = attachment_url_to_postid($url);\n $image_title = get_the_title($id);\n $image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n $image_alt = str_replace('-', ' ', $image_alt);\n $output = $image_alt;\n\n return $output;\n }\n return false;\n}",
"function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}",
"function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }",
"function IMG($img, $extra = '')\n{\n /**\n * An Image tag.\n *\n * Args:\n * $img (str): the image source\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n echo \"<img src='\" . $img . \"'\" ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n}",
"function initialize () {\n $this->set_openingtag ( \"<IMG alt=\\\"\" );\n\t $this->set_closingtag ( \"\\\"[attributes]/>\" );\n }",
"public function createImgTag() {\n\t\t$this->imgNeko = '<img src=\"';\n\t\t$this->imgNeko .= $this->imgUri;\n\t\t$this->imgNeko .= '\" width=\"';\n\t\t$this->imgNeko .= $this->imgSize[0];\n\t\t$this->imgNeko .= '\" height=\"';\n\t\t$this->imgNeko .= $this->imgSize[1];\n\t\t$this->imgNeko .= '\" alt=\"';\n\t\t$this->imgNeko .= $this->creditInfo;\n\t\t$this->imgNeko .= '\">';\n\t}",
"function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}",
"function cbv_get_image_tag( $id, $size = 'full', $title = false ){\n\tif( isset( $id ) ){\n\t\t$output = '';\n\t\t$image_title = get_the_title($id);\n\t\t$image_alt = get_post_meta( $id, '_wp_attachment_image_alt', true);\n if( empty( $image_alt ) ){\n $image_alt = $image_title;\n }\n\t\t$image_src = wp_get_attachment_image_src( $id, $size, false );\n\n\t\tif( $title ){\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\" title=\"'.$image_title.'\">';\n\t\t}else{\n\t\t\t$output = '<img src=\"'.$image_src[0].'\" alt=\"'.$image_alt.'\">';\n\t\t}\n\n\t\treturn $output;\n\t}\n\treturn false;\n}",
"function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-' . esc_attr($align) . '\">';\n\n \t\t$html_str .= \"<p><img src='$url' alt='$title' /></p>\";\n\n\t\tif($caption) $html_str .= '\n\t\t<p class=\"wp-caption-text\">' . $caption . '</p>\n\t\t';\n\n\t$html_str .= '</div>';\n\n return $html_str;\n}",
"function cws_get_alt_text( $image_url ) {\n\tglobal $wpdb;\n\n\tif( ! isset( $image_url ) ) {\n\t\techo \"Please add an image.\";\n\t\treturn;\n\t}\n\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $image_url ) );\n\t$alt_text = get_post_meta( $attachment[0], '_wp_attachment_image_alt', true );\n\t$alt_default = 'CWS default alt tag';\n\n\tif( ! empty( $alt_text ) ) {\n\t\treturn $alt_text;\n\t} else {\n\t\treturn $alt_default;\n\t}\n}",
"protected function _build() {\n $alt_title = $this->isXhtml ? tep_output_string_protected( str_replace ( '&', '&', $this->attributes['alt'] ) ) : tep_output_string( $this->attributes['alt'] );\n $parameters = tep_not_null( $this->parameters ) ? tep_output_string( $this->parameters ) : false;\n $width = (int)$this->_calculated_width;\n $height = (int)$this->_calculated_height;\n $this->_html = '<img width=\"' . $width . '\" height=\"' . $height . '\" src=\"' . $this->src . '\" title=\"' . $alt_title . '\" alt=\"' . $alt_title . '\"';\n if ( false !== $parameters ) $this->_html .= ' ' . html_entity_decode(tep_output_string( $parameters ));\n $this->_html .= $this->isXhtml ? ' />' : '>'; \n }",
"public function img($src = \"\", $alt = \"\") {\n echo \"<img src=assets/img/'\" . $src . \"' alt='\" . $alt . \"'>\";\n }",
"function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}",
"function getSrcAltImage($postID,$size=false){\n\t$imgID = get_post_thumbnail_id($postID);\n\t$img = wp_get_attachment_image_src($imgID,$size, false, '');\n\t$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);\n\t$imgAttr = array(\n\t\t'url' => $img,\n\t\t'alt' => $imgAlt\n\t);\n\tif(is_shop()){\n\t\techo '<section class=\"shop-image\">';\n\t\techo '<img class=\"img-max\" src=\"' . $imgAttr['url'][0] . '\" alt=\"\" />';\n\t\techo '</section>';\n\t}else{\n\t\treturn $imgAttr;\n\t}\n}",
"function img($src = '', $attributes = '', $index_page = false)\n\t{\n\t\tif ( ! is_array($src) )\n\t\t{\n\t\t\t$src = array('src' => $src);\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset($src['alt']))\n\t\t{\n\t\t\t$src['alt'] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ($src as $k => $v)\n\t\t{\n\t\t\tif ($k === 'src' && ! preg_match('#^(data:[a-z,;])|(([a-z]+:)?(?<!data:)//)#i', $v))\n\t\t\t{\n\t\t\t\tif ($index_page === true)\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->site_url($v).'\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"'.get_instance()->config->slash_item('base_url').$v.'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img._stringify_attributes($attributes).' />';\n\t}",
"function jcr_image_custom($atts)\n {\n global $thisimage;\n\n assert_image();\n\n extract(lAtts(array(\n 'escape' => 'html',\n ), $atts));\n\n return ($escape == 'html')\n ? txpspecialchars($thisimage['jcr_image_custom'])\n : $thisimage['jcr_image_custom'];\n }",
"public function render(){\n\t\t$out = \"<img\".($this->getID() ? \" id=\\\"\".$this->getID().\"\\\"\" : \"\");\n\t\t\n\t\t$out .= \" src=\\\"\".$this->link.\"\\\"\";\n\t\t\n\t\tforeach( $this->getProperties() as $key => $value ) {\n\t\t\t$out .= \" \".$key.\"=\\\"\".$value.\"\\\"\"; //example: _width=\"100px\"\n\t\t}\n\t\t$out .= \" />\"; //end of opening html tag and html properties\n\t\t\n\t\treturn $out;\n\t}",
"public static function img($img, $alt, $title = '') {\r\n\t\t\t$file = WEB_ROOT . '/' . $img;\r\n\t\t\tif(!file_exists($file)) {\r\n\t\t\t\tABPF::logger()->error(\"Image file $file doesn't exist!\");\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\t$v = filemtime($file);\r\n\t\t\treturn sprintf('<img src=\"%s/%s?v=%d\" alt=\"%s\" title=\"%s\" />', BASE_URL, $img, $v, $alt, $title);\r\n\t\t}",
"function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' “%2$s”\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}",
"public function getAlt(): string\n {\n return htmlspecialchars($this->getDescription(), ENT_QUOTES);\n }",
"public static function getAltAttribute(int $id = 0){\n // vars\n $output = '';\n $lang = prefix_core_BaseFunctions::getCurrentLang();\n // check if active lang is default or not\n if($lang == SELF::$WPimgAttr_Alt_languages[0]):\n // default language\n $output .= get_post_meta($id, '_wp_attachment_image_alt', TRUE);\n else:\n // alternative text\n $name = SELF::$WPimgAttr_Alt_prefix . $lang;\n $output .= get_post_meta($id, $name, true);\n endif;\n // output\n return $output;\n }",
"public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}",
"function swap_image($msg){\n\n\tif(preg_match(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",$msg)){\n\t\t$msg=preg_replace(\"/\\[img ALT=('|\\\")(.*?)('|\\\")\\]([^\\[]*)\\[\\/img\\]/i\",\"$2\",$msg);\n\t}\n\nreturn $msg;\n}",
"function zero_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n }",
"function _tts_preprocess_p_img_big(&$vars){\n $alt = (isset($vars['content']['field_img'][0]['#item']['title'])\n && !empty($vars['content']['field_img'][0]['#item']['title'])\n ? $vars['content']['field_img'][0]['#item']['title'] . ' - '\n : '') . 'Serramenti Torino';\n $vars['content']['field_img'][0]['#item']['alt'] = $alt;\n \n \n if ($vars['view_mode'] == 'full'){\n $vars['content']['field_img'] = array(\n '#prefix' => '<div class=\"wrapper-p-img margin-b-1\">',\n '#suffix' => '</div>',\n 'data' => $vars['content']['field_img'][0],\n );\n\n //_tts_add_fancy_svg($vars);\n\n if (isset($vars['content']['field_img']['data']['#item']['title']) && $vars['content']['field_img']['data']['#item']['title']!== ''){\n $title = $vars['content']['field_img']['data']['#item']['title'];\n $vars['content']['field_img']['desc'] = array(\n '#prefix' => '<div class=\"margin-t-05 margin-sm-h-2\"><p class=\"small\">',\n '#suffix' => '</p></div>',\n '#markup' => $title,\n '#weight' => 2,\n );\n }\n }\n}",
"function htmlImages($src)\n{\n\treturn '<img src=' . $src . '>';\n}",
"function Image ($source, $title=\"\", $height, $hidth=\"\", $align=\"center\", $border=0, $valign=\"middle\", $class=\"\", \n\t\t\t$id=\"\", $name=\"\", $onAction1=\"\", $onType2=\"\", $onAction2 =\"\", $onAction3=\"\") {\n\t\t$this ->tag = '<img src=\" '.$source .' \" ';\n\t\tif ($name) $this->tag.='name=\" '.$name.' \" ';\n\t\tif ($height ==\"\") $height=16;\n\t\tif ($width ==\"\") $width=16;\n\t\t$this->tag .= 'height=\"' .$height. '\" width= \"'. $width.'\" ';\n\n\t\t$this->tag .='border=\"$border\" . ';\n\t\tif ($class) $this->tag .= 'border =\"'.$border.'\" ';\n\t\tif ($id)\t $this->tag .= 'class=\"'.class. '\" ';\n\t\tif ($title) $this ->tag .= 'title=\"' .$stitle.'\" alt=\"'.$title.'\" ';\n\t\tif ($align) $this ->tag .= 'align= 'align=\"'.$align. .'\" '';\n\t\t\n\n\n\n\t}",
"function my_post_image_html( $html, $post_id, $post_image_id )\r\n{\r\n\t$src = wp_get_attachment_image_src ( get_post_thumbnail_id ( $post_id ));\r\n\t\r\n\t$html = '<img src=\"'.$src[0].'\" alt=\"'.esc_attr( get_post_field( 'post_title', $post_id ) ).'\">';\r\n\t\r\n\treturn $html;\r\n}",
"public function getDescriptionImages() {\n preg_match( '@src=\"([^\"]+)\"@' , $this->description, $match);\n return $match;\n }",
"function printImg($img, $alt = '', $width = '', $height = '', $pageList = false) {\n\t\tglobal $wpdb;\n\t\t$width = $this->thumb_width; //\tthumb width\n\t\t$height = $this->thumb_height; //\tthumb height\t\n\t\t$sql = \"select `id`, `name`, `filename`, `date` from `\".$this->table_img_name.\"` order by `id`\";\n\n if($img == '') \n\t\t\treturn \" \";\n\t\t\n $pathParts = PathInfo($img);\n\t\t$tmp_img = split($this->images_dir, $img);\n\t\t$tmp_img[0] = $tmp_img[0].$this->images_dir.\"/\";\n\t\t$pathParts['dirname'] = $tmp_img[0];\n\t\t\n\n\t $fileExt = split(\"\\.\", $pathParts['basename']);\t// checking what kind of file is\n\t switch(strtolower($fileExt[1])) \n\t\t{\n\t\t\tcase \"flv\": {\n\t\t\tif($pageList == false) \n\n\t\t\t\t\t$result .= \"\n\t\t\t\t\t<script type=\\\"text/javascript\\\" src=\\\"\".$this->path_to_plugin.\"js/swfobject.js\\\" charset=\\\"utf-8\\\"></script>\n\t\t\t\t\t<script type=\\\"text/javascript\\\" src=\\\"\".$this->path_to_plugin.\"js/swfaddress.js\\\" charset=\\\"utf-8\\\"></script>\n\t\t\t\t\t\";\n\n\t\t\t\t\t$result .= <<<HTML\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tvar flashvars = {videoPath: '{$img}',};\n\t\t\t\t\t\tvar params = {};\n\t\t\t\t\t\tvar attributes = {id:'vp', name:'vp'};\n\t\t\t\t\t\tparams.scale = \"noscale\";\n\t\t\t\t\t\tparams.salign = \"tl\";\n\t\t\t\t\t\tparams.bgcolor = \"#f9f9f9\";\n\t\t\t\t\t\tparams.allowfullscreen = \"true\";\n\t\t\t\t\t\tparams.allowScriptAccess = \"always\";\n\t\t\t\t\t\tswfobject.embedSWF(\"{$this->path_to_plugin}swf/vp.swf\", \"myAlternativeContent\", \"200\", \"100\", \"9.0.0\", \"{$this->path_to_plugin}swf/expressInstall.swf\", flashvars, params, attributes);\n\t\t\t\t\t</script>\n\n\t\t\t\t\t<div id=\"myAlternativeContent\">\n\t\t\t\t\t\t<a href=\"http://www.adobe.com/go/getflashplayer\">\n\t\t\t\t\t\t\t<img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\nHTML;\n\n\t\t\t\tif($pageList == false)\t$result .= \" \";\n\n\t \t}\n\t\t\tbreak;\n\n\t \tcase \"swf\": {\n\t\t\t\tif($pageList == false) \n\n\t\t\t\t\t$result = \"\n\t\t\t\t\t<script src=\\\"\".$this->path_to_plugin.\"js/AC_RunActiveContent.js\\\" type=\\\"text/javascript\\\"></script>\n\t\t\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\t\t\tAC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','\".$width.\"','height','100','src','\".$pathParts['dirname'].\"/\".$fileExt[0].\"','quality','high','bgcolor','#f9f9f9f','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','\".$pathParts['dirname'].\"/\".$fileExt[0].\"' ); //end AC code\n\t\t\t\t\t</script>\n\t\t\t\t\t<noscript>\";\n\t\t\t\t\t$result .= \"\n\t\t\t\t\t\t<object classid=\\\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\\\" codebase=\\\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0\\\" width=\\\"\".$width.\"\\\" height=\\\"100\\\">\n\t\t\t\t\t\t\t<param name=\\\"movie\\\" value=\\\"\".$img.\"\\\" />\n\t\t\t\t\t\t\t<param name=\\\"quality\\\" value=\\\"high\\\" />\n\t\t\t\t\t\t\t<param name=\\\"bgcolor\\\" value=\\\"#f9f9f9\\\" />\n\t\t\t\t\t\t\t<embed src=\\\"\".$img.\"\\\" quality=\\\"high\\\" pluginspage=\\\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\\\" type=\\\"application/x-shockwave-flash\\\" width=\\\"\".$width.\"\\\" height=\\\"100\\\" bgcolor=\\\"#f9f9f9\\\">\n\t\t\t\t\t\t\t</embed>\n\t\t\t\t\t\t</object>\";\n\t\t\t\tif($pageList == false) \n\t\t\t\t\t$result .= \"\n\t\t\t\t\t</noscript>\";\n\t \t} \n\t\t\tbreak;\n\t \tdefault :\n\n\t\t\t{\n\t \t\t$thumb = $pathParts['dirname'].\"/thumb_\".$pathParts['basename'];\n\n\t\t $img = $thumb;\n\t\t $imageSize = @GetImageSize($img);\n\n\t\t if(!$imageSize) return \"No image\";\n\t\t\t//\techo $imageSize[0].\" \\n\";\n\t\t\t//\techo $imageSize[1].\" \\n\";\n\t\t // $image_size = $this->imgSize($imageSize[0], $imageSize[1], $width, $height);\n\t\t\t\t$multi = \"100\" / $imageSize[1]; // resize every image to height 80px\n\t\t\t\t$height_new = \"100\";\n\t\t\t\t$width_new = $imageSize[0] * $multi;\n\n\t\t $result = \"<img src=\\\"\".$img.\"\\\" width=\\\"\".$width_new.\"\\\" height=\\\"\".$height_new.\"\\\" alt=\\\"\".$alt.\"\\\" />\";\n\t \t//\techo \" _ / _ / _ \".$img;\n\t\t\t}\n\t }\n return $result;\n\t}",
"public function getAlt()\n {\n return $this->alt;\n }",
"public function introTextImage(){\n if(isset($this->imageIntro)){\n return $this->imageIntro;\n }\n $this->fetchIntroImage();\n return $this->imageIntro;\n }",
"function baindesign324_filter_ptags_on_images($content){\n\t return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n\t}",
"public function getCvvImgHtml() {\r\n return '<img src=' . $this->ccConfig->getCvvImageUrl() . ' />';\r\n }",
"function base64_png_img_tag($base64_png) {\n $tag = \"<img style='display:block;' id='base64image' \" . \n \"src='data:image/png;base64, \" . $base64_png . \"' />\";\n return $tag;\n}",
"protected function img($url, $alt = null)\r\n {\r\n return sprintf('<img src=\"%s\" alt=\"%s\" style=\"width:%spx;height:%spx;\" />', $url, $alt, $this->size[0], $this->size[1]);\r\n }",
"function custom_filter_ptags_on_images($content){\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"private function _build_img_tag($data)\n\t{\n\t\treturn '<img ' . $this->_assets_attributes($data['attributes']) . ' />';\n\t}",
"function get_image_alt($file){\r\n $h1count = preg_match_all('/(alt=.)([a-zA-Z0-9\\s]{1,})/',$file,$patterns);\r\n $res = array();\r\n array_push($res,$patterns[2]);\r\n array_push($res,count($patterns[2]));\r\n return $res;\r\n}",
"public function fullTextImage(){\n if(isset($this->imageFullText)){\n return $this->imageFullText;\n }\n $this->fetchFullTextImage();\n return $this->imageFullText;\n }",
"function cardealer_filter_ptags_on_images($content){\r\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\r\n}",
"function wpgrade_filter_ptags_on_images($content){\r\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\r\n}",
"function objectAttributeContent( $contentObjectAttribute )\n {\n $pngFilePath = '';\n $show_png = false;\n $alt = '';\n $contentObject = eZContentObject::fetch( $contentObjectAttribute->attribute( 'contentobject_id' ) );\n if( $contentObject instanceof eZContentObject )\n {\n $image = $contentObjectAttribute->storedFileInformation( $contentObject, $contentObject->attribute( 'current_version' ), $contentObjectAttribute->attribute( 'language_code' ), $contentObjectAttribute );\n if( is_array( $image ) && array_key_exists( 'url', $image ) )\n {\n $embedImagePath = $image['url'];\n $imagePathArray = explode( DIRECTORY_SEPARATOR, $embedImagePath );\n $imageFile = array_pop( $imagePathArray );\n $imageFile = preg_replace( '/(.jpg|.gif)/', '_' . $contentObject->attribute( 'current_version' ) . '.png', $imageFile );\n $pngFolder = implode( DIRECTORY_SEPARATOR, $imagePathArray ) . DIRECTORY_SEPARATOR . 'png';\n if ( !file_exists( $pngFolder ) )\n {\n eZDir::mkdir( $pngFolder, false, true );\n }\n // copy embeded image to local\n $file = eZClusterFileHandler::instance( $pngFolder . DIRECTORY_SEPARATOR . $imageFile );\n if ( is_object( $file ) && $file->exists() )\n {\n $pngFilePath = $pngFolder . DIRECTORY_SEPARATOR . $imageFile;\n #eZDebug::writeNotice( $pngFilePath, 'Fallback PNG' );\n $xml = new SimpleXMLElement( $contentObjectAttribute->attribute( \"data_text\" ) );\n $texts = $xml->{'g'}->{'text'};\n if( $texts != null )\n {\n foreach( $texts as $text )\n {\n $altArray[] = (string)$text->{0};\n }\n }\n $alt = implode( ', ', $altArray );\n #eZDebug::writeNotice( $alt, 'PNG Alt-Text' );\n }\n else\n {\n $pngFilePath = $embedImagePath;\n }\n }\n }\n $attributeContent = array( \"data_text\" => $contentObjectAttribute->attribute( \"data_text\" ),\n \"data_int\" => $contentObjectAttribute->attribute( \"data_int\" ),\n \"data_png\" => array( 'src' => $pngFilePath,\n 'alt' => $alt ) );\n\n return $attributeContent;\n }",
"public function get_image_link()\n {\n }",
"function imagecustom($im, $text) {\n}",
"static function img($source, $id = Null, $class = Null) \n {\n $file_name = array_pop(explode(\"/\", $source));\n $name = array_shift(explode(\".\", $file_name));\n return '<img' . self::_id($id) . self::_class($class) . ' src=\"'.$source.'\" title=\"'.$name.'\" alt=\"'.$name.'\" />'.self::$_nl;\n }",
"public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}",
"function get()\n{\n\t$p=''; $ak='';\n\n\tfor($i=0;$i<count($this->reflist);$i++){\n\t\t$img=$this->tn->make_img($this->reflist[$i][1],$this->reflist[$i][2]);\n\t\tif($this->reflist[$i][3]!='')\n\t\t\t$ak=' accesskey=\"'.$this->reflist[$i][3].'\"';\n\t\tif($this->reflist[$i][0]!='')\n\t\t\t$img='<a href=\"'.$this->reflist[$i][0].'\"'.$ak.'>'.$img.'</a>';\n\t\t$p.='<td style=\"padding-left:5px;padding-bottom:1px\">'.$img.'</td>';\n\t}\n\n\treturn $p;\n}",
"public function img()\n {\n return '<img src=\"'.$this->src().'\" alt=\"captcha\">';\n }",
"function template_bits_bit_row_image( $id, $image ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<img id='img-item-{$id}' src='{$this->ipsclass->skin_acp_url}/images/{$image}' border='0' alt='' />\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}",
"protected function getImageMeta(int $id){\n $image_alt=get_post_meta($id, '_wp_attachment_image_alt', true);\n return $image_alt;\n }",
"function po_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function iti_get_image_alt_from_url( $url = '' ) {\n\tglobal $wpdb;\n\n\t$url = esc_url( $url );\n\n\t/** @noinspection PhpUndefinedMethodInspection */\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $url ) );\n\n\t$post_id = isset( $attachment[0] ) ? $attachment[0] : 0;\n\t$alt = get_post_meta( absint( $post_id ), '_wp_attachment_image_alt', true );\n\n\treturn $alt;\n}",
"public function output() {\n $image = get_api_media( $this->params->id );\n\n // Add any custom classes to the already existing class parameter\n if ( $this->params->class ) {\n $regex = '/class=\"(.+?)\"/';\n $image = preg_replace( $regex, 'class=\"$1 ' . $this->params->class . '\"', $image );\n }\n // Only get the image tag\n if ( $this->params->img_only ) {\n $regex = '/(<img.*?>)/';\n $matches = [];\n preg_match( $regex, $image, $matches );\n $image = $matches[0];\n }\n\n return $image;\n }",
"function view_logo_project($img,$w,$h,$alt)\n{\n if(file_exists(\"logo/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../logo/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../logo/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;\t\t\t}",
"function _imageTitle($img) {\n global $ID;\n\n // some fixes on $img['src']\n // see internalmedia() and externalmedia()\n list($img['src']) = explode('#', $img['src'], 2);\n if($img['type'] == 'internalmedia') {\n resolve_mediaid(getNS($ID), $img['src'], $exists ,$this->date_at, true);\n }\n\n return $this->_media(\n $img['src'],\n $img['title'],\n $img['align'],\n $img['width'],\n $img['height'],\n $img['cache']\n );\n }",
"function spartan_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"public function get_image_title()\n {\n }",
"function wm_write_metadata($image_id)\n{\n global $conf, $logger;\n \n $query = '\nSELECT\n img.name,\n img.comment,\n img.author,\n img.date_creation,\n GROUP_CONCAT(tags.name) AS tags,\n img.path,\n img.representative_ext\n FROM '.IMAGES_TABLE.' AS img\n LEFT OUTER JOIN '.IMAGE_TAG_TABLE.' AS img_tag ON img_tag.image_id = img.id\n LEFT OUTER JOIN '.TAGS_TABLE.' AS tags ON tags.id = img_tag.tag_id\n WHERE img.id = '.$image_id.'\n GROUP BY img.id, img.name, img.comment, img.author, img.path, img.representative_ext\n;';\n $result = pwg_query($query);\n $row = pwg_db_fetch_assoc($result);\n\n $name = wm_prepare_string($row['name'], 256);\n $description = wm_prepare_string($row['comment'], 2000);\n $author = wm_prepare_string($row['author'], 32);\n\n $command = isset($conf['exiftool_path']) ? $conf['exiftool_path'] : 'exiftool';\n $command.= ' -q';\n\n if (strlen($name) > 0)\n {\n # 2#105 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Headline=\"'.$name.'\"';\n\n # 2#005 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:ObjectName=\"'.wm_cutString($name, 64).'\"';\n }\n\n if (strlen($description) > 0)\n {\n # 2#120 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Caption-Abstract=\"'.$description.'\"';\n }\n\n if (strlen($author) > 0)\n {\n # 2#080 in iptcparse($imginfo['APP13'])\n $iptc_field = 'By-line';\n\n if (\n $conf['use_iptc']\n and isset($conf['use_iptc_mapping']['author'])\n and '2#122' == $conf['use_iptc_mapping']['author']\n )\n {\n # 2#122 in iptcparse($imginfo['APP13'])\n $iptc_field = 'Writer-Editor';\n }\n\n $command.= ' -IPTC:'.$iptc_field.'=\"'.$author.'\"';\n }\n \n if (strlen($row['tags']) > 0)\n {\n $tags = explode(',', $row['tags']);\n foreach ($tags as $tag)\n {\n $tag = wm_prepare_string($tag, 64);\n\n # 2#025 in iptcparse($imginfo['APP13'])\n $command.= ' -IPTC:Keywords=\"'.$tag.'\"';\n }\n }\n\n $command.= ' \"'.$row['path'].'\"';\n $command.= ' 2>&1';\n // echo $command;\n $logger->info(__FUNCTION__.' command = '.$command);\n\n $exec_return = exec($command, $output, $rc);\n // echo '$exec_return = '.$exec_return.'<br>';\n // echo '<pre>'; print_r($output); echo '</pre>';\n\n // as derivatives may contain metadata, they must be reset\n delete_element_derivatives($row);\n\n return array($rc, $output);\n}",
"function acd_add_img_title( $attr, $attachment = null ) {\n\t$img_title = trim( strip_tags( $attachment->post_title ) );\n\t$img_title = str_replace(\"-\", \" \", $img_title); //remove hyphens\n\t$img_title = str_replace(\"_\", \" \", $img_title); //remove underscores\n\t$img_title = preg_replace('/[0-9]+/', '', $img_title); //remove numbers\n\t$img_title = ucwords($img_title); //capitalize first letter of each word\n\n\t$attr['title'] = $img_title; //add image title attribute\n\t// or get the title instead of image title $attr['title'] = the_title_attribute( 'echo=0' );\n\t$attr['alt'] = $img_title; //add alt attribute\n\treturn $attr;\n}",
"function view_builder_logo_inside_project($img,$w,$h,$alt)\n{\n if(file_exists(\"../builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"../include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='floatL mar12R' />\";\n else\n $temp =\"<img src=\\\"../include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='floatL mar12R'/>\";\n \n\treturn $temp;}",
"function shariff3uu_catch_image() {\n\t\t$result = preg_match_all( '/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', get_post_field( 'post_content', get_the_ID() ), $matches );\n\t\tif ( array_key_exists( 0, $matches[1] ) ) {\n\t\t\treturn $matches[1][0];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}",
"function imageObj($OA) {\n \n // check isset\n if(!isset($OA['alt'])) $OA['alt'] = '';\n if(!isset($OA['file'])) $OA['file'] = '';\n if(!isset($OA['title'])) $OA['title'] = '';\n \n // wrap before\n if (isset($OA['wrapB'])) echo $OA['wrapB'].\"\\n\";\n \n // link begin\n if (isset($OA['link'])) {\n echo '<a href=\"'. $OA['link'] .'\"';\n if(isset($OA['linkT'])) echo ' target=\"'. $OA['linkT'] .'\"';\n echo '>';\n }\n \n // check for absolute path\n if (substr($OA['file'],0,4) == 'http') $pT = '';\n else $pT = THEMEPATH;\n \n // check width and height and echo tag\n if (isset($OA['width'])) {\n echo '<img src=\"'. $pT . $OA['file'] .'\"';\n if ($OA['width'] != 'auto') echo ' width=\"'. $OA['width'] .'\"';\n if ($OA['height'] != 'auto') echo ' height=\"'. $OA['height'] .'\"';\n echo ' alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n } else {\n echo '<img src=\"'. $pT . $OA['file'] .'\" alt=\"'. $OA['alt'] .'\"';\n if ($OA['title']) echo ' title=\"'. $OA['title'] .'\"';\n echo '>';\n }\n \n // if 'link' exists\n if (isset($OA['link'])) echo '</a>';\n \n // 'wrap' after\n if (isset($OA['wrapA'])) echo \"\\n\".$OA['wrapA'];\n echo \"\\n\\n\";\n}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"function printHTML() \n {\n?>\n <center>\n <img src=\"/images/blankimage.gif\" border=0 width=700 height=240 id=\"candidate\" TITLE=\"Current Candidate\" alt=\"alt\">\n </center>\n<?\n }",
"function pd_img_unautop($imgWrap)\n{\n $imgWrap = preg_replace('/<p>\\\\s*?(<a .*?><img.*?><\\\\/a>|<img.*?>)?\\\\s*<\\\\/p>/s', '<figure>$1</figure>', $imgWrap);\n return $imgWrap;\n}",
"function image($file_name,$title,$class='',$id) {\n \tif ($id) $id = \"id = '\".$id.\"'\"; \n \t$data = '<img src=\"'.BASE_PATH.'/img/'.$file_name.'\" title = \"'.$title.'\" border=\"0\" align=\"absmiddle\" '.$id.' class=\"'.$class.'\" />';\n return $data;\n }",
"protected function fetchFullTextImage(){\n $this->imageFullText = $this->getImageTypeFromImages('full');\n }",
"function img($src = '', bool $indexPage = false, $attributes = ''): string\n {\n if (! is_array($src)) {\n $src = ['src' => $src];\n }\n if (! isset($src['src'])) {\n $src['src'] = $attributes['src'] ?? '';\n }\n if (! isset($src['alt'])) {\n $src['alt'] = $attributes['alt'] ?? '';\n }\n\n $img = '<img';\n\n // Check for a relative URI\n if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {\n if ($indexPage === true) {\n $img .= ' src=\"' . site_url($src['src']) . '\"';\n } else {\n $img .= ' src=\"' . slash_item('baseURL') . $src['src'] . '\"';\n }\n\n unset($src['src']);\n }\n\n // Append any other values\n foreach ($src as $key => $value) {\n $img .= ' ' . $key . '=\"' . $value . '\"';\n }\n\n // Prevent passing completed values to stringify_attributes\n if (is_array($attributes)) {\n unset($attributes['alt'], $attributes['src']);\n }\n\n return $img . stringify_attributes($attributes) . _solidus() . '>';\n }",
"function zen_image_OLD($src, $alt = '', $width = '', $height = '', $parameters = '') {\n global $template_dir;\n\n//auto replace with defined missing image\n if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {\n $src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;\n }\n\n if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {\n return false;\n }\n\n // if not in current template switch to template_default\n if (!file_exists($src)) {\n $src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);\n }\n\n// alt is added to the img tag even if it is null to prevent browsers from outputting\n// the image filename as default\n//EDITED FOR LAZY LOAD\n $image = '<img src=\"' . zen_output_string($src) . '\" alt=\"' . zen_output_string($alt) . '\"';\n\n if (zen_not_null($alt)) {\n $image .= ' title=\" ' . zen_output_string($alt) . ' \"';\n }\n\n if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {\n if ($image_size = @getimagesize($src)) {\n if (empty($width) && zen_not_null($height)) {\n $ratio = $height / $image_size[1];\n $width = $image_size[0] * $ratio;\n } elseif (zen_not_null($width) && empty($height)) {\n $ratio = $width / $image_size[0];\n $height = $image_size[1] * $ratio;\n } elseif (empty($width) && empty($height)) {\n $width = $image_size[0];\n $height = $image_size[1];\n }\n } elseif (IMAGE_REQUIRED == 'false') {\n return false;\n }\n }\n\n if (zen_not_null($width) && zen_not_null($height)) {\n $image .= ' width=\"' . zen_output_string($width) . '\" height=\"' . zen_output_string($height) . '\"';\n }\n\n if (zen_not_null($parameters)) $image .= ' ' . $parameters;\n\n $image .= ' />';\n\n return $image;\n }",
"function img_tag($src, array $attributes = array())\r\n{\r\n $attributes['src'] = $src;\r\n\r\n return tag('img', $attributes);\r\n}",
"function theme_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function textoGif($text) \r\n\t{\r\n \r\n\t\r\n\tpreg_match_all('/\\[EQ(.+?)EQ\\]|\\$\\$(.+?)\\$\\$/is', $text, $matches); \r\n for ($i=0; $i<count($matches[0]); $i++) {\r\n $texexp = $matches[1][$i] . $matches[2][$i];\r\n\t\t$texexp = str_replace('<br />','',$texexp);\r\n\t\t$texexp = str_replace('<br />','',$texexp);\r\n\t\t//$texexp = urlencode($texexp);\r\n $text = str_replace( $matches[0][$i], \"<img src=\\\"/cgi-bin/mimetex.cgi?$texexp\\\">\", $text);\r\n }\r\n\r\n\treturn $text; \r\n\t\r\n\t\r\n\t}",
"function imageHtmlCode($url, $adds = '', $attr = '')\r\n {\r\n $this->imagesContentNoSave = false;\r\n if (!$this->testOn && ($this->feed['params']['image_save'] || $this->feed['params']['img_path_method'])) {\r\n if ($this->feed['params']['img_path_method']=='1') $url = ltrim($url, '/');\r\n if ($this->feed['params']['img_path_method']=='2') $url = rtrim(site_url(), '/') . $url;\r\n \r\n } \r\n return strtr($this->feed['params']['imageHtmlCode'], array('%TITLE%' => htmlentities($this->currentTitle, ENT_COMPAT, 'UTF-8'), '%PATH%' => $url, '%ADDS%' => $adds, '%ATTR%' => $attr)); \r\n }",
"protected function getImageAttributes() {}",
"function bones_filter_ptags_on_images($content)\n{\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"public static function img($src, $alt = '', $attrs = '')\n {\n return '<img src=\"'.PUBLIC_PATH.\"img/$src\\\" alt=\\\"$alt\\\" \".Tag::getAttrs($attrs).'/>';\n }",
"function mdwpfp_filter_ptags_on_images($content){\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"public function image($src,$alt = null)\r\n {\r\n $element = $this->element('img')->attribute('src',$src);\r\n\r\n if(!is_null($alt))\r\n {\r\n $element->attribute('alt',$alt);\r\n }\r\n\r\n return $element;\r\n }",
"public function render(): string\n {\n $image_attributes = '';\n foreach ($this->attributes as $attribute => $value) {\n if (\n is_string($attribute) &&\n is_string($value) &&\n in_array($attribute, Settings::ignoredCustomAttributes()) === false\n ) {\n $image_attributes .= \"{$attribute}=\\\"{$value}\\\" \";\n }\n }\n return \"<img src=\\\"{$this->insert}\\\" {$image_attributes}/>\";\n }",
"function view_builder_logo($img,$w,$h,$alt)\n{\n if(file_exists(\"builder/\".$img) && $img!='')\n\n $temp= \"<img src=\\\"include/phpThumb.php?src=../builder/\".$img.\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" \n alt='$alt' class='mar7L' />\";\n else\n $temp =\"<img src=\\\"include/phpThumb.php?src=../builder/nophoto.jpg\\\"&w=$w&h=$h&iar=1\\\"; border='0' width=\\\"$w\\\" height=\\\"$h\\\" alt='$alt' class='mar7L'/>\";\n \n\treturn $temp;\t\t\t}",
"function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }",
"function getImageRegex()\r\n\t{\r\n\t\t$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', \r\n\t\t\t$this->description, $matches);\r\n\t\t$first_img = $matches [1] [0];\r\n\t\t\r\n\t\t//Defines a default image\r\n\t\tif(empty($first_img)){ \r\n\t\t\t$first_img = \"/images/default.jpg\";\r\n\t\t}\r\n\t\t$this->picture = $first_img;\r\n\t}",
"function theme_img($uri, $tag=false)\n{\n \n\tif($tag)\n\t{\n\t\treturn '<img src=\"'.theme_url('assets/images/'.$uri).'\" alt=\"'.$tag.'\">';\n\t}\n\telse\n\t{\n\t\treturn theme_url('assets/images/'.$uri);\n\t}\n\t\n}",
"function kibble_custom_thumbnail_html( $html, $post_id, $post_image_id ) {\n\t$title = get_the_title($post_id);\n\tif (empty( $html )) {\n\t\t$html = '<img width=\"180\" title=\"'. $title .'\" height=\"240\" src=\"http://fakeimg.pl/164x204/282828/eae0d0/\" class=\"thumbnail img-responsive\" />';\n\t}\n\t$html = preg_replace(array('/(alt|title)=\\\"[^\"]*\"\\s/','/class=\\\"[^\"]*\"\\s/', '/width=\\\"[^\"]*\"\\s/','/height=\\\"[^\"]*\"\\s/'),array('title=\"'. $title .'\" ','class=\"thumbnail img-responsive\" ','width=\"180\" ', 'height=\"240\" '),trim($html));\n \treturn $html;\n}",
"function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}",
"public static function getContentImageAlt($model)\n {\n $imageAlt = BaseAmosModule::t('amoscore', '#amos_carousel_widget_default_content_image_alt');\n if ($model instanceof ModelLabelsInterface) {\n $modelGrammar = $model->getGrammar();\n if ($modelGrammar instanceof ModelGrammarInterface) {\n $imageAlt = BaseAmosModule::t('amoscore', '#amos_carousel_widget_image_of') . $modelGrammar->getArticleSingular() . ' ' . strtolower($modelGrammar->getModelSingularLabel());\n }\n }\n return $imageAlt;\n }",
"public function renderTagImage($result);",
"public function image_send_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\r\n if(strpos($html, '<img data-id=\"')===false){\r\n $html = str_replace('<img', '<img data-id=\"'.$id.'\" ', $html);\r\n }\r\n return $html;\r\n }"
] | [
"0.7009078",
"0.68325895",
"0.6692804",
"0.66500384",
"0.66121835",
"0.65053207",
"0.6485219",
"0.6444968",
"0.64215714",
"0.6418329",
"0.63981396",
"0.6385716",
"0.6361115",
"0.63594073",
"0.6359043",
"0.6341475",
"0.6329196",
"0.6321962",
"0.631671",
"0.6298811",
"0.6281806",
"0.6281429",
"0.6267405",
"0.62612134",
"0.62391883",
"0.62328833",
"0.623108",
"0.6224123",
"0.62189394",
"0.6199195",
"0.619241",
"0.61818945",
"0.61808825",
"0.6178498",
"0.61451",
"0.61138296",
"0.6107217",
"0.60950994",
"0.6086506",
"0.60827607",
"0.60718185",
"0.607112",
"0.6069317",
"0.6068768",
"0.6046882",
"0.60441023",
"0.60356146",
"0.60202914",
"0.60172",
"0.6014581",
"0.6010638",
"0.6005929",
"0.60007143",
"0.59947455",
"0.5984231",
"0.5970375",
"0.59643376",
"0.5961944",
"0.5960594",
"0.5952927",
"0.59487325",
"0.59452665",
"0.5930929",
"0.5921062",
"0.59179986",
"0.5916729",
"0.59128696",
"0.591127",
"0.59104246",
"0.59086764",
"0.59067667",
"0.5897802",
"0.5889024",
"0.588397",
"0.5882704",
"0.5881299",
"0.5881236",
"0.5879539",
"0.5877059",
"0.5876801",
"0.5875943",
"0.58651805",
"0.5864768",
"0.5858179",
"0.5857841",
"0.5849309",
"0.58489496",
"0.5847564",
"0.58381546",
"0.58358115",
"0.583453",
"0.58341646",
"0.58341646",
"0.58341646",
"0.58341646",
"0.58341646",
"0.58341646",
"0.5824495",
"0.58189267",
"0.58134925"
] | 0.7602596 | 0 |
initialise the reference to the codeigniter instance | public function __construct() {
require_once APPPATH.'third_party/PHPExcel.php';
$this->excel = new PHPExcel();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->CI =& get_instance();\n \n }",
"public function __construct() {\n $this->CI =& get_instance();\n }",
"public function __construct()\n\t{\n\t \t$this->CI =& get_instance();\n\t}",
"function __construct()\n\t{\n\t\t$this->_CI = &get_instance();\n\t}",
"public function __construct()\n {\n $this->CI = &get_instance();\n }",
"public function __construct()\n {\n $this->CI = &get_instance();\n }",
"function __construct()\n {\n $this->CI = &get_instance();\n }",
"public function __construct()\n {\n $this->CI =& get_instance();\n }",
"public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n }",
"public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n }",
"public function __construct()\n {\n $this->CI =& get_instance();\n }",
"public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n }",
"public function __construct()\n {\n $this->ci =& get_instance();\n }",
"public function __construct()\n\t{\n\t\t\t// Assign the CodeIgniter super-object\n\t\t\t$this->CI =& get_instance();\n\t}",
"public function __construct()\n {\n $this->ci =& get_instance();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->CI = &get_instance();\n }",
"public function __construct()\r\n {\r\n // Assign the CodeIgniter super-object\r\n \r\n $this->CI =& get_instance();\r\n $this->CI->load->helper('url');\r\n $this->CI->load->library('session');\r\n $this->CI->load->database();\r\n\r\n }",
"function __construct(){\n\t\t$this->_ci =& get_instance();\n\t}",
"public function __construct()\n\t{\n\t\t$this->_ci =& get_instance();\n\t}",
"public function __construct($config = array()) {\n $this->ci = & get_instance();\n }",
"public function __construct()\n {\n // Assign the CodeIgniter super-object\n $this->CI =& get_instance();\n $this->CI->load->library('user_agent');\n $this->CI->load->library('notification');\n $this->CI->load->helper('cookie');\n $this->CI->load->helper('date');\n }",
"function Authentication()\r\n\r\n {\r\n $this->CI = &get_instance();\r\n\r\n }",
"public function __construct()\n {\n parent::__construct();\n $this->load->database();\n //$this->load->library('session');\n //$this->ci =& get_instance();\n }",
"function __construct() {\n $this-> CI =& get_instance();\n $this -> CI -> load -> model('Admin_model');\n // Nos comemos la libreria que la virgen solo corre si sale corriendo\n }",
"function __construct()\n {\n // $this->_ci =& get_instance();\n //load config \n // $this->load->library('user_agent'); \n }",
"public function __construct()\n {\n\t\t$this->CI =& get_instance();\n\t\t\n\t\t$this->CI->load->helper('url');\n\t\t$this->CI->load->model('M_root');\n }",
"public function __construct()\n\t{\n\t\t\n\t\t// Set the super object to a local variable for use throughout the class\n\t\t$this->CI =& get_instance();\n\t}",
"function __construct()\n\t{\n\t\t$this->ci =& get_instance(); \n\t\t$this->ci->load->database(); #load DB class from super\n\t}",
"function __construct()\n {\n parent::__construct();\n $this->_ci_view_paths = [];\n \n //$this->config->set_item(\"base_url\",BASE_URL);\n //$this->config->set_item(\"index_page\",\"\");\n if(!$this->components) $this->components = new Components;\n if(!$this->parser) $this->parser = new Parser;\n if(!$this->access) $this->access = new Securityaccess;\n\n }",
"public function __construct() {\n\n //Initialize the instance of the Codeigniter framework.\n //No Direct access from library folder\n $this->ci = & get_instance();\n $this->ci->load->library('email');\n $this->ci->config->load('email',true);\n }",
"function CI_Base()\n\t{\n\t\tparent::CI_Loader();\n\t\t$this->load =& $this;\n\t\t\n\t\t// This allows resources used within controller constructors to work\n\t\tglobal $OBJ;\n\t\t$OBJ = $this->load; // Do NOT use a reference.\n\t}",
"function __construct($params=array())\n\t{\n\t\t// Assign the CodeIgniter super-object\n\t\t$this->CI =& get_instance();\n\t}",
"public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }",
"public function __construct()\r\n\t{\r\n\t\t$this->ci =& get_instance();\r\n\t\t\r\n\t\t$this->ci->load->config('config');\r\n\t\t$this->alias_config = $this->ci->config->item('alias_config');\r\n\t\t$this->upload_config = $this->ci->config->item('upload_config');\r\n\t}",
"public function __construct()\n\t{\n\t\t// Assign the CodeIgniter super-object\n\t\t$this->CI =& get_instance();\n\t\t$this->CI->load->model('ContratanteDB');\n\t}",
"public function __construct()\n {\n // Call the CI_Controller constructor\n parent::__construct();\n }",
"public function __construct()\n\t {\n\t $this->CI =& get_instance();\n $this->CI->load->helper(array('file','common'));\n $this->config=$this->CI->config->item('wechat_config');\n }",
"private function __construct()\n\t{\n App::session();\n \n App::setting();\n \n\t\t//get and create constant for project db driver\n\t\tLoader::loadClass('Common_DB_Model');\n \n\t\tApp::request();\n \n\t\tApp::user();\n\t}",
"function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('session');\n\t\t$this->load->database();\n\t}",
"function __construct($rules = array()) {\n parent::__construct($rules);\n //$this->ci =& get_instance();\n $this->CI =& get_instance();\n }",
"public function __construct() {\n\t\t//load database in autoload libraries \n\t\tparent::__construct(); \n\t\t$this->load->model('SetUpModel'); \n\t\t$this->load->helper('url');\n\t}",
"function __construct()\n {\n $this->core = Core::getInstance();\n }",
"function __construct()\n {\n parent::__construct();\n\t\t\n\t\t//$this->load->database('site', TRUE);\n }",
"public function __construct() {\r\n parent::__construct();\r\n// $this->load->helper('url');\r\n //$this->load-model('dbconnect');\r\n }",
"function __construct(){\n $this->_ci =& get_instance();\n $this->CI=& get_instance(); \n $CI=& get_instance();\n $CI->load->database();\n //$this->CI->load->library('session');\n //$this->CI->load->helper('cookie','session');\n //Include the user_model so we can use it\n $this->_ci->load->model('Menu_model');\n }",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// If the controller is not called from the command line, we assume the root is the location of the index.php file\n\t\t$this->load->library('db_tools', array('db'=>$this->db, 'output_path'=> $_SERVER['DOCUMENT_ROOT'].'/libs/temp/db'));\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->load->helper(array('form','url'));\n $this->load->library(array('session', 'form_validation', 'email'));\n $this->load->library(array('session', 'form_validation', 'pagination', 'email','MY_Input'));\n $this->load->database();\n $this->load->model('Init_models');\n }",
"public function __construct()\n {\n $this->db = new DbController(\"mysql\");\n }",
"public function __construct()\n {\n parent::__construct();\n $this->load->helper(array('form','url'));\n $this->load->library(array('session', 'form_validation', 'email'));\n $this->load->database();\n $this->load->model('Init_models');\n }",
"public function __construct()\n {\n $this->_CI =& get_instance();\n \n // Load libraries\n $this->_CI->load->library(\"src/Validation.php\");\n $this->_CI->load->library(\"src/Encryption.php\");\n $this->_CI->load->library(\"src/Response.php\");\n\n // Load database\n $this->pdo = $this->_CI->load->database('pdo', true)->conn_id;\n }",
"public function init() {\n $bootstrap = $this->getInvokeArg(\"bootstrap\");\n $this->aConfig = $bootstrap->getOptions();\n $this->view->aConfig = $this->aConfig;\n $this->model= new Model_InfoBusiness();\n $this->modelMapper= new Model_InfoBusinessMapper();\n $this->modelProvince = new Model_MasterProvince();\n $this->modelProvinceMapper = new Model_MasterProvinceMapper();\n $this->modelDistrict = new Model_MasterDistrict();\n $this->modelDistrictMapper = new Model_MasterDistrictMapper();\n $this->modelWard = new Model_MasterWard();\n $this->modelWardMapper = new Model_MasterWardMapper();\n }",
"function __construct()\n\t{\n\t parent::__construct();\n\n\t\t$this->Delete = 0;\n\t\t$this->CI =& get_instance();\n\t\t$this->CI->load->library('DBDbi');\n\t}",
"function __construct() {\r\n\t\tparent::__construct();\r\n\t\t$this->_public_view=$this->config->item('public_view');\r\n\t\t$this->load->model('Model_lib');\r\n\t}",
"function __construct()\n {\n parent::__construct();\n $this->load->helper('url');\n $this->load->database();\n $this->load->model('wasap_model');\n $this->load->library('grocery_CRUD');\n }",
"public function _init() {\r\n\r\n }",
"public function __construct()\n {\n\n $this->db=new DBAccess();\n $this->mlog=new Logging();\n $this->conf=new config();\n }",
"public function __construct() {\n parent::__construct();\n \n// $this->db = $this->load->database( $this->session->userdata('portal') , TRUE); \n }",
"public function _init() {}",
"function __construct() {\n \t\tparent::__construct();\n \t\t$this->_public_view= $this->config->item('public_view');\n \t\t$this->load->model('Model_lib');\n \t}",
"function __construct() {\n\t\t//$this->load->database() = $this->database();\n\t}",
"public function __construct()\n {\n // $this->load->database();\n\t}",
"public function init()\n { \t\n }",
"function __construct()\n\t{\n\t\t$this->load->database();\n\t}",
"function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->database();\n }",
"private function __construct()\n {\n if (is_null(self::$ci)) {\n self::$ci = & get_instance();\n }\n\n self::$ci->load->library('Excel');\n }",
"public function __construct()\n {\n $this->CI =& get_instance();\n\n $this->CI->config->load('modules/auth/config');\n $this->CI->config->load('modules/users/config');\n }",
"public function __construct() {\n $this->CI = & get_instance();\n $this->CI->load->helper('directory');\n log_message('info', 'Imagelib Class Initialized');\n }",
"function __construct () {\r\r\n\t\tparent::__construct();\r\r\n\t\t\r\r\n\t\t$this->CI->load->library(SYSPATH . \"tools/web_opener\");\r\r\n\t}",
"function __construct() {\n parent::__construct();\n\t\t$this->load->database();\n\t\t$ci = get_instance();\n\t\t$ci->load->helper('string');\n }",
"public function __construct()\n\t{\n\t\t$this->ci &= get_instance();\n\t\t\n\t\treturn $this;\n\t}",
"function __construct() {\r\n parent::__construct();\r\n $this->load->database();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n $this->load->database();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n $this->load->database();\r\n }",
"public function __construct()\n {\n parent::__construct(); // Construct CI's core so that you can use it\n\n $this->load->database();\n }",
"function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->database();\n\t}",
"public function __construct() {\n // $this->load->database(); \n }",
"function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// $this->load->database();\n\t}",
"public function init() {\t\t\n\n }",
"function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->helper(\"url\");\n\t\t$this->load->database();\n\t}",
"function __construct()\n {\n parent::__construct();\n\t\t\n\t\t$this->load->database();\n }",
"public function __construct() {\r\n $this->session = ci('load')->library('session')->session;\r\n $this->authentication = ci('load')->model('social/authentication_m')->authentication_m;\r\n }",
"public function init(){\n\t\t\t\t}",
"public function __construct()\n {\n $this->migration_config = $this->load->get_library_config('migration');\n $this->migration_error = array();\n\n $CI =& get_instance();\n $this->load->database();\n $this->load->dbforge();\n }",
"function __construct(){\n \t$this->_ci =& get_instance();\n \t//Include the user_model so we can use it\n\t\t$this->_ci->load->model('Menu_model');\n }",
"public function __construct(){\n $this::init();\n }",
"public function __construct(){\n $this->init();\n }",
"public function __construct()\n\t{ \t\t\n\t\t$this->common = new CommonController();\n\t}",
"public function __construct()\n\t{ \t\t\n\t\t$this->common = new CommonController();\n\t}",
"public function __construct()\r\n {\r\n $this->load->database();\r\n }",
"public function __construct() {\n\t\t$this->load->database();\n\t}",
"public function init()\n {\n \t\n }",
"public function init()\n {\n \t\n }",
"public function __construct()\n {\n $this->init();\n }",
"public function __construct()\n {\n $this->init();\n }",
"public function __construct() {\n parent::__construct();\n //$this->load->database();\n }",
"public function init(){\n\t\t\n\t}",
"function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->database();\n\t}",
"function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->database();\r\n }",
"function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->database();\r\n }",
"function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->database();\r\n }",
"public function init(){\n\t\t}"
] | [
"0.83183616",
"0.82485515",
"0.8189965",
"0.81561106",
"0.81559265",
"0.81559265",
"0.8152424",
"0.813686",
"0.81122595",
"0.81122595",
"0.8112081",
"0.8011267",
"0.80102533",
"0.79955953",
"0.79292023",
"0.79267794",
"0.7855327",
"0.77943444",
"0.7783894",
"0.75914556",
"0.75846183",
"0.7501521",
"0.74908334",
"0.7370199",
"0.73113644",
"0.7304324",
"0.7302478",
"0.72741103",
"0.7211138",
"0.7195161",
"0.716912",
"0.71504617",
"0.71482986",
"0.71140397",
"0.7111909",
"0.7110629",
"0.70924336",
"0.7091536",
"0.70819825",
"0.70815384",
"0.7067903",
"0.70663625",
"0.70465386",
"0.70432913",
"0.7042892",
"0.70219946",
"0.69976175",
"0.6993305",
"0.69771266",
"0.69590837",
"0.6957882",
"0.6946985",
"0.69421107",
"0.69408995",
"0.69381994",
"0.69226396",
"0.6908406",
"0.6908142",
"0.6899077",
"0.68960285",
"0.6878505",
"0.68783283",
"0.6871804",
"0.68694556",
"0.6867827",
"0.68665797",
"0.6864658",
"0.686252",
"0.68618596",
"0.68603057",
"0.6860095",
"0.6860095",
"0.6860095",
"0.6859366",
"0.68567324",
"0.68559",
"0.6850268",
"0.68473125",
"0.6841669",
"0.6837529",
"0.6837197",
"0.6836484",
"0.68339723",
"0.68338156",
"0.68316174",
"0.6829646",
"0.68212384",
"0.68212384",
"0.68196917",
"0.6816408",
"0.6815358",
"0.6815358",
"0.68110806",
"0.68110806",
"0.68098974",
"0.68083876",
"0.68082434",
"0.680803",
"0.680803",
"0.680803",
"0.6805636"
] | 0.0 | -1 |
Write out as the new file | public function save($path) {
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
$objWriter->save($path);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function writeFile()\n {\n $this->eof();\n\n return parent::writeFile();\n }",
"public function write($filename);",
"public function write($filename);",
"public function write(){\n\n\t\t$ACHFile = fopen($this->getFileLocation(), \"w\");\n\t\tfwrite($ACHFile, $this->getData());\n\t\tfclose($ACHFile);\n\n\t\treturn $this->getFileLocation();\t\n\t}",
"abstract public function writeFile( $fileName );",
"public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }",
"public function saveToFile() {\n\n $file = $this->getExtractedFile();\n\n $file->close();\n\n $this->extractedFile = false;\n }",
"public function writeAndClose();",
"public function WriteFiles()\n {\n $popdata = \"\\$pop = \" . var_export($this->population, true) . \";\\n\";\n $popdata .= \"\\$names = \" . var_export($this->names, true) . \";\\n\";\n file_put_contents(\"population.txt\", $popdata);\n \n file_put_contents(\"fitness.txt\", \"\\$fitness = \" . var_export($this->fitness, true) . \";\");\n \n $state_data = \"\\$generation = \" . var_export($this->generation, true) . \";\\n\";\n $state_data .= \"\\$memory = \" . var_export($this->memory, true) . \";\\n\";\n $state_data .= \"\\$strains = \" . var_export($this->strains, true) . \";\\n\";\n $state_data .= \"\\$lastname = \" . var_export($this->lastname, true) . \";\\n\";\n file_put_contents(\"ga_state.txt\", $state_data);\n }",
"public function write();",
"public function write();",
"public function write() {\n\t\tcopy($this->_path, str_replace('.css', getDatetime(time(), 'Y-m-d_H-i-s') . '.css', $this->_path));\n\t\t$cssData = preg_replace('/\\/\\*\\* @_START_@ \\*\\/(.*?)\\/\\*\\* @_END_@ \\*\\//s', '/** @_START_@ */\n' . $this->toString() . '\n/** @_END_@ */', $this->_fileContent);\n\t\tfile_put_contents($this->_path, $cssData);\n\t}",
"protected function write()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path);\n }\n\n file_put_contents($this->file, json_encode([\n 'network' => $this->network,\n 'epoch' => static::$epoch,\n 'iteration' => static::$iteration,\n 'a' => $this->a,\n 'e' => $this->e\n ]));\n }",
"protected function _writeFileHeader() {}",
"protected function _write() {}",
"public function write($filename)\n {\n // TODO: Implement write() method.\n }",
"public function writeFile($data);",
"public function writeOutDefinitions()\n {\n $handle = fopen($this->filename, 'w');\n fwrite($handle, $this->__toString());\n fclose($handle);\n }",
"protected function _writeFileBody() {}",
"protected function writeProjectFile()\r\n\t{\r\n\t\t//override to implement the parsing and file creation.\r\n\t\t//to add a new file, use: $this->addFile('path to new file', 'file contents');\r\n\t\t//echo \"Create Project File.\\r\\n\";\r\n\t}",
"public function writeToFile($data){\t\n\t\tfwrite($this->fptr,$data);\n\t}",
"public function write_file ( $content ) {\r\n\r\n\t}",
"public function write_file() {\r\n\r\n\t\t$css = av5_styles( false );\r\n\r\n\t\t// If the folder doesn't exist, create it.\r\n\t\tif ( ! file_exists( $this->get_path( 'folder' ) ) ) {\r\n\t\t\twp_mkdir_p( $this->get_path( 'folder' ) );\r\n\t\t}\r\n\r\n\t\t$filesystem\t = $this->get_filesystem();\r\n\t\t$write_file\t = (bool) $filesystem->put_contents( $this->get_path( 'file' ), $css );\r\n\t\tif ( $write_file ) {\r\n\t\t\t$this->updated_file();\r\n\t\t}\r\n\t\treturn $write_file;\r\n\t}",
"private function _write_this_file()\n\t{\n\t\t$this->_skip = false;\n\t\t$this->_found = false;\n\n\t\t// A directory may need to be created\n\t\tif (strpos($this->_current['filename'], '/') !== false && !$this->single_file)\n\t\t{\n\t\t\tmktree($this->destination . '/' . dirname($this->_current['filename']));\n\t\t}\n\n\t\t// Is this the file we're looking for?\n\t\tif ($this->single_file && ($this->destination === $this->_current['filename'] || $this->destination === '*/' . basename($this->_current['filename'])))\n\t\t{\n\t\t\t$this->_found = $this->_current['data'];\n\t\t}\n\t\t// If we're looking for another file, keep going.\n\t\telseif ($this->single_file)\n\t\t{\n\t\t\t$this->_skip = true;\n\t\t}\n\t\t// Looking for restricted files?\n\t\telseif ($this->files_to_extract !== null && !in_array($this->_current['filename'], $this->files_to_extract))\n\t\t{\n\t\t\t$this->_skip = true;\n\t\t}\n\n\t\t// Write it out then\n\t\tif ($this->_check_header_crc() && !$this->_skip && $this->_found === false)\n\t\t{\n\t\t\tpackage_put_contents($this->destination . '/' . $this->_current['filename'], $this->_current['data']);\n\t\t}\n\t}",
"public function write()\n {\n }",
"abstract protected function _write();",
"function output($file)\n {\n $fp=fopen($file,\"w\");\n fwrite($fp,$this->file());\n fclose($fp);\n\t\t\n\t\theader(\"Pragma: public\");\n\t\theader(\"Expires: 0\");\n\t\theader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n\t\theader(\"Cache-Control: private\",false);\n\t\theader(\"Content-Type: application/zip\");\n\t\theader(\"Content-Disposition: attachment; filename=\".basename($file).\";\" );\n\t\theader(\"Content-Transfer-Encoding: binary\");\n\t\theader(\"Content-Length: \".filesize($file));\n\t\treadfile(\"$file\");\n\t\t@unlink($file); \n }",
"public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }",
"function write_file($opt,$xml)\n {\n if ($opt->write_to_file) { //write to file\n if (($out_file = fopen($opt->out_filename, \"w\")) === false) {\n err(\"Could not open file $opt->out_filename\",3);\n }\n if ((fwrite($out_file,$xml->outputMemory(TRUE))) === false){\n err(\"Could not write to file\",3);\n }\n if (!fclose($out_file)) {\n err(\"Could not close the file\",3);\n }\n }\n else fwrite(STDOUT,$xml->outputMemory(TRUE)); //write to stdout\n\n }",
"abstract protected function write();",
"function write_file($my_file,$new_content){\n\treturn file_put_contents($my_file,$new_content);\n}",
"public function setOutputFile($file);",
"public function write()\n\t{\n\t\t$source = $this->compile();\n\n\t\t// file location\n\t\t$file = $this->template->getEnvironment()->getCache() . '/';\n\t\t$file .= $this->template->getEnvironment()->getCacheFilename($this->filename);\n\n\t\t// attempt to create the directory if needed\n\t\tif(!is_dir(dirname($file)))\n\t\t{\n\t\t\tmkdir(dirname($file), 0777, true);\n\t\t}\n\n\t\t// write to tempfile and rename\n\t\t$tmpFile = tempnam(dirname($file), basename($file));\n\t\tif(@file_put_contents($tmpFile, $source) !== false)\n\t\t{\n\t\t\tif(@rename($tmpFile, $file))\n\t\t\t{\n\t\t\t\tchmod($file, 0644);\n\t\t\t}\n\t\t}\n\t}",
"public function writeToFile() {\n $this->offset = ftell($this->file); //Save the file pointer\n $this->headerSize = 12;\n $this->size = 108;//count up all the fields\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->size); //Write the box size place holder for now\n \\Flare\\Common\\ByteUtils::writeChars($this->file, $this->boxType); //Write the box type\n \n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->version); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[0]); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[1]); //Write the box version\n \\Flare\\Common\\ByteUtils::writeUnsignedByte($this->file, $this->flags[2]); //Write the box version //12 bytes so far\n \n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->creationTime); //Write the creation time\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->modificationTime); //Write the creation time\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->timeScale); //Write the timeScale\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->duration); //Write the duration //28 bytes\n \n \\Flare\\Common\\ByteUtils::writeFixed16_16($this->file, $this->rate); //Later Change this to the fixed point - 32 Bytes\n \n \\Flare\\Common\\ByteUtils::writeFixed8_8($this->file, $this->volume); //34 bytes\n \\Flare\\Common\\ByteUtils::padBytes($this->file, 10); //44 bytes\n //+3 \n \n $this->writeMatrix(); // 80 bytes\n \n \n \\Flare\\Common\\ByteUtils::padBytes($this->file, 4*6); //104\n \\Flare\\Common\\ByteUtils::writeUnsignedInteger($this->file, $this->nextTrackID); //108\n \n\n \n }",
"public function writeFile()\n {\n if (!empty($this->fileName)) {\n if (!file_exists($this->destinationPath)) {\n mkdir($this->destinationPath, 0777);\n }\n $file = $this->file();\n $fileHandle = fopen($file, 'w+');\n fwrite($fileHandle, $this->body);\n fclose($fileHandle);\n return $file;\n } else {\n return false;\n }\n }",
"public function write()\n {\n echo 'file log write...';\n }",
"public function writeFile($filename)\n {\n $this->file->writePoFile($filename);\n }",
"public function save()\n {\n return $this->write($this->filename, $this->sections);\n }",
"function write($fileName)\n {\n $fd = fopen ($fileName, \"w\");\n fwrite($fd, $this->content);\n fclose ($fd);\n }",
"function writeFile($res,$loc){\n $f = fopen($loc,'r+');\n fwrite($f,$res);\n ftruncate($f,strlen($res));\n fclose($f);\n}",
"private function output( $output )\n {\n file_put_contents( $this->filePath, $output, FILE_APPEND );\n }",
"function WriteTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"w+\");\n fwrite($fh, $this->_props['RequestToken']);\n fclose($fh);\n }\n }",
"public function write()\n {\n $handle = fopen('data.csv', 'wb+');\n\n // write to output\n fputcsv($handle, [\n $this->user->getFirstname() . ' ' . $this->user->getLastname(),\n $this->user->getCountry(),\n $this->user->getEmail(),\n $this->user->getPhone(),\n ], ';', '\"');\n\n fclose($handle);\n }",
"function put_json_output()\n\t{\n\t\tif(!file_exists(\"employee_wage_output.json\"))\n\t\t{\n\t\t\ttouch(\"employee_wage_output.json\");\t\t\t//Creating file if not exists\n\t\t\t$json_file=\"employee_wage_output.json\";\t\t//Getting filename into variable\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$json_file=\"employee_wage_output.json\";\t\t//Getting filename into variable\n\t\t}\n\t\t//Getting old data from file\n\t\t$old_json_data = file_get_contents($json_file);\n\n\t\t//Checking if is not empty\n\t\tif($old_json_data!=null)\n\t\t{\n\t\t\t//Merging old data with new data\n\t\t\t$old_data = json_decode($old_json_data);\n\t\t\tarray_push($old_data, $this->employee_data);\n\n\t\t\t//Converting data into json format\n\t\t\t$json_data = json_encode($old_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Converting data into json format\n\t\t\t$json_data = json_encode($this->employee_data);\n\t\t}\n\t\t\n\t\t//Putting json data into output file\n\t\tfile_put_contents($json_file, $json_data);\n\n\t}",
"protected function writeSitemap()\n {\n $this->mOutput->writeln(__METHOD__);\n\n //generate the other sitemaps\n $lRenderParams = array();\n $lRenderParams[\"urls\"] = $this->mCurrentSitemap;\n $lRenderParams[\"serverName\"] = \"http://\" . $this->mServerName;\n $lResult = $this->getContainer()->get('templating')->render('WegeooWebsiteBundle:Default:sitemap.xml.twig', $lRenderParams);\n //$output->writeln($lResult);\n\n $lSitemapPath = sprintf(\"%s/sitemap%s.xml\" , self::SITEMAP_DIRECTORY , $this->mNumSitemaps++);\n $lSuccess = file_put_contents($lSitemapPath , $lResult);\n if ( $lSuccess !== FALSE)\n {\n $this->mOutput->writeln(sprintf(\"Sitemap '%s' Successfully Created\" , basename($lSitemapPath)));\n }else{\n $this->mOutput->writeln(\"ERROR: Sitemapindex '%s' not Created\" , basename($lSitemapPath));\n }\n }",
"protected function writeToExportFile(string $text, bool $newFile = false)\n {\n if ($newFile) {\n $this->currentFileNumber++;\n }\n\n return file_put_contents(\n sprintf($this->absoluteExportFilePath, $this->currentFileNumber),\n $text,\n $newFile ? 0 : FILE_APPEND\n );\n }",
"public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }",
"private function output_file() {\n\t\t$file = wp_json_encode( $this->get_info(), JSON_PRETTY_PRINT );\n\t\theader( 'Content-Description: File Transfer' );\n\t\theader( 'Content-Type: application/octet-stream' );\n\t\theader( 'Content-Disposition: attachment; filename=\"ep-troubleshoot.json\"' );\n\t\theader( 'Expires: 0' );\n\t\theader( 'Cache-Control: must-revalidate' );\n\t\theader( 'Pragma: public' );\n\t\theader( 'Content-Length: ' . strlen( $file ) );\n\t\techo $file;\n\t\texit;\n\t}",
"public function save(IO\\File $file) {\n\t\t\tfile_put_contents($file, $this->render());\n\t\t\t$this->file = $file;\n\t\t}",
"protected function save()\n {\n return file_put_contents($this->outputPath() . '/' . $this->outputFile(), $this->stub); \n }",
"public function export($file);",
"public function writeRevision()\n {\n $locRev = $this->git->localRevision();\n $temp = tempnam(sys_get_temp_dir(), 'gitRevision');\n\n file_put_contents($temp, $locRev);\n ftp_put($this->connection, $this->revisionFile, $temp, FTP_BINARY);\n unlink($temp);\n }",
"private\tfunction _writeOutput($filename, $data) {\n\t\tjimport('joomla.filesystem.archive');\n\t\tjimport('joomla.filesystem.file');\n\n\t\t$params = JComponentHelper::getParams('com_j2store');\n\t\t$default_save_path = JPATH_ADMINISTRATOR.'/components/com_j2store/backup';\n\t\t$save_path = $params->get('backupfolderpath', $default_save_path);\n\n\t\t$full_file_path = $save_path.'/'.$filename;\n\t\tif(!JFile::exists($full_file_path)){\n\t\t\tJFile::write(JPath::clean($save_path).'/'.$filename, $data);\n\t\t}\n\n\t}",
"public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}",
"public function save()\n {\n App::cliLog(\"Saving to $this->format file\", false);\n\n try {\n call_user_func([$this, 'export' . ucfirst($this->format)]);\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }",
"public function writeTo($fh) {\n\t\tfwrite($fh,$this->getResultingString());\n\t}",
"protected function outPutTmpFile() {\r\n\t\t$dir = XOOPS_TRUST_PATH.'/tmp';\r\n\t\t$path = $dir.'/'.mt_rand().\"_\".time().'_collabtrans.xml';\r\n\t\t$fp = fopen($path, \"w\");\r\n\t\tfwrite($fp, $this -> toXML());\r\n\t\tfclose($fp);\r\n\r\n\t\treturn $path;\r\n\t}",
"public function save()\n {\n return file_put_contents($this->getFilepath(), $this->read());\n }",
"function write_output_file($result = array()){\n\t\t$myFile= \"/home/hvn0220437/supercleaner.info/public_html/output.txt\";\n\t\t$fh = fopen($myFile, 'a') or die(\"Cannot append output file\");\t\t\n\t\t$time = date('H:i:s');\n\t\tif($result['message_id'] != \"\"){\n\t\t\t$newOutput = \"[ \".$time.\" ]\".\" Success!The message id is:\".$result['message_id'].\"<br>\";\n\t\t}else{\n\t\t\t$newOutput = \"[ \".$time.\" ]\".\" API fail!\".\"<br>\";\n\t\t}\n\t\tfwrite($fh, $newOutput);\n\t\tfclose($fh);\n\t}",
"public function EndOB() {\n echo '</sitemapindex>';\n $ob_content = ob_get_contents();\n ob_end_flush();\n\n // Get the new file name, Add the file name sequence\n $this->file_nameseq++;\n $filename = \"./\" . $this->file_nameprefix . '-' . $this->file_nameseq . \".xml\";\n // Write the file. Any existing file will be overwritten.\n file_put_contents($filename, $ob_content);\n }",
"public function close()\n {\n $this->flush();\n $this->out->close();\n }",
"function toFile($fileName = 'export.xml'){\n\t\t\tif($content = $this->process()){\n\t\t\t\t$fp = fopen($fileName,'w');\n\t\t\t\tfwrite($fp,$content);\n\t\t\t\tfclose($fp);\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\ttrigger_error(\"An error occured during XML Data generation\",1);\n\t\t\t}\t\t\t\n\t\t}",
"public function export() {\n\t\tif ( ! $this->can_export() ) {\n\t\t\twp_die(\n\t\t\t\t__( 'You do not have permission to export data.', 'affiliate-wp' ),\n\t\t\t\t__( 'Error', 'affiliate-wp' ),\n\t\t\t\tarray( 'response' => 403 )\n\t\t\t);\n\t\t}\n\n\t\t// Set headers.\n\t\t$this->headers();\n\n\t\t$file = $this->get_file();\n\n\t\t@unlink( $this->file );\n\n\t\techo $file;\n\n\t\tdie();\n\t}",
"public function write($file, $content, $overwrite = true){\n\t}",
"public function flush()\n {\n $f = fopen($this->file, 'w');\n\n foreach ($this->duplicates as $hash => $similarFiles) {\n $lines = implode(\"\\r\\n\", $similarFiles) . \"\\r\\n\\r\\n\";\n fwrite($f, $lines);\n }\n\n fclose($f);\n }",
"public function export()\n {\n if (! is_dir($this->_outputDir)) {\n mkdir($this->_outputDir, 0775, true);\n }\n\n foreach ($this->_metadata as $metadata) {\n // In case output is returned, write it to a file, skip otherwise\n $output = $this->exportClassMetadata($metadata);\n if ($output) {\n $path = $this->_generateOutputPath($metadata);\n $dir = dirname($path);\n if (! is_dir($dir)) {\n mkdir($dir, 0775, true);\n }\n\n if (file_exists($path) && ! $this->_overwriteExistingFiles) {\n throw ExportException::attemptOverwriteExistingFile($path);\n }\n\n file_put_contents($path, $output);\n chmod($path, 0664);\n }\n }\n }",
"private function _export() {\r\n $file = $this->writeJSON('load');\r\n if(file_exists($file)) {\r\n header('Content-Description: File Transfer');\r\n header('Content-Type: application/octet-stream');\r\n header('Content-Disposition: attachment; filename='.basename($file));\r\n header('Content-Transfer-Encoding: binary');\r\n header('Expires: 0');\r\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\r\n header('Pragma: public');\r\n header('Content-Length: ' . filesize($file));\r\n ob_clean();\r\n flush();\r\n readfile($file);\r\n exit;\r\n }\r\n }",
"function file_write ($filename, $data) {\r\n $fd = fopen($filename, 'w') or die(\"Can't open file $filename for write!\");\r\n fwrite($fd, $data);\r\n fclose($fd);\r\n }",
"public function FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}",
"public function write($filename)\n {\n if (count($this) == 0) return;\n $file = fopen($filename, 'w');\n fwrite($file, $this->toJson());\n fclose($file);\n unset($file);\n }",
"function write()\n {\n }",
"function write_file($opt, $contents)\n{\n if (is_writable($opt)) \n {\n if (!$open = fopen($opt, \"w\")) \n {\n exit_program(\"Cannot write to file\\n\", code_error::error_write_file);\n }\n }\n else \n {\n $open = fopen($opt, \"x\");\n }\n fwrite($open, $contents);\n fclose($open);\n return;\n\n}",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"public function EndOB() {\n if ($this->counter < 1) {\n return;\n }\n\n echo '</urlset>';\n $ob_content = ob_get_contents();\n ob_end_flush();\n // Add the file name sequence, Get the new file name\n $this->file_nameseq++;\n $filename = \"./\" . self::GetSitemapFilename($this->file_nameprefix, $this->file_nameseq);\n // Write the file. Any existing file will be overwritten.\n file_put_contents($filename, $ob_content);\n }",
"public function write_file() {\n\n\t\t$css = array();\n\t\t$configs = Kirki::$config;\n\t\tforeach ( $configs as $config_id => $args ) {\n\t\t\t// Get the CSS we want to write.\n\t\t\t$css[ $config_id ] = apply_filters( \"kirki/{$config_id}/dynamic_css\", Kirki_Modules_CSS::loop_controls( $config_id ) );\n\t\t}\n\t\t$css = implode( $css, '' );\n\n\t\t// Minimize the CSS a bit.\n\t\t$css = str_replace( array( \"\\n\", \"\\t\", \"\\r\\n\" ), '', $css );\n\t\t$css = str_replace( array( '{ ', '{ ', '{ ' ), '{', $css );\n\t\t$css = str_replace( ': ', ':', $css );\n\t\t$css = str_replace( array( '; ', '; ', '; ' ), ';', $css );\n\t\t$css = explode( '}', $css );\n\t\t$css = array_unique( $css );\n\t\t$css = implode( $css, '}' );\n\n\t\t// If the folder doesn't exist, create it.\n\t\tif ( ! file_exists( $this->get_path( 'folder' ) ) ) {\n\t\t\twp_mkdir_p( $this->get_path( 'folder' ) );\n\t\t}\n\n\t\t$filesystem = $this->get_filesystem();\n\t\t$write_file = (bool) $filesystem->put_contents( $this->get_path( 'file' ), $css );\n\t\tif ( ! $write_file ) {\n\t\t\t$this->fallback = true;\n\t\t\tset_transient( 'kirki_css_write_to_file_failed', true, HOUR_IN_SECONDS );\n\t\t}\n\t\treturn $write_file;\n\n\t}",
"abstract public function write($file, $blocks);",
"public function write(string $file, string $content): void;",
"function generate_json_file() {\n // Open new file to write\n $json_file = new SplFileObject(\"../CCNiceAudioFiles.json\", \"w\");\n $json_file->fwrite(\"[\\n\");\n\n // Retrieve all non new entries from the database\n $result = $this->get_list_of_published_files();\n\n // For each file generate json entry to be used for presentation\n foreach( $result as $i ){\n\n unset($i['newfile']);\n unset($i['flaggedfile']);\n unset($i['flagcomment']);\n unset($i['md5_sign']);\n unset($i['publishedfile']);\n unset($i['translated']);\n unset($i['downloads']);\n unset($i['filepath']);\n\n $readable_size = $this->convert_file_size($i['size']);\n $i['size'] = $readable_size;\n\n $json_file->fwrite(json_encode($i) . \",\\n\");\n }\n\n $json_file->fseek(-2, SEEK_CUR);\n\n $json_file->fwrite(\"\\n]\");\n $json_file = null;\n\n return;\n }",
"protected function createFile() {}",
"public function toFile($fileName) {\r\n\r\n $f=fopen($fileName,'w');\r\n if($f==false)\r\n {\r\n die(\"Unable to create file\");\r\n }\r\n else\r\n {\r\n if (file_exists($fileName)) { \r\n $str = SerializeManager::instance()->serializeObject($this->chart);\r\n fwrite($f, $str);\r\n fclose($f); \r\n }\r\n else\r\n {\r\n $str = SerializeManager::instance()->serializeObject($this->chart);\r\n fwrite($f, $str);\r\n fclose($f); \r\n }\r\n } \r\n }",
"private function writeFile($stub)\n {\n $this->files->put($this->path, $stub);\n }",
"private function writeToFile($data){\n \n $fp = fopen('../../json/results.json', 'w');\n fwrite($fp, json_encode($data));\n fclose($fp);\n \n }",
"public function save(): void\n {\n foreach ($this->getChunks() as $chunk) {\n $this->getFile()->seek(0, SeekType::SEEK_END);\n $chunk->setOffset($this->getFile()->tell() / 4096);\n $chunkData = $chunk->getChunkData();\n $this->getFile()->write($chunkData);\n $this->getFile()->seek($this->calcOffset($chunk->getCoordinates()),\n SeekType::SEEK_SET\n );\n $chunkLocation = $chunk->getLocation();\n $this->getFile()->write($chunkLocation);\n }\n }",
"public function openWrite() {\r\n return new FileStream($this->fullName());\r\n }",
"protected function writeFile()\n {\n $sFullPath = self::LOG_PATH . $this->_sIp . '.log';\n file_put_contents($sFullPath, $this->_sContents, FILE_APPEND);\n return $this;\n }",
"function newFile($fileName, $items){\n $handle = fopen($fileName, 'w');\n //foreach loop to write each new array item\n foreach ($items as $listItem) {\n //write each item into the file name you entered\n fwrite($handle, $listItem . PHP_EOL);\n }\n echo 'file saved' . PHP_EOL;\n fclose($handle);\n}",
"public function make_json_file()\n\t{\n\t\t$json_file = fopen('recipes.json', 'w');\n\t\tfwrite($json_file, $this->json_result);\n\t\tfclose($json_file);\t\n\t}",
"protected function writeSitemapIndex()\n {\n //Generate the sitemapIndex\n $lRenderParams = array();\n $lRenderParams[\"numSitemaps\"] = $this->mNumSitemaps;\n $lRenderParams[\"serverName\"] = \"http://\" . $this->mServerName;\n $lResult = $this->getContainer()->get('templating')->render('WegeooWebsiteBundle:Default:sitemapIndex.xml.twig', $lRenderParams);\n\n //export sitemap index\n $lSitemapIndexPath = sprintf(\"%s/sitemap.xml\" , self::SITEMAP_DIRECTORY);\n $lSuccess = file_put_contents($lSitemapIndexPath , $lResult);\n if ( $lSuccess !== FALSE)\n {\n $this->mOutput->writeln(\"Sitemap 'sitemap.xml' Successfully Created\");\n }else{\n $this->mOutput->writeln(\"ERROR: Sitemapindex 'sitemap.xml' not Created\");\n }\n }",
"public function testWriteFile() {\n\t\t$filename = 'test.json';\n\t\t$filestream = 'maryhad';\n\t\ttextus_put_file($filename, $filestream);\n\t}",
"public function write_to_file($file, $question, $input)\n\t{\n\t\t$file = fopen($file, \"a\") or die(\"Unable to open file!\");\n\t\t//open a file in assessments folder \n\n\t\tif($file!=NULL)\n\t\t//file opened successfully\n\t\t{\t\n\t\t\t$str=$question.\"^\".$input.\"\\n\";\n\t\t\t//create string to be written\n\t\t\tfwrite($file, $str);\n\t\t\t//write to assemsent file\n\t\t\tfclose($file);\n\t\t\t//close assessment file\n\t\t\treturn true;\n\t\t\t//write successful\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t\t//write not successful\n\t\t}\n\t}",
"protected function filewrite($data = NULL) {\n ob_start();\n print_r($data);\n $c = ob_get_clean();\n $fc = fopen('txtfile' . DS . 'data.txt', 'w');\n fwrite($fc, $c);\n fclose($fc);\n }",
"public function writeFile($path, $data);",
"public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }",
"protected function output($text) {\n fwrite($this->file, $text);\n }",
"private function writeCurrenciesToFile() {\n createFile(\n \"currencies.xml\",\n $this->currencies[0]->asXML()\n );\n }",
"private function writeFile($type) {\n if (!is_dir($GLOBALS['currentUser'] -> user['directory'].\"/temp\")) {\n mkdir($GLOBALS['currentUser'] -> user['directory'].\"/temp\", 0755);\n }\n file_put_contents($GLOBALS['currentUser'] -> user['directory'].\"/temp/efront_\".$type.\".csv\", implode(\"\\n\", $this -> lines));\n $file = new EfrontFile($GLOBALS['currentUser'] -> user['directory'].\"/temp/efront_\".$type.\".csv\");\n return $file;\n }",
"public function saveToFile($file)\n {\n \n }",
"protected function connectOutput()\n {\n $this->output_handle = fopen($this->output_filepath, 'w');\n }",
"protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }",
"protected function end() {\n\t\tfclose($this->inputFileHandle);\n\t\tfclose($this->outputFileHandle);\n\t\tunlink($this->tempOutputFile);\n\t}",
"protected function writeView()\n {\n $view = $this->getView();\n\n $path = $this->unitPath('Resources/views').'/'.str_replace('.', '/', 'components.'.$view);\n\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n\n file_put_contents(\n $path.'.blade.php',\n '<div>\n <!-- '.Inspiring::quote().' -->\n</div>'\n );\n }"
] | [
"0.7144365",
"0.68584806",
"0.68584806",
"0.66825694",
"0.65157396",
"0.65000904",
"0.6489703",
"0.6479929",
"0.6435044",
"0.64224213",
"0.64224213",
"0.63701296",
"0.63371885",
"0.62978816",
"0.6263443",
"0.6254037",
"0.62493944",
"0.6224318",
"0.6217265",
"0.6203878",
"0.6144844",
"0.6122792",
"0.6088633",
"0.6059797",
"0.60481894",
"0.6044738",
"0.60105866",
"0.59932303",
"0.5970606",
"0.59616494",
"0.5952669",
"0.59495103",
"0.5940458",
"0.5935708",
"0.59235126",
"0.5909527",
"0.5891488",
"0.5889217",
"0.5885016",
"0.5874166",
"0.58511347",
"0.58404577",
"0.58333486",
"0.5827695",
"0.58179486",
"0.57730055",
"0.5768677",
"0.5740839",
"0.5729918",
"0.5725805",
"0.5713565",
"0.57037073",
"0.5699006",
"0.56920797",
"0.5682468",
"0.5682214",
"0.5682067",
"0.56770664",
"0.56751746",
"0.5666986",
"0.5662106",
"0.56206805",
"0.5606827",
"0.5606252",
"0.55993986",
"0.5587491",
"0.5559923",
"0.5557107",
"0.5555849",
"0.55535275",
"0.5550666",
"0.55475885",
"0.55440813",
"0.5539379",
"0.55285585",
"0.5528509",
"0.55262375",
"0.5510406",
"0.5505953",
"0.5500068",
"0.54973644",
"0.5497167",
"0.5497134",
"0.5490281",
"0.54825336",
"0.54795873",
"0.5467403",
"0.5466971",
"0.5466045",
"0.54564893",
"0.54552525",
"0.5453075",
"0.5449733",
"0.5448572",
"0.5439886",
"0.54388446",
"0.5438034",
"0.543766",
"0.5429201",
"0.54032344",
"0.5396705"
] | 0.0 | -1 |
make sure our child object has this method | public function __call($name, $arguments) {
if(method_exists($this->excel, $name)) {
// forward the call to our child object
return call_user_func_array(array($this->excel, $name), $arguments);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _ensureInheritedAttributes() {}",
"public function __construct()\n {\n //to be extended by children\n }",
"protected function childLoad() {}",
"abstract protected function doWorkChildImpl();",
"protected function parentSetup() {\n }",
"public function hasParent()\n {\n }",
"public function __wakeup() {\n _doing_it_wrong(__FUNCTION__, '', $this->parent->_version);\n }",
"public function abc(){\r\n\t\techo 'abc method from child class';\r\n\t}",
"public function __wakeup () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), $this->parent->_version );\n\t}",
"public function __wakeup () {\n\t\t_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?' ), $this->parent->_version );\n\t}",
"public function __wakeup()\n {\n _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->parent->_version);\n }",
"function __construct(){parent::__construct();}",
"public function __construct() {\n parent::__construct();\n return true;\n }",
"public function __clone() {\n _doing_it_wrong(__FUNCTION__, '', $this->parent->_version);\n }",
"public function _construct(){\n parent::_construct();\n }",
"function __construct() {\r\n parent ::__construct();\r\n }",
"public function __construct(){parent::__construct();}",
"function onBeforeCheckForParent($db, $format, &$object, &$parentObject) {\n\t}",
"protected function __construct() {\n parent::__construct();\n\t\t\n }",
"protected function __construct() {\n parent::__construct();\n\t\t\n }",
"function __construct(){\r\n parent::__construct();\r\n \r\n }",
"public function parent() { }",
"public static function check()\n {\n parent::check();\n }",
"function __construct(){\n\t\t parent::__construct();\n\t\t \n }",
"public function hasParent() {}",
"public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}",
"public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}",
"protected function __construct(){\n\t\t\tparent::__construct();\n\t\t}",
"public function _construct()\n {\n parent::_construct();\n }",
"function __construct()\r\n\t{\r\n\t parent::__construct();\r\n\t}",
"function __construct()\r\n {\r\n parent::__construct();\r\n\t\t\t\r\n }",
"function __construct()\n {\n parent::__construct();\n }",
"function __construct()\r\n {\r\n parent::__construct();\r\n }",
"function __construct()\r\n {\r\n parent::__construct();\r\n }",
"public function parent()\n {\n }",
"public function isChild(): bool;",
"public function init()\n {\n parent::init();\n }",
"protected function __construct()\n\t{\n\t\tparent::__construct();\n\t}",
"function __construct(){\r\n parent::__construct();\r\n }",
"function __construct(){\r\n parent::__construct();\r\n }",
"function __construct()\n {\n parent::__construct();\n }",
"public function __contruct(){\r\n parent::__contruct();\r\n }",
"public function isChild(): bool\n {\n return false;\n }",
"public function __clone()\n {\n _doing_it_wrong(__FUNCTION__, __('Cheatin’ huh?'), $this->parent->_version);\n }",
"function __construct()\n {\n parent::__construct();\n }",
"function __construct()\t\n\t{\r\n\t\tparent::__construct();\r\n\t}",
"function __construct()\n\t\t {\n\t\t\t parent::__construct();\n\t\t }",
"function __construct()\n\t\t {\n\t\t\t parent::__construct();\n\t\t }",
"function __construct(){\n parent::__construct(); \n }",
"protected function __construct() {\r\r\n // contain shared code in its constructor\r\r\n parent::__construct();\t\r\r\n\t}",
"public function initialize()\n {\n parent::initialize();\n\n \n }",
"public function getActiveChild()\n {\n }",
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"public function checkSubExtObj()\n {\n if (is_object($this->extObj)) {\n $this->extObj->checkExtObj();\n }\n }",
"function __construct()\n\t{\n\t\tparent::__construct();\t\n\t}",
"function __construct(){\n\t parent::__construct();\n\t}",
"public function isChildSupported();",
"function __construct() {\n parent::__construct(); \n }",
"public function __construct(){\n\t\t\tparent::__construct(); \n\t\t}",
"public function __construct()\r\n {\r\n parent::__construct();\r\n }",
"public function __construct()\r\n {\r\n parent::__construct();\r\n }",
"function __construct()\r\n {\r\n parent::__construct();\r\n\r\n }",
"public function __construct()\n {\n // Hide the parent arguments from the public signature\n parent::__construct();\n }",
"function __construct() \n {\n parent::__construct(); \n }",
"protected function _after_read(): void\n {\n //it is not supposed to be readable is the object is not readable\n //$this->get_object();//will trigger the permission denied if there is no permission to read the target object\n //TODO - add permission check\n //instantiating the object here may trigger a recursion as the object itself may be creating the alias in its _after_read\n }",
"protected function __init__() { }",
"function __construct(){\n parent::__construct();\n\n\n }",
"function __construct() \n {\n parent::__construct(); \n }",
"abstract public function inherit($parent);",
"function __construct() \n\t\t{\n\t\t\tparent::__construct();\n\t\t}",
"protected function __construct() {\n // contain shared code in its constructor\n parent::__construct();\n }",
"function __construct() {\n parent::__construct();\n }",
"function __construct() {\r\n parent::__construct();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n }",
"function __construct() {\r\n parent::__construct();\r\n }",
"function __construct(){\n parent::__construct();\n\n \t}",
"function __construct()\r\n {\r\n parent::__construct(); \r\n }",
"function __construct(){\n\t\t\n\t\tparent::__construct();\n\t\t\n\t}",
"function __construct() {\n\t\tparent::__construct();\n\t\t\n\t}",
"function __construct()\n\t{\n\t\t\tparent::__construct();\n\t}",
"function __construct(){\n\t\t// Call parent constructor\n\t\tparent::__construct();\n\t}",
"function __construct() {\r\n parent::__construct();\r\n\t}",
"function __construct() \n\t{\n\t\t parent::__construct();\n\t}",
"function __construct()\r\n {\r\n parent::__construct(); \r\n \r\n }",
"function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t}",
"private function __construct()\n {\n return false;\n }",
"function __construct() {\r\n\tparent::__construct();\r\n\r\n\t}",
"public function __construct() {\r\n\t\tparent::__construct();\t\t\r\n\t}",
"function __construct()\n {\n parent::__construct();\n }",
"function __construct()\n {\n parent::__construct();\n }",
"function __construct () {\r\n parent::__construct() ;\r\n\r\n }",
"function __construct() {\r\n \tparent::__construct();\r\n }",
"public function __construct()\n {\n //\n parent::__construct();\n }",
"function __Construct()\n {\n parent::__Construct();\n }",
"abstract public function parent();",
"function __construct() {\n\t\t\tparent::__construct();\n\t\t}",
"function __construct() {\n\t\t\tparent::__construct();\n\t\t}"
] | [
"0.6522693",
"0.64097923",
"0.6336127",
"0.6136622",
"0.60512614",
"0.60427994",
"0.6022591",
"0.5990071",
"0.59495944",
"0.59495944",
"0.59177727",
"0.5915389",
"0.5905513",
"0.5875406",
"0.58505416",
"0.5843374",
"0.583975",
"0.58356607",
"0.5815869",
"0.5815869",
"0.5803417",
"0.5798102",
"0.5796307",
"0.57845235",
"0.57692975",
"0.57600284",
"0.57600284",
"0.57585305",
"0.5754363",
"0.5739606",
"0.5722748",
"0.5721947",
"0.57210577",
"0.57210577",
"0.57190055",
"0.57162154",
"0.5713018",
"0.57102126",
"0.57098866",
"0.57098866",
"0.57084554",
"0.57067853",
"0.5706113",
"0.5696816",
"0.56967264",
"0.5693876",
"0.56906754",
"0.56906754",
"0.56888723",
"0.56886834",
"0.5688439",
"0.5676075",
"0.56755733",
"0.56755733",
"0.56642985",
"0.56636053",
"0.56635845",
"0.56619924",
"0.56496185",
"0.5649264",
"0.56490266",
"0.56490266",
"0.5646111",
"0.5644422",
"0.564388",
"0.5639167",
"0.5635196",
"0.56317234",
"0.5628359",
"0.5628149",
"0.562592",
"0.56246954",
"0.56223786",
"0.5622171",
"0.5622171",
"0.5622171",
"0.5622171",
"0.5622171",
"0.5622171",
"0.56202614",
"0.5615331",
"0.56143254",
"0.56142235",
"0.5612698",
"0.56126904",
"0.56109226",
"0.5610654",
"0.56089205",
"0.56078196",
"0.56045973",
"0.5604319",
"0.56032765",
"0.56019425",
"0.56019425",
"0.5601891",
"0.5598135",
"0.5596609",
"0.5594251",
"0.55897915",
"0.5586924",
"0.5586924"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$checkAdmin = auth()->user()->role;
$checkActive = User::where('active','=','0')->get();
$activeCount = $checkActive->count();
$task = Task::where('status','!=','X')->take(5)->get();
$call = Call::where('status','!=','X')->take(5)->get();
$countpriority = Task::where('status','I')->where('priority','4')->count();
$priority = Task::where('status','I')->where('priority','4')->get();
return view('pages.calllog.index')->with(compact('checkAdmin','activeCount','task','countpriority','priority','call'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
$checkAdmin = auth()->user()->role;
$checkActive = User::where('active','=','0')->get();
$activeCount = $checkActive->count();
$assign = User::where('position','EXECUTIVE')->get();
$task = Task::where('status','!=','X')->take(5)->get();
$call = Call::where('status','!=','X')->take(5)->get();
$countpriority = Task::where('status','I')->where('priority','4')->count();
$priority = Task::where('status','I')->where('priority','4')->get();
$checkid = Call::orderBy('id','desc')->value('id');
$newid = $checkid + 1;
return view('pages.calllog.create')->with(compact('checkAdmin','activeCount','task','countpriority','priority','call','newid','assign'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.7594873",
"0.7594873",
"0.75862724",
"0.7577369",
"0.75727355",
"0.7500874",
"0.74348205",
"0.74339336",
"0.7389178",
"0.73531044",
"0.73364365",
"0.73124814",
"0.7296061",
"0.72818893",
"0.7274119",
"0.72423935",
"0.72292763",
"0.72266877",
"0.7187332",
"0.717915",
"0.7174258",
"0.7150343",
"0.7144378",
"0.7144238",
"0.7134942",
"0.7128289",
"0.71236694",
"0.7115823",
"0.7115823",
"0.7115823",
"0.7112145",
"0.70943975",
"0.70857024",
"0.70802104",
"0.70800203",
"0.7057187",
"0.7057187",
"0.7055648",
"0.7039616",
"0.7039533",
"0.7036246",
"0.70346695",
"0.70305556",
"0.7027626",
"0.7026509",
"0.70199776",
"0.7017972",
"0.70049554",
"0.7003876",
"0.7000925",
"0.69973546",
"0.6994639",
"0.69937307",
"0.69898754",
"0.6986977",
"0.69664884",
"0.6965616",
"0.69563985",
"0.6951776",
"0.69510984",
"0.69472855",
"0.69444585",
"0.6942343",
"0.69411284",
"0.69378203",
"0.69378203",
"0.6936664",
"0.69344825",
"0.69317704",
"0.69282645",
"0.69263744",
"0.6924216",
"0.6918314",
"0.6915855",
"0.69128567",
"0.6911424",
"0.6910289",
"0.69085616",
"0.6903973",
"0.6901382",
"0.6901172",
"0.6900354",
"0.6895054",
"0.6893486",
"0.6893189",
"0.68918854",
"0.6891604",
"0.6891604",
"0.6889186",
"0.6888053",
"0.6887076",
"0.6884677",
"0.68822217",
"0.6880916",
"0.6875967",
"0.68739045",
"0.6873874",
"0.6870332",
"0.6869766",
"0.68696475",
"0.6868746"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$checkid = Call::orderBy('id','desc')->value('id');
$newid = $checkid + 1;
$this->validate($request, [
'contact_name' => ['required', 'string', 'max:50'],
'subject' => ['required', 'max:200'],
]);
$call = new Call([
'subject' => $request->get('subject'),
'description' => $request->get('description'),
'contact_name' => $request->get('contact_name'),
'contact_no' => $request->get('contact_no'),
'assign_to' => $request->get('assign_to'),
'priority' => $request->get('priority'),
'status' => 'I'
]);
$call->save();
if(!empty($request->get('remarks')))
{
$remark = new CallRemark([
'call_id' => $newid,
'user' => auth()->user()->username,
'remark' => $request->get('remarks'),
'datetime' => now()
]);
$remark->save();
}
$log = new Log([
'status' => ''.strtoupper(auth()->user()->username).' create Call Log with Subject ['.$request->get('subject').'].'
]);
$log->save();
return redirect()->route('call.index')->with('success', 'Call Log added successfully.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.7286258",
"0.71454436",
"0.7132821",
"0.6640289",
"0.6621105",
"0.6566493",
"0.65255576",
"0.65087926",
"0.6448317",
"0.63752604",
"0.63736314",
"0.6365631",
"0.6365631",
"0.6365631",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$checkAdmin = auth()->user()->role;
$checkActive = User::where('active','=','0')->get();
$activeCount = $checkActive->count();
$assign = User::where('position','EXECUTIVE')->get();
$task = Task::where('status','!=','X')->take(5)->get();
$call = Call::where('status','!=','X')->take(5)->get();
$countpriority = Task::where('status','I')->where('priority','4')->count();
$priority = Task::where('status','I')->where('priority','4')->get();
$calldata = Call::whereId($id)->first();
$remark = Call::find($id)->remark;
return view('pages.calllog.show')->with(compact('checkAdmin','activeCount','calldata','task','countpriority','assign','priority','remark','call'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }"
] | [
"0.78557473",
"0.76946205",
"0.72731614",
"0.7241571",
"0.71700776",
"0.70650244",
"0.7052897",
"0.698311",
"0.69465625",
"0.6944826",
"0.69399333",
"0.69286525",
"0.69031185",
"0.68969506",
"0.68969506",
"0.6878258",
"0.6862812",
"0.6859171",
"0.68560475",
"0.68436426",
"0.6834711",
"0.6810601",
"0.680613",
"0.6804975",
"0.68015367",
"0.6795471",
"0.6791821",
"0.6791821",
"0.6787303",
"0.6783644",
"0.67790574",
"0.67766285",
"0.6767741",
"0.67610145",
"0.67455536",
"0.67455536",
"0.6744367",
"0.6743159",
"0.6739656",
"0.67351145",
"0.67246765",
"0.67128825",
"0.6692859",
"0.66916454",
"0.6687554",
"0.66875297",
"0.6687494",
"0.6684443",
"0.668203",
"0.66689324",
"0.66680384",
"0.6664605",
"0.6664605",
"0.66621166",
"0.66604865",
"0.66589504",
"0.6655767",
"0.66542184",
"0.665213",
"0.66422516",
"0.6631665",
"0.663077",
"0.6627607",
"0.6627607",
"0.66193914",
"0.6618503",
"0.66160196",
"0.66146857",
"0.6609641",
"0.6608315",
"0.6605284",
"0.6595882",
"0.65947276",
"0.6594626",
"0.65895563",
"0.6589339",
"0.6587281",
"0.65805006",
"0.6579201",
"0.6579166",
"0.657641",
"0.6576111",
"0.65740323",
"0.65692765",
"0.6568046",
"0.6567221",
"0.6565346",
"0.6560687",
"0.6560687",
"0.6560384",
"0.65577257",
"0.65569293",
"0.65558636",
"0.6555392",
"0.65553015",
"0.65542984",
"0.655418",
"0.6554106",
"0.6547678",
"0.65473104",
"0.6543329"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
if($request->status != 'X')
{
$data = request([
'contact_no',
'contact_name',
'subject',
'description',
'status',
]);
Call::whereId($id)->update($data);
if(empty($request->get('remarks')))
{
$log = new Log([
'status' => ''.strtoupper(auth()->user()->username).' update Call Log ID ['.$id.'].'
]);
$log->save();
return redirect('call')->with('success', 'Call Log is successfully updated.');
}
else
{
$remark = new CallRemark([
'call_id' => $id,
'user' => auth()->user()->username,
'remark' => $request->get('remarks'),
'datetime' => now()
]);
//dd($remark);
$remark->save();
$log = new Log([
'status' => ''.strtoupper(auth()->user()->username).' add Remarks for Call Log ID ['.$id.'].'
]);
$log->save();
return back()->with('success', 'Remark is successfully added.');
}
}
else
{
$delete_on = now();
$delete_by = auth()->user()->username;
$request->request->add([
'delete_on' => $delete_on,
'delete_by' => $delete_by
]);
$data = request([
'contact_no',
'contact_name',
'subject',
'description',
'status',
'delete_on',
'delete_by'
]);
Call::whereId($id)->update($data);
if(empty($request->get('remarks')))
{
$log = new Log([
'status' => ''.strtoupper(auth()->user()->username).' delete Call Log ID ['.$id.'].'
]);
$log->save();
return redirect('call')->with('success', 'Call Log with ID: '.$id.' is closed permenantly.');
}
else
{
$remark = new CallRemark([
'call_id' => $id,
'user' => auth()->user()->username,
'remark' => $request->get('remarks'),
'datetime' => now()
]);
$remark->save();
$log = new Log([
'status' => ''.strtoupper(auth()->user()->username).' delete Call Log ID ['.$id.'].'
]);
$log->save();
return redirect('call')->with('success', 'Call Log with ID: '.$id.' is closed permenantly.');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"public function update($request, $id);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"abstract public function put($data);",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function put($path, $data = null);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7424884",
"0.7062319",
"0.70572054",
"0.6897199",
"0.658233",
"0.6450576",
"0.6347209",
"0.6211253",
"0.6146092",
"0.6121878",
"0.6114851",
"0.61005586",
"0.608833",
"0.60537165",
"0.60196865",
"0.60068345",
"0.5972924",
"0.594671",
"0.5940615",
"0.5938648",
"0.58927333",
"0.58618903",
"0.5855116",
"0.5855116",
"0.58517504",
"0.5816175",
"0.5807103",
"0.5753658",
"0.5753658",
"0.57354003",
"0.5724066",
"0.5714874",
"0.56957984",
"0.5692136",
"0.5688278",
"0.5670771",
"0.5656715",
"0.5651525",
"0.5647887",
"0.563695",
"0.5635239",
"0.5633743",
"0.5633203",
"0.56296664",
"0.5622203",
"0.56089646",
"0.5602395",
"0.55937296",
"0.55837464",
"0.5582684",
"0.55814886",
"0.5575469",
"0.5572433",
"0.55668694",
"0.556366",
"0.5562336",
"0.55611396",
"0.55611396",
"0.55611396",
"0.55611396",
"0.55611396",
"0.5560869",
"0.55574787",
"0.55562645",
"0.5554329",
"0.5553793",
"0.5553788",
"0.55448633",
"0.55448294",
"0.5541889",
"0.55402213",
"0.5537772",
"0.55359083",
"0.55358595",
"0.55248064",
"0.5520229",
"0.5517453",
"0.5513332",
"0.5511126",
"0.55085385",
"0.5508433",
"0.5503835",
"0.5502763",
"0.5501662",
"0.5500294",
"0.5498694",
"0.5496697",
"0.5496697",
"0.5495247",
"0.5494445",
"0.5494331",
"0.549349",
"0.5492967",
"0.5484066",
"0.5480196",
"0.5479421",
"0.54788667",
"0.546669",
"0.5464114",
"0.54621613",
"0.5458347"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Get the logged in User Id | public function index() {
$loggedUser = Sentinel::getUser();
# Get the profile of the logged in User
$profile = new UserProfile;
$profile = $profile->find($loggedUser->id);
$user = array("fullname" => $profile->fullname, "profile_type" => $profile->profile_type);
return view('Dashboard.patient.dashboard', compact('user'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_user_id();",
"public function loggedInUserId()\n\t{\n\t\treturn auth()->id();\n\t}",
"public static function getLoggedUserId()\r\n {\r\n return self::getVariable(\"login\", \"user-id\");\r\n }",
"public function getCurrentUserId();",
"public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}",
"public function get_user_id()\n {\n return self::getUser();\n }",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $userId = $CI->session->userdata('user_id');\n return $userId;\n }\n }",
"public function get_logged_in_user_id()\n\t\t{\n\t\t\treturn $this->session->userdata('usr_id');\n\t\t}",
"public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"public function getUserId() {\n\t\t$currentUser = $this->getLoggedUser();\n\t\tif ($currentUser) {\n\t\t\treturn $currentUser->getId();\n\t\t}\n\t}",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}",
"public function getUserId() {\n\t\tif ($this->logged()) {\n\t\t\treturn $_SESSION['auth']['id'];\n\t\t}\n\t\treturn false;\n\t}",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUserID () {\n return $this->id;\n }",
"public static function userId()\r\n {\r\n return (new Session())->get(static::$userIdField);\r\n }",
"function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }",
"public function getCurrentUserId()\n\t{\n\t\treturn array_key_exists('user_id', $this->session->data) ? $this->session->data['user_id'] : 0;\n\t}",
"function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }",
"public function getUserId()\n {\n return $this->authenticator->getUserId();\n }",
"public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }",
"protected function get_user_id() {\n session_start();\n \n return session_id();\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getId()\n {\n return $this->app['security']->getToken()->getUser()->getId();\n }",
"static public function getUserId(){\n if (!isset($_SESSION['id']) || empty($_SESSION['id']) ){\n return false;\n } else {\n return $_SESSION['id'];\n }\n }",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"protected function getUserId() {}",
"protected function getUserId() {}",
"public static function getCurrentUserId(){\n $user_data = parent::getSession('curent_user');\n $_get_id_user = isset($_GET['id_user']) ? $_GET['id_user'] : null;\n $_post_id_user = isset($_POST['id_user']) ? $_POST['id_user'] : null;\n return\n self::is_SuperUserSession()\n ? ($_post_id_user ? $_post_id_user : ( $_get_id_user ? $_get_id_user : $user_data['id_user'] ))\n : parent::getSession('id_user');\n }",
"public function getUserID() {\n\t\treturn $this->_user_id;\n\t}",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"protected function userId()\n {\n return Auth::id();\n }",
"public function getIdUser() \n\t{\n\t\treturn $this->idUser;\n\t}",
"public function getUserid()\n {\n if ($this->_userid === false) {\n $this->_userid = Userlogin::find()->where(['id' => Yii::$app->user->identity->id])->one();\n }\n return $this->_userid;\n }",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->id;\n }",
"public function getUserId() {\n\t\treturn $this->user_id;\n\t}",
"public function getLoggedUserId()\n {\n $user = $this->getLoggedUser();\n return $user ? $user->getId() : 0;\n }",
"public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }",
"public function getUserid()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"function get_current_user_id()\n {\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getUserId()\n {\n return $this->accessToken->user_id;\n }",
"public function getUserId()\r\n\t{\r\n\t\t$user = parent::getUser();\r\n\t\tif(!($user instanceof User))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $user->getId();\r\n\t}",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_ID);\n }",
"public function getLoggedUserId()\n {\n if (isset($this->user_data['id_user'])) {\n return intval($this->user_data['id_user']);\n } else {\n return false;\n }\n }",
"public function getUserId() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USER_ID])) {\n return $_SESSION[self::SESSION_FIELD_USER_ID];\n } else {\n return null;\n }\n }",
"public function getIduser()\n {\n return $this->iduser;\n }",
"public static function getUserId() {\n $returnValue = 0;\n if (isset($_SESSION[\"userid\"])) {\n $returnValue = $_SESSION[\"userid\"];\n }\n return $returnValue;\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public static function GetCurrentUserId() {\n try {\n $token = Helper::GetCookies('token');\n $now = new \\DateTime(date('Y-m-d H:i:s'));\n if(!isset($token) || $token == '' || $token == null) {\n return 0;\n }\n else {\n $userDB = DB::table('users')\n ->where('token', $token)\n ->where('timeout', '>=', $now)\n ->where('deleted_at', null)\n ->select('id')\n ->get()->toArray();\n if (isset($userDB) && !empty($userDB)) {\n return $userDB[0]->id;\n }\n }\n return 0;\n }\n catch(Exception $e) {\n throw $e;\n }\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUserId() {\n return $this->user === null ? null : $this->user->id;\n }"
] | [
"0.86765665",
"0.8528013",
"0.8441339",
"0.8436033",
"0.8406613",
"0.8403246",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83380324",
"0.83216953",
"0.8307371",
"0.8279631",
"0.8279631",
"0.8279631",
"0.8267831",
"0.8261604",
"0.8250956",
"0.8250956",
"0.8250956",
"0.8250618",
"0.8238226",
"0.8237993",
"0.82349026",
"0.81680304",
"0.81465477",
"0.8144766",
"0.81309074",
"0.80965436",
"0.8091492",
"0.8090127",
"0.8081372",
"0.8069374",
"0.8069374",
"0.806929",
"0.806045",
"0.8053912",
"0.8052509",
"0.8052509",
"0.805083",
"0.80507064",
"0.8042371",
"0.8033446",
"0.80331224",
"0.8029646",
"0.80230933",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.80145615",
"0.8008616",
"0.80008537",
"0.7990412",
"0.79897594",
"0.79897594",
"0.7986367",
"0.79815423",
"0.7981071",
"0.7978966",
"0.7978491",
"0.7978491",
"0.7978491",
"0.79633516",
"0.7956531",
"0.79554635",
"0.79451895",
"0.7942265",
"0.7941562",
"0.79350317",
"0.79263496",
"0.7919866",
"0.7911862",
"0.7910284",
"0.7899385",
"0.7899385",
"0.78958",
"0.78954816"
] | 0.0 | -1 |
Get the logged in User Id | public function patientAppointment() {
$loggedUser = Sentinel::getUser();
# Get the profile of the logged in User
$profile = new UserProfile;
$profile = $profile->find($loggedUser->id);
# Some info of the logged in user
$user = array("fullname" => $profile->fullname, "profile_type" => $profile->profile_type);
# Return all Doctors with their complete profile
$users = new User();
$users = $users::with('userProfile')
->whereHas('userProfile', function ($query) {
$query->where('profile_type', '=', 'doctor');
})->get();
# All Appointment
$userAppointment = Appointment::where('patient_id', '=', $loggedUser->id)->get();
return view('Dashboard.patient.appointments', compact('user', 'users', 'userAppointment'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_user_id();",
"public function loggedInUserId()\n\t{\n\t\treturn auth()->id();\n\t}",
"public static function getLoggedUserId()\r\n {\r\n return self::getVariable(\"login\", \"user-id\");\r\n }",
"public function getCurrentUserId();",
"public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}",
"public function get_user_id()\n {\n return self::getUser();\n }",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $userId = $CI->session->userdata('user_id');\n return $userId;\n }\n }",
"public function get_logged_in_user_id()\n\t\t{\n\t\t\treturn $this->session->userdata('usr_id');\n\t\t}",
"public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"public function getUserId() {\n\t\t$currentUser = $this->getLoggedUser();\n\t\tif ($currentUser) {\n\t\t\treturn $currentUser->getId();\n\t\t}\n\t}",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}",
"public function getUserId() {\n\t\tif ($this->logged()) {\n\t\t\treturn $_SESSION['auth']['id'];\n\t\t}\n\t\treturn false;\n\t}",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUserID () {\n return $this->id;\n }",
"public static function userId()\r\n {\r\n return (new Session())->get(static::$userIdField);\r\n }",
"function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }",
"public function getCurrentUserId()\n\t{\n\t\treturn array_key_exists('user_id', $this->session->data) ? $this->session->data['user_id'] : 0;\n\t}",
"function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }",
"public function getUserId()\n {\n return $this->authenticator->getUserId();\n }",
"public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }",
"protected function get_user_id() {\n session_start();\n \n return session_id();\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getId()\n {\n return $this->app['security']->getToken()->getUser()->getId();\n }",
"static public function getUserId(){\n if (!isset($_SESSION['id']) || empty($_SESSION['id']) ){\n return false;\n } else {\n return $_SESSION['id'];\n }\n }",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"protected function getUserId() {}",
"protected function getUserId() {}",
"public static function getCurrentUserId(){\n $user_data = parent::getSession('curent_user');\n $_get_id_user = isset($_GET['id_user']) ? $_GET['id_user'] : null;\n $_post_id_user = isset($_POST['id_user']) ? $_POST['id_user'] : null;\n return\n self::is_SuperUserSession()\n ? ($_post_id_user ? $_post_id_user : ( $_get_id_user ? $_get_id_user : $user_data['id_user'] ))\n : parent::getSession('id_user');\n }",
"public function getUserID() {\n\t\treturn $this->_user_id;\n\t}",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"protected function userId()\n {\n return Auth::id();\n }",
"public function getIdUser() \n\t{\n\t\treturn $this->idUser;\n\t}",
"public function getUserid()\n {\n if ($this->_userid === false) {\n $this->_userid = Userlogin::find()->where(['id' => Yii::$app->user->identity->id])->one();\n }\n return $this->_userid;\n }",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->id;\n }",
"public function getUserId() {\n\t\treturn $this->user_id;\n\t}",
"public function getLoggedUserId()\n {\n $user = $this->getLoggedUser();\n return $user ? $user->getId() : 0;\n }",
"public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }",
"public function getUserid()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"function get_current_user_id()\n {\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getUserId()\n {\n return $this->accessToken->user_id;\n }",
"public function getUserId()\r\n\t{\r\n\t\t$user = parent::getUser();\r\n\t\tif(!($user instanceof User))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $user->getId();\r\n\t}",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_ID);\n }",
"public function getLoggedUserId()\n {\n if (isset($this->user_data['id_user'])) {\n return intval($this->user_data['id_user']);\n } else {\n return false;\n }\n }",
"public function getUserId() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USER_ID])) {\n return $_SESSION[self::SESSION_FIELD_USER_ID];\n } else {\n return null;\n }\n }",
"public function getIduser()\n {\n return $this->iduser;\n }",
"public static function getUserId() {\n $returnValue = 0;\n if (isset($_SESSION[\"userid\"])) {\n $returnValue = $_SESSION[\"userid\"];\n }\n return $returnValue;\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public static function GetCurrentUserId() {\n try {\n $token = Helper::GetCookies('token');\n $now = new \\DateTime(date('Y-m-d H:i:s'));\n if(!isset($token) || $token == '' || $token == null) {\n return 0;\n }\n else {\n $userDB = DB::table('users')\n ->where('token', $token)\n ->where('timeout', '>=', $now)\n ->where('deleted_at', null)\n ->select('id')\n ->get()->toArray();\n if (isset($userDB) && !empty($userDB)) {\n return $userDB[0]->id;\n }\n }\n return 0;\n }\n catch(Exception $e) {\n throw $e;\n }\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUserId() {\n return $this->user === null ? null : $this->user->id;\n }"
] | [
"0.86765665",
"0.8528013",
"0.8441339",
"0.8436033",
"0.8406613",
"0.8403246",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83380324",
"0.83216953",
"0.8307371",
"0.8279631",
"0.8279631",
"0.8279631",
"0.8267831",
"0.8261604",
"0.8250956",
"0.8250956",
"0.8250956",
"0.8250618",
"0.8238226",
"0.8237993",
"0.82349026",
"0.81680304",
"0.81465477",
"0.8144766",
"0.81309074",
"0.80965436",
"0.8091492",
"0.8090127",
"0.8081372",
"0.8069374",
"0.8069374",
"0.806929",
"0.806045",
"0.8053912",
"0.8052509",
"0.8052509",
"0.805083",
"0.80507064",
"0.8042371",
"0.8033446",
"0.80331224",
"0.8029646",
"0.80230933",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.80145615",
"0.8008616",
"0.80008537",
"0.7990412",
"0.79897594",
"0.79897594",
"0.7986367",
"0.79815423",
"0.7981071",
"0.7978966",
"0.7978491",
"0.7978491",
"0.7978491",
"0.79633516",
"0.7956531",
"0.79554635",
"0.79451895",
"0.7942265",
"0.7941562",
"0.79350317",
"0.79263496",
"0.7919866",
"0.7911862",
"0.7910284",
"0.7899385",
"0.7899385",
"0.78958",
"0.78954816"
] | 0.0 | -1 |
Get the logged in User Id | public function patientPrescription() {
$loggedUser = Sentinel::getUser();
# Get the profile of the logged in User
$profile = new UserProfile;
$profile = $profile->find($loggedUser->id);
# Some info of the logged in user
$user = array("fullname" => $profile->fullname, "profile_type" => $profile->profile_type);
$userPrescription = Prescription::where('patient_id', '=', $loggedUser->id)->get();
return view('Dashboard.patient.prescription', compact('user', 'userPrescription'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_user_id();",
"public function loggedInUserId()\n\t{\n\t\treturn auth()->id();\n\t}",
"public static function getLoggedUserId()\r\n {\r\n return self::getVariable(\"login\", \"user-id\");\r\n }",
"public function getCurrentUserId();",
"public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}",
"public function get_user_id()\n {\n return self::getUser();\n }",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $userId = $CI->session->userdata('user_id');\n return $userId;\n }\n }",
"public function get_logged_in_user_id()\n\t\t{\n\t\t\treturn $this->session->userdata('usr_id');\n\t\t}",
"public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"public function getUserid()\n {\n return $this->get(self::_USERID);\n }",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"public function getUserId() {\n\t\t$currentUser = $this->getLoggedUser();\n\t\tif ($currentUser) {\n\t\t\treturn $currentUser->getId();\n\t\t}\n\t}",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}",
"public function getUserId() {\n\t\tif ($this->logged()) {\n\t\t\treturn $_SESSION['auth']['id'];\n\t\t}\n\t\treturn false;\n\t}",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUserID () {\n return $this->id;\n }",
"public static function userId()\r\n {\r\n return (new Session())->get(static::$userIdField);\r\n }",
"function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }",
"public function getCurrentUserId()\n\t{\n\t\treturn array_key_exists('user_id', $this->session->data) ? $this->session->data['user_id'] : 0;\n\t}",
"function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }",
"public function getUserId()\n {\n return $this->authenticator->getUserId();\n }",
"public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }",
"protected function get_user_id() {\n session_start();\n \n return session_id();\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getIdUser()\n {\n return $this->idUser;\n }",
"public function getId()\n {\n return $this->app['security']->getToken()->getUser()->getId();\n }",
"static public function getUserId(){\n if (!isset($_SESSION['id']) || empty($_SESSION['id']) ){\n return false;\n } else {\n return $_SESSION['id'];\n }\n }",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"protected function getUserId() {}",
"protected function getUserId() {}",
"public static function getCurrentUserId(){\n $user_data = parent::getSession('curent_user');\n $_get_id_user = isset($_GET['id_user']) ? $_GET['id_user'] : null;\n $_post_id_user = isset($_POST['id_user']) ? $_POST['id_user'] : null;\n return\n self::is_SuperUserSession()\n ? ($_post_id_user ? $_post_id_user : ( $_get_id_user ? $_get_id_user : $user_data['id_user'] ))\n : parent::getSession('id_user');\n }",
"public function getUserID() {\n\t\treturn $this->_user_id;\n\t}",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"protected function userId()\n {\n return Auth::id();\n }",
"public function getIdUser() \n\t{\n\t\treturn $this->idUser;\n\t}",
"public function getUserid()\n {\n if ($this->_userid === false) {\n $this->_userid = Userlogin::find()->where(['id' => Yii::$app->user->identity->id])->one();\n }\n return $this->_userid;\n }",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->id;\n }",
"public function getUserId() {\n\t\treturn $this->user_id;\n\t}",
"public function getLoggedUserId()\n {\n $user = $this->getLoggedUser();\n return $user ? $user->getId() : 0;\n }",
"public function getUserIdentifier()\n {\n // that's why I am sending the id here\n return $this->id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }",
"public function getUserid()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"function get_current_user_id()\n {\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getIdUser()\n {\n return $this->id_user;\n }",
"public function getUserId()\n {\n return $this->accessToken->user_id;\n }",
"public function getUserId()\r\n\t{\r\n\t\t$user = parent::getUser();\r\n\t\tif(!($user instanceof User))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $user->getId();\r\n\t}",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_ID);\n }",
"public function getLoggedUserId()\n {\n if (isset($this->user_data['id_user'])) {\n return intval($this->user_data['id_user']);\n } else {\n return false;\n }\n }",
"public function getUserId() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USER_ID])) {\n return $_SESSION[self::SESSION_FIELD_USER_ID];\n } else {\n return null;\n }\n }",
"public function getIduser()\n {\n return $this->iduser;\n }",
"public static function getUserId() {\n $returnValue = 0;\n if (isset($_SESSION[\"userid\"])) {\n $returnValue = $_SESSION[\"userid\"];\n }\n return $returnValue;\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public static function GetCurrentUserId() {\n try {\n $token = Helper::GetCookies('token');\n $now = new \\DateTime(date('Y-m-d H:i:s'));\n if(!isset($token) || $token == '' || $token == null) {\n return 0;\n }\n else {\n $userDB = DB::table('users')\n ->where('token', $token)\n ->where('timeout', '>=', $now)\n ->where('deleted_at', null)\n ->select('id')\n ->get()->toArray();\n if (isset($userDB) && !empty($userDB)) {\n return $userDB[0]->id;\n }\n }\n return 0;\n }\n catch(Exception $e) {\n throw $e;\n }\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUserId() {\n return $this->user === null ? null : $this->user->id;\n }"
] | [
"0.86765665",
"0.8528013",
"0.8441339",
"0.8436033",
"0.8406613",
"0.8403246",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83851194",
"0.83380324",
"0.83216953",
"0.8307371",
"0.8279631",
"0.8279631",
"0.8279631",
"0.8267831",
"0.8261604",
"0.8250956",
"0.8250956",
"0.8250956",
"0.8250618",
"0.8238226",
"0.8237993",
"0.82349026",
"0.81680304",
"0.81465477",
"0.8144766",
"0.81309074",
"0.80965436",
"0.8091492",
"0.8090127",
"0.8081372",
"0.8069374",
"0.8069374",
"0.806929",
"0.806045",
"0.8053912",
"0.8052509",
"0.8052509",
"0.805083",
"0.80507064",
"0.8042371",
"0.8033446",
"0.80331224",
"0.8029646",
"0.80230933",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.8022684",
"0.80145615",
"0.8008616",
"0.80008537",
"0.7990412",
"0.79897594",
"0.79897594",
"0.7986367",
"0.79815423",
"0.7981071",
"0.7978966",
"0.7978491",
"0.7978491",
"0.7978491",
"0.79633516",
"0.7956531",
"0.79554635",
"0.79451895",
"0.7942265",
"0.7941562",
"0.79350317",
"0.79263496",
"0.7919866",
"0.7911862",
"0.7910284",
"0.7899385",
"0.7899385",
"0.78958",
"0.78954816"
] | 0.0 | -1 |
Returns a context populated with the data of the given header. | public static function fromTraceparent(string $header)
{
@trigger_error(sprintf('The %s() method is deprecated since version 3.1 and will be removed in 4.0. Use TransactionContext::fromHeaders() instead.', __METHOD__), \E_USER_DEPRECATED);
$context = new static();
if (!preg_match(self::TRACEPARENT_HEADER_REGEX, $header, $matches)) {
return $context;
}
if (!empty($matches['trace_id'])) {
$context->traceId = new TraceId($matches['trace_id']);
}
if (!empty($matches['span_id'])) {
$context->parentSpanId = new SpanId($matches['span_id']);
}
if (isset($matches['sampled'])) {
$context->sampled = '1' === $matches['sampled'];
}
return $context;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get($header)\n {\n }",
"public function getHeaderData() {}",
"public function prepareContext()\n {\n $headers = [\n 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Encoding: gzip, deflate',\n 'Accept-Language: ru-RU,ru;q=0.9',\n 'Accept-Charset: utf-8',\n 'Connection: keep-alive',\n 'Host: www.kinopoisk.ru',\n 'user_country=ru',\n 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0'\n ];\n\n $options = [\n 'http' => [\n 'method' => 'GET',\n //'protocol_version' => 1.1,\n //'proxy' => 'http://proxy:8080',\n //'timeout' => 4.0,\n 'header' => implode(\"\\r\\n\", $headers),\n //'request_fulluri' => true\n ]\n ];\n\n $context = stream_context_create($options);\n\n return $context;\n }",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}",
"public function header(): ParameterBag\n {\n return $this->header;\n }",
"public function fromHeader($header, $dataType)\n\t{\n\t\treturn $this->fromString($header, $dataType);\n\t}",
"public function getAdditionalHeaderData() {}",
"public function withHeader(string $header) {\n $this->header = $header;\n return $this;\n }",
"public function with_header($header)\n\t{\n\t\t\tif (is_string($header) and strpos($header, '<')!=='0')\n\t\t\t$header = '<H3>' . $header . '<H3>';\n\t\t$this->headers = (array)$header;\n\t\treturn $this;\n\t}",
"abstract protected function prepareContextItem();",
"public function getValueForHeader($header)\n {\n switch ($header) {\n case '#':\n return $this->id;\n case 'Autor':\n return $this->author->name;\n case 'Título':\n if (file_exists($this->zip_file)) {\n $route = route('books.download', ['id' => $this->id]);\n return \"<a href=\\\"{$route}\\\" target=\\\"_blank\\\">{$this->title}</a>\";\n } else {\n return $this->title;\n }\n case 'Subtítulo':\n return $this->subtitle;\n case 'Preço':\n return $this->price;\n case 'Categorias':\n return $this->formCategoriesNameAttribute();\n // return $this->categories()->pluck('name');\n }\n }",
"public function getValueForHeader($header)\n {\n switch ($header){\n case 'ID':\n return $this->id;\n case 'Ponto':\n return $this->title;\n case 'Endereço':\n return $this->address;\n case 'Cidade':\n return $this->city . ' - ' . $this->state;\n }\n }",
"private function build_header() {\n\t\t// if we've already got the cart ID, use it\n\t\t$header = self::fetch('cart_header', [':cart_id' => $this->id()]);\n\n\t\t$header['date_created'] = ck_datetime::datify(@$header['date_created']);\n\t\tif (!empty($header['date_updated'])) $header['date_updated'] = ck_datetime::datify($header['date_updated']);\n\n\t\t$this->skeleton->load('header', $header);\n\t}",
"function get_header()\n\t{\n\t\treturn $this->header;\n\t}",
"public function setHeader($var)\n {\n GPBUtil::checkMessage($var, \\Maps\\Fleetengine\\V1\\RequestHeader::class);\n $this->header = $var;\n\n return $this;\n }",
"protected function makeHeader()\n {\n }",
"public function getHeader(){\n\t\treturn $this->header;\n\t}",
"public function getHeader() {\n return $this->Header;\n }",
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"protected function _createContext() {\n\t\t$options = [];\n\n\t\tif ($this->_userAgent) {\n\t\t\t$options['http']['user_agent'] = $this->_userAgent;\n\t\t}\n\n\t\treturn stream_context_create($options);\n\t}",
"public function getHeader()\n {\n return $this->Header;\n }",
"public function testGetParameterFromHeader(): void\n {\n // setup\n Layer::setAllHeaders([\n 'Custom-Header' => 'header value'\n ]);\n\n $requestParams = $this->getRequestParamsMock();\n\n // test body\n /** @var string $param */\n $param = $requestParams->getParam('Custom-Header');\n\n // assertions\n $this->assertEquals('header value', $param, 'Header value must be fetched but it was not');\n }",
"public function __construct(string $header) {\n\t\t$this->header = $header;\n\t}",
"public function getHeader($headerName);",
"public static function withHeaderString($header)\n {\n $lines = explode(\"\\n\", $header);\n\n // Extract the method and uri\n [$method, $uri] = explode(' ', array_shift($lines));\n\n $headers = [];\n\n foreach ($lines as $line) {\n if ( strpos( $line, ': ' ) !== false ) {\n [$key, $value] = explode(': ', $line);\n\n $headers[$key] = $value;\n }\n }\n\n return new static($method, $uri, $headers);\n }",
"function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getHeader($header)\n {\n return $this->wrapped->getHeader($header);\n }",
"private function _buildContext($method)\r\n {\r\n // Create the basic options\r\n $opts = array(\r\n 'http'=>array(\r\n 'method'=>$method,\r\n 'header'=>$this->getHeaders() \r\n )\r\n );\r\n return stream_context_create($opts);\r\n }",
"public function setHeader($header): self\n {\n $this->header = $header;\n\n return $this;\n }",
"protected function get_header_value($header, $token) {\n\n /*\n * Init header value container\n */\n $header_value = FALSE;\n\n /*\n * Init language / content encoding containers\n */\n $content_encoding = FALSE;\n $content_language = FALSE;\n\n /*\n * Remove any trailing WSP\n */\n $header = trim($header);\n\n /*\n * Unfolding according to RFC 2822, chapter 2.2.3\n */\n $header = str_replace(\"\\r\\n \", \" \", $header);\n $header = str_replace(\"\\r\\n\\t\", \" \", $header);\n\n /*\n * Unfolding with compatibility with some non-standard mailers\n * that only add \\n instead of \\r\\n\n */\n $header = str_replace(\"\\n \", \" \", $header);\n $header = str_replace(\"\\n\\t\", \" \", $header);\n\n /*\n * explode headers on new line\n */\n $rows = explode(\"\\n\", $header);\n\n /*\n * standard delimiter is ':', match '=' only for following properties\n */\n $delimiter = $this->get_header_delimiter($token);\n\n /*\n * convert token to uppercase to perform case-insensitive search\n */\n $ci_token = strtoupper($token);\n\n /*\n * loop each row searching for supplied token\n */\n foreach ($rows as &$row) {\n\n /*\n * trim whitespaces\n */\n $row = trim($row);\n\n /*\n * split row by ';' to manage multiple key=>value pairs within same row\n */\n $items = explode(';', $row);\n\n foreach ($items as &$item) {\n\n $item = trim($item);\n\n /*\n * Parameter Value Continuations\n * \n * Long MIME media type or disposition parameter values do not interact\n * well with header line wrapping conventions. In particular, proper\n * header line wrapping depends on there being places where linear\n * whitespace (LWSP) is allowed, which may or may not be present in a\n * parameter value, and even if present may not be recognizable as such\n * since specific knowledge of parameter value syntax may not be\n * available to the agent doing the line wrapping. The result is that\n * long parameter values may end up getting truncated or otherwise\n * damaged by incorrect line wrapping implementations.\n * \n * A mechanism is therefore needed to break up parameter values into\n * smaller units that are amenable to line wrapping. Any such mechanism\n * MUST be compatible with existing MIME processors. This means that\n * \n * (1) the mechanism MUST NOT change the syntax of MIME media\n * type and disposition lines, and\n * \n * (2) the mechanism MUST NOT depend on parameter ordering\n * since MIME states that parameters are not order\n * sensitive. Note that while MIME does prohibit\n * modification of MIME headers during transport, it is\n * still possible that parameters will be reordered when\n * user agent level processing is done.\n * \n * The obvious solution, then, is to use multiple parameters to contain\n * a single parameter value and to use some kind of distinguished name\n * to indicate when this is being done. And this obvious solution is\n * exactly what is specified here: The asterisk character (\"*\") followed\n * by a decimal count is employed to indicate that multiple parameters\n * are being used to encapsulate a single parameter value. The count\n * starts at 0 and increments by 1 for each subsequent section of the\n * parameter value. Decimal values are used and neither leading zeroes\n * nor gaps in the sequence are allowed.\n * \n * The original parameter value is recovered by concatenating the\n * various sections of the parameter, in order. For example, the\n * content-type field\n * \n * Content-Type: message/external-body; access-type=URL;\n * URL*0=\"ftp://\";\n * URL*1=\"cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar\"\n * \n * is semantically identical to\n * \n * Content-Type: message/external-body; access-type=URL;\n * URL=\"ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar\"\n * \n * Note that quotes around parameter values are part of the value\n * syntax; they are NOT part of the value itself. Furthermore, it is\n * explicitly permitted to have a mixture of quoted and unquoted\n * continuation fields.\n * \n * \n * \n * =================================================================\n * \n * \n * Combining Character Set, Language, and Parameter Continuations\n * \n * Character set and language information may be combined with the\n * parameter continuation mechanism. For example:\n * \n * Content-Type: application/x-stuff\n * title*0*=us-ascii'en'This%20is%20even%20more%20\n * title*1*=%2A%2A%2Afun%2A%2A%2A%20\n * title*2=\"isn't it!\"\n * \n * Note that:\n * \n * (1) Language and character set information only appear at\n * the beginning of a given parameter value.\n * \n * (2) Continuations do not provide a facility for using more\n * than one character set or language in the same\n * parameter value.\n * \n * (3) A value presented using multiple continuations may\n * contain a mixture of encoded and unencoded segments.\n * \n * (4) The first segment of a continuation MUST be encoded if\n * language and character set information are given.\n * \n * (5) If the first segment of a continued parameter value is\n * encoded the language and character set field delimiters\n * MUST be present even when the fields are left blank.\n * \n * https://tools.ietf.org/html/rfc2231\n */\n\n \n // filename*=UTF-8''Sito%20Feste%20dell%E2%80%99unita%CC%80.docx\n // filename*0*=UTF-8''OVIDIO-TECH-RELAZIONE-DEL-REVISORE-LEGALE-DEI-CONTI-31\n \n // UTF8 decode filename\n if(strpos($item, 'UTF-8') !== false && strpos($item, 'filename') !== false){\n $res = array();\n preg_match('/=UTF-8\\'\\'(.*)$/', $item, $res);\n $item = $res[1];\n $filename_tmp = urldecode($item);\n $item = 'filename=\"'. $filename_tmp . '\"';\n }\n\n if (preg_match(\"/^{$ci_token}\\*0\\*{$delimiter}/i\", $item)) {\n /*\n * - multi-line property\n * - first occurrence\n * - language and encoding supplied (they could be empty though)\n * - must decode value\n * \n * example: title*0*=us-ascii'en'This%20is%20even%20more%20\n */\n list($key, $value) = explode($delimiter, $item, 2);\n\n /*\n * Split content on:\n * 1. content encoding\n * 2. language\n * 3. value\n */\n $exploded = explode(\"'\", $value);\n\n $content_encoding = strtoupper($exploded[0]);\n $content_language = strtoupper($exploded[1]);\n\n $value = implode(\"'\", array_slice($exploded, 2));\n\n /*\n * Content encoding supplied?\n */\n if (strlen($content_encoding) > 0 && $content_encoding != 'UTF-8') {\n $value = mb_convert_encoding($value, 'UTF-8', $content_encoding);\n }\n\n /*\n * Decode ASCII chars (if present)\n */\n $value = urldecode($value);\n } elseif (preg_match(\"/^{$ci_token}\\*\\d\\*{$delimiter}/i\", $item)) {\n\n /*\n * - multi-line property\n * - following occurrence\n * - language and encoding (if any) are supplied within first occurrence\n * - must decode value\n * \n * example: title*1*=%2A%2A%2Afun%2A%2A%2A%20\n */\n list($key, $value) = explode($delimiter, $item, 2);\n\n /*\n * Content encoding supplied?\n */\n if (strlen($content_encoding) > 0 && $content_encoding != 'UTF-8') {\n $value = mb_convert_encoding($value, 'UTF-8', $content_encoding);\n }\n\n /*\n * Decode ASCII chars (if present)\n */\n $value = urldecode($value);\n } elseif (preg_match(\"/^{$ci_token}\\*\\d{$delimiter}/i\", $item)) {\n\n /*\n * - multi-line property\n * - must NOT decode value\n * \n * example: title*2=\"isn't it!\"\n */\n list($key, $value) = explode($delimiter, $item, 2);\n } elseif (preg_match(\"/^{$ci_token}{$delimiter}/i\", $item)) {\n /*\n * - single-line property\n * - must NOT decode value\n * \n * example: title=myTitle\n */\n list($key, $value) = explode($delimiter, $item, 2);\n } else {\n /*\n * Doesn't match!\n */\n continue;\n }\n\n /*\n * remove trailing / leading:\n * - spaces \n * - quotes\n * - double quotes\n * from $value\n */\n $value = trim($value);\n\n if (strlen($value) > 2 && substr($value, 0, 1) == \"'\" && substr($value, -1) == \"'\") {\n $value = trim($value, \"'\");\n } elseif (strlen($value) > 2 && substr($value, 0, 1) == \"\\\"\" && substr($value, -1) == \"\\\"\") {\n $value = trim($value, \"\\\"\");\n }\n\n /*\n * Init header value to empty string (if needed) \n */\n if (strlen($header_value) == 0) {\n $header_value = '';\n }\n\n $header_value .= $value;\n }\n }\n\n return $header_value;\n }",
"public function withHeader($header = null, $value=null)\n{\n $this->setHeader($header, $value);\n return $this;\n}",
"public function withHeader($header, $value)\n {\n $request = clone $this;\n $keep_headers = [];\n $found = false;\n foreach ($request->headers as $name => $headers) {\n if (strtolower($name) !== strtolower($header)) {\n $keep_headers[$name] = $headers;\n } else {\n $keep_headers[$name] = is_array($value) ? $value : [(string)$value];\n $found = true;\n }\n }\n if (!$found) {\n $keep_headers[$header] = is_array($value) ? $value : [(string)$value];\n }\n $request->headers = $keep_headers;\n\n return $request;\n }",
"public function getValueForHeader($header)\n {\n switch ($header) {\n case '#':\n return $this->id;\n case 'Descrição':\n return $this->description;\n }\n }",
"public function getHeader(string $header): string;",
"public function header() {\n\t\tRequirements::clear();\n\n\t\t$templates = ['Grasenhiller\\WkHtmlToX\\PdfHeader'];\n\t\t$data = $this->getHeaderFooterVariables();\n\n\t\tif (isset($data['template']) && $data['template']) {\n\t\t\t$templates[] = $data['template'];\n\t\t}\n\n\t\t$this->extend('updateHeader', $templates, $data);\n\n\t\treturn $this\n\t\t\t->customise($data)\n\t\t\t->renderWith(array_reverse($templates));\n\t}",
"public function withHeader($name, $value)\n {\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader() {\n }",
"public function getHeader() {\n return $this->header;\n }",
"public function getHeader() {\r\n return $this->__header;\r\n }",
"function libreData($header = NULL) {\n\t\treturn src\\Libre::__libreData($header);\n\t}",
"protected function parseHeaders($header = \"\")\n {\n $this->headers = array();\n\n foreach (explode(\"\\r\\n\", $header) as $i => $line)\n if ($i === 0) {\n $this->code = $line;\n } else {\n $temp = explode(': ', $line);\n if (empty($temp[0]) || empty($temp[1])) {\n continue;\n }\n $this->headers[strtolower($temp[0])] = $temp[1];\n }\n\n return $this;\n }",
"public function getValueForHeader($header)\n {\n switch ($header){\n case '#':\n return $this->id;\n case 'Fatura':\n return $this->fatura_join()->first()->nome;\n case 'Ordem Serviço':\n return $this->ordem_servico_join()->first()->nome;\n }\n }",
"public function getHeader ()\n {\n return $this->header;\n }",
"public function get_header() {\n $this->do_header();\n return $this->c_header;\n }",
"public function defineHeader()\n {\n $this->header = new Header();\n }",
"public function template_header() {\n\t\tget_header( 'course' );\n\t}",
"function privReadFileHeader(&$p_header)\n {\n }",
"abstract public function get_context();",
"public function header() {\n return $this->header;\n }"
] | [
"0.60030746",
"0.5975836",
"0.5782746",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.566771",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.56619024",
"0.55891377",
"0.54792404",
"0.539853",
"0.528465",
"0.522798",
"0.52064574",
"0.51792395",
"0.51648736",
"0.51542175",
"0.5153911",
"0.51356304",
"0.5126899",
"0.51198953",
"0.5116131",
"0.51151043",
"0.51151043",
"0.51151043",
"0.51028854",
"0.50945795",
"0.50857574",
"0.50824386",
"0.508018",
"0.5075532",
"0.5073271",
"0.5059092",
"0.5044951",
"0.5043021",
"0.5033637",
"0.5021922",
"0.501948",
"0.5004196",
"0.5000721",
"0.49913362",
"0.49894574",
"0.49851808",
"0.49851808",
"0.49851808",
"0.49851808",
"0.49851808",
"0.49849263",
"0.49730042",
"0.49720976",
"0.4966722",
"0.4958194",
"0.4958169",
"0.49476722",
"0.4943255",
"0.49386856",
"0.49381712",
"0.49293074",
"0.49052387",
"0.4904307"
] | 0.57210153 | 3 |
Primary key of the table. | public function getEntityId(): ?int; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function primary_key()\n\t{\n\t\treturn $this->primary_key;\n\t}",
"public function PrimaryKey() {\n\t\t\treturn $this->intId;\n\t\t}",
"public function PrimaryKey() {\n\t\t\treturn $this->intId;\n\t\t}",
"protected function _getPrimaryIdKey()\n {\n if ($this->_primaryIdKey == null) {\n $info = $this->_getTable()->info();\n\n $this->_primaryIdKey = (string) array_shift($info[Zend_Db_Table_Abstract::PRIMARY]);\n }\n\n return $this->_primaryIdKey;\n }",
"public function getTablePrimaryKey()\n {\n return 'p.id';\n }",
"function primary_key()\r\n\t{\r\n\t\treturn 'key';\r\n\t}",
"public function primary_key(){\n $table_columns = $this->meta();\n\n $primary_key_column = NULL;\n foreach ($table_columns as $col) :\n if($col->primary_key):\n $primary_key_column = $col->name;\n endif;\n endforeach;\n\n return $primary_key_column; \n }",
"public function getPrimaryKey() {\n\t\treturn $this->_key_primary->name;\n\t}",
"public static function primaryKey()\n {\n return static::PRIMARY_KEY;\n }",
"public function getPrimaryKey()\r\n\t{\r\n\t\treturn $this->primaryKey;\r\n\t}",
"public function getPrimaryKeyName()\n {\n return self::$primary_key_name;\n }",
"public function getPrimaryKey()\n {\n return $this->getPothnbr();\n }",
"public function getPrimaryKey()\n {\n return $this->primaryKey;\n }",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->_rowKey;\n\t}",
"function get_primary_key_column()\n {\n return $this->_primary_key_column;\n }",
"public function get_primary_row(){\r\n $result = $this->db->query(\"SHOW KEYS FROM \". $this->db->formatTableName($this->table). \"\r\n WHERE Key_name = %s\"\r\n , \"PRIMARY\");\r\n $pk = \"\";\r\n foreach ($result as $res){\r\n $pk = $res[\"Column_name\"];\r\n }\r\n return $pk;\r\n }",
"public function getPrimaryKey()\n {\n return $this->getid();\n }",
"private function _fetch_table_primary_key()\n {\n if ($this->primary_key == null) {\n $this->primary_key = preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))) . '_id';\n }\n }",
"private function _fetch_table_primary_key()\n {\n if ($this->primary_key == null) {\n $this->primary_key = preg_replace('/(_m|_model)?$/', '', strtolower(get_class($this))) . '_id';\n }\n }",
"function get_primary_key_column()\n {\n return $this->object->_primary_key_column;\n }",
"private function getPrimaryKey()\n {\n $result = database()->fetchResult('SHOW KEYS FROM ' . $this->table . ' WHERE Key_name = \"PRIMARY\"');\n\n return ($result['Column_name'] ?? null);\n }",
"public static function primaryKey() {\n return (new static)->getKeyName();\n }",
"public function getPrimaryKey();",
"public function getPrimaryKey();",
"public function getPrimaryKey();",
"public function getPrimaryKeyName()\n {\n return $this->primaryKeyName;\n }",
"public function getPrimaryKey()\n {\n return $this->getSekolahId();\n }",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->name;\n\t}",
"public function getPrimaryKey()\n\t{\n $indexes = $this->getIndexes();\n\n foreach ($indexes as $index){\n if ($index['Key_name'] == \"PRIMARY\"){\n return $index;\n }\n }\n\n \t\t\n\t}",
"public function getPrimaryKey() {\n return $this->_data->getDeepValue('indexes/primary/columns/0', null);\n }",
"public function pkName()\r\n {\r\n $schema = $this->schema();\r\n foreach($schema as $col){\r\n if( $col['PRIMARY'] === true )\r\n return $col['FIELD'];\r\n }\r\n throw new \\Exception( __CLASS__ .\" Error: could not find Primary Key for table: \" . $this->table->name() ); \r\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_dl' => $this->iid_dl);\n }\n return $this->aPrimary_key;\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_ubi' => $this->iid_ubi, 'id_tarifa' => $this->iid_tarifa, 'year' => $this->iyear, 'id_serie' => $this->iid_serie);\n }\n return $this->aPrimary_key;\n }",
"public function getPrimaryKey()\n {\n if ($this->_primaryKey === null) {\n $schema = $this->getSchema();\n $key = $schema->getPrimaryKey();\n if (count($key) === 1) {\n $key = $key[0];\n }\n $this->_primaryKey = $key;\n }\n\n return $this->_primaryKey;\n }",
"protected function _getPrimaryKey(): string\n {\n if (!$this->_primaryKey) {\n $primaryKey = (array)$this->_table->getPrimaryKey();\n $this->_primaryKey = $primaryKey[0];\n }\n\n return $this->_primaryKey;\n }",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getId();\n\t}",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('nivel_stgr' => $this->inivel_stgr);\n }\n return $this->aPrimary_key;\n }",
"public function primaryKey()\n {\n return $this->set('primary_key', true);\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_nom' => $this->iid_nom, 'id_nivel' => $this->iid_nivel);\n }\n return $this->aPrimary_key;\n }",
"public function getPrimaryKey()\n {\n return $this->getId();\n }",
"public function getPrimaryKey()\n {\n return $this->getId();\n }",
"public function getPrimaryKey()\n {\n return $this->getId();\n }",
"public function getPrimaryKey()\n {\n return $this->getId();\n }",
"public function getPrimaryKey()\n {\n return $this->getId();\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_situacion' => $this->iid_situacion);\n }\n return $this->aPrimary_key;\n }",
"public static function getPrimaryKey()\n {\n return self::getRepo()->getPrimaryKey();\n }",
"public function getPk()\n {\n return $this->{static::primaryKey()};\n }",
"public function getPrimaryKey()\n {\n return $this->getOpPrimeId();\n }",
"public static function primaryKey()\n {\n return 'id';\n }",
"public function get_primary_column()\n {\n }",
"public static function getPk(){\n return static::$_primaryKey;\n }",
"function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}",
"function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}",
"function getPrimaryKey() {\n\t\treturn $this->_ID;\n\t}",
"public function primaryKeyForTable(Table $table)\n {\n // Execute the query directly\n $result = $this->client->query(\"SHOW KEYS FROM $table->name WHERE Key_name = 'PRIMARY'\");\n\n // If no results are returned, return null\n if ($result === false) {\n return;\n }\n\n // Fetch the query results\n $data = $result->fetch_assoc();\n\n // Return the field name\n return $data['Column_name'];\n }",
"public function getPrimaryKeyName()\n\t{\n\t\treturn 'id';\n\t}",
"public function getPrimaryKey()\n {\n $cols = $this->info('cols');\n return $cols[0];\n }",
"public function getPrimaryKeyColumn() : string\n {\n return $this->primaryKey;\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_activ' => $this->iid_activ, 'id_asignatura' => $this->iid_asignatura, 'id_nom' => $this->iid_nom);\n }\n return $this->aPrimary_key;\n }",
"abstract public function getPrimaryKey();",
"abstract public function getPrimaryKey();",
"public function PK($table_name){\n $PK = DB::select('SELECT FNC_GETPK(\"'.$table_name.'\");');\n foreach ($PK as $value) {\n $result = $value;\n }\n foreach ($result as $id) {\n $result = $id; // primary key\n }\n\n return $id;\n }",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoNumInventario();\n\t}",
"public function getPrimaryKey()\n\t{\n\t\treturn $this->getCoParticipante();\n\t}",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_item' => $this->iid_item);\n }\n return $this->aPrimary_key;\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_item' => $this->iid_item);\n }\n return $this->aPrimary_key;\n }",
"public function json_primary_key($table_name){\n\t\tif( in_array( $table_name, array_keys(Model_Kiwi::$kiwi_pk_hash))){\n\t\t\treturn Model_Kiwi::$kiwi_pk_hash[ $table_name ];\n\t\t}\n\t\treturn Model_Kiwi::singularize($table_name) . '_id';\n\t}",
"public function getPrimaryKey()\n {\n return $this->getIdmontacargas();\n }",
"public static function primaryKey()\n {\n $obj = new PrimaryKey();\n $obj->type = 'int';\n $obj->size = 10;\n $obj->auto_increment = true;\n $obj->primary_key = true;\n\n return $obj;\n }",
"public function getKeyName()\n {\n return $this->primaryKey;\n }",
"public function getKeyName()\n {\n return $this->primaryKey;\n }",
"public function getTablePrimary()\n {\n return $this->_primary;\n }",
"abstract function getPrimaryKey();",
"public function getKeyName()\n {\n return isset($this->primaryKey) ? $this->primaryKey : static::$defaultPrimaryKey;\n }",
"function getPrimary_key()\n {\n if (!isset($this->aPrimary_key)) {\n $this->aPrimary_key = array('id_region' => $this->iid_region);\n }\n return $this->aPrimary_key;\n }",
"public function getPrimaryKey()\n {\n return $this->getProdId();\n }",
"public function getPrimaryKey()\n {\n return $this->getArticleId();\n }",
"public function getPrimaryKeyField()\n\t{\n\t\treturn $this->primaryKey;\n\t}",
"public function getPrimaryKey()\n {\n return $this->getIdBangunan();\n }",
"private function _fetch_primary_key()\n {\n if($this->primaryKey == NULl)\n {\n $this->primaryKey = $this->db->query(\"SHOW KEYS FROM `\".$this->_table.\"` WHERE Key_name = 'PRIMARY'\")->row()->Column_name;\n }\n }",
"protected function getPrimaryKeyName(): string\n {\n return $this->query->getModel()->getKeyName();\n }",
"public function getKeyName()\n {\n if (!$this->primaryKey) {\n if ($key = $this->getPrimaryFromFields()) {\n $this->primaryKey = $key;\n } else {\n $this->primaryKey = 'id';\n }\n }\n\n return $this->primaryKey;\n }",
"protected function get_primary_column_name()\n {\n }",
"protected function get_primary_column_name()\n {\n }",
"protected function get_primary_column_name()\n {\n }",
"public function getPrimary(){\n return $this->primaryKey;\n }",
"protected function primaryKeyName($table) {\n $table = $this->connection->prefixTables('{' . $table . '}');\n return $this->connection->query('SELECT name FROM sys.key_constraints WHERE parent_object_id = OBJECT_ID(:table) AND type = :type', [\n ':table' => $table,\n ':type' => 'PK',\n ])->fetchField();\n }",
"public function key()\n\t{\n\t\tif (empty($this->key) && !empty($this->definition->primary))\n\t\t{\n\t\t\t$keys = array_values(\n\t\t\t\tarray_filter(\n\t\t\t\t\tpreg_split('~[\\s,]+~', $this->definition->primary)\n\t\t\t\t)\n\t\t\t);\n\t\t\t$keys = array_map(\n\t\t\t\tfunction ($key) {\n\t\t\t\t\treturn Normalise::toVariable($key);\n\t\t\t\t},\n\t\t\t\t$keys\n\t\t\t);\n\n\t\t\t$this->key = count($keys) > 1 ? $keys : array_shift($keys);\n\t\t}\n\n\t\tif (empty($this->key) && $this->has('id'))\n\t\t{\n\t\t\t$this->key = 'id';\n\t\t}\n\n\t\treturn $this->key;\n\t}",
"public function getPrimaryId()\n {\n return $this->primary_id;\n }",
"public function getPrimaryKeyFieldName(){\n\t\treturn $this->primaryKey;\n\t}",
"protected function _getPrimaryKey(){\n $def = $this->_getDef();\n foreach($def as $column){\n if($column['primary'] === true){\n return $column['field_name'];\n }\n }\n \n return false;\n }",
"public function getPrimaryKeyDDL(Table $table);",
"public function getID()\n {\n return $this->getKey();\n }",
"public function primary(Table $table, Magic $command)\n {\n return $this->key($table, $command->name(null), 'PRIMARY KEY');\n }"
] | [
"0.8246662",
"0.81746453",
"0.81746453",
"0.7854036",
"0.7718086",
"0.7713176",
"0.7670647",
"0.76509964",
"0.76214075",
"0.7617651",
"0.7590767",
"0.7587781",
"0.7566466",
"0.7550634",
"0.75035554",
"0.74986225",
"0.74973756",
"0.74935925",
"0.74935925",
"0.7476718",
"0.7441349",
"0.74379426",
"0.7425684",
"0.7425684",
"0.7425684",
"0.74077433",
"0.73852694",
"0.738486",
"0.73829406",
"0.73702115",
"0.7369183",
"0.7365726",
"0.73468447",
"0.7338581",
"0.7329389",
"0.73260856",
"0.73260856",
"0.73260856",
"0.73260856",
"0.73260856",
"0.73260856",
"0.73260856",
"0.73260856",
"0.7325615",
"0.73154795",
"0.7313994",
"0.7308925",
"0.7308925",
"0.7308925",
"0.7308925",
"0.7308925",
"0.73005694",
"0.72904825",
"0.7259547",
"0.72512627",
"0.72489524",
"0.72449124",
"0.72386813",
"0.72364336",
"0.72364336",
"0.72364336",
"0.7235267",
"0.7228552",
"0.72166544",
"0.7214519",
"0.719734",
"0.7187275",
"0.7187275",
"0.7169067",
"0.7166137",
"0.7165599",
"0.713762",
"0.713762",
"0.71258974",
"0.71199006",
"0.70833087",
"0.7064112",
"0.7064112",
"0.7055183",
"0.7020374",
"0.70161796",
"0.70152825",
"0.7010803",
"0.7005507",
"0.7002913",
"0.6979206",
"0.6964847",
"0.69525",
"0.69516593",
"0.6948059",
"0.6948059",
"0.6946173",
"0.6931342",
"0.6925283",
"0.6922393",
"0.689787",
"0.68896013",
"0.686781",
"0.68590695",
"0.68403447",
"0.68148196"
] | 0.0 | -1 |
Get the method (Upstream Pay method). | public function getMethod(): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getPaymentMethod();",
"public function GetMethod () {\n\t\treturn $this->method;\n\t}",
"public function get_method() {\n\t\treturn $this->method;\n\t}",
"public function getPaymentMethod() \n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }",
"public function get_method() {\n return $this->_method;\n }",
"public function method(){\n return $this->__method;\n }",
"protected function getPaymentMethod(){\n return $this->method;\n }",
"public function getMethod() { return $this->_method; }",
"public function getPaymentMethod(){\n return $this->_getData(self::PAYMENT_METHOD);\n }",
"public function getMethod(){\n return $this->method;\n }",
"public function method() {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->values[\"method\"];\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n $output = $this->product->getMethod();\n return $output;\n }",
"public function getMethod ()\n {\n return $this->method;\n }",
"function getMethod()\n {\n return $this->method;\n }",
"public function method()\n {\n return $this->_method;\n }",
"public function method()\n {\n return $this->_method;\n }",
"public function method() {\n return $this->method;\n }",
"public function method()\n {\n return $this->method;\n }",
"public function method()\n {\n return $this->method;\n }",
"public function method()\n {\n return $this->method;\n }",
"public function method(): string{\n return $this->_method;\n }",
"public function getMethod()\r\n {\r\n return $this->method;\r\n }",
"protected function getMethod() {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method->getMethod();\n }",
"public function getMethod() \n {\n return $this->method;\n }",
"public function get_payment_method() {\n\t\treturn $this->payment->get_payment_method();\n\t}",
"public function getMethod() {\n\t\treturn $this->method;\n\t}",
"public function getMethod() {\n\t\treturn $this->method;\n\t}",
"public function getMethod() {\n\t\treturn $this->method;\n\t}",
"public function getMethod() {\r\n\t\treturn $this->method;\r\n\t}",
"public function getMethod()\n {\n return $this->_method;\n }",
"public function getMethod ()\n {\n\n return $this->method;\n\n }",
"public function get_method();",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getPaymentMethod()\n {\n return $this->payment_method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() : string\n {\n return static::$method;\n }",
"public function getMethod() {\n \n return $this->method;\n \n }",
"public function getMethod()\t{\n\t\tif ($this->class != \"NoRoute\")\t{\n\t\t\treturn $this->method;\n\t\t}\n\t\treturn \"invoke\";\n\t}",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}",
"public function getMethod()\n\t{\n\t\treturn $this->method;\n\t}",
"public function get_method()\n {\n }",
"public function method(): string\n {\n return $this->method;\n }",
"public function getPaymentName()\n {\n return self::METHOD_NAME;\n }",
"public static function getMethod()\n {\n return self::$__method;\n }",
"public function getMethod()\n {\n if($this->_method == NULL || !isset($this->_method))\n {\n $this->_method = substr(get_class($this),3);\n }\n \n return $this->_method;\n }",
"public function getPaymentMethod()\n {\n $value = $this->get(self::payment_method);\n return $value === null ? (integer)$value : $value;\n }",
"public function getPaymentMethod() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->paymentMethod;\r\n\t}",
"public function getMethod()\n {\n return $this->getAttribute('method', 'get');\n }",
"static public function GetMethod() {\n if (isset(self::$method))\n return self::$method;\n else\n return self::UNKNOWN;\n }",
"public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }",
"public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }",
"public function method() {\n\t\treturn strtoupper($this->getMethod());\n\t}",
"public function getMethod() : string\n {\n return $this->method;\n }",
"public function method(): string\n {\n return $this->getMethod();\n }",
"public function getMethod(): string {}",
"public function getMethod()\n {\n return Mage::getStoreConfig('smsnotifier/main_conf/message_type');\n //return Mage::helper('core')->decrypt($encrypted_pass);\n }",
"public function getMethod()\n {\n ShopgateLogger::getInstance()->log('# ' . __METHOD__, ShopgateLogger::LOGTYPE_DEBUG);\n if (is_null($this->_method) && is_object($this->_order)) {\n $this->_method = $this->_fetchMethod($this->_order);\n } else {\n if (is_null($this->_method) && is_null($this->_order)) {\n Mage::logException(new Exception('Error: model not initialized properly'));\n }\n }\n\n ShopgateLogger::getInstance()->log(\n \" Mapped shipping method is: '\" . $this->_method . \"'\",\n ShopgateLogger::LOGTYPE_DEBUG\n );\n\n return $this->_method;\n }",
"public function getMethod() : string;",
"private function _getPaymentMethod ()\n\t{\n\t\t$id = craft()->config->get('paymentMethodId', 'commercepaybear');\n\t\treturn craft()->commerce_paymentMethods->getPaymentMethodById($id);\n\t}",
"public function getPaymentMethod()\n {\n return $this->response['result']['payment_type'];\n }",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"public function getMethod();",
"protected function getMethod(): string\n {\n return $this->getTwoStep() ? 'rest/registerPreAuth.do' : 'rest/register.do';\n }",
"public function getMethod() : string\n {\n\n return $this->method;\n }",
"public function GetMethod ();",
"public static function getMethod() \n { \n return emailSettings::$method; \n }"
] | [
"0.72925735",
"0.71410537",
"0.7104616",
"0.70821536",
"0.7064106",
"0.705116",
"0.70487434",
"0.7007694",
"0.6984685",
"0.6959266",
"0.69476897",
"0.6890857",
"0.6890345",
"0.68859535",
"0.6883712",
"0.688217",
"0.6877061",
"0.6877061",
"0.6852213",
"0.6839865",
"0.6839865",
"0.6839865",
"0.6837854",
"0.682825",
"0.68112266",
"0.6809539",
"0.68055826",
"0.68013155",
"0.6799179",
"0.6799179",
"0.6799179",
"0.6794104",
"0.6770331",
"0.6766112",
"0.67657775",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.6758966",
"0.67487454",
"0.6733213",
"0.6733213",
"0.6733213",
"0.67266405",
"0.6707513",
"0.6707192",
"0.6695767",
"0.6695767",
"0.66913277",
"0.66913277",
"0.66842127",
"0.66770184",
"0.6676782",
"0.66645116",
"0.66503733",
"0.66369927",
"0.6631392",
"0.6629903",
"0.6605549",
"0.66026527",
"0.66026527",
"0.6594886",
"0.6592305",
"0.6582272",
"0.6566652",
"0.6548561",
"0.6542805",
"0.65325147",
"0.65237486",
"0.6505879",
"0.65053326",
"0.65053326",
"0.65053326",
"0.65053326",
"0.65053326",
"0.65053326",
"0.65053326",
"0.64983886",
"0.6494407",
"0.6449421",
"0.6425021"
] | 0.6735112 | 58 |
Set the method (Upstream Pay method). Only set it on creation, never update it. | public function setMethod(string $method): self; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMethod($value) { $this->_method = $value; }",
"public function setMethod($method);",
"public function setMethod($method);",
"public function SetMethod ($method = NULL);",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function set_method($method)\n {\n }",
"abstract protected function setMethod();",
"public function set_method($method) {\n $this->_method = (string)$method;\n }",
"function setMethod( $val){\n\t$this->_method = $val;\n\t}",
"public function setMethod( $method )\n\t{\n\t\t$this->setAttribute( \"method\", $method );\n\t}",
"private function setMethod($method) {\n return;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function method($method)\n {\n $this->method = $method;\n }",
"public function setMethod($request_method) {}",
"protected function setMethod($method) {\n $this->_method = $method;\n }",
"public static function setMethod($val) \n { \n emailSettings::$method = $val; \n }",
"public function setMethod (string $method)\n {\n $this->method = $method;\n $this->save();\n return $this;\n }",
"public function setMethod($method)\n {\n $this->setAttribute('method', strtolower($method));\n }",
"public function setMethod($method)\n {\n $this->method = strtolower($method);\n }",
"private function setMethod(string $method): void\n {\n $this->method = $method;\n }",
"public function method($method): self {\n\t\tif (in_array($method, $this->methods)) {\n\t\t\t$this->params['method'] = $method;\n\t\t\treturn $this;\n\t\t} else {\n\t\t\t// throw exception if not set payment method from array\n\t\t\tthrow new \\Exception('Set payment Method ' . implode(',', $this->methods));\n\t\t}\n\n\t}",
"public function setMethod($requestMethod)\n {\n $this->_method = $requestMethod;\n }",
"public function setMethod($method)\n\t{\n\t\t$this->method = $method;\n\t\treturn $this;\n\t}",
"public function setMethod($method)\n {\n $method = strtoupper($method);\n $this->method = $method;\n return $this;\n }",
"public function setMethod($method)\n {\n $this->_method = $method;\n return $this;\n }",
"public function initPaymentMethod()\n {\n $helper = Mage::helper('onestepcheckout/payment');\n // check if payment saved to quote\n if (!$this->getQuote()->getPayment()->getMethod()) {\n $data = array();\n $paymentMethods = $helper->getPaymentMethods();\n if ((count($paymentMethods) == 1)) {\n $currentPaymentMethod = current($paymentMethods);\n $data['method'] = $currentPaymentMethod->getCode();\n } elseif ($lastPaymentMethod = $helper->getLastPaymentMethod()) {\n $data['method'] = $lastPaymentMethod;\n } elseif ($defaultPaymentMethod = Mage::helper('onestepcheckout/config')->getDefaultPaymentMethod()) {\n $data['method'] = $defaultPaymentMethod;\n }\n if (!empty($data)) {\n try {\n $this->getOnepage()->savePayment($data);\n } catch (Exception $e) {\n // catch this exception\n }\n }\n }\n }",
"public function setMethod($method)\r\n {\r\n $this->method = $method;\r\n\r\n return $this;\r\n }",
"public function setMethod($method) {\n $this->method = $method;\n return $this;\n }",
"public function setMethod (string $method) : self {\n $this->method = $method;\n return $this;\n }",
"public function & SetMethod ($method = NULL) {\n\t\t/** @var $this \\MvcCore\\Route */\n\t\t$this->method = strtoupper($method);\n\t\treturn $this;\n\t}",
"public function setMethod($method)\n {\n $this->method = $method;\n return $this;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n return $this;\n }",
"public function setMethod($name)\n {\n $this->method = $name;\n }",
"public function setMethod($method) \n {\n $this->method = $method;\n\n return $this;\n }",
"protected function setMethod($method)\n\t{\n\t\t$this->method = \\strtoupper($method);\n\t\treturn $this;\n\t}",
"public function setMethod(string $method)\n {\n $this->_method = $method;\n\n return $this;\n }",
"public function setMethod($method)\n {\n $this->method = (string) strtoupper($method);\n\n return $this;\n }",
"public function setMethod($method)\n {\n $this->method = strtoupper($method);\n\n return $this;\n }",
"public function setMethod(string $method)\n {\n $this->method = $method;\n\n return $this;\n }",
"public function set_method($method)\n\t{\n\t\t$this->route_stack[self::SEG_METHOD] = $method;\n\t}",
"public function method(string $method)\n {\n $this->method= $method;\n return $this;\n }",
"public function setMethod($method) {\n\t\t$this->apiConfig['method'] = $method;\n\t\treturn $this;\n\t}",
"public function setMethod($method)\n {\n // Backwards compatibility\n $map = array('left' => 'west', 'right' => 'east', 'top' => 'north', 'bottom' => 'south');\n if($key = array_search($method, $map))\n {\n $message = sprintf('sfImageTransformPlugin thumbnail method \\'%s\\' is depreciated use \\'%s\\'', $method, $key);\n sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($this, 'application.log', array($message, 'priority' => sfLogger::ERR)));\n }\n \n if(in_array($method, $this->methods))\n {\n $this->method = strtolower($method);\n \n return true;\n }\n \n return false;\n }",
"private function veriFyMethodOnUrl()\n {\n if ($this->urlParameters && array_key_exists(1, $this->urlParameters)) {\n $this->method = $this->urlParameters[1];\n $nameAndAliases = $this->urlParameters;\n array_shift($nameAndAliases);\n $nameAndAliases = implode('/', $nameAndAliases);\n $this->methodNameAliases = $nameAndAliases;\n }\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n\n return $this;\n }",
"public function SetMethod($method) {\n\t\t$this->method = ucwords($method);\n\n\t\treturn TRUE;\n\t}",
"public function setMethod($method)\n\t{\n\t\t//Inline bots adds answerInlineQuery.\n\t\t$this->method = $method;\n\t\treturn True;\n\t}",
"protected function getPaymentMethod(){\n return $this->method;\n }",
"public function via($method)\r\n {\r\n $this->method = $method;\r\n\r\n return $this;\r\n }",
"public function getMethod()\n {\n }",
"public function method($method) {\n\t\t$this->setRequirement('_method', strtoupper($method));\n\t\treturn $this;\n\t}",
"public function setMethod($method)\n {\n if ($this->method !== null) {\n throw new RuntimeException('Method cannot be overwritten');\n }\n $this->method = $method;\n }",
"public function method(string $method): self;",
"public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }",
"public function withMethod($method)\n {\n }",
"public function withMethod($method)\n {\n }",
"public function method($method = null)\n {\n if (is_null($method)) {return $this->method;}\n if (is_int($method)) {$this->method = $this->valid_method[$method];}\n if (in_array(strtoupper($method), $this->valid_method)) {\n $this->method = strtoupper($method);\n }\n }",
"public function getMethod() {}",
"public function getMethod() {}",
"public function getMethod() {}",
"public function getMethod() {}",
"public static function setMethod(string $method): void {\r\n $_SERVER['REQUEST_METHOD'] = strtoupper($method);\r\n }",
"function setMethod($val) {\n $this->identifier = $this->updateDB('identifier', $val);\n }",
"protected function set_class_method( $class_method ) {\n\t\t$this->class_method = $class_method;\n\t\t$this->is_class_method_set = true;\n\t}",
"public function getMethod() { return $this->_method; }",
"public function setMethod($method)\n {\n $this->getRequest()->setMethod($method);\n }",
"public function testSetMethod()\n {\n $this->_req->setMethod('SOMETHING');\n $this->assertEquals('SOMETHING', $this->_req->getMethod());\n }",
"public function addMethod(Method $method)\n {\n $this->methods[(string)$method->getFqsen()] = $method;\n }",
"public function get_method()\n {\n }",
"public function method(){\n return $this->__method;\n }",
"function getMethod()\r\n {\r\n }",
"public static function getMethod() \n { \n return emailSettings::$method; \n }",
"public function setIntegrationMethod($method) {\n return $this->intMethod = $method;\n }",
"public function setMethod($method)\n {\n $this->params['_method'] = $method;\n\n return $this;\n }",
"public function via($method)\n {\n $this->method = $method;\n\n return $this;\n }",
"public function setPaymentMethod($method)\n {\n $this->_data['MediosPago'] = $method;\n }",
"public function setMethod($method) {\n if(preg_match('|(post|get)|i', $method)) {\n $this->method = $method;\n return TRUE;\n } else {\n return FALSE;\n }\n }",
"abstract public function getPaymentMethod();",
"public function resolveMethod()\n {\n $value = $this->_value( @$_SERVER['REQUEST_METHOD'], '' );\n $value = $this->_value( @$_SERVER['HTTP_X_HTTP_METHOD'], $value );\n $this->method = strtolower( trim( $value ) );\n }",
"public function setMethod($method){\n\t\tswitch ($method){\n\t\t\tcase self::GET: $this->method = self::GET;\n\t\t\t\tbreak;\n\t\t\tcase self::PUT: $this->method = self::PUT;\n\t\t\t\tbreak;\n\t\t\tcase self::POST: $this->method = self::POST;\n\t\t\t\tbreak;\n\t\t\tcase self::HEAD: $this->method = self::HEAD;\n\t\t\t\tbreak;\n\t\t\tcase self::DELETE: $this->method = self::DELETE;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new \\InvalidArgumentException('Unknown method: ' . $method);\n\t\t}\n\t}",
"public function setTransferMethod($transfer_method) {\n $this->transfer_method = $transfer_method;\n }",
"public function method() {\n return $this->method;\n }",
"public function setPaymentMethod($value)\n {\n return $this->set(self::payment_method, $value);\n }",
"public function setMethod($httpMethod) {}",
"public function method(): string{\n return $this->_method;\n }",
"public function get_method() {\n\t\treturn $this->method;\n\t}",
"public function setRequestMethod($method) {}",
"public function createMethod()\n {\n return $this->addExcludesNameEntry($this->methods);\n }",
"public function setMethod($method)\n {\n $method = strtolower($method);\n\n // ensure this is a supported method\n if (!isset($this->methods[$method])) {\n throw new RuntimeException(\"Unsupported method: '$method'\");\n }\n\n $command = $this->getCommandPath($this->methods[$method]);\n\n if ($command == false && $this->getAutoSelect()) {\n // remove the method we were unable to find so we don't check it again\n unset($this->methods[$method]);\n\n // check all remaining methods until we find one that can be used\n foreach ($this->methods as $method => $command) {\n if ($command = $this->getCommandPath($command) !== false) {\n break;\n }\n }\n }\n\n if ($command == false) {\n $this->options['method'] = '';\n $this->command = '';\n throw new RuntimeException('Command not found: ' . $method);\n }\n\n $this->options['method'] = $method;\n $this->command = $command;\n\n return $this;\n }",
"public function getMethod(){\n return $this->method;\n }",
"public function setMethod($var)\n {\n GPBUtil::checkString($var, True);\n $this->method = $var;\n\n return $this;\n }",
"function set_method($xmlrpcpath) {\n if (is_string($xmlrpcpath)) {\n $this->method = $xmlrpcpath;\n $this->params = array();\n return true;\n }\n $this->method = '';\n $this->params = array();\n return false;\n }",
"public function setOrderMethod($value)\n {\n $this->order_method = $value;\n $this->setSettingValue('retailcrm_order_method', $value);\n }",
"public function setShippingMethod() {\n\t\t$json = array();\n\t\t$json['status'] = false;\n\t\t\n\t\tif (isset($this->request->post['code'])) {\n\t\t\t$code=$this->request->post['code'];\n\t\t\t$shipping_method=$this->session->data['shipping_methods'][$code]; \n\t\t\tif ($shipping_method) {\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\t$this->session->data['shipping_method'] = $shipping_method;\n\t\t\t\t\n\t\t\t\t$json['status'] = true;\n\t\t\t\t$json['delivery'] = $shipping_method['delivery'];\n\n\t\t\t} else {\n\t\t\t\t$json['error'] = 'Неизвестный способ доставки';\n\t\t\t}\n\t\t} else {\n\t\t\t$json['error'] = 'Не указан тип доставки';\n\t\t}\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}",
"public function setMethod($requestMethod)\n {\n $this->setServer('REQUEST_METHOD', $requestMethod);\n return $this;\n }",
"public function setMethod($var)\n {\n GPBUtil::checkInt64($var);\n $this->method = $var;\n\n return $this;\n }",
"public function getMethod ()\n {\n return $this->method;\n }"
] | [
"0.70461285",
"0.68319213",
"0.68319213",
"0.6789065",
"0.6741972",
"0.6740141",
"0.66572326",
"0.6549691",
"0.649964",
"0.6489535",
"0.6474664",
"0.6459748",
"0.6459748",
"0.6459748",
"0.6459748",
"0.64214945",
"0.64098513",
"0.6397173",
"0.63823617",
"0.6367813",
"0.6362973",
"0.63445526",
"0.6160562",
"0.612768",
"0.60968745",
"0.6064076",
"0.60550594",
"0.6034424",
"0.60233647",
"0.5986087",
"0.5972484",
"0.59563243",
"0.5941071",
"0.5933172",
"0.5933172",
"0.59166384",
"0.591414",
"0.59048027",
"0.5886265",
"0.5883578",
"0.5858012",
"0.58151263",
"0.5797197",
"0.5793583",
"0.5782248",
"0.5751207",
"0.57338625",
"0.57312757",
"0.56959677",
"0.56801707",
"0.56746507",
"0.5659697",
"0.5638139",
"0.56278574",
"0.561689",
"0.56069815",
"0.5604976",
"0.56008697",
"0.56008697",
"0.5598532",
"0.55976886",
"0.55976886",
"0.55976886",
"0.55976886",
"0.55901873",
"0.55621105",
"0.5557483",
"0.5550861",
"0.55243754",
"0.55159956",
"0.5504823",
"0.5493667",
"0.5488028",
"0.548203",
"0.5471303",
"0.5470847",
"0.54678047",
"0.5458197",
"0.54581314",
"0.54488033",
"0.54022735",
"0.5390275",
"0.5379874",
"0.5379167",
"0.53787404",
"0.53688455",
"0.536755",
"0.5352207",
"0.53516567",
"0.5350054",
"0.53455085",
"0.5335043",
"0.5325084",
"0.5305129",
"0.5303944",
"0.5303759",
"0.52999794",
"0.5296983",
"0.5296158",
"0.5293786"
] | 0.6689269 | 6 |
Get the method type (Upstream Pay method), it can be primary or secondary. | public function getType(): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function get_method_type() {\n\n\t\treturn isset( $this->response_data->expMonth ) ? 'credit_card' : 'echeck';\n\t}",
"public function getPaymentMethod()\n {\n return $this->response['result']['payment_type'];\n }",
"public function getPaymentMethodType()\n {\n return $this->getInfo()->getAdditionalInformation('payment_method');\n }",
"public function getPaymentMethodType() {\r\r\n return $this->_paymentMethod;\r\r\n }",
"public function getPaymentMethod()\n {\n $value = $this->get(self::payment_method);\n return $value === null ? (integer)$value : $value;\n }",
"public function getMethod() {\n\t\treturn $this->getDriver()->getType();\n\t}",
"public function getPaymentMethod(){\n return $this->_getData(self::PAYMENT_METHOD);\n }",
"public function getPaymentMethod() \n {\n return $this->_fields['PaymentMethod']['FieldValue'];\n }",
"public function paymentMethodType()\n {\n return $this->hasOne(\\Cot\\PaymentMethodType::class);\n }",
"abstract public function getPaymentMethod();",
"public function getPaymentType(): string\n {\n $paymentMethod = $this->getPaymentMethod();\n $paymentTypes = [\n 'regular_checkout' => __('Regular'),\n 'express_checkout' => __('Express'),\n ];\n\n return (string) ($paymentTypes[$paymentMethod] ?? '');\n }",
"public function getPaymentMethod()\n {\n return $this->user->getDefaultPaymentMethod();\n }",
"public function getPaymentMethod() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->paymentMethod;\r\n\t}",
"function get_payment_type()\n {\n // echeck - payment funded with e-check\n // instant - payment was funded with platnosci balance, credit card, or instant transfer\n return $this->platnosci_post_vars['payment_type'];\n }",
"protected function getPaymentMethod(){\n return $this->method;\n }",
"private function _getPaymentMethod ()\n\t{\n\t\t$id = craft()->config->get('paymentMethodId', 'commercepaybear');\n\t\treturn craft()->commerce_paymentMethods->getPaymentMethodById($id);\n\t}",
"public function getPaymentType(){\n return $this->payment_type;\n }",
"public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }",
"public function getPaymentMethod()\n {\n return $this->paymentMethod;\n }",
"public function getPaymenttype()\n {\n return $this->paymenttype;\n }",
"public function getPaymentMethod()\n {\n return $this->payment_method;\n }",
"public function get_payment_method() {\n\t\treturn $this->payment->get_payment_method();\n\t}",
"public function getPaymentType()\n {\n\n return 'IPAY';\n }",
"public function GetMethod () {\n\t\treturn $this->method;\n\t}",
"public function getMethod() {\n\t\tif (isset($_GET[$this->config->get('methodParam')]))\n\t\t\t$method = urldecode($_GET[$this->config->get('methodParam')]);\n\t\telse\n\t\t\t$method = $this->config->get('defaultMethod');\n\t\t\n\t\treturn strtolower($method);\n\t}",
"private function getPaymentMethod(){\r\n\r\n $paymentMethod = 1;\r\n switch($this->medio_pago){\r\n case 'webpay': {\r\n $paymentMethod = 1;\r\n break;\r\n }\r\n case 'servipag': {\r\n $paymentMethod = 2;\r\n break;\r\n }\r\n case 'multicaja': {\r\n $paymentMethod = 3;\r\n break;\r\n }\r\n case 'onepay': {\r\n $paymentMethod = 5;\r\n break;\r\n }\r\n case 'flow': {\r\n $paymentMethod = 9;\r\n break;\r\n }\r\n case 'webpay3c': {\r\n $paymentMethod = 13;\r\n break;\r\n }\r\n case 'mach': {\r\n $paymentMethod = 15;\r\n break;\r\n }\r\n default : {\r\n $paymentMethod = 1;\r\n break;\r\n } \r\n }\r\n\r\n return $paymentMethod;\r\n }",
"static public function GetMethod() {\n if (isset(self::$method))\n return self::$method;\n else\n return self::UNKNOWN;\n }",
"public function get_method() {\n\t\treturn $this->method;\n\t}",
"public function getType()\n {\n return $this->getParameter('type') ?: 'PaymentFlowInstant';\n }",
"public function getPaymentType()\n {\n switch ( $this->payment_type ) {\n case Contribution::PAYMENT_CASH:\n return 'cash';\n break;\n case Contribution::PAYMENT_CREDITCARD:\n return 'credit_card';\n break;\n case Contribution::PAYMENT_CHECK:\n return 'check';\n break;\n case Contribution::PAYMENT_TRANSFER:\n return 'transfer';\n break;\n case Contribution::PAYMENT_PAYPAL:\n return 'paypal';\n break;\n case Contribution::PAYMENT_OTHER:\n return 'other';\n break;\n default:\n Analog::log(\n __METHOD__ . ' Unknonw payment type ' . $this->payment_type,\n Analog::ERROR\n );\n throw new \\RuntimeException(\n 'Unknonw payment type ' . $this->payment_type\n );\n }\n\n }",
"public function getMethod()\n {\n return $this->values[\"method\"];\n }",
"public function getPayerType() {\n return $this->_payerType;\n }",
"private function get_payment_method($payment_type) {\r\n\t\t$info_pieces = explode('_', $payment_type);\r\n\t\t\r\n\t\treturn $info_pieces[0];\r\n\t}",
"protected function getMethod(): string\n {\n return $this->getTwoStep() ? 'rest/registerPreAuth.do' : 'rest/register.do';\n }",
"public function get_method() {\n return $this->_method;\n }",
"public function getMethod()\n {\n if (isset($_POST[$this->methodParam])) {\n return strtoupper($_POST[$this->methodParam]);\n } elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n return strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);\n } else {\n return isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';\n }\n }",
"public function getMethodsName($type)\n {\n $list = [];\n $get = [];\n $create = [];\n $update = [];\n $delete = [];\n\n $client = static::getInsalesApiClient();\n $methods = get_class_methods(get_class($client));\n $pattern = '/(List|Get|Create|Update|Delete)$/';\n\n $skipGroup = [\n 'field', //Недостаточно прав для операции\n 'domain', //Недостаточно прав для операции\n 'paymentGateway', //Недостаточно прав для операции\n 'deliveryVariant', //Недостаточно прав для операции\n ];\n\n foreach ($methods as $name) {\n $group = $this->getGroupMethod($name);\n preg_match($pattern, $name, $method);\n $method = trim(end($method));\n\n switch ($method) {\n case 'List':\n $list[$name] = $name;\n break;\n case 'Get':\n $get[$name] = $name;\n break;\n case 'Create':\n if (!in_array($group, $skipGroup)) {\n $create[$name] = $name;\n }\n\n break;\n case 'Update':\n if (!in_array($group, $skipGroup)) {\n $update[$name] = $name;\n }\n\n break;\n case 'Delete':\n if (!in_array($group, $skipGroup)) {\n $delete[$name] = $name;\n }\n\n break;\n }\n }\n\n return $$type;\n }",
"public function getMethod()\n {\n return $this->method ?: 'GET';\n }",
"public function getMethod()\t{\n\t\tif ($this->class != \"NoRoute\")\t{\n\t\t\treturn $this->method;\n\t\t}\n\t\treturn \"invoke\";\n\t}",
"public function getMethod() {\n \n return $this->method;\n \n }",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function getMethod(): string\n {\n return $this->method;\n }",
"public function getRequestMethod()\n\t{\n\t\t$method = $this->server->get('REQUEST_METHOD');\n\t\tif(in_array(strtoupper($method),$this->methods))\n\t\t{\n\t\t\treturn $method;\n\t\t}\n\t\treturn ;\n\t}",
"public function getRawType()\n {\n if ( $this->isCotis() ) {\n return 'membership';\n } else {\n return 'donation';\n }\n }",
"public function getMethod()\n {\n return Mage::getStoreConfig('smsnotifier/main_conf/message_type');\n //return Mage::helper('core')->decrypt($encrypted_pass);\n }",
"protected function getMethod(): string\n {\n if (strlen($this->method) == 0) {\n $this->method = 'get';\n }\n return $this->method;\n }",
"public function getMethod() {\r\n\t\treturn $this->method;\r\n\t}",
"public static function get_logP_method()\r\n {\r\n $method = new Methods();\r\n return $method->get_by_type(self::logP_METHOD_TYPE);\r\n }",
"protected function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n return $this->method;\n }",
"public function getMethod() {\n\t\treturn $this->method;\n\t}",
"public function getMethod() {\n\t\treturn $this->method;\n\t}",
"public function getMethod() {\n\t\treturn $this->method;\n\t}",
"public function getType()\n {\n return $this->depositType;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function method() {\n return $this->method;\n }",
"public function method() {\n return $this->method;\n }",
"public function getMethod()\r\n {\r\n return $this->method;\r\n }",
"public function get_payment_type() {\n\n\t\treturn 'credit_card' === $this->get_request()->get_order()->payment->type ? 'credit-card' : 'echeck';\n\t}",
"protected function getSavedCardsPaymentMethod()\n {\n return \\XLite\\Core\\Database::getRepo('XLite\\Model\\Payment\\Method')\n ->findOneBy(array('class' => self::METHOD_SAVED_CARD));\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->method;\n }",
"public function GetMethod() {\n\n $Server= $this->GetRequestContext()->SERVER;\n $Method= $Server['REQUEST_METHOD']; // it is always present\n\n // for XMLHttpRequest request return 'AJAX'\n if (isset($this->Headers['X-REQUESTED-WITH']) && $this->Headers['X-REQUESTED-WITH'] === 'XMLHttpRequest'\n && $this->GetOption('AcceptAjaxAsMethod')) {\n return 'AJAX';\n }\n\n // honor 'X-HTTP-METHOD-OVERRIDE' header\n if ($Method === 'POST' && isset($this->Headers['X-HTTP-METHOD-OVERRIDE'])) {\n return strtoupper($this->Headers['X-HTTP-METHOD-OVERRIDE']);\n }\n\n // override with custom method\n $Key= $this->GetOption('OverrideMethodField');\n $Post= $this->GetRequestContext()->POST;\n if ($Method === 'POST' && isset($Post[$Key])) {\n return strtoupper($Post[$Key]);\n }\n\n // return original value\n return $Method;\n }",
"public function getMethod ()\n {\n\n return $this->method;\n\n }",
"public function getRequestMethod()\n {\n if (is_null($this->method)) {\n $server = provider::access('server');\n\n if ($server->isExist('REQUEST_METHOD') && $server->isValid('REQUEST_METHOD', validate::T_PRINTABLE)) {\n $this->method = strtoupper($server->getValue('REQUEST_METHOD'));\n }\n }\n\n return $this->method;\n }",
"public function getMethod(){\n return $this->method;\n }",
"public function fetch_method()\n\t{\n\t\t$method = $this->route_stack[self::SEG_METHOD];\n\t\treturn ($method === $this->fetch_class()) ? 'index' : $method;\n\t}",
"public function getMethod()\n\t{\n\t\t//current method\n\t\t$httpMethod = mb_strtoupper($this->getRequestMethod());\n\t\t// If it's a HEAD request override it to being GET and prevent any output, as per HTTP Specification\n\t\t// @url http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4\n\t\tif ($httpMethod === Request::HEAD) {\n\t\t\t$httpMethod = Request::GET;\n\t\t}\n\n\t\t//When request is POST then check whether method override was sent and check whether in the method override have an annother method\n\t\t//like PUT, PATCH or DELETE \n\t\tif ($httpMethod === Request::POST) {\n\t\t\t$httpHeaders = $this->getServerParams();\n\n\t\t\tif (isset($httpHeaders['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n\t\t\t\t$overrideMethod = $httpHeaders['HTTP_X_HTTP_METHOD_OVERRIDE'];\n\n\t\t\t\tif (in_array($overrideMethod, array('PUT', 'DELETE', 'PATCH'))) {\n\t\t\t\t\t$httpMethod = $overrideMethod;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$httpMethod = $httpHeaders['REQUEST_METHOD'];\n\t\t\t}\n\t\t}\n\n\t\t//return current method\n\t\treturn $httpMethod;\n\t}",
"public function getType()\n {\n return self::TYPE;\n }",
"public function get_type(): string;",
"public function getMethod()\n {\n if($this->_method == NULL || !isset($this->_method))\n {\n $this->_method = substr(get_class($this),3);\n }\n \n return $this->_method;\n }",
"public function method(): string\n {\n return \\strtoupper($this->request()->getMethod());\n }",
"public function getMethod() \n {\n return $this->method;\n }",
"function getMethod()\n {\n return $this->method;\n }",
"public function getCheckoutMethod()\n {\n if ($this->getCustomerSession()->isLoggedIn()) {\n return self::METHOD_CUSTOMER;\n }\n if (!$this->getQuote()->getCheckoutMethod()) {\n if (Mage::helper('firecheckout')->isAllowedGuestCheckout()) {\n $this->getQuote()->setCheckoutMethod(self::METHOD_GUEST);\n } else {\n $this->getQuote()->setCheckoutMethod(self::METHOD_REGISTER);\n }\n }\n return $this->getQuote()->getCheckoutMethod();\n }",
"protected function getRequestMethod() {\n\t\tif($this->_requestMethod === null) {\n\t\t\t$this->_requestMethod = $_SERVER['REQUEST_METHOD'];\n\t\t}\n\t\treturn $this->_requestMethod;\n\t}",
"public function method() {\n\t\treturn strtoupper($this->getMethod());\n\t}",
"public function getMethod ()\n {\n return $this->method;\n }",
"public function getMethod()\n {\n return $this->getAttribute('method', 'get');\n }",
"public function getMethod()\n {\n $output = $this->product->getMethod();\n return $output;\n }",
"public function getMethod() : string\n {\n return $this->method;\n }",
"public function method()\n {\n return $this->method;\n }",
"public function method()\n {\n return $this->method;\n }"
] | [
"0.71292573",
"0.706702",
"0.70372164",
"0.688519",
"0.6766512",
"0.67069995",
"0.65590346",
"0.65417457",
"0.6532208",
"0.6505225",
"0.6439814",
"0.64316154",
"0.6410438",
"0.63374287",
"0.63341784",
"0.63274676",
"0.63253784",
"0.63081175",
"0.63081175",
"0.63029885",
"0.62921",
"0.62410593",
"0.6209078",
"0.6184881",
"0.61735874",
"0.61515695",
"0.61334956",
"0.6099835",
"0.6087288",
"0.60515416",
"0.60429007",
"0.60294765",
"0.60251355",
"0.600762",
"0.59704024",
"0.5951475",
"0.59456456",
"0.59426016",
"0.5924244",
"0.5921983",
"0.58855116",
"0.58855116",
"0.58793557",
"0.58689594",
"0.58659667",
"0.5864243",
"0.5861838",
"0.5860162",
"0.5859142",
"0.5848502",
"0.5848502",
"0.5848502",
"0.5848404",
"0.5848404",
"0.5848404",
"0.58432734",
"0.5838376",
"0.58356184",
"0.5835039",
"0.58277637",
"0.58225536",
"0.58132786",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.58123493",
"0.5811278",
"0.58096987",
"0.58061206",
"0.5802163",
"0.580184",
"0.58013004",
"0.57974374",
"0.5786223",
"0.57726324",
"0.577248",
"0.57724255",
"0.5771226",
"0.5767466",
"0.5757937",
"0.5751815",
"0.5751458",
"0.5749134",
"0.5741778",
"0.5740959",
"0.57311183",
"0.57311183"
] | 0.0 | -1 |
Set the method type (Upstream Pay method), it can be primary or secondary. | public function setType(string $type): self; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMethod($request_method) {}",
"public function setMethod($method);",
"public function setMethod($method);",
"public function setMethod($value) { $this->_method = $value; }",
"public function SetMethod ($method = NULL);",
"public function set_type($type) {\n $this->update([\n 'type' => $type\n ]);\n\n $this->type = $type;\n\n // finish configuring this OrderExchange\n $this->sync();\n }",
"private function setMethodType(\\LewNelson\\Namecheap\\NamecheapMethodTypesInterface $object, $method_type)\r\n {\r\n $method_type = Utilities::convertCamelCaseToUnderscore($method_type);\r\n $this->$method_type = $object;\r\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = strtolower($method);\n }",
"public function setMethod(string $method): self;",
"public function setMethod($requestMethod)\n {\n $this->_method = $requestMethod;\n }",
"public function setType(string $type) {\n if ($type == Router::API_ROUTE || $type == Router::CLOSURE_ROUTE ||\n $type == Router::CUSTOMIZED || $type == Router::VIEW_ROUTE) {\n $this->type = $type;\n }\n }",
"public function setType($type) {}",
"public function setType($type){ }",
"public function set_method($method)\n {\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"public function setMethod($method)\n {\n $this->method = $method;\n }",
"function setType($type) {\n $this->type = $type;\n }",
"public function set_method($method) {\n $this->_method = (string)$method;\n }",
"function setType($type) {\n\t\t$this->_type = $type;\n\t}",
"function setType($type) {\n\t\t$this->_type = $type;\n\t}",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType( $type )\n {\n }",
"public function setPaymentType($payment_type){\n $this->payment_type = $payment_type;\n }",
"public function setMethod($method)\n {\n $this->setAttribute('method', strtolower($method));\n }",
"public function initPaymentMethod()\n {\n $helper = Mage::helper('onestepcheckout/payment');\n // check if payment saved to quote\n if (!$this->getQuote()->getPayment()->getMethod()) {\n $data = array();\n $paymentMethods = $helper->getPaymentMethods();\n if ((count($paymentMethods) == 1)) {\n $currentPaymentMethod = current($paymentMethods);\n $data['method'] = $currentPaymentMethod->getCode();\n } elseif ($lastPaymentMethod = $helper->getLastPaymentMethod()) {\n $data['method'] = $lastPaymentMethod;\n } elseif ($defaultPaymentMethod = Mage::helper('onestepcheckout/config')->getDefaultPaymentMethod()) {\n $data['method'] = $defaultPaymentMethod;\n }\n if (!empty($data)) {\n try {\n $this->getOnepage()->savePayment($data);\n } catch (Exception $e) {\n // catch this exception\n }\n }\n }\n }",
"public function setType($type)\r\n {\r\n $this->type = $type;\r\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"function setType($type = \"\")\n\t\t{\n\t\t\t$this->type = $type;\n\t\t}",
"public function SetType($type){\r\r\n\t\t$this->type = (string) $type;\r\r\n\t}",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType( $type ) {\n\n\t\t$this->type = $type;\n\t}",
"public function setType(?string $type): void;",
"public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}",
"public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}",
"public function set_type($type){\n // remove unwanted types -> they should not be send from client\n // -> reset keys! otherwise JSON format results in object and not in array\n $type = array_values(array_intersect(array_unique((array)$type), self::$connectionTypeWhitelist));\n\n // set EOL timestamp\n if( !in_array('wh_eol', $type) ){\n $this->eolUpdated = null;\n }elseif(\n in_array('wh_eol', $type) &&\n !in_array('wh_eol', (array)$this->type) // $this->type == null for new connection! (e.g. map import)\n ){\n // connection EOL status change\n $this->touch('eolUpdated');\n }\n\n return $type;\n }",
"public function SetType($type){\r\n\t\t$this->type = (string) $type;\r\n\t}",
"public function setType(?string $type): void\n {\n }",
"public static function setMethod($val) \n { \n emailSettings::$method = $val; \n }",
"public function setMethod (string $method)\n {\n $this->method = $method;\n $this->save();\n return $this;\n }",
"public function getPaymentMethodType() {\r\r\n return $this->_paymentMethod;\r\r\n }",
"public function setMethod( $method )\n\t{\n\t\t$this->setAttribute( \"method\", $method );\n\t}",
"public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}",
"public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}",
"protected function setMethod($method) {\n $this->_method = $method;\n }",
"public function setType($type) {\n\t\t$this->data['type'] = $type;\n\t}",
"function choosePaymentMethod() {\n $booking = $this->Session->read('booking');\n // find all unpaid bookings\n $unpaid = $this->Payment->Booking->User->findUnpaid($this->Auth->user('id'));\n if ($booking) {\n // it's probably appropriate to save it at this point\n if ($this->Session->read('booking.saved') == false) {\n $bid = $this->Payment->Booking->saveBooking($booking, $this->Auth->user('id'));\n if ($bid === false) {\n $this->setFlash('Error: Could Not Save Booking');\n } else {\n $this->Session->write('booking.saved', true);\n $newbooking = $this->Payment->Booking->find('first', array(\n 'conditions' => array('Booking.id' => $bid),\n 'recursive' => '2'\n ));\n array_push($unpaid, $newbooking);\n }\n }\n }\n $this->set('unpaid', $unpaid);\n $this->set('allowedPaymentTypes', $this->allowedPaymentTypes);\n }",
"public function setType(string $type);",
"public function paymentMethodType()\n {\n return $this->hasOne(\\Cot\\PaymentMethodType::class);\n }",
"public function setDefaultActivePaymentMethod()\n {\n $criteria = new CDbCriteria;\n $criteria->select = 't.name, t.value';\n $criteria->condition = \"t.name LIKE 'payment_method_%' AND t.value = 1\";\n\n $data = Option::model()->findAll($criteria);\n\n $payment_method_options = array();\n\n foreach($data as $option) {\n if($option->name == 'payment_method_paypal') $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n if($option->name == 'payment_method_skrill') $payment_method_options[] = self::PAYMENT_METHOD_MONEY_BOOKERS;\n if($option->name == 'payment_method_wiretransfer') $payment_method_options[] = self::PAYMENT_METHOD_WIRE_TRANSFER;\n if($option->name == 'payment_method_check') $payment_method_options[] = self::PAYMENT_METHOD_CHECK;\n if($option->name == 'payment_method_no_payment') $payment_method_options[] = self::PAYMENT_METHOD_NO_PAYMENT;\n }\n\n if(empty($payment_method_options))\n $payment_method_options[] = self::PAYMENT_METHOD_PAY_PAL;\n\n if(!in_array($this->payment_method, $payment_method_options))\n $this->payment_method = $payment_method_options[0];\n }",
"public function setPaymentMethod($method)\n {\n $this->_data['MediosPago'] = $method;\n }",
"public function setPaymentMethod($value) \n {\n $this->_fields['PaymentMethod']['FieldValue'] = $value;\n return $this;\n }",
"protected function get_method_type() {\n\n\t\treturn isset( $this->response_data->expMonth ) ? 'credit_card' : 'echeck';\n\t}",
"public function set_method($method)\n\t{\n\t\t$this->route_stack[self::SEG_METHOD] = $method;\n\t}",
"public function setResponseType() {\n\t\t$uri_end = end($this->registry->router->uri);\n\t\t$this->response_type = substr(strrchr($uri_end,'.'),1);\n\t\t\n\t\tif($this->response_type) {\n\t\t\t\n\t\t\t// remove the extension from the method so that it loads properly\n\t\t\t$response_index = count($this->registry->router->uri) - 1;\n\t\t\t$this->registry->router->uri[$response_index] = str_replace(\".\".$this->response_type,'',$this->registry->router->uri[$response_index]);\n\t\t\t\n\t\t} else {\n\t\t\techo \"no response type defined\";\n\t\t\texit;\n\t\t}\n\t}",
"public function setRequestMethod($method) {}",
"function lb_subscription_set_payment_type($account, $subscription, $payment_type) {\n // The $account that rules passes contains the original information, which may have\n // changed as a result of an action that has run.\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n if ($account_subscription_data['delta'] === NULL) {\n lb_subscription_set_subscription($entity, $subscription);\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n }\n if ($account_subscription_data['delta'] !== NULL) {\n if ($account_subscription_data['payment_type'] != $payment_type) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_payment_type'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $payment_type,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n }\n}",
"private function setMethod(string $method): void\n {\n $this->method = $method;\n }",
"public function getPaymentType()\n {\n\n return 'IPAY';\n }",
"private function setMethod($method) {\n return;\n }",
"public function getPaymentType(){\n return $this->payment_type;\n }",
"public function setConnectionType( $type = '' ) {\n if ( ! empty( $type ) ) {\n update_option( self::CONNECTION_TYPE, $type );\n }\n }",
"public function setType(?string $type): void\n {\n $this->type = $type;\n }",
"public function setType(?string $type): void\n {\n $this->type = $type;\n }",
"public function setMethod(BankPaymentType $method): self\n {\n $this->method = $method;\n\n return $this;\n }",
"public function setResourceMethod($resourceMethod);",
"public function setType($type)\n {\n $this['type'] = $type;\n }",
"function setMethod( $val){\n\t$this->_method = $val;\n\t}",
"public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }",
"protected function setType(int $type):void {\r\n\t\t$this->type = $type;\r\n\t}",
"public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}",
"public static function setMethod(string $method): void {\r\n $_SERVER['REQUEST_METHOD'] = strtoupper($method);\r\n }",
"public function setMethod($method)\n\t{\n\t\t//Inline bots adds answerInlineQuery.\n\t\t$this->method = $method;\n\t\treturn True;\n\t}",
"public function setPaymentMethod($value)\n {\n return $this->set(self::payment_method, $value);\n }",
"public function testGetPostMethodType() {\n $type = new MethodEnum();\n $this->assertSame('POST', MethodEnum::POST);\n $this->assertSame('POST', $type(MethodEnum::POST ));\n }",
"public function setAuthenticationType( $type ) {\n\t\t$this->_mAuthenticationType = $type;\n\t}",
"public function setPaymentMethod($paymentMethod = 'CC') {\n $method = array(\n 'x_method'=>strtoupper($paymentMethod),\n );\n $this->NVP = array_merge($this->NVP, $method); \n }",
"function setType($type) {\n\t\treturn $this->type = $type;\n\t}"
] | [
"0.6323319",
"0.61291957",
"0.61291957",
"0.60944873",
"0.6035735",
"0.602574",
"0.5998133",
"0.5968025",
"0.59463066",
"0.59297174",
"0.59146297",
"0.58952636",
"0.58526653",
"0.58499074",
"0.5824971",
"0.5796151",
"0.5796151",
"0.5796151",
"0.5796151",
"0.579468",
"0.5777303",
"0.5756903",
"0.5756903",
"0.5751494",
"0.5751494",
"0.5751494",
"0.5743388",
"0.5727415",
"0.5725443",
"0.5709556",
"0.57007736",
"0.56734353",
"0.56734353",
"0.5670728",
"0.56534994",
"0.56327087",
"0.56327087",
"0.56327087",
"0.56327087",
"0.56327087",
"0.56327087",
"0.56327087",
"0.56327087",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5630021",
"0.5628396",
"0.5628249",
"0.5620062",
"0.5620062",
"0.5607356",
"0.55947846",
"0.5592378",
"0.55889374",
"0.5586819",
"0.5584847",
"0.5580447",
"0.55621314",
"0.55621314",
"0.5558366",
"0.5555888",
"0.5553301",
"0.5542205",
"0.55384916",
"0.5522908",
"0.5505843",
"0.5494368",
"0.5483439",
"0.5463345",
"0.544778",
"0.5441926",
"0.54385686",
"0.5437582",
"0.5434909",
"0.5431922",
"0.5415565",
"0.5410897",
"0.5397657",
"0.5397657",
"0.53928435",
"0.53898853",
"0.538536",
"0.53847915",
"0.5383207",
"0.5374927",
"0.53741306",
"0.53725404",
"0.5371156",
"0.53695107",
"0.5354193",
"0.53487843",
"0.5342671",
"0.53233725"
] | 0.55020034 | 72 |
Get the creation date of the UpStream Pay payment method. | public function getCreatedAt(): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPaymentDate() {\n\t\t// return $this->created_at;\n\t\treturn $this->account ? $this->account->payment_date : $this->created_at;\n\t}",
"public function getPaymentDate();",
"public function getDateCreate()\n\t{\n\t\treturn $this->dateCreate;\n\t}",
"function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}",
"public function getDate_creation()\n {\n return $this->date_creation;\n }",
"public function getDateCreate()\n {\n return $this->date_create;\n }",
"public function getDateCreate()\n {\n return $this->date_create;\n }",
"public function get_date_create()\n\t{\n\t\treturn $this->date_create;\n\t}",
"public function getCreationDate() {\n\n return $this->u_creationdate;\n\n }",
"public function getDateCreation()\n {\n return $this->date_creation;\n }",
"public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}",
"public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}",
"public function getCreateDate()\n {\n return $this->create_date;\n }",
"public function getDateCreation()\n {\n return $this->dateCreation;\n }",
"public function getDateCreation()\n {\n return $this->dateCreation;\n }",
"public function getDateCreation()\n {\n return $this->dateCreation;\n }",
"public function getSignUpDate() {\n\t\treturn $this->signUpDate;\n\t}",
"public function getCreateDate(): string\n {\n return $this->create_date;\n }",
"public function getCreationDate()\n {\n return $this->creation_date;\n }",
"public function getCreationDate()\n {\n return $this->creation_date;\n }",
"public function get_creation_date()\n {\n return $this->get_default_property(self::PROPERTY_CREATION_DATE);\n }",
"public function getCreationDate()\n {\n return $this->created;\n }",
"public function getCreationDate();",
"public function getCreateDate()\n\t{\n\t\treturn $this->CreateDate;\n\t}",
"public function getCreationDate()\n {\n return $this->creationDate;\n }",
"public function getCreationDate()\n {\n return $this->creationDate;\n }",
"public function getCreationDate()\n {\n return $this->creationDate;\n }",
"public function getCreationDate()\n {\n return $this->creationDate;\n }",
"public function getCreationDate()\n {\n return $this->creationDate;\n }",
"public function getCreationDate() {\n return $this->creationDate;\n }",
"function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}",
"function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}",
"public function getCreationDate() {\n\t\treturn $this->creationDate;\n\t}",
"public function getCreationDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->creationDate;\r\n\t}",
"public function getCreate_date(){\n return $this->create_date;\n }",
"public function getCreationDate() \r\n { \r\n return $this->_creationDate; \r\n }",
"public function getCreationDatetime()\n {\n return $this->getValue('nb_icontact_prospect_creation_datetime');\n }",
"public function getCreateDate()\n {\n $this->create_date = null;\n\n return;\n }",
"public function getCreateAt()\n {\n return $this->create_at;\n }",
"public static function getPayDate() {\n return new DateTime(date(\"Ymd H:i:s\", strtotime('+ 7 days')));\n }",
"public function get_date_created();",
"public function getDatecreation_user()\r\n {\r\n return $this->datecreation_user;\r\n }",
"public function getCreate_at()\n {\n return $this->create_at;\n }",
"public function getCreate_at()\n {\n return $this->create_at;\n }",
"public function getPayDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->payDate;\r\n\t}",
"public function getCreation()\n {\n return $this->creation;\n }",
"public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }",
"public function getCreatedDate() {\n return $this->get('created_date', 'user');\n }",
"public function getPaymentDate(): RDate\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\n \\sprintf(\n __METHOD__.\" get '%s'\",\n $this->paymentDate->format(RDate::SQL_DATE)\n )\n );\n return $this->paymentDate;\n }",
"public function getDateCreated();",
"public function getSignatureDate() {\n return $this->signatureDate;\n }",
"public function getSignatureDate() {\n return $this->signatureDate;\n }",
"public function getCreateTs()\n {\n return $this->create_ts;\n }",
"public function getPurchaseDateCreated() {\n return $this->purchaseDateCreatedDate;\n }",
"public function getCreatedDate();",
"public function getCreated()\n {\n if (is_string($this->created))\n $this->created = new UDate($this->created);\n return $this->created;\n }",
"public function getCreatetime()\n {\n return $this->createTime;\n }",
"public function getOriginalCreationDate() {\n return $this->originalCreationDate;\n }",
"public function getCreatedAt()\n {\n return $this->sys->getCreatedAt();\n }",
"public function getFormattedPaymentDate(): string;",
"public function getCreatedDate()\n {\n return $this->created_date;\n }",
"public function getCreatetime()\n {\n return $this->createtime;\n }",
"public function getCreateDate(): int;",
"function getCreatedDate() {\n\t\treturn $this->_CreatedDate;\n\t}",
"function created() {\n return date('Y-m-d H:i:s');\n }",
"public function getCreatedThingTransferDate()\n {\n $value = $this->get(self::CREATEDTHINGTRANSFERDATE);\n return $value === null ? (string)$value : $value;\n }",
"public function getCreationTime(){\n\t\treturn $this->creationTime;\n\t}",
"public function getDateCreated() {\n return($this->dateCreated);\n }",
"public function getCreationTime()\n {\n return $this->creation_time;\n }",
"public function created() {\n\t\treturn gmdate( 'Y-m-d\\TH:i:s\\Z' );\n\t}",
"function vads_trans_date() {\n $date = date('YmdHis');\n return $date;\n }",
"public function getCreationTime(){\r\n\t\treturn $this->creationTime;\r\n\t}",
"public function getCreationTimestamp()\n {\n return isset($this->creation_timestamp) ? $this->creation_timestamp : '';\n }",
"public function getCreatedOn() {\n return $this->createdOn;\n }",
"public function created_at()\n {\n return ExpressiveDate::make($this->created_at)->getRelativeDate();\n }",
"public function getCreatedDate()\r\n\t\t{\r\n\t\t\treturn date('m/d/Y', strtotime($this->_created_date));\r\n\t\t}",
"public function getDateCreated() {\r\n return $this->_date_created;\r\n }",
"public function _getCreatedOn() {\n\t\treturn $this->_createdOn;\n\t}",
"public function getCreateddate()\n {\n return $this->createddate;\n }",
"public function getDateCreated() {\n return $this->dateCreated;\n }",
"public function getDateCreated()\n\t{\n\t\t$date = new Precurio_Date($this->date_created);\n\t\tif($date->isYesterday()) return 'Yesterday';\n\t\tif($date->isToday()) return 'Today';\n\t\t\n\t\treturn $date->get(Precurio_Date::DATE_SHORT);\n\t}",
"public function getDateCreated()\n {\n return $this->dateCreated;\n }",
"public function getDateCreated()\n {\n return $this->dateCreated;\n }",
"public function getDateCreated()\n {\n return $this->date_created;\n }",
"public function getDateCreated()\n {\n return $this->date_created;\n }",
"public function getCreatedDate()\n {\n return isset($this->CreatedDate) ? $this->CreatedDate : null;\n }",
"public function getDateCreated()\n {\n return $this->_DateCreated;\n }",
"public function getCreated()\r\n {\r\n return $this->created;\r\n }",
"public function getCreated() {\n\n $createdDateTime = \\DateTime::createFromFormat('Y-m-d H:i:s', $this->created);\n return $createdDateTime;\n\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }",
"public function getCreated()\n {\n return $this->created;\n }"
] | [
"0.68526983",
"0.67178136",
"0.6521741",
"0.6508159",
"0.64983726",
"0.6474219",
"0.6474219",
"0.6466675",
"0.6465898",
"0.64563006",
"0.64245254",
"0.64245254",
"0.64069015",
"0.64066577",
"0.64066577",
"0.64066577",
"0.63769734",
"0.63253444",
"0.6324338",
"0.6324338",
"0.6304505",
"0.6303725",
"0.63028336",
"0.6301519",
"0.62905395",
"0.62905395",
"0.62905395",
"0.62905395",
"0.62905395",
"0.6289421",
"0.6248989",
"0.6248989",
"0.62441343",
"0.6212185",
"0.6203145",
"0.6110209",
"0.60909504",
"0.6073206",
"0.6036819",
"0.6027948",
"0.59930605",
"0.59509987",
"0.5926768",
"0.5926768",
"0.59262884",
"0.588991",
"0.5887097",
"0.5885055",
"0.5875983",
"0.5872864",
"0.5860847",
"0.5860847",
"0.5846991",
"0.5843293",
"0.58374417",
"0.5796958",
"0.5778072",
"0.5774119",
"0.57735795",
"0.5772063",
"0.5762095",
"0.5736031",
"0.57116836",
"0.5698005",
"0.56908023",
"0.5689927",
"0.56860274",
"0.5683168",
"0.5670036",
"0.5666632",
"0.564672",
"0.5644978",
"0.56446415",
"0.56317604",
"0.56297576",
"0.56292236",
"0.5625481",
"0.5613664",
"0.56038624",
"0.55952346",
"0.5588104",
"0.5580704",
"0.5580704",
"0.5575678",
"0.5575678",
"0.5565359",
"0.55420554",
"0.5530359",
"0.5518553",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366",
"0.5513366"
] | 0.0 | -1 |
Set the creation date of the UpStream Pay payment method. The DB will automatically set this info. | public function setCreatedAt(string $createdAt): self; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setCreationDate($date) {}",
"public function setCreationDate($date = true) {}",
"public function setCreateDates(){\n $t = date_create(date('Y-m-d H:i:s'));\n $this->created = $t;\n $this->modified = $t;\n }",
"protected function _syncCreationDate() {}",
"public function setPaymentDate($payment_date);",
"public function setCreateDate(int $create_date);",
"private function actionAlterTablePaymentSetTimestamp() {\n $this->changeTableColumnToTimestamp(TB_VPS_PAYMENT, array(\"payment_date\"), \"payment_id\");\n echo TB_VPS_PAYMENT . \" DONE <br/>\";\n }",
"public function getCreateDate()\n {\n $this->create_date = null;\n\n return;\n }",
"public function setCreatedAt()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreatedAtValue()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreationTime()\n {\n $this->userDateCreation = new \\DateTime(\"now\");\n $this->userDateLastConnection = new \\DateTime(\"now\");\n $this->userActive = 'true';\n $this->userAdmin = $this->userAdmin == 'true' ? 'true' : 'false';\n }",
"public function setCreateDate($createDate) {\n\t\t$this->createDate = $createDate;\n\t}",
"public function setCreateDate($createDate) {\n\t\t$this->createDate = $createDate;\n\t}",
"public function createPayment()\n\t{\n\n\t}",
"public function beforeCreate()\n {\n // init fields by default\n $this->setDateCreate(new \\DateTime());\n }",
"public function setCreateDate(string $create_date): void\n {\n $this->create_date = $create_date;\n }",
"public function setUpRegisterDate()\n {\n $this->setRegisterDate(new \\DateTime());\n }",
"public function beforeSave()\n {\n $this->CreatedAt = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }",
"public function setCreationDate(\\DateTime $creationDate) {\n\t\t$this->creationDate = $creationDate;\n\t}",
"public function setValueDefault()\n {\n $this->createdAt = new \\DateTime();\n }",
"public function setCreated($date)\n {\n $this->created = $date;\n }",
"public function set_creation_date($created)\n {\n $this->set_default_property(self::PROPERTY_CREATION_DATE, $created);\n }",
"public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}",
"public function prePersist()\n {\n $this->dateCreation = new \\DateTime();\n }",
"public function db_prep_set() {\n if ($this->created_on === null || $this->created_on < new DateTime('0000-00-00')) {\n $this->created_on = DB::T(DB::NOW);\n if (Conf::$USER !== null) {\n $this->created_by = Conf::$USER->id;\n }\n }\n else {\n $this->last_updated_on = DB::T(DB::NOW);\n if (Conf::$USER !== null) {\n $this->last_updated_by = Conf::$USER->id;\n }\n }\n }",
"public function beforeSave() {\n if($this->getIsNewRecord()) {\n // The created date must be set only once, on creation\n $this->created_at = new CDbExpression(\"NOW()\");\n }\n // The updated date must be reset on every action\n $this->updated_at = new CDbExpression(\"NOW()\");\n\n if ($this->payment_method == self::PAYMENT_METHOD_PAY_PAL) {\n $this->mbEmail = '';\n $this->money_bookers_id = '';\n } elseif ($this->payment_method == self::PAYMENT_METHOD_PAY_PAL) {\n $this->ppEmail = '';\n }\n\n return parent::beforeSave();\n }",
"public function setDate($date);",
"public function beforeSave()\n {\n $this->created = new \\DateTime('now', new \\DateTimeZone('UTC'));\n }",
"function setCreateDate($inCreateDate) {\n\t\tif ( $inCreateDate !== $this->_CreateDate ) {\n\t\t\tif ( !$inCreateDate instanceof DateTime ) {\n\t\t\t\t$inCreateDate = new systemDateTime($inCreateDate, system::getConfig()->getSystemTimeZone()->getParamValue());\n\t\t\t}\n\t\t\t$this->_CreateDate = $inCreateDate;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}",
"function setCreated() \n {\n $this->setValueByFieldName( 'statevar_isCreated', 1 );\n $this->updateDBTable();\n }",
"public function setDateTime($value)\n {\n $this->createdAt=$value;\n }",
"private function _setDate(){\n\t\tif($this->_year>=1970&&$this->_year<=2038){\n\t\t\t$this->_day = date('d', $this->_timestamp);\n\t\t\t$this->_month = date('m', $this->_timestamp);\n\t\t\t$this->_year = date('Y', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, true);\n\t\t\t$this->_day = sprintf('%02s', $dateParts['mday']);\n\t\t\t$this->_month = sprintf('%02s', $dateParts['mon']);\n\t\t\t$this->_year = $dateParts['year'];\n\t\t}\n\t\t$this->_date = $this->_year.'-'.$this->_month.'-'.$this->_day;\n\t}",
"public function beforeInsert()\n {\n $this->owner->{$this->createdAtField} = date($this->format);\n $this->owner->{$this->updatedAtField} = date($this->format);\n }",
"public function setCreatedDate($date)\r\n\t\t{\r\n\t\t\t$this->_created_date = $date;\r\n\t\t}",
"function set_date_to_now()\n {\n $this->timestamp=time();\n }",
"public function getCreate_date(){\n return $this->create_date;\n }",
"public function getPaymentDate();",
"public function populateDefaults(){\n\t\tparent::populateDefaults();\n\t\t\n\t\t$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));\n\t}",
"public function getPaymentDate() {\n\t\t// return $this->created_at;\n\t\treturn $this->account ? $this->account->payment_date : $this->created_at;\n\t}",
"public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }",
"public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }",
"public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }",
"public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }",
"public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }",
"public function onPrePersist()\n {\n $this->createdAt = new \\DateTime(\"now\");\n }",
"public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }",
"public function beforeCreate()\n {\n $this->created_at = date('Y-m-d H:i:s');\n }",
"public function onPrePersist()\n {\n $this->fechaCreacion = new \\DateTime(\"now\");\n }",
"public function setCreated(\\DateTime $created) {\n\n $this->created = $created->format('Y-m-d H:i:s');\n\n }",
"public function onPrePersist()\r\n {\r\n $this->created_at = new \\DateTime(\"now\");\r\n }",
"public function setCreatedAt(?string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt(?string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreatedAt(DateTime $date);",
"public function getCreateDate()\n {\n return $this->create_date;\n }",
"public function setCreationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('creationDateTime', $value);\n }",
"public function setCreationDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('creationDateTime', $value);\n }",
"public function setCreateDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->create_date !== null || $dt !== null) {\n $currentDateAsString = ($this->create_date !== null && $tmpDt = new DateTime($this->create_date)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->create_date = $newDateAsString;\n $this->modifiedColumns[] = BangunanPeer::CREATE_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function getCreationDate() {\n\n return $this->u_creationdate;\n\n }",
"public function addCreated()\n {\n try {\n $date = new DateTime();\n $this->created_at = $date->format('Y-m-d H:i:s');\n $this->created_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function save() {\n\t\tif (!$this->created)\n\t\t\t$this->created = date('Y-m-d H:i:s');\n\t\treturn parent::save();\n\t}",
"public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}",
"public function getCreateDate() {\n\t\treturn $this->createDate;\n\t}",
"function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}",
"public function onPrePersist()\n {\n $this->setCreatedAt(new \\DateTime());\n }",
"public function setCreatedDate(DateTime $createdDate);",
"public function setCreatedAt(string $createdAt): void\n {\n $this->createdAt = $createdAt;\n }",
"public function setCreateDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->create_date !== null || $dt !== null) {\n $currentDateAsString = ($this->create_date !== null && $tmpDt = new DateTime($this->create_date)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ( ($currentDateAsString !== $newDateAsString) // normalized values don't match\n || ($dt->format('Y-m-d H:i:s') === '2020-04-16 09:40:03') // or the entered value matches the default\n ) {\n $this->create_date = $newDateAsString;\n $this->modifiedColumns[] = SekolahPaudPeer::CREATE_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function getCreateDate()\n\t{\n\t\treturn $this->CreateDate;\n\t}",
"public function run()\n {\n PaymentMethod::create([\n 'description_payment_methods'=>'P3'\n ]);\n }",
"public function postCreatePayPeriod(){\n \n $pay_period = new TimeTrackingPayPeriod();\n $this->postPayPeriod($pay_period);\n \n }",
"public function setCreatedAt($createdAt) \r\n {\r\n $this->createdAt = $createdAt;\r\n }",
"public function prePersist()\n {\n $this->date_created = new \\DateTime();\n }",
"public function setCreated($date) \n\t{\n\t\t$this->created = $this->parseDate($date);\n\t}",
"public function setCreateDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->create_date !== null || $dt !== null) {\n $currentDateAsString = ($this->create_date !== null && $tmpDt = new DateTime($this->create_date)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ( ($currentDateAsString !== $newDateAsString) // normalized values don't match\n || ($dt->format('Y-m-d H:i:s') === '2021-06-07 11:49:57') // or the entered value matches the default\n ) {\n $this->create_date = $newDateAsString;\n $this->modifiedColumns[] = SanitasiPeer::CREATE_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"public function getDateCreate()\n\t{\n\t\treturn $this->dateCreate;\n\t}",
"public function onPrePersist()\n {\n $this->setCreated(new \\DateTime(\"now\"));\n }",
"public function setCreateDate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->create_date !== null || $dt !== null) {\n $currentDateAsString = ($this->create_date !== null && $tmpDt = new DateTime($this->create_date)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->create_date = $newDateAsString;\n $this->modifiedColumns[] = JadwalPeer::CREATE_DATE;\n }\n } // if either are not null\n\n\n return $this;\n }",
"private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}",
"function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}",
"function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}",
"public function setCreated($created);",
"public function setCreated($created);",
"public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }",
"public function getDateCreate()\n {\n return $this->date_create;\n }",
"public function getDateCreate()\n {\n return $this->date_create;\n }",
"public function setCreate_date($create_date){\n $this->create_date = $create_date;\n return $this;\n }",
"protected function setDefaultValues()\n {\n $this->setFieldValue(self::FIELD_CREATED, time());\n }",
"public function set_date_create($date_create) \n\t{\n\t\t$this->date_create = $date_create;\n\t\treturn $this;\n\t}",
"public function setPaymentDate(RDate $paymentDate): void\n {\n $this->paymentDate = $paymentDate;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\n \\sprintf(\n __METHOD__.\" set to '%s'\",\n $this->paymentDate->format(RDate::SQL_DATE)\n )\n );\n }",
"public function beforeSave()\n {\n $this->createdAt = new \\DateTime( 'now', new \\DateTimeZone( 'UTC' ) );\n $this->updatedAt = new \\DateTime( 'now', new \\DateTimeZone( 'UTC' ) );\n }",
"public function onPrePersist()\n {\n $this->fechaUltimaModificacion = new \\DateTime(\"now\");\n }",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function setCreatedAt($createdAt);",
"public function onPrePersist()\n {\n $this->created = new \\DateTime('now');\n }",
"public function prePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }"
] | [
"0.6821997",
"0.66016597",
"0.66016597",
"0.6596195",
"0.638352",
"0.62294364",
"0.62050384",
"0.6176323",
"0.6130548",
"0.60814",
"0.6035228",
"0.59878564",
"0.5961503",
"0.5936572",
"0.59281224",
"0.59281224",
"0.5911937",
"0.5885293",
"0.58767813",
"0.5825121",
"0.5812772",
"0.57989055",
"0.57933444",
"0.5762671",
"0.5762437",
"0.57259846",
"0.57044834",
"0.5702467",
"0.56963575",
"0.5663225",
"0.56560504",
"0.5649634",
"0.56426084",
"0.5630136",
"0.5611474",
"0.56087935",
"0.5600702",
"0.5591121",
"0.5590695",
"0.5574594",
"0.5574537",
"0.5564483",
"0.55628675",
"0.55628675",
"0.55628675",
"0.55628675",
"0.55628675",
"0.55628675",
"0.5559711",
"0.5556782",
"0.5555505",
"0.55497444",
"0.554808",
"0.55477095",
"0.55477095",
"0.55322576",
"0.55287117",
"0.55258447",
"0.55258447",
"0.5522322",
"0.5517259",
"0.5513813",
"0.5508773",
"0.550776",
"0.550776",
"0.55046386",
"0.550161",
"0.548517",
"0.5482461",
"0.5478044",
"0.5468817",
"0.54676855",
"0.5466097",
"0.5458325",
"0.54483926",
"0.54473114",
"0.54465884",
"0.5445836",
"0.5445086",
"0.54434377",
"0.54427797",
"0.5442288",
"0.5442288",
"0.5426743",
"0.5426743",
"0.5423336",
"0.54178727",
"0.54178727",
"0.5409668",
"0.5408656",
"0.54076815",
"0.5404425",
"0.540382",
"0.53996897",
"0.5398525",
"0.5398525",
"0.5398525",
"0.5398525",
"0.5398525",
"0.53952956",
"0.5389521"
] | 0.0 | -1 |
Get the last modification date of the UpStream Pay payment. | public function getUpdatedAt(): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }",
"public function get_modification_date()\n {\n return $this->get_default_property(self::PROPERTY_MODIFICATION_DATE);\n }",
"public function getLastModificationDate()\n {\n return new \\DateTimeImmutable($this->getData('last_modification_date', 0), 'Europe/Moscow');\n }",
"public function getLastpaymentdate()\n {\n return $this->lastpaymentdate;\n }",
"public function getLastPaymentDate(): \\DateTime\n {\n return $this->lastPaymentDate;\n }",
"public function getModificationDate()\n {\n return $this->modificationDate;\n }",
"public function getModificationDate() {\n return $this->modificationDate;\n }",
"public function last_modified() {\n\t\treturn $this->timestamp;\n\t}",
"function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}",
"public function getLastModify()\n\t{\n\t\treturn $this->last_modify;\n\t}",
"public function getLast_modified() {\n\t\treturn $this->last_modified;\n\t}",
"function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}",
"function lastModified()\n {\n if (!empty($this->notice)) {\n return strtotime($this->notice->created);\n }\n\n return null;\n }",
"public function getLastModified()\n {\n return $this->lastModified;\n }",
"public function getModate()\n {\n return $this->modate;\n }",
"public function getDateModification()\n {\n return $this->dateModification;\n }",
"public function getLastModified()\n {\n return $this->_lastModified;\n }",
"function getLastModified()\n {\n $this->loadStats();\n return $this->stat['mtime'];\n }",
"public function getFechaUltimaModificacion( ){\n\t\t\treturn $this->fechaUltimaModificacion;\n\t\t}",
"public function getLastModified(){\n return $this->lastModified;\n }",
"public function getLastModifiedDate() {\n\t\treturn date(\"d/m/Y\", strtotime($this->lastModifiedDate));\n\t}",
"public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }",
"function lastModified()\n {\n if(!empty($this->list)) {\n return strtotime($this->list->modified);\n }\n return null;\n }",
"public function getLastModified()\n\t{\n\t\treturn $this->last_modified;\n\t}",
"public function getModificationTime()\n {\n return ( $this->mtime ? $this->mtime : self::dosFormatToTimestamp( array( $this->lastModFileTime, $this->lastModFileDate ) ) );\n }",
"public function getPurchaseDateModified() {\n return $this->PurchaseDateModified;\n }",
"public function getModifyDate()\n {\n return $this->modifyDate;\n }",
"public function get_date_modified();",
"public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }",
"public function getModificationTime()\n {\n return $this->fileStructure->mtime;\n }",
"public function getLastUpdate(): \\DateTime\n {\n return $this->lastUpdate;\n }",
"public function getUpdatedAt()\n {\n return $this->sys->getUpdatedAt();\n }",
"public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }",
"public function getUpdDate()\n {\n return $this->upd_date;\n }",
"public function getPayDate() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn $this->payDate;\r\n\t}",
"public function getLastUpdateDatetime()\n {\n return $this->getValue('nb_icontact_prospect_last_update_datetime');\n }",
"public function lastModification( ) {\n\n\t\treturn file_exists( $this->_path )\n\t\t\t? filemtime( $this->_path )\n\t\t\t: 0;\n\t}",
"public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }",
"public function getLastModified()\n {\n return filemtime($this->getFileName());\n }",
"public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }",
"public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}",
"public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}",
"public function getLastpaymentamount()\n {\n return $this->lastpaymentamount;\n }",
"public function getLastModified() {\n\t\treturn filemtime($this->filename);\n\t}",
"public function getPaymentDate() {\n\t\t// return $this->created_at;\n\t\treturn $this->account ? $this->account->payment_date : $this->created_at;\n\t}",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdate()\n {\n return $this->lastUpdate;\n }",
"public function getLastUpdated() {\n return $this->lastUpdated;\n }",
"protected function last_change() \n\t{\n\t\tif ( !is_null( $this->last_change ) )\n\t\t{\n\t\t\treturn $this->last_change;\n\t\t}\n\t\t\n\t\tforeach( $this->sources as $key => $file ) \n\t\t{\n\t\t\t$files[$key] = filemtime( $file );\n\t\t}\n\n\t\tsort( $files ); $files = array_reverse( $files );\n\n\t\treturn $this->last_change = $files[key($files)];\n\t}",
"public function get_last_payment_date( $context = 'view' ) {\n\t\treturn $this->get_prop( 'last_payment_date', $context ) ;\n\t}",
"public function getModDate() \r\n { \r\n return $this->_modDate; \r\n }",
"public function lastModified(){\n if( $this->modifications ){\n return end( $this->modifications );\n }\n }",
"public function getDateModified() {\n\t\t\treturn $this->date_modified;\n\t\t}",
"public function getLastMod()\n {\n return $this->lastMod;\n }",
"public function getLastModifiedAudit();",
"public function getLastUpdatedAt()\n {\n return $this->last_updated_at;\n }",
"public function copiesUpdatedAt()\n {\n return Copy::lastUpdate()->toDateTimeString();\n }",
"function getLastchange() {\n\t\treturn $this->get(\"lastchange\");\n\t}",
"public function getUpdatedAt()\n\t{\n\t\treturn $this->updatedAt;\n\t}",
"public function updateLastUpdateDateTime() {\n\t\t// open file\n\t\t$lastUpdateStorageFile = fopen($this::LAST_UPDATE_STORAGE_FILE, $this::FILE_READ_WRITE_MODE);\n\t\t\n\t\t// Last update dateTime\n\t\t$date = new \\Datetime();\n\t\n\t\t// write the last update datetime\n\t\t$lastUpdateDateTime = fputs($lastUpdateStorageFile, $date->format('Y-m-d H:i:s'));\n\t\n\t\t// Close the file\n\t\tfclose($lastUpdateStorageFile);\n\t\n\t\treturn $lastUpdateDateTime;\n\t}",
"public function getModifiedDate() : \\DateTime {\n return $this->modifiedDate;\n }",
"public function getModifed(): DateTime\n {\n $DateTime = new DateTime();\n $DateTime->createFromFormat('U', filemtime($this->filePath));\n return $DateTime;\n }",
"public function getLatestUpdateDate()\n {\n return $this->channel->getLatestUpdateDate();\n }",
"public function getUpdatedDate()\n {\n return $this->updated;\n }",
"public function getDateModified()\n {\n return $this->_DateModified;\n }",
"public static function getProfilePasswordChangeDate()\n {\n return self::getProfile()->getPasswordResetKeyDate();\n }",
"public static function getLastModified() {}",
"public function getLastDeploymentChangeTime()\n {\n return $this->last_deployment_change_time;\n }",
"function getDateModified() {\n\t\treturn $this->_DateModified;\n\t}",
"public function getModifiedDate()\n\t{\n\t\treturn $this->_mdate;\n\t}",
"public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getUpdatedAt()\n {\n return $this->updatedAt;\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getLastUpdated();",
"public function getLastchange()\n {\n return $this->get(self::_LASTCHANGE);\n }",
"public function getUpdatedAt() {\n return $this->updatedAt;\n }",
"public function getUpdatedAt() {\n return $this->item->getUpdatedAt();\n }",
"public function getDateUpdate()\n {\n return $this->date_update;\n }",
"public function getDateUpdate()\n {\n return $this->date_update;\n }",
"private function getTargetModificationTime() {\n if (!isset($this->targetModificationTime)) {\n $this->targetModificationTime = (int) @filemtime($this->target);\n }\n return $this->targetModificationTime;\n }",
"public function getLastModified();",
"public function getLastModified();",
"public function getLastModified();"
] | [
"0.7002915",
"0.69285536",
"0.68846834",
"0.68416584",
"0.6733687",
"0.6709978",
"0.67075896",
"0.66477615",
"0.6634119",
"0.6619758",
"0.65926635",
"0.6503651",
"0.6495727",
"0.6477243",
"0.6469512",
"0.6466893",
"0.64630044",
"0.6457552",
"0.6449073",
"0.6446438",
"0.6442442",
"0.6426491",
"0.64234453",
"0.64234453",
"0.64234453",
"0.64234453",
"0.64234453",
"0.63697547",
"0.6369649",
"0.63488936",
"0.63379276",
"0.6332582",
"0.6310986",
"0.6296579",
"0.62765265",
"0.6266564",
"0.6242473",
"0.6222641",
"0.6218355",
"0.6181738",
"0.61685663",
"0.6162966",
"0.6154749",
"0.61429876",
"0.6141865",
"0.6140444",
"0.6138401",
"0.61374295",
"0.61355394",
"0.6118208",
"0.6115882",
"0.6115882",
"0.6075392",
"0.6074274",
"0.6053495",
"0.6053235",
"0.60499096",
"0.60475343",
"0.6046746",
"0.6040361",
"0.60299015",
"0.6027838",
"0.60220736",
"0.60206324",
"0.60167754",
"0.60147226",
"0.6014274",
"0.6013171",
"0.6005385",
"0.60047334",
"0.5994633",
"0.5991023",
"0.598053",
"0.5974605",
"0.59575593",
"0.5951751",
"0.59503317",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.5949595",
"0.59492946",
"0.5937066",
"0.5935474",
"0.5932212",
"0.59235233",
"0.592218",
"0.592218",
"0.5916533",
"0.5914123",
"0.5914123",
"0.5914123"
] | 0.0 | -1 |
Set the last modification date of the UpStream Pay payment method. The DB will automatically set this info. | public function setUpdatedAt(string $updatedAt): self; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function save() {\n $this->lastModified = new \\DateTime();\n parent::save();\n }",
"private function actionAlterTablePaymentSetTimestamp() {\n $this->changeTableColumnToTimestamp(TB_VPS_PAYMENT, array(\"payment_date\"), \"payment_id\");\n echo TB_VPS_PAYMENT . \" DONE <br/>\";\n }",
"private function setLastModifiedDateTime() {\n\t\ttry {\n\t\t\t$stmt = $this->db->prepare(\"UPDATE `$this->table` SET `datetime-last-modified` = NOW() WHERE `id` = ?\");\n\t\t\t$stmt->execute([$this->getID()]);\n\t\t} catch (PDOException $e) {\n\t\t\techo 'Post.class.php setLastModifiedDateTime() error: <br />';\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\n\t\t// Because we set the datetime from MySQL, we can't use PHP's datetime function to get the time as it may be slightly different\n\t\t$stmt = $this->db->prepare(\"SELECT `datetime-last-modified` FROM `$this->table` WHERE `id` = ?\");\n\t\t$stmt->execute([$this->getID()]);\n\n\t\tforeach ($stmt as $row) {\n\t\t\t$this->lastModifiedDate = $row['datetime-last-modified'];\n\t\t}\n\t}",
"public function set_last_payment_date( $value ) {\n\t\t$this->set_prop( 'last_payment_date', $value ) ;\n\t}",
"private function setLastUpdateDate( $date ) {\n Mage::getModel('core/config')->saveConfig('taxjar/config/last_update', $date);\n }",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n\t}",
"public function setModDate($date) {}",
"function setPasswordUpdatedTime(){\n\t\t$this->setPasswordUpdated(time());\n\t}",
"protected function _syncModDate() {}",
"public function setModifiedValue()\n {\n $this->setModified(new \\DateTime());\n }",
"public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}",
"private function set_last_updated_at() {\n\n\t\tif ( ! static::get_table() instanceof TimestampedTable ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$dirty = $this->is_dirty();\n\n\t\t$this->set_attribute( static::get_table()->get_updated_at_column(), $this->fresh_timestamp() );\n\n\t\t// If the model is dirty, we don't want to commit our save since the user should already be calling save.\n\t\tif ( ! $dirty ) {\n\t\t\t$this->save();\n\t\t}\n\t}",
"public function setPaymentDate($payment_date);",
"public function setLastUpdated($lastUpdated);",
"public function markLastUpdate()\n {\n if (!$this->updatedAtOveridden) {\n $this->updatedAt = new \\DateTime();\n }\n }",
"public function _update()\n {\n $this->updatedAt = new \\DateTime();\n }",
"function updateLastModifiedDate() {\n\t\t$res = db_query_params ('UPDATE artifact SET last_modified_date=EXTRACT(EPOCH FROM now())::integer WHERE artifact_id=$1',\n\t\t\tarray ($this->getID()));\n\t\treturn (!$res);\n\t}",
"public function setModifiedAt()\n {\n $this->modifiedAt = new \\DateTime();\n }",
"public function get_modification_date()\n {\n return $this->get_default_property(self::PROPERTY_MODIFICATION_DATE);\n }",
"function setLastchange($d) {\n\t\tif ($d) {\n\t\t\t$newtime = dateTimeConvert($d);\n\t\t\tif ($newtime === false) return;\n\t\t\t$this->set('expiredate', $newtime);\n\t\t} else {\n\t\t\t$this->set('expiredate', NULL);\n\t\t}\n\t}",
"private function updateUpdatedAtField() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof UpdatedAtField) {\n $this->$field_name = time();\n }\n }\n }",
"public function onPreUpdate()\n {\n $this->fechaUltimaModificacion = new \\DateTime(\"now\");\n }",
"protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date);\n }\n }",
"public function setModificationDate($date = true) {}",
"public function setLastModified(DateTime $lastModified);",
"public function markLastUpdate(){\n if(!$this->updatedAtOveridden) $this->updatedAt = new \\DateTime();\n if($this->applicant) //child pages dont have direct links to the application\n $this->applicant->markLastUpdate();\n if($this->parent) //child pages should update their parents\n $this->parent->markLastUpdate();\n }",
"public function updateUpdatedAt()\n {\n $this->setUpdatedAt(new \\Datetime());\n }",
"function setLastModified($dateModified) {\n\t\t$this->setData('lastModified', $dateModified);\n\t}",
"public function setSysLastChanged() {}",
"public function setLastLogin() {\n $this->lastLogin = new DateTime();\n }",
"public function setLastAccessDate(\\DateTime $lastAccessDate);",
"public function setLast_modified( $last_modified ) {\n\t\t$this->last_modified = $last_modified;\n\t}",
"public function beforeUpdate()\n {\n $this->owner->{$this->updatedAtField} = date($this->format);\n }",
"protected function _update()\n {\r\n $this->date_updated = new Zend_Db_Expr(\"NOW()\");\n parent::_update();\n }",
"public function setLastUpdate()\n {\n Mage::app()->saveCache(time(), 'admin_notifications_lastcheck');\n// $config = Mage::getModel('core/config');\n// /* @var $config Mage_Core_Model_Config */\n// $config->saveConfig(self::XML_LAST_UPDATE_PATH, time());\n return $this;\n }",
"public function onPrePersist()\n {\n $this->fechaUltimaModificacion = new \\DateTime(\"now\");\n }",
"protected function setUpdated(){\n if($this->_id > 0){\n $pfDB = DB\\Database::instance()->getDB('PF');\n\n $pfDB->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }",
"public function setLastUpdate(\\DateTime $lastUpdate)\n {\n $this->lastUpdate = $lastUpdate;\n }",
"public function setLastUpdate($lastUpdate)\n {\n $this->lastUpdate = $lastUpdate;\n }",
"public static function setLastModified($timestamp) {}",
"public function setPaymentDate(RDate $paymentDate): void\n {\n $this->paymentDate = $paymentDate;\n \\Logger::getLogger(\\get_class($this))\n ->debug(\n \\sprintf(\n __METHOD__.\" set to '%s'\",\n $this->paymentDate->format(RDate::SQL_DATE)\n )\n );\n }",
"public function setExecUpdateOnSave()\n {\n Configuration::updateValue('DF_UPDATE_ON_SAVE_LAST_EXEC', date('Y-m-d H:i:s'));\n }",
"function set_date_to_now()\n {\n $this->timestamp=time();\n }",
"public function assertUpdateDefaults() {\n\t\t\t$this->set('lastModified', 'NOW()', false);\n\t\t\t$this->enclose('lastModified', false);\n\t\t}",
"public function setUpdatedAt($value)\n {\n }",
"private function updatePublishOnDate()\n {\n $this->owner->PublishOnDate = $this->owner->DesiredPublishDate;\n // Remove the DesiredPublishDate.\n $this->owner->DesiredPublishDate = null;\n }",
"public function addUpdated()\n {\n try {\n $date = new DateTime();\n $this->updated_at = $date->format('Y-m-d H:i:s');\n $this->updated_by = 0;\n } catch (Exception $e) {\n print_r($e);\n }\n }",
"public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }",
"public function set_dates(){\n // if the id is not set, this means its anew item being created\n if(property_exists($this, 'created_on') && empty($this->id)){\n $this->created_on = date('Y-m-d H:i:s');\n }\n\n // if id is set, its an update\n if(property_exists($this, 'last_updated_on') && isset($this->id)){\n $this->last_updated_on = date('Y-m-d H:i:s');\n }\n }",
"public function setDate($date);",
"public function updateLastUsed()\n {\n if (\n $this->last_used_at === null ||\n $this->last_used_at < (new \\DateTime())->sub(new \\DateInterval('P1D'))\n ) {\n $this->last_used_at = new \\DateTime();\n $this->save();\n }\n }",
"public function setLastActionUser(){\n\t\t// nilai authtimeout user\n\t\tYii::$app->user->authTimeout;\n\n\t\t$user = User::findOne(Yii::$app->user->id);\n\t\t$user->last_action = date('Y-m-d H:i:s');\n\t\t$user->update();\n\t}",
"public function setLastUpdated($lastUpdated) {\n\t\t$this->lastUpdated = $lastUpdated !== null ? ((int) $lastUpdated) : null;\n\t}",
"public function getModificationDate()\n {\n return $this->modificationDate;\n }",
"public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }",
"public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }",
"public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }",
"public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }",
"public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }",
"public function setLastModifiedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastModifiedDateTime', $value);\n }",
"public function onSaveNewRecord()\n {\n $this->created = $this->updated = new \\DateTime();\n $this->rev = 1;\n }",
"public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }",
"public function setUpdatedAt(): self\n {\n // $this->updated_at = $updated_at;\n $this->updated_at = new \\DateTime();\n\n return $this;\n }",
"private function updateUnPublishOnDate()\n {\n $this->owner->UnPublishOnDate = $this->owner->DesiredUnPublishDate;\n // Remove the DesiredUnPublishDate.\n $this->owner->DesiredUnPublishDate = null;\n }",
"public function setLastModify($last_modify)\n\t{\n\t\t$this->last_modify = $last_modify;\n\t}",
"public function getModate()\n {\n return $this->modate;\n }",
"public function getModificationDate() {\n return $this->modificationDate;\n }",
"public function setLastmod($lastmod)\n {\n $this->lastmod = $lastmod;\n }",
"public function setLastUpdatedNow()\n {\n $this->setLastUpdated(new \\DateTime());\n return $this;\n }",
"public function setUpdatedAtAttribute($value) {}",
"public function setUpdatedAtAttribute($value) {}",
"public function UpdateLastLogin() {\r\n\t\t\t$_SESSION[__CLASS__.$this->intId.'_LastLogin'] = $this->dttLastLogin;\r\n\t\t\t$this->dttLastLogin = new QDateTime(QDateTime::Now);\r\n\t\t}",
"private function _setDate(){\n\t\tif($this->_year>=1970&&$this->_year<=2038){\n\t\t\t$this->_day = date('d', $this->_timestamp);\n\t\t\t$this->_month = date('m', $this->_timestamp);\n\t\t\t$this->_year = date('Y', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, true);\n\t\t\t$this->_day = sprintf('%02s', $dateParts['mday']);\n\t\t\t$this->_month = sprintf('%02s', $dateParts['mon']);\n\t\t\t$this->_year = $dateParts['year'];\n\t\t}\n\t\t$this->_date = $this->_year.'-'.$this->_month.'-'.$this->_day;\n\t}",
"public function testUpdatePayrun()\n {\n }",
"public function set_modification_date($modified)\n {\n $this->set_default_property(self::PROPERTY_MODIFICATION_DATE, $modified);\n }",
"public function touch()\n\t{\n\t\t$this['last_dismiss_date'] = new \\DateTime();\n\t\t$this['last_email_date'] = new \\DateTime();\n\t}",
"private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}",
"public function preUpdate()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function preUpdate()\n {\n $this->dateModification = new \\DateTime();\n }",
"public function preUpdate()\n {\n $this->updatedAt = new \\DateTime;\n }",
"private function _updateLastLoginDate(User_Row $user)\n {\n $column = User::COLUMN_LAST_LOGIN ;\n $user->$column = date(\"Y-m-d H:i:s\");\n $user->save();\n }",
"public function saveBirthDate()\n {\n $this->updateValue(\n 'birth_date',\n $this->birthDate,\n 'Customer birth date updated successfully.'\n );\n\n $this->birthDateUpdate = false;\n $this->birthDateFormatted = $this->customer->birth_date_formatted;\n }",
"public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }",
"public function onPreUpdate()\n {\n $this->modified_at = new \\DateTime(\"now\");\n }",
"private static function updateExpire($record)\n {\n// $params = Yii::$app->getParams();\n// $interval = $params['restful_token_expired_seconds'];\n $interval = 30 * 24 * 60 * 60;\n $record->expire_date = date('Y-m-d H:i:s', time() + $interval);\n $record->save(false, array('expire_date'));\n }",
"public function getLastpaymentdate()\n {\n return $this->lastpaymentdate;\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime();\n }",
"public function setDateOfBirth()\n {\n $dateOfBirth = request('dob_year') . '-' . request('dob_month') . '-' . request('dob_day');\n\n $this->date_of_birth = $dateOfBirth;\n $this->save();\n }",
"public function getModifyDate()\n {\n return $this->modifyDate;\n }",
"public function onPreUpdate()\n {\n $this->updatedAt = new \\DateTime(\"now\");\n }",
"public function setUpdated($date)\n {\n $this->updated = $date;\n }",
"public function touch() {\n $this->updatedAt = new DateTime();\n }",
"function modifyDate($mode, $date, $amount);",
"public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}"
] | [
"0.65013456",
"0.64233965",
"0.63372695",
"0.631596",
"0.6215716",
"0.61283875",
"0.61283875",
"0.61082864",
"0.60666466",
"0.5989967",
"0.5901514",
"0.58995867",
"0.588913",
"0.57821006",
"0.5775943",
"0.577553",
"0.57426775",
"0.56938964",
"0.568997",
"0.56890607",
"0.5665352",
"0.56543326",
"0.56541085",
"0.56507504",
"0.56468743",
"0.56468743",
"0.56468743",
"0.564251",
"0.564251",
"0.5628759",
"0.55999523",
"0.559626",
"0.5588534",
"0.5585675",
"0.5555003",
"0.55529326",
"0.554426",
"0.55308175",
"0.55305845",
"0.5523567",
"0.5515152",
"0.5514402",
"0.5500845",
"0.54966414",
"0.5491245",
"0.5476592",
"0.54757786",
"0.54655904",
"0.54627216",
"0.54543483",
"0.54404825",
"0.5431781",
"0.5416994",
"0.5410412",
"0.54016185",
"0.5385317",
"0.53834385",
"0.5376509",
"0.53754455",
"0.5370053",
"0.5341531",
"0.5341531",
"0.5341531",
"0.5341531",
"0.5341531",
"0.5341531",
"0.5322707",
"0.5321399",
"0.5317267",
"0.5316896",
"0.53157866",
"0.531137",
"0.5310477",
"0.53093505",
"0.53023785",
"0.53020716",
"0.53020716",
"0.5295672",
"0.52947336",
"0.5287856",
"0.52874196",
"0.5263134",
"0.52578527",
"0.5253079",
"0.52510965",
"0.52500135",
"0.5247264",
"0.5232226",
"0.5228008",
"0.52279955",
"0.5226536",
"0.52220964",
"0.52114713",
"0.52114713",
"0.5206608",
"0.520591",
"0.5201469",
"0.51859075",
"0.51802784",
"0.5164168",
"0.51632845"
] | 0.0 | -1 |
Get iterator object of body row elements | public function getIterator()
{
return new ArrayIterator($this->_tbody->getElements());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIterator()\n {\n return new ArrayObject($this->_rows);\n }",
"public function getIterator()\n {\n return new Itr($this);\n }",
"public function getIterator() {}",
"public function getIterator() {}",
"function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\n\t}",
"function getElements() {\n return $this->rows_object;\n }",
"public function getIterator()\n {\n return new \\ArrayIterator([$this->contents]);\n }",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator();",
"public function getIterator() {\n\t\t// Load related records for current row\n\t\t$data = $this->execute();\n\t\treturn $data ? $data : array();\n\t}",
"function getIterator() {\r\n\t\treturn new \\ArrayIterator($this->data);\r\n\t}",
"public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->fetch());\n\t}",
"abstract public function getIterator();",
"function getiterator() {\n\t\treturn new \\ArrayIterator($this->cast());\n\t}",
"public function iterator();",
"public function iterator()\n {\n return $this->getIterator();\n }",
"public function getIterator(): Iterator {}",
"public function getIterator()\r\n {\r\n return $this->all();\r\n }",
"public function getIterator()\n {\n return $this->iterator();\n }",
"public function getIterator()\n {\n return $this->multi()->load();\n }",
"public function getIterator() {\n\t\treturn new \\ArrayObject($this->data);\n\t}",
"public function getIterator(): \\Iterator\n {\n return new \\ArrayIterator($this->headers);\n }",
"public function getIterator()\n {\n return $this->getValue();\n }",
"public function getIterator() {\n return new \\ArrayIterator($this->getValues());\n }",
"public function getItemIterator()\n {\n return new ArrayIterator($this->data->items);\n }",
"public function getIterator()\n {\n return $this->headers->getIterator();\n }",
"public function getIterator()\r\n {\r\n return new \\ArrayIterator($this->data);\r\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->data);\n }",
"function getIterator()\n {\n return new \\ArrayIterator($this->items);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->_data);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->__data);\n }",
"public function getIterator()\n {\n return $this->iterator;\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->result);\n }",
"public function getIterator()\n {\n return new ArrayObject((array)$this->attributes);\n }",
"public function getRows()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElements();\n\t\t}\n\t\treturn $ret;\n\t}",
"public function getIterator()\n {\n }",
"public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\t$iArray['SysTimestamp'] = $this->strSysTimestamp;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}",
"public function getIterator()\n {\n return new \\ArrayIterator($this->attributes, 1);\n }",
"public function getIterator() {\n\n\t\treturn new \\ArrayIterator( $this->fields );\n\t}",
"function getIterator() {\n foreach($this->data() as $record) {\n yield $record;\n }\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->items->all());\n }",
"public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['Id'] = $this->intId;\n\t\t\t$iArray['FirstName'] = $this->strFirstName;\n\t\t\t$iArray['LastName'] = $this->strLastName;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}",
"public function getIterator()\n {\n $this->operation = 'SELECT';\n return $this->readFromConnection($this)->getIterator();\n }",
"public function getIterator()\n\t{\n\t\t// Execute query and return ResultSet for iteration\n\t\t$result = $this->execute();\n\t\treturn ($result !== false) ? $result : array();\n\t}",
"public function getIterator()\n {\n return new ArrayIterator((array)$this->data);\n }",
"public function rows() {\n\t\treturn $this->row();\n\t}",
"function getIterator()\n {\n return new MySQL_Result( $this );\n }",
"public function getIterator() {\r\n return new ArrayIterator($this -> _data);\r\n }",
"abstract protected function getRows();",
"public function iterateAllElements()\n {\n return $this->getIterator();\n }",
"function getRows() { return $this->_rows; }",
"public function getRow()\n {\n return $this->row;\n }",
"public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}",
"#[\\ReturnTypeWillChange]\n public function getIterator() : Traversable\n {\n foreach ($this->a as $row) {\n yield Vector::quick($row);\n }\n }",
"public function getIterator()\n {\n return new \\ArrayObject($this->toArray());\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->data);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->attributes);\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->items->all());\n }",
"public function pulled(): Iterator;",
"public function getIterator()\n {\n foreach ($this->iterable as $item) {\n yield $item;\n }\n }",
"public function getRow(){\n return $this->_row;\n }",
"public function getIterator()\n {\n return new Iterator($this->entities);\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this->elements(true));\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->_data);\n }",
"public function getIterator()\r\n {\r\n return new ArrayIterator($this->attributes);\r\n }",
"public function getIterator()\n {\n return new ArrayObject($this->_data);\n }",
"abstract public function get_rows();",
"public function getRow()\n {\n return $this->row;\n }",
"public function getIterator()\n {\n return new \\ArrayIterator($this);\n }",
"public function getIterator() {\r\n return new ArrayIterator($this->data);\r\n }",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n }",
"public function getIterator(): Traversable\n\t{\n\t\t$toIterate = [];\n\t\tforeach ($this->headers as $header)\n\t\t{\n\t\t\tif (count($header[\"values\"]) > 1)\n\t\t\t{\n\t\t\t\t$toIterate[$header[\"name\"]] = $header[\"values\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$toIterate[$header[\"name\"]] = $header[\"values\"][0];\n\t\t\t}\n\t\t}\n\n\t\treturn new \\ArrayIterator($toIterate);\n\t}",
"public function getIterator() {\n\t\t\t///////////////////\n\t\t\t// Member Variables\n\t\t\t///////////////////\n\t\t\t$iArray['IdOrganization'] = $this->intIdOrganization;\n\t\t\t$iArray['Name'] = $this->strName;\n\t\t\t$iArray['Phone'] = $this->strPhone;\n\t\t\t$iArray['QrCode'] = $this->strQrCode;\n\t\t\t$iArray['OrganizationImage'] = $this->strOrganizationImage;\n\t\t\t$iArray['Latitude'] = $this->strLatitude;\n\t\t\t$iArray['Longitude'] = $this->strLongitude;\n\t\t\t$iArray['Country'] = $this->strCountry;\n\t\t\t$iArray['City'] = $this->strCity;\n\t\t\t$iArray['Address'] = $this->strAddress;\n\t\t\t$iArray['IdOrganizationType'] = $this->intIdOrganizationType;\n\t\t\t$iArray['IdOwner'] = $this->intIdOwner;\n\t\t\treturn new ArrayIterator($iArray);\n\t\t}",
"public function getIterator()\n\t{\n return $this->getData();\n\t\t// return new CMapIterator($this->getData());\n\t}",
"#[\\ReturnTypeWillChange]\n public function getIterator()\n {\n foreach ($this->iteratePages() as $page) {\n foreach ($page as $key => $element) {\n yield $key => $element;\n }\n }\n }",
"public function getIterator() {\n return new ArrayIterator($this->getAll());\n }",
"public function getIterator(): \\Traversable;",
"public function getIterator(): \\Traversable;",
"public function getIterator()\n {\n return new MF_PHP_Array($this->__data);\n }",
"public function getIterator(): Iterator\n {\n return $this->{$this->fnDoGetIterator}();\n }",
"public function getIterator()\n {\n return new ArrayIterator($this->export());\n }",
"function getRows() {\n\t\treturn $this->rows;\n\t}",
"public function getIterator()\n {\n return new ArrayObject($this->items);\n }",
"public function getIterator()\n\t{\n\t\treturn new ArrayIterator($this->items);\n\t}",
"public function getIterator()\n {\n return new \\ArrayIterator($this->_items);\n }",
"public function getIterator()\n {\n throw new NotImplementedException(\"This resource does not support iteration\");\n }",
"public function getRows ()\n {\n return $this->_rows;\n }",
"public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}",
"public function getIterator() {\n return new \\ArrayIterator($this->cast);\n }",
"public function get_row();",
"public function getIterator()\n {\n return new ArrayIterator($this->entities);\n }",
"public function getIterator()\n\t{\n\t\treturn new \\ArrayIterator($this->array);\n\t}",
"public function getIterator()\n {\n return new ArrayIterator($this->toArray());\n }"
] | [
"0.695523",
"0.68069005",
"0.6612693",
"0.6612693",
"0.65917534",
"0.6573931",
"0.65696836",
"0.65684927",
"0.65684927",
"0.65684927",
"0.65684927",
"0.65684927",
"0.65684927",
"0.6512575",
"0.65009004",
"0.6494172",
"0.6463965",
"0.6391734",
"0.6346755",
"0.63464385",
"0.63425547",
"0.6318436",
"0.63140905",
"0.62703806",
"0.62690115",
"0.62667733",
"0.6247886",
"0.62472266",
"0.6238347",
"0.6223869",
"0.62197405",
"0.6214424",
"0.6214424",
"0.6206746",
"0.6199922",
"0.61993915",
"0.6174988",
"0.6158181",
"0.61436355",
"0.61346686",
"0.6134057",
"0.61315775",
"0.6125824",
"0.61217886",
"0.6113131",
"0.61091036",
"0.60827076",
"0.60685223",
"0.60619295",
"0.60599434",
"0.6049893",
"0.603763",
"0.60361934",
"0.60325706",
"0.6031876",
"0.602912",
"0.60244036",
"0.6022482",
"0.6008493",
"0.6001013",
"0.59885573",
"0.59885573",
"0.5983715",
"0.5983224",
"0.5980561",
"0.5976076",
"0.597532",
"0.5972297",
"0.5967643",
"0.59627426",
"0.59582645",
"0.5957287",
"0.59528166",
"0.5941053",
"0.5929044",
"0.59262574",
"0.5921024",
"0.5921024",
"0.59149075",
"0.5884771",
"0.5878629",
"0.5877274",
"0.58728355",
"0.58656234",
"0.58656234",
"0.5864215",
"0.58619654",
"0.5861083",
"0.5856738",
"0.58536214",
"0.58509076",
"0.58441836",
"0.5842247",
"0.5834078",
"0.58332974",
"0.5821038",
"0.58191097",
"0.5811972",
"0.5809234",
"0.57917154"
] | 0.73687 | 0 |
Set default attributes of the elements of column | public function setColumnsAttributes($columnsAttributes)
{
$this->_checkArgumentIsArray(__METHOD__, 1, $columnsAttributes);
foreach ($columnsAttributes as $columnKey => $attributes) {
if (is_array($attributes)) {
$this->setColumnAttributes($columnKey, $attributes);
}
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fillupDefault()\n {\n\n foreach (static::$cols as $key => $col) {\n if ('' != $col[self::COL_DEFAULT]) {\n $this->data[$key] = $col[self::COL_DEFAULT];\n }\n }\n\n }",
"public function setAttributes();",
"abstract public function getColDefaults();",
"function initialize() {\n $this->set_openingtag(\"<COLGROUP[attributes]>\");\n $this->set_closingtag(\"</COLGROUP>\");\n }",
"public function setDefaultColumns()\n {\n foreach ($this->Model->columnsInformation as $column) {\n // Set indexes\n if ($column['Key'] == \"PRI\") {\n $this->indexes[] = $this->table . \".\" . $column['Field'];\n }\n // Set columns\n $this->columns[] = $this->table . \".\" . $column['Field'];\n }\n // Set default columns\n $this->defaultColumns = $this->columns;\n // Add actions column\n $this->addCustomColumn($this->builtInCustomColumns['actions']);\n // Add no column\n $this->addCustomColumnAsFirstColumn($this->builtInCustomColumns['no']);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }",
"public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}",
"protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_asignatura('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_situacion('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setActa('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setId_tarifa('');\n $this->setYear('');\n $this->setCantidad('');\n $this->setObserv('');\n $this->setId_serie('');\n $this->setPrimary_key($aPK);\n }",
"protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_situacion('');\n $this->setDescripcion('');\n $this->setSuperada('');\n $this->setBreve('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setF_gasto('');\n $this->setTipo('');\n $this->setCantidad('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'id';\n\t\t\t$this->defaultColumns[] = 'complete_name';\n\t\t\t$this->defaultColumns[] = 'address';\n\t\t\t$this->defaultColumns[] = 'city_id';\n\t\t\t$this->defaultColumns[] = 'province_id';\n\t\t\t$this->defaultColumns[] = 'post_code';\n\t\t\t$this->defaultColumns[] = 'house_phone';\n\t\t\t$this->defaultColumns[] = 'mobile_phone';\n\t\t\t$this->defaultColumns[] = 'mobile_phone2';\n\t\t\t$this->defaultColumns[] = 'birth_place';\n\t\t\t$this->defaultColumns[] = 'birth_date';\n\t\t\t$this->defaultColumns[] = 'sex';\n\t\t\t$this->defaultColumns[] = 'religion';\n\t\t\t$this->defaultColumns[] = 'homepage';\n\t\t\t$this->defaultColumns[] = 'origin_status';\n\t\t\t$this->defaultColumns[] = 'origin_address';\n\t\t\t$this->defaultColumns[] = 'origin_city_id';\n\t\t\t$this->defaultColumns[] = 'origin_province_id';\n\t\t\t$this->defaultColumns[] = 'hobby';\n\t\t\t$this->defaultColumns[] = 'photo';\n\t\t\t$this->defaultColumns[] = 'status';\n\t\t\t$this->defaultColumns[] = 'child';\n\t\t\t$this->defaultColumns[] = 'is_data_changed';\n\t\t\t$this->defaultColumns[] = 'swt_users_id';\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'name';\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"protected function column_default($item, $column_name)\n {\n }",
"function initialize () {\n $this->set_openingtag ( \"<TD[attributes]>\" );\n\t$this->set_closingtag ( \"</TD>\" );\n }",
"public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t//$this->defaultColumns[] = 'id';\n\t\t\t//$this->defaultColumns[] = 'bank_id';\n $this->defaultColumns[] = array(\n 'name' => 'bankName',\n 'value' => '$data->bank->bank_name',\n );\n\t\t\t$this->defaultColumns[] = 'account_number';\n\t\t\t$this->defaultColumns[] = 'owner_name_alias';\n\t\t\t/* $this->defaultColumns[] = array(\n\t\t\t\t'name' => 'publish',\n\t\t\t\t'value' => 'Utility::getPublish(Yii::app()->controller->createUrl(\"publish\",array(\"id\"=>$data->id)), $data->publish, 1)',\n\t\t\t\t'htmlOptions' => array(\n\t\t\t\t\t'class' => 'center',\n\t\t\t\t),\n\t\t\t\t'type' => 'raw',\n\t\t\t); */\n\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}",
"function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}",
"function _reset()\n {\n foreach ($this->_cols as $col => $val) {\n if (isset($val['default'])) {\n $this->_data[$col] = $val['default'];\n } else {\n $this->_data[$col] = '';\n }\n }\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_region('');\n $this->setRegion('');\n $this->setNombre_region('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"private function setDefaults()\n {\n $defaults = config('sevDeskApi.defaults.'.lcfirst($this->objectName));\n\n foreach($defaults as $attribute => $defaultValue)\n {\n if (!isset($this->$attribute))\n $this->$attribute = $defaultValue;\n }\n }",
"protected function initColumns()\n\t{\n\t\tif($this->columns===array())\n\t\t{\n\t\t\tif($this->dataProvider instanceof NActiveDataProvider)\n\t\t\t\t$this->columns=$this->dataProvider->model->attributeNames();\n\t\t\telse if($this->dataProvider instanceof IDataProvider)\n\t\t\t{\n\t\t\t\t// use the keys of the first row of data as the default columns\n\t\t\t\t$data=$this->dataProvider->getData();\n\t\t\t\tif(isset($data[0]) && is_array($data[0]))\n\t\t\t\t\t$this->columns=array_keys($data[0]);\n\t\t\t}\n\t\t}\n\t\t$id=$this->getId();\n\t\tforeach($this->columns as $i=>$column)\n\t\t{\n\t\t\tif ($column['name'] && (!isset($column['export']) || @$column['export']!=false)) {\n\t\t\t\tif(is_string($column))\n\t\t\t\t\t$column=$this->createDataColumn($column);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!isset($column['class']))\n\t\t\t\t\t\t$column['class']='NDataColumn';\n\t\t\t\t\t$column=Yii::createComponent($column, $this);\n\t\t\t\t}\n\t\t\t\tif(!$column->visible)\n\t\t\t\t{\n\t\t\t\t\tunset($this->columns[$i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($column->id===null)\n\t\t\t\t\t$column->id=$id.'_c'.$i;\n\t\t\t\t$this->columns[$i]=$column;\n\t\t\t} else {\n\t\t\t\tunset($this->columns[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->columns as $column)\n\t\t\t\t$column->init();\n\t}",
"function initialize () {\n $this->set_openingtag ( \"<TH[attributes]>\" );\n\t$this->set_closingtag ( \"</TH>\" );\n }",
"function addColumn($defaults) { \n $defaults['template'] = 'Template'; \n return $defaults; \n }",
"function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }",
"protected function defaultAttributes(){\n return [\n 'parentId' => 0, \n 'projectId' => 0, \n 'done' => 0, \n 'potion' => 0, \n 'notes' => array(), \n 'name' => '', \n ];\n }",
"public function get_column_defaults() {\n\t\treturn array(\n\t\t\t'user_id' => 0,\n\t\t\t'email' => '',\n\t\t\t'username' => '',\n\t\t\t'name' => '',\n\t\t\t'product_count' => 0,\n\t\t\t'sales_count'\t => 0,\n\t\t\t'sales_value'\t => 0.00,\n\t\t\t'status'\t\t => 'pending',\n\t\t\t'notes' => '',\n\t\t\t'date_created' => date( 'Y-m-d H:i:s' ),\n\t\t);\n\t}",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t//$this->defaultColumns[] = 'id';\n\t\t\t$this->defaultColumns[] = 'subject';\n\t\t\t$this->defaultColumns[] = 'messege';\n\t\t\t//$this->defaultColumns[] = 'from_user_id';\n\t\t\t$this->defaultColumns[] = 'from_user_name';\n\t\t\t//$this->defaultColumns[] = 'to_user_id';\n\t\t\t$this->defaultColumns[] = 'to_user_name';\n\t\t\t//$this->defaultColumns[] = 'is_read';\n\t\t\t$this->defaultColumns[] = 'sent_time';\n\t\t\t//$this->defaultColumns[] = 'is_deleted_by_sender';\n\t\t\t//$this->defaultColumns[] = 'is_deleted_by_receiver';\n\t\t\t/* $this->defaultColumns[] = array(\n\t\t\t\t'name' => 'publish',\n\t\t\t\t'value' => 'Utility::getPublish(Yii::app()->controller->createUrl(\"publish\",array(\"id\"=>$data->id)), $data->publish, 1)',\n\t\t\t\t'htmlOptions' => array(\n\t\t\t\t\t'class' => 'center',\n\t\t\t\t),\n\t\t\t\t'type' => 'raw',\n\t\t\t); */\n\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"public function overlayUserdefinedHtmlAttributeValues() {}",
"private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }",
"public function columns()\n {\n return array(\n array(\n 'name' => 'name', \n 'title' => 'Attribute name',\n 'attributes' => array(\n \n ),\n ),\n array(\n 'name' => 'active',\n 'type' => 'toggle',\n 'title' => 'Active', \n 'attributes' => array(\n 'id' => \"active\",\n 'value' => \"{field_id}\"\n ), \n ) \n );\n }",
"private function getDefaultColumnArgs(){\n\n\t\t$args = array(\n\n\t\t\t\t'hasLightbox'\t=> true,\n\t\t\t\t'buttonText'\t=> __( 'Save Column', 'cuisinesections' )\n\t\t);\n\n\t\t$args = apply_filters( 'chef_sections_default_column_args', $args );\n\n\t\treturn $args;\n\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}",
"protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"widget\";\n\t}",
"function experiences_columns_head($defaults) {\n $defaults['experience_order'] = 'Order';\n $defaults['featured_image'] = 'Featured Image';\n $defaults['experience_size'] = 'Size';\n $defaults['experience_link'] = 'Link';\n return $defaults;\n}",
"public function getColumnDefaultValueDDL(Column $col);",
"function Hippo_Widget_Attributes() {\n\t\t\tnew Hippo_Widget_Attributes();\n\t\t}",
"protected function afterConstruct() {\n\t\t$current = strtolower(Yii::app()->controller->id.'/'.Yii::app()->controller->action->id);\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'title';\n\t\t\t//$this->defaultColumns[] = 'alias_url';\n\t\t\t$this->defaultColumns[] = 'description';\n\t\t\t$this->defaultColumns[] = 'image';\n\t\t\t//$this->defaultColumns[] = 'image_position';\n\t\t\t$this->defaultColumns[] = 'published';\n\t\t\t$this->defaultColumns[] = 'ordering';\n\t\t\t//$this->defaultColumns[] = 'access';\n\t\t\t//$this->defaultColumns[] = 'params';\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"protected function afterConstruct() {\r\n\t\tif(count($this->defaultColumns) == 0) {\r\n\t\t\t/*\r\n\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t'class' => 'CCheckBoxColumn',\r\n\t\t\t\t'name' => 'id',\r\n\t\t\t\t'selectableRows' => 2,\r\n\t\t\t\t'checkBoxHtmlOptions' => array('name' => 'trash_id[]')\r\n\t\t\t);\r\n\t\t\t*/\r\n\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t'header' => 'No',\r\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\r\n\t\t\t);\r\n\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t'name' => 'title',\r\n\t\t\t\t'value' => '$data->title',\r\n\t\t\t);\r\n\t\t\t$this->defaultColumns[] = 'isbn';\r\n\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t'name' => 'publisher_search',\r\n\t\t\t\t'value' => '$data->publisher->publisher_name',\r\n\t\t\t);\r\n\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t'name' => 'creation_date',\r\n\t\t\t\t'value' => 'Utility::dateFormat($data->creation_date)',\r\n\t\t\t\t'htmlOptions' => array(\r\n\t\t\t\t\t'class' => 'center',\r\n\t\t\t\t),\r\n\t\t\t\t'filter' => Yii::app()->controller->widget('zii.widgets.jui.CJuiDatePicker', array(\r\n\t\t\t\t\t'model'=>$this,\r\n\t\t\t\t\t'attribute'=>'creation_date',\r\n\t\t\t\t\t'language' => 'ja',\r\n\t\t\t\t\t'i18nScriptFile' => 'jquery.ui.datepicker-en.js',\r\n\t\t\t\t\t//'mode'=>'datetime',\r\n\t\t\t\t\t'htmlOptions' => array(\r\n\t\t\t\t\t\t'id' => 'creation_date_filter',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'options'=>array(\r\n\t\t\t\t\t\t'showOn' => 'focus',\r\n\t\t\t\t\t\t'dateFormat' => 'dd-mm-yy',\r\n\t\t\t\t\t\t'showOtherMonths' => true,\r\n\t\t\t\t\t\t'selectOtherMonths' => true,\r\n\t\t\t\t\t\t'changeMonth' => true,\r\n\t\t\t\t\t\t'changeYear' => true,\r\n\t\t\t\t\t\t'showButtonPanel' => true,\r\n\t\t\t\t\t),\r\n\t\t\t\t), true),\r\n\t\t\t);\r\n\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t'name' => 'creation_search',\r\n\t\t\t\t'value' => '$data->creation->displayname',\r\n\t\t\t);\r\n\t\t\tif(!isset($_GET['type'])) {\r\n\t\t\t\t$this->defaultColumns[] = array(\r\n\t\t\t\t\t'name' => 'publish',\r\n\t\t\t\t\t'value' => 'Utility::getPublish(Yii::app()->controller->createUrl(\"publish\",array(\"id\"=>$data->book_id)), $data->publish, 1)',\r\n\t\t\t\t\t'htmlOptions' => array(\r\n\t\t\t\t\t\t'class' => 'center',\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'filter'=>array(\r\n\t\t\t\t\t\t1=>Yii::t('phrase', 'Yes'),\r\n\t\t\t\t\t\t0=>Yii::t('phrase', 'No'),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'type' => 'raw',\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparent::afterConstruct();\r\n\t}",
"public function setAttributes($data = []) {\n if (empty($data)) {\n //init\n $data = array_fill_keys(array_keys(static::attributLabels()), null);\n }\n if (is_array($data)) {\n $this->attributes = self::$wpdb->_escape($data);\n } else {\n parse_str($data, $this->attributes);\n }\n foreach ($this->attributes as $name => $value)\n if (property_exists($this, $name)) {\n $this->$name = $this->attributes[$name] = stripslashes_deep($value);\n } else {\n unset($this->attributes[$name]);\n }\n }",
"public function setMemberDefaults(){\n parent::setMemberDefaults();\n \n $this->id = $this->id ? $this->id : UniqId::get(\"rbn-\");\n if (!$this->collarTriangleWidth) {\n $this->collarTriangleWidth = StyleUtil::getHalf($this->collarWidth);\n }\n if (!$this->collarColor) {\n if ($this->barColor){\n $this->collarColor = $this->barColor;\n }\n else if( $this->barGradient ){\n $this->collarColor = GradientInfo::getLastColor($this->barGradient);\n }\n }\n }",
"public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}",
"protected function _getDefaultAttributes()\n {\n return ['entity_type_id', 'attribute_set_id', 'created_at', 'updated_at'];\n }",
"public function updateDefaultsFromObject() {\n parent::updateDefaultsFromObject();\n // Tags\n if(isset($this->widgetSchema['tags'])) {\n $tags = $this->getObject()->getTags();\n if($this->getUser()->getAttribute('enable_keyboard', false)) {\n $tags = implode(', ', $tags);\n }\n $this->widgetSchema['tags']->setDefault($tags);\n }\n // Elements\n if(isset($this->widgetSchema['elements_list'])) {\n $this->widgetSchema['elements_list']->setDefault($this->getObject()->getElements());\n }\n if($this->getUser()->getAttribute('enable_keyboard', false) && isset($this->widgetSchema['demandeur_id']) && !$this->isNew())\n {\n $this->setDefault('demandeur_id', $this->getObject()->getDemandeur()->getName());\n }\n }",
"function initialize () {\n $this->set_openingtag ( \"<TABLE[attributes]>\" );\n\t$this->set_closingtag ( \"</TABLE>\" );\n }",
"public function set_custom_column( $columns )\n {\n /* We are going to rearrange the information */\n $title = $columns['title'];\n $date = $columns['date'];\n unset ( $columns['title'] , $columns['date'] );\n\n $columns['name'] = 'Author Name';\n $columns['title'] = $title;\n $columns['approved'] = 'Approved';\n $columns['featured'] = 'Featured';\n $columns['date'] = $date;\n return ( $columns );\n }",
"protected function _beforeRender()\r\n {\r\n $this->_element->setAttributes($this->getAttribs());\r\n }",
"function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}",
"function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}",
"protected function classes()\n {\n $this->label_attributes['class'] = ['columns'];\n $this->label_attributes['style']['float'] = 'left';\n $this->input_attributes['class'] = ['btn'];\n parent::classes();\n }",
"public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}",
"protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"assignments\";\n\t}",
"function init()\n {\n $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('add', false, 'Nuova scheda', COMPONENT_TYPE_STRING);\n $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('buttonId', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('noLink', false, false, COMPONENT_TYPE_STRING);\n $this->defineAttribute('iconClass', false, 'fa-plus', COMPONENT_TYPE_STRING);\n\n parent::init();\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}",
"public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }",
"public function initAttribute();",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"private function getDefaultAttributes()\n {\n return [\n 'name' => [\n 'type' => 'varchar',\n 'label' => 'Name',\n 'input' => 'text',\n 'sort_order' => 1,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'is_active' => [\n 'type' => 'int',\n 'label' => 'Is Active',\n 'input' => 'select',\n 'source' => Boolean::class,\n 'sort_order' => 2,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'url_key' => [\n 'type' => 'varchar',\n 'label' => 'URL Key',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 3,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'description' => [\n 'type' => 'text',\n 'label' => 'Description',\n 'input' => 'textarea',\n 'required' => false,\n 'sort_order' => 4,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'wysiwyg_enabled' => true,\n 'is_html_allowed_on_front' => true,\n 'group' => 'General',\n ],\n 'image' => [\n 'type' => 'varchar',\n 'label' => 'Image',\n 'input' => 'image',\n 'backend' => Image::class,\n 'required' => false,\n 'sort_order' => 5,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n ];\n }",
"public function setColumnAttributes($columnKey, $attributes)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 2, $attributes);\n\t\t\n\t\tforeach ($attributes as $name => $val) {\n\t\t\t$this->_defaultColumnsAttributes[$columnKey][$name] = $val;\n\t\t}\n\t\treturn $this;\n\t}",
"public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }",
"function set_defaults()\n {\n $mapper = $this->get_mapper();\n if ($mapper->has_method('set_defaults')) {\n $mapper->set_defaults($this);\n }\n }",
"public function initAttrInfos($cols)\n\t{\n\t\tif($this->cat_etype==null)\n\t\t{\n\t\t\t//Find product entity type\n\t\t\t$tname=$this->tablename(\"eav_entity_type\");\n\t\t\t$this->cat_etype=$this->selectone(\"SELECT entity_type_id FROM $tname WHERE entity_type_code=?\",\"catalog_category\",\"entity_type_id\");\n\t\t}\n\n\t\t$toscan=array_values(array_diff($cols,array_keys($this->attrinfo)));\n\t\tif(count($toscan)>0)\n\t\t{\n\t\t\t//create statement parameter string ?,?,?.....\n\t\t\t$qcolstr=$this->arr2values($toscan);\n\n\t\t\t$tname=$this->tablename(\"eav_attribute\");\n\t\t\tif($this->getMagentoVersion()!=\"1.3.x\")\n\t\t\t{\n\t\t\t\t$extra=$this->tablename(\"catalog_eav_attribute\");\n\t\t\t\t//SQL for selecting attribute properties for all wanted attributes\n\t\t\t\t$sql=\"SELECT `$tname`.*,$extra.is_global FROM `$tname`\n\t\t\t\tLEFT JOIN $extra ON $tname.attribute_id=$extra.attribute_id\n\t\t\t\tWHERE ($tname.attribute_code IN ($qcolstr)) AND (entity_type_id=?)\";\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql=\"SELECT `$tname`.* FROM `$tname` WHERE ($tname.attribute_code IN ($qcolstr)) AND (entity_type_id=?)\";\n\t\t\t}\n\t\t\t$toscan[]=$this->cat_etype;\n\t\t\t$result=$this->selectAll($sql,$toscan);\n\n\t\t\t$attrinfs=array();\n\t\t\t//create an attribute code based array for the wanted columns\n\t\t\tforeach($result as $r)\n\t\t\t{\n\t\t\t\t$attrinfs[$r[\"attribute_code\"]]=$r;\n\t\t\t}\n\t\t\tunset($result);\n\n\t\t\t//create a backend_type based array for the wanted columns\n\t\t\t//this will greatly help for optimizing inserts when creating attributes\n\t\t\t//since eav_ model for attributes has one table per backend type\n\t\t\tforeach($attrinfs as $k=>$a)\n\t\t\t{\n\t\t\t\t//do not index attributes that are not in header (media_gallery may have been inserted for other purposes)\n\t\t\t\tif(!in_array($k,$cols))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$bt=$a[\"backend_type\"];\n\t\t\t\tif(!isset($this->attrbytype[$bt]))\n\t\t\t\t{\n\t\t\t\t\t$this->attrbytype[$bt]=array(\"data\"=>array());\n\t\t\t\t}\n\t\t\t\t$this->attrbytype[$bt][\"data\"][]=$a;\n\t\t\t}\n\t\t\t//now add a fast index in the attrbytype array to store id list in a comma separated form\n\t\t\tforeach($this->attrbytype as $bt=>$test)\n\t\t\t{\n\t\t\t\t$idlist;\n\t\t\t\tforeach($test[\"data\"] as $it)\n\t\t\t\t{\n\t\t\t\t\t$idlist[]=$it[\"attribute_id\"];\n\t\t\t\t}\n\t\t\t\t$this->attrbytype[$bt][\"ids\"]=implode(\",\",$idlist);\n\t\t\t}\n\t\t\t$this->attrinfo=array_merge($this->attrinfo,$attrinfs);\n\t\t}\n\t\t$notattribs=array_diff($cols,array_keys($this->attrinfo));\n\t\tforeach($notattribs as $k)\n\t\t{\n\t\t\t$this->attrinfo[$k]=null;\n\t\t}\n\t\t/*now we have 2 index arrays\n\t\t 1. $this->attrinfo which has the following structure:\n\t\t key : attribute_code\n\t\t value : attribute_properties\n\t\t 2. $this->attrbytype which has the following structure:\n\t\t key : attribute backend type\n\t\t value : array of :\n\t\t data => array of attribute_properties ,one for each attribute that match\n\t\t the backend type\n\t\t ids => list of attribute ids of the backend type */\n\t}",
"public function getDefaultInputAttributes()\n {\n return array( 'class' => 'form-control' );\n }",
"public function setAttrs($attrs);",
"protected function _getDefaultAttributes()\r\n {\r\n return array(\r\n 'entity_type_id',\r\n 'attribute_set_id',\r\n 'created_at',\r\n 'updated_at',\r\n 'increment_id',\r\n 'store_id',\r\n 'website_id'\r\n );\r\n }",
"function initialize () {\n $this->set_openingtag ( \"<TR[attributes]>\" );\n\t$this->set_closingtag ( \"</TR>\" );\n }",
"function init()\n {\n $this->defineAttribute('data', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('stru', false, '', COMPONENT_TYPE_STRING);\n parent::init();\n }",
"protected function beforeSave()\n {\n foreach ($this->getTableSchema()->columns as $column)\n {\n if ($column->allowNull == 1 && $this->getAttribute($column->name) == '')\n {\n $this->setAttribute($column->name, null);\n }\n }\n \n return parent::beforeSave();\n }",
"public function getDefaultAttributes()\n {\n return array_unique(array_merge($this->_getDefaultAttributes(), [$this->getEntityIdField(), $this->getLinkField()]));\n }",
"protected function setNullAllAttributes()\n\t{\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\tif( $value == \"real\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"int\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"date\" ) $this->$field = \"\" ;\n\t\t\telse if( $value == \"string\" ) $this->$field = null ;\n\t\t}\n\t}",
"public function initAttrInfos($cols)\n\t{\n\t\tif($this->prod_etype==null)\n\t\t{\n\t\t\t//Find product entity type\n\t\t\t$tname=$this->tablename(\"eav_entity_type\");\n\t\t\t$this->prod_etype=$this->selectone(\"SELECT entity_type_id FROM $tname WHERE entity_type_code=?\",\"catalog_product\",\"entity_type_id\");\n\t\t}\n\n\t\t$toscan=array_values(array_diff($cols,array_keys($this->attrinfo)));\n\t\tif(count($toscan)>0)\n\t\t{\n\t\t\t//create statement parameter string ?,?,?.....\n\t\t\t$qcolstr=$this->arr2values($toscan);\n\n\t\t\t$tname=$this->tablename(\"eav_attribute\");\n\t\t\tif($this->getMagentoVersion()!=\"1.3.x\")\n\t\t\t{\n\t\t\t\t$extra=$this->tablename(\"catalog_eav_attribute\");\n\t\t\t\t//SQL for selecting attribute properties for all wanted attributes\n\t\t\t\t$sql=\"SELECT `$tname`.*,$extra.is_global FROM `$tname`\n\t\t\t\tLEFT JOIN $extra ON $tname.attribute_id=$extra.attribute_id\n\t\t\t\tWHERE ($tname.attribute_code IN ($qcolstr)) AND (entity_type_id=?)\";\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql=\"SELECT `$tname`.* FROM `$tname` WHERE ($tname.attribute_code IN ($qcolstr)) AND (entity_type_id=?)\";\n\t\t\t}\n\t\t\t$toscan[]=$this->prod_etype;\n\t\t\t$result=$this->selectAll($sql,$toscan);\n\n\t\t\t$attrinfs=array();\n\t\t\t//create an attribute code based array for the wanted columns\n\t\t\tforeach($result as $r)\n\t\t\t{\n\t\t\t\t$attrinfs[$r[\"attribute_code\"]]=$r;\n\t\t\t}\n\t\t\tunset($result);\n\n\t\t\t//create a backend_type based array for the wanted columns\n\t\t\t//this will greatly help for optimizing inserts when creating attributes\n\t\t\t//since eav_ model for attributes has one table per backend type\n\t\t\tforeach($attrinfs as $k=>$a)\n\t\t\t{\n\t\t\t\t//do not index attributes that are not in header (media_gallery may have been inserted for other purposes)\n\t\t\t\tif(!in_array($k,$cols))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$bt=$a[\"backend_type\"];\n\t\t\t\tif(!isset($this->attrbytype[$bt]))\n\t\t\t\t{\n\t\t\t\t\t$this->attrbytype[$bt]=array(\"data\"=>array());\n\t\t\t\t}\n\t\t\t\t$this->attrbytype[$bt][\"data\"][]=$a;\n\t\t\t}\n\t\t\t//now add a fast index in the attrbytype array to store id list in a comma separated form\n\t\t\tforeach($this->attrbytype as $bt=>$test)\n\t\t\t{\n\t\t\t\t$idlist;\n\t\t\t\tforeach($test[\"data\"] as $it)\n\t\t\t\t{\n\t\t\t\t\t$idlist[]=$it[\"attribute_id\"];\n\t\t\t\t}\n\t\t\t\t$this->attrbytype[$bt][\"ids\"]=implode(\",\",$idlist);\n\t\t\t}\n\t\t\t$this->attrinfo=array_merge($this->attrinfo,$attrinfs);\n\t\t}\n\t\t$notattribs=array_diff($cols,array_keys($this->attrinfo));\n\t\tforeach($notattribs as $k)\n\t\t{\n\t\t\t$this->attrinfo[$k]=null;\n\t\t}\n\t\t/*now we have 2 index arrays\n\t\t 1. $this->attrinfo which has the following structure:\n\t\t key : attribute_code\n\t\t value : attribute_properties\n\t\t 2. $this->attrbytype which has the following structure:\n\t\t key : attribute backend type\n\t\t value : array of :\n\t\t data => array of attribute_properties ,one for each attribute that match\n\t\t the backend type\n\t\t ids => list of attribute ids of the backend type */\n\t}",
"protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}",
"public function applyDefaultValues()\n {\n $this->active = false;\n }",
"public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }",
"function set_custom_edit_badge_columns($columns) {\n $columns['badge_image'] = 'Image';\n return $columns;\n}",
"public function getDefaultOrderCol() ;",
"function axiom_testimonial_edit_columns($columns){\n \n unset($columns['title']);\n \n $new_columns = array( \n \"cb\" => \"<input type=\\\"checkbox\\\" />\", \n \"user_image\" => _x('Image' , 'Image column at testimonial edit columns' , 'default'),\n \"title\" => _x('Customer Name' , 'Customer Name column at testimonial edit columns' , 'default'), \n \"category\" => _x('Category' , 'Category at testimonial edit columns' , 'default')\n ); \n return array_merge($new_columns, $columns); \n}",
"public function applyDefaultValues()\n {\n $this->setregis = 0;\n }",
"public function setDefaultAttributes($id, $price);",
"function __construct()\n\t{\n\t\t// changes the metaColumnsSQL, adds columns: attnum[6]\n\t}",
"function PDFTable($attrs) \n\t{\n\t\tglobal $DC,$DG;\n\n\t\t// recupera ogni proprietà passata dall'XML\n\t\tforeach($attrs as $key=>$value){\n\t\t\teval('$this->'.$key.' = \"$value\";');\n\t\t}\n\n\t\t// dichiara i valori di default...\n\t\t$default['COLS'][] = 1; // numero di ripetizioni orrizzontali dell'area di disegno\n\n\t\t// ... e li imposta\n\t\tforeach($default as $key=>$value){\n\t\t\tforeach ($value as $local){ eval('if ($local and !$this->'.$key.') { $this->'.$key.' = \"'.$local.'\"; }'); \t}\n\t\t}\n\t\t\n\t\t// dichiara la lista degli attributi obbligatori...\n\t\t$reqiured[] = \"GEOMETRY\";\n\t\t$reqiured[] = \"ROWS\";\n\t\t$reqiured[] = \"DSN\";\n\t\t\n\t\t// ... e li verifica\n\t\tforeach($reqiured as $value){\n\t\t\teval('if(!isset($this->'.$value.')){die (\"The property \".$value.\" in PDFTable ID -> \".$this->ID.\" is required.\");}');\n\t\t}\n\n\t\t$this->GEOMETRY = explode(',',$this->GEOMETRY);\n\n\t\t$this->LEFT = $this->GEOMETRY[0];\n\t\t$this->TOP = $this->GEOMETRY[1];\n\t\t$this->WIDTH = $this->GEOMETRY[2];\n\t\t$this->HEIGHT = $this->GEOMETRY[3];\n\t}",
"public function setAttributes($attributes){ }",
"public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }",
"protected function extend_attributes(&$attrs, $params, $name, $title, $value, $policy) {\r\n\t\tparent::extend_attributes($attrs, $params, $name, $title, $value, $policy);\r\n\t\t$attrs['name'] = $name;\r\n\t\t$attrs['rows'] = Arr::get_item($params, 'rows', 5);\r\n\t\t$attrs['cols'] = Arr::get_item($params, 'cols', 10);\t\r\n\t}",
"public function init() {\n extract($this->data);\n\n //Default link\n if(!$href) {\n $this->data['href'] = \"\";\n }\n\n if($href) {\n $this->data['attributeList']['role'] = \"link\";\n }\n }",
"function setDefaultValues() {}"
] | [
"0.6533331",
"0.64790803",
"0.64535666",
"0.6406681",
"0.63245183",
"0.6310447",
"0.6302117",
"0.62929285",
"0.6242857",
"0.62410724",
"0.6216642",
"0.6211655",
"0.6187357",
"0.6175051",
"0.61327463",
"0.60933846",
"0.60276556",
"0.6011132",
"0.60094136",
"0.6008063",
"0.6008063",
"0.6008063",
"0.6008063",
"0.6008063",
"0.5991838",
"0.5974281",
"0.5944467",
"0.5943326",
"0.5935728",
"0.5935728",
"0.5911058",
"0.58944345",
"0.5870785",
"0.5866886",
"0.5791724",
"0.5790978",
"0.5783825",
"0.5764345",
"0.57420176",
"0.5739242",
"0.57378054",
"0.5733599",
"0.57318395",
"0.57203543",
"0.57002217",
"0.56748295",
"0.5671437",
"0.565671",
"0.56520057",
"0.5649477",
"0.5643972",
"0.56347877",
"0.5621385",
"0.56065273",
"0.5598952",
"0.5594066",
"0.55926174",
"0.5581533",
"0.55806243",
"0.5567785",
"0.55634856",
"0.55634856",
"0.55484265",
"0.55475044",
"0.55352235",
"0.5532698",
"0.5526411",
"0.55205667",
"0.5519361",
"0.55172884",
"0.55172884",
"0.55172884",
"0.5513804",
"0.55117875",
"0.55087376",
"0.55072165",
"0.5505327",
"0.5504266",
"0.5499615",
"0.5498874",
"0.549809",
"0.5481465",
"0.54807043",
"0.5474731",
"0.5463438",
"0.5458329",
"0.5455405",
"0.5448813",
"0.5447352",
"0.54231614",
"0.54228663",
"0.5421669",
"0.5414477",
"0.5412067",
"0.5396276",
"0.539194",
"0.5377662",
"0.53758574",
"0.5373307",
"0.53701055",
"0.53685504"
] | 0.0 | -1 |
Set default attributes of the element of a column | public function setColumnAttributes($columnKey, $attributes)
{
$this->_checkArgumentIsArray(__METHOD__, 2, $attributes);
foreach ($attributes as $name => $val) {
$this->_defaultColumnsAttributes[$columnKey][$name] = $val;
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fillupDefault()\n {\n\n foreach (static::$cols as $key => $col) {\n if ('' != $col[self::COL_DEFAULT]) {\n $this->data[$key] = $col[self::COL_DEFAULT];\n }\n }\n\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}",
"protected function column_default($item, $column_name)\n {\n }",
"public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}",
"abstract public function getColDefaults();",
"public function getColumnDefaultValueDDL(Column $col);",
"public function setAttributes();",
"function initialize() {\n $this->set_openingtag(\"<COLGROUP[attributes]>\");\n $this->set_closingtag(\"</COLGROUP>\");\n }",
"public function setDefaultColumns()\n {\n foreach ($this->Model->columnsInformation as $column) {\n // Set indexes\n if ($column['Key'] == \"PRI\") {\n $this->indexes[] = $this->table . \".\" . $column['Field'];\n }\n // Set columns\n $this->columns[] = $this->table . \".\" . $column['Field'];\n }\n // Set default columns\n $this->defaultColumns = $this->columns;\n // Add actions column\n $this->addCustomColumn($this->builtInCustomColumns['actions']);\n // Add no column\n $this->addCustomColumnAsFirstColumn($this->builtInCustomColumns['no']);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_activ('');\n $this->setId_asignatura('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_situacion('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setActa('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_nom('');\n $this->setId_nivel('');\n $this->setId_asignatura('');\n $this->setId_situacion('');\n // la fecha debe estar antes del acta por si hay que usar la funcion inventarActa.\n $this->setF_acta('');\n $this->setActa('');\n $this->setDetalle('');\n $this->setPreceptor('');\n $this->setId_preceptor('');\n $this->setEpoca('');\n $this->setId_activ('');\n $this->setNota_num('');\n $this->setNota_max('');\n $this->setTipo_acta('');\n $this->setPrimary_key($aPK);\n }",
"function addColumn($defaults) { \n $defaults['template'] = 'Template'; \n return $defaults; \n }",
"function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }",
"protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setId_tarifa('');\n $this->setYear('');\n $this->setCantidad('');\n $this->setObserv('');\n $this->setId_serie('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_situacion('');\n $this->setDescripcion('');\n $this->setSuperada('');\n $this->setBreve('');\n $this->setPrimary_key($aPK);\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }",
"private function setDefaults()\n {\n $defaults = config('sevDeskApi.defaults.'.lcfirst($this->objectName));\n\n foreach($defaults as $attribute => $defaultValue)\n {\n if (!isset($this->$attribute))\n $this->$attribute = $defaultValue;\n }\n }",
"protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_documento',\n 'fk_funcionario',\n 'accion',\n 'fecha',\n 'descripcion',\n 'titulo'\n ],\n 'date' => ['fecha']\n ];\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setF_gasto('');\n $this->setTipo('');\n $this->setCantidad('');\n $this->setPrimary_key($aPK);\n }",
"function column_default( $item, $column_name ) {\n\t\t\n\t\tswitch( $column_name ) {\n\t\t\tdefault:\n\t\t\t\t$default_val = $item[ $column_name ];\n\t\t\t\tbreak;\n\t\t}\n\t\treturn apply_filters( 'bdpp_style_column_value', $default_val, $column_name, $item );\n\t}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"protected function updateColumnDefault($col, $default = null) {\n $col = self::$_defaults[$this->getObjectName()][$col];\n self::$_defaults[$this->getObjectName()][$col] = new DataValue($col->dataType, $default, $col->flags & DATAFLAG_NOTNULL);\n }",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'name';\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"function column_default($item, $column_name)\n {\n return $item[$column_name];\n }",
"function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}",
"function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}",
"private function getDefaultColumnArgs(){\n\n\t\t$args = array(\n\n\t\t\t\t'hasLightbox'\t=> true,\n\t\t\t\t'buttonText'\t=> __( 'Save Column', 'cuisinesections' )\n\t\t);\n\n\t\t$args = apply_filters( 'chef_sections_default_column_args', $args );\n\n\t\treturn $args;\n\n\t}",
"function initialize () {\n $this->set_openingtag ( \"<TD[attributes]>\" );\n\t$this->set_closingtag ( \"</TD>\" );\n }",
"function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}",
"function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}",
"protected function addDefaultAccessor(&$script, \\Column $col)\n {\n parent::addDefaultAccessor($script, $col);\n\n if($col->getType() == \\PropelTypes::DECIMAL) {\n $this->addMoneyAccessor($script, $col);\n }\n\n }",
"public function initAttribute();",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t$this->defaultColumns[] = 'id';\n\t\t\t$this->defaultColumns[] = 'complete_name';\n\t\t\t$this->defaultColumns[] = 'address';\n\t\t\t$this->defaultColumns[] = 'city_id';\n\t\t\t$this->defaultColumns[] = 'province_id';\n\t\t\t$this->defaultColumns[] = 'post_code';\n\t\t\t$this->defaultColumns[] = 'house_phone';\n\t\t\t$this->defaultColumns[] = 'mobile_phone';\n\t\t\t$this->defaultColumns[] = 'mobile_phone2';\n\t\t\t$this->defaultColumns[] = 'birth_place';\n\t\t\t$this->defaultColumns[] = 'birth_date';\n\t\t\t$this->defaultColumns[] = 'sex';\n\t\t\t$this->defaultColumns[] = 'religion';\n\t\t\t$this->defaultColumns[] = 'homepage';\n\t\t\t$this->defaultColumns[] = 'origin_status';\n\t\t\t$this->defaultColumns[] = 'origin_address';\n\t\t\t$this->defaultColumns[] = 'origin_city_id';\n\t\t\t$this->defaultColumns[] = 'origin_province_id';\n\t\t\t$this->defaultColumns[] = 'hobby';\n\t\t\t$this->defaultColumns[] = 'photo';\n\t\t\t$this->defaultColumns[] = 'status';\n\t\t\t$this->defaultColumns[] = 'child';\n\t\t\t$this->defaultColumns[] = 'is_data_changed';\n\t\t\t$this->defaultColumns[] = 'swt_users_id';\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"public function setViaTableAttributesValue($value);",
"function db_field_set_default(&$ret, $table, $field, $default) {\n if ($default == NULL) {\n $default = 'NULL';\n }\n else {\n $default = is_string($default) ? \"'$default'\" : $default;\n }\n\n $ret[] = update_sql('ALTER TABLE {'. $table .'} ALTER COLUMN '. $field .' SET DEFAULT '. $default);\n}",
"public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }",
"public function get_column_defaults() {\n\t\treturn array(\n\t\t\t'user_id' => 0,\n\t\t\t'email' => '',\n\t\t\t'username' => '',\n\t\t\t'name' => '',\n\t\t\t'product_count' => 0,\n\t\t\t'sales_count'\t => 0,\n\t\t\t'sales_value'\t => 0.00,\n\t\t\t'status'\t\t => 'pending',\n\t\t\t'notes' => '',\n\t\t\t'date_created' => date( 'Y-m-d H:i:s' ),\n\t\t);\n\t}",
"public function colDataAttr($colName, $attr = array()) {\r\n $this->colAttr[$colName] = $attr;\r\n return $this;\r\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_region('');\n $this->setRegion('');\n $this->setNombre_region('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"protected function afterConstruct() {\n\t\tif(count($this->defaultColumns) == 0) {\n\t\t\t$this->defaultColumns[] = array(\n\t\t\t\t'header' => 'No',\n\t\t\t\t'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'\n\t\t\t);\n\t\t\t//$this->defaultColumns[] = 'id';\n\t\t\t//$this->defaultColumns[] = 'bank_id';\n $this->defaultColumns[] = array(\n 'name' => 'bankName',\n 'value' => '$data->bank->bank_name',\n );\n\t\t\t$this->defaultColumns[] = 'account_number';\n\t\t\t$this->defaultColumns[] = 'owner_name_alias';\n\t\t\t/* $this->defaultColumns[] = array(\n\t\t\t\t'name' => 'publish',\n\t\t\t\t'value' => 'Utility::getPublish(Yii::app()->controller->createUrl(\"publish\",array(\"id\"=>$data->id)), $data->publish, 1)',\n\t\t\t\t'htmlOptions' => array(\n\t\t\t\t\t'class' => 'center',\n\t\t\t\t),\n\t\t\t\t'type' => 'raw',\n\t\t\t); */\n\n\t\t}\n\t\tparent::afterConstruct();\n\t}",
"public function overlayUserdefinedHtmlAttributeValues() {}",
"public function updateDefaultsFromObject() {\n parent::updateDefaultsFromObject();\n // Tags\n if(isset($this->widgetSchema['tags'])) {\n $tags = $this->getObject()->getTags();\n if($this->getUser()->getAttribute('enable_keyboard', false)) {\n $tags = implode(', ', $tags);\n }\n $this->widgetSchema['tags']->setDefault($tags);\n }\n // Elements\n if(isset($this->widgetSchema['elements_list'])) {\n $this->widgetSchema['elements_list']->setDefault($this->getObject()->getElements());\n }\n if($this->getUser()->getAttribute('enable_keyboard', false) && isset($this->widgetSchema['demandeur_id']) && !$this->isNew())\n {\n $this->setDefault('demandeur_id', $this->getObject()->getDemandeur()->getName());\n }\n }",
"public function setDefaultAttributes($id, $price);",
"function column_default($item, $column_name) {\n $user_info = get_userdata($item->create_by);\n $user_name = $user_info->data->user_login;\n switch ($column_name) {\n case 'template_name':\n return stripslashes($item->template_name);\n break;\n case 'template_description':\n return stripslashes($item->template_description);\n break;\n case 'create_by':\n return $user_name;\n break;\n case 'create_date':\n return date('d-m-Y', strtotime($item->create_date));\n break;\n default:\n return print_r($item, true);\n }\n }",
"function _reset()\n {\n foreach ($this->_cols as $col => $val) {\n if (isset($val['default'])) {\n $this->_data[$col] = $val['default'];\n } else {\n $this->_data[$col] = '';\n }\n }\n }",
"private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}",
"protected function initColumns()\n\t{\n\t\tif($this->columns===array())\n\t\t{\n\t\t\tif($this->dataProvider instanceof NActiveDataProvider)\n\t\t\t\t$this->columns=$this->dataProvider->model->attributeNames();\n\t\t\telse if($this->dataProvider instanceof IDataProvider)\n\t\t\t{\n\t\t\t\t// use the keys of the first row of data as the default columns\n\t\t\t\t$data=$this->dataProvider->getData();\n\t\t\t\tif(isset($data[0]) && is_array($data[0]))\n\t\t\t\t\t$this->columns=array_keys($data[0]);\n\t\t\t}\n\t\t}\n\t\t$id=$this->getId();\n\t\tforeach($this->columns as $i=>$column)\n\t\t{\n\t\t\tif ($column['name'] && (!isset($column['export']) || @$column['export']!=false)) {\n\t\t\t\tif(is_string($column))\n\t\t\t\t\t$column=$this->createDataColumn($column);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!isset($column['class']))\n\t\t\t\t\t\t$column['class']='NDataColumn';\n\t\t\t\t\t$column=Yii::createComponent($column, $this);\n\t\t\t\t}\n\t\t\t\tif(!$column->visible)\n\t\t\t\t{\n\t\t\t\t\tunset($this->columns[$i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($column->id===null)\n\t\t\t\t\t$column->id=$id.'_c'.$i;\n\t\t\t\t$this->columns[$i]=$column;\n\t\t\t} else {\n\t\t\t\tunset($this->columns[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->columns as $column)\n\t\t\t\t$column->init();\n\t}",
"public function setColumna($col){\n if($col>3 ){\n $this->columna = 3;\n }\n elseif ($col<0) {\n $this->columna = 0;\n }\n else{\n $this->columna = $col;\n }\n }",
"protected function default_for_attribute( $field_data, $attribute ) {\n\t\treturn null;\n\t}",
"public function set($column,$value);",
"function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )\n {\n if ( $currentVersion != false )\n {\n $dataText = $originalContentObjectAttribute->content();\n $contentObjectAttribute->setContent( $dataText );\n }\n else\n {\n $default = array( 'value' => array() );\n $contentObjectAttribute->setContent( $default );\n }\n }",
"protected function defaults(Table $table, Magic $column)\n {\n if (!is_null($column->default)) {\n return ' DEFAULT '.$this->wrap($this->defaultValue($column->default));\n }\n }",
"public function initialize($model, $column)\n\t{\n\t\tparent::initialize($model, $column);\n\t\tarray_push($this->css_class, 'inp-text');\n\t}",
"public function setAsPrimaryColumn(): self;",
"public function column_default( $item, $column_name ) {\n\t\treturn $item[ $column_name ];\n }",
"public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }",
"public function getDefaultOrderCol() ;",
"function initialize () {\n $this->set_openingtag ( \"<TH[attributes]>\" );\n\t$this->set_closingtag ( \"</TH>\" );\n }",
"protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = \"widget\";\n\t}",
"public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }",
"protected function defaults(Table $table, Magic $column)\n {\n if (null !== $column->defaults) {\n return ' DEFAULT ' . $this->wrap($this->default_value($column->defaults));\n }\n }",
"function experiences_columns_head($defaults) {\n $defaults['experience_order'] = 'Order';\n $defaults['featured_image'] = 'Featured Image';\n $defaults['experience_size'] = 'Size';\n $defaults['experience_link'] = 'Link';\n return $defaults;\n}",
"public function column_default($item, $column_name)\n\t\t\t{\n\t\t\t\treturn $item[$column_name];\n\t\t\t}",
"protected function beforeSave()\n {\n foreach ($this->getTableSchema()->columns as $column)\n {\n if ($column->allowNull == 1 && $this->getAttribute($column->name) == '')\n {\n $this->setAttribute($column->name, null);\n }\n }\n \n return parent::beforeSave();\n }",
"function set_defaults()\n {\n $mapper = $this->get_mapper();\n if ($mapper->has_method('set_defaults')) {\n $mapper->set_defaults($this);\n }\n }",
"public function setRecordAttributes(Model &$record, array $definition, array $defaultAttributes);",
"public function column_default( $dataset, $column_name ) {\n\n\t\t// Run our column switch.\n\t\tswitch ( $column_name ) {\n\n\t\t\tcase 'review_title' :\n\t\t\tcase 'review_product' :\n\t\t\tcase 'review_date' :\n\t\t\tcase 'review_score' :\n\t\t\tcase 'attribute_ratings' :\n\t\t\tcase 'review_author' :\n\t\t\tcase 'is_verified' :\n\t\t\tcase 'review_status' :\n\t\t\t\treturn ! empty( $dataset[ $column_name ] ) ? $dataset[ $column_name ] : '';\n\n\t\t\tdefault :\n\t\t\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_column_default', '', $dataset, $column_name );\n\t\t}\n\t}",
"protected function defaults(Table $table, Magic $column)\n {\n if (null !== $column->defaults) {\n return \" DEFAULT '\" . $this->default_value($column->defaults) . \"'\";\n }\n }",
"protected function defaultAttributes(){\n return [\n 'parentId' => 0, \n 'projectId' => 0, \n 'done' => 0, \n 'potion' => 0, \n 'notes' => array(), \n 'name' => '', \n ];\n }",
"function set_custom_edit_badge_columns($columns) {\n $columns['badge_image'] = 'Image';\n return $columns;\n}",
"public function column_default($item, $column_name)\n {\n return $item[$column_name];\n }",
"function yy_r32(){ $this->_retvalue = new SQL\\AlterTable\\SetDefault($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); }",
"function db_field_set_no_default(&$ret, $table, $field) {\n $ret[] = update_sql('ALTER TABLE {'. $table .'} ALTER COLUMN '. $field .' DROP DEFAULT');\n}",
"protected function _beforeRender()\r\n {\r\n $this->_element->setAttributes($this->getAttribs());\r\n }",
"public function columns()\n {\n return array(\n array(\n 'name' => 'name', \n 'title' => 'Attribute name',\n 'attributes' => array(\n \n ),\n ),\n array(\n 'name' => 'active',\n 'type' => 'toggle',\n 'title' => 'Active', \n 'attributes' => array(\n 'id' => \"active\",\n 'value' => \"{field_id}\"\n ), \n ) \n );\n }",
"public function setAttribute($attribute, $value) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t\t'*', tx_newspaper::getTable($this), $this->condition\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->attributes[$attribute] = $value;\n\t}",
"public function set_custom_column( $columns )\n {\n /* We are going to rearrange the information */\n $title = $columns['title'];\n $date = $columns['date'];\n unset ( $columns['title'] , $columns['date'] );\n\n $columns['name'] = 'Author Name';\n $columns['title'] = $title;\n $columns['approved'] = 'Approved';\n $columns['featured'] = 'Featured';\n $columns['date'] = $date;\n return ( $columns );\n }",
"public function column($defaults)\n {\n $defaults[ $this->slug ] = $this->name;\n return $defaults;\n }",
"public function setAttributes($data = []) {\n if (empty($data)) {\n //init\n $data = array_fill_keys(array_keys(static::attributLabels()), null);\n }\n if (is_array($data)) {\n $this->attributes = self::$wpdb->_escape($data);\n } else {\n parse_str($data, $this->attributes);\n }\n foreach ($this->attributes as $name => $value)\n if (property_exists($this, $name)) {\n $this->$name = $this->attributes[$name] = stripslashes_deep($value);\n } else {\n unset($this->attributes[$name]);\n }\n }",
"public function column_default( $item, $column_name ){\n switch( $column_name ) {\n case 'ID':\n case 'Orderno':\n case 'Mtid':\n case 'Userid':\n case 'UserName':\n case 'Prodcode':\n case 'Status':\n case 'Comment':\n case 'Editable':\n case 'Expirytime':\n case 'Modifydate':\n return $item[ $column_name ];\n default:\n return print_r( $item, true ) ;\n }\n }",
"public function setMemberDefaults(){\n parent::setMemberDefaults();\n \n $this->id = $this->id ? $this->id : UniqId::get(\"rbn-\");\n if (!$this->collarTriangleWidth) {\n $this->collarTriangleWidth = StyleUtil::getHalf($this->collarWidth);\n }\n if (!$this->collarColor) {\n if ($this->barColor){\n $this->collarColor = $this->barColor;\n }\n else if( $this->barGradient ){\n $this->collarColor = GradientInfo::getLastColor($this->barGradient);\n }\n }\n }",
"public static function setAttributeDefault($attribute, $value)\n {\n self::$_attributeDefaults[$attribute] = $value;\n }",
"function init()\n {\n $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('add', false, 'Nuova scheda', COMPONENT_TYPE_STRING);\n $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('buttonId', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('noLink', false, false, COMPONENT_TYPE_STRING);\n $this->defineAttribute('iconClass', false, 'fa-plus', COMPONENT_TYPE_STRING);\n\n parent::init();\n }",
"public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }",
"function column_default($item, $column_name){\n switch($column_name){\n case 'rating':\n case 'director':\n return $item[$column_name];\n default:\n return print_r($item[$column_name],true); //Show the whole array for troubleshooting purposes\n }\n }",
"function init()\n {\n $this->defineAttribute('data', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('stru', false, '', COMPONENT_TYPE_STRING);\n parent::init();\n }",
"public function updateColumn($table, $column, $type, $default) {\n global $wpdb;\n $table = $wpdb->prefix . $table;\n if (!empty($default)) {\n $wpdb->query(\"ALTER TABLE {$table} MODIFY COLUMN {$column} {$type} DEFAULT \\\"{$default}\\\";\");\n } else {\n $wpdb->query(\"ALTER TABLE {$table} MODIFY COLUMN {$column} {$type};\");\n }\n }",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"protected function _getDefaultAttributes()\n {\n return ['entity_type_id', 'attribute_set_id', 'created_at', 'updated_at'];\n }"
] | [
"0.64865583",
"0.6403172",
"0.6402127",
"0.6402127",
"0.6402127",
"0.6402127",
"0.6402127",
"0.6379181",
"0.6345725",
"0.6265452",
"0.62221503",
"0.61970633",
"0.61426544",
"0.600932",
"0.5979119",
"0.59032226",
"0.58905494",
"0.58699787",
"0.5867052",
"0.5853109",
"0.5833222",
"0.5825207",
"0.5813095",
"0.5811133",
"0.5809604",
"0.57712305",
"0.5723069",
"0.5656787",
"0.56517166",
"0.56374085",
"0.56356305",
"0.5609539",
"0.56000626",
"0.56000626",
"0.55916977",
"0.5575909",
"0.5567058",
"0.5567058",
"0.5557784",
"0.554874",
"0.5543598",
"0.55272126",
"0.55218565",
"0.5515727",
"0.55150455",
"0.5506965",
"0.5503483",
"0.54851264",
"0.54830337",
"0.54797846",
"0.5478215",
"0.54658437",
"0.54580206",
"0.54513633",
"0.54358166",
"0.54311824",
"0.54216367",
"0.5418195",
"0.5412044",
"0.5406117",
"0.5405116",
"0.5388569",
"0.5386844",
"0.5377194",
"0.537598",
"0.5370804",
"0.53663075",
"0.53649944",
"0.5363417",
"0.5361029",
"0.5354325",
"0.53526056",
"0.5349636",
"0.53422713",
"0.53335124",
"0.5320754",
"0.53169554",
"0.5315503",
"0.5315321",
"0.531133",
"0.5299868",
"0.52933323",
"0.52905875",
"0.5286349",
"0.5284452",
"0.5278087",
"0.52760416",
"0.52683157",
"0.52619046",
"0.52570724",
"0.5254869",
"0.52518165",
"0.5249396",
"0.5248811",
"0.52483875",
"0.5240569",
"0.52386206",
"0.52386206",
"0.52386206",
"0.52361196"
] | 0.5592871 | 34 |
Get default attributes of the element of a column | public function getColumnAttributes($columnKey)
{
$ret = null;
if (isset($this->_defaultColumnsAttributes[$columnKey])) {
$ret = $this->_defaultColumnsAttributes[$columnKey];
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getColDefaults();",
"function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}",
"function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}",
"protected function _getDefaultAttributes()\n {\n return ['entity_type_id', 'attribute_set_id', 'created_at', 'updated_at'];\n }",
"public function get_column_defaults() {\n\t\treturn array(\n\t\t\t'user_id' => 0,\n\t\t\t'email' => '',\n\t\t\t'username' => '',\n\t\t\t'name' => '',\n\t\t\t'product_count' => 0,\n\t\t\t'sales_count'\t => 0,\n\t\t\t'sales_value'\t => 0.00,\n\t\t\t'status'\t\t => 'pending',\n\t\t\t'notes' => '',\n\t\t\t'date_created' => date( 'Y-m-d H:i:s' ),\n\t\t);\n\t}",
"protected function _getDefaultAttributes()\r\n {\r\n return array(\r\n 'entity_type_id',\r\n 'attribute_set_id',\r\n 'created_at',\r\n 'updated_at',\r\n 'increment_id',\r\n 'store_id',\r\n 'website_id'\r\n );\r\n }",
"public function attributes()\r\n {\r\n return array_keys($this->getDb()->getTableSchema($this->layoutName())->columns);\r\n }",
"public function getDefaultAttributes()\n {\n return array_unique(array_merge($this->_getDefaultAttributes(), [$this->getEntityIdField(), $this->getLinkField()]));\n }",
"private function getDefaultAttributes()\n {\n return [\n 'name' => [\n 'type' => 'varchar',\n 'label' => 'Name',\n 'input' => 'text',\n 'sort_order' => 1,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'is_active' => [\n 'type' => 'int',\n 'label' => 'Is Active',\n 'input' => 'select',\n 'source' => Boolean::class,\n 'sort_order' => 2,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'url_key' => [\n 'type' => 'varchar',\n 'label' => 'URL Key',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 3,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'description' => [\n 'type' => 'text',\n 'label' => 'Description',\n 'input' => 'textarea',\n 'required' => false,\n 'sort_order' => 4,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'wysiwyg_enabled' => true,\n 'is_html_allowed_on_front' => true,\n 'group' => 'General',\n ],\n 'image' => [\n 'type' => 'varchar',\n 'label' => 'Image',\n 'input' => 'image',\n 'backend' => Image::class,\n 'required' => false,\n 'sort_order' => 5,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n ];\n }",
"final public function attributes()\n {\n $return = null;\n $col = $this->col();\n\n if($col->isRelation())\n $return = $col->getAttr('relation');\n\n elseif($col->isDate())\n $return = 'date';\n\n else\n $return = 'distinct';\n\n return $return;\n }",
"protected function defaultAttributes(){\n return [\n 'parentId' => 0, \n 'projectId' => 0, \n 'done' => 0, \n 'potion' => 0, \n 'notes' => array(), \n 'name' => '', \n ];\n }",
"function column_default($item, $column_name)\n {\n return $item[$column_name];\n }",
"function umnshib_getDefaultAttributeNames()\n{\n $shib = new BasicAuthenticator();\n return $shib->getDefaultAttributeNames();\n}",
"public function getDefaultSetting()\n {\n return $this->getPlatform()->getColumnDefaultValueDDL($this);\n }",
"public function getDefaultAttributes()\n {\n return [\n 'Value' => 0,\n 'MinValue' => 0,\n 'MaxValue' => 100,\n 'Increment' => 1,\n ];\n }",
"protected function getAttr()\r\n\t{\r\n\t\treturn array( 'maxLength', 'width', 'searchMethod', 'searchRangeValues' );\r\n\t}",
"public function get_attribute($key, $defaut = NULL);",
"protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }",
"private function getDefaultAttributes()\n {\n return array('lastPhotoId' => '', 'lastActionId' => '', 'lastGroupId' => '', 'lastWebhookId' => '', 'password' => '');\n }",
"public function getAttributes()\n {\n $userId = $this->getDataRow()->getCellValue('id');\n // Prepare your attributes\n $newAttributes = [\n 'data-href' => route('admin.userdetail', [$userId]),\n 'class' => 'my-class table-row',\n ];\n return array_merge(parent::getAttributes(), $newAttributes);\n }",
"public function columns()\n {\n return array(\n array(\n 'name' => 'name', \n 'title' => 'Attribute name',\n 'attributes' => array(\n \n ),\n ),\n array(\n 'name' => 'active',\n 'type' => 'toggle',\n 'title' => 'Active', \n 'attributes' => array(\n 'id' => \"active\",\n 'value' => \"{field_id}\"\n ), \n ) \n );\n }",
"public function column_default( $item, $column_name ) {\n\t\treturn $item[ $column_name ];\n }",
"function column_default($item, $column_name) {\n\t\tswitch($column_name) {\n\t\t\tcase 'id':\n\t\t\tcase 'orderinfo':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'company':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'transaction_id':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'email':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'expiration':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'accesstourlkey':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'webinarpass':\n\t\t\t\treturn $item[$column_name];\n\t\t\tcase 'total':\n\t\t\t\treturn $item[$column_name];\n\t\t\tdefault:\n\t\t\t\treturn print_r($item, true) ; \n\t\t}\n\t}",
"private function getDefaultColumnArgs(){\n\n\t\t$args = array(\n\n\t\t\t\t'hasLightbox'\t=> true,\n\t\t\t\t'buttonText'\t=> __( 'Save Column', 'cuisinesections' )\n\t\t);\n\n\t\t$args = apply_filters( 'chef_sections_default_column_args', $args );\n\n\t\treturn $args;\n\n\t}",
"public function getApplicableAttributes(): array\n {\n return array_keys($this->defaults);\n }",
"public function getViaTableAttributesValue();",
"public function table_attributes() {\n return static::find_by_sql(\"SHOW COLUMNS FROM \".static::$table_name);\n }",
"public function column_default($item, $column_name)\n\t\t\t{\n\t\t\t\treturn $item[$column_name];\n\t\t\t}",
"function column_default($item, $column_name) {\n $user_info = get_userdata($item->create_by);\n $user_name = $user_info->data->user_login;\n switch ($column_name) {\n case 'template_name':\n return stripslashes($item->template_name);\n break;\n case 'template_description':\n return stripslashes($item->template_description);\n break;\n case 'create_by':\n return $user_name;\n break;\n case 'create_date':\n return date('d-m-Y', strtotime($item->create_date));\n break;\n default:\n return print_r($item, true);\n }\n }",
"function column_default( $item, $column_name ) {\n\t\t\n\t\tswitch( $column_name ) {\n\t\t\tdefault:\n\t\t\t\t$default_val = $item[ $column_name ];\n\t\t\t\tbreak;\n\t\t}\n\t\treturn apply_filters( 'bdpp_style_column_value', $default_val, $column_name, $item );\n\t}",
"public function column_default( $item, $column_name ){\n switch( $column_name ) {\n case 'ID':\n case 'Orderno':\n case 'Mtid':\n case 'Userid':\n case 'UserName':\n case 'Prodcode':\n case 'Status':\n case 'Comment':\n case 'Editable':\n case 'Expirytime':\n case 'Modifydate':\n return $item[ $column_name ];\n default:\n return print_r( $item, true ) ;\n }\n }",
"function column_default( $item, $column_name ) {\n\t\tswitch ( $column_name ) {\n\t\t\tcase 'id':\n\t\t\tcase 'date':\n\t\t\tcase 'uploader':\n\t\t\tcase 'uploader_group':\n\t\t\tcase 'site':\n\t\t\tcase 'assessment':\n\t\t\tcase 'assessment_result':\n\t\t\tcase 'assessment_result_evaluation':\n\t\t\t\treturn $item[ $column_name ];\n\t\t\tdefault:\n\t\t\t\treturn print_r( $item, true ); //Show the whole array for troubleshooting purposes\n\t\t}\n\t}",
"public static function get_element_defaults() {\n\n\t\t\t\treturn [\n\t\t\t\t\t'class' => '',\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'link' => '',\n\t\t\t\t];\n\t\t\t}",
"function column_default($item, $column_name){\n switch($column_name){\n case 'rating':\n case 'director':\n return $item[$column_name];\n default:\n return print_r($item[$column_name],true); //Show the whole array for troubleshooting purposes\n }\n }",
"protected function attributes(): array\n {\n try {\n $attributes = [];\n $i = 0;\n foreach (static::$db_columns as $column) {\n $attributes[$column] = $this->$column;\n $i++;\n }\n return $attributes;\n } catch (Exception $e) {\n die(\"Error \" . $e);\n }\n }",
"function getDOMAttributes ( $attributes, $default = [] )\n{\n $style = getDOMAttribute('style', $attributes, $default);\n $classes = getDOMAttribute('class', $attributes, $default, 'classes');\n $id = getDOMAttribute('id', $attributes, $default);\n\n $result = $id . $classes . $style;\n\n // Add any attributes that start with \"data-\" or \"on\"\n foreach ($attributes as $key => $value)\n {\n if (preg_match('/^data-(.*)?/', $key) || preg_match('/^on(.*)?/', $key))\n $result .= ' ' . $key . '=\"' . $value . '\"';\n }\n return trim($result);\n}",
"public function attr() {\n\t\treturn utils::attr($this->attr, func_get_args());\n\t}",
"public function column_default($item, $column_name)\n {\n return $item[$column_name];\n }",
"private static function get_default_columns()\r\n {\r\n $columns = array();\r\n $columns[] = new ObjectTableColumn(Group :: PROPERTY_NAME);\r\n $columns[] = new ObjectTableColumn(Group :: PROPERTY_CODE);\r\n $columns[] = new ObjectTableColumn(Group :: PROPERTY_DESCRIPTION);\r\n return $columns;\r\n }",
"public static function stepAttributesField(): string\n {\n return Config::get('flow.steps.step_attributes_column', 'step_attributes');\n }",
"public static function get_element_defaults() {\n\n\t\t\t\treturn [\n\t\t\t\t\t'hide_on_mobile' => fusion_builder_default_visibility( 'string' ),\n\t\t\t\t\t'class' => '',\n\t\t\t\t\t'css_id' => '',\n\t\t\t\t\t'api_params' => '',\n\t\t\t\t\t'autoplay' => 'false',\n\t\t\t\t\t'alignment' => '',\n\t\t\t\t\t'center' => 'no',\n\t\t\t\t\t'height' => 360,\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'width' => 600,\n\t\t\t\t];\n\t\t\t}",
"function getAttributeDefault( $attribId )\n\t{\n\t\t$success = false;\n\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t$tablename_attributes = PhplistHelperAttribute::getTableName();\n\t\tPhplist::load( 'PhplistQuery', 'library.query' );\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_phplist' . DS . 'tables' );\n\t\t\n\t\t$query = new PhplistQuery( );\n\t\t$query->select( \"default_value\" );\n\t\t$query->from( $tablename_attributes . \" AS tbl\" );\t\t\n\t\t$query->where( 'tbl.id = '.$attribId );\n\t\t\n\t\t$database->setQuery( ( string ) $query );\n\t\t$data = $database->loadObject();\n\t\t$success = $data->default_value;\n\t\treturn $success;\n\t}",
"public function getHtmlAttributes();",
"public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }",
"public function column_default( $item, $column_name )\n {\n switch( $column_name ) {\n case 'id':\n case 'perusahaan':\n case 'total_ken':\n case 'total_pen':\n case 'tanggal': \n case 'rating':\n return $item[ $column_name ];\n default:\n return print_r( $item, true ) ;\n }\n }",
"function column_default( $item, $column_name ) {\n\n\t\tswitch ( $column_name ) {\n\n\t\t\tcase 'rating':\n\t\t\tcase 'director':\n\t\t\t\treturn $item[ $column_name ];\n\t\t\tdefault:\n\t\t\t\t//Show the whole array for troubleshooting purposes\n\t\t\t\treturn print_r( $item, true );\n\t\t}\n\t}",
"public function getColumnDefaultValueDDL(Column $col);",
"function getAdditionalAttributes() ;",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function column_default($item, $column_name)\n {\n }",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function render(): array\n {\n return array_merge($this->attributes, [\n 'cols' => $this->table->toArray()\n ]);\n }",
"public function getAttributes()\r\n\t{\r\n\t\treturn $this->attr;\r\n\t}",
"public function column_default($item, $column_name)\r\n {\r\n switch ($column_name) {\r\n case 'name':\r\n case 'sku':\r\n case 'price':\r\n case 'categories':\r\n case 'date':\r\n return $item[$column_name];\r\n default:\r\n return print_r($item, true);\r\n }\r\n }",
"public function attributes()\n {\n return parent::attributes();\n }",
"public function getHtmlAttributes() {}",
"public function getHtmlAttributes() {}",
"public function getAutomaticAttributes()\n {\n if (!$this->hasData('automatic_attributes')) {\n // Default mapped attributes\n $attributes = [];\n try {\n $store = $this->_storeModelStoreManagerInterface->getStore();\n } catch (NoSuchEntityException $e) {\n $this->_logger->error($e->getMessage(), ['class' => __CLASS__, 'method' => __METHOD__]);\n\n return $attributes;\n }\n $defaultAttributes = $this->_searchHelperConfig->getDefaultMappedAttributes();\n $iMaxDefaultAttrCnt = count($defaultAttributes['klevu_attribute']);\n for ($i = 0; $i < $iMaxDefaultAttrCnt; $i++) {\n $attributes[] = [\n 'klevu_attribute' => $defaultAttributes['klevu_attribute'][$i],\n 'magento_attribute' => $defaultAttributes['magento_attribute'][$i]\n ];\n }\n // Get all layered navigation / filterable in search attributes\n foreach ($this->getLayeredNavigationAttributes() as $layeredAttribute) {\n $attributes[] = [\n 'klevu_attribute' => 'other',\n 'magento_attribute' => $layeredAttribute\n ];\n }\n $this->setData('automatic_attributes', $attributes);\n // Update the store system config with the updated automatic attributes map.\n $this->_searchHelperConfig->setAutomaticAttributesMap($attributes, $store);\n }\n\n return $this->getData('automatic_attributes');\n }",
"public function getAttributes() {}",
"public function getAttributes() {}",
"public function defineAttributes()\n\t{\n\t\treturn array();\n\t}",
"public function attributes()\n {\n return [\n 'description' => 'Descrição',\n 'gender' => 'Gênero',\n ];\n }",
"public function getColumnConfig();",
"public function getColumnDefault($column)\n {\n return isset($this->columns[$column]['default'])\n ? $this->columns[$column]['default']\n : '';\n }",
"public function column_default( $item, $column_name ) {\n\t\tif ( in_array( $column_name, [ 'times_accessed', 'accessed', 'user_agent' ], true ) ) {\n\t\t\treturn esc_html( $item[ $column_name ] );\n\t\t}\n\n\t\treturn print_r( $item, true );\n\t}",
"public static function get_element_defaults() {\n\t\t\t\t$fusion_settings = fusion_get_fusion_settings();\n\t\t\t\treturn [\n\t\t\t\t\t'margin_bottom' => '',\n\t\t\t\t\t'margin_left' => '',\n\t\t\t\t\t'margin_right' => '',\n\t\t\t\t\t'margin_top' => '',\n\t\t\t\t\t'hide_on_mobile' => fusion_builder_default_visibility( 'string' ),\n\t\t\t\t\t'class' => '',\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'animation_type' => '',\n\t\t\t\t\t'animation_direction' => 'down',\n\t\t\t\t\t'animation_speed' => '0.1',\n\t\t\t\t\t'animation_offset' => $fusion_settings->get( 'animation_offset' ),\n\t\t\t\t];\n\t\t\t}",
"public function attributes()\n {\n return [\n 'external_id' => 'Third Party Identifier',\n 'name_first' => 'First Name',\n 'name_last' => 'Last Name',\n 'root_admin' => 'Root Administrator Status',\n ];\n }",
"public function getValidDefaultAttributes(): array\n {\n return [\n 'Empty string' => [\n 'attribute_dflt_0001.xsd', \n '', \n ], \n 'Only white spaces' => [\n 'attribute_dflt_0002.xsd', \n ' ', \n ], \n 'Alphanumeric' => [\n 'attribute_dflt_0003.xsd', \n 'foo3bar6baz9', \n ], \n 'Alphanumeric with white spaces' => [\n 'attribute_dflt_0004.xsd', \n ' foo2 bar9 baz8 qux1 ', \n ], \n ];\n }",
"public function getAttr(): string\r\n {\r\n return $this->attr;\r\n }",
"public function attributes()\r\n\t{\r\n\t\treturn $this->attribs;\r\n\t}",
"public function attributes()\n\t{\n\t\treturn $this->attribs;\n\t}",
"protected function _getAttributes(){\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}",
"protected function attributes() {\n\t $attributes = array();\n\t foreach(static::$table_fields as $field) {\n\t if(property_exists( $this, $field)) {\n\t $attributes[$field] = $this->$field;\n\t }\n\t }\n\t return $attributes;\n }",
"protected function column_default($item, $column_name)\n {\n }",
"public function getAttributesToSelect()\n {\n return $this->attributesToSelect;\n }",
"function column_default($item, $column_name){\n switch($column_name){\n case 'type':\n case 'quantity_sold':\n case 'asin':\n case 'status':\n return $item[$column_name];\n case 'fees':\n case 'price':\n return $this->number_format( $item[$column_name], 2 );\n case 'end_date':\n case 'date_published':\n \t// use date format from wp\n //return mysql2date( get_option('date_format'), $item[$column_name] );\n return get_date_from_gmt( $item[ $column_name ], get_option('date_format') .' H:i' );\n case 'template':\n return basename( $item['template'] );\n case 'profile':\n return isset($item['profile_id']) ? $this->profiles[ $item['profile_id'] ] : '';\n default:\n return print_r($item,true); //Show the whole array for troubleshooting purposes\n }\n }",
"public function getConfigurableAttributesAttribute()\n {\n return $this->custom_attributes()->where('attributes.is_configurable', 1)->where('attributes.type', 'select')->get();\n }",
"public function getAddAttrArray()\n {\n $custom = $this->select(Customization::ADD_ATTR)->get();\n $result = array_values($custom->toArray()[0]);\n array_unshift($result, __('general.select_attr'));\n return $result;\n }",
"public static function getDefaultColumns()\n {\n return [\n config('translatable.db.columns.langcode'),\n config('translatable.db.columns.translation_uuid'),\n ];\n }",
"public function overlayUserdefinedHtmlAttributeValues() {}",
"public function column_default( $item, $column_name ) {\n switch ( $column_name ) {\n\t\t\tcase 'expired':\n\t\t\tcase 'status':\n\t\t\t\treturn $item[ $column_name ];\n\t\t\tdefault:\n\t\t\t\treturn print_r( $item, true );\t \n\t\t}\n\t}",
"function defaults() {\n\t\t$ret = array();\n\t\tforeach($this->schema() as $key => $field) {\n\t\t\tif(!$field['primary'] && !is_null($field['default'])) {\n\t\t\t\t$ret[$key] = $field['default'];\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}",
"public function getAttributes(){ }",
"public function getDefaultInputAttributes()\n {\n return array( 'class' => 'form-control' );\n }",
"function getAttributes()\n {\n }",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}"
] | [
"0.735408",
"0.67821515",
"0.67821515",
"0.67272556",
"0.663794",
"0.65878904",
"0.6439237",
"0.64173335",
"0.6415646",
"0.6364332",
"0.62245405",
"0.62049246",
"0.62044716",
"0.6171318",
"0.61372334",
"0.6116767",
"0.6096225",
"0.6089471",
"0.608819",
"0.60817605",
"0.60525656",
"0.603269",
"0.6032034",
"0.6012599",
"0.6012349",
"0.60100657",
"0.6004331",
"0.6002728",
"0.5983886",
"0.5944884",
"0.59372944",
"0.5936824",
"0.592943",
"0.592414",
"0.591543",
"0.5911069",
"0.5911036",
"0.5905118",
"0.5879993",
"0.58773816",
"0.5874918",
"0.5871363",
"0.58709896",
"0.5837342",
"0.5832683",
"0.5826918",
"0.5823258",
"0.581763",
"0.58171445",
"0.5816242",
"0.5816242",
"0.5816242",
"0.5816242",
"0.5816242",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5814648",
"0.5807705",
"0.5796235",
"0.57962054",
"0.57863104",
"0.57779384",
"0.57779384",
"0.5775948",
"0.57750505",
"0.5774535",
"0.57700425",
"0.57697105",
"0.57674634",
"0.57635665",
"0.57513523",
"0.5750986",
"0.57353467",
"0.57291275",
"0.5725269",
"0.5719396",
"0.5716837",
"0.5714768",
"0.5701827",
"0.5700569",
"0.569245",
"0.5682399",
"0.5679109",
"0.56760925",
"0.56728655",
"0.5666586",
"0.566128",
"0.5651945",
"0.56457335",
"0.56420624",
"0.56384414",
"0.5636092",
"0.5635824",
"0.56354046"
] | 0.62841636 | 10 |
Add body row element by specifying cells value, and return created row element | public function addRow($values)
{
$this->_checkArgumentIsArray(__METHOD__, 1, $values);
$row = $this->createRow($values);
$this->addRowElement($row);
return $row;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function newRow( $cell ) {\n\n $sheetDataRef = $this->sheet->contents->sheetData;\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a row between\n // already existing rows. We must redraw the entire rows section of the xml object but insert our new row in the correct place as we redraw.\n if ( count( $sheetDataRef->row ) > 0 ) {\n\n $rowsCopy = clone $this->sheet->contents->sheetData;\n unset( $this->sheet->contents->sheetData->row );\n\n foreach ( $rowsCopy->row as $row ) {\n\n if ( (int) $row->attributes()->r > $rowCol[0] && empty( $inserted ) ) {\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n $inserted = true;\n }\n\n $copiedRow = $sheetDataRef->addChild( 'row' );\n $copiedRow->addAttribute( 'r', $row->attributes()->r );\n $copiedRow->addAttribute( 'spans', $row->attributes()->spans );\n\n foreach( $row->c as $col ) {\n\n $this->newCol( $copiedRow, $col->attributes()->r, $col->v );\n }\n }\n\n if ( ! empty( $inserted ) )\n return $insertedRow;\n }\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n return $insertedRow;\n }",
"private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}",
"public function addRow(TableRow $row);",
"public function addRow($values){\n\t\t$row = &$this->xml_data;\n\t\t$row .= '\n <Row ss:AutoFitHeight=\"0\">';\n\n\t\tforeach($values as $val){\n\t\t\t\n\t\t\t// check if given variable contains array\n\t\t\tif(is_array($val)){\n\t\t\t\t$value = $val[0];\n\t\t\t\t$datatype = $val[1];\n\t\t\t} else {\n\t\t\t\t$value = $val;\n\t\t\t\t$datatype = is_numeric($val) ? 'Number' : 'String';\n\t\t\t}\n\t\t\t$row .= '\n <Cell><Data ss:Type=\"'.$datatype.'\">'.$value.'</Data></Cell>';\t\t\t\n\t\t}\n\n\t\t$row .= '\n </Row>';\n\t}",
"function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \" \";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}",
"protected function _createRowContainer()\n\t{\n\t\tif ($this->_tbody == null) {\n\t\t\t$this->_tbody = new HtmlElement('tbody');\n\t\t\t$this->addElement($this->_tbody);\t\t\t\n\t\t}\t\t\n\t}",
"private function newCol( $row, $cell, $value ) {\n\n if ( count( $row->c ) > 0 ) {\n\n $rowCopy = clone $row;\n unset( $row->c );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a column between\n // already existing columns. We must redraw the entire columns ('c') section of the xml object but insert our new column in the correct place as we redraw.\n foreach ( $rowCopy as $col ) {\n\n if ( $cell < $col->attributes()->r && empty( $inserted ) ) {\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n $inserted = true;\n }\n\n $copiedCol = $row->addChild( 'c' );\n $copiedCol->addAttribute( 'r', $col->attributes()->r );\n $copiedCol->addChild( 'v', $col->v );\n }\n\n if ( ! empty( $inserted ) )\n return $insertedCol;\n }\n\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n return $insertedCol;\n }",
"function add_row($selector, $row = \\false, $post_id = \\false)\n{\n}",
"public function createRow($values = array(), $isHeader = false)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = new HtmlTableRow($this);\n\t\tif ($isHeader == true) {\n\t\t\t$row->setCellTagName('th');\n\t\t}\n\t\tforeach ($values as $columnKey => $value) {\n\t\t\t$row->addCell($columnKey, $value);\n\t\t}\n\t\treturn $row;\n\t}",
"public function row($cells = null, $options = []) {\r\n\t\tif (empty($options)) {\r\n\t\t\t$options = true;\r\n\t\t}\r\n\t\treturn $this->cells($cells, $options);\r\n\t}",
"function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }",
"public function row($content)\n\t{\n\t\tif ($content instanceof Closure) {\n\t\t\t$row = new Row();\n\t\t\tcall_user_func($content, $row);\n\t\t} else {\n\t\t\t$row = new Row($content);\n\t\t}\n\n\t\tob_start();\n\n\t\t$row->build();\n\t\t$contents = ob_get_contents();\n\n\t\tob_end_clean();\n\n\t\treturn $this->append($contents);\n\t}",
"public function addRowElement(HtmlTableRow $row)\n\t{\n\t\t$this->_createRowContainer();\n\t\t$this->_tbody->addElement($row);\n\t\treturn $this;\n\t}",
"function add_row($arr_html,$row){\r\n\r\n\t\tarray_splice($this->data, $row-1, 0, array($arr_html));\r\n\r\n\t}",
"function addRow($csvArr, $tagsArr, $count) {\n $ret = '<row>';\n for ($index = 0; $index < $count; $index++) {\n $ret .= '<' . $tagsArr[$index] . ' val=\"' . trim($csvArr[$index]) . '\"/>';\n }\n $ret .= '</row>';\n return $ret;\n}",
"public function addCell($value, $type = null, $styleName = null)\n {\n if (!$type) {\n $type = $this->guessType($value);\n }\n $value = htmlentities($value, ENT_COMPAT, $this->encoding);\n $this->data .= \"<Cell\" . ($styleName ? \" ss:StyleID=\\\"\" . $styleName . \"\\\"\" : \"\") . \"><Data ss:Type=\\\"\" . $type . \"\\\">\" . $value . \"</Data></Cell>\";\n return $this;\n }",
"public function setRow($value)\n {\n return $this->set('Row', $value);\n }",
"public function setRow($value)\n {\n return $this->set('Row', $value);\n }",
"public function cell($value) {\n return $this->setProperty('cell', $value);\n }",
"public function addTableRow($data, $params = array()) {\n if( !empty($this->_tableParams['offset']) ) {\n $offset = $this->_tableParams['offset'];\n } else {\n $offset = 0;\n }\n\n foreach ($data as $d) {\n\n if( is_array($d) ) {\n $text = isset($d['text'])?$d['text']:null;\n $options = !empty($d['options'])?$d['options']:null;\n } else {\n $text = $d;\n $options = null;\n }\n\n\n if( !empty($options) ) {\n $type = !empty($options['type'])?$options['type']:PHPExcel_Cell_DataType::TYPE_STRING;\n $align = !empty($options['align'])?$options['align']:PHPExcel_Style_Alignment::HORIZONTAL_LEFT;\n $colspan = !empty($options['colspan'])?$options['colspan']:null;\n\n switch ($type) {\n case 'string':\n $type = PHPExcel_Cell_DataType::TYPE_STRING;\n break;\n case 'number':\n $type = PHPExcel_Cell_DataType::TYPE_NUMERIC;\n break;\n }\n\n switch ($align) {\n case 'center':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;\n break;\n case 'right':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;\n break;\n }\n\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($align);\n $this->_xls->getActiveSheet()->getCellByColumnAndRow($offset, $this->_row)->setValueExplicit($text, $type);\n\n if( !empty($options['bold']) ) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold(true);\n }\n if( !empty($colspan) ) {\n $default = 1+$offset;\n $dimensi = $default+($colspan-1); // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n // if( $text == 'OPENING BALANCE' ) {\n // debug(__('%s%s:%s%s', $default, $row, $cell_end, $row));die();\n // }\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan-1;\n }\n } else {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $text);\n }\n \n // if (isset($params['horizontal'])) {\n // $this->_xls->getActiveSheet()->getCellByColumnAndRow($this->_row, $offset)->getStyle()->getAlignment()->setHorizontal($params['horizontal']);\n // }\n\n $offset++;\n }\n\n if( !empty($this->_tableParams['row_count']) ) {\n $row_count = $this->_tableParams['row_count'];\n } else {\n $row_count = 0;\n }\n\n $this->_row++;\n $this->_tableParams['row_count'] = $row_count+1;\n\n return $this;\n }",
"function ods_render_row($row, $data = array()) {\n $cells = $row->getElementsByTagName('table-cell');\n\n foreach ($cells as $cell) {\n $value_type = $cell\n ->getAttribute('office:value-type');\n\n //get text data\n $p1 = $cell\n ->getElementsByTagName('p'); \n\n foreach ($p1 as $p) {\n\n $orig_cell_text = $p->nodeValue;\n\n $data_val = false;\n\n if (!empty($orig_cell_text)) {\n if ($this->string_has_params($orig_cell_text)) {\n\n if ($this->parse_string_is_once_param($orig_cell_text)) {\n $param_key = $this->parse_string_extract_param($orig_cell_text);\n\n if ($this->parse_param_exists($param_key, $data)) {\n\n $data_val = $this->parse_param_value(\n $param_key, $data\n );\n $this->ods_cell_set_val($cell, $p, $data_val, array());\n }\n } else {\n $p->nodeValue = $this->parse_string($orig_cell_text, $data);\n }\n }\n }\n }\n \n $this->ods_render_cell_images($cell, $data); \n \n }\n return $row;\n }",
"private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }",
"function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}",
"function row($lebel, $content, $contentExists = false) {\n\t\tif ($contentExists == true) {\n\t\t\tif (!empty($contentExists)) {\n\t\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t}\n\t}",
"function addTableRow($cells, $aligns = NULL, $vAligns = NULL, $inlineStyle = NULL, $classesName = NULL)\n {\n if (! $this->tableIsOpen)\n die('ERROR: TABLE IS NOT STARTED');\n \n if (is_array($classesName) && count($classesName) != count($cells))\n die('ERROR: COUNT OF CLASSES IS DIFERENT OF COUNT OF CELLS');\n if (is_array($aligns) && count($aligns) != count($cells))\n die('ERROR: COUNT OF ALIGNS IS DIFERENT OF COUNT OF CELLS');\n if (is_array($vAligns) && count($vAligns) != count($cells))\n die('ERROR: COUNT OF VALIGNS IS DIFERENT OF COUNT OF CELLS');\n \n $style = '';\n if (is_array($inlineStyle)) {\n foreach ($inlineStyle as $key => $value)\n $style .= \"$key: $value;\";\n }\n \n $tableWidth = $this->atualPageWidth; // - ($this->leftMargin * One_Cent + $this->rightMargin * One_Cent);\n // $tableWidth -= (BORDER_ALT*2 + PADDING_ALT_RIGHT + PADDING_ALT_LEFT + BORDER_INSIDEH*2 + BORDER_INSIDEV*2);\n $cellWidth = floor($tableWidth / count($cells));\n \n $this->documentBuffer .= \"<tr style=\\\"mso-yfti-irow: $this->tableLastRow\\\">\\n\";\n for ($i = 0; $i < count($cells); $i ++) {\n $align = is_array($aligns) ? $aligns[$i] : 'left';\n $vAlign = is_array($vAligns) ? $vAligns[$i] : 'top';\n $classAttr = is_array($classesName) ? \" class=\\\"$classesName[$i]\\\"\" : '';\n \n $this->documentBuffer .= \"<td width=\\\"$cellWidth\\\" align=\\\"$align\\\" valign=\\\"$vAlign\\\" style=\\\"$style\\\"{$classAttr}>$cells[$i]</td>\\n\";\n }\n $this->documentBuffer .= \"</tr>\\n\";\n \n $this->tableLastRow ++;\n return $this->tableLastRow;\n }",
"public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }",
"public function insertRow($row);",
"public function addRowText($text)\n {\n return $this->withMeta(['addRowText' => $text]);\n }",
"public function addRowText($text)\n {\n return $this->withMeta(['addRowText' => $text]);\n }",
"public function WriteRow(\n array $newRow): void\n {\n $rows = [$newRow]; // you can append several rows at once\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues($rows);\n $range = 'Sheet1'; // the service will detect the last row of this sheet\n $options = ['valueInputOption' => 'USER_ENTERED'];\n try {\n $this->service->spreadsheets_values->append($this->spread_sheet_Id, $range, $valueRange, $options);\n } catch (Exception $exception) {\n echo $exception;\n }\n /*\n $newRow = [\n '456740',\n 'Hellboy',\n 'https://image.tmdb.org/t/p/w500/bk8LyaMqUtaQ9hUShuvFznQYQKR.jpg',\n \"Hellboy comes to England, where he must defeat Nimue, Merlin's consort and the Blood Queen. But their battle will bring about the end of the world, a fate he desperately tries to turn away.\",\n '1554944400',\n 'Fantasy, Action'\n ];\n $rows = [$newRow]; // you can append several rows at once\n $valueRange = new \\Google_Service_Sheets_ValueRange();\n $valueRange->setValues($rows);\n $range = 'Sheet1'; // the service will detect the last row of this sheet\n $options = ['valueInputOption' => 'USER_ENTERED'];\n $service->spreadsheets_values->append($spreadsheetId, $range, $valueRange, $options);\n */\n }",
"public function addRow($row, $file)\n { }",
"public function addRows($type, array $datas) {\n\n $row = $this->$type->addChildren(new VTCore_Html_Element(array(\n 'type' => 'tr',\n )))\n ->lastChild();\n\n foreach ($datas as $key => $data) {\n $cell = $row->addChildren(new VTCore_Html_Element(array(\n 'type' => ($type == 'thead') ? 'th' : 'td',\n )))\n ->lastChild();\n\n if (!is_array($data)) {\n $cell->addChildren($data);\n }\n elseif (isset($data['attributes']) && isset($data['content'])) {\n $cell->addAttributes($data['attributes']);\n $cell->addChildren($data['content']);\n }\n }\n\n return $row;\n\n }",
"public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td')\n {\n $colType = ($colType === 'th') ? 'th' : 'td';\n $noWrap = $this->no_noWrap ? '' : ' nowrap';\n // Start up:\n $l10nParent = isset($data['_l10nparent_']) ? (int)$data['_l10nparent_'] : 0;\n $out = '\n\t\t<!-- Element, begin: -->\n\t\t<tr ' . $rowParams . ' data-uid=\"' . (int)$data['uid'] . '\" data-l10nparent=\"' . $l10nParent . '\">';\n // Show icon and lines\n if ($this->showIcon) {\n $out .= '\n\t\t\t<' . $colType . ' class=\"col-icon nowrap\">';\n if (!$h) {\n $out .= ' ';\n } else {\n for ($a = 0; $a < $h; $a++) {\n if (!$a) {\n if ($icon) {\n $out .= $icon;\n }\n }\n }\n }\n $out .= '</' . $colType . '>\n\t\t\t';\n }\n // Init rendering.\n $colsp = '';\n $lastKey = '';\n $c = 0;\n $ccount = 0;\n // __label is used as the label key to circumvent problems with uid used as label (see #67756)\n // as it was introduced later on, check if it really exists before using it\n $fields = $this->fieldArray;\n if ($colType === 'td' && array_key_exists('__label', $data)) {\n $fields[0] = '__label';\n }\n // Traverse field array which contains the data to present:\n foreach ($fields as $vKey) {\n if (isset($data[$vKey])) {\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass && $ccount % 2 == 0) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n $lastKey = $vKey;\n $c = 1;\n $ccount++;\n } else {\n if (!$lastKey) {\n $lastKey = $vKey;\n }\n $c++;\n }\n if ($c > 1) {\n $colsp = ' colspan=\"' . $c . '\"';\n } else {\n $colsp = '';\n }\n }\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n // End row\n $out .= '\n\t\t</tr>';\n // Return row.\n return $out;\n }",
"function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}",
"function AddRow()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// no parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// increment the row pointer\n\t\tif (!isset($this->_intCurrentRow))\n\t\t{\n\t\t\t$this->_intCurrentRow = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_intCurrentRow++;\n\t\t}\n\t\t\n\t\t// build the array of column values\t\t\n\t\t$arrColumns = func_get_args();\n\t\t$this->_arrRows[] = Array('Columns'=>$arrColumns);\n\t\t\n\t\treturn $this->_intCurrentRow;\n\t}",
"function helper_pdf_add_cell($pdf, $largura, $altura, $texto, $bordas, $pula_linha, $alinhamento){\n\t$pdf->Cell($largura, $altura, $texto, $bordas, $pula_linha, $alinhamento);\n}",
"function add_cell($val, $link = \"\")\n\t{\n\t\tif (!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}",
"function add_cell($val, $link = \"\")\n\t{\n\t\tif(!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}",
"function tck_table_add_row_cell_array( $cells, $keyword, $url, $title, $ip, $clicks, $timestamp ) {\n $fkeyword = tck_get_keyword($keyword);\n \n if ( $fkeyword != $keyword ) {\n $shorturl = yourls_link($fkeyword);\n $cells['keyword']['shorturl'] = yourls_esc_url($shorturl);\n $cells['keyword']['keyword_html'] = yourls_esc_html( $fkeyword );\n $cells['actions']['keyword'] = $fkeyword;\n }\n \n $newcells['custom']['template'] = '%custom%';\n $newcells['custom']['custom'] = (tck_is_custom_keyword($fkeyword) ? 'Yes' : 'No');\n $newcells['actions'] = $cells['actions'];\n\n unset($cells['actions']);\n return array_merge($cells, $newcells);\n }",
"public function addRows()\n {\n }",
"public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }",
"function build_row($row)\n{\n\t$name = $row->getColumnVal('Name');\n\t$id = $row->getColumnVal('Id');\n\n\t// Setup the columns you want to work with\n\t$idCol = $row->getCol('Id');\n\t$nameCol = $row->getCol('Name');\n\t$actionCol = $row->getCol('Action');\n\t$typeCol = $row->getCol('Type');\n\n\t// Set some HTML properties on the give column\n\t$idCol->setProp('width','50');\n\t$typeCol->setProp('width','50');\n\t$typeCol->addClass('center');\n\n\t// Add some CSS classes to the action column\n\t$actionCol\n\t\t-> addClass('center')\n\t\t-> addClass('btn');\n\n\t// Add an action link to the Action column\n\t$row->addLink('Action', \"examples.php?id=$id\", '[edit]', \"\", \"no-un\");\n\t$row->addLink('Action', \"examples.php?id=$id\", '[delete]', \"\", \"no-un\");\n\n\t// Set an ID on the row\n\t$row->setProp('id', \"tr_$id\");\n\n\t// set the background of the strawberry column to black\n\tif($name == \"Strawberry\")\n\t{\n\t\t// get an instance of the column and set a css class\n\t\t$nameCol->addClass('strawberry');\n\t}\n\n\t// set the background of the entire shoe row to red\n\tif($name == \"Chocolate\")\t\n\t{\n\t\t$row->addClass('chocolate');\n\t}\n\n\t// change one of the cell values\n\tif($name == \"Banana\")\t\n\t{\n\t\t$row->setVal('Name', $name . \" (favorite) <img src='https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcROTNegrNoPzMFMcpQ4pl7tko9LMwgoXuZyjTmX8vpUuPS_RfZr' />\");\n\t}\n\n\treturn $row;\n}",
"function addFieldRow($colName,$colLabel,$colValue) {\n global $theme, $app_list_strings;\n \n static $operator_options;\n if (empty($operator_options)) {\n $operator_options= get_select_options_with_id($app_list_strings['merge_operators_dom'],'');\n }\n\n $LBL_REMOVE = translate('LBL_REMOVE');\n $deleteInlineImage = SugarThemeRegistry::current()->getImageURL('delete_inline.gif');\n $snippet=<<<EOQ\n <span id=filter_{$colName} style='visibility:visible' value=\"{$colLabel}\" valueId=\"{$colName}\">\n <table width='100%' border='0' cellpadding='0'>\n <tr>\n <td width='2%'><a class=\"listViewTdToolsS1\" href=\"javascript:remove_filter('filter_{$colName}')\"><!--not_in_theme!--><img src='{$deleteInlineImage}' align='absmiddle' alt='{$LBL_REMOVE}' border='0' height='12' width='12'> </a></td>\n <td width='20%'>{$colLabel}: </td>\n <td width='10%'><select name='{$colName}SearchType'>{$operator_options}</select></td>\n <td width='68%'><input value=\"{$colValue}\" id=\"{$colName}SearchField\" name=\"{$colName}SearchField\" type=\"text\"></td> \n </tr> \n </table>\n </span>\nEOQ;\n\n return $snippet;\n}",
"public function addRow($data)\n\t{\n\t\t$struct = isset($this->table) ? $this->table->structure() : null;\n\t\t\n\t\tif (is_array($data)) {\n\t\t\t$model = $this->generateModel($data);\n\t\t\t$row = new Row($model, $struct);\n\t\t} else if ($data instanceof ModelInterface) {\n\t\t\t$row = new Row($data, $struct);\n\t\t} else if ($data instanceof Row) {\n\t\t\t$row = $data;\n\t\t}\n\t\t\n\t\tif (!isset($row)) {\n\t\t\tthrow new \\Exception(\"No valid row data was provided.\");\n\t\t}\n\t\t\n\t\t$this->rows[] = $row;\n\t}",
"function add_sub_row($selector, $row = \\false, $post_id = \\false)\n{\n}",
"public function addRow($row)\n {\n $this->rows[] = $row;\n }",
"public function new_row($css = '', $extras='') {\n\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n if ($this->_rowopen) {\n $this->end_row();\n }\n\n if ($this->_newid != '') {\n $extras .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n echo '<tr'.($css != '' ? ' class=\"'.$css.'\"' : '').($extras != '' ? ' '.$extras : '').'>';\n $this->_rowopen = true;\n }",
"function appendWorksheetRow($row, $service, $config)\n{\n\t// set target spreadsheet and worksheet\n\t$ssKey = $config['ssid'];\n\t$wsKey = $config['wsid'];\n\n\ttry {\n\t\t// insert new row\n\t\t$service->insertRow($row, $ssKey, $wsKey);\n\t}\n\tcatch (Exception $e) {\n\t\tdie('ERROR: ' . $e->getMessage());\n\t}\t\n}",
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"public function add_invoice_row() {\n\n $addFlag = false;\n\n // Set null values to check for and later insertion if required\n $data = array(\n 'category' => null,\n 'description' => null,\n 'amount' => null,\n 'mockInvoiceId' => $_POST[ 'mockInvoiceId' ]\n );\n\n // Check if there are any rows that have nothing in them\n $row = $this->mockinvoice_row_model->get_by( $data );\n\n // Add a new row if there are no blank ones already\n if ( empty( $row ) ) {\n // Add a new row with empty values\n $this->mockinvoice_row_model->save( $data );\n $addFlag = true;\n }\n\n\n // Send back if a new row was added\n $returnArray[] = array( 'rowAdded' => $addFlag );\n $this->json_library->print_array_json_unless_empty( $returnArray );\n }",
"protected function create_cell($params = array())\n {\n $cellObj = new stdClass();\n if($params)\n {\n foreach($params AS $name=>$value)\n {\n $cellObj->$name = $value;\n }\n }\n return $cellObj;\n }",
"protected function objectRow( $key, $val ) {\n\t\t$th = Xml::elementClean( 'th', array(), $key );\n\t\tif ( is_array( $val ) ) {\n\t\t\t$td = Xml::tags( 'td', array(), self::objectTable( $val ) );\n\t\t} else {\n\t\t\tif ( is_string( $val ) ) {\n\t\t\t\t$val = '\"' . $val . '\"';\n\t\t\t} else {\n\t\t\t\t$val = FormatJson::encode( $val );\n\t\t\t}\n\n\t\t\t$td = Xml::elementClean( 'td', array( 'class' => 'value' ), $val );\n\t\t}\n\n\t\treturn Xml::tags( 'tr', array(), $th . $td );\n\t}",
"public function renderTableRow($model) {\n $cells = [];\n /* @var $column Column */\n foreach ($this->columns as $column) {\n $cells[] = $column->renderContentCell($model);\n }\n\tif (is_callable($this->rowOptions) && $model !== null)\n\t $options = call_user_func($this->rowOptions, $model, $this);\n\telse\n\t $options = $this->rowOptions;\n\n $options['data-key'] = (string)$model->key();\n\n return Widget::html()->tag('table-row', array('content' => implode('', $cells)), $options);\n }",
"function append(Row $row) {\n\t\t$this->rows[] = $row;\n\t\treturn $this;\n\t}",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"public function row($row)\r\n {\r\n $this->rows[] = $row;\r\n\r\n return $this;\r\n }",
"protected function buildRow($column_name, array $column, $default_value, $weight, $delta) {\n return [\n '#attributes' => ['class' => ['draggable']],\n 'name' => [\n '#type' => 'checkbox',\n '#default_value' => $default_value,\n ],\n 'title' => [\n '#markup' => $column['title'],\n ],\n 'key' => [\n '#markup' => (isset($column['key'])) ? $column['key'] : $column['name'],\n ],\n 'weight' => [\n '#type' => 'weight',\n '#title' => $this->t('Weight for @label', ['@label' => $column['title']]),\n '#title_display' => 'invisible',\n '#attributes' => [\n 'class' => ['table-sort-weight'],\n ],\n '#delta' => $delta,\n '#default_value' => $weight,\n ],\n ];\n }",
"public function CellRow($text, $height = 7, $border = 0)\n {\n\n $this->Cell($this->GetWithWithoutMargin(), $height, $text, $border, 1);\n }",
"public function addRow($rowName) {\n $this->addRowName($rowName);\n return new RowHandle($this, $rowName);\n }",
"function addRow($row, $attributes = null)\n {\n $key = sizeof($this->_rows);\n $this->_rows[$key] = $row;\n\n //if updateValue has been called make sure to update the values of each added element\n foreach (array_keys($this->_rows[$key]) as $key2) {\n if (isset($this->_form)) {\n $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $this->_form);\n }\n if ($this->isFrozen()) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n \n if (isset($attributes)) $this->_rowAttributes[$key] = $attributes;\n }",
"public function addRow($row) {\n array_push($this->rows, $row);\n }",
"public function addCell($key, Cell $cell);",
"private function spreadsheet_rows($string, $content_num) {\n $rows1 = explode('</table:table-row>', $string);\n array_pop($rows1);\n\n $result_rows = array();\n $ix = 0;\n foreach ($rows1 as $row_text) {\n list($row_text, $cellscontent) = $this->extract_first_tag_str($row_text);\n $row_tag = $this->tag_attr($row_text);\n\n $row_tag['content'] = explode('<table:table-cell', $cellscontent);\n\n /*\n * if cell is spanned columns or rows\n */\n if ($row_tag['content']) {\n if ($row_tag['content'][0] == '') {\n array_shift($row_tag['content']);\n }\n }\n\n foreach ($row_tag['content'] as $cell_content) {\n\n if (strpos($cell_content, '<table:covered-table-cell') === 0) {\n /*\n * Compensation cell before\n */\n\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n\n if ($cell_content[0] == ' ' || $cell_content[0] == '/') {\n /*\n * Обычная ячейка\n */\n $cell_content = '<table:table-cell' . $cell_content;\n $cell_closing_pair_pos = strpos($cell_content, '</table:table-cell>');\n\n if ($cell_closing_pair_pos !== false) {\n /*\n * cell is content\n */\n list($cell_tag_text, $cell_tag_content) = $this->extract_first_tag_str($cell_content);\n $cell_tag = $this->tag_attr($cell_tag_text);\n $cell_tag['content'] = current(explode('</table:table-cell>', $cell_tag_content));\n } else {\n $cell_tag = $this->tag_attr($cell_content);\n $cell_tag['content'] = false;\n }\n $row_tag['cells'][] = $cell_tag;\n\n /*\n * Check compensation cells after cell\n */\n if (strpos($cell_content, '<table:covered-table-cell') !== false) {\n /*\n * Compensation cell before\n */\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n }\n }\n unset($row_tag['content']);\n $row_tag['content_num'] = $content_num;\n $row_tag['content_index'] = $ix;\n if ($ix == 0)\n $row_tag['content_first'] = true;\n if ($ix == count($rows1) - 1)\n $row_tag['content_last'] = true;\n\n $row_tag['repeated'] = false;\n if (empty($row_tag['attr']['table:number-rows-repeated']))\n $result_rows[] = $row_tag;\n else {\n $repeated = (int) $row_tag['attr']['table:number-rows-repeated'];\n if ($repeated > 1000)\n $repeated = 1000;\n $row_tag['repeated'] = true;\n unset($row_tag['attr']['table:number-rows-repeated']);\n for ($i = 0; $i < $repeated; $i++)\n $result_rows[] = $row_tag;\n }\n \n $ix++;\n }\n return $result_rows;\n }",
"public function AddRow(Row $row) {\n return $this->Add($row);\n }",
"public function insert($row)\n {\n $entry = '<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\">';\n foreach($row as $colName => $value) {\n $entry .= sprintf(\n '<gsx:%s>%s</gsx:%s>',\n $colName,\n $value,\n $colName\n );\n }\n $entry .= '</entry>';\n\n ServiceRequestFactory::getInstance()->post($this->getPostUrl(), $entry);\n }",
"public function add_row(HTMLRowElement $row = null): int\n {\n if($row === null) $row = new HTMLRowElement();\n return $this -> add_child($row);\n }",
"protected function newRow()\n\t{\n\t\t$this->loadDefaultValues();\n\t\t$row = [];\n\t\t$row['document_sequence'] = $this->document_sequence->CurrentValue;\n\t\t$row['firelink_doc_no'] = $this->firelink_doc_no->CurrentValue;\n\t\t$row['project_name'] = $this->project_name->CurrentValue;\n\t\t$row['document_tittle'] = $this->document_tittle->CurrentValue;\n\t\t$row['submit_no'] = $this->submit_no->CurrentValue;\n\t\t$row['revision_no'] = $this->revision_no->CurrentValue;\n\t\t$row['transmit_no'] = $this->transmit_no->CurrentValue;\n\t\t$row['transmit_date'] = $this->transmit_date->CurrentValue;\n\t\t$row['direction'] = $this->direction->CurrentValue;\n\t\t$row['approval_status'] = $this->approval_status->CurrentValue;\n\t\t$row['document_link'] = $this->document_link->Upload->DbValue;\n\t\t$row['transaction_date'] = $this->transaction_date->CurrentValue;\n\t\t$row['document_native'] = $this->document_native->CurrentValue;\n\t\t$row['username'] = $this->username->CurrentValue;\n\t\t$row['expiry_date'] = $this->expiry_date->CurrentValue;\n\t\treturn $row;\n\t}",
"public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}",
"function NewRow() {\n\t\t$row = array();\n\t\t$row['row_id'] = NULL;\n\t\t$row['auc_date'] = NULL;\n\t\t$row['auc_number'] = NULL;\n\t\t$row['auc_place'] = NULL;\n\t\t$row['start_bid'] = NULL;\n\t\t$row['close_bid'] = NULL;\n\t\t$row['auc_notes'] = NULL;\n\t\t$row['total_sack'] = NULL;\n\t\t$row['total_netto'] = NULL;\n\t\t$row['total_gross'] = NULL;\n\t\t$row['auc_status'] = NULL;\n\t\t$row['rate'] = NULL;\n\t\treturn $row;\n\t}",
"function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}",
"final function rowSpan($i, $j, $value){\n\t\tif (!$value = (int)$value)\n\t\t\treturn $this;\n\t\tif (!$this->checkRow($i,$j) and $this->contents[$i]->contents[$j] !== '')\n\t\t\t$this->contents[$i]->contents[$j]->attr(array('rowspan'=>$value));\n\t\treturn $this;\n\t}",
"function &getRowInstance() {\n\t\t$row = new IssueGridRow();\n\t\treturn $row;\n\t}",
"public function addRow(array $row)\n {\n $this->_rows[] = $row;\n return $this;\n }",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"public function addNew($row = null)\n {\n if(($row <> null) && ($nm = $row->getModelName()) <> $this->childName)\n throw new HTException(\"SolModel cannot $this->childName::addNew($nm)\");\n if($row == null)\n {\n $newPropVals = array();\n foreach($this->accessorNames as $accessorName)\n {\n $newPropVals[$accessorName] = '';\n }\n $objResult = new HTResult($newPropVals, $this->childName);\n }\n else\n $objResult = $row;\n $this->resultList[] = $objResult;\n return $objResult;\n }",
"public function addRow(array $row) {\n\t\t$this->tableInfo['rows'][] = $row;\t\n\t}",
"public function getRow();",
"public function add_cell(HTMLCellElement $cell): int\n {\n if($cell === null) $cell = new HTMLCellElement(\"\");\n return $this -> add_child($cell);\n }",
"public function addRow($tabela, $name, $type, $pkey, $notnull, $ai, $keys, $size, $default, $index, $unique);",
"public function getCellValueForRendering($row, $cell=null);",
"public function addRow(array $data = null)\r\n {\r\n $this->rowIndex++;\r\n\r\n if (is_array($data)) {\r\n foreach ($data as $col => $content) {\r\n $this->data[$this->rowIndex][$col] = $content;\r\n }\r\n }\r\n\r\n return $this;\r\n }",
"public function getRow() {}",
"public function addRow(array $row)\n {\n if (null === $this->nbColumns) {\n $this->nbColumns = count($row);\n } elseif (count($row) !== $this->nbColumns) {\n throw new LogicException(sprintf(\n 'Expected the row to contain %s cells, but got %s.',\n $this->nbColumns,\n count($row)\n ));\n }\n\n $this->rows[] = array_values($row);\n\n return $this;\n }",
"function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}",
"public function addRow(array $row){\n\t\t$prependedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->prependedCols)){\n\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);;\n\t\t\t}\n\t\t\t$prependedCols[\"prependedCol\".$col[\"header\"]]=$html;\n\t\t\t$row=array_merge($prependedCols,$row);\n\t\t}\n\t\t\n\t\t$appendedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->appendedCols)){\n\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);\n\t\t\t}\n\t\t\t$appendedCols[\"appendedCol\".$col[\"header\"].$counter]=$html;\n\t\t\t$row=array_merge($row,$appendedCols);\n\t\t}\n\t\t\n\t\t$this->rows+=1; \t\t\n\t\t$this->data[]=$row;\n\t}",
"public function buildRow(&$row)\n {\n $lines = array();\n $class = '';\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $Column->cell($row);\n }\n if ($this->tableOptions['group']) {\n $level = 1000;\n foreach ($this->tableOptions['group'] as $count => $group) {\n if (is_null($row[$group]) && $count < $level) {\n $level = $count;\n }\n }\n if ($level < 1000) {\n $class = 'mh-table-group-row mh-table-group-row-level-'.$level;\n }\n\n }\n if (empty($class) && $this->altRow) {\n $class = 'altrow';\n }\n $this->altRow = !$this->altRow;\n\n return $this->Html->tag('tr', implode(chr(10), $lines), array('class' => $class));\n }",
"function NewRow() {\n\t\t$row = array();\n\t\t$row['tanggal'] = NULL;\n\t\t$row['auc_number'] = NULL;\n\t\t$row['start_bid'] = NULL;\n\t\t$row['close_bid'] = NULL;\n\t\t$row['lot_number'] = NULL;\n\t\t$row['chop'] = NULL;\n\t\t$row['grade'] = NULL;\n\t\t$row['estate'] = NULL;\n\t\t$row['sack'] = NULL;\n\t\t$row['netto'] = NULL;\n\t\t$row['open_bid'] = NULL;\n\t\t$row['last_bid'] = NULL;\n\t\t$row['highest_bid'] = NULL;\n\t\t$row['enter_bid'] = NULL;\n\t\t$row['auction_status'] = NULL;\n\t\t$row['gross'] = NULL;\n\t\t$row['row_id'] = NULL;\n\t\treturn $row;\n\t}",
"function ou_df_grid_row($variables) {\n return '<div class=\"int-row\">' . $variables['element']['#children'] . '</div>';\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function &getRowInstance() {\n\t\t$row = new MastheadGridRow();\n\t\treturn $row;\n\t}",
"public static function createRow(array $data = [])\n\t{\n\t\t$row = new static(static::$_defaultValues, false, false);\n\t\t$row->setFromArray($data);\n\t\treturn $row;\n\t}",
"public function cell() {\r\n\t\t$argKeys = ['cell', 'header', 'headerSort', 'skipId', 'cellOptions'];\r\n\t\t$totalArgs = count($argKeys);\r\n\t\t$totalArgKey = $lastArgKey = $totalArgs - 1;\r\n\t\t$args = func_get_args();\r\n\t\t$numArgs = count($args);\r\n\t\tfor ($i = $totalArgKey; $i > 0; $i--) {\r\n\t\t\tif (!empty($args[$i])) {\r\n\t\t\t\t$lastArgKey = $i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($lastArgKey < $totalArgKey) {\r\n\t\t\t// The last passed argument can always be cell options\r\n\t\t\tif (is_array($args[$lastArgKey])) {\r\n\t\t\t\t$args[$totalArgKey] = $args[$lastArgKey];\r\n\t\t\t\tfor ($i = $lastArgKey; $i < $totalArgKey; $i++) {\r\n\t\t\t\t\t$args[$i] = null;\r\n\t\t\t\t}\r\n\t\t\t\tksort($args);\r\n\t\t\t}\r\n\t\t}\r\n\t\textract(array_combine($argKeys, $args + array_fill(0, $totalArgs, null)));\r\n\t\t\r\n\t\t// Checks if the skipId is in the skip array\r\n\t\tif (!empty($skipId) && $this->_checkSkip($skipId)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$formAddCell = ' ';\r\n\t\tif ($this->getHeader) {\r\n\t\t\t$this->columnCount++;\r\n\t\t\t//Stores first instance of non-blank header\r\n\t\t\tif (!empty($header) && !$this->hasHeader) {\r\n\t\t\t\t$this->hasHeader = true;\r\n\t\t\t}\r\n\t\t\tif ($headerSort) {\r\n\t\t\t\tif ($headerSort === true) {\r\n\t\t\t\t\t$headerSort = null;\r\n\t\t\t\t}\r\n\t\t\t\t$header = $this->thSort($header, $headerSort);\r\n\t\t\t}\r\n\t\t\t$thOptions = isset($cellOptions['th']) ? $cellOptions['th'] : $cellOptions;\r\n\t\t\t$this->headers[] = [$header => $thOptions];\r\n\t\t\t\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($editCell = Param::keyCheck($cellOptions, 'edit', true)) {\r\n\t\t\t$formAddCell = $editCell;\r\n\t\t\t$cell = $this->_editCell($cell, $editCell);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tif (is_array($cellOptions)) {\r\n\t\t\t$cell = [$cell, $cellOptions];\r\n\t\t}\r\n\t\t$this->row[] = $cell;\r\n\t\tif ($this->trCount == 0) {\r\n\t\t\t$this->formAddRow[] = $formAddCell;\r\n\t\t}\r\n\t}",
"public function addRow($row){\n\t\t\t$fn = \"addRow\";\n\t\t\tif(is_array($row) && count($row) == count($this->db[\"COLUMNS_NAME\"]) && $this->status){\n\t\t\t\tif(self::checkType($row)){\n\t\t\t\t\t$this->db[\"ROWS\"][] = $row;\n\t\t\t\t} else {\n\t\t\t\t\tself::printErr($fn, \"Invalid type value.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself::printErr($fn, \"Error adding row\");\n\t\t\t}\n\t\t}",
"public function add_cells($cells = []){\n if(empty($cells)){\n $this -> add_cell(new HTMLCellElement(\"\"));\n }else{\n foreach ($cells as $cell) {\n $this -> add_cell($cell);\n }\n }\n }",
"function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}",
"protected function addItemRow(Worksheet $sheet, int $y, array $row): void\n {\n $columns = [\n 'A' => 'identifier',\n 'B' => 'fullStatement',\n 'C' => 'humanCodingScheme',\n 'D' => 'smartLevel',\n 'E' => 'listEnumInSource',\n 'F' => 'abbreviatedStatement',\n 'G' => 'conceptKeywords',\n 'H' => 'notes',\n 'I' => 'language',\n 'J' => 'educationalAlignment',\n 'K' => ['itemType', 'title'],\n 'L' => 'license',\n ];\n\n foreach ($columns as $column => $field) {\n $this->addCellIfExists($sheet, $column, $y, $row, $field);\n }\n }",
"function create_row($binary, $course, $question, $score, $dir, $file) {\n $file_path = $dir.'/'.$file;\n $output = \"<tr class='file_list_\".$binary.\" table_item'>\n <td>\".$course.\"</td>\n <td>\".$question.\"</td>\n <td class='score'>\".intval($score).\"</td>\n <td>\".$dir.\"</td>\n <td>\".$file.\"</td>\n <td class='icon_container'><form class='list_form' method='post' action='\".htmlspecialchars($_SERVER['PHP_SELF']).\"'>\n <button type='image' name='button_value' class='icon delete' title='Frage Löschen' value='delete_file' method='post'></button>\n <button type='image' name='button_value' class='icon edit' title='Frage Editieren' value='edit_file' method='post'></button>\n <input type='hidden' name='file_path' value='\".$file_path.\"'>\n </form>\n </td></tr>\";\n\n return $output;\n }",
"function create_rows($binary) {\r\n\r\n\t\t\t// Getting total number of currently published posts\r\n\t\t\t$count_posts = wp_count_posts();\r\n\t\t\t$published_posts = $count_posts->publish;\r\n\r\n\t\t\tglobal $row_number;\r\n\r\n\t\t\t// Again, AJAX is meant to be used to feed in the argument \"three\"\r\n\t\t\tif ($binary = three) {\r\n\t\t\t\r\n\t\t\t\t// If number of posts is perfectly divisible by three, then make the amount of rows equal to the result\r\n\t\t\t\tif ($published_posts % 3 == 0) {\r\n\t\t\t\t\t$row_number = (int) ($published_posts / 3);\r\n\t\t\t\t}\r\n\t\t\t\t// If number of posts is NOT equally divisible by three, like with a decimal remainder, then add an extra row to even the collumns out\r\n\t\t\t\telse {\r\n\t\t\t\t\t$row_number = (int) ($published_posts / 3 ) + 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif ($binary = one) {\r\n\t\t\t\t$row_number = $published_posts;\r\n\t\t\t}\r\n\t\t}",
"public function insertRow(TableRow $row, $position = null);",
"function makeRow($data, $spalten, $erstefrei=\"frei\"){\n // $erstefrei = 1 -> erste Spalte ist leer\n\n $row = '<tr>';\n if($erstefrei==\"frei\")\n $row = $row.'<td class=\"wochenplan\"> </td>';\n else\n $row = $row.'<td class=\"wochenplan\">'.$erstefrei.'</td>';\n for($i=0;$i<$spalten; $i++)\n $row = $row.'<td class=\"wochenplan\">'.$data[$i].'</td>';\n $row = $row.'</tr>';\n return $row;\n }"
] | [
"0.67737055",
"0.6219642",
"0.6182994",
"0.6176805",
"0.6127217",
"0.59216374",
"0.5808461",
"0.57574546",
"0.5741175",
"0.5726457",
"0.5716659",
"0.56912696",
"0.56903166",
"0.5678019",
"0.5672391",
"0.5669758",
"0.56671923",
"0.56659406",
"0.5652681",
"0.560402",
"0.5584926",
"0.5572799",
"0.5568644",
"0.55508715",
"0.5547596",
"0.55326074",
"0.55254227",
"0.55112207",
"0.55112207",
"0.550274",
"0.5486374",
"0.54851675",
"0.54600006",
"0.5454506",
"0.5453066",
"0.54474175",
"0.5423097",
"0.5422907",
"0.5421389",
"0.5402549",
"0.5387221",
"0.53629047",
"0.53595966",
"0.535949",
"0.53420025",
"0.53073484",
"0.5304642",
"0.5300586",
"0.5291169",
"0.52624494",
"0.52566206",
"0.52358466",
"0.52212304",
"0.52085847",
"0.520003",
"0.5197798",
"0.51910186",
"0.5185404",
"0.51796776",
"0.5177599",
"0.5177022",
"0.51596755",
"0.5156266",
"0.51557916",
"0.5138416",
"0.51365787",
"0.5128653",
"0.5124325",
"0.5121893",
"0.51180685",
"0.51167935",
"0.51105475",
"0.5110093",
"0.51002073",
"0.50899315",
"0.50869244",
"0.5084482",
"0.50820136",
"0.5080037",
"0.5075636",
"0.5056569",
"0.505467",
"0.5049287",
"0.50345147",
"0.50317454",
"0.5023317",
"0.5019979",
"0.50064933",
"0.50029504",
"0.4998787",
"0.49930108",
"0.4984345",
"0.49758664",
"0.49690056",
"0.4967208",
"0.49666524",
"0.49659356",
"0.4964797",
"0.49647146",
"0.49607086"
] | 0.58187896 | 6 |
Create and return body row element by specifying cells value | public function createRow($values = array(), $isHeader = false)
{
$this->_checkArgumentIsArray(__METHOD__, 1, $values);
$row = new HtmlTableRow($this);
if ($isHeader == true) {
$row->setCellTagName('th');
}
foreach ($values as $columnKey => $value) {
$row->addCell($columnKey, $value);
}
return $row;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function cell($value) {\n return $this->setProperty('cell', $value);\n }",
"private function newRow( $cell ) {\n\n $sheetDataRef = $this->sheet->contents->sheetData;\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a row between\n // already existing rows. We must redraw the entire rows section of the xml object but insert our new row in the correct place as we redraw.\n if ( count( $sheetDataRef->row ) > 0 ) {\n\n $rowsCopy = clone $this->sheet->contents->sheetData;\n unset( $this->sheet->contents->sheetData->row );\n\n foreach ( $rowsCopy->row as $row ) {\n\n if ( (int) $row->attributes()->r > $rowCol[0] && empty( $inserted ) ) {\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n $inserted = true;\n }\n\n $copiedRow = $sheetDataRef->addChild( 'row' );\n $copiedRow->addAttribute( 'r', $row->attributes()->r );\n $copiedRow->addAttribute( 'spans', $row->attributes()->spans );\n\n foreach( $row->c as $col ) {\n\n $this->newCol( $copiedRow, $col->attributes()->r, $col->v );\n }\n }\n\n if ( ! empty( $inserted ) )\n return $insertedRow;\n }\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n return $insertedRow;\n }",
"protected function create_cell($params = array())\n {\n $cellObj = new stdClass();\n if($params)\n {\n foreach($params AS $name=>$value)\n {\n $cellObj->$name = $value;\n }\n }\n return $cellObj;\n }",
"function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}",
"public function row($cells = null, $options = []) {\r\n\t\tif (empty($options)) {\r\n\t\t\t$options = true;\r\n\t\t}\r\n\t\treturn $this->cells($cells, $options);\r\n\t}",
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}",
"function ods_render_row($row, $data = array()) {\n $cells = $row->getElementsByTagName('table-cell');\n\n foreach ($cells as $cell) {\n $value_type = $cell\n ->getAttribute('office:value-type');\n\n //get text data\n $p1 = $cell\n ->getElementsByTagName('p'); \n\n foreach ($p1 as $p) {\n\n $orig_cell_text = $p->nodeValue;\n\n $data_val = false;\n\n if (!empty($orig_cell_text)) {\n if ($this->string_has_params($orig_cell_text)) {\n\n if ($this->parse_string_is_once_param($orig_cell_text)) {\n $param_key = $this->parse_string_extract_param($orig_cell_text);\n\n if ($this->parse_param_exists($param_key, $data)) {\n\n $data_val = $this->parse_param_value(\n $param_key, $data\n );\n $this->ods_cell_set_val($cell, $p, $data_val, array());\n }\n } else {\n $p->nodeValue = $this->parse_string($orig_cell_text, $data);\n }\n }\n }\n }\n \n $this->ods_render_cell_images($cell, $data); \n \n }\n return $row;\n }",
"public function row($content)\n\t{\n\t\tif ($content instanceof Closure) {\n\t\t\t$row = new Row();\n\t\t\tcall_user_func($content, $row);\n\t\t} else {\n\t\t\t$row = new Row($content);\n\t\t}\n\n\t\tob_start();\n\n\t\t$row->build();\n\t\t$contents = ob_get_contents();\n\n\t\tob_end_clean();\n\n\t\treturn $this->append($contents);\n\t}",
"public function getCellValueForRendering($row, $cell=null);",
"public function setRow($value)\n {\n return $this->set('Row', $value);\n }",
"public function setRow($value)\n {\n return $this->set('Row', $value);\n }",
"function row($lebel, $content, $contentExists = false) {\n\t\tif ($contentExists == true) {\n\t\t\tif (!empty($contentExists)) {\n\t\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t}\n\t}",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"protected function objectRow( $key, $val ) {\n\t\t$th = Xml::elementClean( 'th', array(), $key );\n\t\tif ( is_array( $val ) ) {\n\t\t\t$td = Xml::tags( 'td', array(), self::objectTable( $val ) );\n\t\t} else {\n\t\t\tif ( is_string( $val ) ) {\n\t\t\t\t$val = '\"' . $val . '\"';\n\t\t\t} else {\n\t\t\t\t$val = FormatJson::encode( $val );\n\t\t\t}\n\n\t\t\t$td = Xml::elementClean( 'td', array( 'class' => 'value' ), $val );\n\t\t}\n\n\t\treturn Xml::tags( 'tr', array(), $th . $td );\n\t}",
"public function addRow($values){\n\t\t$row = &$this->xml_data;\n\t\t$row .= '\n <Row ss:AutoFitHeight=\"0\">';\n\n\t\tforeach($values as $val){\n\t\t\t\n\t\t\t// check if given variable contains array\n\t\t\tif(is_array($val)){\n\t\t\t\t$value = $val[0];\n\t\t\t\t$datatype = $val[1];\n\t\t\t} else {\n\t\t\t\t$value = $val;\n\t\t\t\t$datatype = is_numeric($val) ? 'Number' : 'String';\n\t\t\t}\n\t\t\t$row .= '\n <Cell><Data ss:Type=\"'.$datatype.'\">'.$value.'</Data></Cell>';\t\t\t\n\t\t}\n\n\t\t$row .= '\n </Row>';\n\t}",
"abstract public function getSpecificRow();",
"public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }",
"protected function _createRowContainer()\n\t{\n\t\tif ($this->_tbody == null) {\n\t\t\t$this->_tbody = new HtmlElement('tbody');\n\t\t\t$this->addElement($this->_tbody);\t\t\t\n\t\t}\t\t\n\t}",
"function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \" \";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}",
"public function addCell($value, $type = null, $styleName = null)\n {\n if (!$type) {\n $type = $this->guessType($value);\n }\n $value = htmlentities($value, ENT_COMPAT, $this->encoding);\n $this->data .= \"<Cell\" . ($styleName ? \" ss:StyleID=\\\"\" . $styleName . \"\\\"\" : \"\") . \"><Data ss:Type=\\\"\" . $type . \"\\\">\" . $value . \"</Data></Cell>\";\n return $this;\n }",
"public function getRow() {}",
"public function getRow();",
"private function newCol( $row, $cell, $value ) {\n\n if ( count( $row->c ) > 0 ) {\n\n $rowCopy = clone $row;\n unset( $row->c );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a column between\n // already existing columns. We must redraw the entire columns ('c') section of the xml object but insert our new column in the correct place as we redraw.\n foreach ( $rowCopy as $col ) {\n\n if ( $cell < $col->attributes()->r && empty( $inserted ) ) {\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n $inserted = true;\n }\n\n $copiedCol = $row->addChild( 'c' );\n $copiedCol->addAttribute( 'r', $col->attributes()->r );\n $copiedCol->addChild( 'v', $col->v );\n }\n\n if ( ! empty( $inserted ) )\n return $insertedCol;\n }\n\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n return $insertedCol;\n }",
"function build_row($row)\n{\n\t$name = $row->getColumnVal('Name');\n\t$id = $row->getColumnVal('Id');\n\n\t// Setup the columns you want to work with\n\t$idCol = $row->getCol('Id');\n\t$nameCol = $row->getCol('Name');\n\t$actionCol = $row->getCol('Action');\n\t$typeCol = $row->getCol('Type');\n\n\t// Set some HTML properties on the give column\n\t$idCol->setProp('width','50');\n\t$typeCol->setProp('width','50');\n\t$typeCol->addClass('center');\n\n\t// Add some CSS classes to the action column\n\t$actionCol\n\t\t-> addClass('center')\n\t\t-> addClass('btn');\n\n\t// Add an action link to the Action column\n\t$row->addLink('Action', \"examples.php?id=$id\", '[edit]', \"\", \"no-un\");\n\t$row->addLink('Action', \"examples.php?id=$id\", '[delete]', \"\", \"no-un\");\n\n\t// Set an ID on the row\n\t$row->setProp('id', \"tr_$id\");\n\n\t// set the background of the strawberry column to black\n\tif($name == \"Strawberry\")\n\t{\n\t\t// get an instance of the column and set a css class\n\t\t$nameCol->addClass('strawberry');\n\t}\n\n\t// set the background of the entire shoe row to red\n\tif($name == \"Chocolate\")\t\n\t{\n\t\t$row->addClass('chocolate');\n\t}\n\n\t// change one of the cell values\n\tif($name == \"Banana\")\t\n\t{\n\t\t$row->setVal('Name', $name . \" (favorite) <img src='https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcROTNegrNoPzMFMcpQ4pl7tko9LMwgoXuZyjTmX8vpUuPS_RfZr' />\");\n\t}\n\n\treturn $row;\n}",
"function addTableRow($cells, $aligns = NULL, $vAligns = NULL, $inlineStyle = NULL, $classesName = NULL)\n {\n if (! $this->tableIsOpen)\n die('ERROR: TABLE IS NOT STARTED');\n \n if (is_array($classesName) && count($classesName) != count($cells))\n die('ERROR: COUNT OF CLASSES IS DIFERENT OF COUNT OF CELLS');\n if (is_array($aligns) && count($aligns) != count($cells))\n die('ERROR: COUNT OF ALIGNS IS DIFERENT OF COUNT OF CELLS');\n if (is_array($vAligns) && count($vAligns) != count($cells))\n die('ERROR: COUNT OF VALIGNS IS DIFERENT OF COUNT OF CELLS');\n \n $style = '';\n if (is_array($inlineStyle)) {\n foreach ($inlineStyle as $key => $value)\n $style .= \"$key: $value;\";\n }\n \n $tableWidth = $this->atualPageWidth; // - ($this->leftMargin * One_Cent + $this->rightMargin * One_Cent);\n // $tableWidth -= (BORDER_ALT*2 + PADDING_ALT_RIGHT + PADDING_ALT_LEFT + BORDER_INSIDEH*2 + BORDER_INSIDEV*2);\n $cellWidth = floor($tableWidth / count($cells));\n \n $this->documentBuffer .= \"<tr style=\\\"mso-yfti-irow: $this->tableLastRow\\\">\\n\";\n for ($i = 0; $i < count($cells); $i ++) {\n $align = is_array($aligns) ? $aligns[$i] : 'left';\n $vAlign = is_array($vAligns) ? $vAligns[$i] : 'top';\n $classAttr = is_array($classesName) ? \" class=\\\"$classesName[$i]\\\"\" : '';\n \n $this->documentBuffer .= \"<td width=\\\"$cellWidth\\\" align=\\\"$align\\\" valign=\\\"$vAlign\\\" style=\\\"$style\\\"{$classAttr}>$cells[$i]</td>\\n\";\n }\n $this->documentBuffer .= \"</tr>\\n\";\n \n $this->tableLastRow ++;\n return $this->tableLastRow;\n }",
"private function spreadsheet_rows($string, $content_num) {\n $rows1 = explode('</table:table-row>', $string);\n array_pop($rows1);\n\n $result_rows = array();\n $ix = 0;\n foreach ($rows1 as $row_text) {\n list($row_text, $cellscontent) = $this->extract_first_tag_str($row_text);\n $row_tag = $this->tag_attr($row_text);\n\n $row_tag['content'] = explode('<table:table-cell', $cellscontent);\n\n /*\n * if cell is spanned columns or rows\n */\n if ($row_tag['content']) {\n if ($row_tag['content'][0] == '') {\n array_shift($row_tag['content']);\n }\n }\n\n foreach ($row_tag['content'] as $cell_content) {\n\n if (strpos($cell_content, '<table:covered-table-cell') === 0) {\n /*\n * Compensation cell before\n */\n\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n\n if ($cell_content[0] == ' ' || $cell_content[0] == '/') {\n /*\n * Обычная ячейка\n */\n $cell_content = '<table:table-cell' . $cell_content;\n $cell_closing_pair_pos = strpos($cell_content, '</table:table-cell>');\n\n if ($cell_closing_pair_pos !== false) {\n /*\n * cell is content\n */\n list($cell_tag_text, $cell_tag_content) = $this->extract_first_tag_str($cell_content);\n $cell_tag = $this->tag_attr($cell_tag_text);\n $cell_tag['content'] = current(explode('</table:table-cell>', $cell_tag_content));\n } else {\n $cell_tag = $this->tag_attr($cell_content);\n $cell_tag['content'] = false;\n }\n $row_tag['cells'][] = $cell_tag;\n\n /*\n * Check compensation cells after cell\n */\n if (strpos($cell_content, '<table:covered-table-cell') !== false) {\n /*\n * Compensation cell before\n */\n $covered_list = explode('<table:covered-table-cell', $cell_content);\n\n array_shift($covered_list);\n foreach ($covered_list as $c) {\n $coverTag = $this->tag_attr('<table:covered-table-cell' . $c);\n $coverTag['content'] = false;\n $row_tag['cells'][] = $coverTag;\n }\n }\n }\n }\n unset($row_tag['content']);\n $row_tag['content_num'] = $content_num;\n $row_tag['content_index'] = $ix;\n if ($ix == 0)\n $row_tag['content_first'] = true;\n if ($ix == count($rows1) - 1)\n $row_tag['content_last'] = true;\n\n $row_tag['repeated'] = false;\n if (empty($row_tag['attr']['table:number-rows-repeated']))\n $result_rows[] = $row_tag;\n else {\n $repeated = (int) $row_tag['attr']['table:number-rows-repeated'];\n if ($repeated > 1000)\n $repeated = 1000;\n $row_tag['repeated'] = true;\n unset($row_tag['attr']['table:number-rows-repeated']);\n for ($i = 0; $i < $repeated; $i++)\n $result_rows[] = $row_tag;\n }\n \n $ix++;\n }\n return $result_rows;\n }",
"function &getRowInstance() {\n\t\t$row = new IssueGridRow();\n\t\treturn $row;\n\t}",
"private function createCells($data){\r\n $html = '';\r\n foreach ($data AS $index => $row) {\r\n $html .= '<tr class=\"ctable-rows\">';\r\n foreach ($row as $rownr => $data) {\r\n $html .= '<td>' . $data . '</td>';\r\n }\r\n $html .= '</tr>';\r\n }\r\n return $html;\r\n }",
"function tdcell($colclass, $slots)\n{\n global $times_along_top;\n \n $html = '';\n if (func_num_args() > 2)\n {\n $data = func_get_arg(2);\n }\n \n $html .= \"<td class=\\\"$colclass\\\"\";\n if ($slots > 1)\n // No need to output more HTML than necessary\n {\n $html .= \" \" . (($times_along_top) ? \"colspan\" : \"rowspan\") . \"=\\\"$slots\\\"\";\n }\n if (isset($data))\n {\n $html .= \" data-\" . $data['name'] . \"=\\\"\" . $data['value'] . \"\\\"\";\n }\n $html .= \">\\n\";\n \n return $html;\n}",
"public function getCellValue($row);",
"function &getRowInstance() {\n\t\t$row = new MastheadGridRow();\n\t\treturn $row;\n\t}",
"public function testCreateCell()\n {\n $object = new \\stdClass();\n $object->title = 'barfoo';\n $cell = $this->createFactory()->createCell('title', PropertyColumn::class, $object, []);\n\n $this->assertInstanceOf(Cell::class, $cell);\n $this->assertEquals('barfoo', $cell->value);\n $this->assertEquals('Property', $cell->getTemplate());\n }",
"abstract public function getRow();",
"abstract public function getRow();",
"public function get_row();",
"function ou_df_grid_row($variables) {\n return '<div class=\"int-row\">' . $variables['element']['#children'] . '</div>';\n}",
"function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}",
"public function renderTableRow($model) {\n $cells = [];\n /* @var $column Column */\n foreach ($this->columns as $column) {\n $cells[] = $column->renderContentCell($model);\n }\n\tif (is_callable($this->rowOptions) && $model !== null)\n\t $options = call_user_func($this->rowOptions, $model, $this);\n\telse\n\t $options = $this->rowOptions;\n\n $options['data-key'] = (string)$model->key();\n\n return Widget::html()->tag('table-row', array('content' => implode('', $cells)), $options);\n }",
"public function addRows($type, array $datas) {\n\n $row = $this->$type->addChildren(new VTCore_Html_Element(array(\n 'type' => 'tr',\n )))\n ->lastChild();\n\n foreach ($datas as $key => $data) {\n $cell = $row->addChildren(new VTCore_Html_Element(array(\n 'type' => ($type == 'thead') ? 'th' : 'td',\n )))\n ->lastChild();\n\n if (!is_array($data)) {\n $cell->addChildren($data);\n }\n elseif (isset($data['attributes']) && isset($data['content'])) {\n $cell->addAttributes($data['attributes']);\n $cell->addChildren($data['content']);\n }\n }\n\n return $row;\n\n }",
"private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}",
"public function addRow($values)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = $this->createRow($values);\n\t\t$this->addRowElement($row);\n\t\treturn $row;\n\t}",
"public static function createRow(array $data = [])\n\t{\n\t\t$row = new static(static::$_defaultValues, false, false);\n\t\t$row->setFromArray($data);\n\t\treturn $row;\n\t}",
"function create_row($name, $type, $description, $pattern) {\n $id = strtolower(preg_replace('/[^\\w\\-\\.]+/', '', str_replace(' ', '-', $name)));\n $id = str_replace('.', '-', $id); // periods break the js code, because they are not valid in selector ids\n\n $row = '<div class=\"row border-bottom align-items-center\">';\n $row .= '<div class=\"col-12 col-md-3 small-h\">';\n $row .= '<h4 id=\"' . $id . '\" class=\"module-row-name-id\">';\n $row .= '<code>' . $name . '</code>';\n $row .= '<span class=\"text-muted\"> (' . $type . ')</span>';\n $row .=\n '<a href=#' .\n $id .\n ' class=\"header-link scroll_to_link me-2\"><span class=\"fas fa-link\" aria-hidden=\"true\"></span></a>';\n $row .= '</h4>';\n $row .= '</div>';\n $row .= '<div class=\" col-12 col-md' . ($pattern != '' ? '-5' : '-7') . '\">';\n $row .= '<span class=\"small\">' . parse_md($description)['content'] . '</span>';\n $row .= '</div>';\n $row .= '<div class=\"col-12 col-md' . ($pattern != '' ? '-4' : '-1') . ' ms-auto\">';\n if ($pattern != '') {\n $row .= '<code class=\"float-end\">' . $pattern . '</code>';\n }\n $row .= '</div>';\n\n $row .= '</div>';\n return $row;\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function add_cell($val, $link = \"\")\n\t{\n\t\tif (!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}",
"function add_cell($val, $link = \"\")\n\t{\n\t\tif(!empty($link))\n\t\t{\n\t\t\t$this->tpl->setCurrentBlock(\"begin_link\");\n\t\t\t$this->tpl->setVariable(\"LINK_TARGET\", $link);\n\t\t\t$this->tpl->parseCurrentBlock();\n\t\t\t$this->tpl->touchBlock(\"end_link\");\n\t\t}\n\n\t\t$this->tpl->setCurrentBlock(\"text\");\n\t\t$this->tpl->setVariable(\"TEXT_CONTENT\", $val);\n\t\t$this->tpl->parseCurrentBlock();\n\t\t$this->tpl->setCurrentBlock(\"table_cell\");\n\t\t$this->tpl->parseCurrentBlock();\n\t}",
"function tck_table_add_row_cell_array( $cells, $keyword, $url, $title, $ip, $clicks, $timestamp ) {\n $fkeyword = tck_get_keyword($keyword);\n \n if ( $fkeyword != $keyword ) {\n $shorturl = yourls_link($fkeyword);\n $cells['keyword']['shorturl'] = yourls_esc_url($shorturl);\n $cells['keyword']['keyword_html'] = yourls_esc_html( $fkeyword );\n $cells['actions']['keyword'] = $fkeyword;\n }\n \n $newcells['custom']['template'] = '%custom%';\n $newcells['custom']['custom'] = (tck_is_custom_keyword($fkeyword) ? 'Yes' : 'No');\n $newcells['actions'] = $cells['actions'];\n\n unset($cells['actions']);\n return array_merge($cells, $newcells);\n }",
"public function enumerate_values_table_row(){\n\t\treturn \"\n\t\t\t<tr>\n\t\t\t\t<td>$this->avg_reaction_time_m_no_faces</td> \n\t\t\t\t<td>$this->accuracy_m_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_m_faces</td> \n\t\t\t\t<td>$this->accuracy_m_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_aba_no_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_no_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_aba_faces</td> \n\t\t\t\t<td>$this->accuracy_aba_faces</td> \n\n\t\t\t\t<td>$this->avg_reaction_time_faces</td> \n\t\t\t\t<td>$this->accuracy_faces</td> \n\t\t\t\t<td>$this->avg_reaction_time_no_faces</td> \n\t\t\t\t<td>$this->accuracy_no_faces</td> \n\t\t\t</tr>\n\t\t\";\n\t}",
"public function cells();",
"function successTableData()\n{\n global $html;\n\n $td = $html->createElement(\"td\",\"OK\");\n $tdStyle = $html->createAttribute(\"style\");\n $tdStyle->value = \"background-color: #00ff00\";\n $td->appendChild($tdStyle);\n\n return $td;\n}",
"public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td')\n {\n $colType = ($colType === 'th') ? 'th' : 'td';\n $noWrap = $this->no_noWrap ? '' : ' nowrap';\n // Start up:\n $l10nParent = isset($data['_l10nparent_']) ? (int)$data['_l10nparent_'] : 0;\n $out = '\n\t\t<!-- Element, begin: -->\n\t\t<tr ' . $rowParams . ' data-uid=\"' . (int)$data['uid'] . '\" data-l10nparent=\"' . $l10nParent . '\">';\n // Show icon and lines\n if ($this->showIcon) {\n $out .= '\n\t\t\t<' . $colType . ' class=\"col-icon nowrap\">';\n if (!$h) {\n $out .= ' ';\n } else {\n for ($a = 0; $a < $h; $a++) {\n if (!$a) {\n if ($icon) {\n $out .= $icon;\n }\n }\n }\n }\n $out .= '</' . $colType . '>\n\t\t\t';\n }\n // Init rendering.\n $colsp = '';\n $lastKey = '';\n $c = 0;\n $ccount = 0;\n // __label is used as the label key to circumvent problems with uid used as label (see #67756)\n // as it was introduced later on, check if it really exists before using it\n $fields = $this->fieldArray;\n if ($colType === 'td' && array_key_exists('__label', $data)) {\n $fields[0] = '__label';\n }\n // Traverse field array which contains the data to present:\n foreach ($fields as $vKey) {\n if (isset($data[$vKey])) {\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass && $ccount % 2 == 0) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n $lastKey = $vKey;\n $c = 1;\n $ccount++;\n } else {\n if (!$lastKey) {\n $lastKey = $vKey;\n }\n $c++;\n }\n if ($c > 1) {\n $colsp = ' colspan=\"' . $c . '\"';\n } else {\n $colsp = '';\n }\n }\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n // End row\n $out .= '\n\t\t</tr>';\n // Return row.\n return $out;\n }",
"function Event_Config_Cell_Rows($group,$text,$class)\n {\n return\n array\n (\n array\n (\n $this->Event_Config_Cell($group,$text,$class),\n \"\"\n ),\n );\n }",
"function makeRow($data, $spalten, $erstefrei=\"frei\"){\n // $erstefrei = 1 -> erste Spalte ist leer\n\n $row = '<tr>';\n if($erstefrei==\"frei\")\n $row = $row.'<td class=\"wochenplan\"> </td>';\n else\n $row = $row.'<td class=\"wochenplan\">'.$erstefrei.'</td>';\n for($i=0;$i<$spalten; $i++)\n $row = $row.'<td class=\"wochenplan\">'.$data[$i].'</td>';\n $row = $row.'</tr>';\n return $row;\n }",
"function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}",
"function room_cell_html($row, $link)\n{\n $html = '';\n $html .= tdcell(\"row_labels\", 1, array('name' => 'room', 'value' => $row['id']));\n $html .= \"<div class=\\\"celldiv slots1\\\">\\n\";\n $html .= \"<a href=\\\"$link\\\" title=\\\"\" . get_vocab(\"viewweek\") . \" \" . $row['description'] . \"\\\">\";\n $html .= htmlspecialchars($row['room_name']) . ($row['capacity'] > 0 ? \"(\".$row['capacity'].\")\" : \"\");\n $html .= \"</a>\\n\";\n $html .= \"</div></td>\\n\";\n return $html;\n}",
"public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }",
"function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}",
"function NewRow() {\n\t\t$row = array();\n\t\t$row['row_id'] = NULL;\n\t\t$row['auc_date'] = NULL;\n\t\t$row['auc_number'] = NULL;\n\t\t$row['auc_place'] = NULL;\n\t\t$row['start_bid'] = NULL;\n\t\t$row['close_bid'] = NULL;\n\t\t$row['auc_notes'] = NULL;\n\t\t$row['total_sack'] = NULL;\n\t\t$row['total_netto'] = NULL;\n\t\t$row['total_gross'] = NULL;\n\t\t$row['auc_status'] = NULL;\n\t\t$row['rate'] = NULL;\n\t\treturn $row;\n\t}",
"function getCell() {\n \tglobal $synAbsolutePath;\n $ext = $this->translate($this->value);\n $mat=$this->translatePath($this->mat);\n $filename=$mat.$this->createFilename().\".\".$ext;\n $file_exists=file_exists($synAbsolutePath.$filename);\n $isImg=$this->isImage($filename);\n if ($ext and $file_exists and $isImg) $ret=\"<div style='overflow: hidden; height: 25px; display:inline;background: url($filename) no-repeat center;width: 100%' onMouseOver=\\\"openbox('$filename')\\\" onMouseOut=\\\"closebox()\\\"></div>\";\n else if ($ext and $file_exists and !$isImg) $ret=\"<span style='color: gray'>Document $ext</span>\";\n else if ($ext and !$file_exists) $ret=\"<span style='color: gray'>Error $ext</span>\";\n else $ret=\"<span style='color: gray'>Empty</span>\";\n return $ret;\n //die;\n }",
"function create_rows($binary) {\r\n\r\n\t\t\t// Getting total number of currently published posts\r\n\t\t\t$count_posts = wp_count_posts();\r\n\t\t\t$published_posts = $count_posts->publish;\r\n\r\n\t\t\tglobal $row_number;\r\n\r\n\t\t\t// Again, AJAX is meant to be used to feed in the argument \"three\"\r\n\t\t\tif ($binary = three) {\r\n\t\t\t\r\n\t\t\t\t// If number of posts is perfectly divisible by three, then make the amount of rows equal to the result\r\n\t\t\t\tif ($published_posts % 3 == 0) {\r\n\t\t\t\t\t$row_number = (int) ($published_posts / 3);\r\n\t\t\t\t}\r\n\t\t\t\t// If number of posts is NOT equally divisible by three, like with a decimal remainder, then add an extra row to even the collumns out\r\n\t\t\t\telse {\r\n\t\t\t\t\t$row_number = (int) ($published_posts / 3 ) + 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif ($binary = one) {\r\n\t\t\t\t$row_number = $published_posts;\r\n\t\t\t}\r\n\t\t}",
"abstract protected function getRow($row);",
"final function rowSpan($i, $j, $value){\n\t\tif (!$value = (int)$value)\n\t\t\treturn $this;\n\t\tif (!$this->checkRow($i,$j) and $this->contents[$i]->contents[$j] !== '')\n\t\t\t$this->contents[$i]->contents[$j]->attr(array('rowspan'=>$value));\n\t\treturn $this;\n\t}",
"protected function buildRow($column_name, array $column, $default_value, $weight, $delta) {\n return [\n '#attributes' => ['class' => ['draggable']],\n 'name' => [\n '#type' => 'checkbox',\n '#default_value' => $default_value,\n ],\n 'title' => [\n '#markup' => $column['title'],\n ],\n 'key' => [\n '#markup' => (isset($column['key'])) ? $column['key'] : $column['name'],\n ],\n 'weight' => [\n '#type' => 'weight',\n '#title' => $this->t('Weight for @label', ['@label' => $column['title']]),\n '#title_display' => 'invisible',\n '#attributes' => [\n 'class' => ['table-sort-weight'],\n ],\n '#delta' => $delta,\n '#default_value' => $weight,\n ],\n ];\n }",
"public static function table($body, $selector = '#DataGrid1', $header = [], $columnCount = 0, $startLine = 1, $getValueMethod = 'html')\n {\n $dataList = [];\n\n $crawler = $body instanceof Crawler ? $body : new Crawler((string)$body);\n\n $crawler->filter($selector)->children()->each(function (Crawler $node, $i) use ($startLine, $columnCount, $header, $getValueMethod, &$dataList) {\n $nodeTd = $node->children();\n if ($i < $startLine || ($columnCount && $nodeTd->count() < $columnCount)) {\n return false;\n }\n\n $itemList = [];\n if ($header) {\n foreach ($header as $index => $key) {\n if (is_array($key) && isset($key[1]) && is_callable($key[1])) {\n $func = $key[1];\n $itemList[$key[0]] = call_user_func_array($func, [$nodeTd->eq($index), $getValueMethod]);\n } elseif ($key) {\n $itemList[$key] = $nodeTd->eq($index)->$getValueMethod();\n }\n }\n } else {\n $itemList = $nodeTd->each(function (Crawler $node, $j) use ($getValueMethod) {\n return $node->$getValueMethod();\n });\n }\n $dataList[] = $itemList;\n });\n\n return $dataList;\n }",
"function renderTableRows($headers, $rows, $rowType= 2)\r\n{\r\n\tglobal $isArchive;\r\n\r\n\t$tr= '';\r\n\tif (!count($rows))// In case there is no registered row at all\r\n\t{\r\n\t\t$rows= array($headers);\r\n\t\tif ($rowType== 2) return '';\r\n\t}\r\n\tif ($rowType== 3) $rows= array($rows[0]);// Keep only one row to get the template for the last hidden empty row (used for js clone())\r\n\tforeach ($rows as $numRow => $row)\r\n\t{\r\n\t\t$td= '';\r\n\t\t$profit= 0;// Percentage\r\n\t\t$devtu= 0;// Theoretical\r\n\t\t$devtu_f= 0;// Final\r\n\t\t$completion= 0;\r\n\r\n\t\tforeach ($row as $cellNum => $cell)\r\n\t\t{\r\n $tdClass= isset($headers[$cellNum]->class)? $headers[$cellNum]->class : '';\r\n\r\n $cell= $rowType== 3? '' : $cell;\r\n $width= isset($headers[$cellNum]->width)? ' style=\"width:'.$headers[$cellNum]->width.'\"' : '';\r\n\r\n $td.= \"<td class=\\\"{$headers[$cellNum]->type} $tdClass\\\" $width><div>\";\r\n\r\n\t\t\tif ($tdClass== 'tasks') $td.= renderTaskCell($cell);\r\n\t\t\telse switch ($headers[$cellNum]->type)\r\n\t\t\t{\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\t$td.= '<input type=\"text\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'range':\r\n\t\t\t\t\t$val= $rowType== 3? '' : (int)$cell;\r\n\t\t\t\t\t$text= $rowType== 3? '-' : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"range\" value=\"'.$val.'\" min=\"'.$headers[$cellNum]->range->min.'\" max=\"'.$headers[$cellNum]->range->max.'\" step=\"'.$headers[$cellNum]->range->step.'\"/><span>'.$text.'</span>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\t$td.= '<input type=\"number\" min=\"'.$headers[$cellNum]->number->min.'\" value=\"'.$cell.'\" step=\"'.$headers[$cellNum]->number->step.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\t$cell= !$cell && $headers[$cellNum]->default== 'today'? date('Y-m-d') : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"date\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'textarea':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$td.= \"<textarea>$cell</textarea>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\t$options= $headers[$cellNum]->select->options;\r\n\t\t\t\t\t$select= '';\r\n\t\t\t\t\tforeach ($options as $val => $opt)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$select.= '<option value=\"'.$val.'\"'.($cell==$val? ' selected=\"selected\"' : '').'>'.$opt.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$td.= \"<select>$select</select>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$td.= '</div></td>';\r\n\r\n\t\t\tif ($tdClass== 'devtu') $devtu= floatval($cell);\r\n\t\t\tif ($tdClass== 'devtu_f') $devtu_f= floatval($cell);\r\n\t\t\telseif ($tdClass== 'completion') $completion= intval($cell);\r\n\r\n\t\t}\r\n\r\n\t\tif ($completion== 100 && $devtu && $devtu_f) $profit= round((1-$devtu_f/$devtu)*100);\r\n\r\n\t\t$tr.= \"<tr>\r\n\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\".($profit? ' profit i-tag' : '').\"\\\" data-profit=\\\"\".($profit> 0 ? '+'.$profit : $profit).\"%\\\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"/></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t$td\r\n\t\t\t\t</tr>\";\r\n\t}\r\n\tif ($rowType== 3) $tr.= \"<tr class=\\\"hidden\\\">\r\n\t\t\t\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\\\">\r\n\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"></button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t$td\r\n\t\t\t\t\t\t\t</tr>\";\r\n\treturn $tr;\r\n}",
"function NewRow() {\n\t\t$row = array();\n\t\t$row['tanggal'] = NULL;\n\t\t$row['auc_number'] = NULL;\n\t\t$row['start_bid'] = NULL;\n\t\t$row['close_bid'] = NULL;\n\t\t$row['lot_number'] = NULL;\n\t\t$row['chop'] = NULL;\n\t\t$row['grade'] = NULL;\n\t\t$row['estate'] = NULL;\n\t\t$row['sack'] = NULL;\n\t\t$row['netto'] = NULL;\n\t\t$row['open_bid'] = NULL;\n\t\t$row['last_bid'] = NULL;\n\t\t$row['highest_bid'] = NULL;\n\t\t$row['enter_bid'] = NULL;\n\t\t$row['auction_status'] = NULL;\n\t\t$row['gross'] = NULL;\n\t\t$row['row_id'] = NULL;\n\t\treturn $row;\n\t}",
"function getHtmlRow($obj_row, $cat){\r\n\t$row = '';\r\n\t\r\n\tswitch($cat){\r\n\t\tcase 'twitter':\r\n\t\t\t$row = getHtmlRowTwitter($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'facebook':\r\n\t\t\t$row = getHtmlRowFacebook($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'video':\r\n\t\t\t$row = getHtmlRowYoutube($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'imagenes':\r\n\t\t\t$row = getHtmlRowinstagram($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'prensa':\r\n\t\t\t$row = getHtmlRowPrensa($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'desarrolladores':\r\n\t\t\t$row = getHtmlRowDesarrollo($obj_row);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$row = getHtmlRowDefault($obj_row);\r\n\t\t\tbreak;\r\n\t\t\r\n\t}\r\n\t\r\n\treturn($row);\t\t\t\r\n}",
"public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}",
"function add_row($selector, $row = \\false, $post_id = \\false)\n{\n}",
"function helper_pdf_add_cell($pdf, $largura, $altura, $texto, $bordas, $pula_linha, $alinhamento){\n\t$pdf->Cell($largura, $altura, $texto, $bordas, $pula_linha, $alinhamento);\n}",
"function failedTableData()\n{\n global $html;\n\n $td = $html->createElement(\"td\",\"FAILED\");\n $tdStyle = $html->createAttribute(\"style\");\n $tdStyle->value = \"background-color: #ff6600\";\n $td->appendChild($tdStyle);\n\n return $td;\n}",
"function addRow($csvArr, $tagsArr, $count) {\n $ret = '<row>';\n for ($index = 0; $index < $count; $index++) {\n $ret .= '<' . $tagsArr[$index] . ' val=\"' . trim($csvArr[$index]) . '\"/>';\n }\n $ret .= '</row>';\n return $ret;\n}",
"public function cell() {\r\n\t\t$argKeys = ['cell', 'header', 'headerSort', 'skipId', 'cellOptions'];\r\n\t\t$totalArgs = count($argKeys);\r\n\t\t$totalArgKey = $lastArgKey = $totalArgs - 1;\r\n\t\t$args = func_get_args();\r\n\t\t$numArgs = count($args);\r\n\t\tfor ($i = $totalArgKey; $i > 0; $i--) {\r\n\t\t\tif (!empty($args[$i])) {\r\n\t\t\t\t$lastArgKey = $i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($lastArgKey < $totalArgKey) {\r\n\t\t\t// The last passed argument can always be cell options\r\n\t\t\tif (is_array($args[$lastArgKey])) {\r\n\t\t\t\t$args[$totalArgKey] = $args[$lastArgKey];\r\n\t\t\t\tfor ($i = $lastArgKey; $i < $totalArgKey; $i++) {\r\n\t\t\t\t\t$args[$i] = null;\r\n\t\t\t\t}\r\n\t\t\t\tksort($args);\r\n\t\t\t}\r\n\t\t}\r\n\t\textract(array_combine($argKeys, $args + array_fill(0, $totalArgs, null)));\r\n\t\t\r\n\t\t// Checks if the skipId is in the skip array\r\n\t\tif (!empty($skipId) && $this->_checkSkip($skipId)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$formAddCell = ' ';\r\n\t\tif ($this->getHeader) {\r\n\t\t\t$this->columnCount++;\r\n\t\t\t//Stores first instance of non-blank header\r\n\t\t\tif (!empty($header) && !$this->hasHeader) {\r\n\t\t\t\t$this->hasHeader = true;\r\n\t\t\t}\r\n\t\t\tif ($headerSort) {\r\n\t\t\t\tif ($headerSort === true) {\r\n\t\t\t\t\t$headerSort = null;\r\n\t\t\t\t}\r\n\t\t\t\t$header = $this->thSort($header, $headerSort);\r\n\t\t\t}\r\n\t\t\t$thOptions = isset($cellOptions['th']) ? $cellOptions['th'] : $cellOptions;\r\n\t\t\t$this->headers[] = [$header => $thOptions];\r\n\t\t\t\r\n\t\t}\r\n\t\t/*\r\n\t\tif ($editCell = Param::keyCheck($cellOptions, 'edit', true)) {\r\n\t\t\t$formAddCell = $editCell;\r\n\t\t\t$cell = $this->_editCell($cell, $editCell);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\tif (is_array($cellOptions)) {\r\n\t\t\t$cell = [$cell, $cellOptions];\r\n\t\t}\r\n\t\t$this->row[] = $cell;\r\n\t\tif ($this->trCount == 0) {\r\n\t\t\t$this->formAddRow[] = $formAddCell;\r\n\t\t}\r\n\t}",
"public function row($n = 0, $type = 'object')\n\t{\n\t\tif ($type === 'object') return $this->row_object($n);\n\t\telseif ($type === 'array') return $this->row_array($n);\n\t\telse return $this->custom_row_object($n, $type);\n\t}",
"function create_row($binary, $course, $question, $score, $dir, $file) {\n $file_path = $dir.'/'.$file;\n $output = \"<tr class='file_list_\".$binary.\" table_item'>\n <td>\".$course.\"</td>\n <td>\".$question.\"</td>\n <td class='score'>\".intval($score).\"</td>\n <td>\".$dir.\"</td>\n <td>\".$file.\"</td>\n <td class='icon_container'><form class='list_form' method='post' action='\".htmlspecialchars($_SERVER['PHP_SELF']).\"'>\n <button type='image' name='button_value' class='icon delete' title='Frage Löschen' value='delete_file' method='post'></button>\n <button type='image' name='button_value' class='icon edit' title='Frage Editieren' value='edit_file' method='post'></button>\n <input type='hidden' name='file_path' value='\".$file_path.\"'>\n </form>\n </td></tr>\";\n\n return $output;\n }",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"public function getRow($rowIndex)\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElement($rowIndex);\n\t\t}\n\t\treturn $ret;\n\t}",
"public function addRow(TableRow $row);",
"function getRowInstance() {\n\t\treturn new SeriesGridRow();\n\t}",
"public function addTableRow($data, $params = array()) {\n if( !empty($this->_tableParams['offset']) ) {\n $offset = $this->_tableParams['offset'];\n } else {\n $offset = 0;\n }\n\n foreach ($data as $d) {\n\n if( is_array($d) ) {\n $text = isset($d['text'])?$d['text']:null;\n $options = !empty($d['options'])?$d['options']:null;\n } else {\n $text = $d;\n $options = null;\n }\n\n\n if( !empty($options) ) {\n $type = !empty($options['type'])?$options['type']:PHPExcel_Cell_DataType::TYPE_STRING;\n $align = !empty($options['align'])?$options['align']:PHPExcel_Style_Alignment::HORIZONTAL_LEFT;\n $colspan = !empty($options['colspan'])?$options['colspan']:null;\n\n switch ($type) {\n case 'string':\n $type = PHPExcel_Cell_DataType::TYPE_STRING;\n break;\n case 'number':\n $type = PHPExcel_Cell_DataType::TYPE_NUMERIC;\n break;\n }\n\n switch ($align) {\n case 'center':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;\n break;\n case 'right':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;\n break;\n }\n\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($align);\n $this->_xls->getActiveSheet()->getCellByColumnAndRow($offset, $this->_row)->setValueExplicit($text, $type);\n\n if( !empty($options['bold']) ) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold(true);\n }\n if( !empty($colspan) ) {\n $default = 1+$offset;\n $dimensi = $default+($colspan-1); // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n // if( $text == 'OPENING BALANCE' ) {\n // debug(__('%s%s:%s%s', $default, $row, $cell_end, $row));die();\n // }\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan-1;\n }\n } else {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $text);\n }\n \n // if (isset($params['horizontal'])) {\n // $this->_xls->getActiveSheet()->getCellByColumnAndRow($this->_row, $offset)->getStyle()->getAlignment()->setHorizontal($params['horizontal']);\n // }\n\n $offset++;\n }\n\n if( !empty($this->_tableParams['row_count']) ) {\n $row_count = $this->_tableParams['row_count'];\n } else {\n $row_count = 0;\n }\n\n $this->_row++;\n $this->_tableParams['row_count'] = $row_count+1;\n\n return $this;\n }",
"public function cells($cells = null, $rowEnd = false) {\r\n\t\tif (is_array($cells)) {\r\n\t\t\tforeach ($cells as $cell) {\r\n\t\t\t\t$cell += [null, null, null, null, null];\r\n\t\t\t\t$this->cell($cell[0], $cell[1], $cell[2], $cell[3], $cell[4]); \r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($rowEnd) {\r\n\t\t\t$this->rowEnd(is_array($rowEnd) ? $rowEnd : []);\r\n\t\t}\r\n\t}",
"function generateCell($type) {\n\t\t\n\t\tif($this->getV()) {\n\t\t\n\t\t\t$str = \"{v: \";\n\t\t\t\n\t\t\tif($type==\"string\") {\n\t\t\t\t$str.= \"'\".$this->escapeJSChars($this->getV()).\"',\";\n\t\t\t} elseif($type==\"boolean\") {\n\t\t\t\t$str.= \"'\".$this->getV().\"',\";\n\t\t\t} elseif($type==\"date\") {\n\t\t\t\t$str.= \"new Date(\".substr($this->getV(),0,4).\",\".(substr($this->getV(),5,2) - 1).\",\".substr($this->getV(),8,2).\"),\";\n\t\t\t} elseif($type==\"datetime\") {\n\t\t\t\t$str.= \"new Date(\".substr($this->getV(),0,4).\",\".(substr($this->getV(),5,2) - 1).\",\".substr($this->getV(),8,2).\",\".substr($this->getV(),11,2).\",\".substr($this->getV(),14,2).\",\".substr($this->getV(),17,2).\"),\";\n\t\t\t} elseif($type==\"timeofday\") {\n\t\t\t\t$str.= \"[\".substr($this->getV(),11,2).\",\".substr($this->getV(),14,2).\",\".substr($this->getV(),17,2).\"],\";\n\t\t\t} else {\t\t\n\t\t\t\t$str.= $this->escapeJSChars($this->getV()).\",\";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->getF()) {\n\t\t\t\t$str.= \"f: '\".$this->getF().\"',\";\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif($this->getClassName()) {\n\t\t\t\t$str.=\"p: {'className': '\".$this->getClassName().\"'},\";\n\t\t\t}\n\t\t\t\n\t\t\t$str = substr($str,0,-1);\n\t\t\t$str.= \"}\";\n\n\t\t} else {\n\t\t\n\t\t\t$str = \"\";\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $str;\n\t\t\n\t}",
"protected function newRow()\n\t{\n\t\t$this->loadDefaultValues();\n\t\t$row = [];\n\t\t$row['document_sequence'] = $this->document_sequence->CurrentValue;\n\t\t$row['firelink_doc_no'] = $this->firelink_doc_no->CurrentValue;\n\t\t$row['project_name'] = $this->project_name->CurrentValue;\n\t\t$row['document_tittle'] = $this->document_tittle->CurrentValue;\n\t\t$row['submit_no'] = $this->submit_no->CurrentValue;\n\t\t$row['revision_no'] = $this->revision_no->CurrentValue;\n\t\t$row['transmit_no'] = $this->transmit_no->CurrentValue;\n\t\t$row['transmit_date'] = $this->transmit_date->CurrentValue;\n\t\t$row['direction'] = $this->direction->CurrentValue;\n\t\t$row['approval_status'] = $this->approval_status->CurrentValue;\n\t\t$row['document_link'] = $this->document_link->Upload->DbValue;\n\t\t$row['transaction_date'] = $this->transaction_date->CurrentValue;\n\t\t$row['document_native'] = $this->document_native->CurrentValue;\n\t\t$row['username'] = $this->username->CurrentValue;\n\t\t$row['expiry_date'] = $this->expiry_date->CurrentValue;\n\t\treturn $row;\n\t}",
"function Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"function generateHTMLCell($type) {\n\t\t\n\t\t$str = \"\";\n\t\t\n\t\tif($this->getClassName()) {\n\t\t\t$str.=\"<td class=\\\"googleTableCell \".$this->getClassName().\"\\\">\";\n\t\t}\telse {\n\t\t\t$str.=\"<td class=\\\"googleTableCell\\\">\";\n\t\t}\n\t\t\n\t\tif($this->getV()) {\n\n\t\t\tif($type==\"string\") {\n\t\t\t\t$str.= $this->getV();\n\t\t\t} elseif($type==\"boolean\") {\n\t\t\t\t$str.= $this->getV();\n\t\t\t} elseif($type==\"date\") {\n\t\t\t\t$str.= substr($this->getV(),8,2).\"/\".(substr($this->getV(),5,2) - 1).\"/\".substr($this->getV(),0,4);\n\t\t\t} elseif($type==\"datetime\") {\n\t\t\t\t$str.= substr($this->getV(),8,2).\"/\".(substr($this->getV(),5,2) - 1).\"/\".substr($this->getV(),0,4).\" \".substr($this->getV(),11,2).\":\".substr($this->getV(),14,2).\":\".substr($this->getV(),17,2);\n\t\t\t} elseif($type==\"timeofday\") {\n\t\t\t\t$str.= substr($this->getV(),11,2).\":\".substr($this->getV(),14,2).\":\".substr($this->getV(),17,2);\n\t\t\t} else {\t\t\n\t\t\t\t$str.= $this->getV();\n\t\t\t}\t\t\n\n\t\t} else {\n\t\t\n\t\t\t$str.= \" \";\n\t\t\t\n\t\t}\n\t\t\n\t\t$str.= \"</td>\";\n\t\t\n\t\treturn $str;\n\t\t\n\t}",
"function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }",
"public function CellRow($text, $height = 7, $border = 0)\n {\n\n $this->Cell($this->GetWithWithoutMargin(), $height, $text, $border, 1);\n }",
"public function buildRow(&$row)\n {\n $lines = array();\n $class = '';\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $Column->cell($row);\n }\n if ($this->tableOptions['group']) {\n $level = 1000;\n foreach ($this->tableOptions['group'] as $count => $group) {\n if (is_null($row[$group]) && $count < $level) {\n $level = $count;\n }\n }\n if ($level < 1000) {\n $class = 'mh-table-group-row mh-table-group-row-level-'.$level;\n }\n\n }\n if (empty($class) && $this->altRow) {\n $class = 'altrow';\n }\n $this->altRow = !$this->altRow;\n\n return $this->Html->tag('tr', implode(chr(10), $lines), array('class' => $class));\n }",
"public function renderRow($title = '',$message = '') {\n $o = array();\n $o[] = '<tr>';\n if ($title != '' && $message != '') {\n $o[] = '<th>'.$title.'</th>';\n $o[] = '<td>'.$message.'</td>';\n } else if ($title != '') {\n $o[] = '<th colspan=\"2\">'.$title.'</th>';\n } else {\n $o[] = '<td colspan=\"2\">'.$message.'</td>';\n }\n $o[] = '</tr>';\n return implode(\"\\n\",$o);\n }",
"function Row($data) {\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}",
"function _build_row_by_post()\n{\n\t$row = array(\n\t\t'syno_id' => $this->_post_class->get_post_get_int( 'syno_id' ),\n\t\t'syno_time_create' => $this->_post_class->get_post_int( 'syno_time_create' ),\n\t\t'syno_time_update' => $this->_post_class->get_post_int( 'syno_time_update' ),\n\t\t'syno_weight' => $this->_post_class->get_post_int( 'syno_weight' ),\n\t\t'syno_key' => $this->_post_class->get_post_text( 'syno_key' ),\n\t\t'syno_value' => $this->_post_class->get_post_text( 'syno_value' ),\n\t);\n\treturn $row;\n}",
"function Row($data)\r\n{\r\n\t$nb=0;\r\n\tfor($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n\t$h=5*$nb;\r\n\t//Issue a page break first if needed\r\n\t$this->CheckPageBreak($h);\r\n\t//Draw the cells of the row\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t{\r\n\t\t$w=$this->widths[$i];\r\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n\t\t//Save the current position\r\n\t\t$x=$this->GetX();\r\n\t\t$y=$this->GetY();\r\n\t\t//Draw the border\r\n\r\n\t\t$this->Rect($x,$y,$w,$h);\r\n\r\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n\t\t//Put the position to the right of the cell\r\n\t\t$this->SetXY($x+$w,$y);\r\n\t}\r\n\t//Go to the next line\r\n\t$this->Ln($h);\r\n}",
"function _build_row_by_post()\n{\n\t$row = array(\n\t\t'user_id' => $this->_post_class->get_post_get_int( 'user_id' ),\n\t\t'user_time_create' => $this->_post_class->get_post_int( 'user_time_create' ),\n\t\t'user_time_update' => $this->_post_class->get_post_int( 'user_time_update' ),\n\t\t'user_uid' => $this->_post_class->get_post_int( 'user_uid' ),\n\t\t'user_cat_id' => $this->_post_class->get_post_int( 'user_cat_id' ),\n\t\t'user_email' => $this->_post_class->get_post_text( 'user_email' ),\n\t\t'user_text1' => $this->_post_class->get_post_text( 'user_text1' ),\n\t\t'user_text2' => $this->_post_class->get_post_text( 'user_text2' ),\n\t\t'user_text3' => $this->_post_class->get_post_text( 'user_text3' ),\n\t\t'user_text4' => $this->_post_class->get_post_text( 'user_text4' ),\n\t\t'user_text5' => $this->_post_class->get_post_text( 'user_text5' ),\n\t);\n\n\tfor ( $i=1; $i <= _C_WEBPHOTO_MAX_CAT_TEXT; $i++ ) \n\t{\n\t\t$name = 'user_text'.$i;\n\t\t$row[ $name ] = $this->_post_class->get_post_text( $name );\n\t}\n\n\treturn $row;\n}",
"public function getCell()\n {\n return $this->cell;\n }",
"function NewRow() {\n\t\t$row = array();\n\t\t$row['id'] = NULL;\n\t\t$row['id_sector'] = NULL;\n\t\t$row['id_actividad'] = NULL;\n\t\t$row['id_categoria'] = NULL;\n\t\t$row['apellidopaterno'] = NULL;\n\t\t$row['apellidomaterno'] = NULL;\n\t\t$row['nombre'] = NULL;\n\t\t$row['fecha_nacimiento'] = NULL;\n\t\t$row['sexo'] = NULL;\n\t\t$row['ci'] = NULL;\n\t\t$row['nrodiscapacidad'] = NULL;\n\t\t$row['celular'] = NULL;\n\t\t$row['direcciondomicilio'] = NULL;\n\t\t$row['ocupacion'] = NULL;\n\t\t$row['email'] = NULL;\n\t\t$row['cargo'] = NULL;\n\t\t$row['nivelestudio'] = NULL;\n\t\t$row['id_institucion'] = NULL;\n\t\t$row['observaciones'] = NULL;\n\t\t$row['id_centro'] = NULL;\n\t\treturn $row;\n\t}",
"public function row_single($name)\n {\n $out = \"<tr><td width=\\\"100%\\\" colspan=\\\"2\\\" align=\\\"left\\\">\".$name.\"</td></tr>\";\n $out .= \"<tr><td width=\\\"100%\\\" height=\\\"1\\\" bgcolor=\\\"#C0C0C0\\\" colspan=\\\"2\\\"></td></tr>\\n\";\n return $out;\n }",
"function Row($data) {\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\n\t//Emitir un salto de la primera página, si es necesario\n\t$this->CheckPageBreak($h);\n\n\t//Dibuja las celdas de la fila\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n\t\t//Guardar la posición actual\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\n\t\t//Dibujar el borde \n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,20,$data[$i],0,$a,'true');\n\t\t//Ponga la posición a la derecha de la celda\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Ir a la siguiente línea\n\t$this->Ln($h);\n}"
] | [
"0.6242905",
"0.6084221",
"0.6039841",
"0.59566337",
"0.58452594",
"0.5769639",
"0.57656497",
"0.57437134",
"0.568748",
"0.56583637",
"0.5620575",
"0.5619136",
"0.5607734",
"0.56033534",
"0.5592004",
"0.55728626",
"0.55640006",
"0.55632055",
"0.5555762",
"0.5547828",
"0.55055326",
"0.5492927",
"0.5473667",
"0.5472553",
"0.54104537",
"0.53812957",
"0.538007",
"0.5373033",
"0.5363291",
"0.53591615",
"0.5355903",
"0.5328585",
"0.5319354",
"0.5315637",
"0.5315637",
"0.5302438",
"0.52856404",
"0.5280302",
"0.52392524",
"0.5218736",
"0.5217505",
"0.52040577",
"0.51869345",
"0.51847696",
"0.51823044",
"0.51805097",
"0.5179219",
"0.5160863",
"0.5146654",
"0.51431876",
"0.5137125",
"0.5128649",
"0.5120279",
"0.5116755",
"0.51100504",
"0.5107152",
"0.5103265",
"0.5103065",
"0.5100823",
"0.509508",
"0.50863284",
"0.50848955",
"0.5078553",
"0.5077716",
"0.5071032",
"0.50705576",
"0.506932",
"0.5066098",
"0.5062922",
"0.5056863",
"0.5047881",
"0.50463337",
"0.5045007",
"0.5044631",
"0.50302833",
"0.50283784",
"0.50190866",
"0.50190866",
"0.50190866",
"0.50171983",
"0.5010474",
"0.50101876",
"0.5001121",
"0.49702007",
"0.4965452",
"0.49639592",
"0.49604994",
"0.49371892",
"0.49296805",
"0.49264252",
"0.49048203",
"0.48955217",
"0.48946574",
"0.48945475",
"0.48896486",
"0.4879875",
"0.4874832",
"0.48714948",
"0.48714244",
"0.48708415"
] | 0.59333 | 4 |
Add body row element | public function addRowElement(HtmlTableRow $row)
{
$this->_createRowContainer();
$this->_tbody->addElement($row);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }",
"protected function _createRowContainer()\n\t{\n\t\tif ($this->_tbody == null) {\n\t\t\t$this->_tbody = new HtmlElement('tbody');\n\t\t\t$this->addElement($this->_tbody);\t\t\t\n\t\t}\t\t\n\t}",
"private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}",
"public function addRows()\n {\n }",
"function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }",
"private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }",
"public function addRow(TableRow $row);",
"function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \" \";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}",
"function tabletbody_open() {\n $this->doc .= DOKU_TAB.'<tbody>'.DOKU_LF;\n }",
"public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }",
"function add_row($arr_html,$row){\r\n\r\n\t\tarray_splice($this->data, $row-1, 0, array($arr_html));\r\n\r\n\t}",
"public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }",
"function row($lebel, $content, $contentExists = false) {\n\t\tif ($contentExists == true) {\n\t\t\tif (!empty($contentExists)) {\n\t\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t}\n\t}",
"public function addRow($values){\n\t\t$row = &$this->xml_data;\n\t\t$row .= '\n <Row ss:AutoFitHeight=\"0\">';\n\n\t\tforeach($values as $val){\n\t\t\t\n\t\t\t// check if given variable contains array\n\t\t\tif(is_array($val)){\n\t\t\t\t$value = $val[0];\n\t\t\t\t$datatype = $val[1];\n\t\t\t} else {\n\t\t\t\t$value = $val;\n\t\t\t\t$datatype = is_numeric($val) ? 'Number' : 'String';\n\t\t\t}\n\t\t\t$row .= '\n <Cell><Data ss:Type=\"'.$datatype.'\">'.$value.'</Data></Cell>';\t\t\t\n\t\t}\n\n\t\t$row .= '\n </Row>';\n\t}",
"function tabletbody_close() {\n $this->doc .= DOKU_TAB.'</tbody>'.DOKU_LF;\n }",
"public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }",
"private function row_foot() {\n\t\t\t\n\t\t$row_foot = '<div class=\"adv_listing_mid\"><hr class=\"listing_divisor\" /></div>'.LB;\n\t\t\t\n\treturn $row_foot;\n\t}",
"function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}",
"public function new_row($css = '', $extras='') {\n\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n if ($this->_rowopen) {\n $this->end_row();\n }\n\n if ($this->_newid != '') {\n $extras .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n echo '<tr'.($css != '' ? ' class=\"'.$css.'\"' : '').($extras != '' ? ' '.$extras : '').'>';\n $this->_rowopen = true;\n }",
"public function renderTableBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows) && $this->emptyText !== false) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n }\n\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }",
"public function addRow($row)\n {\n $this->rows[] = $row;\n }",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 4 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n\n //Se pone para que depues de insertar una pagina establezca la posicion en X = 5\n $this->SetX(5);\n\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 4, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"public function addRow(array $row){\n\t\t$prependedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->prependedCols)){\n\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);;\n\t\t\t}\n\t\t\t$prependedCols[\"prependedCol\".$col[\"header\"]]=$html;\n\t\t\t$row=array_merge($prependedCols,$row);\n\t\t}\n\t\t\n\t\t$appendedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->appendedCols)){\n\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);\n\t\t\t}\n\t\t\t$appendedCols[\"appendedCol\".$col[\"header\"].$counter]=$html;\n\t\t\t$row=array_merge($row,$appendedCols);\n\t\t}\n\t\t\n\t\t$this->rows+=1; \t\t\n\t\t$this->data[]=$row;\n\t}",
"public function row($content)\n\t{\n\t\tif ($content instanceof Closure) {\n\t\t\t$row = new Row();\n\t\t\tcall_user_func($content, $row);\n\t\t} else {\n\t\t\t$row = new Row($content);\n\t\t}\n\n\t\tob_start();\n\n\t\t$row->build();\n\t\t$contents = ob_get_contents();\n\n\t\tob_end_clean();\n\n\t\treturn $this->append($contents);\n\t}",
"public function print_js_template_row()\n {\n }",
"public function addRows($rows)\n {\n foreach($rows as $key => $row)\n {\n $this->addRow($row);\n }\n }",
"public function generateRows(){\n $alphabet = $this->generateAlphabet();\n $this->refreshRows();\n for ($i = 0; $i < $this->nbRows; $i++){\n $row = new BlockRow();\n if ($this->rowLabel === 2){\n $name = ''.($i+1);\n $row->setName($name);\n } else {\n $row->setName($alphabet[$i]);\n }\n $row->setBlock($this);\n $row->setNbSeats($this->getNbSeatsPerRow());\n $row->setNumerotationSystem($this->getSeatLabel());\n $this->addRow($row);\n }\n $this->generateSeats();\n }",
"private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function Row($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function clsTbody($aConfiguration=array())\r\n\t{\r\n\t\tclsTableRowContainer::clsTableRowContainer('tbody', $aConfiguration);\r\n\t}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data){\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++){\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n \t//Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n \t//Draw the border\n\t $this->Rect($x,$y,$w,$h);\n \t//Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"function Row($data) {\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++) {\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}",
"public function addRow(array $row) {\n\t\t$this->tableInfo['rows'][] = $row;\t\n\t}",
"function Row($data) {\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\n\t//Emitir un salto de la primera página, si es necesario\n\t$this->CheckPageBreak($h);\n\n\t//Dibuja las celdas de la fila\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\n\t\t//Guardar la posición actual\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\n\t\t//Dibujar el borde \n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,20,$data[$i],0,$a,'true');\n\t\t//Ponga la posición a la derecha de la celda\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Ir a la siguiente línea\n\t$this->Ln($h);\n}",
"function add_row($selector, $row = \\false, $post_id = \\false)\n{\n}",
"function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"function AggregateListRow() {\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'J';\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5,$data[$i],0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"function addRow($row, $attributes = null)\n {\n $key = sizeof($this->_rows);\n $this->_rows[$key] = $row;\n\n //if updateValue has been called make sure to update the values of each added element\n foreach (array_keys($this->_rows[$key]) as $key2) {\n if (isset($this->_form)) {\n $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $this->_form);\n }\n if ($this->isFrozen()) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n \n if (isset($attributes)) $this->_rowAttributes[$key] = $attributes;\n }",
"public static function wrap_row( $content ) {\n\t\treturn \"<div class=\\\"formlift-row\\\">$content</div>\";\n\t}",
"function append(Row $row) {\n\t\t$this->rows[] = $row;\n\t\treturn $this;\n\t}",
"function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}",
"function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}",
"function Row($data)\r\n{\r\n\t$nb=0;\r\n\tfor($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n\t$h=5*$nb;\r\n\t//Issue a page break first if needed\r\n\t$this->CheckPageBreak($h);\r\n\t//Draw the cells of the row\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t{\r\n\t\t$w=$this->widths[$i];\r\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n\t\t//Save the current position\r\n\t\t$x=$this->GetX();\r\n\t\t$y=$this->GetY();\r\n\t\t//Draw the border\r\n\r\n\t\t$this->Rect($x,$y,$w,$h);\r\n\r\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n\t\t//Put the position to the right of the cell\r\n\t\t$this->SetXY($x+$w,$y);\r\n\t}\r\n\t//Go to the next line\r\n\t$this->Ln($h);\r\n}",
"public function addRow($row, $file)\n { }",
"public function renderContentBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderBodyRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n return \"<ul class='product-list'>\\n\" . implode(\"\\n\", $rows) . \"\\n</ul>\";\n }",
"public function addRow($row) {\n array_push($this->rows, $row);\n }",
"public function add_row(HTMLRowElement $row = null): int\n {\n if($row === null) $row = new HTMLRowElement();\n return $this -> add_child($row);\n }",
"public function aggregateListRow()\n\t{\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"public function aggregateListRow()\n\t{\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}",
"public function addRow($data)\n\t{\n\t\t$struct = isset($this->table) ? $this->table->structure() : null;\n\t\t\n\t\tif (is_array($data)) {\n\t\t\t$model = $this->generateModel($data);\n\t\t\t$row = new Row($model, $struct);\n\t\t} else if ($data instanceof ModelInterface) {\n\t\t\t$row = new Row($data, $struct);\n\t\t} else if ($data instanceof Row) {\n\t\t\t$row = $data;\n\t\t}\n\t\t\n\t\tif (!isset($row)) {\n\t\t\tthrow new \\Exception(\"No valid row data was provided.\");\n\t\t}\n\t\t\n\t\t$this->rows[] = $row;\n\t}",
"public function addBody() { return $this->_m_addBody; }",
"public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}",
"public function renderTableRow($model) {\n $cells = [];\n /* @var $column Column */\n foreach ($this->columns as $column) {\n $cells[] = $column->renderContentCell($model);\n }\n\tif (is_callable($this->rowOptions) && $model !== null)\n\t $options = call_user_func($this->rowOptions, $model, $this);\n\telse\n\t $options = $this->rowOptions;\n\n $options['data-key'] = (string)$model->key();\n\n return Widget::html()->tag('table-row', array('content' => implode('', $cells)), $options);\n }",
"public function appendBody($body);",
"function Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t\n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}",
"function Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t\n\t\t$this->Rect($x,$y,$w,$h);\n\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}",
"public function addRow(array $datas) {\n\t\t$tr = $this->getTBody()->addTr();\n\t\tforeach ($datas as $data) {\n\t\t\t$tr->addTd($data);\n\t\t}\n\t\tif (empty($this->heads)) $this->heads = array_keys($datas);\n\t}",
"function RowHeadFoot($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->SetFont('Arial', 'B', 7);\n $this->SetFillColor(203, 203, 203);\n $this->MultiCell($w, 5, $data[$i], 1, $a, true);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function bot_wtc_output_rows() // outputs the rows for the html table in the bot_wtc_tab\n{\n\tglobal $bot_items;\n\n\t$selectInput_for_position = array('insertBefore'=>'before','insertAfter'=>'after'); // position values for the txp function selectInput\n\t$db_values = bot_wtc_fetch_db(); // array of values from the db\n\n $destination_selectInput = bot_all_items_selectinput();\n\t$items_selectInput = bot_contextual_selectinput();\n\n\t// builds rows for new item sections list\n\t$sections= bot_get_sections(); // get sections array\n\t$new_item_sections_rows = '';\n\tforeach ($sections as $key => $value) {\n\t\t$new_item_sections_row = '<label>'.checkbox('new_item_sections[]', $key, '0').$value.'</label><br />';\n\t\t$new_item_sections_rows .= $new_item_sections_row;\n }\n $new_item_sections_rows .= '<p ><a href=\"#\" class=\"bot_all\">'.gTxt(\"all\").'</a> | <a href=\"#\" class=\"bot_none\">'.gTxt(\"none\").'</a></p>'; // hide all/none\n\n\t// new item insertion\n\t$rows = \"\";\n\t$input_row = tr(\n\t\ttd(selectInput('new_item',bot_contextual_selectinput(), '', '1'), '', 'bot_hilight')\n\t\t.td(selectInput('new_item_position', $selectInput_for_position, '', '1'))\n\t\t.td(selectInput('new_item_destination',bot_all_items_selectinput(), '', '1'))\n\t\t.td('<p><a href=\"#\" class=\"bot_push\">'.gTxt(\"tag_section_list\").'</a></p><div class=\"bot_collapse\">'.$new_item_sections_rows.'</div>')\n\t\t.td(finput('text','new_item_class', ''))\n\t\t.td()\n\t\t);\n\t\t$rows .= $input_row;\n\n\t// other rows - output if at least one record was already set\n\tif ($db_values){\n\t\tfor ($i = 0; $i < count( $db_values ); $i++){\n\t\t\t// data for \"sections to show\" selectinput - decides wether a section is checked or not\n\t\t\t$bot_hide_in_this_sections_array = explode('|', $db_values[$i]['sections']);\n\t\t\t$item_sections_rows = '';\n\t\t\tforeach ($sections as $key => $value) { // if section is in db mark as checked\n\t\t\t $checked = in_array($key, $bot_hide_in_this_sections_array) ? '1': '0';\n\t\t\t\t$item_sections_row = '<label>'.checkbox('bot_wtc_sections_for_id_'.$db_values[$i]['id'].'[]', $key, $checked).$value.'</label><br />';\n\t\t\t\t$item_sections_rows .= $item_sections_row;\n\t\t }\n\t\t $item_sections_rows .= '<p><a href=\"#\" class=\"bot_all\">'.gTxt(\"all\").'</a> | <a href=\"#\" class=\"bot_none\">'.gTxt(\"none\").'</a></p>'; // hide all/none\n\t\t\t$single_row = tr(\n\t\t\ttd(selectInput('item[]',bot_contextual_selectinput($db_values[$i]['item']), $db_values[$i]['item'],'0'), '', 'bot_hilight')\n\t\t\t.td(selectInput('item_position[]', $selectInput_for_position, $db_values[$i]['position'], '1'))\n\t\t\t.td(selectInput('item_destination[]',bot_all_items_selectinput(), $db_values[$i]['destination'],'1'))\n \t\t\t.td('<p><a href=\"#\" class=\"bot_push\">'.gTxt(\"tag_section_list\").'</a></p><div class=\"bot_collapse\">'.$item_sections_rows.'</div>')\n\t\t\t.td(finput('text', 'item_class[]', $db_values[$i]['class']))\n\t\t\t.td(checkbox('bot_delete_id[]', $db_values[$i]['id'], '0').'<label for=\"bot_delete_id\"> '.gTxt('delete').'</label>'))\n\t\t\t.hInput('bot_wtc_id[]', $db_values[$i]['id']);\n\n\t\t\t$rows .= $single_row;\n\t\t}\n\t};\n\treturn $rows;\n}",
"function Row($data)\n{\n\t$nb=0;\n\tfor($i=0;$i<count($data);$i++)\n\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t$h=5*$nb;\n\t//Issue a page break first if needed\n\t$this->CheckPageBreak($h);\n\t//Draw the cells of the row\n\tfor($i=0;$i<count($data);$i++)\n\t{\n\t\t$w=$this->widths[$i];\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t//Save the current position\n\t\t$x=$this->GetX();\n\t\t$y=$this->GetY();\n\t\t//Draw the border\n\t\t$this->Rect($x,$y,$w,$h);\n\t\t//Print the text\n\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t//Put the position to the right of the cell\n\t\t$this->SetXY($x+$w,$y);\n\t}\n\t//Go to the next line\n\t$this->Ln($h);\n}",
"public function add_invoice_row() {\n\n $addFlag = false;\n\n // Set null values to check for and later insertion if required\n $data = array(\n 'category' => null,\n 'description' => null,\n 'amount' => null,\n 'mockInvoiceId' => $_POST[ 'mockInvoiceId' ]\n );\n\n // Check if there are any rows that have nothing in them\n $row = $this->mockinvoice_row_model->get_by( $data );\n\n // Add a new row if there are no blank ones already\n if ( empty( $row ) ) {\n // Add a new row with empty values\n $this->mockinvoice_row_model->save( $data );\n $addFlag = true;\n }\n\n\n // Send back if a new row was added\n $returnArray[] = array( 'rowAdded' => $addFlag );\n $this->json_library->print_array_json_unless_empty( $returnArray );\n }",
"public function add()\n {\n $this->view->state = $this->request->has('id') ? 'Edit Row' : 'Add Row';\n return $this->view('add');\n }",
"function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=6*$nb;\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\n\t\t\t//Berder semua\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,6,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell enaena\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"function Row($data){\r\n \t$nb=0;\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n \t$h=5*$nb;\r\n \t//Issue a page break first if needed\r\n \t$this->CheckPageBreak($h);\r\n \t//Draw the cells of the row\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t{\r\n \t\t$w=$this->widths[$i];\r\n \t\t//$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n $a=$this->aligns[$i];\r\n \t\t//Save the current position\r\n \t\t$x=$this->GetX();\r\n \t\t$y=$this->GetY();\r\n \t\t//Draw the border\r\n \t\t\r\n \t\t$this->Rect($x,$y,$w,$h);\r\n //$this->SetLineStyle(0);\r\n //$this->SetLineWidth($dash);\r\n \t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n \t\t//Put the position to the right of the cell\r\n \t\t$this->SetXY($x+$w,$y);\r\n \t}\r\n \t//Go to the next line\r\n \t$this->Ln($h);\r\n }",
"function Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 3.8, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function Row($data)\n {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 3.8 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->MultiCell($w, 3.8, $data[$i], 0, $a);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"public function addRowText($text)\n {\n return $this->withMeta(['addRowText' => $text]);\n }",
"public function addRowText($text)\n {\n return $this->withMeta(['addRowText' => $text]);\n }",
"function add_sub_row($selector, $row = \\false, $post_id = \\false)\n{\n}",
"public function add_row(object $row)\n\t{\n\t\tif (!$row->is_a(crm_bill_row_obj::CLID))\n\t\t{\n\t\t\tthrow new awex_obj_type(\"Invalid row object \" . var_export($row, true) . \" with class: \" . $row->class_id());\n\t\t}\n\n\t\t$this->connect(array(\n\t\t\t\"to\" => $row,\n\t\t\t\"type\" => \"RELTYPE_CHILD\"\n\t\t));\n\t}",
"function Row($data)\n\t{\n\t $nb=0;\n\t for($i=0;$i<count($data);$i++)\n\t $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t $h=5.5*$nb;\n\t //Issue a page break first if needed\n\t $this->CheckPageBreak($h);\n\t //Draw the cells of the row\n\t for($i=0;$i<count($data);$i++)\n\t {\n\t $w=$this->widths[$i];\n\t if ($i == 4 || $i == 5){\n\t \t$a = 'R';\n\t } elseif ($i == 0) {\n\t \t$a='L';\n\t } else {\n\t\t $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n\t\t}\n\t //Save the current position\n\t $x=$this->GetX();\n\t $y=$this->GetY();\n\t //Draw the border\n\t $this->Rect($x,$y,$w,$h);\n\t //Print the text\n\t $this->MultiCell($w,5.5,\"$data[$i]\",0,$a);\n\t //Put the position to the right of the cell\n\t $this->SetXY($x+$w,$y);\n\t }\n\t //Go to the next line\n\t $this->Ln($h);\n\t}",
"function Row($data){\n\t\t\t$nb=0;\n\t\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t\t$h=5*$nb;\n\t\t\t//Issue a page break first if needed\n\t\t\t$this->CheckPageBreak($h);\n\t\t\t//Draw the cells of the row\n\t\t\tfor($i=0;$i<count($data);$i++){\n\t\t\t\t$w=$this->widths[$i];\n\t\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t\t//Save the current position\n\t\t\t\t$x=$this->GetX();\n\t\t\t\t$y=$this->GetY();\n\t\t\t\t//Draw the border\n\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t//Print the text\n\t\t\t\tif(!is_numeric($data[$i])){\n\t\t\t\t\t$this->MultiCell($w,5,$data[$i],0,$a);\n\t\t\t\t}else{\n\t\t\t\t\t$this->MultiCell($w,5, \"$\".number_format($data[$i],2,\".\",\",\"),0,'R');\n\t\t\t\t}\n\t\t\t\t//Put the position to the right of the cell\n\t\t\t\t$this->SetXY($x+$w,$y);\n\t\t\t}\n\t\t\t//Go to the next line\n\t\t\t$this->Ln($h);\n\t\t}",
"public function addRows(array $rows) {\n\t\tforeach ($rows as $row) {\n\t\t\t$this->addRow($row);\n\t\t}\n\t}",
"function AggregateListRow() {\n\t}",
"public function PushRow() {\n $this->PushOutput($this->currow);\n// if (is_callable(array($this,$this->curtpl)))\n call_user_func(array($this,$this->curtpl), $this);\n }",
"function drawSimpleRow($color, $text) {\r\n\t\t\t\techo(\"<tr align = 'center' bgcolor = '$color'>\");\r\n\t\t\t\t\techo(\"<td colspan = '8'>$text</td>\");\r\n\t\t\t\techo(\"</tr>\");\r\n\t\t\t}",
"public static function addRow(DetailTable $table, int|string|null $header, ?string $htmlSnippet): void\n {\n $table->addRow($header, ['class' => $table->renderWalker->getClasses(['cell', 'cell-html'])], $htmlSnippet, true);\n }",
"function Row($data,$border = 0)\n {\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n if($border == 0)\n {\n $this->Rect($x,$y,$w,$h);\n }\n\n //Print the text\n if($i == count($data)) {\n $this->SetFont('Arial','',5);\n }\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"function create_rows($binary) {\r\n\r\n\t\t\t// Getting total number of currently published posts\r\n\t\t\t$count_posts = wp_count_posts();\r\n\t\t\t$published_posts = $count_posts->publish;\r\n\r\n\t\t\tglobal $row_number;\r\n\r\n\t\t\t// Again, AJAX is meant to be used to feed in the argument \"three\"\r\n\t\t\tif ($binary = three) {\r\n\t\t\t\r\n\t\t\t\t// If number of posts is perfectly divisible by three, then make the amount of rows equal to the result\r\n\t\t\t\tif ($published_posts % 3 == 0) {\r\n\t\t\t\t\t$row_number = (int) ($published_posts / 3);\r\n\t\t\t\t}\r\n\t\t\t\t// If number of posts is NOT equally divisible by three, like with a decimal remainder, then add an extra row to even the collumns out\r\n\t\t\t\telse {\r\n\t\t\t\t\t$row_number = (int) ($published_posts / 3 ) + 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif ($binary = one) {\r\n\t\t\t\t$row_number = $published_posts;\r\n\t\t\t}\r\n\t\t}",
"public function addRow($values)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = $this->createRow($values);\n\t\t$this->addRowElement($row);\n\t\treturn $row;\n\t}",
"public function addRow($columns) {\n\t\t$this\n\t\t\t->addElement(\"div\")\n\t\t\t->addClass(\"row\")\n\t\t\t->add(implode($columns));\n\t\t\n\t\treturn $this;\n\t}",
"function Row($data)\n\t{\n\t\t$nb=0;\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n\t\t$h=15*$nb;\n\t\t\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\t$w=$this->widths[$i];\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x=$this->GetX();\n\t\t\t$y=$this->GetY();\n\t\t\t//Draw the border\n\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t//Print the text\n\t\t\t$this->MultiCell($w,15,$data[$i],0,$a);\n\t\t\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w,$y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}",
"public function insertRow($row);",
"function genSubmitRow(){\n\t\t$row = array();\n\t\tarray_pad($row, sizeof($this->table[0]), '');\n\n\t\tif($this->state->isNewEntry()){\n\t\t\t$textField = 'text';\n\t\t\t$row[0] = $this->translator->markupAttributes('input', '',array('type'=>'text', 'name'=>'user'));\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'submit', 'value'=>'Submit'));\n\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = $this->translator->markupAttributes('input', '',array('type'=>'checkbox', 'name'=>$count));\n\t\t\n\t\t}\n\t\telse{\n\t\t\t$row[0] = '';\n\t\t\t$row[1] = $this->translator->markupAttributes('input','',array('type'=>'submit', 'name'=>'new', 'value'=>'New'));\n\n\t\t\tfor($count = 2; $count < sizeof($this->table[0]); $count++) $row[$count] = '';\n\t\t}\n\n\t\treturn $row;\n\t}",
"function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\n\t\t$this->id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// nombre_contacto\n\t\t// name\n\t\t// lastname\n\t\t// email\n\t\t// address\n\t\t// phone\n\t\t// cell\n\t\t// is_active\n\n\t\t$this->is_active->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// created_at\n\t\t// id_sucursal\n\t\t// documentos\n\n\t\t$this->documentos->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateModified\n\t\t$this->DateModified->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DateDeleted\n\t\t$this->DateDeleted->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// CreatedBy\n\t\t$this->CreatedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// ModifiedBy\n\t\t$this->ModifiedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DeletedBy\n\t\t$this->DeletedBy->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// latitud\n\t\t$this->latitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// longitud\n\t\t$this->longitud->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipoinmueble\n\t\t// id_ciudad_inmueble\n\t\t// id_provincia_inmueble\n\t\t// imagen_inmueble01\n\n\t\t$this->imagen_inmueble01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble02\n\t\t// imagen_inmueble03\n\t\t// imagen_inmueble04\n\t\t// imagen_inmueble05\n\t\t// imagen_inmueble06\n\n\t\t$this->imagen_inmueble06->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble07\n\t\t$this->imagen_inmueble07->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_inmueble08\n\t\t$this->imagen_inmueble08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipovehiculo\n\t\t// id_ciudad_vehiculo\n\t\t// id_provincia_vehiculo\n\t\t// imagen_vehiculo01\n\n\t\t$this->imagen_vehiculo01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo02\n\t\t// imagen_vehiculo03\n\n\t\t$this->imagen_vehiculo03->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo04\n\t\t$this->imagen_vehiculo04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_vehiculo05\n\t\t// imagen_vehiculo06\n\t\t// imagen_vehiculo07\n\t\t// imagen_vehiculo08\n\n\t\t$this->imagen_vehiculo08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomaquinaria\n\t\t// id_ciudad_maquinaria\n\t\t// id_provincia_maquinaria\n\t\t// imagen_maquinaria01\n\n\t\t$this->imagen_maquinaria01->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria02\n\t\t// imagen_maquinaria03\n\t\t// imagen_maquinaria04\n\n\t\t$this->imagen_maquinaria04->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// imagen_maquinaria05\n\t\t// imagen_maquinaria06\n\t\t// imagen_maquinaria07\n\t\t// imagen_maquinaria08\n\n\t\t$this->imagen_maquinaria08->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// tipomercaderia\n\t\t// imagen_mercaderia01\n\t\t// documento_mercaderia\n\t\t// tipoespecial\n\t\t// imagen_tipoespecial01\n\t\t// email_contacto\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// nombre_contacto\n\t\t$this->nombre_contacto->ViewValue = $this->nombre_contacto->CurrentValue;\n\t\t$this->nombre_contacto->ViewCustomAttributes = \"\";\n\n\t\t// name\n\t\t$this->name->ViewValue = $this->name->CurrentValue;\n\t\t$this->name->ViewCustomAttributes = \"\";\n\n\t\t// lastname\n\t\t$this->lastname->ViewValue = $this->lastname->CurrentValue;\n\t\t$this->lastname->ViewCustomAttributes = \"\";\n\n\t\t// email\n\t\t$this->_email->ViewValue = $this->_email->CurrentValue;\n\t\t$this->_email->ViewCustomAttributes = \"\";\n\n\t\t// address\n\t\t$this->address->ViewValue = $this->address->CurrentValue;\n\t\t$this->address->ViewCustomAttributes = \"\";\n\n\t\t// phone\n\t\t$this->phone->ViewValue = $this->phone->CurrentValue;\n\t\t$this->phone->ViewCustomAttributes = \"\";\n\n\t\t// cell\n\t\t$this->cell->ViewValue = $this->cell->CurrentValue;\n\t\t$this->cell->ViewCustomAttributes = \"\";\n\n\t\t// created_at\n\t\t$this->created_at->ViewValue = $this->created_at->CurrentValue;\n\t\t$this->created_at->ViewValue = ew_FormatDateTime($this->created_at->ViewValue, 17);\n\t\t$this->created_at->ViewCustomAttributes = \"\";\n\n\t\t// id_sucursal\n\t\tif (strval($this->id_sucursal->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_sucursal->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sucursal`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_sucursal->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`id`='\".$_SESSION[\"sucursal\"].\"'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_sucursal, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_sucursal->ViewValue = $this->id_sucursal->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_sucursal->ViewValue = NULL;\n\t\t}\n\t\t$this->id_sucursal->ViewCustomAttributes = \"\";\n\n\t\t// tipoinmueble\n\t\tif (strval($this->tipoinmueble->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoinmueble->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoinmueble->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='INMUEBLE'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoinmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoinmueble->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoinmueble->ViewValue .= $this->tipoinmueble->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoinmueble->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoinmueble->ViewValue = $this->tipoinmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoinmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoinmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_inmueble\n\t\tif (strval($this->id_ciudad_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_inmueble->ViewValue = $this->id_ciudad_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_inmueble\n\t\tif (strval($this->id_provincia_inmueble->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_inmueble->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_inmueble->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_inmueble, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_inmueble->ViewValue = $this->id_provincia_inmueble->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_inmueble->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_inmueble->ViewCustomAttributes = \"\";\n\n\t\t// tipovehiculo\n\t\tif (strval($this->tipovehiculo->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipovehiculo->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipovehiculo->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='VEHICULO'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipovehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipovehiculo->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipovehiculo->ViewValue .= $this->tipovehiculo->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipovehiculo->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipovehiculo->ViewValue = $this->tipovehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipovehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->tipovehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_vehiculo\n\t\tif (strval($this->id_ciudad_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_vehiculo->ViewValue = $this->id_ciudad_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_vehiculo\n\t\tif (strval($this->id_provincia_vehiculo->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_vehiculo->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_vehiculo->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_vehiculo, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_vehiculo->ViewValue = $this->id_provincia_vehiculo->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_vehiculo->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_vehiculo->ViewCustomAttributes = \"\";\n\n\t\t// tipomaquinaria\n\t\tif (strval($this->tipomaquinaria->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomaquinaria->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`nombre`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `nombre`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomaquinaria->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='MAQUINARIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomaquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomaquinaria->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomaquinaria->ViewValue .= $this->tipomaquinaria->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomaquinaria->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomaquinaria->ViewValue = $this->tipomaquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomaquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomaquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_ciudad_maquinaria\n\t\tif (strval($this->id_ciudad_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_ciudad_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_ciudad_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_ciudad_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_ciudad_maquinaria->ViewValue = $this->id_ciudad_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_ciudad_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_ciudad_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// id_provincia_maquinaria\n\t\tif (strval($this->id_provincia_maquinaria->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->id_provincia_maquinaria->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincia`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->id_provincia_maquinaria->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->id_provincia_maquinaria, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->id_provincia_maquinaria->ViewValue = $this->id_provincia_maquinaria->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->id_provincia_maquinaria->ViewValue = NULL;\n\t\t}\n\t\t$this->id_provincia_maquinaria->ViewCustomAttributes = \"\";\n\n\t\t// tipomercaderia\n\t\tif (strval($this->tipomercaderia->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipomercaderia->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipomercaderia->LookupFilters = array();\n\t\t$lookuptblfilter = \"`tipo`='MERCADERIA'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipomercaderia, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipomercaderia->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipomercaderia->ViewValue .= $this->tipomercaderia->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipomercaderia->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipomercaderia->ViewValue = $this->tipomercaderia->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipomercaderia->ViewValue = NULL;\n\t\t}\n\t\t$this->tipomercaderia->ViewCustomAttributes = \"\";\n\n\t\t// documento_mercaderia\n\t\t$this->documento_mercaderia->ViewValue = $this->documento_mercaderia->CurrentValue;\n\t\t$this->documento_mercaderia->ViewCustomAttributes = \"\";\n\n\t\t// tipoespecial\n\t\tif (strval($this->tipoespecial->CurrentValue) <> \"\") {\n\t\t\t$arwrk = explode(\",\", $this->tipoespecial->CurrentValue);\n\t\t\t$sFilterWrk = \"\";\n\t\t\tforeach ($arwrk as $wrk) {\n\t\t\t\tif ($sFilterWrk <> \"\") $sFilterWrk .= \" OR \";\n\t\t\t\t$sFilterWrk .= \"`id_tipoinmueble`\" . ew_SearchString(\"=\", trim($wrk), EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t$sSqlWrk = \"SELECT `id_tipoinmueble`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipoinmueble`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->tipoespecial->LookupFilters = array(\"dx1\" => '`nombre`');\n\t\t$lookuptblfilter = \"`tipo`='ESPECIAL'\";\n\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->tipoespecial, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$this->tipoespecial->ViewValue = \"\";\n\t\t\t\t$ari = 0;\n\t\t\t\twhile (!$rswrk->EOF) {\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t\t$this->tipoespecial->ViewValue .= $this->tipoespecial->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->MoveNext();\n\t\t\t\t\tif (!$rswrk->EOF) $this->tipoespecial->ViewValue .= ew_ViewOptionSeparator($ari); // Separate Options\n\t\t\t\t\t$ari++;\n\t\t\t\t}\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->tipoespecial->ViewValue = $this->tipoespecial->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->tipoespecial->ViewValue = NULL;\n\t\t}\n\t\t$this->tipoespecial->ViewCustomAttributes = \"\";\n\n\t\t// email_contacto\n\t\tif (strval($this->email_contacto->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`login`\" . ew_SearchString(\"=\", $this->email_contacto->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `login`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `oficialcredito`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->email_contacto->LookupFilters = array(\"dx1\" => '`nombre`', \"dx2\" => '`apellido`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->email_contacto, $sWhereWrk); // Call Lookup Selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->email_contacto->ViewValue = $this->email_contacto->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->email_contacto->ViewValue = NULL;\n\t\t}\n\t\t$this->email_contacto->ViewCustomAttributes = \"\";\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->HrefValue = \"\";\n\t\t\t$this->nombre_contacto->TooltipValue = \"\";\n\n\t\t\t// name\n\t\t\t$this->name->LinkCustomAttributes = \"\";\n\t\t\t$this->name->HrefValue = \"\";\n\t\t\t$this->name->TooltipValue = \"\";\n\n\t\t\t// lastname\n\t\t\t$this->lastname->LinkCustomAttributes = \"\";\n\t\t\t$this->lastname->HrefValue = \"\";\n\t\t\t$this->lastname->TooltipValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->LinkCustomAttributes = \"\";\n\t\t\t$this->_email->HrefValue = \"\";\n\t\t\t$this->_email->TooltipValue = \"\";\n\n\t\t\t// address\n\t\t\t$this->address->LinkCustomAttributes = \"\";\n\t\t\t$this->address->HrefValue = \"\";\n\t\t\t$this->address->TooltipValue = \"\";\n\n\t\t\t// phone\n\t\t\t$this->phone->LinkCustomAttributes = \"\";\n\t\t\t$this->phone->HrefValue = \"\";\n\t\t\t$this->phone->TooltipValue = \"\";\n\n\t\t\t// cell\n\t\t\t$this->cell->LinkCustomAttributes = \"\";\n\t\t\t$this->cell->HrefValue = \"\";\n\t\t\t$this->cell->TooltipValue = \"\";\n\n\t\t\t// created_at\n\t\t\t$this->created_at->LinkCustomAttributes = \"\";\n\t\t\t$this->created_at->HrefValue = \"\";\n\t\t\t$this->created_at->TooltipValue = \"\";\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->LinkCustomAttributes = \"\";\n\t\t\t$this->id_sucursal->HrefValue = \"\";\n\t\t\t$this->id_sucursal->TooltipValue = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoinmueble->HrefValue = \"\";\n\t\t\t$this->tipoinmueble->TooltipValue = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->LinkCustomAttributes = \"\";\n\t\t\t$this->tipovehiculo->HrefValue = \"\";\n\t\t\t$this->tipovehiculo->TooltipValue = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomaquinaria->HrefValue = \"\";\n\t\t\t$this->tipomaquinaria->TooltipValue = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->LinkCustomAttributes = \"\";\n\t\t\t$this->tipomercaderia->HrefValue = \"\";\n\t\t\t$this->tipomercaderia->TooltipValue = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->LinkCustomAttributes = \"\";\n\t\t\t$this->tipoespecial->HrefValue = \"\";\n\t\t\t$this->tipoespecial->TooltipValue = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->LinkCustomAttributes = \"\";\n\t\t\t$this->email_contacto->HrefValue = \"\";\n\t\t\t$this->email_contacto->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// nombre_contacto\n\t\t\t$this->nombre_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->nombre_contacto->EditCustomAttributes = \"\";\n\t\t\t$this->nombre_contacto->EditValue = ew_HtmlEncode($this->nombre_contacto->AdvancedSearch->SearchValue);\n\t\t\t$this->nombre_contacto->PlaceHolder = ew_RemoveHtml($this->nombre_contacto->FldTitle());\n\n\t\t\t// name\n\t\t\t$this->name->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->name->EditCustomAttributes = \"\";\n\t\t\t$this->name->EditValue = ew_HtmlEncode($this->name->AdvancedSearch->SearchValue);\n\t\t\t$this->name->PlaceHolder = ew_RemoveHtml($this->name->FldTitle());\n\n\t\t\t// lastname\n\t\t\t$this->lastname->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->lastname->EditCustomAttributes = \"\";\n\t\t\t$this->lastname->EditValue = ew_HtmlEncode($this->lastname->AdvancedSearch->SearchValue);\n\t\t\t$this->lastname->PlaceHolder = ew_RemoveHtml($this->lastname->FldTitle());\n\n\t\t\t// email\n\t\t\t$this->_email->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->_email->EditCustomAttributes = \"\";\n\t\t\t$this->_email->EditValue = ew_HtmlEncode($this->_email->AdvancedSearch->SearchValue);\n\t\t\t$this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldTitle());\n\n\t\t\t// address\n\t\t\t$this->address->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->address->EditCustomAttributes = \"\";\n\t\t\t$this->address->EditValue = ew_HtmlEncode($this->address->AdvancedSearch->SearchValue);\n\t\t\t$this->address->PlaceHolder = ew_RemoveHtml($this->address->FldTitle());\n\n\t\t\t// phone\n\t\t\t$this->phone->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->phone->EditCustomAttributes = \"\";\n\t\t\t$this->phone->EditValue = ew_HtmlEncode($this->phone->AdvancedSearch->SearchValue);\n\t\t\t$this->phone->PlaceHolder = ew_RemoveHtml($this->phone->FldTitle());\n\n\t\t\t// cell\n\t\t\t$this->cell->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->cell->EditCustomAttributes = \"\";\n\t\t\t$this->cell->EditValue = ew_HtmlEncode($this->cell->AdvancedSearch->SearchValue);\n\t\t\t$this->cell->PlaceHolder = ew_RemoveHtml($this->cell->FldTitle());\n\n\t\t\t// created_at\n\t\t\t$this->created_at->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->created_at->EditCustomAttributes = \"\";\n\t\t\t$this->created_at->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($this->created_at->AdvancedSearch->SearchValue, 17), 17));\n\t\t\t$this->created_at->PlaceHolder = ew_RemoveHtml($this->created_at->FldTitle());\n\n\t\t\t// id_sucursal\n\t\t\t$this->id_sucursal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->id_sucursal->EditCustomAttributes = \"\";\n\n\t\t\t// tipoinmueble\n\t\t\t$this->tipoinmueble->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoinmueble->EditCustomAttributes = \"\";\n\n\t\t\t// tipovehiculo\n\t\t\t$this->tipovehiculo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipovehiculo->EditCustomAttributes = \"\";\n\n\t\t\t// tipomaquinaria\n\t\t\t$this->tipomaquinaria->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomaquinaria->EditCustomAttributes = \"\";\n\n\t\t\t// tipomercaderia\n\t\t\t$this->tipomercaderia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipomercaderia->EditCustomAttributes = \"\";\n\n\t\t\t// tipoespecial\n\t\t\t$this->tipoespecial->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tipoespecial->EditCustomAttributes = \"\";\n\n\t\t\t// email_contacto\n\t\t\t$this->email_contacto->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->email_contacto->EditCustomAttributes = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) // Add/Edit/Search row\n\t\t\t$this->SetupFieldTitles();\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}",
"function addRow($csvArr, $tagsArr, $count) {\n $ret = '<row>';\n for ($index = 0; $index < $count; $index++) {\n $ret .= '<' . $tagsArr[$index] . ' val=\"' . trim($csvArr[$index]) . '\"/>';\n }\n $ret .= '</row>';\n return $ret;\n}",
"public function addRows($type, array $datas) {\n\n $row = $this->$type->addChildren(new VTCore_Html_Element(array(\n 'type' => 'tr',\n )))\n ->lastChild();\n\n foreach ($datas as $key => $data) {\n $cell = $row->addChildren(new VTCore_Html_Element(array(\n 'type' => ($type == 'thead') ? 'th' : 'td',\n )))\n ->lastChild();\n\n if (!is_array($data)) {\n $cell->addChildren($data);\n }\n elseif (isset($data['attributes']) && isset($data['content'])) {\n $cell->addAttributes($data['attributes']);\n $cell->addChildren($data['content']);\n }\n }\n\n return $row;\n\n }",
"private function makeTableRows($rowAttr = [])\n {\n // Reshape array $this->tableData such that each array entry contains\n // $this->nCols nodes. => Each array entry corresponds to one\n // row of table elements.\n $tableData = array_chunk(\n $this->makeTableData($this->inputData),\n $this->nCols\n );\n // Set up table content\n $rowCount = 0;\n $altRowCount = 0;\n $tr = new HtmlNode(kind: 'tr');\n foreach ($tableData as $nodesPerRow) {\n $tr_tmp = clone $tr;\n // Set (imported) row attributes\n if (isset($rowAttr[$rowCount])) {\n $tr_tmp->setAttributes($rowAttr[$rowCount]);\n }\n // Label alternative rows\n if (($rowCount >= $this->rowOffset)) {\n if (($altRowCount % $this->rowAlt) === 0) {\n $tr_tmp->setAttributes(['class' => 'alt'], 'add');\n }\n ++$altRowCount;\n }\n ++$rowCount;\n $tr_tmp->append($nodesPerRow);\n $tableRows[] = $tr_tmp;\n }\n return $tableRows;\n }",
"public function AddRow(Row $row) {\n return $this->Add($row);\n }",
"function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->total_gross->FormValue == $this->total_gross->CurrentValue && is_numeric(ew_StrToFloat($this->total_gross->CurrentValue)))\n\t\t\t$this->total_gross->CurrentValue = ew_StrToFloat($this->total_gross->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// row_id\n\n\t\t$this->row_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_date\n\t\t$this->auc_date->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_number\n\t\t$this->auc_number->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_place\n\t\t$this->auc_place->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// start_bid\n\t\t$this->start_bid->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// close_bid\n\t\t$this->close_bid->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_notes\n\t\t// total_sack\n\n\t\t$this->total_sack->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// total_netto\n\t\t$this->total_netto->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// total_gross\n\t\t$this->total_gross->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// auc_status\n\t\t$this->auc_status->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// rate\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// auc_date\n\t\t$this->auc_date->ViewValue = $this->auc_date->CurrentValue;\n\t\t$this->auc_date->ViewValue = ew_FormatDateTime($this->auc_date->ViewValue, 7);\n\t\t$this->auc_date->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_date->ViewCustomAttributes = \"\";\n\n\t\t// auc_number\n\t\t$this->auc_number->ViewValue = $this->auc_number->CurrentValue;\n\t\t$this->auc_number->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_number->ViewCustomAttributes = \"\";\n\n\t\t// auc_place\n\t\t$this->auc_place->ViewValue = $this->auc_place->CurrentValue;\n\t\t$this->auc_place->ViewCustomAttributes = \"\";\n\n\t\t// start_bid\n\t\t$this->start_bid->ViewValue = $this->start_bid->CurrentValue;\n\t\t$this->start_bid->ViewValue = ew_FormatDateTime($this->start_bid->ViewValue, 11);\n\t\t$this->start_bid->CellCssStyle .= \"text-align: center;\";\n\t\t$this->start_bid->ViewCustomAttributes = \"\";\n\n\t\t// close_bid\n\t\t$this->close_bid->ViewValue = $this->close_bid->CurrentValue;\n\t\t$this->close_bid->ViewValue = ew_FormatDateTime($this->close_bid->ViewValue, 11);\n\t\t$this->close_bid->CellCssStyle .= \"text-align: center;\";\n\t\t$this->close_bid->ViewCustomAttributes = \"\";\n\n\t\t// auc_notes\n\t\t$this->auc_notes->ViewValue = $this->auc_notes->CurrentValue;\n\t\t$this->auc_notes->ViewCustomAttributes = \"\";\n\n\t\t// total_sack\n\t\t$this->total_sack->ViewValue = $this->total_sack->CurrentValue;\n\t\t$this->total_sack->ViewValue = ew_FormatNumber($this->total_sack->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_sack->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_sack->ViewCustomAttributes = \"\";\n\n\t\t// total_netto\n\t\t$this->total_netto->ViewValue = $this->total_netto->CurrentValue;\n\t\t$this->total_netto->ViewValue = ew_FormatNumber($this->total_netto->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_netto->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_netto->ViewCustomAttributes = \"\";\n\n\t\t// total_gross\n\t\t$this->total_gross->ViewValue = $this->total_gross->CurrentValue;\n\t\t$this->total_gross->ViewValue = ew_FormatNumber($this->total_gross->ViewValue, 0, -2, -2, -2);\n\t\t$this->total_gross->CellCssStyle .= \"text-align: right;\";\n\t\t$this->total_gross->ViewCustomAttributes = \"\";\n\n\t\t// auc_status\n\t\tif (strval($this->auc_status->CurrentValue) <> \"\") {\n\t\t\t$this->auc_status->ViewValue = $this->auc_status->OptionCaption($this->auc_status->CurrentValue);\n\t\t} else {\n\t\t\t$this->auc_status->ViewValue = NULL;\n\t\t}\n\t\t$this->auc_status->CellCssStyle .= \"text-align: center;\";\n\t\t$this->auc_status->ViewCustomAttributes = \"\";\n\n\t\t// rate\n\t\t$this->rate->ViewValue = $this->rate->CurrentValue;\n\t\t$this->rate->ViewCustomAttributes = \"\";\n\n\t\t\t// auc_number\n\t\t\t$this->auc_number->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_number->HrefValue = \"\";\n\t\t\t$this->auc_number->TooltipValue = \"\";\n\n\t\t\t// auc_place\n\t\t\t$this->auc_place->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_place->HrefValue = \"\";\n\t\t\t$this->auc_place->TooltipValue = \"\";\n\n\t\t\t// start_bid\n\t\t\t$this->start_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->start_bid->HrefValue = \"\";\n\t\t\t$this->start_bid->TooltipValue = \"\";\n\n\t\t\t// close_bid\n\t\t\t$this->close_bid->LinkCustomAttributes = \"\";\n\t\t\t$this->close_bid->HrefValue = \"\";\n\t\t\t$this->close_bid->TooltipValue = \"\";\n\n\t\t\t// auc_notes\n\t\t\t$this->auc_notes->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_notes->HrefValue = \"\";\n\t\t\t$this->auc_notes->TooltipValue = \"\";\n\n\t\t\t// total_sack\n\t\t\t$this->total_sack->LinkCustomAttributes = \"\";\n\t\t\t$this->total_sack->HrefValue = \"\";\n\t\t\t$this->total_sack->TooltipValue = \"\";\n\n\t\t\t// total_gross\n\t\t\t$this->total_gross->LinkCustomAttributes = \"\";\n\t\t\t$this->total_gross->HrefValue = \"\";\n\t\t\t$this->total_gross->TooltipValue = \"\";\n\n\t\t\t// auc_status\n\t\t\t$this->auc_status->LinkCustomAttributes = \"\";\n\t\t\t$this->auc_status->HrefValue = \"\";\n\t\t\t$this->auc_status->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}",
"protected function appendBody(&$contents, $body)\n {\n $this->appendSection($contents, 'Body', 1, 1);\n\n $contents .= $this->line(2);\n\n $line = strtok($body, \"\\r\\n\");\n\n while ($line !== false) {\n $contents .= $this->tab(3).$line;\n\n $line = strtok(\"\\r\\n\");\n\n if ($line !== false) {\n $contents .= $this->line();\n }\n }\n }",
"function tablerow_close() {\n $this->doc .= DOKU_LF.DOKU_TAB.'</tr>'.DOKU_LF;\n }"
] | [
"0.76264775",
"0.73576355",
"0.6549476",
"0.64756453",
"0.64550054",
"0.6420464",
"0.6287849",
"0.6169601",
"0.61275655",
"0.6030965",
"0.60230595",
"0.5993272",
"0.5962001",
"0.59042925",
"0.5894203",
"0.5887458",
"0.5886196",
"0.5778984",
"0.57778215",
"0.5777762",
"0.5774014",
"0.577128",
"0.57188267",
"0.57062817",
"0.5659952",
"0.563235",
"0.5624973",
"0.5624752",
"0.56021106",
"0.56021106",
"0.559006",
"0.55877995",
"0.5584751",
"0.55786633",
"0.55786633",
"0.55786633",
"0.5536008",
"0.55356616",
"0.55230594",
"0.5520431",
"0.5518067",
"0.5517102",
"0.5517102",
"0.5517102",
"0.5515281",
"0.55076605",
"0.5505443",
"0.5502352",
"0.5496732",
"0.5496732",
"0.54956144",
"0.5475029",
"0.5473175",
"0.547256",
"0.545725",
"0.5453594",
"0.5453594",
"0.54364115",
"0.5432312",
"0.5431012",
"0.5410614",
"0.54069567",
"0.53990173",
"0.53990173",
"0.53961056",
"0.5391878",
"0.5364316",
"0.5345397",
"0.5342268",
"0.53311753",
"0.5327475",
"0.53229487",
"0.530048",
"0.530048",
"0.52989495",
"0.52989495",
"0.5298466",
"0.5293396",
"0.5282796",
"0.5275395",
"0.5272603",
"0.52723044",
"0.5265375",
"0.52605444",
"0.52588654",
"0.5254547",
"0.5247716",
"0.524602",
"0.5242784",
"0.5242367",
"0.5241022",
"0.5224536",
"0.5216736",
"0.52165157",
"0.5214506",
"0.5212759",
"0.52054256",
"0.5199045",
"0.5191203",
"0.51734126"
] | 0.580318 | 17 |
Add header row element by specifying cells value, and return created row element | public function addHeader($values)
{
$this->_checkArgumentIsArray(__METHOD__, 1, $values);
$row = $this->createHeader($values);
$this->addHeaderElement($row);
return $row;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"protected function addHeaderRowToCSV() {}",
"public function addHeaderElement(HtmlTableRow $row)\n\t{\n\t\t$this->_createHeaderContainer();\n\t\t$this->_thead->addElement($row);\n\t\treturn $this;\n\t}",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }",
"public function addTableHeader($data, $params = array(), $cell_end = 'H') {\n // offset\n $offset = 0;\n if (isset($params['offset']))\n $offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\n // font name\n if (isset($params['font']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setName($params['font']);\n\n // font size\n if (isset($params['size']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setSize($params['size']);\n\n // bold\n if (isset($params['bold']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold($params['bold']);\n\n // italic\n if (isset($params['italic']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setItalic($params['italic']);\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // set internal params that need to be processed after data are inserted\n $this->_tableParams = array(\n 'header_row' => $this->_row,\n 'offset' => $offset,\n 'row_count' => 0,\n 'auto_width' => array(),\n 'filter' => array(),\n 'wrap' => array(),\n 'horizontal' => false,\n 'fill_color' => false,\n 'text_color' => false,\n );\n\n if( !empty($data) ) {\n foreach ($data as $d) {\n $child = Common::hashEmptyField($d, 'child');\n\n // set label\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $d['label']);\n\n // set width\n if (isset($d['width']) && is_numeric($d['width']))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n else\n $this->_tableParams['auto_width'][] = $offset;\n\n // filter\n if (isset($d['filter']) && $d['filter'])\n $this->_tableParams['filter'][] = $offset;\n\n // wrap\n if (isset($d['wrap']) && $d['wrap'])\n $this->_tableParams['wrap'][] = $offset;\n\n // fill color\n if (isset($d['fill_color']) && $d['fill_color'])\n $this->_tableParams['fill_color'][] = $offset;\n\n // text color\n if (isset($d['text_color']) && $d['text_color'])\n $this->_tableParams['text_color'][] = $offset;\n\n if( !empty($child) ) {\n $childRow = $this->_row+1;\n\n if( !isset($childOffset) ) {\n $childOffset = $offset;\n }\n\n foreach ($child as $key => $val) {\n $label = Common::hashEmptyField($val, 'label');\n $width = Common::hashEmptyField($val, 'width');\n\n $childOffsetAcii = 1+$childOffset;\n $childOffsetAcii = Common::getNameFromNumber($childOffsetAcii);\n $childPosition = sprintf('%s%s:%s%s', $childOffsetAcii, $childRow, $childOffsetAcii, $childRow);\n\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($childOffset, $childRow, $label);\n \n if (isset($width) && is_numeric($width))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($childOffset)->setWidth((float)$width);\n else\n $this->_tableParams['auto_width'][] = $childOffset;\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($childRow)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n $childOffset++;\n }\n }\n\n if( !empty($d['rowspan']) ) {\n $rowspan = $d['rowspan']-1;\n $default = 1+$offset;\n $row = $this->_row;\n $cell_end = $row+$rowspan; // Acii A\n\n $default = Common::getNameFromNumber($default);\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $default, $cell_end));\n // $this->_row += $rowspan;\n // $offset++;\n }\n if( !empty($d['colspan']) ) {\n $colspan = $d['colspan']-1;\n $default = 1+$offset;\n $dimensi = $default+$colspan; // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan;\n // $this->_row ++;\n }\n\n $offset++;\n }\n }\n\n $child = Set::extract('/child', $data);\n\n if ( !empty($child) ) {\n $this->_row++;\n }\n \n $this->_row++;\n\n return $this;\n }",
"public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }",
"function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}",
"private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}",
"public function createRow($values = array(), $isHeader = false)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = new HtmlTableRow($this);\n\t\tif ($isHeader == true) {\n\t\t\t$row->setCellTagName('th');\n\t\t}\n\t\tforeach ($values as $columnKey => $value) {\n\t\t\t$row->addCell($columnKey, $value);\n\t\t}\n\t\treturn $row;\n\t}",
"function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"public function renderHeaderCell()\n\t{\n\t\t$_headerOptions = ['class' => 'serial-column'];\n\t\tif ($this->grid->filterModel !== null && $this->grid->filterPosition !== \\yii\\grid\\GridView::FILTER_POS_HEADER)\n\t\t\t$_headerOptions['rowspan'] = '2';\n\n\t\t$this->headerOptions = ArrayHelper::merge($_headerOptions, $this->headerOptions);\n\t\treturn Html::tag('th', $this->renderHeaderCellContent(), $this->headerOptions);\n\t}",
"public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"private function newRow( $cell ) {\n\n $sheetDataRef = $this->sheet->contents->sheetData;\n $rowCol = $this->cellToRowAndColumn( $cell );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a row between\n // already existing rows. We must redraw the entire rows section of the xml object but insert our new row in the correct place as we redraw.\n if ( count( $sheetDataRef->row ) > 0 ) {\n\n $rowsCopy = clone $this->sheet->contents->sheetData;\n unset( $this->sheet->contents->sheetData->row );\n\n foreach ( $rowsCopy->row as $row ) {\n\n if ( (int) $row->attributes()->r > $rowCol[0] && empty( $inserted ) ) {\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n $inserted = true;\n }\n\n $copiedRow = $sheetDataRef->addChild( 'row' );\n $copiedRow->addAttribute( 'r', $row->attributes()->r );\n $copiedRow->addAttribute( 'spans', $row->attributes()->spans );\n\n foreach( $row->c as $col ) {\n\n $this->newCol( $copiedRow, $col->attributes()->r, $col->v );\n }\n }\n\n if ( ! empty( $inserted ) )\n return $insertedRow;\n }\n\n $insertedRow = $sheetDataRef->addChild( 'row' );\n $insertedRow->addAttribute( 'r', $rowCol[0] );\n $insertedRow->addAttribute( 'spans', '1:2' );\n\n return $insertedRow;\n }",
"public function writeHeaderRow() {\n $headers = $this->getCSVHeaderRow();\n\n // write to the CSV\n fputcsv($this->newCSV, $headers);\n }",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"public function addRow(TableRow $row);",
"abstract protected function getRowsHeader(): array;",
"private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}",
"function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \" \";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}",
"public function addHeaderArray(array $header) {\n $this->headers = $header;\n foreach ($header as $key => $cell) {\n if (!($cell instanceof HTMLTableHeaderCell)) {\n $cell = new HTMLTableHeaderCell($cell);\n }\n $this->headers[$key] = $cell;\n $this->addView($cell);\n }\n return $this;\n }",
"public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td')\n {\n $colType = ($colType === 'th') ? 'th' : 'td';\n $noWrap = $this->no_noWrap ? '' : ' nowrap';\n // Start up:\n $l10nParent = isset($data['_l10nparent_']) ? (int)$data['_l10nparent_'] : 0;\n $out = '\n\t\t<!-- Element, begin: -->\n\t\t<tr ' . $rowParams . ' data-uid=\"' . (int)$data['uid'] . '\" data-l10nparent=\"' . $l10nParent . '\">';\n // Show icon and lines\n if ($this->showIcon) {\n $out .= '\n\t\t\t<' . $colType . ' class=\"col-icon nowrap\">';\n if (!$h) {\n $out .= ' ';\n } else {\n for ($a = 0; $a < $h; $a++) {\n if (!$a) {\n if ($icon) {\n $out .= $icon;\n }\n }\n }\n }\n $out .= '</' . $colType . '>\n\t\t\t';\n }\n // Init rendering.\n $colsp = '';\n $lastKey = '';\n $c = 0;\n $ccount = 0;\n // __label is used as the label key to circumvent problems with uid used as label (see #67756)\n // as it was introduced later on, check if it really exists before using it\n $fields = $this->fieldArray;\n if ($colType === 'td' && array_key_exists('__label', $data)) {\n $fields[0] = '__label';\n }\n // Traverse field array which contains the data to present:\n foreach ($fields as $vKey) {\n if (isset($data[$vKey])) {\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass && $ccount % 2 == 0) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n $lastKey = $vKey;\n $c = 1;\n $ccount++;\n } else {\n if (!$lastKey) {\n $lastKey = $vKey;\n }\n $c++;\n }\n if ($c > 1) {\n $colsp = ' colspan=\"' . $c . '\"';\n } else {\n $colsp = '';\n }\n }\n if ($lastKey) {\n $cssClass = $this->addElement_tdCssClass[$lastKey];\n if ($this->oddColumnsCssClass) {\n $cssClass = implode(' ', [$this->addElement_tdCssClass[$lastKey], $this->oddColumnsCssClass]);\n }\n $out .= '\n\t\t\t\t<' . $colType . ' class=\"' . $cssClass . $noWrap . '\"' . $colsp . $this->addElement_tdParams[$lastKey] . '>' . $data[$lastKey] . '</' . $colType . '>';\n }\n // End row\n $out .= '\n\t\t</tr>';\n // Return row.\n return $out;\n }",
"public function addRow($values){\n\t\t$row = &$this->xml_data;\n\t\t$row .= '\n <Row ss:AutoFitHeight=\"0\">';\n\n\t\tforeach($values as $val){\n\t\t\t\n\t\t\t// check if given variable contains array\n\t\t\tif(is_array($val)){\n\t\t\t\t$value = $val[0];\n\t\t\t\t$datatype = $val[1];\n\t\t\t} else {\n\t\t\t\t$value = $val;\n\t\t\t\t$datatype = is_numeric($val) ? 'Number' : 'String';\n\t\t\t}\n\t\t\t$row .= '\n <Cell><Data ss:Type=\"'.$datatype.'\">'.$value.'</Data></Cell>';\t\t\t\n\t\t}\n\n\t\t$row .= '\n </Row>';\n\t}",
"public function addTableRow($data, $params = array()) {\n if( !empty($this->_tableParams['offset']) ) {\n $offset = $this->_tableParams['offset'];\n } else {\n $offset = 0;\n }\n\n foreach ($data as $d) {\n\n if( is_array($d) ) {\n $text = isset($d['text'])?$d['text']:null;\n $options = !empty($d['options'])?$d['options']:null;\n } else {\n $text = $d;\n $options = null;\n }\n\n\n if( !empty($options) ) {\n $type = !empty($options['type'])?$options['type']:PHPExcel_Cell_DataType::TYPE_STRING;\n $align = !empty($options['align'])?$options['align']:PHPExcel_Style_Alignment::HORIZONTAL_LEFT;\n $colspan = !empty($options['colspan'])?$options['colspan']:null;\n\n switch ($type) {\n case 'string':\n $type = PHPExcel_Cell_DataType::TYPE_STRING;\n break;\n case 'number':\n $type = PHPExcel_Cell_DataType::TYPE_NUMERIC;\n break;\n }\n\n switch ($align) {\n case 'center':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;\n break;\n case 'right':\n $align = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT;\n break;\n }\n\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($align);\n $this->_xls->getActiveSheet()->getCellByColumnAndRow($offset, $this->_row)->setValueExplicit($text, $type);\n\n if( !empty($options['bold']) ) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold(true);\n }\n if( !empty($colspan) ) {\n $default = 1+$offset;\n $dimensi = $default+($colspan-1); // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n // if( $text == 'OPENING BALANCE' ) {\n // debug(__('%s%s:%s%s', $default, $row, $cell_end, $row));die();\n // }\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan-1;\n }\n } else {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $text);\n }\n \n // if (isset($params['horizontal'])) {\n // $this->_xls->getActiveSheet()->getCellByColumnAndRow($this->_row, $offset)->getStyle()->getAlignment()->setHorizontal($params['horizontal']);\n // }\n\n $offset++;\n }\n\n if( !empty($this->_tableParams['row_count']) ) {\n $row_count = $this->_tableParams['row_count'];\n } else {\n $row_count = 0;\n }\n\n $this->_row++;\n $this->_tableParams['row_count'] = $row_count+1;\n\n return $this;\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"protected function create_header_cell($content, $collCount)\n {\n return $this->create_cell(array('content'=>$content,'colCount'=>$collCount));\n }",
"function create_devs_header()\n{\n$header =\n \"<thead>\n \t<tr>\n \t<th scope='col' class='rounded-company'>GPU #</th>\n <th scope='col' class='rounded-q1'>En</th>\n <th scope='col' class='rounded-q1'>Status</th>\n <th scope='col' class='rounded-q1'>Temp</th>\n <th scope='col' class='rounded-q1'>Fan Speed</th>\n <th scope='col' class='rounded-q1'>GPU Clk</th>\n <th scope='col' class='rounded-q1'>Mem Clk</th>\n <th scope='col' class='rounded-q1'>Volt</th>\n <th scope='col' class='rounded-q1'>Active</th>\n <th scope='col' class='rounded-q1'>MH/s 5s</th>\n <th scope='col' class='rounded-q1'>MH/s avg</th>\n <th scope='col' class='rounded-q1'>Acc</th>\n <th scope='col' class='rounded-q1'>Rej</th>\n <th scope='col' class='rounded-q1'>H/W Err</th>\n <th scope='col' class='rounded-q1'>Util</th>\n <th scope='col' class='rounded-q1'>Intens</th>\n </tr>\n </thead>\";\n \n return $header;\n}",
"function addFieldRow($colName,$colLabel,$colValue) {\n global $theme, $app_list_strings;\n \n static $operator_options;\n if (empty($operator_options)) {\n $operator_options= get_select_options_with_id($app_list_strings['merge_operators_dom'],'');\n }\n\n $LBL_REMOVE = translate('LBL_REMOVE');\n $deleteInlineImage = SugarThemeRegistry::current()->getImageURL('delete_inline.gif');\n $snippet=<<<EOQ\n <span id=filter_{$colName} style='visibility:visible' value=\"{$colLabel}\" valueId=\"{$colName}\">\n <table width='100%' border='0' cellpadding='0'>\n <tr>\n <td width='2%'><a class=\"listViewTdToolsS1\" href=\"javascript:remove_filter('filter_{$colName}')\"><!--not_in_theme!--><img src='{$deleteInlineImage}' align='absmiddle' alt='{$LBL_REMOVE}' border='0' height='12' width='12'> </a></td>\n <td width='20%'>{$colLabel}: </td>\n <td width='10%'><select name='{$colName}SearchType'>{$operator_options}</select></td>\n <td width='68%'><input value=\"{$colValue}\" id=\"{$colName}SearchField\" name=\"{$colName}SearchField\" type=\"text\"></td> \n </tr> \n </table>\n </span>\nEOQ;\n\n return $snippet;\n}",
"public function createHeader($values = array())\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\treturn $this->createRow($values, true);\n\t}",
"private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }",
"public function setHeaderRow(array $row)\n {\n if (null === $this->nbColumns) {\n $this->nbColumns = count($row);\n } elseif (count($row) !== $this->nbColumns) {\n throw new LogicException(sprintf(\n 'Expected the header row to contain %s cells, but got %s.',\n $this->nbColumns,\n count($row)\n ));\n }\n\n $this->headerRow = array_values($row);\n\n return $this;\n }",
"private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}",
"protected function setWSHeader($ws,$poolLabel,$hdrLabels,$row=1)\n {\n $col = 0;\n \n $ws->setCellValueByColumnAndRow($col,$row,$poolLabel);\n $row += 1;\n \n foreach($hdrLabels as $label) {\n $ws->setCellValueByColumnAndRow($col++,$row,$label);\n }\n $row += 1;\n \n return $row;\n }",
"public function headerRowRange(): HeaderRowRangeRequestBuilder {\n return new HeaderRowRangeRequestBuilder($this->pathParameters, $this->requestAdapter);\n }",
"function addRow($csvArr, $tagsArr, $count) {\n $ret = '<row>';\n for ($index = 0; $index < $count; $index++) {\n $ret .= '<' . $tagsArr[$index] . ' val=\"' . trim($csvArr[$index]) . '\"/>';\n }\n $ret .= '</row>';\n return $ret;\n}",
"function krnEmit_reportTitleRow($appEmitter, $title, $colSpan) {\n $s1 = '<div class=\"draff-report-top-left\"></div>';\n $s2 = '<div class=\"draff-report-top-middle\">'.$title.'</div>';\n $s3 = '<div class=\"draff-report-top-right\">'.draff_dateTimeAsString(rc_getNow(),'M j, Y' ).'</div>';\n $appEmitter->row_start();\n $appEmitter->cell_block($s1 . $s2 . $s3 ,'draff-report-top', 'colspan=\"'.$colSpan.'\"');\n $appEmitter->row_end();\n}",
"public function headingRow(): int\n {\n return 1;\n }",
"public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}",
"protected function build_header_cell($cell, $contrast=false, $center=true, $colspan=null, $rowspan=null, $nowrap=true) {\n $classes = array('header', 'bottom');\n if ($center) {\n $classes[] = 'center';\n $classes[] = 'narrow';\n } else {\n $classes[] = 'left';\n }\n if ($contrast) {\n $classes[] = 'contrast';\n }\n if ($nowrap) {\n $classes[] = 'nowrap';\n }\n return $this->build_cell($cell, $classes, $colspan, $rowspan, true);\n }",
"public function addTableHeader( $data, $params = array(), $rgbColor = 'FFFFFF', $rgbBackgroundColor = '00B0F0', $set_gnm_legend = true ) {\n\n if(empty($params)){\n $params = $this->estiloCabecera;\n }\n\t\t// offset\n\t\tif (array_key_exists('offset', $params))\n\t\t\t$offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\t\t// font name\n\t\tif (array_key_exists('font', $params))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setName($params['font_name']);\n\t\t// font size\n\t\tif (array_key_exists('size', $params))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setSize($params['font_size']);\n\t\t// bold\n\t\tif (array_key_exists('bold', $params))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setBold($params['bold']);\n\t\t// italic\n\t\tif( array_key_exists('italic', $params ))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setItalic($params['italic']);\n\n $styleArray = array(\n 'font' => array(\n 'color' => array('rgb' => $rgbColor),\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array('rgb' => $rgbBackgroundColor),\n ),\n );\n\n /*$styleArray2 = array(\n 'font' => array(\n 'color' => array('rgb' => 'FFFFFF'),\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n //'color' => array('rgb'=>'115372'),\n 'color' => array('rgb'=>'319FEE'),\n ),\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array('argb' => 'FF000000'),\n )\n ),\n );*/\n\n $this->xls->getActiveSheet()->getStyle($this->row)->applyFromArray( $styleArray );\n\n\n\n //$this->xls->getActiveSheet()->getStyle($this->row)->applyFromArray( $styleArray2 );\n\n\n\n\t\t// set internal params that need to be processed after data are inserted\n\t\t$this->tableParams = array(\n\t\t\t'header_row' => $this->row,\n\t\t\t'offset' => $offset,\n\t\t\t'row_count' => 0,\n\t\t\t'auto_width' => array(),\n\t\t\t'filter' => array(),\n\t\t\t'wrap' => array()\n\t\t);\n\n\t\tforeach( $data as $d ){\n\t\t\t// set label\n if( !empty( $d['file'] ) ){\n if( !$this->addImage( $d['file'], PHPExcel_Cell::stringFromColumnIndex( $offset ), $this->row ) ){\n $this->xls->getActiveSheet()->setCellValueExplicitByColumnAndRow($offset, $this->row, $d['label']);\n }\n } else{\n $this->xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->row, $d['label']);\n }\n\t\t\t// set width\n //$this->tableParams['auto_width'][] = $offset;// siempre auto\n\t\t\tif (array_key_exists('width', $d)) {\n\t\t\t\tif ($d['width'] == 'auto')\n\t\t\t\t\t$this->tableParams['auto_width'][] = $offset;\n\t\t\t\telse\n\t\t\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n\t\t\t}\n\t\t\t// filter\n\t\t\tif (array_key_exists('filter', $d) && $d['filter'])\n\t\t\t\t$this->tableParams['filter'][] = $offset;\n\t\t\t// wrap\n\t\t\tif (array_key_exists('wrap', $d) && $d['wrap'])\n\t\t\t\t$this->tableParams['wrap'][] = $offset;\n\n\t\t\t$offset++;\n\t\t}\n\t\t$this->row++;\n\n if( $set_gnm_legend ) {\n $this->xls->getActiveSheet()->setCellValue('A1', \"provided by\\nGNM INTERNATIONAL\");\n $this->xls->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true);\n\n $this->xls->getActiveSheet()->getStyle('A1')->applyFromArray(array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT,\n ),\n 'font' => array(\n 'bold' => true,\n 'color' => array('rgb' => '0000FF'),\n 'size' => 7,\n 'name' => 'Calibri'\n )\n ));\n }\n\n\t}",
"function styleHeaderExcel()\n{\n $styleHeader = array(\n 'font' => array(\n 'size' => 16,\n 'name' => 'Calibri',\n ), 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n ), 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR,\n 'rotation' => 90,\n 'startcolor' => array(\n 'argb' => 'B5B5B5',\n ), 'endcolor' => array(\n 'argb' => 'E0E0E0',\n ),\n ),\n );\n return $styleHeader;\n}",
"protected function objectRow( $key, $val ) {\n\t\t$th = Xml::elementClean( 'th', array(), $key );\n\t\tif ( is_array( $val ) ) {\n\t\t\t$td = Xml::tags( 'td', array(), self::objectTable( $val ) );\n\t\t} else {\n\t\t\tif ( is_string( $val ) ) {\n\t\t\t\t$val = '\"' . $val . '\"';\n\t\t\t} else {\n\t\t\t\t$val = FormatJson::encode( $val );\n\t\t\t}\n\n\t\t\t$td = Xml::elementClean( 'td', array( 'class' => 'value' ), $val );\n\t\t}\n\n\t\treturn Xml::tags( 'tr', array(), $th . $td );\n\t}",
"public function getCSVHeaderRow() {\n return [\n 'link_title',\n 'link_layout',\n 'link_location',\n 'content_type',\n 'link_count',\n 'link_clicked',\n 'clicked',\n 'os',\n 'device',\n 'device_brand',\n 'device_model',\n 'browser_type',\n 'browser_name',\n 'browser_version',\n 'site',\n 'page_url',\n 'referrer',\n 'paragraphs',\n 'displayed_url_1',\n 'displayed_url_2',\n 'displayed_url_3',\n 'displayed_url_4',\n 'displayed_url_5',\n 'time_logged',\n 'time_updated',\n 'user_id',\n 'browser',\n 'row'\n ];\n }",
"function build_row($row)\n{\n\t$name = $row->getColumnVal('Name');\n\t$id = $row->getColumnVal('Id');\n\n\t// Setup the columns you want to work with\n\t$idCol = $row->getCol('Id');\n\t$nameCol = $row->getCol('Name');\n\t$actionCol = $row->getCol('Action');\n\t$typeCol = $row->getCol('Type');\n\n\t// Set some HTML properties on the give column\n\t$idCol->setProp('width','50');\n\t$typeCol->setProp('width','50');\n\t$typeCol->addClass('center');\n\n\t// Add some CSS classes to the action column\n\t$actionCol\n\t\t-> addClass('center')\n\t\t-> addClass('btn');\n\n\t// Add an action link to the Action column\n\t$row->addLink('Action', \"examples.php?id=$id\", '[edit]', \"\", \"no-un\");\n\t$row->addLink('Action', \"examples.php?id=$id\", '[delete]', \"\", \"no-un\");\n\n\t// Set an ID on the row\n\t$row->setProp('id', \"tr_$id\");\n\n\t// set the background of the strawberry column to black\n\tif($name == \"Strawberry\")\n\t{\n\t\t// get an instance of the column and set a css class\n\t\t$nameCol->addClass('strawberry');\n\t}\n\n\t// set the background of the entire shoe row to red\n\tif($name == \"Chocolate\")\t\n\t{\n\t\t$row->addClass('chocolate');\n\t}\n\n\t// change one of the cell values\n\tif($name == \"Banana\")\t\n\t{\n\t\t$row->setVal('Name', $name . \" (favorite) <img src='https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcROTNegrNoPzMFMcpQ4pl7tko9LMwgoXuZyjTmX8vpUuPS_RfZr' />\");\n\t}\n\n\treturn $row;\n}",
"public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }",
"private function newCol( $row, $cell, $value ) {\n\n if ( count( $row->c ) > 0 ) {\n\n $rowCopy = clone $row;\n unset( $row->c );\n\n // SimpleXML does not seem to allow adding XML objects directly into other XML objects, and so some trickery must be used to insert a column between\n // already existing columns. We must redraw the entire columns ('c') section of the xml object but insert our new column in the correct place as we redraw.\n foreach ( $rowCopy as $col ) {\n\n if ( $cell < $col->attributes()->r && empty( $inserted ) ) {\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n $inserted = true;\n }\n\n $copiedCol = $row->addChild( 'c' );\n $copiedCol->addAttribute( 'r', $col->attributes()->r );\n $copiedCol->addChild( 'v', $col->v );\n }\n\n if ( ! empty( $inserted ) )\n return $insertedCol;\n }\n\n $insertedCol = $row->addChild( 'c' );\n $insertedCol->addAttribute( 'r', $cell );\n $insertedCol->addChild( 'v', $value );\n\n return $insertedCol;\n }",
"private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"private function generate_columns_header($p_edit,&$p_resultat,&$p_result_header)\r\n\t\t{\r\n\t\t\t// Create a new line\r\n\t\t\t$html = '<tr id=\"tr_header_title_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Create the first column (checkbox and edit button)\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t$html .= '<td align=\"left\" id=\"header_th_0__'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"th0_'.$this->c_id.'\"></div></td>';\r\n\t\t\t$html .= '<td></td>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Quantify of order clause\r\n\t\t\t$qtt_order = $this->get_nbr_order();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Display the resize cursor or not\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t{\r\n\t\t\t\t$cursor = ' cur_resize';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$cursor = '';\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] != false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// An order clause is defined\r\n\t\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] == __ASC__)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// ASC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-ascend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// DESC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-descend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Display the number of order only if there is more than one order clause\r\n\t\t\t\t\t\t($qtt_order > 1) ? $order_prio = $this->c_columns[$key_col]['order_priority'] : $order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// No order clause defined\r\n\t\t\t\t\t\t$class_order = '';\r\n\t\t\t\t\t\t$order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Order column\r\n\t\t\t\t\t$html .= '<td class=\"__'.$this->c_theme.'_bloc_empty'.$class_order.'\"><span class=\"__vimofy_txt_mini_ vimofy_txt_top\">'.$order_prio.'</span></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t$lib_redim = $this->hover_out_lib(17,17);\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"vimofy_move_column_start(event,'.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = '';\r\n\t\t\t\t\t\t$ondblclick = '';\r\n\t\t\t\t\t\t$lib_redim = '';\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"click_column_order(\\''.$this->c_id.'\\','.$key_col.');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*===================================================================*/\r\n\r\n\t\t\t\t\t// Column title\r\n\t\t\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_h nowrap\" id=\"header_th_'.$key_col.'__'.$this->c_id.'\"><div '.$event.' class=\"align_'.$this->c_columns[$key_col]['alignment'].' __'.$this->c_theme.'_column_title\" id=\"th'.$key_col.'_'.$this->c_id.'\"><span id=\"span_'.$key_col.'_'.$this->c_id.'\">'.$this->c_columns[$key_col]['name'].'</span></div></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Display other column\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($p_edit != false) $html .= '<td style=\"padding:0;margin:0;\"></td>';\r\n\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t$html .= '<td id=\"right_mark_'.$key_col.'_'.$this->c_id.'\" '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Input for search on the column\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t// Create a new line\r\n\t\t\t$html .= '<tr id=\"tr_header_input_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t// Create the first column (checkbox and edit button)\r\n\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"thf0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__vimofy_version\" onclick=\"window.open(\\'vimofy_bugs\\');\">v'.$this->c_software_version.'</div></td>';\r\n\t\t\t\r\n\t\t\t// Id column display counter\r\n\t\t\t$id_col_display = 0;\r\n\t\t\t\r\n\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($id_col_display == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.$key_col.'_'.$this->c_id.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.($key_col).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(isset($this->c_columns[$key_col]))\r\n\t\t\t\t\t{*/\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Define the filter value\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t$state_filter_input = '';\r\n\t\t\t\t\t\tif(isset($val_col['filter']['input']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// A filter was defined by the user\r\n\t\t\t\t\t\t\t$filter_input_value = $val_col['filter']['input']['filter'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// No filter was defined by the user\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check if vimofy was in edit mode\r\n\t\t\t\t\t\t\tif($p_edit != false && !isset($val_col['rw_flag']) || ($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] != __FORBIDEN__))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// The vimofy was in edit mode, search all same value in the column\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\t\t\t\t\t\tif($this->c_obj_bdd->rds_num_rows($p_result_header) > 0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_result_header,0);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// TODO Use a DISTINCT QUERY - Vimofy 1.0\r\n\t\t\t\t\t\t\t\t$key_cold_line = 0;\r\n\t\t\t\t\t\t\t\t$last_value = '';\r\n\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_result_header))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif($key_cold_line > 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($last_value == $row[$val_col['sql_as']])\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\t\t\t// The value is not the same of the previous, stop browsing data \r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$last_value = $row[$val_col['sql_as']];\r\n\t\t\t\t\t\t\t\t\t$key_cold_line = $key_cold_line + 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif($flag_same)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = $last_value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] == __FORBIDEN__)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$state_filter_input = 'disabled';\t\t\t\t\t\t\t\t\t// Disable the input because the edition of column is forbiden\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isset($val_col['filter']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_on __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isset($val_col['lov']) && isset($val_col['is_lovable']) && $val_col['is_lovable'] == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_lovable __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(isset($val_col['lov']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_no_icon __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Menu button oncontextmenu\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\tif($this->c_type_internal_vimofy == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Principal vimofy, diplay internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'vimofy_display_internal_vim(\\''.$this->c_id.'\\',__POSSIBLE_VALUES__,'.$key_col.');return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Internal vimofy, doesn't display other internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td id=\"th_1_c'.$key_col.'_'.$this->c_id.'\" class=\"__vimofy_unselectable\" style=\"width:20px;\"><div style=\"width:20px;margin:0;\" '.$this->hover_out_lib(21,21).' oncontextmenu=\"'.$oncontextmenu.'\" class=\"'.$class_btn_menu.'\" onclick=\"vimofy_toggle_header_menu(\\''.$this->c_id.'\\','.$key_col.');\" id=\"th_menu_'.$key_col.'__'.$this->c_id.'\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_2_c'.$key_col.'_'.$this->c_id.'\" align=\"left\" class=\"__'.$this->c_theme.'__cell_h\">';\r\n\t\t\t\t\t\t$html .= '<div style=\"margin:0 3px;\"><input value=\"'.str_replace('\"','"',$filter_input_value).'\" class=\"__'.$this->c_theme.'__input_h full_width\" '.$state_filter_input.' id=\"th_input_'.$key_col.'__'.$this->c_id.'\" type=\"text\" style=\"margin: 2px 0;\" size=1 onkeyup=\"if(document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\'))document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\').checked=true;vimofy_input_keydown(event,this,\\''.$this->c_id.'\\','.$key_col.');\" onchange=\"vimofy_col_input_change(\\''.$this->c_id.'\\','.$key_col.');\"/></div>';\r\n\t\t\t\t\t\tif($p_edit != false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($state_filter_input == '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:10px;padding:0;margin:0;\"><input '.$this->hover_out_lib(76,76).' type=\"checkbox\" id=\"chk_edit_c'.$key_col.'_'.$this->c_id.'\" style=\"height:11px;width:11px;margin: 0 5px 0 2px;display:block;\"/></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:0;padding:0;margin:0;\"></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_3_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_4_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$id_col_display = $id_col_display + 1;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$html .= '<td id=\"th_0_c'.($key_col+1).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t$html.= '<td><div style=\"width:200px\"></div></td>';\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\r\n\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\tif($this->c_obj_bdd->rds_num_rows($p_resultat) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_resultat,0);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}",
"function AddRow()\n\t{\n\t\tif (!func_num_args())\n\t\t{\n\t\t\t// no parameters were passed\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// increment the row pointer\n\t\tif (!isset($this->_intCurrentRow))\n\t\t{\n\t\t\t$this->_intCurrentRow = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_intCurrentRow++;\n\t\t}\n\t\t\n\t\t// build the array of column values\t\t\n\t\t$arrColumns = func_get_args();\n\t\t$this->_arrRows[] = Array('Columns'=>$arrColumns);\n\t\t\n\t\treturn $this->_intCurrentRow;\n\t}",
"function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}",
"private function AddRow($row) {\n $this->_table .= $this->Tpl2HTML($this->_rowtpl, array('RowContent' => $row));\n $this->_rown++;\n }",
"private function makeTableHeader($type,$header,$colspan=2): void {\r\n\t\tif(!$this->bInitialized) {\r\n\t\t\t$header = ' (' . $header . ') ';\r\n\t\t\t$this->bInitialized = true;\r\n\t\t}\r\n\t\t$str_i = ($this->bCollapsed) ? 'style=\"font-style:italic\" ' : '';\r\n\t\t\r\n\t\techo '<table class=\"dBug_table dBug_'.$type.'\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th '.$str_i.' class=\"dBug_clickable_table dBug_' . $type . 'Header\" colspan=\"' . $colspan . '\">' . $header . '</th>\r\n\t\t\t\t</tr>';\r\n\t}",
"public function addRow(array $row){\n\t\t$prependedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->prependedCols)){\n\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);;\n\t\t\t}\n\t\t\t$prependedCols[\"prependedCol\".$col[\"header\"]]=$html;\n\t\t\t$row=array_merge($prependedCols,$row);\n\t\t}\n\t\t\n\t\t$appendedCols=array();\n\t\t$html=\"\";\n\t\tif(!empty($this->appendedCols)){\n\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t$html.=$this->renderAdditionalCol($col,$row);\n\t\t\t}\n\t\t\t$appendedCols[\"appendedCol\".$col[\"header\"].$counter]=$html;\n\t\t\t$row=array_merge($row,$appendedCols);\n\t\t}\n\t\t\n\t\t$this->rows+=1; \t\t\n\t\t$this->data[]=$row;\n\t}",
"static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"private function newRow(){\n\t\t$r = new HtmlBox('tr');\n\t\tfor($i=0;$i<$this->col;$i++)\n\t\t\t$r->add(new HtmlBox('td')) ;\n\t\t$this->row++;\n\t\t$this->add($r);\n\t\treturn $this;\n\t}",
"public function header($Arr_Labels=false)\n\t{\n\t\t$this->Arr_Labels = $Arr_Labels;\n\n $Int_Column = 0;\n if ($Arr_Labels)\n {\n\t foreach ($Arr_Labels as $Str_Field => $Str_Label)\n\t\t\t{\n $Str_Column = $Str_Label;\n $this->Obj_Doc->getActiveSheet()->setCellValueByColumnAndRow($Int_Column, 1, $Str_Column);\n\t\t\t\t$Int_Column++;\n\t }\n\t\t}\n\t\telseif (isset($this->Arr_Data[0]))\n\t\t{\n\t foreach ($this->Arr_Data[0] as $Str_Field => $Str_Label)\n\t\t\t{\n\t\t\t\t$Int_Column++;\n $Str_Column = Inflector::humanize($Str_Field);\n $this->Obj_Doc->getActiveSheet()->setCellValueByColumnAndRow($Int_Column, 1, $Str_Column);\n\t }\n\t\t}\n\n\t\t//Set the worksheet styles.\n $this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n //$this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n //$this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setRGB('ffffff');\n $this->Obj_Doc->getActiveSheet()->duplicateStyle( $this->Obj_Doc->getActiveSheet()->getStyle('A1'), 'B1:'.$this->Obj_Doc->getActiveSheet()->getHighestColumn().'1');\n\n\t\tfor ($i = 1; $i <= $Int_Column; $i++)\n\t\t{\n $this->Obj_Doc->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(true);\n }\n\n\t\treturn $this;\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function addHeaderLine($name, $value) {\n\t\t$this->headerLines [$name] = $value;\n\t}",
"function uwwtd_tablesort_header($cell, $header, $ts) {\n if (is_array($cell) && isset($cell['field'])) {\n //Manage the sort field\n if (isset($cell['sorter'])) {\n $order = $cell['sorter'];\n } elseif (isset($cell['field'])) {\n $order = $cell['data'];\n } else {\n $order = $cell['data'];\n }\n\n $title = t('sort by @s', array('@s' => $cell['data']));\n if ((!empty($ts['name']) && $order == $ts['name']) || (!empty($_REQUEST['order']) && $order == $_REQUEST['order'])) {\n $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc');\n $cell['class'][] = 'active';\n $image = theme('tablesort_indicator', array('style' => $ts['sort']));\n } else {\n // If the user clicks a different header, we want to sort ascending initially.\n $ts['sort'] = 'asc';\n $image = '';\n }\n\n $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $order, 'sort_mod' => isset($cell['sort_mod']) ? $cell['sort_mod'] : 'text')), 'html' => TRUE));\n\n unset($cell['field'], $cell['sort']);\n }\n return $cell;\n}",
"function tableheader_close() {\n $this->doc .= '</th>';\n }",
"function addMainHeader($title, $valuePath = null, array $options = array()){\n\t \t$defaults = array(\n\t\t\t'editable' => false,\n\t\t\t'type' \t => 'mainColumn',\n\t\t\t'element' => false,\n\t\t\t'linkable' => false,\n\t\t\t'total' => false,\n\t\t\t'tree' => false\n\t\t);\n\t\t\n\t\t$options = array_merge($defaults, $options);\n\t\t\n\t\t$this->mainTitleSlug = Inflector::slug($title);\n\t\tif($this->mainTitleSlug == null){\n\t\t\t$this->mainTitleSlug = $title;\n\t\t}\n\n\t\t$this->__columns[$this->mainTitleSlug] = array(\n\t\t\t'title' => $title,\n\t\t\t'valuePath' => $valuePath,\n\t\t\t'options' => $options\n\t\t);\n\t\t\n\t\tif($options['total'] == true){\n\t\t\t$this->__totals[$title] = 0;\n\t\t}\n\t\t\n\t\treturn $this->mainTitleSlug;\n\t }",
"function tableheader_open($colspan = 1, $align = null, $rowspan = 1, $classes = null) {\n $class = 'class=\"col'.$this->_counter['cell_counter']++;\n if(!is_null($align)) {\n $class .= ' '.$align.'align';\n }\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $class .= '\"';\n $this->doc .= '<th '.$class;\n if($colspan > 1) {\n $this->_counter['cell_counter'] += $colspan - 1;\n $this->doc .= ' colspan=\"'.$colspan.'\"';\n }\n if($rowspan > 1) {\n $this->doc .= ' rowspan=\"'.$rowspan.'\"';\n }\n $this->doc .= '>';\n }",
"public static function addRow(DetailTable $table, int|string|null $header, ?string $htmlSnippet): void\n {\n $table->addRow($header, ['class' => $table->renderWalker->getClasses(['cell', 'cell-html'])], $htmlSnippet, true);\n }",
"private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo ' <img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\"> \n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}",
"protected function addheader($filename)\n {\n $excelObject = PHPExcel_IOFactory::load($filename);\n //$excelObject = new PHPExcel();\n $excelObject->getProperties()\n ->setCreator(\"Gemstracker\")\n ->setLastModifiedBy(\"Gemstracker\")\n ->setTitle($this->model->getName());\n\n $activeSheet = $excelObject->getActiveSheet();\n\n $columnHeaders = $this->getColumnHeaders();\n $row = 1;\n\n $exportName = $this->getName();\n\n $i=0;\n $cell = 'A1';\n foreach($columnHeaders as $columnName=>$columnHeader) {\n $column = $this->getColumn($i);\n $cell = $column . $row;\n if (isset($this->data[$exportName]) && isset($this->data[$exportName]['format']) && in_array('formatVariable', $this->data[$exportName]['format'])) {\n $activeSheet->setCellValue($cell, $columnHeader);\n } else {\n $activeSheet->setCellValue($cell, $columnName);\n }\n if ($excelCellSize = $this->model->get($columnName, 'excelCellSize')) {\n $activeSheet->getColumnDimension($column)->setWidth($excelCellSize);\n } else {\n $activeSheet->getColumnDimension($column)->setAutoSize(true);\n }\n $i++;\n }\n\n $activeSheet->getStyle(\"A1:$cell\")->getFont()->setBold(true);\n\n $objWriter = PHPExcel_IOFactory::createWriter($excelObject, \"Excel2007\");\n $objWriter->save($filename);\n }",
"public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}",
"function row($lebel, $content, $contentExists = false) {\n\t\tif ($contentExists == true) {\n\t\t\tif (!empty($contentExists)) {\n\t\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"<tr><td width=\\\"200\\\"><div align=\\\"right\\\">\" . $label . \":</div></td><td>\" . $content . \"</td></tr>\";\n\t\t}\n\t}",
"private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }",
"public function setHeader(array $cells)\n {\n if (count($cells) == 0) {\n throw new EmptyHeadersException('The specified header is empty.');\n }\n\n if (is_numeric(key($cells))) {\n throw new InvalidHeadersException('Headers must be passed with both key and value as string. The key represents the Row Id, and the value is represents the Header Title.');\n }\n\n $this->header = $cells;\n }",
"public function addHeader(array $values) {\n if (!empty($values)) {\n $values = $this->prepareValues($values);\n $this->addRowToCsvData($values);\n }\n }",
"public function addRow($values)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = $this->createRow($values);\n\t\t$this->addRowElement($row);\n\t\treturn $row;\n\t}",
"function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}",
"function tck_table_head_cells($cells) {\n $newcells['custom'] = yourls__('Custom Keyword');\n $newcells['actions'] = $cells['actions'];\n \n unset($cells['actions']);\n return array_merge($cells, $newcells);\n }",
"function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}",
"function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }",
"private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th> </th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }",
"public function setRow($value)\n {\n return $this->set('Row', $value);\n }",
"public function setRow($value)\n {\n return $this->set('Row', $value);\n }",
"protected function renderHeaderCellContent()\n\t{\n\t\t$name = $this->name;\n\t\tif (substr_compare($name, '[]', -2, 2) === 0) {\n\t\t\t$name = substr($name, 0, -2);\n\t\t}\n\t\tif (substr_compare($name, ']', -1, 1) === 0) {\n\t\t\t$name = substr($name, 0, -1) . '_all]';\n\t\t} else {\n\t\t\t$name .= '_all';\n\t\t}\n\n\t\t$id = $this->grid->options['id'];\n\n$_allSelectJs = <<< JS\n\t$('.select-on-check-all').on('click', function(){\n\t\tvar rows = table.rows({ 'search': 'applied' }).nodes();\n\t\t$('input[type=\"checkbox\"]', rows).prop('checked', this.checked);\n\t});\n\n\t$('#$id tbody').on('change', 'input[type=\"checkbox\"]', function(){\n\t\tif(!this.checked){\n\t\t\tvar el = $('.select-on-check-all').get(0);\n\t\t\tif(el && el.checked && ('indeterminate' in el)){\n\t\t\t\tel.indeterminate = true;\n\t\t\t}\n\t\t}\n\t});\nJS;\n\n\t\t$this->grid->getView()->registerJs($_allSelectJs);\n\n\t\tif ($this->header !== null || !$this->multiple) {\n\t\t\treturn parent::renderHeaderCellContent();\n\t\t} else {\n\t\t\treturn Html::checkBox($name, false, ['class' => 'select-on-check-all']);\n\t\t}\n\t}",
"public function addHeaderCellAttributes(array $headerCellAttributes) {\n if (count($headerCellAttributes) === 0) {\n $this->headerCellAttributes = null;\n } else {\n $this->headerCellAttributes = $headerCellAttributes;\n }\n return $this;\n }",
"protected function buildRow($column_name, array $column, $default_value, $weight, $delta) {\n return [\n '#attributes' => ['class' => ['draggable']],\n 'name' => [\n '#type' => 'checkbox',\n '#default_value' => $default_value,\n ],\n 'title' => [\n '#markup' => $column['title'],\n ],\n 'key' => [\n '#markup' => (isset($column['key'])) ? $column['key'] : $column['name'],\n ],\n 'weight' => [\n '#type' => 'weight',\n '#title' => $this->t('Weight for @label', ['@label' => $column['title']]),\n '#title_display' => 'invisible',\n '#attributes' => [\n 'class' => ['table-sort-weight'],\n ],\n '#delta' => $delta,\n '#default_value' => $weight,\n ],\n ];\n }",
"public function addRows($type, array $datas) {\n\n $row = $this->$type->addChildren(new VTCore_Html_Element(array(\n 'type' => 'tr',\n )))\n ->lastChild();\n\n foreach ($datas as $key => $data) {\n $cell = $row->addChildren(new VTCore_Html_Element(array(\n 'type' => ($type == 'thead') ? 'th' : 'td',\n )))\n ->lastChild();\n\n if (!is_array($data)) {\n $cell->addChildren($data);\n }\n elseif (isset($data['attributes']) && isset($data['content'])) {\n $cell->addAttributes($data['attributes']);\n $cell->addChildren($data['content']);\n }\n }\n\n return $row;\n\n }",
"public function csvHeaderRow()\n {\n static $columns;\n\n if ($columns === null) {\n $columns = [ 'source' ];\n $languages = $this->languages();\n foreach ($languages as $lang) {\n $columns[] = $lang;\n }\n\n $columns[] = 'context';\n }\n\n return $columns;\n }",
"public function addRow($row, $file)\n { }",
"protected function buildDomainObject($row) {\n\t\t$header = new Header();\n\t\t$header->setId($row['header_id']);\n\t\t$header->setText($row['header_text']);\n\t\treturn $header;\n\t}",
"public function addCell($value, $type = null, $styleName = null)\n {\n if (!$type) {\n $type = $this->guessType($value);\n }\n $value = htmlentities($value, ENT_COMPAT, $this->encoding);\n $this->data .= \"<Cell\" . ($styleName ? \" ss:StyleID=\\\"\" . $styleName . \"\\\"\" : \"\") . \"><Data ss:Type=\\\"\" . $type . \"\\\">\" . $value . \"</Data></Cell>\";\n return $this;\n }",
"function renderTableRows($headers, $rows, $rowType= 2)\r\n{\r\n\tglobal $isArchive;\r\n\r\n\t$tr= '';\r\n\tif (!count($rows))// In case there is no registered row at all\r\n\t{\r\n\t\t$rows= array($headers);\r\n\t\tif ($rowType== 2) return '';\r\n\t}\r\n\tif ($rowType== 3) $rows= array($rows[0]);// Keep only one row to get the template for the last hidden empty row (used for js clone())\r\n\tforeach ($rows as $numRow => $row)\r\n\t{\r\n\t\t$td= '';\r\n\t\t$profit= 0;// Percentage\r\n\t\t$devtu= 0;// Theoretical\r\n\t\t$devtu_f= 0;// Final\r\n\t\t$completion= 0;\r\n\r\n\t\tforeach ($row as $cellNum => $cell)\r\n\t\t{\r\n $tdClass= isset($headers[$cellNum]->class)? $headers[$cellNum]->class : '';\r\n\r\n $cell= $rowType== 3? '' : $cell;\r\n $width= isset($headers[$cellNum]->width)? ' style=\"width:'.$headers[$cellNum]->width.'\"' : '';\r\n\r\n $td.= \"<td class=\\\"{$headers[$cellNum]->type} $tdClass\\\" $width><div>\";\r\n\r\n\t\t\tif ($tdClass== 'tasks') $td.= renderTaskCell($cell);\r\n\t\t\telse switch ($headers[$cellNum]->type)\r\n\t\t\t{\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\t$td.= '<input type=\"text\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'range':\r\n\t\t\t\t\t$val= $rowType== 3? '' : (int)$cell;\r\n\t\t\t\t\t$text= $rowType== 3? '-' : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"range\" value=\"'.$val.'\" min=\"'.$headers[$cellNum]->range->min.'\" max=\"'.$headers[$cellNum]->range->max.'\" step=\"'.$headers[$cellNum]->range->step.'\"/><span>'.$text.'</span>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\t$td.= '<input type=\"number\" min=\"'.$headers[$cellNum]->number->min.'\" value=\"'.$cell.'\" step=\"'.$headers[$cellNum]->number->step.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\t$cell= !$cell && $headers[$cellNum]->default== 'today'? date('Y-m-d') : $cell;\r\n\t\t\t\t\t$td.= '<input type=\"date\" value=\"'.$cell.'\"/>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'textarea':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$td.= \"<textarea>$cell</textarea>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'select':\r\n\t\t\t\t\t$options= $headers[$cellNum]->select->options;\r\n\t\t\t\t\t$select= '';\r\n\t\t\t\t\tforeach ($options as $val => $opt)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$select.= '<option value=\"'.$val.'\"'.($cell==$val? ' selected=\"selected\"' : '').'>'.$opt.'</option>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$td.= \"<select>$select</select>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$td.= '</div></td>';\r\n\r\n\t\t\tif ($tdClass== 'devtu') $devtu= floatval($cell);\r\n\t\t\tif ($tdClass== 'devtu_f') $devtu_f= floatval($cell);\r\n\t\t\telseif ($tdClass== 'completion') $completion= intval($cell);\r\n\r\n\t\t}\r\n\r\n\t\tif ($completion== 100 && $devtu && $devtu_f) $profit= round((1-$devtu_f/$devtu)*100);\r\n\r\n\t\t$tr.= \"<tr>\r\n\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\".($profit? ' profit i-tag' : '').\"\\\" data-profit=\\\"\".($profit> 0 ? '+'.$profit : $profit).\"%\\\">\r\n\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"/></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t$td\r\n\t\t\t\t</tr>\";\r\n\t}\r\n\tif ($rowType== 3) $tr.= \"<tr class=\\\"hidden\\\">\r\n\t\t\t\t\t\t\t\t<td style=\\\"width:10px\\\" class=\\\"noContent handle\\\">\r\n\t\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\\\"handle\\\"></span>\r\n\t\t\t\t\t\t\t\t\t\t<input type=\\\"checkbox\\\" class=\\\"toggle\\\"/>\r\n\t\t\t\t\t\t\t\t\t\t<label class=\\\"i-minus\\\" title=\\\"Mask\\\"></label>\r\n\t\t\t\t\t\t\t\t\t\t<button class=\\\"archive i-\".($isArchive? 'unarchive' : 'archive').\"\\\" title=\\\"\".($isArchive? 'Unarchive' : 'Archive').\"\\\"></button>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t$td\r\n\t\t\t\t\t\t\t</tr>\";\r\n\treturn $tr;\r\n}",
"public function mergeWithHeaderRow($row)\n {\n\n @$row = array_combine($this->getHeaderRow(), $row);\n\n if ($row === false) {\n $lineNumber = $this->key() + 1;\n throw new CsvIteratorException(\n \"line {$lineNumber} is not properly formatted and failed to insert\");\n }\n\n return $row;\n\n }",
"public function get_log_row_header_output( $row ) {\n\t\t$row_logger = $row->logger;\n\t\t$row->context = isset( $row->context ) && is_array( $row->context ) ? $row->context : array();\n\n\t\t// Fallback to SimpleLogger if no logger exists for row\n\t\tif ( ! isset( $this->instantiated_loggers[ $row_logger ] ) ) {\n\t\t\t$row_logger = 'SimpleLogger';\n\t\t}\n\n\t\t$logger = $this->instantiated_loggers[ $row_logger ]['instance'];\n\n\t\treturn $logger->get_log_row_header_output( $row );\n\t}",
"public function getRow();",
"public function withHeader($name, $value)\n {\n }",
"protected function processHeaderRow($row)\n {\n $found = array();\n $record = $this->record;\n foreach($row as $index => $colName)\n {\n $colName = trim($colName);\n foreach($record as $name => $params)\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n foreach($cols as $col)\n {\n if ($col == $colName)\n {\n if (isset($params['plus'])) $plus = $params['plus'];\n else $plus = 0;\n \n $this->map[$index + $plus] = $name;\n $found[$name] = true;\n }\n }\n }\n }\n\n // Make sure all required attributes found\n foreach($record as $name => $params)\n {\n if (isset($params['req']) && $params['req'])\n {\n if (!isset($found[$name]))\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n $cols = implode(' OR ',$cols);\n $this->errors[] = \"Missing $cols\";\n }\n }\n }\n }",
"public function addRow($rowName) {\n $this->addRowName($rowName);\n return new RowHandle($this, $rowName);\n }",
"function _webform_csv_headers_email($component) {\r\n $header = array();\r\n $header[0] = '';\r\n $header[1] = '';\r\n $header[2] = $component['name'];\r\n return $header;\r\n}",
"function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}",
"protected function setHeaders()\n {\n $row = 1; \n $this->objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n \n $mergeCells = 'A' . $row . ':' . 'E' . $row;\n $this->setCellValue('A' . $row, \"Differences between files.\");\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getFont()->setBold(true);\n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n $this->objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(25);\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Comparing by: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'C' . $row;\n $this->setCellValue('B' . $row, $this->getCompareTypeLabel()); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Configuration: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'M' . $row;\n $this->setCellValue('B' . $row, $this->settings['configuration']); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n $row += 5;\n $columns = $this->getColumns(); \n foreach ($columns as $columnName => $column) {\n $cell = $columnName . $row;\n $this->setCellValue($cell, $column['title']);\n $this->objPHPExcel->getActiveSheet()->getColumnDimension($columnName)->setAutoSize(true);\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n }\n \n return $row;\n }",
"public function withAddedHeader($name, $value)\n {\n }"
] | [
"0.6858519",
"0.66062266",
"0.648914",
"0.64698666",
"0.632523",
"0.6299195",
"0.6236023",
"0.61877406",
"0.61541545",
"0.6030426",
"0.59895873",
"0.5949746",
"0.59466124",
"0.58835906",
"0.5824204",
"0.5821001",
"0.58190095",
"0.5802883",
"0.578394",
"0.5753952",
"0.57231617",
"0.5717382",
"0.5670034",
"0.5660034",
"0.5647169",
"0.5642647",
"0.561445",
"0.5613253",
"0.5580143",
"0.55712956",
"0.55681723",
"0.5552847",
"0.5550171",
"0.5545534",
"0.5531688",
"0.5527899",
"0.5522256",
"0.5475038",
"0.54527885",
"0.54169846",
"0.5416868",
"0.5397478",
"0.5394674",
"0.5390551",
"0.5390437",
"0.5378957",
"0.53737104",
"0.5369867",
"0.5361511",
"0.5358817",
"0.5351272",
"0.5347162",
"0.5339229",
"0.53197914",
"0.5304636",
"0.5292575",
"0.5288354",
"0.52848244",
"0.5284395",
"0.5279641",
"0.52655023",
"0.5264529",
"0.5260819",
"0.5260746",
"0.52600443",
"0.5258993",
"0.525724",
"0.5252209",
"0.5251713",
"0.5238851",
"0.5229417",
"0.52243716",
"0.521374",
"0.52127194",
"0.5195247",
"0.51951647",
"0.51909244",
"0.51869667",
"0.51824826",
"0.5179323",
"0.5178231",
"0.5172468",
"0.5154823",
"0.5146091",
"0.51443905",
"0.5138019",
"0.5134897",
"0.5132499",
"0.51316863",
"0.5101055",
"0.5096691",
"0.5095043",
"0.5090249",
"0.5082161",
"0.5079867",
"0.50764614",
"0.5075075",
"0.5063821",
"0.5057478",
"0.50562364"
] | 0.6162816 | 8 |
Create and return header row element by specifying cells value | public function createHeader($values = array())
{
$this->_checkArgumentIsArray(__METHOD__, 1, $values);
return $this->createRow($values, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }",
"function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}",
"public function renderHeaderCell()\n\t{\n\t\t$_headerOptions = ['class' => 'serial-column'];\n\t\tif ($this->grid->filterModel !== null && $this->grid->filterPosition !== \\yii\\grid\\GridView::FILTER_POS_HEADER)\n\t\t\t$_headerOptions['rowspan'] = '2';\n\n\t\t$this->headerOptions = ArrayHelper::merge($_headerOptions, $this->headerOptions);\n\t\treturn Html::tag('th', $this->renderHeaderCellContent(), $this->headerOptions);\n\t}",
"abstract protected function getRowsHeader(): array;",
"protected function create_header_cell($content, $collCount)\n {\n return $this->create_cell(array('content'=>$content,'colCount'=>$collCount));\n }",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}",
"public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}",
"protected function addHeaderRowToCSV() {}",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"public function addTableHeader($data, $params = array(), $cell_end = 'H') {\n // offset\n $offset = 0;\n if (isset($params['offset']))\n $offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\n // font name\n if (isset($params['font']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setName($params['font']);\n\n // font size\n if (isset($params['size']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setSize($params['size']);\n\n // bold\n if (isset($params['bold']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold($params['bold']);\n\n // italic\n if (isset($params['italic']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setItalic($params['italic']);\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // set internal params that need to be processed after data are inserted\n $this->_tableParams = array(\n 'header_row' => $this->_row,\n 'offset' => $offset,\n 'row_count' => 0,\n 'auto_width' => array(),\n 'filter' => array(),\n 'wrap' => array(),\n 'horizontal' => false,\n 'fill_color' => false,\n 'text_color' => false,\n );\n\n if( !empty($data) ) {\n foreach ($data as $d) {\n $child = Common::hashEmptyField($d, 'child');\n\n // set label\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $d['label']);\n\n // set width\n if (isset($d['width']) && is_numeric($d['width']))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n else\n $this->_tableParams['auto_width'][] = $offset;\n\n // filter\n if (isset($d['filter']) && $d['filter'])\n $this->_tableParams['filter'][] = $offset;\n\n // wrap\n if (isset($d['wrap']) && $d['wrap'])\n $this->_tableParams['wrap'][] = $offset;\n\n // fill color\n if (isset($d['fill_color']) && $d['fill_color'])\n $this->_tableParams['fill_color'][] = $offset;\n\n // text color\n if (isset($d['text_color']) && $d['text_color'])\n $this->_tableParams['text_color'][] = $offset;\n\n if( !empty($child) ) {\n $childRow = $this->_row+1;\n\n if( !isset($childOffset) ) {\n $childOffset = $offset;\n }\n\n foreach ($child as $key => $val) {\n $label = Common::hashEmptyField($val, 'label');\n $width = Common::hashEmptyField($val, 'width');\n\n $childOffsetAcii = 1+$childOffset;\n $childOffsetAcii = Common::getNameFromNumber($childOffsetAcii);\n $childPosition = sprintf('%s%s:%s%s', $childOffsetAcii, $childRow, $childOffsetAcii, $childRow);\n\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($childOffset, $childRow, $label);\n \n if (isset($width) && is_numeric($width))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($childOffset)->setWidth((float)$width);\n else\n $this->_tableParams['auto_width'][] = $childOffset;\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($childRow)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n $childOffset++;\n }\n }\n\n if( !empty($d['rowspan']) ) {\n $rowspan = $d['rowspan']-1;\n $default = 1+$offset;\n $row = $this->_row;\n $cell_end = $row+$rowspan; // Acii A\n\n $default = Common::getNameFromNumber($default);\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $default, $cell_end));\n // $this->_row += $rowspan;\n // $offset++;\n }\n if( !empty($d['colspan']) ) {\n $colspan = $d['colspan']-1;\n $default = 1+$offset;\n $dimensi = $default+$colspan; // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan;\n // $this->_row ++;\n }\n\n $offset++;\n }\n }\n\n $child = Set::extract('/child', $data);\n\n if ( !empty($child) ) {\n $this->_row++;\n }\n \n $this->_row++;\n\n return $this;\n }",
"function create_devs_header()\n{\n$header =\n \"<thead>\n \t<tr>\n \t<th scope='col' class='rounded-company'>GPU #</th>\n <th scope='col' class='rounded-q1'>En</th>\n <th scope='col' class='rounded-q1'>Status</th>\n <th scope='col' class='rounded-q1'>Temp</th>\n <th scope='col' class='rounded-q1'>Fan Speed</th>\n <th scope='col' class='rounded-q1'>GPU Clk</th>\n <th scope='col' class='rounded-q1'>Mem Clk</th>\n <th scope='col' class='rounded-q1'>Volt</th>\n <th scope='col' class='rounded-q1'>Active</th>\n <th scope='col' class='rounded-q1'>MH/s 5s</th>\n <th scope='col' class='rounded-q1'>MH/s avg</th>\n <th scope='col' class='rounded-q1'>Acc</th>\n <th scope='col' class='rounded-q1'>Rej</th>\n <th scope='col' class='rounded-q1'>H/W Err</th>\n <th scope='col' class='rounded-q1'>Util</th>\n <th scope='col' class='rounded-q1'>Intens</th>\n </tr>\n </thead>\";\n \n return $header;\n}",
"public function addHeaderElement(HtmlTableRow $row)\n\t{\n\t\t$this->_createHeaderContainer();\n\t\t$this->_thead->addElement($row);\n\t\treturn $this;\n\t}",
"public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }",
"private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}",
"public function createRow($values = array(), $isHeader = false)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = new HtmlTableRow($this);\n\t\tif ($isHeader == true) {\n\t\t\t$row->setCellTagName('th');\n\t\t}\n\t\tforeach ($values as $columnKey => $value) {\n\t\t\t$row->addCell($columnKey, $value);\n\t\t}\n\t\treturn $row;\n\t}",
"protected function build_header_cell($cell, $contrast=false, $center=true, $colspan=null, $rowspan=null, $nowrap=true) {\n $classes = array('header', 'bottom');\n if ($center) {\n $classes[] = 'center';\n $classes[] = 'narrow';\n } else {\n $classes[] = 'left';\n }\n if ($contrast) {\n $classes[] = 'contrast';\n }\n if ($nowrap) {\n $classes[] = 'nowrap';\n }\n return $this->build_cell($cell, $classes, $colspan, $rowspan, true);\n }",
"private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }",
"public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }",
"public function addHeader($values)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = $this->createHeader($values);\n\t\t$this->addHeaderElement($row);\n\t\treturn $row;\n\t}",
"public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"function styleHeaderExcel()\n{\n $styleHeader = array(\n 'font' => array(\n 'size' => 16,\n 'name' => 'Calibri',\n ), 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER,\n ), 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR,\n 'rotation' => 90,\n 'startcolor' => array(\n 'argb' => 'B5B5B5',\n ), 'endcolor' => array(\n 'argb' => 'E0E0E0',\n ),\n ),\n );\n return $styleHeader;\n}",
"function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}",
"public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}",
"private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }",
"public function headingRow(): int\n {\n return 1;\n }",
"static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"public function header($Arr_Labels=false)\n\t{\n\t\t$this->Arr_Labels = $Arr_Labels;\n\n $Int_Column = 0;\n if ($Arr_Labels)\n {\n\t foreach ($Arr_Labels as $Str_Field => $Str_Label)\n\t\t\t{\n $Str_Column = $Str_Label;\n $this->Obj_Doc->getActiveSheet()->setCellValueByColumnAndRow($Int_Column, 1, $Str_Column);\n\t\t\t\t$Int_Column++;\n\t }\n\t\t}\n\t\telseif (isset($this->Arr_Data[0]))\n\t\t{\n\t foreach ($this->Arr_Data[0] as $Str_Field => $Str_Label)\n\t\t\t{\n\t\t\t\t$Int_Column++;\n $Str_Column = Inflector::humanize($Str_Field);\n $this->Obj_Doc->getActiveSheet()->setCellValueByColumnAndRow($Int_Column, 1, $Str_Column);\n\t }\n\t\t}\n\n\t\t//Set the worksheet styles.\n $this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n //$this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);\n //$this->Obj_Doc->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setRGB('ffffff');\n $this->Obj_Doc->getActiveSheet()->duplicateStyle( $this->Obj_Doc->getActiveSheet()->getStyle('A1'), 'B1:'.$this->Obj_Doc->getActiveSheet()->getHighestColumn().'1');\n\n\t\tfor ($i = 1; $i <= $Int_Column; $i++)\n\t\t{\n $this->Obj_Doc->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(true);\n }\n\n\t\treturn $this;\n\t}",
"private function makeTableHeader($type,$header,$colspan=2): void {\r\n\t\tif(!$this->bInitialized) {\r\n\t\t\t$header = ' (' . $header . ') ';\r\n\t\t\t$this->bInitialized = true;\r\n\t\t}\r\n\t\t$str_i = ($this->bCollapsed) ? 'style=\"font-style:italic\" ' : '';\r\n\t\t\r\n\t\techo '<table class=\"dBug_table dBug_'.$type.'\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th '.$str_i.' class=\"dBug_clickable_table dBug_' . $type . 'Header\" colspan=\"' . $colspan . '\">' . $header . '</th>\r\n\t\t\t\t</tr>';\r\n\t}",
"private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th> </th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }",
"function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}",
"function tableheader_open($colspan = 1, $align = null, $rowspan = 1, $classes = null) {\n $class = 'class=\"col'.$this->_counter['cell_counter']++;\n if(!is_null($align)) {\n $class .= ' '.$align.'align';\n }\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $class .= '\"';\n $this->doc .= '<th '.$class;\n if($colspan > 1) {\n $this->_counter['cell_counter'] += $colspan - 1;\n $this->doc .= ' colspan=\"'.$colspan.'\"';\n }\n if($rowspan > 1) {\n $this->doc .= ' rowspan=\"'.$rowspan.'\"';\n }\n $this->doc .= '>';\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"function constructTableHead() {\n\n $header = '<tr><th>Country</th>';\n if (isset($_GET['pop'])) {\n $header .= '<th>Total Population</th>';\n }\n if (isset($_GET['birth'])) {\n $header .= '<th>Birth Rate</th>';\n }\n if (isset($_GET['death'])) {\n $header .= '<th>Death Rate</th>';\n }\n\n $header .= '</tr>';\n return $header;\n }",
"function _webform_csv_headers_email($component) {\r\n $header = array();\r\n $header[0] = '';\r\n $header[1] = '';\r\n $header[2] = $component['name'];\r\n return $header;\r\n}",
"function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}",
"public function getCSVHeaderRow() {\n return [\n 'link_title',\n 'link_layout',\n 'link_location',\n 'content_type',\n 'link_count',\n 'link_clicked',\n 'clicked',\n 'os',\n 'device',\n 'device_brand',\n 'device_model',\n 'browser_type',\n 'browser_name',\n 'browser_version',\n 'site',\n 'page_url',\n 'referrer',\n 'paragraphs',\n 'displayed_url_1',\n 'displayed_url_2',\n 'displayed_url_3',\n 'displayed_url_4',\n 'displayed_url_5',\n 'time_logged',\n 'time_updated',\n 'user_id',\n 'browser',\n 'row'\n ];\n }",
"protected function setWSHeader($ws,$poolLabel,$hdrLabels,$row=1)\n {\n $col = 0;\n \n $ws->setCellValueByColumnAndRow($col,$row,$poolLabel);\n $row += 1;\n \n foreach($hdrLabels as $label) {\n $ws->setCellValueByColumnAndRow($col++,$row,$label);\n }\n $row += 1;\n \n return $row;\n }",
"public function getHeader($rowIndex)\n\t{\n\t\t$ret = null;\n\t\tif ($this->_thead instanceof HtmlElement) {\n\t\t\t$ret = $this->_thead->getElement($rowIndex);\n\t\t}\n\t\treturn $ret;\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function krnEmit_reportTitleRow($appEmitter, $title, $colSpan) {\n $s1 = '<div class=\"draff-report-top-left\"></div>';\n $s2 = '<div class=\"draff-report-top-middle\">'.$title.'</div>';\n $s3 = '<div class=\"draff-report-top-right\">'.draff_dateTimeAsString(rc_getNow(),'M j, Y' ).'</div>';\n $appEmitter->row_start();\n $appEmitter->cell_block($s1 . $s2 . $s3 ,'draff-report-top', 'colspan=\"'.$colSpan.'\"');\n $appEmitter->row_end();\n}",
"private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo ' <img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\"> \n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}",
"protected function buildDomainObject($row) {\n\t\t$header = new Header();\n\t\t$header->setId($row['header_id']);\n\t\t$header->setText($row['header_text']);\n\t\treturn $header;\n\t}",
"public function headerRowRange(): HeaderRowRangeRequestBuilder {\n return new HeaderRowRangeRequestBuilder($this->pathParameters, $this->requestAdapter);\n }",
"public function setHeaderRow(array $row)\n {\n if (null === $this->nbColumns) {\n $this->nbColumns = count($row);\n } elseif (count($row) !== $this->nbColumns) {\n throw new LogicException(sprintf(\n 'Expected the header row to contain %s cells, but got %s.',\n $this->nbColumns,\n count($row)\n ));\n }\n\n $this->headerRow = array_values($row);\n\n return $this;\n }",
"public function csvHeaderRow()\n {\n static $columns;\n\n if ($columns === null) {\n $columns = [ 'source' ];\n $languages = $this->languages();\n foreach ($languages as $lang) {\n $columns[] = $lang;\n }\n\n $columns[] = 'context';\n }\n\n return $columns;\n }",
"public function getTableHeader()\n {\n $tableHead = null;\n $tableHead .= \"<thead>\";\n $tableHead .= \"<tr>\";\n $tableHead .= \"<th>Vecka</th>\";\n $tableHead .= \"<th>Måndag</th>\";\n $tableHead .= \"<th>Tisdag</th>\";\n $tableHead .= \"<th>Onsdag</th>\";\n $tableHead .= \"<th>Torsdag</th>\";\n $tableHead .= \"<th>Fredag</th>\";\n $tableHead .= \"<th>Lördag</th>\";\n $tableHead .= \"<th>Söndag</th>\";\n $tableHead .= \"</tr>\";\n $tableHead .= \"</thead>\";\n\n return $tableHead;\n }",
"public function getHeaderRow($asArray = false) {\n\t\tif (!empty($this->headers)) {\n\t\t\tif ($asArray) {\n\t\t\t\treturn array_keys($this->data);\n\t\t\t} else {\n\t\t\t\treturn Header::getInstance()->setData(array_keys($this->data));\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function HeaderLine($name, $value) {\n \treturn $name . ': ' . $value . $this->LE;\n \t}",
"protected function renderHeaderCellContent()\n\t{\n\t\t$name = $this->name;\n\t\tif (substr_compare($name, '[]', -2, 2) === 0) {\n\t\t\t$name = substr($name, 0, -2);\n\t\t}\n\t\tif (substr_compare($name, ']', -1, 1) === 0) {\n\t\t\t$name = substr($name, 0, -1) . '_all]';\n\t\t} else {\n\t\t\t$name .= '_all';\n\t\t}\n\n\t\t$id = $this->grid->options['id'];\n\n$_allSelectJs = <<< JS\n\t$('.select-on-check-all').on('click', function(){\n\t\tvar rows = table.rows({ 'search': 'applied' }).nodes();\n\t\t$('input[type=\"checkbox\"]', rows).prop('checked', this.checked);\n\t});\n\n\t$('#$id tbody').on('change', 'input[type=\"checkbox\"]', function(){\n\t\tif(!this.checked){\n\t\t\tvar el = $('.select-on-check-all').get(0);\n\t\t\tif(el && el.checked && ('indeterminate' in el)){\n\t\t\t\tel.indeterminate = true;\n\t\t\t}\n\t\t}\n\t});\nJS;\n\n\t\t$this->grid->getView()->registerJs($_allSelectJs);\n\n\t\tif ($this->header !== null || !$this->multiple) {\n\t\t\treturn parent::renderHeaderCellContent();\n\t\t} else {\n\t\t\treturn Html::checkBox($name, false, ['class' => 'select-on-check-all']);\n\t\t}\n\t}",
"private function generate_columns_header($p_edit,&$p_resultat,&$p_result_header)\r\n\t\t{\r\n\t\t\t// Create a new line\r\n\t\t\t$html = '<tr id=\"tr_header_title_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Create the first column (checkbox and edit button)\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t$html .= '<td align=\"left\" id=\"header_th_0__'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"th0_'.$this->c_id.'\"></div></td>';\r\n\t\t\t$html .= '<td></td>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Quantify of order clause\r\n\t\t\t$qtt_order = $this->get_nbr_order();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Display the resize cursor or not\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t{\r\n\t\t\t\t$cursor = ' cur_resize';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$cursor = '';\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] != false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// An order clause is defined\r\n\t\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] == __ASC__)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// ASC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-ascend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// DESC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-descend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Display the number of order only if there is more than one order clause\r\n\t\t\t\t\t\t($qtt_order > 1) ? $order_prio = $this->c_columns[$key_col]['order_priority'] : $order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// No order clause defined\r\n\t\t\t\t\t\t$class_order = '';\r\n\t\t\t\t\t\t$order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Order column\r\n\t\t\t\t\t$html .= '<td class=\"__'.$this->c_theme.'_bloc_empty'.$class_order.'\"><span class=\"__vimofy_txt_mini_ vimofy_txt_top\">'.$order_prio.'</span></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t$lib_redim = $this->hover_out_lib(17,17);\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"vimofy_move_column_start(event,'.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = '';\r\n\t\t\t\t\t\t$ondblclick = '';\r\n\t\t\t\t\t\t$lib_redim = '';\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"click_column_order(\\''.$this->c_id.'\\','.$key_col.');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*===================================================================*/\r\n\r\n\t\t\t\t\t// Column title\r\n\t\t\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_h nowrap\" id=\"header_th_'.$key_col.'__'.$this->c_id.'\"><div '.$event.' class=\"align_'.$this->c_columns[$key_col]['alignment'].' __'.$this->c_theme.'_column_title\" id=\"th'.$key_col.'_'.$this->c_id.'\"><span id=\"span_'.$key_col.'_'.$this->c_id.'\">'.$this->c_columns[$key_col]['name'].'</span></div></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Display other column\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($p_edit != false) $html .= '<td style=\"padding:0;margin:0;\"></td>';\r\n\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t$html .= '<td id=\"right_mark_'.$key_col.'_'.$this->c_id.'\" '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Input for search on the column\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t// Create a new line\r\n\t\t\t$html .= '<tr id=\"tr_header_input_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t// Create the first column (checkbox and edit button)\r\n\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"thf0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__vimofy_version\" onclick=\"window.open(\\'vimofy_bugs\\');\">v'.$this->c_software_version.'</div></td>';\r\n\t\t\t\r\n\t\t\t// Id column display counter\r\n\t\t\t$id_col_display = 0;\r\n\t\t\t\r\n\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($id_col_display == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.$key_col.'_'.$this->c_id.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.($key_col).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(isset($this->c_columns[$key_col]))\r\n\t\t\t\t\t{*/\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Define the filter value\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t$state_filter_input = '';\r\n\t\t\t\t\t\tif(isset($val_col['filter']['input']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// A filter was defined by the user\r\n\t\t\t\t\t\t\t$filter_input_value = $val_col['filter']['input']['filter'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// No filter was defined by the user\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check if vimofy was in edit mode\r\n\t\t\t\t\t\t\tif($p_edit != false && !isset($val_col['rw_flag']) || ($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] != __FORBIDEN__))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// The vimofy was in edit mode, search all same value in the column\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\t\t\t\t\t\tif($this->c_obj_bdd->rds_num_rows($p_result_header) > 0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_result_header,0);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// TODO Use a DISTINCT QUERY - Vimofy 1.0\r\n\t\t\t\t\t\t\t\t$key_cold_line = 0;\r\n\t\t\t\t\t\t\t\t$last_value = '';\r\n\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_result_header))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif($key_cold_line > 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($last_value == $row[$val_col['sql_as']])\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\t\t\t// The value is not the same of the previous, stop browsing data \r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$last_value = $row[$val_col['sql_as']];\r\n\t\t\t\t\t\t\t\t\t$key_cold_line = $key_cold_line + 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif($flag_same)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = $last_value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] == __FORBIDEN__)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$state_filter_input = 'disabled';\t\t\t\t\t\t\t\t\t// Disable the input because the edition of column is forbiden\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isset($val_col['filter']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_on __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isset($val_col['lov']) && isset($val_col['is_lovable']) && $val_col['is_lovable'] == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_lovable __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(isset($val_col['lov']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_no_icon __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Menu button oncontextmenu\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\tif($this->c_type_internal_vimofy == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Principal vimofy, diplay internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'vimofy_display_internal_vim(\\''.$this->c_id.'\\',__POSSIBLE_VALUES__,'.$key_col.');return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Internal vimofy, doesn't display other internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td id=\"th_1_c'.$key_col.'_'.$this->c_id.'\" class=\"__vimofy_unselectable\" style=\"width:20px;\"><div style=\"width:20px;margin:0;\" '.$this->hover_out_lib(21,21).' oncontextmenu=\"'.$oncontextmenu.'\" class=\"'.$class_btn_menu.'\" onclick=\"vimofy_toggle_header_menu(\\''.$this->c_id.'\\','.$key_col.');\" id=\"th_menu_'.$key_col.'__'.$this->c_id.'\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_2_c'.$key_col.'_'.$this->c_id.'\" align=\"left\" class=\"__'.$this->c_theme.'__cell_h\">';\r\n\t\t\t\t\t\t$html .= '<div style=\"margin:0 3px;\"><input value=\"'.str_replace('\"','"',$filter_input_value).'\" class=\"__'.$this->c_theme.'__input_h full_width\" '.$state_filter_input.' id=\"th_input_'.$key_col.'__'.$this->c_id.'\" type=\"text\" style=\"margin: 2px 0;\" size=1 onkeyup=\"if(document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\'))document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\').checked=true;vimofy_input_keydown(event,this,\\''.$this->c_id.'\\','.$key_col.');\" onchange=\"vimofy_col_input_change(\\''.$this->c_id.'\\','.$key_col.');\"/></div>';\r\n\t\t\t\t\t\tif($p_edit != false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($state_filter_input == '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:10px;padding:0;margin:0;\"><input '.$this->hover_out_lib(76,76).' type=\"checkbox\" id=\"chk_edit_c'.$key_col.'_'.$this->c_id.'\" style=\"height:11px;width:11px;margin: 0 5px 0 2px;display:block;\"/></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:0;padding:0;margin:0;\"></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_3_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_4_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$id_col_display = $id_col_display + 1;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$html .= '<td id=\"th_0_c'.($key_col+1).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t$html.= '<td><div style=\"width:200px\"></div></td>';\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\r\n\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\tif($this->c_obj_bdd->rds_num_rows($p_resultat) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_resultat,0);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}",
"abstract protected function getColumnsHeader(): array;",
"protected function setHeaders()\n {\n $row = 1; \n $this->objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n \n $mergeCells = 'A' . $row . ':' . 'E' . $row;\n $this->setCellValue('A' . $row, \"Differences between files.\");\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getFont()->setBold(true);\n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n $this->objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(25);\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Comparing by: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'C' . $row;\n $this->setCellValue('B' . $row, $this->getCompareTypeLabel()); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Configuration: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'M' . $row;\n $this->setCellValue('B' . $row, $this->settings['configuration']); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n $row += 5;\n $columns = $this->getColumns(); \n foreach ($columns as $columnName => $column) {\n $cell = $columnName . $row;\n $this->setCellValue($cell, $column['title']);\n $this->objPHPExcel->getActiveSheet()->getColumnDimension($columnName)->setAutoSize(true);\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n }\n \n return $row;\n }",
"function _webform_csv_headers_file($component) {\r\n $header = array();\r\n // Two columns in header.\r\n $header[0] = array('', '');\r\n $header[1] = array($component['name'], '');\r\n $header[2] = array(t('Name'), t('Filesize (KB)'));\r\n return $header;\r\n}",
"public static function make_table_header(Array $headings){\n\t\t$html = Xml::openElement( 'thead' );\n $html .= Xml::openElement( 'tr' );\n foreach ( $headings as $heading ) {\n $html .= Xml::element( 'th', array(), $heading );\n\t\t}\n $html .= Xml::closeElement( 'tr' );\n $html .= Xml::closeElement( 'thead' );\n\t\treturn $html;\n\t}",
"function os2forms_nemid_webform_csv_headers_component($component, $export_options) {\n $header = array();\n $header[0] = '';\n $header[1] = '';\n $header[2] = $export_options['header_keys'] ? $component['form_key'] : $component['name'];\n return $header;\n}",
"public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }",
"protected function objectRow( $key, $val ) {\n\t\t$th = Xml::elementClean( 'th', array(), $key );\n\t\tif ( is_array( $val ) ) {\n\t\t\t$td = Xml::tags( 'td', array(), self::objectTable( $val ) );\n\t\t} else {\n\t\t\tif ( is_string( $val ) ) {\n\t\t\t\t$val = '\"' . $val . '\"';\n\t\t\t} else {\n\t\t\t\t$val = FormatJson::encode( $val );\n\t\t\t}\n\n\t\t\t$td = Xml::elementClean( 'td', array( 'class' => 'value' ), $val );\n\t\t}\n\n\t\treturn Xml::tags( 'tr', array(), $th . $td );\n\t}",
"function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}",
"protected function getTableHeader() {\n $newDirection = ($this->sortDirection == 'asc') ? 'desc' : 'asc';\n\n $tableHeaderData = array(\n 'title' => array(\n 'link' => $this->getLink('title', ($this->sortField == 'title') ? $newDirection : $this->sortDirection),\n 'name' => 'Title',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'document_type' => array(\n 'link' => $this->getLink('type', $this->sortField == 'document_type' ? $newDirection : $this->sortDirection),\n 'name' => 'Type',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'date' => array(\n 'link' => $this->getLink('date', $this->sortField == 'date' ? $newDirection : $this->sortDirection),\n 'name' => 'Date',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n );\n\t\t\n // insert institution field in 3rd column, if this is search results\n if($this->uri == 'search') {\n $tableHeaderData = array_slice($tableHeaderData, 0, 2, true) +\n array('institution' => array(\n 'link' => $this->getLink('institution', $this->sortField == 'institution' ? $newDirection : $this->sortDirection),\n 'name' => 'Institution',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n )) +\n array_slice($tableHeaderData, 2, count($tableHeaderData)-2, true);\n }\n\t\t\n return $tableHeaderData;\n }",
"public static function create_table_head()\n\t{\n\t\t\n\t\tif (!static::$columns)\n\t\t{\n\t\t\treturn static::$template['wrapper_start'].'<tr><th>No columns config</th></tr>'.static::$template['wrapper_end'];\n\t\t}\n\n\t\t$table_head = static::$template['wrapper_start'];\n\t\t$table_head .= '<tr>';\n\t\t\n\t\tforeach(static::$columns as $column)\n\t\t{\n\t\t\t$sort_key \t= (is_array($column) ? isset($column[1]) ? $column[1] : strtolower($column[0]) : $column);\n\t\t\t$col_attr\t= (is_array($column) && isset($column[2]) ? $column[2] : array());\n\t\t\t\n\t\t\t$new_direction = static::$direction;\n\t\t\t\n\t\t\tif(static::$sort_by == $sort_key)\n\t\t\t{\n\t\t\t\t$active_class_name = static::$template['col_class_active'].' '.static::$template['col_class_active'].'_'.$new_direction;\n\t\t\t\tif(isset($col_attr['class']))\n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] .= ' '.$active_class_name;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$col_attr['class'] = $active_class_name;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_direction = (static::$direction == 'asc' ? 'desc' : 'asc');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($column) && (!isset($column[1]) || isset($column[1]) && $column[1] !== false)){\n\t\t\t\t\n\t\t\t\t$url \t\t\t= rtrim(static::$base_url, '/').(static::$current_page ? '/'.static::$current_page : '');\n\t\t\t\t$url \t\t\t.= '/'.$sort_key.static::$uri_delimiter.$new_direction;\n\t\t\t\t\n\t\t\t\t$cell_content \t= rtrim(static::$template['link_start'], '> ').' href=\"'.$url.'\">';\n\t\t\t\t$cell_content \t.= $column[0];\n\t\t\t\t$cell_content \t.= static::$template['link_end'];\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tif(is_array($column))\n\t\t\t\t{\n\t\t\t\t\t$column = $column[0];\n\t\t\t\t}\n\t\t\t\t$cell_content = static::$template['nolink_start'].$column.static::$template['nolink_end'];\t\n\t\t\t}\n\t\t\t\n\t\t\t$table_head .= html_tag(static::$template['col_tag'], $col_attr, $cell_content);\n\t\t\t\n\t\t}\n\t\t\n\t\t$table_head .= '</tr>';\n\t\t$table_head .= static::$template['wrapper_end'];\n\n\t\treturn $table_head;\n\t}",
"public function get_log_row_header_output( $row ) {\n\t\t$row_logger = $row->logger;\n\t\t$row->context = isset( $row->context ) && is_array( $row->context ) ? $row->context : array();\n\n\t\t// Fallback to SimpleLogger if no logger exists for row\n\t\tif ( ! isset( $this->instantiated_loggers[ $row_logger ] ) ) {\n\t\t\t$row_logger = 'SimpleLogger';\n\t\t}\n\n\t\t$logger = $this->instantiated_loggers[ $row_logger ]['instance'];\n\n\t\treturn $logger->get_log_row_header_output( $row );\n\t}",
"public function addTableHeader( $data, $params = array(), $rgbColor = 'FFFFFF', $rgbBackgroundColor = '00B0F0', $set_gnm_legend = true ) {\n\n if(empty($params)){\n $params = $this->estiloCabecera;\n }\n\t\t// offset\n\t\tif (array_key_exists('offset', $params))\n\t\t\t$offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\t\t// font name\n\t\tif (array_key_exists('font', $params))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setName($params['font_name']);\n\t\t// font size\n\t\tif (array_key_exists('size', $params))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setSize($params['font_size']);\n\t\t// bold\n\t\tif (array_key_exists('bold', $params))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setBold($params['bold']);\n\t\t// italic\n\t\tif( array_key_exists('italic', $params ))\n\t\t\t$this->xls->getActiveSheet()->getStyle($this->row)->getFont()->setItalic($params['italic']);\n\n $styleArray = array(\n 'font' => array(\n 'color' => array('rgb' => $rgbColor),\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => array('rgb' => $rgbBackgroundColor),\n ),\n );\n\n /*$styleArray2 = array(\n 'font' => array(\n 'color' => array('rgb' => 'FFFFFF'),\n ),\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n //'color' => array('rgb'=>'115372'),\n 'color' => array('rgb'=>'319FEE'),\n ),\n 'borders' => array(\n 'allborders' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array('argb' => 'FF000000'),\n )\n ),\n );*/\n\n $this->xls->getActiveSheet()->getStyle($this->row)->applyFromArray( $styleArray );\n\n\n\n //$this->xls->getActiveSheet()->getStyle($this->row)->applyFromArray( $styleArray2 );\n\n\n\n\t\t// set internal params that need to be processed after data are inserted\n\t\t$this->tableParams = array(\n\t\t\t'header_row' => $this->row,\n\t\t\t'offset' => $offset,\n\t\t\t'row_count' => 0,\n\t\t\t'auto_width' => array(),\n\t\t\t'filter' => array(),\n\t\t\t'wrap' => array()\n\t\t);\n\n\t\tforeach( $data as $d ){\n\t\t\t// set label\n if( !empty( $d['file'] ) ){\n if( !$this->addImage( $d['file'], PHPExcel_Cell::stringFromColumnIndex( $offset ), $this->row ) ){\n $this->xls->getActiveSheet()->setCellValueExplicitByColumnAndRow($offset, $this->row, $d['label']);\n }\n } else{\n $this->xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->row, $d['label']);\n }\n\t\t\t// set width\n //$this->tableParams['auto_width'][] = $offset;// siempre auto\n\t\t\tif (array_key_exists('width', $d)) {\n\t\t\t\tif ($d['width'] == 'auto')\n\t\t\t\t\t$this->tableParams['auto_width'][] = $offset;\n\t\t\t\telse\n\t\t\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n\t\t\t}\n\t\t\t// filter\n\t\t\tif (array_key_exists('filter', $d) && $d['filter'])\n\t\t\t\t$this->tableParams['filter'][] = $offset;\n\t\t\t// wrap\n\t\t\tif (array_key_exists('wrap', $d) && $d['wrap'])\n\t\t\t\t$this->tableParams['wrap'][] = $offset;\n\n\t\t\t$offset++;\n\t\t}\n\t\t$this->row++;\n\n if( $set_gnm_legend ) {\n $this->xls->getActiveSheet()->setCellValue('A1', \"provided by\\nGNM INTERNATIONAL\");\n $this->xls->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true);\n\n $this->xls->getActiveSheet()->getStyle('A1')->applyFromArray(array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT,\n ),\n 'font' => array(\n 'bold' => true,\n 'color' => array('rgb' => '0000FF'),\n 'size' => 7,\n 'name' => 'Calibri'\n )\n ));\n }\n\n\t}",
"function addMainHeader($title, $valuePath = null, array $options = array()){\n\t \t$defaults = array(\n\t\t\t'editable' => false,\n\t\t\t'type' \t => 'mainColumn',\n\t\t\t'element' => false,\n\t\t\t'linkable' => false,\n\t\t\t'total' => false,\n\t\t\t'tree' => false\n\t\t);\n\t\t\n\t\t$options = array_merge($defaults, $options);\n\t\t\n\t\t$this->mainTitleSlug = Inflector::slug($title);\n\t\tif($this->mainTitleSlug == null){\n\t\t\t$this->mainTitleSlug = $title;\n\t\t}\n\n\t\t$this->__columns[$this->mainTitleSlug] = array(\n\t\t\t'title' => $title,\n\t\t\t'valuePath' => $valuePath,\n\t\t\t'options' => $options\n\t\t);\n\t\t\n\t\tif($options['total'] == true){\n\t\t\t$this->__totals[$title] = 0;\n\t\t}\n\t\t\n\t\treturn $this->mainTitleSlug;\n\t }",
"public function setHeader(array $cells)\n {\n if (count($cells) == 0) {\n throw new EmptyHeadersException('The specified header is empty.');\n }\n\n if (is_numeric(key($cells))) {\n throw new InvalidHeadersException('Headers must be passed with both key and value as string. The key represents the Row Id, and the value is represents the Header Title.');\n }\n\n $this->header = $cells;\n }",
"public function addHeaderArray(array $header) {\n $this->headers = $header;\n foreach ($header as $key => $cell) {\n if (!($cell instanceof HTMLTableHeaderCell)) {\n $cell = new HTMLTableHeaderCell($cell);\n }\n $this->headers[$key] = $cell;\n $this->addView($cell);\n }\n return $this;\n }",
"function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }",
"function showTableHeader($phaseName) {\n?>\n\t<table>\n\t\t<colgroup>\n\t\t\t<col width='4%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='15%'>\n\t\t\t<col width='5%'>\n\t\t\t<col width='23%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='23%'>\n\t\t\t<!--<col width='10%'>\n\t\t\t<col width='*'>-->\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th>Datum/Zeit</th>\n\t\t\t\t<th>Ort</th>\n\t\t\t\t<?php echo ($phaseName == 'Gruppenphase') ? \"<th>Grp</th>\" : \"<th></th>\" ?>\n\t\t\t\t<th colspan='3'>Resultat</th>\n\t\t\t\t<!--<th>Tipp</th>\n\t\t\t\t<th>Pkt</th>-->\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n<?php\n}",
"public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }",
"function generateTitle($header, $data)\n\t{\n\t\t$this->SetFillColor(63,73,204);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetDrawColor(18,0,0);\n\t\t$this->SetLineWidth(.1);\n\t\t$this->SetFont('','B');\n\t\t// Header\n\t\t$w = array(70, 25, 30, 20,30,35,25);\n\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n\t\t$this->Ln();\n\t\t// Color and font restoration\n\t\t$this->SetFillColor(224,235,255);\n\t\t$this->SetTextColor(0);\n\t\t$this->SetFont('');\n\t\t// Data\n\t\t$fill = false;\n\t\tforeach($data as $row)\n\t\t{\n\t\t\t$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n/*\t\t\t$this->Cell($w[1],6,$row[1],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[2],6,$row[2],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[4],6,$row[4],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[5],6,$row[5],'LR',0,'C',$fill);*/\n\t\t\t$this->Ln();\n\t\t\t$fill = !$fill;\n\t\t}\n\t\t// Closing line\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t}",
"protected function headerLine($name, $val) {\r\n\t\treturn $this->textLine($name.': '.$val);\r\n\t}",
"public function writeHeaderRow() {\n $headers = $this->getCSVHeaderRow();\n\n // write to the CSV\n fputcsv($this->newCSV, $headers);\n }",
"function uwwtd_tablesort_header($cell, $header, $ts) {\n if (is_array($cell) && isset($cell['field'])) {\n //Manage the sort field\n if (isset($cell['sorter'])) {\n $order = $cell['sorter'];\n } elseif (isset($cell['field'])) {\n $order = $cell['data'];\n } else {\n $order = $cell['data'];\n }\n\n $title = t('sort by @s', array('@s' => $cell['data']));\n if ((!empty($ts['name']) && $order == $ts['name']) || (!empty($_REQUEST['order']) && $order == $_REQUEST['order'])) {\n $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc');\n $cell['class'][] = 'active';\n $image = theme('tablesort_indicator', array('style' => $ts['sort']));\n } else {\n // If the user clicks a different header, we want to sort ascending initially.\n $ts['sort'] = 'asc';\n $image = '';\n }\n\n $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $order, 'sort_mod' => isset($cell['sort_mod']) ? $cell['sort_mod'] : 'text')), 'html' => TRUE));\n\n unset($cell['field'], $cell['sort']);\n }\n return $cell;\n}",
"function draw_header(){\r\n\t\t$out_multiple_search='';\r\n\r\n\t\t$arr_width=explode(',',$this->width);\r\n\t\t$out='<thead><tr id=\"'.$this->id.'_sort\">';\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t$column=1;\r\n\t\tfor($i=0; $i<count($arr_header);$i++){\r\n\r\n\t\t\tif($this->sort_init!==false and $this->sort_init[$i]!='f'){\r\n\t\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').' onclick=\"'.$this->change_tags($this->get_url($i+1)).'\"><span'.($arr_sort[$i]=='f' ? ' class=\"no_sort' : ' class=\"sort').(substr($arr_sort[$i],-1)=='a' ? '_asc' : (substr($arr_sort[$i],-1)=='d' ? '_desc' : '')).'\"></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}else{\r\n\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').'><span></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}\r\n\r\n\t\t\tif($this->multiple_search_init===true or $this->multiple_search_init=='hide' or (strpos($this->multiple_search_init,'hide')!==false and $this->multiple_search_init[$i]=='t') or $this->multiple_search_init[$i]=='t')\r\n\t\t\t\t$out_multiple_search.='<th><input type=\"text\" id=\"'.$this->id.'_multiple_search'.($i+1).'\" name=\"'.$this->id.'_multiple_search[]'.'\" value=\"'.$this->multiple_search[$i].'\" onkeyup=\"ctMultiSearch(\\''.$this->id.'\\');\" /></a></th>';\r\n\t\t\telse\r\n\t\t\t\t$out_multiple_search.='<th></th>';\r\n\t\t}\r\n\r\n\r\n\t\t$out.='</tr>';\r\n\r\n\t\tif($this->multiple_search_init===true or strpos($this->multiple_search_init,'hide')!==false or strpos($this->multiple_search_init,'t')!==false)\r\n\t\t\t$out.='<tr id=\"'.$this->id.'_multiple_search\"'.(($this->multiple_search_init!==true and strpos($this->multiple_search_init,'hide')!==false) ? ' style=\"display: none;\"' : '').'>'.$out_multiple_search.'</tr>';\r\n\r\n\t\t$out.'</thead>';\r\n\r\n\t\treturn $out;\r\n\t}",
"private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }",
"public function headerLine($name, $value)\n {\n return $name . ': ' . $value . $this->LE;\n }",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"protected function renderHeaderCellContent() {\r\n if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {\r\n $sort = $this->grid->dataProvider->getSort();\r\n $label = isset($this->header) ? $this->header : $sort->resolveLabel($this->name);\r\n\r\n if ($sort->resolveAttribute($this->name) !== false)\r\n $label .= '<span class=\"caret\"></span>';\r\n\r\n echo $sort->link($this->name, $label, array('class' => 'sort-link'));\r\n }\r\n else {\r\n if ($this->name !== null && $this->header === null) {\r\n if ($this->grid->dataProvider instanceof CActiveDataProvider)\r\n echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));\r\n else\r\n echo CHtml::encode($this->name);\r\n }\r\n else\r\n parent::renderHeaderCellContent();\r\n }\r\n }",
"public function getTitleColTemplate(): TitleColTemplate;",
"public function getHeadFilterColTemplate(): HeadFilterColTemplate;",
"function DisplayTableHeader()\n{\n\t$pdf = $GLOBALS['pdf'];\n\t$width_col_no = $GLOBALS['width_col_no'];\n\t$sync_name_index = $GLOBALS['sync_name_index'];\n\t$collectionWidth = $GLOBALS['collectionWidth'];\n\t$totalWidth = $GLOBALS['totalWidth'];\n\n\t//setkan font jadi bold untuk header\n\t$pdf->SetFont('helvetica','B',9);\n\n\t//koleksi tinggi column header\n\t$header_cols_height = array();\n\n\t//tinggi untuk column 'No'\n\t$header_cols_height[] = $pdf->getNumLines('No',$width_col_no);\n\n\t//dapatkan tinggi untuk setiap column\n\tforeach ($sync_name_index as $key => $value)\n\t{\n\t\t$width_converted = GetAndConvertColumnWidth($value, $sync_name_index, $collectionWidth, $totalWidth, $pdf);\n\t\t$header_cols_height[] = $pdf->getNumLines($value,$width_converted);\n\t}\n\n\t//cari siapa paling tinggi\n\t$max_height = max($header_cols_height);\n\n\t//display\n\t$pdf->SetFillColor(211,211,211);\n\n\t$pdf->MultiCell($w=$width_col_no, $h=5*$max_height+3, $txt='No', $border=1, $align='L', $fill=1, $ln=0, $x='', $y='', $reseth=true, $stretch=0, $ishtml=true, $autopadding=true, $maxh=$h, $v='M');\n\tforeach ($sync_name_index as $key => $value)\n\t{\n\t\t$width_converted = GetAndConvertColumnWidth($value, $sync_name_index, $collectionWidth, $totalWidth, $pdf);\n\t\t$pdf->MultiCell($w=$width_converted, $h=5*$max_height+3, $txt=$value, $border=1, $align='C', $fill=1, $ln=0, $x='', $y='', $reseth=true, $stretch=0, $ishtml=true, $autopadding=true, $maxh=$h, $v='M');\n\t}\n\n\t//reset font\n\t$pdf->SetFont('helvetica','',9);\n\t$pdf->Ln();\n}",
"public function cell($value) {\n return $this->setProperty('cell', $value);\n }",
"public function withHeader($name, $value)\n {\n }",
"function table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}",
"public function getCsvRowHeaders()\n {\n\n $headersType = Arr::get($this->csvSettings, 'headers', 'translate');\n\n $methodName = 'getCsvRowHeaders' . Str::studly($headersType);\n $headers = $this->$methodName();\n return rtrim(implode($this->separator, $headers), $this->separator) . $this->endline;\n }",
"private function loadHeaderTable($name) {\n\t$template = $this->loadTemplate(\"templates/controls/grid/templateListHeader.txt\");\n\t$template = $this->replaceTemplateString($template, \"[scaffold-name]\", $name);\n\treturn $template;\n }",
"function generateTable($widths, $headers, $values)\n{\n\t$theTable = \"<table width=\\\"100%\\\">\\n\";\n\t$theTable = $theTable . \"<tr>\"; \n\n\t$table_column_width = \"\";\n\t$rowcounter = 0;\n\n\tforeach ( $headers as $table_cell )\n\t{ \n\t\tif ($widths != null)\n\t\t{\n\t\t\t$table_column_width = \" width=\\\"\".$widths[$rowcounter].\"\\\"\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<th class=\\\"tdHeader\\\"\".$table_column_width.\">$table_cell</th>\";\n\t\t$rowcounter++;\n\t} \n\n\t$theTable = $theTable . \"</tr>\\n\\t<tr>\";\n\n\t$count = count( $headers );\n\t$rowcounter = 0;\n\t$table_odd = \"1\";\n\n\tforeach ( $values as $table_value )\n\t{\n\t\tif ($rowcounter == $count) \n\t\t{\n\t\t\t$theTable = $theTable . \"</tr>\\n<tr>\";\n\t\t\t$rowcounter = 0;\n\t\t\tif ($table_odd == \"1\") \n\t\t\t{\n\t\t\t\t$table_odd = \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$table_odd = \"1\";\n\t\t\t}\n\t\t}\n\t\tif ($table_odd == \"1\") \n\t\t{\n\t\t\t$table_class = \"tdOdd\";\n\t\t} else\n\t\t{\n\t\t\t$table_class = \"tdEven\";\n\t\t}\n\n\t\t$theTable = $theTable . \"<td class=\\\"$table_class\\\" valign=\\\"top\\\">$table_value</td>\";\n\t\t$rowcounter++;\n\t}\n\t$theTable = $theTable . (\"</tr>\\n</table>\\n\");\n\treturn $theTable;\n}",
"function tableheader_close() {\n $this->doc .= '</th>';\n }",
"function table_table_row($values,$escape=false)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\tif (($escape) && ((!is_object($value)) || ($value->pure_lang!==true)))\n\t\t\t$value=make_string_tempcode(escape_html(is_object($value)?$value->evaluate():$value));\n\n\t\t$cells->attach(do_template('TABLE_TABLE_ROW_CELL',array('_GUID'=>'700a982eb2262149295816ddee91b0e7','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_ROW',array('_GUID'=>'a4efacc07ecb165e37c355559f476ae9','CELLS'=>$cells));\n}",
"protected function addheader($filename)\n {\n $excelObject = PHPExcel_IOFactory::load($filename);\n //$excelObject = new PHPExcel();\n $excelObject->getProperties()\n ->setCreator(\"Gemstracker\")\n ->setLastModifiedBy(\"Gemstracker\")\n ->setTitle($this->model->getName());\n\n $activeSheet = $excelObject->getActiveSheet();\n\n $columnHeaders = $this->getColumnHeaders();\n $row = 1;\n\n $exportName = $this->getName();\n\n $i=0;\n $cell = 'A1';\n foreach($columnHeaders as $columnName=>$columnHeader) {\n $column = $this->getColumn($i);\n $cell = $column . $row;\n if (isset($this->data[$exportName]) && isset($this->data[$exportName]['format']) && in_array('formatVariable', $this->data[$exportName]['format'])) {\n $activeSheet->setCellValue($cell, $columnHeader);\n } else {\n $activeSheet->setCellValue($cell, $columnName);\n }\n if ($excelCellSize = $this->model->get($columnName, 'excelCellSize')) {\n $activeSheet->getColumnDimension($column)->setWidth($excelCellSize);\n } else {\n $activeSheet->getColumnDimension($column)->setAutoSize(true);\n }\n $i++;\n }\n\n $activeSheet->getStyle(\"A1:$cell\")->getFont()->setBold(true);\n\n $objWriter = PHPExcel_IOFactory::createWriter($excelObject, \"Excel2007\");\n $objWriter->save($filename);\n }",
"function products_column_headers( $columns ) {\r\n\r\n // Creating the custom column header data\r\n $columns = array(\r\n 'cb' => '<input type=\"checkbox\" />',\r\n 'title' => __('Product Name'),\r\n 'Background Color' => __('Background Color')\r\n );\r\n\r\n // Returning the new columns\r\n return $columns;\r\n\r\n}",
"function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}",
"protected function processHeaderRow($row)\n {\n $found = array();\n $record = $this->record;\n foreach($row as $index => $colName)\n {\n $colName = trim($colName);\n foreach($record as $name => $params)\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n foreach($cols as $col)\n {\n if ($col == $colName)\n {\n if (isset($params['plus'])) $plus = $params['plus'];\n else $plus = 0;\n \n $this->map[$index + $plus] = $name;\n $found[$name] = true;\n }\n }\n }\n }\n\n // Make sure all required attributes found\n foreach($record as $name => $params)\n {\n if (isset($params['req']) && $params['req'])\n {\n if (!isset($found[$name]))\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n $cols = implode(' OR ',$cols);\n $this->errors[] = \"Missing $cols\";\n }\n }\n }\n }",
"function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }",
"public function _getJobsRowHeader($psSearchId = '')\n {\n $oHTML = CDependency::getComponentByName('display');\n $oPage = CDependency::getComponentByName('page');\n\n $sURL = $oPage->getUrl($this->csUid, CONST_ACTION_LIST, CONST_TA_TYPE_LIST_JOB, 0, array('searchId' => $psSearchId));\n\n $positionIdDesc = $sURL.'&sortfield=external_key&sortorder=desc';\n $positionIdAsc = $sURL.'&sortfield=external_key&sortorder=asc';\n\n $positionTitleDesc = $sURL.'&sortfield=slpd.title&sortorder=desc';\n $positionTitleAsc = $sURL.'&sortfield=slpd.title&sortorder=asc';\n\n $companyDesc = $sURL.'&sortfield=company_name&sortorder=desc';\n $companyAsc = $sURL.'&sortfield=company_name&sortorder=asc';\n\n $industryDesc = $sURL.'&sortfield=name&sortorder=desc';\n $industryAsc = $sURL.'&sortfield=name&sortorder=asc';\n\n $sHTML = \"\n\n <tr style='width:100%; class='list_row' >\n <th style='color:white; width:10%; padding-left:20px; font-size:11pt;' >\n <a style='font-size:11pt;' href='$positionIdDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-numeric-desc' aria-hidden='true'></i> \n </a>\n Position ID \n <a style='font-size:11pt;' href='$positionIdAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-numeric-asc' aria-hidden='true'></i></th>\n </a>\n <th style='color:white; width:40%; font-size:11pt; padding-left:290px;' >\n <a style='font-size:11pt;' href='$positionTitleDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-desc' aria-hidden='true'></i> \n </a>\n Position Title \n <a style='font-size:11pt;' href='$positionTitleAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-asc' aria-hidden='true'></i></th>\n </a>\n </th>\n <th style='color:white; width:20%; font-size:11pt; padding-left:110px;' >\n <a style='font-size:11pt;' href='$companyDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-desc' aria-hidden='true'></i> \n </a>\n Company \n <a style='font-size:11pt;' href='$companyAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-asc' aria-hidden='true'></i>\n </a>\n </th>\n <th style='color:white; width:20%; font-size:11pt; padding-left:70px;' >\n <a style='font-size:11pt;' href='$industryDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-desc' aria-hidden='true'></i> \n </a>\n Industry \n <a style='font-size:11pt;' href='$industryAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-asc' aria-hidden='true'></i> \n </a>\n </th>\n <th style='color:white; width:10%; font-size:11pt;' >Edit / Action</th>\n\n </tr>\n\n \";\n//<th align='left' style='color:white; width:10%; font-size:11pt;'>Action</th>\n /*$sHTML = $oHTML->getBlocStart('', array('class' =>'list_row '));\n $sHTML.= $oHTML->getBlocStart('', array('class' =>'list_row_data'));\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'float: left; width:4.2%;'));\n $sSortUrl = $sURL.'&sortfield=external_key&sortorder=desc';\n $sHTML.= $oHTML->getLink('Position ID', $sSortUrl);\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell left', 'style' => 'float: left; width:25%;'));\n $sHTML.= $oHTML->getText('Position Title ');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'width:20%;'));\n $sSortUrl = $sURL.'&sortfield=company_name&sortorder=asc';\n $sHTML.= $oHTML->getLink('Company', $sSortUrl);\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'width:20%;'));\n $sHTML.= $oHTML->getText('Industry');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'width:5%;'));\n $sHTML.= $oHTML->getText('Edit');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell','style' => 'width:5%;'));\n $sHTML.= $oHTML->getText('Action');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'floatHack'));\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocEnd();\n $sHTML.= $oHTML->getBlocEnd();*/\n\n return $sHTML;\n }"
] | [
"0.72085065",
"0.6674754",
"0.6447409",
"0.6413221",
"0.62979126",
"0.6216644",
"0.62077314",
"0.6166023",
"0.61543834",
"0.61455077",
"0.6122714",
"0.60276544",
"0.600498",
"0.59996784",
"0.597468",
"0.5974656",
"0.5974111",
"0.59692496",
"0.59381145",
"0.59037757",
"0.58981574",
"0.5885793",
"0.5865906",
"0.5856836",
"0.5850073",
"0.58433753",
"0.583508",
"0.58261716",
"0.57932335",
"0.57615966",
"0.5747143",
"0.5746709",
"0.57203954",
"0.5720261",
"0.56955266",
"0.56784654",
"0.567179",
"0.56693745",
"0.5658399",
"0.5638029",
"0.5625857",
"0.5623498",
"0.56227255",
"0.5620575",
"0.5573473",
"0.5567905",
"0.55460674",
"0.55391175",
"0.553352",
"0.55285513",
"0.55276716",
"0.5525865",
"0.5520766",
"0.5497804",
"0.5489425",
"0.54874706",
"0.5486976",
"0.5467876",
"0.5424103",
"0.54199123",
"0.54164267",
"0.54150605",
"0.54000133",
"0.53953207",
"0.5387616",
"0.53798753",
"0.53656733",
"0.53621453",
"0.5355944",
"0.5347577",
"0.5325725",
"0.5324744",
"0.5322869",
"0.5322582",
"0.5312297",
"0.5311094",
"0.5306246",
"0.5282124",
"0.52820677",
"0.52787405",
"0.52584857",
"0.5254063",
"0.52428365",
"0.5238481",
"0.52337193",
"0.5227756",
"0.52250105",
"0.52197784",
"0.52193654",
"0.5217094",
"0.5209612",
"0.5199436",
"0.51990473",
"0.51833564",
"0.51826847",
"0.5182251",
"0.5177464",
"0.51759017",
"0.51707274",
"0.5168271"
] | 0.60505193 | 11 |
Add header row element | public function addHeaderElement(HtmlTableRow $row)
{
$this->_createHeaderContainer();
$this->_thead->addElement($row);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addHeaderRowToCSV() {}",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}",
"public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"public function writeHeaderRow() {\n $headers = $this->getCSVHeaderRow();\n\n // write to the CSV\n fputcsv($this->newCSV, $headers);\n }",
"public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }",
"public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"function tableheader_close() {\n $this->doc .= '</th>';\n }",
"public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }",
"public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"function Table_Headers($header,$w)\r\n{\r\n //Colors, line width and bold font\r\n $this->SetFillColor(153,153,153);\r\n $this->SetTextColor(0);\r\n $this->SetDrawColor(128,0,0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('Arial','B','7');\r\n\t\r\n //Header\r\n\t\r\n\t//Output table header\r\n for($i=0;$i<count($header);$i++)\r\n $this->Cell($w[$i],5,$header[$i],1,0,'C',1);\r\n $this->Ln();\r\n}",
"private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo ' <img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\"> \n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}",
"private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}",
"private function makeTDHeader($type,$header): void {\r\n\t\t$str_d = ($this->bCollapsed) ? ' style=\"display:none\"' : '';\r\n\t\techo '<tr'.$str_d.'>\r\n\t\t\t\t<td class=\"dBug_clickable_row dBug_'.$type.'Key\">' . $header . '</td>\r\n\t\t\t\t<td>';\r\n\t}",
"public function addHeader()\n {\n }",
"function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}",
"public function renderHeaderCell()\n\t{\n\t\t$_headerOptions = ['class' => 'serial-column'];\n\t\tif ($this->grid->filterModel !== null && $this->grid->filterPosition !== \\yii\\grid\\GridView::FILTER_POS_HEADER)\n\t\t\t$_headerOptions['rowspan'] = '2';\n\n\t\t$this->headerOptions = ArrayHelper::merge($_headerOptions, $this->headerOptions);\n\t\treturn Html::tag('th', $this->renderHeaderCellContent(), $this->headerOptions);\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\t\tglobal $heading_name,$ORG_TITLE;\n\t\t\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 40);\n\t\t$worksheet->set_column(2, 2, 27);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 12);\n\t\t$worksheet->set_column(5, 5, 5);\n\t\t$worksheet->set_column(6, 6, 4);\n\t\t$worksheet->set_column(7, 7, 4);\n\t\t$worksheet->set_column(8, 8, 4);\n\t\t$worksheet->set_column(9, 9, 4);\n\t\t$worksheet->set_column(10, 10, 4);\n\t\t$worksheet->set_column(11, 11, 4);\n\t\t$worksheet->set_column(12, 12, 18);\n\t\t$worksheet->set_column(13, 13, 25);\n\t\t$worksheet->set_column(14, 14, 5);\n\t\t$worksheet->set_column(15, 15, 8);\n\t\t$worksheet->set_column(16, 16, 28);\n\t\t$worksheet->set_column(17, 17, 15);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 12);\n\t\t$worksheet->set_column(20, 20, 8);\n\t\t$worksheet->set_column(21, 21, 12);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"(1)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"(2)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"(3)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"(4)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"(5)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"(6)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"(7)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"(8)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"(9)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"(10)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"(11)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"(12)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 17,\"(13)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"(14)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"(15)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"(16)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"(17)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อส่วนราชการ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"เลข\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\",0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"L\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"พื้นที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"วุฒิการศึกษา/\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ประจำตัว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"เพศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"เกิด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"บรรจุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 12, \"หมวด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ชั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ส่วนกลาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"ปฏิบัติงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"ประกาศนียบัตร\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\n\t\t$worksheet->write($xlsRow, 20, \"ปีที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\t\t$worksheet->write($xlsRow, 21, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LR\", 0));\t\t\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"$ORG_TITLE\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"เขต/แขวง/ศูนย์\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"ประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ว\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ป\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"/ภูมิภาค\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"(จังหวัด)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"เฉพาะทาง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"ปัจจุบัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 20, \"เกษียณ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 1));\n\t\t$worksheet->write($xlsRow, 21, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 10);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, 2, 30);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 30);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 20);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 30);\n\t\t$worksheet->set_column(9, 9, 20);\n\t\t$worksheet->set_column(10, 10, 10);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"ชื่อ-สกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"สาขาวิชา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ระดับการศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"สถานศึกษา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"ประเทศ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ตำแหน่ง/ระดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ชื่อทุน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"ระยะเวลา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"จำนวนวัน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t}",
"function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}",
"private function makeTableHeader($type,$header,$colspan=2): void {\r\n\t\tif(!$this->bInitialized) {\r\n\t\t\t$header = ' (' . $header . ') ';\r\n\t\t\t$this->bInitialized = true;\r\n\t\t}\r\n\t\t$str_i = ($this->bCollapsed) ? 'style=\"font-style:italic\" ' : '';\r\n\t\t\r\n\t\techo '<table class=\"dBug_table dBug_'.$type.'\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th '.$str_i.' class=\"dBug_clickable_table dBug_' . $type . 'Header\" colspan=\"' . $colspan . '\">' . $header . '</th>\r\n\t\t\t\t</tr>';\r\n\t}",
"function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }",
"private function generate_columns_header($p_edit,&$p_resultat,&$p_result_header)\r\n\t\t{\r\n\t\t\t// Create a new line\r\n\t\t\t$html = '<tr id=\"tr_header_title_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Create the first column (checkbox and edit button)\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t$html .= '<td align=\"left\" id=\"header_th_0__'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"th0_'.$this->c_id.'\"></div></td>';\r\n\t\t\t$html .= '<td></td>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Quantify of order clause\r\n\t\t\t$qtt_order = $this->get_nbr_order();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Display the resize cursor or not\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t{\r\n\t\t\t\t$cursor = ' cur_resize';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$cursor = '';\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] != false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// An order clause is defined\r\n\t\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] == __ASC__)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// ASC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-ascend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// DESC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-descend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Display the number of order only if there is more than one order clause\r\n\t\t\t\t\t\t($qtt_order > 1) ? $order_prio = $this->c_columns[$key_col]['order_priority'] : $order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// No order clause defined\r\n\t\t\t\t\t\t$class_order = '';\r\n\t\t\t\t\t\t$order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Order column\r\n\t\t\t\t\t$html .= '<td class=\"__'.$this->c_theme.'_bloc_empty'.$class_order.'\"><span class=\"__vimofy_txt_mini_ vimofy_txt_top\">'.$order_prio.'</span></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t$lib_redim = $this->hover_out_lib(17,17);\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"vimofy_move_column_start(event,'.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = '';\r\n\t\t\t\t\t\t$ondblclick = '';\r\n\t\t\t\t\t\t$lib_redim = '';\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"click_column_order(\\''.$this->c_id.'\\','.$key_col.');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*===================================================================*/\r\n\r\n\t\t\t\t\t// Column title\r\n\t\t\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_h nowrap\" id=\"header_th_'.$key_col.'__'.$this->c_id.'\"><div '.$event.' class=\"align_'.$this->c_columns[$key_col]['alignment'].' __'.$this->c_theme.'_column_title\" id=\"th'.$key_col.'_'.$this->c_id.'\"><span id=\"span_'.$key_col.'_'.$this->c_id.'\">'.$this->c_columns[$key_col]['name'].'</span></div></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Display other column\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($p_edit != false) $html .= '<td style=\"padding:0;margin:0;\"></td>';\r\n\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t$html .= '<td id=\"right_mark_'.$key_col.'_'.$this->c_id.'\" '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Input for search on the column\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t// Create a new line\r\n\t\t\t$html .= '<tr id=\"tr_header_input_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t// Create the first column (checkbox and edit button)\r\n\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"thf0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__vimofy_version\" onclick=\"window.open(\\'vimofy_bugs\\');\">v'.$this->c_software_version.'</div></td>';\r\n\t\t\t\r\n\t\t\t// Id column display counter\r\n\t\t\t$id_col_display = 0;\r\n\t\t\t\r\n\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($id_col_display == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.$key_col.'_'.$this->c_id.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.($key_col).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(isset($this->c_columns[$key_col]))\r\n\t\t\t\t\t{*/\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Define the filter value\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t$state_filter_input = '';\r\n\t\t\t\t\t\tif(isset($val_col['filter']['input']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// A filter was defined by the user\r\n\t\t\t\t\t\t\t$filter_input_value = $val_col['filter']['input']['filter'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// No filter was defined by the user\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check if vimofy was in edit mode\r\n\t\t\t\t\t\t\tif($p_edit != false && !isset($val_col['rw_flag']) || ($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] != __FORBIDEN__))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// The vimofy was in edit mode, search all same value in the column\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\t\t\t\t\t\tif($this->c_obj_bdd->rds_num_rows($p_result_header) > 0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_result_header,0);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// TODO Use a DISTINCT QUERY - Vimofy 1.0\r\n\t\t\t\t\t\t\t\t$key_cold_line = 0;\r\n\t\t\t\t\t\t\t\t$last_value = '';\r\n\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_result_header))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif($key_cold_line > 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($last_value == $row[$val_col['sql_as']])\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\t\t\t// The value is not the same of the previous, stop browsing data \r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$last_value = $row[$val_col['sql_as']];\r\n\t\t\t\t\t\t\t\t\t$key_cold_line = $key_cold_line + 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif($flag_same)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = $last_value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] == __FORBIDEN__)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$state_filter_input = 'disabled';\t\t\t\t\t\t\t\t\t// Disable the input because the edition of column is forbiden\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isset($val_col['filter']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_on __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isset($val_col['lov']) && isset($val_col['is_lovable']) && $val_col['is_lovable'] == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_lovable __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(isset($val_col['lov']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_no_icon __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Menu button oncontextmenu\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\tif($this->c_type_internal_vimofy == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Principal vimofy, diplay internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'vimofy_display_internal_vim(\\''.$this->c_id.'\\',__POSSIBLE_VALUES__,'.$key_col.');return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Internal vimofy, doesn't display other internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td id=\"th_1_c'.$key_col.'_'.$this->c_id.'\" class=\"__vimofy_unselectable\" style=\"width:20px;\"><div style=\"width:20px;margin:0;\" '.$this->hover_out_lib(21,21).' oncontextmenu=\"'.$oncontextmenu.'\" class=\"'.$class_btn_menu.'\" onclick=\"vimofy_toggle_header_menu(\\''.$this->c_id.'\\','.$key_col.');\" id=\"th_menu_'.$key_col.'__'.$this->c_id.'\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_2_c'.$key_col.'_'.$this->c_id.'\" align=\"left\" class=\"__'.$this->c_theme.'__cell_h\">';\r\n\t\t\t\t\t\t$html .= '<div style=\"margin:0 3px;\"><input value=\"'.str_replace('\"','"',$filter_input_value).'\" class=\"__'.$this->c_theme.'__input_h full_width\" '.$state_filter_input.' id=\"th_input_'.$key_col.'__'.$this->c_id.'\" type=\"text\" style=\"margin: 2px 0;\" size=1 onkeyup=\"if(document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\'))document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\').checked=true;vimofy_input_keydown(event,this,\\''.$this->c_id.'\\','.$key_col.');\" onchange=\"vimofy_col_input_change(\\''.$this->c_id.'\\','.$key_col.');\"/></div>';\r\n\t\t\t\t\t\tif($p_edit != false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($state_filter_input == '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:10px;padding:0;margin:0;\"><input '.$this->hover_out_lib(76,76).' type=\"checkbox\" id=\"chk_edit_c'.$key_col.'_'.$this->c_id.'\" style=\"height:11px;width:11px;margin: 0 5px 0 2px;display:block;\"/></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:0;padding:0;margin:0;\"></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_3_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_4_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$id_col_display = $id_col_display + 1;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$html .= '<td id=\"th_0_c'.($key_col+1).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t$html.= '<td><div style=\"width:200px\"></div></td>';\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\r\n\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\tif($this->c_obj_bdd->rds_num_rows($p_resultat) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_resultat,0);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}",
"public function headingRow(): int\n {\n return 1;\n }",
"function print_header(){\n\t\tglobal $worksheet, $xlsRow, $COM_LEVEL_SALP;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 20);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 50);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 15);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 15);\n\t\t$worksheet->set_column(8, 8, 35);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"เลขประจำตัวประชาชน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"ชื่อ-นามสกุล\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"ตำแหน่ง/สังกัด\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"เลขที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"เงินตอบแทน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLR\", 0));\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ที่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 3, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 4, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 5, \"ที่เต็มขั้น\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 6, \"ร้อยละ 2 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 7, \"ร้อยละ 4 (บาท)\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}",
"public function addHeaderArray(array $header) {\n $this->headers = $header;\n foreach ($header as $key => $cell) {\n if (!($cell instanceof HTMLTableHeaderCell)) {\n $cell = new HTMLTableHeaderCell($cell);\n }\n $this->headers[$key] = $cell;\n $this->addView($cell);\n }\n return $this;\n }",
"private function generateHeading()\n {\n //get current dimensions\n\t\t$highestRow = $this->objWorksheet->getHighestRow(); // e.g. 10\n\t\t$highestColumn = $this->objWorksheet->getHighestColumn(); // e.g 'F'\n\n\t\t$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);\n\n\t\t//insert row on top\n\t\t$this->objWorksheet->insertNewRowBefore(1,2);\n\n\t\t//merge cells\n\t\t$this->objWorksheet->mergeCells(\"A1:\".$highestColumn.\"1\");\n\n\t\t//set the text for header\n\t\t$this->objWorksheet->setCellValue(\"A1\", $this->_headingText);\n\t\t$this->objWorksheet->getStyle('A1')->getAlignment()->setWrapText(true);\n\t\t$this->objWorksheet->getRowDimension('1')->setRowHeight(48);\n\n //Apply style\n\t\t$this->objWorksheet->getStyle(\"A1\")->applyFromArray($this->_headingStyleArray);\n }",
"function html_generate_row($row, $prepend, $heading=false) {\n $html = '<tr>';\n if ($prepend !== null) {\n $html .= '<th>'.$prepend.'</th>';\n }\n for ($i=0; $i <= count($row)-1; $i++) {\n if (!$heading) {\n $html .= '<td>'.round($row[$i], 1).'</td>';\n } else {\n $html .= '<th>'.round($row[$i], 1).'</th>';\n }\n }\n $html .= '</tr>';\n return $html;\n}",
"function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }",
"private function setHeader($data)\n {\n $this->headers = array_map('self::formatString', $data[0]);\n array_unshift($this->headers, 'row');\n }",
"function addHeaderLine($name, $value) {\n\t\t$this->headerLines [$name] = $value;\n\t}",
"public function createHeader($columns)\n {\n $html = \"<tr>\";\n\n \n foreach ($columns as $column) {\n $html .= \"<th>\".$column['label'].\"</th>\";\n }\n $html .= \"</tr>\";\n return $html; \n }",
"function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}",
"function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }",
"private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th> </th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }",
"function showHeader(){\n\t\t$header = \"\";\n\t\t// print the header row\n\t\t$header .= \"\t<tr>\\n\";\n\t\t// loop the fields\n\t\tforeach ($this->fields as $field) {\n\t\t\t// print each field\n\t\t\t$header .= \"\t\t<th>\".$field.\"</th>\\n\";\n\t\t}\n\t\t// end the header row\n\t\t$header .= \"\t</tr>\\n\";\n\t\treturn $header;\n\t}",
"function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}",
"protected function _createHeaderContainer()\n\t{\n\t\tif ($this->_thead == null) {\n\t\t\t$this->_thead = new HtmlElement('thead');\n\t\t\t$this->addElement($this->_thead);\n\t\t}\t\t\n\t}",
"protected function draw_groupsHeaderHorizontal()\n {\n // $this->output->setColumnNo(0);\n $lastcolumno = $this->output->getColumnNo();\n $this->output->setColumnNo(0);\n $this->draw_groupsHeader();\n $this->output->setColumnNo($lastcolumno);\n $this->currentRowTop = $this->output->getLastBandEndY();\n \n //output print group\n //set callback use next page instead\n // echo 'a'; \n }",
"protected function tableHead($header, $border) {\n $width = 15;\n $height = 12;\n \n foreach($header as $col) {\n $this->Cell($width, $height, $col, $border);\n }\n $this->Ln();\n }",
"function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}",
"private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }",
"abstract protected function getRowsHeader(): array;",
"public function Header()\r\n\t{\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14);\r\n\t\t$this->Cell(170,7,\"Date :: \". $this->today_date ,1,0,'C');\r\n\t\t$this->Ln();\r\n\t\t$this->SetFont('Arial','',14); \r\n\t\t$this->MultiCell(170,8,\"Room Things Report \\n\".$this->title,1,'C');\r\n\t\t$this->Ln(5);\r\n\r\n\t}",
"private function createHeaders($headers) {\r\n $html = '<tr class=\"ctable-headertag\">';\r\n foreach ($headers as $index => $header) {\r\n $html .= '<th>' . $header . '</th>';\r\n }\r\n $html .= '</tr>';\r\n return $html;\r\n\r\n }",
"public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }",
"public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }",
"static function generateTableHeaderHTML($a_div)\n\t{\n\t\techo \"<tr class='inTableRow'>\\n\";\n//\t\techo \"<th class='inTableColTaskID'>Task ID</th>\\n\";\n\t\techo \"<th class='inTableColTaskName'>{$a_div}</th>\\n\";\n\t\techo \"<th>Subcontractor</th>\\n\";\n\t\techo \"<th class='chTableColAmount'>Amount</th>\\n\";\n\t\techo \"<th>Notes</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"function header (){\n\t\t$this->setfont('Arial','B', 16);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');\n\t\t$this->Ln(10);\n\t\t$this->setfont('Arial','',12);\n\t\t$this->settextcolor(0, 0, 0);\n\t\t$this->cell(0, 10, 'INFORMATION',0, 0, 'C');\n\t\t$this->Ln(30);\n\t}",
"public function add_header() {\n }",
"function _webform_csv_headers_file($component) {\r\n $header = array();\r\n // Two columns in header.\r\n $header[0] = array('', '');\r\n $header[1] = array($component['name'], '');\r\n $header[2] = array(t('Name'), t('Filesize (KB)'));\r\n return $header;\r\n}",
"public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }",
"function create_devs_header()\n{\n$header =\n \"<thead>\n \t<tr>\n \t<th scope='col' class='rounded-company'>GPU #</th>\n <th scope='col' class='rounded-q1'>En</th>\n <th scope='col' class='rounded-q1'>Status</th>\n <th scope='col' class='rounded-q1'>Temp</th>\n <th scope='col' class='rounded-q1'>Fan Speed</th>\n <th scope='col' class='rounded-q1'>GPU Clk</th>\n <th scope='col' class='rounded-q1'>Mem Clk</th>\n <th scope='col' class='rounded-q1'>Volt</th>\n <th scope='col' class='rounded-q1'>Active</th>\n <th scope='col' class='rounded-q1'>MH/s 5s</th>\n <th scope='col' class='rounded-q1'>MH/s avg</th>\n <th scope='col' class='rounded-q1'>Acc</th>\n <th scope='col' class='rounded-q1'>Rej</th>\n <th scope='col' class='rounded-q1'>H/W Err</th>\n <th scope='col' class='rounded-q1'>Util</th>\n <th scope='col' class='rounded-q1'>Intens</th>\n </tr>\n </thead>\";\n \n return $header;\n}",
"public function addHeader($values)\n\t{\n\t\t$this->_checkArgumentIsArray(__METHOD__, 1, $values);\n\t\t\n\t\t$row = $this->createHeader($values);\n\t\t$this->addHeaderElement($row);\n\t\treturn $row;\n\t}",
"function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }",
"private function writeHeader(): void\n {\n $record = 0x0014; // Record identifier\n\n /* removing for now\n // need to fix character count (multibyte!)\n if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) {\n $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string\n } else {\n $str = '';\n }\n */\n\n $recordData = StringHelper::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader());\n $length = strlen($recordData);\n\n $header = pack('vv', $record, $length);\n\n $this->append($header . $recordData);\n }",
"function table_begin($p_headrow, $p_class = '', $p_tr_attr = '', $p_th_attr = array()){\n\techo '<table class=\"table ' . $p_class . '\">';\n\techo '<thead>';\n\techo '<tr ' . $p_tr_attr . '>';\n\t\n\tfor($t_i=0; $t_i<count($p_headrow); $t_i++)\n\t\techo '<th ' . (isset($p_th_attr[$t_i]) ? $p_th_attr[$t_i] : '') . '>' . $p_headrow[$t_i] . '</th>';\n\n\techo '</tr>';\n\techo '</thead>';\n}",
"public function addHeader(array $values) {\n if (!empty($values)) {\n $values = $this->prepareValues($values);\n $this->addRowToCsvData($values);\n }\n }",
"protected function renderTableHeader(): string\n {\n if (!$this->options['showHeader']) {\n return '';\n }\n\n return\n '<thead>' .\n '<tr>' .\n '<th>' . $this->_('differences') . '</th>' .\n '</tr>' .\n '</thead>';\n }",
"function tablethead_open() {\n $this->doc .= DOKU_TAB.'<thead>'.DOKU_LF;\n }",
"function draw_header(){\r\n\t\t$out_multiple_search='';\r\n\r\n\t\t$arr_width=explode(',',$this->width);\r\n\t\t$out='<thead><tr id=\"'.$this->id.'_sort\">';\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t$column=1;\r\n\t\tfor($i=0; $i<count($arr_header);$i++){\r\n\r\n\t\t\tif($this->sort_init!==false and $this->sort_init[$i]!='f'){\r\n\t\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').' onclick=\"'.$this->change_tags($this->get_url($i+1)).'\"><span'.($arr_sort[$i]=='f' ? ' class=\"no_sort' : ' class=\"sort').(substr($arr_sort[$i],-1)=='a' ? '_asc' : (substr($arr_sort[$i],-1)=='d' ? '_desc' : '')).'\"></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}else{\r\n\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').'><span></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}\r\n\r\n\t\t\tif($this->multiple_search_init===true or $this->multiple_search_init=='hide' or (strpos($this->multiple_search_init,'hide')!==false and $this->multiple_search_init[$i]=='t') or $this->multiple_search_init[$i]=='t')\r\n\t\t\t\t$out_multiple_search.='<th><input type=\"text\" id=\"'.$this->id.'_multiple_search'.($i+1).'\" name=\"'.$this->id.'_multiple_search[]'.'\" value=\"'.$this->multiple_search[$i].'\" onkeyup=\"ctMultiSearch(\\''.$this->id.'\\');\" /></a></th>';\r\n\t\t\telse\r\n\t\t\t\t$out_multiple_search.='<th></th>';\r\n\t\t}\r\n\r\n\r\n\t\t$out.='</tr>';\r\n\r\n\t\tif($this->multiple_search_init===true or strpos($this->multiple_search_init,'hide')!==false or strpos($this->multiple_search_init,'t')!==false)\r\n\t\t\t$out.='<tr id=\"'.$this->id.'_multiple_search\"'.(($this->multiple_search_init!==true and strpos($this->multiple_search_init,'hide')!==false) ? ' style=\"display: none;\"' : '').'>'.$out_multiple_search.'</tr>';\r\n\r\n\t\t$out.'</thead>';\r\n\r\n\t\treturn $out;\r\n\t}",
"function generateTitle($header, $data)\n\t{\n\t\t$this->SetFillColor(63,73,204);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetDrawColor(18,0,0);\n\t\t$this->SetLineWidth(.1);\n\t\t$this->SetFont('','B');\n\t\t// Header\n\t\t$w = array(70, 25, 30, 20,30,35,25);\n\t\tfor($i=0;$i<count($header);$i++)\n\t\t\t$this->Cell($w[$i],7,$header[$i],1,0,'C',true);\n\t\t$this->Ln();\n\t\t// Color and font restoration\n\t\t$this->SetFillColor(224,235,255);\n\t\t$this->SetTextColor(0);\n\t\t$this->SetFont('');\n\t\t// Data\n\t\t$fill = false;\n\t\tforeach($data as $row)\n\t\t{\n\t\t\t$this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);\n/*\t\t\t$this->Cell($w[1],6,$row[1],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[2],6,$row[2],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[3],6,$row[3],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[4],6,$row[4],'LR',0,'C',$fill);\n\t\t\t$this->Cell($w[5],6,$row[5],'LR',0,'C',$fill);*/\n\t\t\t$this->Ln();\n\t\t\t$fill = !$fill;\n\t\t}\n\t\t// Closing line\n\t\t$this->Cell(array_sum($w),0,'','T');\n\t}",
"function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }",
"function tableheader_open($colspan = 1, $align = null, $rowspan = 1, $classes = null) {\n $class = 'class=\"col'.$this->_counter['cell_counter']++;\n if(!is_null($align)) {\n $class .= ' '.$align.'align';\n }\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $class .= '\"';\n $this->doc .= '<th '.$class;\n if($colspan > 1) {\n $this->_counter['cell_counter'] += $colspan - 1;\n $this->doc .= ' colspan=\"'.$colspan.'\"';\n }\n if($rowspan > 1) {\n $this->doc .= ' rowspan=\"'.$rowspan.'\"';\n }\n $this->doc .= '>';\n }",
"public function addHeader($header);",
"function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}",
"public function pi_list_header() {}",
"public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }",
"public function csvHeaderRow()\n {\n static $columns;\n\n if ($columns === null) {\n $columns = [ 'source' ];\n $languages = $this->languages();\n foreach ($languages as $lang) {\n $columns[] = $lang;\n }\n\n $columns[] = 'context';\n }\n\n return $columns;\n }",
"protected function addheader($filename)\n {\n $excelObject = PHPExcel_IOFactory::load($filename);\n //$excelObject = new PHPExcel();\n $excelObject->getProperties()\n ->setCreator(\"Gemstracker\")\n ->setLastModifiedBy(\"Gemstracker\")\n ->setTitle($this->model->getName());\n\n $activeSheet = $excelObject->getActiveSheet();\n\n $columnHeaders = $this->getColumnHeaders();\n $row = 1;\n\n $exportName = $this->getName();\n\n $i=0;\n $cell = 'A1';\n foreach($columnHeaders as $columnName=>$columnHeader) {\n $column = $this->getColumn($i);\n $cell = $column . $row;\n if (isset($this->data[$exportName]) && isset($this->data[$exportName]['format']) && in_array('formatVariable', $this->data[$exportName]['format'])) {\n $activeSheet->setCellValue($cell, $columnHeader);\n } else {\n $activeSheet->setCellValue($cell, $columnName);\n }\n if ($excelCellSize = $this->model->get($columnName, 'excelCellSize')) {\n $activeSheet->getColumnDimension($column)->setWidth($excelCellSize);\n } else {\n $activeSheet->getColumnDimension($column)->setAutoSize(true);\n }\n $i++;\n }\n\n $activeSheet->getStyle(\"A1:$cell\")->getFont()->setBold(true);\n\n $objWriter = PHPExcel_IOFactory::createWriter($excelObject, \"Excel2007\");\n $objWriter->save($filename);\n }",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<p class=left>Description:</p>\\n\";\n\t}",
"function addHeadElement($include) {\n\t $this->_headSection .= $include . \"\\n\";\n\t}",
"function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}",
"function renderHeader(&$header)\n {\n if ($name = $header->getName()) {\n $this->_ary['header'][$name] = $header->toHtml();\n } else {\n $this->_ary['header'][$this->_sectionCount] = $header->toHtml();\n }\n $this->_currentSection = $this->_sectionCount++;\n }",
"function showTableHeader($phaseName) {\n?>\n\t<table>\n\t\t<colgroup>\n\t\t\t<col width='4%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='15%'>\n\t\t\t<col width='5%'>\n\t\t\t<col width='23%'>\n\t\t\t<col width='10%'>\n\t\t\t<col width='23%'>\n\t\t\t<!--<col width='10%'>\n\t\t\t<col width='*'>-->\n\t\t</colgroup>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th>#</th>\n\t\t\t\t<th>Datum/Zeit</th>\n\t\t\t\t<th>Ort</th>\n\t\t\t\t<?php echo ($phaseName == 'Gruppenphase') ? \"<th>Grp</th>\" : \"<th></th>\" ?>\n\t\t\t\t<th colspan='3'>Resultat</th>\n\t\t\t\t<!--<th>Tipp</th>\n\t\t\t\t<th>Pkt</th>-->\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n<?php\n}",
"public function addTableHeader($data, $params = array(), $cell_end = 'H') {\n // offset\n $offset = 0;\n if (isset($params['offset']))\n $offset = is_numeric($params['offset']) ? (int)$params['offset'] : PHPExcel_Cell::columnIndexFromString($params['offset']);\n\n // font name\n if (isset($params['font']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setName($params['font']);\n\n // font size\n if (isset($params['size']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setSize($params['size']);\n\n // bold\n if (isset($params['bold']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setBold($params['bold']);\n\n // italic\n if (isset($params['italic']))\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getFont()->setItalic($params['italic']);\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($this->_row)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle(sprintf('A3:%s3', $cell_end))->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // set internal params that need to be processed after data are inserted\n $this->_tableParams = array(\n 'header_row' => $this->_row,\n 'offset' => $offset,\n 'row_count' => 0,\n 'auto_width' => array(),\n 'filter' => array(),\n 'wrap' => array(),\n 'horizontal' => false,\n 'fill_color' => false,\n 'text_color' => false,\n );\n\n if( !empty($data) ) {\n foreach ($data as $d) {\n $child = Common::hashEmptyField($d, 'child');\n\n // set label\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($offset, $this->_row, $d['label']);\n\n // set width\n if (isset($d['width']) && is_numeric($d['width']))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($offset)->setWidth((float)$d['width']);\n else\n $this->_tableParams['auto_width'][] = $offset;\n\n // filter\n if (isset($d['filter']) && $d['filter'])\n $this->_tableParams['filter'][] = $offset;\n\n // wrap\n if (isset($d['wrap']) && $d['wrap'])\n $this->_tableParams['wrap'][] = $offset;\n\n // fill color\n if (isset($d['fill_color']) && $d['fill_color'])\n $this->_tableParams['fill_color'][] = $offset;\n\n // text color\n if (isset($d['text_color']) && $d['text_color'])\n $this->_tableParams['text_color'][] = $offset;\n\n if( !empty($child) ) {\n $childRow = $this->_row+1;\n\n if( !isset($childOffset) ) {\n $childOffset = $offset;\n }\n\n foreach ($child as $key => $val) {\n $label = Common::hashEmptyField($val, 'label');\n $width = Common::hashEmptyField($val, 'width');\n\n $childOffsetAcii = 1+$childOffset;\n $childOffsetAcii = Common::getNameFromNumber($childOffsetAcii);\n $childPosition = sprintf('%s%s:%s%s', $childOffsetAcii, $childRow, $childOffsetAcii, $childRow);\n\n $this->_xls->getActiveSheet()->setCellValueByColumnAndRow($childOffset, $childRow, $label);\n \n if (isset($width) && is_numeric($width))\n $this->_xls->getActiveSheet()->getColumnDimensionByColumn($childOffset)->setWidth((float)$width);\n else\n $this->_tableParams['auto_width'][] = $childOffset;\n\n // text color\n if (isset($params['text_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFont()->getColor()->setRGB($params['text_color']);\n }\n\n // fill color\n if (isset($params['fill_color'])) {\n $this->_xls->getActiveSheet()->getStyle($childPosition)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB($params['fill_color']);\n }\n\n // horizontal\n if (isset($params['horizontal'])) {\n $this->_xls->getActiveSheet()->getStyle($childRow)->getAlignment()->setHorizontal($params['horizontal']);\n }\n\n $childOffset++;\n }\n }\n\n if( !empty($d['rowspan']) ) {\n $rowspan = $d['rowspan']-1;\n $default = 1+$offset;\n $row = $this->_row;\n $cell_end = $row+$rowspan; // Acii A\n\n $default = Common::getNameFromNumber($default);\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $default, $cell_end));\n // $this->_row += $rowspan;\n // $offset++;\n }\n if( !empty($d['colspan']) ) {\n $colspan = $d['colspan']-1;\n $default = 1+$offset;\n $dimensi = $default+$colspan; // Acii A\n $row = $this->_row;\n\n $default = Common::getNameFromNumber($default);\n $cell_end = Common::getNameFromNumber($dimensi);\n\n $this->_xls->getActiveSheet()->mergeCells(__('%s%s:%s%s', $default, $row, $cell_end, $row));\n \n $offset += $colspan;\n // $this->_row ++;\n }\n\n $offset++;\n }\n }\n\n $child = Set::extract('/child', $data);\n\n if ( !empty($child) ) {\n $this->_row++;\n }\n \n $this->_row++;\n\n return $this;\n }",
"function krnEmit_reportTitleRow($appEmitter, $title, $colSpan) {\n $s1 = '<div class=\"draff-report-top-left\"></div>';\n $s2 = '<div class=\"draff-report-top-middle\">'.$title.'</div>';\n $s3 = '<div class=\"draff-report-top-right\">'.draff_dateTimeAsString(rc_getNow(),'M j, Y' ).'</div>';\n $appEmitter->row_start();\n $appEmitter->cell_block($s1 . $s2 . $s3 ,'draff-report-top', 'colspan=\"'.$colSpan.'\"');\n $appEmitter->row_end();\n}",
"function Header() {\n $this->SetFont('Helvetica', 'B', 18);\n //Judul dalam bingkai\n $this->Cell(0, 5, 'Daftar Hasil Seleksi Calon Siswa Baru', 0, 1, 'C');\n $this->SetFont('Helvetica', 'B', 16);\n $this->Cell(0, 15, 'Sekolah Dasar', 0, 0, 'C');\n //Ganti baris\n $this->Ln(20);\n }",
"public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}",
"private function setHeader(RowIterator $rowIterator): void\n {\n $rowIterator->rewind();\n\n $row = $rowIterator->current();\n\n if (! $row instanceof Row) {\n return;\n }\n\n $this->frame->setHeader(\n $this->makeRow(\n $row->getCells()\n )\n );\n }",
"function os2forms_nemid_webform_csv_headers_component($component, $export_options) {\n $header = array();\n $header[0] = '';\n $header[1] = '';\n $header[2] = $export_options['header_keys'] ? $component['form_key'] : $component['name'];\n return $header;\n}",
"protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }",
"function render_table_header_footer($orderBy, $order) {\n?>\n\t\t<tr>\n<?php\n\t\t\t$this->render_th('title', 'Title', $orderBy, $order); \n\t\t\t$this->render_th('date', 'Date', $orderBy, $order); \n\t\t\t$this->render_th('facilitators', 'Facilitators', $orderBy, $order); \n\t\t\t$this->render_th('categories', 'Categories', $orderBy, $order); \n?>\n\t\t</tr>\n<?php\n\t}",
"public function printTableHeader($open)\n {\n\n print \"<tr>\\n\";\n print \"<th> \";\n print \" Admin Email\";\n print \" </th>\";\n print \"<th> \";\n print \" Level\";\n print \" </th>\";\n if (!$open)\n print \"</tr>\\n\";\n }",
"private function createFileHeadings() {\n\t\t// Allow other plugins to add their own column headers\n\t\t$headings = elgg_trigger_plugin_hook('row:headers', 'userexport', array(), $this->fields);\n\n\t\t// Attempt to translate the fields\n\t\tforeach ($headings as $key => $field) {\n\t\t\t$lang_string = \"profile:{$field}\";\n\t\t\t$heading = elgg_echo($lang_string);\n\n\t\t\t// No translation was found, fall back to the original string\n\t\t\tif ($heading === $lang_string) {\n\t\t\t\t$heading = elgg_echo($field);\n\t\t\t}\n\n\t\t\t$headings[$key] = $heading;\n\t\t}\n\n\t\t$this->writeToCSV($headings);\n\t}",
"function tablethead_close() {\n $this->doc .= DOKU_TAB.'</thead>'.DOKU_LF;\n }",
"function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }",
"protected function makeHeader()\n {\n }",
"function _webform_csv_headers_email($component) {\r\n $header = array();\r\n $header[0] = '';\r\n $header[1] = '';\r\n $header[2] = $component['name'];\r\n return $header;\r\n}",
"function Header()\n{\n $this->SetFont('Arial','B',15);\n // Move to the right\n $this->Cell(80);\n // Framed title\n\t$this->SetDrawColor(0,80,180);\n $this->SetFillColor(230,230,0);\n $this->SetTextColor(220,50,50);\n // Thickness of frame (1 mm)\n $this->SetLineWidth(1);\n\t$this->Cell($w,9,$title,1,1,'C',true);\n $this->Cell(30,10,'Title',1,0,'C');\n // Line break\n $this->Ln(40);\n}",
"protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }",
"public function getCSVHeaderRow() {\n return [\n 'link_title',\n 'link_layout',\n 'link_location',\n 'content_type',\n 'link_count',\n 'link_clicked',\n 'clicked',\n 'os',\n 'device',\n 'device_brand',\n 'device_model',\n 'browser_type',\n 'browser_name',\n 'browser_version',\n 'site',\n 'page_url',\n 'referrer',\n 'paragraphs',\n 'displayed_url_1',\n 'displayed_url_2',\n 'displayed_url_3',\n 'displayed_url_4',\n 'displayed_url_5',\n 'time_logged',\n 'time_updated',\n 'user_id',\n 'browser',\n 'row'\n ];\n }",
"function Header()\n\t{\n\t\t$this->Image('../imagenes/logo.jpg',15,10,40);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->SetXY(70,15)\t;\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','L');\n\t//\t$this->MultiCell(190,5,\"CABLE, C.A.\",'0','L');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->SetX(70)\t;\n\t\t$this->MultiCell(190,5,strtoupper(_(tipo_serv())),'0','L');\n\t\t//$this->Ln(8);\n\t}",
"function Header()\n\t\t{\n\t\t\t$this->SetFont('Helvetica','B',18);\n\t\t\t$this->SetTextColor(184,10,10);\n\t\t\t$this->Cell(30);\n\t\t\t$this->Cell(120,10,utf8_decode(\"Mensajes Contestados\"),0,0,'C');\n\t\t\t$this->Ln(20);\n\t\t}",
"function RowHeadFoot($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h);\n //Print the text\n $this->SetFont('Arial', 'B', 7);\n $this->SetFillColor(203, 203, 203);\n $this->MultiCell($w, 5, $data[$i], 1, $a, true);\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h);\n }",
"public function makeTable($header, $data) {\n $this->SetFillColor(255, 0, 0);\n $this->SetTextColor(255);\n $this->SetDrawColor(128, 0, 0);\n $this->SetLineWidth(.3);\n $this->SetFont('', 'B');\n // Header\n $w = array(10, 25, 40, 10, 25, 15, 60, 10, 10, 10, 10, 10, 10, 10, 10, 10);\n for ($i = 0; $i < count($header); $i++)\n if ($i == 0) {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);\n } else {\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'L', true);\n }\n $this->Ln();\n // Color and font restoration\n $this->SetFillColor(224, 235, 255);\n $this->SetTextColor(0);\n $this->SetFont('');\n // Data\n $fill = false;\n\n foreach ($data as $row) {\n $this->nr++;\n $this->Cell($w[0], 6, $this->nr, 'LR', 0, 'C', $fill);\n $this->Cell($w[1], 6, $row['article'], 'LR', 0, 'L', $fill);\n $this->Cell($w[2], 6, $row['brand'], 'LR', 0, 'L', $fill);\n $this->Cell($w[3], 6, $row['inch'], 'LR', 0, 'L', $fill);\n $this->Cell($w[4], 6, $row['size'], 'LR', 0, 'L', $fill);\n $this->Cell($w[5], 6, $row['lisi'], 'LR', 0, 'L', $fill);\n $this->Cell($w[6], 6, $row['design'], 'LR', 0, 'L', $fill);\n $this->Cell($w[7], 6, $row['onhand'], 'LR', 0, 'C', $fill);\n $this->Cell($w[8], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[9], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[10], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[11], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[12], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[13], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[14], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Cell($w[15], 6, \"\", 'LR', 0, 'C', $fill);\n $this->Ln();\n $fill = !$fill;\n }\n // Closing line\n $this->Cell(array_sum($w), 0, '', 'T');\n }",
"protected function setHeaders()\n {\n $row = 1; \n $this->objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true);\n \n $mergeCells = 'A' . $row . ':' . 'E' . $row;\n $this->setCellValue('A' . $row, \"Differences between files.\");\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getFont()->setBold(true);\n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n $this->objPHPExcel->getActiveSheet()->getRowDimension($row)->setRowHeight(25);\n $this->objPHPExcel->getActiveSheet()->getStyle($mergeCells)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Comparing by: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'C' . $row;\n $this->setCellValue('B' . $row, $this->getCompareTypeLabel()); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n \n $row++;\n $cell = 'A' . $row;\n $this->setCellValue($cell, \"Configuration: \");\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n \n $mergeCells = 'B' . $row . ':' . 'M' . $row;\n $this->setCellValue('B' . $row, $this->settings['configuration']); \n $this->objPHPExcel->getActiveSheet()->mergeCells($mergeCells);\n \n $row += 5;\n $columns = $this->getColumns(); \n foreach ($columns as $columnName => $column) {\n $cell = $columnName . $row;\n $this->setCellValue($cell, $column['title']);\n $this->objPHPExcel->getActiveSheet()->getColumnDimension($columnName)->setAutoSize(true);\n $this->objPHPExcel->getActiveSheet()->getStyle($cell)->getFont()->setBold(true);\n }\n \n return $row;\n }"
] | [
"0.7692292",
"0.712604",
"0.7125858",
"0.70332825",
"0.69570416",
"0.69057786",
"0.68878156",
"0.68810683",
"0.68019676",
"0.6754671",
"0.66745335",
"0.6660335",
"0.66567206",
"0.66486377",
"0.66272867",
"0.6618329",
"0.6592501",
"0.6578868",
"0.6541822",
"0.654087",
"0.6540089",
"0.6519953",
"0.65189195",
"0.65034914",
"0.64570457",
"0.64347345",
"0.6418624",
"0.6394077",
"0.6380496",
"0.63706565",
"0.6369139",
"0.6351685",
"0.63301617",
"0.6329301",
"0.63258505",
"0.6320509",
"0.63117176",
"0.63019776",
"0.6301908",
"0.6301647",
"0.6277691",
"0.6277015",
"0.62677854",
"0.6240194",
"0.62388337",
"0.6229213",
"0.62255037",
"0.6223841",
"0.62102646",
"0.6199509",
"0.6187754",
"0.6185987",
"0.6178483",
"0.61648875",
"0.6155282",
"0.6151544",
"0.613354",
"0.6130762",
"0.61208194",
"0.61204517",
"0.61199766",
"0.61171573",
"0.61132836",
"0.6106523",
"0.6103436",
"0.60962564",
"0.6090675",
"0.60885304",
"0.6087591",
"0.6086209",
"0.606988",
"0.6036849",
"0.60353446",
"0.60322857",
"0.6026927",
"0.59858686",
"0.5980224",
"0.5975467",
"0.59623176",
"0.59521556",
"0.59506905",
"0.5945953",
"0.59428906",
"0.593931",
"0.59208494",
"0.59160125",
"0.59109163",
"0.5898248",
"0.58919746",
"0.58838606",
"0.58838",
"0.58828026",
"0.5880463",
"0.58739436",
"0.5873099",
"0.58710694",
"0.5861719",
"0.58588624",
"0.58554894",
"0.58549327"
] | 0.72553575 | 1 |
Get element of body container | public function getRowsContainer()
{
return $this->_tbody;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBodyElement()\n {\n return $this->body;\n }",
"public function getWrapperElement();",
"protected function get_body_node() {\n\t\t_deprecated_function( 'Use $this->dom->body instead', '1.5.0' );\n\t\treturn $this->dom->body;\n\t}",
"abstract protected function get_root_element();",
"public function getHtmlElement()\n {\n return $this->htmlElement;\n }",
"public function getBodyTag() {}",
"public function getElement()\n {\n return $this->element;\n }",
"public function getBody()\n {\n return $this->getAttribute('body', false, null);\n }",
"public function getElement()\n\t{\n\t\treturn $this->_element;\n\t}",
"abstract function getAsElem($dom);",
"public function getClickwrapBody() {\n return @$this->attributes['clickwrap_body'];\n }",
"public function jQuery()\r\n {\r\n return $this->_container;\r\n }",
"function getRoot ()\n\t{\n\t\treturn $this->doc->document_element();\n\t}",
"public function getContentElement(): ?ContentElementInterface\n {\n return $this->getChildElement(1);\n }",
"public function document()\n {\n return $this->DOM->getNode(0)->parentNode;\n }",
"public function getCalledElement();",
"public function getBodyTag()\n {\n return $this->bodyTag;\n }",
"public function getElement();",
"public function getElement();",
"public function getElement()\n {\n if ($this->element_id != 0) {\n return $this->getTable('Element')->find($this->element_id);\n }\n }",
"public function getPageBody()\n\t{\n\t\treturn $this->_pageBody;\n\t}",
"public function getOwnerPage()\n {\n foreach (get_declared_classes() as $class) {\n if (is_subclass_of($class, 'SiteTree')) {\n $object = singleton($class);\n $classes = ClassInfo::subclassesFor('ElementPageExtension');\n $isElemental = false;\n\n foreach ($classes as $extension) {\n if ($object->hasExtension($extension)) {\n $isElemental = true;\n }\n }\n\n if ($isElemental) {\n $page = $class::get()->filter('ElementAreaID', $this->ID);\n if ($page && $page->exists()) {\n return $page->first();\n }\n }\n }\n }\n\n return false;\n }",
"public function getRoot() : ElementInterface\n {\n return $this->root;\n }",
"public function getOuterHtml()\n {\n return $this->getSession()->getDriver()->getOuterHtml($this->getXpath());\n }",
"public function testBodyElementAutomaticallyCreated() {\n\t\t$document = new HTMLDocument(Helper::HTML);\n\t\t$this->assertInstanceOf(Element::class, $document->body);\n\t}",
"public function getElement() {\r\n $elementId = (int)$this->getProperty('elementId', 0);\r\n $elementClass = $this->getProperty('elementType', '');\r\n if ($elementId && !empty($elementClass)) {\r\n return $this->modx->getObject($elementClass, $elementId);\r\n }\r\n\r\n return null;\r\n }",
"public function getBodyHTML()\n\t{\n\t\tif(!$this->elements['body']){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(is_array($this->elements['body']['html'])){\n\t\t\t$this->elements['body']['html'] = Grid::generate($this->elements['body']['html']);\n\t\t}\n\n\t\t$id = str::getAttrTag(\"id\", $this->elements['body']['id']);\n\t\t$class = str::getAttrTag(\"class\", [\"modal-body\", $this->elements['body']['class']]);\n\t\t$style = str::getAttrTag(\"style\", $this->elements['body']['style']);\n\t\t$progress = Progress::generate($this->elements['body']['progress']);\n\t\t$script = str::getScriptTag($this->elements['body']['script']);\n\n\t\treturn \"<div{$class}{$id}{$style}>{$progress}{$this->elements['body']['html']}</div>{$script}\";\n\t}",
"protected function getElement() {\n return $this->getWebform()->getElement($this->configuration['element_key']);\n }",
"function getBody() {\n\t\treturn $this->getData('body');\n\t}",
"function getBody() {\n\t\treturn $this->getData('body');\n\t}",
"public function getRTERootBlockElement()\n\t{\n\t}",
"public function asElement() {\n //public Element asElement()\n return $element;\n }",
"protected function getWebformElement() {\n $element = $this->getElement();\n return ($element) ? $this->elementManager->getElementInstance($element) : NULL;\n }",
"public function getHeadElement()\n {\n return $this->head;\n }",
"public function innerHtml()\n {\n return $this->getDom()->innerHtml();\n }",
"public function setBody(?string $body): HtmlElementInterface;",
"public function getContainer();",
"public function getContainer();",
"public function getContainer();",
"public function getContainer();",
"public function getContainer();",
"public function getEleve()\n {\n return $this->eleve;\n }",
"public function selector()\n {\n return '.container';\n }",
"public function getContainer() {}",
"abstract protected function getHtmlBody();",
"public function getElements()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('elements');\n }",
"function getBody() {\n return $this->_body;\n }",
"public function getHtmlElements();",
"public function getContainer($selector)\n {\n\n }",
"public function getContainer()\n {\n //Return container\n return $this->contentListContainer;\n }",
"public function getWrapperElement()\n {\n return $this->config['wrapper'] ?? 'div';\n }",
"protected function getWidget()\n {\n $widgets = $this->getPage()->findAll('css', 'body div.filter-container ul.ui-multiselect-checkboxes');\n\n /** @var NodeElement $widget */\n foreach ($widgets as $widget) {\n if ($widget->isVisible()) {\n return $widget;\n }\n }\n\n self::fail('Could not find widget on page or it\\'s not visible');\n }",
"public function getDiv() {\n\t\treturn self::getDivFor($this->cssID, $this->width, $this->height);\n\t}",
"public function getElementId() {\n $id = $this->getDivId();\n return $id;\n }",
"public function getBody()\r\n\t{\r\n\t\treturn $this->_body;\r\n\t}",
"protected function getRenderedContent()\n {\n try\n {\n return $this->getServiceLocator()\n ->get( 'RenderedContent' );\n }\n catch ( ServiceNotFoundException $ex )\n {\n return null;\n }\n }",
"public function getContent(): ?HtmlElementInterface\n {\n return $this->content;\n }",
"public function getBody()\n\t{\n\t\treturn $this->body;\n\t}",
"protected function get_element() {\n\t\tif ( ! $this->element ) {\n\t\t\t$this->element = \\esc_attr( \\apply_filters( 'wpseo_breadcrumb_single_link_wrapper', 'span' ) );\n\t\t}\n\n\t\treturn $this->element;\n\t}",
"function get_inner_html($number,$frame=-1)\n\t{\n\t\treturn $this->get_inner_html_by_number($number,$frame);\n\t}",
"public function getBody() {\n\t\treturn $this->body;\n\t}",
"public function testFindFirstInnermostElement()\n {\n $element = $this->demoElement();\n $goodTree = $this->demoElement()\n ->insertAfter($this->demoComment())\n ->insertAfter(\n $this->demoElement()\n ->insertAfter($this->demoComment())\n ->insertAfter(\n $this->demoElement()\n ->insertAfter($this->demoComment())\n ->insertAfter($element)\n ->insertAfter($this->demoElement())\n )->insertAfter($this->demoElement())\n )->insertAfter($this->demoElement());\n $badTree = $this->demoElement()\n ->insertAfter($this->demoCData())\n ->insertAfter($this->demoComment())\n ->insertAfter($this->demoText());\n\n $reflection = (new \\ReflectionClass(Dom::class))->getMethod('findFirstInnermostElement');\n $reflection->setAccessible(true);\n\n $this->assertSame($element, $reflection->invoke(null, $goodTree->getIterator()->getArrayCopy()));\n $this->assertNull($reflection->invoke(null, $badTree->getIterator()->getArrayCopy()));\n }",
"public function element(): ?string\n {\n return $this->element ?: $this->first();\n }",
"public static function getContainer()\n {\n return self::$kernel->getContainer();\n }",
"public function getBody() {}",
"public function getOuterMostParent() {}",
"public function getBody() {\n\t\treturn $this->body;\n }",
"public function getBody() {\n\t\treturn $this->body;\n }",
"public function getBody()\n {\n return $this->_body;\n }",
"public function getBody()\n {\n return $this->_body;\n }",
"public function getBody()\n {\n return $this->_body;\n }",
"public function getBody()\n {\n return $this->_body;\n }",
"public function getContainer()\n {\n if ($this->_container != null) {\n return $this->_container;\n }\n\n if ($this->space_id != null) {\n $container = $this->space;\n } elseif ($this->user_id != null) {\n $container = $this->user;\n } else {\n throw new Exception(\"Could not determine container type!\");\n }\n\n $this->_container = $container;\n\n return $this->_container;\n }",
"abstract public function getBody();",
"public function getBodyFirst()\n {\n return $this->bodyFirst;\n }",
"public function getFlexiContainer()\n {\n return isset($this->flexiContainer) ? $this->flexiContainer : null;\n }",
"public function getBody()\r\n {\r\n return $this->_body;\r\n }",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"public function getBody();",
"final public function getContainerPrototype()\n\t{\n\t\treturn $this->container;\n\t}",
"protected function getElements(){\n return $this->_elements;\n }",
"public function getShowElement() {}",
"public function getContainer()\r\n {\r\n return $this->container;\r\n }",
"public function content() {\n $element = array(\n '#markup' => 'Hello',\n );\n return $element;\n }",
"public function getContainer()\n {\n return $this->Container;\n }",
"public function getBody()\n {\n return $this->Body;\n }",
"function currentElement()\n {\n return $this->current ? $this->current->parentNode : NULL;\n }",
"protected function getContainer()\n {\n return $this->kernel->getContainer();\n }",
"public function getBody() {\r\n return $this->__body;\r\n }",
"protected function getOuterMostInstance() {}",
"public function get_navbar(){\r\n\t\treturn $this->elements;\r\n\t}"
] | [
"0.6975315",
"0.6546882",
"0.6529626",
"0.6373216",
"0.61402196",
"0.606286",
"0.59727883",
"0.59232944",
"0.5904535",
"0.58936137",
"0.5886445",
"0.5854023",
"0.5816618",
"0.57678187",
"0.57205063",
"0.5717475",
"0.5694509",
"0.5659016",
"0.5659016",
"0.56494313",
"0.55985224",
"0.55256987",
"0.55239516",
"0.5510585",
"0.547205",
"0.54686815",
"0.54563403",
"0.542722",
"0.54259574",
"0.54259574",
"0.53853685",
"0.5376621",
"0.53657585",
"0.53642637",
"0.535597",
"0.5347987",
"0.5337852",
"0.5337852",
"0.5337852",
"0.5337852",
"0.5337852",
"0.5337105",
"0.53361565",
"0.5324367",
"0.53212684",
"0.5302294",
"0.5280967",
"0.52795535",
"0.52717704",
"0.5264221",
"0.5252914",
"0.52329963",
"0.5195205",
"0.51946574",
"0.5186927",
"0.5182371",
"0.5176855",
"0.51708037",
"0.5168903",
"0.51682466",
"0.51563823",
"0.514912",
"0.5144926",
"0.5139429",
"0.5134098",
"0.51275843",
"0.5123228",
"0.5123228",
"0.5120024",
"0.5120024",
"0.5120024",
"0.5120024",
"0.5118199",
"0.5114561",
"0.5110476",
"0.510997",
"0.5109707",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51074415",
"0.51046103",
"0.51016235",
"0.5090727",
"0.50870776",
"0.5075607",
"0.5071837",
"0.50701845",
"0.5066798",
"0.50650764",
"0.5054469",
"0.5051601",
"0.50483483"
] | 0.0 | -1 |
Get element of header container | public function getHeaderContainer()
{
return $this->_thead;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHeadElement()\n {\n return $this->head;\n }",
"public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}",
"public function getHeader(): ?HtmlElementInterface\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->content['header'];\n }",
"function get_header()\n\t{\n\t\treturn $this->header;\n\t}",
"public function get_header()\n {\n return <<<EOD\n<div id=\"sitehdr\">\n Sitewide Header\n</div>\n\nEOD;\n }",
"public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }",
"public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }",
"public function getWrapperElement();",
"function newsroom_elated_get_header() {\n $id = newsroom_elated_get_page_id();\n\n //will be read from options\n $header_type = 'header-type3';\n $header_behavior = newsroom_elated_options()->getOptionValue('header_behaviour');\n\n if(HeaderFactory::getInstance()->validHeaderObject()) {\n $parameters = array(\n 'hide_logo' => newsroom_elated_options()->getOptionValue('hide_logo') == 'yes' ? true : false,\n 'header_in_grid' => newsroom_elated_options()->getOptionValue('header_in_grid') == 'yes' ? true : false,\n 'logo_position' => newsroom_elated_get_meta_field_intersect('logo_position',$id),\n 'show_sticky' => in_array($header_behavior, array(\n 'sticky-header-on-scroll-up',\n 'sticky-header-on-scroll-down-up'\n )) ? true : false,\n );\n\n $parameters = apply_filters('newsroom_elated_header_type_parameters', $parameters, $header_type);\n\n HeaderFactory::getInstance()->getHeaderObject()->loadTemplate($parameters);\n }\n }",
"function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getHeaders()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_thead instanceof HtmlElement) {\n\t\t\t$ret = $this->_thead->getElements();\n\t\t}\n\t\treturn $ret;\n\t}",
"public function getHeadingTag()\n {\n return $this->Parent()->HeadingTag;\n }",
"public function get_header() {\n $this->do_header();\n return $this->c_header;\n }",
"public function header() {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->Header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function GetHeader()\n {\n return $this->HeaderName;\n }",
"public function getHeader() {\r\n return $this->__header;\r\n }",
"public function getHeader(){\n\t\treturn $this->header;\n\t}",
"public function getHeader ()\n {\n return $this->header;\n }",
"public function getHeader() {\n return $this->Header;\n }",
"public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getHeader() {\n return $this->header;\n }",
"protected function _createHeaderContainer()\n\t{\n\t\tif ($this->_thead == null) {\n\t\t\t$this->_thead = new HtmlElement('thead');\n\t\t\t$this->addElement($this->_thead);\n\t\t}\t\t\n\t}",
"public function getHeader($rowIndex)\n\t{\n\t\t$ret = null;\n\t\tif ($this->_thead instanceof HtmlElement) {\n\t\t\t$ret = $this->_thead->getElement($rowIndex);\n\t\t}\n\t\treturn $ret;\n\t}",
"function biagiotti_mikado_get_header() {\n\t\t$id = biagiotti_mikado_get_page_id();\n\t\t\n\t\t//will be read from options\n\t\t$header_type = biagiotti_mikado_get_meta_field_intersect( 'header_type', $id );\n\t\t\n\t\t$menu_area_in_grid = biagiotti_mikado_get_meta_field_intersect( 'menu_area_in_grid', $id );\n\t\t\n\t\t$header_behavior = biagiotti_mikado_get_meta_field_intersect( 'header_behaviour', $id );\n\t\t\n\t\tif ( HeaderFactory::getInstance()->validHeaderObject() ) {\n\t\t\t$parameters = array(\n\t\t\t\t'hide_logo' => biagiotti_mikado_options()->getOptionValue( 'hide_logo' ) == 'yes',\n\t\t\t\t'menu_area_in_grid' => $menu_area_in_grid == 'yes',\n\t\t\t\t'show_sticky' => in_array( $header_behavior, array( 'sticky-header-on-scroll-up', 'sticky-header-on-scroll-down-up' ) ),\n\t\t\t\t'show_fixed_wrapper' => in_array( $header_behavior, array( 'fixed-on-scroll' ) ),\n\t\t\t);\n\t\t\t\n\t\t\t$parameters = apply_filters( 'biagiotti_mikado_filter_header_type_parameters', $parameters, $header_type );\n\t\t\t\n\t\t\tHeaderFactory::getInstance()->getHeaderObject()->loadTemplate( $parameters );\n\t\t}\n\t}",
"public function getHeaderHTML()\n\t{\n\t\tif(!is_array($this->elements['header'])){\n\t\t\t// Headers are optional\n\t\t\treturn false;\n\t\t}\n\n\t\t# Header buttons can also be defined outside of the header key when defining modal vales.\n\t\t$this->elements['header']['buttons'] = array_merge($this->elements['header']['buttons'] ?: [], $this->buttons ?: []);\n\n\t\t# Add the required Bootstrap header class very first\n\t\t$this->elements['header']['class'] = str::getAttrArray($this->elements['header']['class'], \"modal-header\", $this->elements['header']['only_class']);\n\n\t\t# Draggable\n\t\t$this->elements['header']['class'][] = $this->draggable ? \"modal-header-draggable\" : false;\n\n\t\t# Styles\n\t\t$this->elements['header']['style'] = str::getAttrArray($this->elements['header']['style'], NULL, $this->elements['header']['only_style']);\n\n\t\t# Dropdown buttons\n\t\tif($this->elements['header']['buttons']){\n\t\t\t$buttons = Button::get($this->elements['header']);\n\t\t}\n\n\t\t# Button(s) in a row\n\t\t$button = Button::generate($this->elements['header']['button']);\n\n\t\tif($button){\n\t\t\t$button = \"<div class=\\\"btn-float-right\\\">{$button}</div>\";\n\t\t}\n\n\t\t# Accent\n\t\t$this->elements['header']['class'][] = str::getColour($this->accent, \"bg\");\n\n\t\t# Icon\n\t\tif(!$icon = Icon::generate($this->elements['header']['icon'])){\n\t\t\t//the icon attribute can either be in the header or in the main modal\n\t\t\t$icon = Icon::generate($this->icon);\n\t\t}\n\n\t\t# Badge\n\t\t$badge = Badge::generate($this->elements['header']['badge']);\n\n\t\t# ID\n\t\t$id = str::getAttrTag(\"id\", $this->elements['header']['id']);\n\n\t\t# Style\n\t\t$style = str::getAttrTag(\"style\", $this->elements['header']['style']);\n\n\t\t# Title colour\n\t\t$class[] = str::getColour($this->elements['header']['colour']);\n\n\t\t# Script\n\t\t$script = str::getScriptTag($this->elements['header']['script']);\n\n\t\t# The header title itself\n\t\t$title = $this->elements['header']['header'] . $this->elements['header']['title'] . $this->elements['header']['html'];\n\n\t\t# Title class\n\t\tif(!empty(array_filter($class))){\n\t\t\t$title_class = str::getAttrTag(\"class\", $class);\n\t\t\t$title = \"<span{$title_class}>$title</span>\";\n\t\t}\n\n\t\t# The div class\n\t\t$class = str::getAttrTag(\"class\", $this->elements['header']['class']);\n\n\t\t# If the modal can be dismissed\n\t\tif($this->dismissible !== false){\n\t\t\t$dismiss = <<<EOF\n<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" title=\"Close this window\"></button>\nEOF;\n\t\t}\n\n\t\treturn <<<EOF\n<div{$id}{$class}{$style}>\n\t<div class=\"container\">\n \t\t<div class=\"row\">\n \t\t<div class=\"col-auto modal-title\">\n \t\t\t{$icon}{$title}{$badge}\n \t\t</div>\n \t\t<div class=\"col\">\n \t\t\t{$buttons}{$button}{$dismiss}\n \t\t</div>\n \t</div>\n\t</div>{$script}\n</div>\nEOF;\n\t}",
"public function getPageHeader()\n\t{\n\t\treturn $this->_pageHeader;\n\t}",
"public function getHeader() \r\n {\r\n return $this->_bagHeader; \r\n }",
"private static final function getHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n $containerHTMLHead = new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_container.tp');\r\n return $containerHTMLHead->doToken ('[%BASE_HREF_URL%]', DOCUMENT_HOST);\r\n }",
"function GetHeader() {\n return ($this->ses['response']['header']);\n }",
"public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }",
"public function getHeaderPrototype()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getGroupHeader()\n {\n if (is_null($this->groupHeader)) {\n $this->groupHeader = new SEPAGroupHeader();\n }\n\n return $this->groupHeader;\n }",
"protected function get_element_header_content(&$element) {\n global $CFG;\n\n $content = array();\n $attributes = array();\n $text = $element['object']->get_name();\n\n if ($element['type'] != 'item' and $element['type'] != 'categoryitem' and\n $element['type'] != 'courseitem') {\n $content[0] = progress_report_generator::build_content_text_node($text);\n return $content;\n }\n\n $itemtype = $element['object']->itemtype;\n $itemmodule = $element['object']->itemmodule;\n $iteminstance = $element['object']->iteminstance;\n\n if ($itemtype=='mod' and $iteminstance and $itemmodule) {\n if ($cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid)) {\n\n $a = new stdClass();\n $a->name = get_string('modulename', $element['object']->itemmodule);\n $attributes['title'] = get_string('linktoactivity', 'grades', $a);\n $dir = $CFG->dirroot.'/mod/'.$itemmodule;\n\n if (file_exists($dir.'/grade.php')) {\n $attributes['href'] = $CFG->wwwroot.'/mod/'.$itemmodule.'/grade.php?id='.$cm->id;\n } else {\n $attributes['href'] = $CFG->wwwroot.'/mod/'.$itemmodule.'/view.php?id='.$cm->id;\n }\n }\n }\n $content[0] = progress_report_generator::build_content_container_node(progress_report_generator::HTML_HYPERLINK, $attributes);\n $content[0]['children'][0] = progress_report_generator::build_content_text_node($text);\n\n return $content[0];\n }",
"protected function get_header_elements() {\n foreach( $this->header_elements_array as $header_element ) {\n $header_elements .= \"\\n\" . $header_element;\n }\n\n return $header_elements;\n }",
"public function newHeaderContainer()\n {\n return new HeaderContainer($this);\n }",
"public function getHeaderClass() {\n if (null != $this->headerClass) {\n return $this->headerClass;\n }\n $_ve = $this->getValueExpression(\"headerClass\");\n if ($_ve != null) {\n return $_ve->getValue($this->getFacesContext()->getELContext());\n } else {\n return null;\n }\n }",
"public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }",
"public function getTitleElement()\n {\n return $this->title;\n }",
"public static function getHeader()\n {\n return self::$_header;\n }",
"function getHead($coment){\r\n\t\tif(isset($this->Head[$coment])) return $this->Head[$coment];\r\n\t\treturn '';\r\n\t}",
"public function getHeader($header)\n {\n if ($this->isHeaderSet($header))\n {\n return $this->headers[$header];\n }\n \n throw new HeaderAbsentException(\"The header '$header' is not present\");\n }",
"public function getHeader($header)\n {\n return isset($this->headers[$header]) ? $this->headers[$header] : null;\n }",
"public function getHeaderHtml()\n\t{\n\t\treturn $this->_main->getHeaderHtml();\n\t}",
"public function Head() {\n\t\treturn $this->head;\n\t}",
"public function getElement()\n {\n return $this->element;\n }",
"function minorite_header($variables){\n return '<header'.drupal_attributes($variables['elements']['#wrapper_attributes']).'>'.$variables['elements']['#children'].'</header>';\n}",
"public function getHeader($header)\n {\n return $this->wrapped->getHeader($header);\n }",
"public function getHeader() {\n return (isset($this->header)) ? $this->header : '';\n }",
"public function getElement();",
"public function getElement();",
"function get_html_header();",
"public function getContentElement(): ?ContentElementInterface\n {\n return $this->getChildElement(1);\n }",
"function asu_brand_get_block_header() {\n $settings = asu_brand_get_block_settings();\n $cache_id = 'asu_brand:header';\n \n // Set js settings, include js file, and inject head into <head>.\n asu_brand_head_inject();\n \n return asu_brand_get_cached_content($cache_id, $settings->header_path);\n}",
"function get_css_header();",
"public function head()\n {\n return $this->dummy->head();\n }",
"public function head() {\n return $this->head ;\n }",
"public function getHead()\n {\n return $this->Head;\n }",
"public function header($key = NULL)\n\t{\n\t\tif ($this->executed)\n\t\t{\n\t\t\tif ($key === NULL)\n\t\t\t\treturn $this->header;\n\t\t\telseif (array_key_exists($key, $this->header))\n\t\t\t\treturn $this->header[$key];\n\t\t}\n\n\t\treturn NULL;\n\t}",
"function head() {\r\n return $this->list[0];\r\n }",
"public function getHead()\n {\n return $this->head;\n }",
"public function getHead();",
"public function getElement()\n\t{\n\t\treturn $this->_element;\n\t}",
"public function getHeading()\n {\n return $this->heading;\n }",
"abstract protected function get_root_element();",
"function getHeaderTags()\n {\n $filter = '(';\n for ($i = 1; $i <= 20; $i++) {\n $filter .= '//h' . $i . '|';\n }\n $filter = trim($filter, '|') . ')';\n \n $elements = $this->xpath->query($filter);\n $tags = [];\n foreach ($elements as $index => $element) {\n $level = filter_var($element->tagName, FILTER_SANITIZE_NUMBER_INT) - 1;\n $innerHtml = $this->DOMinnerHTML($element);\n \n $tags[$index]['header'] = $element->tagName;\n $tags[$index]['level'] = $level;\n $tags[$index]['name'] = trim(strip_tags($innerHtml));\n $tags[$index]['content'] = $innerHtml;\n $tags[$index]['toc'] = $this->getTOCFromTag($innerHtml);\n }\n return $tags;\n }",
"protected function getHeadingNodes()\n {\n $xpath = new DomXpath($this->doc);\n $query = '/html/body/*[self::h1 or self::h2 or self::h3 or self::h4 '\n . ' or self::h5 or self::h6]';\n return $xpath->query($query);\n }",
"function get_header_image()\n {\n }",
"public function first()\n {\n return reset($this->_elements);\n }",
"public function getHeading(): string;",
"public function pickOne( $header )\r\n\t{\r\n\t\tif( is_array( $header ) ) {\r\n\t\t\treturn $header[0];\r\n\t\t}\r\n\t\treturn $header;\r\n\t}",
"private function getParamHeader()\n {\n $header = $this->getMenuParams()->get( 'header', '' );\n return (string)$header;\n }",
"public function getHead() {\r\n\t\treturn $this->_head;\r\n\t}",
"private function getHeader() : object {\n return imap_rfc822_parse_headers($this->currentEmail);\n }",
"public function header(): ParameterBag\n {\n return $this->header;\n }",
"protected function getHeadingHtml() {\n\t\t$heading = '';\n\t\tif ( $this->isUserPage ) {\n\t\t\t// The heading is just the username without namespace\n\t\t\t$heading = $this->pageUser->getName();\n\t\t} else {\n\t\t\t$pageTitle = $this->getOutput()->getPageTitle();\n\t\t\tif ( $pageTitle ) {\n\t\t\t\t$heading = $pageTitle;\n\t\t\t}\n\t\t}\n\t\treturn Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );\n\t}",
"protected function getHeader($header)\n {\n $this->initialize();\n $header = str_replace('-','_',$header);\n return isset($this->parsed['headers'][$header]) ? $this->parsed['headers'][$header] : null;\n }",
"public function getHeader()\r\n {\r\n return $this->headers;\r\n }",
"public function getCalledElement();",
"public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}",
"function heading( $element )\n\t\t{\t\n\t\t\t$extraclass = $required = \"\";\t\n\t\t\tif(isset($element['required'])) \n\t\t\t{ \n\t\t\t\t$required = '<input type=\"hidden\" value=\"'.$element['required'][0].'::'.$element['required'][1].'\" class=\"ace_required\" />'; \n\t\t\t\t$extraclass = ' ace_hidden ace_required_container';\n\t\t\t} \n\t\t\t\n\t\t\tif(isset($element['class'])) $extraclass .= ' '.$element['class'];\n\t\t\n\t\t\t$output = '<div class=\"ace_section ace_'.$element['type'].' '.$extraclass.'\" id=\"ace_'.$element['id'].'\">';\n\t\t\t$output .= $required;\n\t\t\tif($element['name'] != \"\") $output .= '<h4>'.$element['name'].'</h4>';\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= '</div>';\n\t\t\treturn $output;\n\t\t}",
"function get_custom_header_markup()\n {\n }",
"public function getHeader($key){\n $key = FW_String::strtolower($key);\n \n if($this->getHeader($key)){\n return $this->header[$key];\n }\n \n return null;\n }",
"public function getShowElement() {}",
"function get_header(){\n\t\tglobal $FANNIE_ROOT;\n\t\tob_start();\n\t\t$page_title = $this->title;\n\t\t$header = $this->header;\n\t\tinclude($FANNIE_ROOT.'src/header_install.html');\n\t\treturn ob_get_clean();\n\n\t}",
"public function getHeader(): array {\n\t\treturn $this->_header;\n\t}",
"function newsroom_elated_get_header_top() {\n\n $params = array(\n 'column_widths' => '33-33-33',\n 'show_header_top' => newsroom_elated_options()->getOptionValue('top_bar') == 'yes' ? true : false,\n 'top_bar_in_grid' => newsroom_elated_options()->getOptionValue('top_bar_in_grid') == 'yes' ? true : false\n );\n\n $params = apply_filters('newsroom_elated_header_top_params', $params);\n\n newsroom_elated_get_module_template_part('templates/parts/header-top', 'header', '', $params);\n }",
"protected function get_element() {\n\t\tif ( ! $this->element ) {\n\t\t\t$this->element = \\esc_attr( \\apply_filters( 'wpseo_breadcrumb_single_link_wrapper', 'span' ) );\n\t\t}\n\n\t\treturn $this->element;\n\t}",
"public function getValueForHeader($header)\n {\n switch ($header){\n case '#':\n return $this->id;\n case 'Fatura':\n return $this->fatura_join()->first()->nome;\n case 'Ordem Serviço':\n return $this->ordem_servico_join()->first()->nome;\n }\n }",
"public function firstKey()\n {\n if ($this->isNotEmpty())\n {\n return $this->key('first');\n }\n\n throw new EmptyContainerException('Empty Container');\n }",
"private function getAuthHeader()\n {\n $credential = $this->apiContext->getCredential();\n\n $header = '<wsse:Security SOAP-ENV:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">';\n $header .= '<wsse:UsernameToken wsu:Id=\"UsernameToken-9\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">';\n $header .= '<wsse:Username>' . $credential->getUsername() . '</wsse:Username>';\n $header .= '<wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">' . $credential->getPassword() . '</wsse:Password>';\n $header .= '</wsse:UsernameToken>';\n $header .= '</wsse:Security>';\n\n $headerbody = new \\SoapVar($header, XSD_ANYXML, null, null, null);\n return new \\SOAPHeader(self::PAYU_NAMESPACE, 'Security', $headerbody, true);\n }",
"public function getHeaderTpl(){\n return $this->templates['header'];\n }",
"public function getElement()\n {\n if ($this->element_id != 0) {\n return $this->getTable('Element')->find($this->element_id);\n }\n }",
"public function getHeaderWrapper($item)\n {\n }"
] | [
"0.66016114",
"0.64025205",
"0.63993317",
"0.6157431",
"0.61392045",
"0.6126388",
"0.6118815",
"0.6118815",
"0.61108035",
"0.6052106",
"0.6040585",
"0.6014633",
"0.6011997",
"0.6007136",
"0.5996616",
"0.5951458",
"0.5950244",
"0.5950244",
"0.5950244",
"0.5950244",
"0.5950244",
"0.5945788",
"0.594095",
"0.5935838",
"0.5927319",
"0.5907427",
"0.58997613",
"0.58928925",
"0.5867365",
"0.58609927",
"0.58502525",
"0.5847078",
"0.58465457",
"0.57789904",
"0.5770042",
"0.576857",
"0.5755627",
"0.5753317",
"0.5709964",
"0.5699469",
"0.5669217",
"0.56639385",
"0.56439006",
"0.56231964",
"0.56217635",
"0.5599008",
"0.5596982",
"0.55887944",
"0.557893",
"0.55737174",
"0.5569659",
"0.556921",
"0.55489135",
"0.5548698",
"0.5533886",
"0.5515746",
"0.5515746",
"0.5514329",
"0.55143136",
"0.5512109",
"0.5492422",
"0.54794496",
"0.5474254",
"0.54695475",
"0.5468445",
"0.5464425",
"0.5453215",
"0.5448598",
"0.5447425",
"0.5446697",
"0.54456824",
"0.54438674",
"0.5441402",
"0.5439295",
"0.5410865",
"0.54021627",
"0.5402072",
"0.53971756",
"0.5394526",
"0.53811574",
"0.5367423",
"0.5367256",
"0.5360104",
"0.5346395",
"0.5340388",
"0.5328938",
"0.5326998",
"0.5323713",
"0.53118414",
"0.5300749",
"0.5284004",
"0.5277121",
"0.5266635",
"0.5264151",
"0.52640104",
"0.52606535",
"0.52588934",
"0.5249578",
"0.52465004",
"0.52416015"
] | 0.6985704 | 0 |
Get element of body row | public function getRow($rowIndex)
{
$ret = null;
if ($this->_tbody instanceof HtmlElement) {
$ret = $this->_tbody->getElement($rowIndex);
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_row() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->get_rows();\n\t\t}\n\t\t$value = current($this->rows);\n\t\tnext($this->rows);\n\t\treturn $value;\n\t}",
"public function getRow()\n {\n return $this->row;\n }",
"public function getRow()\n {\n return $this->get('Row');\n }",
"public function getRow()\n {\n return isset($this->row) ? $this->row : null;\n }",
"public function getRow()\n {\n return $this->row;\n }",
"public function getBodyElement()\n {\n return $this->body;\n }",
"function GetRow()\n {\n return $this->row;\n }",
"public function getElement()\n {\n if ($this->element_id != 0) {\n return $this->getTable('Element')->find($this->element_id);\n }\n }",
"public function getRow(){\n return $this->_row;\n }",
"function getElements() {\n return $this->rows_object;\n }",
"public function getWrapperElement();",
"abstract public function getSpecificRow();",
"public function getCell()\n {\n return $this->cell;\n }",
"public function get() {\n\t\treturn $this->rows[$this->rowIndex];\n\t}",
"public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}",
"public function get_row();",
"public function getElement();",
"public function getElement();",
"function getRowPrototype() {\n\t\treturn $this->row;\n\t}",
"public function getRows()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElements();\n\t\t}\n\t\treturn $ret;\n\t}",
"public function getEleve()\n {\n return $this->eleve;\n }",
"public static function get_row_element( $i, $m = [] ) {\n\n\t\t\t// Check element\n\t\t\tif ( empty( $i['element'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Check user login\n\t\t\t$is_user_logged_in = is_user_logged_in();\n\n\t\t\t// Element visibility for users\n\t\t\tif ( ! empty( $i['elm_visibility'] ) ) {\n\t\t\t\t$v = $i['elm_visibility'];\n\t\t\t\tif ( ( $v === '1' && ! $is_user_logged_in ) || ( $v === '2' && $is_user_logged_in ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Element margin\n\t\t\t$style = '';\n\t\t\tif ( ! empty( $i['margin'] ) ) {\n\t\t\t\tforeach( $i['margin'] as $key => $val ) {\n\t\t\t\t\t$style .= $val ? 'margin-' . esc_attr( $key ) . ':' . esc_attr( $val ) . ';' : '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Cutstom page width\n\t\t\tif ( ! empty( $i['header_elements_width'] ) ) {\n\t\t\t\t$style .= 'width:' . esc_attr( $i['header_elements_width'] ) . ';';\n\t\t\t}\n\n\t\t\t// Classes of element\n\t\t\t$elm_class = empty( $i['vertical'] ) ? '' : ' cz_vertical_elm';\n\t\t\t$elm_class .= empty( $i['elm_on_sticky'] ) ? '' : ' ' . $i['elm_on_sticky'];\n\t\t\t$elm_class .= empty( $i['hide_on_mobile'] ) ? '' : ' hide_on_mobile';\n\t\t\t$elm_class .= empty( $i['hide_on_tablet'] ) ? '' : ' hide_on_tablet';\n\t\t\t$elm_class .= empty( $i['elm_center'] ) ? '' : ' cz_elm_center';\n\n\t\t\t// Start element\n\t\t\t$elm = $i['element'];\n\t\t\t$element_id = esc_attr( $elm . '_' . $m['id'] );\n\t\t\t$element_uid = esc_attr( $element_id . $m['depth'] );\n\t\t\t$data_settings = is_customize_preview() ? \" data-settings='\" . json_encode( $i, JSON_HEX_APOS ) . \"'\" : '';\n\t\t\techo '<div class=\"cz_elm ' . esc_attr( $element_id . $m['depth'] . ' inner_' . $element_id . $m['inner_depth'] . $elm_class ) . '\" style=\"' . esc_attr( $style ) . '\"' . wp_kses_post( $data_settings ) . '>';\n\n\t\t\t// Check element\n\t\t\tif ( $elm === 'logo' || $elm === 'logo_2' ) {\n\n\t\t\t\t$logo = do_shortcode( self::option( $elm ) );\n\n\t\t\t\tif ( $logo ) {\n\t\t\t\t\techo '<div class=\"logo_is_img ' . esc_attr( $elm ) . '\"><a href=\"' . esc_url( home_url( '/' ) ) . '\" title=\"' . esc_html( get_bloginfo( 'description' ) ) . '\"><img src=\"' . esc_url( do_shortcode( $logo ) ) . '\" alt=\"' . esc_attr( get_bloginfo( 'name' ) ) . '\" width=\"200\" height=\"200\"' . ( empty( $i[ 'logo_width' ] ) ? '' : ' style=\"width: ' . esc_attr( $i[ 'logo_width' ] ) . '\"' ) . '></a>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<div class=\"logo_is_text ' . esc_attr( $elm ) . '\"><a href=\"' . esc_url( home_url( '/' ) ) . '\" title=\"' . esc_html( get_bloginfo( 'description' ) ) . '\"><h1>' . esc_html( get_bloginfo( 'name' ) ) . '</h1></a>';\n\t\t\t\t}\n\n\t\t\t\t$logo_tooltip = self::option( 'logo_hover_tooltip' );\n\t\t\t\tif ( $logo_tooltip && $logo_tooltip !== 'none' && $m['id'] !== 'header_4' && $m['id'] !== 'header_5' ) {\n\t\t\t\t\techo '<div class=\"logo_hover_tooltip\">' . self::get_page_as_element( esc_html( $logo_tooltip ) ) . '</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</div>';\n\n\t\t\t} else if ( $elm === 'menu' ) {\n\n\t\t\t\t$type = empty( $i['menu_type'] ) ? 'cz_menu_default' : $i['menu_type'];\n\t\t\t\tif ( $type === 'offcanvas_menu_left' ) {\n\t\t\t\t\t$type = 'offcanvas_menu inview_left';\n\t\t\t\t} else if ( $type === 'offcanvas_menu_right' ) {\n\t\t\t\t\t$type = 'offcanvas_menu inview_right';\n\t\t\t\t}\n\n\t\t\t\t$elm_uniqid = 'cz_mi_' . rand( 11111, 99999 );\n\n\t\t\t\t$menu_title = isset( $i['menu_title'] ) ? do_shortcode( $i['menu_title'] ) : '';\n\t\t\t\t$menu_icon = empty( $i['menu_icon'] ) ? 'fa fa-bars' : $i['menu_icon'];\n\t\t\t\t$icon_style = empty( $i['sk_menu_icon'] ) ? '' : self::sk_inline_style( $i['sk_menu_icon'] );\n\n\t\t\t\t$data_style = empty( $i['sk_menu_title'] ) ? '' : '.' . $elm_uniqid . ' span{' . self::sk_inline_style( $i['sk_menu_title'] ) . '}';\n\t\t\t\t$data_style .= empty( $i['sk_menu_title_hover'] ) ? '' : '.' . $elm_uniqid . ':hover span{' . self::sk_inline_style( $i['sk_menu_title_hover'] ) . '}';\n\t\t\t\t$data_style .= empty( $i['sk_menu_icon_hover'] ) ? '' : '.' . $elm_uniqid . ':hover{' . self::sk_inline_style( $i['sk_menu_icon_hover'], true ) . '}';\n\t\t\t\t$data_style = $data_style ? ' data-cz-style=\"' . $data_style . '\"' : '';\n\n\t\t\t\t$menu_icon_class = $menu_title ? ' icon_plus_text' : '';\n\t\t\t\t$menu_icon_class .= ' ' . $elm_uniqid;\n\n\t\t\t\t// Add icon and mobile menu\n\t\t\t\tif ( $type && $type !== 'offcanvas_menu' && $type !== 'cz_menu_default' ) {\n\t\t\t\t\techo '<i class=\"' . esc_attr( $menu_icon . ' icon_' . $type . $menu_icon_class ) . '\" style=\"' . esc_attr( $icon_style ) . '\"' . $data_style . '><span>' . esc_html( $menu_title ) . '</span></i>';\n\t\t\t\t}\n\t\t\t\techo '<i class=\"' . esc_attr( $menu_icon . ' hide icon_mobile_' . $type . $menu_icon_class ) . '\" style=\"' . esc_attr( $icon_style ) . '\"' . $data_style . '><span>' . esc_html( $menu_title ) . '</span></i>';\n\t\t\t\t\n\t\t\t\t// Default\n\t\t\t\tif ( empty( $i['menu_location'] ) ) {\n\t\t\t\t\t$i['menu_location'] = 'primary';\n\t\t\t\t}\n\n\t\t\t\t// Check for meta box and set one page instead primary\n\t\t\t\t$page_menu = self::meta( 0, 'one_page' );\n\t\t\t\tif ( $i['menu_location'] === 'primary' && $page_menu ) {\n\t\t\t\t\t$i['menu_location'] = ( $page_menu === '1' ) ? 'one-page' : $page_menu;\n\t\t\t\t}\n\n\t\t\t\t// Disable three dots auto responsive\n\t\t\t\t$type .= empty( $i['menu_disable_dots'] ) ? '' : ' cz-not-three-dots';\n\n\t\t\t\t// Indicators\n\t\t\t\t$indicator = self::get_string_between( self::option( '_css_menu_indicator_a_' . $m['id'] ), '_class_indicator:', ';' );\n\t\t\t\t$indicator2 = self::get_string_between( self::option( '_css_menu_ul_indicator_a_' . $m['id'] ), '_class_indicator:', ';' );\n\n\t\t\t\t// Menu\n\t\t\t\t$nav = [\n\t\t\t\t\t'theme_location' \t=> esc_attr( $i['menu_location'] ),\n\t\t\t\t\t'cz_row_id' \t\t=> esc_attr( $m['id'] ),\n\t\t\t\t\t'cz_indicator' \t\t=> $indicator,\n\t\t\t\t\t'container' \t\t=> false,\n\t\t\t\t\t'fallback_cb' \t\t=> '',\n\t\t\t\t\t'items_wrap' \t\t=> '<ul id=\"' . esc_attr( $element_id ) . '\" class=\"sf-menu clr ' . esc_attr( $type ) . '\" data-indicator=\"' . esc_attr( $indicator ) . '\" data-indicator2=\"' . esc_attr( $indicator2 ) . '\">%3$s</ul>'\n\t\t\t\t];\n\n\t\t\t\tif ( class_exists( 'Codevz_Walker_nav' ) ) {\n\t\t\t\t\t$nav['walker'] = new Codevz_Walker_nav();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twp_nav_menu( apply_filters( 'xtra_nav_menu', $nav ) );\n\n\t\t\t\techo '<i class=\"czico-198-cancel cz_close_popup xtra-close-icon hide\"></i>';\n\n\t\t\t} else if ( $elm === 'social' && self::$plugin ) {\n\n\t\t\t\techo Codevz_Plus::social();\n\n\t\t\t} else if ( $elm === 'image' && isset( $i['image'] ) ) {\n\n\t\t\t\t$link = empty( $i['image_link'] ) ? '' : $i['image_link'];\n\t\t\t\t$width = empty( $i['image_width'] ) ? 'auto' : $i['image_width'];\n\t\t\t\t$new_tab = empty( $i['image_new_tab'] )? '' : 'rel=\"noopener noreferrer\" target=\"_blank\"' ;\n\n\t\t\t\tif ( $link ) {\n\t\t\t\t\techo '<a class=\"elm_h_image\" href=\"' . esc_url( $link ) . '\" ' . $new_tab . '><img src=\"' . esc_url( do_shortcode( $i['image'] ) ) . '\" alt=\"image\" style=\"width:' . esc_attr( $width ) . '\" width=\"' . esc_attr( $width ) . '\" height=\"auto\" /></a>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<img src=\"' . esc_url( do_shortcode( $i['image'] ) ) . '\" alt=\"#\" width=\"' . esc_attr( $width ) . '\" height=\"auto\" style=\"width:' . esc_attr( $width ) . '\" />';\n\t\t\t\t}\n\n\t\t\t} else if ( $elm === 'icon' ) {\n\n\t\t\t\t$link = isset( $i['it_link'] ) ? $i['it_link'] : '';\n\t\t\t\t$target = empty( $i['it_link_target'] ) ? '' : ' target=\"_blank\"';\n\n\t\t\t\t$text_style = empty( $i['sk_it'] ) ? '' : self::sk_inline_style( $i['sk_it'] );\n\t\t\t\t$icon_style = empty( $i['sk_it_icon'] ) ? '' : self::sk_inline_style( $i['sk_it_icon'] );\n\n\t\t\t\t$hover_css = empty( $i['sk_it_hover'] ) ? '' : '.' . $element_id . $m['depth'] . ' .elm_icon_text:hover .it_text {' . self::sk_inline_style( $i['sk_it_hover'], true ) . '}';\n\t\t\t\t$hover_css .= empty( $i['sk_it_icon_hover'] ) ? '' : '.' . $element_id . $m['depth'] . ' .elm_icon_text:hover > i {' . self::sk_inline_style( $i['sk_it_icon_hover'], true ) . '}';\n\t\t\t\t$hover_css = $hover_css ? ' data-cz-style=\"' . $hover_css . '\"' : '';\n\n\t\t\t\tif ( $link ) {\n\t\t\t\t\techo '<a class=\"elm_icon_text\" href=\"' . esc_attr( $link ) . '\"' . $target . $hover_css . '>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<div class=\"elm_icon_text\"' . $hover_css . '>';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $i['it_icon'] ) ) {\n\t\t\t\t\techo '<i class=\"' . esc_attr( $i['it_icon'] ) . '\" style=\"' . esc_attr( $icon_style ) . '\"></i>';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $i['it_text'] ) ) {\n\t\t\t\t\techo '<span class=\"it_text ' . esc_attr( ( empty( $i['it_icon'] ) ? '' : 'ml10' ) ) . '\" style=\"' . esc_attr( $text_style ) . '\">' . do_shortcode( wp_kses_post( str_replace( '%year%', current_time( 'Y' ), $i['it_text'] ) ) ) . '</span>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<span class=\"it_text\"></span>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $link ) {\n\t\t\t\t\techo '</a>';\n\t\t\t\t} else {\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\n\t\t\t} else if ( $elm === 'icon_info' ) {\n\n\t\t\t\t$link = isset( $i['it_link'] ) ? $i['it_link'] : '';\n\t\t\t\t$target = empty( $i['it_link_target'] ) ? '' : ' target=\"_blank\"';\n\n\t\t\t\t$text_style \t= empty( $i['sk_it'] ) ? '' : self::sk_inline_style( $i['sk_it'] );\n\t\t\t\t$text_2_style \t= empty( $i['sk_it_2'] ) ? '' : self::sk_inline_style( $i['sk_it_2'] );\n\t\t\t\t$icon_style \t= empty( $i['sk_it_icon'] ) ? '' : self::sk_inline_style( $i['sk_it_icon'] );\n\n\t\t\t\t$wrap_style = empty( $i['sk_it_wrap'] ) ? '' : self::sk_inline_style( $i['sk_it_wrap'] );\n\t\t\t\t$wrap_hover = empty( $i['sk_it_wrap_hover'] ) ? '' : '.' . $element_id . $m['depth'] . ' .cz_elm_info_box:hover {' . self::sk_inline_style( $i['sk_it_wrap_hover'], true ) . '}';\n\t\t\t\t$wrap_hover .= empty( $i['sk_it_hover'] ) ? '' : '.' . $element_id . $m['depth'] . ' .cz_elm_info_box:hover .cz_info_1 {' . self::sk_inline_style( $i['sk_it_hover'], true ) . '}';\n\t\t\t\t$wrap_hover .= empty( $i['sk_it_2_hover'] ) ? '' : '.' . $element_id . $m['depth'] . ' .cz_elm_info_box:hover .cz_info_2 {' . self::sk_inline_style( $i['sk_it_2_hover'], true ) . '}';\n\t\t\t\t$wrap_hover = $wrap_hover ? ' data-cz-style=\"' . $wrap_hover . '\"' : '';\n\n\t\t\t\tif ( $link ) {\n\t\t\t\t\techo '<a class=\"cz_elm_info_box\" href=\"' . esc_url( $link ) . '\" style=\"' . $wrap_style . '\"' . $target . $wrap_hover . '>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<div class=\"cz_elm_info_box\" style=\"' . $wrap_style . '\"' . $wrap_hover . '>';\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $i['it_icon'] ) ) {\n\t\t\t\t\t$it_hover = empty( $i['sk_it_icon_hover'] ) ? '' : ' data-cz-style=\".' . $element_id . $m['depth'] . ' .cz_elm_info_box:hover i {' . self::sk_inline_style( $i['sk_it_icon_hover'], true ) . '}\"';\n\t\t\t\t\techo '<i class=\"cz_info_icon ' . esc_attr( $i['it_icon'] ) . '\" style=\"' . esc_attr( $icon_style ) . '\"' . $it_hover . '></i>';\n\t\t\t\t}\n\n\t\t\t\techo '<div class=\"cz_info_content\">';\n\t\t\t\tif ( ! empty( $i['it_text'] ) ) {\n\t\t\t\t\techo '<span class=\"cz_info_1\" style=\"' . esc_attr( $text_style ) . '\">' . do_shortcode( wp_kses_post( $i['it_text'] ) ) . '</span>';\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $i['it_text_2'] ) ) {\n\t\t\t\t\techo '<span class=\"cz_info_2\" style=\"' . esc_attr( $text_2_style ) . '\">' . do_shortcode( wp_kses_post( $i['it_text_2'] ) ) . '</span>';\n\t\t\t\t}\n\t\t\t\techo '</div>';\n\t\t\t\t\n\t\t\t\tif ( $link ) {\n\t\t\t\t\techo '</a>';\n\t\t\t\t} else {\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\n\t\t\t} else if ( $elm === 'search' ) {\n\n\t\t\t\t$icon_style = empty( $i['sk_search_icon'] ) ? '' : self::sk_inline_style( $i['sk_search_icon'] );\n\t\t\t\t$icon_style_hover = empty( $i['sk_search_icon_hover'] ) ? '' : ' data-cz-style=\".' . $element_uid . ' .xtra-search-icon:hover{' . self::sk_inline_style( $i['sk_search_icon_hover'], true ) . '}\"';\n\t\t\t\t$icon_in_style = empty( $i['sk_search_icon_in'] ) ? '' : self::sk_inline_style( $i['sk_search_icon_in'] );\n\t\t\t\t$input_style = empty( $i['sk_search_input'] ) ? '' : self::sk_inline_style( $i['sk_search_input'] );\n\t\t\t\t$outer_style = empty( $i['sk_search_con'] ) ? '' : self::sk_inline_style( $i['sk_search_con'] );\n\t\t\t\t$ajax_style = empty( $i['sk_search_ajax'] ) ? '' : self::sk_inline_style( $i['sk_search_ajax'] );\n\t\t\t\t$icon = empty( $i['search_icon'] ) ? 'fa fa-search' : $i['search_icon'];\n\t\t\t\t$ajax = empty( $i['ajax_search'] ) ? '' : ' cz_ajax_search';\n\n\t\t\t\t$form_style = empty( $i['search_form_width'] ) ? '' : 'width: ' . esc_attr( $i['search_form_width'] );\n\n\t\t\t\t$i['search_type'] = empty( $i['search_type'] ) ? 'form' : $i['search_type'];\n\t\t\t\t$i['search_placeholder'] = empty( $i['search_placeholder'] ) ? '' : do_shortcode( $i['search_placeholder'] );\n\n\t\t\t\techo '<div class=\"search_with_icon search_style_' . esc_attr( $i['search_type'] . $ajax ) . '\">';\n\t\t\t\techo self::contains( esc_attr( $i['search_type'] ), 'form' ) ? '' : '<i class=\"xtra-search-icon ' . esc_attr( $icon ) . '\" style=\"' . esc_attr( $icon_style ) . '\"' . $icon_style_hover . '></i>';\n\n\t\t\t\techo '<i class=\"fa czico-198-cancel cz_close_popup xtra-close-icon hide\"></i>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"outer_search\" style=\"' . esc_attr( $outer_style ) . '\"><div class=\"search\" style=\"' . esc_attr( $form_style ) . '\">'; ?>\n\t\t\t\t\t<form method=\"get\" action=\"<?php echo esc_url( home_url( '/' ) ); ?>\" autocomplete=\"off\">\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\tif ( $i['search_type'] === 'icon_full' ) {\n\t\t\t\t\t\t\t\techo '<span' . ( empty( $i['sk_search_title'] ) ? '' : ' style=\"' . esc_attr( self::sk_inline_style( $i['sk_search_title'] ) ) . '\"' ) . '>' . esc_html( $i['search_placeholder'] ) . '</span>';\n\t\t\t\t\t\t\t\t$i['search_placeholder'] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<input name=\"nonce\" type=\"hidden\" value=\"<?php echo wp_create_nonce('ajax_search_nonce'); ?>\" />\n\t\t\t\t\t\t<input name=\"post_type\" type=\"hidden\" value=\"<?php echo empty( $i['search_cpt'] ) ? '' : esc_attr( $i['search_cpt'] ); ?>\" />\n\t\t\t\t\t\t<input name=\"posts_per_page\" type=\"hidden\" value=\"<?php echo empty( $i['search_count'] ) ? '' : esc_attr( $i['search_count'] ); ?>\" />\n\t\t\t\t\t\t<input name=\"no_thumbnail\" type=\"hidden\" value=\"<?php echo empty( $i['search_no_thumbnail'] ) ? '' : esc_attr( $i['search_no_thumbnail'] ); ?>\" />\n\t\t\t\t\t\t<input class=\"ajax_search_input\" name=\"s\" type=\"text\" placeholder=\"<?php echo esc_attr( $i['search_placeholder'] ); ?>\" style=\"<?php echo esc_attr( $input_style ); ?>\">\n\t\t\t\t\t\t<button type=\"submit\"><i class=\"<?php echo wp_kses_post( $icon ); ?>\" data-icon=\"<?php echo wp_kses_post( $icon ); ?>\" style=\"<?php echo esc_attr( $icon_in_style ); ?>\"></i></button>\n\t\t\t\t\t</form>\n\t\t\t\t\t<div class=\"ajax_search_results\" style=\"<?php echo esc_attr( $ajax_style ); ?>\"></div>\n\t\t\t\t</div><?php\n\t\t\t\techo '</div></div>';\n\n\t\t\t} else if ( $elm === 'widgets' ) {\n\n\t\t\t\t$elm_uniqid = 'cz_ofc_' . rand( 11111, 99999 );\n\t\t\t\t$con_style = empty( $i['sk_offcanvas'] ) ? '' : self::sk_inline_style( $i['sk_offcanvas'] );\n\t\t\t\t$icon_style = empty( $i['sk_offcanvas_icon'] ) ? '' : 'i.' . $elm_uniqid . '{' . self::sk_inline_style( $i['sk_offcanvas_icon'] ) . '}';\n\t\t\t\t$icon_style .= empty( $i['sk_offcanvas_icon_hover'] ) ? '' : 'i.' . $elm_uniqid . ':hover{' . self::sk_inline_style( $i['sk_offcanvas_icon_hover'] ) . '}';\n\t\t\t\t$icon = empty( $i['offcanvas_icon'] ) ? 'fa fa-bars' : $i['offcanvas_icon'];\n\t\t\t\t\n\t\t\t\t$menu_title = isset( $i['menu_title'] ) ? $i['menu_title'] : '';\n\t\t\t\t$icon .= $menu_title ? ' icon_plus_text' : '';\n\n\t\t\t\t$icon_style .= empty( $i['sk_menu_title'] ) ? '' : '.' . $elm_uniqid . ' span{' . self::sk_inline_style( $i['sk_menu_title'] ) . '}';\n\t\t\t\t$icon_style .= empty( $i['sk_menu_title_hover'] ) ? '' : '.' . $elm_uniqid . ':hover span{' . self::sk_inline_style( $i['sk_menu_title_hover'] ) . '}';\n\n\t\t\t\techo '<div class=\"offcanvas_container\"><i class=\"' . esc_attr( $icon . ' ' . $elm_uniqid ) . '\" data-cz-style=\"' . esc_attr( $icon_style ) . '\"><span>' . esc_html( $menu_title ) . '</span></i><div class=\"offcanvas_area offcanvas_original ' . ( empty( $i['inview_position_widget'] ) ? 'inview_left' : esc_attr( $i['inview_position_widget'] ) ) . '\" style=\"' . esc_attr( $con_style ) . '\">';\n\t\t\t\tif ( is_active_sidebar( 'offcanvas_area' ) ) {\n\t\t\t\t\tdynamic_sidebar( 'offcanvas_area' ); \n\t\t\t\t}\n\t\t\t\techo '</div></div>';\n\n\t\t\t} else if ( $elm === 'hf_elm' ) {\n\n\t\t\t\t$con_style = empty( $i['sk_hf_elm'] ) ? '' : self::sk_inline_style( $i['sk_hf_elm'] );\n\n\t\t\t\t$elm_uniqid = 'cz_hf_' . rand( 11111, 99999 );\n\t\t\t\t$icon_style = empty( $i['sk_hf_elm_icon'] ) ? '' : 'i.' . $elm_uniqid . '{' . self::sk_inline_style( $i['sk_hf_elm_icon'] ) . '}';\n\t\t\t\t$icon_style .= empty( $i['sk_hf_elm_icon_hover'] ) ? '' : 'i.' . $elm_uniqid . ':hover{' . self::sk_inline_style( $i['sk_hf_elm_icon_hover'] ) . '}';\n\n\t\t\t\t$icon = empty( $i['hf_elm_icon'] ) ? 'fa fa-bars' : $i['hf_elm_icon'];\n\n\t\t\t\techo '<i class=\"hf_elm_icon ' . esc_attr( $icon . ' ' . $elm_uniqid ) . '\" data-cz-style=\"' . esc_attr( $icon_style ) . '\"></i><div class=\"hf_elm_area\" style=\"' . esc_attr( $con_style ) . '\"><div class=\"row clr\">' . ( empty( $i['hf_elm_page'] ) ? '' : self::get_page_as_element( esc_html( $i['hf_elm_page'] ) ) ) . '</div></div>';\n\n\t\t\t} else if ( $elm === 'shop_cart' ) {\n\n\t\t\t\t$shop_plugin = ( empty( $i['shop_plugin'] ) || $i['shop_plugin'] === 'woo' ) ? 'woo' : 'edd';\n\n\t\t\t\t$icon_style = empty( $i['sk_shop_icon'] ) ? '' : self::sk_inline_style( $i['sk_shop_icon'] );\n\t\t\t\t$icon = empty( $i['shopcart_icon'] ) ? 'fa fa-shopping-basket' : $i['shopcart_icon'];\n\n\t\t\t\t$shop_style = empty( $i['sk_shop_count'] ) ? '' : '.' . $element_uid . ' .cz_cart_count, .' . $element_uid . ' .cart_1 .cz_cart_count{' . esc_attr( self::sk_inline_style( $i['sk_shop_count'] ) ) . '}';\n\t\t\t\t$shop_style .= empty( $i['sk_shop_content'] ) ? '' : '.' . $element_uid . ' .cz_cart_items{' . esc_attr( self::sk_inline_style( $i['sk_shop_content'] ) ) . '}';\n\n\t\t\t\t$cart_url = $cart_content = '';\n\n\t\t\t\tif ( $shop_plugin === 'woo' && function_exists( 'is_woocommerce' ) ) {\n\t\t\t\t\t$cart_url = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : '#';\n\t\t\t\t\t$cart_content = '<div class=\"cz_cart\">' . ( is_customize_preview() ? '<span class=\"cz_cart_count\">2</span><div class=\"cz_cart_items cz_cart_dummy\"><div><div class=\"cart_list\"><div class=\"item_small\"><a href=\"#\"></a><div class=\"cart_list_product_title cz_tooltip_up\"><h3><a href=\"#\">XXX</a></h3><div class=\"cart_list_product_quantity\">1 x <span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>32.00</span></div><a href=\"#\" class=\"remove\" data-product_id=\"1066\" data-title=\"' . esc_html__( 'Remove', 'xtra' ) . '\"><i class=\"fa fa-trash\"></i></a></div></div><div class=\"item_small\"><a href=\"#\"></a><div class=\"cart_list_product_title\"><h3><a href=\"#\">XXX</a></h3><div class=\"cart_list_product_quantity\">1 x <span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>32.00</span></div><a href=\"#\" class=\"remove\" data-product_id=\"1066\" data-title=\"' . esc_html__( 'Remove', 'xtra' ) . '\"><i class=\"fa fa-trash\"></i></a></div></div></div><div class=\"cz_cart_buttons clr\"><a href=\"#\">XXX, <span><span class=\"woocommerce-Price-amount amount\"><span class=\"woocommerce-Price-currencySymbol\">$</span>64.00</span></span></a><a href=\"#\">XXX</a></div></div></div>' : '' ) . '</div>';\n\t\t\t\t} else if ( function_exists( 'EDD' ) ) {\n\t\t\t\t\t$cart_url = function_exists( 'edd_get_checkout_uri' ) ? edd_get_checkout_uri() : '#';\n\t\t\t\t\t$cart_content = '<div class=\"cz_cart_edd\"><span class=\"cz_cart_count edd-cart-quantity\">' . wp_kses_post( edd_get_cart_quantity() ) . '</span><div class=\"cz_cart_items\"><div><div class=\"cart_list\">' . str_replace( \" \", '', do_shortcode( '[download_cart]' ) ) . '</div></div></div></div>';\n\t\t\t\t}\n\n\t\t\t\techo '<div class=\"elms_shop_cart\" data-cz-style=\"' . esc_attr( $shop_style ) . '\">';\n\t\t\t\techo '<a class=\"shop_icon noborder\" href=\"' . esc_url( $cart_url ) . '\"><i class=\"' . esc_attr( $icon ) . '\" style=\"' . esc_attr( $icon_style ) . '\"></i></a>';\n\t\t\t\techo wp_kses_post( $cart_content );\n\t\t\t\techo '</div>';\n\n\t\t\t} else if ( $elm === 'wishlist' ) {\n\n\t\t\t\t$icon_style = empty( $i['sk_shop_icon'] ) ? '' : self::sk_inline_style( $i['sk_shop_icon'] );\n\t\t\t\t$icon = empty( $i['shopcart_icon'] ) ? 'fa fa-heart-o' : $i['shopcart_icon'];\n\n\t\t\t\t$link = $wishlist_title = '#';\n\n\t\t\t\t$i['wishlist_page'] = empty( $i['wishlist_page'] ) ? 'Wishlist' : $i['wishlist_page'];\n\n\t\t\t\t$page = get_page_by_title( $i['wishlist_page'], 'object', 'page' );\n\t\t\t\tif ( isset( $page->ID ) ) {\n\t\t\t\t\t$link = get_permalink( $page->ID );\n\t\t\t\t}\n\t\t\t\t$wishlist_title = $i['wishlist_page'];\n\n\t\t\t\t$shop_style = empty( $i['sk_shop_count'] ) ? '' : '.cz_wishlist_count{' . esc_attr( self::sk_inline_style( $i['sk_shop_count'] ) ) . '}';\n\n\t\t\t\techo '<div class=\"elms_wishlist\" data-cz-style=\"' . esc_attr( $shop_style ) . '\">';\n\t\t\t\techo '<a class=\"wishlist_icon\" href=\"' . esc_url( $link ) . '\" title=\"' . $wishlist_title . '\"><i class=\"' . esc_attr( $icon ) . '\" style=\"' . esc_attr( $icon_style ) . '\"></i></a>';\n\t\t\t\techo '<span class=\"cz_wishlist_count\"></span>';\n\t\t\t\techo '</div>';\n\n\t\t\t} else if ( $elm === 'line' && isset( $i['line_type'] ) ) {\n\n\t\t\t\t$line = empty( $i['sk_line'] ) ? '' : self::sk_inline_style( $i['sk_line'] );\n\t\t\t\techo '<div class=\"' . esc_attr( $i['line_type'] ) . '\" style=\"' . esc_attr( $line ) . '\"> </div>';\n\n\t\t\t} else if ( $elm === 'button' ) {\n\n\t\t\t\t$elm_uniqid = 'cz_btn_' . rand( 11111, 99999 );\n\t\t\t\t$btn_css = empty( $i['sk_btn'] ) ? '' : self::sk_inline_style( $i['sk_btn'] );\n\t\t\t\t$btn_hover = empty( $i['sk_btn_hover'] ) ? '' : '.' . esc_attr( $elm_uniqid ) . ':hover{' . self::sk_inline_style( $i['sk_btn_hover'], true ) . '}';\n\t\t\t\t\n\t\t\t\t$btn_hover .= empty( $i['sk_hf_elm_icon'] ) ? '' : '.' . esc_attr( $elm_uniqid ) . ' i {' . self::sk_inline_style( $i['sk_hf_elm_icon'] ) . '}';\n\t\t\t\t$btn_hover .= empty( $i['sk_hf_elm_icon_hover'] ) ? '' : '.' . esc_attr( $elm_uniqid ) . ':hover i {' . self::sk_inline_style( $i['sk_hf_elm_icon_hover'] ) . '}';\n\n\t\t\t\t$icon_before = $icon_after = '';\n\t\t\t\tif ( ! empty( $i['hf_elm_icon'] ) ) {\n\t\t\t\t\tif ( empty( $i['btn_icon_pos'] ) ) {\n\t\t\t\t\t\t$icon_before = '<i class=\"' . $i['hf_elm_icon'] . ' cz_btn_header_icon_before\"></i>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$icon_after = '<i class=\"' . $i['hf_elm_icon'] . ' cz_btn_header_icon_after\"></i>';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$target = empty( $i['btn_link_target'] ) ? '' : ' target=\"_blank\"';\n\t\t\t\techo '<a class=\"cz_header_button ' . esc_attr( $elm_uniqid ) . '\" href=\"' . ( empty( $i['btn_link'] ) ? '' : esc_url( $i['btn_link'] ) ) . '\" style=\"' . esc_attr( $btn_css ) . '\" data-cz-style=\"' . esc_attr( $btn_hover ) . '\"' . $target . '>' . wp_kses_post( $icon_before ) . '<span>' . esc_html( empty( $i['btn_title'] ) ? 'Button' : do_shortcode( $i['btn_title'] ) ) . '</span>' . wp_kses_post( $icon_after ) . '</a>';\n\n\t\t\t// Custom shortcode or HTML codes\n\t\t\t} else if ( $elm === 'custom' && isset( $i['custom'] ) ) {\n\n\t\t\t\techo do_shortcode( wp_kses_post( $i['custom'] ) );\n\n\t\t\t// WPML Switcher\n\t\t\t} else if ( $elm === 'wpml' && function_exists( 'icl_get_languages' ) ) {\n\n\t\t\t\t$wpml = icl_get_languages( 'skip_missing=N&orderby=KEY&order=DIR&link_empty_to=str' );\n\n\t\t\t\t$wpml_opposite = empty( $i['wpml_opposite'] ) ? '' : ' data-cz-style=\".cz_language_switcher a { display: none } .cz_language_switcher div { display: block; position: static; transform: none; } .cz_language_switcher div a { display: block; }\"';\n\n\t\t\t\tif ( is_array( $wpml ) ) {\n\t\t\t\t\t$bg = empty( $i['wpml_background'] ) ? '' : 'background: ' . esc_attr( $i['wpml_background'] ) . '';\n\t\t\t\t\techo '<div class=\"cz_language_switcher\"' . $wpml_opposite . '><div style=\"' . esc_attr( $bg ) . '\">';\n\t\t\t\t\tforeach( $wpml as $lang => $vals ) {\n\t\t\t\t\t\tif ( ! empty( $vals ) ) {\n\n\t\t\t\t\t\t\t$class = $vals['active'] ? 'cz_current_language' : '';\n\t\t\t\t\t\t\tif ( empty( $i['wpml_title'] ) ) {\n\t\t\t\t\t\t\t\t$title = $vals['translated_name'];\n\t\t\t\t\t\t\t} else if ( $i['wpml_title'] !== 'no_title' ) {\n\t\t\t\t\t\t\t\t$title = ucwords( $vals[ $i['wpml_title'] ] );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$title = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$color = '';\n\t\t\t\t\t\t\tif ( $class && ! empty( $i['wpml_color'] ) ) {\n\t\t\t\t\t\t\t\t$color = 'color: ' . esc_attr( $i['wpml_current_color'] );\n\t\t\t\t\t\t\t} else if ( ! $class && ! empty( $i['wpml_color'] ) ) {\n\t\t\t\t\t\t\t\t$color = 'color: ' . esc_attr( $i['wpml_color'] );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( !empty( $i['wpml_flag'] ) ) {\n\t\t\t\t\t\t\t\techo '<a class=\"' . esc_attr( $class ) . '\" href=\"' . esc_url( $vals['url'] ) . '\" style=\"' . esc_attr( $color ) . '\"><img src=\"' . esc_url( $vals['country_flag_url'] ) . '\" alt=\"#\" width=\"200\" height=\"200\" class=\"' . esc_attr( $title ? 'mr8' : '' ) . '\" />' . esc_html( $title ) . '</a>';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo '<a class=\"' . esc_attr( $class ) . '\" href=\"' . esc_url( $vals['url'] ) . '\" style=\"' . esc_attr( $color ) . '\">' . esc_html( $title ) . '</a>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo '</div></div>';\n\t\t\t\t}\n\n\t\t\t// Custom page as element\n\t\t\t} else if ( $elm === 'custom_element' && ! empty( $i['header_elements'] ) && $i['header_elements'] !== 'none' ) {\n\n\t\t\t\techo self::get_page_as_element( esc_html( $i['header_elements'] ) );\n\t\t\t\t//echo preg_replace( '#\\[[^\\]]+\\]#', '', self::get_page_as_element( esc_html( $i['header_elements'] ) ) );\n\n\t\t\t// Current user avatar\n\t\t\t} else if ( $elm === 'avatar' ) {\n\n\t\t\t\t$sk_avatar = empty( $i['sk_avatar'] ) ? '' : $i['sk_avatar'];\n\t\t\t\t$link = empty( $i['avatar_link'] ) ? '' : $i['avatar_link'];\n\t\t\t\t$size = empty( $i['avatar_size'] ) ? '' : $i['avatar_size'];\n\n\t\t\t\techo '<a class=\"cz_user_gravatar\" href=\"' . esc_url( $link ) . '\" style=\"' . esc_attr( $sk_avatar ) . '\">';\n\t\t\t\tif ( $is_user_logged_in ) {\n\t\t\t\t\tglobal $current_user;\n\t\t\t\t\techo wp_kses_post( get_avatar( esc_html( $current_user->user_email ), esc_attr( $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\techo wp_kses_post( get_avatar( 'xxx@xxx.xxx', esc_attr( $size ) ) );\n\t\t\t\t}\n\t\t\t\techo '</a>';\n\t\t\t}\n\n\t\t\t// Close element\n\t\t\techo '</div>';\n\t\t}",
"public function getRow() {}",
"public function getRow();",
"public function glueElements($row) {\n\t\t$strClass = $row['allDayEvent']==1?'allday':'regular';\n\t\t$this->log->notify($this,\"Setting class to $strClass\");\n\t\t$id = \"link-\".$row['domId'];\n\t\t$source = \"<span id=\\\"$id\\\" class=\\\"$strClass\\\">\";\n\t\t$source .='<a href=\"'.$this->getAction().$row['id'].'\">'.$row['title'].'</a></span>';\n\t\t$this->log->notify($this, $source);\n\t\t$dom = new DOMDocument();\n\t\t$dom->strictErrorChecking = false;\n\t\t$dom->loadHTML($source);\n\t\t$xpath = new DOMXpath($dom);\n\t\t$element = $xpath->query(\"//*[@id='$id']\");\n\t\treturn $element->item(0);\n\t}",
"public function getElement()\n {\n return $this->element;\n }",
"public function getClickwrapBody() {\n return @$this->attributes['clickwrap_body'];\n }",
"public function getElement()\n\t{\n\t\treturn $this->_element;\n\t}",
"public function getBodyTag() {}",
"public function element(): ?string\n {\n return $this->element ?: $this->first();\n }",
"public function getRow(): int\n {\n return $this->row;\n }",
"public function getSelectedElement() {\n $value = null;\n\n if(($selectedIndex = $this->getSelectedIndex()) >= 0) {\n $value = $this->model->getElementAt($selectedIndex);\n }\n\n return $value;\n }",
"protected function get_body_node() {\n\t\t_deprecated_function( 'Use $this->dom->body instead', '1.5.0' );\n\t\treturn $this->dom->body;\n\t}",
"public function getCalledElement();",
"protected function getElementRow($element, $delta) {\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $casestudy = $this->getEntity();\n //print_r($casestudy);\n\n //exit;\n $row = [];\n\n\n $key = $element->id();\n //echo $key.'#'.$weights[$key]['weight'];\n\n// $element_dialog_attributes = WebformDialogHelper::getModalDialogAttributes(800);\n// $plugin_id = $this->elementManager->getElementPluginId($element);\n//\n// /** @var \\Drupal\\webform\\Plugin\\WebformElementInterface $webform_element */\n// $webform_element = $this->elementManager->createInstance($plugin_id);\n//\n// $is_container = $webform_element->isContainer($element);\n// $is_root = $webform_element->isRoot();\n//\n// // If disabled, display warning.\n// if ($webform_element->isDisabled()) {\n// $webform_element->displayDisabledWarning($element);\n// }\n\n $is_root = true;\n // Get row class names.\n $row_class = ['draggable'];\n if ($is_root) {\n $row_class[] = 'tabledrag-root';\n $row_class[] = 'webform-ui-element-root';\n }\n// if (!$is_container) {\n// $row_class[] = 'tabledrag-leaf';\n// }\n// if ($is_container) {\n// $row_class[] = 'webform-ui-element-container';\n// }\n// if (!empty($element['#type'])) {\n// $row_class[] = 'webform-ui-element-type-' . $element['#type'];\n// }\n// else {\n// $row_class[] = 'webform-ui-element-container';\n// }\n\n // Add element key.\n //$row['#attributes']['data-webform-key'] = $element['#webform_key'];\n\n $row['#attributes']['class'] = $row_class;\n\n $row['title'] = [\n '#markup' => $element->label(),\n// '#url' => new Url('entity.webform_ui.element.edit_form', [\n// 'webform' => $webform->id(),\n// 'key' => $key,\n// ]),\n //'#attributes' => $element_dialog_attributes,\n ];\n\n\n $row['key'] = [\n '#markup' => $element->id(),\n ];\n\n $row['type'] = [\n '#markup' => $element->type,\n ];\n $row['correct_answer'] = [\n '#markup' => $element->correct_answer,\n ];\n\n $row['weight'] = [\n '#type' => 'weight',\n '#title' => $this->t('Weight for ID @id', ['@id' => $key]),\n '#title_display' => 'invisible',\n '#default_value' => $element->weight,\n '#attributes' => [\n 'class' => ['row-weight'],\n ],\n '#delta' => $delta,\n ];\n\n $row['operations'] = [\n '#type' => 'operations',\n ];\n $row['operations']['#links']['edit'] = [\n 'title' => $this->t('Edit'),\n 'url' => new Url(\n 'entity.question.edit_form',\n [\n 'casestudy' => $casestudy->id(),\n 'question' => $key,\n ]\n ),\n ];\n\n $row['operations']['#links']['delete'] = [\n 'title' => $this->t('Delete'),\n 'url' => new Url(\n 'entity.question.delete_form',\n [\n 'casestudy' => $casestudy->id(),\n 'question' => $key,\n ]\n ),\n 'attributes' => WebformDialogHelper::getModalDialogAttributes(700),\n ];\n\n //print_r($row);\n //exit;\n return $row;\n }",
"public function getCellValueForRendering($row, $cell=null);",
"abstract public function getRow();",
"abstract public function getRow();",
"public function getCellValue($row);",
"public function getRowId() {\n return $this->_row_id;\n }",
"function get_row_sub_value($selector)\n{\n}",
"function &getRowInstance() {\n\t\t$row = new MastheadGridRow();\n\t\treturn $row;\n\t}",
"public function current()\n {\n return $this->getRow($this->pointer);\n }",
"public function getHeadElement()\n {\n return $this->head;\n }",
"public function getElement() {\r\n $elementId = (int)$this->getProperty('elementId', 0);\r\n $elementClass = $this->getProperty('elementType', '');\r\n if ($elementId && !empty($elementClass)) {\r\n return $this->modx->getObject($elementClass, $elementId);\r\n }\r\n\r\n return null;\r\n }",
"public function getTableNode() : object\n {\n\n return $this->contents->getElementsByTagName('table')->item(0);\n }",
"function &getRowInstance() {\n\t\t$row = new IssueGridRow();\n\t\treturn $row;\n\t}",
"protected function buildElement($row) {\n\t\t$elem = null;\n\t\tswitch ($row['ElementType']) {\n\t\t\tcase 'textarea' \t\t: $elem = $this->buildTextarea($row);\n\t\t\tbreak;\n\t\t\tcase 'hidden' \t\t\t: $elem = $this->buildHidden($row);\n\t\t\tbreak;\n\t\t\tcase 'select' \t\t\t: $elem = $this->buildSelect($row);\n\t\t\tbreak;\n\t\t\tcase 'checkbox' \t\t: $elem = $this->buildCheckbox($row);\n\t\t\tbreak;\n\t\t\tcase 'radio' \t\t\t: $elem = $this->buildRadio($row);\n\t\t\tbreak;\n\t\t\tcase 'password'\t\t\t: $elem = $this->buildPassword($row);\n\t\t\tbreak;\n\t\t\tcase 'checkboxsingle'\t: $elem = $this->buildCheckboxSingle($row);\n\t\t\tbreak;\n\t\t\tcase 'text' \t\t\t: $elem = $this->buildText($row);\n\t\t\tbreak;\n\t\t\tdefault \t\t\t\t: $elem = $this->buildText($row);\n\t\t\tbreak;\n\t\t\t\t\t\n\t\t}\n\t\treturn $elem;\n\t}",
"public function getRTERootBlockElement()\n\t{\n\t}",
"protected function getElement() {\n return $this->getWebform()->getElement($this->configuration['element_key']);\n }",
"function ou_df_grid_row($variables) {\n return '<div class=\"int-row\">' . $variables['element']['#children'] . '</div>';\n}",
"public function asElement() {\n //public Element asElement()\n return $element;\n }",
"abstract protected function getRow($row);",
"public function getContentElement(): ?ContentElementInterface\n {\n return $this->getChildElement(1);\n }",
"public function getFirstRow()\n {\n if (count($this->rows) == 0) {\n if (!is_null($this->summaryRow)) {\n return $this->summaryRow;\n }\n return false;\n }\n $row = array_slice($this->rows, 0, 1);\n return $row[0];\n }",
"public function current()\n {\n return $this->_row;\n }",
"public function current() {\n return $this->currentRow;\n }",
"function get_rower($rower_id){\n\tglobal $conn, $show_debug;\n\t\n\tif(is_numeric($rower_id)){\n\t\t// select the rower\n\t\t$sql = \"SELECT * FROM rower WHERE id='\".$rower_id.\"';\";\n\t\t$result = $conn->query($sql);\n\t\tif($show_debug && !$result)echo mysqli_error($conn);\n\n\t\t// should be only one rower available\n\t\tif ($result->num_rows == 1) return $result->fetch_assoc();\n\t\telse return null;\n\t}\n\telse return null;\n}",
"public function getBody() {\n $this->addInsertBlocks();\n\n return $this->_insertedBody;\n }",
"public function getData_row()\n {\n return $this->data_row;\n }",
"abstract protected function get_root_element();",
"function getHtmlRow($obj_row, $cat){\r\n\t$row = '';\r\n\t\r\n\tswitch($cat){\r\n\t\tcase 'twitter':\r\n\t\t\t$row = getHtmlRowTwitter($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'facebook':\r\n\t\t\t$row = getHtmlRowFacebook($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'video':\r\n\t\t\t$row = getHtmlRowYoutube($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'imagenes':\r\n\t\t\t$row = getHtmlRowinstagram($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'prensa':\r\n\t\t\t$row = getHtmlRowPrensa($obj_row);\r\n\t\t\tbreak;\r\n\t\tcase 'desarrolladores':\r\n\t\t\t$row = getHtmlRowDesarrollo($obj_row);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$row = getHtmlRowDefault($obj_row);\r\n\t\t\tbreak;\r\n\t\t\r\n\t}\r\n\t\r\n\treturn($row);\t\t\t\r\n}",
"public static function lorPageElement();",
"public function current()\n\t{\n\t\treturn $this->row;\n\t}",
"public function getTbodyData(): ?array {\n return $this->tbodyData;\n }",
"public function getBodyFirst()\n {\n return $this->bodyFirst;\n }",
"public function getOuterHtml()\n {\n return $this->getSession()->getDriver()->getOuterHtml($this->getXpath());\n }",
"public function getRowID() {\n return $this->_row_id;\n }",
"public function exec_SELECTgetSingleRow() {}",
"public function get_value() {\n\t\t$row = $this->get_row();\n\t\tif ($row) {\n\t\t\treturn current($row);\n\t\t}\n\t}",
"public function current()\n {\n return $this->_currentRow;\n }",
"protected function getRowNo()\n{\n\tforeach ($this->inBlock as &$block) {\n\t\t$rowno = $this->elements[$block]['rowno'];\n\t\tif (isset($rowno)) return (int)$rowno;\n\t}\n\treturn 0;\n}",
"public function firstRow() {\n\t}",
"public function getBodyTag()\n {\n return $this->bodyTag;\n }",
"public function getTopRow() {\n\t\treturn $this->_result->fetch_array();\n\t}",
"public function getBody()\n {\n return $this->getAttribute('body', false, null);\n }",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"function currentElement()\n {\n return $this->current ? $this->current->parentNode : NULL;\n }",
"function xmlGetRowInXML($row,$conf) {\n\t\t$table = $row['table'];\n\n\t\t// if useRggmTitle > title field is hardcoded\n\t\t$field = ($this->conf['title.']['useRggmTitle'] == 1) ? 'rggmtitle' : $this->conf['title.'][$table];\n\n\t\t$title = $this->cObj2->stdWrap($row[$field], $this->conf['title.'][$table.'.']);\n\t\t$content = '<![CDATA[ ' . $title . ' ]]>';\n\t\t$this->xmlLines[] = $this->xmlIcode . $this->xmlFieldWrap('t', (($content)));\n\t}",
"public function get_elementid() {\n return $this->elementid;\n }",
"abstract function getAsElem($dom);",
"public function current()\n {\n return $this->get_row();\n }",
"public function first_row() {\n if ($this->first_row_memo === null) {\n $this->next();\n $this->first_row_memo = $this->current();\n }\n return $this->first_row_memo;\n }",
"public function dataRow()\n {\n return $this->morphTo();\n }",
"protected function _get_row()\r\n {\r\n $result = $this->db->get()->row_array();\r\n\r\n //execute extends in child class.\r\n $result = $this->_extend_get_row($result);\r\n\r\n return $result;\r\n }",
"private function getSiteData($row) {\n return $row;\n }",
"public function first()\n {\n return reset($this->_elements);\n }",
"public function getRow($index){\n\t\treturn $this->getItem($index);\n\t}",
"function getBody() {\n\t\treturn $this->getData('body');\n\t}",
"function getBody() {\n\t\treturn $this->getData('body');\n\t}",
"public function getElementId() {\n return $this->elementId;\n }",
"protected function row($row)\n { \n return DB::table($this->table)\n ->where('personal_access_client', 0)\n ->first()\n ->$row;\n }",
"public function get()\n {\n if (is_null($this->value)) {\n throw new NoSuchElementException();\n }\n return $this->value;\n }",
"public function innerHtml()\n {\n return $this->getDom()->innerHtml();\n }",
"function getRow($arr, $y){\n\treturn $arr[$y];\n}",
"function FetchRow() {\n\t\t\treturn pg_fetch_row($this->result);\n\t\t}",
"public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }",
"public function extractRow()\n\t{\n \n // extract the row data into a field array\n \n // validate each field\n \n // return field array\n \n }",
"protected function value()\n {\n return $this->row($this->row);\n }",
"public function getRowOffset();"
] | [
"0.6462467",
"0.6430712",
"0.64278567",
"0.63921416",
"0.63694614",
"0.6310292",
"0.63045377",
"0.62498844",
"0.62273586",
"0.62168664",
"0.6210518",
"0.6148992",
"0.59975886",
"0.5958963",
"0.59482557",
"0.593269",
"0.5829517",
"0.5829517",
"0.5800319",
"0.5799819",
"0.5784658",
"0.5781152",
"0.5774035",
"0.5758679",
"0.57397586",
"0.5728795",
"0.56504816",
"0.56420934",
"0.5609234",
"0.5595975",
"0.55642796",
"0.5541109",
"0.55001324",
"0.5413287",
"0.54049295",
"0.54026705",
"0.53993416",
"0.53993416",
"0.5381814",
"0.53811467",
"0.5372896",
"0.53537905",
"0.5351643",
"0.53469574",
"0.53424037",
"0.532525",
"0.53128505",
"0.53116685",
"0.5297558",
"0.5292726",
"0.5287571",
"0.52872866",
"0.52759093",
"0.52688193",
"0.52670485",
"0.5255086",
"0.52397406",
"0.5237747",
"0.5226203",
"0.52188367",
"0.5198268",
"0.5194408",
"0.51943827",
"0.51858467",
"0.51810074",
"0.5176307",
"0.5170616",
"0.5156843",
"0.51568097",
"0.5153132",
"0.51528376",
"0.51431316",
"0.5133129",
"0.51295084",
"0.51269144",
"0.5124781",
"0.51214725",
"0.511805",
"0.5109805",
"0.51066065",
"0.5106156",
"0.51013",
"0.50983506",
"0.5094922",
"0.5077986",
"0.5049298",
"0.50424933",
"0.5040902",
"0.5032565",
"0.5032565",
"0.50301874",
"0.5029035",
"0.50258946",
"0.50219715",
"0.50115556",
"0.5003037",
"0.49903527",
"0.4979922",
"0.49763727",
"0.49762553"
] | 0.6293322 | 7 |
Get all elements of body rows | public function getRows()
{
$ret = null;
if ($this->_tbody instanceof HtmlElement) {
$ret = $this->_tbody->getElements();
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getElements() {\n return $this->rows_object;\n }",
"public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}",
"public function rows() {\n\t\treturn $this->row();\n\t}",
"public function getElements() {}",
"function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}",
"public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}",
"public function getElements();",
"protected function fetchElementNodes()\n {\n $elements = [];\n\n foreach ($this->map as $query) {\n $list = $this->document->xpath($query);\n\n if (0 == count($list)) {\n continue;\n }\n\n foreach ($list as $node) {\n $elements[] = new HtmlNode($node, $this->document->getDocument());\n }\n }\n\n return $elements;\n }",
"public function getHtmlElements();",
"public function elements()\n {\n return parent::elements();\n }",
"public function getRows();",
"public function getRows();",
"public function getAll() {\n\t\treturn $this->rows;\n\t}",
"protected function tableRows()\n {\n $tbody = DB::table($this->argument('table'))->get();\n\n return $tbody->map(function ($field) {\n return $this->selectRowByField($field);\n });\n }",
"public function getRows()\n {\n if (is_null($this->summaryRow)) {\n return $this->rows;\n } else {\n return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow);\n }\n }",
"public function getRows()\n\t{\n\t\treturn $this->driver->getRows();\n\t}",
"function getRows() {\n\t\treturn $this->rows;\n\t}",
"abstract public function get_rows();",
"abstract protected function getRows();",
"public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}",
"public function get_rows() {\n return $this->rows;\n }",
"public function getRows()\n {\n return $this->rows;\n }",
"public function getRows()\n {\n return $this->rows;\n }",
"public function getRows ()\n {\n return $this->_rows;\n }",
"protected function getElements()\n {\n return $this->elements;\n }",
"protected function getElements(){\n return $this->_elements;\n }",
"public function body()\n {\n $this->altRow = false;\n $lastBreakValue = null;\n $body[] = '<tbody>';\n $breaks = 0;\n foreach ($this->data as $index => $row) {\n if (!empty($this->tableOptions['break'])) {\n $breakValue = $row[$this->tableOptions['break']];\n if ($breakValue !== $lastBreakValue) {\n $lastBreakValue = $breakValue;\n if ($breaks) {\n $body[] = '</tbody>';\n $body[] = '<tbody class=\"page-break-before\">';\n }\n $breaks++;\n $body[] = $this->buildBreakRow($this->tableOptions['break'], $row);\n // continue;\n }\n }\n $body[] = $this->buildRow($row);\n }\n $body[] = '</tbody>';\n\n $ret = implode(chr(10), $body);\n\n if (!empty($this->tableOptions['totals'])) {\n $ret .= $this->buildTotalsRow();\n }\n\n return $ret;\n }",
"public function rows() {\n return $this->schema->rows;\n }",
"public function getChildElements() {}",
"function getRows() { return $this->_rows; }",
"private function getBody(){\n\t\t$tbody=\"\";\n\t\t$tfilter=\"\";\n\t\t\n\t\tif($this->renderEmptyBody){\n\t\t\treturn \"<tbody></tbody>\";\n\t\t}\n\t\t\n\t\t//Si tiene un llamado a la base de datos, obtenemos los datos\n\t\tif($this->hasCallToDataBase){\n\t\t\t$this->getData();\n\t\t}\n\t\t\n\t\tif(!empty($this->data)){\n\t\t\tforeach($this->data as $dataRow){\n\t\t\t\t$tbody.=\"<tr>\";\n\t\t\t\t$counter=0;\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al principio*/\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($dataRow as $key=>$data){\n\t\t\t\t\tif(!empty($this->bindedTypes)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$type=$this->bindedTypes[$key];\n\t\t\t\t\t\t$parameter=$this->bindedTypesParams[$key];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($type){\n\t\t\t\t\t\t\tcase 'progressbar':\n\t\t\t\t\t\t\t\t$bar=new progressbar(array(\"id\"=>$key));\n\t\t\t\t\t\t\t\t$pje=$data*100;\n\t\t\t\t\t\t\t\t$bar->setBars(array($pje));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$bar->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"link\":\n\t\t\t\t\t\t\t\t$link=new link();\n\t\t\t\t\t\t\t\t$link->replaceFields($dataRow, $parameter);\n\t\t\t\t\t\t\t\t$link->setDisplay($data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tbody.=\"<td>\".$link->render(true).\"</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tbody.=\"<td>$data</td>\";\n\t\t\t\t\t}\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*Buscamos si el grid tiene alguna columna adicional al final*/\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tbody.=\"</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($tfilter!=\"\"){\n\t\t\t\t$tbody=$tfilter.$tbody;\n\t\t\t}\n\t\t\t\n\t\t\t$tbody=\"<tbody>$tbody</tbody>\";\n\t\t}else{\n\t\t\t$tbody=\"<tbody><tr><td colspan=\\\"{$this->cols}\\\"><div class=\\\"alert alert-error\\\">\".velkan::$lang[\"grid_msg\"][\"noDataFound\"].\"</div></td></tr></tbody>\";\n\t\t}\n\t\t\n\t\treturn $tbody;\n\t}",
"public function getRows()\n {\n return $this->_rows;\n }",
"public function all(): array\n {\n return $this->elements;\n }",
"public function getElements()\n {\n return $this->elements;\n }",
"public function tableRows(){\n\t\t$this->tableRows = $this->responseRows->length;\n\t\treturn $this->tableRows;\n\t}",
"public function getElements() {\n return $this->elements;\n }",
"private function get_filterItemsFromRows()\n {\n // Default return value\n $arr_return = array();\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // RETURN rows are empty\n if ( empty( $this->rows ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'Rows are empty. Filter: ' . $this->curr_tableField . '.';\n t3lib_div::devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return $arr_return;\n }\n // RETURN rows are empty\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n // Set nice_piVar\n $this->set_nicePiVar();\n\n // Set class var $htmlSpaceLeft\n $this->set_htmlSpaceLeft();\n\n // Set class var $maxItemsPerHtmlRow\n $this->set_maxItemsPerHtmlRow();\n\n // SWITCH current filter is a tree view\n // #i0117, 141223, dwildt, 1-/+\n //switch ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n switch ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n case( true ):\n $arr_return = $this->get_filterItemsTree();\n break;\n case( false ):\n default:\n $arr_return = $this->get_filterItemsDefault();\n $items = $arr_return[ 'data' ][ 'items' ];\n $arr_return = $this->get_filterItemsWrap( $items );\n break;\n }\n // SWITCH current filter is a tree view\n\n return $arr_return;\n }",
"public function elements()\n {\n return [];\n }",
"public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}",
"public function getRows($rows){\n\t\treturn $this->rows;\n\t}",
"function getAllRTEContent()\n\t{\n\t\t$result = array();\n\t\tarray_push($result, $this->getIntroduction());\n\t\tarray_push($result, $this->getOutro());\n\t\treturn $result;\n\t}",
"public function getElements() {\n return $this->elements;\n }",
"protected function findAll()\n {\n return ContainerPage::find()->contentContainer($this->contentContainer)->all();\n }",
"public function getElements() {\n\t\treturn $this->elements;\n\t}",
"protected function parseContent()\n {\n if (!empty($this->errors)) {\n return $this->getErrors();\n }\n\n try {\n $items = pq('tbody.itemWrapper');\n if ($items->html()) {\n return $this->parseV1Content();\n }\n return $this->parseV2Content();\n } catch (Exception $e) {\n $this->errors[] = $e;\n }\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM elementos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}",
"public function getElements()\n\t{\n\t\treturn $this->elements;\n\t}",
"public function elements()\r\n {\r\n return array(\r\n \r\n );\r\n }",
"public function renderTableBody() {\n //$models = array_values($this->dataProvider->getModels());\n //$keys = $this->dataProvider->getKeys();\n $rows = [];\n \n foreach ($this->dataProvider as $model) {\n if (is_callable($this->beforeRow)) {\n $row = call_user_func($this->beforeRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows)) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n } else {\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }\n }",
"public function get_elements()\n\t{\n\t\treturn $this->elements;\n\t}",
"public function get_rows()\n {\n $lock = !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? true : false;\n\n $tables = $this->file->sheets->first()->tables;\n\n list($query, $power) = $this->get_rows_query($tables);\n\n $head = $tables[0]->columns->map(function($column) { return 'C' . $column->id; })->toArray();\n\n if (Input::has('search.text') && Input::has('search.column_id')) {\n $query->where('C' . Input::get('search.column_id'), Input::get('search.text'));\n }\n\n $query->whereNull('deleted_at')->select($head)->addSelect('id');\n\n $paginate = $this->isCreater()\n ? $query->addSelect('created_by')->paginate(15)\n : $query->where('created_by', $this->user->id)->paginate(15);\n\n $encrypts = $tables[0]->columns->filter(function($column) { return $column->encrypt; });\n\n if (!$encrypts->isEmpty()) {\n $paginate->getCollection()->each(function($row) use($encrypts) {\n $this->setEncrypts($row, $encrypts);\n });\n }\n return ['paginate' => $paginate->toArray(),'lock' => $lock];\n }",
"public function selectAll();",
"function getElements($input) {\r\n\t\t$rs = $this->dbConn->query($input);\r\n\t\t$toRet = array();\r\n\t\t\r\n\t\t$index = 0;\r\n\t\twhile($rs->nextRow()) {\r\n//\t\t\t$this->visualizeRow($index++, $rs);\r\n\t\t\t$toRet[$index++] = $rs->getCurrentRow(); \r\n\t\t}\r\n\t\t\r\n\t\treturn $toRet;\r\n\t}",
"public function getColumns(){\n $rows = array();\n return $rows; \n }",
"private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }",
"public function elements()\n {\n return array(\n \n );\n }",
"public function getThemAll(){\n $query = '//employees/employee/.';\n //$employees = $this->domDocument->getElementsByTagName('employee');\n\n // create a new XPath object and associate it with the document we want to query against\n $xpath = new DOMXPath($this->domDocument);\n $result = $xpath->query($query);\n $arrEmps = array();\n if($result->length){\n // iterate of the results\n $classCounter = 0;\n foreach($result as $emp) {\n // add the details of the employee to an array\n $arrEmps[$classCounter][\"name\"] = $emp->getElementsByTagName(\"name\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"name\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"gender\"] = $emp->getElementsByTagName(\"gender\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"gender\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"phone\"] = $emp->getElementsByTagName(\"phone\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"phone\"].\"<br><hr>\";\n $arrEmps[$classCounter][\"email\"] = $emp->getElementsByTagName(\"email\")->item(0)->nodeValue;\n //echo $arrEmps[$classCounter][\"email\"].\"<br><hr>\";\n $classCounter +=1;\n //echo $classCounter.\"<br><hr>\";\n }\n }\n return $arrEmps;\n }",
"public function getAllRows()\n\t{\n\t\treturn $this->foundRows;\n\t}",
"private function get_rows()\n {\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begin' );\n\n // IF : hits should counted\n if ( $this->ts_countHits() )\n {\n // 1. step: filter items with one hit at least\n $arr_return = $this->get_rowsWiHits();\n if ( $arr_return[ 'error' ][ 'status' ] )\n {\n return $arr_return;\n }\n $rows = $arr_return[ 'data' ][ 'rows' ];\n // 1. step: filter items with one hit at least\n }\n // IF : hits should counted\n // 2. step: all filter items, hits will be taken from $rows\n $arr_return = $this->get_rowsAllItems( $rows );\n\n return $arr_return;\n }",
"public function iterateAllElements()\n {\n return $this->getIterator();\n }",
"function getSimplifiedElements() {\n\t\t\t$newelements = array();\n\t\t\tforeach($this->page_object as $current_row) {\n\t\t\t\t## process the rows- first we need to find out how many entries\n\t\t\t\tforeach($current_row as $current_element) {\n\t\t\t\t\t## here we start calling all our attribute types\n\t\t\t\t\tif(is_array($current_element)) {\n\t\t\t\t\t\t$newelements[] = $current_element;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\treturn $newelements;\n }",
"public function getEntries()\n {\n $rows = array();\n // dd($this->xml->entry->asXml()); // <- TO GET XML\n\n if(count($this->xml->entry) > 0) {\n // d($this->xml); // <- NOT GETTING EMPTY CELLS\n\n $colNames = $this->getColumnNames($this->xml);\n // dd($colNames);\n // dd($this->xml);\n\n\n foreach ($this->xml->entry as $entry) {\n $cols = $entry->xpath('gsx:*');\n // dd($cols);\n\n $vals = array();\n foreach($cols as $col) {\n // dd($col); // <- THIS DISPLAYS\n // var_dump((string) $col);\n\n // if (is_null($col) || $col == '' || $col === '' || !isset($col)) {\n // // $col = ' ';\n // $vals[] = ' ';\n // } else {\n $vals[] = $col->__toString();\n // }\n }\n // dd($vals); // <- THIS HAS THE VALUES YOU WANT\n // d($entry);\n // dd($colNames);\n // d($vals); <- ROWS (in a basic array form)\n $rows[] = new ListEntry($entry, array_combine($colNames, $vals));\n\n }\n }\n // dd($rows);\n return $rows;\n }",
"public function getIterator()\n\t{\n return new ArrayIterator($this->_tbody->getElements());\n\t}",
"public static function &getAll(): array\n {\n return self::getInstance()->elements;\n }",
"public function getElements()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('elements');\n }",
"public function getCells();",
"public function getUserElements() {\n $els = array();\n foreach($this->_elements as $el) {\n //matusz: group type represents buttons?\n if(in_array($el->getName(), array('buttons', 'qfKey', '_qf_default'))) {\n continue;\n }\n \n $els[] = $el;\n }\n \n return $els;\n }",
"public function getEleves()\n {\n return $this->eleves;\n }",
"function getTables($selector = '.rptTable')\n\t{\n\t\t$tables = array();\n\t\tif(is_object($this->dom))\n\t\t{\n\t\t\t$contentTables = $this->dom->find($selector);\n\t\t\tforeach ($contentTables as $table)\n\t\t\t{\n\t\t\t\t$tables[] = $table->children();\n\t\t\t}\n\t\t}\n\n\t\treturn $tables ? $tables : array();\n\t}",
"public function all()\n {\n return $this->driver->all();\n }",
"protected function elements()\n {\n $window = $this->getUrlWindow($this->onEachSide);\n\n return array_filter(array(\n $window['first'],\n is_array($window['slider']) ? '...' : null,\n $window['slider'],\n is_array($window['last']) ? '...' : null,\n $window['last'],\n ));\n }",
"public function renderTableBody()\n {\n $models = array_values($this->dataProvider->getModels());\n $keys = $this->dataProvider->getKeys();\n $rows = [];\n foreach ($models as $index => $model) {\n $key = $keys[$index];\n if ($this->beforeRow !== null) {\n $row = call_user_func($this->beforeRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n\n $rows[] = $this->renderTableRow($model, $key, $index);\n\n if ($this->afterRow !== null) {\n $row = call_user_func($this->afterRow, $model, $key, $index, $this);\n if (!empty($row)) {\n $rows[] = $row;\n }\n }\n }\n\n if (empty($rows) && $this->emptyText !== false) {\n $colspan = count($this->columns);\n\n return \"<tbody>\\n<tr><td colspan=\\\"$colspan\\\">\" . $this->renderEmpty() . \"</td></tr>\\n</tbody>\";\n }\n\n return \"<tbody>\\n\" . implode(\"\\n\", $rows) . \"\\n</tbody>\";\n }",
"public function innertext()\n {\n return [];\n }",
"public function elements(): array {\n\t\treturn $this->m_elements;\n\t}",
"static public function extract()\n {\n try {\n $result = [];\n $document = @new Document(self::$url, true);\n $lines = $document\n ->find('tbody')[0]\n ->find('tr');\n foreach ($lines as $line) {\n $columns = $line->find('td');\n $current = [];\n foreach ($columns as $column) {\n $index = count($current);\n $current[self::$map[$index]] = $column->text();\n }\n $result[] = $current;\n }\n return $result;\n } catch (\\Exception $e) {\n return [\n 'error' => true,\n 'code' => $e->getCode(),\n 'message' => $e->getMessage()\n ];\n }\n }",
"protected function selectContentRowsToConvert() {\n \n $select = '*';\n $from = 'tt_content';\n $where = 'list_type = \"pt_gsashop_pi2\"';\n $where .= ' AND pi_flexform = \"\"';\n $groupBy = '';\n $orderBy = '';\n $limit = '';\n \n // exec query using TYPO3 DB API\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $from, $where, $groupBy, $orderBy, $limit);\n trace(tx_pttools_div::returnLastBuiltSelectQuery($GLOBALS['TYPO3_DB'], $select, $from, $where, $groupBy, $orderBy, $limit));\n if ($res == false) {\n throw new tx_pttools_exception('Query failed', 1, $GLOBALS['TYPO3_DB']->sql_error());\n }\n \n $rows = array();\n while ($a_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){\n $rows[] = $a_row; \n }\n $GLOBALS['TYPO3_DB']->sql_free_result($res);\n \n trace($a_row); \n return $rows;\n }",
"public function getElements(): array\n {\n return $this->elements;\n }",
"function DOM_table_structure($table) {\r\n\t\t//$query = './/' . ReTidy::get_html_namespace() . 'thead';\r\n\t\t$query = './' . ReTidy::get_html_namespace() . 'thead';\r\n\t\t$theads = $this->xpath->query($query, $table);\r\n\t\t$number_theads = 0;\r\n\t\tforeach($theads as $thead) {\r\n\t\t\t$number_theads++;\r\n\t\t}\r\n\t\tif($number_theads > 1) {\r\n\t\t\tprint('Found ' . $number_theads . ' <thead>s, DOM_table_structure() has stopped. Problematic table:<br>' . ReTidy::DOM_getNodeString($table));exit(0);\r\n\t\t}\r\n\t\t//$query = './/' . ReTidy::get_html_namespace() . 'tfoot';\r\n\t\t$query = './' . ReTidy::get_html_namespace() . 'tfoot';\r\n\t\t$tfoots = $this->xpath->query($query, $table);\r\n\t\t$number_tfoots = 0;\r\n\t\tforeach($tfoots as $tfoot) {\r\n\t\t\t$number_tfoots++;\r\n\t\t}\r\n\t\tif($number_tfoots > 1) {\r\n\t\t\tprint('Found ' . $number_tfoots . ' <tfoot>s, DOM_table_structure() has stopped. Problematic table:<br>' . ReTidy::DOM_getNodeString($table));exit(0);\r\n\t\t}\r\n\t\t//$query = './/' . ReTidy::get_html_namespace() . 'tbody';\r\n\t\t$query = './' . ReTidy::get_html_namespace() . 'tbody';\r\n\t\t$tbodys = $this->xpath->query($query, $table);\r\n\t\t$number_tbodys = 0;\r\n\t\tforeach($tbodys as $tbody) {\r\n\t\t\t$number_tbodys++;\r\n\t\t}\r\n\t\t/*if($number_tbodys > 1) {\r\n\t\t\tprint('Found ' . $number_tbodys . ' <tbody>s, DOM_table_structure() has stopped. Problematic table:<br>' . ReTidy::DOM_getNodeString($table));exit(0);\r\n\t\t}*/\r\n\t\tif($this->config['trust_ths'] === false || ($number_theads === 0 && $number_tbodys === 0)) { // assume they are not there and apply them\r\n\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t$first_tr = false;\r\n\t\t\t$first_tr_in_tbody = false;\r\n\t\t\t$last_tr = false;\r\n\t\t\t//$found_first_tr_in_tbody = false;\r\n\t\t\t$skipped_first_new_tbody = false;\r\n\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t$second_last_tr = $last_tr;\r\n\t\t\t\t$last_tr = $tr;\r\n\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t}\r\n\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t$cells_in_tr = $this->xpath->query($query, $tr);\r\n\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td[@newtag=\"th\"]';\r\n\t\t\t\t$headers_in_tr = $this->xpath->query($query, $tr);\r\n\t\t\t\t//$last_number_cells_in_tr = $number_cells_in_tr;\r\n\t\t\t\tforeach($cells_in_tr as $first_cell_in_tr) { break; }\r\n\t\t\t\t$new_tbody = ReTidy::getAttribute($first_cell_in_tr, 'new_tbody')->nodeValue;\r\n\t\t\t\tif($new_tbody === 'true') {\r\n\t\t\t\t\tif(!$skipped_first_new_tbody) {\r\n\t\t\t\t\t\t$skipped_first_new_tbody = true;\r\n\t\t\t\t\t} else {$first_cell_in_tr_parent = $first_cell_in_tr->parentNode;\r\n\t\t\t\t\t\t$first_cell_in_tr_parent->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXXXXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_cell_in_tr_parent);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$number_cells_in_tr = 0;\r\n\t\t\t\t$number_empty_cells_in_tr = 0;\r\n\t\t\t\tforeach($cells_in_tr as $cell_in_tr) {\r\n\t\t\t\t\t$number_cells_in_tr++;\r\n\t\t\t\t\tif(ReTidy::isEmptyIgnoringWhitespaceAndAttributes($cell_in_tr)) {\r\n\t\t\t\t\t\t$number_empty_cells_in_tr++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//print('$number_empty_cells_in_tr: ');var_dump($number_empty_cells_in_tr);\r\n\t\t\t\t$number_headers_in_tr = 0;\r\n\t\t\t\tforeach($headers_in_tr as $header_in_tr) {\r\n\t\t\t\t\t$newtag_attribute = ReTidy::getAttribute($header_in_tr, \"newtag\");\r\n\t\t\t\t\tif($newtag_attribute->nodeValue === \"td\") {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$number_headers_in_tr++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!$first_tr_in_tbody) {\r\n\t\t\t\t\t$number_headers_and_empty_in_tr = $number_headers_in_tr + $number_empty_cells_in_tr;\r\n\t\t\t\t\t//print('$number_cells_in_tr: ');var_dump($number_cells_in_tr);\r\n\t\t\t\t\t//print('$number_headers_in_tr: ');var_dump($number_headers_in_tr);\r\n\t\t\t\t\t//print('$number_headers_and_empty_in_tr: ');var_dump($number_headers_and_empty_in_tr);\r\n\t\t\t\t\t//exit(0);\r\n\t\t\t\t\tif($new_tbody === 'true') {\r\n\t\t\t\t\t\t$last_tr_in_thead = $last_tr;\r\n\t\t\t\t\t\t$first_tr_in_tbody = $tr;\r\n\t\t\t\t\t} elseif($number_headers_and_empty_in_tr === $number_cells_in_tr) {\r\n\t\t\t\t\t\t//$last_tr_in_table_head = $tr;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$last_tr_in_thead = $last_tr;\r\n\t\t\t\t\t\t$first_tr_in_tbody = $tr;\r\n\t\t\t\t\t\t//$found_first_tr_in_tbody = true;\r\n\t\t\t\t\t\t//break;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($number_tfoots === 1) { // then there is a simple solution\r\n\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXthead9o9XXX\"), $first_tr);\r\n\t\t\t\t$tfoot->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $tfoot);\r\n\t\t\t\t$node_after_tfoot = $tfoot->nextSibling;\r\n\t\t\t\t$node_after_tfoot->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $node_after_tfoot);\r\n\t\t\t\t$first_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t} else {\r\n\t\t\t\tif($first_tr_in_tbody === false) {\r\n\t\t\t\t\tReTidy::warning('Applying table structure but how to apply <tbody> to table could not be determined since no content cells were identified');\r\n\t\t\t\t\t$first_tr_in_tbody = $tr;\r\n\t\t\t\t}\r\n\t\t\t\t// tfoot processing\r\n\t\t\t\t// this is not general enough\r\n\t\t\t\t/*$did_table_source = false;\r\n\t\t\t\tif($number_cells_in_tr === 1) { // then we call this table source information\r\n\t\t\t\t\t// clear any existing attributes\r\n\t\t\t\t\tif($cell_in_tr->hasAttributes()) {\r\n\t\t\t\t\t\tforeach($cell_in_tr->attributes as $source_information_cell_attribute) {\r\n\t\t\t\t\t\t\t$source_information_cell_attribute->nodeValue = 'stripme';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$moved_last_tr = $cell_in_tr->cloneNode(true);\r\n\t\t\t\t\t$moved_last_tr->setAttribute('newtag', 'div');\r\n\t\t\t\t\t$moved_last_tr->setAttribute('class', 'source');\r\n\t\t\t\t\t$node_after_table = $table->nextSibling;\r\n\t\t\t\t\t$node_after_table->parentNode->insertBefore($moved_last_tr, $node_after_table);\r\n\t\t\t\t\t$last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t$did_table_source = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(!$did_table_source) {*/\r\n\t\t\t\t\tif($last_tr === false) { // hack\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t\t\t$cells_in_potential_tfoot_tr = $this->xpath->query($query, $last_tr);\r\n\t\t\t\t\t\t$adding_a_tfoot = false;\r\n\t\t\t\t\t\tforeach($cells_in_potential_tfoot_tr as $cell_in_potential_tfoot_tr) {\r\n\t\t\t\t\t\t\t$new_tfoot = ReTidy::getAttribute($cell_in_potential_tfoot_tr, 'new_tfoot')->nodeValue;\r\n\t\t\t\t\t\t\tif($new_tfoot === 'true') {\r\n\t\t\t\t\t\t\t\t$adding_a_tfoot = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t/*} else {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'th | .//' . ReTidy::get_html_namespace() . 'td';\r\n\t\t\t\t\t$cells_in_potential_tfoot_tr = $this->xpath->query($query, $second_last_tr);\r\n\t\t\t\t\tforeach($cells_in_potential_tfoot_tr as $cell_in_potential_tfoot_tr) {\r\n\t\t\t\t\t\tif(ReTidy::isEmptyIgnoringWhitespaceAndAttributes($cell_in_potential_tfoot_tr)) {\r\n\t\t\t\t\t\t\t// look for the next one\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif(stripos(ReTidy::tagless(ReTidy::DOM_getNodeString($cell_in_potential_tfoot_tr)), 'total') === false) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else { // then we call this the tfoot\r\n\t\t\t\t\t\t\t\t$moved_second_last_tr = $second_last_tr->cloneNode(true);\r\n\t\t\t\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore($moved_second_last_tr, $first_tr_in_tbody);\r\n\t\t\t\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t\t\t$second_last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\r\n\t\t\t\t// thead and tbody\r\n\t\t\t\tif($first_tr_in_tbody === $first_tr) {\r\n\t\t\t\t\tReTidy::warning('Applying table structure but how to apply <thead> to table could not be determined');\r\n\t\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_tr);\r\n\t\t\t\t\t$first_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXthead9o9XXX\"), $first_tr);\r\n\t\t\t\t\t//$last_tr_in_thead->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $last_tr_in_thead);\r\n\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t$first_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t\t\tif($adding_a_tfoot) {\r\n\t\t\t\t\t\t$moved_last_tr = $last_tr->cloneNode(true);\r\n\t\t\t\t\t\t//$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t//$first_tr_in_tbody->parentNode->insertBefore($moved_last_tr, $first_tr_in_tbody);\r\n\t\t\t\t\t\t//$first_tr_in_tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtfoot9o9XXX\"), $first_tr_in_tbody);\r\n\t\t\t\t\t\t//$last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t\t// (2017-03-31) validator now wants <tfoot>s at the bottom of the table for HTML5; shrug, it's a bit easier to code\r\n\t\t\t\t\t\t$last_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagBeginXXXtfoot9o9XXX\"));\r\n\t\t\t\t\t\t$last_tr->parentNode->appendChild($moved_last_tr);\r\n\t\t\t\t\t\t$last_tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtfoot9o9XXX\"));\r\n\t\t\t\t\t\t$last_tr->setAttribute('deleteme', 'y');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//var_dump(ReTidy::DOM_getNodeString($last_tr_in_thead));\r\n\t\t\t\t\t\tif(isset($last_tr_in_thead)) {\r\n\t\t\t\t\t\t\t//$last_tr_in_thead->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $last_tr_in_thead);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$last_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXthead9o9XXX\"), $last_tr_in_thead);\r\n\t\t\t\t\t\t\tReTidy::warning('this needs revision... it causes problems when there\\'s no apparent thead and I\\'m not sure it\\'s working perfectly 4e57546767896892478');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t} else { // if we get to here then we work with the table structure in its problematic existing state (which should never happen since we should always redo the thead and tbody; regardless of their states)\r\n\t\t\t//print('here48794586409<br>');\r\n\t\t\tif($number_theads === 1) {\r\n\t\t\t\t//print('here48794586410<br>');\r\n\t\t\t\tif($number_tbodys === 0) {\r\n\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t\t\t$first_non_thead_tr = false;\r\n\t\t\t\t\t$first_tr = false;\r\n\t\t\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//$ancestry_array = ReTidy::DOM_getAncestryArray($tr);\r\n\t\t\t\t\t\t$parentNode = $tr->parentNode;\r\n\t\t\t\t\t\tif($parentNode->nodeName === \"thead\") {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$first_non_thead_tr = $tr;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($first_non_thead_tr === false) {\r\n\t\t\t\t\t\tReTidy::warning('Applying table structure but how to apply <tbody> to table could not be determined since no content cells were identified 2');\r\n\t\t\t\t\t\t$first_non_thead_tr = $tr;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//if(!ReTidy::isNode($first_non_thead_tr->parentNode)) {\r\n\t\t\t\t\t//\tvar_dump(ReTidy::DOM_getNodeString($first_non_thead_tr));\r\n\t\t\t\t\t//\tvar_dump(ReTidy::DOM_getNodeString($first_non_thead_tr->parentNode));exit(0);\r\n\t\t\t\t\t//}\r\n\t\t\t\t\t$first_non_thead_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_non_thead_tr);\r\n\t\t\t\t\t$tr->parentNode->appendChild(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// no need to do anything\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif($number_tbodys >= 1) {\r\n\t\t\t\t\t//print('here48794586411<br>');\r\n\t\t\t\t\t// here we want to put <thead> around <tr>s before <tbody>; will it ever come up?\r\n\t\t\t\t\tif($number_theads === 0) {\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tbody/tr';\r\n\t\t\t\t\t\t$trs_in_tbody = $this->xpath->query($query, $table);\r\n\t\t\t\t\t\tif(sizeof($trs) === sizeof($trs_in_tbody)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tReTidy::warning('Applying table structure but how to apply <thead> to table could not be determined since this code has not been written yet 3');exit(0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//print('here48794586412<br>');\r\n\t\t\t\t\tif($number_theads === 0) {\r\n\t\t\t\t\t\t$query = './/' . ReTidy::get_html_namespace() . 'tr';\r\n\t\t\t\t\t\t$trs = $this->xpath->query($query, $table);\r\n\t\t\t\t\t\t$last_non_tbody_tr = false;\r\n\t\t\t\t\t\t$first_tr = false;\r\n\t\t\t\t\t\tforeach($trs as $tr) {\r\n\t\t\t\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$parentNode = $tr->parentNode;\r\n\t\t\t\t\t\t\tif($parentNode->nodeName === \"tbody\") {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$last_non_tbody_tr = $tr;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif($first_tr === false) {\r\n\t\t\t\t\t\t\tReTidy::warning('Applying table structure but how to apply <tbody> to table could not be determined since no content cells were identified 4');\r\n\t\t\t\t\t\t\t$first_tr = $tr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$first_tr->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagBeginXXXtbody9o9XXX\"), $first_tr);\r\n\t\t\t\t\t\t$tbody->parentNode->insertBefore(new DOMText(\"XXX9o9NewTagEndXXXtbody9o9XXX\"), $tbody);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$query = './/@new_tbody';\r\n\t\t$new_tbody_attributes = $this->xpath->query($query, $table);\r\n\t\tforeach($new_tbody_attributes as $new_tbody_attribute) {\r\n\t\t\t$new_tbody_attribute->nodeValue = \"stripme\";\r\n\t\t}\r\n\t\t$query = './/@new_tfoot';\r\n\t\t$new_tfoot_attributes = $this->xpath->query($query, $table);\r\n\t\tforeach($new_tfoot_attributes as $new_tfoot_attribute) {\r\n\t\t\t$new_tfoot_attribute->nodeValue = \"stripme\";\r\n\t\t}\r\n\t\t$query = './/@tfoot_member';\r\n\t\t$tfoot_member_attributes = $this->xpath->query($query, $table);\r\n\t\tforeach($tfoot_member_attributes as $tfoot_member_attribute) {\r\n\t\t\t$tfoot_member_attribute->nodeValue = \"stripme\";\r\n\t\t}\r\n\t}",
"function GetRows()\n {\n $arr = [];\n for ($i = 0, mysqli_data_seek($this->rs, 0); $this->Next(); $i++) $arr[$i] = $this->row;\n return $arr;\n }",
"private function getFormTableContent(){\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t$bgCol1='#FFFFFF';\n\t\t$bgCol2='#e4edf9';\n\t\t$bgColDarkerBG='#cddaeb';\n\t\t$colOutline='#8a99ae';\n\t\t$rowCount=0;\n\t\t$NL=\"\\r\\n\";\n\t\t$s_ret='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.'\">'.$NL;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\tif(get_class($o_el)=='FormItBuilder_htmlBlock'){\n\t\t\t\t//do nothing\n\t\t\t}else{\n\t\t\t\tif($o_el->showInEmail()===true){\n\t\t\t\t\t\n\t\t\t\t\t$bgCol=$bgCol1;\n\t\t\t\t\tif($rowCount%2==0){\n\t\t\t\t\t\t$bgCol=$bgCol2;\n\t\t\t\t\t}\n\n\t\t\t\t\t$elType=get_class($o_el);\n\t\t\t\t\t$elId = $o_el->getId();\n\t\t\t\t\t\n\t\t\t\t\tswitch($elType){\n\t\t\t\t\t\tcase 'FormItBuilder_elementMatrix':\n\t\t\t\t\t\t\t$type = $o_el->getType();\n\t\t\t\t\t\t\t$cols = $o_el->getColumns();\n\t\t\t\t\t\t\t$rows = $o_el->getRows();\n\t\t\t\t\t\t\t$r_cnt=0;\n\t\t\t\t\t\t\t$s_val='<table cellpadding=\"5\" cellspacing=\"0\" style=\"'.$s_style.' font-size:10px;\"><tr><td> </td>';\n\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t$s_val.='<td style=\"'.($c_cnt==0?'border-left:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.'; border-top:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($column).'</em></td>';\n\t\t\t\t\t\t\t\t$c_cnt++;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\tforeach($rows as $row){\n\t\t\t\t\t\t\t\t$c_cnt=0;\n\t\t\t\t\t\t\t\t$s_val.='<tr><td style=\"'.($r_cnt==0?'border-top:1px solid '.$colOutline.'; ':'').'background-color:'.$bgColDarkerBG.'; border-right:1px solid '.$colOutline.'; border-left:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\"><em>'.htmlspecialchars($row).'</em></td>';\n\t\t\t\t\t\t\t\tforeach($cols as $column){\n\t\t\t\t\t\t\t\t\t$s_val.='<td style=\"text-align:center; border-right:1px solid '.$colOutline.'; border-bottom:1px solid '.$colOutline.';\">';\n\t\t\t\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=htmlspecialchars($_REQUEST[$elId.'_'.$r_cnt.'_'.$c_cnt]);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\t\t\t\t$s_val.=($c_cnt==$_REQUEST[$elId.'_'.$r_cnt]?'✔':'-');\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\t\t\t\tif(isset($_REQUEST[$elId.'_'.$r_cnt]) && in_array($c_cnt,$_REQUEST[$elId.'_'.$r_cnt])===true){\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='✔';\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$s_val.='-';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$s_val.='</td>';\n\t\t\t\t\t\t\t\t\t$c_cnt++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$r_cnt++;\n\t\t\t\t\t\t\t\t$s_val.='</tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s_val.='</table>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementFile':\n\t\t\t\t\t\t\tif(isset($_FILES[$elId])){\n\t\t\t\t\t\t\t\tif($_FILES[$elId]['size']==0){\n\t\t\t\t\t\t\t\t\t$s_val='None';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'FormItBuilder_elementDate':\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).'_0]] [[+'.htmlspecialchars($o_el->getId()).'_1]] [[+'.htmlspecialchars($o_el->getId()).'_2]]';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$s_val='[[+'.htmlspecialchars($o_el->getId()).':nl2br]]';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_ret.='<tr valign=\"top\" bgcolor=\"'.$bgCol.'\"><td><b>'.htmlspecialchars($o_el->getLabel()).':</b></td><td>'.$s_val.'</td></tr>'.$NL;\n\t\t\t\t\t$rowCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$s_ret.='</table>'.$NL;\n\t\treturn $s_ret;\n\t}",
"function getALL(){\n\t\t$result=$this->rstemp;\n\t\t$rows = array();\n\t\twhile($row=mysql_fetch_assoc($result)){\n\t\t\t $rows[]=$row;\n\t\t\t}\n\t\t\treturn $rows;\n\n\t\t\n\t}",
"function getEleves(){\r\n $bdd = getBdd();\r\n $eleves = $bdd->query('select cne,nom,prenom,etat,Photo from eleves');\r\n return $eleves;\r\n }",
"public static function getAll()\n {\n return self::doSearch()->resultRows;\n }",
"public function getElementsRecursively() {\n\t\treturn $this->getRenderablesRecursively();\n\t}",
"public function getElements()\n {\n return $this->collection;\n }",
"public function GetInnerElements() {\n\t\treturn [\n\t\t\t$this->element->ExpanderElement,\n\t\t\t$this->element->ContainerElement];\n\t}",
"public function getAllRows() {\n\t\t$rows = array();\n\t\t\n\t\tfor($x = 0; $x < $this->getNumRows(); $x++) {\n\t\t\t$rows[] = mysqli_fetch_assoc($this->_result);\n\t\t}\n\t\treturn $rows;\n\t}",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"public function getTbodyData(): ?array {\n return $this->tbodyData;\n }",
"public function getAllEntriesAsRows() {\n $allModels = $this -> getAllHistoricFilterEntries();\n $html = \"\";\n //TODO may need to make a function that makes a JS array to hold the info\n foreach ($allModels as $model) {\n $idHistoricFilter = strval($model -> getIdHistoricFilter());\n $objectRowID = \"14\" . $idHistoricFilter;\n $editAndDelete = \"</td><td><button class='btn basicBtn' onclick='updateHistoricFilter(\"\n . $objectRowID . \",\"\n . $model -> getIdHistoricFilter()\n . \")'>Update</button>\"\n . \"</td><td>\";\n\n if ($idHistoricFilter != \"0\") {\n $editAndDelete = $editAndDelete . \"<button class='btn basicBtn' onclick=\"\n . '\"deleteHistoricFilter('\n . $model -> getIdHistoricFilter()\n . ')\"> Delete</button>';\n }\n\n $html = $html\n . \"<tr id='\" . $objectRowID . \"'><td>\" . $model -> getHistoricFilterName()\n . \"</td><td>\" . $model -> getDateStart()\n . \"</td><td>\" . $model -> getDateEnd()\n . \"</td><td>\" . $model -> getDescription()\n . \"</td><td>\" . $model -> getButtonColor()\n . $editAndDelete\n . \"</td></tr>\";\n }\n return $html;\n }",
"public function getCells()\r\n {\r\n return $this->cells ?: $this->cells = new \\Doctrine\\Common\\Collections\\ArrayCollection();\r\n }",
"public static function getAll() {\n $conn = self::connect();\n $row = $conn->getAll(self::baseQuery());\n return $row;\n }",
"public function getTableOfContents();",
"public function getElements() {\n\t\treturn $this->renderables;\n\t}",
"public function getBodyLines() : array\n {\n return $this->lineCount < 3 ? [] : array_slice($this->lines, 2);\n }",
"public function fetchAll() : array\n {\n $sql = \"SELECT * FROM content;\";\n $resultset = $this->db->executeFetchAll($sql);\n\n return $resultset;\n }",
"public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }",
"public function getCells()\n {\n return $this->cells;\n }",
"public function getContentElements()\n\t{\n\t\treturn $this->getOptionData('tl_content');\n\t}"
] | [
"0.7145024",
"0.67310625",
"0.6620081",
"0.6614637",
"0.65186584",
"0.65153134",
"0.64370507",
"0.63596195",
"0.63553333",
"0.63031673",
"0.6249923",
"0.6249923",
"0.6209117",
"0.6174423",
"0.6156906",
"0.6131532",
"0.6096748",
"0.6048213",
"0.60419387",
"0.6029207",
"0.60171497",
"0.6006638",
"0.6006638",
"0.59791946",
"0.597245",
"0.59676254",
"0.59582824",
"0.5926823",
"0.5923198",
"0.5921745",
"0.5916878",
"0.5874208",
"0.58585966",
"0.5849907",
"0.58493906",
"0.5840035",
"0.58168226",
"0.58132195",
"0.581017",
"0.58075845",
"0.58071417",
"0.5794968",
"0.5781427",
"0.57811517",
"0.57731944",
"0.57670736",
"0.5749676",
"0.5749676",
"0.5722687",
"0.57127076",
"0.57092345",
"0.5663948",
"0.56604034",
"0.5655388",
"0.565426",
"0.56533664",
"0.56433463",
"0.56401527",
"0.56301844",
"0.56191313",
"0.5608275",
"0.56069636",
"0.56050444",
"0.56041056",
"0.55849946",
"0.55821836",
"0.5576571",
"0.55744654",
"0.55743814",
"0.5563086",
"0.5557418",
"0.5550756",
"0.5549731",
"0.5547612",
"0.5543841",
"0.55385506",
"0.5534987",
"0.5532902",
"0.5518965",
"0.5509983",
"0.5508725",
"0.54880565",
"0.54720014",
"0.54698867",
"0.54643327",
"0.54433393",
"0.54353935",
"0.5429112",
"0.5427631",
"0.5417533",
"0.54146695",
"0.54057527",
"0.54029566",
"0.5398672",
"0.53943664",
"0.5388686",
"0.53694075",
"0.53650355",
"0.53602177",
"0.5351733"
] | 0.75805193 | 0 |
Get element of header row | public function getHeader($rowIndex)
{
$ret = null;
if ($this->_thead instanceof HtmlElement) {
$ret = $this->_thead->getElement($rowIndex);
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function getRowsHeader(): array;",
"public function getHeaderRow($asArray = false) {\n\t\tif (!empty($this->headers)) {\n\t\t\tif ($asArray) {\n\t\t\t\treturn array_keys($this->data);\n\t\t\t} else {\n\t\t\t\treturn Header::getInstance()->setData(array_keys($this->data));\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public function getHeaderContainer()\n\t{\n\t\treturn $this->_thead;\n\t}",
"public function headingRow(): int\n {\n return 1;\n }",
"public function getHeaders()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_thead instanceof HtmlElement) {\n\t\t\t$ret = $this->_thead->getElements();\n\t\t}\n\t\treturn $ret;\n\t}",
"public function get_log_row_header_output( $row ) {\n\t\t$row_logger = $row->logger;\n\t\t$row->context = isset( $row->context ) && is_array( $row->context ) ? $row->context : array();\n\n\t\t// Fallback to SimpleLogger if no logger exists for row\n\t\tif ( ! isset( $this->instantiated_loggers[ $row_logger ] ) ) {\n\t\t\t$row_logger = 'SimpleLogger';\n\t\t}\n\n\t\t$logger = $this->instantiated_loggers[ $row_logger ]['instance'];\n\n\t\treturn $logger->get_log_row_header_output( $row );\n\t}",
"public function isFirstRowHeaders()\n\t{\n\t\treturn $this->firstRowHeaders;\n\t}",
"public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}",
"abstract protected function getColumnsHeader(): array;",
"public function getRow()\n {\n return $this->get('Row');\n }",
"public function renderHeaderCell()\n\t{\n\t\t$_headerOptions = ['class' => 'serial-column'];\n\t\tif ($this->grid->filterModel !== null && $this->grid->filterPosition !== \\yii\\grid\\GridView::FILTER_POS_HEADER)\n\t\t\t$_headerOptions['rowspan'] = '2';\n\n\t\t$this->headerOptions = ArrayHelper::merge($_headerOptions, $this->headerOptions);\n\t\treturn Html::tag('th', $this->renderHeaderCellContent(), $this->headerOptions);\n\t}",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"public function GetHeader()\n {\n return $this->HeaderName;\n }",
"public function getHeadElement()\n {\n return $this->head;\n }",
"public function getHeader()\n {\n return $this->content['header'];\n }",
"abstract public function getSpecificRow();",
"public function getCSVHeaderRow() {\n return [\n 'link_title',\n 'link_layout',\n 'link_location',\n 'content_type',\n 'link_count',\n 'link_clicked',\n 'clicked',\n 'os',\n 'device',\n 'device_brand',\n 'device_model',\n 'browser_type',\n 'browser_name',\n 'browser_version',\n 'site',\n 'page_url',\n 'referrer',\n 'paragraphs',\n 'displayed_url_1',\n 'displayed_url_2',\n 'displayed_url_3',\n 'displayed_url_4',\n 'displayed_url_5',\n 'time_logged',\n 'time_updated',\n 'user_id',\n 'browser',\n 'row'\n ];\n }",
"public function getValueForHeader($header)\n {\n switch ($header){\n case '#':\n return $this->id;\n case 'Fatura':\n return $this->fatura_join()->first()->nome;\n case 'Ordem Serviço':\n return $this->ordem_servico_join()->first()->nome;\n }\n }",
"protected function get_element_header_content(&$element) {\n global $CFG;\n\n $content = array();\n $attributes = array();\n $text = $element['object']->get_name();\n\n if ($element['type'] != 'item' and $element['type'] != 'categoryitem' and\n $element['type'] != 'courseitem') {\n $content[0] = progress_report_generator::build_content_text_node($text);\n return $content;\n }\n\n $itemtype = $element['object']->itemtype;\n $itemmodule = $element['object']->itemmodule;\n $iteminstance = $element['object']->iteminstance;\n\n if ($itemtype=='mod' and $iteminstance and $itemmodule) {\n if ($cm = get_coursemodule_from_instance($itemmodule, $iteminstance, $this->courseid)) {\n\n $a = new stdClass();\n $a->name = get_string('modulename', $element['object']->itemmodule);\n $attributes['title'] = get_string('linktoactivity', 'grades', $a);\n $dir = $CFG->dirroot.'/mod/'.$itemmodule;\n\n if (file_exists($dir.'/grade.php')) {\n $attributes['href'] = $CFG->wwwroot.'/mod/'.$itemmodule.'/grade.php?id='.$cm->id;\n } else {\n $attributes['href'] = $CFG->wwwroot.'/mod/'.$itemmodule.'/view.php?id='.$cm->id;\n }\n }\n }\n $content[0] = progress_report_generator::build_content_container_node(progress_report_generator::HTML_HYPERLINK, $attributes);\n $content[0]['children'][0] = progress_report_generator::build_content_text_node($text);\n\n return $content[0];\n }",
"protected function get_header_elements() {\n foreach( $this->header_elements_array as $header_element ) {\n $header_elements .= \"\\n\" . $header_element;\n }\n\n return $header_elements;\n }",
"public function getRow();",
"public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }",
"protected function csvHeader()\n {\n return end($this->_csvHeader);\n }",
"public function getRow()\n {\n return $this->row;\n }",
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"protected function getLineHeader($line) {\n\t\treturn Billrun_Factory::db()->logCollection()->query(array('header.stamp' => $line['log_stamp']))->cursor()->current();\n\t}",
"public function getHeader() {\r\n return $this->__header;\r\n }",
"public function getHeader()\n {\n return $this->Header;\n }",
"public function getRow() {}",
"public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }",
"public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"public function getHeader() {\n return $this->Header;\n }",
"public function getRow()\n {\n return $this->row;\n }",
"public function getRow()\n {\n return isset($this->row) ? $this->row : null;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"public function getHeader()\n {\n return $this->header;\n }",
"function getRowPrototype() {\n\t\treturn $this->row;\n\t}",
"public function getFirstRow()\n {\n if (count($this->rows) == 0) {\n if (!is_null($this->summaryRow)) {\n return $this->summaryRow;\n }\n return false;\n }\n $row = array_slice($this->rows, 0, 1);\n return $row[0];\n }",
"function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getHeader() {\n return $this->header;\n }",
"public function getHeader(){\n\t\treturn $this->header;\n\t}",
"public function getHeadingTag()\n {\n return $this->Parent()->HeadingTag;\n }",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"public function get_row();",
"function GetHeader() {\n return ($this->ses['response']['header']);\n }",
"public function getHeader ()\n {\n return $this->header;\n }",
"public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}",
"public function getRow(){\n return $this->_row;\n }",
"function get_header()\n\t{\n\t\treturn $this->header;\n\t}",
"public function get_header() {\n $this->do_header();\n return $this->c_header;\n }",
"public function header() {\n return $this->header;\n }",
"public function isFirstRowHeaders()\n {\n return $this->firstRowIsHeaders;\n }",
"public function get_row() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->get_rows();\n\t\t}\n\t\t$value = current($this->rows);\n\t\tnext($this->rows);\n\t\treturn $value;\n\t}",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"public function getHeaderPrototype()\n\t{\n\t\treturn $this->header;\n\t}",
"function _webform_csv_headers_email($component) {\r\n $header = array();\r\n $header[0] = '';\r\n $header[1] = '';\r\n $header[2] = $component['name'];\r\n return $header;\r\n}",
"public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"function getHeader($header, $loc = '') {\n\tglobal $sql;\n\t$sql = \"SELECT header FROM \" . $loc . \"snapshot_headers WHERE id=\".$header;\n\t$query = mysql_query($sql);\n\tcheckDBError($sql);\n\tif ($result = mysql_fetch_array($query))\n\t\treturn $result['header'];\n\treturn \"\";\n}",
"public function header($key = NULL)\n\t{\n\t\tif ($this->executed)\n\t\t{\n\t\t\tif ($key === NULL)\n\t\t\t\treturn $this->header;\n\t\t\telseif (array_key_exists($key, $this->header))\n\t\t\t\treturn $this->header[$key];\n\t\t}\n\n\t\treturn NULL;\n\t}",
"public function getValueForHeader($header)\n {\n switch ($header){\n case 'ID':\n return $this->id;\n case 'Ponto':\n return $this->title;\n case 'Endereço':\n return $this->address;\n case 'Cidade':\n return $this->city . ' - ' . $this->state;\n }\n }",
"protected function getTableHeader() {\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $webform = $this->getEntity();\n $header = [];\n $header['title'] = $this->t('Title');\n\n $header['key'] = [\n 'data' => $this->t('Key'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['type'] = [\n 'data' => $this->t('Type'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['correct_answer'] = $this->t('Answer');\n $header['weight'] = $this->t('Weight');\n $header['operations'] = $this->t('Operations');\n// $header['answer'] = [\n// 'data' => $this->t('Answer'),\n// 'class' => [RESPONSIVE_PRIORITY_LOW],\n// ];\n//\n// $header['required'] = [\n// 'data' => $this->t('Required'),\n// 'class' => ['webform-ui-element-required', RESPONSIVE_PRIORITY_LOW],\n// ];\n// $header['parent'] = $this->t('Parent');\n// $header['operations'] = [\n// 'data' => $this->t('Operations'),\n// 'class' => ['webform-ui-element-operations'],\n// ];\n return $header;\n }",
"public function getRow($rowIndex)\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElement($rowIndex);\n\t\t}\n\t\treturn $ret;\n\t}",
"public function getSeatChartRow(){\n $seatChartRow = array();\n foreach ($this->rows as $row) {\n $seatChartRow[] = $row->getName();\n }\n return $seatChartRow;\n }",
"public function firstRow() {\n\t}",
"public function getCsvRowHeaders()\n {\n\n $headersType = Arr::get($this->csvSettings, 'headers', 'translate');\n\n $methodName = 'getCsvRowHeaders' . Str::studly($headersType);\n $headers = $this->$methodName();\n return rtrim(implode($this->separator, $headers), $this->separator) . $this->endline;\n }",
"public function getPageHeader()\n\t{\n\t\treturn $this->_pageHeader;\n\t}",
"private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }",
"protected function processHeaderRow($row)\n {\n $found = array();\n $record = $this->record;\n foreach($row as $index => $colName)\n {\n $colName = trim($colName);\n foreach($record as $name => $params)\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n foreach($cols as $col)\n {\n if ($col == $colName)\n {\n if (isset($params['plus'])) $plus = $params['plus'];\n else $plus = 0;\n \n $this->map[$index + $plus] = $name;\n $found[$name] = true;\n }\n }\n }\n }\n\n // Make sure all required attributes found\n foreach($record as $name => $params)\n {\n if (isset($params['req']) && $params['req'])\n {\n if (!isset($found[$name]))\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n $cols = implode(' OR ',$cols);\n $this->errors[] = \"Missing $cols\";\n }\n }\n }\n }",
"public function getHeader(): ?HtmlElementInterface\n {\n return $this->header;\n }",
"function GetRow()\n {\n return $this->row;\n }",
"function newsroom_elated_get_header() {\n $id = newsroom_elated_get_page_id();\n\n //will be read from options\n $header_type = 'header-type3';\n $header_behavior = newsroom_elated_options()->getOptionValue('header_behaviour');\n\n if(HeaderFactory::getInstance()->validHeaderObject()) {\n $parameters = array(\n 'hide_logo' => newsroom_elated_options()->getOptionValue('hide_logo') == 'yes' ? true : false,\n 'header_in_grid' => newsroom_elated_options()->getOptionValue('header_in_grid') == 'yes' ? true : false,\n 'logo_position' => newsroom_elated_get_meta_field_intersect('logo_position',$id),\n 'show_sticky' => in_array($header_behavior, array(\n 'sticky-header-on-scroll-up',\n 'sticky-header-on-scroll-down-up'\n )) ? true : false,\n );\n\n $parameters = apply_filters('newsroom_elated_header_type_parameters', $parameters, $header_type);\n\n HeaderFactory::getInstance()->getHeaderObject()->loadTemplate($parameters);\n }\n }",
"protected function renderHeaderCellContent() {\r\n if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {\r\n $sort = $this->grid->dataProvider->getSort();\r\n $label = isset($this->header) ? $this->header : $sort->resolveLabel($this->name);\r\n\r\n if ($sort->resolveAttribute($this->name) !== false)\r\n $label .= '<span class=\"caret\"></span>';\r\n\r\n echo $sort->link($this->name, $label, array('class' => 'sort-link'));\r\n }\r\n else {\r\n if ($this->name !== null && $this->header === null) {\r\n if ($this->grid->dataProvider instanceof CActiveDataProvider)\r\n echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));\r\n else\r\n echo CHtml::encode($this->name);\r\n }\r\n else\r\n parent::renderHeaderCellContent();\r\n }\r\n }",
"public function getHeading(): string;",
"function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}",
"public function get_key($row) {\n return null;\n }",
"public function getHeading()\n {\n return $this->heading;\n }",
"public function csvHeaderRow()\n {\n static $columns;\n\n if ($columns === null) {\n $columns = [ 'source' ];\n $languages = $this->languages();\n foreach ($languages as $lang) {\n $columns[] = $lang;\n }\n\n $columns[] = 'context';\n }\n\n return $columns;\n }",
"public function addHeaderElement(HtmlTableRow $row)\n\t{\n\t\t$this->_createHeaderContainer();\n\t\t$this->_thead->addElement($row);\n\t\treturn $this;\n\t}",
"public function get() {\n\t\treturn $this->rows[$this->rowIndex];\n\t}",
"function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}",
"public function getHeaderHTML()\n\t{\n\t\tif(!is_array($this->elements['header'])){\n\t\t\t// Headers are optional\n\t\t\treturn false;\n\t\t}\n\n\t\t# Header buttons can also be defined outside of the header key when defining modal vales.\n\t\t$this->elements['header']['buttons'] = array_merge($this->elements['header']['buttons'] ?: [], $this->buttons ?: []);\n\n\t\t# Add the required Bootstrap header class very first\n\t\t$this->elements['header']['class'] = str::getAttrArray($this->elements['header']['class'], \"modal-header\", $this->elements['header']['only_class']);\n\n\t\t# Draggable\n\t\t$this->elements['header']['class'][] = $this->draggable ? \"modal-header-draggable\" : false;\n\n\t\t# Styles\n\t\t$this->elements['header']['style'] = str::getAttrArray($this->elements['header']['style'], NULL, $this->elements['header']['only_style']);\n\n\t\t# Dropdown buttons\n\t\tif($this->elements['header']['buttons']){\n\t\t\t$buttons = Button::get($this->elements['header']);\n\t\t}\n\n\t\t# Button(s) in a row\n\t\t$button = Button::generate($this->elements['header']['button']);\n\n\t\tif($button){\n\t\t\t$button = \"<div class=\\\"btn-float-right\\\">{$button}</div>\";\n\t\t}\n\n\t\t# Accent\n\t\t$this->elements['header']['class'][] = str::getColour($this->accent, \"bg\");\n\n\t\t# Icon\n\t\tif(!$icon = Icon::generate($this->elements['header']['icon'])){\n\t\t\t//the icon attribute can either be in the header or in the main modal\n\t\t\t$icon = Icon::generate($this->icon);\n\t\t}\n\n\t\t# Badge\n\t\t$badge = Badge::generate($this->elements['header']['badge']);\n\n\t\t# ID\n\t\t$id = str::getAttrTag(\"id\", $this->elements['header']['id']);\n\n\t\t# Style\n\t\t$style = str::getAttrTag(\"style\", $this->elements['header']['style']);\n\n\t\t# Title colour\n\t\t$class[] = str::getColour($this->elements['header']['colour']);\n\n\t\t# Script\n\t\t$script = str::getScriptTag($this->elements['header']['script']);\n\n\t\t# The header title itself\n\t\t$title = $this->elements['header']['header'] . $this->elements['header']['title'] . $this->elements['header']['html'];\n\n\t\t# Title class\n\t\tif(!empty(array_filter($class))){\n\t\t\t$title_class = str::getAttrTag(\"class\", $class);\n\t\t\t$title = \"<span{$title_class}>$title</span>\";\n\t\t}\n\n\t\t# The div class\n\t\t$class = str::getAttrTag(\"class\", $this->elements['header']['class']);\n\n\t\t# If the modal can be dismissed\n\t\tif($this->dismissible !== false){\n\t\t\t$dismiss = <<<EOF\n<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" title=\"Close this window\"></button>\nEOF;\n\t\t}\n\n\t\treturn <<<EOF\n<div{$id}{$class}{$style}>\n\t<div class=\"container\">\n \t\t<div class=\"row\">\n \t\t<div class=\"col-auto modal-title\">\n \t\t\t{$icon}{$title}{$badge}\n \t\t</div>\n \t\t<div class=\"col\">\n \t\t\t{$buttons}{$button}{$dismiss}\n \t\t</div>\n \t</div>\n\t</div>{$script}\n</div>\nEOF;\n\t}",
"public function getHeaderField(string $name)\n {\n if (isset($this->header[$name])) {\n return $this->header[$name];\n }\n\n return null;\n }",
"public function getHeader() {\n return (isset($this->header)) ? $this->header : '';\n }",
"function getHead($coment){\r\n\t\tif(isset($this->Head[$coment])) return $this->Head[$coment];\r\n\t\treturn '';\r\n\t}",
"public function getAdminPanelHeaderData() {}",
"public function getTitleElement()\n {\n return $this->title;\n }",
"public function _getJobsRowHeader($psSearchId = '')\n {\n $oHTML = CDependency::getComponentByName('display');\n $oPage = CDependency::getComponentByName('page');\n\n $sURL = $oPage->getUrl($this->csUid, CONST_ACTION_LIST, CONST_TA_TYPE_LIST_JOB, 0, array('searchId' => $psSearchId));\n\n $positionIdDesc = $sURL.'&sortfield=external_key&sortorder=desc';\n $positionIdAsc = $sURL.'&sortfield=external_key&sortorder=asc';\n\n $positionTitleDesc = $sURL.'&sortfield=slpd.title&sortorder=desc';\n $positionTitleAsc = $sURL.'&sortfield=slpd.title&sortorder=asc';\n\n $companyDesc = $sURL.'&sortfield=company_name&sortorder=desc';\n $companyAsc = $sURL.'&sortfield=company_name&sortorder=asc';\n\n $industryDesc = $sURL.'&sortfield=name&sortorder=desc';\n $industryAsc = $sURL.'&sortfield=name&sortorder=asc';\n\n $sHTML = \"\n\n <tr style='width:100%; class='list_row' >\n <th style='color:white; width:10%; padding-left:20px; font-size:11pt;' >\n <a style='font-size:11pt;' href='$positionIdDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-numeric-desc' aria-hidden='true'></i> \n </a>\n Position ID \n <a style='font-size:11pt;' href='$positionIdAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-numeric-asc' aria-hidden='true'></i></th>\n </a>\n <th style='color:white; width:40%; font-size:11pt; padding-left:290px;' >\n <a style='font-size:11pt;' href='$positionTitleDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-desc' aria-hidden='true'></i> \n </a>\n Position Title \n <a style='font-size:11pt;' href='$positionTitleAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-asc' aria-hidden='true'></i></th>\n </a>\n </th>\n <th style='color:white; width:20%; font-size:11pt; padding-left:110px;' >\n <a style='font-size:11pt;' href='$companyDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-desc' aria-hidden='true'></i> \n </a>\n Company \n <a style='font-size:11pt;' href='$companyAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-asc' aria-hidden='true'></i>\n </a>\n </th>\n <th style='color:white; width:20%; font-size:11pt; padding-left:70px;' >\n <a style='font-size:11pt;' href='$industryDesc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-desc' aria-hidden='true'></i> \n </a>\n Industry \n <a style='font-size:11pt;' href='$industryAsc'>\n <i style='color:white;cursor: pointer;' class='fa fa-sort-alpha-asc' aria-hidden='true'></i> \n </a>\n </th>\n <th style='color:white; width:10%; font-size:11pt;' >Edit / Action</th>\n\n </tr>\n\n \";\n//<th align='left' style='color:white; width:10%; font-size:11pt;'>Action</th>\n /*$sHTML = $oHTML->getBlocStart('', array('class' =>'list_row '));\n $sHTML.= $oHTML->getBlocStart('', array('class' =>'list_row_data'));\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'float: left; width:4.2%;'));\n $sSortUrl = $sURL.'&sortfield=external_key&sortorder=desc';\n $sHTML.= $oHTML->getLink('Position ID', $sSortUrl);\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell left', 'style' => 'float: left; width:25%;'));\n $sHTML.= $oHTML->getText('Position Title ');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'width:20%;'));\n $sSortUrl = $sURL.'&sortfield=company_name&sortorder=asc';\n $sHTML.= $oHTML->getLink('Company', $sSortUrl);\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'width:20%;'));\n $sHTML.= $oHTML->getText('Industry');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell', 'style' => 'width:5%;'));\n $sHTML.= $oHTML->getText('Edit');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'list_cell','style' => 'width:5%;'));\n $sHTML.= $oHTML->getText('Action');\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocStart('', array('class' => 'floatHack'));\n $sHTML.= $oHTML->getBlocEnd();\n\n $sHTML.= $oHTML->getBlocEnd();\n $sHTML.= $oHTML->getBlocEnd();*/\n\n return $sHTML;\n }",
"public function getValueForHeader($header)\n {\n switch ($header) {\n case '#':\n return $this->id;\n case 'Descrição':\n return $this->description;\n }\n }",
"private function setTableHeader($row){\n\t\t$header_data=false;\n\t\tif($this->header){\n\t\t\t$header_data=$this->header;\n\t\t}\n\t\telse{\n\t\t\tif(!empty($row) && is_array($row) && count($row)){\n\t\t\t\tforeach($row as $i => $v){\n\t\t\t\t\t$header_data[$i]=$i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($header_data)){\n\t\t\t$this->table_header.=_N_T.'<tr>';\n\t\t\t$this->table_header.=_N_T_T.'<th class=\"th.LineNum\">#</th>';\n\t\t\tforeach($header_data as $name => $value){\n\t\t\t\t$this->table_header.=_N_T_T.'<th nowrap=\"nowrap\">'.$value.$this->getOrderBy($name).'</th>';\n\t\t\t}\n\t\t\t$this->table_header.=_N_T.'</tr>';\n\t\t}\n\t\treturn $this;\n\t}",
"public function getHeader() \r\n {\r\n return $this->_bagHeader; \r\n }",
"public function getGroupHeader()\n {\n if (is_null($this->groupHeader)) {\n $this->groupHeader = new SEPAGroupHeader();\n }\n\n return $this->groupHeader;\n }",
"protected function getHeadingNodes()\n {\n $xpath = new DomXpath($this->doc);\n $query = '/html/body/*[self::h1 or self::h2 or self::h3 or self::h4 '\n . ' or self::h5 or self::h6]';\n return $xpath->query($query);\n }",
"function outputHeader()\n {\n global $application;\n\n $output = '';\n if (!is_array($this -> _attrs))\n return $output;\n\n // output error column\n if (is_array($this -> _Errors) && !empty($this -> _Errors))\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-error.tpl.html',\n array()\n );\n\n foreach($this -> _attrs as $k => $v)\n {\n if ($v != 'YES')\n continue;\n\n $template_contents = array(\n 'HeaderName' => getMsg('SYS', @$this -> _headermap[$k])\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n $output .= $this -> mTmplFiller -> fill(\n 'catalog/product_group_edit/',\n 'header-cell.tpl.html',\n array()\n );\n }\n\n return $output;\n }",
"function echoHeader($spec) {\n\techo('<div class=\"tr\">');\n\tforeach($spec as $col) {\n\t\techo('<div class=\"th\">' . htmlspecialchars($col) . '</div>');\n\t}\n\techo('<div class=\"th\">Actions</div>');\n\techo('</div>');\n}",
"public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }",
"public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }"
] | [
"0.6810676",
"0.62944865",
"0.6242552",
"0.62250215",
"0.62175643",
"0.61919236",
"0.61153996",
"0.6094448",
"0.6079371",
"0.60705155",
"0.6048987",
"0.60014737",
"0.5972997",
"0.5966424",
"0.5965936",
"0.5939383",
"0.5904225",
"0.5897384",
"0.5888053",
"0.5882271",
"0.58722883",
"0.5869115",
"0.5861866",
"0.5859808",
"0.5807965",
"0.5799877",
"0.578677",
"0.5785465",
"0.5779613",
"0.5778561",
"0.5778561",
"0.5775861",
"0.57692444",
"0.57620573",
"0.57611656",
"0.5740315",
"0.5740315",
"0.5740315",
"0.5740315",
"0.5740315",
"0.5736028",
"0.5730425",
"0.57212454",
"0.570759",
"0.570531",
"0.569601",
"0.5694668",
"0.56892854",
"0.56840914",
"0.5671941",
"0.56643176",
"0.56511307",
"0.56276745",
"0.5611189",
"0.56087875",
"0.56083506",
"0.5597297",
"0.5589945",
"0.5588757",
"0.5587244",
"0.5583749",
"0.55798984",
"0.5571274",
"0.5571186",
"0.556267",
"0.55558926",
"0.5532948",
"0.5512296",
"0.55115515",
"0.55077565",
"0.5507569",
"0.5507008",
"0.5497499",
"0.5497293",
"0.54949486",
"0.54835045",
"0.54777527",
"0.54747945",
"0.5473305",
"0.54721844",
"0.5468996",
"0.5461708",
"0.5460685",
"0.54586166",
"0.5451332",
"0.5450664",
"0.54430157",
"0.5433938",
"0.54291075",
"0.54184836",
"0.5411896",
"0.54103994",
"0.5408638",
"0.53996694",
"0.53970456",
"0.5375256",
"0.5374767",
"0.5371513",
"0.53649324",
"0.53644127"
] | 0.6975997 | 0 |
Get all elements of header rows | public function getHeaders()
{
$ret = null;
if ($this->_thead instanceof HtmlElement) {
$ret = $this->_thead->getElements();
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function getRowsHeader(): array;",
"protected function get_header_elements() {\n foreach( $this->header_elements_array as $header_element ) {\n $header_elements .= \"\\n\" . $header_element;\n }\n\n return $header_elements;\n }",
"abstract protected function getColumnsHeader(): array;",
"public function getAllHeaders(){\n\t\t$query = $this->db->query(\"SELECT * FROM header\");\n\t\t$result = $query->result();\n\n\t\treturn $result;\n\n\t}",
"private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}",
"abstract function getheadings();",
"function getHeaderTags()\n {\n $filter = '(';\n for ($i = 1; $i <= 20; $i++) {\n $filter .= '//h' . $i . '|';\n }\n $filter = trim($filter, '|') . ')';\n \n $elements = $this->xpath->query($filter);\n $tags = [];\n foreach ($elements as $index => $element) {\n $level = filter_var($element->tagName, FILTER_SANITIZE_NUMBER_INT) - 1;\n $innerHtml = $this->DOMinnerHTML($element);\n \n $tags[$index]['header'] = $element->tagName;\n $tags[$index]['level'] = $level;\n $tags[$index]['name'] = trim(strip_tags($innerHtml));\n $tags[$index]['content'] = $innerHtml;\n $tags[$index]['toc'] = $this->getTOCFromTag($innerHtml);\n }\n return $tags;\n }",
"function get_header_entries() {\n return array();\n }",
"public function findAll() {\n\t\t$sql = \"select * from t_header order by header_id desc\";\n\t\t$result = $this->getDb()->fetchAll($sql);\n\n\t\t// Convert query result to an array of domain objects\n\t\t$headers = array();\n\t\tforeach ($result as $row) {\n\t\t\t$headerId = $row['header_id'];\n\t\t\t$headers[$headerId] = $this->buildDomainObject($row);\n\t\t}\n\t\treturn $headers;\n\t}",
"protected function getHeadingNodes()\n {\n $xpath = new DomXpath($this->doc);\n $query = '/html/body/*[self::h1 or self::h2 or self::h3 or self::h4 '\n . ' or self::h5 or self::h6]';\n return $xpath->query($query);\n }",
"public function getCSVHeaderRow() {\n return [\n 'link_title',\n 'link_layout',\n 'link_location',\n 'content_type',\n 'link_count',\n 'link_clicked',\n 'clicked',\n 'os',\n 'device',\n 'device_brand',\n 'device_model',\n 'browser_type',\n 'browser_name',\n 'browser_version',\n 'site',\n 'page_url',\n 'referrer',\n 'paragraphs',\n 'displayed_url_1',\n 'displayed_url_2',\n 'displayed_url_3',\n 'displayed_url_4',\n 'displayed_url_5',\n 'time_logged',\n 'time_updated',\n 'user_id',\n 'browser',\n 'row'\n ];\n }",
"public static function getTableHeaders() {\r\n\t\t$array = self::getHeadersArray();\r\n\r\n\t\tif( $array == null ) {\r\n\t\t\t$headers = [];\r\n\t\t\treturn $headers;\r\n\t\t}\r\n\r\n\t\t$headers = self::getTableHeaderTitles( $array );\r\n\t\treturn $headers;\r\n\t}",
"public function getHeaderContainer()\n\t{\n\t\treturn $this->_thead;\n\t}",
"private function get_row($rows) {\n\t\t$head = null;\n\n\t\tforeach ($rows as $key=>$val) {\n\n\t\t\t/*\n\t\t\t * check type rows\n\t\t\t */\n\t\t\tswitch ($val['type']) {\n\t\t\t\tcase 'heading': $element = 'th'; break;\n\t\t\t\tcase 'body': $element = 'td'; break;\n\t\t\t\tcase 'footer': $element = 'th'; break;\n\t\t\t\tdefault : $element = 'th'; break;\n\t\t\t}\n\n\t\t\t$head .= $this->set_template()->tr_open;\n\t\t\tforeach ($val['datas'] as $k=>$v) {\n\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t$head .= '<'.$element;\n\t\t\t\t\t$head .= $this->attributes($v['attributes']).'>';\n\t\t\t\t\t$head .= !empty($v['content']) ? $v['content'] : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t} else {\n\t\t\t\t\t$head .= '<'.$element.'>';\n\t\t\t\t\t$head .= !empty($v) ? $v : $this->empty;\n\t\t\t\t\t$head .= '</'.$element.'>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$head .= $this->set_template()->tr_close;\n\t\t}\n\n\t\treturn $head;\n\t}",
"public function _list()\n {\n return header_list();\n }",
"function print_header_entries() {\n\n $result = '';\n\n if($entries = $this->get_header_entries()) {\n $result .= '<div class=\"php_report_header_entries\">';\n foreach($entries as $value) {\n\n $label_class = \"php_report_header_{$value->css_identifier} php_report_header_label\";\n $value_class = \"php_report_header_{$value->css_identifier} php_report_header_value\";\n\n $result .= '<div class=\"' . $label_class . '\">' . $value->label . '</div>';\n $result .= '<div class=\"' . $value_class . '\">' . $value->value . '</div>';\n\n }\n $result .= '</div>';\n }\n\n return $result;\n }",
"function get_column_headers($screen)\n {\n }",
"function getColumnHeaders(){\n\t\t$columnHeaders = array();\n\n\t\t//fixed headers\n\t\t$columnHeaders[0] = 'User';\n\t\t$columnHeaders[1] = 'Action';\n\n\t\t//two headers were added, offsett to make up for it\n\t\t$count = 2;\n\t\tforeach ($this->schedule as $date => $times) {\n\n\t\t\t//convert the full date to a more readable version\n\t\t\t$converter = strtotime($date); \n\t\t\t$formattedDate =date('l', $converter);\n\t\t\t$formattedDate = $formattedDate.'</br>'.date('m-d-y', $converter);\n\n\t\t\tforeach($times as $time){// #2dimensionlswag\n\n\t\t\t\t//convert the international time to AM/PM\n\t\t\t\t$converter = strtotime($time); \n\t\t\t\t$formattedTime = date(\"g:i A\", $converter);\n\n\t\t\t\t$columnHeaders[$count] = $formattedDate.'</br>'.$formattedTime;\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn $columnHeaders;\n\t}",
"public function isFirstRowHeaders()\n\t{\n\t\treturn $this->firstRowHeaders;\n\t}",
"public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}",
"public function getHeaderFields()\n {\n $headerFields = array();\n\n foreach ($this->getFieldsData() as $fieldId => $row) {\n\n // Show single checkbox label as field label\n if ($row['label'] == $row['name']\n && $row['type'] == 'checkbox'\n && $row['options'] != ''\n ) {\n $options = deserialize($row['options'], true);\n\n if (count($options) == 1) {\n $headerFields[$fieldId] = $options[0]['label'];\n continue;\n }\n }\n\n $headerFields[$fieldId] = $row['label'];\n }\n\n return $headerFields;\n }",
"private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }",
"protected function process_header(import_settings $settings, $data) {\r\n $result = array();\r\n $doc = $settings->get_dom();\r\n $rows = $doc->getElementsByTagName('tr');\r\n $head = $rows->item(0);\r\n $cols = $head->getElementsByTagName('th');\r\n foreach ($cols as $col) {\r\n $name = $this->read($col, 'title');\r\n $description = $this->read($col, 'description');\r\n $type = $this->read($col, 'type');\r\n $options = $this->read_list($col, 'options');\r\n $f = array($this, 'process_header_' . $type);\r\n if (is_callable($f)) {\r\n $field = call_user_func($f, $settings, $data, $name, $description, $options);\r\n $result[] = $field;\r\n } else {\r\n $field = $this->process_header_default($settings, $type, $name, $description, $options);\r\n $result[] = $field;\r\n }\r\n }\r\n return $result;\r\n }",
"public function getTableHeaders()\n {\n return ['#', 'Fatura','Ordem Servico'];\n }",
"public function csvHeaderRow()\n {\n static $columns;\n\n if ($columns === null) {\n $columns = [ 'source' ];\n $languages = $this->languages();\n foreach ($languages as $lang) {\n $columns[] = $lang;\n }\n\n $columns[] = 'context';\n }\n\n return $columns;\n }",
"function table_table_header_row($values)\n{\n\t$cells=new ocp_tempcode();\n\tforeach ($values as $value)\n\t{\n\t\t$cells->attach(do_template('TABLE_TABLE_HEADER_ROW_CELL',array('_GUID'=>'5002f54ccddf7259f3460d8c0759fd1a','VALUE'=>$value)));\n\t}\n\n\treturn do_template('TABLE_TABLE_HEADER_ROW',array('_GUID'=>'2f4095b8d30f50f34fdd6acf8dd566b1','CELLS'=>$cells));\n}",
"public function csvHeaders()\n\t{\n\t\t$headers = array();\n\t\tforeach ($this->Columns as $field => $Column) {\n\t\t\t$headers[] = $Column->label();\n\t\t}\n\t\treturn $headers;\n\t}",
"protected function getHeadRowValues() \n {\n return array(\n\t\t 'Order Number',\n\t\t 'Order Date',\n\t\t \t/*'Month',*/\n 'Bill to name',\n\t\t\t'Ship to Name',\n\t\t\t'Order Location',\n\t\t\t'Zone',\n\t\t\t'Region',\n\t\t\t'Pincode #',\n\t\t\t'Payment Type',\n\t\t\t'Status',\n \t'Category',\n\t\t\t'Brand',\n\t\t\t'Stock Number',\n 'Sku_name',\n /*'MRP',*/\n\t\t\t'Weight',\n\t\t\t'Order Quantity',\n\t\t\t'Shipping Quantity',\n\t\t\t/*'BSP',*/\n\t\t\t'Invoice Id',\n\t\t\t'Invoice Date',\n\t\t\t/*'Method',*/\n\t\t\t'Original MRP',\n\t\t\t'MRP',\n\t\t\t'Discount_Amount',\n\t\t\t'Basic Sale',\n\t\t\t'TAX Amt',\n\t\t\t'Bill Value',\n\t\t\t'Coupon_Code',\n\t\t\t'Coupon Amt',\n\t\t\t'Formula',\n\t\t\t'Tax %',\n\t\t\t'Tax Type',\n\t\t\t'Courier',\n\t\t\t'AWB No',\n\t\t\t/*'Tax Amount',*/\n\t\t\t\t\t\t\n\t\t);\n }",
"public function tableHeaderRow($in){\n $out = '';\n $cols = array_keys($in);\n foreach($cols as $k){\n $out .= '<td>'.$k.'</td>';\n }\n return('<tr>'.$out.'</tr>');\n }",
"public function getHeaderRow($asArray = false) {\n\t\tif (!empty($this->headers)) {\n\t\t\tif ($asArray) {\n\t\t\t\treturn array_keys($this->data);\n\t\t\t} else {\n\t\t\t\treturn Header::getInstance()->setData(array_keys($this->data));\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public static function get_edit_table_headers() {\n\n $headerdata = array();\n $headerdata[] = get_string('sequence', 'mod_simplelesson');\n $headerdata[] = get_string('pagetitle', 'mod_simplelesson');\n $headerdata[] = get_string('prevpage', 'mod_simplelesson');\n $headerdata[] = get_string('nextpage', 'mod_simplelesson');\n $headerdata[] = get_string('hasquestion', 'mod_simplelesson');\n $headerdata[] = get_string('actions', 'mod_simplelesson');\n\n return $headerdata;\n }",
"public function getRows()\n {\n if (is_null($this->summaryRow)) {\n return $this->rows;\n } else {\n return $this->rows + array(self::ID_SUMMARY_ROW => $this->summaryRow);\n }\n }",
"function rallies_table_row_header($hdrs)\r\n{\r\n global $MYKEYWORDS;\r\n\r\n\t$OK = ($_SESSION['ACCESSLEVEL'] >= $GLOBALS['ACCESSLEVEL_READONLY']);\r\n\r\n\t$res = '';\r\n\t$hdrcols = explode(';',$hdrs);\r\n\tforeach ($hdrcols as $col)\r\n\t\t$res .= \"<th>\".$col.\"</th>\";\r\n\r\n return $res;\r\n}",
"public function get_keyed_rows() {\n\t\tif (!isset($this->keyed_rows)) {\n\t\t\t$this->get_array();\n\t\t\tif (empty($this->header) || empty($this->data)) {\n\t\t\t\t$this->keyed_rows = array();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforeach ($this->data as $i => $row) {\n\t\t\t\t\tif ($i == 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tforeach ($row as $k => $v) {\n\t\t\t\t\t\t$this->keyed_rows[$i][$this->header[$k]] = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->keyed_rows;\n\t}",
"public function getRows()\n\t{\n\t\t$ret = null;\n\t\tif ($this->_tbody instanceof HtmlElement) {\n\t\t\t$ret = $this->_tbody->getElements();\n\t\t}\n\t\treturn $ret;\n\t}",
"public function getColumns(){\n $rows = array();\n return $rows; \n }",
"protected function renderHeaderCellContent()\n\t{\n\t\t$name = $this->name;\n\t\tif (substr_compare($name, '[]', -2, 2) === 0) {\n\t\t\t$name = substr($name, 0, -2);\n\t\t}\n\t\tif (substr_compare($name, ']', -1, 1) === 0) {\n\t\t\t$name = substr($name, 0, -1) . '_all]';\n\t\t} else {\n\t\t\t$name .= '_all';\n\t\t}\n\n\t\t$id = $this->grid->options['id'];\n\n$_allSelectJs = <<< JS\n\t$('.select-on-check-all').on('click', function(){\n\t\tvar rows = table.rows({ 'search': 'applied' }).nodes();\n\t\t$('input[type=\"checkbox\"]', rows).prop('checked', this.checked);\n\t});\n\n\t$('#$id tbody').on('change', 'input[type=\"checkbox\"]', function(){\n\t\tif(!this.checked){\n\t\t\tvar el = $('.select-on-check-all').get(0);\n\t\t\tif(el && el.checked && ('indeterminate' in el)){\n\t\t\t\tel.indeterminate = true;\n\t\t\t}\n\t\t}\n\t});\nJS;\n\n\t\t$this->grid->getView()->registerJs($_allSelectJs);\n\n\t\tif ($this->header !== null || !$this->multiple) {\n\t\t\treturn parent::renderHeaderCellContent();\n\t\t} else {\n\t\t\treturn Html::checkBox($name, false, ['class' => 'select-on-check-all']);\n\t\t}\n\t}",
"public function getHeaderLines()\n {\n $headers = [];\n foreach ($this->headers as $key => $value) {\n if (is_array($value)) {\n foreach ($value as $v) {\n $headers[] = $key . ': ' . $v;\n }\n } else {\n $headers[] = $key . ': ' . $value;\n }\n }\n\n return $headers;\n }",
"public static function getHeadersForListGrid()\n {\n return array(\n 'usd',\n 'eur',\n 'pln'\n );\n }",
"public function getHeaderLines()\n {\n return $this->wrapped->getHeaderLines();\n }",
"protected function processHeaderRow($row)\n {\n $found = array();\n $record = $this->record;\n foreach($row as $index => $colName)\n {\n $colName = trim($colName);\n foreach($record as $name => $params)\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n foreach($cols as $col)\n {\n if ($col == $colName)\n {\n if (isset($params['plus'])) $plus = $params['plus'];\n else $plus = 0;\n \n $this->map[$index + $plus] = $name;\n $found[$name] = true;\n }\n }\n }\n }\n\n // Make sure all required attributes found\n foreach($record as $name => $params)\n {\n if (isset($params['req']) && $params['req'])\n {\n if (!isset($found[$name]))\n {\n if (is_array($params['cols'])) $cols = $params['cols'];\n else $cols = array($params['cols']);\n $cols = implode(' OR ',$cols);\n $this->errors[] = \"Missing $cols\";\n }\n }\n }\n }",
"protected function getTableHeader() {\n $newDirection = ($this->sortDirection == 'asc') ? 'desc' : 'asc';\n\n $tableHeaderData = array(\n 'title' => array(\n 'link' => $this->getLink('title', ($this->sortField == 'title') ? $newDirection : $this->sortDirection),\n 'name' => 'Title',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'document_type' => array(\n 'link' => $this->getLink('type', $this->sortField == 'document_type' ? $newDirection : $this->sortDirection),\n 'name' => 'Type',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'date' => array(\n 'link' => $this->getLink('date', $this->sortField == 'date' ? $newDirection : $this->sortDirection),\n 'name' => 'Date',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n );\n\t\t\n // insert institution field in 3rd column, if this is search results\n if($this->uri == 'search') {\n $tableHeaderData = array_slice($tableHeaderData, 0, 2, true) +\n array('institution' => array(\n 'link' => $this->getLink('institution', $this->sortField == 'institution' ? $newDirection : $this->sortDirection),\n 'name' => 'Institution',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n )) +\n array_slice($tableHeaderData, 2, count($tableHeaderData)-2, true);\n }\n\t\t\n return $tableHeaderData;\n }",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"public function getTableHeaders()\n {\n return ['ID', 'Ponto', 'Endereço', 'Cidade'];\n }",
"private function buildHeaderRow(View\\SaleView $view): array\n {\n $trans = $view->getTranslations();\n\n $row = [\n '',\n $trans['designation'],\n $trans['reference'],\n ];\n\n if ($view->vars['show_availability']) {\n $row[] = $trans['availability'];\n }\n\n $row[] = $view->isAti() ? $trans['unit_ati_price'] : $trans['unit_net_price'];\n\n if ($view->vars['show_taxes']) {\n $row[] = $trans['tax_rate'];\n }\n\n $row[] = $trans['quantity'];\n\n if ($view->vars['show_discounts']) {\n $row[] = $view->isAti() ? $trans['ati_gross'] : $trans['net_gross'];\n $row[] = $trans['discount']; // TODO Percent\n $row[] = ''; // TODO Amount\n }\n\n $row[] = $view->isAti() ? $trans['ati_total'] : $trans['net_total'];\n\n if ($view->vars['show_margin']) {\n $row[] = $trans['margin'];\n }\n\n return $row;\n }",
"function headerRow(&$rows, $rowN, $add_edit_link) {\n $currentRow = current($rows);\n?>\n\t<tr data-row=\"<?= $rowN ?>\">\n<?php\n if ($add_edit_link) {\n?>\n <th></th>\n<?php\n }\n foreach ($currentRow as $fieldName => $val) {\n?>\n\t\t<th class=\"popr\" data-id=\"1\">\n\t\t\t<?= $fieldName ?>\n\t\t</th>\n<?php\n }\n?>\n\t</tr>\n<?php\n }",
"function get_subscribersTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Email\";\n $table_head[2] = \"Date\";\n return $table_head;\n}",
"public function getRows();",
"public function getRows();",
"protected function getCsvHeaders(): array\n {\n // return ['id', 'name', 'attribute', 'value'];\n\n $csv = $this->_getCsvReader();\n return CsvConvert::headerConvert($csv->getHeader());\n }",
"public function getTableHeaders()\n {\n return ['#', 'Autor', 'Título', 'Subtítulo', 'Preço', 'Categorias'];\n }",
"public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }",
"function _webform_csv_headers_email($component) {\r\n $header = array();\r\n $header[0] = '';\r\n $header[1] = '';\r\n $header[2] = $component['name'];\r\n return $header;\r\n}",
"private function returnImapHeadersArr(){\n\t\treturn imap_headers($this->stream);\n\t}",
"public function headings(): array\n {\n return [\n '#ID',\n 'APELLIDO',\n 'NOMBRE',\n 'EMAIL',\n 'ROLE',\n 'PERMISOS ADICIONALES',\n 'FECHA DE CREACIÓN',\n ];\n }",
"function get_userTableHeader(){\n $table_head = array();\n $table_head[0] = \"Id\";\n $table_head[1] = \"Username\";\n $table_head[2] = \"Password\";\n $table_head[3] = \"Email\";\n $table_head[4] = \"Group\";\n return $table_head;\n}",
"public function headings(): array\n {\n return [\n 'Part Number',\n 'Description',\n 'Quantity',\n 'Date Received',\n// 'Month',\n// 'Year',\n 'Invoice Number',\n 'Vendor',\n 'Unit Price',\n 'Total Price',\n 'Location',\n 'Received By',\n ];\n }",
"public function selDistinctHead($nomeHeader){\n $ris[0] = $this->csv[0];\n foreach( $this->csv as $key => $value ){\n $match = false;\n foreach( $ris as $key2 => $value2 ){\n if($value2[$nomeHeader] == $value[$nomeHeader]){\n $match = true;\n }\n }\n if(!$match){\n $ris[$key] = $value;\n }\n }\n return $ris;\n }",
"public function getHeaders()\n {\n return $this->pluck('name')->toArray();\n }",
"public static function excelSummaryHeadings()\n {\n return [\n 'Industry',\n 'Survey responses',\n 'Employer',\n 'Government body',\n 'Non-government organisation',\n 'Registered training organisation',\n 'Enterprise training provider',\n 'Group training organisation',\n 'Skills service organisation',\n 'Individual',\n 'Trade union',\n 'Industry Association/Peak body',\n 'Statutory authority',\n 'Self-employed',\n 'Not for profit',\n 'School or University',\n 'Other',\n 'Small',\n 'Medium',\n 'Large'\n ];\n }",
"public function pi_list_header() {}",
"protected function getTableHeader() {\n /** @var \\Drupal\\webform\\WebformInterface $webform */\n $webform = $this->getEntity();\n $header = [];\n $header['title'] = $this->t('Title');\n\n $header['key'] = [\n 'data' => $this->t('Key'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['type'] = [\n 'data' => $this->t('Type'),\n 'class' => [RESPONSIVE_PRIORITY_LOW],\n ];\n $header['correct_answer'] = $this->t('Answer');\n $header['weight'] = $this->t('Weight');\n $header['operations'] = $this->t('Operations');\n// $header['answer'] = [\n// 'data' => $this->t('Answer'),\n// 'class' => [RESPONSIVE_PRIORITY_LOW],\n// ];\n//\n// $header['required'] = [\n// 'data' => $this->t('Required'),\n// 'class' => ['webform-ui-element-required', RESPONSIVE_PRIORITY_LOW],\n// ];\n// $header['parent'] = $this->t('Parent');\n// $header['operations'] = [\n// 'data' => $this->t('Operations'),\n// 'class' => ['webform-ui-element-operations'],\n// ];\n return $header;\n }",
"public function getHeaders()\n {\n $model = $this;\n \n $headers = \\DB::table('information_schema.columns')\n ->select(LaraCrudGrammar::getColumns())\n ->where('table_schema', env('DB_DATABASE'))\n ->where('table_name', $model->getTable())\n ->get();\n \n return $this->prettyNames($this->removeUnnecessaryHeaders($headers, $model));\n }",
"public function headers(): array\n {\n return [\n Header::title('Student Name'),\n Header::title('Module 1'),\n Header::title('Module 2'),\n Header::title('Actions'),\n ];\n }",
"public function getHeaders(): array {\n $result = [];\n\n foreach ($this->headers as $key => $lines) {\n $name = $this->headerNames[$key];\n $result[$name] = $lines;\n }\n\n return $result;\n }",
"public function getGridHeadings() {\n return [ StringLiterals::GRIDHEADING => [ [ 'name' => trans ( 'cms::latestnews.title' ),StringLiterals::VALUE => 'name','sort' => false ],[ 'name' => trans ( 'cms::latestnews.post_creator' ),StringLiterals::VALUE => '','sort' => false ],[ 'name' => trans ( 'cms::latestnews.post_image' ),StringLiterals::VALUE => '','sort' => false ],[ 'name' => trans ( 'cms::latestnews.created_at' ),StringLiterals::VALUE => '','sort' => false ],[ 'name' => trans ( 'cms::latestnews.status' ),StringLiterals::VALUE => 'is_active','sort' => false ],[ 'name' => trans ( 'cms::latestnews.action' ),StringLiterals::VALUE => 'is_active','sort' => false ] ] ];\n }",
"public function headers(): array\n {\n return [\n Header::title('Code')->sortBy('course.code'),\n Header::title('Name')->sortBy('course.name'),\n Header::title('Year')->sortBy('year'),\n Header::title('Credits')->sortBy('credits'),\n Header::title('Group')->sortBy('group'),\n Header::title('Semester')->sortBy('semester'),\n ];\n }",
"function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }",
"public function getTableRowNames()\n \t{\n \t\treturn array('title', 'author', 'date', 'email', 'website', 'comment', 'relevantSection', 'relevantItemId', 'isApproved', 'isPrivate', 'isAdminComment');\n \t}",
"public static function getHeadersArray() {\r\n\t\t$table = $_REQUEST[ self::$KEY_TABLE ];\r\n\t\t$array = Config::$TABLE_COLUMN_MAP[ $table ];\r\n\t\treturn $array;\r\n\t}",
"public function tableHeaders(Resource $resource): Collection\n {\n return $resource->fieldsByVisibility(Field::SHOW_ON_INDEX)\n ->map(function ($field) {\n return [\n 'attribute' => $field->column,\n 'name' => $field->name,\n ];\n })\n ->values();\n }",
"public function getHeadings(): iterable;",
"function print_column_headers($screen, $with_id = \\true)\n {\n }",
"public function makeReportUnusableToBeAbleToSeeAllColumnHeaders()\n {\n $javascript = <<<JS\n $('thead th').css('display', 'inline');\nJS;\n\n $this->getSession()->executeScript($javascript);\n }",
"function draw_header(){\r\n\t\t$out_multiple_search='';\r\n\r\n\t\t$arr_width=explode(',',$this->width);\r\n\t\t$out='<thead><tr id=\"'.$this->id.'_sort\">';\r\n\r\n\t\t$arr_sort=explode('_',$this->sort);\r\n\t\t$arr_header=explode(',',$this->header);\r\n\r\n\t\t$column=1;\r\n\t\tfor($i=0; $i<count($arr_header);$i++){\r\n\r\n\t\t\tif($this->sort_init!==false and $this->sort_init[$i]!='f'){\r\n\t\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').' onclick=\"'.$this->change_tags($this->get_url($i+1)).'\"><span'.($arr_sort[$i]=='f' ? ' class=\"no_sort' : ' class=\"sort').(substr($arr_sort[$i],-1)=='a' ? '_asc' : (substr($arr_sort[$i],-1)=='d' ? '_desc' : '')).'\"></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}else{\r\n\t\t\t\t$out.='<th'.(($this->width!='' and $arr_width[$i]>0) ? ' width=\"'.$arr_width[$i].'\"' : '').'><span></span>'.$arr_header[$i].'</th>';\r\n\t\t\t}\r\n\r\n\t\t\tif($this->multiple_search_init===true or $this->multiple_search_init=='hide' or (strpos($this->multiple_search_init,'hide')!==false and $this->multiple_search_init[$i]=='t') or $this->multiple_search_init[$i]=='t')\r\n\t\t\t\t$out_multiple_search.='<th><input type=\"text\" id=\"'.$this->id.'_multiple_search'.($i+1).'\" name=\"'.$this->id.'_multiple_search[]'.'\" value=\"'.$this->multiple_search[$i].'\" onkeyup=\"ctMultiSearch(\\''.$this->id.'\\');\" /></a></th>';\r\n\t\t\telse\r\n\t\t\t\t$out_multiple_search.='<th></th>';\r\n\t\t}\r\n\r\n\r\n\t\t$out.='</tr>';\r\n\r\n\t\tif($this->multiple_search_init===true or strpos($this->multiple_search_init,'hide')!==false or strpos($this->multiple_search_init,'t')!==false)\r\n\t\t\t$out.='<tr id=\"'.$this->id.'_multiple_search\"'.(($this->multiple_search_init!==true and strpos($this->multiple_search_init,'hide')!==false) ? ' style=\"display: none;\"' : '').'>'.$out_multiple_search.'</tr>';\r\n\r\n\t\t$out.'</thead>';\r\n\r\n\t\treturn $out;\r\n\t}",
"public function headings(): array\n {\n return [\n 'Name',\n 'Department',\n 'OT Date',\n 'Shift',\n 'From',\n 'To',\n 'Total Hrs',\n 'Job Content',\n 'Results',\n 'Supervisor',\n 'Manager',\n 'Date Created',\n 'Last Update'\n ];\n }",
"static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</th>\\n\";\n\t\techo \"</tr>\\n\";\n\t}",
"public function getHeader($rowIndex)\n\t{\n\t\t$ret = null;\n\t\tif ($this->_thead instanceof HtmlElement) {\n\t\t\t$ret = $this->_thead->getElement($rowIndex);\n\t\t}\n\t\treturn $ret;\n\t}",
"private function readHeaderRow() {\n\n // Grab the line as items\n $csvLine = $this->stream->readCSVLine($this->separator, $this->enclosure);\n\n // Create fields from these\n $columns = [];\n foreach ($csvLine as $column) {\n // Expand out the title and the name\n $name = StringUtils::convertToCamelCase(trim($column));\n $columns[] = new Field($name);\n }\n\n $this->csvColumns = $columns;\n }",
"public function headers(): Collection;",
"public function returnMailBoxHeaderArr()\n\t{\n\t\t$array = array();\n\t\t$arr = $this->returnImapHeadersArr();\n\t\tif(is_array($arr)){\n\t\t\tforeach($arr as $i){\n\t\t\t\t$i = trim($i);\n\t\t\t\t// check for unread emails\n\t\t\t\tif(substr($i,0,1) == 'U'){\n\t\t\t\t\t$i = substr($i,1,strlen($i));\n\t\t\t\t}\n\t\t\t\t$i = trim($i);\t\t\t\t\n\t\t\t\t// display if not pending deletion\n\t\t\t\tif(substr($i,0,1) != 'D'){\n\t\t\t\t\t$position = strpos($i,')');\n\t\t\t\t\t$msgno = substr($i,0,$position);\n\t\t\t\t\t$array[] = $this->returnEmailHeaderArr($msgno);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}",
"public abstract function getHeaders();",
"public function getAdminPanelHeaderData() {}",
"abstract protected function getRows();",
"public function headings(): array\n {\n return [\n 'id',\n 'mshp_version_id',\n 'cmr_law_number',\n 'cmr_chapter',\n 'cmr_charge_code_seq',\n 'cmr_charge_code_fingerprintable',\n 'cmr_charge_code_effective_year',\n 'cmr_charge_code_ncic_category',\n 'cmr_charge_code_ncic_modifier',\n 'charge_code',\n 'ncic_mod',\n 'state_mod',\n 'description',\n 'type_class',\n 'dna',\n 'sor',\n 'roc',\n 'case_type',\n 'effective_date',\n ];\n }",
"public function rows() {\n\t\treturn $this->row();\n\t}",
"protected function _getHeaders() {\n\t\t$mappings = Mage::helper('pepperjam_network/config')->getCallbackMappings();\n\t\t$headers = array();\n\t\tforeach ($this->_getFeedFields() as $field) {\n\t\t\t$callbackMapping = isset($mappings[$field]) ? $mappings[$field] : array();\n\t\t\tif (!isset($callbackMapping['type']) || $callbackMapping['type'] !== 'disabled') {\n\t\t\t\t$this->_validateCallbackConfig($callbackMapping);\n\t\t\t\t$headers[] = $callbackMapping['column_name'];\n\t\t\t}\n\t\t}\n\t\treturn $headers;\n\t}",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders() {}",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();"
] | [
"0.77124095",
"0.7186105",
"0.710517",
"0.6633367",
"0.6604542",
"0.656018",
"0.6556048",
"0.65241647",
"0.651443",
"0.6347346",
"0.6260192",
"0.6250425",
"0.6194485",
"0.6182214",
"0.61683863",
"0.6150064",
"0.6127913",
"0.61131585",
"0.61042744",
"0.60967386",
"0.6090807",
"0.6082603",
"0.60732317",
"0.6061088",
"0.6049766",
"0.60384333",
"0.6032609",
"0.60255206",
"0.60050017",
"0.5992917",
"0.5978241",
"0.5933269",
"0.5929428",
"0.59127384",
"0.58830583",
"0.5873103",
"0.5863434",
"0.58572894",
"0.5857136",
"0.5841236",
"0.5836847",
"0.5827431",
"0.582626",
"0.58235246",
"0.5823275",
"0.5816996",
"0.58140236",
"0.5814",
"0.5814",
"0.5799224",
"0.57949793",
"0.57608575",
"0.57594275",
"0.57426673",
"0.57307804",
"0.57262737",
"0.571731",
"0.57167715",
"0.57161397",
"0.57154286",
"0.5711359",
"0.57054365",
"0.5703567",
"0.56922066",
"0.56803465",
"0.5675943",
"0.5668818",
"0.56581056",
"0.5642911",
"0.56352526",
"0.5632698",
"0.56209993",
"0.5620941",
"0.56180155",
"0.561274",
"0.5609253",
"0.5605994",
"0.560297",
"0.5602787",
"0.55993825",
"0.55968374",
"0.5594919",
"0.55935764",
"0.5592926",
"0.5586263",
"0.55812347",
"0.55797595",
"0.5563312",
"0.5563312",
"0.5563312",
"0.5563312",
"0.5563312",
"0.5563312",
"0.5563312",
"0.55615485",
"0.5560728",
"0.5560728",
"0.5560728",
"0.5560728",
"0.5560728"
] | 0.70073044 | 3 |
Create elements of rows and columns element by two dimensional array | public function bindArray($rows)
{
$this->_checkArgumentIsArray(__METHOD__, 1, $rows);
$this->_tbody = new HtmlElement('tbody');
$this->addElement($this->_tbody);
foreach ($rows as $row) {
$this->addRow($row);
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function make_2d($x, $y)\n{\n for ($_x = 0; $_x < $x; $_x++) {\n for ($_y = 0; $_y < $y; $_y++) {\n $a[$_x][$_y] = \"x{$_x}y{$_y}\";\n }\n }\n return $a;\n}",
"protected function initializeElements()\n {\n for ($i = 0; $i < $this->_rows; ++$i) {\n for ($j = 0; $j < $this->_cols; ++$j) {\n $this->_data[$i][$j] = call_user_func($this->factory);\n }\n }\n }",
"function arrToMatrix(&$array, &$matrix){\r\n foreach ($array as $element) {\r\n $matrix[] = explode(\"|\", $element);\r\n }\r\n }",
"public function fromArray($prm_array){\n if(is_array($prm_array)){\n foreach ($prm_array as $index => $element){\n if(is_array($element)){\n $this->startElement('row');\n $this->fromArray($element);\n $this->endElement();\n }\n else\n $this->setElement($index, $element);\n \n }\n }\n }",
"function arrChange($arr){\n\n// 行数\n $count=count($arr);\n// 列数\n $col=count($arr[0]);\n $new=[];\n// 从列开始循环\n for($j=0;$j<$col;$j++){\n for($i=0;$i<$count;$i++){\n $new[$j][]=$arr[$i][$j];\n }\n }\n return $new;\n}",
"public static function twoDArrayforCalender()\n {\n $array = [];\n for ($i = 0; $i < 6; $i++) \n {\n $array1 = array();\n for ($j = 0; $j < 7; $j++) \n {\n //initializing array values to '-'\n $array1[$j] = '-';\n }\n //pushing array to each row of 2d array\n array_push($array, $array1);\n }\n return $array;\n }",
"function set_arbitrary_dim_array_element($multi_array, $index_array, $value){\r\n //index_array should be an array of the indexs for the array dimensions (this should be a 1-dim array, eg. index[0] = 1, index[1] = 3, index[2] = 2 ...)\r\n //pop from left side of array\r\n \r\n //echo \"print_r of index_array in set_arbitrary_dim_array_element: \"; print_r($index_array); echo \"<br />\";\r\n \r\n $numIndices = count($index_array);\r\n \r\n //Recursive structure:\r\n if($numIndices == 1){\r\n \r\n $index = $index_array[0];\r\n \r\n $multi_array[$index] = $value; \r\n }\r\n else{ \r\n \r\n $left_most_index = $index_array[0];\r\n \r\n $tmp_array = $multi_array[$left_most_index];\r\n $tmp_array = set_arbitrary_dim_array_element($tmp_array, array_slice($index_array, 1), $value);\r\n $multi_array[$left_most_index] = $tmp_array;\r\n }\r\n \r\n return $multi_array;\r\n\r\n }",
"function rellenar($array,$filas,$columnas){\n$f = $filas - 1;\n$c = $columnas -1;\n\tfor($i = 0; $i <= $f ; $i++){\n\t\tfor($j = 0; $j <= $c; $j++){\n\t\t\t$array[$i][$j]= \"5\";\n\t\t}\n\t}\n\nreturn $array;\n}",
"function set(array $grid, int $rowIndex, int $columnIndex, int $value): void {//tiene\n $grid[$rowIndex][$columnIndex] = $value; \n}",
"function a_t($array)\r\n{\r\n $r=array();\r\n foreach($array as $k1=>$ia) {\r\n foreach($ia as $k2=>$v) {\r\n $r[$k2][$k1]=$v;\r\n }\r\n }\r\n return $r;\r\n}",
"abstract protected function mapRow(array $row);",
"abstract protected function mapRow(array $row);",
"abstract protected function createEntity(array $row);",
"public function transpose()\n {\n $literal = array();\n\n for ($i = 0; $i < $this->columns; $i++) {\n $literal[] = array();\n\n for ($j = 0; $j < $this->rows; $j++) {\n $literal[$i][] = $this->get($j, $i);\n }\n }\n\n return new static($literal);\n }",
"function array_columns($array, $columns = 2) {\n\n\t$output_array = array();\n\t$counter = 0;\n\n\tforeach ( $array as $key => $value ) {\n\n\t\t$output_array[$counter][$key] = $value;\n\n\t\tif ( $counter++ >= ($columns - 1) ) {\n\t\t\t$counter = 0;\n\t\t}\n\n\t}\n\n\treturn $output_array;\n\n}",
"private function initialize_another_structure() {\n return array(\n array('#', '#', '#', '#', '#', '#', '#', '#'),\n array('#', '.', '.', '.', '.', '.', '.', '#'),\n array('#', '.', '#', '#', '#', '.', '.', '#'),\n array('#', '.', '.', '.', '#', '.', '#', '#'),\n array('#', '.', '#', '.', '.', '.', '.', '#'),\n array('#', '.', '.', '.', '.', '.', '.', '#'),\n array('#', '.', '#', '.', '#', '#', '.', '#'),\n array('#', 'X', '#', '.', '.', '.', '.', '#'),\n array('#', '#', '#', '#', '#', '#', '#', '#'),\n );\n }",
"public static function printTwoDArray($rows, $cols, $arr)\n {\n // echo \"enter 1 :Integer 2: string\";\n echo \"enter the \" . $rows * $cols . \" elements\";\n\n /** enter the values into an array */\n for ($i = 0; $i < $rows; $i++) {\n for ($j = 0; $j < $cols; $j++) {\n $twoDArr[$i][$j] = Utility::readInt();\n }\n }\n\n /**print the array */\n for ($i = 0; $i < $rows; $i++) {\n for ($j = 0; $j < $cols; $j++) {\n print $twoDArr[$i][$j] . \" \";\n }\n echo \"\\n\";\n }\n// print_r($twoDArr);\n }",
"public function packingCreate(array $array);",
"public function create($array) {\n \n }",
"private function fillArray($array) {\n\t\t$result = array();\n\t\tforeach ($array as $attr => $val) {\n\t\t\t$setMethod = 'set' . ucfirst($attr);\n\t\t\t$returnType = $this->getReturnTypeOfSetMethod($setMethod);\n\t\t\tif ($returnType) {\n\t\t\t\t$result[$attr] = new $returnType(); \n\t\t\t} else {\n\t\t\t\t$result[$attr] = 'abc';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function createNode($arr,$node = null){\r\n if(is_null($node)){\r\n $node = $this->root;\r\n }\r\n foreach($arr as $element => $value){\r\n $element = is_numeric($element)? $this->node_name : $element;\r\n\r\n $child = $this->createElement($element,(is_array($value)? null : $value));\r\n $node->appendChild($child);\r\n\r\n if(is_array($value)){\r\n self::createNode($value,$child);\r\n }\r\n }\r\n }",
"function slice_array($arr, $column) {\n $output = array();\n foreach ($arr as $row) {\n $output[$row[$column]][] = $row;\n }\n return $output;\n}",
"function sloodle_array_to_vector($arr)\n {\n $ret = '<'.$arr['x'].','.$arr['y'].','.$arr['z'].'>';\n return $ret;\n }",
"public function __construct($array)\n {\n foreach ($array as $elem) {\n $this->insert($elem);\n }\n }",
"private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }",
"public function submatrix($row = null, $column = null)\n {\n $literal = array();\n\n for ($i = 0; $i < $this->rows; $i++) {\n if ($i === $row) {\n continue;\n }\n\n $rowLiteral = array();\n\n for ($j = 0; $j < $this->columns; $j++) {\n if ($j === $column) {\n continue;\n }\n\n $rowLiteral[] = $this->get($i, $j);\n }\n\n $literal[] = $rowLiteral;\n }\n\n return new static($literal);\n }",
"public function createArray(array $data) {\n\t\treturn array_map(array($this, 'create'), $data);\n\t}",
"public function create($array) {\n }",
"function transposeMatrix($arr){\n $length = count($arr);\n $sublength = count($arr[0]);\n $output = [];\n for($i=0; $i<$sublength; $i++){\n $tmp_arr = [];\n for($j=0; $j<$length;$j++){\n $tmp_arr[] = $arr[$j][$i];\n }\n $output[] = $tmp_arr;\n unset($tmp_arr);\n }\n return $output;\n}",
"protected function buildElement($row) {\n\t\t$elem = null;\n\t\tswitch ($row['ElementType']) {\n\t\t\tcase 'textarea' \t\t: $elem = $this->buildTextarea($row);\n\t\t\tbreak;\n\t\t\tcase 'hidden' \t\t\t: $elem = $this->buildHidden($row);\n\t\t\tbreak;\n\t\t\tcase 'select' \t\t\t: $elem = $this->buildSelect($row);\n\t\t\tbreak;\n\t\t\tcase 'checkbox' \t\t: $elem = $this->buildCheckbox($row);\n\t\t\tbreak;\n\t\t\tcase 'radio' \t\t\t: $elem = $this->buildRadio($row);\n\t\t\tbreak;\n\t\t\tcase 'password'\t\t\t: $elem = $this->buildPassword($row);\n\t\t\tbreak;\n\t\t\tcase 'checkboxsingle'\t: $elem = $this->buildCheckboxSingle($row);\n\t\t\tbreak;\n\t\t\tcase 'text' \t\t\t: $elem = $this->buildText($row);\n\t\t\tbreak;\n\t\t\tdefault \t\t\t\t: $elem = $this->buildText($row);\n\t\t\tbreak;\n\t\t\t\t\t\n\t\t}\n\t\treturn $elem;\n\t}",
"function associate_first_row($array_in) {\n $out = array();\n $ident = array_shift($array_in);\n foreach ($array_in as $key_r => $row) {\n foreach ($row as $key_c => $cell) {\n $out[$key_r][$ident[$key_c]] = $cell;\n }\n }\n return $out;\n}",
"private function _prepareRow($array){\n return array_merge($this->_blankRow, $array);\n }",
"function initRow(&$arr, $numCols, $rowNum, $val = '')\n\t{\n\t\tif (!isset($arr[$rowNum]))\n\t\t{\n\t\t\t$arr[$rowNum] = array();\n\t\t\tfor ($i=0; $i<$numCols; $i++)\n\t\t\t{\n\t\t\t\t$arr[$rowNum][$i] = $val;\n\t\t\t}\n\t\t}\n\t}",
"public function create(array $input);",
"function crear_matriz($gmat,$numero){\r\n foreach(range(0,$numero) as $row){\r\n foreach(range(0,$numero) as $col){\r\n $gmat[$row][$col] = 0;\r\n }\r\n }\r\n return $gmat;\r\n}",
"public function submatrix($row = null, $column = null)\n {\n $literal = [];\n\n for ($i = 0; $i < $this->getRowCount(); $i++) {\n if ($i === $row) {\n continue;\n }\n\n $rowLiteral = [];\n\n for ($j = 0; $j < $this->getColumnCount(); $j++) {\n if ($j === $column) {\n continue;\n }\n\n $rowLiteral[] = $this->get($i, $j);\n }\n\n $literal[] = $rowLiteral;\n }\n\n return new static($literal);\n }",
"public static function to2DArray($array) {\n if(is_object($array)) {\n $array = (array) $array;\n }\n\n if(isset($array[0]) && is_object($array[0])) {\n foreach ($array as $key => $value) {\n $array[$key] = (array) $value;\n }\n }\n \n if(static::is_assoc($array)) {\n $array = [$array];\n }\n \n if(!is_array($array)) {\n throw new Exception(\"variable is not an array/object\");\n }\n\n return $array;\n }",
"public function combineTo(array $array)\n {\n return new static(array_combine($array, $this->elements));\n }",
"public function set_channel_elements_from_array($elementArray){\n\t\tif(! is_array($elementArray)) return;\n\t\tforeach ($elementArray as $elementName => $content) $this->set_channel_element($elementName, $content);\n\t}",
"public static function fromRow(array $row)\n {\n $instance = new self();\n $instance->fill($row);\n return $instance;\n }",
"protected function convert_array($array_elements){\n return array_map(function($object){\n return $object;\n },$array_elements->toArray());\n \n\n }",
"public function getArrayColumnValues($field, $twoDimArray){\n return array_column($twoDimArray, $field);\n }",
"protected function buildGrid()\n {\n\t$this->cases = array() ;\n\tfor($row = 1; $row<=$this->size; $row++) { // row \n\t for($col = 1 ; $col<= $this->size; $col++) { // col\n $region = $this->getRegion($row, $col) ;\n $this->cases[$row . '.' . $col] = new GridCase($region, $row, $col, $this->size) ;\n }\n\t}\n return $this->cases ;\n }",
"function transposeData($data) {\r\n $retData = array();\r\n foreach ($data as $row => $columns) {\r\n foreach ($columns as $row2 => $column2) {\r\n \t\t$retData[$row2][$row] = $column2;\r\n }\r\n }\r\n\treturn $retData;\r\n}",
"function makeMultiDimTable($array)\n {\n $totalkeys = 0;\n $totalvalues = 0;\n echo \"<table>\";\n echo \"<thead><tr><td>Keys</td><td>Values</td></tr></thead>\";\n echo \"<tbody>\";\n foreach($array as $key => $value)\n {\n echo \"<tr><td>\" . $key . \"</td><td>\" . $value . \"</td></tr>\";\n $totalkeys += $key;\n $totalvalues += $value;\n }\n echo \"<tr><td colspan=2>Totals</td></tr>\";\n echo \"<tr><td>\" . $totalkeys . \"</td><td>\" . $totalvalues . \"</td></tr>\";\n echo \"</tbody>\";\n }",
"public function convert2DimensionalArrayDataProvider()\n {\n return [\n [ // Matrix\n [\n [1,26, 27],\n [32, 52, 676],\n [702, 703, 2],\n ],\n [\n ['A', 'Z', 'AA'],\n ['AF', 'AZ', 'YZ'],\n ['ZZ', 'AAA', 'B'],\n ]\n ],\n [ // empty matrix\n [[]],\n [[]]\n ],\n [ // 2 dimensional array\n [\n [1,26, 27],\n [32, 52],\n [702, 703, 2, 676],\n ],\n [\n ['A', 'Z', 'AA'],\n ['AF', 'AZ'],\n ['ZZ', 'AAA', 'B', 'YZ'],\n ]\n ]\n ];\n }",
"private function init()\n\t{\n\t\tfor ($i = 0 ; $i < $this->row ; $i++) {\n\t\t\tfor($j = 0 ; $j < $this->col ; $j++) {\n\t\t\t\t$this->arr[$i][$j] = \" \";\n\t\t\t}\n\t\t}\n\t}",
"private function renderMapRouteMarkerByPathRow( $elements )\n {\n $row = array();\n $row = $row + $this->renderMapRouteMarkerByPathRowLocal( $elements ) + $this->renderMapRouteMarkerByPathRowCat( $elements )\n ;\n//$this->pObj->dev_var_dump( $row );\n\n return $row;\n }",
"function setMatrix($x,$y){\n\t$thisMatrix = array();\n\tfor( $i=0; $i<3; $i++){\n\t\t$rowMatrix = array();\n\t\tfor( $j=0; $j<3; $j++){\n\t\t\t$tempNum = rand($x,$y);\n\t\t\tarray_push($rowMatrix, $tempNum);\n\t\t}\n\t\tarray_push($thisMatrix, $rowMatrix);\n\t}\n\treturn $thisMatrix;\n}",
"function transpose(&$A, &$B)\r\n {\r\n $N = 4;\r\n for ($i = 0; $i < $N; $i++)\r\n for ($j = 0; $j < $N; $j++)\r\n $B[$i][$j] = $A[$j][$i];\r\n }",
"public function create_calculation_array_matrix(){\n\t\t/*\n\t\t* Public and private sets of date for more complex frontend managament\n\t\t*/\n\t\t$calculation_array_matrix = array(\n\t\t\t\"public\" => array(\n\t\t\t\t'calc' => array()\n\t\t\t),\n\t\t\t\"auth\" => array(\n\t\t\t\t'calc_details' => array()\n\t\t\t)\n\t\t);\n\t\treturn $calculation_array_matrix;\n\t}",
"abstract public function grid();",
"function twoDArray()\n {\n //$m and $n to take size of array $m*$n size\n echo \"enter row size\".\"\\n\";\n $m = Utility::getInt();\n echo \"\\n\".\"enter colums size\".\"\\n\";\n $n = Utility::getInt();\n //main array which will hold other array to make 2D array\n $arr = array();\n echo \"enter valus\".\"\\n\";\n //for loop to store the value in the array one by one \n for($i = 0;$i < $m; $i++)\n {\n //array to save value in row by row in main array\n $iArr = array();\n //for loop to take $n value from user \n for($j = 0; $j < $n ;$j++ )\n {\n $iArr[$j] = trim(fgets(STDIN));\n } \n //array push will push one array to other array\n array_push($arr,$iArr);\n }\n\n //for loop to print the values of array\n for($i = 0;$i < $m; $i++)\n {\n for($j = 0; $j < $n ;$j++ )\n {\n echo $arr[$i][$j].\" \";\n }\n echo \"\\n\";\n }\n }",
"protected function aggregate_multidimensional()\n {\n }",
"protected function makeElements(array $elements)\n {\n $this->elements = collect();\n $this->addElements($elements);\n return $this; \n }",
"public static function intersperse(array $self, $value) : array\n {\n $array = $self;\n $chunk = array_chunk($array, 1);\n\n $intersperser = function (&$row) {\n $row[1] = \"lalal\";\n };\n foreach ($chunk as &$row) {\n $row[1] = $value;\n }\n $result = call_user_func_array('array_merge', $chunk);\n array_pop($result);\n return $result;\n }",
"public static function getColumn(array $arr,$attribute){\n $column=array();\n foreach($arr as $one){\n if(is_array($one)){\n $column[]=$one[$attribute];\n }else{\n $column[]=$one->{$attribute};\n }\n }\n return $column;\n }",
"private function build_article_data( array $array ) {\n\t\t$this->get_article_data( false, $array );\n\t}",
"public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}",
"public function assignByArray($array) {\n\t\t$result=array();\n\t\tforeach ($array as $fieldId=>$value) {\n\t\t\t$result[self::$FIELD_NAMES[$fieldId]]=$value;\n\t\t}\n\t\t$this->assignByHash($result);\n\t}",
"function tabla01($array01){\n\t$i = '0';\n\t$array02[$i++] = \"<table id=\\\"one-column-emphasis\\\" >\\n\n <colgroup>\\n\n \t<col class=\\\"oce-first\\\" />\\n\n </colgroup>\\n\n <tbody>\\n\";\n\tforeach( $array01 as $key => $value){\n\t\t$array02[$i++] = \"<tr><td>\".$key.\"</td><td>\".$value.\"</td></tr>\\n\";\n\t}\n\t$array02[$i++] = \"</tbody>\\n</table>\\n\";\n\treturn $array02;\n/*\n<table id=\\\"one-column-emphasis\\\" >\n <colgroup>\n \t<col class=\\\"oce-first\\\" />\n </colgroup>\n <tbody>\n \t<tr>\n \t<td></td>\n </tr>\n </tbody>\n</table>\n*/\n}",
"protected function createRenderArray(array $result) {\n $items = [];\n foreach ($result as $id => $row) {\n\n $items[$id] = [\n 'vsite_name' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $row['vsite_name'],\n '#attributes' => [\n 'class' => 'lynx-title',\n ],\n ],\n 'vsite_description' => [\n '#markup' => '<div class=\"meta-description\">' . $row['vsite_description'] . '</div>',\n ],\n 'content_type' => [\n '#markup' => '<div class=\"content-type\">' . $row['content_type'] . '</div>',\n ],\n 'title' => [\n '#prefix' => '<h2 class=\"node--title\">',\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $row['title'],\n '#suffix' => '</h2>',\n ],\n 'body' => [\n '#markup' => '<div class=\"body\">' . Unicode::truncate($row['body'], 128, TRUE, TRUE) . '</div>',\n ],\n 'see_more' => [\n '#type' => 'link',\n '#url' => Url::fromUri($row['url'], ['absolute' => TRUE]),\n '#title' => $this->t('Read more'),\n ],\n ];\n if ($row['vsite_logo']) {\n $image = [\n '#theme' => 'image',\n '#uri' => $row['vsite_logo'],\n '#alt' => $row['vsite_name'],\n '#weight' => -1,\n ];\n $items[$id]['vsite_logo'] = [\n '#type' => 'link',\n '#url' => Url::fromUri($row['vsite_url'], ['absolute' => TRUE]),\n '#title' => $image,\n '#weight' => -2,\n ];\n }\n }\n\n $build['search_results'] = [\n '#title' => $this->t('Search'),\n 'content' => [\n '#theme' => 'item_list__search_results',\n '#items' => $items,\n '#empty' => [\n '#markup' => '<h3>' . $this->t('Your search yielded no results.') . '</h3>',\n ],\n '#type' => 'remote',\n '#attributes' => [\n 'class' => ['lynx-search-listing'],\n ],\n ],\n ];\n return $build;\n }",
"function generate2dArrayFromDB($tableName, $columnNames, $where) {\n\n //creates a connection with the Database\n $conn = connect();\n\n //Generates SELECT sql part\n $commaSeperatedcolumnNames = $columnNames[0];\n for ($i=1; $i<count($columnNames); $i++) {\n $commaSeperatedcolumnNames .= \", \" . $columnNames[$i];\n }\n\n //combines SELECT $tableName and WHERE parts to form sql query\n $sql = \"SELECT $commaSeperatedcolumnNames\n FROM $tableName\n $where\";\n\n //saves query results\n $result = $conn->query($sql);\n //if there are result continue\n if ($result !== FALSE) {\n if ($result->num_rows > 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n } else {\n return 'Fout in programmatuur';\n }\n $conn->close();\n}",
"public function row_array($array, $array_node = null, $array_level = 0)\n {\n if ($array_level == 0) {\n $out .= debug::row_double(\"<b>Key</b>\", \"<b>Value</b>\");\n }\n foreach ($array as $key => $value) {\n $shift = str_repeat(\" \", $array_level);\n if ($array_level==0) {\n $caption = $key;\n } else {\n $caption = \"[\".$key.\"]\";\n };\n // walk types\n if (is_array($value)) {\n $out .= debug::row_double($shift.$array_node.$caption, \"(\".gettype($value).\")\");\n $out .= $this->row_array($value, $array_node.$caption, $array_level+1);\n } elseif (is_object($value)) {\n $out .= debug::row_double($shift.$array_node.$caption, \"(\".gettype($value).\") \");\n $out .= $this->row_array(get_object_vars($value), $array_node.$caption, $array_level+1);\n } elseif (is_scalar($value)) {\n $out .= debug::row_double($shift.$array_node.$caption, \"(\".gettype($value).\") \".htmlentities($value));\n } else {\n $out .= debug::row_double($shift.$array_node.$caption, \"(\".gettype($value).\") Error: Can not display Debug- Value!!!\");\n }\n }\n return $out;\n }",
"public function fillarrElements()\r\n\t\t\t{ $this->arrElements=[];\r\n\t\t\t\t //we need element only for our group\r\n\t\t\t\t \r\n\t\t\t\t $this->BottomArrCurSection[]=intval((trim($this->section)));\r\n\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t $elements = Element::find()\r\n\t\t\t\t ->where(['idp' =>$this->BottomArrCurSection ,'issection' =>false, 'active'=>1 ]) \r\n\t\t\t\t ->orderBy(\"name\")\t\t\t\t\r\n\t\t\t\t ->offset( intval( $this->page*$this->elementPerPage))\r\n\t\t\t\t ->limit(intval($this->elementPerPage))\r\n\t\t\t\t //->where(['idp' =>ltrim( $startCode )])\r\n\t\t\t\t ->all();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tforeach($elements as $element){\r\n\t\t\t\t\t$idArray=Array();\r\n\t\t\t\t\t\t\t//echo $element->id;\r\n\t\t\t\t\t\t\r\n //we do not make the tree in this function\r\n\t\t\t\t\t\t// echo 'ffff <br>';\r\n\t\t\t\t\t\t$idArray[ 'id']= $element->id;\r\n\t\t\t\t\t\t$idArray[ 'name']= $element->name;\r\n\t\t\t\t\t\t$idArray[ 'index1']= $element->index1;\r\n\t\t\t\t\t\t$idArray[ 'index2']= $element->index2;\r\n\t\t\t\t\t\t$idArray[ 'idp']= $element->idp;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->arrElements[]=$idArray;\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t}",
"public function transpose();",
"public function build(array $dataset);",
"public function createAuto($array)\n {\n }",
"abstract public function array2Data($arr);",
"private function getBaseElementsforCanvas ($canvas ,$arrayElements){\n \n $sizeArray = count($arrayElements);\n $position = 0;\n $typeElemnt = 0;\n\n //echo 'elementos identificadores'.\"<br>\";\n while ($position < $sizeArray){\n \n $this->insertElementsInCanvas($canvas,$arrayElements[$position],$position, $typeElemnt);\n $position ++;\n \n } \n }",
"function mapArray($array){\n\treturn new ArrayMapper($array);\n}",
"public static function transpose($array) {\n // array_unshift($array, null);\n // return call_user_func_array('array_map', $array);\n return array_map(null, ...$array);\n }",
"protected function calculateRowsAndColumns() {}",
"function array_build($array, Closure $callback)\n {\n return Arr::build($array, $callback);\n }",
"function array_column(&$arr, $col) {\n $column = array();\n foreach ($arr as $row) {\n $column[] = $row[$col];\n }\n return $column;\n}",
"public static function create(array $row = array())\n {\n if (!isset($row['published'])) \n $row['published'] = time();\n \n if (!isset($row['modified'])) \n $row['modified'] = time();\n \n if (!isset($row['state']) \n || !in_array($row['state'], self::availableStates())) \n $row['state'] = self::STATUS_PUBLISHED;\n \n if (!isset($row['node_id'])) \n {\n $contentIni = eZINI::instance('content.ini.append.php');\n $row['node_id'] = $contentIni->variable('NodeSettings', 'ForumRootNode');\n }\n \n if (!isset($row['user_id'])) \n {\n $user = eZUser::currentUser();\n $row['user_id'] = $user->id();\n }\n \n if (!isset($row['language_id']))\n {\n $row['language_id'] = false;\n }\n $row['language_id'] = SimpleForumTools::getLanguageId($row['node_id'], $row['language_id']);\n \n $object = new self( $row );\n return $object;\n }",
"private function getPivot() {\n\n $column = 0;\n foreach ($this->array AS $row => $value) {\n $this->process[] = $this->getPivotArray($column, $row);\n }\n }",
"private function addColumnsFromArray($array)\n {\n foreach ($array as $key => $value)\n if (is_int($key))\n $this->addColumn($value);\n else\n $this->addColumn($key, $value);\n }",
"public static function getMock_twoElementArr()\n {\n $model = self::createArrayModels(self::getTwoElementArray());\n\n return $model;\n }",
"function array_build($array, callable $callback)\n {\n return Arr::build($array, $callback);\n }",
"abstract public function getRowAsArray();",
"public function makeFromRow(array $row, ?callable $childGenerator = null): ContentElementEntity\n {\n $languageId = $row['sys_language_uid'] ?? $this->getTypoContext()->language()->getId();\n \n if (! is_numeric($languageId)) {\n throw new InvalidArgumentException('The given row is invalid! The sys_language_uid value must be an integer');\n }\n \n $language = $this->getTypoContext()->language()->getLanguageById((int)$languageId);\n \n if (! is_numeric($row['uid'] ?? null)) {\n throw new InvalidArgumentException('The given row is invalid! The uid value must be an integer');\n }\n \n $uid = $row['uid'];\n \n $data = $this->getCache()->remember(\n function () use ($uid, $language) {\n return $this->getService(DataGenerator::class)->makeFromId($uid, $language);\n },\n [\n 'ce_resource',\n $uid,\n $language->getTwoLetterIsoCode(),\n '@query' => $this->findQueryParameterNs($row),\n ],\n [\n 'tags' => ['contentElement', 'tt_content_' . $uid],\n ]\n );\n \n // The child generation is not cacheable, because we don't know which GET parameters\n // should be considered a \"part\" of the cacheable content.\n // Therefore, we cache each element separately\n if (is_callable($childGenerator) && ! is_array($data[1]['children'] ?? null)) {\n $children = $childGenerator($data, $uid, $language);\n if (is_array($children)) {\n ksort($children);\n $data[1]['children'] = $children;\n }\n }\n \n return $this->makeInstance(ContentElementEntity::class, $data);\n }",
"abstract public function create(array $data): array;",
"public function insertArrayDataProvider()\n {\n return [\n 'one column' => [\n ['column1'],\n [[1], [2]],\n [['column1' => 1, 'column2' => null], ['column1' => 2, 'column2' => null]],\n ],\n 'one column simple' => [\n ['column1'],\n [1, 2],\n [['column1' => 1, 'column2' => null], ['column1' => 2, 'column2' => null]],\n ],\n 'two columns' => [\n ['column1', 'column2'],\n [[1, 2], [3, 4]],\n [['column1' => 1, 'column2' => 2], ['column1' => 3, 'column2' => 4]],\n ],\n 'several columns with identity' => [ // test possibility to insert data with filled identity field\n ['id', 'column1', 'column2'],\n [[1, 0, 0], [2, 1, 1], [3, 2, 2]],\n [\n ['id' => 1, 'column1' => 0, 'column2' => 0],\n ['id' => 2, 'column1' => 1, 'column2' => 1],\n ['id' => 3, 'column1' => 2, 'column2' => 2]\n ],\n ]\n ];\n }",
"public function build($row = -1, $col = -1, $num = -1, $data = array()){\n\n global $filelogger;\n\n $filelogger->debug(\"row=%, col=%, num=%, data=%\", \n array($row,$col,$num,StringUtil::get_object_string($data)));\n\n // element gonna be setup\n $e = null;\n\n switch($this->type) {\n\n // input fields\n // TODO: mapping data on to elements of group \"entries\"\n\n case \"textarea\" : \n $e = new Textarea($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, \n $this->title, $this->rows, $this->cols,\n $this->disabled, $this->value, $this->iclasses);\n break;\n\n case \"text\" : \n $e = new Text($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, $this->title, \n $this->size, $this->length, $this->value, \n $this->disabled, $this->iclasses);\n break;\n\n case \"password\" : \n $e = new Password($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, $this->title, \n $this->size, $this->length, $this->disabled, \n $this->iclasses);\n break;\n\n // name AND value characterize the element, same name/diff value => multichoice\n case \"checkbox\" : \n $e = new Checkbox($this->module, $this->fname, $this->name, \n $this->groupid, $row, $col, $num, $this->title, \n $this->value, $this->checked, $this->disabled,\n $this->iclasses);\n break;\n\n // ONLY value characterizes the element, the name is fix on single choices\n case \"radio\" : \n $e = new Radio($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, $this->title, \n $this->value, $this->checked,$this->disabled,\n $this->iclasses);\n break;\n\n // optgroups/options will be passed as data array, s.a. $data\n case \"select\" : \n $e = new Select($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, $this->title, \n $this->size, $this->multiple, $this->disabled, \n $this->iclasses);\n break;\n\n // data fields\n\n // value must be adjustable, e.g. see Tokenizer\n case \"hidden\" : \n $e = new Hidden($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, $this->value);\n break;\n\n case \"file\" : \n $e = new File($this->module, $this->fname, $this->name, \n $this->groupid, $row, $col, $num, $this->title, \n $this->disabled, $this->iclasses);\n break;\n\n // buttons \n case \"submit\" : \n $e = new Submit($this->module, $this->fname, $this->name,\n $this->groupid, $row, $col, $num, $this->title, \n $this->value, $this->disabled, $this->iclasses);\n break;\n\n case \"reset\" : \n $e = new Reset($this->module, $this->fname, $this->name, \n $this->groupid, $row, $col, $num, $this->title, \n $this->value, $this->disabled, $this->iclasses);\n break;\n\n case \"image\" : \n $e = new Image($this->module, $this->fname, $this->name, \n $this->groupid, $row, $col, $num, $this->title, \n $this->value, $this->source, $this->disabled, \n $this->iclasses);\n break;\n\n case \"button\" : \n $e = new Button($this->module, $this->fname, $this->name, \n $this->groupid, $row, $col, $num, $this->title, \n $this->btype, $this->value, $this->text, \n $this->disabled, $this->iclasses);\n break;\n\n default: return \"-\";\n\n }\n\n return $e->build($data);\n\n }",
"function aarr(&$R,$nn,$n,$m=\"\")\n\t\t{\n\t\treturn $this->Zarr($R,\"int8\",$n,$m);\t\t\t\n\t\t}",
"function get_imc($dataSet) {\n $index_imc = 2;\n $column_imc = $dataSet[0][$index_imc];\n $imc = array();\n for ($i = 1; $i < count($dataSet); $i++){\n $daily_imc = $dataSet[$i][$column_imc];\n $imc[] = array(\"date\" => $dataSet[$i][\"date\"],\n $dataSet[0][$index_imc] => $daily_imc);\n }\n return $imc;\n}",
"abstract public function combineTo(array $array);",
"function _build_row_by_post()\n{\n\t$row = array(\n\t\t'user_id' => $this->_post_class->get_post_get_int( 'user_id' ),\n\t\t'user_time_create' => $this->_post_class->get_post_int( 'user_time_create' ),\n\t\t'user_time_update' => $this->_post_class->get_post_int( 'user_time_update' ),\n\t\t'user_uid' => $this->_post_class->get_post_int( 'user_uid' ),\n\t\t'user_cat_id' => $this->_post_class->get_post_int( 'user_cat_id' ),\n\t\t'user_email' => $this->_post_class->get_post_text( 'user_email' ),\n\t\t'user_text1' => $this->_post_class->get_post_text( 'user_text1' ),\n\t\t'user_text2' => $this->_post_class->get_post_text( 'user_text2' ),\n\t\t'user_text3' => $this->_post_class->get_post_text( 'user_text3' ),\n\t\t'user_text4' => $this->_post_class->get_post_text( 'user_text4' ),\n\t\t'user_text5' => $this->_post_class->get_post_text( 'user_text5' ),\n\t);\n\n\tfor ( $i=1; $i <= _C_WEBPHOTO_MAX_CAT_TEXT; $i++ ) \n\t{\n\t\t$name = 'user_text'.$i;\n\t\t$row[ $name ] = $this->_post_class->get_post_text( $name );\n\t}\n\n\treturn $row;\n}",
"function tablaMultiplicar($filas, $columnas)\n{\n $tabla = array();\n for($i=0;$i<=$filas;$i++)\n {\n for ($z=0;$z<=$columnas;$z++)\n {\n if($i==0)\n $tabla[$i][$z]=$z;\n else if ($z==0)\n $tabla[$i][$z]=$i;\n else\n $tabla[$i][$z]=$i*$z;\n }\n }\n return $tabla;\n}",
"function transpose(array $xs)\n{\n if (!$xs) {\n return array();\n }\n //special case: row matrix\n if (count($xs) == 1) {\n return array_chunk($xs[0], 1);\n }\n return call_user_func_array(\n 'array_map',\n array_merge(array(null), $xs)\n );\n}",
"function AssociativeMatrix(&$matrix, &$asMatrix){\r\n for ($i = 1; $i < count($matrix); $i++) {\r\n $row = [];\r\n for ($j = 0; $j < count($matrix[$i]); $j++) {\r\n $key = $matrix[0][$j];\r\n $value = $matrix[$i][$j];\r\n $row[$key] = $value;\r\n }\r\n $asMatrix[] = $row;\r\n }\r\n }",
"public function aboutElementArray()\n {\n\n // Declare array\n $data = [\n\n 'a' => [\n 'elem' => 'a',\n 'desc' => 'Creates a link to a URL: a web page, a section within a page, an email address... Also called the anchor element, where the a comes from.',\n 'tag' => '',\n 'att' => [\n 'href',\n 'target',\n 'rel'\n ],\n 'example' => '<a href=\"' . route('splittlogic.html.element', 'a') . '\">' . PHP_EOL\n . ' Anchor Link' . PHP_EOL\n . '</a>'\n ],\n\n 'abbr' => [\n 'elem' => 'abbr',\n 'desc' => 'Defines an abbreviation, and usually includes its full description.',\n 'tag' => '',\n 'att' => [\n 'atitle'\n ],\n 'example' => '<abbr title=\"World Health Organization\">' . PHP_EOL\n . ' WHO' . PHP_EOL\n . '</abbr>'\n ],\n\n 'address' => [\n 'elem' => 'address',\n 'desc' => 'Defines a block for contact information.',\n 'tag' => '',\n 'example' => '<address>' . PHP_EOL\n . ' Infinite Loop, <br>' . PHP_EOL\n . ' Cupertino, CA <br>' . PHP_EOL\n . ' 95014, USA' . PHP_EOL\n . '</address>'\n ],\n\n 'area' => [\n 'elem' => 'area',\n 'desc' => 'Defines an interactive area within a map.',\n 'tag' => 'self',\n 'att' => [\n 'atitle',\n 'shape',\n 'coords',\n 'href',\n 'target'\n ],\n 'save' => 'map',\n 'example' => '<img src=\"/images/world-continents.png\" width=\"320\" height=\"160\" orgwidth=\"320\" orgheight=\"160\" usemap=\"#world-continents\">' . PHP_EOL\n . ' <map name=\"world-continents\">' . PHP_EOL\n . ' <area title=\"North America\" href=\"https://en.wikipedia.org/wiki/North_America\" shape=\"poly\" coords=\"48,89,67,69,77,49,140,0,68,0,6,10,4,31,16,69\">' . PHP_EOL\n . ' <area title=\"South America\" href=\"https://en.wikipedia.org/wiki/South_America\" shape=\"poly\" coords=\"48,88,61,74,119,99,95,160,66,159\">' . PHP_EOL\n . ' <area title=\"Europe\" href=\"https://en.wikipedia.org/wiki/Europe\" shape=\"poly\" coords=\"124,49,145,46,158,50,187,43,198,6,146,1,115,21\">' . PHP_EOL\n . ' <area title=\"Africa\" href=\"https://en.wikipedia.org/wiki/Africa\" shape=\"poly\" coords=\"121,53,140,47,169,51,186,77,196,80,188,137,156,136,138,97,118,86\">' . PHP_EOL\n . ' <area title=\"Asia\" href=\"https://en.wikipedia.org/wiki/Asia\" shape=\"poly\" coords=\"166,50,184,77,201,74,215,91,258,108,263,87,283,74,297,8,192,3,191,29,187,46,170,42\">' . PHP_EOL\n . ' <area title=\"Australia\" href=\"https://en.wikipedia.org/wiki/Australia_(continent)\" shape=\"poly\" coords=\"257,107,263,85,314,89,316,137,294,151,249,132,248,114\">' . PHP_EOL\n . ' </map>'\n ],\n\n 'article' => [\n 'elem' => 'article',\n 'desc' => 'Defines a self-contained block of content that can exist in any context. It can have its own header, footer, sections... Useful for a list of blog posts.',\n 'tag' => '',\n 'example' => [\n '<article>',\n ' <header>',\n ' <h3>',\n ' <a href=\"/my-blog-post\">My blog post</a>',\n ' </h3>',\n ' </header>',\n ' <section>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n ' </section>',\n ' <footer>',\n ' <small>',\n ' Posted on Apr 29',\n ' </small>',\n ' </footer>',\n '</article>'\n ]\n ],\n\n 'aside' => [\n 'elem' => 'aside',\n 'desc' => 'Defines a block of content that is related to the main content. Displayed as a sidebar usually.',\n 'tag' => '',\n 'example' => [\n '<main>',\n ' <h1>My blog post</h1>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n ' <p>etc.</p>',\n '</main>',\n '',\n '<aside>',\n ' <h3>About the author</h3>',\n ' <p>Frontend Designer from Bordeaux, currently working for Improbable in sunny London.</p>',\n '</aside>'\n ]\n ],\n\n 'audio' => [\n 'elem' => 'audio',\n 'desc' => 'Allows to embed an audio clip into a web page.',\n 'tag' => '',\n 'att' => [\n 'src',\n 'volume',\n 'autoplay',\n 'controls',\n 'loop',\n 'muted',\n 'preload'\n ],\n 'example' => '<audio src=\"/audio.mp3\" controls></audio>'\n ],\n\n 'b' => [\n 'elem' => 'b',\n 'desc' => 'Makes an element bold.',\n 'tag' => '',\n 'example' => 'Hello <b>World</b>'\n ],\n\n 'base' => [\n 'elem' => 'base',\n 'desc' => 'Defines the base URL for all relative links of a web page. Should be placed in the <head>.',\n 'tag' => 'self',\n 'att' => [\n 'href',\n 'target'\n ],\n 'save' => 'head',\n 'example' => [\n '<base href=\"' . route('splittlogic.html') . '\">',\n ' <a href=\"/element/base\">The HTML base element</a>',\n '<!-- This will be an absolute link to ' . route('splittlogic.html') . '/element/base -->'\n ]\n ],\n\n 'bdi' => [\n 'elem' => 'bdi',\n 'desc' => 'Allows to display part of a text in the opposite direction. Stands for bidirectional isolation.',\n 'tag' => '',\n 'example' => 'The word <bdi>مرحبا</bdi> means \"Hello\" in Arabic'\n ],\n\n 'bdo' => [\n 'elem' => 'bdo',\n 'desc' => 'Allows to override the direction of text.',\n 'tag' => '',\n 'att' => [\n 'dir'\n ],\n 'example' => 'The word <bdo dir=\"rtl\">Hello</bdo> is \"Hello\" spelled backwards.'\n ],\n\n 'blockquote' => [\n 'elem' => 'blockquote',\n 'desc' => 'Defines a long quotation.',\n 'tag' => '',\n 'att' => [\n 'acite'\n ],\n 'example' => [\n '<blockquote cite=\"https://en.wikiquote.org/wiki/Marie_Curie\">',\n ' Be less curious about people and more curious about ideas.',\n '</blockquote>'\n ]\n ],\n\n 'body' => [\n 'elem' => 'body',\n 'desc' => \"The container for a web page's content. Must be a direct child of <html>, and must be an ancestor of all HTML elements (except where noted).\",\n 'tag' => '',\n 'save' => 'body attributes',\n 'noexample' =>\"If you're only wanting to get the attributes of the body tag, you can call this function in your blade template:\"\n . '<br>'\n . '<br>'\n . $this->htmlchar(\"<body{!! html::getBodyAttributes() !!}>\"),\n 'example' => [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <!-- Document metadata -->',\n ' </head>',\n ' <body>',\n ' <!-- Document content -->',\n ' </body>',\n '</html>'\n ]\n ],\n\n 'br' => [\n 'elem' => 'br',\n 'desc' => 'Defines a line break within a text.',\n 'tag' => 'self',\n 'example' => 'Lorem ipsum dolor sit<br>amet, consectetur adipiscing elit. Donec viverra<br>nec<br>nulla vitae mollis.'\n ],\n\n 'button' => [\n 'elem' => 'button',\n 'desc' => 'Defines a clickable button.',\n 'tag' => '',\n 'att' => [\n 'name',\n 'value',\n 'type',\n 'disabled',\n 'autofocus'\n ],\n 'example' => [\n '<button>',\n ' Submit form',\n '</button>'\n ]\n ],\n\n 'canvas' => [\n 'elem' => 'canvas',\n 'desc' => 'Defines an element where you can draw graphics.',\n 'tag' => '',\n 'att' => [\n 'height',\n 'width'\n ],\n 'example' => [\n '<canvas id=\"myCanvas\">',\n ' Your browser does not support the canvas tag.',\n '</canvas>',\n '',\n '<script>',\n ' var canvas = document.getElementById(\"myCanvas\");',\n ' var ctx = canvas.getContext(\"2d\");',\n ' ctx.fillStyle = \"#FF0000\";',\n ' ctx.fillRect(0, 0, 80, 80);',\n '</script>'\n ]\n ],\n\n 'caption' => [\n 'elem' => 'caption',\n 'desc' => 'Defines the title of a <table>.',\n 'tag' => '',\n 'example' => [\n '<table class=\"table text-light\">',\n ' <caption>The Beatles</caption>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n '</table>'\n ]\n ],\n\n 'cite' => [\n 'elem' => 'cite',\n 'desc' => 'Defines the source of a creative work.',\n 'tag' => '',\n 'example' => 'If you want to learn HTML and CSS, go read <cite>MarkSheet.io</cite>!'\n ],\n\n 'code' => [\n 'elem' => 'code',\n 'desc' => 'Defines a snippet of code within a block of text.',\n 'tag' => '',\n 'example' => \"Type <code>npm install</code> in your terminal to install a project's dependencies.\"\n ],\n\n 'col' => [\n 'elem' => 'col',\n 'desc' => 'Defines a column within a table.',\n 'tag' => 'self',\n 'att' => [\n 'aspan'\n ],\n 'example' => [\n '<table>',\n ' <colgroup>',\n ' <col style=\"background-color: hotpink;\">',\n ' <col span=\"2\" style=\"background-color: blue;\">',\n ' </colgroup>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' <td>1960–1969</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' <td>1960–1970</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' <td>1960–1970</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' <td>1960–1970</td>',\n ' </tr>',\n '</table>'\n ]\n ],\n\n 'colgroup' => [\n 'elem' => 'colgroup',\n 'desc' => 'Defines a group of columns within a table.',\n 'tag' => '',\n 'example' => [\n '<table>',\n ' <colgroup>',\n ' <col style=\"background-color: hotpink;\">',\n ' <col span=\"2\" style=\"background-color: blue;\">',\n ' </colgroup>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' <td>1960–1969</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' <td>1960–1970</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' <td>1960–1970</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' <td>1960–1970</td>',\n ' </tr>',\n '</table>'\n ]\n ],\n\n 'comment' => [\n 'elem' => 'comment',\n 'desc' => 'The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers.',\n 'tag' => 'custom',\n 'elemtag' => '<!-- ... -->',\n 'example' => [\n '<!--This is a comment. Comments are not displayed in the browser-->',\n '',\n '<p>This is a paragraph.</p>'\n ]\n ],\n\n 'css' => [\n 'elem' => 'css',\n 'desc' => 'Creates a link element already formatted for the given css file',\n 'tag' => 'custom',\n 'elemtag' => '<link rel=\"stylesheet\" type=\"text/css\" href=\"value\">',\n 'example' => '<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">',\n 'noexample' => '',\n 'save' => 'head'\n ],\n\n 'data' => [\n 'elem' => 'data',\n 'desc' => 'Defines content linked to machine-readable output.',\n 'tag' => '',\n 'att' => [\n 'value'\n ],\n 'example' => [\n '<p>Computers</p>',\n ' <ul>',\n ' <li>',\n ' <data value=\"499\">Mini PC</data>',\n ' </li>',\n ' <li>',\n ' <data value=\"899\">Small laptop</data>',\n ' </li>',\n ' <li>',\n ' <data value=\"1399\">Large laptop</data>',\n ' </li>',\n ' <li>',\n ' <data value=\"2099\">Desktop PC</data>',\n ' </li>',\n ' </ul>'\n ]\n ],\n\n 'datalist' => [\n 'elem' => 'datalist',\n 'desc' => 'Defines a list of autocomplete options when using a text <input>.',\n 'tag' => '',\n 'example' => [\n '<label>South American countries</label><br>',\n '<input list=\"countries\" placeholder=\"Type a country\">',\n '',\n '<datalist id=\"countries\">',\n ' <option value=\"Argentina\">',\n ' <option value=\"Bolivia\">',\n ' <option value=\"Brazil\">',\n ' <option value=\"Chile\">',\n ' <option value=\"Colombia\">',\n ' <option value=\"Ecuador\">',\n ' <option value=\"Guyana\">',\n ' <option value=\"Paraguay\">',\n ' <option value=\"Peru\">',\n ' <option value=\"Suriname\">',\n ' <option value=\"Uruguay\">',\n ' <option value=\"Venezuela\">',\n '</datalist>'\n ]\n ],\n\n 'dd' => [\n 'elem' => 'dd',\n 'desc' => 'Defines an item in a definition list.',\n 'tag' => '',\n 'save' => 'dl',\n 'example' => [\n '<dl>',\n ' <dt>Web</dt>',\n ' <dd>The part of the Internet that contains websites and web pages</dd>',\n ' <dt>HTML</dt>',\n ' <dd>A markup language for creating web pages</dd>',\n ' <dt>CSS</dt>',\n ' <dd>A technology to make HTML look better</dd>',\n '</dl>'\n ]\n ],\n\n 'del' => [\n 'elem' => 'del',\n 'desc' => 'Defines text that has been deleted.',\n 'tag' => '',\n 'att' => [\n 'acite',\n 'datetime'\n ],\n 'example' => 'To write abbreviations, use the <del cite=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/acronym\">acronym</del> <ins>abbr</ins> HTML element.'\n ],\n\n 'details' => [\n 'elem' => 'details',\n 'desc' => 'Defines a toggable block of content with a summary and additional details.',\n 'tag' => '',\n 'att' => [\n 'aopen'\n ],\n 'example' => [\n '<details>',\n ' <summary>Read more</summary>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '</details>'\n ]\n ],\n\n 'dfn' => [\n 'elem' => 'dfn',\n 'desc' => 'Defines where a term is defined within a web page.',\n 'tag' => '',\n 'example' => 'The <dfn>World Wide Web</dfn> is the part of the Internet that uses the HTTP protocol.'\n ],\n\n 'dialog' => [\n 'elem' => 'dialog',\n 'desc' => 'Defines a dialog box that can be opened and closed with JavaScript.',\n 'tag' => '',\n 'att' => [\n 'open'\n ],\n 'example' => [\n '<dialog open>',\n ' This is a dialog box!',\n '</dialog>'\n ]\n ],\n\n 'div' => [\n 'elem' => 'div',\n 'desc' => 'Defines a generic block of content, that does not carry any semantic value. Used for layout elements like containers.',\n 'tag' => '',\n 'example' => [\n '<h1>The div element</h1>',\n '',\n '<div class=\"myDiv\">',\n ' <h2>This is a heading in a div element</h2>',\n ' <p>This is some text in a div element.</p>',\n '</div>',\n '',\n '<p>This is some text outside the div element.</p>',\n '',\n '<style>',\n ' .myDiv {',\n ' border: 5px outset red;',\n ' background-color: lightblue;',\n ' text-align: center;',\n ' }',\n '</style>'\n ]\n ],\n\n 'dl' => [\n 'elem' => 'dl',\n 'desc' => 'Defines a definition list.',\n 'tag' => '',\n 'load' => [\n 'dd',\n 'dt'\n ],\n 'example' => [\n '<dl>',\n ' <dt>Web</dt>',\n ' <dd>The part of the Internet that contains websites and web pages</dd>',\n ' <dt>HTML</dt>',\n ' <dd>A markup language for creating web pages</dd>',\n ' <dt>CSS</dt>',\n ' <dd>A technology to make HTML look better</dd>',\n '</dl>'\n ]\n ],\n\n 'dt' => [\n 'elem' => 'dt',\n 'desc' => 'Defines a definition term.',\n 'tag' => '',\n 'save' => 'dl',\n 'example' => [\n '<dl>',\n ' <dt>Web</dt>',\n ' <dd>The part of the Internet that contains websites and web pages</dd>',\n ' <dt>HTML</dt>',\n ' <dd>A markup language for creating web pages</dd>',\n ' <dt>CSS</dt>',\n ' <dd>A technology to make HTML look better</dd>',\n '</dl>'\n ]\n ],\n\n 'em' => [\n 'elem' => 'em',\n 'desc' => 'Defines emphasis on text. Is usually rendered as italic text.',\n 'tag' => '',\n 'example' => 'HTML should only be used to write <em>content</em>, and keep CSS for <em>styling</em> the web page.'\n ],\n\n 'embed' => [\n 'elem' => 'embed',\n 'desc' => 'Defines a container for external application.',\n 'tag' => 'self',\n 'att' => [\n 'src',\n 'type',\n 'height',\n 'width'\n ],\n 'example' => '<embed src=\"https://www.youtube.com/embed/kmk43_2dtn0\" width=\"640\" height=\"480\">'\n ],\n\n 'fieldset' => [\n 'elem' => 'fieldset',\n 'desc' => 'Defines a group of controls within a form.',\n 'tag' => '',\n 'att' => [\n 'disabled'\n ],\n 'example' => [\n '<form action=\"/subscribe\" method=\"post\">',\n ' <fieldset>',\n ' <legend>Subscribe to the Newsletter</legend>',\n ' <input type=\"email\" name=\"email\">',\n ' <button>Ok</button>',\n ' </fieldset>',\n '</form>'\n ]\n ],\n\n 'figcaption' => [\n 'elem' => 'figcaption',\n 'desc' => 'Defines the caption of a <figure>.',\n 'tag' => '',\n 'example' => [\n '<figure>',\n ' <img src=\"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png\" alt=\"HTML Reference logo\">',\n ' <figcaption>The HTML Reference logo</figcaption>',\n '</figure>'\n ]\n ],\n\n 'figure' => [\n 'elem' => 'figure',\n 'desc' => 'Defines a single self-contained element, usually an image.',\n 'tag' => '',\n 'example' => [\n '<figure>',\n ' <img src=\"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png\" alt=\"HTML Reference logo\">',\n ' <figcaption>The HTML Reference logo</figcaption>',\n '</figure>'\n ]\n ],\n\n 'footer' => [\n 'elem' => 'footer',\n 'desc' => 'Defines the footer of a web page or section.',\n 'tag' => '',\n 'example' => [\n '<footer>',\n ' HTML Reference - A free reference to all HTML5 elements and attributes',\n '</footer>'\n ]\n ],\n\n 'form' => [\n 'elem' => 'form',\n 'desc' => 'Defines an interactive form with controls.',\n 'tag' => '',\n 'att' => [\n 'action',\n 'method',\n 'name',\n 'autocomplete',\n 'target',\n 'enctype',\n 'novalidate'\n ],\n 'example' => [\n '<form action=\"/signup\" method=\"post\">',\n ' <p>',\n ' <label>Title</label><br>',\n ' <label>',\n ' <input type=\"radio\" name=\"title\" value=\"mr\">',\n ' Mr',\n ' </label>',\n ' <label>',\n ' <input type=\"radio\" name=\"title\" value=\"mrs\">',\n ' Mrs',\n ' </label>',\n ' <label>',\n ' <input type=\"radio\" name=\"title\" value=\"miss\">',\n ' Miss',\n ' </label>',\n ' </p>',\n ' <p>',\n ' <label>First name</label><br>',\n ' <input type=\"text\" name=\"first_name\">',\n ' </p>',\n ' <p>',\n ' <label>Last name</label><br>',\n ' <input type=\"text\" name=\"last_name\">',\n ' </p>',\n ' <p>',\n ' <label>Email</label><br>',\n ' <input type=\"email\" name=\"email\" required>',\n ' </p>',\n ' <p>',\n ' <label>Phone number</label><br>',\n ' <input type=\"tel\" name=\"phone\">',\n ' </p>',\n ' <p>',\n ' <label>Password</label><br>',\n ' <input type=\"password\" name=\"password\">',\n ' </p>',\n ' <p>',\n ' <label>Country</label><br>',\n ' <select>',\n ' <option>China</option>',\n ' <option>India</option>',\n ' <option>United States</option>',\n ' <option>Indonesia</option>',\n ' <option>Brazil</option>',\n ' </select>',\n ' </p>',\n ' <p>',\n ' <label>',\n ' <input type=\"checkbox\" value=\"terms\">',\n ' I agree to the <a href=\"/terms\">terms and conditions</a>',\n ' </label>',\n ' </p>',\n ' <p>',\n ' <button>Sign up</button>',\n ' <button type=\"reset\">Reset form</button>',\n ' </p>',\n '</form>'\n ]\n ],\n\n 'h1' => [\n 'elem' => 'h1',\n 'desc' => 'Defines a section heading of level one: the highest level.',\n 'tag' => '',\n 'example' => '<h1>My blog post</h1>'\n ],\n\n 'h2' => [\n 'elem' => 'h2',\n 'desc' => 'Defines a section heading of level two.',\n 'tag' => '',\n 'example' => [\n '<h1>My blog post</h1>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h2>Introduction</h2>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'h3' => [\n 'elem' => 'h3',\n 'desc' => 'Defines a section heading of level three.',\n 'tag' => '',\n 'example' => [\n '<h1>My blog post</h1>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h2>Introduction</h2>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h3>Example</h3>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'h4' => [\n 'elem' => 'h4',\n 'desc' => 'Defines a section heading of level four.',\n 'tag' => '',\n 'example' => [\n '<h1>My blog post</h1>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h2>Introduction</h2>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h3>Example</h3>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h4>Why</h4>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'h5' => [\n 'elem' => 'h5',\n 'desc' => 'Defines a section heading of level five.',\n 'tag' => '',\n 'example' => [\n '<h1>My blog post</h1>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h2>Introduction</h2>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h3>Example</h3>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h4>Why</h4>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h5>Reason</h5>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'h6' => [\n 'elem' => 'h6',\n 'desc' => 'Defines a section heading of level six: the lowest level.',\n 'tag' => '',\n 'example' => [\n '<h1>My blog post</h1>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h2>Introduction</h2>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h3>Example</h3>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h4>Why</h4>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h5>Reason</h5>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<h6>Focus</h6>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'head' => [\n 'elem' => 'head',\n 'desc' => \"Defines a container for a web page's metadata.\",\n 'tag' => '',\n 'load' => [\n 'base',\n 'css',\n 'js',\n 'link',\n 'meta',\n 'script',\n 'style'\n ],\n 'noexample' =>\"You can call this function in your blade template:\"\n . '<br>'\n . '<br>'\n . $this->htmlchar(\"{!! html::head() !!}\"),\n 'example' => [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <!-- Document metadata -->',\n ' </head>',\n ' <body>',\n ' <!-- Document content -->',\n ' </body>',\n '</html>'\n ]\n ],\n\n 'header' => [\n 'elem' => 'header',\n 'desc' => 'Defines the header of a web page or section.',\n 'tag' => '',\n 'example' => [\n '<header>',\n ' <h1>HTML Reference</h1>',\n ' <nav>',\n ' <a>Home</a>',\n ' <a>About</a>',\n ' <a>Contact</a>',\n ' </nav>',\n '</header>'\n ]\n ],\n\n 'hgroup' => [\n 'elem' => 'hgroup',\n 'desc' => 'Defines the heading of a section. It can only contain heading levels: <h1> <h2> <h3> <h4> <h5> <h6>',\n 'tag' => '',\n 'example' => [\n '<hgroup>',\n ' <h1>HTML Reference</h1>',\n ' <h2>A free guide to all HTML elements and attributes.</h2>',\n '</hgroup>'\n ]\n ],\n\n 'hr' => [\n 'elem' => 'hr',\n 'desc' => 'Defines a semantic break between blocks of text. It is often represented as a horizontal rule.',\n 'tag' => '',\n 'example' => [\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '',\n '<hr>',\n '',\n '<h2>Next section</h2>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'i' => [\n 'elem' => 'i',\n 'desc' => 'Makes an element italic.',\n 'tag' => '',\n 'example' => 'Hello <i>World</i>'\n ],\n\n 'iframe' => [\n 'elem' => 'iframe',\n 'desc' => 'Defines a container for a nested browsing context: you can include a web page within another web page.',\n 'tag' => '',\n 'att' => [\n 'src',\n 'allowfullscreen',\n 'height',\n 'width'\n ],\n 'example' => [\n '<iframe src=\"https://w3.org\">',\n ' Fallback text for non-supported browsers',\n '</iframe>'\n ]\n ],\n\n 'img' => [\n 'elem' => 'img',\n 'desc' => 'Defines an image inserted in the web page.',\n 'tag' => 'self',\n 'att' => [\n 'src',\n 'alt',\n 'srcset',\n 'sizes',\n 'height',\n 'width'\n ],\n 'example' => '<img src=\"https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png\" alt=\"Google Logo\">'\n ],\n\n 'input' => [\n 'elem' => 'input',\n 'desc' => 'Defines an interactive control within a web form.',\n 'tag' => 'self',\n 'att' => [\n 'type',\n 'name',\n 'placeholder',\n 'required',\n 'disabled'\n ],\n 'example' => '<input type=\"text\" name=\"first_name\" placeholder=\"e.g. Alex\">'\n ],\n\n 'ins' => [\n 'elem' => 'ins',\n 'desc' => 'Defines text that has been inserted.',\n 'tag' => '',\n 'att' => [\n 'cite',\n 'datetime'\n ],\n 'example' => 'To write abbreviations, use the <del cite=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/acronym\">acronym</del> <ins>abbr</ins> HTML element.'\n ],\n\n 'js' => [\n 'elem' => 'script',\n 'desc' => 'Creates a script element already formatted for the given js file',\n 'tag' => 'custom',\n 'elemtag' => '<script src=\"script.js\" type=\"text/javascript\"></script>',\n 'save' => 'head',\n 'example' => '<script src=\"script.js\" type=\"text/javascript\"></script>',\n 'noexample' => ''\n ],\n\n 'kbd' => [\n 'elem' => 'kbd',\n 'desc' => 'Defines a snippet of user input.',\n 'tag' => '',\n 'example' => 'To save, press <kbd>Ctrl + S</kbd>.'\n ],\n\n 'label' => [\n 'elem' => 'label',\n 'desc' => 'Defines a label for a form control.',\n 'tag' => '',\n 'att' => [\n 'for'\n ],\n 'example' => [\n '<label for=\"first_name\">First name</label>',\n ' <br>',\n '<input type=\"text\" name=\"first_name\" id=\"first_name\">',\n '<br>',\n '<br>',\n '<label>',\n ' <input type=\"checkbox\" name=\"terms\">',\n ' I agree to the terms',\n '</label>',\n '<br>',\n '<br>',\n '<p>Subscribe to the newsletter?</p>',\n '<label>',\n ' <input type=\"radio\" name=\"newsletter\" value=\"yes\"> Yes',\n '</label>',\n '<label>',\n ' <input type=\"radio\" name=\"newsletter\" value=\"no\"> No',\n '</label>'\n ]\n ],\n\n 'legend' => [\n 'elem' => 'legend',\n 'desc' => \"Defines a caption for a parent's content.\",\n 'tag' => '',\n 'example' => [\n '<form action=\"/subscribe\" method=\"post\">',\n ' <fieldset>',\n ' <legend>Subscribe to the Newsletter</legend>',\n ' <input type=\"email\" name=\"email\">',\n ' <button>Ok</button>',\n ' </fieldset>',\n '</form>'\n ]\n ],\n\n 'li' => [\n 'elem' => 'li',\n 'desc' => 'Defines a list item within an ordered list <ol> or unordered list <ul>.',\n 'tag' => '',\n 'save' => [\n 'ol',\n 'ul'\n ],\n 'example' => [\n '<ol>',\n ' <li>Step one</li>',\n ' <li>Step two</li>',\n ' <li>????</li>',\n ' <li>PROFIT!!!</li>',\n '</ol>',\n '<br>',\n '<p>My shopping list:</p>',\n '<ul>',\n ' <li>Milk</li>',\n ' <li>Bread</li>',\n ' <li>Chocolate</li>',\n ' <li>More chocolate</li>',\n '</ul>'\n ]\n ],\n\n 'link' => [\n 'elem' => 'link',\n 'desc' => 'Defines a link between the current web page and an external link or resource.',\n 'tag' => 'self',\n 'att' => [\n 'href',\n 'rel',\n 'type'\n ],\n 'save' => 'head',\n 'example' => '<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">',\n 'noexample' => ''\n ],\n\n 'main' => [\n 'elem' => 'main',\n 'desc' => 'Defines the main content of a web page. Can be displayed with a sidebar.',\n 'tag' => '',\n 'example' => [\n '<main>',\n ' <h1>My blog post</h1>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n ' <p>etc.</p>',\n '</main>',\n '',\n '<aside>',\n ' <h3>About the author</h3>',\n ' <p>Frontend Designer from Bordeaux, currently working for Improbable in sunny London.</p>',\n '</aside>'\n ]\n ],\n\n 'map' => [\n 'elem' => 'map',\n 'desc' => 'Defines an interactive map over an image.',\n 'tag' => '',\n 'att' => [\n 'name'\n ],\n 'load' => 'area',\n 'example' => '<img src=\"/images/world-continents.png\" width=\"320\" height=\"160\" orgwidth=\"320\" orgheight=\"160\" usemap=\"#world-continents\">' . PHP_EOL\n . ' <map name=\"world-continents\">' . PHP_EOL\n . ' <area title=\"North America\" href=\"https://en.wikipedia.org/wiki/North_America\" shape=\"poly\" coords=\"48,89,67,69,77,49,140,0,68,0,6,10,4,31,16,69\">' . PHP_EOL\n . ' <area title=\"South America\" href=\"https://en.wikipedia.org/wiki/South_America\" shape=\"poly\" coords=\"48,88,61,74,119,99,95,160,66,159\">' . PHP_EOL\n . ' <area title=\"Europe\" href=\"https://en.wikipedia.org/wiki/Europe\" shape=\"poly\" coords=\"124,49,145,46,158,50,187,43,198,6,146,1,115,21\">' . PHP_EOL\n . ' <area title=\"Africa\" href=\"https://en.wikipedia.org/wiki/Africa\" shape=\"poly\" coords=\"121,53,140,47,169,51,186,77,196,80,188,137,156,136,138,97,118,86\">' . PHP_EOL\n . ' <area title=\"Asia\" href=\"https://en.wikipedia.org/wiki/Asia\" shape=\"poly\" coords=\"166,50,184,77,201,74,215,91,258,108,263,87,283,74,297,8,192,3,191,29,187,46,170,42\">' . PHP_EOL\n . ' <area title=\"Australia\" href=\"https://en.wikipedia.org/wiki/Australia_(continent)\" shape=\"poly\" coords=\"257,107,263,85,314,89,316,137,294,151,249,132,248,114\">' . PHP_EOL\n . ' </map>'\n ],\n\n 'mark' => [\n 'elem' => 'mark',\n 'desc' => 'Defines highlighted text.',\n 'tag' => '',\n 'example' => 'We use HTML5 to write <mark>content</mark> on the Web.'\n ],\n\n 'meta' => [\n 'elem' => 'meta',\n 'desc' => 'Defines metadata attached to a web page.',\n 'tag' => 'self',\n 'att' => [\n 'charset',\n 'http-equiv',\n 'name',\n 'content',\n ],\n 'save' => 'head',\n 'noexample' => '',\n 'example' => [\n '<meta charset=\"UTF-8\">',\n '<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">',\n '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">',\n '<meta name=\"theme-color\" content=\"#ffffff\">',\n '',\n '<!-- Refresh the page every 5 seconds -->',\n '<meta http-equiv=\"refresh\" content=\"5\">',\n '',\n '<!-- Redirect instantly to https://github.com/splittlogic -->',\n '<meta http-equiv=\"refresh\" content=\"0; url=https://github.com/splittlogic\">'\n ]\n ],\n\n 'meter' => [\n 'elem' => 'meter',\n 'desc' => 'Defines a horizontal meter.',\n 'tag' => '',\n 'att' => [\n 'value',\n 'max',\n 'min',\n 'low',\n 'high'\n ],\n 'example' => [\n '<meter min=\"0\" low=\"16\" value=\"71\" high=\"92\" max=\"100\">Alex</meter><br>',\n '<meter min=\"0\" low=\"16\" value=\"16\" high=\"92\" max=\"100\">Brandon</meter><br>',\n '<meter min=\"0\" low=\"16\" value=\"40\" high=\"92\" max=\"100\">Charlotte</meter><br>',\n '<meter min=\"0\" low=\"16\" value=\"92\" high=\"92\" max=\"100\">Sam</meter>'\n ]\n ],\n\n 'nav' => [\n 'elem' => 'nav',\n 'desc' => 'Defines a section with navigation links.',\n 'tag' => '',\n 'example' => [\n '<nav>',\n ' <a href=\"/\">Home</a>',\n ' <a href=\"/about\">About</a>',\n ' <a href=\"/contact\">Contact</a>',\n '</nav>'\n ]\n ],\n\n 'noframes' => [\n 'elem' => 'noframes',\n 'desc' => 'Defines content displayed when the browser does not support frames.',\n 'tag' => '',\n 'example' => [\n '<frameset cols=\"50%, 50%\">',\n ' <frame src=\"https://github.com/splittlogic\">',\n ' <frame src=\"https://github.com/splittlogic/html\">',\n ' <noframes>This browser does not support framesets.</noframes>',\n '</frameset>'\n ]\n ],\n\n 'noscript' => [\n 'elem' => 'noscript',\n 'desc' => 'Defines content displayed when the browser does not have JavaScript enabled.',\n 'tag' => '',\n 'noexample' => '',\n 'example' => '<noscript>Please enable JavaScript.</noscript>'\n ],\n\n 'object' => [\n 'elem' => 'object',\n 'desc' => 'Defines a container for external resource.',\n 'tag' => '',\n 'att' => [\n 'data',\n 'type',\n 'height',\n 'width'\n ],\n 'example' => [\n '<object type=\"application/x-shockwave-flash\" data=\"golf.swf\" width=\"800\" height=\"360\">',\n ' <param name=\"movie\" value=\"golf.swf\">',\n ' <param name=\"wmode\" value=\"transparent\">',\n ' <p>You need to enable Flash to view this content.</p>',\n '</object>'\n ]\n ],\n\n 'ol' => [\n 'elem' => 'ol',\n 'desc' => 'Defines an ordered list.',\n 'tag' => '',\n 'att' => [\n 'type',\n 'start',\n 'reversed'\n ],\n 'load' => 'li',\n 'example' => [\n '<ol>',\n ' <li>Step one</li>',\n ' <li>Step two</li>',\n ' <li>????</li>',\n ' <li>PROFIT!!!</li>',\n '</ol>'\n ]\n ],\n\n 'optgroup' => [\n 'elem' => 'optgroup',\n 'desc' => 'Defines a group of <option> elements.',\n 'tag' => '',\n 'att' => [\n 'label',\n 'disabled'\n ],\n 'load' => 'option',\n 'example' => [\n '<select>',\n ' <optgroup label=\"South America\">',\n ' <option>Uruguay</option>',\n ' <option>Brazil</option>',\n ' <option>Argentina</option>',\n ' </optgroup>',\n ' <optgroup label=\"Europe\">',\n ' <option>Italy</option>',\n ' <option>Germany</option>',\n ' <option>England</option>',\n ' <option>France</option>',\n ' <option>Spain</option>',\n ' </optgroup>',\n '</select>'\n ]\n ],\n\n 'option' => [\n 'elem' => 'option',\n 'desc' => 'Defines an option within a <select> dropdown.',\n 'tag' => '',\n 'att' => [\n 'value',\n 'label',\n 'disabled',\n 'selected'\n ],\n 'save' => [\n 'datalist',\n 'optgroup',\n 'select'\n ],\n 'example' => [\n '<select name=\"country\">',\n ' <option value=\"Argentina\">Argentina</option>',\n ' <option value=\"Bolivia\">Bolivia</option>',\n ' <option value=\"Brazil\">Brazil</option>',\n ' <option value=\"Chile\">Chile</option>',\n ' <option value=\"Colombia\">Colombia</option>',\n ' <option value=\"Ecuador\">Ecuador</option>',\n ' <option value=\"Guyana\">Guyana</option>',\n ' <option value=\"Paraguay\">Paraguay</option>',\n ' <option value=\"Peru\">Peru</option>',\n ' <option value=\"Suriname\">Suriname</option>',\n ' <option value=\"Uruguay\">Uruguay</option>',\n ' <option value=\"Venezuela\">Venezuela</option>',\n '</select>'\n ]\n ],\n\n 'output' => [\n 'elem' => 'output',\n 'desc' => 'Defines the result of a calculation or of user action.',\n 'tag' => '',\n 'att' => [\n 'name'\n ],\n 'example' => [\n '<form oninput=\"sum.value = parseInt(a.value) + parseInt(b.value)\">',\n ' <input type=\"number\" name=\"a\" value=\"4\">',\n ' +',\n ' <input type=\"number\" name=\"b\" value=\"7\">',\n ' =',\n ' <output name=\"sum\">11</output>',\n '</form>'\n ]\n ],\n\n 'p' => [\n 'elem' => 'p',\n 'desc' => 'Defines a simple paragraph of text.',\n 'tag' => '',\n 'example' => [\n '<p>Hello World</p>',\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>'\n ]\n ],\n\n 'param' => [\n 'elem' => 'param',\n 'desc' => 'Defines a parameter for an <object> element.',\n 'tag' => 'self',\n 'att' => [\n 'name',\n 'value'\n ],\n 'example' => [\n '<object type=\"application/x-shockwave-flash\" data=\"golf.swf\" width=\"800\" height=\"360\">',\n ' <param name=\"movie\" value=\"golf.swf\">',\n ' <param name=\"wmode\" value=\"transparent\">',\n ' <p>You need to enable Flash to view this content.</p>',\n '</object>'\n ]\n ],\n\n 'picture' => [\n 'elem' => 'picture',\n 'desc' => 'Defines a container for sources of an <img> element.',\n 'tag' => '',\n 'example' => [\n '<picture>',\n ' <source ',\n ' media=\"(min-width: 800px)\"',\n ' srcset=\"https://htmlreference.io/images/sunset-360.jpg 360w,',\n ' https://htmlreference.io/images/sunset-720.jpg 720w,',\n ' https://htmlreference.io/images/sunset-1440.jpg 1440w\"',\n ' sizes=\"33.3vw\">',\n ' <source ',\n ' srcset=\"https://htmlreference.io/images/sunset-720.jpg 2x,',\n ' https://htmlreference.io/images/sunset-360.jpg 1x\">',\n ' <img src=\"https://htmlreference.io/images/sunset.jpg\" alt=\"Picture of a Ha Long Bay sunset\">',\n '</picture>'\n ]\n ],\n\n 'pre' => [\n 'elem' => 'pre',\n 'desc' => 'Defines preformatted text.',\n 'tag' => '',\n 'example' => [\n '<pre><!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <title>Hello World</title>',\n ' </head>',\n ' <body>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n ' </body>',\n '</html></pre>'\n ]\n ],\n\n 'progress' => [\n 'elem' => 'progress',\n 'desc' => 'Defines a progress bar.',\n 'tag' => '',\n 'att' => [\n 'value',\n 'max'\n ],\n 'example' => [\n '<progress value=\"71\" max=\"100\">Alex</progress><br>',\n '<progress value=\"16\" max=\"100\">Brandon</progress><br>',\n '<progress value=\"40\" max=\"100\">Charlotte</progress><br>',\n '<progress value=\"92\" max=\"100\">Sam</progress>'\n ]\n ],\n\n 'q' => [\n 'elem' => 'q',\n 'desc' => 'Defines a short quotation.',\n 'tag' => '',\n 'att' => [\n 'acite'\n ],\n 'example' => \"He looks around and says \" . '<q cite=\"https://en.wikiquote.org/wiki/The_Terminator\">' . \"I'll be back</q>.\"\n ],\n\n 'rp' => [\n 'elem' => 'rp',\n 'desc' => 'Defines content displayed when the browser does not support the <ruby> element.',\n 'tag' => '',\n 'example' => [\n '<ruby>',\n ' 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp>',\n ' 字 <rp>(</rp><rt>ji</rt><rp>)</rp>',\n '</ruby>'\n ]\n ],\n\n 'rt' => [\n 'elem' => 'rt',\n 'desc' => 'Defines the pronunciation of ruby annotations.',\n 'tag' => '',\n 'example' => [\n '<ruby>',\n ' 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp>',\n ' 字 <rp>(</rp><rt>ji</rt><rp>)</rp>',\n '</ruby>'\n ]\n ],\n\n 'rtc' => [\n 'elem' => 'rtc',\n 'desc' => 'Defines a text container within ruby annotations.',\n 'tag' => '',\n 'example' => [\n '<ruby>',\n ' <rb>旧</rb>',\n ' <rb>金</rb>',\n ' <rb>山</rb>',\n ' <rt>jiù</rt>',\n ' <rt>jīn</rt>',\n ' <rt>shān</rt>',\n ' <rtc>San Francisco</rtc>',\n '</ruby>'\n ]\n ],\n\n 'ruby' => [\n 'elem' => 'ruby',\n 'desc' => 'Defines a ruby annotation to show the pronunciation of East Asian characters.',\n 'tag' => '',\n 'example' => [\n '<ruby>',\n ' 漢 <rp>(</rp><rt>Kan</rt><rp>)</rp>',\n ' 字 <rp>(</rp><rt>ji</rt><rp>)</rp>',\n '</ruby>'\n ]\n ],\n\n 's' => [\n 'elem' => 's',\n 'desc' => 'Defines strikethrough text.',\n 'tag' => '',\n 'example' => 'Alex is <s>37</s> 38 years old.'\n ],\n\n 'samp' => [\n 'elem' => 'samp',\n 'desc' => 'Defines a sample output from a computer program.',\n 'tag' => '',\n 'example' => 'I entered <code>git push</code> and the terminal printed out <samp>Everything up-to-date</samp>.'\n ],\n\n 'script' => [\n 'elem' => 'script',\n 'desc' => 'Defines a container for an external script.',\n 'tag' => '',\n 'att' => [\n 'src',\n 'type',\n 'async'\n ],\n 'save' => 'head',\n 'noexample' => '',\n 'example' => [\n '<script src=\"https://htmlreference.io/javascript/my-scripts.js\"></script>',\n '',\n '<script type=\"text/javascript\">',\n \" console.log('Hello World');\",\n '</script>'\n ]\n ],\n\n 'section' => [\n 'elem' => 'section',\n 'desc' => 'Defines a section within a web page.',\n 'tag' => '',\n 'example' => [\n '<section>',\n ' <h2>Section title</h2>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '</section>'\n ]\n ],\n\n 'select' => [\n 'elem' => 'select',\n 'desc' => 'Defines a select dropdown with different <option> elements.',\n 'tag' => '',\n 'att' => [\n 'name',\n 'size',\n 'multiple',\n 'autofocus',\n 'disabled',\n 'required'\n ],\n 'load' => 'option',\n 'example' => [\n '<select name=\"country\">',\n ' <option value=\"Argentina\">Argentina</option>',\n ' <option value=\"Bolivia\">Bolivia</option>',\n ' <option value=\"Brazil\">Brazil</option>',\n ' <option value=\"Chile\">Chile</option>',\n ' <option value=\"Colombia\">Colombia</option>',\n ' <option value=\"Ecuador\">Ecuador</option>',\n ' <option value=\"Guyana\">Guyana</option>',\n ' <option value=\"Paraguay\">Paraguay</option>',\n ' <option value=\"Peru\">Peru</option>',\n ' <option value=\"Suriname\">Suriname</option>',\n ' <option value=\"Uruguay\">Uruguay</option>',\n ' <option value=\"Venezuela\">Venezuela</option>',\n '</select>'\n ]\n ],\n\n 'small' => [\n 'elem' => 'small',\n 'desc' => 'Defines small print, for less important content.',\n 'tag' => '',\n 'example' => [\n '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '<small>Posted on <time datetime=\"2017-04-29T19:00\">Apr 29</time> in <a href=\"/category/code\">Code</a></small>'\n ]\n ],\n\n 'source' => [\n 'elem' => 'source',\n 'desc' => 'Defines a source for an <audio>, <video>, or <picture> element.',\n 'tag' => 'self',\n 'att' => [\n 'src',\n 'srcset',\n 'sizes',\n 'type',\n 'media'\n ],\n 'example' => [\n '<picture>',\n ' <source ',\n ' media=\"(min-width: 800px)\"',\n ' srcset=\"https://htmlreference.io/images/sunset-360.jpg 360w,',\n ' https://htmlreference.io/images/sunset-720.jpg 720w,',\n ' https://htmlreference.io/images/sunset-1440.jpg 1440w\"',\n ' sizes=\"33.3vw\">',\n ' <source ',\n ' srcset=\"https://htmlreference.io/images/sunset-720.jpg 2x,',\n ' https://htmlreference.io/images/sunset-360.jpg 1x\">',\n ' <img src=\"https://htmlreference.io/images/sunset.jpg\" alt=\"Picture of a Ha Long Bay sunset\">',\n '</picture>'\n ]\n ],\n\n 'span' => [\n 'elem' => 'span',\n 'desc' => 'Defines a generic inline container of content, that does not carry any semantic value.',\n 'tag' => '',\n 'example' => '<p>My mother has <span style=\"color:green\">green</span> eyes.</p>'\n ],\n\n 'strong' => [\n 'elem' => 'strong',\n 'desc' => 'Defines strong importance on text.',\n 'tag' => '',\n 'example' => 'HTML should only be used to write <strong>content</strong>, and keep CSS for <strong>styling</strong> the web page.'\n ],\n\n 'style' => [\n 'elem' => 'style',\n 'desc' => 'Defines a container to add CSS within a web page.',\n 'tag' => '',\n 'att' => [\n 'type'\n ],\n 'save' => 'head',\n 'noexample' => '',\n 'example' => [\n '<style type=\"text/css\">',\n ' .important {',\n ' color: red;',\n ' }',\n '</style>'\n ]\n ],\n\n 'sub' => [\n 'elem' => 'sub',\n 'desc' => 'Defines text that should be displayed lower.',\n 'tag' => '',\n 'example' => 'The formula of carbon dioxide is CO<sub>2</sub>.'\n ],\n\n 'summary' => [\n 'elem' => 'summary',\n 'desc' => 'Defines the summary of a <details> element.',\n 'tag' => '',\n 'example' => [\n '<details>',\n ' <summary>Read more</summary>',\n ' <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.</p>',\n '</details>'\n ]\n ],\n\n 'sup' => [\n 'elem' => 'sup',\n 'desc' => 'Defines text that should be displayed higher.',\n 'tag' => '',\n 'example' => 'The \"power of two\" is 2<sup>n</sup> where n is an integer.'\n ],\n\n 'table' => [\n 'elem' => 'table',\n 'desc' => 'Defines a container for tabular data.',\n 'tag' => '',\n 'load' => [\n 'thead',\n 'tbody',\n 'tfoot',\n 'tr'\n ],\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'tbody' => [\n 'elem' => 'tbody',\n 'desc' => 'Defines a group of table rows <tr>.',\n 'tag' => '',\n 'save' => 'table',\n 'load' => 'tr',\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'td' => [\n 'elem' => 'td',\n 'desc' => 'Defines a table cell. Must be a direct child of a <tr>.',\n 'tag' => '',\n 'att' => [\n 'colspan',\n 'rowspan'\n ],\n 'save' => 'tr',\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'textarea' => [\n 'elem' => 'textarea',\n 'desc' => 'Defines a multi-line text control within a web form.',\n 'tag' => '',\n 'att' => [\n 'name',\n 'autocomplete',\n 'minlength',\n 'maxlength',\n 'placeholder',\n 'cols',\n 'rows',\n 'wrap',\n 'disabled',\n 'required',\n 'autofocus',\n 'readonly',\n 'spellcheck'\n ],\n 'example' => [\n '<label for=\"textareaExample\">Textarea label:</label>',\n '<br>',\n '<textarea id=\"textareaExample\" name=\"textareaExample\" rows=\"4\" cols=\"50\">',\n ' Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra nec nulla vitae mollis.',\n '</textarea>'\n ]\n ],\n\n 'tfoot' => [\n 'elem' => 'tfoot',\n 'desc' => 'Defines a group of table rows <tr> at the end of a <table>.',\n 'tag' => '',\n 'save' => 'table',\n 'load' => 'tr',\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'th' => [\n 'elem' => 'th',\n 'desc' => 'Defines a table header. Must be a direct child of a <tr>.',\n 'tag' => '',\n 'att' => [\n 'colspan',\n 'rowspan'\n ],\n 'save' => 'tr',\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'thead' => [\n 'elem' => 'thead',\n 'desc' => 'Defines a group of table rows <tr> at the start of a <table>.',\n 'tag' => '',\n 'save' => 'table',\n 'load' => 'tr',\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'time' => [\n 'elem' => 'time',\n 'desc' => 'Defines a time on a 24h clock.',\n 'tag' => '',\n 'att' => [\n 'datetime'\n ],\n 'example' => 'The game starts at <time datetime=\"2017-04-29T19:00\">19:00</time>.'\n ],\n\n 'title' => [\n 'elem' => 'title',\n 'desc' => 'Defines the title of the web page, displayed on the browser tab.',\n 'tag' => '',\n 'noexample' => '',\n 'example' => [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <!-- Document metadata -->',\n ' <title>',\n ' Splittlogic/html',\n ' </title>',\n ' </head>',\n ' <body>',\n ' <!-- Document content -->',\n ' </body>',\n '</html>'\n ]\n ],\n\n 'tr' => [\n 'elem' => 'tr',\n 'desc' => 'Defines a table row.',\n 'tag' => '',\n 'save' => [\n 'table',\n 'tbody',\n 'tfoot',\n 'thead'\n ],\n 'load' => [\n 'td',\n 'th'\n ],\n 'example' => [\n '<table class=\"table text-light\">',\n ' <thead>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </thead>',\n ' <tfoot>',\n ' <tr>',\n ' <th>Name</th>',\n ' <th>Instrument</th>',\n ' </tr>',\n ' </tfoot>',\n ' <tbody>',\n ' <tr>',\n ' <td>John Lennon</td>',\n ' <td>Rhythm Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Paul McCartney</td>',\n ' <td>Bass</td>',\n ' </tr>',\n ' <tr>',\n ' <td>George Harrison</td>',\n ' <td>Lead Guitar</td>',\n ' </tr>',\n ' <tr>',\n ' <td>Ringo Starr</td>',\n ' <td>Drums</td>',\n ' </tr>',\n ' </tbody>',\n '</table>'\n ]\n ],\n\n 'track' => [\n 'elem' => 'track',\n 'desc' => 'Defines text tracks (like subtitles) for <audio> and <video> elements.',\n 'tag' => 'self',\n 'example' => [\n '<video width=\"320\" height=\"240\" controls>',\n ' <source src=\"forrest_gump.mp4\" type=\"video/mp4\">',\n ' <source src=\"forrest_gump.ogg\" type=\"video/ogg\">',\n ' <track src=\"fgsubtitles_en.vtt\" kind=\"subtitles\" srclang=\"en\" label=\"English\">',\n ' <track src=\"fgsubtitles_no.vtt\" kind=\"subtitles\" srclang=\"no\" label=\"Norwegian\">',\n '</video>'\n ]\n ],\n\n 'u' => [\n 'elem' => 'u',\n 'desc' => \"Makes an element's text underlined.\",\n 'tag' => '',\n 'example' => 'Hello <u>World</u>'\n ],\n\n 'ul' => [\n 'elem' => 'ul',\n 'desc' => 'Defines an unordered list.',\n 'tag' => '',\n 'load' => 'li',\n 'example' => [\n '<p>My shopping list:</p>',\n '<ul>',\n ' <li>Milk</li>',\n ' <li>Bread</li>',\n ' <li>Chocolate</li>',\n ' <li>More chocolate</li>',\n '</ul>'\n ]\n ],\n\n 'var' => [\n 'elem' => 'var',\n 'desc' => 'Defines a variable in a mathematical or programming expression.',\n 'tag' => '',\n 'example' => 'The value of <var>x</var> is 12.'\n ],\n\n 'video' => [\n 'elem' => 'video',\n 'desc' => 'Allows to embed an video clip into a web page.',\n 'tag' => '',\n 'att' => [\n 'src',\n 'autoplay',\n 'controls',\n 'loop',\n 'muted',\n 'poster',\n 'height',\n 'width'\n ],\n 'example' => '<video src=\"video.mp4\" controls></video>'\n ],\n\n 'wbr' => [\n 'elem' => 'wbr',\n 'desc' => 'The <wbr> (Word Break Opportunity) tag specifies where in a text it would be ok to add a line-break.',\n 'tag' => '',\n 'example' => '<p>To learn AJAX, you must be familiar with the XML<wbr>Http<wbr>Request Object.</p>'\n ]\n\n ];\n\n // Cycle through data to add extra values\n foreach ($data as $key => $arr)\n {\n\n // Check that elem & tag are set\n if (isset($arr['elem']) && isset($arr['tag']))\n {\n\n // Check for self closing\n if ($arr['tag'] == 'self')\n {\n\n $data[$key]['html'] = '<' . $arr['elem'] . '...>';\n $data[$key]['htmlchar'] = $this->htmlchar($data[$key]['html']);\n\n // Not self closing\n } else {\n\n // Check for custom\n if ($arr['tag'] == 'custom')\n {\n\n $data[$key]['html'] = $arr['elemtag'];\n $data[$key]['htmlchar'] = $this->htmlchar($data[$key]['html']);\n\n // Not custom\n } else {\n\n $data[$key]['html'] = '<' . $arr['elem'] . '>...</' . $arr['elem'] . '>';\n $data[$key]['htmlchar'] = $this->htmlchar($data[$key]['html']);\n\n }\n\n }\n\n // Add link\n $data[$key]['link'] = $this->class('btn btn-outline-primary')\n ->a('Link', route('splittlogic.html.element', $arr['elem']));\n\n }\n\n // Check for desc\n if (isset($arr['desc']))\n {\n\n $data[$key]['descchar'] = $this->htmlchar($arr['desc']);\n\n }\n\n // Check for example\n if (isset($arr['example']))\n {\n\n // Check if example is an array\n if (is_array($arr['example']))\n {\n\n // Reset example key\n $data[$key]['example'] = null;\n foreach ($arr['example'] as $ex)\n {\n\n $data[$key]['example'] .= $ex . PHP_EOL;\n\n }\n\n }\n\n $data[$key]['code'] = $this->htmlchar($data[$key]['example']);\n\n }\n\n // Set function\n $data[$key]['func'] = $key . '()';\n\n }\n\n return $data;\n\n }",
"private function createInstructionForXML(array $instruction) : array\n {\n return [\n 'name' => $instruction['name'],\n 'operands' => $instruction['operands'],\n ];\n }",
"public function planCreate(array $array);",
"function array_multisort_2d($array,$column,$sortorder='',$base=1){\n\tglobal $array_multisort_2d;\n\tif(!$array)return $array;\n\n\tforeach($array as $n=>$v){\n\t\t//develop link based on column\n\t\t$ref[]=strtolower($v[$column]);\n\t\t$refb[]=$n;\n\t}\n\t//need to develop to arsort if called\n\tasort($ref);\n\t$base=$base-1;\n\tforeach($ref as $n=>$v){\n\t\t$base++;\n\t\t$buffer[$base]=$array[$refb[$n]];\n\t}\n\treturn $buffer;\n}",
"static function result2IndexedArray2D(&$result, $colName) {\n $resultArray = array(); // beginnen met lege array\n\n if (@mysql_num_rows($result) != 0) {\n $mysqlResultRow = mysql_fetch_assoc($result);\n $keys = array_keys($mysqlResultRow); // eenmalig kolomnamen uitlezen\n mysql_data_seek($result, 0); // weer terug naar eerste resultaat, om hieronder in while ALLE resultaatrijen mee te nemen\n\n // rij voor rij alle waarden toevoegen aan $resultArray\n while ($mysqlResultRow = mysql_fetch_assoc($result)) {\n $row_arr = array();\n for ($k = 0; $k < count($keys); $k++) {\n $row_arr[$keys[$k]] = $mysqlResultRow[$keys[$k]];\n }\n $resultArray[$row_arr[$colName]] = $row_arr;\n }\n\n //mysql_free_result($result);\n }\n\n return $resultArray;\n }",
"function minitable($Array){\n\t$table='<table class=\"mini\">';\n\tforeach ($Array as $row=>$Cells){\n\t\t$table.='<tr>'.\"\\n\";\n\t\tforeach ($Cells as $column=>$value){\n\t\t\t$class=setclass($row,$column,$value);\n\t\t\t$value=htmlSafe($value);\n\t\t\tif (strlen($value)>1){$value=' ';}\n\t\t\tif (strlen($value)==0){$value='x';}\n\t\t\t$table.='<td class=\"'.$class.'\">'.$value.'</td>'.\"\\n\";\n\t\t}\n\t\t$table.='</tr>'.\"\\n\";\n\t}\n\t$table.='</table>';\n\treturn $table;\n}",
"function generateGrid(int $rows, int $columns): array {\n $grid = [];\n for ($i = 0; $i < $rows; $i++) {\n $grid[$i] = [];\n for ($j = 0; $j < $columns; $j++) {\n $grid[$i][] = chr(rand(65, 90));\n }\n }\n return $grid;\n}",
"function _build_row_by_post()\n{\n\t$row = array(\n\t\t'vote_id' => $this->_post_class->get_post_get_int( 'vote_id' ),\n\t\t'vote_time_create' => $this->_post_class->get_post_int( 'vote_time_create' ),\n\t\t'vote_time_update' => $this->_post_class->get_post_int( 'vote_time_update' ),\n\t\t'vote_photo_id' => $this->_post_class->get_post_int( 'vote_photo_id' ),\n\t\t'vote_uid' => $this->_post_class->get_post_int( 'vote_uid' ),\n\t\t'vote_rating' => $this->_post_class->get_post_int( 'vote_rating' ),\n\t\t'vote_hostname' => $this->_post_class->get_post_text( 'vote_hostname' ),\n\n\t);\n\treturn $row;\n}",
"public function fromArray(array $array){\n if(array_key_exists($this->idField, $array)){//verifica se possui id se sim seta o id;\n $this->{$this->idField} = $array[$this->idField];\n }\n $this->content = $array;\n }"
] | [
"0.5986138",
"0.5956309",
"0.54289067",
"0.5381754",
"0.5377197",
"0.5265973",
"0.52472264",
"0.51712656",
"0.51700544",
"0.5141177",
"0.50366396",
"0.50366396",
"0.5014995",
"0.5014949",
"0.499914",
"0.49861243",
"0.4966335",
"0.48686203",
"0.4867317",
"0.48633653",
"0.48621807",
"0.48589513",
"0.4842147",
"0.4833934",
"0.4830028",
"0.48104736",
"0.4804081",
"0.47829214",
"0.4775375",
"0.47736102",
"0.47688296",
"0.47548324",
"0.47496602",
"0.47403923",
"0.4730042",
"0.4712084",
"0.4705115",
"0.4674983",
"0.46681988",
"0.4666828",
"0.46494412",
"0.46378866",
"0.4622057",
"0.46204972",
"0.4619911",
"0.46170205",
"0.46113378",
"0.46111354",
"0.45982975",
"0.45938534",
"0.45920068",
"0.4588195",
"0.45846882",
"0.45792848",
"0.45774162",
"0.45756426",
"0.45595238",
"0.45593178",
"0.45580965",
"0.45580965",
"0.45540583",
"0.4548043",
"0.454352",
"0.45414343",
"0.45410553",
"0.45390898",
"0.45356202",
"0.4514225",
"0.45110956",
"0.45014742",
"0.44943845",
"0.44937292",
"0.44847864",
"0.44770238",
"0.44712487",
"0.44678754",
"0.4466086",
"0.44568613",
"0.44556788",
"0.44533354",
"0.44523466",
"0.44486585",
"0.44449085",
"0.44394654",
"0.44371504",
"0.44364095",
"0.44361812",
"0.44276807",
"0.4427214",
"0.44248906",
"0.4415855",
"0.44038343",
"0.4398159",
"0.43911",
"0.43886796",
"0.43874282",
"0.4381756",
"0.4376886",
"0.43704176",
"0.4363678",
"0.43581322"
] | 0.0 | -1 |
Create the element of body container if it does not exist | protected function _createRowContainer()
{
if ($this->_tbody == null) {
$this->_tbody = new HtmlElement('tbody');
$this->addElement($this->_tbody);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testBodyElementAutomaticallyCreated() {\n\t\t$document = new HTMLDocument(Helper::HTML);\n\t\t$this->assertInstanceOf(Element::class, $document->body);\n\t}",
"private function ensureExistenceOfBodyElement(\\DOMDocument $document)\n {\n if ($document->getElementsByTagName('body')->item(0) !== null) {\n return;\n }\n\n $htmlElement = $document->getElementsByTagName('html')->item(0);\n $htmlElement->appendChild($document->createElement('body'));\n }",
"abstract protected function createDefaultBody();",
"public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }",
"protected function _createHeaderContainer()\n\t{\n\t\tif ($this->_thead == null) {\n\t\t\t$this->_thead = new HtmlElement('thead');\n\t\t\t$this->addElement($this->_thead);\n\t\t}\t\t\n\t}",
"protected function get_body_node() {\n\t\t_deprecated_function( 'Use $this->dom->body instead', '1.5.0' );\n\t\treturn $this->dom->body;\n\t}",
"function IniciarBody(){\r\n echo \"<body>\";\r\n }",
"public function createBody()\n {\n }",
"public function create()\r\n {\r\n // Load only root elements.\r\n $this->loadRoots($this->elements, $this->roots);\r\n\r\n // Make sure that first element isn't child. If child then throw a exception about that.\r\n if ($this->elements[0]->isChild())\r\n TypeRegression::cantBe('child', 'First');\r\n\r\n // Set elements compiled field with relations\r\n $this->makeRelationsToCompiled($this->elements);\r\n \r\n // After append process by root-child then compile all stuffs into 'page' field.\r\n foreach ($this->roots as $key => $element) {\r\n \r\n $this->page .= $element->compiled;\r\n }\r\n }",
"function createRootElement ($a_element)\n\t{\n\t\t// check if rootNode already exists\n\t\tif ($root = $this->getRoot()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $this->appendChild($this->createElement($a_element));\n\t}",
"public function setBody(?string $body): HtmlElementInterface;",
"function minorite_container($variables) {\n $element = $variables['element'];\n\n // Special handling for form elements.\n if (isset($element['#array_parents'])) {\n // Add the 'rw' and 'form-rw' class.\n $element['#attributes']['class'][] = 'rw';\n\n switch ($element['#type']) {\n case 'actions':\n break;\n\n default:\n $element['#attributes']['class'][] = 'form-rw';\n }\n }\n\n // Add the grid when specified.\n if (isset($element['#grid'])) {\n $element['#children'] = '<p class=\"' . $element['#grid'] . '\">' . $element['#children'] . '</p>';\n }\n\n return '<div' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</div>';\n}",
"private function createRootNode()\n {\n $this->_rootNode = $this->_dom->createElement($this->_rootElement, '');\n $this->_dom->appendChild($this->_rootNode);\n }",
"private function renderBody() {\n\t\t\n\t\t\t$this->outputLine('<body>');\n\t\t\t\n\t\t\tif (isset($this->_template)) {\n\t\t\t\t$templatePath = DM_APP_PATH . DS . 'templates' . DS . $this->_template . DS . 'body.php';\n\t\t\t\t\n\t\t\t\tif (file_exists($templatePath)) {\n\t\t\t\t\trequire_once($templatePath);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new DMDocumentException('Template file missing');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->outputLine($this->_content);\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('</body>');\n\t\t\n\t\t}",
"private function _addBodyClassAttr()\n {\n $request = $this->app()->request();\n $doc = $this->app()->response()->document();\n $content = $request->param(\"_content_active\");\n\n if ((!$doc instanceof PHPFrame_HTMLDocument)) {\n return;\n }\n\n $body_class = $request->controllerName().\"-\".$request->action();\n\n if ($content instanceof Content) {\n $body_class .= \" content-type-\";\n\n switch (get_class($content)) {\n case \"FeedContent\" :\n $body_class .= \"feed\";\n break;\n case \"MVCContent\" :\n $body_class .= \"mvc\";\n break;\n case \"PageContent\" :\n $body_class .= \"page\";\n break;\n case \"PostContent\" :\n $body_class .= \"post\";\n break;\n case \"PostsCollectionContent\" :\n $body_class .= \"blog\";\n break;\n }\n\n $body_class .= \" content-item-\".$content->id();\n }\n\n $body_node = $doc->dom()->getElementsByTagName(\"body\")->item(0);\n $doc->addNodeAttr($body_node, \"class\", $body_class);\n }",
"protected function bodyHeader() {\n echo str_repeat(\"\\t\",1) . \"<body>\\n\";\n echo str_repeat(\"\\t\",2) . \"<div id=\\\"page\\\">\\n\";\n echo str_repeat(\"\\t\",3) . \"<header>\\n\";\n echo str_repeat(\"\\t\",4) . \"<h1>Евиденција волонтера</h1>\\n\";\n echo str_repeat(\"\\t\",3) . \"</header>\\n\";\n }",
"protected function _renderBodyBegin()\n\t{\n\t\treturn ''\n\t\t\t. \"\\n\" . Html::beginTag( 'div', $this->bodyOptions )\n\t\t\t. \"\\n\" . $this->body . \"\\n\";\n\t}",
"function buildHTMLPage($body) {\n return \"<!DOCTYPE html>\" .\n \"<html>\" .\n \"<head>\" .\n \"<link rel='stylesheet' href='./style.css' type='text/css' media='all'>\" .\n \"<title>Superhero App</title>\" .\n \"</head>\" .\n \"<header class='header-nav'>\" .\n \"<h1>Superhero Database</h1>\" .\n \"<div class='navbar-default'>\" .\n \"<li><a href='superheros.php'>Superheros</a></li>\" .\n \"<li><a href='villians.php'>Villians</a></li>\" .\n \"<li><a href='alteregos.php'>Alter Egos</a></li>\" .\n \"<li><a href='comiccompanies.php'>Comic Companies</a></li>\" .\n \"<li><a href='teamavgpower.php'>Teams' Average Power</a></li>\" .\n \"<li><a href='herocompanyhqs.php'>Heros' Comic Company HQs</a></li>\" .\n \"<li><a href='heroalterego.php'>Heros' Alter Egos</a></li>\" .\n \"<li><a href='strongvillians.php'>Strong Villians</a></li>\" .\n \"<li><a href='marvelcharacters.php'>Marvel Characters</a></li>\" .\n \"</div>\" .\n \"</header>\" .\n \"<body>\" .\n $body .\n \"</body>\" .\n \"</html>\";\n}",
"public function getBodyElement()\n {\n return $this->body;\n }",
"public static function manager_inner () \n { \n $html = null;\n\n $top = self::manager_inner_top();\n $inner = self::manager_inner_center();\n $bottom = self::manager_inner_bottom();\n\n $html .= self::page_body( 'manager', $top, $inner, $bottom );\n\n return $html;\n }",
"function renderBody()\n {\n return '';\n }",
"public function getBodyHTML()\n\t{\n\t\tif(!$this->elements['body']){\n\t\t\treturn false;\n\t\t}\n\n\t\tif(is_array($this->elements['body']['html'])){\n\t\t\t$this->elements['body']['html'] = Grid::generate($this->elements['body']['html']);\n\t\t}\n\n\t\t$id = str::getAttrTag(\"id\", $this->elements['body']['id']);\n\t\t$class = str::getAttrTag(\"class\", [\"modal-body\", $this->elements['body']['class']]);\n\t\t$style = str::getAttrTag(\"style\", $this->elements['body']['style']);\n\t\t$progress = Progress::generate($this->elements['body']['progress']);\n\t\t$script = str::getScriptTag($this->elements['body']['script']);\n\n\t\treturn \"<div{$class}{$id}{$style}>{$progress}{$this->elements['body']['html']}</div>{$script}\";\n\t}",
"public function testHeadElementAutomaticallyCreated() {\n\t\t$document = new HTMLDocument(Helper::HTML);\n\t\t$this->assertInstanceOf(Element::class, $document->head);\n\t}",
"protected function initDocumentTemplate()\n {\n $bodyDataAttributes = array_merge(\n $this->getBParamDataAttributes(),\n $this->getBodyTagAttributes()\n );\n foreach ($bodyDataAttributes as $attributeName => $value) {\n $this->doc->bodyTagAdditions .= ' ' . $attributeName . '=\"' . htmlspecialchars($value) . '\"';\n }\n\n // unset the default jumpToUrl() function as we ship our own\n unset($this->doc->JScodeArray['jumpToUrl']);\n }",
"function body_tag($attributes = array())\n{\n $attributes = apply_filters('body_tag_attributes', $attributes);\n if ($attributes = tag_attributes($attributes)) {\n return \"<body \". $attributes . \">\\n\";\n }\n return \"<body>\\n\";\n}",
"function hw_Document_BodyTag($hw_document, $prefix = NULL)\n{\n}",
"function arras_body_class() {\n\tif ( function_exists('body_class') ) {\n\t\t$body_class = array('layout-' . arras_get_option('layout'), 'no-js');\n\t\t\n\t\tif ( !defined('ARRAS_INHERIT_STYLES') || ARRAS_INHERIT_STYLES == true ) {\n\t\t\t$body_class[] = 'style-' . arras_get_option('style');\n\t\t}\t\n\t\t\n\t\treturn body_class( apply_filters('arras_body_class', $body_class) );\n\t}\n}",
"abstract protected function get_root_element();",
"protected function renderBodyBegin()\n {\n echo Html::beginTag('div', ['class' => 'webui-popover-content']) . \"\\n\";\n }",
"protected function makeBody()\n {\n }",
"public function docBodyTagBegin() {}",
"public function renderBodyClass() {\n\t\t$page = $this->wire('page');\n\t\t$bodyClass = $this->wire('input')->get->modal ? 'modal ' : '';\n\t\t$bodyClass .= \"id-{$page->id} template-{$page->template->name}\";\n\t\tif(wire('config')->js('JqueryWireTabs')) $bodyClass .= \" hasWireTabs\";\n\t\treturn $bodyClass; \n\t}",
"private static final function getEndHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n return new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_body.tp');\r\n }",
"static function body_open($arguments=false) {\n\t\n\t\t//add folders to body class\n\t\t$arguments = self::arguments($arguments);\n\t\tif (!isset($arguments['class'])) {\n\t\t\t$arguments['class'] = '';\n\t\t\n\t\t\tif ($folders = http::request('folders')) {\n\t\t\t\tforeach ($folders as $folder) $arguments['class'] .= ' ' . $folder;\n\t\t\t} else {\n\t\t\t\t$arguments['class']\t.= ' home';\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn self::tag('body', $arguments, false, true);\n\t}",
"function udesign_inside_body_tag() {\r\n do_action('udesign_inside_body_tag');\r\n}",
"public function container();",
"public function layout_body(){\n $body_file = \"view/{$this->page}/index.php\";\n try\n {\n if(file_exists($body_file)){\n require $body_file;\n }else{\n throw new PageException;\n }\n }catch(PageException $page_error){\n $this->page_error($page_error,'PAGE_ERROR',$body_file);\n }\n }",
"public function mainBody($sMainBody=\"\")\n {\n $this->sBody .= \"<div class='container'>\\n\"\n .$sMainBody\n . \"</div>\\n\"\n . \"</body>\\n</html>\\n\";\n }",
"public function getBodyTag() {}",
"function omega_override_overlay_deliver_empty_page() {\n $empty_page = '<html><head><title></title>' . drupal_get_css() . omega_get_js() . '</head><body class=\"overlay\"></body></html>';\n print $empty_page;\n drupal_exit();\n}",
"protected abstract function generateHtmlBody() : string;",
"protected function createElement($name, $value = null)\n {\n // otherwise only one element is attached to the DOM.\n\n $id = null;\n $uri = null;\n\n // The node name can contain the namespace id prefix.\n // Example: xsl:template\n $colon_pos = \\strpos($name, ':');\n\n if ($colon_pos !== false) {\n $id = \\substr($name, 0, $colon_pos);\n $name = \\substr($name, $colon_pos + 1);\n }\n\n if ($id !== null) {\n $ns = $this->namespaces[$id];\n $uri = $ns->uri();\n\n if ($ns->mode() === FluidNamespace::MODE_EXPLICIT) {\n $name = \"{$id}:{$name}\";\n }\n }\n\n // Algorithm 1:\n $el = new \\DOMElement($name, $value, $uri);\n\n // Algorithm 2:\n // $el = $dom->createElement($name, $value);\n\n return $el;\n }",
"function initialize () {\n $this->set_openingtag(\"<BODY[attributes]>\");\n\t $this->set_closingtag(\"</BODY>\");\n }",
"private function createRootPane() {\n $rootPaneTopLeftCorner = Point::createInstance(-1, -8);\n $rootPaneDimension = Dimension::createInstance($this->dimension->width, $this->dimension->height);\n\n $this->rootPane = new Frame('', $rootPaneTopLeftCorner, $rootPaneDimension);\n $this->rootPane->create($this);\n }",
"public function renderBody()\n\t{\n\t\t$this->setBody($this->forTemplate());\n\t}",
"public function ElementalAreaIfExists()\n {\n if ($this->owner->hasExtension(ElementalPageExtension::class)) {\n return $this->owner->ElementalArea();\n }\n return ElementalArea::create();\n }",
"function buildBody($Envrionment)\n\t{\n\t\t// Body\n\t\tif(isset($Envrionment[\"path\"]))\n\t\t{\n\t\t\t$displayPage =$Envrionment[\"path\"][\"basePage\"]();\n\t\t\t\n\t\t\tif(isset($Envrionment[\"page\"][$displayPage]))\n\t\t\t{\n\t\t\t\t$displayPageBuild = new $displayPage();\n\t\t\t\t$pageBody = $displayPageBuild -> page($pieces);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new PageNotFoundException();\n\t\t\t}\n\t\t} else {\n\t\t\tif(!isset($Envrionment[\"page\"][\"default\"]))\n\t\t\t{\n\t\t\t\t// This is what it should do\n\t\t\t\t//throw new PageNotFoundException();\n\t\t\t\t\n\t\t\t\t// For now:\n\t\t\t\t$pageBody = \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t\t$pageBody = $Envrionment[\"page\"][\"default\"] -> page();\n\t\t}\n\n\t\treturn $pageBody;\n\t}",
"public function makeBody();",
"protected static function registerDOM() {\n\t\tadd_action('wp_footer', function() {\n\t\t\tif (!is_home()) {\n\t\t\t\t$html = <<<HTML\n\t\t\t\t\t<div class=\"defiant-fab-container\">\n\t\t\t\t\t\t<div class=\"defiant-fab-icon\">\n\t\t\t\t\t\t\t<i class=\"fas fa-arrow-circle-up\" id=\"defiant-icon-up\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"defiant-fab-counter\">\n\t\t\t\t\t\t\t<p>0</p>\n\t\t\t\t\t\t\t<i class=\"fas fa-sync fa-spin\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"defiant-fab-icon\">\n\t\t\t\t\t\t\t<i class=\"fas fa-arrow-circle-down\" id=\"defiant-icon-down\"></i>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\nHTML;\n\t\t\t\techo $html;\n\t\t\t}\n\t\t});\n\t}",
"public function getContainer() {}",
"public function create($inPublic=true, $inAdmn=true, $weight=1, $body=''){\r\n\t\t$data = \"<?xml version=\\\"1.0\\\"?>\" . PHP_EOL;\r\n\t\t$data .= \"<html xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xml:id=\\\"html\\\" attr=\\\"lang='en-US'\\\" weight=\\\"\".$weight.\"\\\">\" . PHP_EOL;\r\n\t\t\t$data .= \"\\t<head xml:id=\\\"head\\\" weight=\\\"1\\\">\" . PHP_EOL . PHP_EOL;\r\n\t\t\t$data .= \"\\t</head>\" . PHP_EOL;\r\n\t\t\t$data .= \"\\t<body xml:id=\\\"body\\\" weight=\\\"1\\\">\" . PHP_EOL . PHP_EOL;\r\n\t\t\t\tif($body){\r\n\t\t\t\t\t$data .= $body;\r\n\t\t\t\t}\r\n\t\t\t$data .= \"\\t</body>\" . PHP_EOL;\r\n\t\t$data .= \"</html>\" . PHP_EOL;\r\n\r\n\t\t$target = ROOT.DS.'App'.DS.'Ext'.DS.$this->config['vendor'].DS.$this->config['module'].DS.'View'.DS.'Layout';\r\n\r\n\t\tif($inPublic){\r\n\t\t\t$this->createHelper($data, false);\r\n\t\t}\r\n\t\tif($inAdmn){\r\n\t\t\t$this->createHelper($data, true);\r\n\t\t}\r\n\t}",
"final public function Add_Google_Tag_Manager_BODY() {\n\t\tif (isset(self::$GOOGLE_TAG_MANAGER_ID) && !empty(self::$GOOGLE_TAG_MANAGER_ID)) {\n\t\t?>\n<noscript><iframe src=\"https://www.googletagmanager.com/ns.html?id=<?= self::$GOOGLE_TAG_MANAGER_ID; ?>\"\nheight=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript>\n<?\n \t}\n\t}",
"public function testBuildElementElementCreateEltWhenAll(): void\n {\n $this->sut->buildElementElement();\n $this->sut->endElement();\n $this->sut->buildElementElement();\n $sch = $this->sut->getSchema();\n \n static::assertAncestorsNotChanged($sch);\n \n $all = static::getCurrentElement($sch);\n self::assertElementNamespaceDeclarations([], $all);\n self::assertAllElementHasNoAttribute($all);\n self::assertCount(2, $all->getElements());\n \n $elts = $all->getElementElements();\n \n self::assertElementNamespaceDeclarations([], $elts[0]);\n self::assertElementElementHasNoAttribute($elts[0]);\n self::assertSame([], $elts[0]->getElements());\n \n self::assertElementNamespaceDeclarations([], $elts[1]);\n self::assertElementElementHasNoAttribute($elts[1]);\n self::assertSame([], $elts[1]->getElements());\n }",
"protected function renderBodyBegin()\n {\n return $this->renderCloseButton();\n }",
"public function generate() {\n\t\t\t$this->Wrapper->appendChild($this->Header);\n\t\t\t$this->Wrapper->appendChild($this->Contents);\n\t\t\t$this->Wrapper->appendChild($this->Footer);\n\n\t\t\t$this->Body->appendChild($this->Wrapper);\n\n\t\t\t$this->__appendBodyId();\n\t\t\t$this->__appendBodyClass($this->_context);\n\t\t\treturn parent::generate();\n\t\t}",
"abstract public function setBody();",
"function renderDocument() {\n global $unread_inbox; // @todo make this a gizmo\n \n $content = $this->content;\n\n // Add head and body tags\n if (stripos($content, '</head>') === false) {\n $skel = file_get_contents(MWG_BASE . '/templates/skeleton.html');\n $content = str_ireplace('{body}', $content, $skel);\n }\n \n $newbody = implode(\"\\n\", $this->before_body_end ) . \"</body>\";\n $content = str_ireplace('</body>', $newbody, $content);\n\n $head = $this->getHead();\n $content = str_ireplace('</head>', \"$head</head>\", $content);\n $content = preg_replace(\"|<title>(.*?)</title>|i\", \"<title>\" . $this->getTitle() . \"</title>\", $content);\n $content = str_replace('{inbox}', $unread_inbox, $content);\n\n return $content;\n }",
"function bodytag ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tbodytag');\n return $rc->newInstanceArgs( $arguments ); \n}",
"public function setBody($a = NULL)\n\t{\n\t\t# Array\n\t\tif(is_array($a)){\n\t\t\t$this->elements['body'] = $a;\n\t\t\t$this->elements['body']['id'] = $this->elements['body']['id'] ?: str::id(\"body\");\n\t\t\treturn true;\n\t\t}\n\n\t\t# Mixed\n\t\tif($a){\n\t\t\t$this->elements['body']['html'] = $a;\n\t\t\t$this->elements['body']['id'] = str::id(\"body\");\n\t\t\treturn true;\n\t\t}\n\n\t\t# Clear\n\t\tif($a === false){\n\t\t\t$this->elements['body'] = [];\n\t\t\treturn true;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function builder_module_container( $title = null ) {\n\n // Create the module\n $module = new CV_HTML( '<div>', array(\n 'class' => 'cv-builder-module cv-is-draggable has-clearfix',\n 'data-droptarget' => strval( $this->config['drop_target'] ),\n 'data-handle' => $this->config['handle'],\n 'data-title' => $this->config['title'],\n ) );\n\n // Apply additional classes\n $module->add_class( 'cv-module-' . $this->config['handle'] );\n $module->add_class( 'has-dropzone' );\n\n // Insert sidebar representation\n $module->append('<div class=\"cv-sidebar-representation\">' . __( 'Sidebar', 'canvys' ) . '</div>');\n\n return $module;\n\n }",
"function lightseek_template_wrapper_start(){\n ?>\n <div id=\"primary\" class=\"content-area\">\n <main id=\"main\" class=\"site-main\" role=\"main\">\n <div class=\"container\">\n <?php\n}",
"private function wrapHtmlBodyContent($body, $headContent = '')\n {\n // Bulk of the HTML will be stored in here...\n $htmlDocument = \"\n\t\t\t<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\n\t\t\t<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" xml:lang=\\\"en\\\" lang=\\\"en\\\">\" .\n $headContent .\n \"<body style=\\\"background: white\\\">\";\n $htmlDocument .= $body;\n $htmlDocument .= \"</body></html>\";\n\n return $htmlDocument;\n }",
"function start_body($tabs = 1, $extra = '')\n{\n /**\n * Starting the body of the html file.\n *\n * Args:\n * $tabs (int): number of tabs for indentation, default is 2\n * $extra (str): extra data in the tag - used for adding class / ID etc.\n */\n start_tag('body', Tab($tabs), true, $extra) ;\n}",
"function finalizeTopHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"<!doctype html>\\n\";\n\t\t$returnVal .= \"<html lang=\\\"en\\\">\\n\";\n\t\t$returnVal .= \"<head><title>\";\n\t\t$returnVal .= $this->_title;\n\t\t$returnVal .= \"</title>\\n\";\n\t\t$returnVal .= $this->_headSection; \n\t\t$returnVal .= \"</head>\\n\";\n\t\t$returnVal .= \"<body>\\n\";\n\t\t$returnVal .= \"<div id='container'>\\n\";\n\t\t$this->_topHTML = $returnVal;\n\t}",
"public function createContainer( $options ){\n\n // options container open\n if( $options['container'] == 'open' ) {\n // open container\n $this->openContainer( $options );\n // add text\n $this->addText( $options );\n } \n // options container open\n\n // options container close\n if( $options['container'] == 'close' ) {\n // close container\n $this->closeContainer( $options );\n } \n // options container close\n \n }",
"function body()\r\n{\r\n\t\r\n}",
"public function createFrames() {}",
"function shoestrap_pjax_open_container() { ?>\n\t\t\t<div id=\"pjax-container\">\n\t\t\t<?php\n\t\t}",
"public function renderBodyBegin(&$output)\n\t{\n\t\t$html='';\n\t\tif(isset($this->scriptFiles[self::POS_BEGIN]))\n\t\t{\n\t\t\tforeach($this->scriptFiles[self::POS_BEGIN] as $scriptFile)\n\t\t\t\t$html.=self::scriptFile($scriptFile).\"\\n\";\n\t\t}\n\t\tif(isset($this->scripts[self::POS_BEGIN]))\n\t\t\t$html.=CHtml::script(implode(\"\\n\",$this->scripts[self::POS_BEGIN])).\"\\n\";\n\n\t\tif($html!=='')\n\t\t{\n\t\t\t$count=0;\n\t\t\t$output=preg_replace('/(<body\\b[^>]*>)/is','$2<###begin###>',$output,1,$count);\n\t\t\tif($count)\n\t\t\t\t$output=str_replace('<###begin###>',$html,$output);\n\t\t\telse\n\t\t\t\t$output=$html.$output;\n\t\t}\n\t}",
"function gotravel_mikado_add_admin_container_no_style($attributes) {\n\t\t$name = '';\n\t\t$parent = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\n\t\textract($attributes);\n\n\t\tif(!empty($name) && is_object($parent)) {\n\t\t\t$container = new GoTravelMikadoContainerNoStyle($name, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t$parent->addChild($name, $container);\n\n\t\t\treturn $container;\n\t\t}\n\n\t\treturn false;\n\t}",
"function mybody($bodyContents = '', $asideContent = '') {\n\t\tprint '<body>';\n\t\t\tprint '<div>';\n\t\t\t\tprint $bodyContents;\n\t\t\t\tmyaside($asideContent);\n\t\t\tprint '</div>';\n\t\tprint '</body>';\n\t}",
"public function testGetContainer() {\r\n\t\t$this->testObject->setContainer ( 'div' );\r\n\t\t$this->assertTrue ( 'div' == $this->testObject->getContainer (), 'incorrect html container returned' );\r\n\t}",
"function finalizeBottomHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"</div>\\n\"; // Closes Container\n\t\t$returnVal .= \"</body>\\n\";\n\t\t$returnVal .= \"</html>\\n\";\n\t\t$this->_bottomHTML = $returnVal;\n\t}",
"function render_page_container_end()\n\t\t{\n\t\t\t$output = '</div>'; \n\t\t\treturn $output;\n\t\t}",
"public function build()\n {\n if (isset($this->component)) {\n return $this->component;\n }\n\n $contents = array_map(function ($componentBuilder) {\n /** @var ComponentBuilder $componentBuilder */\n return $componentBuilder->build();\n }, $this->componentBuilders);\n\n $this->component = BuildUtil::removeNullElements([\n 'type' => ComponentType::BOX,\n 'layout' => $this->layout,\n 'contents' => $contents,\n 'backgroundColor' => $this->backgroundColor,\n 'borderColor' => $this->borderColor,\n 'borderWidth' => $this->borderWidth,\n 'cornerRadius' => $this->cornerRadius,\n 'width' => $this->width,\n 'height' => $this->height,\n 'flex' => $this->flex,\n 'spacing' => $this->spacing,\n 'margin' => $this->margin,\n 'paddingAll' => $this->paddingAll,\n 'paddingTop' => $this->paddingTop,\n 'paddingBottom' => $this->paddingBottom,\n 'paddingStart' => $this->paddingStart,\n 'paddingEnd' => $this->paddingEnd,\n 'position' => $this->position,\n 'offsetTop' => $this->offsetTop,\n 'offsetBottom' => $this->offsetBottom,\n 'offsetStart' => $this->offsetStart,\n 'offsetEnd' => $this->offsetEnd,\n 'action' => BuildUtil::build($this->actionBuilder, 'buildTemplateAction'),\n ]);\n\n return $this->component;\n }",
"abstract protected function getHtmlBody();",
"public function compose()\n {\n $elementBasic = $this->domDocument->createElementNS(\"KaseyaWS\",\"GetRoles\",null);\n\n $elementReq = $this->domDocument->createElement(\"req\");\n\n $elementSession = $this->domDocument->createElement(\"SessionID\",$this->sessionID);\n\n $elementReq->appendChild($elementSession);\n\n $elementBasic->appendChild($elementReq);\n\n $this->domDocument->appendChild($elementBasic);\n\n\n\n\n\n }",
"public function container() : ?Container;",
"protected function __setRoot() {\r\n\t\t$this->root = $this->domFragment->createElementNS(self :: TEXT, 'text:p');\r\n\t}",
"function wp_body_open() : void {\n\t\tdo_action( 'wp_body_open' );\n\t}",
"function create_current_user($user) {\n return create_element(\"div\", true, [ \"contents\" => [\n $user[\"firstname\"].\" \".$user[\"lastname\"].\" \",\n\n create_element(\"a\", true, [\n \"href\" => \"http://$_SERVER[HTTP_HOST]/dz2/logout.php\",\n \"contents\" => \"Logout\"\n ])\n ]]);\n}",
"public function appendBody($body);",
"public function getContainer();",
"public function getContainer();",
"public function getContainer();",
"public function getContainer();",
"public function getContainer();",
"function beforeNodeBody() {\n if($this->params['controller'] == 'nodes') {\n \t\tif(($this->action != 'admin_add') && ($this->action != 'admin_edit') && ($this->action != 'admin_index')) { \t\t\t \t\t\t\n \t\t\tif((isset($this->Layout->node['Cycle'])) && ($this->Layout->node['Cycle']['CyclesNode']['position'] == 3)) {\n \t\t\t\t// It may actually be that a cycle is associated but it has no records, so check first\n \t\t\t\tif((isset($this->Layout->node['Cycle']['CycleRecord'])) && (isset($this->Layout->node['Cycle']['CycleRecord']))) { \n \t\t\t\t\treturn $this->_outputCycleModule($this->Layout->node['Cycle']['CyclesNode']['style'], $this->Layout->node['Cycle']);\n \t\t\t\t} \t\t\t\t\n \t\t\t}\n \t\t}\n \t}\n }",
"private function __appendBodyId(){\n\t\t\t// trim \"content\" from beginning of class name\n\t\t\t$body_id = preg_replace(\"/^content/\", '', get_class($this));\n\n\t\t\t// lowercase any uppercase letters and prefix with a hyphen\n\t\t\t$body_id = trim(preg_replace(\"/([A-Z])/e\", \"'-' . strtolower('\\\\1')\", $body_id), '-');\n\n\t\t\tif (!empty($body_id)) $this->Body->setAttribute('id', trim($body_id));\n\t\t}",
"public function getContainer()\n {\n if ($this->_container != null) {\n return $this->_container;\n }\n\n if ($this->space_id != null) {\n $container = $this->space;\n } elseif ($this->user_id != null) {\n $container = $this->user;\n } else {\n throw new Exception(\"Could not determine container type!\");\n }\n\n $this->_container = $container;\n\n return $this->_container;\n }",
"public function renderBodyBegin(&$output)\n\t{\n\t\t$html = '';\n\t\tif (isset($this->scriptFiles[self::POS_BEGIN]))\n\t\t{\n\t\t\tforeach ($this->scriptFiles[self::POS_BEGIN] as $scriptFile)\n\t\t\t\t$html.=self::scriptFile($scriptFile) . \"\\n\";\n\t\t}\n\t\tif (isset($this->scripts[self::POS_BEGIN]))\n\t\t\t$html.=self::script(implode(\"\\n\", $this->scripts[self::POS_BEGIN])) . \"\\n\";\n\n\t\tif ($html !== '')\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$output = preg_replace('/(<body\\b[^>]*>)/is', '$1<###begin###>', $output, 1, $count);\n\t\t\tif ($count)\n\t\t\t\t$output = str_replace('<###begin###>', $html, $output);\n\t\t\telse\n\t\t\t\t$output = $html . $output;\n\t\t}\n\t}",
"public function createPageAndCopyLiveParentPage() {}",
"function generate_top_bar() {\n\t\tif ( ! is_active_sidebar( 'top-bar' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<div <?php generate_do_element_classes( 'top_bar' ); ?>>\n\t\t\t<div class=\"inside-top-bar<?php if ( 'contained' == generate_get_option( 'top_bar_inner_width' ) ) echo ' grid-container grid-parent'; ?>\">\n\t\t\t\t<?php dynamic_sidebar( 'top-bar' ); ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}",
"function wp_body_open() {\n\t\tdo_action( 'wp_body_open' );\n\t}",
"function wp_body_open() {\n\t\tdo_action( 'wp_body_open' );\n\t}",
"function create_dom_node(&$dom, &$parent_node, $node_name, $node_value = NULL){\n\t\t$node = $dom->create_element($node_name);\n\t\t$new_node = $parent_node->append_child($node);\n\t\tif($node_value != NULL){\n\t\t\t$txt_node = $dom->create_text_node($node_value);\n\t\t\t$new_node->append_child($txt_node);\n\t\t}\n\t\treturn $new_node;\n\t}",
"public function test1()\n {\n $document = $this->getHTMLDocument();\n $element = $document->createElement('div');\n $document->body->appendChild($element);\n $this->assertSame($document->URL, $element->baseURI);\n }",
"protected function setUp()\n {\n $this->object = new Element('test_element');\n\n $this->doc = new \\DOMDocument;\n $this->doc->appendChild($this->object);\n }",
"protected function OnCreateElements() {}",
"protected function OnCreateElements() {}"
] | [
"0.6856831",
"0.6498647",
"0.574058",
"0.5732401",
"0.5584925",
"0.55000705",
"0.5436509",
"0.5414238",
"0.53868806",
"0.5266912",
"0.52580684",
"0.52203315",
"0.51579833",
"0.5101406",
"0.5080407",
"0.50763047",
"0.50546455",
"0.50546056",
"0.5017042",
"0.50101405",
"0.4994718",
"0.498188",
"0.4968319",
"0.49536353",
"0.49490952",
"0.4934642",
"0.49281847",
"0.49273473",
"0.4907833",
"0.489213",
"0.48800346",
"0.48502514",
"0.48451704",
"0.48400787",
"0.481188",
"0.4799519",
"0.47854686",
"0.47831368",
"0.47794765",
"0.47771126",
"0.4770694",
"0.47608805",
"0.4756854",
"0.4754022",
"0.47485483",
"0.47470573",
"0.47340858",
"0.47020057",
"0.4677761",
"0.46646634",
"0.4664284",
"0.46641976",
"0.4661557",
"0.46563116",
"0.46498355",
"0.46470574",
"0.46456304",
"0.4620431",
"0.46151337",
"0.46132708",
"0.45848018",
"0.45845845",
"0.45809823",
"0.4566604",
"0.45662266",
"0.45579413",
"0.45330387",
"0.45324594",
"0.45311764",
"0.45281875",
"0.4521917",
"0.45188478",
"0.45023724",
"0.4502076",
"0.45015258",
"0.44989818",
"0.4497205",
"0.44921073",
"0.44917345",
"0.4489334",
"0.44833547",
"0.44824857",
"0.4481535",
"0.4481535",
"0.4481535",
"0.4481535",
"0.4481535",
"0.4477991",
"0.44765797",
"0.4475684",
"0.44748735",
"0.44614115",
"0.4458868",
"0.44584355",
"0.44584355",
"0.44582987",
"0.44581544",
"0.44571024",
"0.44558784",
"0.44558784"
] | 0.5669783 | 4 |
Create the element of header container if it does not exist | protected function _createHeaderContainer()
{
if ($this->_thead == null) {
$this->_thead = new HtmlElement('thead');
$this->addElement($this->_thead);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}",
"public function addChild($header = \"\");",
"public function newHeaderContainer()\n {\n return new HeaderContainer($this);\n }",
"private function createHeader() {\r\n\t\t$headerHtml = $this->getHeaderHtml();\r\n\t\t//Guardo el archivo del header\r\n\t\t$htmlPath = $this->localTmpFolder . $this->fileName . '_currentHeader' . '.html';\r\n\t\t$fh = fopen($htmlPath, 'w');\r\n\t\tfwrite($fh, $headerHtml);\r\n\t\tfclose($fh);\r\n\t\treturn $headerHtml;\r\n\t}",
"public function buildHeader() {\n $this->build = [\n // '#type' => 'page',.\n 'container' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => 'container',\n ],\n 'page_header' => [\n '#type' => 'html_tag',\n '#tag' => 'h2',\n '#value' => $this->t('<a href=\"@site-audit-uri\">Site Audit</a> report for @site', [\n '@site-audit-uri' => 'https://drupal.org/project/site_audit',\n '@site' => $this->options['uri'],\n ]),\n '#attributes' => [\n 'id' => 'page-header',\n ],\n 'br' => [\n '#type' => 'html_tag',\n '#tag' => 'br',\n ],\n 'sub_head' => [\n '#type' => 'html_tag',\n '#tag' => 'small',\n '#value' => $this->t('Generated on @date_time', ['@date_time' => \\Drupal::service('date.formatter')->format(\\Drupal::time()->getRequestTime())]),\n ],\n ],\n ],\n ];\n if (is_array($this->report)) {\n // There are multiple reports.\n $this->build['container']['summary'] = [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'id' => 'summary',\n ],\n ];\n $this->build['container']['summary']['title'] = [\n '#type' => 'html_tag',\n '#tag' => 'h2',\n '#value' => $this->t('Summary'),\n ];\n $this->build['container']['summary']['links'] = [\n '#type' => 'html_tag',\n '#tag' => 'p',\n ];\n foreach ($this->report as $report) {\n $this->build['container']['summary']['links'][$report->getPluginId()] = [\n '#type' => 'html_tag',\n '#tag' => 'a',\n '#value' => $report->getLabel() . ' (' . $report->getPercent() . '%)',\n '#attributes' => [\n 'href' => '#' . $report->getPluginId(),\n 'class' => $this->getPercentCssClass($report->getPercent()),\n ],\n ];\n }\n }\n }",
"private function addHeaderDetails(){ \n $headerCount = $this->createElement('select', 'headerCount')\n ->addMultiOptions(array('1' => '1 - Header', '2' => '2 - Header', '3' => '3 - Header'))\n ->setValue('3');\n \n $highPressure = $this->createElement('text', 'highPressure')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true)\n ->addValidator('between', true, array('min' => $this->mS->minPressure(), 'max' => $this->mS->critPressure(), 'inclusive' => true));\n $mediumPressure = $this->createElement('text', 'mediumPressure')\n ->setAttrib('style', 'width: 60px;');\n $lowPressure = $this->createElement('text', 'lowPressure')\n ->setAttrib('style', 'width: 60px;');\n $hpSteamUsage = $this->createElement('text', 'hpSteamUsage')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true);\n $mpSteamUsage = $this->createElement('text', 'mpSteamUsage')\n ->setAttrib('style', 'width: 60px;');\n $lpSteamUsage = $this->createElement('text', 'lpSteamUsage')\n ->setAttrib('style', 'width: 60px;');\n\n $this->addElements(array(\n $headerCount,\n $highPressure,\n $mediumPressure,\n $lowPressure,\n $hpSteamUsage,\n $mpSteamUsage,\n $lpSteamUsage,\n )); \n \n $condReturnTemp = $this->createElement('text', 'condReturnTemp')\n ->setValue(round($this->mS->localize(338.705556, 'temperature')))\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true);\n \n $condReturnFlash = $this->createElement('select', 'condReturnFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n $hpCondReturnRate = $this->createElement('text', 'hpCondReturnRate')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true)\n ->addValidator('between', true, array('min' => 0, 'max' => 100, 'inclusive' => true));\n $mpCondReturnRate = $this->createElement('text', 'mpCondReturnRate')\n ->setAttrib('style', 'width: 60px;');\n $lpCondReturnRate = $this->createElement('text', 'lpCondReturnRate')\n ->setAttrib('style', 'width: 60px;');\n $hpCondFlash = $this->createElement('select', 'hpCondFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n $mpCondFlash = $this->createElement('select', 'mpCondFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n\n $this->addElements(array(\n $condReturnTemp,\n $condReturnFlash,\n $hpCondReturnRate,\n $mpCondReturnRate,\n $lpCondReturnRate,\n $hpCondFlash,\n $mpCondFlash,\n ));\n \n $hpHeatLossPercent = $this->createElement('text', 'hpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n $mpHeatLossPercent= $this->createElement('text', 'mpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n $lpHeatLossPercent = $this->createElement('text', 'lpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n\n $this->addElements(array(\n $hpHeatLossPercent,\n $mpHeatLossPercent,\n $lpHeatLossPercent,\n ));\n }",
"private function build_header() {\n\t\t// if we've already got the cart ID, use it\n\t\t$header = self::fetch('cart_header', [':cart_id' => $this->id()]);\n\n\t\t$header['date_created'] = ck_datetime::datify(@$header['date_created']);\n\t\tif (!empty($header['date_updated'])) $header['date_updated'] = ck_datetime::datify($header['date_updated']);\n\n\t\t$this->skeleton->load('header', $header);\n\t}",
"protected function makeHeader()\n {\n }",
"function createHeader($options = array()) {\n $header = new Header( $options );\n $html = $header->html();\n return $html;\n}",
"function generate_construct_header_widget() {\n\t\tif ( is_active_sidebar( 'header' ) ) : ?>\n\t\t\t<div class=\"header-widget\">\n\t\t\t\t<?php dynamic_sidebar( 'header' ); ?>\n\t\t\t</div>\n\t\t<?php endif;\n\t}",
"function minorite_header($variables){\n return '<header'.drupal_attributes($variables['elements']['#wrapper_attributes']).'>'.$variables['elements']['#children'].'</header>';\n}",
"public function testHeadElementAutomaticallyCreated() {\n\t\t$document = new HTMLDocument(Helper::HTML);\n\t\t$this->assertInstanceOf(Element::class, $document->head);\n\t}",
"public function defineHeader()\n {\n $this->header = new Header();\n }",
"public function get_header()\n {\n return <<<EOD\n<div id=\"sitehdr\">\n Sitewide Header\n</div>\n\nEOD;\n }",
"public function processHeader()\n {\n $toggle =\n '<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#' . $this->getWidgetId() . '_collapse\">\n <span class=\"sr-only\">Toggle navigation</span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n </button>';\n\n $brand = '';\n if ($this->getBrand())\n {\n $brand = $this->getBrand();\n $brand = self::$html->decode(self::$html->link($brand[1], $brand[0], ['class' => 'navbar-brand']));\n }\n\n $this->addHeader($this->createWrapper('div', ['class' => 'navbar-header'], $toggle . $brand));\n }",
"protected function _build_header(){\n\t\t$html = '';\n\t\t\n\t\t$html .= '<div class=\"container-narrow marginTop60\">';\r\n\t\t$html .= '<a href=\"'.home_url('/').'\">';\r\n\t\t$html .= '<img src=\"'.get_header_image().'\" height=\"'.get_custom_header()->height .'\"\r\n\t\twidth=\"'.get_custom_header()->width.'\" alt=\"\" class=\"marginTop40 marginBottom20\"\r\n\t\talign=\"center\"/>\r\n\t\t</a>';\r\n\t\t$html .= '<p class=\"centerText\">'.get_bloginfo('description').'</p>';\r\n\t\t$html .= '<hr class=\"marginBottom20 width50\">';\r\n\t\t$html .= '</div>';\n\t\t\n\t\techo $html;\n\t}",
"function generate_header_items() \r\n{\r\n\t// Header widget\r\n\tgenerate_construct_header_widget();\r\n\t\r\n\t// Site logo\r\n\tgenerate_construct_logo();\r\n\t\r\n\t// Site title and tagline\r\n\tgenerate_construct_site_title();\r\n\t\r\n}",
"public function Header() {\r\n $this->varcave->logger->debug('Create PDF top header');\r\n\t\tif ($this->noheader){\r\n\t\t\treturn true;\r\n\t\t}\r\n // Logo\r\n\t\t$this->setFont($this->font, 'BI', 8, '', 'false');\r\n\t\t$this->Image($this->headerImg,4,4,170);\r\n\t\t\r\n\t\t//text box after header image\r\n\t\t$this->RoundedRect(172,4,35,10,3.5,'D');\r\n\t\t$this->SetXY(173,5);\r\n\t\t$this->cell(0,3, LNE::pdf_caveRef . ': ' . $this->cavedata['caveRef'],0);\r\n\t\t$this->SetXY(173,9);\r\n\t\t//If pagegroup is on set group page number, or set a global PDF page number \r\n\t\tif ( $this->pagegroups == false )\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page. ': '. $this->getAliasNumPage() . '/' . $this->getAliasNbPages(),0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->cell(0,3,LNE::pdf_page .': '. $this->getPageGroupAlias(). '-'.$this->getPageNumGroupAlias() ,0);\r\n\t\t}\r\n\t\t\r\n }",
"public function getHeaderContainer()\n\t{\n\t\treturn $this->_thead;\n\t}",
"function newsroom_elated_get_header() {\n $id = newsroom_elated_get_page_id();\n\n //will be read from options\n $header_type = 'header-type3';\n $header_behavior = newsroom_elated_options()->getOptionValue('header_behaviour');\n\n if(HeaderFactory::getInstance()->validHeaderObject()) {\n $parameters = array(\n 'hide_logo' => newsroom_elated_options()->getOptionValue('hide_logo') == 'yes' ? true : false,\n 'header_in_grid' => newsroom_elated_options()->getOptionValue('header_in_grid') == 'yes' ? true : false,\n 'logo_position' => newsroom_elated_get_meta_field_intersect('logo_position',$id),\n 'show_sticky' => in_array($header_behavior, array(\n 'sticky-header-on-scroll-up',\n 'sticky-header-on-scroll-down-up'\n )) ? true : false,\n );\n\n $parameters = apply_filters('newsroom_elated_header_type_parameters', $parameters, $header_type);\n\n HeaderFactory::getInstance()->getHeaderObject()->loadTemplate($parameters);\n }\n }",
"public function header() {\n\t\tRequirements::clear();\n\n\t\t$templates = ['Grasenhiller\\WkHtmlToX\\PdfHeader'];\n\t\t$data = $this->getHeaderFooterVariables();\n\n\t\tif (isset($data['template']) && $data['template']) {\n\t\t\t$templates[] = $data['template'];\n\t\t}\n\n\t\t$this->extend('updateHeader', $templates, $data);\n\n\t\treturn $this\n\t\t\t->customise($data)\n\t\t\t->renderWith(array_reverse($templates));\n\t}",
"function iver_select_set_header_object() {\n \t$header_type = iver_select_get_meta_field_intersect('header_type', iver_select_get_page_id());\n\t $header_types_option = iver_select_get_header_type_options();\n\t \n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if(Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\IverSelectHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }",
"function load_header(){\n\t\techo \"<div style='background:darkblue; height:100px; '> HEADER </div>\";\n\t}",
"public function header() {\r\n $html = <<<HTML\r\n\r\n <header>\r\n <p class=\"welcomeScreen\" ><img src=\"images/title.png\" alt=\"\" ></p>\r\n <h1 class=\"welcomeScreen\">$this->title</h1>\r\n </header>\r\nHTML;\r\n return $html;\r\n }",
"function biagiotti_mikado_get_header() {\n\t\t$id = biagiotti_mikado_get_page_id();\n\t\t\n\t\t//will be read from options\n\t\t$header_type = biagiotti_mikado_get_meta_field_intersect( 'header_type', $id );\n\t\t\n\t\t$menu_area_in_grid = biagiotti_mikado_get_meta_field_intersect( 'menu_area_in_grid', $id );\n\t\t\n\t\t$header_behavior = biagiotti_mikado_get_meta_field_intersect( 'header_behaviour', $id );\n\t\t\n\t\tif ( HeaderFactory::getInstance()->validHeaderObject() ) {\n\t\t\t$parameters = array(\n\t\t\t\t'hide_logo' => biagiotti_mikado_options()->getOptionValue( 'hide_logo' ) == 'yes',\n\t\t\t\t'menu_area_in_grid' => $menu_area_in_grid == 'yes',\n\t\t\t\t'show_sticky' => in_array( $header_behavior, array( 'sticky-header-on-scroll-up', 'sticky-header-on-scroll-down-up' ) ),\n\t\t\t\t'show_fixed_wrapper' => in_array( $header_behavior, array( 'fixed-on-scroll' ) ),\n\t\t\t);\n\t\t\t\n\t\t\t$parameters = apply_filters( 'biagiotti_mikado_filter_header_type_parameters', $parameters, $header_type );\n\t\t\t\n\t\t\tHeaderFactory::getInstance()->getHeaderObject()->loadTemplate( $parameters );\n\t\t}\n\t}",
"public function getHeaderHTML()\n\t{\n\t\tif(!is_array($this->elements['header'])){\n\t\t\t// Headers are optional\n\t\t\treturn false;\n\t\t}\n\n\t\t# Header buttons can also be defined outside of the header key when defining modal vales.\n\t\t$this->elements['header']['buttons'] = array_merge($this->elements['header']['buttons'] ?: [], $this->buttons ?: []);\n\n\t\t# Add the required Bootstrap header class very first\n\t\t$this->elements['header']['class'] = str::getAttrArray($this->elements['header']['class'], \"modal-header\", $this->elements['header']['only_class']);\n\n\t\t# Draggable\n\t\t$this->elements['header']['class'][] = $this->draggable ? \"modal-header-draggable\" : false;\n\n\t\t# Styles\n\t\t$this->elements['header']['style'] = str::getAttrArray($this->elements['header']['style'], NULL, $this->elements['header']['only_style']);\n\n\t\t# Dropdown buttons\n\t\tif($this->elements['header']['buttons']){\n\t\t\t$buttons = Button::get($this->elements['header']);\n\t\t}\n\n\t\t# Button(s) in a row\n\t\t$button = Button::generate($this->elements['header']['button']);\n\n\t\tif($button){\n\t\t\t$button = \"<div class=\\\"btn-float-right\\\">{$button}</div>\";\n\t\t}\n\n\t\t# Accent\n\t\t$this->elements['header']['class'][] = str::getColour($this->accent, \"bg\");\n\n\t\t# Icon\n\t\tif(!$icon = Icon::generate($this->elements['header']['icon'])){\n\t\t\t//the icon attribute can either be in the header or in the main modal\n\t\t\t$icon = Icon::generate($this->icon);\n\t\t}\n\n\t\t# Badge\n\t\t$badge = Badge::generate($this->elements['header']['badge']);\n\n\t\t# ID\n\t\t$id = str::getAttrTag(\"id\", $this->elements['header']['id']);\n\n\t\t# Style\n\t\t$style = str::getAttrTag(\"style\", $this->elements['header']['style']);\n\n\t\t# Title colour\n\t\t$class[] = str::getColour($this->elements['header']['colour']);\n\n\t\t# Script\n\t\t$script = str::getScriptTag($this->elements['header']['script']);\n\n\t\t# The header title itself\n\t\t$title = $this->elements['header']['header'] . $this->elements['header']['title'] . $this->elements['header']['html'];\n\n\t\t# Title class\n\t\tif(!empty(array_filter($class))){\n\t\t\t$title_class = str::getAttrTag(\"class\", $class);\n\t\t\t$title = \"<span{$title_class}>$title</span>\";\n\t\t}\n\n\t\t# The div class\n\t\t$class = str::getAttrTag(\"class\", $this->elements['header']['class']);\n\n\t\t# If the modal can be dismissed\n\t\tif($this->dismissible !== false){\n\t\t\t$dismiss = <<<EOF\n<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\" title=\"Close this window\"></button>\nEOF;\n\t\t}\n\n\t\treturn <<<EOF\n<div{$id}{$class}{$style}>\n\t<div class=\"container\">\n \t\t<div class=\"row\">\n \t\t<div class=\"col-auto modal-title\">\n \t\t\t{$icon}{$title}{$badge}\n \t\t</div>\n \t\t<div class=\"col\">\n \t\t\t{$buttons}{$button}{$dismiss}\n \t\t</div>\n \t</div>\n\t</div>{$script}\n</div>\nEOF;\n\t}",
"function pxlz_edgtf_set_header_object() {\n $header_type = pxlz_edgtf_get_meta_field_intersect('header_type', pxlz_edgtf_get_page_id());\n $header_types_option = pxlz_edgtf_get_header_type_options();\n\n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if (Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\PxlzEdgefHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }",
"private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->headClass . \"'>\";\n $cs = 5;\n if ($this->view == 'week' || $this->view == 'day') {\n $h .= \"<th> </th>\";\n }\n if ($this->view == 'day') {\n $cs = 1;\n }\n\n if ($this->nav) {\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->prevClass . \"' href='\" . $this->prevLink() . \"'>\" . $this->prevIco . \"</a>\";\n $h .= \"</th>\";\n $h .= \"<th colspan='$cs'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n $h .= \"<th>\";\n $h .= \"<a class='\" . $this->nextClass . \"' href='\" . $this->nextLink() . \"'>\" . $this->nextIco . \"</a>\";\n $h .= \"</th>\";\n } else {\n $h .= \"<th colspan='7'>\";\n $h .= $month_name;\n $h .= \"</th>\";\n }\n $h .= \"</tr>\";\n $h .= \"</thead>\";\n\n $h .= \"<tbody>\";\n if ($this->view != 'day' && $this->view != 'week') {\n $h .= \"<tr class='\" . $this->labelsClass . \"'>\";\n\n for ($i = 0; $i <= 6; $i++) {\n $h .= \"<td>\";\n $h .= $this->dayLabels[$i];\n $h .= \"</td>\";\n }\n\n $h .= \"</tr>\";\n }\n if ($this->view == 'day' || $this->view == 'week') {\n $h .= self::getWeekDays();\n }\n\n $this->html .= $h;\n }",
"function studio_before_header_widget_area() {\n\n\tgenesis_widget_area( 'before-header', array(\n\t 'before' => '<div class=\"before-header\"><div class=\"wrap\">',\n\t 'after'\t => '</div></div>',\n\t) );\n}",
"public function full_header() {\n $header = new stdClass();\n $header->settingsmenu = $this->context_header_settings_menu();\n $header->handytoolbar = $this->context_handy_toolbar();\n $header->contextheader = $this->context_header();\n $header->hasnavbar = empty($this->page->layout_options['nonavbar']);\n $header->navbar = $this->navbar();\n $header->pageheadingbutton = $this->page_heading_button();\n $header->courseheader = $this->course_header();\n $template = 'theme_savoir/header';\n if ($this->is_on_frontpage()) {\n $template = 'theme_savoir/header_fp';\n $options = new stdClass();\n $options->noclean = true; // Don't clean Javascripts etc.\n $options->overflowdiv = false;\n $context = context_course::instance($this->page->course->id);\n $summary =\n file_rewrite_pluginfile_urls(\n $this->page->course->summary,\n 'pluginfile.php',\n $context->id,\n 'course',\n 'summary',\n null);\n $content = format_text($summary, $this->page->course->summaryformat, $options);\n if (!isloggedin()) {\n $header->loginurl = get_login_url();\n }\n $header->frontpageslogan = $content;\n $header->frontpagestitle = $this->page->course->shortname;\n $header->alertmessage = format_text(get_config('theme_savoir', 'fpmessage'), FORMAT_HTML);\n $header->alertenabled = get_config('theme_savoir', 'fpmessageenabled');\n } else if ($this->is_on_page_with_description()) {\n $header->pageslogan = get_string(preg_replace('/^theme-savoir-pages-/', '', $this->page->pagetype, 1) . '-description',\n 'theme_savoir');\n $header->bgimageurl = $this->image_url('genericbackground', 'theme_savoir');\n $template = 'theme_savoir/header_desc';\n }\n return $this->render_from_template($template, $header);\n }",
"protected function buildDomainObject($row) {\n\t\t$header = new Header();\n\t\t$header->setId($row['header_id']);\n\t\t$header->setText($row['header_text']);\n\t\treturn $header;\n\t}",
"public function context_header($headerinfo = null, $headinglevel = 1) {\n if ($headinglevel == 1 && !empty($this->page->theme->settings->logo)) {\n return html_writer::tag('div', '', array('class' => 'logo'));\n }\n return parent::context_header($headerinfo, $headinglevel);\n }",
"function drawHeader(){\n switch ($this->doing){\n case 'budget_byProjects':\n case 'myguests':\n if (!(@$this->t instanceof b_table)){\n\t$this->dbg('CANCEL header');\n\t$this->t = new b_table_dummy();\n }\n break;\n\n default:\n parent::drawHeader();\n break;\n }\n }",
"public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }",
"function msdlab_pre_header(){\n print '<div class=\"pre-header\">\n <div class=\"wrap\">';\n do_action('msdlab_pre_header');\n print '\n </div>\n </div>';\n }",
"public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }",
"function display_portal_header()\r\n {\r\n Display :: header(null);\r\n }",
"function megatron_ubc_clf_header($variables) {\n global $base_path;\n $output = '';\n if (theme_get_setting('clf_faculty')) {\n $output .= '<div id=\"ubc7-unit-name\"><a href=\"' . $base_path . '\"><span id=\"ubc7-unit-faculty\">' . theme_get_setting('clf_faculty_name');\n $output .= '</span><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n else {\n $output .= '<div id=\"ubc7-unit-name\" class=\"ubc7-single-element\"><a href=\"/\"><span id=\"ubc7-unit-identifier\">';\n $output .= '' . theme_get_setting('clf_unitname') . '</span></a></div>';\n }\n return $output;\n}",
"function &addHeader($type = 'all') {\r\n\t \tif (empty($this->rtf->oddEvenDifferent) && $type == 'all') {\r\n\t\t $header = new Header($this->rtf, $type);\r\n\t\t} else if (!empty($this->rtf->oddEvenDifferent) \r\n\t\t\t\t\t\t&& ($type == 'left' || $type == 'right')) {\t\t \r\n\t\t \t$header = new Header($this->rtf, $type);\t\r\n\t\t} else if ($type == 'first') {\r\n\t\t \t$header = new Header($this->rtf, $type);\t\r\n\t\t \t$this->titlepg = 1;\r\n\t\t} else {\t\t\t\r\n\t\t \treturn;\r\n\t\t}\t\t \r\n\r\n\t\t$this->headers[$type] = &$header;\r\n\t\treturn $header;\t\t\r\n\t}",
"function makeHeader(){\n\tglobal $pdf;\n\t\n\t// logo\n\t$pdf->Image('img/mepbro-pdf.png', 27, 27, 218);\n\t\n\t// title box\n\t$pdf->SetFillColor(51,102,255);\n\t$pdf->Rect(263, 27, 323, 72, 'F');\n\t// title lines\n\t$pdf->SetTextColor(255,255,255);\n\t$pdf->SetFont('Helvetica','B',34);\n\t$pdf->SetXY(263, 31);\n\t$pdf->Cell(323,36,'HOSE TEST', 0, 1, 'C');\n\t$pdf->SetXY(263, 64);\n\t$pdf->Cell(323,36,'CERTIFICATE', 0, 1, 'C');\n\t\n\treturn 126;\n\t\n}",
"function Header(){\n\t\t}",
"public function addHeader()\n {\n }",
"abstract public function header();",
"function vodi_page_header() {\n if ( is_page() && apply_filters( 'vodi_show_site_content_page_header', true ) ) : ?>\n <header class=\"page__header stretch-full-width\">\n <div class=\"container\">\n <?php if ( apply_filters( 'vodi_show_site_content_page_title', true ) ) : ?>\n <h1 class=\"page__title\"><?php echo esc_html( apply_filters( 'vodi_site_content_page_title', get_the_title() ) ); ?></h1>\n <?php endif; ?>\n <div class=\"page__header--aside\"><?php do_action( 'vodi_page_header_aside' ); ?></div>\n </div>\n </header><!-- .entry-header -->\n <?php endif;\n }",
"function display_header() {}",
"function renderHeader(&$header)\n {\n if ($name = $header->getName()) {\n $this->_ary['header'][$name] = $header->toHtml();\n } else {\n $this->_ary['header'][$this->_sectionCount] = $header->toHtml();\n }\n $this->_currentSection = $this->_sectionCount++;\n }",
"public function buildHeader() {\n $header['label'] = $this->t('Label');\n $header['workflow'] = $this->t('Workflow');\n $header['status'] = $this->t('Status');\n $header['transition'] = $this->t('Transitions');\n $header['roles'] = $this->t('Email Roles');\n $header['author'] = $this->t('Email Author');\n $header['emails'] = $this->t('Adhoc Emails');\n return $header + parent::buildHeader();\n }",
"function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }",
"public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }",
"public function buildHeader() {\n return [\n ['data' => t('Teaching format'), 'class' => ['align-middle']],\n ['data' => t('Event'), 'class' => ['align-middle']],\n ['data' => t('Tutor'), 'class' => ['align-middle']],\n ['data' => t('Location'), 'class' => ['align-middle']],\n ['data' => t('Room'), 'class' => ['align-middle']],\n [\n 'data' => t('Date/time'),\n 'field' => 'time.field_event_time_value',\n 'sort' => 'desc',\n 'class' => ['align-middle'],\n ],\n ['data' => t('Registration status'), 'class' => ['align-middle']],\n ];\n }",
"public function Header() {\n\t\t$x = 0;\n\t\t$dx = 0;\n\t\tif ($this->rtl) {\n\t\t\t$x = $this->w + $dx;\n\t\t} else {\n\t\t\t$x = 0 + $dx;\n\t\t}\n\n\t\t// print the fancy header template\n\t\tif($this->print_fancy_header){\n\t\t\t$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n\t\t}\n\t\tif ($this->header_xobj_autoreset) {\n\t\t\t// reset header xobject template at each page\n\t\t\t$this->header_xobjid = false;\n\t\t}\n\t\t\n\t\t$this->y = $this->header_margin;\n\t\t$this->SimpleHeader();\n\t\t//$tmpltBase = $this->MakePaginationTemplate();\n\t\t//echo $tmpltBase;die();\n\t\t//echo('trying to print header template: ');\n\t\t//$this->printTemplate($tmpltBase, $x, $this->y, 0, 0, '', '', false);\n\t\t//die();\n\t}",
"private static final function getHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n $containerHTMLHead = new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_container.tp');\r\n return $containerHTMLHead->doToken ('[%BASE_HREF_URL%]', DOCUMENT_HOST);\r\n }",
"function create_pool_header()\n{\n $header =\n \"<thead>\n <tr>\n <th scope='col' class='rounded-company'>Pool</th>\n <th scope='col' class='rounded-q1'>Priority</th>\n <th scope='col' class='rounded-q1' colspan='2'>URL</th>\n <th scope='col' class='rounded-q1'>Gets</th>\n <th scope='col' class='rounded-q1'>Accepts</th>\n <th scope='col' class='rounded-q1'>Rejects</th>\n <th scope='col' class='rounded-q1'>Discards</th>\n <th scope='col' class='rounded-q1'>Stales</th>\n <th scope='col' class='rounded-q1'>Get Fails</th>\n <th scope='col' class='rounded-q1'>Rem fails</th>\n </tr>\n </thead>\";\n\n return $header;\n}",
"public static function headerInner(string $pagina='') {?>\n \t\n <header class=\"container-fluid hero-inner\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"hero-txt\">\n <h1><?= $pagina ?></h1>\n </div>\n </div>\n </div>\n </header>\n \n <?php }",
"public function Header()\n {\n // Set custom header and footer\n $this->setCustomHeader();\n\n if (array_key_exists($this->category, $this->categories)) {\n $title = $this->categories[$this->category]['name'];\n } else {\n $title = '';\n }\n\n $this->SetTextColor(0, 0, 0);\n $this->SetFont($this->currentFont, 'B', 18);\n\n if (0 < PMF_String::strlen($this->customHeader)) {\n $this->writeHTMLCell(0, 0, '', '', $this->customHeader);\n $this->Ln();\n $this->writeHTMLCell(0, 0, '', '', html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 0, false, true, 'C');\n } else {\n $this->MultiCell(0, 10, html_entity_decode($title, ENT_QUOTES, 'utf-8'), 0, 'C', 0);\n $this->SetMargins(PDF_MARGIN_LEFT, $this->getLastH() + 5, PDF_MARGIN_RIGHT);\n }\n }",
"function bfa_add_html_inserts_header() {\r\n\tglobal $bfa_ata;\r\n\tif( $bfa_ata['html_inserts_header'] != '' ) bfa_incl('html_inserts_header'); \r\n}",
"public function Header() {\n $bMargin = $this->getBreakMargin();\n\n // Get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n\n // Disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n\n // Define the path to the image that you want to use as watermark.\n\t\tif($this->headerImage!='')\n\t\t{\n\t\t\t $header_logo = './'.$this->headerImage;\n\t\t\t \n\t\t}else{\n\t\t\t $header_logo = './assets/logo/Assetswatch.png';\n\t\t}\n\t\tif($this->watermarkImage!='')\n\t\t{\n\t\t\t$img_file = './'.$this->watermarkImage;\n\t\t}else{\n\t\t\t $img_file = './assets/logo/water-mark.png';\n\t\t}\n \n\t\t// echo $header_logo.\"<br>\";\n\t\t// echo $img_file.\"<br>\";\n\t\t // exit();\n // Render the image\n\t\t$this->Image($header_logo, 135,5, 55, 18, '', '', '', false, 300, '', false, false, 0);\n $this->Image($img_file, 53,100, '100px', '100px', '', '', '', false, 300, '', false, false, 0);\n\t\t\n\t\tif($this->headerContent!='')\n\t\t{\n\t\t\t$this->Cell(0, 10,$this->headerContent , 0, false, 'L', 0, '', 0, false, 'T', 'M');\n\t\t}else{\n\t\t\t$this->Cell(0, 10,'' , 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t\t}\n // Restore the auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n\n // Set the starting point for the page content\n $this->setPageMark();\n }",
"protected function _renderHeader()\n\t{\n\t\t\n\t\tif( $this->header !== false ) {\n\t\t\t\n\t\t\t$button = $this->_renderCloseButton();\n\t\t\t\n\t\t\tHtml::addCssClass( $this->headerOptions, [ 'section' => 'modal-header' ] );\n\t\t\t\n\t\t\treturn ''\n\t\t\t\t. \"\\n\" . Html::beginTag( 'div', $this->headerOptions )\n\t\t\t\t. \"\\n\" . $button\n\t\t\t\t. \"\\n\" . $this->header\n\t\t\t\t. \"\\n\" . Html::endTag( 'div' );\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public function create()\n {\n return view(\"backoffice.header.create\");\n }",
"protected function _createRowContainer()\n\t{\n\t\tif ($this->_tbody == null) {\n\t\t\t$this->_tbody = new HtmlElement('tbody');\n\t\t\t$this->addElement($this->_tbody);\t\t\t\n\t\t}\t\t\n\t}",
"public function Header() {\n // si la pagina es diferente de la 2\n // if (count($this->pages) !== 2) \n // {\n // Logo\n $image_file = K_PATH_IMAGES.'logoesen.jpg';\n $this->Image($image_file, 90, 5, 25, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Set font\n $this->SetFont('helvetica', 'B', 20);\n // Title\n //$this->Cell(0, 15, '<< TCPDF Example 003 >>', 0, false, 'C', 0, '', 0, false, 'M', 'M');\n // }\n }",
"function get_custom_header()\n {\n }",
"function generate_header_items() {\n\t\t$order = apply_filters( 'generate_header_items_order',\n\t\t\tarray(\n\t\t\t\t'header-widget',\n\t\t\t\t'site-branding',\n\t\t\t\t'logo',\n\t\t\t)\n\t\t);\n\n\t\tforeach ( $order as $item ) {\n\t\t\tif ( 'header-widget' === $item ) {\n\t\t\t\tgenerate_construct_header_widget();\n\t\t\t}\n\n\t\t\tif ( 'site-branding' === $item ) {\n\t\t\t\tgenerate_construct_site_title();\n\t\t\t}\n\n\t\t\tif ( 'logo' === $item ) {\n\t\t\t\tgenerate_construct_logo();\n\t\t\t}\n\t\t}\n\t}",
"function create_section_header($wp_customize, $panel_id) {\n $wp_customize->add_section( 'fyt_header' , [\n 'title' => 'Header',\n 'panel' => $panel_id,\n ]);\n\n /* Binome pour CHANGER LE NOM DANS LE HEADER */\n // Déclaration du paramètre 'setting'\n $wp_customize->add_setting( 'fyt_header_title', [] );\n // un élément de formulaire permettant d'attribuer une valeur au setting\n $wp_customize->add_control( 'fyt_header_title', array(\n 'type' => 'text',\n 'section' => 'fyt_header',\n 'label' => 'Titre dans le header',\n // 'description' => 'Select a title for the posts'\n ) );\n /* Fin du parametrage du binome */\n\n\n /* Binome pour selectionner LA COULEUR DE FOND DU HEADER */\n // Déclaration du paramètre 'setting'\n $wp_customize->add_setting( 'fyt_header_background_color',\n array(\n 'default' => '#FFA500',\n // 'sanitize_callback' => 'sanitize_hex_color',\n ) );\n // un élément de formulaire permettant d'attribuer une valeur au setting\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'fyt_header_background_color',\n array(\n 'label' => 'Background color du header',\n 'section' => 'fyt_header',\n 'settings' => 'fyt_header_background_color',\n )\n )\n );\n/* Fin du parametrage du binome */\n\n\n}",
"protected function renderHeader()\n {\n $output = '';\n $this->setDefaultHeader();\n foreach ($this->toolbar as $group) {\n if (empty($group['buttons'])) {\n continue;\n }\n $output .= $this->renderButtonGroup($group, true);\n }\n return Html::tag('div', $output, $this->headerOptions);\n }",
"function _header_module($options)\n\t{\n\t\tglobal $meta_fields;\t\t\t$height='';\n\t\n\t\tif ( isset ( $options['hm_header_style'] ) && !empty ( $options['hm_header_style'] ) ) { \n\t\t\t$style = 'uh_'.$options['hm_header_style'];\n\t\t} else { \n\t\t\t$style = '';\n\t\t}\n\t\tif ( !empty ( $options['hm_header_height'] ) ) {\t\t\t$height='style=\"height:'.$options['hm_header_height'].'px;min-height:'.$options['hm_header_height'].'px\"\"';\t\t}\n\n\t?>\n\t\t<div id=\"page_header\" class=\"<?php echo $style; ?> bottom-shadow\" <?php echo $height;?>>\n\t\t\t<div class=\"bgback\"></div>\n\t\t\t\n\t\t\t<div data-images=\"<?php echo IMAGES_URL; ?>/\" id=\"sparkles\"></div>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Breadcrumbs check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_bread'] ) && !empty ( $options['hm_header_bread'] ) ) {\n\t\t\t\t\t\t\t\tzn_breadcrumbs();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Date check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_date'] ) && !empty ( $options['hm_header_date'] ) ) {\n\t\t\t\t\t\t\t\techo '<span id=\"current-date\">'.date_i18n(get_option('date_format') ,strtotime(date(\"l M d, Y\"))).'</span>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"span6\">\n\t\t\t\t\t\t<div class=\"header-titles\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Title check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_title'] ) && !empty ( $options['hm_header_title'] ) ) {\n\t\t\t\t\t\t\t\tif ( isset ( $meta_fields['page_title'] ) && !empty ( $meta_fields['page_title'] ) ) {\n\n\t\t\t\t\t\t\t\t\techo '<h2>'.do_shortcode( stripslashes( $meta_fields['page_title'] ) ).'</h2>';\n\t\t\t\t\t\t\t\n\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\techo '<h2>'.get_the_title().'</h2>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t?> \n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Subtitle check\n\t\t\t\t\t\t\tif ( isset ( $options['hm_header_subtitle'] ) && !empty ( $options['hm_header_subtitle'] ) ) {\n\t\t\t\t\t\t\t\tif ( isset ( $meta_fields['page_subtitle'] ) && !empty ( $meta_fields['page_subtitle'] ) ) {\n\n\t\t\t\t\t\t\t\t\techo '<h4>'.do_shortcode( stripslashes( $meta_fields['page_subtitle'] ) ).'</h4>';\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div><!-- end row -->\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"zn_header_bottom_style\"></div>\n\t\t</div><!-- end page_header -->\n\t<?php\t\n\t}",
"public function drawHeader() {\n\t\t\t// Is there scope for using Smarty or similar here?\n\t\t\t// Note that we don't display the <form> for the search box if we're editing a page, because we end up with nested <form>s\n\t\t\t$html = '';\n\t\t\treturn $html;\n\t\t}",
"public function create()\n {\n return view(\"pages.admin.specification.hdr.create-hdr\",$this->data);\n }",
"function gutenberg_block_header_area() {\n\tgutenberg_block_template_part( 'header' );\n}",
"function Header()\n {\n\n\n //list($r, $b, $g) = $this->xheadercolor;\n $this->setY(5);\n //$this->SetFillColor($r, $b, $g);\n //$this->SetTextColor(0 , 0, 0);\n //$this->Cell(0,20, '', 0,1,'C', 1);\n //$this->Text(15,26,$this->xheadertext );\n \n \n // get the current page break margin\n $bMargin = $this->getBreakMargin();\n // get current auto-page-break mode\n $auto_page_break = $this->AutoPageBreak;\n // disable auto-page-break\n $this->SetAutoPageBreak(false, 0);\n // set bacground image\n $img_file = WWW_ROOT.'/img/Resul_Agua.jpg';\n $this->Image($img_file, 0, 0, 216, 279, '', '', '', false, 300, '', false, false, 0);\n // restore auto-page-break status\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n // set the starting point for the page content\n $this->setPageMark();\n \n\n $this->writeHTML($this->xheadertext, true, false, true, false, '');\n\n // Transformacion para la rotacion de el numero de orden y el contenedor de la muestra\n $this->StartTransform();\n //$this->SetFont('freesans', '', 5);\n $this->SetFont('', '', 5);\n $this->Rotate(-90, 117, 117);\n //$tcpdf->Rect(39, 50, 40, 10, 'D');\n $this->Text(5, 30, 'Software Asistencial Médico \"SAM\" V.1.1 ® - https://samsalud.info ®');\n // Stop Transformation\n $this->StopTransform();\n\n // if ( $this->variable == 1 )\n // {\n // draw jpeg image x, y ancho, alto\n // $this->Image(WWW_ROOT.'/img/BORRADOR.png', 40, 60, 450, 250, '', '', '', true, 72);\n\n // restore full opacity\n $this->SetAlpha(0);\n // }\n\n }",
"function circle_header_content() {\n\tget_template_part( 'template-parts/header-content' );\n}",
"function initialize () {\n $this->set_openingtag(\"<HEADER[attributes]>\");\n\t $this->set_closingtag(\"</HEADER>\");\n }",
"function get_header_image()\n {\n }",
"function heading( $element )\n\t\t{\t\n\t\t\t$extraclass = $required = \"\";\t\n\t\t\tif(isset($element['required'])) \n\t\t\t{ \n\t\t\t\t$required = '<input type=\"hidden\" value=\"'.$element['required'][0].'::'.$element['required'][1].'\" class=\"ace_required\" />'; \n\t\t\t\t$extraclass = ' ace_hidden ace_required_container';\n\t\t\t} \n\t\t\t\n\t\t\tif(isset($element['class'])) $extraclass .= ' '.$element['class'];\n\t\t\n\t\t\t$output = '<div class=\"ace_section ace_'.$element['type'].' '.$extraclass.'\" id=\"ace_'.$element['id'].'\">';\n\t\t\t$output .= $required;\n\t\t\tif($element['name'] != \"\") $output .= '<h4>'.$element['name'].'</h4>';\n\t\t\t$output .= $element['desc'];\n\t\t\t$output .= '</div>';\n\t\t\treturn $output;\n\t\t}",
"function header_container_start() { ?>\n\t<!--#slider-container-->\n\t<div id=\"slider-container\">\n<?php\n}",
"public function setUp() {\n $this->container = new HeaderContainer();\n }",
"public function renderHeader()\n {\n if ($this->title !== false || $this->headerPrependTitle !== false || $this->headerAppendTitle !== false) {\n echo CHtml::openTag('div', $this->htmlHeaderOptions);\n\n $this->renderMenu();\n $this->_renderPrependTitle();\n\n if ($this->title) {\n $this->title = '<h3 class=\"bootstrap-widget-header__title\">' . $this->title . '</h3>';\n if ($this->headerIcon) {\n $this->title = '<i class=\"' . $this->headerIcon . '\"></i>' . $this->title;\n }\n echo $this->title;\n }\n $this->_renderAppendTitle();\n $this->renderButtons();\n\n echo CHtml::closeTag('div');\n }\n }",
"public function create()\n {\n return view('backoffice.main.createPageHeader');\n }",
"function get_header(){\n\t\tglobal $FANNIE_ROOT;\n\t\tob_start();\n\t\t$page_title = $this->title;\n\t\t$header = $this->header;\n\t\tinclude($FANNIE_ROOT.'src/header_install.html');\n\t\treturn ob_get_clean();\n\n\t}",
"function custom_header_container(){?>\n<?php \n}",
"function header() {\n\t\techo '<div class=\"wrap\">';\n\t\tscreen_icon();\n\t\techo '<h2>' . __( 'JigoShop To WooCommerce Converter', 'woo_jigo' ) . '</h2>';\n\t}",
"protected function createHeaderDriver()\n {\n $determiner = new Determiners\\Header(\n $this->app['config']['localize-middleware']['header']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\n }",
"public function _assign_xoops_header()\n {\n $header_class = webphoto_xoops_header::getInstance($this->_DIRNAME, $this->_TRUST_DIRNAME);\n $header_class->set_flag_css(true);\n $header_class->assign_for_main();\n }",
"function has_custom_header()\n {\n }",
"function add_custom_shop_header(){ ?>\n \n \n <?php if ( is_woocommerce() || is_shop() || is_cart() || is_product() || is_checkout() ) : ?>\n \n \t<!-- our custom header codes here -->\n\t\t \n\t<div class=\"e242-1 x-section _before _gradient-overlay\" id=\"inner-hero\">\n \t\t \n\t\t<div class=\"e242-2 x-container max width\">\n\t\t\t<div class=\"e242-3 x-column x-sm x-1-1\">\n\t\t\t <div class=\"x-text -white head-title _max-1000 _center\"><h1>Bookstore</h1></div>\n\t\t\t</div>\n\t\t</div>\n </div>\n\t\t \n <?php endif; ?>\n \n<?php }",
"function amply_default_header_header1_elements_outer_section( $wp_customize ) {\n\t$wp_customize->add_section(\n\t\t'amply_default_header_header1_elements_outer_section',\n\t\tarray(\n\t\t\t'title' => esc_html__( 'Header 1 Elements', 'amply' ),\n\t\t\t'priority' => 0,\n\t\t\t'type' => 'outer',\n\t\t)\n\t);\n}",
"function Header() {\r\n $this->Image($this->logourl, 6, 5, 12,12);\r\n $this->SetFont('courier', '', 8);\r\n $this->SetY(11);\r\n $this->SetX(19);\r\n// $this->SetTextColor(224,17,36);\r\n $this->SetTextColor(1,152,74);\r\n $this->SetFont('courier', 'B', 10);\r\n $this->Cell(55, 4, $this->companyname, 0, 0, 'L');\r\n $this->SetY(14);\r\n $this->SetX(19);\r\n $this->SetFont('courier', 'B', 8);\r\n// $this->SetTextColor(1,152,74);\r\n $this->SetTextColor(224,17,36);\r\n $this->Cell(55, 4, $this->companyaddress, 0, 0, 'L');\r\n $this->SetTextColor(0);\r\n $this->SetY(10);\r\n $this->SetX(130);\r\n// $this->Cell(75, 4, 'Department : ' . $this->dataheader[0], 0, 0, 'R', false);\r\n \r\n $this->SetFont('courier', 'B', 14);\r\n \r\n $this->SetY(12);\r\n $this->SetX(5);\r\n $this->Cell(200, 6, $this->metadata['Title'], 0, 0, 'C');\r\n $this->SetY(18);\r\n $this->SetFont('courier', '', 8);\r\n $this->Cell(200, 5, $this->dataheader[0], 0, 0, 'C');\r\n// $this->Cell(200, 5, 'test', 0, 0, 'C');\r\n $this->SetY(22);\r\n \r\n $this->SetFont('courier', 'B', 8);\r\n $this->Ln(1);\r\n }",
"private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\t\t} else {\n\t\t\t\t$head .= $this->curMonthName.', '.$this->curYear;\n\t\t\t}\n\t\t\t$head .= \"</th>\\n\\t</tr>\\n\";\n\t\t} else {\n\t\t\t$head = $this->headerStr;\n\t\t}\n\t\t\n\t\t$this->calWeekDays .= $head;\n\t\t$this->outArray['head'] = $head;\n\t}",
"function omega_entry_header() {\n\n\techo '<header class=\"entry-header\">';\n\n\tget_template_part( 'partials/entry', 'title' ); \n\n\tif ( 'post' == get_post_type() ) : \n\t\tget_template_part( 'partials/entry', 'byline' ); \n\tendif; \n\techo '</header><!-- .entry-header -->';\n\t\n}",
"function horizon_header( $title, $description, $blockquote = '') {\n\t\t?>\n\t\t<header class=\"horizon-header\">\n\t\t\t<h2 class=\"title\"><?php echo wp_kses( $title, array('span' => array() ) ); ?></h2>\n\t\t\t<span class=\"sep\"></span>\n\t\t\t<p class=\"desc\"><?php echo esc_html( $description ); ?></p>\n\t\t</header><!-- .horizon-header -->\n\n\t\t<?php if ( ! empty( $blockquote ) ) : ?>\n\t\t\t<blockquote class=\"horizon-blockquote\">\n\t\t\t\t<p><?php echo esc_html( $blockquote ); ?></p>\n\t\t\t</blockquote>\n\t\t<?php endif; ?>\n\t<?php\n\t}",
"abstract protected function header();",
"function get_custom_header_markup()\n {\n }",
"function addHeadElement($include) {\n\t $this->_headSection .= $include . \"\\n\";\n\t}",
"protected function renderHeader($unit) {\n $draw = $this->getDraw();\n $draw->setFillColor('#000000');\n $draw->setStrokeWidth(0);\n $draw->setFontSize(20);\n\n $x = $this->currentX + $this->margin;\n $y = $this->currentY;\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 3, $y + 3);\n\n if($unit['slot'] != 'NA') {\n $gon = new Imagick();\n $gon->readImage('../assets/icon_'.$unit['slot'].'.png');\n $gon->resizeimage(35, 35, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 9, $y + 7);\n }\n\n $gon = new Imagick();\n $gon->readImage('../assets/octagon.png');\n $gon->resizeimage(45, 45, \\Imagick::FILTER_LANCZOS, 1);\n $this->image->compositeImage($gon, Imagick::COMPOSITE_DEFAULT, $x + 55, $y + 3);\n $draw->setFont('../assets/title_font.otf');\n $draw->setFontSize(26);\n\n $draw->setFillColor('#FFFFFF');\n if(strlen($unit['power']) == 1) {\n $this->image->annotateImage($draw, 71 + $x, $y + 33, 0, $unit['power']);\n } else if(strlen($unit['power']) == 3) {\n $this->image->annotateImage($draw, 56 + $x, $y + 33, 0, $unit['power']);\n } else{\n $this->image->annotateImage($draw, 64 + $x, $y + 33, 0, $unit['power']);\n }\n\n # unit name:\n $draw->setFillColor('#000000');\n $iters = 0;\n $title = $unit['customName'] ? $unit['customName'] : $unit['title'];\n $title_size = 28;\n $draw->setFontSize($title_size);\n $draw->setFont('../assets/title_font.otf');\n $check = $this->image->queryFontMetrics($draw, strtoupper($title));\n $maxNameWidth = 420;\n while($iters < 6 && $check['textWidth'] > $maxNameWidth) {\n $iters += 1;\n $title_size -= 2;\n $draw->setFontSize($title_size);\n $check = $this->image->queryFontMetrics($draw, strtoupper($unit['title']));\n }\n $title_x = $x + 110;\n $this->image->annotateImage($draw, $title_x, $y + 40, 0, strtoupper($title));\n $this->currentY += 50;\n $this->renderLine();\n }",
"public function page_header(){\n\t\t$e = $this->Empresa->salida;\n\t\t$this->Empresa->where('id',$this->Empresa->user);\n\t\t$fondo = $this->Empresa->getOne('empresa_fondo','img_fondo');\n\t\t\n\t\t$link = 'index.php?inmv='.$e['nik_empresa'];\t\t\n\t\t$return = '<div class=\"page-header\" style=\"background-image: url(imagenes/fondos/'.$fondo['img_fondo'].');\">';\n\t\t$return .= '<div class=\"header-info\">';\n\t\t$return .= '<div class=\"row\">';\n\t\t$return .= '<div class=\"logo-header\"><a href=\"'.$link.'\"><img src=\"imagenes/logo/'.$e['img'].'\" /></a></div>';\n\t\t$return .= '<div class=\"header-desc col-md-6 visible-md visible-lg\">';\n\t\t$return .= '<h1>'.$e['descripcion'].'</h1>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\t$return .= '</div>';\n\t\treturn $return;\n\t}",
"function Header()\n {\n $this->m_projectedHeaderCounts = new ShadowCounts();\n }",
"private function displayHeader()\n {\n\n $html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">' . \"\\n\";\n $html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\">';\n $html .= '<head>' . \"\\n\";\n\n //Meta tags\n $html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />' . \"\\n\";\n $html .= '<meta name=\"description\" content=\"' . $this->pageInfo['pageDescription'] . '\" />' . \"\\n\";\n $html .= '<meta name=\"keywords\" content=\"jobs, freelance, work, design, freedom, choice, new zealand, quality\" />' . \"\\n\";\n $html .= '<link rel=\"icon\" type=\"image/png\" href=\"images/volition-icon.png\" />' . \"\\n\";\n\n //Stylesheets\n $html .= '<!-- Stylesheets -->' . \"\\n\";\n $html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\" />' . \"\\n\";\n $html .= '<!--[if lt IE 9]>' . \"\\n\";\n $html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/ie.css\" />' . \"\\n\";\n $html .= '<![endif]-->' . \"\\n\";\n\n //Scripts\n //$html .= '<script type=\"text/javascript\" src=\"js/window.js\"></script>'.\"\\n\";\n\n //Page title\n $html .= '<title>Volition | ' . $this->pageInfo['pageTitle'] . '</title>' . \"\\n\";\n $html .= '</head>' . \"\\n\";\n $html .= '<body>' . \"\\n\";\n\n //Header\n $html .= '<div id=\"header\">' . \"\\n\";\n\n //Control buttons\n\n $html .= '<div id=\"headerImg\"><a href=\"index.php?page=home\"></a></div>' . \"\\n\";\n\n if ($this->model->userLoggedIn) {\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=logout\">Logout</a></p>' . \"\\n\";\n $html .= '<p class=\"userControl\">You are logged in as ' . $_SESSION['userName'] . '</p>' . \"\\n\";\n } else {\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=login\">Login</a></p>' . \"\\n\";\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=register\">Register</a></p>' . \"\\n\";\n }\n\n $html .= '<form id=\"searchForm\" method=\"post\" action=\"index.php?page=search\">';\n if ($_POST['searchInput']) {\n $html .= '<input type=\"text\" name=\"searchInput\" id=\"searchInput\" value=\"' . $_POST['searchInput'] . '\" />';\n } else {\n $html .= '<input type=\"text\" name=\"searchInput\" id=\"searchInput\" value=\"Search...\" />';\n }\n $html .= '<input type=\"submit\" class=\"submit\" name=\"searchSubmit\" id=\"searchSubmit\" value=\"Go\" />';\n $html .= '</form>';\n\n //Navbar\n $html .= $this->displayNav();\n\n $html .= '</div>' . \"\\n\";\n //Content tags\n $html .= '<div id=\"container\">' . \"\\n\";\n $html .= '<div id=\"content\" >' . \"\\n\";\n\n return $html;\n\n }",
"protected function parseHeader( XTemplate $xtpl, ItemCollection $entidades, CriterioBusqueda $criterio ){\n\t\t$xtpl->assign( 'header', $this->getHeader($entidades, $criterio));\n\t\t$xtpl->parse('main.header');\n\t\n\t}",
"public function put_on_header() {\n\t\t$this->items[ $this->id ]['in_footer'] = false;\n\t\treturn $this;\n\t}",
"public function addHeader(){\n$this->page.= <<<EOD\n<html>\n<head>\n</head>\n<title>\n$this->title\n</title>\n<body>\n<h1 align=\"center\">\n$this->title\n</h1>\nEOD;\n}"
] | [
"0.69501317",
"0.6624627",
"0.64704645",
"0.6257379",
"0.611662",
"0.600705",
"0.598772",
"0.598313",
"0.5980321",
"0.5979505",
"0.58945435",
"0.58895266",
"0.5871452",
"0.5825438",
"0.58023465",
"0.5792442",
"0.5769272",
"0.57636344",
"0.5749514",
"0.5722273",
"0.57159126",
"0.5699507",
"0.5688829",
"0.56546587",
"0.5587937",
"0.55856407",
"0.55710685",
"0.55455065",
"0.5543794",
"0.5538596",
"0.55316305",
"0.5531416",
"0.5528201",
"0.55232847",
"0.55118775",
"0.54978925",
"0.54950774",
"0.54887676",
"0.54873383",
"0.54860085",
"0.54810536",
"0.54704225",
"0.5446043",
"0.5445952",
"0.5442784",
"0.5429143",
"0.54022336",
"0.5397707",
"0.53976315",
"0.5396808",
"0.53884465",
"0.5383058",
"0.53809613",
"0.5380847",
"0.53619623",
"0.53541434",
"0.5351123",
"0.53428364",
"0.534083",
"0.5339272",
"0.53349257",
"0.533192",
"0.5324065",
"0.53045297",
"0.5298748",
"0.5288769",
"0.5287002",
"0.52718294",
"0.52684194",
"0.5265502",
"0.5264307",
"0.52596444",
"0.52513033",
"0.5250339",
"0.52473265",
"0.5244469",
"0.52434236",
"0.524326",
"0.52397215",
"0.52364534",
"0.52357256",
"0.5228574",
"0.52261674",
"0.521906",
"0.5217815",
"0.5215006",
"0.5209483",
"0.5204722",
"0.5204307",
"0.52014214",
"0.51853603",
"0.5185031",
"0.5182738",
"0.51792663",
"0.5175548",
"0.51741576",
"0.51638657",
"0.5155015",
"0.5146228",
"0.51403785"
] | 0.8115961 | 0 |
Validate the form date | public function adminlogin(Request $request){
$this->validate($request, [
'email'=>'required|email',
'password'=>'required|min:6',
]);
//Attempt to login Admin
if(Auth::guard('admin')->attempt(['email'=>$request->email, 'password'=>$request->password], $request->remember)){
//if SuccessFully done
return redirect()->intended(route('dashboard'));
}
//if not SuccessFull than
return redirect()->back()->with('status', 'Email Address And Password Are Not Match !');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function validate_date() {\n # Check the date is in ISO date format\n if (ereg('(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])', $this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error(\"Validation for date ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Blank Date\n return \"0000-00-00\";\n }\n }",
"protected function validateDate($value) {\n if (preg_match(\"/^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$/\", $value))\n return true;\n $this->setError(t(\"Invalid date (YYYY-MM-DD)\"));\n return false;\n }",
"public function checkDate($date)\n\t{\n\t\tif (preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$date)){\n\t return true;\n\t }\n\t else{\n\t \t$this->form_validation->set_message('checkDate','date should be as yyyy-mm-dd');\n\t return false;\n\t }\n\t}",
"public function isValidDate() {\n\t\t// TODO\n\t\treturn TRUE;\n\t}",
"public function Date()\n {\n $action = 'rakelley\\jhframe\\classes\\ArgumentValidator';\n $arguments = [\n 'requires' => [\n 'date' => ['filters' => ['date' => 'Y-m-d']],\n ],\n 'method' => 'post',\n ];\n\n $result = $this->actionController->executeAction($action, $arguments);\n $content = ($result->getSuccess()) ?:\n 'Field must be a valid \"YYYY-MM-DD\" Date';\n\n $result->setContent($content)\n ->Render();\n }",
"function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}",
"function validateDate($date)\n\t\t{\n\t\t\t$d = DateTime::createFromFormat('Y-m-d', $date);\n\t\t\treturn $d && $d->format('Y-m-d') == $date;\n\t\t}",
"function validate_date($date) {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }",
"function _fourD_analysis_validate_date( $d ) {\n $ymd = explode('-', $d );\n \n if( sizeof($ymd) != 3 || strlen($ymd[0]) != 4 || ((int)$ymd[1]) < 1 || ((int)$ymd[2]) < 1 ){\n return false;\n }\n else{\n $ymd[1] = str_replace('0', '', $ymd[1]);\n $ymd[2] = str_replace('0', '', $ymd[2]);\n if($ymd[1] < 10) $ymd[1] = \"0\" . $ymd[1]; // pad month with leading 0\n if($ymd[2] < 10) $ymd[2] = \"0\" . $ymd[2]; // pad day with leading 0\n $ymd[3] = $ymd[0].'-'.$ymd[1].'-'.$ymd[2];\n $epoch = strtotime( $ymd[3] );\n // fourD_analysis_debug('form_parts_validate; $ymd[3]: '. $ymd[3].'; epoch: '.$epoch );\n \n //if( !$time || $time <= time() ){ // Allow past dates? What about editing an old project?\n // $err = 'Date must be in the future.';\n if( $epoch > 1 ){\n return $epoch;\n }\n }\n return false;\n}",
"public function checkDateVisit(){\n $yearError = new DaYearError($this->record[\"DateVisit\"]);\n if($yearError->getErrorType() != DaYearError::ERR_NONE){\n $this->addError(\"[DateVisit] invalid: \\\"{$yearError}\\\" \");\n return false;\n }\n return true;\n }",
"public static function validateDate($date) {\r\n if(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $date)) // has to be YYYY-MM-DD\r\n {\r\n $dt = new DateTime($date);\r\n $d = $dt->format(self::dateDay);\r\n $m = $dt->format(self::dateMonth);\r\n $y = $dt->format(self::dateYear);\r\n if(!checkdate($m, $d, $y))\r\n {\r\n throw new Exception(\"Das Datum [\".$date.\"] entspricht keinem gültigen Format\");\r\n }\r\n else\r\n {\r\n return true; \r\n }\r\n }\r\n else\r\n {\r\n throw new Exception(\"Das Datum [\".$date.\"] entspricht nicht dem Format 'YYYY-MM-DD'\");\r\n }\r\n }",
"function validate_date_picker_field($field)\n {\n }",
"private function validatePassportIssuedDate() {\n $issued_date = DateTime::createFromFormat( 'd.m.Y', $this->passport_issued_date );\n\n if ( $issued_date < DateTime::createFromFormat( 'd.m.Y', '01.10.1997' ) ) {\n $this->errors[] = [ 'Паспорт должен быть выдан не позднее 1 октября 1997 года' ];\n }\n\n if ( $issued_date > new DateTime( 'tomorrow' ) ) {\n $this->errors[] = [ 'Паспорт не может быть выдан в будущем' ];\n }\n }",
"public function validateDate(){\n \t$attrs = ['requested_at', 'replied_at', 'fixed_begin', 'fixed_end'];\n \tforeach ($attrs as $a){\n \t\tif (is_array($d = $this->getAttribute($a)) && array_key_exists('date', $d) && array_key_exists('time', $d)){\n \t\t\t$fmt = ['Y-m-d H:i:s', 'Y-m-d H:i', 'Y-m-d H', 'Y-m-d '];\n \t\t\tforeach ($fmt as $f){\n\t \t\t\t$date = \\DateTime::createFromFormat($f, $d['date'] . ' ' . $d['time']);\n\t \t\t\tif (is_object($date)){\n\t \t\t\t\t$this->setAttribute($a, $date->format('Y-m-d H:i:s'));\n\t \t\t\t\tbreak;\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }",
"public function validate () {\n\t\tlist($valid, $value) = parent::validate();\n\t\tif (!$valid) {\n\t\t\t$error_message = $this->get('error_invalid', 'Invalid date: %s');\n\t\t\t$this->error($value = sprintf($error_message, $this->getRawValue()));\n\t\t} else {\n\t\t\t$value = FString::date($value, $this->get('format', FString::DATE_MYSQL));\n\t\t}\n\t\treturn array($valid, $value);\n\t}",
"public function validateDate()\n {\n if (\n ($from = $this->getAvailableFrom()) &&\n ($till = $this->getAvailableTill()) &&\n $from->InPast() &&\n $till->InFuture()\n ) {\n return true;\n }\n\n return false;\n }",
"function valid_date( $value = '', $format = 'Y-m-d H:i:s' )\n\t{\n\t\t$date = date_parse($value);\n\t\t$valid = ( $date['error_count'] == 0 && checkdate($date['month'], $date['day'], $date['year']) );\n\t\t\n\t\t/*\n\t\t// Create a date depending on PHP version\n\t\t$version = explode('.', phpversion());\n\t\tif (((int) $version[0] >= 5 && (int) $version[1] >= 2 && (int) $version[2] > 17))\n\t\t{\n\t\t\t$d = DateTime::createFromFormat($format, $date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$d = new DateTime(date($format, strtotime($date)));\n\t\t}\n\t\t*/\n\t\t/*\n\t\t// Check valid date\n\t\t$format = 'Y-m-d H:i:s';\n\t\t$d = new DateTime(date($format, strtotime($date)));\n\t\t$valid_date = ( $d && $d->format($format) == $date );\n\t\t// or\n\t\t$date = date_parse($date);\n\t\t$valid_date = ( $date['error_count'] == 0 && checkdate($date['month'], $date['day'], $date['year']) );\n\t\tif ( ! $valid_date )\n\t\t{\n\t\t\t$valid = false;\n\t\t\t$return_message[] = 'The approved date is invalid.';\n\t\t}\n\t\t*/\n\t\t\n\t\tif ( ! $valid )\n\t\t{\n\t\t\t$this->set_message('valid_date', 'The %s field has in invalid date.');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"function isDateValid($dateInput){\n\t\t$d = DateTime::createFromFormat('Y-m-d', $dateInput);\n\t\treturn $d && $d->format('Y-m-d') === $dateInput;\n\t}",
"public static function validate_date( $date )\n {\n return preg_match(\n '/^(19|20)\\d\\d-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/',\n $date );\n }",
"private function validate_booking(): bool {\n\t $this->errors = array();\n\n // Clear data using test_input function\n foreach ($this->request->post as $key => $value) {\n $this->request->post[$key] = self::test_input($this->request->post[$key]);\n }\n\n // Time\n if(!(preg_match(\"/^(?:2[0-3]|[01][0-9]):[0-5][0-9]$/\", $this->request->post[\"time\"]))){\n array_push($this->errors,$this->language->get('time_error'));\n }\n\n // Date\n $temp = new DateTime();\n\n // Create date object (without time)\n $date = DateTime::createFromFormat('Y-m-d', $this->request->post[\"date\"]);\n\n // Remove time from datetime string\n $now = DateTime::createFromFormat(\"Y-m-d\", $temp->format(\"Y-m-d\"));\n\n // Extract data\n $year = $date->format(\"Y\");\n $month = $date->format(\"m\");\n $day = $date->format(\"d\");\n\n if($date < $now){\n array_push($this->errors,$this->language->get('date_past_error'));\n }\n else if(!checkdate($month,$day,$year)) {\n //$this->errors[\"date\"] = $this->language->get('date_error');\n array_push($this->errors,$this->language->get('date_value_error'));\n }\n\n //TODO: REMOVE\n return count($this->errors) == 0;\n }",
"function validateDate($date,$format ='Y-m-d'){\n$d = dateTime::createFromFormat($format,$date);\n\nif($d && $d->format($format) == $date){\nreturn true;\n } else {\n return false;\n }\n}",
"function _valid_date($field)\r\n\t{\r\n\t\t// Ignore if empty\r\n\t\tif (empty($this->{$field}))\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\r\n\t\t$date = date_parse($this->{$field});\r\n\r\n\t\treturn checkdate($date['month'], $date['day'],$date['year']);\r\n\t}",
"function __validFecha2($fecha){\n $test_arr = explode('-', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[2], $test_arr[0])) {//YEAR / MES / DIA\n return true;\n }\n return false;\n }\n return false;\n }",
"public function validateDate($data)\n {\n\n if($data =='now' || (strlen($data)>=8 && strlen($data)<=10)) {\n try {\n $value_time = new DateTime($data);\n return true;\n } catch (Exception $e) {\n // Is not a valida Date\n }\n }\n return false;\n }",
"public function isValidPaydate($date);",
"function validateDateFormat($date, $field)\n\t{\n\t\tif (preg_match (\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $date, $parts))\n\t\t{\n\t\t //check weather the date is valid of not\n\t\t\t\t\tif(checkdate($parts[2],$parts[3],$parts[1]))\n\t\t\t\t\t\treturn true;\n\t\t\t\t\telse\n\t\t\t\t\t return $this->setError(10011, \"error\", \"\", $field);\n\t\t}\n\t\telse\n\t\t\treturn $this->setError(10011, \"error\", \"\", $field);\n\t}",
"function validateDate($postVar, $value, $error) {\n $errorMsg = \"\";\n $length = strlen(trim($postVar));\n\n //checking if the length isset or not\n if ($length) {\n if (isset($value)) {\n $found = strpos($value, ',');\n if ($found === false) {\n $options [0] = $value;\n } else {\n $options = explode(\",\", $value);\n }\n } else {\n $options [0] = 'dd-mm-yyyy';\n }\n\n $patternMatch = 0;\n\n foreach ($options as $opt) {\n $pos1 = strpos($opt, '-');\n $pos2 = strpos($opt, '/');\n $pos3 = strpos($opt, '.');\n\n if ($pos1 !== false) {\n if ($pos1 == 2) {\n if (strlen($opt) == 8)\n $regexp = '/^[0-9]{2}[\\-][0-9]{2}[\\-][0-9]{2}$/';\n else\n $regexp = '/^[0-9]{2}[\\-][0-9]{2}[\\-][0-9]{4}$/';\n }\n if ($pos1 == 4)\n $regexp = '/^[0-9]{4}[\\-][0-9]{2}[\\-][0-9]{2}$/';\n }\n\n if ($pos2 !== false) {\n if ($pos2 == 2) {\n if (strlen($opt) == 8)\n $regexp = '/^[0-9]{2}[\\/][0-9]{2}[\\/][0-9]{2}$/';\n else\n $regexp = '/^[0-9]{2}[\\/][0-9]{2}[\\/][0-9]{4}$/';\n }\n if ($pos2 == 4)\n $regexp = '/^[0-9]{4}[\\/][0-9]{2}[\\/][0-9]{2}$/';\n }\n\n if ($pos3 !== false) {\n if ($pos3 == 2) {\n if (strlen($opt) == 8)\n $regexp = '/^[0-9]{2}[\\.][0-9]{2}[\\.][0-9]{2}$/';\n else\n $regexp = '/^[0-9]{2}[\\.][0-9]{2}[\\.][0-9]{4}$/';\n }\n if ($pos3 == 4)\n $regexp = '/^[0-9]{4}[\\.][0-9]{2}[\\.][0-9]{2}$/';\n }\n\n if (preg_match($regexp, $postVar)) {\n $patternMatch = 1;\n if ((isset($pos1) && $pos1 == 2) || (isset($pos2) && $pos2 == 2) || (isset($pos3) && $pos3 == 2)) {\n $str1 = substr($opt, 0, 2);\n $str2 = substr($opt, 3, 2);\n\n if ($str1 == 'dd') {\n $DD = substr($postVar, 0, 2);\n $MM = substr($postVar, 3, 2);\n $YY = substr($postVar, 6);\n }\n if ($str1 == 'mm') {\n $MM = substr($postVar, 0, 2);\n $DD = substr($postVar, 3, 2);\n $YY = substr($postVar, 6);\n }\n if ($str1 == 'yy') {\n if ($str2 == 'mm') {\n $YY = substr($postVar, 0, 2);\n $MM = substr($postVar, 3, 2);\n $DD = substr($postVar, 6);\n } else {\n $MM = substr($postVar, 0, 2);\n $DD = substr($postVar, 3, 2);\n $YY = substr($postVar, 6);\n }\n }\n }\n\n if ((isset($pos1) && $pos1 == 4) || (isset($pos2) && $pos2 == 4) || (isset($pos3) && $pos3 == 4)) {\n $str = substr($opt, 5, 2);\n\n if ($str == 'dd') {\n $YY = substr($postVar, 0, 4);\n $DD = substr($postVar, 5, 2);\n $MM = substr($postVar, 8, 2);\n }\n if ($str == 'mm') {\n $YY = substr($postVar, 0, 4);\n $MM = substr($postVar, 5, 2);\n $DD = substr($postVar, 8, 2);\n }\n }\n\n if ($DD == 0 || $MM == 0 || $YY == 0) {\n $errorMsg .= \"Invalid Date...<br>\";\n }\n\n if ($MM <= 12) {\n switch ($MM) {\n case 4 :\n case 6 :\n case 9 :\n case 11 :\n if ($DD > 30) {\n $errorMsg .= \"Selected month has maximum 30 days.<br>\";\n }\n default :\n if ($DD > 31) {\n $errorMsg .= \"Selected month has maximum 31 days.<br>\";\n }\n break;\n }\n } else {\n $errorMsg .= \"Selected month more than 12 month.<br>\";\n }\n\n if (($YY % 4) == 0) {\n if (($MM == 2) && ($DD > 29)) {\n $errorMsg .= \"Invalid days in February for leap year.<br>\";\n }\n } else {\n if (($MM == 2) && ($DD > 28)) {\n $errorMsg .= \"Invalid days in February for non leap year.<br>\";\n }\n }\n }\n\n if ($patternMatch)\n break;\n }\n\n if (!$patternMatch)\n $errorMsg .= $error;\n }\n return $errorMsg;\n }",
"function is_date_valid($date)\n{\n $is_date_valid = false;\n\n if (strtotime($date)) {\n list($day, $month, $year) = explode('.', $date);\n $is_date_valid = checkdate($month, $day, $year);\n }\n\n return $is_date_valid;\n}",
"public function testDate()\n {\n $this->assertTrue(BrValidation::date('01/01/2020'));\n $this->assertTrue(BrValidation::date('12/11/2019'));\n $this->assertTrue(BrValidation::date('21/04/1940'));\n $this->assertTrue(BrValidation::date('1/3/20'));\n\n $this->assertFalse(BrValidation::date('25-12-2000'), 'BR date accept only slash as separator');\n $this->assertFalse(BrValidation::date('04/21/1980'), 'BR date accept only day/month/year sequence');\n $this->assertFalse(BrValidation::date('2000-12-25'));\n $this->assertFalse(BrValidation::date('2019/11/12'));\n $this->assertFalse(BrValidation::date('2040/25/12'));\n }",
"public static function validateDate($input)\r\n\t{\r\n\t\treturn preg_match('/\\d{2}-\\d{2}-\\d{4}/', $input) && (strlen($input) == 10);\r\n\t}",
"private function isValidDate($date)\n\t{\n\t\t$date = str_replace('/', '-', $date);\n\t\treturn (date_create($date)) ? JFactory::getDate($date)->format(\"Y-m-d\") : null;\n\t}",
"private function isValidDate($date) {\n $date = str_replace('/', '-', $date);\n return (date_create($date)) ? JFactory::getDate($date)->format(\"Y-m-d\") : null;\n }",
"function validateDate($date, $format = 'Y-m-d') {\n \t $d = DateTime::createFromFormat($format, $date);\n \t return $d && $d->format($format) === $date;\n }",
"public function expiryDate_validation($str) {\n $dt = new DateTime('now');\n $dt = $dt->format('Y-m-d H:i:s');\n\n $start = strtotime($this->input->post('startDate'));\n $expriry = strtotime($this->input->post('expiryDate'));\n\n if ($start > $expriry) {\n $this->form_validation->set_message('expiryDate_validation', 'Your start date-time must be earlier than your expiry date-time.');\n return FALSE;\n }\n return TRUE;\n }",
"function isDateValid($date) {\r\n //$uy = $uyear->format(\"Y\");\r\n //$sy = date(\"Y\");\r\n \r\n if(preg_match('^(((0[1-9]|[12]\\d|3[01])\\/(0[13578]|1[02])\\/((19|[2-9]\\d)\\d{2}))|((0[1-9]|[12]\\d|30)\\/(0[13456789]|1[012])\\/((19|[2-9]\\d)\\d{2}))|((0[1-9]|1\\d|2[0-8])\\/02\\/((19|[2-9]\\d)\\d{2}))|(29\\/02\\/((1[6-9]|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$^', $date))\r\n return false;\r\n else\r\n return true;\r\n \r\n}",
"protected function validateDate($value){\n\t\tif ($value instanceof DateTime) return true;\n\n\t\tif (strtotime($value) === false) return false;\n\n\t\t$date = date_parse($value);\n\n\t\treturn checkdate($date['month'], $date['day'], $date['year']);\n\t}",
"function __validFecha($fecha){\n $test_arr = explode('/', $fecha);\n if (count($test_arr) == 3) {\n if (checkdate($test_arr[1], $test_arr[0], $test_arr[2])) {//MES / DIA / YEAR\n return true;\n }\n return false;\n }\n return false;\n }",
"private function isValidDate($date)\n\t\t{\n\t\t\t$date = str_replace('/', '-', $date);\n\t\t\treturn (date_create($date)) ? Factory::getDate($date)->format(\"Y-m-d\") : null;\n\t\t}",
"function fechaInvalida($fecha){\n $valores = explode('-', $fecha);\n if(count($valores) == 3 && checkdate($valores[1], $valores[2], $valores[0])){\n return false;\n }\n return true;\n }",
"private function validateDate($date)\n {\n $currentDate = strtotime(date('Y-m-d'));\n $maxScheduleDate = strtotime(date('Y-m-d', strtotime('+6 months')));\n $scheduledDate = strtotime($date);\n\n if ($scheduledDate <= $currentDate) {\n return $error\n = 'Please select a date from future (unless you have a time machine that can take you back in '.$date\n .'). ';\n }\n\n if ($scheduledDate >= $maxScheduleDate) {\n return $error = 'You cannot schedule a movie more than 6 months from now. ';\n }\n\n return true;\n }",
"function options_validate($form, &$form_state) {\r\n parent::options_validate($form, $form_state);\r\n \r\n if ($form_state['values']['form_id'] == 'views_ui_config_item_form') {\r\n $check_fields = array_filter($form_state['values']['options']['date_fields']);\r\n if (empty($check_fields)) {\r\n form_error($form['date_fields'], t('You must select at least one date field for this argument.'));\r\n }\r\n if (!preg_match('@\\-[0-9]*:[\\+|\\-][0-9]*@', $form_state['values']['options']['year_range']) \r\n && !preg_match('@[0-9]{4}:[0-9]{4}@', $form_state['values']['options']['year_range'])) {\r\n form_error($form['year_range'], t('Date year range must be in the format -9:+9 or 2005:2010.'));\r\n }\r\n }\r\n }",
"function verifyDate($date) {\r\n $date = trim($date);\r\n if (!is_numeric($date) || strlen($date) != 8) {\r\n return false;\r\n }\r\n $year = substr($date, 0, 4);\r\n $month = substr($date, 4, 2);\r\n $day = substr($date, 6);\r\n if (!checkdate($month, $day, $year)) {\r\n return false;\r\n } else {\r\n return \"$year-$month-$day\";\r\n }\r\n}",
"function _validateDate($date, $format = 'd/m/Y'){\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }",
"protected function dateValidation( $datetime_str ){\n\n list($date, $time) = explode('T', $datetime_str);\n\n $date = trim($date);\n $extended_year = (strpos($date,'y') === 0 ? true : false);\n if($extended_year && $this->getSetting('strict_dates')){\n return \"Extended years (5.2.4.) are not supported with the 'strict dates' option enabled.\";\n }\n // Uncertainty characters on the end are valid Level 1 features (5.2.1.),\n // pull them off to make checking the rest easier.\n $date = rtrim($date, '?~');\n\n // Negative year? That is fine, but remove it\n // and the extended year indicator before exploding the date\n $date = ltrim($date, 'y-');\n\n //Now to check the parts\n list($year, $month, $day) = explode('-',$date,3);\n\n // Year\n if(!preg_match('/^\\d\\d(\\d\\d|\\du|uu)$/', $year) && !$extended_year){\n return \"The year '$year' is invalid. Please enter a four-digit year.\";\n } elseif($extended_year && !preg_match('/^\\d{5,}$/', $year)){\n return \"Invalid extended year. Please enter at least a four-digit year.\";\n }\n $strict_pattern = 'Y';\n\n // Month\n if(!empty($month) && !preg_match('/^(\\d\\d|\\du|uu)$/',$month)){\n return \"The month '$month' is invalid. Please enter a two-digit month.\";\n }\n if(!empty($month)){\n if(strpos($year, 'u') !== false && strpos($month, 'u') === false){\n return \"The month must either be blank or unspecified when the year is unspecified.\";\n }\n $strict_pattern = 'Y-m';\n }\n\n // Day\n if(!empty($day) && !preg_match('/^(\\d\\d|\\du|uu)$/',$day)){\n return \"The day '$day' is invalid. Please enter a two-digit day.\";\n }\n if(!empty($day)){\n if(strpos($month, 'u') !== false && strpos($day, 'u') === false){\n return \"The day must either be blank or unspecified when the month is unspecified.\";\n }\n $strict_pattern = 'Y-m-d';\n }\n\n // Time\n if(strpos($datetime_str, 'T') !== false && empty($time)){\n return \"Time not provided with time seperator (T).\";\n }\n\n if($time){\n if(!preg_match('/^-?(\\d{4})(-\\d{2}){2}T\\d{2}(:\\d{2}){2}(Z|(\\+|-)\\d{2}:\\d{2})?$/',$datetime_str,$matches)){\n return \"The date/time '$datetime_str' is invalid. See EDTF 1.0, 5.1.2.\";\n }\n drupal_set_message(print_r($matches, TRUE));\n $strict_pattern = 'Y-m-d\\TH:i:s';\n if(count($matches) > 4){\n if($matches[4] === 'Z'){\n $strict_pattern .= '\\Z';\n } else {\n $strict_pattern .= 'P';\n }\n }\n }\n\n if($this->getSetting('strict_dates')){\n //Clean the date/time string to ensure it parses correctly.\n $cleaned_datetime = str_replace('u','1', $datetime_str);\n $datetime_obj = DateTime::createFromFormat('!'.$strict_pattern, $cleaned_datetime);\n $errors = DateTime::getLastErrors();\n if( !$datetime_obj ||\n !empty($errors['warning_count']) ||\n // DateTime will create valid dates from Y-m without warning,\n // so validate we still have what it was given.\n !($cleaned_datetime === $datetime_obj->format($strict_pattern))\n ) {\n return \"Strictly speaking, the date (and/or time) '$datetime_str' is invalid.\";\n }\n\n }\n\n return false;\n }",
"public function validMysqlDate($date) {\n\t\t$error = 'The %s is not valid. YYYY-MM-DD is the correct form of dates.';\n\t\t// check if there are hyphens\n\t\tif(!strstr($date, '-')) {\n\t\t\t$this->form_validation->set_message('validMysqlDate', $error);\n\t\t\treturn false;\n\t\t}\n\t\t// split apart the date by hyphen\n\t\t$parts = explode('-', $date);\n\t\t// check that there is two hyphens\n\t\tif(count($parts) != 3) {\n\t\t\t$this->form_validation->set_message('validMysqlDate', $error);\n\t\t\treturn false;\n\t\t}\n\t\t// check that each part is numeric\n\t\tforeach($parts as $val) {\n\t\t\tif(!is_numeric($val)) {\n\t\t\t\t$this->form_validation->set_message('validMysqlDate', $error);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// make it here, the date is fine\n\t\treturn true;\n\t}",
"public function testIsValidWithValidMatchDate() {\n\t\t$this->assertTrue($this->match->validate(array('match_date' => '28 February 2014')), 'Expected model to pass validation with a valid match date.');\n\t\t$this->assertTrue($this->match->validate(array('match_date' => '2014-02-28')), 'Expected model to pass validation with a valid match date.');\n\t\t$this->assertTrue($this->match->validate(array('match_date' => 'February 28th 2014')), 'Expected model to pass validation with a valid match date.');\n\t}",
"function validateDateFormat($date, $format);",
"function isValidateDate($date, $format = 'd-m-Y')\r\n {\r\n switch ($format) {\r\n case 'd-m-Y':\r\n if (preg_match(\"/^([0-9]{2})-([0-9]{2})-([0-9]{4})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[1], $parts[3]))\r\n return true;\r\n else\r\n return false;\r\n } else\r\n return false;\r\n break;\r\n case 'Y-m-d':\r\n if (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[3], $parts[1]))\r\n return true;\r\n else\r\n return false;\r\n } else\r\n return false;\r\n break;\r\n case 'd/m/Y':\r\n if (preg_match(\"/^([0-9]{2})\\/([0-9]{2})\\/([0-9]{4})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[1], $parts[3]))\r\n return true;\r\n else\r\n return false;\r\n } else\r\n return false;\r\n break;\r\n }\r\n }",
"private function checkDatesValidity(){\n\t\t$valid=true;\n\t\t$today = date(\"Y-m-d\");\n\t\tif($this->validFrom!=\"\" && $this->validFrom!=\"0000-00-00\" && $today<$this->validFrom) $valid=false;\n\t\tif($this->validUntil!=\"\" && $this->validUntil!=\"0000-00-00\" && $today>$this->validUntil) $valid=false;\n\t\treturn $valid;\n\t}",
"public function getDATE_VALIDITE()\n {\n return $this->DATE_VALIDITE;\n }",
"public function isValid(): bool\n {\n $value = $this->field->getValue();\n\n // field is empty and its not required. It's thus valid.\n if ($value == '' && $this->required == false) {\n return true;\n }\n\n $parsedDate = (array)date_parse($value);\n\n if (isset($parsedDate['warning_count']) &&\n isset($parsedDate['error_count']) &&\n $parsedDate['warning_count'] == 0 &&\n $parsedDate['error_count'] == 0 &&\n isset($parsedDate['year']) &&\n isset($parsedDate['month'])\n ) {\n return true;\n }\n\n return false;\n }",
"function validateDate($date){\r\n $date = trim($date);\r\n $date_arr = explode(\"/\", $date);\r\n return checkdate ( $date_arr[0] , \"01\" , $date_arr[1] );\r\n\r\n}",
"function is_date_format_valid($date)\n{\n return preg_match(\"/(0[1-9]|[12][0-9]|3[01])[ \\.](0[1-9]|1[012])[ \\.](19|20)\\d\\d/\", $date) !== 0;\n}",
"public function dateValidator($attribute,$params){\n\t\t//kamus lokal\n\t\t$message ='start date : '.$this->PlannedStartDate.' end date : '.$this->PlannedEndDate;\n\t\t$category = 'date initial in validator cek value';\n\t\tYii::trace($message, $category);\n\t\t//function\n if (($this->PlannedStartDate <= $this->PlannedEndDate) OR ($this->PlannedEndDate === date(\"Y-m-d\"))){\n\t\t\t$message=\"valid\";\n\t\t\t$category=\"date debugging\";\n\t\t\tYii::trace($message, $category);\n\t\t}else{\n\t\t\t\t$message=\"invalid\";\n\t\t\t\t$category=\"date debugging\";\n\t\t\t\tYii::trace($message, $category);\n\t\t\t$this->addError('PlannedStartDate', 'Planned Start Date invalid, must be >= than Planned End Date');\n\t\t}\n\t}",
"public function testValidationOk($date)\n {\n // We set the \"fake\" time with timeTravel method\n $this->timeTravel('2018-11-26 00:00:00');\n $notPastDateConstraint = new NotPastDate();\n $notPastDateValidator = $this->initValidator();\n\n $this->purchase->setDateOfVisit($date);\n $notPastDateValidator->validate($this->purchase, $notPastDateConstraint);\n }",
"public function validate() {\n//\t\tif( intval($this->params[\"startYear\"] < date(\"yyyy\"))) $this->add_validation_error(\"Season cannot exist in the past.\");\n\t}",
"public function checkDateWithInvalidDateValuesDataProvider() {}",
"function nrua_validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}",
"function valid_date($date){\r\n\t$day = date_day($date);\r\n\t$month = date_month($date);\r\n\t$year = date_year($date);\r\n\tif(!is_numeric($day) || !is_numeric($month) || !is_numeric($year)){\r\n\t\treturn FALSE;\r\n\t}elseif($month < 1 || $month > 12){\r\n\t\treturn FALSE;\r\n\t}elseif(($day < 1) || ($day > 30 && ($month == 4 || $month == 6 || $month == 9 || $month == 11 )) || ($day > 31)){\r\n\t\treturn FALSE;\r\n\t}elseif($month == 2 && ($day > 29 || ($day > 28 && (floor($year / 4) != $year / 4)))){\r\n\t\treturn FALSE;\r\n\t}else{\r\n\t\treturn TRUE;\r\n\t}\r\n}",
"public function checkDateFormat($str) {\n\t\t\n\t\tif ($str != '') {\n\t\t\tlist($day, $month, $year)=explode(\"/\",$str);\n\t\n\t\t\tif (strpos($str,\".\") == true) {\n\t\t\t\t$result = \"Bad date: Point is not allowed.\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (is_numeric($day) == 1 && is_numeric($month) == 1 & is_numeric($year) == 1) {\n\t\t\t\t\tif(checkdate($month,$day,$year)) \n\t\t\t\t\t\t$result = \"good\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$result = \"Bad date\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$result = \"Bad date: Non numeric characters not allowed.\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\t$result = 'The {field} is required';\n\n\t\tif ($result == 'good') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->form_validation->set_message('checkDateFormat', $result); \n\t\t\t\treturn false;\n\t\t\t}\n\t}",
"function isValidDate($date) {\n $d = DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') == $date;\n}",
"function validateDate(&$errors, $field_list, $field_day, $field_month, $field_year)\n{\n\t//check if a field has been missed\n\t//$errors[$field_day] = \"$field_list[$field_day] $field_list[$field_month] $field_list[$field_year]\";\n\tif ((!isset($field_list[$field_day])|| empty($field_list[$field_day])) || (!isset($field_list[$field_month])|| empty($field_list[$field_month])) || (!isset($field_list[$field_year])|| empty($field_list[$field_year])))\n\t\t$errors[$field_day] = ' Required';\n\n\t//check February dates\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] == 29) && (date(\"L\", mktime(0, 0, 0, 2, 29, $field_list[$field_year])) == 0))\n\t\t\t$errors[$field_day] = ' Invalid Date: no 29th in '.$field_list[$field_year];\t\n\telse if (($field_list[$field_month] == 2) && ($field_list[$field_day] >= 30)) \n\t\t\t$errors[$field_day] = ' Invalid Date: day not in February';\n\t//check 30 Day months i.e September, April, etc\n\telse if (($field_list[$field_day] == 31) && (($field_list[$field_month] == 9) || ($field_list[$field_month] == 4) || ($field_list[$field_month] == 6) || ($field_list[$field_month] == 11)))\n\t\t$errors[$field_day] = ' Invalid Date: no 31st in'.$field_list[$field_year];\n}",
"function verifyDate($date, $date_format)\n {\n $datetime=DateTime::createFromFormat($date_format, $date);\n $errors=DateTime::getLastErrors();\n if (!$datetime || !empty($errors['warning_count'])) //date was invalid\n {\n $date_check_ok=false;\n }\n else //everything OK\n {\n $date_check_ok=true;\n }\n\n return $date_check_ok;\n }",
"function valid_date($str) \n\t{\n\t\t//if (ereg(\"([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})\", $str)) {\n\t\tif (preg_match(\"/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})/\", $str)) \n\t\t{\n\t\t\t//$arr = split(\"-\", $str);\n\t\t\t$arr = preg_split(\"/-/\", $str);\n\t\t\t$yyyy = (int) $arr[0];\n\t\t\t$mm = (int) $arr[1];\n\t\t\t$dd = (int) $arr[2];\n\t\t\treturn checkdate($mm, $dd, $yyyy);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function dateTime()\n {\n $action = 'rakelley\\jhframe\\classes\\ArgumentValidator';\n $arguments = [\n 'requires' => [\n 'date' => ['filters' => ['date' => 'Y-m-d H:i:s']],\n ],\n 'method' => 'post',\n ];\n\n $result = $this->actionController->executeAction($action, $arguments);\n $content = ($result->getSuccess()) ?:\n 'Field must be a valid \"YYYY-MM-DD HH:MM:SS\" Date';\n\n $result->setContent($content)\n ->Render();\n }",
"function options_validate(&$form, &$form_state) {\n parent::options_validate($form, $form_state);\n if (!preg_match('/^(?:\\-[0-9]{1,4}|[0-9]{4}):(?:[\\+|\\-][0-9]{1,4}|[0-9]{4})$/', $form_state['values']['options']['year_range'])) {\n form_error($form['year_range'], t('Date year range must be in the format -9:+9, 2005:2010, -9:2010, or 2005:+9'));\n }\n }",
"function validateDate($strdate) {\n//Must be 10 digits in MM/DD/YYYY format\n//Checks for a valid date (i.e days in a month etc..)\n//Returns an array\n//\t[0] - boolean 0 for good date, 1 for date error\n// [#] - error messasge\n\n \n\t$i = 0;\t\n\tif(((strlen($strdate)<10) OR (strlen($strdate)>10)) OR\n\t ((substr_count($strdate,\"/\"))<>2)) {\n\t\t$retarray[++$i] = \"Date not in 'MM/DD/YYYY' format\";\n\t} else {\n\t\t$month=(substr($strdate,0,2)); //Parse the string to be validated\n\t\t$day=(substr($strdate,3,2));\n\t\t$year=(substr($strdate,6,4));\t\n\t\t\t\n\t\t$result=ctype_digit($year);\n\t\tif(!($result)){\n\t\t\t$year=0;\n\t\t\t$isLeap=false;\n\t\t\t$retarray[++$i] = \"Year is not numeric\";\n\t\t} else {\n\t\t\t$isLeap = DateTime::createFromFormat('Y', $year)->format('L') === \"1\";\n\t\t}\t\n\t\t\t\n\t\t$result=ctype_digit($month);\n\t\tif(!($result)){\n\t\t\t$month=0; \n\t\t\t$retarray[++$i] = \"Month is not numeric\";\n\t\t} else {\n\t\t\tif(($month<=0)OR($month>12)){\n\t\t\t\t$retarray[++$i] = \"Month is not between 01 and 12\";\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$result=ctype_digit($day);\n\t\tif(!($result)){\n\t\t\t$day=0; \n\t\t\t$retarray[++$i] = \"Day is not numeric\";\n\t\t} else {\n\t\t\tif(($day<=0)OR($day>31)){\n\t\t\t\t$retarray[++$i] = \"Day is not between 01 and 31\";\n\t\t\t}\t\n\t\t\t\n\t\t\tif((($month==2) AND (((!$isLeap)AND($day>28))OR(($isLeap)AND($day>29)))) OR \n\t\t\t ((($month==4) OR ($month==6) OR ($month==9) OR ($month==11)) AND ($day>30))){\n\t\t\t\t$retarray[++$i] = \"Day is not valid for month/year\";\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t\n\tif ($i > 0) {\n\t\t$retarray[0] = False;\n\t} else {\n\t\t$retarray[0] = True;\n\t}\t\n\t\n\treturn($retarray); \n}",
"private static function validateDate(string $date): bool\n {\n $date = \\DateTime::createFromFormat('Y-m-d', $date);\n\n if (!$date) {\n return false;\n }\n\n return true;\n }",
"public function startDate_validation($str) {\n $dt = date('Y-m-d');\n \n if ($str < $dt) {\n $this->form_validation->set_message(\"startDate_validation\", 'Start date-time should greater then current date-time.');\n return FALSE;\n }\n return TRUE;\n }",
"public static function isValidDate($date){\n return (DateTime::createFromFormat('d/m/Y', $date)) ? true : false;\n }",
"private function validateDate($value) {\n\n is_a($value, 'DateTime') ||\n $value = strtotime($value);\n\n $value = date('Y-m-d', $value);\n\n if (!$value)\n $this->errors[] = 'Date ' . $value . ' is not a valid date';\n\n return $value;\n\n }",
"private function isValidDate($date)\n {\n try\n {\n $date = str_replace('/', '-', $date);\n return (date_create($date)) ? JFactory::getDate($date)->format(\"Y-m-d\") : null;\n }\n catch(Exception $e)\n {\n Gm_ceilingHelpersGm_ceiling::add_error_in_log($e->getMessage(), __FILE__, __FUNCTION__, func_get_args());\n }\n }",
"function validaNascimento($ano, $mes, $dia)\n{\n\n $dataCheck = $ano.'-'.$mes.'-'.$dia;\n if (checkdate($mes, $dia, $ano) && $dataCheck<=date('Y-m-d'))\n return true;\n else return false;\n}",
"function validate_dob($dob) {\n if (isset($dob) && !$this->isValidDateTimeString($dob, 'm/d/Y', 'UTC') && !empty($dob)) {\n $this->form_validation->set_message('validate_dob', 'This {field} should in m/d/Y format');\n return false;\n } else {\n return true;\n }\n }",
"public function validateDate($date)\n {\n try {\n return new DateTime($date);\n } catch (Exception $e) {\n return false;\n }\n }",
"function checkDateFormat($date)\n{\n //match the format of the date\n if (preg_match (\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $date, $parts))\n {\n //check weather the date is valid of not\n if(checkdate($parts[2],$parts[3],$parts[1]))\n return true;\n else\n return false;\n }\n else\n return false;\n}",
"public function date_valid_func($date) {\n\t\t\n\t\t$date_value = null;\n\t\t// Checking date has value or not\n\t\tif (isset($date) && !empty($date) && strlen($date) == 10) {\n\t\t\t$date_explode = explode(\"/\",$date);\n\t\t\tif (count($date_explode) == 3) {\n\t\t\t\t$date_value+=strlen($date_explode[0]);\n\t\t\t\t$date_value+=strlen($date_explode[1]);\n\t\t\t\t$date_value+=strlen($date_explode[2]);\n\t\t\t\tif ($date_value === 8) {\n\t\t\t\t\t $date_value = 'date';\n\t\t\t\t} else {\n\t\t\t\t\t$date_value = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $date_value;\n\t\t}\n\t}",
"function ValidateDate($date)\n{\n // Cut date for some strings to check it.\n list($dd, $mm, $yyyy) = explode(\"-\", $date);\n \n // Check if date exist. \n if (is_numeric($dd) && is_numeric($mm) && is_numeric($yyyy))\n {\n if (!checkdate($mm, $dd, $yyyy)) \n {\n return false;\n }\n else \n {\n // Reverse date to mysql format.\n $date = sprintf(\"%d-%02d-%02d\", $yyyy,$mm,$dd);\n return $date; \n }\n }\n return false;\n}",
"function fecha_valida($fecha){\n if(ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\",$fecha)){\n ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\", $fecha, $mifecha);\n $ok = checkdate($mifecha[2],$mifecha[1],$mifecha[3]);\n if($ok){\n $actual = date(\"Y-m-d\");\n $older = \"1900-01-01\";\n $dtime = strtotime(fecha_mysql($fecha));\n $dtime_ac = strtotime($actual);\n $dtime_ol = strtotime($older);\n if($dtime>$dtime_ac || $dtime<$dtime_ol){\n return false;\n }else{\n return true;\n }\n }else{\n // fecha fuera del calendario\n return false;\n } \n }else{\n // formato no valido\n return false;\n }\n}",
"public function is_date()\n {\n }",
"function validateDate($date,$format = 'Y-m-d H:i:s') {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}",
"function validateDate($Fecha, $Formato = 'Ymd')\n{\n $d = DateTime::createFromFormat($Formato, $Fecha);\n return $d && $d->format($Formato) == $Fecha;\n}",
"function validateDate($date, $format = 'Y-m-d')\n {\n $d = DateTime::createFromFormat($format, $date);\n // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.\n return $d && $d->format($format) === $date;\n }",
"public function ValidarFecha($attribute){\n\n\t\t$today = new DateTime();\n\t\t$fecha = new DateTime($this->fecha_presupuesto);\n\n\t\tif( ($fecha < $today) && ($fecha->format('Y-m-d') <> $today->format('Y-m-d')) ){\n\n\t\t\t$this->addError($attribute,\"La fecha del presupusto no puede ser menor a la fecha actual.\");\n\t\t}\n\t}",
"function jsValidation() {\n\t\tif($this->getLocale() != 'en_NZ') return;\n\t\t\n\t\t$formID = $this->form->FormName();\n\n\t\tif(Validator::get_javascript_validator_handler() == 'none') return true;\n\n\t\tif($this->getConfig('dmyfields')) {\n\t\t\t$error = _t('DateField.VALIDATIONJS', 'Please enter a valid date format.');\n\t\t\t// Remove hardcoded date formats from translated strings\n\t\t\t$error = preg_replace('/\\(.*\\)/', '', $error);\n\t\t\t$error .= ' (' . $this->getConfig('dateformat') .')';\n\t\t\t\n\t\t\t$jsFunc =<<<JS\nBehaviour.register({\n\t\"#$formID\": {\n\t\tvalidateDMYDate: function(fieldName) {\n\t\t\tvar day_value = \\$F(_CURRENT_FORM.elements[fieldName+'[day]']);\n\t\t\tvar month_value = \\$F(_CURRENT_FORM.elements[fieldName+'[month]']);\n\t\t\tvar year_value = \\$F(_CURRENT_FORM.elements[fieldName+'[year]']);\n\n\t\t\t// TODO NZ specific\n\t\t\tvar value = day_value + '/' + month_value + '/' + year_value;\n\t\t\tif(value && value.length > 0 && !value.match(/^[0-9]{1,2}\\/[0-9]{1,2}\\/([0-9][0-9]){1,2}\\$/)) {\n\t\t\t\tvalidationError(_CURRENT_FORM.elements[fieldName+'[day]'],\"$error\",\"validation\",false);\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t}\n});\nJS;\n\t\t\tRequirements :: customScript($jsFunc, 'func_validateDMYDate_'.$formID);\n\n\t\t\treturn <<<JS\n\tif(\\$('$formID')){\n\t\tif(typeof fromAnOnBlur != 'undefined'){\n\t\t\tif(fromAnOnBlur.name == '$this->name')\n\t\t\t\t\\$('$formID').validateDMYDate('$this->name');\n\t\t}else{\n\t\t\t\\$('$formID').validateDMYDate('$this->name');\n\t\t}\n\t}\nJS;\n\t\t} else {\n\t\t\t$error = _t('DateField.VALIDATIONJS', 'Please enter a valid date format (DD/MM/YYYY).');\n\t\t\t$jsFunc =<<<JS\nBehaviour.register({\n\t\"#$formID\": {\n\t\tvalidateDate: function(fieldName) {\n\n\t\t\tvar el = _CURRENT_FORM.elements[fieldName];\n\t\t\tif(el)\n\t\t\tvar value = \\$F(el);\n\n\t\t\tif(Element.hasClassName(el, 'dmydate')) {\n\t\t\t\t// dmy triple field validation\n\t\t\t\tvar day_value = \\$F(_CURRENT_FORM.elements[fieldName+'[day]']);\n\t\t\t\tvar month_value = \\$F(_CURRENT_FORM.elements[fieldName+'[month]']);\n\t\t\t\tvar year_value = \\$F(_CURRENT_FORM.elements[fieldName+'[year]']);\n\n\t\t\t\t// TODO NZ specific\n\t\t\t\tvar value = day_value + '/' + month_value + '/' + year_value;\n\t\t\t\tif(value && value.length > 0 && !value.match(/^[0-9]{1,2}\\/[0-9]{1,2}\\/([0-9][0-9]){1,2}\\$/)) {\n\t\t\t\t\tvalidationError(_CURRENT_FORM.elements[fieldName+'[day]'],\"$error\",\"validation\",false);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// single field validation\n\t\t\t\tif(value && value.length > 0 && !value.match(/^[0-9]{1,2}\\/[0-9]{1,2}\\/[0-90-9]{2,4}\\$/)) {\n\t\t\t\t\tvalidationError(el,\"$error\",\"validation\",false);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n});\nJS;\n\t\t\tRequirements :: customScript($jsFunc, 'func_validateDate_'.$formID);\n\n\t\t\treturn <<<JS\nif(\\$('$formID')){\n\tif(typeof fromAnOnBlur != 'undefined'){\n\t\tif(fromAnOnBlur.name == '$this->name')\n\t\t\t\\$('$formID').validateDate('$this->name');\n\t}else{\n\t\t\\$('$formID').validateDate('$this->name');\n\t}\n}\nJS;\n\t\t}\n\t}",
"private function date ($param)\n {\n $this->type = 'date';\n $time = strtotime($this->value);\n if (FALSE === $time)\n {\n $this->SetError('date', 'The '.$this->SpacedKey.' field must be a valid date');\n return false;\n }\n return true;\n }",
"function validateDate($date, $format = 'Y-m-d H:i:s')\n {\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n }",
"protected function checkDate($date)\r\n\t{\r\n\t\tif(!$date)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tif(!preg_match('/^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][1-9]|3[0-1])$/', $date)) {\r\n\t\t\t\tthrow new Exception ( 'checkDate() expects a SQL formatted date like 2009-12-24.' );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function testValidationKo($date)\n {\n // We set the \"fake\" time with timeTravel method\n $this->timeTravel('2018-11-26 00:00:00');\n $notPastDateConstraint = new NotPastDate();\n $notPastDateValidator = $this->initValidator($notPastDateConstraint->message);\n\n $this->purchase->setDateOfVisit($date);\n $notPastDateValidator->validate($this->purchase, $notPastDateConstraint);\n\n }",
"public function checkValidity()\n {\n // le pb est que la propriété publicationDate est de type dateTime or les tests initiaux\n // se basent sur un format de type date --> ce qui génère une erreur de type notice\n \n return true;\n }",
"function valida_dates($enter_date, $obsolescense_date)\n{\n $day1 = substr($enter_date, 0, 2);\n $month1 = substr($enter_date, 3, 2);\n $year1 = substr($enter_date, 6, 4);\n $day2 = substr($obsolescense_date, 0, 2);\n $month2 = substr($obsolescense_date, 3, 2);\n $year2 = substr($obsolescense_date, 6, 4);\n\n if ($enter_date <= $obsolescense_date) {\n return true;\n }\n\n return false;\n}",
"public static function validateDate($date)\n {\n $d = \\DateTime::createFromFormat('Y-m-d', $date);\n return $d && $d->format('Y-m-d') === $date;\n }",
"function dateValidation($value) {\n\t$reg = \"/^(((0?[1-9]|1[012])\\/(0?[1-9]|1\\d|2[0-8])|(0?[13456789]|1[012])\\/(29|30)|(0?[13578]|1[02])\\/31)\\/(19|[2-9]\\d)\\d{2}|0?2\\/29\\/((19|[2-9]\\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$/\";\n\treturn preg_match($reg,$value);\n}",
"function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}",
"function validateDate($date, $format = 'Y-m-d H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}",
"function validateDateFormat($date, $field, $format = 'd-m-Y')\r\n {\r\n switch ($format) {\r\n case 'd-m-Y':\r\n if (preg_match(\"/^([0-9]{2})-([0-9]{2})-([0-9]{4})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[1], $parts[3]))\r\n return true;\r\n else {\r\n $this->setError(10011, \"error\", \"\", $field);\r\n return false;\r\n }\r\n } else {\r\n $this->setError(10011, \"error\", \"\", $field);\r\n return false;\r\n }\r\n\r\n break;\r\n case 'Y-m-d':\r\n if (preg_match(\"/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/\", $date, $parts)) {\r\n //check weather the date is valid of not\r\n if (checkdate($parts[2], $parts[3], $parts[1]))\r\n return true;\r\n else {\r\n $this->setError(10011, \"error\", \"\", $field);\r\n return false;\r\n }\r\n\r\n } else {\r\n $this->setError(10011, \"error\", \"\", $field);\r\n return false;\r\n }\r\n\r\n break;\r\n }\r\n\r\n }",
"public function testDateFieldValidation()\n {\n $field = $this->table->getField('dateone');\n\n $testDate = 'July 4, 2016';\n\n $fldObj = $field->getPHPValue($testDate);\n\n $this->assertInstanceOf('DateTime', $fldObj);\n $this->assertEquals('2016-07-04', $fldObj->format('Y-m-d'));\n\n $fieldVal = $field->getSqlBoundValue($testDate);\n $key = $fieldVal->getValueMarker();\n\n $this->assertEquals(1, $fieldVal->getBindCount());\n $this->assertEquals('2016-07-04', $fieldVal->getBoundValues()[$key]);\n }",
"public function testIsInvalidNoMatchDate() {\n\t\t$this->assertFalse($this->match->validate(array('match_date' => '')), 'Expected no match date to cause validation failure');\n\t\t$this->assertTrue($this->match->errors()->has('match_date'));\n\t\t$failures = $this->match->failures();\n\t\t$this->assertArrayHasKey('Required', $failures['match_date']);\n\t}",
"function validateDate($date, $format = 'd/m/Y H:i:s')\n{\n $d = DateTime::createFromFormat($format, $date);\n return $d && $d->format($format) == $date;\n}",
"public function validacion_fecha($fec){\n \n self::set_fecha($fec); // asignar la fecha\n $partes= explode(\"-\", self::get_fecha()); \n echo \"<br><br>\";\n echo \"Fecha Ingresada <br><br>\";\n print_r($partes);\n $actual = array(date(\"Y\"),date(\"m\"),date(\"d\"));\n echo \"<br><br>\";\n echo \"Fecha actual <br><br>\";\n print_r($actual);\n \n if(self::escritura_valida($partes) && self::fecha_mayor_actual($actual, $partes)) // si es valida la escritura y la fecha es mayor a la actual es correcta la fecha\n {\n return true;\n }\n else{\n return false;\n }\n }",
"public function validate( $value )\n\t{\n\t\t$value = (string) $value;\n\t\t\n\t\tif( strlen( $value ) != 13 )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$first_letter = substr( $value, 0, 1 );\n\t\t\n\t\tlist( $year, $month, $day ) = str_split( substr( $value, 1, 7 ), 2 );\n\t\tswitch( $first_letter )\n\t\t{\n\t\t\tcase '1':\n\t\t\t\t$year = '19' . $year;\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t$year = '19' . $year;\n\t\t\t\tbreak;\n\t\t\tcase '5':\n\t\t\t\t$year = '20' . $year;\n\t\t\t\tbreak;\n\t\t\tcase '6':\n\t\t\t\t$year = '20' . $year;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\tif( ! RPC_Date::validDate( $year . '-' . $month . '-' . $day ) ||\n\t\t RPC_Date::getTimestamp( $year . '-' . $month . '-' . $day ) >= RPC_Date::getTimestamp( date( 'Y-m-d' ) ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}"
] | [
"0.76500404",
"0.76280826",
"0.7349785",
"0.73120666",
"0.7291731",
"0.7289353",
"0.7289353",
"0.72614795",
"0.72071373",
"0.71772885",
"0.717427",
"0.7145322",
"0.7119601",
"0.7119298",
"0.71172035",
"0.71044755",
"0.7104054",
"0.7090664",
"0.7090038",
"0.7067511",
"0.70448154",
"0.70361817",
"0.7023671",
"0.70169806",
"0.69862956",
"0.6977689",
"0.6953091",
"0.6901316",
"0.6899707",
"0.68935513",
"0.6892645",
"0.68859",
"0.6877112",
"0.686357",
"0.6859915",
"0.68517065",
"0.6847195",
"0.6834242",
"0.6790595",
"0.6783322",
"0.6777272",
"0.67731905",
"0.67663485",
"0.67660224",
"0.67625576",
"0.67580605",
"0.6749165",
"0.673964",
"0.6729985",
"0.67206067",
"0.67161274",
"0.67071927",
"0.67034715",
"0.6702107",
"0.67019576",
"0.6700806",
"0.66980636",
"0.6682841",
"0.66799474",
"0.66735476",
"0.66599476",
"0.6658556",
"0.66510224",
"0.6650356",
"0.6644336",
"0.66429746",
"0.66420066",
"0.663744",
"0.6636896",
"0.6632825",
"0.6629599",
"0.6617749",
"0.6613845",
"0.6598782",
"0.6595751",
"0.6569812",
"0.656457",
"0.65608853",
"0.6558389",
"0.6555963",
"0.6555883",
"0.65555346",
"0.6553067",
"0.655229",
"0.65508217",
"0.6549202",
"0.6544735",
"0.65362686",
"0.65359306",
"0.65271246",
"0.6504765",
"0.6504464",
"0.64887595",
"0.64691657",
"0.64691657",
"0.6464405",
"0.6452827",
"0.6445136",
"0.64393955",
"0.64368147",
"0.6433558"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$faker = Faker\Factory::create();
for($i=0;$i<20;$i++)
{
$customers = array(
'name' => $faker->name,
'mob' => $faker->phoneNumber,
'license' => $faker->randomNumber('9',true),
'email' => $faker->email,
'address' => $faker->address
);
Customer::insert($customers);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => 'simpleadressemail@mail.com', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"admin@admin.com\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@petstore.com',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => 'prosales@researchmobile.co',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => 'movil@researchmobile.co',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'test@yandex.ru'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => 'admin@yahoo.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => 'programmerlemar@gmail.com',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => 'qwerty@gmail.com',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> 'admin@example.com',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => 'admin@admin.com',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => 'ignacio@dh.com',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = your.email@domain.com\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'papesambandour@hotmail.com',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => 'sovon.kucse@gmail.com']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => 'eddyjaair@gmail.com']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => 'barbozagonzalesjose@gmail.com',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => 'pkw@pkw.com',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => 'empresa02@gmail.com',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => 'carlos@email.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => 'pedrito@juase.com',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Render flash box (success or error message) Render smarty flash box No parameters expected | function smarty_function_flash_box( $params, &$smarty ) {
if( $message = flash_get( 'success' ) ) {
$type = 'success';
} elseif( $message = flash_get( 'error' ) ) {
$type = 'error';
} else {
return '';
} // if
return '<div id="' . $type . '" class="flash flash-' . $type . '"><span>' . $message . '</span></div>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function renderFlashMessages() {}",
"public function renderFlash()\n {\n // get the feedback (they are arrays, to make multiple positive/negative messages possible)\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n\n // echo out positive messages\n if (isset($feedback_positive)) {\n foreach ($feedback_positive as $feedback) {\n echo '<div class=\"flash success\">'.$feedback.'</div>';\n }\n }\n\n // echo out negative messages\n if (isset($feedback_negative)) {\n foreach ($feedback_negative as $feedback) {\n echo '<div class=\"flash error\">'.$feedback.'</div>';\n }\n }\n\n // delete these messages (as they are not needed anymore and we want to avoid to show them twice\n Session::set('feedback_positive', null);\n Session::set('feedback_negative', null);\n }",
"function flash_message()\n\t{\n\t\t$ci =& get_instance();\n\t\t$flashmsg = $ci->session->flashdata('falshmsg');\n\t\t$html = '';\n\t\tif (is_array($flashmsg)){\n\t\t\t$html = '<div id=\"flashmessage\" class=\"'.$flashmsg['type'].'\">\n\t\t\t\t\t<img style=\"float: right; cursor: pointer\" id=\"closemessage\" src=\"'.base_url().'img/close.png\" />\n\t\t\t\t\t\t\t<p>'.$flashmsg['content'].'</p>\n\t\t\t\t\t\t\t\t\t</div>';\n\t\t}\n\t\treturn $html;\n\t}",
"protected function renderFlashMessages() {}",
"function flashMessage() {\n\t$message = Template::getFlashMessage();\n\tif ( ! empty($message) ) {\n\t\t$messageHtml .= \"<div class='collection'>\";\n\t\t$messageHtml .= \"<a href='#' class='collection-item \" . $message[\"type\"] . \"'>\" . $message[\"body\"] . \"</a>\";\n\t\t$messageHtml .= \"</div>\";\n\n\t\techo $messageHtml;\n\t}\n\treturn NULL;\n}",
"function flash_msg(){ ?>\r\n <?php if(isset($_SESSION['success'])): ?>\r\n <p style=\"color: green\"><?= htmlentities($_SESSION['success']) ?></p>\r\n <?php unset($_SESSION['success']); ?>\r\n <?php elseif(isset($_SESSION['failure'])): ?>\r\n <p style=\"color: red\"><?= htmlentities($_SESSION['failure']) ?></p>\r\n <?php unset($_SESSION['failure']); ?>\r\n <?php endif; ?>\r\n<?php }",
"public function showFlashMessage()\n {\n \tif (isset($_SESSION['flashMessage'])) {\n \t\techo '<div class=\"alert alert-' . $_SESSION['flashMessage']['type'] . '\" role=\"alert\">';\n \t\techo '<strong>'. $_SESSION['flashMessage']['message'] . '</strong>';\n \t\techo '</div>';\n\n \t\tunset($_SESSION['flashMessage']);\n \t}\n }",
"function formSuccess() {\n\n // Template\n $this->r->text['back_url'] = suxFunct::getPreviousURL();\n $this->r->title .= \" | {$this->r->gtext['success']}\";\n\n $this->tpl->display('success.tpl');\n\n }",
"public function handleFlashNotifications(){\n\t\tif($this->input->get('form_success') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_success') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-success' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionSuccessMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t\tif($this->input->get('form_error') !== false){\n\t\t\t$o = \"\" ;\n\t\t\t$function_name = $this->input->get('form_error') ;\n\t\t\t\n\t\t\t$o .= \"<div id='form-error' class='flash_message pad_all'>\" ; \n\t\t\t\t$o .= \"<p>\" ;\n\t\t\t\t\t$o .= $this->getFlashFunctionErrorMessage($function_name) ;\n\t\t\t\t$o .= \"</p>\" ;\n\t\t\t$o .= \"</div>\" ;\n\t\t\t\n\t\t\t$o .= \"<script>\" ;\n\t\t\t\t$o .= \"$('.flash_message').fadeOut(7000) ;\" ;\n\t\t\t$o .= \"</script>\" ;\n\t\t\t\n\t\t\treturn $o ;\n\t\t}\n\t}",
"function displaySuccessMessage($index,$params = array()) {\n\t\tglobal $lang;\n\t\n\t\treturn '<div class=\"alert alert-success\">'.getLang('form_success_'.$index,$params).'</div>';\n\t}",
"static function flashMessage ()\n {\n if (Session::has ('message')) {\n list ($flashType, $message, $title) = explode ('|', Session::get ('message')) + [''] + [''];\n $title = $title ? \"<h4>$title</h4>\" : '';\n return <<<HTML\n<div class=\"alert alert-$flashType\">\n $title$message\n</div>\n</script>\nHTML;\n }\n }",
"public function show()\n {\n if (!is_null($_SESSION['flash_message']['type'])) {\n\n $type = $_SESSION['flash_message']['type'];\n\n $message = $_SESSION['flash_message']['message'];\n\n unset($_SESSION['flash_message']); // unset flash_message key\n\n return '<div id=\"flash\" class=\"alert alert-' . $type . '\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\">\n <span aria-hidden=\"true\">×</span>\n <span class=\"sr-only\">Close</span></button>' . $message . '</div>';\n }\n }",
"public function showLogin($error = null) {\n $this -> smarty -> assign('titulo','Iniciar Sesión');\n $this -> smarty -> assign('error', $error); \n //le paso por medio de assign el nombre de la variable (titulo) y el contenido\n $this -> smarty -> display('templates/login.tpl');\n //llamo a la funcion display en el template login\n $this -> smarty -> display('templates/footer.tpl'); \n}",
"function flash($name = '', $message = '', $class = 'uk-alert-success')\n{\n //We can only do something if the name isn't empty\n if (!empty($name)) {\n //No message, create it\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name . '_class'] = $class;\n }\n //Message exists, display it\n elseif (!empty($_SESSION[$name]) && empty($message)) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : 'uk-alert-success';\n echo '<div class=\"' . $class . '\" uk-alert> <a class=\"uk-alert-close\" uk-close></a> <p>' . $_SESSION[$name] . '</p></div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"protected function flash()\n\t{\n\t\t$this->session->flash($this->sessionKey, $this->bag->toJson());\n\t}",
"function flashMessage()\n{\n if (isset($_SESSION['flash']))\n {\n $flash = $_SESSION['flash'];\n unset($_SESSION['flash']);\n foreach ($flash as $key => $value)\n {\n switch ($key)\n {\n case 'fail':\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n break;\n case 'success':\n echo '<p class=\"flash\" style=\"background:#b6e5af\">';\n break;\n default:\n echo '<p class=\"flash\" style=\"background:#f9ccca\">';\n }\n echo $value . '</p>';\n }\n }\n}",
"function flash( $name = '', $message = '', $class = 'success fadeout-message', $url = '' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n\tif( !empty( $url ) || $url != '' )\n {\n\t\theader('Location: '.$url);\n\t\texit();\n\t}\n}",
"function flashMessage() {\n if (isset($_SESSION['add'])){\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['add']).\"</p>\");\n unset($_SESSION['add']);\n }\n if (isset($_SESSION['success'])) {\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if (isset($_SESSION['error'])) {\n echo('<p style=\"color:red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}",
"function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n //We can only do something if the name isn't empty\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name]))\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n\n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ))\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div id =\"message\" class=\"alert alert-'.$class.' alert-dismissible fade show\" role=\"alert\">'\n .$_SESSION[$name]\n .'<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}",
"function get_flash($type)\n{\n $ci = &get_instance();\n $message = $ci->session->flashdata($type);\n\n if ($message) {\n return htmlentities($message);\n }\n\n return '';\n}",
"public function showSignIn($error = null){\n \n //creo una instancia de la clase smarty\n $this -> smarty -> assign('titulo','Iniciar Sesión');\n $this -> smarty -> assign('error', $error); \n //le paso por medio de assign el nombre de la variable (titulo) y el contenido\n $this -> smarty -> display('templates/signIn.tpl');\n //llamo a la funcion display en el template login\n $this -> smarty -> display('templates/footer.tpl');\n}",
"public static function flash($flash = null, $status = 'info') {\n\t\tif (isset($_SESSION['sq-form-flash'])) {\n\t\t\t$flash = $_SESSION['sq-form-flash'];\n\t\t\tunset($_SESSION['sq-form-flash']);\n\t\t}\n\n\t\tif (isset($_SESSION['sq-form-status'])) {\n\t\t\t$status = $_SESSION['sq-form-status'];\n\t\t\tunset($_SESSION['sq-form-status']);\n\t\t}\n\n\t\tif ($flash) {\n\t\t\treturn sq::view('forms/flash', [\n\t\t\t\t'status' => $status,\n\t\t\t\t'flash' => $flash\n\t\t\t]);\n\t\t}\n\t}",
"protected function addFlashMessages() {}",
"function flashmessage(){\n if ( isset($_SESSION['error'])){\n echo \"<p style='color:red'>\".$_SESSION['error'].\"</p>\";\n unset($_SESSION['error']);\n }\n if (isset($_SESSION['success'])){\n echo \"<p style='color:green'>\".$_SESSION['success'].\"</p>\";\n unset($_SESSION['success']);\n }\n}",
"function flash()\n{\n return get_view()->flash();\n}",
"function flashmessage(){\n if ( isset($_SESSION['success']) ) {\n // Look closely at the use of single and double quotes\n echo('<p style=\"color: green;\">'.htmlentities($_SESSION['success']).\"</p>\\n\");\n unset($_SESSION['success']);\n }\n if ( isset($_SESSION['error']) ) {\n // Look closely at the use of single and double quotes\n echo('<p style=\"color: red;\">'.htmlentities($_SESSION['error']).\"</p>\\n\");\n unset($_SESSION['error']);\n }\n}",
"function flash( $name = '', $message = '', $class = 'success fadeout-message' )\n{\n if( !empty( $name ) )\n {\n //No message, create it\n if( !empty( $message ) && empty( $_SESSION[$name] ) )\n {\n if( !empty( $_SESSION[$name] ) )\n {\n unset( $_SESSION[$name] );\n }\n if( !empty( $_SESSION[$name.'_class'] ) )\n {\n unset( $_SESSION[$name.'_class'] );\n }\n \n $_SESSION[$name] = $message;\n $_SESSION[$name.'_class'] = $class;\n }\n //Message exists, display it\n elseif( !empty( $_SESSION[$name] ) && empty( $message ) )\n {\n $class = !empty( $_SESSION[$name.'_class'] ) ? $_SESSION[$name.'_class'] : 'success';\n echo '<div class=\"'.$class.'\" id=\"msg-flash\">'.$_SESSION[$name].'</div>';\n unset($_SESSION[$name]);\n unset($_SESSION[$name.'_class']);\n }\n }\n}",
"function flash($name = '', $message = '', $class = 'alert alert-success')\n{\n // Check that a name is passed in \n // We are storimg the session $name as the KEY\n if (!empty($name)) {\n if (!empty($message) && empty($_SESSION[$name])) {\n if (!empty($_SESSION[$name])) {\n unset($_SESSION[$name]);\n }\n\n if (!empty($_SESSION[$name . '_class'])) {\n unset($_SESSION[$name . '_class']);\n }\n\n // And we are storing the $message as the VALUE\n $_SESSION[$name] = $message;\n\n // setting the class inside of the session variable\n $_SESSION[$name . '_class'] = $class;\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n // display it here, the div with the class\n echo '<div class=\"' . $class . '\" id=\"msg-flash\">' . $_SESSION[$name] . '</div>';\n // unsetting it\n unset($_SESSION[$name]);\n unset($_SESSION[$name . '_class']);\n }\n }\n}",
"function printFlashMessage() {\n if (!isset($_SESSION['flashMessage'])) {\n return;\n }\n\n echo '<div class=\"alert alert-success mb-4\" id=\"FlashMessage\">'.$_SESSION['flashMessage']\n .'<button type=\"button\" class=\"close\" onclick=\"location.reload(true); return false;\">'\n .'<span aria-hidden=\"true\">×</span>'\n .'</button>'\n .'</div>';\n $_SESSION['flashMessage'] = null;\n}",
"public function actionSuccess()\n {\n return $this->render('success');\n }",
"function ufclas_matlab_admin_notice_success(){\n\t$message = ufclas_matlab_get_success();\n\t?>\n <div class=\"notice notice-success\">\n <p><?php echo __( 'Import successful. View the imported page: ', 'ufclas-matlab' ) . $message; ?> </p>\n </div>\n <?php\n\t\n}",
"function setFlash($msg,$class=\"info\"){\n if($msg!=\"\")\n \t{\n $this->flashMsg = \"<div class='flash'><div class='message $class'><p>\".$msg.\"</p></div></div>\";\n }\n else\n {\n $this->flashMsg = '';\n }\n }",
"private static function renderFlash($name) {\n $class = !empty($_SESSION[$name . '_class']) ? $_SESSION[$name . '_class'] : '';\n\n echo '\n <div class=\"'. $class .'\" id=\"msg-flash\">\n '. $_SESSION[$name] .'\n </div>\n ';\n }",
"function osc_show_flash_message($section = 'pubMessages', $class = \"flashmessage\", $id = \"flashmessage\") {\n $messages = Session::newInstance()->_getMessage($section);\n if (is_array($messages)) {\n\n foreach ($messages as $message) {\n\n echo '<div id=\"flash_js\"></div>';\n \n if (isset($message['msg']) && $message['msg'] != '') {\n echo '<div id=\"' . $id . '\" class=\"' . strtolower($class) . ' ' . strtolower($class) . '-' .$message['type'] . '\"><a class=\"btn ico btn-mini ico-close\">x</a>';\n echo osc_apply_filter('flash_message_text', $message['msg']);\n echo '</div>';\n } else if($message!='') {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\">';\n echo osc_apply_filter('flash_message_text', $message);\n echo '</div>';\n } else {\n echo '<div id=\"' . $id . '\" class=\"' . $class . '\" style=\"display:none;\">';\n echo osc_apply_filter('flash_message_text', '');\n echo '</div>';\n }\n }\n } \n Session::newInstance()->_dropMessage($section);\n }",
"function edit_password_success(){\n \t// Si no existe el flashdata success es que no se accede a través del flujo normal de cambio de pass\n \tif (!$this->users_model->is_logged_in() || !$this->session->flashdata('cambiado')){\n\t\t\tredirect('admin', 'refresh');\n\t\t}\n\t\t// meta para redirigir 2 seg después de mostar el mensaje de password cambiado.\n\t\t$data['meta'] = \"<meta http-equiv='refresh' content='2; url=\" . base_url() . \"admin'>\";\n \t$data['view'] = 'admin/users/edit_password_success';\n \t$this->load->view('admin/_includes/template', $data);\n }",
"public static function show(){\n //check for session variables\n if (isset($_SESSION['success'])){\n self::buildMsg('success', 'Success!', $_SESSION['success']); \n unset($_SESSION['success']); \n \n } elseif (isset($_SESSION['fail'])) {\n self::buildMsg('danger', 'Error!', $_SESSION['fail']);\n \n unset($_SESSION['fail']);\n } elseif (isset($_SESSION['warning'])) {\n self::buildMsg('warning', 'Warning!', $_SESSION['warning']);\n \n unset($_SESSION['warning']);\n } else {\n return null;\n } \n }",
"function form_success()\r\n {\r\n $container = container() ;\r\n $container->add($this->_action_message) ;\r\n\r\n return $container ;\r\n }",
"abstract protected function flashSuccess($translationKey, $parameter = []);",
"public function renderNotifyMessage() {\n if (Yii::app()->user->hasFlash('beFormAction')) {\n echo '<div class=\"alert alert-success\" role=\"alert\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>'\n . Yii::app()->user->getFlash('beFormAction') .\n '</div>';\n }\n\n if (Yii::app()->user->hasFlash('beFormError')) {\n echo '<div class=\"alert alert-danger\" role=\"alert\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>'\n . Yii::app()->user->getFlash('beFormError') .\n '</div>';\n }\n }",
"function printSessionSuccessMessage(){\n\t\tif (!empty($_SESSION[\"successMessage\"])) {\n\t\t\techo(\"<div class=\\\"alert alert-success alert-dismissible fade show text-center\\\" role=\\\"alert\\\">\" \n\t\t\t\t. $_SESSION[\"successMessage\"] \n\t\t\t\t. \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\">×</span></button></div>\");\n\t\t}\n\t}",
"function casano_show_product_loop_new_flash() {\r\n\t\twc_get_template( 'loop/new-flash.php' );\r\n\t}",
"public function bootstrap3() {\n\t\t$this->Session->setFlash(__('Alert success message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-success'\n\t\t), 'success');\n\t\t$this->Session->setFlash(__('Alert info message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-info'\n\t\t), 'info');\n\t\t$this->Session->setFlash(__('Alert warning message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-warning'\n\t\t), 'warning');\n\t\t$this->Session->setFlash(__('Alert danger message testing...'), 'alert', array(\n\t\t\t'plugin' => 'BoostCake',\n\t\t\t'class' => 'alert-danger'\n\t\t), 'danger');\n\t}",
"public function form_success()\n {\n \tif ($this->session->has_userdata('success_message')) \n \t{\n \t\t# code...\n \t\t$this->data = array_merge($this->data, array(\n \t\t\t'msg'\t\t=> $this->session->userdata('success_message')['msg'],\n \t\t\t'msg2'\t\t=> $this->session->userdata('success_message')['msg2'],\n \t\t\t're_link'\t=> $this->session->userdata('success_message')['re_link'],\n \t\t\t'msg3'\t\t=> $this->session->userdata('success_message')['msg3'],\n \t\t\t're_link2'\t=> $this->session->userdata('success_message')['re_link2'] \n\t\t\t));\n\n \t\tif ($this->session->userdata('success_message')['type'] == 'participants') \n \t\t{\n \t\t\t# code...\n \t\t\t$this->data['output'] = $this->Model_return->return_participants($this->session->userdata('success_message')['id']);\n \t\t}\n \t\telseif ($this->session->userdata('success_message')['type'] == 'event') \n \t\t{\n \t\t\t# code...\n \t\t\t$this->data['output'] = $this->Model_return->return_event($this->session->userdata('success_message')['id']);\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$this->data['output'] = NULL;\n \t\t}\n \t\t$this->render($this->set_views->form_success());\n \t}\n \telse\n \t{\n \t\tredirect('/Form');\n \t}\n }",
"function flash($type, $message) {\n // creates the flash holder, if not defined yet\n if(!isset($_SESSION['flash'])) {\n $_SESSION['flash'] = array();\n $_SESSION['flash']['uri'] = $_SERVER['REQUEST_URI'];\n }\n // sets the message\n $_SESSION['flash'][$type] .= $message;\n}",
"public function getFlashBag();",
"function smarty_function_ajaxRequestErrorDiv()\n{\n\treturn '<div id=\"loadingError\">'.Piwik_Translate('General_ErrorRequest').'</div>';\n}",
"public function renderFlash() {\n $this->sanitizeObsoleteFlashSession('flash');\n $this->sanitizeObsoleteFlashSession('info');\n\n $render = [];\n $render[] = $this->Flash->render();\n\n $render[] = $this->Flash->render('info', [\n 'params' => [\n 'timeout' => self::$infoFlashTimeout,\n 'renderTimeout' => 1500\n ]\n ]);\n\n return implode('', array_filter($render));\n }",
"function _show_message($message)\n\t{\n\t\t$this->session->set_flashdata('message', $message);\n\t\tredirect('/auth/');\n\t}",
"public function actionSuccess()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\t\t\n\t\t$email = Yii::app()->request->getParam('email');\n\t\t$this->render('success', array('email'=>$email,'is_found'=>true));\n\t}",
"protected function addErrorFlashMessage() {}",
"public function flash($name, $data);",
"public function flash($name, $data);",
"public function flash($name, $data);",
"function displaySuccessMsg() {\n\tif(isset($_SESSION['success'])) {\n\t\t// Set up row in accordance with Bootstrap grid\n\t\t/*echo '<div class=\"container\"><div class=\"row\"><div class=\"col-md-12\">';*/\n\t\techo '<div class=\"row\"><div class=\"col-md-12\">';\n\t\tforeach ($_SESSION['success'] as $success) {\n\t\t\techo '<p class=\"success\">',$success,'</p>';\n\t\t}\n\t\t/*echo '</div></div></div>';*/\n\t\techo '</div></div>';\n\t\t// Unset errors for page refresh\n\t\tunset ($_SESSION['success']);\n\t}\n}",
"function smarty_function_wbs_messageBox( $params, &$this )\r\n{\r\n\textract($params);\r\n\r\n\t$mbClass = null;\r\n\r\n\tswitch ( $type ) {\r\n\t\tcase 0 : $mbClass = \"MessageBoxStop\"; break;\r\n\t\tcase 1 : $mbClass = \"MessageBoxInformation\"; break;\r\n\t\tcase 2 : $mbClass = \"MessageBoxExclamation\"; break;\r\n\t}\r\n\r\n\t$result = \"<dl class=\\\"MessageBox $mbClass\\\">\\n\";\r\n\t$result .= \"\t<dt>$message</dt>\\n\";\r\n\t$result .= \"\t<dd>$note</dd>\\n\";\r\n\t$result .= \"</dl>\\n\";\r\n\r\n\treturn $result;\r\n}",
"function put_success(string $message)\n{\n echo \"<aside class=\\\"notice success\\\">${message}</aside>\";\n}",
"function render_success_message( $form, $args ) {\n $success_message = $form['display']['success_message'];\n $success_message = apply_filters( 'af/form/success_message', $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/id=' . $form['post_id'], $success_message, $form, $args );\n $success_message = apply_filters( 'af/form/success_message/key=' . $form['key'], $success_message, $form, $args );\n\n $success_message = af_resolve_merge_tags( $success_message );\n \n echo '<div class=\"af-success\" aria-live=\"assertive\" role=\"alert\">';\n \n echo $success_message;\n \n echo '</div>';\n }",
"function setFlash($message, $type = 'success') {\n $this->session->set_flashdata($type, $message);\n }",
"function success($msg) {\n if ($msg) {\n echo \" <div class=\\\"success\\\">\" . $msg . \"</div>\\n\";\n } else {\n echo \" <div class=\\\"success\\\">\" . _('Something has been successfully performed. What exactly, however, will remain a mystery.') . \"</div>\\n\";\n }\n}",
"function messages(){\n\t\t$return = \"\\n\";\n\t\tif ($this->CI->session->flashdata('error_message')) {\n\t\t\t$return .= '<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>';\n\t\t\t$return .= $this->CI->session->flashdata('error_message');\n\t\t\t$return .= '</div>';\n\t\t} else if ($this->CI->session->flashdata('success_message')) {\n\t\t\t$return .= '<div class=\"alert alert-success alert-dismissable\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>';\n\t\t\t$return .= $this->CI->session->flashdata('success_message');\n\t\t\t$return .= '</div>';\n\t\t}\n\n\t\treturn $return;\n\n\t}",
"public function successAction()\r\n {\r\n View::renderTemplate('Signup/success.html');\r\n }",
"public static function getFlash() {\r\n if (Yii::app()->user->hasFlash('success')) {\r\n return '<div class=\"alert alert-success alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('success') .'</div>';\r\n } elseif (Yii::app()->user->hasFlash('error')) {\r\n return '<div class=\"alert alert-danger alert-dismissable\"><button aria-hidden=\"true\" data-dismiss=\"alert\" class=\"close\" type=\"button\">×</button>'. Yii::app()->user->getFlash('error') .'</div>';\r\n } else {\r\n return '';\r\n }\r\n }",
"public static function flash($name = '', $message = '', $class = 'alert alert-success') {\n // Needs a name to work\n if (empty($name)) return;\n \n if(!empty($message) && empty($_SESSION[$name])) {\n self::setFlash($name, $message, $class);\n } elseif (empty($message) && !empty($_SESSION[$name])) {\n self::renderFlash($name);\n self::unsetFlashSession($name);\n }\n }",
"public function successAction()\n {\n View::renderTemplate('Signup/success.html');\n }",
"function show_flash_msg() {\n $f = get_session(\"MsgFlash\");\n if (!empty($f)) {\n echo $f;\n clear_session(\"MsgFlash\");\n }\n}",
"public function output()\n {\n $out = '<div class=\"flash_messages\">';\n $stored_messages = isset($_SESSION['flash_messages']) ? $_SESSION['flash_messages'] : array();\n foreach ($stored_messages as $key => $val){\n $out .= '<div class=\"flash_message ' . htmlspecialchars($val['class']) . '\">';\n $out .= $this->useFA ? '<i class=\"' . htmlspecialchars($val['fa']) . '\"></i>' : null;\n $out .= htmlspecialchars($val['message']);\n $out .= '</div>';\n }\n $out .= '</div>';\n $this->deleteAll();\n return $out;\n }",
"function render_ok($message = 'success', $map = null) {\n\trender_page(\"ok\", $message, $map);\n}",
"protected function setFlashMessage()\n {\n if ($message = $this->session()->getFlash('flash-message')) {\n if ($this->session()->getFlash('flash-error')) {\n $this->pageView()->setError($message);\n } else {\n $this->pageView()->setMessage($message);\n }\n }\n }",
"function set_flash_msg($msg, $type = \"success\", $dismissable = true, $showduration = 5000) {\n $class = null;\n $closeBtn = null;\n if ($type != 'custom') {\n $class = \"alert alert-$type\";\n if ($dismissable == true) {\n $class .= \" alert-dismissable\";\n $closeBtn = '<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>';\n }\n }\n $msg = '<div data-show-duration=\"' . $showduration . '\" id=\"flashmsgholder\" class=\"' . $class . ' animated bounce\">\n\t\t\t\t\t' . $closeBtn . '\n\t\t\t\t\t' . $msg . '\n\t\t\t</div>';\n set_session(\"MsgFlash\", $msg);\n}",
"public function flash($sessionName, $className){\r\n\r\n if(!empty($sessionName) && !empty($className) && isset($_SESSION[$sessionName])){\r\n\r\n $msg = $_SESSION[$sessionName];\r\n\r\n echo \"<div class='\". $className .\"'>\".$msg.\"</div>\";\r\n unset($_SESSION[$sessionName]);\r\n }\r\n\r\n }",
"public function flashes(): FlashBag;",
"public function flashAction(Request $request){\n $session = $request->getSession();\n $session->getFlashbag()->add('info','Something information here');\n return $this->redirect($this->generateUrl('view_product', array('id' => 5)));\n }",
"public function flash(): void\n {\n $this->session()->flashInput($this->input());\n }",
"protected function renderMessage(){\n \t\tif (Yii::app()->session['message'] == NULL)\n \t\t\treturn \"\";\n \t\t\n \t\tswitch (Yii::app()->session['msgType']){\n \t\t\tcase 1:\n \t\t\t\t$res = \"<hr><strong>Success: </strong>\".Yii::app()->session['message'].\"<hr>\";\n \t\t\t\tbreak;\n \t\t\tcase 2:\n \t\t\t\t$res = \"<hr><strong>Error: </strong>\".Yii::app()->session['message'].\"<hr>\";\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\t$res = \"<hr><strong>Unknown: </strong>\".Yii::app()->session['message'].\"<hr>\";\n \t\t}\n \t\t\n \t\tYii::app()->session['message'] = NULL;\n \t\t\n \t\treturn $res;\n \t}",
"function flash_message($type, $message) {\n $_SESSION['message'] = array('type' => $type, 'message' => $message);\n if (isset($_SESSION['message'])) {\n\t\tprint_r( $_SESSION['message']);\n\t}\n}",
"public function redAndFlash($result) {\r\n\t\tif (!$result) {\r\n\t\t\t$this->presenter->flashMessage(\"Operation failed. Please repeat in a while\", \"danger\");\r\n\t\t} else {\r\n\t\t\t$this->presenter->flashMessage(\"Your request was proceeded smoothly\");\r\n\t\t}\r\n\t\t$this->redirect(\"this\");\r\n\t}",
"function tflash($message, $type = 'info', $id = null, $visibility = null, $removed_ids = null) {\n switch ($type) {\n case 'info':\n $type = TFLASH::INFO;\n break;\n case 'success':\n $type = TFLASH::SUCCESS;\n break;\n case 'error':\n $type = TFLASH::ERROR;\n break;\n default:\n trigger_error('Invalid TFLASH message type \"'. $type .'\" (allowed: info, success, error)', E_USER_WARNING);\n $type = 'info';\n }\n\n TFLASH::add($message, $type, $id, $visibility, $removed_ids);\n}",
"public function flashdata($name , $msg){\n \treturn $this->session->set_flashdata($name,$msg);\n }",
"function form_success() {\n\t\t$this->sci->da('template');\n\t}",
"private function getFlashMessageFromSession() {\n $error = \\Tools\\Session::get('error');\n \\Tools\\Session::clear('error');\n $warning = \\Tools\\Session::get('warning');\n \\Tools\\Session::clear('warning');\n $success = \\Tools\\Session::get('success');\n \\Tools\\Session::clear('success');\n\n if(isset($error))\n \\Tools\\FlashMessage::addErrorSet($error);\n if(isset($warning))\n \\Tools\\FlashMessage::addWarningSet($warning);\n if(isset($success))\n \\Tools\\FlashMessage::addSuccessSet($success);\n }",
"public function flash(): void\n {\n (new Session())->set(\"flash\", $this);\n\n }",
"public function login() {\n $login_err = \"<p class='flash_err'>\" . $this->_model->getFlash('login_err') . \"</p>\";\n $create_err = \"<p class='flash_err'>\" . $this->_model->getFlash('create_err') . \"</p>\";\n $create_success = \"<p class='flash_success'>\" . $this->_model->getFlash('create_success') . \"</p>\";\n $this->render('General.Login', compact('login_err', 'create_err', 'create_success'));\n }",
"public function flash_create($text, $type){\n $_SESSION[\"flash\"]= array(\"text\"=>$text, \"type\"=>$type);\n }",
"protected function _flash($message, $type = Coda_Helper_Flash::SUCCESS)\n {\n $this->_helper->flash($message, $type);\n }",
"function showMessage2($message, $errormsg = false)\n{\n if ($errormsg) {\n echo '<div id=\"message\" class=\"error\">';\n }\n else {\n echo '<div id=\"message\" class=\"updated fade\" style=\"margin-left: 0px; margin-right: 0px;\">';\n }\n\n echo \"<p>$message</p></div>\";\n}",
"public function okAction ()\n {\n return $this->render( 'maileguak/ok.html.twig' );\n }",
"function flash_redirect($message = '', $url = '/', $type = FLASH_MESSAGE)\r\n\t{\r\n\t if ($message != '') \r\n\t {\r\n $this->CI->session->set_flashdata('message', $message);\r\n $this->CI->session->set_flashdata('type', $type);\r\n }\r\n \r\n redirect($url);\r\n\t}",
"public function message($message, $type='info')\n {\n $this->session->flash('flashi.message', $message);\n $this->session->flash('flashi.type', $type);\n }",
"function active_success()\n {\n $message = null;\n $message = \"Email của bạn là hợp lệ. Cảm ơn bạn !<br />\";\n $message .= \"Bây giờ bạn có thể đăng nhập.\";\n $this->view->load('frontend/user/active_success', [\n 'message' => $message\n ]);\n }",
"function ShowLogIn($message = \"\"){\n\n $smarty = new Smarty();\n $smarty->assign('titulo_s', $this->title);\n $smarty->assign('message', $message);\n\n $smarty->display('templates/login.tpl'); // muestro el template \n }",
"public function success()\n {\n return Session::getFlash('raven:success');\n }",
"public function license_success_message() {\n\t\t$message = __( 'Your Block Lab license was successfully activated!', 'block-lab' );\n\t\treturn sprintf( '<div class=\"notice notice-success\"><p>%s</p></div>', esc_html( $message ) );\n\t}",
"function showSuccess($feedback)\n{\n showFeedback(new AlertMessage(AlertMessage::STYLE_SUCCESS, $feedback));\n}",
"public function displayErrors($params = [])\n\t{\n\t\textract($params);\n\t\tif (!isset($noticeBox))\n\t\t\t$noticeBox = 'displayNoticeBox';\n\n\t\tif (!isset($debugError))\n\t\t\t$debugError = 'displayDebugError';\n\n\t\tif (!isset($userError))\n\t\t\t$userError = 'displayUserError';\n\n\t\tif (!isset($userWarning))\n\t\t\t$userWarning = 'displayUserWarning';\n\n\t\tif (!isset($userNotice))\n\t\t\t$userNotice = 'displayUserNotice';\n\t\t \n\t\techo (empty($GLOBALS['errorUserNotice'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$userNotice.'\"><div>'.$GLOBALS['errorUserNotice'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\n\t\techo (empty($GLOBALS['errorUserWarning'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$userWarning.'\"><div>'.$GLOBALS['errorUserWarning'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\n\t\techo (empty($GLOBALS['errorUserError'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$userError.'\"><div>'.$GLOBALS['errorUserError'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\n\t\techo (empty($GLOBALS['pageErrors'])? '':'<div id=\"'.$noticeBox.'\"><div id=\"'.$debugError.'\"><div>'.$GLOBALS['pageErrors'].'</div><button id=\"displayUserCloseButton\"></button></div></div>');\n\t\t\n\t\tif (!empty($GLOBALS['pageErrors']) or !empty($GLOBALS['errorUserError']) or !empty($GLOBALS['errorUserWarning']) or !empty($GLOBALS['errorUserNotice']) ) {\n\t\t\techo \"<script>document.querySelector('#displayUserCloseButton').onclick = function() {document.querySelector('#{$noticeBox}').parentNode.removeChild(document.querySelector('#{$noticeBox}'))}</script>\";\n\t\t}\n\t}",
"function showMessage($message, $errormsg = false)\n{\n\t\n if ($errormsg) {\n echo '<div id=\"message\" class=\"error\">';\n }\n else {\n echo '<div id=\"message\" class=\"updated notice notice-success is-dismissible\">';\n }\n\n echo \"<p>$message</p></div>\";\n}",
"function flash_lunas() {\n\n\n return '<span class=\"badge badge-success text-light p-2\">LUNAS</span>';\n}",
"protected function showFlashMessages()\n{\n //set the flash messages to all types of laravel session\n session()->flash('error', $this->errorMessages);\n session()->flash('info', $this->infoMessages);\n session()->flash('success', $this->successMessages);\n session()->flash('warning', $this->warningMessages);\n}",
"function error($error, $location, $seconds = 5) \n { \n $_SESSION['iserror'] = '1'; \n $_SESSION['errormessage']=' <div id=\"Upload\">'. \n ' <h1>Upload failure</h1>'. \n ' <p>An error has occurred: '. \n ' <span class=\"red\">' . $error . '...</span>'. \n ' The upload form is reloading</p>'. \n ' </div>'.\"nn\"; \n\n }",
"function success_page($msg, $redirect_to = \"\", $redirect_time = 0)\n{\n page_header($redirect_to, $redirect_time);\n echo ' <div class=\"success\">'.$msg.'</div>';\n page_footer();\n exit;\n}",
"public function thm_blocksy_validation_error_notice() {\n\t\t\n\t\techo \"<div class='error notice'><p>\".$this->error.\"</p></div>\";\n\n\t}"
] | [
"0.72069967",
"0.7164869",
"0.7150055",
"0.7118421",
"0.69741654",
"0.68779474",
"0.684934",
"0.67434967",
"0.67325103",
"0.67284054",
"0.66904515",
"0.66701514",
"0.65090513",
"0.65033543",
"0.6500036",
"0.6497987",
"0.648419",
"0.64635813",
"0.6458883",
"0.64480376",
"0.6432631",
"0.6410626",
"0.63739944",
"0.63679796",
"0.63671136",
"0.6354456",
"0.63252723",
"0.6317656",
"0.6290194",
"0.62851703",
"0.62610275",
"0.62587076",
"0.6249986",
"0.62478435",
"0.6188134",
"0.61852723",
"0.6171655",
"0.61687595",
"0.6148069",
"0.61477715",
"0.6139567",
"0.61341333",
"0.61288667",
"0.61232543",
"0.6116064",
"0.6111737",
"0.60891676",
"0.6082656",
"0.6073875",
"0.6069592",
"0.60583955",
"0.60583955",
"0.60583955",
"0.60542494",
"0.6021707",
"0.59988177",
"0.5998602",
"0.5991571",
"0.59903145",
"0.5986564",
"0.59609324",
"0.5959369",
"0.5925836",
"0.5916575",
"0.59151846",
"0.59082437",
"0.5907219",
"0.5906737",
"0.59060735",
"0.59024763",
"0.59010357",
"0.58899367",
"0.5884301",
"0.5882313",
"0.58801305",
"0.58771914",
"0.5876673",
"0.5868129",
"0.58677083",
"0.58673555",
"0.5859383",
"0.585566",
"0.5849517",
"0.5834101",
"0.58255583",
"0.58240837",
"0.5810159",
"0.58037966",
"0.57959783",
"0.5791911",
"0.579182",
"0.5790081",
"0.57893515",
"0.5781681",
"0.5776495",
"0.57663083",
"0.5762836",
"0.57578325",
"0.5750566",
"0.5744478"
] | 0.84708256 | 0 |
the default action is "indexAction", unless explcitly set to something else | public function indexAction()
{
// STAGE 3: Choose, create, and optionally update models using business logic.
if (false === strpos($this->view->baseUrl, '/index.php')) {
$this->view->baseUrl .= '/index.php';
}
// STAGE 4: Apply business logic to create a presentation model for the view.
// STAGE 5: Choose view and submit presentation model to view.
$this->renderToSegment('body');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction() {\n\t\t// TODO Auto-generated AdminController::indexAction() default action\n\t}",
"abstract public function actionIndex();",
"public function singleIndexAction() {}",
"abstract function indexAction();",
"public function actionIndex()\n\n {\n\n echo 'Index action has not used.';\n\n }",
"function indexAction(){\n \t}",
"public function actionIndex()\n {\n\t\techo \"=== Action index ===\";\n \n }",
"public function indexAction(){}",
"public function fullIndexAction() {}",
"public function indexAction()\n {\n\n return parent::indexAction();\n\n\n }",
"protected function indexAction() {}",
"public function indexAction()\n\t{\n\t\t// do nothing\n }",
"public function indexAction(){\r\n\t\t\t\r\n\t\t}",
"protected function indexAction()\n {\n }",
"public function indexAction(){\t\t\n\t}",
"public function actionIndex() {}",
"public function actionIndex() {}",
"public function action_index()\n\t{\n\t\t// figure out what action to do... if we're called directly\n\t\t// actions in this class are called from the Profile menu, though.\n\t}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"function indexAction(){\r\n }",
"public function actionIndex()\n {}",
"public function indexAction ()\r\n {\r\n // TODO Auto-generated SearchController::indexAction() default action\r\n }",
"public function indexAction() \n {\n \t\n }",
"public function action_index()\n\t{\n\t}",
"public function indexAction() {\n\t\t$this->_notImplemented();\n\t}",
"public function action_index()\n {\n }",
"public function actionIndex()\n\t{\n\t\t// do stuff that's not the main content?\n\t}",
"public function indexAction()\n {}",
"public function indexAction() {\n\t}",
"public function indexAction() {\n\t}",
"function & DefaultIndexAction (&$controller)\n {\n\n parent::Action($controller);\n\n }",
"public function indexAction() {\n \n }",
"public function indexAction() {\n ;\n }",
"public function indexAction() {\r\n }",
"public function indexAction() {\n\n\t}",
"public function indexAction() {\r\n \r\n }",
"public function indexAction ()\r\n {\r\n\r\n }",
"public function indexAction() \n {\n\t\tif (!isset($this->view->flagFailedSearch)) {\n\t\t\t$this->view->flagFailedSearch = FALSE;\n\t\t}\n }",
"public function indexAction()\n {\n \n }",
"public function indexAction()\n {\n \n }",
"public function actionIndex()\n {\n\n }",
"public function indexAction()\n\t{\n\n\t}",
"public function indexAction()\n {\n // disable rendering\n $this->_helper->viewRenderer->setNoRender();\n }",
"public function indexAction() {\n }",
"public function indexAction() {\n }",
"public function indexAction()\n {\n $this->addAction();\n }",
"public function indexAction ()\n\t{\n\t\t// TODO Auto-generated ReportController::indexAction() default action\n\t}",
"public function indexAction()\n {\n// $this->view = 'index';\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n //for real application\n }",
"public function indexAction()\n {\n $this->autofilterParameters = $this->autofilterParameters + $this->_autofilterExtraParameters;\n if (! isset($this->indexParameters['contentTitle'])) {\n $this->indexParameters['contentTitle'] = $this->getIndexTitle();\n }\n\n return parent::indexAction();\n }",
"public function actionIndex() {\n $this->actionTrenutniSpored();\n }",
"public function actionIndex(): void\n {\n $this->actionInit();\n $this->actionDeploy();\n $this->actionSwitch();\n }",
"public function indexAction() {\r\n\t\t// TODO Auto-generated FinanceController::indexAction() default action\r\n\t}",
"public function indexAction()\n {\n return array();\n }",
"public function indexAction()\n {\n return array();\n }",
"public function indexAction()\n {\n return array();\n }",
"public function indexAction()\n {\n return array();\n }",
"public function actionIndex() {\n \n $this->redirect('admin');\n \n\t}",
"public function indexAction() {\n $this->formAction();\n }",
"public function indexAction() {\n $this->formAction();\n }",
"public function actionDefault()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction() \n\t{\n\t\t$this->_forward('view');\n\t}",
"public function indexAction() {\n\n }",
"public function indexAction() {\n\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"function indexAction()\n {\n parent::indexAction();\n $this->view->title = \"Data Importer\";\n }",
"public function indexAction()\n {\n // action body\n }",
"public function indexAction()\n\t{\n\t\t$this->_forward('view');\n\t}",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"index\";\n }",
"public function indexAction()\n {\n return $this->_forward('top', 'search', 'admin');\n }",
"public function indexAction()\n {\n return array(\n );\n }",
"public function actionIndex(){\r\r\n\t\t$this->render('index', array());\r\r\n\t}",
"public function indexAction()\n {\n $ctrl = $this->dbController->find($this->checkControllerIdParam());\n $vCtrl = FALSE;\n $vAction = array();\n\n IF($ctrl->count() === 1) {\n $ctrlRow = new Admin_Model_DbRow_Controller($ctrl->current());\n\n FOREACH($this->dbAction->findActionByControllerId($ctrlRow->get('id')) AS $row) {\n $vAction[] = new Admin_Model_DbRow_Action($row);\n }\n\n $vCtrl = $ctrlRow;\n }\n \n $this->view->controller = $vCtrl;\n $this->view->actions = $vAction;\n }",
"public function indexAction()\n {\n $this->_forward($this->_getBrowseAction());\n }",
"public function actionIndex()\n\t{\n\t\t\n\t\t$this->render('index');\n\t}",
"public function actionIndex()\n {\n\t return $this->render('index');\n }",
"public function indexAction()\n {\n $this->_forward('view');\n }",
"public function actionIndex()\n\t{\n\t\treturn $this->redirect(['general']);\n\t}"
] | [
"0.8225392",
"0.8095778",
"0.80863327",
"0.80374944",
"0.7992981",
"0.7971771",
"0.7912538",
"0.7903136",
"0.78977334",
"0.7892377",
"0.7849805",
"0.7848459",
"0.7848071",
"0.78203434",
"0.7812484",
"0.78045547",
"0.78045547",
"0.7787189",
"0.7778062",
"0.7777224",
"0.7777224",
"0.7777224",
"0.7777224",
"0.7777224",
"0.7777224",
"0.7777224",
"0.7777224",
"0.7777224",
"0.77766585",
"0.7769267",
"0.77615917",
"0.7742553",
"0.77093947",
"0.7708747",
"0.76948607",
"0.76722467",
"0.76608694",
"0.7657751",
"0.7627127",
"0.7627127",
"0.76260006",
"0.7609589",
"0.75824124",
"0.75773597",
"0.75734484",
"0.7556575",
"0.7552287",
"0.7470227",
"0.7460041",
"0.7460041",
"0.7441483",
"0.743945",
"0.7407222",
"0.7392658",
"0.7392658",
"0.73778635",
"0.737638",
"0.73643535",
"0.73249716",
"0.73249716",
"0.73249716",
"0.73249716",
"0.73249716",
"0.73249716",
"0.7313577",
"0.730416",
"0.7301283",
"0.7262054",
"0.72333074",
"0.7222937",
"0.7222937",
"0.7222937",
"0.7222937",
"0.7216443",
"0.7207707",
"0.7207707",
"0.72023815",
"0.7189333",
"0.71749574",
"0.71699107",
"0.71699107",
"0.7166294",
"0.71649677",
"0.71632785",
"0.7157477",
"0.71572775",
"0.71572775",
"0.71572775",
"0.71572775",
"0.71572775",
"0.71572775",
"0.7154043",
"0.71471316",
"0.7132459",
"0.7120371",
"0.71139216",
"0.71077555",
"0.71064246",
"0.71015733",
"0.7100179",
"0.70968956"
] | 0.0 | -1 |
reload the DB tables using the DB SQL dump found in config/zfdemo..sql | public function resetAction()
{
// STAGE 3: Choose, create, and optionally update models using business logic.
$registry = Zend_Registry::getInstance();
$db = $registry['db'];
// if the DB is not configured to handle "large" queries, then we need to feed it bite-size queries
$filename = $registry['configDir'] . 'zfdemo.' . $registry['config']->db->type . '.sql';
$statements = preg_split('/;\n/', file_get_contents($filename, false));
foreach ($statements as $blocks) {
$sql = '';
foreach (explode("\n", $blocks) as $line) {
if (empty($line) || !strncmp($line, '--', 2)) {
continue;
}
$sql .= $line . "\n";
}
$sql = trim($sql);
if (!empty($sql)) {
$db->query($sql);
}
}
// STAGE 4: Apply business logic to create a presentation model for the view.
$this->view->filename = $filename;
// STAGE 5: Choose view and submit presentation model to view.
$this->renderToSegment('body');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function resetDatabase()\n {\n $dumpFolder = APPLICATION_PATH . '/../data/dumps/';\n\n $directoryIterator = new DirectoryIterator($dumpFolder);\n /**\n * @var Zend_Db_Adapter_Abstract $db\n */\n $db = Zend_Registry::get('db');\n\n foreach ($directoryIterator as $file) {\n if (!$file->isDot()\n && $file->isFile()\n && $file->isReadable()\n ) {\n $sql = file_get_contents($file->getPathname());\n $db->query($sql);\n }\n }\n }",
"public function databaseReload()\n {\n $output = shell_exec('./runauthtests.sh --reload');\n\n codecept_debug($output);\n }",
"public function refreshDatabase()\n {\n $this->validateDatabase();\n $this->copySqliteCreate();\n $this->runMigrations();\n\n copy($this->baseSqlite(), $this->copySqlite());\n }",
"public function reloadTableNames() {\n\t\t$this->_loadTableNames();\n\t}",
"public static function dbClear(){\n\t\tif (App::runningUnitTests()) {\n\t\t\tself::clearModelTables(TestSettings::$modelTables);\n\t\t\tself::clearTables(TestSettings::$pivotTables);\n\t\t}\n\t}",
"public function updateTables()\n {\n $prefix = $this->getPrefix();\n $charset = $this->wpdb->get_charset_collate();\n\n foreach ($this->config['tables'] as $table => $createStatement) {\n $sql = str_replace(\n ['{prefix}', '{charset}'],\n [$prefix, $charset],\n $createStatement\n );\n dbDelta($sql);\n }\n }",
"protected function seedTablesStructure()\n {\n $getStructureDump = new Process(\"mysqldump -u {$this->user} -p{$this->password} --no-data {$this->oldDbName} > {$this->oldDbName}.dump\");\n $getStructureDump->run();\n\n $fillStructureDump = new Process(\"mysql -u {$this->user} -p{$this->password} {$this->newDbName} < {$this->oldDbName}.dump\");\n $fillStructureDump->run();\n\n $removeDumpFile = new Process(\"rm -f {$this->oldDbName}.dump\");\n $removeDumpFile->run();\n }",
"private function generateTables()\n\t\t{\n\t\t\tif ($this->connectFail == False)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t*\tdatabase schema access\n\t\t\t\t*/\n\n\t\t\t\t$content = file_get_contents('dbase.sql');\n\t\t\t\t$queries = explode(\";\\n\\n\", $content);\n\n\t\t\t\tforeach ($queries as $key => $query)\n\t\t\t\t{\n\t\t\t\t\t$er = False;\n\t\t\t\t\t$df = $this->execQuery($query);\n\n\t\t\t\t\t#print $df.\"\\n\".$er.PHP_EOL;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function dropAllData()\n {\n $database_name = $this->conn->getDatabase();\n\n $tables = $this->conn->query(\"SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = '$database_name';\")->fetchAll();\n\n $queries = \"SET FOREIGN_KEY_CHECKS=0;\\n\";\n\n foreach ($tables as $aTable){\n $queries .= reset($aTable);\n }\n\n $this->conn->executeQuery($queries);\n\n $editora_structure = file_get_contents(__DIR__ .'/../../../../data/editora.sql');\n\n $this->conn->executeQuery($editora_structure);\n }",
"public function backup_database()\n\t{\n\t\t$db = Database::instance();\n\n\t\t$tables_to_dump = array('client', 'contact', 'currency', 'invoice', 'invoice_payment', 'module', 'operation_type', 'project', 'role', 'ticket', 'time', 'user');\n\n\t\t// Add the table structure\n\t\t$sql = View::factory('admin/settings/schema/tables')->render().\"\\n\";\n\t\t// Add the constraints\n\t\t$sql.= View::factory('admin/settings/schema/constraints')->render().\"\\n\";\n\n\t\t// Dump the data\n\t\tforeach ($tables_to_dump as $model)\n\t\t{\n\t\t\t$model_name = $model.'_Model';\n\t\t\t$old = $model;\n\t\t\t$model = new $model_name;\n\n\t\t\t$rows = $model->fetch_all();\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\t$row = $row->as_array();\n\t\t\t\t$sql.= 'INSERT INTO `'.inflector::plural($old).'` ('.implode(',', array_keys($row)).') VALUES ('.implode(',', array_values($row)).')'.\"\\n\";\n\t\t\t}\n\t\t}\n\n\t\theader('Content-Description: File Transfer');\n\t\theader('Content-Type: text/plain');\n\t\theader('Content-Disposition: attachment; filename=schema.sql');\n\t\theader('Content-Transfer-Encoding: binary');\n\t\theader('Expires: 0');\n\t\theader('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader('Pragma: public');\n\t\theader('Content-Length: '.strlen($sql));\n\t\tob_clean();\n\t\tflush();\n\t\techo $sql;\n\t\texit;\n\t}",
"private function createMainDatabaseRecords()\n {\n // get the .sql file\n $sql = (string) @file_get_contents( $this->plugin->getPath() . \"/Setup/install.sql\" );\n\n // insert it\n $this->db->exec( $sql );\n }",
"protected function loadExtLocalconfDatabaseAndExtTables() {}",
"function load_tables()\n\t{\n\t\treturn $this->_load_tables('/mydoliboard/sql/');\n\t}",
"function init_tables(){\n $db = new PDO('sqlite:history.pyramid.sqlite');\n $db->exec(\"PRAGMA foreign_keys = ON\");\n $db->exec(\"drop table if exists areas\");\n $db->exec(\"drop table if exists codigos\");\n $db->exec(\"drop table if exists outs\");\n $db->exec(\"CREATE TABLE Areas (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n $db->exec(\"CREATE TABLE codigos (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n $db->exec(\"CREATE TABLE outs (\n Id INTEGER PRIMARY KEY,\n out_date DATETIME DEFAULT CURRENT_TIMESTAMP,\n name TEXT,\n target INTEGER);\");\n}",
"public function run()\n {\n $path = 'database/seeds/SQLFiles/Products.sql';\n DB::unprepared(file_get_contents($path));\n $this->command->info('Products table seeded!');\n }",
"public function acfedu_create_fill_db() {\n\t\t\t\t$this->acfedu_check_table();\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tob_start();\n\t\t\t\tglobal $wpdb;\n //require_once( 'lib/import_nl.php' );\n //require_once( 'lib/import_be.php' );\n //require_once( 'lib/import_lux.php' );\n require_once( 'lib/import_id.php' );\n\t\t\t\t$sql = ob_get_clean();\n\t\t\t\tdbDelta( $sql );\n\t\t\t}",
"protected function resetDb()\n {\n if (is_readable(PHPUNIT_WEBROOT . '/app/database/bolt.db')) {\n unlink(PHPUNIT_WEBROOT . '/app/database/bolt.db');\n copy(PHPUNIT_ROOT . '/resources/db/bolt.db', PHPUNIT_WEBROOT . '/app/database/bolt.db');\n }\n }",
"public function run()\n {\n if (!DB::table('users')->count()) {\n DB::unprepared(file_get_contents(__DIR__ . '/sql/elms_users.sql'));\n }\n }",
"function import_data() {\n\t\t$sync_tables = $this->config->item('sync_tables');\n\n\t\t$this->db_tools->import_data( $sync_tables );\n\t\t$this->db_tools->echo_import_data();\n\t}",
"public function run()\n {\n Ward::unguard();\n if(!Ward::find(1)) {\n $path = __DIR__.'/sql-script/ward.sql';\n DB::unprepared(file_get_contents($path));\n //$this->command->info('Country table seeded!');\n }\n }",
"public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }",
"protected function importDatabaseData() {}",
"function monitor_vider_tables($nom_meta_base_version) {\n\n\tsql_drop_table('spip_monitor');\n\tsql_drop_table('spip_monitor_log');\n\tsql_drop_table('spip_monitor_stats');\n\tsql_drop_table('spip_monitor_stats_plugins');\n\tsql_drop_table('spip_monitor_evenements');\n\tsql_alter('TABLE spip_syndic DROP COLUMN date_ping');\n\tsql_alter('TABLE spip_syndic DROP COLUMN statut_log');\n\tsql_alter('TABLE spip_syndic DROP COLUMN statut_stats');\n\tsql_alter('TABLE spip_syndic DROP COLUMN monitor_evenements');\n\teffacer_meta('monitor');\n\teffacer_meta($nom_meta_base_version);\n}",
"function execute()\n {\n $this->OldModel = $this->getOldModelToUse();\n $this->OldModel->cacheQueries = false;\n $this->OldModel->cacheSQL = false;\n $this->NewModel = $this->getNewModelToUse();\n $this->NewModel->cacheQueries = false;\n $this->NewModel->cacheSQL = false;\n \n $tableMap = $this->getTableMap();\n debug($tableMap);\n if (!$tableMap)\n {\n $this->print_instructions();\n exit();\n }\n\n foreach ($tableMap as $table => $data)\n {\n if (!$this->specialProcessing($table, $data))\n {\n $this->import($table, $data);\n }\n }\n }",
"public function run()\n {\n $this->execute('SET FOREIGN_KEY_CHECKS = 0');\n $this->execute('TRUNCATE TABLE tbl_fact_departments');\n\n $sql = file_get_contents(__DIR__ . '/../sql/011_add_it_department.sql');\n $this->execute($sql);\n $sql = file_get_contents(__DIR__ . '/../sql/012_add_departments.sql');\n $this->execute($sql);\n }",
"public function reloadFromConfig($config)\n {\n $this->schema = $config;\n if (!isset($this->schema['create'])) {\n $this->schema['create'] = array();\n }\n if (!isset($this->schema['update'])) {\n $this->schema['update'] = array();\n }\n if (!isset($this->schema['seed'])) {\n $this->schema['seed'] = array();\n }\n $this->tables = array();\n foreach ($this->schema['create'] as $name => $fields) {\n $table = $this->makeTable($name);\n $columns = array_keys($fields);\n foreach ($columns as $name) {\n $table->addColumn(new Property($name));\n }\n $this->addTable($table);\n }\n }",
"public static function dbRefresh($includeReset = false){\n\t\tif (App::runningUnitTests()) {\n\n\t\t\t//@TODO Fix issue with rollbacks before this can be used\n\t\t\t// \t\tif ($includeReset) {\n\t\t\t// \t\t\t//Turn foreign key checks off <- USE WITH CAUTION!\n\t\t\t// \t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t\t// \t\t\t//Rollback all migrations\n\t\t\t// \t\t\tArtisan::call('migrate:reset');\n\t\t\t// \t\t\t//Turn foreign key checks on <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t\t// \t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t\t\t// \t\t}\n\n\t\t\tself::dbMigrate();\n\t\t\tself::dbClear();\n\t\t\tself::dbSeed();\n\t\t}\n\t}",
"public function prepDatabases () {\n\t\tforeach( $this->wikiDBs as $wikiID => $db ) {\n\n\t\t\t$this->output( \"\\n#\\n# Adding initial offset to user IDs in $wikiID\\n#\" );\n\n\t\t\t$prepTables = $this->tablesToModify\n\t\t\t\t+ array( \"user\" => $this->userTable )\n\t\t\t\t+ array( \"user_properties\" => $this->userPropsTable );\n\n\t\t\tforeach ( $prepTables as $tableName => $tableInfo ) {\n\t\t\t\t$idField = $tableInfo['idField'];\n\t\t\t\t$db->query( \"UPDATE $tableName SET $idField = $idField + $this->initialOffset WHERE $idField != 0 AND $idField IS NOT NULL\" );\n\t\t\t}\n\n\t\t\t$db->query( \"UPDATE ipblocks SET ipb_user = ipb_user + $this->initialOffset WHERE ipb_user != 0 AND ipb_user IS NOT NULL\");\n\t\t\t$db->query( \"UPDATE ipblocks SET ipb_by = ipb_by + $this->initialOffset WHERE ipb_by != 0 AND ipb_by IS NOT NULL\");\n\n\t\t\t// DROP external_user table. See https://www.mediawiki.org/wiki/Manual:External_user_table\n\t\t\t$db->query( \"DROP TABLE IF EXISTS external_user\" );\n\n\t\t}\n\t}",
"protected function migrateTables()\n {\n foreach ($this->tables as $table) {\n \\DB::getPdo()->exec(\"INSERT IGNORE INTO {$this->newDbName}.{$table} SELECT * FROM {$this->oldDbName}.{$table}\");\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n District::truncate();\n Area::truncate();\n Province::truncate();\n Geography::truncate();\n\n $query = file_get_contents(base_path('database/seeds/thailand.sql'));\n DB::unprepared($query);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"protected function resetExistingTables()\n {\n $this->existingTables = null;\n }",
"protected function loadUpdate() {\r\n $this->update = new \\App\\Table\\UpdateTable(App::getInstance()->getDb());\r\n }",
"public function setUp()\n {\n parent::setUp();\n \n $this->db = Ediary_Db::getInstance();\n $this->object = new Ediary_Database_Schema($this->db);\n \n // DEBUG: THIS WILL DROP TABLES AND RECREATE THEM\n //Ediary_Db::getInstance()->upgrade();\n }",
"protected function setUp() {\n $db = Kohana::config('database.default.connection.database');\n Kohana::config('database')->default['connection']['database'] = 'test_'.$db;\n DB::query(Database::DELETE, 'DROP TABLE IF EXISTS ut_init, ut_pop, db_deltas')\n ->execute();\n }",
"public function run()\n {\n City::unguard();\n DB::unprepared(file_get_contents(base_path('cities.sql')));\n }",
"function populate(){\n\t\t$this->db_tools->populate();\n\t\t$this->db_tools->echo_populate();\n\t}",
"public function reloadSchema()\n {\n $em = $this->getEntityManager();\n $tool = new SchemaTool($em);\n $tool->dropSchema($em->getMetadataFactory()->getAllMetadata());\n $tool->createSchema($em->getMetadataFactory()->getAllMetadata());\n $this->schemaReloaded = true;\n }",
"private function prepareTables() {}",
"protected function generateDbTables()\n\t{\n\t\t$dbTables = $this->getDbTables();\n\t\t\n\t\t//get the describe of the table\n\t\tforeach ($dbTables as $table) {\n\t\t\t$describeTable = $this->describeTable($table);\n\t\t\t\n\t\t\tif ($describeTable) {\n\t\t\t\t$primaryKey = $this->getPrimaryKey($describeTable);\n\t\t\t\t$code = $this->generateDbTableCode($table, $primaryKey);\n\t\t\t\t$this->saveDbTableFile($code);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"protected function switchEnvTables()\n {\n /**\n * Update .env file for allowing new users requests to hang within locking cycle.\n */\n $this->updateDotEnv('DB_DATABASE', $this->newDbName); // switch .env database names\n $this->updateDotEnv('DB_DUMP_DATABASE', $this->oldDbName);\n\n \\Artisan::call('config:clear'); // clear .env file cache for allowing new requests to receive fresh config\n }",
"private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}",
"function tables()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tables'] == 1 ) ? 'Database Table' : 'Database Tables';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'dropped' : 'created';\n\t\t$old_data = array();\n\t\t$new_fields = array();\n\t\t\n\t\tforeach ( $this->xml_array['tables_group']['table'] as $k => $v )\n\t\t{\n\t\t\t$this->ipsclass->DB->sql_drop_table( $v['name']['VALUE'].\"_bak\" );\n\t\t\t\n\t\t\tif ( !$this->ipsclass->input['un'] && in_array( SQL_PREFIX.$v['name']['VALUE'], $this->ipsclass->DB->get_table_names() ) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->query( \"RENAME TABLE \".SQL_PREFIX.$v['name']['VALUE'].\" TO \".SQL_PREFIX.$v['name']['VALUE'].\"_bak;\" );\n\t\t\t\t$this->ipsclass->DB->cached_tables[] = SQL_PREFIX.$v['name']['VALUE'].\"_bak\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->DB->sql_drop_table( $v['name']['VALUE'] );\n\t\t\t\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->query( $this->fix_create_table( \"CREATE TABLE IF NOT EXISTS \".SQL_PREFIX.$v['name']['VALUE'].\" (\".$v['data']['VALUE'].\") TYPE=\".$v['type']['VALUE'] ) );\n\t\t\t\t\n\t\t\t\tif ( in_array( SQL_PREFIX.$v['name']['VALUE'].\"_bak\", $this->ipsclass->DB->get_table_names() ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => $v['name']['VALUE'].\"_bak\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\t );\n\t\t\t\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\t\t\n\t\t\t\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t\t\t\t{\n\t\t\t\t\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$old_data[ $v['name']['VALUE'] ][] = $r;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->query( \"SHOW COLUMNS FROM \".SQL_PREFIX.$v['name']['VALUE'].\";\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$new_fields[ $v['name']['VALUE'] ][] = $row['Field'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ( $old_data[ $v['name']['VALUE'] ] as $kk => $vv )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$insert = array();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ( $vv as $field => $value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( in_array( $field, $new_fields[ $v['name']['VALUE'] ] ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$insert[ $field ] = $this->ipsclass->txt_safeslashes( $value );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( count( $insert ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->ipsclass->DB->do_insert( $v['name']['VALUE'], $insert );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->sql_drop_table( $v['name']['VALUE'].\"_bak\" );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tables']} {$object} {$operation}....\" );\n\t}",
"public static function generateDatabase()\n\t{\n\t\t$entities\t=\tself::getEntities();\n\t\t$query\t\t=\tself::$current_db->query('SHOW TABLES');\n\t\t$tables\t\t=\tarray();\n\n\t\twhile($table = $query->fetch(\\PDO::FETCH_NUM))\n\t\t\t$tables[]\t=\tstrtolower($table[0]);\n\n\t\tforeach($entities as $entity)\n\t\t{\n\t\t\tif( ! in_array(strtolower($entity::getTableName()), $tables))\n\t\t\t\t$entity::createTable();\n\t\t\telse\n\t\t\t\t$entity::updateTable();\n\t\t}\n\t}",
"public function run()\n {\n \\App\\Sql::truncate(); //清空資料庫\n\n \\App\\Sql::create([\n 'name'=>'2019-03-06_init.sql',\n 'install'=>'1',\n ]);\n }",
"public function updateDatabase() {\r\n // All the extra function remove an unnecessary layer of arrays\r\n $tables_in_database = DB::tablesInDatabase();\r\n\r\n // List of matched tables\r\n $matched = [];\r\n\r\n /** @var Table $table */\r\n foreach (DB::tableInstances() as $i => $table) {\r\n $this->table = $table;\r\n $this->table_name = $table::getName();\r\n\r\n if(in_array($this->table_name, $tables_in_database)) {\r\n array_push($matched, $table->class());\r\n\r\n // Go through and check each table\r\n $this->updateExistingTable();\r\n }\r\n }\r\n\r\n // Loops over to see if any new tables have appeared and if so add them\r\n foreach (array_diff(DB::tables(), $matched) as $table) {\r\n DB::createTableIfNotExists($table);\r\n\r\n echo \"Created $table \\n\";\r\n if($this->log_changes) Logger::migration(\"Created $table\");\r\n }\r\n\r\n // Loops over and find tables defined in the Database but not added to the DB::$table_instances array\r\n // If found it removes them from the Database\r\n foreach (array_diff($tables_in_database, DB::tablesByName()) as $table) {\r\n // Checks for reference tables used in Many to Many relationships\r\n // If found continue as they should not be dropped\r\n if(in_array($table, DB::getReferenceTables())) continue;\r\n\r\n // FIXME: drop reference table first to stop foreign key constraint error\r\n\r\n $sql = \"DROP TABLE $table\";\r\n\r\n $q = DB::connection()->query($sql);\r\n\r\n if($q === false) {\r\n //throw new ColumnNotFoundError(\"Error given column(s) do not exist in table\");\r\n throw new SQLQueryError(DB::connection()->error());\r\n } else {\r\n echo \"Dropped $table \\n\";\r\n if ($this->log_changes) Logger::migration(\"Dropped $table\");\r\n }\r\n }\r\n }",
"protected function updateDoctrineXmlTables()\n {\n \\Concrete\\Core\\Database\\Schema\\Schema::refreshCoreXMLSchema(array(\n 'CollectionVersions',\n 'TreeNodes',\n 'Sessions',\n 'UserWorkflowProgress',\n 'Users',\n ));\n }",
"public function resetDatabase(): void\n {\n $this->exec('DELETE FROM fo_forms');\n $this->exec('ALTER TABLE fo_forms AUTO_INCREMENT=1000');\n }",
"public function deleteTablesAndEvents() {\r\n\t\t// drop additional tables for extension module\r\n\t\t$tableNames = ['zasilkovna_weight_rules', 'zasilkovna_shipping_rules', 'zasilkovna_orders'];\r\n\t\tforeach ($tableNames as $shortTableName) {\r\n\t\t\t$sql = 'DROP TABLE `' . DB_PREFIX . $shortTableName . '`;';\r\n\t\t\t$this->db->query($sql);\r\n\t\t}\r\n\t\t// remove events registered for \"zasilkovna\" plugin\r\n\t\t$this->load->model('setting/event');\r\n\t\t$this->model_setting_event->deleteEventByCode(self::EVENT_CODE);\r\n\t}",
"public function fill_db()\n {\n include('create_tables.php');\n\n $this->db->query($CLEAN);\n $this->db->query($APPTYPE);\n $this->db->query($BOOKINGS);\n $this->db->query($BUSINESSOWNER);\n $this->db->query($CUSTOMERS);\n $this->db->query($EMPLOYEES);\n $this->db->query($TIMESLOTS);\n $this->db->query($CANWORK);\n $this->db->query($HAVESKILL);\n $this->db->query($BUSINESS);\n $this->db->query($HOURS);\n }",
"public function testMigrationsFromScratch()\n {\n $this->setUpDB();\n \n // Check how many tables we have\n $Migration = new \\Migration();\n $Tables = $Migration->getTables();\n \n $this->assertCount(self::NUM_TABLES, $Tables);\n }",
"public function create_tables()\n\t{\n\t//\t$link = mysql_connect($this->previous_steps['mysql']['server'], $this->previous_steps['mysql']['user'], $this->previous_steps['mysql']['password']);\n\n\t\t$link = e107::getDb()->connect($this->previous_steps['mysql']['server'], $this->previous_steps['mysql']['user'], $this->previous_steps['mysql']['password']);\n\n\t\tif(!$link)\n\t\t{\n\t\t\treturn nl2br(LANINS_084.\"\\n\\n<b>\".LANINS_083.\"\\n</b><i>\".e107::getDb()->getLastErrorText().\"</i>\");\n\t\t}\n\n\t\t$this->dbLink = $link;\t\t// Needed for mysql_close() to work round bug in PHP 5.3\n\t//\t$db_selected = mysql_select_db($this->previous_steps['mysql']['db'], $link);\n\t\t$db_selected = e107::getDb()->database($this->previous_steps['mysql']['db'],$this->previous_steps['mysql']['prefix']);\n\t\tif(!$db_selected)\n\t\t{\n\t\t\treturn nl2br(LANINS_085.\" '{$this->previous_steps['mysql']['db']}'\\n\\n<b>\".LANINS_083.\"\\n</b><i>\".e107::getDb()->getLastErrorText().\"</i>\");\n\t\t}\n\n\t\t$filename = \"{$this->e107->e107_dirs['CORE_DIRECTORY']}sql/core_sql.php\";\n\t\t$fd = fopen ($filename, \"r\");\n\t\t$sql_data = fread($fd, filesize($filename));\n\t\t$sql_data = preg_replace(\"#\\/\\*.*?\\*\\/#mis\", '', $sql_data);\t\t// Strip comments\n\t\tfclose ($fd);\n\n\t\tif (!$sql_data)\n\t\t{\n\t\t\treturn nl2br(LANINS_060).\"<br /><br />\";\n\t\t}\n\n\t\tpreg_match_all(\"/create(.*?)(?:myisam|innodb);/si\", $sql_data, $result );\n\n\t\t// Force UTF-8 again\n\t\t$this->dbqry('SET NAMES `utf8`');\n\n\t\t$srch = array(\"CREATE TABLE\",\"(\");\n\t\t$repl = array(\"DROP TABLE IF EXISTS\",\"\");\n\n\t\tforeach ($result[0] as $sql_table)\n\t\t{\n\t\t\t$sql_table = preg_replace(\"/create table\\s/si\", \"CREATE TABLE {$this->previous_steps['mysql']['prefix']}\", $sql_table);\n\n\t\t\t// Drop existing tables before creating.\n\t\t\t$tmp = explode(\"\\n\",$sql_table);\n\t\t\t$drop_table = str_replace($srch,$repl,$tmp[0]);\n\t\t\t$this->dbqry($drop_table);\n\n\t\t\tif (!$this->dbqry($sql_table, $link))\n\t\t\t{\n\t\t\t\tif($this->debug)\n\t\t\t\t{\n\t\t\t\t\techo \"<h3>filename</h3>\";\n\t\t\t\t\tvar_dump($filename);\n\n\t\t\t\t\techo \"<h3>sql_table</h3>\";\n\t\t\t\t\tvar_dump($sql_table);\n\t\t\t\t\techo \"<h3>result[0]</h3>\";\n\t\t\t\t\tvar_dump($result[0]);\n\t\t\t\t}\n\t\t\t\treturn nl2br(LANINS_061.\"\\n\\n<b>\".LANINS_083.\"\\n</b><i>\".e107::getDb()->getLastErrorText().\"</i>\");\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\n\t}",
"function migrate_db() {\r\n \r\n // $migrater->create_migrations_table();\r\n // $migrater->build_schema();\r\n }",
"function resetDBSchema($includeExtraDataObjects = false) {\n\t\tif(self::using_temp_db()) {\n\t\t\t// clear singletons, they're caching old extension info which is used in DatabaseAdmin->doBuild()\n\t\t\tglobal $_SINGLETONS;\n\t\t\t$_SINGLETONS = array();\n\n\t\t\t$dataClasses = ClassInfo::subclassesFor('DataObject');\n\t\t\tarray_shift($dataClasses);\n\n\t\t\t$conn = DB::getConn();\n\t\t\t$conn->beginSchemaUpdate();\n\t\t\tDB::quiet();\n\n\t\t\tforeach($dataClasses as $dataClass) {\n\t\t\t\t// Check if class exists before trying to instantiate - this sidesteps any manifest weirdness\n\t\t\t\tif(class_exists($dataClass)) {\n\t\t\t\t\t$SNG = singleton($dataClass);\n\t\t\t\t\tif(!($SNG instanceof TestOnly)) $SNG->requireTable();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we have additional dataobjects which need schema, do so here:\n\t\t\tif($includeExtraDataObjects && $this->extraDataObjects) {\n\t\t\t\tforeach($this->extraDataObjects as $dataClass) {\n\t\t\t\t\t$SNG = singleton($dataClass);\n\t\t\t\t\tif(singleton($dataClass) instanceof DataObject) $SNG->requireTable();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$conn->endSchemaUpdate();\n\n\t\t\tClassInfo::reset_db_cache();\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t}\n\t}",
"abstract public function unloadDatabase();",
"private function dropAndCreateTables(){\n \n $migration = new MikeMigration($this::genPrefix(10));\n $save = 0;\n\n // Prepare Dropped Tables\n if($this->droppedTables){\n $save++;\n foreach($this->droppedTables as $item){\n\n $migration->up(\"\\t\\t\" . 'Schema::dropIfExists(\"'.$this->appPrefix.'_'.$item[\"name\"].'\"); ');\n\n $migration->down($this::prepareTableBlueprint($item));\n\n \n // Delete Model\n Storage::disk('models')->delete($this->appNamePath.'/'.$item[\"name\"].'.php');\n // Delete Controller\n Storage::disk('controllers')->delete($this->appNamePath.'/'.$item[\"name\"].'Controller.php');\n // Delete Routes\n //...\n\n }\n }\n // Prepare New Tables \n if($this->newTables){\n $save++;\n foreach($this->newTables as $item){\n\n\n $migration->up($this::prepareTableBlueprint($item));\n\n $migration->down(\"\\t\\t\" . 'Schema::dropIfExists(\"'.$this->appPrefix.'_'.$item[\"name\"].'\"); ');\n\n }\n }\n // If Exist Dropped pr New Tables \n if($save > 0){\n $migration->save();\n }\n \n\n\n }",
"function load_tables() {\n return $this->_load_tables('/oblyon/sql/');\n }",
"private function Load()\n\t{\n\t\t$sql = \"show tables\";\n\t\t$rs = $this->Server->Connection->Select($sql);\n\t\t\n\t\t// first pass load all the tables. this will initialize each object. we have to\n\t\t// do this first so that we can correctly determine and store \"Set\" information\n\t\twhile ($row = $this->Server->Connection->Next($rs))\n\t\t{\n\t\t\t$this->Tables[$row[\"Tables_in_\" . $this->Name]] = new DBTable($this,$row);\n\t\t}\n\t\t\n\t\t// now load all the keys and constraints for each table\n\t\tforeach ($this->Tables as $table)\n\t\t{\n\t\t\t$table->LoadKeys();\n\t\t}\n\n\t\t$this->Server->Connection->Release($rs);\n\t\t\n\t\t$sql = \"show table status from `\" . $this->Name . \"`\";\n\t\t$rs2 = $this->Server->Connection->Select($sql);\n\t\t\n\t\t// load the extra data\n\t\twhile ($row = $this->Server->Connection->Next($rs2))\n\t\t{\n\t\t\t$this->Tables[$row[\"Name\"]]->Engine = $row[\"Engine\"]; \n\t\t\t$this->Tables[$row[\"Name\"]]->Comment = $row[\"Comment\"];\n\t\t}\n\t\t$this->Server->Connection->Release($rs2);\n\t}",
"protected function executeUnloadDbalExtension() {}",
"public function deleteTables () {\n $this->usersDB->deleteTables();\n $this->categoriesDB->deleteTables();\n $this->itemsDB->deleteTables();\n }",
"public function setUpDatabaseTables()\n {\n $table = new DModuleTable();\n $table -> setName(\"currencies\");\n $table -> addBigIncrements( \"id\" , true );\n $table -> addString( \"base\" , true);\n $table -> addLongText( 'rates' , true);\n $table -> addDateTime( 'added' , true );\n $table -> addBoolean( 'status' , true);\n $table -> addString( \"extra\" , false);\n $table -> addString( \"extra2\" , false);\n $this -> addTable( $table );\n }",
"static private function regenerate_database()\n {\n self::$quick = false; // Disable quick mode.\n\n self::greeting();\n self::database_backup(); // Backup database, just in case.\n\n if(self::check_duplicates()) {\n self::link_naked_arxiv(); // Link naked arXiv IDs.\n\n self::log(\"Initiating database regeneration from INSPIRE.\");\n $stats = self::inspire_regenerate(\"SELECT inspire FROM records WHERE (inspire != '' AND inspire IS NOT NULL)\");\n\n if (sizeof($stats->found) > 0)\n self::log(sizeof($stats->found) . \" records were regenerated.\");\n if (sizeof($stats->lost) > 0)\n self::log(sizeof($stats->lost) . \" records were not found on INSPIRE: \" . implode(\", \", $stats->lost) . \".\");\n\n self::fetch_missing_bibtex();\n }\n\n self::wrapup();\n }",
"public static function updateTable() {\n if ( !function_exists( 'dbDelta' ) ) {\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n }\n $dbDeltaTableFile = sprintf( '%s%s', WPXSMARTSHOP_PATH_DATABASE, WPXSMARTSHOP_DB_TABLENAME_FILENAME_STATS );\n $file = file_get_contents( $dbDeltaTableFile );\n $sql = sprintf( $file, self::tableName() );\n @dbDelta( $sql );\n }",
"protected function tearDown()\n {\n ORM::reset_db();\n }",
"public function run()\n {\n echo PHP_EOL , 'cleaning old data....', PHP_EOL;\n\n DB::statement(\"SET foreign_key_checks=0\");\n\n User::truncate();\n Role::truncate();\n UserRole::truncate();\n Permission::truncate();\n DB::table('roles_permissions')->truncate();\n DB::table('users_permissions')->truncate();\n\n DB::statement(\"SET foreign_key_checks=1\");\n\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n }",
"protected function dropDatabaseTables()\n {\n $this->useCamundaDatabase(function() {\n if ($tables = DB::select('SHOW TABLES')) {\n $this->line('Dropping existing database tables...');\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n foreach ($tables as $table) {\n $array = get_object_vars($table);\n Schema::drop($array[key($array)]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n $this->info('All tables dropped.');\n }\n });\n }",
"public function importTablesFromTemplate()\n {\n //Get a list of all the tables that need to be cloned\n $tables = $this->getTablesFromTemplate(self::TEMPLATE_PREFIX);\n\n //Clone the tables from the template into the demo instance\n $instancePrefix = $this->getTablePrefix();\n $defaultPrefix = self::TEMPLATE_PREFIX;\n $this->cloneTables($tables, $defaultPrefix, $instancePrefix);\n $this->convertPrefixes($defaultPrefix, $instancePrefix);\n }",
"function install_sql()\n\t{\n\t\t//-----------------------------------------\n\t\t// Write config\n\t\t//-----------------------------------------\n\t\t\t\n\t\t$this->install->write_configuration();\n\t\t\n\t\t//--------------------------------------------------\n\t\t// Any \"extra\" configs required for this driver?\n\t\t//--------------------------------------------------\n\n\t\tif ( file_exists( INS_ROOT_PATH.'sql/'.$this->install->saved_data['sql_driver'].'_install.php' ) )\n\t\t{\n\t\t\trequire_once( INS_ROOT_PATH.'sql/'.$this->install->saved_data['sql_driver'].'_install.php' );\n\n\t\t\t$extra_install = new install_extra();\n\t\t\t$extra_install->ipsclass =& $this->install->ipsclass;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Run SQL commands\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver']\n\t\t\t\t\t\t\t\t\t\t\t\t\t );\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t$this->install->ipsclass->converge = new class_converge( $this->install->ipsclass->DB );\n\t\t\t\t\n\t\tinclude( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_tables.php' );\n\t\t$output[] = \"Создание таблиц в Базе Данных...\";\n\t\t\n\t\t\n\t\t\n\t\tforeach( $TABLE as $q )\n\t\t{\n\t\t\tpreg_match(\"/CREATE TABLE (\\S+) \\(/\", $q, $match);\n\n\t\t\tif ( $match[1] AND $this->install->saved_data['_drop_tables'] )\n\t\t\t{\n\t\t\t\t$this->install->ipsclass->DB->sql_drop_table( str_replace( 'ibf_', '', $match[1] ) );\n\t\t\t}\n\t\t\t\t\n\t\t\t$q = preg_replace(\"/ibf_(\\S+?)([\\s\\.,]|$)/\", $this->install->saved_data['db_pre'].\"\\\\1\\\\2\", $q);\n\t\t\t\n\t\t\t//-----------------------------------\n\t\t\t// Pass to handler\n\t\t\t//-----------------------------------\n\n\t\t\tif ( $extra_install AND method_exists( $extra_install, 'process_query_create' ) )\n\t\t\t{\n\t\t\t\t $q = $extra_install->process_query_create( $q );\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->allow_sub_select=1;\n\t\t\t$this->install->ipsclass->DB->query( $q );\n\t\t}\n\n\t\t//-----------------------------------\n\t\t// Create the fulltext index...\n\t\t//-----------------------------------\n\n\t\tif ( $this->install->ipsclass->DB->sql_can_fulltext() )\n\t\t{\n\t\t\tinclude( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_fulltext.php' );\n\t\t\t$output[] = \"Создание индексов таблиц...\";\t\t\n\t\t\t\n\t\t\t foreach( $INDEX as $q )\n\t\t\t {\n\t\t\t \t$q = preg_replace(\"/ibf_(\\S+?)([\\s\\.,]|$)/\", $this->install->saved_data['db_pre'].\"\\\\1\\\\2\", $q);\n\n\t\t //-----------------------------------\n\t\t\t\t// Pass to handler\n\t\t\t\t//-----------------------------------\n\n\t\t\t\tif ( $extra_install AND method_exists( $extra_install, 'process_query_index' ) )\n\t\t\t\t{\n\t\t\t\t\t $q = $extra_install->process_query_index( $q );\n\t\t\t\t}\n\n\t\t\t\t//-----------------------------------\n\t\t\t\t// Pass query\n\t\t\t\t//-----------------------------------\n\n\t\t if ( ! $this->install->ipsclass->DB->query($q) )\n\t\t {\n\t\t \t$this->install->template->warning($q.\"<br /><br />\".$this->install->ipsclass->DB->error);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\tinclude( INS_ROOT_PATH . 'sql/' . $this->install->saved_data['sql_driver'] . '_inserts.php' );\n\t\t$output[] = \"Заполнение таблиц данными...\";\t\t\n\t\t\n\t\tforeach( $INSERT as $q )\n\t\t{\n\t\t\t$q = preg_replace(\"/ibf_(\\S+?)([\\s\\.,]|$)/\", $this->install->saved_data['db_pre'].\"\\\\1\\\\2\", $q);\n\t\t\t$q = str_replace( \"<%time%>\" , time(), $q );\n\t\t\t\n\t\t\t# Admin's name\n\t\t\t$q = str_replace( \"<%admin_name%>\", $this->install->saved_data['admin_user'], $q );\n\t\t\t\n\t\t\t//-----------------------------------\n\t\t\t// Pass to handler\n\t\t \t//-----------------------------------\n\n\t\t \tif ( $extra_install AND method_exists( $extra_install, 'process_query_insert' ) )\n\t\t \t{\n\t\t\t\t$q = $extra_install->process_query_insert( $q );\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->query( $q );\n\t\t}\n\t\t\n\t\t\n\t\t//-----------------------------------------\n\t\t// Create Admin account\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Создание учетной записи администратора...\";\n\t\t\n\t\t$this->install->create_admin_account();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_page_refresh( $output ) );\n\t\t$this->install->template->next_action = '?p=install&sub=settings';\n\t\t$this->install->template->hide_next = 1;\n\t}",
"public function refreshTables()\n {\n $em = $this->container->get('doctrine')->getManager();\n $repository = $this->container->get('doctrine')->getRepository('OpiferManualBundle:Category');\n $categories = $repository->findAll();\n\n foreach($categories as $category)\n {\n $em->remove($category);\n }\n $em->flush();\n }",
"public function run()\n {\n $sql = file_get_contents(database_path() . '/seeders/countries-all.sql');\n\n DB::statement($sql);\n }",
"protected function tearDown()\n {\n //clear out any tables we populated\n $this->adapter->query('DELETE FROM ' . RUCKUSING_TS_SCHEMA_TBL_NAME);\n }",
"protected function tearDown(): void\n {\n $this->dbClear();\n }",
"public function run()\n {\n\t DB::table('cities')->delete();\n\t $file = database_path() . \"/seeds/cities.sql\";\n\t /*\n\t\t * First method with DB::unprepared\n\t\t * */\n\t DB::unprepared(file_get_contents($file));\n }",
"protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }",
"public function clearDb ()\n {\n // Empty tables and reset auto-increment values\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 0');\n foreach (self::$dbTables as $table) {\n $stmt = $this->_dbh->prepare('TRUNCATE `' . $table . '`');\n $stmt->execute();\n $stmt = $this->_dbh->prepare('ALTER TABLE `' . $table . '` AUTO_INCREMENT = 1');\n $stmt->execute();\n }\n // Re-enable checks only if set as such in config\n $config = parse_ini_file('config/AcToBs.ini', true);\n if (isset($config['checks']['fk_constraints']) && $config['checks']['fk_constraints'] == 1) {\n $this->_dbh->query('SET FOREIGN_KEY_CHECKS = 1');\n }\n // Delete denormalized tables\n foreach (self::$dbDenormalizedTables as $table) {\n $stmt = $this->_dbh->prepare('DROP TABLE IF EXISTS `' . $table . '`');\n $stmt->execute();\n }\n // Delete non-standard taxonomic ranks\n $stmt = $this->_dbh->prepare(\n 'DELETE FROM `taxonomic_rank` WHERE `standard` = ?');\n $stmt->execute(array(\n 0\n ));\n unset($stmt);\n }",
"public function run()\n {\n $this->call(mGeneralTableSeeder::class);\n $this->call(mRoleTableSeeder::class);\n $this->call(AnggotaTableSeeder::class);\n\n $lokasi = base_path().'/../setup/data_lokasi.sql';\n DB::unprepared(file_get_contents($lokasi));\n $anggota_permata = base_path().'/../setup/anggota_permata.sql';\n DB::unprepared(file_get_contents($anggota_permata));\n $this->command->info('Country table seeded!');\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n DB::table('usuario')->truncate();\n DB::table('rol')->truncate();\n DB::table('rol_usuario')->truncate();\n DB::table('permiso')->truncate();\n DB::table('permiso_rol')->truncate();\n DB::table('permiso_usuario')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }",
"public function migrateDb();",
"public static function install_database_for_addons(){\n\t\t$sqls = self::get_table_queries_for_addons();\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n foreach($sqls as $sql){\n error_log(print_r(dbDelta( $sql ), true));\n }\n\t}",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('leads')->truncate();\n factory(Lead::class, 2)->create(['user_id' => factory(User::class)->create()->id]);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n\t{\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::statement('TRUNCATE TABLE categories');\n DB::statement('TRUNCATE TABLE products');\n DB::statement('TRUNCATE TABLE category_product');\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\tModel::unguard();\n\n\t\t $this->call('CategoriesTableSeeder');\n\t\t $this->call('ProductsTableSeeder');\n\t\t $this->call('CategoryProductTableSeeder');\n\t}",
"public function run()\n {\n $this->runQueriesFromSqlFile('1.3.4.3');\n }",
"public function refresh_database($id)\n {\n $repository = new IM_Product_Warehouse_Repository();\n /* this method adds non existent warehouses to the current product warehouse relation */\n $repository->refresh_relations($id);\n }",
"public function reset()\n {\n $db = Zend_Registry::get('dbAdapter');\n $dbname = Zend_Registry::get('configDatabase')->database->params->dbname;\n\n $stmt = $db->query(\"SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '\".$dbname.\"'\");\n while ($row = $stmt->fetch()) {\n $db->query('DELETE FROM `'.$row['TABLE_NAME'].'`');\n }\n\n $path = UtilityComponent::getDataDirectory('assetstore');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n $path = UtilityComponent::getDataDirectory('thumbnail');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n if (file_exists(LOCAL_CONFIGS_PATH.'/ldap.local.ini')) {\n unlink(LOCAL_CONFIGS_PATH.'/ldap.local.ini');\n }\n\n /** @var UserModel $userModel */\n $userModel = MidasLoader::loadModel('User');\n\n $admin = $userModel->createUser(MIDAS_DEMO_ADMIN_EMAIL, MIDAS_DEMO_ADMIN_PASSWORD, 'Demo', 'Administrator', 1);\n $userModel->createUser(MIDAS_DEMO_USER_EMAIL, MIDAS_DEMO_USER_PASSWORD, 'Demo', 'User', 0);\n\n /** @var CommunityModel $communityModel */\n $communityModel = MidasLoader::loadModel('Community');\n $communityDao = $communityModel->createCommunity(\n 'Demo',\n 'This is a demo community',\n MIDAS_COMMUNITY_PUBLIC,\n $admin,\n MIDAS_COMMUNITY_CAN_JOIN\n );\n\n /** @var AssetstoreModel $assetstoreModel */\n $assetstoreModel = MidasLoader::loadModel('Assetstore');\n $assetstoreDao = new AssetstoreDao();\n $assetstoreDao->setName('Default');\n $assetstoreDao->setPath(UtilityComponent::getDataDirectory('assetstore'));\n $assetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL);\n $assetstoreModel->save($assetstoreDao);\n\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $settingModel->setConfig('default_assetstore', $assetstoreDao->getKey());\n\n $options = array('allowModifications' => true);\n $config = new Zend_Config_Ini(CORE_CONFIGS_PATH.'/application.ini', null, $options);\n $config->global->dynamichelp = 1;\n $config->global->environment = 'production';\n $config->global->application->name = 'Midas Platform - Demo';\n $description = 'Midas Platform is an open-source toolkit that enables the\n rapid creation of tailored, web-enabled data storage. Designed to meet\n the needs of advanced data-centric computing, Midas Platform addresses\n the growing challenge of large data by providing a flexible, intelligent\n data storage system. The system integrates multimedia server technology\n with other open-source data analysis and visualization tools to enable\n data-intensive applications that easily interface with existing\n workflows.';\n $config->global->application->description = $description;\n\n $enabledModules = array(\n 'api',\n 'metadataextractor',\n 'oai',\n 'statistics',\n 'scheduler',\n 'thumbnailcreator',\n 'visualize',\n );\n foreach ($enabledModules as $module) {\n if (file_exists(LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini')) {\n copy(\n LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini',\n LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini'\n );\n $config->module->$module = 1;\n } else {\n unlink(LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini');\n }\n }\n\n $writer = new Zend_Config_Writer_Ini();\n $writer->setConfig($config);\n $writer->setFilename((LOCAL_CONFIGS_PATH.'/application.local.ini'));\n $writer->write();\n\n $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);\n Zend_Registry::set('configGlobal', $configGlobal);\n\n /** @var UploadComponent $uploadComponent */\n $uploadComponent = MidasLoader::loadComponent('Upload');\n $uploadComponent->createUploadedItem(\n $admin,\n 'midasLogo.gif',\n BASE_PATH.'/core/public/images/midasLogo.gif',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n $uploadComponent->createUploadedItem(\n $admin,\n 'cow.vtp',\n BASE_PATH.'/modules/demo/public/'.$this->moduleName.'/cow.vtp',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n }",
"public function deleteTables()\n {\n Artisan::call('db:wipe');\n Artisan::call('migrate');\n\n }",
"protected function tearDown()\n {\n $adapter = $this->container->get('db');\n $tableManagerMysql = new TableManagerMysql($adapter);\n $tableManagerMysql->deleteTable($this->store->getTable());\n $tableManagerMysql->deleteTable($this->store->getMessagesStore()->getTable());\n $tableManagerMysql->deleteTable($this->store->getPromisesStore()->getTable());\n }",
"private function activateCreateAlterTables()\n {\n $PluginDbStructure = new \\RdDownloads\\App\\Models\\PluginDbStructure();\n $schemas = $PluginDbStructure->get();\n unset($PluginDbStructure);\n\n if (is_array($schemas) && !empty($schemas) && !is_null($this->getDbVersion())) {\n global $wpdb;\n // require file that needs for use dbDelta() function.\n require_once ABSPATH . '/wp-admin/includes/upgrade.php';\n\n foreach ($schemas as $index => $item) {\n if (isset($item['statement']) && isset($item['tablename'])) {\n $sql = str_replace('%TABLE%', $item['tablename'], $item['statement']);\n\n if (isset($item['is_multisite']) && $item['is_multisite'] === true) {\n // if set to multisite table then it will create prefix_sitenumber_tablename.\n $prefix = $wpdb->prefix;\n } else {\n // if set not to multisite then it will create prefix_tablename.\n $prefix = $wpdb->base_prefix;\n }\n\n $sql = str_replace('%PREFIX%', $prefix, $sql);\n dbDelta($sql);\n unset($sql);\n\n if (function_exists('maybe_convert_table_to_utf8mb4')) {\n maybe_convert_table_to_utf8mb4($prefix . $item['tablename']);\n }\n unset($prefix);\n }\n }// endforeach;\n unset($index, $item);\n }\n\n unset($schemas);\n }",
"protected function createLoadTables()\n {\n // foreach table, replace it with an empty table\n $tables = $this->schema->getTables();\n foreach ($tables as $table) {\n $this->dbcon->replaceTable($table);\n\n $msg = \"Created table '\".$table->name.\"'\";\n\n // If this table uses the Lookup table, create a view\n if ($table->usesLookup === true) {\n $this->dbcon->replaceLookupView($table, $this->schema->getLookupTable());\n $msg .= '; Lookup table created';\n }\n\n $this->log($msg);\n }\n return true;\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n MainSlider::truncate();\n $this->command->info('[main_slider] table truncated...');\n \n DB::beginTransaction();\n $this->seed();\n DB::commit();\n\n $this->command->info('[main_slider] table seeded...');\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }",
"public function tearDown() {\n\t\t$sql = \"DELETE FROM solrexample WHERE 1=1\";\n\t\tExampleSolrActiveRecord::model()->getDbConnection()->createCommand($sql)->execute();\n\t}",
"public function refreshTable();",
"function serendipity_installDatabase() {\n global $serendipity;\n\n $queries = serendipity_parse_sql_tables(S9Y_INCLUDE_PATH . 'sql/db.sql');\n $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);\n\n foreach ($queries as $query) {\n serendipity_db_schema_import($query);\n }\n\n if (file_exists(S9Y_INCLUDE_PATH . 'sql/preload.sql')) {\n $queries = serendipity_parse_sql_inserts(S9Y_INCLUDE_PATH . 'sql/preload.sql');\n $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);\n foreach ($queries as $query) {\n serendipity_db_schema_import($query);\n }\n }\n}",
"public function run()\n {\n \tEloquent::unguard();\n //\n\n $this->command->info('Seeding districts table');\n\n DB::unprepared(file_get_contents(__DIR__ . '/districts.sql'));\n\n $this->command->info('Seeding districts done successfully');\n }",
"public function run()\n {\n Eloquent::unguard();\n\n $this->truncateTables();\n $this->seedTables();\n }",
"public function generateDatabase()\n {\n $this->generateUserTable();\n $this->generateEmployerTable();\n $this->generateCandidateTable();\n $this->generateGuidTable();\n $this->generateWorkExperienceTable();\n $this->generateShortListTable();\n $this->generateQualTypeTable();\n $this->generateQualLevelTable();\n $this->generateQualificationsTable();\n $this->generateFieldTable();\n $this->generateSubFieldTable();\n $this->generateSkillTable();\n $this->generatePreferencesTable();\n }",
"function configure_db() {\n //Old data is deleted before adding the new db structure\n $db = DB::getInstance();\n //$file = new File(CORE_INSTALLER_FILES_PATH.'/db/init.sql', 'r');\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/init.sql'))->error()) {\n return true;\n }\n return false;\n}",
"protected function populateDatabase()\n {\n\n $orm = $this->db->getOrm();\n\n // first clean the database to make shure to have no interferences\n // from existing data\n $orm->cleanResource('WbfsysText');\n $orm->cleanResource('WbfsysRoleGroup');\n $orm->cleanResource('WbfsysRoleUser');\n $orm->cleanResource('WbfsysSecurityArea');\n $orm->cleanResource('WbfsysSecurityAccess');\n $orm->cleanResource('WbfsysGroupUsers');\n\n // clear the cache\n $orm->clearCache();\n\n // Ein paar daten in der Datenbank\n $textPublic = $orm->newEntity('WbfsysText');\n $textPublic->access_key = 'text_public';\n $orm->insert($textPublic);\n\n $textAccess = $orm->newEntity('WbfsysText');\n $textAccess->access_key = 'text_access';\n $orm->insert($textAccess);\n\n $textNoAccess = $orm->newEntity('WbfsysText');\n $textNoAccess->access_key = 'text_no_access';\n $orm->insert($textNoAccess);\n\n // Gruppen Rollen\n $groupUnrelated = $orm->newEntity('WbfsysRoleGroup');\n $groupUnrelated->name = 'Unrelated';\n $groupUnrelated->access_key = 'unrelated';\n $groupUnrelated->level = Acl::DENIED;\n $orm->insert($groupUnrelated);\n\n $groupHasAccess = $orm->newEntity('WbfsysRoleGroup');\n $groupHasAccess->name = 'Has Access';\n $groupHasAccess->access_key = 'has_access';\n $groupHasAccess->level = Acl::DENIED;\n $orm->insert($groupHasAccess);\n\n $groupHasNoAccess = $orm->newEntity('WbfsysRoleGroup');\n $groupHasNoAccess->name = 'Has no Access';\n $groupHasNoAccess->access_key = 'has_no_access';\n $groupHasNoAccess->level = Acl::DENIED;\n $orm->insert($groupHasNoAccess);\n\n // user roles\n $userAnon = $orm->newEntity('WbfsysRoleUser');\n $userAnon->name = 'annon';\n $userAnon->level = Acl::DENIED;\n $orm->insert($userAnon);\n\n $userHasAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasAccess->name = 'has_access';\n $userHasAccess->level = Acl::DENIED;\n $orm->insert($userHasAccess);\n\n $userHasDAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasDAccess->name = 'has_dataset_access';\n $userHasDAccess->level = Acl::DENIED;\n $orm->insert($userHasDAccess);\n\n $userHasNoAccess = $orm->newEntity('WbfsysRoleUser');\n $userHasNoAccess->name = 'has_no_access';\n $userHasNoAccess->level = Acl::DENIED;\n $orm->insert($userHasNoAccess);\n\n // security areas\n $areaModPublic = $orm->newEntity('WbfsysSecurityArea');\n $areaModPublic->access_key = 'mod-public';\n $areaModPublic->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModPublic->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModPublic);\n\n $areaModAccess = $orm->newEntity('WbfsysSecurityArea');\n $areaModAccess->access_key = 'mod-has_access';\n $areaModAccess->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModAccess->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModAccess);\n\n $areaModNoAccess = $orm->newEntity('WbfsysSecurityArea');\n $areaModNoAccess->access_key = 'mod-no_access';\n $areaModNoAccess->id_level_listing = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_access = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_insert = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_update = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_delete = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_level_admin = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_listing = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_access = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_insert = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_update = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_delete = User::LEVEL_SUPERADMIN;\n $areaModNoAccess->id_ref_admin = User::LEVEL_SUPERADMIN;\n $orm->insert($areaModNoAccess);\n\n // access\n $access1 = $orm->newEntity('WbfsysSecurityAccess');\n $access1->id_group = $groupHasAccess;\n $access1->id_area = $areaModAccess;\n $access1->access_level = Acl::LISTING;\n $this->acl->createAreaAssignment($access1,array(),true);\n\n // user role assignments\n $entityGUser = $orm->newEntity('WbfsysGroupUsers');\n $entityGUser->id_user = $userHasAccess;\n $entityGUser->id_group = $groupHasAccess;\n $entityGUser->id_area = $areaModAccess;\n $this->acl->createGroupAssignment($entityGUser);\n\n $entityGUser = $orm->newEntity('WbfsysGroupUsers');\n $entityGUser->id_user = $userHasDAccess;\n $entityGUser->id_group = $groupHasAccess;\n $entityGUser->id_area = $areaModAccess;\n $entityGUser->vid = $textAccess;\n $this->acl->createGroupAssignment($entityGUser);\n\n }",
"public function cleanupDatabase() {\n\t\t\tif ( !$this->getTableExists() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$sQuery = \"\n\t\t\t\tDELETE from `%s`\n\t\t\t\tWHERE\n\t\t\t\t\t`day_id`\t\t\t!= '0'\n\t\t\t\t\tAND `created_at`\t< '%s'\n\t\t\t\";\n\t\t\t$sQuery = sprintf( $sQuery,\n\t\t\t\t$this->getTableName(),\n\t\t\t\t( $this->loadDP()->time() - 31*DAY_IN_SECONDS )\n\t\t\t);\n\t\t\t$this->loadDbProcessor()->doSql( $sQuery );\n\t\t}",
"function tptn_recreate_tables() {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->base_prefix . 'top_ten';\n\t$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';\n\t$table_name_temp = $table_name . '_temp';\n\t$table_name_daily_temp = $table_name_daily . '_temp';\n\n\t$wpdb->hide_errors();\n\n\t// 1. create temporary tables with the data.\n\t$wpdb->query( \"CREATE TEMPORARY TABLE {$table_name_temp} SELECT * FROM $table_name;\" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t$wpdb->query( \"CREATE TEMPORARY TABLE {$table_name_daily_temp} SELECT * FROM $table_name_daily;\" ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\n\t// 2. Drop the tables.\n\t$wpdb->query( \"DROP TABLE $table_name\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\t$wpdb->query( \"DROP TABLE $table_name_daily\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\n\t// 3. Run the activation function which will recreate the tables.\n\ttptn_single_activate();\n\n\t// 4. Reinsert the data from the temporary table.\n\t$sql = \"\n\tINSERT INTO `$table_name` (postnumber, cntaccess, blog_id) (\n\t\tSELECT\n\t\t\tpostnumber,\n\t\t\tcntaccess,\n\t\t\tblog_id\n\t\tFROM `$table_name_temp`\n\t);\n\t\";\n\n\t$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\n\t$sql = \"\n\tINSERT INTO `$table_name_daily` (postnumber, cntaccess, dp_date, blog_id) (\n\t\tSELECT\n\t\t\tpostnumber,\n\t\t\tcntaccess,\n\t\t\tdp_date,\n\t\t\tblog_id\n\t\tFROM `$table_name_daily_temp`\n\t);\n\t\";\n\n\t$wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\n\t// 5. Drop the temporary tables.\n\t$wpdb->query( \"DROP TABLE $table_name_temp\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\t$wpdb->query( \"DROP TABLE $table_name_daily_temp\" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery\n\n\t$wpdb->show_errors();\n}",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n PropertyName::truncate();\n $this->command->info('[property_names] table truncated...');\n\n $this->seed();\n\n $this->command->info('[property_names] table seeded...');\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }",
"public function setDb($db_data, $import_data = true)\n {\n $this->tables = array_keys($db_data);\n\n // create tables\n foreach ($db_data as $table => $data) {\n $migrator = $this->getMigrator();\n\n // drop table\n $migrator->table($table)->drop();\n\n // create table and fields from first row of data\n $first_row = current($data);\n if ($first_row) {\n foreach ($first_row as $field => $row) {\n if ($field === 'id') {\n $migrator->id('id');\n\n continue;\n }\n\n if (is_int($row)) {\n $migrator->field($field, ['type' => 'integer']);\n\n continue;\n } elseif (is_float($row)) {\n $migrator->field($field, ['type' => 'float']);\n\n continue;\n } elseif ($row instanceof \\DateTime) {\n $migrator->field($field, ['type' => 'datetime']);\n\n continue;\n }\n\n $migrator->field($field);\n }\n }\n\n if (!isset($first_row['id'])) {\n $migrator->id();\n }\n\n $migrator->create();\n\n // import data\n if ($import_data) {\n $has_id = (bool) key($data);\n\n foreach ($data as $id => $row) {\n $query = $this->db->dsql();\n if ($id === '_') {\n continue;\n }\n\n $query->table($table);\n $query->set($row);\n\n if (!isset($row['id']) && $has_id) {\n $query->set('id', $id);\n }\n\n $query->insert();\n }\n }\n }\n }"
] | [
"0.71364564",
"0.66584945",
"0.6474742",
"0.64356214",
"0.635151",
"0.6320904",
"0.62520653",
"0.6122368",
"0.6073391",
"0.6073266",
"0.60632855",
"0.6055538",
"0.60545975",
"0.6001374",
"0.60007554",
"0.5976796",
"0.5967964",
"0.59626496",
"0.5939987",
"0.59098667",
"0.5905297",
"0.5876617",
"0.58750135",
"0.5847956",
"0.58455485",
"0.58387035",
"0.58110124",
"0.58100665",
"0.5796253",
"0.57837665",
"0.5782592",
"0.57763493",
"0.57757807",
"0.5773478",
"0.5767473",
"0.5767282",
"0.5755356",
"0.575421",
"0.5747909",
"0.5737268",
"0.5733902",
"0.5733297",
"0.57289064",
"0.572846",
"0.5726505",
"0.57250726",
"0.5717745",
"0.571619",
"0.56963176",
"0.5689217",
"0.5687899",
"0.56825674",
"0.56803054",
"0.56796765",
"0.56750834",
"0.56648153",
"0.56628144",
"0.5658472",
"0.56517404",
"0.56488883",
"0.56483805",
"0.5642077",
"0.56391823",
"0.56312734",
"0.5607",
"0.5605632",
"0.56006306",
"0.5598296",
"0.5591597",
"0.5583119",
"0.5577358",
"0.55736446",
"0.5569413",
"0.5567661",
"0.5564395",
"0.5553279",
"0.55527586",
"0.5533284",
"0.55286354",
"0.55284667",
"0.55251074",
"0.55240625",
"0.55092686",
"0.5508004",
"0.55065686",
"0.550449",
"0.5500919",
"0.54891604",
"0.54876405",
"0.54874027",
"0.54783267",
"0.547481",
"0.5474333",
"0.54737186",
"0.5472699",
"0.54707795",
"0.5447157",
"0.5442824",
"0.54401344",
"0.5431719"
] | 0.5543664 | 77 |
show user a link to access resetAction() above and reload/restore their DB from config/zfdemo..sql | public function testDbFailedAction()
{
$this->renderToSegment('body');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function resetAction()\n {\n // STAGE 3: Choose, create, and optionally update models using business logic.\n $registry = Zend_Registry::getInstance();\n $db = $registry['db'];\n // if the DB is not configured to handle \"large\" queries, then we need to feed it bite-size queries\n $filename = $registry['configDir'] . 'zfdemo.' . $registry['config']->db->type . '.sql';\n $statements = preg_split('/;\\n/', file_get_contents($filename, false));\n foreach ($statements as $blocks) {\n $sql = '';\n foreach (explode(\"\\n\", $blocks) as $line) {\n if (empty($line) || !strncmp($line, '--', 2)) {\n continue;\n }\n $sql .= $line . \"\\n\";\n }\n $sql = trim($sql);\n if (!empty($sql)) {\n $db->query($sql);\n }\n }\n // STAGE 4: Apply business logic to create a presentation model for the view.\n $this->view->filename = $filename;\n // STAGE 5: Choose view and submit presentation model to view.\n $this->renderToSegment('body');\n }",
"public function resetActionPost()\n {\n $this->app->session->start();\n\n // Restore the database to its original settings\n $file = ANAX_INSTALL_PATH . \"/sql/movie/setup.sql\";\n $mysql = \"mysql\";\n $output = null;\n $databaseConfig = $this->app->configuration->load(\"database\")[\"config\"];\n\n // Extract hostname and databasename from dsn\n $dsnDetail = [];\n preg_match(\"/mysql:host=(.+);dbname=([^;.]+)/\", $databaseConfig[\"dsn\"], $dsnDetail);\n $host = $dsnDetail[1];\n $database = $dsnDetail[2];\n $login = $databaseConfig[\"username\"];\n $password = $databaseConfig[\"password\"];\n\n if ($this->app->request->getPost(\"reset\")) {\n $command = \"$mysql -h{$host} -u{$login} -p{$password} $database < $file 2>&1\";\n $output = [];\n $status = null;\n exec($command, $output, $status);\n $output = \"<p>The command was: <code>$command</code>.<br>The command exit status was $status.\"\n . \"<br>The output from the command was:</p><pre>\"\n . print_r($output, 1);\n $this->app->session->set(\"output\", $output);\n }\n\n\n return $this->app->response->redirect(\"movie/reset\");\n }",
"function DBreset()\n{\n\tlocation.replace(\"reset.php\");\n}",
"public function resetActionGet()\n {\n $title = \"Reset the database\";\n $output = $this->app->session->get(\"output\") ?: \" \";\n\n $this->app->session->destroy();\n\n $this->app->page->add(\"movie/reset\", [\n \"output\" => $output,\n ]);\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }",
"public function resetAction() {\n $_SESSION = array();\n session_destroy();\n return self::redirect('index');\n }",
"public function actionResetPassword()\n\t{\n\t\t\n\t\tif(isset($_GET['resetKey'])) // Uzivatel prisel pres aktivacni link\n\t\t{\n\t\t\t$scenario = 'resetSubmit';\n\t\t\t$model = $this->resetSubmit($_GET['resetKey']);\n\t\t}\n\t\telse // Uzivatel teprve zada o obnovu hesla\n\t\t{\n\t\t\t$scenario = 'resetRequest';\n\t\t\t$model = $this->resetRequest();\n\t\t}\t\n\t\t\n\t\t$this->render('resetPassword', array(\n\t\t\t\t'model' => $model,\n\t\t\t\t'scenario' => $scenario,\n\t\t\t)\n\t\t);\n\t}",
"function ResetCmd() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Get reset command\r\n\t\tif (@$_GET[\"cmd\"] <> \"\") {\r\n\t\t\t$sCmd = $_GET[\"cmd\"];\r\n\r\n\t\t\t// Reset master/detail keys\r\n\t\t\tif (strtolower($sCmd) == \"resetall\") {\r\n\t\t\t\t$rekeningju->setCurrentMasterTable(\"\"); // Clear master table\r\n\t\t\t\t$this->DbMasterFilter = \"\";\r\n\t\t\t\t$this->DbDetailFilter = \"\";\r\n\t\t\t\t$rekeningju->kode_otomatis_master->setSessionValue(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset sorting order\r\n\t\t\tif (strtolower($sCmd) == \"resetsort\") {\r\n\t\t\t\t$sOrderBy = \"\";\r\n\t\t\t\t$rekeningju->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\r\n\t\t\t// Reset start position\r\n\t\t\t$this->StartRec = 1;\r\n\t\t\t$rekeningju->setStartRecordNumber($this->StartRec);\r\n\t\t}\r\n\t}",
"public function resetDemoAction()\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$movies = $em->getRepository('UekMovieBundle:Movie')->findAll();\n\t\tforeach ($movies as $movie) {\n\t\t\t$em->remove($movie);\n\t\t}\n\n\t\t$reviews = $em->getRepository('UekMovieBundle:Review')->findAll();\n\t\tforeach ($reviews as $review) {\n\t\t\t$em->remove($review);\n\t\t}\n\n\t\t$genres = $em->getRepository('UekMovieBundle:Genre')->findAll();\n\t\tforeach ($genres as $genre) {\n\t\t\t$em->remove($genre);\n\t\t}\n\n\t\t$orders = $em->getRepository('UekStoreBundle:Order')->findAll();\n\t\tforeach ($orders as $order) {\n\t\t\t$em->remove($order);\n\t\t}\n\t\t\n\t\t$em->flush();\n\n\t\t$movies = $em->getRepository('UekMovieBundle:Movie')->findAll();\n\t\treturn $this->redirect($this->generateUrl('uek_homepage'));\n\t}",
"public function resetAction()\n\t{\n\t\t// validate that we have the necessary unique_id\n\t\tif (empty($this->_params['id']) || strlen($this->_params['id']) != 32) {\n\t\t\t$this->_helper->FlashMessenger(array('error' => 'You do not have access to view the previous page. Please verify your URL is correct and try again.'));\n\t\t\t$this->_redirect('/admin/');\n\t\t}\n\n\t\t// validate that the unique_id exists and hasn't expired\n\t\t$AuthUser = new Auth_Model_User();\n\t\t$status_code = $AuthUser->reset_password($this->_params['id']);\n\t\t$this->_validateStatusCode($status_code);\n\n\t\t// handle login request\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost()) {\n\n\t\t\t// ensure we have a valid token\n\t\t\tif ($this->isCsrfTokenValid()) {\n\t\t\t\t// validate the return code\n\t\t\t\t$status_code = $AuthUser->reset_password($this->_params['id'], $request->getPost());\n\t\t\t\t$this->_validateStatusCode($status_code);\n\n\t\t\t\t// on success\n\t\t\t\t$this->_helper->FlashMessenger(array('success' => 'Your password has successfully been reset.'));\n\t\t\t\t$this->_redirect('/admin/');\n\t\t\t} else {\n\t\t\t\t$this->_helper->FlashMessenger(array('error' => 'You session has expired.'));\n\t\t\t}\n\n\t\t}\n\n\t\t$this->view->id = $this->_params['id'];\n\t\t$this->view->title = \"Reset Password\";\n\t\t$this->disableLayout();\n\t}",
"public function resetExecuteAction()\n {\n // Reset the application\n /* @var $kernel KernelInterface */\n $kernel = $this->get('kernel');\n $application = new Application($kernel);\n $application->setAutoExit(false);\n\n // Drop dbs\n $options = array('command' => 'doctrine:mongodb:schema:drop');\n $application->run(new ArrayInput($options));\n $options = array('command' => 'doctrine:mongodb:schema:create');\n $application->run(new ArrayInput($options));\n\n // Create admin user\n $options = array('command' => 'fos:user:create', 'username' => 'admin', 'email' => 'organizers@plat-forms.org', 'password' => 'admin');\n $application->run(new ArrayInput($options));\n $options = array('command' => 'fos:user:promote', 'username' => 'admin', '--super' => true);\n $application->run(new ArrayInput($options));\n\n return new RedirectResponse($this->generateUrl('fos_user_security_logout'));\n }",
"public function resetPasswordAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}",
"function workflow_reset()\n{\n\tglobal $db;\n\t\n\t$columns['status']\t= 'ready';\n\t$columns['request'] = 'done';\n\t$db->update(\"station\",$columns);\n}",
"public function resetExternalAction() {\n\t\tif (in_array(APPLICATION_ENV, array('development', 'sandbox', 'testing', 'demo'))) {\n\t\t\t$this->_validateRequiredParameters(array('user_id', 'user_key', 'starbar_id'));\n\t\t\tDb_Pdo::execute(\"DELETE FROM user_social WHERE user_id = ?\", $this->user_id);\n\t\t\tDb_Pdo::execute(\"UPDATE user SET username = '' WHERE id = ?\", $this->user_id);\n\t\t\treturn $this->_resultType(true);\n\t\t} else {\n\t\t\treturn $this->_resultType(false);\n\t\t}\n\t}",
"function ResetCmd() {\r\n\r\n\t\t// Check if reset command\r\n\t\tif (substr($this->Command,0,5) == \"reset\") {\r\n\r\n\t\t\t// Reset master/detail keys\r\n\t\t\tif ($this->Command == \"resetall\") {\r\n\t\t\t\t$this->setCurrentMasterTable(\"\"); // Clear master table\r\n\t\t\t\t$this->DbMasterFilter = \"\";\r\n\t\t\t\t$this->DbDetailFilter = \"\";\r\n\t\t\t\t$this->domain_id->setSessionValue(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset sorting order\r\n\t\t\tif ($this->Command == \"resetsort\") {\r\n\t\t\t\t$sOrderBy = \"\";\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$this->identries->setSort(\"\");\r\n\t\t\t\t$this->titulo->setSort(\"\");\r\n\t\t\t\t$this->id->setSort(\"\");\r\n\t\t\t\t$this->islive->setSort(\"\");\r\n\t\t\t\t$this->tool_id->setSort(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset start position\r\n\t\t\t$this->StartRec = 1;\r\n\t\t\t$this->setStartRecordNumber($this->StartRec);\r\n\t\t}\r\n\t}",
"public function resetDatabase(): void\n {\n $this->exec('DELETE FROM fo_forms');\n $this->exec('ALTER TABLE fo_forms AUTO_INCREMENT=1000');\n }",
"public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}",
"private function resetnsAction(){\n\t\t\n\t\t$this -> adminNS -> __unset('bikeAds');\n\t\t$this -> adminNS -> __unset('bikePhoto');\n\t\t$this -> adminNS -> __unset('bikeInsert');\t\t\n\t}",
"public function resetActionPost(): object\n {\n // Framework variables\n $dbConfig = $this->app->configuration->load(\"database\");\n $request = $this->app->request;\n\n // Verifies if reset form was submitted\n if ($request->getPost(\"reset\") == \"Reset database\") {\n $output = $this->content->resetDatabase($dbConfig);\n }\n\n // Redirects\n return $this->app->response->redirect(\"admin/reset\", $output);\n }",
"function ResetCmd() {\r\n\r\n\t\t// Check if reset command\r\n\t\tif (substr($this->Command,0,5) == \"reset\") {\r\n\r\n\t\t\t// Reset search criteria\r\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\r\n\t\t\t\t$this->ResetSearchParms();\r\n\r\n\t\t\t// Reset master/detail keys\r\n\t\t\tif ($this->Command == \"resetall\") {\r\n\t\t\t\t$this->setCurrentMasterTable(\"\"); // Clear master table\r\n\t\t\t\t$this->DbMasterFilter = \"\";\r\n\t\t\t\t$this->DbDetailFilter = \"\";\r\n\t\t\t\t$this->id_grupo->setSessionValue(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset sorting order\r\n\t\t\tif ($this->Command == \"resetsort\") {\r\n\t\t\t\t$sOrderBy = \"\";\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$this->created_time->setSort(\"\");\r\n\t\t\t\t$this->message->setSort(\"\");\r\n\t\t\t\t$this->link->setSort(\"\");\r\n\t\t\t\t$this->type->setSort(\"\");\r\n\t\t\t\t$this->caption->setSort(\"\");\r\n\t\t\t\t$this->description->setSort(\"\");\r\n\t\t\t\t$this->name->setSort(\"\");\r\n\t\t\t\t$this->source->setSort(\"\");\r\n\t\t\t\t$this->from->setSort(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset start position\r\n\t\t\t$this->StartRec = 1;\r\n\t\t\t$this->setStartRecordNumber($this->StartRec);\r\n\t\t}\r\n\t}",
"public function resetAllAction() {\n\t\tif (in_array(APPLICATION_ENV, array('development', 'sandbox', 'testing', 'demo'))) {\n\t\t\t$this->_validateRequiredParameters(array('user_id', 'user_key', 'starbar_id'));\n\t\t\tDb_Pdo::execute(\"DELETE FROM survey_response WHERE user_id = ?\", $this->user_id);\n\t\t\tDb_Pdo::execute(\"DELETE FROM notification_message_user_map WHERE user_id = ?\", $this->user_id);\n\t\t\tDb_Pdo::execute(\"DELETE FROM user_social WHERE user_id = ?\", $this->user_id);\n\t\t\tDb_Pdo::execute(\"DELETE FROM user_address WHERE user_id = ?\", $this->user_id);\n\t\t\tDb_Pdo::execute(\"UPDATE user SET created = now(), username = '' WHERE id = ?\", $this->user_id);\n\n//\t\t\t$newGamer = Gamer::reset($this->user_id, $this->user_key, $this->starbar_id);\n//\t\t\tGame_Starbar::getInstance()->install();\n\n\t\t\t$user = new User();\n\t\t\t$user->loadData($this->user_id);\n\t\t\treturn $this->_resultType($user);\n\t\t} else {\n\t\t\treturn $this->_resultType(false);\n\t\t}\n\t}",
"protected function dbReset() {\r\n $this->query_result = '';\r\n }",
"function ResetCmd() {\n\t\tglobal $tbl_slide;\n\n\t\t// Get reset command\n\t\tif (@$_GET[\"cmd\"] <> \"\") {\n\t\t\t$sCmd = $_GET[\"cmd\"];\n\n\t\t\t// Reset search criteria\n\t\t\tif (strtolower($sCmd) == \"reset\" || strtolower($sCmd) == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif (strtolower($sCmd) == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$tbl_slide->setSessionOrderBy($sOrderBy);\n\t\t\t\t$tbl_slide->title->setSort(\"\");\n\t\t\t\t$tbl_slide->images->setSort(\"\");\n\t\t\t\t$tbl_slide->order_by->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->lStartRec = 1;\n\t\t\t$tbl_slide->setStartRecordNumber($this->lStartRec);\n\t\t}\n\t}",
"function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->id->setSort(\"\");\n\t\t\t\t$this->detail_jenis_spp->setSort(\"\");\n\t\t\t\t$this->no_spp->setSort(\"\");\n\t\t\t\t$this->tgl_spp->setSort(\"\");\n\t\t\t\t$this->keterangan->setSort(\"\");\n\t\t\t\t$this->no_spm->setSort(\"\");\n\t\t\t\t$this->tgl_spm->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}",
"public function reset()\n {\n delete_option($this->dbVersionKey);\n }",
"public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }",
"public function reset(){}",
"public function reset()\n {\n return view('admin.root.reset');\n }",
"function tep_reset_cache_data_seo_urls($action){ \n switch ($action){\n case 'reset':\n tep_db_query(\"DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'\");\n tep_db_query(\"UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'\");\n break;\n default:\n break;\n }\n# The return value is used to set the value upon viewing\n# It's NOT returining a false to indicate failure!!\n return 'false';\n}",
"function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->tgl->setSort(\"\");\n\t\t\t\t$this->no_spp->setSort(\"\");\n\t\t\t\t$this->jns_spp->setSort(\"\");\n\t\t\t\t$this->kd_mata->setSort(\"\");\n\t\t\t\t$this->urai->setSort(\"\");\n\t\t\t\t$this->jmlh->setSort(\"\");\n\t\t\t\t$this->jmlh1->setSort(\"\");\n\t\t\t\t$this->jmlh2->setSort(\"\");\n\t\t\t\t$this->jmlh3->setSort(\"\");\n\t\t\t\t$this->jmlh4->setSort(\"\");\n\t\t\t\t$this->nm_perus->setSort(\"\");\n\t\t\t\t$this->alamat->setSort(\"\");\n\t\t\t\t$this->npwp->setSort(\"\");\n\t\t\t\t$this->pimpinan->setSort(\"\");\n\t\t\t\t$this->bank->setSort(\"\");\n\t\t\t\t$this->rek->setSort(\"\");\n\t\t\t\t$this->nospm->setSort(\"\");\n\t\t\t\t$this->tglspm->setSort(\"\");\n\t\t\t\t$this->ppn->setSort(\"\");\n\t\t\t\t$this->ps21->setSort(\"\");\n\t\t\t\t$this->ps22->setSort(\"\");\n\t\t\t\t$this->ps23->setSort(\"\");\n\t\t\t\t$this->ps4->setSort(\"\");\n\t\t\t\t$this->kodespm->setSort(\"\");\n\t\t\t\t$this->nambud->setSort(\"\");\n\t\t\t\t$this->nppk->setSort(\"\");\n\t\t\t\t$this->nipppk->setSort(\"\");\n\t\t\t\t$this->prog->setSort(\"\");\n\t\t\t\t$this->prog1->setSort(\"\");\n\t\t\t\t$this->bayar->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}",
"public function resetpasswordAction() {\n\n }",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"function resetEverything() {\n\t\texecSql(\"drop table gamestate_characters\");\n\t\texecSql(\"create table gamestate_characters select * from initialstate_players\");\n\t\t$this->printState();\n\n\t}",
"public function p_reset() {\n\n\t\tforeach($_POST as $key => $value){\n\t\t\tif((empty($value)) || (!$value) || (trim($value) == \"\") ){\n\t\t\t\t# Send them back to the login page\n\t\t\t\tRouter::redirect(\"/users/resetp/error\");\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t# Encrypt the password \n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n\t\tDB::instance(DB_NAME)->update(\"users\", $_POST, 'WHERE user_id = '.$this->user->user_id);\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect('/users/login');\n\n\t}",
"function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->setSessionOrderByList($sOrderBy);\n\t\t\t\t$this->fecha_tamizaje->setSort(\"\");\n\t\t\t\t$this->id_centro->setSort(\"\");\n\t\t\t\t$this->apellidopaterno->setSort(\"\");\n\t\t\t\t$this->apellidomaterno->setSort(\"\");\n\t\t\t\t$this->nombre->setSort(\"\");\n\t\t\t\t$this->ci->setSort(\"\");\n\t\t\t\t$this->fecha_nacimiento->setSort(\"\");\n\t\t\t\t$this->dias->setSort(\"\");\n\t\t\t\t$this->semanas->setSort(\"\");\n\t\t\t\t$this->meses->setSort(\"\");\n\t\t\t\t$this->sexo->setSort(\"\");\n\t\t\t\t$this->discapacidad->setSort(\"\");\n\t\t\t\t$this->id_tipodiscapacidad->setSort(\"\");\n\t\t\t\t$this->resultado->setSort(\"\");\n\t\t\t\t$this->resultadotamizaje->setSort(\"\");\n\t\t\t\t$this->tapon->setSort(\"\");\n\t\t\t\t$this->tipo->setSort(\"\");\n\t\t\t\t$this->repetirprueba->setSort(\"\");\n\t\t\t\t$this->observaciones->setSort(\"\");\n\t\t\t\t$this->id_apoderado->setSort(\"\");\n\t\t\t\t$this->id_referencia->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}",
"function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->userlevelid->setSort(\"\");\n\t\t\t\t$this->userlevelname->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}",
"public function resetcatalogAction()\n {\n $params = $this->getRequest()->getParams();\n if ($params['from'] && $params['to']) {\n if (!$this->validateDateRange($params['from'], $params['to'])) {\n return $this->_redirectReferer();\n }\n //@codingStandardsIgnoreStart\n $num = Mage::getResourceModel('ddg_automation/catalog')\n ->reset($params['from'], $params['to']);\n } else {\n $num = Mage::getResourceModel('ddg_automation/catalog')->reset();\n }\n //@codingStandardsIgnoreEnd\n Mage::helper('ddg')->log('-- Reset Catalog for reimport : '. $num);\n Mage::getSingleton('adminhtml/session')->addSuccess('Done.');\n $this->_redirectReferer();\n }",
"function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->nombre_contacto->setSort(\"\");\n\t\t\t\t$this->name->setSort(\"\");\n\t\t\t\t$this->lastname->setSort(\"\");\n\t\t\t\t$this->_email->setSort(\"\");\n\t\t\t\t$this->address->setSort(\"\");\n\t\t\t\t$this->phone->setSort(\"\");\n\t\t\t\t$this->cell->setSort(\"\");\n\t\t\t\t$this->created_at->setSort(\"\");\n\t\t\t\t$this->id_sucursal->setSort(\"\");\n\t\t\t\t$this->tipoinmueble->setSort(\"\");\n\t\t\t\t$this->tipovehiculo->setSort(\"\");\n\t\t\t\t$this->tipomaquinaria->setSort(\"\");\n\t\t\t\t$this->tipomercaderia->setSort(\"\");\n\t\t\t\t$this->tipoespecial->setSort(\"\");\n\t\t\t\t$this->email_contacto->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}",
"public function resetpassAction()\n\t{\n\t\t$email='neerajbwr89@gmail.com';\n\n\t\t$customer = Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\t\t$customer->sendPasswordResetConfirmationEmail();\n\t}",
"function ResetCmd() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Get reset command\r\n\t\tif (@$_GET[\"cmd\"] <> \"\") {\r\n\t\t\t$sCmd = $_GET[\"cmd\"];\r\n\r\n\t\t\t// Reset search criteria\r\n\t\t\tif (strtolower($sCmd) == \"reset\" || strtolower($sCmd) == \"resetall\")\r\n\t\t\t\t$this->ResetSearchParms();\r\n\r\n\t\t\t// Reset sorting order\r\n\t\t\tif (strtolower($sCmd) == \"resetsort\") {\r\n\t\t\t\t$sOrderBy = \"\";\r\n\t\t\t\t$fs_multijoin_v->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$fs_multijoin_v->id->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->mount->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->path->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->parent->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->deprecated->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->name->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->snapshot->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->tapebackup->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->diskbackup->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->type->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->CONTACT->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->CONTACT2->setSort(\"\");\r\n\t\t\t\t$fs_multijoin_v->RESCOMP->setSort(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset start position\r\n\t\t\t$this->lStartRec = 1;\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber($this->lStartRec);\r\n\t\t}\r\n\t}",
"public function getReset()\n {\n return view('flare::admin.reset');\n }",
"public function restore()\n {\n //Query Builder\n DB::table('users')->delete();\n DB::table('respuestas')->delete();\n \n echo \"Realizado\";\n }",
"public function resetState() {}",
"function ResetCmd() {\n\t\tglobal $t_tinbai_mainsite;\n\n\t\t// Get reset command\n\t\tif (@$_GET[\"cmd\"] <> \"\") {\n\t\t\t$sCmd = $_GET[\"cmd\"];\n\n\t\t\t// Reset search criteria\n\t\t\tif (strtolower($sCmd) == \"reset\" || strtolower($sCmd) == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif (strtolower($sCmd) == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$t_tinbai_mainsite->setSessionOrderBy($sOrderBy);\n\t\t\t\t$t_tinbai_mainsite->FK_CONGTY_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_TITLE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_NOTE->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_USER_ADD->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_ADD_TIME->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_USER_EDIT->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->C_EDIT_TIME->setSort(\"\");\n\t\t\t\t$t_tinbai_mainsite->FK_EDITOR_ID->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->lStartRec = 1;\n\t\t\t$t_tinbai_mainsite->setStartRecordNumber($this->lStartRec);\n\t\t}\n\t}",
"public function resetAction()\n\t{\n\t\t$this->view->headTitle(\"Reset your password\");\n\t\n\t\t//If form is submitted, reset the password\n\t\tif($this->getRequest()->isPost()){\n\t\t\n\t\t\t//Validation\n\t\t\t//Password must be between 6-20 characters\n\t\t\t$valid_pswd = new Zend_Validate_StringLength(6, 20);\n\t\t\tif(! $valid_pswd->isValid($this->_request->getPost('password'))){\n\t\t\t\t$this->view->errors[] = \"Password must be at least 6 characters.\";\n\t\t\t}\n\t\t\t\n\t\t\t//Password must match\n\t\t\tif($this->_request->getPost('password') != \n\t\t\t $this->_request->getPost('password2')){\n\t\t\t\t$this->view->errors[] = \"Your passwords do not match.\";\n\t\t\t}\n\t\t\t\n\t\t\t//No errors, so update the password\n\t\t\tif(count($this->view->errors) == 0){\n\t\t\t\t\n\t\t\t\t//Find user row to update via registration_key column\n\t\t\t\t$user = new Default_Model_User();\n\t\t\t\t$resultRow = $user->getUserByRegkey($this->_request->getPost('key'));\n\t\t\t\t\n\t\t\t\tif(count($resultRow) == 1){\n\t\t\t\t\t$resultRow->password = md5($this->_request->getPost('password'));\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->updated = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else{ //Errors, so pass key back to form\n\t\t\t\t$this->view->success = 1;\n\t\t\t\t$this->view->key = $this->_request->getPost('key');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t// User has clicked the emailed password recovery link. Find the user\n\t\t\t// using the recovery key, and prepare the password reset form\n\t\t\t\n\t\t\t//Retrieve key from url\n\t\t\t$recoveryKey = $this->getRequest()->getParam('key');\n\t\t\t\n\t\t\t$user = new Default_Model_User();\n\t\t\t$resultRow = $user->getUserByRegkey($recoveryKey);\n\t\t\t\n\t\t\t\tif(count($resultRow)){\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->success = 1;\n\t\t\t\t\t$this->view->key = $recoveryKey;\n\t\t\t\t} else{\n\t\t\t\t\t$this->view->errors[] = \"Unable to locate password recovery key.\";\n\t\t\t\t}\n\t\t\n\t\t} //end else\n\t}",
"public function resetPasswordAction()\n\t{\n\n\t\t$data = $this->url->post;\n\t\tif (!isset($_POST['reset']) || !$this->validateReset($data)) {\n\t\t\t$this->session->data['error'] = 'Warning: Please enter valid data in input box.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t$token = $this->url->post('_token');\n\t\t$token_check = hash('sha512', TOKEN . TOKEN_SALT);\n\t\tif (hash_equals($token_check, $token) === false ) {\n\t\t\t$this->session->data['error'] = 'Warning: Invalid token. Please try again.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\t$check = $this->loginModel->checkEmailHash($data);\n\t\tif (empty($check)) {\n\t\t\t$this->url->redirect('login');\n\t\t} else {\n\t\t\t$result = $this->loginModel->updatePassword($data);\n\t\t\t$this->session->data['success'] = 'Success: Your Password Changed Succesfully.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t\n\t}",
"function ResetCmd() {\n\n\t\t// Check if reset command\n\t\tif (substr($this->Command,0,5) == \"reset\") {\n\n\t\t\t// Reset search criteria\n\t\t\tif ($this->Command == \"reset\" || $this->Command == \"resetall\")\n\t\t\t\t$this->ResetSearchParms();\n\n\t\t\t// Reset sorting order\n\t\t\tif ($this->Command == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->tanggal->setSort(\"\");\n\t\t\t\t$this->auc_number->setSort(\"\");\n\t\t\t\t$this->start_bid->setSort(\"\");\n\t\t\t\t$this->close_bid->setSort(\"\");\n\t\t\t\t$this->lot_number->setSort(\"\");\n\t\t\t\t$this->chop->setSort(\"\");\n\t\t\t\t$this->grade->setSort(\"\");\n\t\t\t\t$this->estate->setSort(\"\");\n\t\t\t\t$this->sack->setSort(\"\");\n\t\t\t\t$this->netto->setSort(\"\");\n\t\t\t\t$this->open_bid->setSort(\"\");\n\t\t\t\t$this->highest_bid->setSort(\"\");\n\t\t\t\t$this->auction_status->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}",
"function ResetCmd() {\r\n\r\n\t\t// Check if reset command\r\n\t\tif (substr($this->Command,0,5) == \"reset\") {\r\n\r\n\t\t\t// Reset sorting order\r\n\t\t\tif ($this->Command == \"resetsort\") {\r\n\t\t\t\t$sOrderBy = \"\";\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$this->RazonSocial->setSort(\"\");\r\n\t\t\t\t$this->NombreContacto->setSort(\"\");\r\n\t\t\t\t$this->Poblacion->setSort(\"\");\r\n\t\t\t\t$this->Id_Estado->setSort(\"\");\r\n\t\t\t\t$this->Telefonos->setSort(\"\");\r\n\t\t\t\t$this->Celular->setSort(\"\");\r\n\t\t\t\t$this->Maneja_Papeleta->setSort(\"\");\r\n\t\t\t\t$this->Maneja_Activacion_Movi->setSort(\"\");\r\n\t\t\t}\r\n\r\n\t\t\t// Reset start position\r\n\t\t\t$this->StartRec = 1;\r\n\t\t\t$this->setStartRecordNumber($this->StartRec);\r\n\t\t}\r\n\t}",
"public function resetActionGet(): object\n {\n // Sets webpage title\n $title = \"Reset database\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended,\n \"output\" => $output ?? null\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/reset\", $data);\n\n // Renders page\n return $this->app->page->render($data);\n }",
"public function getResetAdmin()\n {\n return View ('authpages.admin-reset');\n }",
"public function actionClear() {\n //Check record data on database\n $exist = Package::model()->exists();\n if ($exist) {\n //Clear Data\n Yii::app()->db->createCommand()->truncateTable(Package::model()->tableName());\n Yii::app()->db->createCommand()->truncateTable(PackageAccount::model()->tableName());\n Yii::app()->user->setFlash('success', 'Data berhasil dibersihkan.');\n $this->redirect(array('index'));\n } else {\n Yii::app()->user->setFlash('error', 'Data tidak ditemukan.');\n $this->redirect(array('index'));\n }\n }",
"public function reset()\n {\n // clear cache\n $this->pdc->del_prefix('portal.module.realmstatus');\n }",
"public function reset()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_RESET, $payload);\n }",
"public function reset()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_RESET, $payload);\n }",
"function ResetCmd() {\n\tglobal $PHP_SESSION, $PHP_POST, $PHP_GET;\n\n\t// Skip if post back\n\tif (count($PHP_POST) > 0) return;\n\n\t// Get Reset Cmd\n\tif (@$PHP_GET[\"cmd\"] != \"\") {\n\t\t$sCmd = $PHP_GET[\"cmd\"];\n\t\tif (strtolower($sCmd) == \"reset\") {\n\t\t\tResetPager();\n\t\t}\n\t}\n}",
"public function tryresetAction() {\n return true;\n }",
"public function databaseReload()\n {\n $output = shell_exec('./runauthtests.sh --reload');\n\n codecept_debug($output);\n }",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function resetAdminUserPwdAction()\n\t{\n\t // \t $return = $user->resetPassword('admin');\n\t // \t var_export($return);\n\t // \t echo PHP_EOL;\n\t // \t echo $return['password'];\n\t // \t return false;\n\t}",
"public function reset()\n {\n $db = Zend_Registry::get('dbAdapter');\n $dbname = Zend_Registry::get('configDatabase')->database->params->dbname;\n\n $stmt = $db->query(\"SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '\".$dbname.\"'\");\n while ($row = $stmt->fetch()) {\n $db->query('DELETE FROM `'.$row['TABLE_NAME'].'`');\n }\n\n $path = UtilityComponent::getDataDirectory('assetstore');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n $path = UtilityComponent::getDataDirectory('thumbnail');\n $dir = opendir($path);\n while ($entry = readdir($dir)) {\n if (is_dir($path.'/'.$entry) && !in_array($entry, array('.', '..'))\n ) {\n $this->_rrmdir($path.'/'.$entry);\n }\n }\n\n if (file_exists(LOCAL_CONFIGS_PATH.'/ldap.local.ini')) {\n unlink(LOCAL_CONFIGS_PATH.'/ldap.local.ini');\n }\n\n /** @var UserModel $userModel */\n $userModel = MidasLoader::loadModel('User');\n\n $admin = $userModel->createUser(MIDAS_DEMO_ADMIN_EMAIL, MIDAS_DEMO_ADMIN_PASSWORD, 'Demo', 'Administrator', 1);\n $userModel->createUser(MIDAS_DEMO_USER_EMAIL, MIDAS_DEMO_USER_PASSWORD, 'Demo', 'User', 0);\n\n /** @var CommunityModel $communityModel */\n $communityModel = MidasLoader::loadModel('Community');\n $communityDao = $communityModel->createCommunity(\n 'Demo',\n 'This is a demo community',\n MIDAS_COMMUNITY_PUBLIC,\n $admin,\n MIDAS_COMMUNITY_CAN_JOIN\n );\n\n /** @var AssetstoreModel $assetstoreModel */\n $assetstoreModel = MidasLoader::loadModel('Assetstore');\n $assetstoreDao = new AssetstoreDao();\n $assetstoreDao->setName('Default');\n $assetstoreDao->setPath(UtilityComponent::getDataDirectory('assetstore'));\n $assetstoreDao->setType(MIDAS_ASSETSTORE_LOCAL);\n $assetstoreModel->save($assetstoreDao);\n\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $settingModel->setConfig('default_assetstore', $assetstoreDao->getKey());\n\n $options = array('allowModifications' => true);\n $config = new Zend_Config_Ini(CORE_CONFIGS_PATH.'/application.ini', null, $options);\n $config->global->dynamichelp = 1;\n $config->global->environment = 'production';\n $config->global->application->name = 'Midas Platform - Demo';\n $description = 'Midas Platform is an open-source toolkit that enables the\n rapid creation of tailored, web-enabled data storage. Designed to meet\n the needs of advanced data-centric computing, Midas Platform addresses\n the growing challenge of large data by providing a flexible, intelligent\n data storage system. The system integrates multimedia server technology\n with other open-source data analysis and visualization tools to enable\n data-intensive applications that easily interface with existing\n workflows.';\n $config->global->application->description = $description;\n\n $enabledModules = array(\n 'api',\n 'metadataextractor',\n 'oai',\n 'statistics',\n 'scheduler',\n 'thumbnailcreator',\n 'visualize',\n );\n foreach ($enabledModules as $module) {\n if (file_exists(LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini')) {\n copy(\n LOCAL_CONFIGS_PATH.'/'.$module.'.demo.local.ini',\n LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini'\n );\n $config->module->$module = 1;\n } else {\n unlink(LOCAL_CONFIGS_PATH.'/'.$module.'.local.ini');\n }\n }\n\n $writer = new Zend_Config_Writer_Ini();\n $writer->setConfig($config);\n $writer->setFilename((LOCAL_CONFIGS_PATH.'/application.local.ini'));\n $writer->write();\n\n $configGlobal = new Zend_Config_Ini(APPLICATION_CONFIG, 'global', true);\n Zend_Registry::set('configGlobal', $configGlobal);\n\n /** @var UploadComponent $uploadComponent */\n $uploadComponent = MidasLoader::loadComponent('Upload');\n $uploadComponent->createUploadedItem(\n $admin,\n 'midasLogo.gif',\n BASE_PATH.'/core/public/images/midasLogo.gif',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n $uploadComponent->createUploadedItem(\n $admin,\n 'cow.vtp',\n BASE_PATH.'/modules/demo/public/'.$this->moduleName.'/cow.vtp',\n $communityDao->getPublicFolder(),\n null,\n '',\n true\n );\n }",
"function ResetCmd()\n{\n\n\t// Get Reset command\n\tif (strlen(@$_GET[\"cmd\"]) > 0) {\n\t\t$sCmd = @$_GET[\"cmd\"];\n\t\tif (strtolower($sCmd) == \"reset\") { // Reset search criteria\n\t\t\tResetSearch();\n\t\t} elseif (strtolower($sCmd) == \"resetall\") { // Reset search criteria and session vars\n\t\t\tResetSearch();\n\t\t} elseif (strtolower($sCmd) == \"resetsort\") { // Reset sort criteria\n\t\t\t$sOrderBy = \"\";\n\t\t\t$_SESSION[ewSessionTblOrderBy] = $sOrderBy;\n\t\t\tif (@$_SESSION[ewSessionTblSort . \"_x_cod_material\"] <> \"\") { $_SESSION[ewSessionTblSort . \"_x_cod_material\"] = \"\"; }\n\t\t\tif (@$_SESSION[ewSessionTblSort . \"_x_descripcion\"] <> \"\") { $_SESSION[ewSessionTblSort . \"_x_descripcion\"] = \"\"; }\n\t\t\tif (@$_SESSION[ewSessionTblSort . \"_x_unidad\"] <> \"\") { $_SESSION[ewSessionTblSort . \"_x_unidad\"] = \"\"; }\n\t\t}\n\n\t\t// Reset start position (Reset command)\n\t\t$nStartRec = 1;\n\t\t$_SESSION[ewSessionTblStartRec] = $nStartRec;\n\t}\n}",
"function reset($table = 'fixed')\n\t{\n\t\t$sql = \"DROP table $table\";\n\t\t$model = new $table;\n\t\t$model->query($sql);\n\t\t$model->create_table($force = TRUE);\n\n\t\t$msg['info'] = \"Table '$table' reset successfully\";\n\t\t$obj = new View();\n\t\t$obj->view('json', array('msg' => $msg));\n\n\t}",
"public function reboot()\n {\n $insert = [\n \"fechaReset\" => date(\"Y-m-d H:i:s\"),\n ];\n $this->db->table('vueltas')->insert($insert);\n }",
"function reset ()\r\n {\r\n $this->_log->trace(\"resetting User\");\r\n\r\n $this->set_id(USER_ID_RESET_VALUE);\r\n $this->set_name(USER_NAME_RESET_VALUE);\r\n $this->set_current_list_name(\"\");\r\n $this->set_lang(LANG_EN);\r\n $this->set_date_format(DATE_FORMAT_EU);\r\n $this->set_decimal_mark(DECIMAL_MARK_POINT);\r\n $this->set_lines_per_page(12);\r\n $this->set_theme(THEME_BLUE);\r\n $this->set_can_create_list(\"0\");\r\n $this->set_can_create_user(\"0\");\r\n $this->set_is_admin(\"0\");\r\n $this->set_times_login(\"0\");\r\n $this->set_login(\"0\");\r\n $_SESSION[\"list_states\"] = $this->_json->encode(array());\r\n }",
"public function resetfeedAction()\n {\n $storeCode = Mage::helper('googlemerchants');\n Mage::getModel('googlemerchants/googlefeed')->setFeedConfig('', $storeCode);\n $this->_redirect('adminhtml/googlemerchants/feed');\n }",
"function ResetCmd() {\n\t\tglobal $scholarship_package;\n\n\t\t// Get reset command\n\t\tif (@$_GET[\"cmd\"] <> \"\") {\n\t\t\t$sCmd = $_GET[\"cmd\"];\n\n\t\t\t// Reset master/detail keys\n\t\t\tif (strtolower($sCmd) == \"resetall\") {\n\t\t\t\t$scholarship_package->getCurrentMasterTable = \"\"; // Clear master table\n\t\t\t\t$scholarship_package->setMasterFilter(\"\"); // Clear master filter\n\t\t\t\t$this->sDbMasterFilter = \"\";\n\t\t\t\t$scholarship_package->setDetailFilter(\"\"); // Clear detail filter\n\t\t\t\t$this->sDbDetailFilter = \"\";\n\t\t\t\t$scholarship_package->sponsored_student_sponsored_student_id->setSessionValue(\"\");\n\t\t\t\t$scholarship_package->sponsored_student_sponsored_student_id->setSessionValue(\"\");\n\t\t\t}\n\n\t\t\t// Reset sorting order\n\t\t\tif (strtolower($sCmd) == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$scholarship_package->setSessionOrderBy($sOrderBy);\n\t\t\t\t$scholarship_package->scholarship_package_id->setSort(\"\");\n\t\t\t\t$scholarship_package->start_date->setSort(\"\");\n\t\t\t\t$scholarship_package->end_date->setSort(\"\");\n\t\t\t\t$scholarship_package->status->setSort(\"\");\n\t\t\t\t$scholarship_package->annual_amount->setSort(\"\");\n\t\t\t\t$scholarship_package->grant_package_grant_package_id->setSort(\"\");\n\t\t\t\t$scholarship_package->sponsored_student_sponsored_student_id->setSort(\"\");\n\t\t\t\t$scholarship_package->scholarship_type->setSort(\"\");\n\t\t\t\t$scholarship_package->scholarship_type_scholarship_type->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->lStartRec = 1;\n\t\t\t$scholarship_package->setStartRecordNumber($this->lStartRec);\n\t\t}\n\t}",
"public function clearAction()\n {\n $this->container->get('dbal_connection')->executeQuery('SET FOREIGN_KEY_CHECKS = 0');\n $this->container->get('dbal_connection')->executeQuery('TRUNCATE TABLE s_plugin_mailcatcher_attachments');\n $this->container->get('dbal_connection')->executeQuery('TRUNCATE TABLE s_plugin_mailcatcher');\n $this->container->get('dbal_connection')->executeQuery('SET FOREIGN_KEY_CHECKS = 1');\n }",
"function ResetCmd() {\n\t\tglobal $patient_detail;\n\n\t\t// Get reset cmd\n\t\tif (@$_GET[\"cmd\"] <> \"\") {\n\t\t\t$sCmd = $_GET[\"cmd\"];\n\n\t\t\t// Reset sort criteria\n\t\t\tif (strtolower($sCmd) == \"resetsort\") {\n\t\t\t\t$sOrderBy = \"\";\n\t\t\t\t$patient_detail->setSessionOrderBy($sOrderBy);\n\t\t\t\t$patient_detail->DetailNo->setSort(\"\");\n\t\t\t\t$patient_detail->StudyID->setSort(\"\");\n\t\t\t\t$patient_detail->PatientID->setSort(\"\");\n\t\t\t\t$patient_detail->StudyDate->setSort(\"\");\n\t\t\t\t$patient_detail->StudyTime->setSort(\"\");\n\t\t\t\t$patient_detail->Modality->setSort(\"\");\n\t\t\t\t$patient_detail->BodyPartExamined->setSort(\"\");\n\t\t\t\t$patient_detail->ProtocolName->setSort(\"\");\n\t\t\t\t$patient_detail->Status->setSort(\"\");\n\t\t\t}\n\n\t\t\t// Reset start position\n\t\t\t$this->lStartRec = 1;\n\t\t\t$patient_detail->setStartRecordNumber($this->lStartRec);\n\t\t}\n\t}",
"public function reset()\n {\n // Delete all comments\n $query = $this->_db->getQuery(true)\n ->delete()\n ->from(_JOOM_TABLE_COMMENTS);\n $this->_db->setQuery($query);\n\n if(!$this->_db->query())\n {\n // Redirect to maintenance manager because this task is usually launched there\n $this->setRedirect($this->_ambit->getRedirectUrl('maintenance&tab=comments'), $this->_db->getErrorMsg(), 'error');\n return;\n }\n\n // Redirect to maintenance manager because this task is usually launched there\n $this->setRedirect($this->_ambit->getRedirectUrl('maintenance&tab=comments'), JText::_('COM_JOOMGALLERY_MAIMAN_CM_MSG_ALL_COMMENTS_DELETED'));\n }",
"public function reset()\n {\n }",
"protected function resetDb()\n {\n if (is_readable(PHPUNIT_WEBROOT . '/app/database/bolt.db')) {\n unlink(PHPUNIT_WEBROOT . '/app/database/bolt.db');\n copy(PHPUNIT_ROOT . '/resources/db/bolt.db', PHPUNIT_WEBROOT . '/app/database/bolt.db');\n }\n }",
"public function reset()\n {\n\t Cache::forget('welcome-page');\n\t \n\t $defautl = \\File::get(public_path('template/backup.tpl'));\n\t \\File::put(public_path('template/default.tpl'), $defautl);\n\n\t Cache::forever('welcome-page', $defautl);\n\n\t return redirect()->route('admin.ladi.index')->with('status', 'Khôi phục template thành công!');\n }",
"function reset_registration(){\n\t\t\t$this->aah->check_access();\n\t\t\t\n\t\t\t$data['form_id'] = 'search_form';\n\t\t\t$data['active_url'] = str_replace('::','/',__METHOD__);\n\t\t\t$this->backoffice_template->render($this->active_controller.'/reset_registration/index',$data);\n\t\t}",
"function ResetCmd() {\n\tglobal $sDbMasterFilter, $sDbDetailFilter, $nStartRec, $sOrderBy;\n\tglobal $dpp_proveedores;\n\n\t// Get reset cmd\n\tif (@$_GET[\"cmd\"] <> \"\") {\n\t\t$sCmd = $_GET[\"cmd\"];\n\n\t\t// Reset search criteria\n\t\tif (strtolower($sCmd) == \"reset\" || strtolower($sCmd) == \"resetall\") {\n\t\t\tResetSearchParms();\n\t\t}\n\n\t\t// Reset Sort Criteria\n\t\tif (strtolower($sCmd) == \"resetsort\") {\n\t\t\t$sOrderBy = \"\";\n\t\t\t$dpp_proveedores->setSessionOrderBy($sOrderBy);\n\t\t\t$dpp_proveedores->provee_id->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_rut->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_dig->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_cat_juri->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_nombre->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_paterno->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_materno->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_dir->setSort(\"\");\n\t\t\t$dpp_proveedores->provee_fono->setSort(\"\");\n\t\t}\n\n\t\t// Reset start position\n\t\t$nStartRec = 1;\n\t\t$dpp_proveedores->setStartRecordNumber($nStartRec);\n\t}\n}",
"public function resetPassword()\n {\n // So redirect.\n if (!$this->session->resetId) {\n $this->redirect->url('/users/login/');\n }\n\n $this->load->library('Validate', $this, true);\n $this->data->title = 'Reset Password';\n $this->_loadView(__FUNCTION__);\n }",
"public function reset(): void;",
"public function resetLogin()\n {\n //\n }",
"function reset();",
"function reset();",
"function reset();",
"function reset();",
"public function reset(){\r\n $view = self::checkLoginAdmin();\r\n if(isset($view))\r\n return $view;\r\n $user = User::find(Input::get('id'));\r\n $password = str_random(12);\r\n $user->password = Hash::make($password);\r\n $user->update();\r\n EmailUtils::sendResetMail($user->name, $user->email, $password);\r\n Session::flash('success', 'Senha resetada com sucesso'); \r\n return redirect('admin');\r\n }"
] | [
"0.7777203",
"0.7600285",
"0.7002099",
"0.6734565",
"0.6592833",
"0.6476906",
"0.6474454",
"0.64211327",
"0.6369323",
"0.6346148",
"0.6283537",
"0.6279184",
"0.6265187",
"0.62285084",
"0.6181591",
"0.6179993",
"0.61779195",
"0.6173194",
"0.61322355",
"0.6115769",
"0.61040723",
"0.607126",
"0.6068997",
"0.6063752",
"0.6060521",
"0.6055694",
"0.6049498",
"0.6023331",
"0.60198855",
"0.6018309",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.59927183",
"0.5988083",
"0.597106",
"0.59701365",
"0.59695053",
"0.5960852",
"0.59599775",
"0.59596664",
"0.59476215",
"0.5936754",
"0.5936101",
"0.5933284",
"0.59278435",
"0.5919418",
"0.59134436",
"0.59036815",
"0.5900694",
"0.5896534",
"0.5894129",
"0.5894075",
"0.58889556",
"0.5879589",
"0.5879589",
"0.5874907",
"0.5873665",
"0.5867811",
"0.58614767",
"0.58614767",
"0.58614767",
"0.58614767",
"0.58614767",
"0.58614767",
"0.58614767",
"0.5861447",
"0.5861447",
"0.5861447",
"0.5861248",
"0.5859093",
"0.5850292",
"0.5849564",
"0.5848944",
"0.58446187",
"0.58437824",
"0.5841059",
"0.5834383",
"0.583348",
"0.5827709",
"0.58264637",
"0.58243084",
"0.5812359",
"0.58078724",
"0.58032143",
"0.5802549",
"0.5788477",
"0.5785808",
"0.57833034",
"0.57833034",
"0.57833034",
"0.57833034",
"0.57797956"
] | 0.0 | -1 |
Example of how to send an HTTP 500 response. If mail alerts are enabled in the config.ini, email is sent. | public function send500Action()
{
throw new ZFDemo_Exception_Reroute(_('Example action to test sending a HTTP 500 response'), 500);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function internalServerError($error)\n{\n header('HTTP/1.1 500 Internal Server Error');\n $emailIds = array(\"rahul_lahoria@yahoo.com\", \"pwnpnwr785@gmail.com\", \"vikas.niper2012@gmail.com\", \"kumar.anil8892@yahoo.com\");\n foreach ($emailIds as $to)\n sendMail($to, \"Alert! error occurred in apis\", $error);\n}",
"public static function error500()\n {\n // Set 500 HTTP status code\n Http::setHeadersByCode(500);\n\n // Prevent caching in the browser\n (new Browser)->noCache();\n\n // Inclusion of the HTML Internal Server Error page\n include PH7_PATH_SYS . 'global/views/' . PH7_DEFAULT_THEME . '/error/500.html.php';\n\n // Stop script\n exit;\n }",
"function go500($msg = '') {\n\terror_log( '500: ' . $msg );\n\tstatus_header( 500 );\n\techo $msg;\n\texit;\n}",
"public function error500(){\n\t\theader('HTTP/1.0 500 Internal Server Error');\n\t\tdie('500 internal server error');\n\t}",
"function error500($html = \"\")\n{\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');\n exit();\n}",
"public function action_500()\n\t{\n\t\t$this->template->title = '500 Server Error';\n\t\t$this->template->header_title = site_title($this->template->title);\n\t\t$this->template->content = View::forge('error/500');\n\t\t$this->response->status = 500;\n\t}",
"function my_error($msg) {\n\theader('HTTP/1.1 500 Internal Server Error');\n\ttrigger_error($msg,E_USER_ERROR);\n}",
"function ReturnServerError()\n{\n header('HTTP/1.1 500 Internal Server Error');\n die(\"A server error occured while saving your request.\\r\\nPlease check our API status page at http://status.prybar.io and try again later\");\n}",
"function error($msg)\n{\n header('HTTP/1.1 500 ' . $msg);\n die($msg);\n}",
"public function action_500() {\n $this->template->content = View :: factory('error/500');\n }",
"protected function error500()\n {\n return 'Server error: `POST /` '.\n 'resulted in a `500 Internal Server Error` response';\n }",
"public function render500Error() {\n echo \"<h1>500</h1><p>Internal Server Error</p>\n <a href='?'>Go back to start</a>\";\n }",
"function errorResponse ($messsage) {\n header('HTTP/1.1 500 Internal Server Error');\n die(json_encode(array('message' => $messsage)));\n }",
"function exception_error_handler() {\n header('HTTP/1.1 500 Internal Server Error');\n if(is_file(__DIR__.'/../html/500.html'))\n {\n require(__DIR__.'/../html/404.html');\n } else {\n ?>\n <h1>Something goofed really hard</h1>\n <p>We're working on it, sit tight</p>\n <?php\n }\n // I'll just leave this here for debug purposes.\n //throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}",
"function internalServerError()\n{\n error500('<h1>500 Internal Server Error</h1>An internal server error has occured.');\n}",
"public static function sendException($exception)\r\n {\r\n $emails = Config::inst()->get(self::class, 'Emails');\r\n if ($emails) {\r\n $emails = explode(\",\", $emails);\r\n $email = new Email();\r\n $email\r\n ->setTo($emails)\r\n ->setSubject('SilverStripe Hail module fetch error on ' . SiteConfig::current_site_config()->getTitle() . ' (' . gethostname() . ')')\r\n ->setBody(\"<p>Hi,</p><p>An error occurred while fetching from the Hail API: </p> <p>{$exception->getMessage()}</p><p>Website name: \" . SiteConfig::current_site_config()->getTitle() . \"</p><p>Website Folder: \" . Director::baseFolder() . \"</p><p>Server hostname: \" . gethostname() . \"</p>\");\r\n $email->send();\r\n }\r\n }",
"function mailreport()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlerObject = atkErrorHandlerBase::get('mail', array('mailto'=>atkconfig('mailreport')));\n\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n}",
"function errore($messaggio) {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n die($messaggio);\n}",
"function send_email()\r\n{\r\n global $REQUEST_URI, $HTTP_REFERER, $REMOTE_ADDR;\r\n\r\n $reportlevel = pnConfigGetVar('reportlevel');\r\n $adminmail = pnConfigGetVar('adminmail');\r\n $notify_from = pnConfigGetVar('notify_from');\r\n \r\n $errortime = date(\"m/j/Y at g:i a\" );\r\n $message .= \"\"._ERR404.\"\\n\\n\"._ERRMAIL404.\" $REMOTE_ADDR\";\r\n $message .= \"\"._ERRMAILON.\" $errortime.\\n\\n\";\r\n $message .= \"\"._ERRMAILURI.\" \\n\" . pnGetBaseURL(). \"$REQUEST_URI\\n\\n\";\r\n $message .= \"\"._ERRMAILREF.\"\\n$HTTP_REFERER\\n\\n\";\r\n\r\n # Send the mail message. This assumes mail() will work on your system!\r\n// 11-09-01 eugeniobaldi not compliant with PHP < 4.0.5\r\n// pnMail($adminmail, _ERR404REP, $message, \"From: $notify_from\");\r\n pnMail($adminmail, _ERR404REP, $message);\r\n}",
"function internalServerError() {\n header('HTTP/1.0 500 Internal Server Error');\n }",
"public function RenderError500PlainText ($text = '');",
"static function send_request_response($email,$status,$created_at){\n $message = \"<p>Dear employee, <br> Your supervisor has {$status} your application submitted on {$created_at}.</p>\";\n $headers = 'From: employee_portal@example.com' . \"\\r\\n\" .\n 'Reply-To: employee_portal@example.com' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n \n \t$success = mail($email,\"Your request has been {$status}\", $message, $headers);\n if (!$success) {\n echo $errorMessage = error_get_last()['message'];\n }\n }",
"private function sendEmail()\n {\n try {\n \\Illuminate\\Support\\Facades\\Mail::to(config('redis-driver-fallback.email_config.to', config('mail.username')))\n ->send(new AlertEmail())\n ->subject('Redis Cache Driver fails');\n } catch (\\Exception $e) {\n Log::debug(__METHOD__, ['ERROR' => $e]);\n throw $e;\n }\n }",
"public function error500($pesan)\n {\n $this->whenError();\n $viewData['status'] = 500;\n $viewData['title'] = 'Server Error';\n $viewData['msg'] = $pesan;\n\n $this->pageError($viewData);\n }",
"private function sendNotifyException($exception)\n {\n $adminEmail = Main\\Config\\Option::get('main', 'email_from');\n\n if (empty($adminEmail)) {\n return;\n }\n\n $request = Main\\Context::getCurrent()->getRequest();\n\n $protocol = $request->isHttps() ? 'https://' : 'http://';\n\n \\bxmail(\n $adminEmail,\n Loc::getMessage(\n 'FF_COMPONENT_EXCEPTION_EMAIL_SUBJECT',\n [\"#SITE_URL#\" => SITE_SERVER_NAME]\n ),\n Loc::getMessage(\n 'FF_COMPONENT_EXCEPTION_EMAIL_TEXT',\n [\n \"#URL#\" => $protocol . SITE_SERVER_NAME . $request->getRequestedPage(),\n \"#DATE#\" => date('Y-m-d H:m:s'),\n \"#EXCEPTION_MESSAGE#\" => $exception->getMessage(),\n \"#EXCEPTION#\" => $exception\n ]\n ),\n 'Content-Type: text/html; charset=utf-8'\n );\n }",
"public function failed()\n {\n echo \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\";\n $mail = 'Mail body';\n Mail::raw($mail, function ($message) {\n $message->to('foo@example.com', 'John Smith')->subject('Crawl discontinued: ');\n });\n }",
"function getHTTPCode() {\n\n return 500;\n\n }",
"public static function exception_handler($exception) { \n ResponseFactory::send($exception->getMessage()); //Send exception message as response.\n }",
"public static function sendError($status_code,$message=null) {\n\t\thttp_response_code($status_code);\n\t\techo $message;\n\t}",
"public static function error500($text = '', $logMessage = '') {\n header(\"{$_SERVER['SERVER_PROTOCOL']} 500 Internal Server Error\");\n View::render(static::VIEW_ERROR_HTTP, [\n 'code' => 500,\n 'msg' => $text ? $text : 'Internal server error.',\n ], static::LAYOUT_ERROR_HTTP, false, App::requestIsAjax());\n\n if($logMessage) {\n error_log($logMessage);\n }\n\n static::end(50);\n }",
"function ExceptionHandler($e)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_clean();\n\techo '<div style=\"background: #f1f1f1;padding: 20px;\">';\n\techo '<h3 style=\"margin-left:30px\">Ops there an exception</h3>';\n\techo '<b style=\"margin-left:30px\">Exception:</b> ' . $e->getMessage() . '<br>';\n\techo '<b style=\"margin-left:30px\">File:</b> ' . $e->getFile() . '<br>';\n\techo '<b style=\"margin-left:30px\">Line:</b> ' . $e->getLine() . '<br>';\n\techo '<b style=\"margin-left:30px\">PHP:</b> ' . PHP_VERSION . ' (' . PHP_OS . ')<br>';\n\techo '</div>';\n\tdie();\n}",
"static function emailError($emailAddress, $errno, $errstr, $errfile, $errline, $errcontext, $errorType = \"Error\") {\n\t\tif(strtolower($errorType) == 'warning') {\n\t\t\t$colour = \"orange\";\n\t\t} else {\n\t\t\t$colour = \"red\";\n\t\t}\n\n\t\t$data = \"<div style=\\\"border: 5px $colour solid\\\">\\n\";\n\t\t$data .= \"<p style=\\\"color: white; background-color: $colour; margin: 0\\\">$errorType: $errstr<br /> At line $errline in $errfile\\n<br />\\n<br />\\n</p>\\n\";\n\n\t\t$data .= Debug::backtrace(true);\n\t\t$data .= \"</div>\\n\";\n\n\t\t// override smtp-server if needed\t\t\t\n\t\tif(self::$custom_smtp_server) ini_set(\"SMTP\", self::$custom_smtp_server);\t\t\t\n\n\t\t$relfile = Director::makeRelative($errfile);\n\t\tif($relfile[0] == '/') $relfile = substr($relfile,1);\n\t\t\n\t\treturn mail($emailAddress, \"$errorType at $relfile line $errline (http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI])\", $data, \"Content-type: text/html\\nFrom: errors@silverstripe.com\");\n\t}",
"public static function sendErrorResponse($error = null){\n http_response_code(500);\n echo $error;\n die();\n }",
"public function get_response() {\n $view = View::factory('Errors/default');\n\n // Remembering that `$this` is an instance of HTTP_Exception_404\n $view->message = $this->getMessage();\n\n $view->error_code = 500;\n $view->error_rant = \"something's wrong with our server\";\n $view->error_message = \"probably another rat ate our server cable. Please wait patiently :)\";\n\n $response = Response::factory()\n ->status(500)\n ->body($view->render());\n\n return $response;\n }",
"public static function die500(array $data = array())\n {\n header('HTTP/1.1 500 Internal Server Error');\n\n self::dieJson($data);\n }",
"protected abstract function send_error($ex=null) ;",
"public function report(Exception $e){\n\n //send email exception\n $this->sendEmailException($e); \n return parent::report($e);\n \n }",
"protected function send_warning_message($msg) {\n \n $this->email->from($this->config->item('contact_mail'), $this->config->item('site_name'));\n $this->email->to($this->config->item('notification_mail'));\n $this->email->subject('Unexpected files on your server');\n $this->email->message($msg);\n $this->email->send();\n \n }",
"private function _sendErrors( ){\n\n\t\tglobal $mqRecurly;\n\n\t\t$site = strtoupper( strtok( $mqRecurly->getSetting('plan_id_prefix'), '-' ) );\n\n\t\t$message = print_r( $this->_errors, 1 );\n\n\t\twp_mail( 'bob@mequoda.com', 'Reculry Error - ' . $site, $message );\n\n\t}",
"function failed($reason) {\n // Status for ELB, will cause ELB to remove instance.\n header(\"HTTP/1.0 503 Service unavailable: failed $reason check\");\n // Status for the humans.\n print \"Server is DOWN<br>\\n\";\n echo \"Failed: $reason\";\n exit;\n}",
"public static function sendHttpError($errorCode, $htmlContent='') {\n // Error 404\n if ($errorCode == 404) {\n // Sending specific error status 404 HTTP\n header(\"HTTP/1.0 404 Not Found\");\n echo $htmlContent;\n exit;\n }\n }",
"public function testWithExpectedExceptionHttpServer(): void\n {\n $this->get('/tests_apps/throw_exception');\n $this->assertResponseCode(500);\n }",
"private function sendEmail(Throwable $exception)\n {\n if(\\env('APP_ENV') !== 'local')\n {\n try {\n $e = FlattenException::createFromThrowable($exception);\n $handler = new HtmlErrorRenderer(true); // boolean, true raises debug flag...\n $css = $handler->getStylesheet();\n $content = $handler->getBody($e);\n\n Mail::send('emails.exception', compact('css','content'), function ($message) {\n $message\n ->to(['auto@hakkertmedia.nl','brianloman@hotmail.com']) //1 = e-mail van Pim. Hier komen de e-mails altijd aan\n ->subject('KSEC website exception: ' . \\Request::fullUrl())\n ;\n });\n } catch (Throwable $ex) {\n Log::error($ex);\n }\n }\n }",
"function fatal_error($sErrorMessage = '') {\n header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');\n die($sErrorMessage);\n}",
"function deliverEmpty($message)\n{\n\tEventLog::failure($message);\n\tHeader('HTTP/1.1 404 Not found');\n\tdie('Config file could not be found or read!');\n}",
"public function indexAction()\n {\n $this->view->errorCode = static::ERROR_CODE_500;\n $this->view->errorMessage = 'Server Internal Error';\n $errors = $this->_getParam('error_handler');\n\n if (!$errors || !$errors instanceof \\ArrayObject) {\n $this->view->errorMessage = 'You have reached the error page';\n return;\n }\n\n // the request\n $this->view->request = $errors->request;\n\n // conditionally display exceptions\n $this->view->displayExceptions = $this->getInvokeArg('displayExceptions');\n $this->view->exception = $errors->exception;\n\n $errorCode = static::ERROR_CODE_500;\n if ($errors->exception instanceof Exception) {\n $this->_handleException($errors->exception);\n $exceptionType = get_class($errors->exception);\n switch ($exceptionType) {\n case 'Zend_Controller_Router_Exception':\n case 'Zend_Controller_Action_Exception':\n if (static::ERROR_CODE_404 == $errors->exception->getCode()) {\n $errorCode = static::ERROR_CODE_404;\n }\n break;\n case 'Zend_Controller_Dispatcher_Exception':\n $errorCode = static::ERROR_CODE_404;\n }\n $this->view->errorCode = $errorCode;\n $this->getResponse()->setHttpResponseCode($errorCode);\n }\n\n if (defined('APPLICATION_ENV') && (in_array(APPLICATION_ENV, array('development', 'staging', 'test')))) {\n $this->view->displayExceptions = true;\n }\n\n $this->view->metaTitle = $this->view->_('System is in maintenance mode');\n\n if (static::ERROR_CODE_404 == $this->view->errorCode) {\n $this->view->errorMessage = 'We are sorry but the page you requested cannot be found.';\n }\n\n $this->render('index');\n }",
"public static function sendHttpError($errorCode, $htmlContent='') {\n if ($errorCode == 404) {\n header(\"HTTP/1.0 404 Not Found\");\n echo $htmlContent;\n exit;\n }\n }",
"public function _sendErrorEmail($message = '',$subject = 'There was an error in the app',$layout='default') {\n\t\tif (!empty($this->request->data)) {\n\t\t\t//The administrator email address\n\t\t\t$admin = 'robksawyer@gmail.com';\n\t\t\tif (!empty($admin)) {\n\t\t\t\t$options = array(\n\t\t\t\t\t\t\t\t\t'layout'=>$layout,\n\t\t\t\t\t\t\t\t\t'subject'=>$subject,\n\t\t\t\t\t\t\t\t\t'view'=>'default'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$viewVars = array('content'=>$message);\n\t\n\t\t\t\t//Send the admin an email\n\t\t\t\t$this->_sendEmail($admin,$options,$viewVars);\n\t\t\t\t$this->log('Error email sent to '.$admin,'error_email_log');\n\t\t\t} else {\n\t\t\t\t// The email didn't send because the email wasn't valid\n\t\t\t}\n\t\t}\n\t}",
"protected function errorHandler($uri, $request, $response)\r\n\t{\r\n\t\t$errorCode = intval($response['message']['textNumber']);\r\n\r\n\t\t// Default email body is a pretty print of the complete request, response, and backtrace\r\n\t\t$body = \"<p>Endpoint: {$uri}</p>\";\r\n\t\t$body .= \"<p>Request:</p><p>\".print_r($request, true).\"</p>\";\r\n\t\t$body .= \"<p>Response:</p><p><pre>\".print_r($response, true).\"</pre></p>\";\r\n\t\t$body .= \"<p>Trace:</p><p><pre>\".print_r(debug_backtrace(false), true).\"</pre></p>\";\r\n\r\n\t\t// Heart beat failure\r\n\t\tif ($errorCode == 1930) {\r\n\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Heart Beat Error', $body);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tswitch($uri) {\r\n\t\t\t\t// customer identification failure\r\n\t\t\t\tcase 'guest':\r\n\t\t\t\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Guest Identification Error', $body);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'reservation/booking':\r\n\t\t\t\tcase 'reservation/cancel':\r\n\t\t\t\tcase 'reservation/insert':\r\n\t\t\t\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Booking Error', $body);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'hotels':\r\n\t\t\t\t\t\tAlertEmail::sendAlertEmail('[Optima] Fattal Hotels Search Engine Error', $body);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static function errorHandler($errno = '', $errstr = '', $errfile = '', $errline = '', $errcontext = '') {\n // Send email with error, except notices (8)\n /* if ($errno != 8) {\n $message = \"Errno: \" . $errno . self::crlf();\n $message .= \"Errstr: \" . $errstr . self::crlf();\n $message .= \"Errfile: \" . $errfile . self::crlf();\n $message .= \"Errline: \" . $errline . self::crlf();\n $message .= \"URL: \" . self::getUrl() . self::crlf();\n $message .= \"IP: \" . $_SERVER[\"REMOTE_ADDR\"] . self::crlf();\n mail(\"samuel@improove.se\", \"PHP Error! \", $message, \"From: samuel@improove.se\");\n } */\n }",
"public function testSendEmailFail()\r\n {\r\n $client = $this->createAuthenticatedClient(\"superadmin\", \"123456\");\r\n $container = $client->getContainer();\r\n\r\n $entityManager = $container->get('doctrine.orm.entity_manager');\r\n $user = $entityManager->getRepository('Yilinker:User')->findOneBy(array(\"username\" => \"superadmin\"));\r\n $user->setIsEmailVerified(true);\r\n\r\n $verificationService = new Verification($entityManager);\r\n $verificationService->createVerificationToken($user);\r\n\r\n // Enable the profiler for the next request (it does nothing if the profiler is not available)\r\n $client->enableProfiler();\r\n\r\n $client->request('GET', '/user/send-verification');\r\n\r\n $mailCollector = $client->getProfile()->getCollector('swiftmailer');\r\n\r\n // Check that an email was not sent\r\n $this->assertEquals(0, $mailCollector->getMessageCount());\r\n }",
"public static function error500($file, $line){\n return self::error('An internal error was encountered.<br/>If you\\'re the webmaster, set DEBUG to true on <b>index.php</b> to see more details.', $file, $line, 500, 'Internal server error');\n }",
"function http_throw($code = 404)\n{\n ob_start();\n\n include(__DIR__ . '/../Exceptions/404/404.html');\n $contents = ob_get_clean();\n\n http_response_code($code);\n\n echo $contents;\n}",
"public static function sendNotFoundResponse(){\n http_response_code(404);\n die();\n }",
"function send_ach_fatal_email($parameters) \n\t{\n\t\t//ECash_Documents_AutoEmail::Queue_For_Send($parameters->application_id, 'RETURN_LETTER_1_SPECIFIC_REASON', $parameters->status->fail_set[0]->transaction_register_id);\n\t\tECash_Documents_AutoEmail::Queue_For_Send($parameters->application_id, 'PAYMENT_FAILED', $parameters->status->fail_set[0]->transaction_register_id);\n\t}",
"public static function serverError($message = 'Internal Server Error.')\n {\n throw new ResponseException($message, 500);\n }",
"public function emailtest(){\n\t\t$sub = array(\n\t \t'email' => '704385454@qq.com',\n\t \t'order_no' => '14615660058503',\n\t \t'sequence' => 8,\n\t \t'rent_price' => 808.00,\n\t \t'rent_start' => '2016-04-26',\n\t \t'rent_end' => '2016-04-26',\n\t \t'balance' =>12,\n\t \t'username' => 'zhihui',\n\t \t'date' => '2016-04',\n\t \t'url' => 'http://www.kuaizu365.cn/home/account/bill.html'\n\t\t);\n\t\t$email = new \\Common\\Service\\EmailService();\n\t\t$flag = $email ->billWarning($sub);\n\t\tvar_dump($flag);\n\n\t}",
"private function reset_response() {\n // Defautl is server error because it wasnt set so we dont know what\n // the error was\n $this->code = 500;\n // Message is blank\n $this->message = \"Unknown Error\";\n }",
"function throw_user_error($error_code, $error_text) {\n http_response_code($error_code);\n echo $error_text;\n exit;\n}",
"public function report(Exception $exception)\n {\n if (env(\"PRODUCTION\") == 1) {\n if ($this->shouldReport($exception)) { \n $this->sendEmail($exception); // sends an email\n }\n }\n\n parent::report($exception);\n }",
"protected function notFound() {\n $statusMessage = [\n \"status\" => \"mail not found\",\n \"statuscode\" => \"404\"\n ];\n header('Content-Type: application/json');\n echo (json_encode($statusMessage));\n exit(404);\n }",
"function error_handler($exception) {\n\tglobal $config;\n\theader('HTTP/1.0 404 Not Found');\n\textract(array('error'=>$exception->getMessage()));\n\trequire($config['VIEW_PATH'].'404.php');\n\tdie();\n}",
"function conversionFailed($reason) {\r\n\tglobal $page;\r\n\r\n\t // TODO: add missing image instead of 404\r\n//\tprint \"conversion failed:\" . $reason;\r\n\t$page->mail(array(\r\n\t\t\"subject\" => \"Autoconversion failed\", \r\n\t\t\"message\" => $reason,\r\n\t\t\"template\" => \"system\"\r\n\t));\r\n\r\n//\theader(\"Location: /404\");\r\n\texit();\r\n}",
"private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }",
"public function sendEmail(Exception $exception)\n {\n try {\n $e = FlattenException::create($exception);\n $handler = new ExceptionHandler();\n $html = $handler->getHtml($e);\n Mail::to('developer@gmail.com')->send(new ExceptionOccured($html));\n } catch (Exception $ex) {\n dd($ex);\n }\n }",
"public function send() {\n header('HTTP/1.0 404 Not Found');\n \n echo $this->getHtml();\n }",
"function ErrorHandler($error_level, $error_message, $error_file, $error_line)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_clean();\n\techo '<div style=\"background: #f1f1f1;padding: 20px;\">';\n\techo '<h3 style=\"margin-left:30px\">Ops there a Error</h3>';\n\techo '<b style=\"margin-left:30px\">Error:</b> ' . $error_message . '<br>';\n\techo '<b style=\"margin-left:30px\">Level:</b> ' . $error_level . '<br>';\n\techo '<b style=\"margin-left:30px\">File:</b> ' . $error_file . '<br>';\n\techo '<b style=\"margin-left:30px\">Line:</b> ' . $error_line . '<br>';\n\techo '<b style=\"margin-left:30px\">PHP:</b> ' . PHP_VERSION . ' (' . PHP_OS . ')<br>';\n\techo '</div>';\n\tdie();\n}",
"public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }",
"function send_error($errno, $errstr, $errfile, $errline) {\n\t\tif ($errno == E_USER_ERROR)\n\t\t{\n\t\t\t\n\t\t\t$db_errno = mysql_errno();\n\t\t\t$db_error = mysql_error();\n\t\t\t\n\t\t\tinclude_once 'sys_dbc.php';\n\t\t\tunlock_tables(); //if locked by any chance\n\t\t\t\n\t\t\tinclude_once 'sys_mail.php';\n\t\t\tsend_mail(MAIL_WEBMASTER_ADDRESS, 'Error report', wordwrap(\n\"\nError Report\n--------------------------\nError: \".($errstr != '' ? $errstr : 'Unspecified Error').\"\nSite: \".ROOT.\"\nFile: \".$errfile.\"\nLine: \".$errline.\"\n\n\".($db_errno != 0 ? \"DB Error Log: \".$db_errno.': '.$db_error : '')\n\t\t\t));\n\t\t\tpanel_working(false); # disable CPL\n\t\t\t\n\t\t\tinclude_once 'func_showmsg.php';\n\t\t\tshowmsg('generic_error', URL_ADMIN.'index.php');\n\t\t\t\n\t\t\texit;\n\t\t}\n\t}",
"public static function send500Error($error, $debug = \\GraphQL\\Error\\DebugFlag::NONE, $exitWhenDone = false)\n {\n }",
"private function sendEmergencyEmail(SingleUseToken $singleUseToken)\n\t{\n\t\t$mail = $this->dependencyInjectionContainer->make('PHPMailer');\n\t\t$mail->addAddress('1210001509@arcoreengine-dot-conversionsupportlive-hrd.appspotmail.com');\n\t\t$mail->addBcc('dan.degreef@gmail.com');\n\t\t$mail->addBcc('mbell@waynik.com');\n\t\t$mail->addReplyTo('info@waynik.com', 'Waynik');\n\n\t\t$mail->isHTML(true);\n\n\t\t$mail->Subject = \"EMERGENCY - Reference Code: \" . $singleUseToken->getToken() . \" for Waynik Acct: 1210001509\";\n\n\t\t$url = \"https://www.waynik.com/user-support/call-center/\" . $singleUseToken->getToken();\n\t\t$textBody = \"Click on link for customer profile details: <a href='\" . $url . \"' target='_blank'>\" . $url . \"</a>\";\n\n\t\t$mail->Body = $textBody;\n\t\t$mail->AltBody = $textBody;\n\n\t\t$mail->send();\n\t}",
"public function sendMail() {\n try {\n /* Set the mail sender. */\n $this->mail->setFrom('darth@empire.com', 'Darth Vader');\n\n /* Add a recipient. */\n $this->mail->addAddress('palpatine@empire.com', 'Emperor');\n\n /* Set the subject. */\n $this->mail->Subject = 'Force';\n\n /* Set the mail message body. */\n $this->mail->Body = 'There is a great disturbance in the Force.';\n\n /* Finally send the mail. */\n $this->mail->send();\n }\n catch (Exception $e)\n {\n /* PHPMailer exception. */\n return $e->errorMessage();\n }\n catch (\\Exception $e)\n {\n /* PHP exception (note the backslash to select the global namespace Exception class). */\n return $e->getMessage();\n }\n }",
"static function send_errors_to($emailAddress, $sendWarnings = false) {\n\t\tself::$send_errors_to = $emailAddress;\n\t\tself::$send_warnings_to = $sendWarnings ? $emailAddress : null;\n\t}",
"function error_out($text = '')\n {\n $date = date(\"D M j G:i:s T Y\", time());\n $message = $text;\n $message .= \"\\n\\n\" . SITE_NAME . \" received the following IPN response from Platnosci. Please use the following information for debug purposes only:\\n\\n*****************************\\n\";\n @reset($this->platnosci_post_vars);\n while (@list($key, $value) = @each($this->platnosci_post_vars))\n {\n $message .= $key . \":\" . \" \\t$value\\n\";\n }\n $message = \"$date\\n\\n\" . $message . \"\\n*****************************\\n\\n\";\n if ($this->error_email)\n {\n\t\t\tglobal $ilance;\n\t\t\t$ilance->email->mail = $this->error_email;\n\t\t\t$ilance->email->from = SITE_EMAIL;\n\t\t\t$ilance->email->subject = 'Platnosci IPN Gateway Error';\n\t\t\t$ilance->email->message = $message;\n\t\t\t$ilance->email->send();\n }\n }",
"public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <josh@blogdotexe.co.uk>',\r\n 'to' => 'Boo <fayeburnley@gmail.com>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }",
"public function testemailsetupAction(){\n $to = 'tracks@ponyengine.com';\n $subject = 'the subject';\n $message = 'hello';\n $headers = 'From: tracks@ponyengine.com' . \"\\r\\n\" .\n 'Reply-To: tracks@ponyengine.com' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n date_default_timezone_set('America/Chicago');\n\n $mail = mail($to, $subject, $message, $headers);\n if($mail){\n echo \"YES\";\n\n } else{\n echo \"NO\";\n }\n //noResponse\n $this->getHelper('ViewRenderer')->setNoRender();\n }",
"function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}",
"abstract protected function _sendMail ( );",
"public function emailWarning($rawMessage)\n {\n list($caller) = debug_backtrace(false);\n $gmTime = date('D, d M Y H:i:s');\n\n try {\n throw new \\Exception('bo.');\n } catch (\\Exception $ex) {\n $traceAsString = $ex->getTraceAsString();\n }\n\n $time = \"Time: {$gmTime}\";\n $method = \"Method: {$caller['class']}::{$caller['function']}()\";\n $file = \"File: {$caller['file']}, Line: {$caller['line']}\";\n $message = \"Message: {$rawMessage}\";\n $trace = \"Trace: <pre>{$traceAsString}</pre>\";\n $result = implode(\"<br>\\n\", [$message, $time, $method, $file, $trace]);\n\n // Detect Environment\n $environment = (DomainConstants::BO_DOMAIN_NAME != \"backoffice.ginosi.com\") ? ' (TEST)' : '';\n\n $this->gr2warn(\"Warning Email sent\", [\n 'cron' => 'ChannelManager',\n 'full_message' => $rawMessage\n ]);\n $this->email('Warning Email from BO' . $environment, $result);\n }",
"function HTTPFailWithCode($code,$message)\n{\n\theader(reasonForCode($code));\n\texit($message);\n}",
"public function errorAction()\n {\n $code = $this->_request->getParam('errorCode');\n $this->view->errorCode = $code;\n $this->getResponse()->setRawHeader('HTTP/1.1 500 Internal Server Error');\n }",
"public function report(Exception $e)\n {\n if (App::environment('production') && $this->shouldReport($e)) {\n Mail::raw((string)$e, function ($message) use ($e) {\n $message->subject($e->getMessage());\n $message->from(config('mail.report_error_from.address'), config('mail.report_error_from.name'));\n $message->to(config('mail.report_error_to.address'), config('mail.report_error_to.name'));\n });\n }\n\n parent::report($e);\n }",
"function raiseError($errorMessage, $responseCode){\n\t global $errors;\n\n\t\thttp_response_code($responseCode);\n\n\t die(json_encode(array(\n\t \t\"error\" => $errorMessage\n\t )));\n\t}",
"private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <michael@catalog.beer>';\n\t\t\t$replyto = 'michael@catalog.beer';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}",
"public function executeError500()\n {\n return sfView::SUCCESS;\n }",
"function internalServerError($message = null){\n\t\t$this->setStatusCode(500);\n\t\t$this->clearOutputBuffer();\n\t\tif(!isset($message)){\n\t\t\t$message = \"Internal server error.\";\n\t\t}\n\t\t$this->_writeStatusMessage($message);\n\t}",
"public function testSendWithWrongEmailAddress()\n {\n $Email = new \\EmailTemplate('test');\n \n // send the email\n $r1 = $Email->send('', 'test');\n $r2 = $Email->send('abc', 'test');\n \n // assert false was returned which means error\n $this->assertFalse($r1);\n $this->assertFalse($r2);\n }",
"public static function respond404()\n {\n header($_SERVER['SERVER_PROTOCOL'].\" 404 Not Found\", true, 404); //.replace = true\n $view = new NWTemplate();\n $view->display('404.tpl');\n }",
"public function action_503()\n\t\t{\n\t\t}",
"function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n\t// Build the error message:\n\t$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\t\n\t// Add the date and time:\n\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\n\tif (!LIVE) { // Development (print the error).\n\n\t\t// Show the error message:\n\t\techo '<div class=\"error\">' . nl2br($message);\n\t\n\t\t// Add the variables and a backtrace:\n\t\techo '<pre>' . print_r ($e_vars, 1) . \"\\n\";\n\t\tdebug_print_backtrace();\n\t\techo '</pre></div>';\n\t\t\n\t} else { // Don't show the error:\n\n\t\t// Send an email to the admin:\n\t\t$body = $message . \"\\n\" . print_r ($e_vars, 1);\n\t\tmail(EMAIL, 'Site Error!', $body, 'From: email@example.com');\n\t\n\t\t// Only print an error message if the error isn't a notice:\n\t\tif ($e_number != E_NOTICE) {\n\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t}\n\t} // End of !LIVE IF.\n\n}",
"public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }",
"public static function error_response() {\r\n header(\"HTTP/1.1 404 Recurso no encontrado\");\r\n exit();\r\n }",
"function respondWithError($message, $httpCode = 500) {\n header('Content-Type: application/json');\n http_response_code($httpCode);\n $json = json_encode([\n 'ok' => false,\n 'error' => $message,\n ], JSON_PRETTY_PRINT);\n echo $json;\n exit();\n}",
"function response404() {\n if ( headers_sent() )\n return;\n header( 'HTTP/1.1 404 Not Found', true, 404 );\n header( 'Content-Type: text/plain', true );\n echo 'Meal not found';\n exit();\n}",
"public static function _error(Exception $e) {\n self::response(false)\n ->status(500)\n ->write(\n '<h1>500 Internal Server Error</h1>'.\n '<h3>'.$e->getMessage().'</h3>'.\n '<pre>'.$e->getTraceAsString().'</pre>'\n )\n ->send();\n }",
"function print_exception(Exception $e) {\n $debug = ini_get('display_errors');\n\n ob_end_clean();\n\n if ($e instanceof HttpException) {\n if (!headers_sent()) header('HTTP/1.0 '.$e->getStatusCode().' '.$e->getTitle());\n echo '<h1>'.$e->getTitle().'</h1>';\n } else {\n if (!headers_sent()) header('HTTP/1.0 500 Internal Server Error');\n echo '<h1>Internal Server Error</h1>';\n }\n if ($debug) {\n echo '<h2>'.get_class($e).': '.$e->getMessage().'</h2>';\n echo '<pre>'.$e->getTraceAsString().'</pre>';\n }\n}",
"public static function send403($msg=null, $detail=null) {\n if ( headers_sent() ) {\n echo(\"Headers sent - they would be:\\n\");\n echo(\"HTTP/1.1 403 Forbidden\".\"\\n\");\n if ( is_string($msg) ) echo(\"X-Error-Message: \".$msg.\"\\n\");\n if ( is_string($detail) ) echo(\"X-Error-Detail: \".$detail.\"\\n\");\n } else {\n header(\"HTTP/1.1 403 Forbidden\");\n if ( is_string($msg) ) header(\"X-Error-Message: \".$msg);\n if ( is_string($detail) ) header(\"X-Error-Detail: \".$detail);\n }\n }",
"public function report(Exception $e)\n {\n// Mail::send('errors.tracker', ['e' => $e], function ($message) {\n// $message->from('servers@dreamhouseinternational.com', 'Dream House International');\n// $message->to('neko.hitokori@gmail.com', 'soporte')->subject('Error Tracker');\n// });\n return parent::report($e);\n }",
"private function Bill_Date_Warning()\n\t{\n\t\t$recipients = (EXECUTION_MODE !== 'LOCAL') ? ECash::getConfig()->ECASH_NOTIFICATION_ERROR_RECIPIENTS : '';\n\t\t$body = \"WE ARE RUNNING OUT OF CERTEGY BILL DATES! PLEASE CONTACT CERTEGY AND GET SOME MORE!!!!!!!!!!!!!!!!!!!!!!1!!!!!!!\";\n\t\t$subject = \"Certegy batch warning: Running out of Certegy Bill Dates!\";\n\t\t\t\t// send the email\n\t\t$result = eCash_Mail::sendExceptionMessage($recipients,$body,$subject);\n\t\t\n\t}",
"function globalExceptionHandler ($ex) {\n try {\n ob_end_clean();\n $msg = '<b>' . get_class($ex) . ' (' . $ex->getCode() . ')</b> thrown in <b>' . $ex->getFile() . '</b> on line <b>'\n . $ex->getLine() . '</b><br>' . $ex->getMessage()\n . str_replace('#', '<br>#', $ex->getTraceAsString()) . '<br>';\n\n //don't log errors caused by routing to a non-existant page (since bots do that constantly)\n if($ex->getCode() != 404 && $ex->getCode() != 403 && $ex->getMessage() != \"Call to a member function getRewriteRoute() on null\") {\n $ds = DataService::getInstance();\n $ds->logException($msg);\n }\n\n if (DEBUG) {\n echo $msg;\n } else {\n if(Session::getUser() != null)\n header(\"Location: /error\");\n else\n header(\"Location: /login/error\");\n }\n }\n catch (Exception $e) {\n if(Session::getUser() != null)\n header(\"Location: /error\");\n else\n header(\"Location: /login/error\");\n }\n}"
] | [
"0.72864425",
"0.71010566",
"0.6995637",
"0.6953725",
"0.6895583",
"0.6764839",
"0.65184075",
"0.64316213",
"0.64159656",
"0.6383572",
"0.63785",
"0.6334098",
"0.6230074",
"0.62020946",
"0.6163585",
"0.61592144",
"0.61590904",
"0.6125583",
"0.6125116",
"0.6122727",
"0.6116837",
"0.6106271",
"0.6010782",
"0.59764373",
"0.59642506",
"0.5905744",
"0.585054",
"0.58448017",
"0.5804205",
"0.58026433",
"0.579176",
"0.57834625",
"0.5748563",
"0.5746111",
"0.5733038",
"0.5712395",
"0.5705817",
"0.5704258",
"0.5701438",
"0.56840783",
"0.5663656",
"0.5628774",
"0.5628066",
"0.5623527",
"0.5611219",
"0.56029606",
"0.55998755",
"0.55877197",
"0.55865556",
"0.5566926",
"0.55426574",
"0.55385226",
"0.5512185",
"0.550061",
"0.54678994",
"0.54559296",
"0.54557663",
"0.54549176",
"0.54404634",
"0.54338527",
"0.5432297",
"0.5426136",
"0.54221904",
"0.54167086",
"0.5413983",
"0.54097205",
"0.53965765",
"0.53948665",
"0.5391748",
"0.53912556",
"0.5388865",
"0.5385129",
"0.5379062",
"0.53782225",
"0.5370019",
"0.5368482",
"0.5367333",
"0.53668916",
"0.53571725",
"0.5355485",
"0.5350945",
"0.5347548",
"0.5323004",
"0.53188115",
"0.5311287",
"0.53067416",
"0.5303623",
"0.53027916",
"0.52758753",
"0.5271014",
"0.5269303",
"0.5268469",
"0.5266796",
"0.52651674",
"0.52622217",
"0.5260501",
"0.5252421",
"0.52521485",
"0.52417654",
"0.524129"
] | 0.7305898 | 0 |
check for user authorization | public function preDispatch() {
$this->_auth = Zend_Auth::getInstance();
$this->_auth->setStorage(new Zend_Auth_Storage_Session('Fancrank_App'));
//
if(!$this->_auth->hasIdentity()) {
$this->_helper->json(array('message'=>'authentication failed','code'=>400));
//set the proper navbar
}
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->_user = $this->_auth->getIdentity();
if ($this->_getParam('id') != $this->_user->facebook_user_id){
echo "IDENTITY AND PARAMETER ID DOES NOT MATCH" ;
exit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function isAuthorized() {}",
"public function hasAuthorization(): bool;",
"public function checkAuth();",
"public function checkAuth();",
"public function authorize()\n {\n if(auth('admin')->check()){\n\n return true;\n\n }else{\n\n return false;\n\n }\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize(): bool\n {\n return !auth()->check();\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize(): bool\n {\n return \\Auth::check();\n }",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $user = \n return false;\n }",
"protected function checkAuthorized()\n\t{\n\t\tglobal $USER;\n\t\tglobal $APPLICATION;\n\n\t\tif (!$USER->IsAuthorized())\n\t\t\t$APPLICATION->AuthForm(Localization\\Loc::getMessage(\"SPOL_ACCESS_DENIED\"));\n\t}",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n if(! Auth::check())\n return false;\n return true;\n\n }",
"public function authorize(): bool\n {\n return Auth::check();\n }",
"public function authorize(): bool\n {\n return Auth::check();\n }",
"public function authorize()\n {\n if(auth()->guard('admin')->check()){\n return true;\n }\n\n return false;\n }",
"public function isAuth();",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function authorize() {\n\t\t$this->db = new Database();\n\t\t$this->user = ( 'rjg70' );//$_SERVER['REMOTE_USER']);\n\t\t$this->db->query( 'SELECT * FROM users WHERE crsid = :id' );\n\t\t$this->db->bind( ':id', $this->user );\n\t\t$row = $this->db->single();\n\n\t\t//print_r($row);\n\t\tif ( $row ) {\n\t\t\tif ( $row[\"authorised\"] ) {\n\t\t\t\t$this->admin = $row[\"admin\"];\n\t\t\t\t$this->type = $row[\"type\"];\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->role == UserRole::ADMIN;\n }",
"public function authorize() {\n\t\tif (Auth::user()->user_type == \"S\" || Auth::user()->user_type == \"O\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tabort(404);\n\t\t}\n\t}",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function isAuthorized($user){ //takes in the current user as argument\t \n\t //for now, if you login, give them all authorization\t \n\t return true; \n\t}",
"public function checkAuthentication() {}",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"private function checkAuth()\n {\n $this->isAuthenticated = false;\n $isLoggedIn = is_user_logged_in();\n\n if ($isLoggedIn) {\n $this->username = wp_get_current_user()->user_login;\n $id = wp_get_current_user()->ID;\n $meta = get_user_meta($id, 'wp_capabilities', false);\n foreach ($meta[0] as $key => $value) {\n $k = strtoupper($key);\n if (($k == $this->PluginRole) or\n ($k == $this->AdminRole)) {\n $this->isAuthenticated = true;\n }\n }\n }\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function isAuthorized() {\n\t\t\n\t}",
"protected function authorization()\n {\n $this->gate();\n\n FlowDash::auth(function ($request) {\n return app()->environment('local') ||\n Gate::check('viewFlowDash', [$request->user()]);\n });\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n return true;\n }else{\n return false;\n }\n }",
"public function authorize(): bool\n {\n return auth('api')->check();\n }",
"public function authorize(): bool\n {\n return auth('api')->check();\n }",
"private function _checkAuth()\n {\n // check login or not\n if (!$this->getUser()->isAuthenticated()) {\n $this->redirect('login');\n }\n }",
"public function authorize()\n {\t//para ver si el usuario tiene acceso a este metodo\n //return false;\n return true;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->hasAnyRol([\n 'contractor-superadmin',\n 'contractor-manager',\n 'contractor-worker',\n 'contractor-admin',\n ]);\n }",
"public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }",
"public function authorize()\n {\n return Auth::user()->type == 1;\n }",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize(): bool\n {\n return MoonShineAuth::guard()->check();\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize() {\n // return \\Auth::check();\n // Allows all users in\n return true;\n }",
"public function authorize()\n {\n // return \\Auth::check();\n // Allows all users in\n return true;\n }",
"public function authorize()\n {\n // return \\Auth::check();\n // Allows all users in\n return true;\n }",
"public function authorize()\n {\n // return \\Auth::check();\n // Allows all users in\n return true;\n }",
"public function checkAccess()\n {\n if (!$this->isAuthenticated()) {\n header('HTTP/1.1 401 Unauthorized');\n exit();\n }\n }",
"public function authorize()\n {\n return auth('admin')->check();\n }",
"public function isAuthorized(){\n\t\t// Check that username is not empty and exists\n\t\t;return ($username = $_SERVER['PHP_AUTH_USER']) && array_key_exists($username, $this->users_pwds)\n\t\t// Check passord validity\n\t\t&& $this->users_pwds[$username] === $_SERVER['PHP_AUTH_PW']\n\t\t;\n\t}",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n\n $user = auth()->user();\n return ($user->hasRole(1)&&$user->hasStatus(3));\n }",
"public function authorize()\n\t{\n\t\t//return User::where('id', Auth::user()->id)->where('active', 1)->exists();\n\t\treturn true;\n\t}",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function checkUser()\n {\n $response = $this->di->get(\"response\");\n $user = $this->di->get(\"user\");\n\n if (!$user->isLoggedIn()) {\n $response->redirect(\"login\");\n }\n }",
"public function authorize()\n {\n $user = Sentinel::getUser();\n $admin = Sentinel::findRoleByName('Admin');\n if ( $user->inRole( $admin ) ) { //lets make sure its an admin\n return true;\n }\n return false;\n }",
"public function authUser(){\n if(!isset($this->sessionBool) || empty($this->sessionBool)){\n die($this->alerts->ACCESS_DENIED);\n }else{\n if(!$this->sessionBool){\n die($this->alerts->ACCESS_DENIED);\n }\n } \n }",
"private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }",
"public function isAuth() {}",
"protected function check_auth( )\n\t{\n\t\t$page = $this->uri->segment( 2);\n\t\t$section = $this->uri->segment(1);\t\t\n\t\t$function = $this->uri->segment(3);\n\t\t\n\t\tif( $section == 'api' and $page == 'users' and $function == 'login' )\n\t\t\treturn;\n\n\t\t$logged_in = $this->is_logged_in();\n\t\t$excused_uri = array('login' , 'recover_password' , 'auth_help' , 'token_login');\n\t\tif( ! $logged_in )\n\t\t{\n\t\t\t//if in app mode\n\t\t\tif( $this->_app_mode == 'json' and $section != 'admin' )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->output->set_status_header('401');\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//check if is login page\n\t\t\tif( $section == 'admin' and ( ! in_array($page, $excused_uri) ) )\n\t\t\t{\n\t\t\t\theader('Location: /admin/login');\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\treturn;\n\t}",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }"
] | [
"0.7900136",
"0.78684956",
"0.7711052",
"0.76828724",
"0.76721627",
"0.76721627",
"0.76720124",
"0.7655715",
"0.765273",
"0.765273",
"0.7617856",
"0.7617856",
"0.76150703",
"0.76146305",
"0.7608963",
"0.7603318",
"0.7601234",
"0.7601234",
"0.75969887",
"0.75825316",
"0.7564689",
"0.7562707",
"0.75601566",
"0.7554926",
"0.7550275",
"0.75397223",
"0.7539395",
"0.7532349",
"0.7528242",
"0.7526098",
"0.7514661",
"0.7496278",
"0.749604",
"0.7489216",
"0.74844456",
"0.747099",
"0.74703056",
"0.7460615",
"0.7460615",
"0.74602133",
"0.74600774",
"0.74565405",
"0.7448652",
"0.74471885",
"0.7445178",
"0.7445055",
"0.74419284",
"0.7439979",
"0.7436702",
"0.7427219",
"0.74251604",
"0.7420334",
"0.74184203",
"0.74172443",
"0.74148273",
"0.7411572",
"0.7410727",
"0.7409715",
"0.740667",
"0.7399952",
"0.73987436",
"0.73984987",
"0.7398403",
"0.7398403",
"0.7393267",
"0.73875326",
"0.73839146",
"0.7383395",
"0.7380641",
"0.7378362",
"0.7378209",
"0.73751277",
"0.7371434",
"0.73699814",
"0.73699814",
"0.73665684",
"0.73649484",
"0.73649484",
"0.73649484",
"0.7360099",
"0.73598593",
"0.7355874",
"0.7351373",
"0.73507726",
"0.73449844",
"0.7334463",
"0.73309803",
"0.73228216",
"0.73217505",
"0.73189056",
"0.7317538",
"0.73161525",
"0.73138255",
"0.7310643",
"0.7309507",
"0.73086244",
"0.73086244",
"0.73086244",
"0.73086244",
"0.73086244",
"0.73086244"
] | 0.0 | -1 |
Note: data could initialize from preDispatch | public function postAction() {
//197221680326345_425781560803688
$starttime = time();
$data['facebook_user_id'] = $this->_user->facebook_user_id;
$data['fanpage_id'] = $this->_getParam('fanpage_id');
$data['fanpage_name'] = $this->_getParam('fanpage_name');
$data['access_token'] = $this->_getParam('access_token');
//$data['post_id'] = $this->_getParam('post_id');
$data['message'] = $this->_getParam('message');
try{
$fancrankFB = new Service_FancrankFBService();
$params = array(
'message' => $data['message'],
'access_token' => $this->_user->facebook_user_access_token
);
$ret_obj = $fancrankFB->api('/'.$data['fanpage_id'].'/feed', 'POST',
$params);
Zend_Debug::dump($ret_obj);
$data['post_id'] = $ret_obj['id'];
$fanpageModel = new Model_Fanpages();
$fanpageAccessToken = $fanpageModel->getFanpageAccessToken($data['fanpage_id']);
$client = new Zend_Http_Client;
$client->setUri("https://graph.facebook.com/". $data['post_id']);
$client->setMethod(Zend_Http_Client::GET);
$client->setParameterGet('access_token', $fanpageAccessToken);
$response = $client->request();
$result = Zend_Json::decode($response->getBody(), Zend_Json::TYPE_OBJECT);
Zend_debug::dump($result);
if(!empty ($result)) {
$db = Zend_Db_Table::getDefaultAdapter();
// check response error from facebook graph api
$result = $this->facebookResponseCheck($result);
$db->beginTransaction();
$postModel = new Model_Posts();
$created = new Zend_Date(!empty($post->created_time) ? $post->created_time : null, Zend_Date::ISO_8601);
$updated = new Zend_Date(!empty($post->updated_time) ? $post->updated_time : null, Zend_Date::ISO_8601);
$row = array(
'post_id' => $result->id,
'facebook_user_id' => $result->from->id,
'fanpage_id' => $data['fanpage_id'],
'post_message' => isset($result->message) ? $postModel->quoteInto($result->message) : '',
'picture' => !empty($result->picture) ? $result->picture : '',
'link' => !empty($result->link) ? $result->link : '',
'post_type' => !empty($result->type) ? $result->type : '',
'status_type' => !empty($result->status_type) ? $result->status_type : '',
'post_description' => !empty($result->description) ? $postModel->quoteInto($result->description) : '',
'post_caption' => !empty($result->caption) ? $postModel->quoteInto($result->caption) : '',
'created_time' => $created->toString('yyyy-MM-dd HH:mm:ss'),
'updated_time' => $updated->toString('yyyy-MM-dd HH:mm:ss'),
'post_comments_count' => !empty($result->comments->count) ? $result->comments->count : 0,
'post_likes_count' => isset($result->likes) && isset($result->likes->count) ? $result->likes->count : 0
);
if (property_exists($result, 'application') && isset($result->application->id)) {
$row['post_application_id'] = $result->application->id;
$row['post_application_name'] = empty($result->application->name) ? null : $result->application->name;
} else {
$row['post_application_id'] = null;
$row['post_application_name'] = null;
}
try {
// retrieve fanpage setting
$fanpageSettingModel = new Model_FanpageSetting();
$settingData = $fanpageSettingModel->findRow($data['fanpage_id']);
if(!$settingData) {
$settingData = $fanpageSettingModel->getDefaultSetting();
}else {
$settingData = $settingData->toArray();
}
// insert new post into database
$postModel->insert($row);
// if none admin post, apply point rule to post
if($data['fanpage_id'] != $result->from->id) {
// add activity into database
$this->addactivity('post-'.$row['post_type'], $data['post_id'],
$data['fanpage_id'],$data['fanpage_id'], $data['fanpage_name'],$row['post_message'] );
// update fan data
$fan = new Model_Fans($data['facebook_user_id'], $data['fanpage_id']);
$fan->updateFanPoints($settingData['point_post_normal']);
$fan->updateFanProfile();
// update fan stat
$fanstat = new Model_FansObjectsStats();
switch($row['post_type']){
case 'status':
$fanstat ->addPostStatus($data['fanpage_id'], $data['facebook_user_id']);
break;
case 'photo':
$fanstat->addPostPhoto($data['fanpage_id'], $data['facebook_user_id']);
break;
case 'video':
$fanstat->addPostVideo($data['fanpage_id'], $data['facebook_user_id']);
break;
case 'link':
$fanstat->addPostLink($data['fanpage_id'], $data['facebook_user_id']);
break;
}
// update point data
$pointLog = array();
$pointLog['fanpage_id'] = $data['fanpage_id'];
$pointLog['facebook_user_id'] = $data['facebook_user_id'];
$pointLog['object_id'] = $data['post_id'];
$pointLog['object_type'] = 'posts';
$pointLog['giving_points'] = $settingData['point_post_normal'];
$pointLog['note'] = 'post on fanpage';
$pointLogModel = new Model_PointLog();
$result = $pointLogModel->insert($pointLog);
}else {
$this->addactivity('post-'.$row['post_type'], $data['post_id'],
$data['fanpage_id'],$data['fanpage_id'], $data['fanpage_name'],$row['post_message'] );
}
// commit all update
$db->commit();
$db->closeConnection();
} catch (Exception $e) {
$db->rollBack();
$db->closeConnection();
print $e->getMessage();
$appLogger = Zend_Registry::get('appLog');
$appLogger->log(sprintf('Unable to save post %s from fanpage %s to database. Error Message: %s ', $post->id,$data['fanpage_id'], $e->getMessage()), Zend_log::ERR);
return;
}
}
//return $result;
} catch (Exception $e){
echo $e;
$appLogger = Zend_Registry::get('appLog');
$appLogger->log(sprintf('Unable to save post from fanpage %s to database. Error Message: %s ', $data['fanpage_id'], $e->getMessage()), Zend_log::ERR);
}
echo '<br/>' .time() - $starttime . 'sec';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function preDispatch() {\n\t\t\n\t\t}",
"public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->data = $this->data['value'];\r\r\n }\r\r\n }",
"public function preDispatch() { }",
"public function postDispatch()\n {\n parent::postDispatch();\n\n $this->getRequestData();\n }",
"public function preDispatch();",
"public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}",
"private function initData()\n {\n $data = $this->cache->load($this->cacheId);\n if (false === $data) {\n /** @var Reader $reader */\n $reader = $this->readerFactory->create(\n ['fileName' => sprintf(self::SEARCH_PATTERN, $this->componentName)]\n );\n $data = $reader->read();\n $this->cache->save($this->serializer->serialize($data), $this->cacheId);\n } else {\n $data = $this->serializer->unserialize($data);\n }\n\n if (!empty($data)) {\n $this->data[$this->componentName] = [Converter::DATA_ATTRIBUTES_KEY => ['name' => $this->componentName]];\n $this->merge([$this->componentName => $data]);\n $this->data = $this->evaluateComponentArguments($this->data);\n }\n }",
"public function preDispatch()\n {\n\n }",
"public function preDispatch()\n {\n //...\n }",
"public function initialize()\n\t{\n\t\t$this->data = new stdClass();\n\t}",
"public function initialize()\n {\n $this->data = new stdClass();\n }",
"public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }",
"function init() {\n\t\t$this->processIncomingData();\n\t}",
"function preDispatch()\n {\n\n }",
"public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are srings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }",
"public function __before() {\n\t\t// runs after this->data is set up, but before the class methods are run\n\t}",
"function __construct()\n {\n $this->_data = array();\n }",
"protected function beforeGetData()\n {\n\n }",
"abstract protected function data();",
"protected function preprocessData() {}",
"function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}",
"private function cObjData_init()\n {\n // Make a backup\n $this->cObjDataBak = $this->pObj->cObj->data;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData )\n {\n $prompt = implode( ', ', array_keys( $this->pObj->cObj->data ) );\n $prompt = 'cObj-data had this elements: ' . $prompt;\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n // Remove all data\n $this->pObj->cObj->data = null;\n\n // Add mode and view\n $this->pObj->cObj->data[ $this->pObj->prefixId . '.mode' ] = $this->pObj->piVar_mode;\n $this->pObj->cObj->data[ $this->pObj->prefixId . '.view' ] = $this->pObj->view;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData )\n {\n $prompt = 'Init - cObj->data has now this elements: ' . implode( ', ', array_keys( $this->pObj->cObj->data ) );\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n }\n // DRS\n }",
"function __data() {\n\t\tif ($data = $this->Session->read('data')) {\n\t\t\tforeach ($data as $k => $i) {\n\t\t\t\t$obj = ClassRegistry::init($k);\n\t\t\t\t$this->data[$k] = $i;\n\t\t\t}\n\t\t\t$this->Session->write('data', null);\n\t\t}\n\t\t// attempts to remember identity of commentor and prefill fields\n\t\tif (empty($this->data['Comment']) && $data = $this->Cookie->read('CommentUser')) {\n\t\t\t$this->data['Comment'] = $data;\n\t\t}\n\t}",
"function initData() {\n\t\t$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO');\n\t\t$navigationMenuItem = $navigationMenuItemDao->getById($this->navigationMenuItemId);\n\n\t\tif ($navigationMenuItem) {\n\t\t\t$this->_data = array(\n\t\t\t\t'path' => $navigationMenuItem->getPath(),\n\t\t\t\t'title' => $navigationMenuItem->getTitle(null),\n\t\t\t\t'url' => $navigationMenuItem->getUrl(),\n\t\t\t\t'menuItemType' => $navigationMenuItem->getType(),\n\t\t\t);\n\t\t\t$this->setData('content', $navigationMenuItem->getContent(null)); // Localized\n\t\t} \n\t}",
"public function doProcessData() {}",
"public function _construct(){\n\t\treturn $this->data;\n\t}",
"public function _construct(){\n\t\treturn $this->data;\n\t}",
"function getDataFromRequest( &$data ) {\n\n\t\t$requestVar = KRequest::getInt($this->propertyName, NULL);\n\n\t\tif (empty($requestVar)) {\n\t\t\t$data->{$this->propertyName} = NULL;\n\t\t}\n\t\telse {\n\t\t\t$data->{$this->propertyName} = $requestVar;\n\t\t}\n\n\t}",
"public function processData() {}",
"public function init() {\n extract($this->data);\n\n // Generate unique ID\n $this->data['id'] = uniqid();\n }",
"function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}",
"public function compileData(): void\n {\n $data = [];\n\n if ($this->expectsPayload) {\n $data = $this->payload->getData();\n\n if ($this->payload->expectsMessage()) {\n $this->level = $this->payload->getLevel();\n $this->message = $this->payload->getMessage();\n\n $data['flash'] = [\n $this->level => $this->message,\n ];\n }\n }\n\n $data['breadcrumbs'] = app('breadcrumbs')->render();\n\n $this->data = $data;\n\n $this->route = Route::has($this->payload->getRoute())\n ? route($this->payload->getRoute())\n : $this->payload->getRoute();\n }",
"public function preStoreActions($data)\n {\n return $data;\n }",
"protected function setGetData()\n\t{\n\t\t$this->request->addParams($this->query->getParams());\n\t}",
"private function dataInit($data) {\n\n\t\t\t//Default From\n\t\t\t$data['from']\t\t= empty($data['from']) ? $this->default['from'] : $data['from'];\n\t\t\t$data['complaint']\t= empty($data['complaint']) ? $this->default['returnPath'] : $data['complaint'];\n\t\t\t$data['reply']\t\t= empty($data['reply']) ? array($this->default['returnPath']) : $data['reply'];\n\t\t\t$data['cc']\t\t\t= empty($data['cc']) ? array() : $data['cc'];\n\t\t\t$data['bcc']\t\t= empty($data['bcc']) ? array() : $data['bcc'];\n\t\t\treturn $data;\n\t\t}",
"protected function init()\n {\n $classParser = $this->getContainer()->get('classParser');\n $classParser->setAllowedMethods( array($this->allowedMethod) );\n $this->data = $classParser->getData($this->paths, $this->cacheFile);\n }",
"public function initData()\n {\n $this->appliedNumberingData = array();\n $this->currHyperlink = null;\n }",
"public function initData()\n {\n $this->member = new WMember(Base::parIndex());\n $this->client = $this->member->getClient();\n if (!$this->client)\n {\n $this->client = new WClient(Base::parIndex());\n $this->member = null;\n }\n }",
"public function init( $data ){\n\t\t\t\n\t\t\t$this->data = $data;\n\t\t\t\n\t\t\t//If first position array entry is init?\n\t\t\t$action = key( $data );\n\t\t\t\n\t\t\tif( ( strpos( $action, 'action' ) === 0 ) && !empty( $data[ $action ] ) ){\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t$this->action = $data[ $action ];\n\t\t\t\t\n\t\t\t\t$isset = $this->set();\n\t\t\t\t\t\t\t\n\t\t\t\t//Is Data Valid, more checks? \n\t\t\t\tif( $isset )\n\t\t\t\t\t$this->valid = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//return false;\n\t\t}",
"protected static function getData()\n {\n }",
"public function __construct($data){\r\n $this->data = $data;\r\n }",
"public function postLoad() {}",
"public function __construct($data) { \n foreach ($data as $key => $value) {\n if (array_key_exists($key, $this->data)) $this->data[$key] = $value;\n }\n}",
"public function __construct($data)\n {\n //\n $this->data = $data;\n }",
"public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}",
"protected function _initData($data)\n {\n switch (gettype($data)) {\n case 'object':\n if ($data instanceof ZendX_AbstractBean) {\n $this->_rawStructure = $data;\n }\n break;\n case 'array':\n $this->_rawStructure = new ZendX_View_Facade_Iterator($data, $this->_view);\n break;\n }\n \n if (null === $this->_rawStructure) {\n $this->_rawStructure = new ZendX_View_Facade_Iterator(null, $this->_view);\n }\n }",
"function __construct($data){\n\t $this->data=$data;\n }",
"public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }",
"protected function prepareAssignCatActionData()\n {\n foreach ($this->_data as $key => $value) {\n switch ($key) {\n case 'urlPath':\n $this->_urlPath = $value;\n break;\n case 'paramName':\n $this->_paramName = $value;\n break;\n default:\n $this->_additionalData[$key] = $value;\n break;\n }\n }\n }",
"protected function getData() { }",
"public function __construct()\n {\n $this->data = new DataController();\n }",
"function _initData()\r\n\t{\r\n\t\t// Lets load the content if it doesn't already exist\r\n\t\tif (empty($this->_data))\r\n\t\t{\r\n\t\t\t$event = new stdClass();\r\n\t\t\t$event->id\t\t\t\t\t= 0;\r\n\t\t\t$event->locid\t\t\t\t= 0;\r\n\t\t\t$event->catsid\t\t\t\t= 0;\r\n\t\t\t$event->dates\t\t\t\t= null;\r\n\t\t\t$event->enddates\t\t\t= null;\r\n\t\t\t$event->times\t\t\t\t= null;\r\n\t\t\t$event->endtimes\t\t\t= null;\r\n\t\t\t$event->title\t\t\t\t= null;\r\n\t\t\t$event->alias\t\t\t\t= null;\r\n\t\t\t$event->created\t\t\t\t= null;\r\n\t\t\t$event->author_ip\t\t\t= null;\r\n\t\t\t$event->created_by\t\t\t= null;\r\n\t\t\t$event->published\t\t\t= 1;\r\n\t\t\t$event->registra\t\t\t= 0;\r\n\t\t\t$event->unregistra\t\t\t= 0;\r\n\t\t\t$event->datdescription\t\t= null;\r\n\t\t\t$event->meta_keywords\t\t= null;\r\n\t\t\t$event->meta_description\t= null;\r\n\t\t\t$event->recurrence_number\t= 0;\r\n\t\t\t$event->recurrence_type\t\t= 0;\r\n\t\t\t$event->recurrence_counter\t= '0000-00-00';\r\n\t\t\t$event->datimage\t\t\t= JText::_('SELECTIMAGE');\r\n\t\t\t$event->venue\t\t\t\t= JText::_('SELECTVENUE');\r\n\t\t\t$this->_data\t\t\t\t= $event;\r\n\t\t\treturn (boolean) $this->_data;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"abstract public function prepareData();",
"public function __construct()\n {\n // Setup internal data arrays\n self::internals();\n }",
"private function init() {\n $apiParts = $this->request->getApiParts();\n $this->requestedId = array_shift($apiParts);\n $this->apiParts = $apiParts;\n \n $this->siteDriver = Datastore::getSiteDriver();\n }",
"public function __construct($data)\n {\n $this->_data = $data;\n }",
"public function __construct($data)\n {\n $this->_data = $data;\n }",
"public function postLoad() { }",
"public function __construct($data)\n {\n $this->all_data = $data;\n }",
"private function _beforeLoad($data)\n {\n $data['update_at']= date('Y-m-d h:i:s',time());\n\n if(isset($data['authors'])) {\n $data['authors'] = implode(',', $data['authors']);\n }\n\n return $data;\n }",
"protected function populateDatastreamInfo() {\n $this->datastreamHistory = $this->getDatastreamHistory();\n $this->datastreamInfo = $this->datastreamHistory[0];\n }",
"public function __construct($data)\n {\n }",
"public function __construct($data)\n {\n }",
"protected abstract function handleData();",
"public function __construct($data)\n {\n }",
"public function __construct($data)\n {\n }",
"function initData($args, &$request) {\n\t\t$press =& $request->getPress();\n\n\t\t$divisionDao =& DAORegistry::getDAO('DivisionDAO');\n\t\t$seriesDao =& DAORegistry::getDAO('SeriesDAO');\n\n\t\t$divisions =& $divisionDao->getByPressId($press->getId());\n\n\t\t$divisionsArray = array();\n\t\twhile ($division =& $divisions->next()) {\n\t\t\t$divisionsArray[] = array('id' => $division->getId(), 'title' => $division->getLocalizedTitle());\n\t\t\tunset($division);\n\t\t}\n\n\t\tif($this->seriesId) {\n\t\t\t$series =& $seriesDao->getById($this->seriesId);\n\t\t}\n\n\t\tif (isset($series) ) {\n\t\t\t$this->_data = array(\n\t\t\t\t'seriesId' => $this->seriesId,\n\t\t\t\t'title' => $series->getTitle(null),\n\t\t\t\t'divisions' => $divisionsArray,\n\t\t\t\t'currentDivision' => $series->getDivisionId(),\n\t\t\t\t'affiliation' => $series->getAffiliation(null)\n\t\t\t);\n\t\t} else {\n\t\t\t$this->_data = array(\n\t\t\t\t'title' => '',\n\t\t\t\t'divisions' => $divisionsArray,\n\t\t\t\t'affiliation' => ''\n\t\t\t);\n\t\t}\n\n\t\t// grid related data\n\t\t$this->_data['gridId'] = $args['gridId'];\n\t\t$this->_data['rowId'] = isset($args['rowId']) ? $args['rowId'] : null;\n\t}",
"private function __construct() {\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\n $this->data = $_GET;\n } else {\n if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {\n $contentType = $_SERVER['HTTP_CONTENT_TYPE'];\n if (strpos($contentType, ';') !== false) {\n $split = explode(';', $contentType);\n $contentType = trim($split[0]);\n $enc = trim($split[1]);\n }\n if ($contentType == 'application/x-www-form-urlencoded') {\n $this->data = $_POST;\n } else if ($contentType == 'application/json') {\n $json = file_get_contents('php://input');\n $this->data = json_decode($json, true);\n }\n }\n }\n if (strpos($_SERVER['REQUEST_URI'], '/api/') === 0) {\n $this->route = explode('/', $_SERVER['REQUEST_URI']);\n }\n }",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"function initData() {\n\t\tif (isset($this->journalId)) {\n\t\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\t\t\t$journal =& $journalDao->getById($this->journalId);\n\n\t\t\tif ($journal != null) {\n\t\t\t\t$this->_data = array(\n\t\t\t\t\t'title' => $journal->getSetting('title', null), // Localized\n\t\t\t\t\t'description' => $journal->getSetting('description', null), // Localized\n\t\t\t\t\t'journalPath' => $journal->getPath(),\n\t\t\t\t\t'enabled' => $journal->getEnabled()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->journalId = null;\n\t\t\t}\n\t\t}\n\t\tif (!isset($this->journalId)) {\n\t\t\t$this->_data = array(\n\t\t\t\t'enabled' => 1\n\t\t\t);\n\t\t}\n\t}",
"protected function preProcessRecordData(&$data)\n {\n }",
"private function initGraph(Collection $data) : void\n {\n $initStart = $this->getInitStart($data);\n $this->start = $initStart['container_id'];\n $this->accumulateProductTypes = $initStart['type_id'];\n $this->containers = collect($this->start);\n $this->data = $data;\n $this->calculateCost();\n }",
"protected function _preload() {\n }",
"public function beforeStore($data){ }",
"public function __construct( $data ){\n\t\t\t\n\t\t\t$this->init( $data );\n\t\t}",
"function initData() {\t\n\t\tif (isset($this->registrationId)) {\n\t\t\t$registrationOptionDao =& DAORegistry::getDAO('RegistrationOptionDAO');\n\t\t\t$registrationDao =& DAORegistry::getDAO('RegistrationDAO');\n\t\t\t$registration =& $registrationDao->getRegistration($this->registrationId);\n \n $registrationTypeDao =& DAORegistry::getDAO('RegistrationTypeDAO');\n $registrationType =& $registrationTypeDao->getRegistrationType($registration->getTypeId());\n $surveyConfig = $registrationType->getLocalizedData(\"survey\");\n\n\t\t\tif ($registration != null) {\n\t\t\t\t$this->_data = array(\n\t\t\t\t\t'userId' => $registration->getUserId(),\n\t\t\t\t\t'typeId' => $registration->getTypeId(),\n\t\t\t\t\t'membership' => $registration->getMembership(),\n\t\t\t\t\t'domain' => $registration->getDomain(),\n\t\t\t\t\t'ipRange' => $registration->getIPRange(),\n 'applicationForm' => $registration->getApplicationForm(),\n 'surveyConfig' => $surveyConfig,\n 'survey' => $registration->getSurvey(),\n\t\t\t\t\t'specialRequests' => $registration->getSpecialRequests(),\n\t\t\t\t\t'datePaid' => $registration->getDatePaid(),\n\t\t\t\t\t'registrationOptionIds' => $registrationOptionDao->getRegistrationOptions($this->registrationId)\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->registrationId = null;\n\t\t\t}\n\t\t}\n\t}",
"public function __construct ($data)\n {\n $this->_data = $data;\n }",
"public function __construct($data) {\n $this->data = $data;\n }",
"protected function preProcess() {}",
"public function preRetrieve();",
"public function handleData();",
"public function __construct($data)\n {\n $this->data = $data;\n }",
"public function preDispatch()\r\n {\r\n $this->View()->setScope(Enlight_Template_Manager::SCOPE_PARENT);\r\n\r\n $this->View()->sUserLoggedIn = $this->admin->sCheckUser();\r\n $this->View()->sUserData = $this->getUserData();\r\n }",
"protected function init() {\n switch ($this->requestType) {\n case 'get':\n $this->getData();\n break;\n\t\t\t\t\n\t\t\tcase 'sendTesteEmail':\n $this->sendTesteEmail();\n break;\n\t\t\t\t\n\t\t\tcase 'sendCreatedIndicationEmail':\n $this->sendCreatedIndicationEmail();\n break;\n }\n }",
"public function __construct($data)\n {\n $this->data = $data;\n }",
"public function __construct($data)\n {\n // notice it's not included in the \"toArray\" method.\n $this->instance = $data['instance'];\n $this->id = $data['id'];\n $this->dom = $data['dom'];\n $this->data = $data['data'];\n $this->name = $data['name'];\n $this->checksum = $data['checksum'];\n $this->children = $data['children'];\n $this->events = $data['events'];\n }",
"protected function prepareData()\n {\n parent::prepareData();\n $this->prepareConfigurableProductOptions();\n $this->prepareAttributeSet();\n }",
"public function init()\n {\n \t// Get filter form\n \t$filters = $this->_dataGrid->getFilter();\n \t\n \t// If send post request, inject into session\n \tif ($this->_dataGrid->getRequest()->isPost())\n \t{\n \t\t$this->_dataGrid->getSession()->filters = $this->_dataGrid->getRequest()->getPost();\n \t}\n \t \n \t// Get valid datas\n \tif ($this->_dataGrid->getSession()->filters)\n \t{\n \t\t$validDatas = $filters->getValidValues((array) $this->_dataGrid->getSession()->filters);\n \t\t$validDatas = isset($validDatas[$this->_dataGrid->getGridId()]['filter']) ? $validDatas[$this->_dataGrid->getGridId()]['filter'] : array();\n \t\t$this->_validDatas = array_filter($validDatas, 'count');\n \t}\n }",
"public function pre_dispatch()\n\t{\n\t\t$this->_memID = currentMemberID();\n\t\t$this->_profile = MembersList::get($this->_memID);\n\t}",
"public function __construct()\n\t{\n\t\t$this->data = \\json_decode(\\file_get_contents('php://input'), true);\n\t}"
] | [
"0.66408956",
"0.66198885",
"0.660924",
"0.6602933",
"0.6555129",
"0.6525035",
"0.6461326",
"0.64545405",
"0.64011914",
"0.63908345",
"0.63763577",
"0.6352918",
"0.633062",
"0.6323182",
"0.6253072",
"0.6224948",
"0.6203702",
"0.618554",
"0.6182026",
"0.6171962",
"0.61441904",
"0.61164623",
"0.60888517",
"0.6086799",
"0.6079548",
"0.6058782",
"0.6058782",
"0.6026324",
"0.6017748",
"0.599875",
"0.59763193",
"0.59437734",
"0.58923954",
"0.5886871",
"0.58843166",
"0.58594006",
"0.58485466",
"0.5848511",
"0.58148855",
"0.5812757",
"0.5803779",
"0.57928884",
"0.57804024",
"0.577835",
"0.5774389",
"0.5769405",
"0.5767264",
"0.5763094",
"0.57476884",
"0.57371044",
"0.57352066",
"0.5729888",
"0.57268184",
"0.5722493",
"0.5717266",
"0.5712261",
"0.5712261",
"0.5705467",
"0.5693913",
"0.5691176",
"0.5687531",
"0.56871665",
"0.56871665",
"0.56863356",
"0.5686309",
"0.5686309",
"0.5685688",
"0.5678089",
"0.5676753",
"0.5676753",
"0.5676753",
"0.5676753",
"0.567603",
"0.567603",
"0.567603",
"0.567603",
"0.567603",
"0.567603",
"0.5675756",
"0.5675756",
"0.5671678",
"0.5669794",
"0.56678593",
"0.56594056",
"0.56569105",
"0.5656451",
"0.5647782",
"0.56462663",
"0.56447035",
"0.5642344",
"0.5638469",
"0.5634657",
"0.563089",
"0.56294346",
"0.56153667",
"0.56120855",
"0.5606875",
"0.56040883",
"0.5598008",
"0.5593885",
"0.5581153"
] | 0.0 | -1 |