query
stringlengths 10
8.11k
| document
stringlengths 17
398k
| negatives
sequencelengths 19
20
| metadata
dict |
---|---|---|---|
accessor method for PlayerName | public function getPlayerName() {
return $this->playerName;
} | [
"public function getPlayerName() {\n return($this->name);\n }",
"public function getPlayerName(): string\n {\n return $this->playerName;\n }",
"public function getPlayerName()\n {\n return $this->player_name;\n }",
"public function getPlayerName()\n {\n return $this->playerName;\n }",
"public function getPlayerName()\n {\n return $this->get(self::_PLAYER_NAME);\n }",
"public function getPlayerNameAttribute()\n {\n $player = $this->players->first();\n\n return $player ? $player->name : '';\n }",
"protected function getCurrentPlayerName()\n {\n }",
"public function getname()\r\n {\r\n \r\n if($this->idol)\r\n {\r\n return $this->idol->getSlug();\r\n \r\n }else return $this->playername;\r\n \r\n return $this->half;\r\n }",
"public function getPlayer(): string {\n\t\treturn $this->player;\n\t}",
"public function getPlayerNewname()\n {\n return $this->player_newname;\n }",
"static public function iName($player) {\n\t\tif ($player instanceof Player) {\n\t\t\t$player = strtolower($player->getName());\n\t\t}\n\t\treturn $player;\n\t}",
"public function GetMember2Name(){\n $player = Player::where('id', $this->member2Id)->firstOrFail();\n\n $player2Name = $player->name;\n\n return $player2Name;\n }",
"abstract public function getGameName ();",
"public function setPlayerName($value)\n {\n return $this->set(self::_PLAYER_NAME, $value);\n }",
"public function getNameKeyAttribute()\n {\n return $this->player ?\n $this->player->name_key :\n null;\n }",
"public function getName(){\r\n \t\treturn $this->teamname;\r\n \t}",
"public function getGameName()\n {\n return $this->gameName;\n }",
"public function get_base_name(){\n return $this->get_info('player_base_name');\n }",
"public function getEnemyName(): string {\n return $this->monster['name'];\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/$inputType; $num = ""; | function inputID($str){
$str = "";
return $str;
/*$inputType = 'inputOf:'.$str;
$num = substr($inputType,0,8);
//if(is_int($num)==TRUE){
return $num;*/
//}
} | [
"function numOut($input)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($input == 0){\r\n\t\t\t\t\t\t\t$output = 'N/A';\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$output = $input;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn $output;\r\n\t\t\t\t\t}",
"private function initVarTypeNum()\n {\n // Get the typeNum from the current URL parameters\n $typeNum = ( int ) t3lib_div::_GP( 'type' );\n\n // Check the proper typeNum\n switch ( true )\n {\n case( $typeNum == $this->pObj->conf[ 'export.' ][ 'map.' ][ 'page.' ][ 'typeNum' ] ) :\n // Given typeNum is the internal typeNum for CSV export\n $this->int_typeNum = $typeNum;\n $this->str_typeNum = 'map';\n break;\n default :\n // Given typeNum isn't the internal typeNum for CSV export\n $this->str_typeNum = 'undefined';\n }\n // Check the proper typeNum\n\n return;\n }",
"public static function validateUserInput($input,$type=\"\",$default=\"0\"){\n switch($type){\n\n case \"numeric\";\n return (is_numeric($input))?$input:$default;\n \tbreak;\n\n }\n\n return $input;\n}",
"function input_number_post($feldname, $werte, $label = 'Eingabe', $min = '0', $max = '99999', $step = '1')\r\n {?>\r\n <label for=\"<?php print \"$feldname\";?>\"><?php print \"$label\";?></label>\r\n <input type=\"number\" name=\"<?php print \"$feldname\";?>\" id=\"<?php print \"$feldname\";?>\" value=\"<?php print htmlspecialchars(substr($werte[$feldname],0,300),ENT_QUOTES,'UTF-8');?>\" inputmode=\"numeric\" min=\"<?php print \"$min\";?>\" max=\"<?php print \"$max\";?>\">\r\n<?php\r\n}",
"public function number() {\n\t\t$html = $this->initial;\n\t\t$html .= '<input name=\"'.$this->value['id'].'\" type=\"number\" value=\"';\n\t\tif ($this->meta != \"\")\n\t\t\t$html .= $this->meta;\n\t\t$html .= '\" placeholder=\"'.$this->value['std'].'\" ';\n\t\tif(isset($this->value['required']))\n\t\t\t$html .= 'required data-required=\"true\"';\n\t\t$html .= ' />';\n\t\t$html .= $this->finish;\n\t\techo $html;\n\t}",
"public function takingnuminput()\n {\n fscanf(STDIN, \"%s\\n\",$num);\n while((Utility::validating_float($num)))\n {\n echo \"Warning :the num should not be decimal and it should not contain char\\n\";\n fscanf(STDIN, \"%s\\n\",$num);\n\n }\n return $num;\n }",
"function placeholder_number()\n{\n return strval(123);\n}",
"protected function pnumber()\n {\n }",
"function ots_number($args) {\n\t\t\t$name = esc_attr( $args['name'] );\n\t\t\t$title = esc_attr( $args['title']);\n\t\t\t$value = esc_attr( $args['value'] );\n\t\t\t$default = esc_attr( $args['default']);\n\t\t\tif ($value != '') {\n\t\t\t\t$value = esc_attr( $args['value'] );\n\t\t\t} else {\n\t\t\t\t$value = esc_attr($args['default']);\n\t\t\t}\n\t\t\techo '<input type=\"number\" name=\"'.$name.'\" step=\"1\" min=\"0\" id=\"'.$name.'\" value=\"'.$value.'\" class=\"small-text\">';\n\t\t\techo ' '.$args['help'];\n\t\t}",
"function canvas_sanitize_number( $input ) {\n if (isset( $input ) && is_numeric( $input )) {\n return $input;\n }\n}",
"function setupQuestion($row){\r\n echo $row[\"q_number\"].\") \".$row[\"q_text\"].\" \";\r\n echo \"<input type='number' maxlength='6' size='6' id='Q\".$row[\"q_number\"].\"' name='Q\".$row[\"q_number\"].\"'> <br><br>\";\r\n}",
"function getValidNumber($tParam,$tLength){\r\n\r\n $tParam .= \"\";// 0을 \"\"와 비교하면 true가 되서, 0입력값이 사라지는 버그 존재하여 0 . \"\"로 처리함.\r\n\r\n $tParam = str_replace(\",\",\"\",$tParam); //콤마(,)는 제거\r\n if($tParam == \"\"){\r\n return \"\";\r\n }else if(strlen($tParam) > $tLength){\r\n\r\n $printParam = $tParam;\r\n if(strlen($tParam) > 50)$printParam = substr($printParam,0,48) . \"..\";\r\n\r\n JsonMsg(\"500\",\"500\",\"[reqPostNumber] \" . $printParam . \" is over length (\" . strlen($tParam) . \" > \" . $tLength . \").\");\r\n }else if(is_numeric($tParam)){\r\n return $tParam;\r\n }else{\r\n JsonMsg(\"500\",\"500\",\"[reqPostNumber] \" . $printParam . \" is not number.\");\r\n }\r\n\r\n}",
"public function typeNum()\n {\n $cls = $this->ext . strtoupper( bcDB::resource( 'EXTENSION' ) );\n $cls::$FETCH_TYPE = 'num';\n }",
"function form_digits($varname, $default = FALSE) {\n\treturn form_preg(\"/^[0-9]+$/\",$varname, $default);\n}",
"function settings_int_validation($input) {\n\t\treturn is_numeric($input) ? (int) $input : 0;\n\t}",
"function _parser_prepare_field_number_integer(&$result, $field_info, $field_instance, $entity, $job, $base_url) {\n if (!is_integer($result)) {\n $result = trim($result);\n $result = (int)$result;\n }\n}",
"function parseInput($input) {\n return ( (trim($input)!=\"\" ? $input : 0 ) );\n}",
"function reqPostNumber($tParam,$tLength){\r\n\tglobal $_POST;\r\n return getValidNumber($_POST[$tParam],$tLength);\r\n}",
"static function add_num(): void {\r\n self::add_acf_field(self::num, [\r\n 'label' => 'Volume number',\r\n 'type' => 'number',\r\n 'instructions' => 'e.g. Volume 1 was 1974/75.',\r\n 'required' => 1,\r\n 'conditional_logic' => 0,\r\n 'wrapper' => [\r\n 'width' => '15',\r\n 'class' => '',\r\n 'id' => '',\r\n ],\r\n 'default_value' => '',\r\n 'placeholder' => '',\r\n 'prepend' => '',\r\n 'append' => '',\r\n 'min' => 1,\r\n 'max' => '',\r\n 'step' => 1,\r\n ]);\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / The completion value of the launch / | public function getCompletion()
{
return $this->_completion;
} | [
"public function getCompletion()\n {\n return $this->completion;\n }",
"public static function set_activity_completion_returns() {\n return new external_value(PARAM_BOOL, 'Completion status');\n }",
"public static function create_core_completion_returns() {\n return new external_value(PARAM_BOOL, 'True if the update was successful.');\n }",
"public function getCompletionInfo()\n {\n return $this->completion_info;\n }",
"public static function create_completion_returns() {\n return new external_value(PARAM_BOOL, 'True if the update was successful.');\n }",
"public function getFinish()\n {\n return $this->finish;\n }",
"public function getLastCompletionResult()\n {\n return $this->last_completion_result;\n }",
"public function getLastCompletion() {\n\t\treturn $this->lastCompletion;\n\t}",
"public function launch_ok()\n {\n static $launch_status = null;\n\n if ( null === $launch_status ) {\n $avail_imgopt = $this->options['availabilities']['extra_imgopt'];\n $magic_number = intval( substr( md5( parse_url( AUTOPTIMIZE_WP_SITE_URL, PHP_URL_HOST ) ), 0, 3 ), 16 );\n $has_launched = autoptimizeOptionWrapper::get_option( 'autoptimize_imgopt_launched', '' );\n $launch_status = false;\n if ( $has_launched || ( is_array( $avail_imgopt ) && array_key_exists( 'launch-threshold', $avail_imgopt ) && $magic_number < $avail_imgopt['launch-threshold'] ) ) {\n $launch_status = true;\n if ( ! $has_launched ) {\n autoptimizeOptionWrapper::update_option( 'autoptimize_imgopt_launched', 'on' );\n }\n }\n }\n\n return $launch_status;\n }",
"public function complete_job() {\n\t\t$this->completed ++;\n\t}",
"public function getInstallationProgress();",
"function complete() \n {\n if (!($this->activity->isInteractive()))\n {\n $this->error[] = tra('interactive activities should not call the complete() method');\n return false;\n }\n \n return $this->instance->complete($this->activity_id);\n }",
"public function InstallFinished() {}",
"public function runSuccess();",
"public function getComplete()\n {\n return $this->complete;\n }",
"protected function completeProcessInstance()\n {\n return $this->fireEvent('Completed');\n }",
"public function exitValue(): int { return $this->exitv; }",
"public function getDone()\n {\n return $this->get(self::DONE);\n }",
"public function getValidateAppCompletion()\n {\n return $this->validateAppCompletion;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setStoragePidsToRepositories > Use this function in extending classes to set the given PID(s) to one or more repositories toDo: Other idea: Instead set PIDs so certain repositories, maybe set global to the Extbase repo for ALL repositories? | public function setStoragePidsToRepositories(): void
{
// override and fill this inside your class
// Example: $this->feUserRepository->setStoragePids($this->getStoragePids());
} | [
"abstract public function initRepositories();",
"private function setupRepositories()\n {\n /** @var Config $config */\n $config = $this->container->get('config');\n\n foreach ($config->getRepositories() as $type => $data) {\n if (!in_array($type, $this->supportedRepositories)) {\n continue;\n }\n\n $this->createSubRepositories($type, $data);\n }\n }",
"protected function setRepository()\n {\n $this->repository = $this->_container()->get('pi_app_admin.repository');\n }",
"abstract public function getStoragePids();",
"private function registerRepositories()\n {\n $this['repository.book'] = $this->share(function () {\n return new \\Cops\\Core\\Entity\\Book\\EditableBookRepository;\n });\n\n $this['repository.author'] = $this->share(function ($c) {\n return new \\Cops\\Core\\Entity\\AuthorRepository($c['string-utils']);\n });\n\n $this['repository.serie'] = $this->share(function ($c) {\n return new \\Cops\\Core\\Entity\\SerieRepository($c['string-utils']);\n });\n\n $this['repository.tag'] = $this->share(function () {\n return new \\Cops\\Core\\Entity\\TagRepository;\n });\n\n $this['repository.bookfile'] = $this->share(function () {\n return new \\Cops\\Core\\Entity\\BookFile\\BookFileRepository;\n });\n\n $this['repository.user'] = $this->share(function () {\n return new \\Cops\\Core\\Entity\\UserRepository;\n });\n\n $this['repository.user-book'] = $this->share(function ($c) {\n return new \\Cops\\Core\\Entity\\UserBookRepository($c['config']);\n });\n\n $this['repository.calibre-util'] = $this->share(function () {\n return new \\Cops\\Core\\Calibre\\UtilRepository;\n });\n\n return $this;\n }",
"protected function storagePidFallback()\n {\n $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK,\n 'operations',\n 'operations_pi1'\n );\n\n // Storage PID in plugin data (tt_content->pages) overrides storagePid from TypoScript\n if ($configuration['persistence']['storagePid']) {\n $pid['persistence']['storagePid'] = $configuration['persistence']['storagePid'];\n $this->configurationManager->setConfiguration(array_merge($configuration, $pid));\n }\n // Use current page as storagePid if neither set in TypoScript nor plugin data\n elseif (!$configuration['persistence']['storagePid']) {\n // Use current PID as storage PID\n $pid['persistence']['storagePid'] = $GLOBALS[\"TSFE\"]->id;\n $this->configurationManager->setConfiguration(array_merge($configuration, $pid));\n }\n }",
"protected function bindRepositories()\n {\n //\n }",
"function register_repositories($provider)\n {\n $repositories = call_user_func_array([$provider, 'getRepositories'],[]);\n foreach ($repositories as $interface => $model) {\n # code...\n $detection = explode('\\\\', $interface);\n $detectionClass = $provider::PREFIX_REPOSITORY_ELOQUENT . end($detection);\n $detectionCache = $provider::PREFIX_REPOSITORY_CACHE . end($detection);\n array_pop($detection);\n array_pop($detection);\n app(Application::class)->singleton($interface, function () use ($detection, $detectionClass, $detectionCache, $model) {\n $detectionClass = implode(\"\\\\\", array_merge($detection, [$detectionClass]));\n $detectionCache = implode(\"\\\\\", array_merge($detection, [$detectionCache]));\n $repository = new $detectionClass(new $model());\n if (setting('enable_cache', false))\n return new $detectionCache($repository);\n return $repository;\n });\n }\n }",
"protected function defineRepositories()\n {\n $repositories = [\n ClientRepositoryContract::class => ClientRepository::class,\n FeatureRepositoryContract::class => FeatureRepository::class,\n UserRepositoryContract::class => UserRepository::class,\n ];\n\n foreach ($repositories as $key => $value) {\n $this->app->bindIf($key, $value);\n }\n }",
"private function setFakeRepository()\n {\n if(!is_object($this->repository)) {\n $repository = new PublicRepository();\n $repository->entity_type = 'FakeEntity';\n $repository->entity_id = 777;\n $repository->path = ModelRepositories::buildPath(\n $repository->entity_type, $repository->entity_id, $repository->visibility\n );\n $this->repository = $repository;\n }\n }",
"protected function checkStoragePid() {\n\t\t$extName = $this->request->getControllerExtensionName();\n\t\t$pluginName = $this->request->getPluginName();\n\t\t\n\t\t$frameworkConfiguration = $this->configurationManager->getConfiguration(\\TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extName, $pluginName);\n\t\t\n\t\t// Override the storagePid\n\t\tif ( !empty($this->settings['startingpoint']) ) {\n\t\t\t$frameworkConfiguration['persistence']['storagePid'] = $this->settings['startingpoint'];\n\t\t\t\n\t\t\t$this->configurationManager->setConfiguration($frameworkConfiguration);\n\t\t} elseif ( empty($frameworkConfiguration['persistence']['storagePid']) ) {\n\t\t\t$frameworkConfiguration['persistence']['storagePid'] = $GLOBALS['TSFE']->id;\n\t\t\t\n\t\t\t$this->configurationManager->setConfiguration($frameworkConfiguration);\n\t\t}\n\t}",
"protected function completeRepositoryAssignments() {\n\t\tforeach ($this->getAllImplementationClassNamesForInterface('TYPO3\\FLOW3\\Persistence\\RepositoryInterface') as $repositoryClassname) {\n\t\t\t\t// need to be extra careful because this code could be called\n\t\t\t\t// during a cache:flush run with corrupted reflection cache\n\t\t\tif (class_exists($repositoryClassname)) {\n\t\t\t\t$claimedObjectType = $repositoryClassname::ENTITY_CLASSNAME;\n\t\t\t\tif ($claimedObjectType !== NULL && isset($this->classSchemata[$claimedObjectType])) {\n\t\t\t\t\t$this->classSchemata[$claimedObjectType]->setRepositoryClassName($repositoryClassname);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach (array_values($this->classSchemata) as $classSchema) {\n\t\t\tif (class_exists($classSchema->getClassName()) && $classSchema->isAggregateRoot()) {\n\t\t\t\t$this->makeChildClassesAggregateRoot($classSchema);\n\t\t\t}\n\t\t}\n\t}",
"public function setStoragePid(int $pid): void\n {\n $this->storagePid = $pid;\n }",
"public function registerRepositories(): void\n {\n // $this->app->bind(\n // Contracts\\PermissionRepository::class,\n // Repositories\\PermissionRepository::class\n // );\n\n // $this->app->bind(\n // Contracts\\RoleRepository::class,\n // Repositories\\RoleRepository::class\n // );\n }",
"function set_dataset_owner_repo($sid,$repositoryid)\r\n\t{\r\n\t\t$this->unset_dataset_owner_repo(($sid));\r\n\t\t\r\n\t\t$data=array(\r\n\t\t\t\t'sid'=>$sid,\r\n\t\t\t\t'repositoryid'=>$repositoryid,\r\n\t\t\t\t'isadmin'=>1 //give admin rights to the repo that uploaded the survey\r\n\t\t\t);\r\n\r\n\t\t//delete any existing entry for the study\r\n\t\t$this->db->where('sid',$sid);\r\n\t\t$this->db->where('repositoryid',$repositoryid);\r\n\t\t$this->db->delete('survey_repos');\r\n\r\n\t\t//add new info\r\n\t\t$this->db->insert('survey_repos',$data);\r\n\r\n\t\t//update surveys table\r\n\t\t$this->db->where('id',$sid);\r\n\t\t$this->db->update('surveys',array('repositoryid'=>$repositoryid));\r\n\r\n\t\treturn TRUE;\r\n\t}",
"abstract function listRepositories();",
"protected function registerRepositories()\n {\n collect($this->repositoryBindings)->each(\n function ($concrete, $contract) {\n $this->app->singleton($contract, $concrete);\n }\n );\n }",
"private function initUploadRepository(){\n if(!empty($this->repositoriesToInit)){\n foreach($this->repositoriesToInit as $repository){\n if(!file_exists($this->getUploadDir() . DIRECTORY_SEPARATOR . $repository)){\n mkdir($this->getUploadDir() . DIRECTORY_SEPARATOR . $repository,0777,true);\n }\n }\n }\n }",
"protected function buildDomainRepositories()\n {\n GeneralUtility::mkdir_deep($this->extensionDirectory . 'Classes/Domain/Repository/');\n $fileDirectory = $this->extensionDirectory . 'Classes/Domain/Repository/';\n foreach ($this->sectionManager->getItem('newTables')->getItems() as $itemKey => $item) {\n // Every table has a domain repository\n if (! file_exists($fileDirectory . GeneralUtility::underscoredToUpperCamelCase($item['tablename']) . 'Repository.php')) {\n $fileContents = $this->generateFile('Classes/Domain/Repository/Repository.phpt', $itemKey);\n GeneralUtility::writeFile($fileDirectory . GeneralUtility::underscoredToUpperCamelCase($item['tablename']) . 'Repository.php', $fileContents);\n }\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Counts followers number based on given client id | protected function CountFollowers($clientId)
{
$followers = $this->GetModelObject('Clients')->Execute(array('id' => $clientId), 'sp_clients_count_followers');
return $followers['id'];
} | [
"public function followerCount(): int\n {\n $key = 'campaign_' . $this->campaign->id . '_follower_count';\n if ($this->has($key)) {\n return $this->get($key);\n }\n\n $data = $this->campaign->followers()->count();\n $this->forever($key, $data);\n return $data;\n }",
"public function follower_count() {\n return intval($this->redis->sCard($this->user_followed_by_db.$this->id));\n }",
"public function getFollowersCount() {\n return (int)$this->getCounts()->followed_by;\n }",
"function pwuf_increase_followed_by_count( $user_id ) {\n do_action( 'pwuf_pre_increase_followed_count', $user_id );\n\n $followed_count = pwuf_get_follower_count( $user_id );\n \n if ( $followed_count !== false ) {\n \n $new_followed_count = update_user_meta( $user_id, '_pwuf_followed_by_count', $followed_count + 1 );\n \n } else {\n \n $new_followed_count = update_user_meta( $user_id, '_pwuf_followed_by_count', 1 );\n \n }\n\n do_action( 'pwuf_post_increase_followed_count', $user_id );\n\n return $new_followed_count;\n}",
"public static function getFollowersCount()\n {\n $user = Auth::user()->id;\n $f_id = Follow::where('follow_id', Auth::user()->id)->get();\n return sizeof($f_id);\n }",
"public function getFollowersCount() {\n $query = $this->con->prepare(\"SELECT * FROM followers WHERE userTo=:userTo\");\n $query->bindParam(\":userTo\", $username);\n $username = $this->getUsername();\n\n $query->execute();\n return $query->rowCount();\n }",
"function entrp_company_follows($company_id)\n{\n\t//To fetch user followers\n\t//SELECT COUNT(entrp_user_follows.clientid) AS followers FROM entrp_user_follows WHERE entrp_user_follows.follows=1\n\t$qry=\"SELECT COUNT(entrp_company_follows.clientid) AS followers \n\t\t\t FROM entrp_company_follows \n\t\t\t WHERE entrp_company_follows.companyid=\".$company_id.\"\n\t\t\t\";\n\t$res=getData($qry);\n\t$count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n \t{\n \t\t$count_followers \t\t= $row['followers'];\n \t}\n\t}\n\telse\n\t{\n\t\t$count_followers \t\t\t= 0;\n\t}\n\treturn $count_followers;\n}",
"public function followFollowers()\r\n {\r\n $this->debug('Checking for followers');\r\n \r\n $nbFollowers = 0;\r\n \r\n $limit = self::MAX_FOLLOWING;\r\n \r\n foreach ($this->client->getFollowers() as $follower)\r\n {\r\n if ($this->getBotAccountInfo('friends_count') >= $limit - $nbFollowers)\r\n {\r\n $this->debug('Max followers number reached, skipped mass following process');\r\n \r\n return 0;\r\n }\r\n \r\n if ($this->client->existsFriendship($this->getUsername(), $follower['screen_name']))\r\n {\r\n continue;\r\n }\r\n\r\n try\r\n {\r\n $this->client->createFriendship($follower['screen_name'], true);\r\n \r\n $this->debug(sprintf('Following new follower: \"%s\"', $follower['screen_name']));\r\n \r\n $nbFollowers++;\r\n }\r\n catch (Exception $e)\r\n {\r\n $this->debug(sprintf('Skipping following \"%s\": \"%s\"', $follower['screen_name'], $e->getMessage()));\r\n }\r\n }\r\n \r\n $this->debug(sprintf('%s follower%s added', 0 === $nbFollowers ? 'No' : (string) $nbFollowers, $nbFollowers > 1 ? 's' : ''));\r\n \r\n return $nbFollowers;\r\n }",
"public function getFollowersCount() {\n\t\treturn $this->user->followers_count;\n\t}",
"public function countFollowingUser(){\n $merchant = Following::where('id_user',Auth::user()->id)->count();\n $user = FollowingUser::where('id_user',Auth::user()->id)->count();\n return $merchant+$user;\n }",
"public function count_followers( $shop_id )\r\n\t{\r\n\t\t$this->db->select('shopper_id')\r\n\t\t\t\t ->from ('shop_follower')\r\n\t\t\t\t ->where ( 'shop_id' , $shop_id );\r\n\t\treturn $this->db->count_all_results( ); \r\n\t}",
"public static function twFollowers()\n {\n $consumerKey = Data::get('twConKey');\n $consumerSecret = Data::get('twConSec');\n $accessToken = Data::get('twToken');\n $tokenSecret = Data::get('twTokenSec');\n\n try {\n\n\n $twitter = new \\Twitter($consumerKey, $consumerSecret, $accessToken, $tokenSecret);\n $followerCount = $twitter->load(\\Twitter::ME);\n $fc = $followerCount[0]->user->followers_count;\n return $fc; // count twitter followers\n } catch (\\TwitterException $e) {\n\n return \"error\";\n }\n }",
"protected function get_num_following() {\n global $dbh;\n \n $query = \"\n SELECT COUNT(*) AS `num_following` FROM `follows`\n WHERE `from_id` = :from_id\";\n $sth = $dbh->prepare($query);\n $sth->bindValue('from_id', $this->id);\n $sth->execute();\n return (int)$sth->fetchColumn();\n }",
"public function getTwitterFollowersCount()\n {\n $val = $this->_get(self::TWITTER_FOLLOWER_COUNT);\n\n return $val[self::COUNT];\n }",
"public function followerCounter()\n\t{\n\t\treturn $this->morphOne(FollowerCounter::class, 'followerable');\n\t}",
"function get_profile_following_count($userId){\n\t\t$query = \"SELECT count(user_id) AS total FROM `users_follow` WHERE `user_id` = :userId\";\n\t\t$command = yii::app()->db->createCommand($query);\n\t\t$command->bindparam(\":userId\",$userId);\n\t\t$rawData = $command->queryAll();\n\t\tforeach($rawData as $raw){\n\t\t\t$count = $raw['total'];\n\t\t}\n\t\treturn $count;\n\t}",
"function getFollowerNumber($userId){\n $sqlFollower = \"SELECT COUNT(userB) as follower FROM `user_follows` WHERE userB = $userId\";\n $resultFollower = mysqli_query($GLOBALS[\"conn\"], $sqlFollower);\n $rowFollower = mysqli_fetch_assoc($resultFollower);\n $number = $rowFollower['follower'];\n\n return \"<a class='link' href='../View/Follower.php?id=$userId' target='_blank'>$number</a>\";\n\n}",
"function getFollowersAmount(): int\n {\n return $this->db->query('SELECT * FROM friends WHERE friend = ?', $this->userObject['id'])->numRows();\n }",
"public function getNumberOfFollowersAttribute(): int\n {\n return $this->getNumberOfFollowers();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets contacts page data. | public function getData(): ContactsPage; | [
"public function getContactsPage()\n {\n return $this->contactsPage;\n }",
"public function getContacts()\n {\n $response = $this->call('GET', '/contacts?pageSize=10&page=1');\n\n $this->assertEquals(200, $response->status());\n\n $response->assertJsonStructure([\n 'contacts',\n 'customAttributes'\n ]);\n \n }",
"public function getContacts();",
"private function getContacts()\n {\n $url = $this->sendhuburl . 'contacts/'; // . $this->sendhubcredential;\n \n $output = Yii::app()->curl->get($url, $this->sendhubcredential); \n $contacts = CJSON::decode($output);\n \n array_shift($contacts);\n \n return $contacts;\n \n }",
"public function contactsGetContacts()\n {\n $endpoint = '/contacts';\n $data = ['access_token' => $this->config['access_token']];\n\n // Make API Call\n $result = samsara::callAPI(null, $this->config['base_url'] . $endpoint, $data);\n\n return $result;\n }",
"public function GetContacts()\n {\n $contacts = ContactView::all();\n return $contacts;\n }",
"function getUserContacts()\r\n\t{\r\n\t}",
"public function getContactInformation();",
"public function getAllContacts(){\n \n return $this->contacts;\n \n }",
"function getUserContacts()\n\t{ \n\t\t// refresh tokens if needed \n\t\t$this->refreshToken(); \n\n\t\tif( ! isset( $this->config['contacts_param'] ) ){\n\t\t\t$this->config['contacts_param'] = array( \"max-results\" => 500 );\n\t\t}\n\n\t\t$response = $this->api->api( \"https://www.google.com/m8/feeds/contacts/default/full?\" \n\t\t\t\t\t\t\t. http_build_query( array_merge( array('alt' => 'json'), $this->config['contacts_param'] ) ) ); \n\n\t\tif( ! $response ){\n\t\t\treturn ARRAY();\n\t\t}\n \n\t\t$contacts = ARRAY(); \n\n\t\tforeach( $response->feed->entry as $idx => $entry ){\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->email = isset($entry->{'gd$email'}[0]->address) ? (string) $entry->{'gd$email'}[0]->address : ''; \n\t\t\t$uc->displayName = isset($entry->title->{'$t'}) ? (string) $entry->title->{'$t'} : ''; \n\t\t\t$uc->identifier = $uc->email;\n\n\t\t\t$contacts[] = $uc;\n\t\t} \n\n\t\treturn $contacts;\n \t}",
"public function getAllContacts()\n\t{\n\t\t$accessToken = Redis::get('hubspot:accesstoken');\n\t\t$client = new Client();\n\t $response = $client->request('GET', $this->hubspotUrl.'/contacts/v1/lists/all/contacts/all', [\n\t \t'headers' => [\n\t \t'Authorization' => 'Bearer '.$accessToken\n\t ]\n\t ]);\n\t $response = json_decode($response->getBody());\n\t return $response;\n\t}",
"function get_contacts()\r\n\t{\r\n\t\trequire_once('modules/Contacts/Contact.php');\r\n\t\t$this->load_relationship('contacts');\r\n\t\t$query_array=$this->contacts->getQuery(true);\r\n\t\t\r\n\t\t//update the select clause in the retruned query.\r\n\t\t$query_array['select']=\"SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id \";\r\n\t\r\n\t\t$query='';\r\n\t\tforeach ($query_array as $qstring) {\r\n\t\t\t$query.=' '.$qstring;\r\n\t\t}\t\r\n\t $temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id');\r\n\t\treturn $this->build_related_list2($query, new Contact(), $temp);\r\n\t}",
"public function getContactInfo();",
"public function getContacts() {\n return $this->getParameter('contacts');\n }",
"public function get_contacts()\r\n {\r\n $res = select_query_assoc(\r\n 'SELECT address, phone_nr, email FROM contacts;'\r\n );\r\n if (!empty($res)) {\r\n return json_encode($res);\r\n } else {\r\n return null;\r\n }\r\n }",
"public function it_gets_a_list_of_contacts()\n {\n $response = json_encode([\n 'data' => ContactFactory::create(2),\n 'info' => [\n 'per_page' => 200,\n 'count' => 2,\n 'page' => 1,\n 'more_records' => false\n ]\n ]);\n\n $api = Zoho::fake([TransactionMock::create($response)]);\n\n $response = $api->contacts->get();\n\n $this->assertEquals(200, $api->lastResponseStatusCode());\n $this->assertTrue(is_array($response));\n $this->assertEquals('GET', $api->lastRequestMethod());\n $this->assertEquals(sprintf('/%s/%s', Zoho::$base, 'Contacts'), $api->lastRequestUri());\n $this->assertCount(2, $response);\n }",
"public function list()\n {\n $contacts = $this->contacts->paginate(10);\n if(!count($contacts)){\n return $this->helper->errorReturn(\\Lang::get('auth.empty'), 404);\n }\n\n return $this->helper->successReturn($contacts);\n }",
"public function getContacts(){\n\t\n\t\t$db\t\t= $this->getDbo();\n\t\t\n\t\t$query\t= $db->getQuery( true );\n\t\t$query->select( '*' );\n\t\t$query->from( '#__zbrochure_providers_contacts as c' );\n\t\t$query->join( 'LEFT','#__zbrochure_providers as p on p.provider_id = c.provider_id' );\n\t\t\n\t\t$db->setQuery( $query );\n\t\t$contacts = $db->loadObjectList();\n\t\t\n\t\treturn $contacts;\n\t}",
"public function getContacts()\n {\n return $this->members()->where('type', 'contact')->get();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the events Gets a count and the list of events associated with an account. | public function events($account)
{
return $this->requestGet(
sprintf('users/%s/events', $account)
);
} | [
"public function listEvents()\n {\n $query = Core::query('campaign-events-list');\n $query->bindValue(':campaign', $this->_campaign['id']);\n $query->execute();\n return $query->fetchAll(PDO::FETCH_ASSOC);\n }",
"function getEvents() {\n\t$alluser = new Event();\n\t$alluser->getAllEvents();\n}",
"public function getEventList()\n {\n // check if user has permission to get events\n if ( !$this->user->checkPrivilige(PERM_EVENT, PERM_DESCR_EDIT_EVENT) ) {\n $this->throwException(USER_HAS_NO_RIGHT, \"User has no right to edit event\");\n }\n //$this->response(QR_SUCCESS_GET_UNUSED_HASHES, $this->qr->getUsedHashes());\n if ( !($this->qr->getEvents($this->user->getUserId())) ) {\n $this->throwException(EVENT_FAILED_TO_LIST_CODES, \"Unable to obtain eventlist\");\n } else {\n $this->response(EVENT_SUCCESS_GET_LIST, $this->qr->unusedHash());\n }\n \n }",
"public function getEvents() {\n\t\t$listEntries = Temboo_Results::getSubItemByKey($this->base, \"items\");\n\t\t$resultArray = array();\n\t\tif(!is_null($listEntries)) {\n\t\t\tforeach ($listEntries as $entry) {\n\t\t \tarray_push($resultArray, new Google_Calendar_Event_output($entry));\n\t\t\t}\n\t\t}\n\t\treturn $resultArray;\n\t}",
"public function getEvents();",
"public function getEvents()\n\t{\n\t\t$site_id = $this->input->get('site_id');\n\t\t$result = $this->requests->getEvents($site_id);\n\t\techo json_encode($result);\n\t}",
"public function fetchAllEvents();",
"private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}",
"public function events($list_id, $email, $start=0, $limit=25) {\n $_params = array(\"list_id\" => $list_id, \"email\" => $email, \"start\" => $start, \"limit\" => $limit);\n return $this->master->call('goal/events', $_params);\n }",
"function get_assmgr_calendar_events() {\n\n return $this->dbc->get_records('block_assmgr_calendar_event');\n }",
"public function getAllEvents()\n\t{\n\t\treturn DB::table('events')\n\t\t\t\t\t->from(DB::raw('(SELECT * FROM events ORDER BY start_date DESC) AS ordered_events'))\n\t\t\t\t\t->whereNull('deleted_at')\n\t\t\t\t\t->where('visible', 1)\n\t\t\t\t\t->groupBy('name')\n\t\t\t\t\t->get();\n\t}",
"public function fetchEvents();",
"public function getEventsList() {\n return $this->eventsList;\n }",
"public function getAllEvents(Guid $guid);",
"public function findAllEvents() {\n\t\treturn $this->db->exec_SELECTgetRows('*', 'tx_cal_event', '');\n\t}",
"public function fetchEvents() \n {\n if(Auth::user()->isActivated() == false)\n return null;\n $partnerid = request()->partner_id;\n\n $start_date = date(\"Y-m-d\");\n $end_date = mktime(0, 0, 0, date('m'), date('d')+1, date('y'));\n //$events = EventModel::whereBetween('event_start', '=', array($start_date, $end_date))->get();\n $events = EventModel::where('partner_id', '=', $partnerid)\n ->orderBy('event_start', 'desc')\n ->get();\n return $events;\n }",
"private function _getEventList(){\n\t\t/* variable initialization */\n\t\t$strWhereClauseArr\t= array('company_code' => $this->getCompanyCode());\n\t\t$strFilterArr\t\t= array('table'=>'events_'.$this->getCompanyCode());\n\t\t/* Getting the status list */\n\t\treturn\t$this->_objDataOperation->getDataFromTable($strFilterArr, $strWhereClauseArr);\n\t}",
"public function getEventAttendees($params=array()){ \n $headers = array(\n 'Authorization' => $this->getBearerCredentials(),\n );\n \n $options = array(\n 'headers' => $headers,\n );\n $options = array_merge($options, array('max_redirects' => EBConsts::EBS_DRUPAL_HTTP_QUERY_MAX_REDIRECTS,));\n \n $query = '';\n if (!empty($params)){\n $query = '?'. drupal_http_build_query($params);\n }\n \n try{\n $eb_params = format_string(EBConsts::EBS_ENDPOINT_ATTENDEES, array('@event_id' => $this->eventId, '!query' => $query,));\n $response = drupal_http_request(EBConsts::EBS_URL_EVENTBRITE_REST_API. $eb_params, $options);\n $retval = $this->oauthClient->parseResponse($response);\n }catch(Exception $e){\n watchdog_exception(__CLASS__. '~'. __METHOD__, $e);\n }\n return $retval; \n }",
"public function getEvents()\n\t{\n\t\t$fetch = $this->getDb('tools')->fetchAll('SELECT * FROM smartai_events');\n\t\t$events = [];\n\t\tforeach($fetch as $event)\n\t\t\t$events[$event['id']] = $event;\n\t\treturn $events;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cmd that will be redirected to after creation of a new object. | abstract function getAfterCreationCmd(); | [
"function getAfterCreationCmd() {\n\t\t//$this->store();\n\t}",
"public function initializeNewAction() {\n\t\t$this->arguments->addNewArgument('new' . $this->domainObjectName, $this->domainObjectClassName, FALSE);\n\t}",
"private function createSingleCommand()\n {\n $command = new Command\\Copy($this->getName());\n $this->add($command);\n $this->singleCommand = $command;\n }",
"public function new_command_makes_new_class()\n {\n $this->assertFalse(file_exists($this->path));\n\n $this->command_tester->execute(array(\n 'command' => $this->command->getName(),\n 'name' => 'Test',\n '--path' => $this->root,\n ));\n\n $this->assertTrue(file_exists($this->path));\n\n $result = 'Filler successfully created.'.\"\\n\";\n\n $this->assertEquals($result, $this->command_tester->getDisplay());\n }",
"public function actionCreate() {\n $model = new Command();\n $model->author = \\Yii::$app->user->identity->id;\n\n // check that at least one server connection exists\n $connection = \\common\\models\\ServerConnection::find()->asArray()->one();\n if (!$connection) {\n \\Yii::$app->getSession()->setFlash('error', 'Command requires functional server connection.');\n $this->redirect(['/server-connection']);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"private function _command() {\n\t\t// Create <command/>\n\t\t$this->command = $this->epp->appendChild($this->document->createElement('command'));\n\t}",
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function newAction() {\n $entity = new Command();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FklFranklinBundle:Command:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction() {\n\t\t$this->view->assign('new' . $this->domainObjectName, $this->arguments['new' . $this->domainObjectName]->getValue());\n\t}",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"public function create($type, array $data = [], string $magic = CommandInterface::MAGIC_REQUEST): CommandInterface;",
"public function executeCreate()\n {\n $this->headline = new Headline();\n\n $this->setTemplate('edit');\n }",
"public function new_command_makes_new_camelcase_class()\n {\n $this->assertFalse(file_exists(vfsStream::url('root/testFile.php')));\n\n $this->command_tester->execute(array(\n 'command' => $this->command->getName(),\n 'name' => 'test_file',\n '--path' => $this->root,\n ));\n\n $this->assertTrue(file_exists(vfsStream::url('root/FillTestFile.php')));\n\n $result = 'Filler successfully created.'.\"\\n\";\n\n $this->assertEquals($result, $this->command_tester->getDisplay());\n }",
"private function insertCreateFunc()\n {\n if (file_exists($this->rootDir . '/inserts/' . $this->oldName)) ZFileHelper::removeDir($this->rootDir . '/inserts/' . $this->oldName);\n\n $script = $this->rootDir . '/excmd/asrorz.php';\n $params = 'cruds/insert/create --app=' . $this->oldName;\n $phpcmd = 'php ' . $script . ' ' . $params;\n\n Az::debug($phpcmd, 'command to launch: ');\n $r = shell_exec($phpcmd);\n Az::debug($phpcmd, 'command executed: ');\n Az::debug($r, 'command result: ');\n }",
"public function createObject()\n\t{\n\t\tglobal $tpl, $ilErr;\n\n\t\t$new_type = $_REQUEST[\"new_type\"];\n\n\t\t\n\t\t// add new object to custom parent container\n\t\t$this->ctrl->saveParameter($this, \"crtptrefid\");\n\t\t// use forced callback after object creation\n\t\t$this->ctrl->saveParameter($this, \"crtcb\");\n\t\t\n\t\tif (!$this->checkPermissionBool(\"create\", \"\", $new_type))\n\t\t{\n\t\t\t$ilErr->raiseError($this->lng->txt(\"permission_denied\"),$ilErr->MESSAGE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->lng->loadLanguageModule($new_type);\n\t\t\t$this->ctrl->setParameter($this, \"new_type\", $new_type);\n\t\t\t\n\t\t\t$forms = $this->initCreationForms($new_type);\n\t\t\t\n\t\t\t// copy form validation error: do not show other creation forms\n\t\t\tif($_GET[\"cpfl\"] && isset($forms[self::CFORM_CLONE]))\n\t\t\t{\n\t\t\t\t$forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);\n\t\t\t}\n\t\t\t$tpl->setContent($this->getCreationFormsHTML($forms));\n\t\t}\n\t}",
"public function create()\n {\n return view('commands.create');\n }",
"protected function createCommand() {\n\t\t$this->command = Yii::app()->db->createCommand();\n\t\t$columns = array();\n\t\tforeach ($this->getParam('columns') as $key => $column) {\n\t\t\tif (is_object($column)) {\n\t\t\t\t$columns[] = $column->name;\n\t\t\t} else {\n\t\t\t\t$chunk = explode(':', !is_array($column) ? $column : $column['name']);\n\t\t\t\t$columns[] = $chunk[0];\n\t\t\t}\n\t\t}\n\t\t$this->command->select($columns)->from($this->getParam('model')->tableName());\n\t}",
"public function generate()\n {\n global $argv;\n\n $parameters = $this->parse_cmdline($argv);\n if(count($parameters) < 1)\n {\n $this->help();\n return;\n }\n\n $class = array_shift($parameters);\n $gc = $this->get_gadget_chain($class);\n\n if(@$this->arguments['informations'])\n {\n $this->o($gc, 2);\n $this->o($this->_get_command_line_gc($gc));\n }\n else\n {\n $parameters = $this->get_type_parameters($gc, $parameters);\n $generated = $this->serialize($gc, $parameters);\n print($generated . \"\\n\");\n }\n }",
"public function generateCommands();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if a given charset encoding is present in a list of encodings or if it is a valid subset of any encoding in the list. | public function isValidCharset($encoding, $validList)
{
if (is_string($validList)) {
$validList = explode(',', $validList);
}
if (@in_array(strtoupper($encoding), $validList)) {
return true;
} else {
if (array_key_exists($encoding, $this->charset_supersets)) {
foreach ($validList as $allowed) {
if (in_array($allowed, $this->charset_supersets[$encoding])) {
return true;
}
}
}
return false;
}
} | [
"function is_supported_encoding($encoding) {\n\t\treturn in_array($encoding, array(\"UTF-8\", \"US-ASCII\", \"ISO-8859-1\"));\n\t}",
"function isAllowedCharset( $charset )\n {\n $realCharset = eZCharsetInfo::realCharsetCode( $charset );\n $charsets = $this->allowedCharsets();\n foreach ( $charsets as $charsetName )\n {\n $realName = eZCharsetInfo::realCharsetCode( $charsetName );\n if ( $realName == $realCharset )\n return true;\n }\n return false;\n }",
"public function isCharsetAllowed($charset = 'utf-8')\n {\n return in_array(strtolower($charset), $this->getCharsets(), true);\n }",
"private static function isEncodingSupported($encoding)\n {\n return in_array($encoding, array(self::BASE64, self::QUOTED_PRINTABLE, '7bit', '8bit'));\n }",
"function api_is_encoding_supported($encoding) {\n static $supported = array();\n if (!isset($supported[$encoding])) {\n $supported[$encoding] = _api_mb_supports($encoding) || _api_iconv_supports($encoding) || _api_convert_encoding_supports($encoding);\n }\n return $supported[$encoding];\n}",
"protected function validEncoding($data) {\n\t\t$check_string = implode('', $data);\n\t\tif (!mb_check_encoding($check_string, 'UTF-8')) {\n\t\t\t$this->_count_encoding_rejects++;\n\t\t\t$this->_reject_char_count += strlen($check_string);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"function checkCharset($charset)\n {\n static $check;\n\n if (is_null($charset) || empty($charset)) {\n return false;\n }\n\n if (isset($check[$charset])) {\n return $check[$charset];\n } elseif (!isset($check)) {\n $check = array();\n }\n\n $valid = true;\n\n ini_set('track_errors', 1);\n @htmlspecialchars('', ENT_COMPAT, $charset);\n if (isset($php_errormsg)) {\n $valid = false;\n }\n ini_restore('track_errors');\n\n $check[$charset] = $valid;\n\n return $valid;\n }",
"public function acceptsCharset($charset = 'utf-8') {\n\t\tif (!$charset) {\n\t\t\t$charset = 'utf-8';\n\t\t}\n\n\t\tforeach ($this->_accepts('Accept-Charset') as $set) {\n\t\t\tif (mb_strtolower($charset) === mb_strtolower($set['type'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"function checkEncoding($str, $encoding);",
"public function checkForValidEncoding($input){\r\n $isValidEncoding = mb_check_encoding($input, 'UTF-8');\r\n return $isValidEncoding;\r\n }",
"function api_is_utf8($encoding)\n{\n static $result = array();\n if (!isset($result[$encoding])) {\n $result[$encoding] = api_equal_encodings($encoding, 'UTF-8');\n }\n return $result[$encoding];\n}",
"function _api_convert_encoding_supports($encoding)\n{\n static $supports = array();\n if (!isset($supports[$encoding])) {\n $supports[$encoding] = _api_get_character_map_name(api_refine_encoding_id($encoding)) != '';\n }\n return $supports[$encoding];\n}",
"function charsetAccepted(\n\t\t\t$charset = array()\n\t\t) {\n\t\t\tif( empty( $charset ) and empty( $this->_charset )) return $this->_trigger_error('Conteg::charsetAccepted(): Supplied charset and Class charset both empty.', E_USER_WARNING );\n\t\t\telseif( empty( $this->accept_charset )) return $this->_trigger_error('Conteg::charsetAccepted(): Request charset(s) empty, cannot compare.', E_USER_NOTICE );\n\t\t\telse if( empty( $charset )) $charset = array( $this->_charset );\n\n\t\t\tif( isset( $this->accept_charset['*']) and ( $this->accept_charset['*'] > 0 )) return TRUE;\n\t\t\telse foreach( $charset AS $val ) {\n\t\t\t\t$val_upper\t= strtoupper( $val );\n\t\t\t\tif( isset( $this->accept_charset[ $val_upper ]) and ( $this->accept_charset[ $val_upper ] > 0 )) return $val;\n\t\t\t}\n\n\t\t\treturn FALSE;\t// no acceptable charset found\n\t\t}",
"public function isValidEncoding(File $file){\n\n $enc = mb_detect_encoding(file_get_contents($file->getRealPath()));\n\n return $enc !== false; //in_array($enc, explode(' ', CaptionManager::$acceptedEncodings));\n }",
"public function isValidCollation($collation, $charset) {\n\t\t\n\t\t$collations = $this->getCollations($charset);\n\t\t\n\t\tif (in_array($collation, $collations)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private function needsDecoding(string $encoding): bool\n {\n return in_array(strtolower($encoding), ['base64', 'quoted-printable','8bit','binary']);\n }",
"public static function check_encoding($data)\n {\n if (!is_array($data)) {\n return;\n }\n\n foreach ($data as $key => $value) {\n if (!is_array($value)) {\n // check if the multibyte library function is installed and use it.\n if (function_exists('mb_detect_encoding')) {\n // check with mb library\n if (is_string($key) && mb_detect_encoding($key, 'UTF-8', true) === false) {\n throw new ClientException('Only UTF-8 encoded keys allowed. Wrong encoding in key string: ' . $key);\n }\n if (is_string($value) && mb_detect_encoding($value, 'UTF-8', true) === false) {\n throw new ClientException('Only UTF-8 encoded values allowed. Wrong encoding in value string: ' . $value);\n }\n } else {\n // fallback to preg_match checking\n if (is_string($key) && self::detect_utf($key) === false) {\n throw new ClientException('Only UTF-8 encoded keys allowed. Wrong encoding in key string: ' . $key);\n }\n if (is_string($value) && self::detect_utf($value) === false) {\n throw new ClientException('Only UTF-8 encoded values allowed. Wrong encoding in value string: ' . $value);\n }\n }\n } else {\n self::check_encoding($value);\n }\n }\n }",
"public static function isCompatible(string $encoding): bool\n\t{\n\t\tstatic $encodings = [\n\t\t\tself::BIT7 => true,\n\t\t\tself::BIT8 => true,\n\t\t\tself::BINARY => true,\n\t\t\tself::BASE64 => true,\n\t\t\tself::QUOTED_PRINTABLE => true,\n\t\t];\n\n\t\treturn isset($encodings[$encoding]);\n\t}",
"private static function isArrayUTF8Compliant($inputArray)\n {\n Precondition::isArray($inputArray, \"inputArray\");\n\n $result = true;\n\n foreach ($inputArray as $key => $value) {\n if (!self::isStringUTF8Compliant($key)) {\n $result = false;\n break;\n }\n $result = self::isInputUTF8Compliant($value);\n if (!$result) {\n // Once any part of the input is found to be non-UTF-8 compatible, exit the loop\n break;\n }\n }\n\n return $result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an instance of CalculationVariableKeeper. | public function getCalculationVariableKeeper(): ?CalculationVariableKeeper
{
return $this->calculationVariableKeeper;
} | [
"final public static function get() : Calculator\n {\n if (self::$instance === null) {\n /** @psalm-suppress ImpureMethodCall */\n self::$instance = self::detect();\n }\n\n return self::$instance;\n }",
"public function getVariable(): Variable\n {\n return new Variable($this->variables->top()->getVar());\n }",
"protected function calculator()\n {\n if (!isset($this->_calculator)) {\n $this->_calculator = new Calculator([$this->tariff]);\n }\n\n return $this->_calculator;\n }",
"private function getModuleVariableLocator()\n {\n $cache = $this->getMock(\\OxidEsales\\Eshop\\Core\\FileCache::class);\n $shopIdCalculator = $this->getMock(\\OxidEsales\\Eshop\\Core\\ShopIdCalculator::class, array('getShopId'), array(), '', false);\n $shopIdCalculator->expects($this->any())->method('getShopId')->will($this->returnValue($this->getShopId()));\n\n return oxNew(\\OxidEsales\\Eshop\\Core\\Module\\ModuleVariablesLocator::class, $cache, $shopIdCalculator);\n }",
"abstract public function createFormulaVariablesByValueKeeper(\n ValueKeeper $valueKeeper\n ): VariableCollection;",
"public function getCalculator()\n {\n return new Calculator($this);\n }",
"public function getVariableContainer()\n {\n return $this->variableContainer;\n }",
"public function current(): ?CalculationVariableContainer\n {\n /** @var CalculationVariableContainer|bool $container */\n $container = current($this->containers);\n\n return $container !== false ? $container : null;\n }",
"private function calculationValue(): Expression\n {\n $next = $this->scanner->peekChar();\n\n if ($next === '+' || $next === '-' || $next === '.' || Character::isDigit($next)) {\n return $this->number();\n }\n\n if ($next === '$') {\n return $this->variable();\n }\n\n if ($next === '(') {\n $start = $this->scanner->getPosition();\n $this->scanner->readChar();\n\n $value = $this->tryCalculationInterpolation();\n\n if ($value === null) {\n $this->whitespace();\n $value = $this->calculationSum();\n }\n\n $this->whitespace();\n $this->scanner->expectChar(')');\n\n return new ParenthesizedExpression($value, $this->scanner->spanFrom($start));\n }\n\n if (!$this->lookingAtIdentifier()) {\n $this->scanner->error('Expected number, variable, function, or calculation.');\n }\n\n $start = $this->scanner->getPosition();\n $ident = $this->identifier();\n\n if ($this->scanner->scanChar('.')) {\n return $this->namespacedExpression($ident, $start);\n }\n\n if ($this->scanner->peekChar() !== '(') {\n $this->scanner->error('Expected \"(\" or \".\".');\n }\n\n $lowercase = strtolower($ident);\n $calculation = $this->tryCalculation($lowercase, $start);\n\n if ($calculation !== null) {\n return $calculation;\n }\n\n if ($lowercase === 'if') {\n return new IfExpression($this->argumentInvocation(), $this->scanner->spanFrom($start));\n }\n\n return new FunctionExpression($ident, $this->argumentInvocation(), $this->scanner->spanFrom($start));\n }",
"protected function createGetVariable(){\n\t\treturn new \\GetVariable();\n\t}",
"public function createVariable() : Mailcode_Parser_Statement_Validator_Type_Variable\n {\n return new Mailcode_Parser_Statement_Validator_Type_Variable($this->statement);\n }",
"private function getCalculator()\n {\n if (!$this->calculator) {\n $this->calculator = new \\Application\\Service\\Calculator\\Calculator();\n $this->calculator->setServiceLocator($this->getServiceLocator());\n }\n\n return $this->calculator;\n }",
"public function getCalculationVariableEntityByName(string $name): ?CalculationVariableEntity\n {\n return $this->calculationVariableKeeper->getInstanceOfVariable($name);\n }",
"public function expression()\n {\n return new self;\n }",
"public function updateVariables(){\n\t\tif($this->hasVariables()){\n\t\t\t$calcObj = new Calculation($this);\n\t\t\tforeach($this->variables as $var){\n\t\t\t\tif(property_exists($var,'calculation')){\n\t\t\t\t\t//resolve calculation\n\t\t\t\t\t$var->value = $calcObj->resolveCalculation($var->calculation);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function expression()\n { \n return new self;\n }",
"public function getCalculator(): Calculator\n {\n return $this->calculator;\n }",
"public function getCalculationEngine()\n {\n return $this->calculationEngine;\n }",
"public function createFormulaVariablesByValueKeeper(\n ValueKeeper $valueKeeper\n ): VariableCollection {\n $variables = new VariableCollection();\n\n return $this->addDataOfPrintedSheetToVariables($variables, $valueKeeper);;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that only the protected & private properties of the AbstractModelStub returns data in the array | public function testToArray()
{
$class = new AbstractModelStub();
// Set an instance of AbstractModelStub so that the recursion happens
$class->setMyProtectedObjectVarWithToArrayMethod(new AbstractModelStub());
$results = $class->toArray();
$this->assertInternalType('array', $results);
$this->assertCount(3, $results);
$this->assertArrayHasKey('myProtectedVarWithMethod', $results);
$this->assertArrayHasKey('myPrivateVarWithMethod', $results);
$this->assertArrayHasKey('myProtectedObjectVarWithToArrayMethod', $results);
$this->assertInternalType('array', $results['myProtectedObjectVarWithToArrayMethod']);
$this->assertCount(3, $results['myProtectedObjectVarWithToArrayMethod']);
$this->assertArrayHasKey('myProtectedVarWithMethod', $results['myProtectedObjectVarWithToArrayMethod']);
$this->assertArrayHasKey('myPrivateVarWithMethod', $results['myProtectedObjectVarWithToArrayMethod']);
$this->assertArrayHasKey('myProtectedObjectVarWithToArrayMethod', $results['myProtectedObjectVarWithToArrayMethod']);
// The recursion should set this property but it doesn't have a value set
$this->assertNull($results['myProtectedObjectVarWithToArrayMethod']['myProtectedObjectVarWithToArrayMethod']);
} | [
"public function testAllFieldsByArrayWrongData()\n {\n $oItem = new \\SetterGetter();\n\n // the test\n $result = $oItem->allFieldsByArray('test');\n\n // assert\n $this->assertFalse($result);\n }",
"public static function dataProviderTestThatSetterAndGettersWorks(): array\n {\n self::bootKernel();\n\n /** @var EntityManagerInterface $entityManager */\n $entityManager = self::$kernel->getContainer()->get('doctrine.orm.default_entity_manager');\n\n // Get entity class meta data\n $meta = $entityManager->getClassMetadata(static::$entityName);\n\n /**\n * Lambda function to generate actual test case arrays for tests. Output value is an array which contains\n * following data:\n * 1) Name\n * 2) Type\n * 4) meta\n *\n * @return array\n */\n $iterator = static fn (string $field): array => [\n $field,\n PhpUnitUtil::getType($meta->getTypeOfField($field)),\n $meta->getFieldMapping($field),\n $meta->isReadOnly,\n ];\n\n $fieldsToOmit = [...$meta->getIdentifierFieldNames(), ...['password']];\n\n $entityManager->close();\n\n $assocFields = [];\n\n foreach ($meta->getAssociationMappings() as $mapping) {\n if (in_array($mapping['fieldName'], ['createdBy', 'updatedBy', 'deletedBy'], true)) {\n continue;\n }\n\n $field = $mapping['fieldName'];\n $type = $mapping['targetEntity'];\n\n $assocFields[] = [$field, $type, $mapping, $meta->isReadOnly];\n }\n\n return [...array_map(\n $iterator,\n array_filter(\n $meta->getFieldNames(),\n static fn (string $field): bool => !in_array($field, $fieldsToOmit, true)\n )\n ), ...$assocFields];\n }",
"final public function testDataMethod()\n {\n $obj = $this->createExpression();\n\n /** 1. Getter returns an array */\n $this->assertInternalType('array', $obj->data());\n\n /** 2. Setter is chainable */\n $that = $obj->setData([]);\n $this->assertSame($obj, $that);\n }",
"public function testDataAccessor()\n {\n $this->assertHasSimpleAccessor('data', $this->createMock(\\stdClass::class));\n }",
"public function getTestableFields()\n {\n return [\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getCustomer',\n 'setter' => 'setCustomer',\n 'value' => 'Elcodi\\Component\\User\\Entity\\Interfaces\\CustomerInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getOrder',\n 'setter' => 'setOrder',\n 'value' => 'Elcodi\\Component\\Cart\\Entity\\Interfaces\\OrderInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'isOrdered',\n 'setter' => 'setOrdered',\n 'value' => true,\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::ADDER_REMOVER,\n 'getter' => 'getCartLines',\n 'setter' => 'setCartLines',\n 'adder' => 'addCartLine',\n 'remover' => 'removeCartLine',\n 'bag' => '\\Doctrine\\Common\\Collections\\ArrayCollection',\n 'value' => '\\Elcodi\\Component\\Cart\\Entity\\Interfaces\\CartLineInterface',\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getPurchasableAmount',\n 'setter' => 'setPurchasableAmount',\n 'value' => 'Elcodi\\Component\\Currency\\Entity\\Interfaces\\MoneyInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getCouponAmount',\n 'setter' => 'setCouponAmount',\n 'value' => 'Elcodi\\Component\\Currency\\Entity\\Interfaces\\MoneyInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getShippingAmount',\n 'setter' => 'setShippingAmount',\n 'value' => 'Elcodi\\Component\\Currency\\Entity\\Interfaces\\MoneyInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getAmount',\n 'setter' => 'setAmount',\n 'value' => 'Elcodi\\Component\\Currency\\Entity\\Interfaces\\MoneyInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getDeliveryAddress',\n 'setter' => 'setDeliveryAddress',\n 'value' => 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\AddressInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getBillingAddress',\n 'setter' => 'setBillingAddress',\n 'value' => 'Elcodi\\Component\\Geo\\Entity\\Interfaces\\AddressInterface',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getShippingMethod',\n 'setter' => 'setShippingMethod',\n 'value' => 'my-shipping-method',\n 'nullable' => false,\n ]],\n [[\n 'type' => $this::GETTER_SETTER,\n 'getter' => 'getCheapestShippingMethod',\n 'setter' => 'setCheapestShippingMethod',\n 'value' => 'my-shipping-method',\n 'nullable' => false,\n ]],\n ];\n }",
"public function testGetFieldsReturnArray()\n {\n $mock = \\Mockery::mock(\\Gomail\\Auth\\Authentificate::class)->shouldAllowMockingProtectedMethods();\n $mock->shouldReceive('getFields')->andReturn([\n 'name' => 'anton',\n 'surname' => 'hideger',\n 'email' => 'test@email.com',\n 'password' => '123'\n ]);\n\n $this->assertIsArray($mock->getFields());\n }",
"public function testSetters()\n {\n foreach ($this->expectedSetters as $method => $parameter) {\n $this->entity->$method($parameter);\n }\n\n $actualResult = $this->entity->toArray();\n\n $this->assertArraysAreSimilar($this->testData, $actualResult, 'toArray');\n }",
"public function testPopulateAndGetProperties()\n {\n require_once __DIR__ . '/auxiliary/TestModel.php';\n\n $array = array(\n 'property' => 'property',\n 'accessor' => 'accessor',\n );\n $model = new \\TestModel;\n $model->populate($array);\n $this->assertSame($array, $model->getProperties());\n }",
"public function testPropertiesCanBeAccessedViaMagicMethod()\n {\n $data = ['foo' => uniqid()];\n\n $stub = new EntityStub($data);\n\n $this->assertEquals($data['foo'], $stub->getFoo());\n }",
"public function testGetAvailableAttributes()\n {\n $this->assertInternalType('array', $this->model->getAvailableAttributes());\n }",
"public function testGetModelHoldingAllUsingGet()\n {\n }",
"public function getStubMethodData(): iterable\n {\n yield from $this->getMethodExpectations();\n }",
"public function exposeShouldGatherAllDefinedDataInTheAnArray(): void\n {\n $metaData = new Metadata();\n $metaDataArray = (array)$metaData->expose();\n $this->assertCount(0, $metaDataArray);\n\n $metaData->addMetadata('myData', 'This should be my Data');\n $metaData->addMetadata('additionalData', 'some information');\n $metaData->setShopType('my own shop');\n $metaData->setShopVersion('1.0.0.0');\n\n $metaDataArray = $metaData->expose();\n $this->assertCount(4, $metaDataArray);\n $this->assertEquals('my own shop', $metaDataArray['shopType']);\n $this->assertEquals('1.0.0.0', $metaDataArray['shopVersion']);\n $this->assertEquals('This should be my Data', $metaDataArray['myData']);\n $this->assertEquals('some information', $metaDataArray['additionalData']);\n }",
"protected function _getReadonlyProperties()\n {\n return array();\n }",
"public function isValidDataProvider()\n {\n return [\n 'is_valid' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'data_model' => $this->_getDataModelMock(null),\n 'frontend_input' => 'text',\n 'is_visible' => true,\n ],\n 'attributeReturns' => true,\n 'isValid' => true,\n 'messages' => [],\n ],\n 'is_invalid' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'data_model' => $this->_getDataModelMock(null),\n 'frontend_input' => 'text',\n 'is_visible' => true,\n ],\n 'attributeReturns' => ['Error'],\n 'isValid' => false,\n 'messages' => ['attribute' => ['Error']],\n ],\n 'no_data_models' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'frontend_input' => 'text',\n 'is_visible' => true,\n ],\n 'attributeReturns' => ['Error'],\n 'isValid' => false,\n 'messages' => ['attribute' => ['Error']],\n ],\n 'no_data_models_no_frontend_input' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'is_visible' => true,\n ],\n 'attributeReturns' => ['Error'],\n 'isValid' => true,\n 'messages' => [],\n ],\n 'no_data_for attribute' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'data_model' => $this->_getDataModelMock(null),\n 'frontend_input' => 'text',\n 'is_visible' => true,\n ],\n 'attributeReturns' => true,\n 'isValid' => true,\n 'messages' => [],\n 'setData' => ['attribute2' => 'new_test'],\n ],\n 'is_valid_data_from_entity' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'data_model' => $this->_getDataModelMock(null),\n 'frontend_input' => 'text',\n 'is_visible' => true,\n ],\n 'attributeReturns' => true,\n 'isValid' => true,\n 'messages' => [],\n 'setData' => [],\n ],\n 'is_invisible' => [\n 'attributeData' => [\n 'attribute_code' => 'attribute',\n 'data_model' => $this->_getDataModelMock(null),\n 'frontend_input' => 'text',\n 'is_visible' => false,\n ],\n 'attributeReturns' => ['Error'],\n 'isValid' => true,\n 'messages' => [],\n ],\n ];\n }",
"public function testAccessors()\n {\n $dataImportResponseTopLevel = array(new DataImportResponseTopLevel());\n $dataImportResponseDetail = array(new DataImportResponseDetail());\n $dataImportResponse = new DataImportResponse();\n\n $dataImportResponse\n ->setImportDetails($dataImportResponseDetail)\n ->setImportTopLevel($dataImportResponseTopLevel)\n ;\n\n $this->assertSame($dataImportResponseDetail, $dataImportResponse->getImportDetails());\n $this->assertSame($dataImportResponseTopLevel, $dataImportResponse->getImportTopLevel());\n }",
"public function testGetData()\n {\n $res = $this->adventure->getData();\n $this->assertIsArray($res);\n }",
"public function testToArrayHiddenProperties(): void\n {\n $data = ['secret' => 'sauce', 'name' => 'mark', 'id' => 1];\n $entity = new Entity($data);\n $entity->setHidden(['secret']);\n $this->assertEquals(['name' => 'mark', 'id' => 1], $entity->toArray());\n }",
"public function testFetchArray()\n {\n $this->todo('stub');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates a given year To be valid, the passed value should be within the range of 20 years before and after the current year. | private function __isValidYear($year){
if((date('Y') - 20) < $year && $year < date('Y') + 20){
return true;
}else{
throw new PayrollException("Provided year value is out of range.");
}
} | [
"public function validYear() {\n\t\t$nowYear = date('Y');\n\t\treturn in_array($this->year, range($nowYear, $nowYear+20));\n\t}",
"function valid_year($yyyy) {\n if ($yyyy) {\n $yy = trim($yyyy);\n if ($yy < $GLOBALS['conf']['lowest_possible_year']) {\n if ($yy <= 99) {\n if ($yy >= 90) {\n // year is like \"98\", meaning \"1998\"\n $yy = \"19$yy\";\n }\n else {\n if ($yy <= 9) {\n // year is like \"8\", meaning \"2008\"\n $yy = str_replace(\"0\",'',$yy);\n $yy = \"200$yy\";\n }\n else {\n // year is like \"13\", meaning \"2013\"\n $yy = \"20$yy\";\n }\n }\n }\n $yyyy = $yy;\n }\n return $yyyy;\n }\n }",
"public function setValidFromYear($var)\n {\n GPBUtil::checkInt32($var);\n $this->valid_from_year = $var;\n\n return $this;\n }",
"protected function isValidYear($year)\n {\n return $year <= date('Y');\n }",
"function valid_year($year)\n{\n // Get current year and compare to one sent in\n $current_year = date(\"Y\");\n \n // We only allow this and the next year for displays\n if ($year != $current_year && $year != $current_year+1) {\n return FALSE;\n }\n \n // The year is all right\n return TRUE;\n}",
"public function test_year_method()\n {\n $this->assertTrue(Validation::year(2017));\n $this->assertTrue(Validation::year(1917));\n $this->assertFalse(Validation::year(0));\n $this->assertFalse(Validation::year(20018));\n $this->assertFalse(Validation::year('nothing'));\n }",
"function validYearBuilt($yearBuilt)\n {\n return ctype_digit($yearBuilt) && $yearBuilt >= 1600 && $yearBuilt <= 2020;\n }",
"private function validatorYearStart(): Closure\n {\n return static fn (int $year): int => $year < self::YEAR_MIN || $year > self::YEAR_MAX\n ? throw new InvalidArgumentException(\n sprintf(\n 'Start year must be between %d and %d',\n self::YEAR_MIN,\n self::YEAR_MAX,\n ),\n )\n : $year;\n }",
"public function is_year($value){\r\n // Validate \"xxxx-xx-xx xx-xx-xx\" format for timestamp date\r\n if(!preg_match(\"/^[0-9]{4,4}$/\", $value) && $value != ''){\r\n $this->add_message('Please insert a correct year of \"yyyy\" format');\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }",
"function year_validation($str) {\n // $str will be field value which post. will get auto and pass to function.\n $current_year = strtotime($str);\n $timestamp = strtotime('-18 years');\n\n if ($current_year > $timestamp) {\n $this->form_validation->set_message(\"year_validation\", $this->lang->line('invalid_dob'));\n return FALSE;\n } else {\n return TRUE;\n }\n }",
"function checkWithinRange($minYear,$maxYear,$inputYear){\n \n if($inputYear < $minYear || $inputYear > $maxYear){\n return false;\n } \n return true;\n}",
"protected function yearIsValid()\n {\n return $this->year && is_numeric($this->year) && $this->year > 0;\n }",
"function validateYear(string $year): int {\n $year = trim($year);\n if ($year < 1901) {\n return 0;\n } elseif (preg_match('/^\\d{4}$/', $year)) {\n return $year;\n }\n return 0;\n}",
"private function yearMustBeAValidYear(string $year)\n {\n try {\n new \\DateTime($year . '-01-01');\n } catch (\\Exception $exception) {\n // If it's not valid, a generic exception will be thrown to which a more specific exception will be rethrown\n throw InvalidYearException::becauseProvidedYearIsNotValid($exception);\n }\n }",
"function validateBirthdayYear($year)\r\n{\r\n\t$today = getdate(); \r\n\t$cur_year = ($today['year']); \r\n\t\r\n\tif ($year == NULL || $year == -1)\r\n\t{\r\n\t\t$error_message = \"Please select your birthday year.\";\r\n\t\tsendToJS(0, $error_message);\r\n\t}\r\n\telseif (!preg_match('/^[0-9 ]+$/', $year))\r\n\t{\r\n\t\t$error_message = \"Please select your birthday year.\";\r\n\t\tsendToJS(0, $error_message);\r\n\t}\r\n\telseif((int)$year < 1905 | (int)$year > $cur_year)\r\n\t{\r\n\t\t$error_message = \"Please select your birthday year.\";\r\n\t\tsendToJS(0, $error_message);\r\n\t}else\r\n\t{\r\n\t\treturn $year;\r\n\t}\r\n}",
"public function is_year() {}",
"function isValidYearValue($yearString, $minYear, $maxYear) {\n\n $digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\n\n // remove external whitespace\n $yearString = trim($yearString);\n\n // check that $yearString contains 4 characters\n if (strlen($yearString) != 4) {\n return 0;\n }\n\n // check that all the characters in $yearString are digits\n for ($i = 0; $i < strlen($yearString); ++$i) {\n $currentCharacter = substr($yearString, $i, 1);\n if (strpos($yearString, $currentCharacter) === false) {\n return 0; // current character is not a digit\n }\n }\n\n // check that $yearString, when converted to an int, lies between\n // $minYear and $maxYear (both inclusive)\n $year = (int)$yearString;\n if (($year < $minYear) || ($year > $maxYear)) {\n return 0;\n }\n\n // if we've fallen through, the year has passed all the validation checks\n // and is valid\n return 1;\n}",
"function year_range($y_from, $y_to)\n{ \n\t$y_from = refine_input($y_from);\n\t$y_to = refine_input($y_to);\n\n\tif ($y_to < $y_from) \n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\t\n}",
"private function validateIyrField($value)\n {\n return $this->validateYear($value, 2010, 2020);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tricked out version of WP multisite's swtich_to_blog() Tests for multisite, as well as whether the blog_id to swtich to is a legit blog_in in the network | static public function ez_switch_to_blog($int_blog_id = NULL ){
if ( is_multisite() && is_int($int_blog_id) ) {
$int_current_blog_id = get_current_blog_id();
if ( $int_blog_id != $int_current_blog_id ){
// if the blog_id isn't legit then we can't switch to it.
if ( self::blog_id_pass($int_blog_id) === true ) {
switch_to_blog($int_blog_id);
return true;
} else {
// if the blog_id isn't a legit blog_id on the network then send it back, literally
return $int_blog_id;
}
} else {
// nothing is really changing but we'll return true
return true;
}
} else {
return false;
}
} | [
"public function switch_to_blog($_blog_id)\n {\n if (! function_exists('is_multisite') || ! is_multisite()) {\n return false;\n }\n\n $this->blog_prefix = $_blog_id;\n\n return true;\n }",
"function wp_cache_switch_to_blog($blog_id)\n {\n }",
"function civ_switch_to_blog() {\n\tif ( function_exists( 'switch_to_blog' ) ) {\n\t\tswitch_to_blog( 1 ); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blog\n\t}\n}",
"public function switch_to_blog( $_blog_id ) {\n if ( ! function_exists( 'is_multisite' ) || ! is_multisite() ) {\n return false;\n }\n\n $this->blog_prefix = $_blog_id . ':';\n return true;\n }",
"private function is_network_level_site_specific_action() {\n if ( ! $this->_is_network_active ) {\n return false;\n }\n\n if ( ! fs_is_network_admin() ) {\n return false;\n }\n\n $blog_id = fs_request_get( 'blog_id', '' );\n\n return is_numeric( $blog_id ) ? $blog_id : false;\n }",
"public function needs_to_switch_blog() {\n\n\t\tif ( ! $this->multisite_supported() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $blueprint;\n\n\t\tif ( empty( $blueprint ) || get_current_blog_id() === $blueprint ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}",
"function is_current_blog( $blog_id ) {\n\t\t$default = defined( 'BLOG_ID_CURRENT_SITE' ) ? BLOG_ID_CURRENT_SITE : 1;\n\n\t\tif ( $default === (int) $blog_id ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function succulents_qodef_get_multisite_blog_id() {\n\t\tif ( is_multisite() ) {\n\t\t\treturn get_blog_details()->blog_id;\n\t\t}\n\t}",
"function is_current_blog( $blog_id ) {\n\t\t$default = defined( 'BLOG_ID_CURRENT_SITE' ) ? BLOG_ID_CURRENT_SITE : 1;\n\n\t\tif ( $default === $blog_id ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function switch_to_blog( $blog_id ) {\n\t\t$blog_id = (int) $blog_id ;\n\t\t$this->blog_prefix = $this->multisite ? $blog_id . ':' : '' ;\n\t}",
"function move_blog($blog_id, $new_site_id) {\r\n\r\n\t\tglobal $wpdb;\r\n\t\tglobal $url_dependent_blog_options;\r\n\r\n\t\t/* sanity checks */\r\n\t\t$query = \"SELECT * FROM {$wpdb->blogs} WHERE blog_id=\" . (int)$blog_id;\r\n\t\t$blog = $wpdb->get_row($query);\r\n\t\tif(!$blog) {\r\n\t\t\treturn new WP_Error('blog not exist',__('Site does not exist.','njsl-networks'));\r\n\t\t}\r\n\r\n\t\t/** If user requested moving site to its current network, just return that we did */\r\n\t\tif((int)$new_site_id == $blog->site_id) { return true;\t}\r\n\t\t\r\n\t\t$old_site_id = $blog->site_id;\r\n\t\t\r\n\t\tif(ENABLE_HOLDING_SITE && $blog->site_id == 0) {\r\n\t\t\t$oldSite->domain = 'holding.blogs.local';\r\n\t\t\t$oldSite->path = '/';\r\n\t\t\t$oldSite->id = 0;\r\n\t\t} else {\r\n\t\t\t$query = \"SELECT * FROM {$wpdb->site} WHERE id=\" . (int)$blog->site_id;\r\n\t\t\t$oldSite = $wpdb->get_row($query);\r\n\t\t\tif(!$oldSite) {\r\n\t\t\t\treturn new WP_Error('site_not_exist',__('Network does not exist.','njsl-networks'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif($new_site_id == 0 && ENABLE_HOLDING_SITE) {\r\n\t\t\t$newSite->domain = 'holding.blogs.local';\r\n\t\t\t$newSite->path = '/';\r\n\t\t\t$newSite->id = 0;\r\n\t\t} else {\r\n\t\t\t$query = \"SELECT * FROM {$wpdb->site} WHERE id=\" . (int)$new_site_id;\r\n\t\t\t$newSite = $wpdb->get_row($query);\r\n\t\t\tif(!$newSite) {\r\n\t\t\t\treturn new WP_Error('site_not_exist',__('Network does not exist.','njsl-networks'));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( is_subdomain_install() ) {\r\n\r\n\t\t\tif( $blog->domain == $oldSite->domain ) {\r\n\r\n\t\t\t\t/** If this site has no hostname component, just replace the domain name outright */\r\n\t\t\t\t$domain = $newSite->domain;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$exDom = substr( $blog->domain, 0, ( strpos( $blog->domain, '.' ) + 1 ) );\r\n\t\t\t\t$domain = $exDom . $newSite->domain;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\r\n\t\t\t$domain = $newSite->domain;\r\n\t\t\t\r\n\t\t}\r\n\t\t$path = $newSite->path . substr($blog->path,strlen($oldSite->path) );\r\n\t\t\r\n\t\t$update_result = $wpdb->update(\r\n\t\t\t$wpdb->blogs,\r\n\t\t\tarray(\t'site_id'\t=> $newSite->id,\r\n\t\t\t\t\t'domain'\t=> $domain,\r\n\t\t\t\t\t'path'\t\t=> $path\r\n\t\t\t),\r\n\t\t\tarray(\t'blog_id'\t=> $blog->blog_id)\r\n\t\t);\r\n\t\t\t\r\n\t\tif( ! $update_result ) {\r\n\t\t\treturn new WP_Error( 'blog_not_moved', __( 'Site could not be moved.', 'njsl-networks' ) );\r\n\t\t}\r\n\t\t\r\n\t\t/** change relevant blog options */\r\n\t\t$optionTable = $wpdb->get_blog_prefix( $blog->blog_id ) . 'options';\r\n\r\n\t\t$oldDomain = $oldSite->domain . $oldSite->path;\r\n\t\t$newDomain = $newSite->domain . $newSite->path;\r\n\r\n\t\tforeach( $url_dependent_blog_options as $option_name ) {\r\n\t\t\t$option = $wpdb->get_row(\"SELECT * FROM $optionTable WHERE option_name='\" . $option_name . \"'\");\r\n\t\t\t$newValue = str_replace($oldDomain,$newDomain,$option->option_value);\r\n\t\t\tupdate_blog_option($blog->blog_id,$option_name,$newValue);\r\n\t\t}\r\n\t\t\r\n\t\t// Delete rewrite rules for site at old URL\r\n\t\tdelete_blog_option( $blog->blog_id, 'rewrite_rules' );\r\n\t\t\r\n\t\tdo_action( 'wpmu_move_blog' , $blog_id, $old_site_id, $new_site_id );\r\n\t\tdo_action( 'wpms_move_site' , $blog_id, $old_site_id, $new_site_id );\r\n\t}",
"public function switch_to_blog( $blog_id ) {\n\t\t$blog_id = (int) $blog_id;\n\t\t$this->blog_prefix = $this->multi_site ? $blog_id : 1;\n\t}",
"function choose_primary_blog()\n {\n }",
"function switch_site() {\n // confirm whether this is the main site, if not switch over to it\n if ( MAIN_SITE != \"\" ) {\n switch_to_blog( MAIN_SITE );\n }\n}",
"function switch_to_main_blog_in_filter( $value ) {\n\tswitch_to_main_blog();\n\n\treturn $value;\n}",
"private function is_current_blog( $blog_id ) {\n\t\t\t$default = defined( 'BLOG_ID_CURRENT_SITE' ) ? BLOG_ID_CURRENT_SITE : 1;\n\n\t\t\tif ( $default === $blog_id ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"function isMediaSite(): bool\n{\n return ( getSideId() === (int) $GLOBALS['current_blog']->blog_id );\n}",
"public function switch_site() {\r\n\t\t// Already switched, don't overkill, dude.\r\n\t\tif ( self::$switched ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Switch if not in main site.\r\n\t\tif ( ! is_main_site() ) {\r\n\t\t\t// Switch to main site.\r\n\t\t\tswitch_to_blog( $this->main_site_id() );\r\n\r\n\t\t\t// Switch flag.\r\n\t\t\tself::$switched = true;\r\n\t\t}\r\n\t}",
"function get_active_blog_for_user( $user_id ) {\n\tglobal $wpdb;\n\t$blogs = get_blogs_of_user( $user_id );\n\tif ( empty( $blogs ) )\n\t\treturn;\n\n\tif ( !is_multisite() )\n\t\treturn $blogs[$wpdb->blogid];\n\n\t$primary_blog = get_user_meta( $user_id, 'primary_blog', true );\n\t$first_blog = current($blogs);\n\tif ( false !== $primary_blog ) {\n\t\tif ( ! isset( $blogs[ $primary_blog ] ) ) {\n\t\t\tupdate_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );\n\t\t\t$primary = get_blog_details( $first_blog->userblog_id );\n\t\t} else {\n\t\t\t$primary = get_blog_details( $primary_blog );\n\t\t}\n\t} else {\n\t\t//TODO Review this call to add_user_to_blog too - to get here the user must have a role on this blog?\n\t\tadd_user_to_blog( $first_blog->userblog_id, $user_id, 'subscriber' );\n\t\tupdate_user_meta( $user_id, 'primary_blog', $first_blog->userblog_id );\n\t\t$primary = $first_blog;\n\t}\n\n\tif ( ( ! is_object( $primary ) ) || ( $primary->archived == 1 || $primary->spam == 1 || $primary->deleted == 1 ) ) {\n\t\t$blogs = get_blogs_of_user( $user_id, true ); // if a user's primary blog is shut down, check their other blogs.\n\t\t$ret = false;\n\t\tif ( is_array( $blogs ) && count( $blogs ) > 0 ) {\n\t\t\tforeach ( (array) $blogs as $blog_id => $blog ) {\n\t\t\t\tif ( $blog->site_id != $wpdb->siteid )\n\t\t\t\t\tcontinue;\n\t\t\t\t$details = get_blog_details( $blog_id );\n\t\t\t\tif ( is_object( $details ) && $details->archived == 0 && $details->spam == 0 && $details->deleted == 0 ) {\n\t\t\t\t\t$ret = $blog;\n\t\t\t\t\tif ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id )\n\t\t\t\t\t\tupdate_user_meta( $user_id, 'primary_blog', $blog_id );\n\t\t\t\t\tif ( !get_user_meta($user_id , 'source_domain', true) )\n\t\t\t\t\t\tupdate_user_meta( $user_id, 'source_domain', $blog->domain );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\treturn $ret;\n\t} else {\n\t\treturn $primary;\n\t}\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a function, squares, that takes an array of numbers as an argument. Return a new array containing the square of each number. | function squares(array $nums) : array {
$squaredNums = [];
foreach ($nums as $key => $value) {
$squaredNums[] = $value * $value;
};
return $squaredNums;
} | [
"function square_n_sum($array_of_numbers) {\n for ($i = 0; $i < sizeof($array_of_numbers); $i++) {\n $array_of_numbers[$i] = $array_of_numbers[$i] ** 2;\n }\n $sum_of_squared_numbers = 0;\n for ($i = 0; $i < sizeof($array_of_numbers); $i++) {\n $sum_of_squared_numbers += $array_of_numbers[$i];\n }\n return $sum_of_squared_numbers;\n}",
"function square_sum($numbers): int\n{\n // create empty var for result value\n $result = 0;\n\n // square each number of array and sum to the result var\n foreach ($numbers as $number) {\n $sqrNumber = $number ** 2;\n $result += $sqrNumber;\n }\n return $result;\n}",
"function square_the_values($arr){\n foreach ($arr as $index => $value) {\n $arr[$index] = $value * $value;\n }\n var_dump($arr);\n return $arr;\n}",
"function square_sum($numbers) : int {\n $result = 0;\n foreach ($numbers as $value) {\n $result += $value ** 2;\n }\n return $result;\n}",
"function squared_sum($numbers) {\n $sum = 0; \n foreach ($numbers as $number) {\n $sum += $number * $number;\n } \n return $sum;\n }",
"function sumOfSquares($n) {\n return array_reduce(range(1, $n), function ($sum, $x) {\n return $sum+= pow($x, 2);\n });\n}",
"function square($num){\r\n return $num * $num;\r\n }",
"function double(array $nums) : array {\r\n\r\n $doubledNums = [];\r\n\r\n foreach ($nums as $key => $value) {\r\n $doubledNums[] = $value * 2;\r\n };\r\n\r\n return $doubledNums;\r\n}",
"function square($num){\n $square = $num * $num;\n return $square;\n \n\n}",
"function multiply($num, $multiple){\n $new_array= array();\n foreach ($num as $number) {\n array_push($new_array, $number * $multiple);\n }\n return $new_array;\n}",
"function fnSquareSum($n){\r\nreturn(bcpow(fnTriNumber($n),2));\r\n}",
"public function calculate(array $numbers);",
"public function getArrayOfSquare()\n {\n return $this->arrayOfSquare;\n }",
"function formingMagicSquare($sq)\n{\n foreach($sq as $a)\n {\n array_map('print_r', $a); \n }\n}",
"function madeSquares($f_row, $f_col, $l_row, $l_col, $conn, $gameId){\r\n\treturn whereCheckSquares($f_row, $f_col, $l_row, $l_col, $conn, $gameId);\r\n}",
"function squareOfSum(int $num): int\n{\n // sum of sequence: k = (n²+n)/2\n return pow(($num * $num + $num) / 2, 2);\n}",
"public function testSquareArray()\n {\n $m = np::linspace(1, 9, 9)->reshape(3, 3);\n \n // M 3*3, offset=0\n $this->assertEquals(\n [[1, 2, 3],\n [0, 5, 6],\n [0, 0, 9]],\n $m->triu()->data,\n 'M 3*3, offset=0 should be\n [[1, 2, 3],\n [0, 5, 6],\n [0, 0, 9]].'\n );\n }",
"public static function map(array $array, callable $closure) : array\n {\n return array_map($closure, $array);\n }",
"function inputArray($n)\n{\n $arr = [];\n\n for ($i = 0; $i < $n; $i++) {\n\n $arr[$i] = inputInt();\n\n }\n\n return $arr;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to map specialities to include full category path | public static function includeCategoriesPath(Collection $specialities): Collection {
// Get unique ids for categories
$categoriesIds = $specialities->reduce(function (array $acc, ProfileSpeciality $speciality) {
return array_unique(array_merge($acc, $speciality->getCategoryPathIdsAttribute()));
}, []);
// Load categories into memory
$categories = Category::query()
->whereIn('id', $categoriesIds)
->get()
->reduce(function (array $acc, Category $category) { $acc[$category->id] = $category; return $acc; }, []);
// Map categories' ids list into categories list
return $specialities->map(function (ProfileSpeciality $speciality) use ($categories) {
$categories = array_map(
function ($id) use ($categories) { return $categories[$id] ?? null; },
$speciality->getCategoryPathIdsAttribute()
);
return array_merge($speciality->toArray(), ['categories' => $categories]);
});
} | [
"public function setCategoryPaths();",
"function getNewsCategoryPath() {\n\treturn rewrite_path(\"/category/\",\"&category=\",false);\n}",
"public function getUrlRewriteProductCategoryAction();",
"public function getSpecial() {\n $this->autoRender = false;\n $typename = $this->request->data['type'];\n $data = $this->Category->getSpecial($typename);\n echo json_encode($data);\n }",
"public function getCategoryAssembler();",
"public function generateSpecialProductsCategory()\n {\n $this->log('Adding \"xt_special_products\" category.', ShopgateLogger::LOGTYPE_DEBUG);\n $categoryModel = new ShopgateCategoryModel();\n $categoryModel->setUid('xt_special_products');\n $categoryModel->setParentUid(null);\n $categoryModel->setName(TEXT_SPECIAL_PRODUCTS);\n $categoryModel->setDeeplink(_SYSTEM_BASE_HTTP . _SRV_WEB . $this->language->code . '/xt_special_products');\n $categoryModel->setSortOrder(0);\n $categoryModel->setIsActive(1);\n\n return $categoryModel;\n }",
"function getGenreCategoryMapping() {\n\t\tassert(false);\n\t}",
"protected function set_categories_map() {\n $this->partial(\"Generating categories map ... \");\n $categories = get_terms([\n 'taxonomy' => 'travel-dir-category',\n 'hide_empty'=> false,\n ]);\n foreach ($categories as $category) {\n $this->categories[$category->term_id] = $category->name;\n }\n $this->success(\"OK\");\n }",
"function smarty_function_mtsubcategorypath($args, &$ctx) {\n require_once(\"block.mtparentcategories.php\");\n require_once(\"function.mtcategorylabel.php\");\n require_once(\"modifier.dirify.php\");\n\n $args = array('glue' => '/');\n $content = null;\n $repeat = true;\n smarty_block_mtparentcategories($args, $content, $ctx, $repeat);\n $res = '';\n while ($repeat) {\n $content = smarty_function_mtcategorylabel(array(), $ctx);\n $content = smarty_modifier_dirify($content, isset($args['separator']) ? $args['separator'] : '1');\n $res .= smarty_block_mtparentcategories($args, $content, $ctx, $repeat);\n }\n return $res;\n}",
"public function getCategoryMountPoints() {}",
"public function getMainCategory();",
"function parts_accessories_categories() {\n register_taxonomy (\n 'parts_accessories',\n 'parts-accessories',\n array(\n 'hierarchical' => true,\n 'label' => 'P+A Categories',\n 'public' => true,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n )\n );\n}",
"function article_category_slug() {\n $category = Registry::get('category');\n return $category->slug;\n}",
"public function path()\n {\n return '/category/'.$this->slug;\n }",
"function get_category_special($p_category, $p_spect, $p_type)\n {\n $data['auth_scope_special'] = $this->m_apply_license->get_category($p_category, $p_spect, $p_type, '2');\n $this->load->view('apply_license/tab_special/view_tab_scope_special', $data);\n return true;\n }",
"function mediators_custom_taxonomy_specialty()\n{\n\t$labels = array(\n\t\t'name' => _x('전문분야', 'taxonomy general name'),\n\t\t'singular_name' => _x('전문분야', 'taxonomy singular name'),\n\t\t'search_items' => __('전문분야 검색하기'),\n\t\t'all_items' => __('전문분야 전체보기'),\n\t\t'parent_item' => __('상위 전문분야'),\n\t\t'parent_item_colon' => __('상위 전문분야:'),\n\t\t'edit_item' => __('전문분야 수정하기'),\n\t\t'update_item' => __('전문분야 적용하기'),\n\t\t'add_new_item' => __('신규 전문분야 등록하기'),\n\t\t'new_item_name' => __('신규 전문분야 이름'),\n\t\t'menu_name' => __('전문분야'),\n\t);\n\tregister_taxonomy('specialty', array('mediators'), array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array('slug' => 'specialty'),\n\t));\n}",
"public function categoryPermalink()\n {\n return DOMAIN_CATEGORIES.$this->categoryKey();\n }",
"public function _buildCustomCategories() {\n $gId = $this->addCustomGrouping();\n $cId1 = $this->addCustomCategory('Custom Level 1', $gId);\n $cId2 = $this->addCustomCategory('Custom Level 2', $cId1);\n $cId3 = $this->addCustomCategory('Custom Level 3', $cId2);\n }",
"public function getCategorySlug();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case for fileContainerDestroyContainer | public function test_fileContainerDestroyContainer() {
} | [
"function delete_file($container, $file_name)\n\t{\n\t\t$my_container = $this->_conn->get_container($container);\n\t\t$my_container->delete_object($file_name);\n\t}",
"public function test_fileContainerCreate() {\n\n }",
"public function testCloseDirectory() {\r\n\t\t$storageClient = $this->_createStorageClient ();\r\n\t\t$storageClient->registerStreamWrapper ();\r\n\t\t\r\n\t\t$containerName = $this->getContainerName ();\r\n\t\t\r\n\t\t$content = \"I love hello kitty.\";\r\n\t\t$blobName = \"blobfile\";\r\n\t\t\r\n\t\t//prepare resources\r\n\t\tmkdir ( 'azure://' . $containerName );\r\n\t\tfile_put_contents ( 'azure://' . $containerName . \"/\" . $blobName, $content );\r\n\t\t\r\n\t\t$dh = opendir ( 'azure://' . $containerName );\r\n\t\t\r\n\t\t$result = file_get_contents ( 'azure://' . $containerName . \"/\" . $blobName );\r\n\t\t$this->assertEquals ( $result, $content );\r\n\t\tclosedir ( $dh );\r\n\t\t$exception = null;\r\n\t\ttry {\r\n\t\t\t$result = file_get_contents ( 'azure://' . $containerName . \"/\" . $blobName );\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\t$exception = $e;\r\n\t\t}\r\n\t\t$this->assertNull ( $exception );\r\n\t}",
"public function destroy()\n {\n $this->files->delete($this->porterLibrary->dockerComposeFile());\n }",
"public function testFileDestroyRoute()\n {\n Storage::fake('public');\n\n $upload = UploadedFile::fake()->create('test.mp3');\n $type = 'audio';\n $path = Storage::disk('public')->putFile('files/' . $type, $upload, 'public');\n\n $file = File::create([\n 'filename' => $upload->name,\n 'path' => $path,\n 'type' => $type,\n 'extension' => 'mp3',\n 'alt' => 'foo',\n 'city_id' => $this->city->id,\n 'imagetype_id' => null\n ]);\n\n $this->assertDatabaseHas('files', ['filename' => 'test.mp3']);\n Storage::disk('public')->assertExists('/files/' . $type . '/' . $upload->hashName());\n\n\n $response = $this\n ->actingAs($this->user)\n ->call(\n 'DELETE',\n '/file/destroy/' . $file->id,\n ['_token' => csrf_token()]\n );\n\n $response\n ->assertRedirect('/city/' . $this->city->id . '/files/' . $type)\n ->assertStatus(302)\n ->assertSessionHas('success')\n ->assertSessionHasNoErrors();\n\n $this->assertDatabaseMissing('files', ['filename' => 'test.mp3']);\n Storage::disk('public')->assertMissing('/files/' . $type . '/' . $upload->hashName());\n }",
"public function testDestroy()\n {\n $this->filecache->expects($this->once())\n ->method('remove')\n ->with($this->equalTo('session'));\n\n $this->session = new Session($this->filecache);\n $out = $this->session->destroy();\n $this->assertNull($out);\n }",
"public function testDeleteFile()\n {\n }",
"public function test_fileContainerGetContainer() {\n\n }",
"function deleteFromCloudHosting($containerName, $cloudFileName) \n {\n \n include_once '../vendors/rackspace_cloudfiles/cloudfiles.php'; \n // Connect to Rackspace\n $Auth = new CF_Authentication(RACKSPACE_CLOUDFILE_USERNAME, RACKSPACE_CLOUDFILE_APIKEY);\n $Auth->authenticate();\n $Connection = new CF_Connection($Auth);\n \n // Get the container we want to use\n $Container = $Connection->get_container($containerName);\n \n // check for exists file\n $CheckExistObject = new CF_Object($Container, $cloudFileName);\n if (!$CheckExistObject->exists()) { \n return false; \n }\n // delete file\n return $Container->delete_object($cloudFileName); \n }",
"public function testDeleteAisleFile()\n {\n }",
"public function testDeleteWorkFile()\n {\n }",
"public function testRemove()\n {\n // Start of user code ServiceContainerTest.testremove\n $this->assertFalse(ServiceContainer::has('some-service'));\n ServiceContainer::register(\n 'some-service',\n 'TiBeN\\\\Framework\\\\Tests\\\\Fixtures\\\\ServiceContainer\\\\SomeService',\n array('%some-parameter')\n );\n $this->assertTrue(ServiceContainer::has('some-service'));\n ServiceContainer::remove('some-service');\n $this->assertFalse(ServiceContainer::has('some-service'));\n // End of user code\n }",
"public function testDeleteReceivingProcessFile()\n {\n }",
"#[@test]\n public function noLongerExistsAfterDeleting() {\n $this->writeData($this->file, null);\n $this->file->unlink();\n $this->assertFalse($this->file->exists());\n }",
"function deleteFile($container,$pointer) {\n\t\t\t// Amazon S3\n\t\t\tif ($this->Service == \"amazon\") {\n\t\t\t\t$response = $this->callAmazonS3(\"DELETE\",$container,$pointer);\n\t\t\t\tif ($this->HTTPResponseCode != \"204\") {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t// Rackspace Cloud Files\n\t\t\t} elseif ($this->Service == \"rackspace\") {\n\t\t\t\tglobal $bigtree;\n\t\t\t\t$response = $this->callRackspace(\"$container/$pointer\",\"\",array(CURLOPT_CUSTOMREQUEST => \"DELETE\"));\n\t\t\t\tif ($bigtree[\"last_curl_response_code\"] == 204) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t// Google Cloud Storage\n\t\t\t} elseif ($this->Service == \"google\") {\n\t\t\t\t$error_count = count($this->Errors);\n\t\t\t\t$response = $this->call(\"b/$container/o/\".urlencode($pointer),false,\"DELETE\");\n\t\t\t\tif (count($this->Errors) > $error_count) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function test_fileContainerCreateChangeStreamPostFileContainersChangeStream() {\n\n }",
"public function tearDown() {\n $this->container = null;\n }",
"public function testCommunicationLogBlobsDelete()\n {\n }",
"public function testDeleteGs1128TemplateFile()\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to add owner id and created date to the insert data | protected function _addOwnerIdAndCreated(array $data)
{
if($this->hasOwnerIdField() && empty($data['owner_id'])) {
$data['owner_id'] = $this->_getCurrentUserId();
}
if($this->hasCreatedField() && empty($data['created'])) {
$data['created'] = $this->_getCurrentDateTime();
}
return $data;
} | [
"public function insert() {\n $this->updateCoordinates();\n $this->data['creation_datetime'] = date('Y-m-d H:i:s');\n $this->data['change_datetime'] = date('Y-m-d H:i:s');\n parent::insert();\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 }",
"function _add_creator($data){\n $data[\"created\"]=date(\"Y-m-d H:i:s\");\n $data[\"creator\"]=$this->data[\"users\"][\"user\"][\"username\"];\n $data[\"edited\"]=date(\"Y-m-d H:i:s\");\n $data[\"editor\"]=$this->data[\"users\"][\"user\"][\"username\"];\n return $data;\n }",
"public function insert() {\n $this->normalizePhone();\n $this->normalizeEmail();\n\n $this->setInsertId();\n\n $this->created = date('Y-m-d H:i:s');\n $this->updated = date('Y-m-d H:i:s');\n\n return parent::insert();\n }",
"private function addUserStamps() {\n\n $createdBy = new GeneratorField();\n $createdBy->name = $this->userStamps[0];\n $createdBy->parseDBType('number');\n $createdBy->parseOptions('s,f,if,ii');\n\n $this->fields[] = $createdBy;\n\n $updatedBy = new GeneratorField();\n $updatedBy->name = $this->userStamps[1];\n $updatedBy->parseDBType('number');\n $updatedBy->parseOptions('s,f,if,ii');\n\n $this->fields[] = $updatedBy;\n\n if ($this->getOption('softDelete')) {\n\n $deletedBy = new GeneratorField();\n $deletedBy->name = $this->userStamps[2];\n $deletedBy->parseDBType('number');\n $deletedBy->parseOptions('s,f,if,ii');\n\n $this->fields[] = $deletedBy;\n }\n }",
"public function insert() {\n $this->exclude('id'); // exclude primary key \n \n // default values\n $this->fields['created_date'] = Ediary_Db::today();\n $this->fields['created_time'] = Ediary_Db::now();\n $this->fields['saved_at'] = Ediary_Db::datetime();\n \n // Insert into DB\n $result = parent::insertRow($this->getDb()->diarys);\n \n // Reset fields\n $this->fields['id'] = self::getDb()->lastInsertId();\n $this->fields = array_merge($this->fields, $this->newFields);\n $this->newFields = array();\n \n return $result;\n }",
"function createOwner()\n {\n // select all query\n $query = \"INSERT INTO owners(NAME,C_MAIL,C_TEL) VALUES ('\" . $this->subName . \"','\" . $this->subMail . \"','\" . $this->subTel . \"')\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n return $stmt;\n }",
"protected function _create()\n {\n $data = $this->_getData();\n if(!empty($data)) {\n try {\n $sql = 'INSERT INTO' . ' ' . $this->_getTableName() . '(' . implode(', ', array_keys($data)) . ') '\n . 'VALUES(' . implode(',', array_fill(0, count($data), '?')) . ')';\n\n if($this->_execute($sql, array_values($data))) {\n $this->_setId($this->_conn->lastInsertId());\n }\n } catch (\\PDOException $e) {\n echo $e->getMessage();\n }\n }\n }",
"public function insert()\n {\n $this->datecreated = date('Y-m-d H:i:s');\n $this->datelastupdated = date('Y-m-d H:i:s');\n if (isset($_SESSION['_authsession'])) {\n $this->uidcreated = $_SESSION['_authsession']['username'];\n $this->uidlastupdated = $_SESSION['_authsession']['username'];\n }\n $r = parent::insert();\n if ($r) {\n // Clean the cache on successful insert.\n UNL_UCBCN::cleanCache();\n if (self::processSubscriptions() && $this->status != 'pending') {\n $event = $this->getLink('event_id');\n if ($event->approvedforcirculation) {\n Subscription::updateSubscribedCalendars($this->calendar_id, $this->event_id);\n }\n }\n //loop though all eventdatetimes for this event, creating facebook events.\n $eventdatetimes = UNL_UCBCN::factory('eventdatetime');\n $eventdatetimes->event_id = $this->event_id;\n $rows = $eventdatetimes->find();\n while ($eventdatetimes->fetch()) {\n $facebook = new \\UNL\\UCBCN\\Facebook\\Instance($eventdatetimes->id);\n $facebook->updateEvent();\n }\n }\n return $r;\n }",
"public function insert()\n {\n $this->datecreated = date('Y-m-d H:i:s');\n $this->datelastupdated = date('Y-m-d H:i:s');\n if (isset($_SESSION['_authsession'])) {\n $this->uidcreated = $_SESSION['_authsession']['username'];\n $this->uidlastupdated = $_SESSION['_authsession']['username'];\n }\n $r = parent::insert();\n if ($r) {\n // Clean the cache on successful insert.\n UNL_UCBCN::cleanCache();\n if (self::processSubscriptions() && $this->status != 'pending') {\n $event = $this->getLink('event_id');\n if ($event->approvedforcirculation) {\n UNL_UCBCN_Subscription::updateSubscribedCalendars($this->calendar_id, $this->event_id);\n }\n }\n //loop though all eventdatetimes for this event, creating facebook events.\n $eventdatetimes = UNL_UCBCN::factory('eventdatetime');\n $eventdatetimes->event_id = $this->event_id;\n $rows = $eventdatetimes->find();\n while ($eventdatetimes->fetch()) {\n $facebook = new UNL_UCBCN_FacebookInstance($eventdatetimes->id);\n $facebook->updateEvent();\n }\n }\n return $r;\n }",
"private function processOwnerData() {\n\t\t$this->addRealtyRecordsOwner();\n\t\tif ($this->isOwnerDataUsable()) {\n\t\t\t$this->setProperty('contact_data_source', 1);\n\t\t}\n\t}",
"public function addOwner(User $owner);",
"private function batchSaveAddPersons()\n {\n if ($this->id) {\n $field = 'updated_by';\n } else {\n $field = 'created_by';\n }\n\n if ($this->hasField($field) and !isset($this->data_being_saved[$field])) {\n $this->data_being_saved[$field] = user()->id;\n }\n }",
"public function createOwner(){\r\n\t\t$this->passedData = array(\r\n\t\t\t\t$this->owner->getFname(),\r\n\t\t\t\t$this->owner->getLname(),\r\n\t\t\t\t$this->owner->getEmail(),\r\n\t\t\t\t$this->owner->getPhone(),\r\n\t\t\t\t$this->owner->getUsername(),\r\n\t\t\t\t$this->owner->getPassword(),\r\n\t\t\t\t$this->dateTime\r\n\t\t\t);\r\n\r\n\t\t$this->owner = new Owner();\r\n\r\n\t\ttry{\r\n\t\t\t$this->pdo->beginTransaction();\r\n\t\t\t$this->sql = \"INSERT INTO owners VALUES(null,?,?,?,?,?,?,?)\";\r\n\t\t\t$this->pdoPrepareAndExecute();\r\n\t\t\t$ownerId = $this->pdo->lastInsertId();\r\n\t\t\t$this->owner = $this->getOwner($ownerId);\r\n\t\t\t$this->pdo->commit();\r\n\r\n\t\t}catch(\\PDOException $e){\r\n\t\t\t$this->pdo->rollback();\r\n\t\t\t\r\n\t\t\t//logger required!\r\n\t\t}\r\n\t\treturn $this->owner;\t\t\r\n\t}",
"public function creationTimestamp() {\n $this->setCreatedAt(new \\DateTime('now'));\n }",
"function setDateOwner() {\n if (isset($this->params['surfer_id']) ||\n isset($this->params['surfergroup_id'])) {\n $data = array();\n // set surfer id\n if (isset($this->params['surfer_id'])) {\n $data['surfer_id'] = $this->params['surfer_id'];\n } else {\n $data['surfer_id'] = '';\n }\n // set surfergroup id\n $data['surfergroup_id'] = (\n isset($this->params['surfergroup_id']) && (int)$this->params['surfergroup_id'] > 0\n ) ? $this->params['surfergroup_id'] : 0;\n // try to update database if data exists\n return FALSE !== $this->databaseUpdateRecord(\n $this->tableDates, $data, 'date_id', (int)$this->params['date']\n );\n }\n return FALSE;\n }",
"public function add_owner($id){\n $car = Car::find($id);\n $owner=new Owner();\n $owner->name = 'Sonam';\n $car->owner()->save($owner);\n }",
"public function creating(OdometerEntries $entry)\n {\n if(Auth::user()) {\n $entry->created_by = Auth::user()->id;\n }\n\n\n }",
"protected function merge_initial_owner_id() {\n\t\t$this->merge( array( 'ownerID' => get_current_user_id() ) );\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
populateSimpleTinyMceEditor() To populate simple tiny mce editor | function populateSimpleTinyMceEditor($field_name='', $value='')
{
global $CFG;
global $LANG;
?>
<script type="text/javascript" src="<?php echo $CFG['site']['url'];?>js/lib/tinymce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "exact",
elements: "<?php echo $field_name; ?>",
theme : "advanced",//"advanced", "simple"
plugins : "safari,advlink,emotions,inlinepopups,noneditable,xhtmlxtras",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,undo,redo,cleanup,|,styleselect,formatselect,fontselect,fontsizeselect,",
theme_advanced_buttons2 : "bullist,numlist,|,justifyleft,justifycenter,justifyright,justifyfull,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,|,link,unlink,|,forecolor,|,code",
theme_advanced_buttons3 : false,
theme_advanced_buttons4 : false,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "none",
width: "100%",
height : "370",
theme_advanced_resizing_min_height : 370,
theme_advanced_resizing_max_height : 500,
use_native_selects : true,
convert_urls : false,
remove_script_host : false,
//relative_urls : false,
//theme_advanced_resizing : true,
//auto_resize: true
cleanup_on_startup : true
// Replace values for the template plugin
/*template_replace_values : {
username : "Some User",
staffid : "991234"
}*/
});
</script>
<div id="desc_textarea"><textarea name="<?php echo $field_name; ?>"><?php echo $value; ?></textarea></div>
<noscript><p><b><?php echo $LANG['javascript_enabled'];?></b></p></noscript>
<?php
} | [
"public function load_tiny_mce() {\r\n\t\twp_tiny_mce( false, array(\r\n\t\t\t'editor_selector' => 'story[story_content]'\r\n\t\t\t)\r\n\t\t);\r\n\t}",
"function jceEditorGetContents( ) {?>\r\n\ttinyMCE.triggerSave();\r\n\t<?php\r\n}",
"function islamic_center_print_tinymce_editor(){\n\t\t\t\twp_editor( islamic_center_stopbackslashes($_POST['content']), \n\t\t\t\t\t$_POST['id'], array('textarea_name'=> $_POST['name']) );\t\t\t\n\t\t\t\tdie();\n\t\t\t}",
"public static function loadTinyMCE($admin = false)\n {\n $tinyMCE = '<!--TinyMCE Editor Load Start-->\n <script type=\"text/javascript\" src=\"/portfolio/Unus/plugins/Admin_TinyMCE/js/tiny_mce/tiny_mce.js\"></script>\n <script type=\"text/javascript\">\n tinyMCE.init({\n // General options\n mode : \"textareas\",\n theme : \"advanced\",\n skin : \"o2k7\",\n skin_variant : \"silver\",\n height: \"450\",\n margin: \"4px\",\n plugins : \"safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager\",\n \n // Theme options\n theme_advanced_buttons1 : \"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect\",\n theme_advanced_buttons2 : \"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor\",\n theme_advanced_buttons3 : \"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen\",\n theme_advanced_buttons4 : \"insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage\",\n theme_advanced_toolbar_location : \"top\",\n theme_advanced_toolbar_align : \"left\",\n theme_advanced_statusbar_location : \"bottom\",\n \n // Example content CSS (should be your site CSS)';\n if ($admin)\n {\n $tinyMCE .= 'content_css : \"'.WEBPATH.'/admin/stylesheet.css\",';\n }\n else\n {\n $tinyMCE .= 'content_css : \"'.WEBPATH.'/stylesheet.css\",';\n }\n \n $tinyMCE .= '\n \n });\n </script>\n <!--TinyMCE Editor End-->';\n echo $tinyMCE;\n }",
"function smr_mail_content(){\n\t$content = get_option('smr_settings_group');\n\t$settings = array( //tinyMCE settings\n\t\t'textarea_name' => 'smr_settings_group[mail_content]',\n\t\t'wpautop' => true\n\t);\n\twp_editor($content['mail_content'], 'smreditor', $settings ); //create an editor\n}",
"function load_wp_tiny_mce() {\n\t\t\tif ( ! $this->is_eddpromo_page() )\n\t\t\t\treturn;\n\n\t\t\t$settings = array(\n\t\t\t\t'editor_selector' => 'edd_promo_template',\n\t\t\t\t'height' => '400'\n\t\t\t);\n\n\t\t\twp_tiny_mce( false, $settings );\n\t\t}",
"function pm_tinymce() {\n\t\tif ( bp_is_messages_component() && isset( $_POST['send'] ) && empty( $_POST['content'] ) && !empty( $_POST['message_content'] ) ) {\n\t\t\t$_POST['content'] = $_POST['message_content'];\n\t\t}\n\t}",
"function add_wysiwyg_editor_to_amelia_events_desc_editor(){\r\n ?>\r\n\t<script src=\"/assets/tinymce/tinymce.min.js\" referrerpolicy=\"origin\"></script>\r\n <script>\r\n\t\tconst editor_id = \"amelia_event_desc_<?=time()?>\";\r\n\r\n\t\tdocument.addEventListener(\"click\", function(){\r\n\t\t\tinitAmeliaEventDescTextArea();\r\n\t\t});\r\n\r\n\t\tfunction initAmeliaEventDescTextArea() {\r\n\t\t\t// console.log(tinymce.editors);\r\n\t\t\t// console.log(tinymce.activeEditor);\r\n\t\t\tconst inputField = jQuery(document).find('.el-textarea__inner');\r\n\t\t\tconst currentId = inputField.attr(\"id\") || editor_id;\r\n\t\t\tinputField.attr(\"id\", currentId);\r\n\t\t\tif(!inputField.hasClass(\"ameliaEventDesc\")){\r\n\t\t\t\tinputField.addClass(\"ameliaEventDesc\");\r\n\t\t\t}\r\n\t\t\ttinymce.remove('#'+currentId);\r\n\t\t\ttinymce.init({\r\n\t\t\t\tmenubar:false,\r\n \t\t\tstatusbar: false,\r\n\t\t\t\tselector: '#'+currentId, setup: function (ed) {\r\n\t\t\t\t\ted.on('change', function (e) {\r\n\t\t\t\t\t\tif(tinymce.activeEditor){\r\n\t\t\t\t\t\t\tupdateAmeliaEventDescVueField(currentId);\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\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tfunction updateAmeliaEventDescVueField(currentId){\r\n\t\t\tconst newContent = tinymce.get(currentId).getContent({ format: 'html' });\r\n\t\t\tconst textField = jQuery(document).find('.el-textarea__inner');\r\n\t\t\ttextField.val(newContent)[0].dispatchEvent(new Event('input'))\r\n\t\t}\r\n\r\n\t\tfunction doesEventDescriptionFieldExists(){\r\n\t\t\tif(jQuery('#'+editor_id).position() == undefined){\r\n\t\t\t\tinitAmeliaEventDescTextArea();\r\n\t\t\t}\r\n\t\t\t// check every two seconds\r\n\t\t\tsetTimeout(doesEventDescriptionFieldExists, 2000);\r\n\t\t}\r\n\r\n\t\t// consistently check for class ameliaEventDesc\r\n\t\tdoesEventDescriptionFieldExists();\r\n\r\n </script>\r\n <?php\r\n}",
"function define_wp_tiny_mce() {\n\t\tfunction wp_tiny_mce() {\n\t\t\treturn;\n\t\t}\n\t}",
"function nn_wysiwyg(){\n\t\t\n\t\t$options = get_option('nn_sub_general_options');\n\t\tif(!isset($options['nn_wp_edit'])) $options['nn_wp_edit'] = '';\n\t\t$wysiwyg_settings = array('textarea_name' => 'nn_sub_general_options[nn_wp_edit]', 'media_buttons' => false);\n\t\t$wysiwyg_content = $options['nn_wp_edit'];\n\t\t$wysiwyg_id = 'nn_wp_edit';\n\t\twp_editor( $wysiwyg_content, $wysiwyg_id, $wysiwyg_settings );\n\t}",
"function sb_component_editor($admin = false) { ?>\n <div class=\"sb-editor\">\n <?php if ($admin) echo '<div class=\"sb-labels\"></div>' ?>\n <div class=\"sb-textarea\"><textarea placeholder=\"<?php sb_e('Write a message...') ?>\"></textarea></div>\n <div class=\"sb-attachments\"></div>\n <div class=\"sb-bar\">\n <div class=\"sb-bar-icons\">\n <?php if ($admin || !sb_get_setting('disable-uploads')) echo '<div class=\"sb-btn-attachment\" data-sb-tooltip=\"' . sb_('Attach a file') . '\"></div>'; ?> \n <div class=\"sb-btn-saved-replies\" data-sb-tooltip=\"<?php sb_e('Add a saved reply') ?>\"></div>\n <div class=\"sb-btn-emoji\" data-sb-tooltip=\"<?php sb_e('Add an emoji') ?>\"></div>\n <?php if ($admin && defined('SB_WOOCOMMERCE')) echo '<div class=\"sb-btn-woocommerce\" data-sb-tooltip=\"' . sb_('Add a product') . '\"></div>' ?>\n </div>\n <div class=\"sb-icon-send sb-submit\" data-sb-tooltip=\"<?php sb_e('Send message') ?>\"></div>\n <img class=\"sb-loader\" src=\"<?php echo SB_URL ?>/media/loader.svg\" alt=\"\" />\n </div>\n <div class=\"sb-popup sb-emoji\">\n <div class=\"sb-header\">\n <div class=\"sb-select\">\n <p>\n <?php sb_e('All') ?>\n </p>\n <ul>\n <li data-value=\"all\" class=\"sb-active\">\n <?php sb_e('All') ?>\n </li>\n <li data-value=\"Smileys\">\n <?php sb_e('Smileys & Emotions') ?>\n </li>\n <li data-value=\"People\">\n <?php sb_e('People & Body') ?>\n </li>\n <li data-value=\"Animals\">\n <?php sb_e('Animals & Nature') ?>\n </li>\n <li data-value=\"Food\">\n <?php sb_e('Food & Drink') ?>\n </li>\n <li data-value=\"Travel\">\n <?php sb_e('Travel & Places') ?>\n </li>\n <li data-value=\"Activities\">\n <?php sb_e('Activities') ?>\n </li>\n <li data-value=\"Objects\">\n <?php sb_e('Objects') ?>\n </li>\n <li data-value=\"Symbols\">\n <?php sb_e('Symbols') ?>\n </li>\n </ul>\n </div>\n <div class=\"sb-search-btn\">\n <i class=\"sb-icon sb-icon-search\"></i>\n <input type=\"text\" placeholder=\"<?php sb_e('Search emoji...') ?>\" />\n </div>\n </div>\n <div class=\"sb-emoji-list\">\n <ul></ul>\n </div>\n <div class=\"sb-emoji-bar\"></div>\n </div>\n <?php if ($admin) { ?>\n <div class=\"sb-popup sb-replies\">\n <div class=\"sb-header\">\n <div class=\"sb-title\">\n <?php sb_e('Saved replies') ?>\n </div>\n <div class=\"sb-search-btn\">\n <i class=\"sb-icon sb-icon-search\"></i>\n <input type=\"text\" autocomplete=\"false\" placeholder=\"<?php sb_e('Search replies...') ?>\" />\n </div>\n </div>\n <div class=\"sb-replies-list sb-scroll-area\">\n <ul class=\"sb-loading\"></ul>\n </div>\n </div>\n <?php if (defined('SB_WOOCOMMERCE')) sb_woocommerce_products_popup() ?>\n <?php } ?>\n <form class=\"sb-upload-form-editor\" action=\"#\" method=\"post\" enctype=\"multipart/form-data\">\n <input type=\"file\" name=\"files[]\" class=\"sb-upload-files\" multiple />\n </form>\n </div>\n<?php }",
"public function initEditors(): void\n {\n }",
"function init_editor($textareaname) \r\n{\r\n\tglobal $xoopsDB, $maintext;\r\n\r\n\t$myts = new MyTextSanitizer;\r\n\t$$textareaname = \"$maintext\";\r\n\t$$textareaname = $myts->makeTareaData4Edit($$textareaname, 1, 1, 1);\r\n\t$myEditor = \"myEditor_\".$textareaname;\r\n\r\n// bug fix : short_open_tag is used\r\n//\t$url_dirname = XOOPS_URL.\"/modules/\".$GLOBALS['drname'];\r\n//\t$url_wysiwyg = XOOPS_URL.\"/modules/\".$GLOBALS['drname'].\"/images/wysiwyg\";\r\n\r\n// dont use $GLOBALS\r\n\tglobal $xoopsModule;\r\n\t$dirname = $xoopsModule->dirname();\r\n\t$url_dirname = XOOPS_URL.\"/modules/\".$dirname;\r\n\t$url_wysiwyg = XOOPS_URL.\"/modules/\".$dirname.\"/images/wysiwyg\";\r\n\r\n// ----- html begin -----\r\n?>\r\n\r\n<script type=\"text/javascript\">\r\n\r\nwindow.onerror = handleErrors;\r\nfunction handleErrors()\r\n{\r\n //----- Used For Browsers That Don't Want To Behave -----\r\n return true;\r\n}\r\n\r\nfunction initToolBar(ed, myEditor) {\r\nvar eb = document.all.editbar;\r\nif (ed!=null) {\r\neb._editor = window.frames[myEditor];\r\n}}\r\n\r\nfunction doFormat(what) {\r\nvar eb = document.all.editbar;\r\neb._editor.execCommand(what, arguments[1]);\r\n}\r\n\r\nfunction doLink(what) { \r\nvar eb = document.all.editbar._editor;\r\n\teb._editor.document.execCommand(what); \r\n}\r\n\r\nfunction dounredo(what) {\r\nvar eb = document.all.editbar;\r\n\teb._editor.document.execCommand(what, arguments[1]);\r\n}\r\n\r\nfunction swapMode() {\r\nvar eb = document.all.editbar._editor;\r\neb.swapModes();\r\n}\r\n\r\nfunction newFile(){\r\n var eb = document.all.editbar;\r\n eb._editor.newdocument();\r\n}\r\n\r\nfunction Help_OnClick(){\r\nwindow.open(\"<?php echo $url_wysiwyg; ?>/help_document.htm\",\"wHelp\", \"toolbar=10, scrollbars=yes, width=400, height=450\");\r\n}\r\n\r\nfunction copyValue_<?php echo $textareaname;?>() {\r\nvar theHtml = document.frames(\"<?php echo $myEditor;?>\").document.frames(\"textEdit\").document.body.innerHTML;\r\ntheHtml=theHtml.replace(/(\\r\\n)|(\\r)|(\\n)/gi,\" \");\r\ndocument.all.<?php echo $textareaname;?>.value = theHtml;\r\n}\r\n\r\nfunction word_<?php echo $textareaname;?>_OnClick() {\r\nvar t = document.frames(\"<?php echo $myEditor;?>\").document.frames(\"textEdit\").document.body.innerHTML;\t\r\n\talert(\"Not working in this version! Not sure why? But if you could give it a try and help me out?\");\r\n\tt = t.replace( /<\\/?o:p>/gi, '' );\r\n\tt = t.replace( /(<td.*?>)\\s*<p.*?>(.*?)<\\/p>\\s*<\\/td>/gi, '$1$2</td>' );\r\n\tt = t.replace( /<span.*?>(.*?)<\\/span>/gi, '$1' );\r\n\tt = t.replace( /<t((?:body|r|d|able)\\s.*?)style=\".*?\"(.*?)>/gi, '<t$1$2>' );\t\t\r\n\tdocument.all.<?php echo $textareaname;?>.value = t;\r\n\talert(\"Cleaning finished!\");\r\n}\r\n\r\nfunction SwapView<?php echo $textareaname;?>_OnClick() {\r\nif(document.all.btnSwapView<?php echo $textareaname;?>.value == \"<?php echo _AM_VIEWHTML; ?>\") {\r\nvar sMes = \"<?php echo _AM_VIEWWAYSIWIG; ?>\";\r\nvar sStatusBarMes = \"Current View Html\";\r\n} else {\r\nvar sMes = \"<?php echo _AM_VIEWHTML; ?>\"\r\nvar sStatusBarMes = \"Current View Wysiwyg\";\r\n}\r\ndocument.all.btnSwapView<?php echo $textareaname;?>.value = sMes;\r\nwindow.status = sStatusBarMes;\r\nswapMode();\r\n}\r\n\r\n\r\nfunction ColorPalette<?php echo $textareaname;?>_OnClick(colorString) {\r\ncpick<?php echo $textareaname;?>.bgColor=colorString;\r\ndocument.all.colourp<?php echo $textareaname;?>.value=colorString;\r\ndoFormat('ForeColor',colorString);\r\n}\r\n\r\nfunction doSelectClick(str,el,Mark) {\r\nvar eb = document.all.editbar;\r\ndoFormat(str,el.options[Index].value);\r\n}\r\n\r\nfunction selectRange(){\r\n\tedit = textEdit.document.selection.createRange();\t\r\n\tRangeType = textEdit.document.selection.type;\r\n}\r\n\r\nfunction pasteHTML(HTML)\r\n{\r\n\talert(\"Not working in this version! Not sure why? But if you could give it a try and help me out?\");\r\n\tsetFocus();\r\n\tselectRange();\t\r\n\tif (format == \"Normal\")\r\n\t \t edit.pasteHTML(HTML);\r\n\telse\r\n\t edit.text=HTML;\r\n\tedit.select();\r\n\ttextEdit.focus();\t\t\t\r\n}\r\n\r\nfunction addTable()\r\n{ \r\n\tReturnValue=window.showModalDialog(\"AddTable.htm\",\"\",\"dialogWidth=310px;dialogHeight=150px;status=0\");\r\n\tif(ReturnValue && ReturnValue!=\"\") pasteHTML(ReturnValue);\r\n}\r\n\r\n</script>\r\n<style type=\"text/css\" media=\"screen\">\r\n\t\t\t<!--\r\n\t\t\t.bartop { border-style: outset; border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin}\r\n\t\t\t-->\r\n</style>\r\n\r\n<textarea name=\"<?php echo $textareaname;?>\" style=\"display: none;\" rows=\"1\" cols=\"20\"><?php echo $$textareaname;?></textarea>\r\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#D4D0C8\" width=\"100%\" height=\"40%\">\r\n<tr>\r\n<td>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\"><tr valign=\"top\">\r\n<td valign=\"top\">\r\n<div id=\"editbar\">\r\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"left\"><tr>\r\n<td>\r\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>\r\n<td>\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr class = bartop>\r\n<td nowrap=\"nowrap\" class = 'bartop'>\r\n<img src=\"<?php echo $url_wysiwyg; ?>/start.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/new.gif\" align=\"middle\" border=\"0\" alt=\"New File\" onClick=\"newFile();\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/new.gif\" align=\"middle\" border=\"0\" alt=\"Refresh (clear document)\" \tonClick=\"dounredo('Refresh');\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/cut.gif\" align=\"middle\" border=\"0\" alt=\"Cut\" \tonClick=\"doFormat('Cut')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/copy.gif\" align=\"middle\" border=\"0\" alt=\"Copy\" \tonClick=\"doFormat('Copy')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/paste.gif\" align=\"middle\" border=\"0\" alt=\"Paste\" \tonClick=\"doFormat('Paste')\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/undo.gif\" align=\"middle\" border=\"0\" alt=\"Undo\" \tonClick=\"dounredo('Undo')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/redo.gif\" align=\"middle\" border=\"0\" alt=\"Redo\" \tonClick=\"dounredo('Redo')\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/picture.gif\" align=\"middle\" alt=\"Insert Picture\" onClick=\"var strURL = window.prompt('Enter URL s Picture','');if (strURL!=null) {doFormat('InsertImage',strURL);}\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/hr.gif\" align=\"middle\" alt=\"HR\" onClick=\"doFormat('InsertHorizontalRule')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/link.gif\" align=\"middle\" border=\"0\" alt=\"Link to external site\" onClick=\"doFormat('createlink')\" />\r\n\r\n<!--- BUG 55: cannot use table icon, remove this\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/table.gif\" align=\"middle\" border=\"0\" alt=\"Link to external site\" onClick=\"addTable()\" />\r\n--->\r\n\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/word.gif\" align=\"middle\" border=\"0\" alt=\"Remove MS Word Formatting\" onClick=\"word_<?php echo $textareaname;?>_OnClick()\" />\r\n \r\n</td>\r\n<td nowrap=\"nowrap\" class = 'bartop' align=\"middle\";>\r\n<img src=\"<?php echo $url_wysiwyg; ?>/start.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/strikethrough.gif\" align=\"middle\" alt=\"Strike through\" onClick=\"doFormat('StrikeThrough')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/subscript.gif\" align=\"middle\" alt=\"SubScript\" onClick=\"doFormat('SubScript')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/superscript.gif\" align=\"middle\" alt=\"SuperScript\" onClick=\"doFormat('SuperScript')\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/ed_remove.gif\" align=\"middle\" border=\"0\" alt=\"Remove Format\" \tonClick=\"doFormat('RemoveFormat')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/selectall.gif\" align=\"middle\" border=\"0\" alt=\"Select All\" \tonClick=\"dounredo('SelectAll')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/selectnone.gif\" align=\"middle\" border=\"0\" alt=\"Select None\" \tonClick=\"dounredo('Unselect')\" />\r\n\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/ >\r\n\r\n \r\n</td>\r\n<td class = 'bartop'>\r\n<img src=\"<?php echo $url_wysiwyg; ?>/start.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/help.gif\" align=\"middle\" alt=\"Help\" onClick=\"Help_OnClick();\">\r\n \r\n</td>\r\n</tr>\r\n</table>\r\n\r\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n<td class = 'bartop'>\r\n<img src=\"<?php echo $url_wysiwyg; ?>/start.gif\" align=\"middle\"/>\r\n<select id=\"selHeading<?php echo $textareaname;?>\" onChange=\"if (document.all.font<?php echo $textareaname;?>.value !='None') {doFormat('formatblock', document.all.selHeading<?php echo $textareaname;?>.value);document.all.selHeading<?php echo $textareaname;?>.selectedIndex = 0;}\" align=\"middle\"; style=\"font: 8pt verdana;\">\r\n<option value=\"\">-- Heading --</option> \r\n<option value=\"address\">address</option>\r\n<option value=\"pre\">Formatted</option>\r\n<option value=\"Subtitle\">Sub Title</option>\r\n<option value=\"Heading 1\">Heading 1</option> \r\n<option value=\"Heading 2\">Heading 2</option> \r\n<option value=\"Heading 3\">Heading 3</option> \r\n<option value=\"Heading 4\">Heading 4</option> \r\n<option value=\"Heading 5\">Heading 5</option> \r\n<option value=\"Heading 6\">Heading 6</option> \r\n\r\n</select>\r\n<select id=\"font<?php echo $textareaname;?>\" onChange=\"if (document.all.font<?php echo $textareaname;?>.value !=1) {doFormat('FontName',document.all.font<?php echo $textareaname;?>.value);document.all.font<?php echo $textareaname;?>.selectedIndex = 0;}\" align=\"middle\"; style=\"font: 8pt verdana;\">\r\n<option value=\"\" selected=\"selected\">Select Font...</option>\r\n<option value=\"Arial\">Arial</option>\r\n<option value=\"Arial Black\">Arial Black</option>\r\n<option value=\"Arial Narrow\">Arial Narrow</option>\r\n<option value=\"Book Antiqua\">Book Antiqua</option>\r\n<option value=\"Bookman Old Style\">Bookman Old Style</option>\r\n<option value=\"Century Gothic\">Century Gothic</option>\r\n<option value=\"Courier\">Courier</option>\r\n<option value=\"Comic Sans MS\">Comic Sans MS</option>\r\n<option value=\"Courier New\">Courier New</option>\r\n<option value=\"Default\">Default</option>\r\n<option value=\"Fixedsys\">Fixedsys</option>\r\n<option value=\"Garamond\">Garamond</option>\r\n<option value=\"Impact\">Impact</option>\r\n<option value=\"Lucida Console\">Lucida Console</option>\r\n<option value=\"Modern\">Modern</option>\r\n<option value=\"monospace\">Monospace</option>\r\n<option value=\"MS Sans Serif\">MS Sans Serif</option>\r\n<option value=\"MS Serif\">MS Serif</option>\r\n<option value=\"sans-serif\">Sans-serif</option>\r\n<option value=\"serif\">Serif</option>\r\n<option value=\"System\">System</option>\r\n<option value=\"Tahoma\">Tahoma</option>\r\n<option value=\"Terminal\">Terminal</option>\r\n<option value=\"Times New Roman\">Times New Roman</option>\r\n<option value=\"Trebuchet MS\">Trebuchet MS</option>\r\n<option value=\"Verdana\">Verdana</option>\r\n<option value=\"Webdings\">Webdings</option>\r\n</select>\r\n<select id=\"size<?php echo $textareaname;?>\" onChange=\"if (document.all.font<?php echo $textareaname;?>.value !='None') {doFormat('FontSize',document.all.size<?php echo $textareaname;?>.value);document.all.size<?php echo $textareaname;?>.selectedIndex = 0;}\" align=\"middle\"; style=\"font: 8pt verdana;\">\r\n<option value=\"None\" selected=\"selected\">Size</option>\r\n<option value=1>1</option>\r\n<option value=2>2</option>\r\n<option value=3>3</option>\r\n<option value=4>4</option>\r\n<option value=5>5</option>\r\n<option value=6>6</option>\r\n<option value=7>7</option>\r\n</select>\r\n</td>\r\n<td class = 'bartop'>\r\n<img src=\"<?php echo $url_wysiwyg; ?>/start.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/bold.gif\" align=\"middle\" border=\"0\" alt=\"Bold text\" onClick=\"doFormat('Bold')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/italics.gif\" align=\"middle\" border=\"0\" alt=\"Italic text\" onClick=\"doFormat('Italic')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/underline.gif\" align=\"middle\" border=\"0\" alt=\"Underline text\" onClick=\"doFormat('Underline')\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/aleft.gif\" align=\"middle\" alt=\"Align Left\" onClick=\"doFormat('JustifyLeft')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/acenter.gif\" align=\"middle\" alt=\"Align Center\" onClick=\"doFormat('JustifyCenter')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/aright.gif\" align=\"middle\" alt=\"Align Right\" onClick=\"doFormat('JustifyRight')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/afull.gif\" align=\"middle\" alt=\"Align Full\" onClick=\"doFormat('JustifyFull')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/anone.gif\" align=\"middle\" border=\"0\" alt=\"Justify None\" onClick=\"doFormat('JustifyNone')\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/para_num.gif\" align=\"middle\" border=\"0\" alt=\"Numbered List\" onClick=\"doFormat('InsertOrderedList');\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/para_bul.gif\" align=\"middle\" border=\"0\" alt=\"Bullet List\" onClick=\"doFormat('InsertUnorderedList');\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/indent.gif\" align=\"middle\" alt=\"Indent\" onClick=\"doFormat('Indent')\" />\r\n<img style=\"cursor:hand;\" src=\"<?php echo $url_wysiwyg; ?>/outdent.gif\" align=\"middle\" alt=\"Outdent\" onClick=\"doFormat('Outdent')\" />\r\n<img src=\"<?php echo $url_wysiwyg; ?>/separator.gif\" align=\"middle\"/>\r\n</td>\r\n</tr>\r\n</table>\r\n</td></tr></table>\r\n</td></tr><tr valign=\"top\" align=\"left\">\r\n<td valign=\"top\">\r\n<table width=\"100%\" border=\"0\" height=\"100%\"><tr valign=\"top\">\r\n<td width=\"100%\" height=\"100%\" valign=\"top\">\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"100%\"><tr valign=\"top\">\r\n<td bgcolor=\"#FFFFFF\">\r\n<iframe name=\"<?php echo $myEditor;?>\" id=\"<?php echo $myEditor;?>\" src=\"<?php echo $url_dirname; ?>/include/pdedit.php?textareaname=<?php echo $textareaname;?>\" onfocus=\"initToolBar(this,'<?php echo $myEditor;?>');\" onblur=\"copyValue_<?php echo $textareaname;?>();\" width=\"100%\" height=\"600\"></iframe></td>\r\n</tr>\r\n<td>\r\n<tr height=15>\r\n\t<td height=15>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=15> \r\n <tr> \r\n <td align=\"left\"><input type=\"button\" id=\"btnSwapView<?php echo $textareaname;?>\" value=\"<?php echo _AM_VIEWHTML; ?>\" onClick=\"SwapView<?php echo $textareaname;?>_OnClick();\" style=\"width:100px; font: 8pt verdana; \">\r\n </td> \r\n <td align=\"middle\"><IMG src=\"<?php echo $url_wysiwyg; ?>/ScrollL.gif\" border=0 width=\"24\" height=\"15\"></td> \r\n <td align=\"middle\" width=\"100%\" style=\"FILTER: Alpha(opacity=50); BACKGROUND-COLOR: white\" \r\n ></td> \r\n <td align=\"right\"><IMG src=\"<?php echo $url_wysiwyg; ?>/ScrollR.gif\" border=0 width=\"19\" height=\"15\"></td> \r\n </tr> \r\n </table> \r\n</td>\r\n</table>\r\n</td><td width=\"9%\" align=\"center\">\r\n<table bgcolor=\"#000000\" width=\"74\" id=\"cpick<?php echo $textareaname;?>\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tr>\r\n<td> </td>\r\n</tr></table>\r\n<input class=\"input\" type=\"text\" id=\"colourp<?php echo $textareaname;?>\" size=\"8\" value=\"#000000\" style=\"width:74px; font: 8pt verdana\" readonly>\r\n<table border=\"1\" bgcolor=\"#CCCCCC\" cellpadding=\"0\" cellspacing=\"0\" width=\"74\"><tr>\r\n<td bgcolor=\"#ffffff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffffff')\" /></td>\r\n<td bgcolor=\"#ffffcc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffffcc')\" /></td>\r\n<td bgcolor=\"#ffff99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffff99')\" /></td>\r\n<td bgcolor=\"#ffff66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffff66')\" /></td>\r\n<td bgcolor=\"#ffff33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffff33')\" /></td>\r\n<td bgcolor=\"#ffff00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffff00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ccffff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccffff')\" /></td>\r\n<td bgcolor=\"#ccffcc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccffcc')\" /></td>\r\n<td bgcolor=\"#ccff99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccff99')\" /></td>\r\n<td bgcolor=\"#ccff66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccff66')\" /></td>\r\n<td bgcolor=\"#ccff33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccff33')\" /></td>\r\n<td bgcolor=\"#ccff00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccff00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#99ffff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#99ffff')\" /></td>\r\n<td bgcolor=\"#99ffcc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#99ffcc')\" /></td>\r\n<td bgcolor=\"#99ff99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#99ff99')\" /></td>\r\n<td bgcolor=\"#99ff66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#99ff66')\" /></td>\r\n<td bgcolor=\"#99ff33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#99ff33')\" /></td>\r\n<td bgcolor=\"#99ff00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#99ff00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#00ffff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ffff')\" /></td>\r\n<td bgcolor=\"#00ffcc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ffcc')\" /></td>\r\n<td bgcolor=\"#00ff99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ff99')\" /></td>\r\n<td bgcolor=\"#00ff66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ff66')\" /></td>\r\n<td bgcolor=\"#00ff33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ff33')\" /></td>\r\n<td bgcolor=\"#00ff00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ff00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ffccff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffccff')\" /></td>\r\n<td bgcolor=\"#ffcccc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffcccc')\" /></td>\r\n<td bgcolor=\"#ffcc99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffcc99')\" /></td>\r\n<td bgcolor=\"#ffcc66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffcc66')\" /></td>\r\n<td bgcolor=\"#ffcc33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffcc33')\" /></td>\r\n<td bgcolor=\"#ffcc00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ffcc00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ccccff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ccccff')\" /></td>\r\n<td bgcolor=\"#cccccc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cccccc')\" /></td>\r\n<td bgcolor=\"#cccc99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cccc99')\" /></td>\r\n<td bgcolor=\"#cccc66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cccc66')\" /></td>\r\n<td bgcolor=\"#cccc33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cccc33')\" /></td>\r\n<td bgcolor=\"#cccc00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cccc00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#00ccff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00ccff')\" /></td>\r\n<td bgcolor=\"#00cccc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00cccc')\" /></td>\r\n<td bgcolor=\"#00cc99\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00cc99')\" /></td>\r\n<td bgcolor=\"#00cc66\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00cc66')\" /></td>\r\n<td bgcolor=\"#00cc33\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00cc33')\" /></td>\r\n<td bgcolor=\"#00cc00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00cc00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ff99ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff99ff')\" /></td>\r\n<td bgcolor=\"#ff99cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff99cc')\" /></td>\r\n<td bgcolor=\"#ff9999\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff9999')\" /></td>\r\n<td bgcolor=\"#ff9966\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff9966')\" /></td>\r\n<td bgcolor=\"#ff9933\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff9933')\" /></td>\r\n<td bgcolor=\"#ff9900\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff9900')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#cc99ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc99ff')\" /></td>\r\n<td bgcolor=\"#cc99cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc99cc')\" /></td>\r\n<td bgcolor=\"#cc9999\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc9999')\" /></td>\r\n<td bgcolor=\"#cc9966\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc9966')\" /></td>\r\n<td bgcolor=\"#cc9933\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc9933')\" /></td>\r\n<td bgcolor=\"#cc9900\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc9900')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#9999ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9999ff')\" /></td>\r\n<td bgcolor=\"#9999cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9999cc')\" /></td>\r\n<td bgcolor=\"#999999\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#999999')\" /></td>\r\n<td bgcolor=\"#999966\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#999966')\" /></td>\r\n<td bgcolor=\"#999933\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#999933')\" /></td>\r\n<td bgcolor=\"#999900\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#999900')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#6699ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6699ff')\" /></td>\r\n<td bgcolor=\"#6699cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6699cc')\" /></td>\r\n<td bgcolor=\"#669999\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#669999')\" /></td>\r\n<td bgcolor=\"#669966\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#669966')\" /></td>\r\n<td bgcolor=\"#669933\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#669933')\" /></td>\r\n<td bgcolor=\"#669900\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#669900')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#3399ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3399ff')\" /></td>\r\n<td bgcolor=\"#3399cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3399cc')\" /></td>\r\n<td bgcolor=\"#339999\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#339999')\" /></td>\r\n<td bgcolor=\"#339966\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#339966')\" /></td>\r\n<td bgcolor=\"#339933\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#339933')\" /></td>\r\n<td bgcolor=\"#339900\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#339900')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#0099ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0099ff')\" /></td>\r\n<td bgcolor=\"#0099cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0099cc')\" /></td>\r\n<td bgcolor=\"#009999\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#009999')\" /></td>\r\n<td bgcolor=\"#009966\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#009966')\" /></td>\r\n<td bgcolor=\"#009933\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#009933')\" /></td>\r\n<td bgcolor=\"#009900\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#009900')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ff66ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff66ff')\" /></td>\r\n<td bgcolor=\"#ff66cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff66cc')\" /></td>\r\n<td bgcolor=\"#ff6699\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff6699')\" /></td>\r\n<td bgcolor=\"#ff6666\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff6666')\" /></td>\r\n<td bgcolor=\"#ff6633\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff6633')\" /></td>\r\n<td bgcolor=\"#ff6600\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff6600')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#cc66ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc66ff')\" /></td>\r\n<td bgcolor=\"#cc66cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc66cc')\" /></td>\r\n<td bgcolor=\"#cc6699\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc6699')\" /></td>\r\n<td bgcolor=\"#cc6666\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc6666')\" /></td>\r\n<td bgcolor=\"#cc6633\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc6633')\" /></td>\r\n<td bgcolor=\"#cc6600\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc6600')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#9966ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9966ff')\" /></td>\r\n<td bgcolor=\"#9966cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9966cc')\" /></td>\r\n<td bgcolor=\"#996699\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#996699')\" /></td>\r\n<td bgcolor=\"#996666\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#996666')\" /></td>\r\n<td bgcolor=\"#996633\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#996633')\" /></td>\r\n<td bgcolor=\"#996600\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#996600')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#6666ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6666ff')\" /></td>\r\n<td bgcolor=\"#6666cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6666cc')\" /></td>\r\n<td bgcolor=\"#666699\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#666699')\" /></td>\r\n<td bgcolor=\"#666666\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#666666')\" /></td>\r\n<td bgcolor=\"#666633\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#666633')\" /></td>\r\n<td bgcolor=\"#666600\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#666600')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#3366ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3366ff')\" /></td>\r\n<td bgcolor=\"#3366cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3366cc')\" /></td>\r\n<td bgcolor=\"#336699\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#336699')\" /></td>\r\n<td bgcolor=\"#336666\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#336666')\" /></td>\r\n<td bgcolor=\"#336633\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#336633')\" /></td>\r\n<td bgcolor=\"#336600\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#336600')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#0066ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0066ff')\" /></td>\r\n<td bgcolor=\"#0066cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0066cc')\" /></td>\r\n<td bgcolor=\"#006699\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#006699')\" /></td>\r\n<td bgcolor=\"#006666\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#006666')\" /></td>\r\n<td bgcolor=\"#006633\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#006633')\" /></td>\r\n<td bgcolor=\"#006600\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#006600')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ff33ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff33ff')\" /></td>\r\n<td bgcolor=\"#ff33cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff33cc')\" /></td>\r\n<td bgcolor=\"#ff3399\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff3399')\" /></td>\r\n<td bgcolor=\"#ff3366\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff3366')\" /></td>\r\n<td bgcolor=\"#ff3333\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff3333')\" /></td>\r\n<td bgcolor=\"#ff3300\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff3300')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#cc33ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc33ff')\" /></td>\r\n<td bgcolor=\"#cc33cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc33cc')\" /></td>\r\n<td bgcolor=\"#cc3399\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc3399')\" /></td>\r\n<td bgcolor=\"#cc3366\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc3366')\" /></td>\r\n<td bgcolor=\"#cc3333\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc3333')\" /></td>\r\n<td bgcolor=\"#cc3300\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc3300')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#9933ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9933ff')\" /></td>\r\n<td bgcolor=\"#9933cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9933cc')\" /></td>\r\n<td bgcolor=\"#993399\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#993399')\" /></td>\r\n<td bgcolor=\"#993366\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#993366')\" /></td>\r\n<td bgcolor=\"#993333\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#993333')\" /></td>\r\n<td bgcolor=\"#993300\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#993300')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#6633ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6633ff')\" /></td>\r\n<td bgcolor=\"#6633cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6633cc')\" /></td>\r\n<td bgcolor=\"#663399\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#663399')\" /></td>\r\n<td bgcolor=\"#663366\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#663366')\" /></td>\r\n<td bgcolor=\"#663333\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#663333')\" /></td>\r\n<td bgcolor=\"#663300\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#663300')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#3333ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3333ff')\" /></td>\r\n<td bgcolor=\"#3333cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3333cc')\" /></td>\r\n<td bgcolor=\"#333399\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#333399')\" /></td>\r\n<td bgcolor=\"#333366\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#333366')\" /></td>\r\n<td bgcolor=\"#333333\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#333333')\" /></td>\r\n<td bgcolor=\"#333300\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#333300')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#0033ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0033ff')\" /></td>\r\n<td bgcolor=\"#0033cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0033cc')\" /></td>\r\n<td bgcolor=\"#003399\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#003399')\" /></td>\r\n<td bgcolor=\"#003366\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#003366')\" /></td>\r\n<td bgcolor=\"#003333\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#003333')\" /></td>\r\n<td bgcolor=\"#003300\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#003300')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#ff00ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff00ff')\" /></td>\r\n<td bgcolor=\"#ff00cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff00cc')\" /></td>\r\n<td bgcolor=\"#ff0099\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff0099')\" /></td>\r\n<td bgcolor=\"#ff0066\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff0066')\" /></td>\r\n<td bgcolor=\"#ff0033\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff0033')\" /></td>\r\n<td bgcolor=\"#ff0000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ff0000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#cc00ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc00ff')\" /></td>\r\n<td bgcolor=\"#cc00cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc00cc')\" /></td>\r\n<td bgcolor=\"#cc0099\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc0099')\" /></td>\r\n<td bgcolor=\"#cc0066\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc0066')\" /></td>\r\n<td bgcolor=\"#cc0033\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc0033')\" /></td>\r\n<td bgcolor=\"#cc0000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#cc0000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#9900ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9900ff')\" /></td>\r\n<td bgcolor=\"#9900cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9900cc')\" /></td>\r\n<td bgcolor=\"#990099\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#990099')\" /></td>\r\n<td bgcolor=\"#990066\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#990066')\" /></td>\r\n<td bgcolor=\"#990033\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#990033')\" /></td>\r\n<td bgcolor=\"#990000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#990000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#6600ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6600ff')\" /></td>\r\n<td bgcolor=\"#6600cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6600cc')\" /></td>\r\n<td bgcolor=\"#660099\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#660099')\" /></td>\r\n<td bgcolor=\"#660066\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#660066')\" /></td>\r\n<td bgcolor=\"#660033\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#660033')\" /></td>\r\n<td bgcolor=\"#660000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#660000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#3300ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3300ff')\" /></td>\r\n<td bgcolor=\"#3300cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3300cc')\" /></td>\r\n<td bgcolor=\"#330099\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#330099')\" /></td>\r\n<td bgcolor=\"#330066\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#330066')\" /></td>\r\n<td bgcolor=\"#330033\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#330033')\" /></td>\r\n<td bgcolor=\"#330000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#330000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#0000ff\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0000ff')\" /></td>\r\n<td bgcolor=\"#0000cc\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0000cc')\" /></td>\r\n<td bgcolor=\"#000099\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#000099')\" /></td>\r\n<td bgcolor=\"#000066\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#000066')\" /></td>\r\n<td bgcolor=\"#000033\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#000033')\" /></td>\r\n<td bgcolor=\"#000000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#000000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#000000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#000000')\" /></td>\r\n<td bgcolor=\"#696969\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#696969')\" /></td>\r\n<td bgcolor=\"#808080\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#808080')\" /></td>\r\n<td bgcolor=\"#A9A9A9\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#A9A9A9')\" /></td>\r\n<td bgcolor=\"#C0C0C0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#C0C0C0')\" /></td>\r\n<td bgcolor=\"#D3D3D3\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#D3D3D3')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#DCDCDC\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DCDCDC')\" /></td>\r\n<td bgcolor=\"#F5F5F5\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F5F5F5')\" /></td>\r\n<td bgcolor=\"#FFFFFF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFFFF')\" /></td>\r\n<td bgcolor=\"#800000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#800000')\" /></td>\r\n<td bgcolor=\"#8B0000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#8B0000')\" /></td>\r\n<td bgcolor=\"#FF0000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF0000')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#FF4500\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF4500')\" /></td>\r\n<td bgcolor=\"#FF8C00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF8C00')\" /></td>\r\n<td bgcolor=\"#FFA500\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFA500')\" /></td>\r\n<td bgcolor=\"#FFD7FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFD7FF')\" /></td>\r\n<td bgcolor=\"#808000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#808000')\" /></td>\r\n<td bgcolor=\"#FFFF00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFF00')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#0B86B8\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0B86B8')\" /></td>\r\n<td bgcolor=\"#8B4513\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#8B4513')\" /></td>\r\n<td bgcolor=\"#D2691E\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#D2691E')\" /></td>\r\n<td bgcolor=\"#DAA520\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DAA520')\" /></td>\r\n<td bgcolor=\"#B22222\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#B22222')\" /></td>\r\n<td bgcolor=\"#A52A2A\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#A52A2A')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#A0522D\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#A0522D')\" /></td>\r\n<td bgcolor=\"#CD853F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#CD853F')\" /></td>\r\n<td bgcolor=\"#FF6347\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF6347')\" /></td>\r\n<td bgcolor=\"#FF7F50\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF7F50')\" /></td>\r\n<td bgcolor=\"#CD5C5C\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#CD5C5C')\" /></td>\r\n<td bgcolor=\"#F4A460\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F4A460')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#BDB76B\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#BDB76B')\" /></td>\r\n<td bgcolor=\"#FA8072\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FA8072')\" /></td>\r\n<td bgcolor=\"#E9967A\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#E9967A')\" /></td>\r\n<td bgcolor=\"#FFA07A\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFA07A')\" /></td>\r\n<td bgcolor=\"#F08080\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F08080')\" /></td>\r\n<td bgcolor=\"#DEB887\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DEB887')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#D2B48C\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#D2B48C')\" /></td>\r\n<td bgcolor=\"#F0E68C\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F0E68C')\" /></td>\r\n<td bgcolor=\"#BC8F8F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#BC8F8F')\" /></td>\r\n<td bgcolor=\"#EEE8AA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#EEE8AA')\" /></td>\r\n<td bgcolor=\"#FFDEAD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFDEAD')\" /></td>\r\n<td bgcolor=\"#F5DEB3\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F5DEB3')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#FFE4B5\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFE4B5')\" /></td>\r\n<td bgcolor=\"#FFDAB9\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFDAB9')\" /></td>\r\n<td bgcolor=\"#FFE4C4\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFE4C4')\" /></td>\r\n<td bgcolor=\"#FFEBCD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFEBCD')\" /></td>\r\n<td bgcolor=\"#FFFACD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFACD')\" /></td>\r\n<td bgcolor=\"#FAFAD2\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FAFAD2')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#FFEFD5\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFEFD5')\" /></td>\r\n<td bgcolor=\"#FAEBD7\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FAEBD7')\" /></td>\r\n<td bgcolor=\"#F5F5DC\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F5F5DC')\" /></td>\r\n<td bgcolor=\"#FFF8DC\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFF8DC')\" /></td>\r\n<td bgcolor=\"#FFFFE0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFFE0')\" /></td>\r\n<td bgcolor=\"#FFE4E1\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFE4E1')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#FAF0E6\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FAF0E6')\" /></td>\r\n<td bgcolor=\"#FDF5E6\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FDF5E6')\" /></td>\r\n<td bgcolor=\"#FFF5EE\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFF5EE')\" /></td>\r\n<td bgcolor=\"#FFFAF0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFAF0')\" /></td>\r\n<td bgcolor=\"#FFFFF0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFFF0')\" /></td>\r\n<td bgcolor=\"#FFFAFA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFFAFA')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#7FFF00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#7FFF00')\" /></td>\r\n<td bgcolor=\"#7CFC00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#7CFC00')\" /></td>\r\n<td bgcolor=\"#006400\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#006400')\" /></td>\r\n<td bgcolor=\"#008000\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#008000')\" /></td>\r\n<td bgcolor=\"#00FF00\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00FF00')\" /></td>\r\n<td bgcolor=\"#228B22\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#228B22')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#6B8E23\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6B8E23')\" /></td>\r\n<td bgcolor=\"#556B2F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#556B2F')\" /></td>\r\n<td bgcolor=\"#ADFF2F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ADFF2F')\" /></td>\r\n<td bgcolor=\"#9ACD32\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9ACD32')\" /></td>\r\n<td bgcolor=\"#32CD32\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#32CD32')\" /></td>\r\n<td bgcolor=\"#8FBC8F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#8FBC8F')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#90EE90\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#90EE90')\" /></td>\r\n<td bgcolor=\"#98FB98\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#98FB98')\" /></td>\r\n<td bgcolor=\"#F0FFF0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F0FFF0')\" /></td>\r\n<td bgcolor=\"#00FF7F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00FF7F')\" /></td>\r\n<td bgcolor=\"#00FA9A\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00FA9A')\" /></td>\r\n<td bgcolor=\"#20B2AA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#20B2AA')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#2E8B57\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#2E8B57')\" /></td>\r\n<td bgcolor=\"#3CB371\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#3CB371')\" /></td>\r\n<td bgcolor=\"#40E0D0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#40E0D0')\" /></td>\r\n<td bgcolor=\"#48D1CC\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#48D1CC')\" /></td>\r\n<td bgcolor=\"#66CDAA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#66CDAA')\" /></td>\r\n<td bgcolor=\"#7FFFD4\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#7FFFD4')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#F5FFFA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F5FFFA')\" /></td>\r\n<td bgcolor=\"#008080\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#008080')\" /></td>\r\n<td bgcolor=\"#008B8B\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#008B8B')\" /></td>\r\n<td bgcolor=\"#00FFFF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00FFFF')\" /></td>\r\n<td bgcolor=\"#00FFFF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00FFFF')\" /></td>\r\n<td bgcolor=\"#00CED1\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00CED1')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#00BFFF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00BFFF')\" /></td>\r\n<td bgcolor=\"#000080\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#000080')\" /></td>\r\n<td bgcolor=\"#00008B\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#00008B')\" /></td>\r\n<td bgcolor=\"#0000CD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0000CD')\" /></td>\r\n<td bgcolor=\"#0000FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#0000FF')\" /></td>\r\n<td bgcolor=\"#191970\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#191970')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#1E90FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#1E90FF')\" /></td>\r\n<td bgcolor=\"#2F4F4F\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#2F4F4F')\" /></td>\r\n<td bgcolor=\"#4169E1\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#4169E1')\" /></td>\r\n<td bgcolor=\"#4682B4\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#4682B4')\" /></td>\r\n<td bgcolor=\"#5F9EA0\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#5F9EA0')\" /></td>\r\n<td bgcolor=\"#6495ED\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6495ED')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#708090\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#708090')\" /></td>\r\n<td bgcolor=\"#778899\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#778899')\" /></td>\r\n<td bgcolor=\"#87CEEB\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#87CEEB')\" /></td>\r\n<td bgcolor=\"#87CEFA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#87CEFA')\" /></td>\r\n<td bgcolor=\"#ADD8E6\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#ADD8E6')\" /></td>\r\n<td bgcolor=\"#AFEEEE\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#AFEEEE')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#B0C4DE\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#B0C4DE')\" /></td>\r\n<td bgcolor=\"#B0E0E6\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#B0E0E6')\" /></td>\r\n<td bgcolor=\"#E0FFFF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#E0FFFF')\" /></td>\r\n<td bgcolor=\"#E6E6FA\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#E6E6FA')\" /></td>\r\n<td bgcolor=\"#F0FFFF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F0FFFF')\" /></td>\r\n<td bgcolor=\"#F0F8FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F0F8FF')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#F8F8FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#F8F8FF')\" /></td>\r\n<td bgcolor=\"#4B0082\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#4B0082')\" /></td>\r\n<td bgcolor=\"#9400D3\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9400D3')\" /></td>\r\n<td bgcolor=\"#8A2BE2\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#8A2BE2')\" /></td>\r\n<td bgcolor=\"#9932CC\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9932CC')\" /></td>\r\n<td bgcolor=\"#483D8B\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#483D8B')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#BA55D3\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#BA55D3')\" /></td>\r\n<td bgcolor=\"#6A5ACD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#6A5ACD')\" /></td>\r\n<td bgcolor=\"#7B68EE\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#7B68EE')\" /></td>\r\n<td bgcolor=\"#9370DB\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#9370DB')\" /></td>\r\n<td bgcolor=\"#800080\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#800080')\" /></td>\r\n<td bgcolor=\"#8B008B\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#8B008B')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#FF00FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF00FF')\" /></td>\r\n<td bgcolor=\"#FF00FF\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF00FF')\" /></td>\r\n<td bgcolor=\"#FF1493\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF1493')\" /></td>\r\n<td bgcolor=\"#DC143C\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DC143C')\" /></td>\r\n<td bgcolor=\"#C71585\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#C71585')\" /></td>\r\n<td bgcolor=\"#FF69B4\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FF69B4')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#DA70D6\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DA70D6')\" /></td>\r\n<td bgcolor=\"#DB7093\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DB7093')\" /></td>\r\n<td bgcolor=\"#EE82EE\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#EE82EE')\" /></td>\r\n<td bgcolor=\"#DDA0DD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DDA0DD')\" /></td>\r\n<td bgcolor=\"#FFB6C1\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFB6C1')\" /></td>\r\n<td bgcolor=\"#D8BFD8\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#D8BFD8')\" /></td>\r\n</tr><tr>\r\n<td bgcolor=\"#FFC0CB\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFC0CB')\" /></td>\r\n<td bgcolor=\"#FFF0F5\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#FFF0F5')\" /></td>\r\n<td bgcolor=\"#EEEEEE\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#EEEEEE')\" /></td>\r\n<td bgcolor=\"#DDDDDD\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#DDDDDD')\" /></td>\r\n<td bgcolor=\"#CCCCCC\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#CCCCCC')\" /></td>\r\n<td bgcolor=\"#BBBBBB\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('#BBBBBB')\" /></td>\r\n<td bgcolor=\"#BBBBBB\" width=\"12\"><img style=\"cursor:hand;\" height=\"8\" width=\"10\" border=\"0\" onClick=\"ColorPalette<?php echo $textareaname;?>_OnClick('[pagebreak')\" /></td>\r\n</tr></table>\r\n</td></tr></table>\r\n\r\n</td></tr></table>\r\n</td></tr></table></table>\r\n\r\n<script type=\"text/javascript\">\r\ninitToolBar(\"foo\",\"<?php echo $myEditor;?>\")\r\nwindow.status = \"Current View: Wysiwyg\"\r\n</script>\r\n<?php\r\n\r\n// ----- html end -----\r\n}",
"public function checkForTinyMCE() {\n $useTiny = $this->modx->getOption('gallery.use_richtext',$this->gallery->config,false);\n if ($useTiny) {\n $tinyCorePath = $this->modx->getOption('tiny.core_path',null,$this->modx->getOption('core_path').'components/tinymce/');\n if (file_exists($tinyCorePath.'tinymce.class.php')) {\n \n /* First fetch the gallery+tiny specific settings */\n $cb1 = $this->modx->getOption('gallery.tiny.buttons1',null,'undo,redo,selectall,pastetext,pasteword,charmap,separator,image,modxlink,unlink,media,separator,code,help');\n $cb2 = $this->modx->getOption('gallery.tiny.buttons2',null,'bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull');\n $cb3 = $this->modx->getOption('gallery.tiny.buttons3',null,'styleselect,formatselect,separator,styleprops');\n $cb4 = $this->modx->getOption('gallery.tiny.buttons4',null,'');\n $cb5 = $this->modx->getOption('gallery.tiny.buttons5',null,'');\n $plugins = $this->modx->getOption('gallery.tiny.custom_plugins',null,'');\n $theme = $this->modx->getOption('gallery.tiny.theme',null,'');\n $bfs = $this->modx->getOption('gallery.tiny.theme_advanced_blockformats',null,'');\n $css = $this->modx->getOption('gallery.tiny.theme_advanced_css_selectors',null,'');\n \n /** @var modAction $browserAction */\n $browserAction = null;\n if ($this->modx->getVersionData()['version'] < 3){\n //V2\n $browserAction = $this->modx->getObject('modAction',array('controller' => 'browser'));\n }\n \n /* If the settings are empty, override them with the generic tinymce settings. */\n $tinyProperties = array(\n 'accessibility_warnings' => false,\n 'browserUrl' => $browserAction ? $this->modx->getOption('manager_url',null,MODX_MANAGER_URL).'index.php?a='.$browserAction->get('id').'&source=1' : null,\n 'cleanup' => true,\n 'cleanup_on_startup' => false,\n 'compressor' => '',\n 'execcommand_callback' => 'Tiny.onExecCommand',\n 'file_browser_callback' => 'Tiny.loadBrowser',\n 'force_p_newlines' => true,\n 'force_br_newlines' => false,\n 'formats' => array(\n 'alignleft' => array('selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', 'classes' => 'justifyleft'),\n 'alignright' => array('selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', 'classes' => 'justifyright'),\n 'alignfull' => array('selector' => 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', 'classes' => 'justifyfull'),\n ),\n 'frontend' => false,\n 'plugin_insertdate_dateFormat' => '%Y-%m-%d',\n 'plugin_insertdate_timeFormat' => '%H:%M:%S',\n 'preformatted' => false,\n 'resizable' => true,\n 'relative_urls' => true,\n 'remove_script_host' => true,\n 'theme_advanced_disable' => '',\n 'theme_advanced_resizing' => true,\n 'theme_advanced_resize_horizontal' => true,\n 'theme_advanced_statusbar_location' => 'bottom',\n 'theme_advanced_toolbar_align' => 'left',\n 'theme_advanced_toolbar_location' => 'top',\n \n \n 'height' => $this->modx->getOption('gallery.tiny.height',null,200),\n 'width' => $this->modx->getOption('gallery.tiny.width',null,'95%'),\n 'tiny.custom_buttons1' => (!empty($cb1)) ? $cb1 : $this->modx->getOption('tiny.custom_buttons1',null,'undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,modxlink,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help'),\n 'tiny.custom_buttons2' => (!empty($cb2)) ? $cb2 : $this->modx->getOption('tiny.custom_buttons2',null,'bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,styleprops'),\n 'tiny.custom_buttons3' => (!empty($cb3)) ? $cb3 : $this->modx->getOption('tiny.custom_buttons3',null,''),\n 'tiny.custom_buttons4' => (!empty($cb4)) ? $cb4 : $this->modx->getOption('tiny.custom_buttons4',null,''),\n 'tiny.custom_buttons5' => (!empty($cb5)) ? $cb5 : $this->modx->getOption('tiny.custom_buttons5',null,''),\n 'tiny.custom_plugins' => (!empty($plugins)) ? $plugins : $this->modx->getOption('tiny.custom_plugins',null,'style,advimage,advlink,modxlink,searchreplace,print,contextmenu,paste,fullscreen,noneditable,nonbreaking,xhtmlxtras,visualchars,media'),\n 'tiny.editor_theme' => (!empty($theme)) ? $theme : $this->modx->getOption('tiny.editor_theme',null,'cirkuit'),\n 'tiny.skin_variant' => $this->modx->getOption('tiny.skin_variant',null,''),\n 'tiny.theme_advanced_blockformats' => (!empty($bfs)) ? $bfs : $this->modx->getOption('tiny.theme_advanced_blockformats',null,'p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre,address'),\n 'tiny.css_selectors' => (!empty($css)) ? $css : $this->modx->getOption('tiny.css_selectors',null,''),\n );\n require_once $tinyCorePath.'tinymce.class.php';\n $tiny = new TinyMCE($this->modx,$tinyProperties);\n $tiny->setProperties($tinyProperties);\n $html = $tiny->initialize();\n $this->addHtml($html);\n }\n }\n }",
"protected function setUpTinyMcePlugin()\n {\n if (!current_user_can('edit_posts') &&\n !current_user_can('edit_pages') &&\n !get_user_option('rich_editing')) {\n return;\n }\n\n add_filter('mce_external_plugins', array($this, 'addTinyMcePlugin'));\n add_filter('mce_buttons', array($this, 'addTinyMceButtons'));\n add_filter('mce_css', array($this, 'addTinyMceCss'));\n }",
"private function prepareEditor()\n\t{\n\t\tglobal $context, $options;\n\n\t\tif ($context['SPortal']['page']['type'] !== 'bbc')\n\t\t{\n\t\t\t// No wizzy mode if they don't need it\n\t\t\t$temp_editor = !empty($options['wysiwyg_default']);\n\t\t\t$options['wysiwyg_default'] = false;\n\t\t}\n\n\t\t$editorOptions = array(\n\t\t\t'id' => 'content',\n\t\t\t'value' => $context['SPortal']['page']['body'],\n\t\t\t'width' => '100%',\n\t\t\t'height' => '275px',\n\t\t\t'preview_type' => 1,\n\t\t);\n\t\t$editorOptions['plugin_addons'] = array();\n\t\t$editorOptions['plugin_addons'][] = 'spplugin';\n\t\tcreate_control_richedit($editorOptions);\n\n\t\t$context['post_box_name'] = $editorOptions['id'];\n\t\t$context['post_box_class'] = $context['SPortal']['page']['type'] !== 'bbc' ? 'sceditor-container' : 'sp-sceditor-container';\n\n\t\tif (isset($temp_editor))\n\t\t{\n\t\t\t$options['wysiwyg_default'] = $temp_editor;\n\t\t}\n\t}",
"function attraxion15_make_mce_awesome($in) {\n $in['block_formats'] = 'h2=h2';\n $in['theme_advanced_styles'] = '.lead=lead';\n $in['toolbar1']='formatselect,|,bold,italic,|,bullist,numlist,blockquote,|,link,unlink,|,pastetext,undo,redo,|,cleanup';\n //$in['toolbar1']='bold,italic,|,bullist,numlist,blockquote,|,link,unlink,|,pastetext,undo,redo';\n $in['toolbar2']='';\n $in['toolbar3']='';\n $in['toolbar4']='';\n return $in;\n}",
"public function save() {\n\t\t// must ensure that html is cleaned but safe html tags are passed through.\n\t\t$safehtml = SomeRequest::getString(\"content\",\"\",\"post\",JREQUEST_ALLOWHTML);\n\t\techo \"<pre>\";\n\t\techo htmlentities($safehtml);\t\t\n\t\techo \"</pre>\";\n\t\t$view = $this->getView('editor');\n\t\t$view->display();\n\t}",
"function ks_tinymce_paste_as_text($init) {\n $init['paste_as_text'] = true;\n\n return $init;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a value indicating whether the visibility of this method or constructor is described by its Family; that is, the method or constructor is visible only within its class and derived classes. | public function getIsFamily() : bool
{
return $this->method->isProtected();
} | [
"public function getVisibilityIsPublic();",
"public function getVisibility() {\n return $this->reflectionProperty->isPublic() ? self::VISIBILITY_PUBLIC : ($this->reflectionProperty->isProtected() ? self::VISIBILITY_PROTECTED : self::VISIBILITY_PRIVATE);\n }",
"function isFamily() {\n\t\treturn ($this->_isFamily != 0);\n\t}",
"public function getAllowedVisibility()\n {\n return $this->visibilityFlag;\n }",
"public function isPublic() {\n return $this->getReflector()->isPublic();\n }",
"public function getVisibility()\n\t{\n\t\treturn $this->_visibility;\n\t}",
"public function getVisibility();",
"public function isFamily();",
"public function getVisibility()\n {\n return $this->visibility;\n }",
"public function isFamily()\n {\n if (! isset($this->isFamily)) {\n $this->isFamily = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getIsFamilyQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->isFamily;\n }",
"public function test_hasMethod_returnsFalse_ifMethodIsNotVisible()\n {\n return $this->assertFalse(\n (new RefractionClass(new Child()))->hasMethod(Base::METHOD_PRIVATE)\n );\n }",
"public function getIsFamilyFriendly() {\n\t\treturn $this->isFamilyFriendly;\n\t}",
"public function isFamilyFriendly()\n {\n return !! $this->familyFriendly;\n }",
"public function isPublicScope()\n {\n return $this->attributes['scope'] == self::PUBLIC_SCOPE;\n }",
"public function getVisibility()\n {\n if ($this->node->type & PHPParser_Node_Stmt_Class::MODIFIER_PROTECTED) {\n return 'protected';\n }\n if ($this->node->type & PHPParser_Node_Stmt_Class::MODIFIER_PRIVATE) {\n return 'private';\n }\n\n return 'public';\n }",
"public function getVisibility()\n {\n return $this->get('visibility');\n }",
"function getVisibility() {\n return $this->getFieldValue('visibility');\n }",
"function getVisibilityLevel();",
"function accessible($class, $method, array $caller) {\n $method = new ReflectionMethod($class, $method);\n if (!$method->isPublic()) {\n if (!array_key_exists('class', $caller)) {\n return false;\n }\n else {\n if ($method->isProtected() && ($caller['class'] != $class && !is_subclass_of($caller['class'], $class))) {\n return false;\n }\n elseif ($method->isPrivate() && $caller['class'] != $class) {\n return false;\n }\n }\n }\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
obscurePhrase function would take prase to guess, letters guessed so far by user and the ALHPABET letters and create an obscured phrase where any guessed letters are filled and rest are represented by underscore _ | function obscurePhrase(){
global $phrase_s;
global $guessed_s;
global $ALPHABET;
$phrase_a = str_split($phrase_s);
$obscured_a = array(); #reset array
foreach ($phrase_a as $char){
if (!empty($char)){
#if ( strpos($guessed_s, $char) !== false ) {
if ( strstr($guessed_s, $char) ) {
array_push($obscured_a,$char);
}else if ( strstr($ALPHABET, $char) ){
array_push($obscured_a,'_');
}else{
array_push($obscured_a,$char);
}
}
}
$obscured_s = join(" ",$obscured_a);
echo "<h2>Phrase to Guess: $obscured_s</h2>";
echo "<h3>Guessed sofar: $guessed_s</h3>";
#check if WON!
$obscured_temp = join("",$obscured_a);
if ($obscured_temp == $phrase_s){
echo "<h1>You WON! ...Loading new game...</h1>";
loadWords();
$page = $_SERVER['PHP_SELF'];
header("Refresh: 5; url=$page"); #refresh after 4 sec
}
} | [
"public function catch_phrase()\n\t{\n\t\t$buzzwords = static::translate('faker.company.buzzwords');\n\t\t$words = array();\n\n\t\tforeach ($buzzwords as $group)\n\t\t{\n\t\t\t$words[] = $group[array_rand($group)];\n\t\t}\n\n\t\treturn implode(' ', $words);\n\t}",
"function doPhrase($input) {\n\t\t$input[0] = strtolower($input[0]);\n\t\tif(count($input) > 2) {\n\t\t\tif($input[0] == \"do\" && $input[1] == \"you\" && $input[2] == \"know\") {\n\t\t\t\t$input = pop($input);\n\t\t\t\t$input = pop($input);\n\t\t\t\t$input = pop($input);\n\t\t\t\treturn $input;\n\t\t\t}\n\t\t\tif($input[0] == \"does\") {\n\t\t\t\t$input = pop($input);\n\t\t\t\t\tif(!(is_null($input = brewery($input)))) {\n\t\t\t\t\t\tif(!(is_null($input = infinitiveCreate($input)))) {\n\t\t\t\t\t\t\treturn $input;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}",
"public function generatePhrase() {\n\n $phrase = '';\n $this->string = $this->initString();\n $max = strlen($this->string) - 1;\n\n for ($x = 0; $x < $this->length; $x++) {\n $phrase .= substr( $this->string, random_int(0, $max), 1 );\n }\n return $phrase;\n }",
"function _Prepare() {\n\n\t$phrase = $this->phrase;\n\t\n\t// Processing punctuation\n\t$phrase = preg_replace(\"/[\\\"\\-\\+\\;\\.\\,\\*\\?\\(\\)]/\", \"\", $phrase);\n\t$phrase = preg_replace(\"/[\\!\\:\\_]/\", \" \", $phrase);\n\n\t// Splitting phrase by words\n\tunset($buffer);\n\t$words = explode(\" \", $phrase);\n\tif (!is_array($words)) { return; }\n\n\t// If the word is bigger than 3 symbols or it is a preposition,\n\t// we adding it as is. In another case we merging it. It is need\n\t// to find fouls written with spaces or some punctuations between\n\t// the letters.\t\n\tforeach ($words as $word) {\n\t if ((strlen($word)<3) and (!preg_match(\"/(а[х]?)|(в)|([вмт]ы)|(д[ао])|(же)|(за)/\", $word))) { $buffer .= $word; }\n\t else {\n\t\tif ($buffer) { $out[] = $buffer; $buffer = \"\"; }\n\t\t$out[] = $word;\n\t }\n\t}\n\tif ($buffer) { $out[] = $buffer; }\n\treturn($out);\n }",
"function play_game() {\n\n// Display Recurring Prompt with Empty Blanks _ _ _ _ _ or filled in.\n// As Letters Are Guessed; Display those Letters instead of Blanks\n// When all letters are guessed; display \"You Win!\" + random trivia\n\n\t// create array same length as word that consists of only blanks\n\t// capture user input, use that input to search original string/word\n\t// if letter found, then update display array to include that letter\n\t// check each loop to see if all letters have been guessed; \n\t// or allow manual guess.\n\n// var_dump(strlen($word));\n\n\t$word = generate_random_word();\n\t// echo $word . PHP_EOL;\n\n\t$word_length = strlen($word);\n\t$word_array = str_split($word);\n\t$blank_array = [];\n\n\t// create array of blanks corresponding with word generated\n\tforeach ($word_array as $key => $letter) {\n\t\tarray_push($blank_array, \"_\");\n\t}\n\n\t// var_dump($word_array);\n\n\t$num_guess = 10;\n\n\tdo {\n\n\t\t// If first guess; tell them how many letters in word.\n\t\tif ($num_guess == 10) {\n\t\t\techo \"Your target word has {$word_length} letters.\\n\";\n\t\t}\n\n\t\t// Each time tell them how many guesses they have left.\n\t\techo \"You have {$num_guess} guesses remaining.\\n\";\n\n\n\t\t// Echo out array of blanks each time \n\t\tforeach ($blank_array as $key => $value) {\n\t\t\t\techo $blank_array[$key];\n\t\t\t}\t\n\n\t\techo \"\\n\";\n\n\t\t// Prompt for user input for next letter guess.\n\t\techo \"Your next guess? \";\n\t\t$guess = strtolower(get_input());\n\n\t\t// Increment Guess Count Each Time User Guesses\n\t\t$num_guess--;\n\n\t\t// Set variable equal to the outcome of array search for user input letter on array created from original string.\n\t\t$search = array_search($guess[0], $word_array);\n\t\t\n\t\t// Search Original Word Array for the User Input Letter; if found then update blanks array with that letter to display.\n\t\tif ($search) {\n\t\t\t$blank_array[$search] = $word_array[$search];\n\t\t\t// str_replace($guess, replace, subject)\n\t\t}\n\n\t\t// if array search returns true (an integer value of key for the array), then confirm guess\n\t\tif (is_numeric($search)) {\n\t\t\techo \"Good guess! {$word_array[$search]} found in word at index {$search}. \";\n\t\t}\n\n\t} while ( $num_guess > 0 && !$word_guessed );\n\n\t// If blanks are still found in the blank array after the main loop; assume user lost and give the answer.\n\tif (is_numeric(array_search('_', $blank_array))) {\n\t\techo \"Bummer dude; you lost. The word was: {$word}\\n\";\n\t}\n\n}",
"function pangrams($s) {\n$letters = array_count_values(str_split($s));\nunset($letters[\" \"]);\nreturn (sizeof($letters) == 26 ? \"\" : \"not \").\"pangram\";\n\n}",
"function createPuzzledWord($word)\n{\n $lettersToRemove = array_unique(str_split($word));\n // decide how many letter to remove\n $numOfLettersToRemove = rand(2, count($lettersToRemove) - 2);\n\n // filter letters to remove \n for ($i = 0; $i < $numOfLettersToRemove; $i++) {\n unset($lettersToRemove[rand(0, count($lettersToRemove) - 1)]);\n $lettersToRemove = array_values($lettersToRemove);\n }\n\n // create the puzzled word\n $wordLength = strlen($word);\n for ($i = 0; $i < $wordLength; $i++) {\n for ($j = 0; $j < count($lettersToRemove); $j++) {\n if ($lettersToRemove[$j] == $word[$i]) {\n $word[$i] = '_';\n break;\n }\n }\n }\n\n return $word;\n}",
"function double_metaphone_2( $string )\n{\n $primary = \"\";\n $secondary = \"\";\n $positions = array();\n $current = 0;\n \t\n $current = 0;\n $length = strlen($string);\n $last = $length - 1;\n $original = $string . \" \";\n\n $original = strtoupper($original);\n\n // skip this at beginning of word\n \n if (doublemetaphone_string_at($original, 0, 2, 'GN,KN,PN,WR,PS'))\n $current++;\n\n // Initial 'X' is pronounced 'Z' e.g. 'Xavier'\n \n if (substr($original, 0, 1) == 'X') {\n $primary .= \"S\"; // 'Z' maps to 'S'\n $secondary .= \"S\";\n\t $positions[] = $current;\n $current++;\n }\n\n // main loop\n\n while ($current < $length) {\n switch (substr($original, $current, 1)) {\n case 'A':\n case 'E':\n case 'I':\n case 'O':\n case 'U':\n case 'Y':\n\t\t\t/*$primary .= 'A';\n\t\t\t$secondary .= 'A';\n\t\t\t$positions[] = $current;*/\n\t\t\twhile ( doublemetaphone_is_vowel( $original, $current ) ) {\n\t\t\t\t$current++;\n\t\t\t}\n\t\t\tbreak;\n\n case 'B':\n // '-mb', e.g. \"dumb\", already skipped over ...\n $primary .= 'P';\n $secondary .= 'P';\n\t\t\t$positions[] = $current;\n\n if (substr($original, $current + 1, 1) == 'B')\n $current += 2;\n else\n $current += 1;\n break;\n\n case 'Ç':\n $primary .= 'S';\n $secondary .= 'S';\n\t $positions[] = $current;\n $current += 1;\n break;\n\n case 'C':\n // various gremanic\n if (($current > 1) \n && !doublemetaphone_is_vowel($original, $current - 2)\n && doublemetaphone_string_at($original, $current - 1, 3, 'ACH')\n && ((substr($original, $current + 2, 1) != 'I')\n && ((substr($original, $current + 2, 1) != 'E')\n || doublemetaphone_string_at($original, $current - 2, 6, \n 'BACHER,MACHER')))) {\n\n $primary .= 'K';\n $secondary .= 'K';\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // special case 'caesar'\n if (($current == 0) \n && doublemetaphone_string_at($original, $current, 6, \n 'CAESAR')) {\n $primary .= 'S';\n $secondary .= 'S';\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // italian 'chianti'\n if (doublemetaphone_string_at($original, $current, 4, \n 'CHIA')) {\n $primary .= 'K';\n $secondary .= 'K';\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current, 2, \n 'CH')) {\n\n // find 'michael'\n if (($current > 0)\n && doublemetaphone_string_at($original, $current, 4, \n 'CHAE')) {\n $primary .= 'K';\n $secondary .= 'X';\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // greek roots e.g. 'chemistry', 'chorus'\n if (($current == 0)\n && (doublemetaphone_string_at($original, $current + 1, 5, \n 'HARAC,HARIS')\n || doublemetaphone_string_at($original, $current + 1, 3, \n 'HOR,HYM,HIA,HEM')\n && !doublemetaphone_string_at($original, 0, 5, 'CHORE'))) {\n $primary .= 'K';\n $secondary .= 'K';\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // germanic, greek, or otherwise 'ch' for 'kh' sound\n if ((doublemetaphone_string_at($original, 0, 4, 'VAN ,VON ')\n || doublemetaphone_string_at($original, 0, 3, 'SCH'))\n // 'architect' but not 'arch', orchestra', 'orchid'\n || doublemetaphone_string_at($original, $current - 2, 6, \n 'ORCHES,ARCHIT,ORCHID')\n || doublemetaphone_string_at($original, $current + 2, 1, \n 'T,S')\n || ((doublemetaphone_string_at($original, $current - 1, 1, \n 'A,O,U,E')\n || ($current == 0))\n // e.g. 'wachtler', 'weschsler', but not 'tichner'\n && doublemetaphone_string_at($original, $current + 2, 1, \n 'L,R,N,M,B,H,F,V,W, '))) {\n $primary .= 'K';\n $secondary .= 'K';\n\t $positions[] = $current;\n } else {\n if ($current > 0) {\n if (doublemetaphone_string_at($original, 0, 2, 'MC')) {\n // e.g. 'McHugh'\n $primary .= 'K';\n $secondary .= 'K';\n\t $positions[] = $current;\n } else {\n $primary .= 'X';\n $secondary .= 'K';\n\t $positions[] = $current;\n }\n } else {\n $primary .= 'X';\n $secondary .= 'X';\n\t $positions[] = $current;\n }\n }\n $current += 2;\n break;\n }\n\n // e.g. 'czerny'\n if (doublemetaphone_string_at($original, $current, 2, 'CZ')\n && !doublemetaphone_string_at($original, $current -2, 4, \n 'WICZ')) {\n $primary .= 'S';\n $secondary .= 'X';\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // e.g. 'focaccia'\n if (doublemetaphone_string_at($original, $current + 1, 3, \n 'CIA')) {\n $primary .= 'X';\n $secondary .= 'X';\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n // double 'C', but not McClellan'\n if (doublemetaphone_string_at($original, $current, 2, 'CC')\n && !(($current == 1) \n && (substr($original, 0, 1) == 'M'))) {\n // 'bellocchio' but not 'bacchus'\n if (doublemetaphone_string_at($original, $current + 2, 1,\n 'I,E,H')\n && !doublemetaphone_string_at($original, $current + 2, 2,\n 'HU')) {\n // 'accident', 'accede', 'succeed'\n if ((($current == 1)\n && (substr($original, $current - 1, 1) == 'A'))\n || doublemetaphone_string_at($original, $current - 1, 5,\n 'UCCEE,UCCES')) {\n $primary .= \"KS\";\n $secondary .= \"KS\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n // 'bacci', 'bertucci', other italian\n } else {\n $primary .= \"X\";\n $secondary .= \"X\";\n\t $positions[] = $current;\n }\n $current += 3;\n break;\n } else {\n // Pierce's rule\n $primary .= \"K\";\n $secondary .= \"K\";\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n }\n\n if (doublemetaphone_string_at($original, $current, 2,\n 'CK,CG,CQ')) {\n $primary .= \"K\";\n $secondary .= \"K\";\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current, 2,\n 'CI,CE,CY')) {\n // italian vs. english\n if (doublemetaphone_string_at($original, $current, 3,\n 'CIO,CIE,CIA')) {\n $primary .= \"S\";\n $secondary .= \"X\";\n\t $positions[] = $current;\n } else {\n $primary .= \"S\";\n $secondary .= \"S\";\n\t $positions[] = $current;\n }\n $current += 2;\n break;\n }\n\n // else\n $primary .= \"K\";\n $secondary .= \"K\";\n\t $positions[] = $current;\n\n // name sent in 'mac caffrey', 'mac gregor'\n if (doublemetaphone_string_at($original, $current + 1, 2,\n ' C, Q, G')) {\n $current += 3;\n } else {\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'C,K,Q')\n && !doublemetaphone_string_at($original, $current + 1, 2,\n 'CE,CI')) {\n $current += 2;\n } else {\n $current += 1;\n }\n }\n break;\n\n case 'D':\n if (doublemetaphone_string_at($original, $current, 2,\n 'DG')) {\n if (doublemetaphone_string_at($original, $current + 2, 1,\n 'I,E,Y')) {\n // e.g. 'edge'\n $primary .= \"J\";\n $secondary .= \"J\";\n\t $positions[] = $current;\n $current += 3;\n break;\n } else {\n // e.g. 'edgar'\n $primary .= \"TK\";\n $secondary .= \"TK\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n }\n\n if (doublemetaphone_string_at($original, $current, 2,\n 'DT,DD')) {\n $primary .= \"T\";\n $secondary .= \"T\";\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // else\n $primary .= \"T\";\n $secondary .= \"T\";\n\t $positions[] = $current;\n $current += 1;\n break;\n\n case 'F':\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'F')\n $current += 2;\n else\n $current += 1;\n $primary .= \"F\";\n $secondary .= \"F\";\n break;\n\n case 'G':\n if (substr($original, $current + 1, 1) == 'H') {\n if (($current > 0) \n && !doublemetaphone_is_vowel($original, $current - 1)) {\n $primary .= \"K\";\n $secondary .= \"K\";\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n if ($current < 3) {\n // 'ghislane', 'ghiradelli'\n if ($current == 0) {\n if (substr($original, $current + 2, 1) == 'I') {\n $primary .= \"J\";\n $secondary .= \"J\";\n } else {\n $primary .= \"K\";\n $secondary .= \"K\";\n }\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n }\n\n // Parker's rule (with some further refinements) - e.g. 'hugh'\n if ((($current > 1)\n && doublemetaphone_string_at($original, $current - 2, 1,\n 'B,H,D'))\n // e.g. 'bough'\n || (($current > 2)\n && doublemetaphone_string_at($original, $current - 3, 1,\n 'B,H,D'))\n // e.g. 'broughton'\n || (($current > 3)\n && doublemetaphone_string_at($original, $current - 4, 1,\n 'B,H'))) {\n $current += 2;\n break;\n } else {\n // e.g. 'laugh', 'McLaughlin', 'cough', 'gough', 'rough', 'tough'\n if (($current > 2)\n && (substr($original, $current - 1, 1) == 'U')\n && doublemetaphone_string_at($original, $current - 3, 1,\n 'C,G,L,R,T')) {\n $primary .= \"F\";\n $secondary .= \"F\";\n } elseif (($current > 0)\n && substr($original, $current - 1, 1) != 'I') {\n $primary .= \"K\";\n $secondary .= \"K\";\n }\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n }\n\n if (substr($original, $current + 1, 1) == 'N') {\n if (($current == 1) && doublemetaphone_is_vowel($original, 0)\n && !doublemetaphone_Slavo_Germanic($original)) {\n\t $positions[] = $current;\n\t $positions[] = $current;\n $primary .= \"KN\";\n $secondary .= \"N \";\n } else {\n // not e.g. 'cagney'\n if (!doublemetaphone_string_at($original, $current + 2, 2,\n 'EY')\n && (substr($original, $current + 1) != \"Y\")\n && !doublemetaphone_Slavo_Germanic($original)) {\n\t $positions[] = $current;\n\t $positions[] = $current;\n $primary .= \"N \";\n $secondary .= \"KN\";\n } else {\n\t $positions[] = $current;\n\t $positions[] = $current;\n $primary .= \"KN\";\n $secondary .= \"KN\";\n }\n }\n $current += 2;\n break;\n }\n\n // 'tagliaro'\n if (doublemetaphone_string_at($original, $current + 1, 2,\n 'LI')\n && !doublemetaphone_Slavo_Germanic($original)) {\n\t $positions[] = $current;\n\t $positions[] = $current;\n $primary .= \"KL\";\n $secondary .= \"L \";\n $current += 2;\n break;\n }\n\n // -ges-, -gep-, -gel- at beginning\n if (($current == 0)\n && ((substr($original, $current + 1, 1) == 'Y')\n || doublemetaphone_string_at($original, $current + 1, 2,\n 'ES,EP,EB,EL,EY,IB,IL,IN,IE,EI,ER'))) {\n\t $positions[] = $current;\n $primary .= \"K\";\n $secondary .= \"J\";\n $current += 2;\n break;\n }\n\n // -ger-, -gy-\n if ((doublemetaphone_string_at($original, $current + 1, 2,\n 'ER')\n || (substr($original, $current + 1, 1) == 'Y'))\n && !doublemetaphone_string_at($original, 0, 6,\n 'DANGER,RANGER,MANGER')\n && !doublemetaphone_string_at($original, $current -1, 1,\n 'E,I')\n && !doublemetaphone_string_at($original, $current -1, 3,\n 'RGY,OGY')) {\n\t $positions[] = $current;\n $primary .= \"K\";\n $secondary .= \"J\";\n $current += 2;\n break;\n }\n\n // italian e.g. 'biaggi'\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'E,I,Y')\n || doublemetaphone_string_at($original, $current -1, 4,\n 'AGGI,OGGI')) {\n // obvious germanic\n if ((doublemetaphone_string_at($original, 0, 4, 'VAN ,VON ')\n || doublemetaphone_string_at($original, 0, 3, 'SCH'))\n || doublemetaphone_string_at($original, $current + 1, 2,\n 'ET')) {\n\t $positions[] = $current;\n $primary .= \"K\";\n $secondary .= \"K\";\n } else {\n // always soft if french ending\n if (doublemetaphone_string_at($original, $current + 1, 4,\n 'IER ')) {\n\t $positions[] = $current;\n $primary .= \"J\";\n $secondary .= \"J\";\n } else {\n\t $positions[] = $current;\n $primary .= \"J\";\n $secondary .= \"K\";\n }\n }\n $current += 2;\n break;\n }\n\n\t $positions[] = $current;\n if (substr($original, $current +1, 1) == 'G')\n $current += 2;\n else\n $current += 1;\n\n $primary .= 'K';\n $secondary .= 'K';\n break;\n\n case 'H':\n // only keep if first & before vowel or btw. 2 vowels\n if ((($current == 0) || \n doublemetaphone_is_vowel($original, $current - 1))\n && doublemetaphone_is_vowel($original, $current + 1)) {\n $primary .= 'H';\n $secondary .= 'H';\n\t $positions[] = $current;\n $current += 2;\n } else\n $current += 1;\n break;\n\n case 'J':\n // obvious spanish, 'jose', 'san jacinto'\n if (doublemetaphone_string_at($original, $current, 4,\n 'JOSE')\n || doublemetaphone_string_at($original, 0, 4, 'SAN ')) {\n if ((($current == 0)\n && (substr($original, $current + 4, 1) == ' '))\n || doublemetaphone_string_at($original, 0, 4, 'SAN ')) {\n $primary .= 'H';\n $secondary .= 'H';\n } else {\n $primary .= \"J\";\n $secondary .= 'H';\n }\n\t $positions[] = $current;\n $current += 1;\n break;\n }\n\n if (($current == 0)\n && !doublemetaphone_string_at($original, $current, 4,\n 'JOSE')) {\n $primary .= 'J'; // Yankelovich/Jankelowicz\n $secondary .= 'A';\n\t $positions[] = $current;\n } else {\n // spanish pron. of .e.g. 'bajador'\n if (doublemetaphone_is_vowel($original, $current - 1)\n && !doublemetaphone_Slavo_Germanic($original)\n && ((substr($original, $current + 1, 1) == 'A')\n || (substr($original, $current + 1, 1) == 'O'))) {\n $primary .= \"J\";\n $secondary .= \"H\";\n\t $positions[] = $current;\n } else {\n if ($current == $last) {\n $primary .= \"J\";\n $secondary .= \" \";\n\t $positions[] = $current;\n } else {\n if (!doublemetaphone_string_at($original, $current + 1, 1,\n 'L,T,K,S,N,M,B,Z')\n && !doublemetaphone_string_at($original, $current - 1, 1,\n 'S,K,L')) {\n $primary .= \"J\";\n $secondary .= \"J\";\n\t $positions[] = $current;\n }\n }\n }\n }\n\n if (substr($original, $current + 1, 1) == 'J') // it could happen\n $current += 2;\n else \n $current += 1;\n break;\n\n case 'K':\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'K')\n $current += 2;\n else\n $current += 1;\n $primary .= \"K\";\n $secondary .= \"K\";\n break;\n\n case 'L':\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'L') {\n // spanish e.g. 'cabrillo', 'gallegos'\n if ((($current == ($length - 3))\n && doublemetaphone_string_at($original, $current - 1, 4,\n 'ILLO,ILLA,ALLE'))\n || ((doublemetaphone_string_at($original, $last-1, 2,\n 'AS,OS')\n || doublemetaphone_string_at($original, $last, 1,\n 'A,O'))\n && doublemetaphone_string_at($original, $current - 1, 4,\n 'ALLE'))) {\n $primary .= \"L\";\n $secondary .= \" \";\n $current += 2;\n break;\n }\n $current += 2;\n } else \n $current += 1;\n $primary .= \"L\";\n $secondary .= \"L\";\n break;\n\n case 'M':\n\t $positions[] = $current;\n if ((doublemetaphone_string_at($original, $current - 1, 3,\n 'UMB')\n && ((($current + 1) == $last)\n || doublemetaphone_string_at($original, $current + 2, 2,\n 'ER')))\n // 'dumb', 'thumb'\n || (substr($original, $current + 1, 1) == 'M')) {\n $current += 2;\n } else {\n $current += 1;\n }\n $primary .= \"M\";\n $secondary .= \"M\";\n break;\n\n case 'N':\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'N') \n $current += 2;\n else\n $current += 1;\n $primary .= \"N\";\n $secondary .= \"N\";\n break;\n\n case 'Ñ':\n\t $positions[] = $current;\n $current += 1;\n $primary .= \"N\";\n $secondary .= \"N\";\n break;\n\n case 'P':\n if (substr($original, $current + 1, 1) == 'H') {\n\t $positions[] = $current;\n $current += 2;\n $primary .= \"F\";\n $secondary .= \"F\";\n break;\n }\n\n\t $positions[] = $current;\n // also account for \"campbell\" and \"raspberry\"\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'P,B'))\n $current += 2;\n else\n $current += 1;\n $primary .= \"P\";\n $secondary .= \"P\";\n break;\n\n case 'Q':\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'Q') \n $current += 2;\n else \n $current += 1;\n $primary .= \"K\";\n $secondary .= \"K\";\n break;\n\n case 'R':\n // french e.g. 'rogier', but exclude 'hochmeier'\n if (($current == $last)\n && !doublemetaphone_Slavo_Germanic($original)\n && doublemetaphone_string_at($original, $current - 2, 2,\n 'IE')\n && !doublemetaphone_string_at($original, $current - 4, 2,\n 'ME,MA')) {\n $primary .= \" \";\n $secondary .= \"R\";\n } else {\n $primary .= \"R\";\n $secondary .= \"R\";\n }\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'R') \n $current += 2;\n else\n $current += 1;\n break;\n\n case 'S':\n // special cases 'island', 'isle', 'carlisle', 'carlysle'\n if (doublemetaphone_string_at($original, $current - 1, 3,\n 'ISL,YSL')) {\n $current += 1;\n break;\n }\n\n // special case 'sugar-'\n if (($current == 0)\n && doublemetaphone_string_at($original, $current, 5,\n 'SUGAR')) {\n $primary .= \"X\";\n $secondary .= \"S\";\n\t $positions[] = $current;\n $current += 1;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current, 2,\n 'SH')) {\n // germanic\n if (doublemetaphone_string_at($original, $current + 1, 4,\n 'HEIM,HOEK,HOLM,HOLZ')) {\n $primary .= \"S\";\n $secondary .= \"S\";\n } else {\n $primary .= \"X\";\n $secondary .= \"X\";\n }\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n // italian & armenian \n if (doublemetaphone_string_at($original, $current, 3,\n 'SIO,SIA')\n || doublemetaphone_string_at($original, $current, 4,\n 'SIAN')) {\n if (!doublemetaphone_Slavo_Germanic($original)) {\n $primary .= \"S\";\n $secondary .= \"X\";\n } else {\n $primary .= \"S\";\n $secondary .= \"S\";\n }\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n // german & anglicisations, e.g. 'smith' match 'schmidt', 'snider' match 'schneider'\n // also, -sz- in slavic language altho in hungarian it is pronounced 's'\n if ((($current == 0)\n && doublemetaphone_string_at($original, $current + 1, 1,\n 'M,N,L,W'))\n || doublemetaphone_string_at($original, $current + 1, 1,\n 'Z')) {\n $primary .= \"S\";\n $secondary .= \"X\";\n\t $positions[] = $current;\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'Z'))\n $current += 2;\n else\n $current += 1;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current, 2,\n 'SC')) {\n // Schlesinger's rule \n if (substr($original, $current + 2, 1) == 'H')\n // dutch origin, e.g. 'school', 'schooner'\n if (doublemetaphone_string_at($original, $current + 3, 2,\n 'OO,ER,EN,UY,ED,EM')) {\n // 'schermerhorn', 'schenker' \n if (doublemetaphone_string_at($original, $current + 3, 2,\n 'ER,EN')) {\n $primary .= \"X \";\n $secondary .= \"SK\";\n } else {\n $primary .= \"SK\";\n $secondary .= \"SK\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n }\n $current += 3;\n break;\n } else {\n if (($current == 0) \n && !doublemetaphone_is_vowel($original, 3)\n && (substr($original, $current + 3, 1) != 'W')) {\n $primary .= \"X\";\n $secondary .= \"S\";\n } else {\n $primary .= \"X\";\n $secondary .= \"X\";\n }\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current + 2, 1,\n 'I,E,Y')) {\n $primary .= \"S\";\n $secondary .= \"S\";\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n // else\n $primary .= \"SK\";\n $secondary .= \"SK\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n // french e.g. 'resnais', 'artois'\n if (($current == $last)\n && doublemetaphone_string_at($original, $current - 2, 2,\n 'AI,OI')) {\n $primary .= \" \";\n $secondary .= \"S\";\n } else {\n $primary .= \"S\";\n $secondary .= \"S\";\n }\n\t $positions[] = $current;\n\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'S,Z'))\n $current += 2;\n else \n $current += 1;\n break;\n\n case 'T':\n if (doublemetaphone_string_at($original, $current, 4,\n 'TION')) {\n $primary .= \"X\";\n $secondary .= \"X\";\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current, 3,\n 'TIA,TCH')) {\n $primary .= \"X\";\n $secondary .= \"X\";\n\t $positions[] = $current;\n $current += 3;\n break;\n }\n\n if (doublemetaphone_string_at($original, $current, 2,\n 'TH')\n || doublemetaphone_string_at($original, $current, 3,\n 'TTH')) {\n // special case 'thomas', 'thames' or germanic\n if (doublemetaphone_string_at($original, $current + 2, 2,\n 'OM,AM')\n || doublemetaphone_string_at($original, 0, 4, 'VAN ,VON ')\n || doublemetaphone_string_at($original, 0, 3, 'SCH')) {\n $primary .= \"T\";\n $secondary .= \"T\";\n } else {\n $primary .= \"0\";\n $secondary .= \"T\";\n }\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n\t $positions[] = $current;\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'T,D'))\n $current += 2;\n else\n $current += 1;\n $primary .= \"T\";\n $secondary .= \"T\";\n break;\n\n case 'V':\n\t $positions[] = $current;\n if (substr($original, $current + 1, 1) == 'V')\n $current += 2;\n else\n $current += 1;\n $primary .= \"F\";\n $secondary .= \"F\";\n break;\n\n case 'W':\n // can also be in middle of word\n if (doublemetaphone_string_at($original, $current, 2, 'WR')) {\n $primary .= \"R\";\n $secondary .= \"R\";\n\t $positions[] = $current;\n $current += 2;\n break;\n }\n\n if (($current == 0)\n && (doublemetaphone_is_vowel($original, $current + 1)\n || doublemetaphone_string_at($original, $current, 2, \n 'WH'))) {\n // Wasserman should match Vasserman \n if (doublemetaphone_is_vowel($original, $current + 1)) {\n $primary .= \"A\";\n $secondary .= \"F\";\n } else {\n // need Uomo to match Womo \n $primary .= \"A\";\n $secondary .= \"A\";\n }\n\t $positions[] = $current;\n }\n\n // Arnow should match Arnoff\n if ((($current == $last) \n && doublemetaphone_is_vowel($original, $current - 1))\n || doublemetaphone_string_at($original, $current - 1, 5,\n 'EWSKI,EWSKY,OWSKI,OWSKY')\n || doublemetaphone_string_at($original, 0, 3, 'SCH')) {\n $primary .= \" \";\n $secondary .= \"F\";\n\t $positions[] = $current;\n $current += 1;\n break;\n }\n\n // polish e.g. 'filipowicz'\n if (doublemetaphone_string_at($original, $current, 4,\n 'WICZ,WITZ')) {\n $primary .= \"TS\";\n $secondary .= \"FX\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n $current += 4;\n break;\n }\n\n // else skip it\n $current += 1;\n break;\n\n case 'X':\n // french e.g. breaux \n if (!(($current == $last)\n && (doublemetaphone_string_at($original, $current - 3, 3,\n 'IAU,EAU')\n || doublemetaphone_string_at($original, $current - 2, 2,\n 'AU,OU')))) {\n $primary .= \"KS\";\n $secondary .= \"KS\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n }\n\n if (doublemetaphone_string_at($original, $current + 1, 1,\n 'C,X'))\n $current += 2;\n else\n $current += 1;\n break;\n\n case 'Z':\n // chinese pinyin e.g. 'zhao' \n if (substr($original, $current + 1, 1) == \"H\") {\n $primary .= \"J\";\n $secondary .= \"J\";\n $current += 2;\n break;\n } elseif (doublemetaphone_string_at($original, $current + 1, 2,\n 'ZO,ZI,ZA')\n || (doublemetaphone_Slavo_Germanic($original)\n && (($current > 0)\n && substr($original, $current - 1, 1) != 'T'))) {\n $primary .= \"S \";\n $secondary .= \"TS\";\n\t $positions[] = $current;\n\t $positions[] = $current;\n } else {\n $primary .= \"S\";\n $secondary .= \"S\";\n\t $positions[] = $current;\n }\n\n if (substr($original, $current + 1, 1) == 'Z')\n $current += 2;\n else\n $current += 1;\n break;\n\n default:\n $current += 1;\n\n } // end switch\n\n // printf(\"<br>ORIGINAL: '%s'\\n\", $original);\n // printf(\"<br>current: '%s'\\n\", $current);\n // printf(\"<br>last: '%s'\\n\", end($positions));\n // printf(\"<br> PRIMARY: '%s'\\n\", $primary);\n // printf(\"<br> SECONDARY: '%s'\\n\", $secondary);\n\n } // end while\n\n /*$primary = substr($primary, 0, 4);\n $secondary = substr($secondary, 0, 4);\n \n if( $primary == $secondary )\n {\n \t$secondary = NULL ;\t\n }*/\n \n $result[\"primary\"] = $primary ;\n $result[\"secondary\"] = $secondary ;\n\t$result['positions'] = $positions;\n\n return $result ;\n\n }",
"function encodeMessage($message, $private_key){\n global $allChars;\n //Seeds the RNG with the user's password (as a number) and records original message length\n //Mess length is needed for decryption\n mt_srand(stringToNumber($private_key));\n $encoded = \"\";\n $lengthDiffusion = + mt_rand(-150, 150);\n $messageLength = strlen($message);\n //This loop goes through each letter of the message and then shifts it up a certain amount of characters using the numberToLetter method\n //It takes the letter's number (with stringToNumber) and then adds a random amount on to that number and then reconverts the number to a letter\n for($i = 0; $i < $messageLength; $i++){\n $message = substr_replace($message, numberToLetter(stringToNumber(substr($message, $i, 1)) + mt_rand(0, strlen($allChars))), $i, 1);\n }\n //This part \"fills\" and anagrams the message from its current stage\n //\"filling\" is inserting random letters in between all \"legit\" letters\n //anagramming happens when random \"legit\" letters are inserted in no particular order\n $alreadyUsed = array();\n $randSpot = 0;\n while(sizeof($alreadyUsed) < $messageLength){\n while(mt_rand(0, 1) == 1){\n $encoded .= randLetter();\n }\n do{\n $randSpot = mt_rand(0, $messageLength - 1);\n }while(in_array($randSpot, $alreadyUsed));\n $alreadyUsed[] = $randSpot;\n $encoded .= substr($message, $randSpot, 1);\n }\n while(mt_rand(0, 1) == 1){\n $encoded .= randLetter();\n }\n //This part adds the encoded message and concatenates it with a \";\" and the original message length\n //The original message length is necessary for decryption because it was used for loop counters and such in encryption\n return $encoded . \";\" . ($messageLength + $lengthDiffusion);\n }",
"function phoneticize($str) {\n // 1) clean the string making all chars only letters, numbers and spaces\n // 2) remove duplicate letters\n // 3) replace some similar phonems by an univoque one\n // factorizing the words that way allow to compare 2 words and find if they sounds the same or not.\n // it is more accurate than any soundex functions since it not based on differences of raw words\n // it is more faster and less greedy\n return str_replace(' ','',\n str_replace(array('eu','eux','eut'),'e',\n str_replace(array('eau','au'),'o',\n str_replace(array('ais ', 'ait '),'e ',\n preg_replace('/e[rt] /','e ',\n preg_replace('/([aeiouy]s[tm]) /','$1e ',\n preg_replace('/([^aeiouy])h/','$1',\n str_replace(array('eu','oe'),'e',\n str_replace(array(' eu ',' eus ',' eut ',' ut '),' u ',\n preg_replace('/([aeiouy])m([pb])/','$1n$2',\n preg_replace('/([^aeiouys])[ts] /','$1 ',\n str_replace('ae','e',\n str_replace('au','o',\n str_replace('qu','k',\n str_replace('ci','si',\n str_replace(array('ai','ay', 'ei','ey'),'e',\n str_replace(array('ein ','ain '),'in ',\n str_replace('an','en',\n str_replace(array('rs ','rts'),'r ',\n str_replace('tp','p',\n str_replace('ies ','i ',\n str_replace('oie ','oi ',\n str_replace('ue ','u ',\n str_replace('y','i',\n str_replace('rt','r',\n preg_replace('/([aiouy])se? /','$1sse ',\n preg_replace('/([^aeouy])ie /','$1i ',\n str_replace('kk','k',\n preg_replace('/c([aeoiuyk])/','k$1',\n str_replace('ce','sse',\n str_replace(array('leu ','leux ', 'leut'),'le ',\n preg_replace('/h([aeoiuy])/','$1',\n preg_replace('/([aeoiuy])h/','$1',\n str_replace('aint','int',\n str_replace('ch','§',\n str_replace('ph','f',\n str_replace('th','t',\n str_replace(' dr ',' docteur ',\n str_replace(' av ',' avenue ',\n str_replace(' pl ',' place ',\n str_replace(' dla ',' de la ',\n str_replace(' d la ',' de la ',\n str_replace(' des ',' dez ',\n str_replace(' st ',' saint ',\n ' '.unduplicateLetters(cleanStr($str)).' '\n ))))))))))))))))))))))))))))))))))))))))))));\n}",
"public function getPhrase()\n {\n $alliteration = new Alliteration();\n $phrase = $alliteration->getPhrase('p', 2);\n $words = explode(' ', $phrase);\n $this->assertSame(2, count($phrase));\n $this->assertSame('P', substr($words[0], 0, 1));\n $this->assertSame('P', substr($words[1], 0, 1));\n }",
"public function swordTries();",
"function remove_assentos($frase)\r\n{\r\n$caracteres=array(\r\narray(\"á\",\"a\"),array(\"à\",\"a\"),array(\"Á\",\"A\"),array(\"À\",\"A\"),array(\"â\",\"a\"),array(\"ã\",\"a\"),array(\"Â\",\"A\"),array(\"Ã\",\"A\"),array(\"å\",\"a\"),array(\"ä\",\"a\"),array(\"Ä\",\"A\"),array(\"Å\",\"A\"),\r\narray(\"é\",\"e\"),array(\"è\",\"e\"),array(\"ê\",\"e\"),array(\"É\",\"E\"),array(\"È\",\"E\"),array(\"Ê\",\"E\"),array(\"ë\",\"e\"),\r\narray(\"í\",\"i\"),array(\"ì\",\"i\"),array(\"î\",\"i\"),array(\"Í\",\"I\"),array(\"Ì\",\"I\"),array(\"Î\",\"I\"),array(\"ï\",\"i\"),\r\narray(\"ó\",\"o\"),array(\"ò\",\"o\"),array(\"ô\",\"o\"),array(\"õ\",\"o\"),array(\"Ó\",\"O\"),array(\"Ò\",\"O\"),array(\"Ô\",\"O\"),array(\"Õ\",\"O\"),array(\"ö\",\"o\"),array(\"Ö\",\"O\"),\r\narray(\"ú\",\"u\"),array(\"ù\",\"u\"),array(\"û\",\"u\"),array(\"Ú\",\"U\"),array(\"Ù\",\"U\"),array(\"Û\",\"U\"),array(\"ü\",\"u\"),array(\"Ü\",\"U\"),array(\"ü\",\"u\"),array(\"Ü\",\"U\"),\r\narray(\"ç\",\"c\"),array(\"Ç\",\"C\"),\r\narray(\"ñ\",\"n\"),array(\"Ñ\",\"N\"),\r\narray(\" \",\"-\")\r\n);\r\n$saida=\"\";\r\n\r\nfor($i=0;$i<strlen($frase);$i++)\r\n {\r\n $posicao=-1;\r\n $caracter=substr($frase,$i,1);\r\n if(ord($caracter)>127)\r\n for($j=0;$j<count($caracteres);$j++)\r\n {\r\n\t if($caracteres[$j][0]==$caracter)\r\n\t {\r\n\t\t $posicao=$j;\r\n\t\t break;\r\n\t\t}\r\n\t }\r\n\tif($posicao>=0)\r\n\t {\r\n\t $saida=$saida.$caracteres[$posicao][1];\r\n\t }\r\n\t else\r\n\t {\r\n\t $saida=$saida.$caracter;\r\n\t } \r\n }\r\nreturn($saida);\r\n}",
"function atbash($input_array) {\n global $upper_alphabet, $lower_alphabet;\n $output = '';\n foreach ($input_array as $input_letter) {\n if (preg_match('/[A-Z]/', $input_letter)) {\n for ($i = 0; $i < 26; $i++) {\n if ($upper_alphabet[$i] == $input_letter) \n\t $output .= $upper_alphabet[25 - $i];\n }\n } elseif (preg_match('/[a-z]/', $input_letter)) {\n for ($i = 0; $i < 26; $i++) {\n if ($lower_alphabet[$i] == $input_letter) \n\t $output .= $lower_alphabet[25 - $i];\n }\n } else {\n $output .= $input_letter;\n }\n }\n return $output;\n}",
"public function createCAPTCHA()\n {\n $res = '';\n $numberWords = new Numbers_Words();\n $phrase = $this->getPhrase();\n if ($this->_mode == 'single') {\n $phraseArr = str_split($phrase);\n for ($i = 0; $i < strlen($phrase); $i++) {\n $res .= ' ' . $numberWords->toWords($phraseArr[$i], $this->_locale);\n }\n } else {\n $res = $numberWords->toWords($phrase, $this->_locale);\n }\n $this->setCaptcha($res);\n }",
"function wordfilter($checkstr,$output){\n\n/////////////////////////////////// Regaular Cleaning\n\n$iarray = explode(\",\",$checkstr) ;\n\nforeach($iarray as $i){\n\n$output = eregi_replace(trim($i),' ***** ',$output) ;\n\n}\n/////////////////////////////////////////////////////\n\n////////////////////////////////////// Phonetic Filter\n\n\nforeach($iarray as $i){\n//---------------------------------------------------------------- 1\n$checkz = explode(\" \",$output) ;\n\nforeach($checkz as $c){\n//---------------------------------------------------------------- 2\n\nif(metaphone(trim($c))== metaphone(trim($i))){\n\n$output = eregi_replace($c,' ***** ',$output) ;\n\n}\n\n//---------------------------------------------------------------- 2\n\n}\n//---------------------------------------------------------------- 1\n\n}\n\n//////////////////////////////////////////////////////\nreturn $output ;\n\n}",
"public function findSecretPhrase(){\n return $this->bruteForce($this->cleanList());\n }",
"function spanish_metaphone(\n $string ///< The string to tokenize.\n) {\n //initialize metaphone key string\n $meta_key = \"\";\n \n //set maximum metaphone key size\n $key_length = 6;\n \n //set current position to the beginning\n $current_pos = 0;\n \n //get string length\n $string_length = strlen($string);\n \n //set to the end of the string\n $end_of_string_pos = $string_length - 1;\n $original_string = $string. \" \";\n\n //Let's replace some spanish characters easily confused\n $original_string = strtr($original_string, 'bz', 'AEIOUNUVS');\n \n //convert string to uppercase\n $original_string = strtoupper($original_string);\n \n \n // main loop\n while (strlen($meta_key) < $key_length) {\n //break out of the loop if greater or equal than the length\n if ($current_pos >= $string_length) {\n break;\n }\n \n //get character from the string\n $current_char = substr($original_string, $current_pos, 1);\n \n //if it is a vowel, and it is at the begining of the string,\n //set it as part of the meta key\n if (spanish_metaphone_is_vowel($original_string, $current_pos)\n && ($current_pos == 0)) {\n $meta_key .= $current_char;\n $current_pos += 1;\n } elseif (spanish_metaphone_string_at(\n $original_string,\n $current_pos,\n 1,\n array('D','F','J','K','M','N','P','R','S','T','V')\n )) {\n //Let's check for consonants that have a single sound\n //or already have been replaced because they share the same\n //sound like 'B' for 'V' and 'S' for 'Z'\n $meta_key .= $current_char;\n \n //increment by two if a repeated letter is found\n if (substr($original_string, $current_pos + 1, 1) == $current_char) {\n $current_pos += 2;\n }\n \n //else increment only by one\n $current_pos += 1;\n } else //check consonants with similar confusing sounds\n {\n switch ($current_char) {\n case 'C':\n //special case 'macho', chato,etc.\n if (substr($original_string, $current_pos + 1, 1)== 'H') {\n $current_pos += 2;\n } elseif (substr($original_string, $current_pos + 1, 1)== 'C') {\n //special case 'accin', 'reaccin',etc.\n $meta_key .= 'X';\n $current_pos += 2;\n break;\n } elseif (spanish_metaphone_string_at($original_string, $current_pos, 2, array('CE','CI'))) {\n // special case 'cesar', 'cien', 'cid', 'conciencia'\n $meta_key .= 'S';\n $current_pos += 2;\n break;\n } // else\n $meta_key .= 'K';\n $current_pos += 1;\n break;\n \n case 'G':\n // special case 'gente', 'ecologia',etc\n if (spanish_metaphone_string_at(\n $original_string,\n $current_pos,\n 2,\n array('GE','GI')\n )) {\n $meta_key .= 'J';\n $current_pos += 2;\n break;\n } // else\n $meta_key .= 'G';\n $current_pos += 1;\n break;\n \n //since the letter 'h' is silent in spanish,\n //let's set the meta key to the vowel after the letter 'h'\n case 'H':\n if (spanish_metaphone_is_vowel($original_string, $current_pos + 1)) {\n $meta_key .= $original_string[$current_pos + 1];\n $current_pos += 2;\n break;\n }\n \n // else\n $meta_key .= 'H';\n $current_pos += 1;\n break;\n \n case 'Q':\n if (substr($original_string, $current_pos + 1, 1) == 'U') {\n $current_pos += 2;\n } else {\n $current_pos += 1;\n }\n \n $meta_key .= 'K';\n break;\n \n case 'W':\n $meta_key .= 'U';\n $current_pos += 2;\n break;\n \n case 'X':\n //some mexican spanish words like'Xochimilco','xochitl'\n if ($current_pos == 0) {\n $meta_key .= 'S';\n $current_pos += 2;\n break;\n }\n \n $meta_key .= 'X';\n $current_pos += 1;\n break;\n \n default:\n $current_pos += 1;\n } // end of switch\n }//end else\n \n //Commented code *** for debugging purposes only ***\n /*\n printf(\"<br>ORIGINAL STRING: '%s'\\n\", $original_string);\n printf(\"<br>CURRENT POSITION: '%s'\\n\", $current_pos);\n intf(\"<br>META KEY STRING: '%s'\\n\", $meta_key);\n */\n } // end of while loop\n \n //trim any blank characters\n $meta_key = trim($meta_key) ;\n \n //return the final meta key string\n return $meta_key;\n}",
"function factoriseAlphabates($word)\n{\n // alphabates are set ordering by based on frequency from anagram phrase\n \n\n $factors = array(\n 'i' => 2, 'l' => 3, 'o' => 5, 'n' => 7, 'e' => 11,\n 'a' => 13, 'v' => 17, 'd' => 19, 'w' => 23, 't' => 29,\n 's' => 31, 'y' => 37, 'u' => 41, 'm' => 43, 'r' => 47,\n 'f' => 53, 'g' => 59, 'c' => 61, 'p' => 67, 'b' => 71,\n 'h' => 73, 'k' => 79, 'j' => 83, 'x' => 89, 'q' => 97,\n 'z' => 101, '\\'' => 103\n );\n\n $total = 1;\n\n $letters = str_split($word);\n\n foreach ($letters as $thisLetter) {\n if (isset($factors[$thisLetter])) {\n $total *= $factors[$thisLetter];\n }\n }\n\n return $total;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called after the check that all required registry values have been set correctly has run. | public function afterRegistry()
{
// parent::afterRegistry();
} | [
"public function afterRegistry()\r\n {\r\n parent::afterRegistry();\r\n\r\n $this->refreshGroupSettings();\r\n }",
"public function afterRegistry()\n { }",
"public function afterRegistry()\n {\n parent::afterRegistry();\n\n if ($this->loadDefault) {\n $this->loadDefaultElements();\n }\n }",
"public function afterRegistry()\n {\n parent::afterRegistry();\n\n $this->initTranslateable();\n $this->setAdditionalDependencies();\n }",
"public function validate_post_robot_settings()\n {\n }",
"protected function checkValuesValidity(): void\n {\n //\n }",
"protected function _afterOnLoadAssertions()\n\t{\n\t}",
"public function afterValidate()\n {\n $this->validateUserPassword();\n $this->validateUserStatus();\n $this->validateLoginStatus();\n $this->validateGoogleAuthenticatorCode();\n\n parent::afterValidate();\n }",
"protected function recheckWizardsAndRowUpdaters() {}",
"function setupValues() {}",
"protected function afterValidate()\n {\n\n }",
"public function afterSetup()\n {\n }",
"public function afterValidate(): void\n {\n }",
"protected function checkRegistry()\n {\n foreach ($this->getExpectedClassrooms() as $classId => $classroom) {\n $this->assertTrue(\n $this->registry->offsetExists($classId),\n sprintf('Parser did not add class room \"%s\" to registry', $classId)\n );\n\n $this->assertEquals(\n $classroom,\n $this->registry->offsetGet($classId),\n sprintf('Parser created invalid class room for class \"%s\"', $classId)\n );\n }\n }",
"protected function afterValidation()\n {\n //\n }",
"public function afterValidation()\n {\n }",
"public function afterPropertiesSet();",
"protected function markWizardDone()\n {\n $systemRegistry = GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\Registry::class);\n $systemRegistry->set('gb_events', 'upgradeWizardVersion', static::UPGRADE_WIZARD_VERSION);\n }",
"public function postProcess()\n {\n $form_values = $this->getConfigFormValues();\n\n foreach (array_keys($form_values) as $key) {\n Configuration::updateValue($key, Tools::getValue($key));\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks if the value is set, otherwise the function returns the alternative parameter Example: ns($_Session['UserID'],0); If a User ID exists, it is returned otherwise 0. | function ns(&$value, $else=''){
if(isset($value)){
return $value;
}else{
return $else;
}
} | [
"function setIdUserVisiting(){\n\tif(!isset($_SESSION['idUserVisiting']) OR ($_SESSION['idUserVisiting']==0)){\n\t\t//echo \"no seteada<br />\";\n\t\t$iSMuIdKey=$_SESSION['iSMuIdKey'];\n\t\treturn $iSMuIdKey;\n\t}else{\n\t\t//echo \"seteada<br />\";\n\t\t$iSMuIdKey=$_SESSION['idUserVisiting'];\n\t\treturn $iSMuIdKey;\n\t}\n}",
"function return_session_value_or_default($varname, $default)\n{\n if (isset($_SESSION[$varname]) && $_SESSION[$varname] != '') {\n return $_SESSION[$varname];\n }\n\n return $default;\n}",
"function return_session_value_or_default($varname, $default) {\n\tglobal $log;\n\t$log->debug('> return_session_value_or_default '.$varname.','. $default);\n\tif (isset($_SESSION[$varname]) && $_SESSION[$varname] != '') {\n\t\t$log->debug('< return_session_value_or_default');\n\t\treturn $_SESSION[$varname];\n\t}\n\t$log->debug('< return_session_value_or_default');\n\treturn $default;\n}",
"function valueofvar_reqorset($varreq,$varsetuser,$varconfigset)\r\n{\r\n\r\n\t$val_final=\"\";\r\n\tif(isset($_REQUEST[$varreq]) && $_REQUEST[$varreq]!=\"\" )\r\n\t{\r\n\t\t$val_final=$_REQUEST[$varreq];\r\n\t\treturn $val_final;\r\n\t}\r\n\telse if (isset($varsetuser) && $varsetuser!=\"\")\r\n\t{\r\n\t\t$val_final=$varsetuser;\r\n\t\treturn $val_final;\r\n\t}\r\n\telse if($varconfigset != \"\")\r\n\t{\r\n\t\t\r\n\t\t$val_final=$varconfigset;\r\n\t\treturn $val_final;\r\n\t}\r\n\treturn $val_final;\r\n\r\n}",
"function session_get_int( $p_name, $p_default = null ) {\n\t$t_args = func_get_args();\n\treturn (int)call_user_func_array( 'session_get', $t_args );\n}",
"function getifSet(&$value, $default = null)\n{\n //if it is set return the value, or else, return the default value\n return isset($value) ? $value : $default;\n}",
"function get_request_value($value, $default_value = '', $session_key = '')\n{\n\tif($session_key != '')\n\t{\n\t\tif(isset($_SESSION['request_values'][$session_key][$value]))\n\t\t{\n\t\t\t$default_value = $_SESSION['request_values'][$session_key][$value];\n\t\t}\n\t}\n\tif(isset($_REQUEST[$value]))\n\t{\n\t\t$result = get_value_with_default($_REQUEST[$value], $default_value);\n\t}\n\telse\n\t{\n\t\t$result = $default_value;\n\t}\n\n\tif($session_key != '')\n\t{\n\t\t$_SESSION['request_values'][$session_key][$value] = $result;\n\t}\n\n\treturn $result;\n}",
"function hasSessionValue($name);",
"function _SESSION($k, $def='')\n{\n\treturn (array_key_exists($k, $_SESSION) ? $_SESSION[$k] : $def);\n}",
"public function findUsername($value=NULL)\n\t{\n\t\t# Set the Database instance to a variable.\n\t\t$db=DB::get_instance();\n\t\t# Set the Validator instance to a variable.\n\t\t$validator=Validator::getInstance();\n\t\t# Bring the Login class into scope.\n\t\tglobal $login;\n\n\t\t# Check if the passed ID is empty.\n\t\tif($validator->isInt($value)===TRUE)\n\t\t{\n\t\t\t# Find the user's ID and set it to a variable.\n\t\t\treturn $login->findUsername($value);\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"public static function getUserID() {\r\n\t\tif(empty(self::$userID) && isset($_SESSION['userID'])){\r\n\t\t\tself::$userID = $_SESSION['userID'];\r\n\t\t\treturn self::$userID;\r\n\t\t}else if(!empty(self::$userID)){\r\n\t\t\treturn self::$userID;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function helper_getSession($parameter) {\n if (isset($_SESSION[$parameter])) {\n return $_SESSION[$parameter];\n }\n return \"\";\n}",
"function checkVarIsSet($string) {\n\n\t\t\tif (isset($_GET[$string] ) ){\n\t\t\t\t\n\t\t\t\treturn $_GET[$string];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\treturn \"undefined\";\n\t\t\t}\n\t\t//\tif (isset($_POST[\"idnumber\"]))\n\t\t}",
"function issetLoginUser(){\n return isset($_SESSION['login_user']);\n }",
"function getInitialValue(\n $strPostSufix,\n $defaultValue = \"\",\n $priorityValue = \"\",\n $strSessionSufix = null,\n $bolSetSession = true,\n $strPostPrefix = \"data\",\n $strSessionPrefix = \"sessiondata\",\n $bolAlertCall = false\n) {\n global $_SESSION;\n global $_POST;\n if ($strSessionSufix == null) {\n $strSessionSufix = $strPostSufix;\n }\n if ($bolAlertCall) {\n $value = $priorityValue;\n } else {\n //set nilai: urutan prioritas: priority, post, session, default\n if ($priorityValue != \"\") {\n $value = $priorityValue;\n } else {\n if (isset($_POST[$strPostPrefix . $strPostSufix])) {\n $value = $_REQUEST[$strPostPrefix . $strPostSufix];\n } else {\n $value = (isset($_SESSION[$strSessionPrefix . $strSessionSufix])) ? $_SESSION[$strSessionPrefix . $strSessionSufix] : $defaultValue;\n }\n }\n }\n //echo \"<br>\".$strPostSufix.\"|\".$_SESSION[$strSessionPrefix.$strSessionSufix].\"|\".$value;\n if ($bolSetSession) {\n $_SESSION[$strSessionPrefix . $strSessionSufix] = $value;\n }\n return $value;\n}",
"function checkSIDGETParam() {\n if (isset($_GET[$this->sessionName])) {\n $sessionId = $_GET[$this->sessionName];\n if ($this->checkSIDString($sessionId)) {\n return $sessionId;\n }\n }\n return FALSE;\n }",
"function session_get_bool( $p_name, $p_default = null ) {\n\t$t_args = func_get_args();\n\treturn true && call_user_func_array( 'session_get', $t_args );\n}",
"function get_value_or_default($value,$default='')\n{\n\treturn (!empty($value)) ? $default : $value;\n}",
"function getUserGroup() {\n return (isset($_SESSION['group'])) ? $_SESSION['group'] : -1;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve manufacturer product unit review count | public function getManufacturerProductUnitReviewCount($manufacturerProductUnitId)
{
$em = $this->getEntityManager();
$qb = $em->createQueryBuilder();
$qb->select('count(review)')
->from('Yilinker\Bundle\CoreBundle\Entity\ProductReview', 'review')
->innerJoin("YilinkerCoreBundle:OrderProduct", "op", "WITH",
"op.orderProductId = review.orderProduct AND op.manufacturerProductUnit = :manufacturerProductUnitId")
->where('review.isHidden = :hidden')
->setParameter('manufacturerProductUnitId', $manufacturerProductUnitId)
->setParameter('hidden', false);
return (int) $qb->getQuery()->getSingleScalarResult();
} | [
"public function display_product_number_reviews( ){\n\t\techo count( $this->reviews );\n\t}",
"public function getReviewCount() {\n /**\n * get the Colletion of 'review/review' and add filter Values.\n */\n $review = Mage::getModel ( 'review/review' )->getCollection ()->addStoreFilter ( Mage::app ()->getStore ()->getId () )->addStatusFilter ( 'approved' )->addEntityFilter ( 'product', $this->getProduct ()->getId () )->setDateOrder ();\n /**\n * Return review count.\n */\n return intval ( count ( $review ) );\n }",
"public function getReviewsCount();",
"function countReviewers ()\r\n {\r\n $db = Zend_Db_Table::getDefaultAdapter();\r\n $result = $db->query (\"SELECT COUNT(*) AS nb FROM Review WHERE idPaper={$this->id}\");\r\n $nb = $result->fetch (Zend_Db::FETCH_OBJ) ;\r\n if ($nb) {\r\n return $nb->nb;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }",
"function vu_rp_workbench_get_needs_review_count() {\n $query = db_select('field_revision_field_rpa_staff_id', 'rp');\n $query->leftJoin('workbench_moderation_node_history', 'wm', \"rp.entity_id = wm.nid\");\n $query->distinct()->addField('rp', 'entity_id', 'entity_id');\n $query->condition('wm.is_current', 1, '=');\n $query->condition('wm.state', 'needs_review', '=');\n $result = $query->countQuery()->execute()->fetchField();\n\n return $result;\n}",
"public function totalreviewcount()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n $reviewFactory = $objectManager->create('Magento\\Review\\Model\\ReviewFactory');\n\n $collection = $reviewFactory->create()->getCollection();\n\n $totals = [\n 'total_review' => $collection->getSize()\n ];\n\n return json_encode($totals);\n }",
"function get_products_count() {\n return count(get_products_all());\n}",
"function wp_review_wc_product_review_count( $count, $product ) {\n\t\t$comment_ratings = mts_get_post_comments_reviews( $product->get_id() );\n\t\treturn $comment_ratings['count'];\n\t}",
"public function count()\n {\n return $this->product->count();\n }",
"public function reviewsCounter();",
"public function getTheTotalNumberOfProductsThatAreRentable(){\n \n $cmd =Yii::app()->db->createCommand();\n $cmd->select('COUNT(*)')\n ->from('product')\n ->where(\"(is_rentable=1 and is_quotable=0) and (displayable_on_store=1 and is_faas=0)\");\n $result = $cmd->queryScalar();\n \n return $result;\n \n }",
"function totalReviewCount()\n\t{\n\t\treturn $this->getReviews->count();\n\t}",
"function total_review ($id){\n // PARAM $id - article or product id\n\n $this->stmt = $this->pdo->prepare(\n \"SELECT COUNT(remark) AS TotalReview FROM product_review WHERE product_id=?\"\n );\n $this->stmt->execute([$id]);\n $total_review = $this->stmt->fetchAll();\n return is_numeric($total_review[0]['TotalReview']) ? $total_review[0]['TotalReview'] : 0 ;\n }",
"function wpsc_product_count() {\n\tglobal $wpsc_query;\n\treturn $wpsc_query->product_count;\n}",
"public function getTheTotalNumberOfProductsDisplayableByMiddleAdverts(){\n \n $cmd =Yii::app()->db->createCommand();\n $cmd->select('COUNT(*)')\n ->from('product')\n ->where(\"displayable_on_store=1 and is_the_middle_page_advert=1\");\n $result = $cmd->queryScalar();\n \n return $result;\n }",
"public function getReviewCount()\n {\n return $this->jsonData->ReviewCount->Total;\n }",
"public function getStoreTotalReview4(){\r\n\t\t//$this->initDb();\r\n\t\tif($this->store_id !=0){\r\n\t\t\t$this->store_total_review4 = getValue(\"SELECT COUNT(comment_id) FROM \".DB_PREFIX.\"store_comment WHERE store_id=\".$this->store_id.\" AND store_rate_value=4\");\r\n\t\t}\r\n\t\treturn $this->store_total_review4;\t\r\n\t}",
"public function getCount($review_id) {\n\n return $this->select()\n ->from($this, new Zend_Db_Expr('COUNT(reviewdescription_id)'))\n ->where('review_id = ?', $review_id)\n ->limit(1)\n ->query()\n ->fetchColumn();\n }",
"function getAllReviewsCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $reviewObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $reviewObj->setStrResponse($response->getResponse());\n $reviewObj->setResponseSuccess(true);\n $reviewResponseObj = new ReviewResponseBuilder();\n $reviewObj->setTotalRecords($reviewResponseObj->getTotalRecords($response->getResponse()));\n //$reviewObj = $reviewResponseObj->getTotalRecords($response->getResponse());\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $reviewObj;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add inactive categories ids | public function addInactiveCategoryIds($ids)
{
if (!is_array($this->_inactiveCategoryIds)) {
$this->_initInactiveCategoryIds();
}
$this->_inactiveCategoryIds = array_merge($ids, $this->_inactiveCategoryIds);
return $this;
} | [
"protected function collectCategoryIDs()\n {\n $categories = [\n C__CMDB__CATEGORY__TYPE_GLOBAL => [],\n C__CMDB__CATEGORY__TYPE_SPECIFIC => null,\n C__CMDB__CATEGORY__TYPE_CUSTOM => []\n ];\n\n // Go sure to include every category only once.\n $this->categories[C__CMDB__CATEGORY__TYPE_GLOBAL] = array_unique($this->categories[C__CMDB__CATEGORY__TYPE_GLOBAL]);\n $this->categories[C__CMDB__CATEGORY__TYPE_CUSTOM] = array_unique($this->categories[C__CMDB__CATEGORY__TYPE_CUSTOM]);\n\n foreach ($this->categories[C__CMDB__CATEGORY__TYPE_GLOBAL] as $globalCategory)\n {\n if (is_numeric($globalCategory))\n {\n $categories[C__CMDB__CATEGORY__TYPE_GLOBAL][] = $this->dao->convert_sql_id($globalCategory);\n }\n else\n {\n $globalCategoryID = $this->dao->get_catg_by_const($globalCategory)\n ->get_row_value('isysgui_catg__id');\n\n if ($globalCategoryID > 0)\n {\n $categories[C__CMDB__CATEGORY__TYPE_GLOBAL][] = $this->dao->convert_sql_id($globalCategoryID);\n } // if\n } // if\n } // foreach\n\n if (!empty($this->categories[C__CMDB__CATEGORY__TYPE_SPECIFIC]))\n {\n if (is_numeric($this->categories[C__CMDB__CATEGORY__TYPE_SPECIFIC]))\n {\n $categories[C__CMDB__CATEGORY__TYPE_SPECIFIC] = $this->dao->convert_sql_id($this->categories[C__CMDB__CATEGORY__TYPE_SPECIFIC]);\n }\n else\n {\n $specificCategoryID = $this->dao->get_cats_by_const($this->categories[C__CMDB__CATEGORY__TYPE_SPECIFIC])\n ->get_row_value('isysgui_cats__id');\n\n if ($specificCategoryID > 0)\n {\n $categories[C__CMDB__CATEGORY__TYPE_SPECIFIC] = $this->dao->convert_sql_id($specificCategoryID);\n } // if\n } // if\n } // if\n\n foreach ($this->categories[C__CMDB__CATEGORY__TYPE_CUSTOM] as $customCategory)\n {\n if (is_numeric($customCategory))\n {\n $categories[C__CMDB__CATEGORY__TYPE_CUSTOM][] = $this->dao->convert_sql_id($customCategory);\n }\n else\n {\n $customCategoryID = $this->dao->get_catc_by_const($customCategory)\n ->get_row_value('isysgui_catg_custom__id');\n\n if ($customCategoryID > 0)\n {\n $categories[C__CMDB__CATEGORY__TYPE_CUSTOM][] = $this->dao->convert_sql_id($customCategoryID);\n } // if\n } // if\n } // foreach\n\n return $categories;\n }",
"function _ppRemoveInactiveCategories()\n {\n }",
"public static function getInactiveCategories(){}",
"function get_all_category_ids() {}",
"public function getInactiveCategoryIds()\n {\n if (!is_array($this->_inactiveCategoryIds)) {\n $this->_initInactiveCategoryIds();\n }\n return $this->_inactiveCategoryIds;\n }",
"function get_all_category_ids()\n{\n}",
"private function update_categories($categories) {\n\t\t\t\n\t\t\tforeach ($categories as $id => $key) {\n\n\t\t\t\tin_array($key, $this->categories) != 1 ? array_push($this->categories, $key) : '';\n\t\t\t}\n\t\t}",
"public function getInactiveCategoryIds()\n {\n if (!is_array($this->_inactiveCategoryIds)) {\n $this->_initInactiveCategoryIds();\n }\n\n return $this->_inactiveCategoryIds;\n }",
"public function getIdsCategories(){\r\n $cookie = $this->context->cookie;\r\n $cat = new Category();\r\n $list_cat = $cat->getCategories($cookie->id_lang);\r\n $current_cat = Category::getRootCategory()->id;\r\n $cat_ids = $this->recurseCategoryIds($list_cat, $list_cat, $current_cat);\r\n $cat_ids = implode(\",\",$cat_ids);\r\n return $cat_ids;\r\n /// get all category ids ///\r\n }",
"private function update_categories() {\n\t\t\t$categories = get_categories();\n\t\t\tforeach ( $categories as $category ) {\n\t\t\t\t$this->connection->hmSet(\n\t\t\t\t\t'category:' . $category->term_id,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'term_id' => $category->term_id,\n\t\t\t\t\t\t'name' => $category->name,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"private function addCategoriesToAds()\n {\n $adsIdsCollection = DB::table('ads')\n ->leftJoin('ads_categories', 'ads.id', '=', 'ads_categories.ad_id')\n ->select('ads.id')\n ->groupBy('ads.id')\n ->having(DB::Raw('COUNT(ads_categories.category_id)'), 0)\n ->limit(1000)\n ->offset($this->adsWithNoCategories)\n ->get();\n\n if (!$count = $adsIdsCollection->count()) {\n return;\n }\n $this->command->getOutput()->progressStart($count);\n\n $adsCategoriesData = [];\n foreach ($adsIdsCollection as $ad) {\n $countOfAttachingCategories = mt_rand(0, 3);\n if (!$countOfAttachingCategories) {\n $this->adsWithNoCategories++;\n continue;\n }\n $categoryIds = array_rand($this->allCategoriesKeys, $countOfAttachingCategories);\n if (is_int($categoryIds)) {\n $categoryIds = [$categoryIds];\n }\n\n foreach ($categoryIds as $categoryId) {\n if (!isset($this->allCategories[$categoryId])) {\n continue;\n }\n\n $parentCategories = $this->allCategories[$categoryId]->parentCategories->pluck('id')->toArray() ?? [];\n foreach ($parentCategories as $id) {\n $adsCategoriesData[] = ['category_id' => $id, 'ad_id' => $ad->id];\n }\n }\n $this->command->getOutput()->progressAdvance(1);\n }\n\n DB::table('ads_categories')->insertOrIgnore($adsCategoriesData);\n $this->command->getOutput()->progressFinish();\n\n // repeat for next part\n $this->addCategoriesToAds();\n }",
"function psu_get_cat_ids( $cat_names ) {\n global $sitepress;\n // get current and default language to be able to switch between the two\n $current_language = $sitepress->get_current_language();\n $default_language = $sitepress->get_default_language();\n $sitepress->switch_lang($default_language);\n // get ids for categories\n $cat_ids = array();\n foreach ($cat_names as $value) {\n $cat_ids[] = get_cat_ID($value);\n }\n // switch back\n $sitepress->switch_lang($current_language);\n // append with the other language id\n $cat_ids = array_merge( $cat_ids, psu_lang_object_ids( $cat_ids, 'category' ) );\n return $cat_ids;\n}",
"function disablecatgory($id)\n{\n\t\tglobal $con;\n\t\t\n\t\t$disable_category = $con->query(\"update categories set status = '0' where cat_id = '$id'\");\n\t\tif(!$disable_category)\n\t\t{\n\t\t\techo\"could not disable category\";\n\t\t\t\n\t\t}\n\t}",
"function set_category_active ($category_id) {\n\t$category_id = (int)$category_id;\n\tmysql_query(\"UPDATE `mock_exam_category` SET `status` = 1 WHERE `category_id` = '$category_id'\");\n}",
"public function updateCategoriesByID()\n {\n global $config, $rlListingTypes, $rlDb;\n\n if (!$config['cache']) {\n return false;\n }\n\n $sql = \"SELECT *, `Modified`, CONCAT('categories+name+', `Key`) AS `pName`, CONCAT('categories+title+', `Key`) AS `pTitle` \";\n $sql .= \"FROM `{db_prefix}categories` \";\n $sql .= \"WHERE `Status` = 'active'\";\n $categories = $rlDb->getAll($sql, 'ID');\n\n $this->set('cache_categories_by_id', $categories);\n }",
"protected function prepareAllActiveCategoryIdsByShop()\n {\n $queryBuilder = $this->em->createQueryBuilder();\n $queryBuilder->select([\n 'o.id',\n 'o.name',\n 'o.path'\n ]);\n $queryBuilder->from('Shopware\\Models\\Category\\Category', 'o');\n $queryBuilder->where('o.active = 1');\n $categories = $queryBuilder->getQuery()->getResult();\n // Set categories by ids for keys and only pass categories for selected shop.\n $categoriesByIds = [];\n $shopCategoryId = $this->shop->getCategory()->getId();\n\n foreach ($categories as $category) {\n if ($category['id'] == $shopCategoryId) {\n $categoriesByIds[$category['id']] = $category;\n } else {\n $categoryPath = array_filter(explode('|', $category['path']));\n foreach ($categoryPath as $catId) {\n if ($catId == $shopCategoryId) {\n $categoriesByIds[$category['id']] = $category;\n break;\n }\n }\n }\n }\n\n $this->categories = $this->setCategoriesPathName($categoriesByIds);\n }",
"public function getCategoryIdsAttribute()\n {\n return $this->categories->pluck('id');\n }",
"public function getCategories_id()\n {\n return $this->categories_id;\n }",
"function xtc_set_categories_status($categories_id, $status) {\n if ($status != '1' && $status != '0') {\n return -1;\n }\n return xtc_db_query(\"UPDATE \".TABLE_CATEGORIES.\" SET categories_status = '\".(int)$status.\"' WHERE categories_id = '\".(int)$categories_id.\"'\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine whether the user can replicate. | public function replicate(User $user, Programme $programme)
{
return $user->can('replicate_programme');
} | [
"function duplicate_post_is_current_user_allowed_to_copy() {\n\treturn current_user_can('copy_posts');\n}",
"public function replicate(User $user, Update $update)\n {\n return $user->can('replicate_update');\n }",
"public function canCopy()\n\t{\n\t\treturn FALSE;\n\t}",
"public function canCopy()\n\t{\n\t\treturn false;\n\t}",
"public function canReview()\n {\n if (!$this->reviewsAllowed()) return false;\n $user = Auth::user();\n return $user && ($user->id != $this->user_id && permission('VaultCreate'));\n }",
"public function canImpersonate(): bool\n {\n return $this->id = 1;\n return $this->is_admin == 1;\n // return $this->can('user.impersonate');\n }",
"public function canCreate()\n {\n return $this->permission('create');\n }",
"private function should_show_copy_mentor() {\n $mentorsetting = (int) $this->course_config_array['allow_mentor_copy'];\n\n return (bool) ($this->allow_mentor_copy && $mentorsetting == 1);\n }",
"function has_puzzle_creation_access() {\n if (is_logged_in()) {\n if (is_admin()) {\n // admins have access to create puzzle functionality\n return true; \n } else if (isset($_SESSION['user_id'])) {\n if (is_author($_SESSION['user_id'])) {\n // authors have access to create puzzle functionality\n return true;\n }\n }\n }\n return false;\n}",
"protected function __canCreate() : bool|ReturnHelper {\n\t\t\treturn true;\n\t\t}",
"protected function canBeCopied() : bool {}",
"public function canBeImpersonated(): bool\n {\n return true;\n // return ! $this->isMasterAdmin();\n }",
"public function hasAccessCreate() : bool\n {\n return (user() and user()->hasAccess(strtolower($this->moduleName), PERM_CREATE));\n }",
"public function isUserAssignable(): bool;",
"public function canCreate()\n {\n return $this->securityContext->isGranted($this->createRole);\n }",
"public function getCanCreateSubreddit(): bool {\r\n return $this->canCreateSubreddit;\r\n }",
"public function canImpersonate()\n {\n return $this->isAdmin();\n }",
"function canCreateUsers(){\n\n $create = FALSE;\n\n if(isset($_SESSION['user']['permissions']) && in_array('CREATE_USERS',\n $_SESSION['user']['permissions']))\n $create = TRUE;\n\n return $create;\n\n }",
"public function canPost()\n {\n return $this->hasRole(['author', 'admin']);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ FUNCTION NAME : get_app_user_details_information_by_app_user_id($app_user_id) it will return app user details using app user id | public function get_app_user_details_information_by_app_user_id($app_user_id)
{
$query=$this->db->get_where('app_user_details',array('ref_app_user_details_app_user_id'=>$app_user_id));
$return_array=array();
$return_array['total_rows']=$query->num_rows();
if($query->num_rows()==1)
{
$row=$query->row_array();
$return_array['ref_app_user_details_app_user_id']=$row['ref_app_user_details_app_user_id'];
$return_array['app_user_first_name']=$row['app_user_first_name']==NULL ? "":$row['app_user_first_name'];
$return_array['app_user_last_name']=$row['app_user_last_name']==NULL ? "": $row['app_user_last_name'];
$return_array['app_user_birth_date']=$row['app_user_birth_date']==NULL ?"":date('d-m-Y', strtotime($row['app_user_birth_date']));
$return_array['app_user_sex']=$row['app_user_sex'];
$return_array['app_user_address']=$row['app_user_address']==NULL ? "": $row['app_user_address'];
$return_array['app_user_city']=$row['app_user_city']==NULL ? "": $row['app_user_city'];
$return_array['app_user_post_code']=$row['app_user_post_code']==NULL ? "": $row['app_user_post_code'];
$return_array['app_user_country']=$row['app_user_country']==NULL ? "": $row['app_user_country'];
$return_array['app_user_email']=$row['app_user_email']==NULL ? "": $row['app_user_email'];
$return_array['app_user_cell_phone']=$row['app_user_cell_phone']==NULL ? "": $row['app_user_cell_phone'];
}
return $return_array;
} | [
"public function getUserDetails($userId);",
"public function getApplicationInfo($application_id);",
"function get_user_info_by_fbid($fbid=''){\r\n\r\n $data = $this->user_db->_get_user_fb(array('fb_num_id' =>$fbid));\r\n if(sizeof($data)>0) {\r\n $user_id=$data['id'];\r\n } else {\r\n $user_id=0;\r\n }\r\n \r\n $output = $this->get_user_info($user_id);\r\n \r\n return $output;\r\n }",
"public function get_user_info();",
"function getAppDetails($appid=\"400274934\",$country=\"US\") {\n\t\t\n\t\t$lookupurl = $this->lookup_url.$country.\"/lookup?id=\" .$appid;\n\t\t$appdata = $this->getUrlData($lookupurl);\n\t\t$data = $this->parseApplicationData($appdata);\n\t\treturn $data;\n\t\t\n\t}",
"function get_lsedit_app_user($lsedit_app_user_id)\n {\n return $this->db->get_where('Lsedit_App_User',array('lsedit_app_user_id'=>$lsedit_app_user_id))->row_array();\n }",
"abstract function getUserInfo($userId);",
"function GetUserDetails($userid)\n\t{\n\n\t\tglobal $db;\n\t\t$sql = \" SELECT * FROM \".MEMBER_MASTER.\" AS MM\"\n\t\t .\" LEFT JOIN \".COUNTRY_MASTER.\" AS CM ON MM.mem_country = CM.country_id\"\n\t\t .\" LEFT JOIN \".STATE_MASTER.\" AS SM ON MM.mem_state = SM.state_id\"\t\t\t \n\t\t\t .\" LEFT JOIN \".PROFILE_MASTER.\" AS PM ON MM.user_auth_id = PM.user_auth_id\"\n\t\t\t .\" LEFT JOIN \".YEAR_EXPERIENCE.\" AS YE ON PM.seller_exp = YE.year_expe_id\"\n\t\t\t .\" WHERE MM.user_auth_id = '\".md5($userid).\"'\";\n \t$db->query($sql);\n\t}",
"function get_supervisor_app_user($supervisor_app_user_id)\n {\n return $this->db->get_where('Supervisor_App_User',array('supervisor_app_user_id'=>$supervisor_app_user_id))->row_array();\n }",
"function UserInfo($user_id)\n\t{\n\t global $db; \n\t $sql = \"SELECT * FROM \". AUTH_USER\n . \t\" WHERE user_auth_id = '\". $user_id. \"' \";\n\t $db->query($sql);\n\t return ($db->fetch_object(MYSQL_FETCH_SINGLE));\n\t}",
"public function get_user_details()\n\t{\n\t\t$result = $this->db->from(\"users\")->where(array(\"user_id\" => $this->UserID))->get();\n\t\treturn $result;\n\t}",
"function mainUserDetails($id = '')\n {\n\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\n //declare\n $conditional_sql = '';\n\n //if no valie client id, return false\n if (!is_numeric($id)) {\n return false;\n }\n\n //escape data\n $id = $this->db->escape($id);\n\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\n //_____SQL QUERY_______\n $query = $this->db->query(\"SELECT *\n FROM client_users\n WHERE client_users_clients_id = $id\n AND client_users_main_contact = 'yes'\");\n\n $results = $query->row_array();\n\n //benchmark/debug\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n\n //return results\n return $results;\n\n }",
"public function userVerificationDetailsById($userId) {\n\t\t$arrUserVerificationDetails = '';\n\t\ttry{\n\t\t\t$sqlSelect = \"SELECT * FROM \".DB_PREFIX.\"_users_verification WHERE userId = :USERID\";\n\t\t\t$stmt = $this->db->prepare($sqlSelect);\n\t\t\t$stmt->bindValue(':USERID', $userId, PDO::PARAM_STR);\n\t\t\t$stmt->execute();\n\t\t\t$arrUserVerificationDetails = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t$stmt->closeCursor();\n\t\t} catch(PDOException $e) {\n\t\t\treturn \"errorMsg : \".$e->getMessage();\n\t\t}\n\t\treturn $arrUserVerificationDetails;\n\t}",
"public function getUserByID( $userId ){\n\t\t$result = $this->_db->query(\"SELECT * FROM \".TABLE_USERS_INFO.\" WHERE user_id='$userId' \" );\n\t\t$user_info = $result->fetch_assoc();\n \t\t$result = $this->_db->query(\"SELECT * FROM \".TABLE_USERS.\" WHERE user_id='$userId' \");\n \t\t$user_log = $result->fetch_assoc();\n\t\t\n\t\treturn $user_info;\n\t}",
"function paces_get_users_all_details( $user_id ){\n return get_metadata( 'user', $user_id );\n}",
"abstract public function getUserInfo();",
"function get_user_info_data($user_id)\n\t {\n\t //todo:\n\t\t$username = $this->get_username(array('uId'=>$user_id));\n\t\t$user_photopath = $this->get_user_headphotopath($user_id);\n\t\t$user_score = $this->get_user_kpc($user_id);\n\t\t$data = $this->get_user_activity_num($user_id);\n\t\t$user_ask_num = $data['question'];\n\t\t$user_answer_num = $data['answer'];\n\t\t$user_place = $this->get_user_location($user_id);\n\n\t\treturn array('username'=>$username,'user_photopath'=>$user_photopath,'user_score'=>$user_score, 'user_ask_num'=>$user_ask_num, 'user_answer_num'=>$user_answer_num, 'user_place'=>$user_place['town_name']);\n\t }",
"function get_user_fb_info($user_id='', $fb_num_id=''){\r\n if($user_id!='') {\r\n $user_query['id'] = $user_id;\r\n } else if($fb_num_id!='') {\r\n $user_query['fb_num_id'] = $fb_num_id;\r\n } else {\r\n return array();\r\n }\r\n \r\n $output = $this->user_db->_get_user_fb($user_query);\r\n return $output;\r\n }",
"public function user_info($user_id) {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,1);\n \n $getdata = $this->user->get_user_info($user_id);\n \n if ( $getdata ) {\n \n echo json_encode([\n 'msg' => $getdata,\n 'user_id' => $this->user_id\n ]);\n \n }\n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the added wifis for this user | public function wifis()
{
return $this->hasMany('App\WiFi', 'created_by');
} | [
"public function getWishlistsByUser();",
"function getWisApps(){\n\t\n\t\t$wisapps = $this->Wisapp->find('id', array(\"conditions\"=>array(\"wis_id\"=>$this_id, \"status\"=>1)));\n\t\t$favorites = array();\n\t\t\n\t\tforeach($wisapps as $wisapp){\n\t\t\t$favorites[] = new Wisapp($wisapp['Wisapp']['id']);\t\n\t\t}\n\t\t\n\t\treturn $favorites;\n\t\n\t}",
"public function watchWikis()\n {\n return $this->hasMany(WatchWiki::class, 'user_id', 'id');\n }",
"public function getWishlists()\n {\n return Wishlist::byUser(Auth::getUser());\n }",
"public function getUserWishlists($userId)\n {\n // get all wishlist from the DB\n $wishlists = WishlistRecord::model()->findAllByAttributes(array('userId' => $userId));\n\n return $wishlists;\n }",
"public function getWishlistItems()\n {\n if (!is_null($this->_wishlistItems)) {\n return $this->_wishlistItems;\n }\n \n $wishlistItems = array();\n \n $wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer($this->getId());\n \n $wishlistItemCollection = Mage::getModel('wishlist/item')->getCollection()->addFieldToFilter('wishlist_id', $wishlist->getId());\n \n foreach ($wishlistItemCollection as $wishlistItem) {\n $wishlistItemEntity = Mage::getModel('marketingsoftware/copernica_entity_wishlist_item');\n $wishlistItemEntity->setWishlistItem($wishlistItem);\n \n $wishlistItems[] = $wishlistItemEntity;\n }\n \n return $this->_wishlistItems = $wishlistItems;\n }",
"public function getWikis()\n\t{\n\t\t$sql = 'SELECT * FROM wikis ORDER BY wikititle';\n\t\t$sth = $this->dbh_tools->query($sql);\n\n\t\t$wikis = array('enwiki' => array('title' => 'English Wikipedia', 'domain' => 'en.wikipedia.org', 'lang' => 'en'),\n\t\t\t'commonswiki' => array('title' => 'Wikipedia Commons', 'domain' => 'commons.wikimedia.org', 'lang' => 'en')); // Want first\n\n\t\twhile ($row = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$wikiname = $row['wikiname'];\n\t\t\tif (! isset($wikis[$wikiname])) {\n\t\t\t\t$wikis[$wikiname] = array('title' => $row['wikititle'], 'domain' => $row['wikidomain'], 'lang' => $row['lang']);\n\t\t\t}\n\t\t}\n\n\t\treturn $wikis;\n\t}",
"public function wishList($id){\n return $this->usersRepository->wishList($id);\n }",
"public static function getWeeklyAuthUsers();",
"function getWishLists() {\n $wishList = \"\";\n $ip = Yii::app()->request->getUserHostAddress();\n if (isset(Yii::app()->user->id)) {\n\n $wishList = $this->findAll('city_id=' . Yii::app()->session['city_id'] . ' AND (user_id=' . Yii::app()->user->user_id . ' OR session_id=\"' . $ip . '\")');\n } else {\n $wishList = $this->findAll('city_id=' . Yii::app()->session['city_id'] . ' AND session_id=\"' . $ip . '\"');\n }\n\n return $wishList;\n }",
"public function get_wishlist()\n {\n if (!$this->id)\n throw new \\Exception('no user');\n return WishList::search(['user_id' => $this->id]);\n }",
"public function getItems()\r\n {\r\n return $this->user->wishlistItems;\r\n }",
"public static function getWeeklyLoggedInUsers()\n {\n // WARNING: Return placeholder value to replace by the real data\n return 432;\n }",
"public static function getWingList(): array\n {\n $wingModelObj = new WingModel();\n return $wingModelObj->getWingListWithNameAndId();\n }",
"public function get_user_watch_list_items($userId)\n {\n $query = $this->db->get_where('wish_list_items', array('userId' => $userId));\n return $query->result_array();\n }",
"public function createdWorkItems()\n {\n return $this->hasMany(WorkItem::class, 'user_id', 'id');\n }",
"function getAllNewUsers($admin_inst_id){\r\n $get_users_query = \"SELECT * FROM users WHERE status = 'INACTIVE' AND institution_id = '$admin_inst_id'\";\r\n return $this->query($get_users_query);\r\n }",
"public function getIswcs(): ISWCList\n {\n return $this->iswcs;\n }",
"public function getWonList()\n {\n return $this->wonList;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get Passengers | public function getPassengers()
{
if(empty($this->_passengers)){
$this->loadPassengers();
}
return $this->_passengers;
} | [
"public function getPassengers()\n {\n return $this->passengers;\n }",
"public function getPassengers() {\n $passengers = '';\n \n foreach ($this->passengers as $passenger) {\n $passengers .= $passenger->name . ', ';\n }\n return $passengers;\n }",
"public function getTracePassengers()\n {\n\n if(empty($this->_trace_passengers)){\n $this->loadTracePassengers();\n }\n return $this->_trace_passengers;\n }",
"public function show_passengers()\n {\n return view('driver_dashboard.passengers');\n }",
"public function getPassenger(){\n $passenger = $this->db->select('*')\n ->where('pass_deleted', 0)\n ->where('pass_status', 1)\n ->get('passenger');\n return $passenger;\n }",
"public function getMaxPassengers()\n {\n }",
"function get_passengers($airline,$flightnr) {\n\tglobal $handler; //get global handler variable\n\t/*\n\tCreating prepared statment to get all passengers\n\t*/\n\t$stmt = $handler->prepare(\"SELECT id,firstname,lastname,rownr,seatposition FROM passengers WHERE airline = :airline AND flightnr = :flightnr\"); //:flightnr/:airline = named parameter(placeholder) \n\n\t$params = array(\"airline\" => $airline, \"flightnr\" => $flightnr); //defining binding parameters\n\n\t$stmt->execute($params); //execute statment\n\n\t/*\n\tCreating $passengers array to return\n\t*/\n\twhile ($row = $stmt->fetch()) {\n\t $passengers[] = $row;\n\t}\n\n \treturn $passengers; \n}",
"public function logged_in_passengers()\n\t{\t\n ## fields_projection code added to support LAMP 7.0 and its mongo version 3.4.0\n $options=[\n 'projection'=>[\n 'name'=>1,\n 'loc.coordinates'=>1 \n ] \n ];\n $result = $this->mongo_db->find(MDB_PASSENGERS,['user_status' => 'A','login_status' => 'S'],$options);\n $res = $result;\n return (!empty($result))?Commonfunction::change_key($res):array();\n\t}",
"public function getNumberOfPassengers()\n {\n return $this->number_of_passengers;\n }",
"function getPassengers($ID){\r\n global $IDs;\r\n $i=0;\r\n \r\n\r\n $passengers=array();\r\n //all IDs\r\n while($i<sizeof($IDs)){\r\n //query\r\n if($IDs[$i]!=$ID) {\r\n $data = array(\"IDs\"=>$IDs,\"count\"=> $i);\r\n $url='getProxPass.php';\r\n $returnval = sendReceiveJSONPOST($url,$data);\r\n\r\n $j=0;\r\n while($j<$returnval[\"TupleCount\"]){\r\n $row=$returnval[\"Tuples\"][$j];\r\n array_push($passengers,$row);\r\n $j=$j+1;\r\n }\r\n }\r\n $i=$i+1; \r\n }\r\n //output resulting passenger info\r\n echo \"<table border='1'>\r\n<tr>\r\n<th>ID</th>\r\n<th>First Name</th>\r\n<th>Last Name</th>\r\n<th>Department</th>\r\n<th>Admin ID</th>\r\n</tr>\";\r\n $k=0;\r\n while($k<sizeof($passengers)){\r\n echo \"<tr>\";\r\n echo \"<td>\" . $passengers[$k]['Employee_id'] . \"</td>\";\r\n echo \"<td>\" . $passengers[$k]['First_name'] . \"</td>\";\r\n echo \"<td>\" . $passengers[$k]['Last_name'] . \"</td>\";\r\n echo \"<td>\" . $passengers[$k]['Department'] . \"</td>\";\r\n echo \"<td>\" . $passengers[$k]['Admin_id'] . \"</td>\";\r\n echo\"</tr>\";\r\n $k =$k+1;\r\n }\r\necho \"</table>\"; \r\n}",
"public function setPassengers($passengers)\n {\n $this->passengers = $passengers;\n return $this;\n }",
"public function getPassengerJourneyDetails() {\n $passengers = $this->reservation['journeys'][$this->editedLegIndex]['passengerJourneyDetails'];\n $booking_key = $this->getBookingKey($this->values['departure_flight']);\n foreach ($passengers as &$passenger) {\n $passenger['bookingKey'] = $booking_key;\n }\n return $passengers;\n }",
"public function leaders()\n\t{\n\t\t$location = Auth::user();\n\t\t$leaders = $location->leaders()->orderBy('firstName', 'ASC')->get();\n\n\t\treturn Response::json(['data' => $leaders], 200);\n\n\t}",
"function get_teachers() {\n\n $teacher_array = array();\n $teacher_details = array();\n\n // TODO get the roles that are specified as being able to grade forums\n $teacher_roles = array(3, 4);\n\n foreach ($this->courses as $course) {\n\n // this mulidimensional array isn't currently used.\n // $teacher_array[$coure->id] = array();\n\n // get teachers in this course with this role\n $course_teachers = get_role_users($teacher_roles, $course->context);\n if ($course_teachers) {\n\n foreach($course_teachers as $course_teacher) {\n\n if (!in_array($course_teacher->id, $teacher_array)) {\n\n $teacher_array[] = $course_teacher->id;\n\n }\n }\n }\n }\n if (count($teacher_array, 1) > 0) { // some teachers were returned\n $this->teacher_array = $teacher_array;\n $this->teachers = implode(',', $teacher_array);\n } else {\n $this->teacher_array = false;\n }\n }",
"public static function get_all_passes() {\n $model = new LaterPay_Model_Pass();\n\n return $model->get_all_passes();\n }",
"public function getAllTeachers(){\n return User::teachers()->orderBy('name', 'asc')->get();\n }",
"public function initPassengers()\n\t{\n\t\t$this->collPassengers = array();\n\t}",
"public function getPassingDatabyTraveller(){\n\t\t$query = \"SELECT * \n\t\t\t\t FROM passing\n\t\t\t\t where traveller_id={$this->traveller_id}\";\n\t\t\t\t \n\t\t$query = $this->db->query($query);\n\t\treturn $query->result_array();\n\t }",
"public static function grantVehiclePasses(): mixed\n {\n $year = current_year();\n\n $ids = DB::table('access_document')\n ->select('person_id')\n ->whereIn('type', [AccessDocument::STAFF_CREDENTIAL, AccessDocument::RPT])\n ->whereIn('status', [AccessDocument::QUALIFIED, AccessDocument::CLAIMED, AccessDocument::BANKED])\n ->whereRaw('NOT EXISTS (SELECT 1 FROM access_document ad WHERE ad.person_id=access_document.person_id AND ad.type=\"vehicle_pass\" AND ad.status IN (\"qualified\", \"claimed\", \"submitted\") LIMIT 1)')\n ->groupBy('person_id')\n ->pluck('person_id');\n\n if (!$ids->count()) {\n return [];\n }\n\n $people = Person::select('id', 'callsign', 'status')\n ->whereIntegerInRaw('id', $ids)\n ->whereNotIn('status', [Person::DISMISSED, Person::DECEASED])\n ->orderBy('callsign')\n ->get();\n\n self::grantAccessDocumentToPeople($people, AccessDocument::VEHICLE_PASS, null, $year);\n return $people;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
delete "keeplog.json" and redirect to index page | function func()
{
unlink("../front/keeplog.json");
header("../front/index.php");
exit;
} | [
"public function clearLogs()\n {\n (new ApiLogsBroker())->deleteAll();\n return $this->redirect(\"/api/logs\");\n }",
"public function deleteLogFileByParam()\n {\n $date = request('date');\n\n $type = request('type');\n\n $client = Logger::createLocalStorageDriver();\n\n $rootPath = Logger::getRootPath();\n\n $files = $client->files();\n\n if ( ! is_null($date) && ! is_null($type)) {\n $file = file(\"$rootPath/$date.json\");\n\n $client->delete(\"$date.json\");\n\n foreach ($file as $k => $v) {\n $file[$k] = json_decode($file[$k]);\n\n if ($file[$k] && $file[$k]->type != $type) {\n Logger::store($file[$k], $date);\n }\n }\n }\n\n if (is_null($type) && ! is_null($date)) {\n $client->delete(\"$date.json\");\n }\n\n if (is_null($date) && ! is_null($type)) {\n foreach ($files as $file) {\n $data = file(\"$rootPath/$file\");\n\n $client->delete(\"$file\");\n\n foreach ($data as $k => $v) {\n $data[$k] = json_decode($data[$k]);\n\n if ($data[$k] && $data[$k]->type != $type) {\n Logger::store($data[$k], str_replace('.json', '', $file));\n }\n }\n }\n }\n\n return redirect()->route('all-logs', ['type'=> 'all']);\n }",
"public function deletelog() {\n // unlink($this->getViewConfig()->getModulePath('ts_opentrans_orderimport') .'/data/testsieger_logfile.html');\n\n if(file_exists(getShopBasePath().'modules/ts_opentrans_orderimport/data/testsieger_logfile.html'))\n {\n unlink(getShopBasePath().'modules/ts_opentrans_orderimport/data/testsieger_logfile.html');\n }\n\n\n }",
"protected function logLatestContent()\n {\n if (empty($this->logFileLocation)) {\n return;\n }\n $this->files()->put($this->logFileLocation, $this->response());\n }",
"protected function clearLogsEntries() {\n $this->drupalGet(Url::fromRoute('dblog.confirm'));\n }",
"function slogans_delete_one($index=3.14)\n{\n\t$sloganlist=file($GLOBALS['SLOGAN_FILENAME']);\n\t$slogan_a=explode(';;;',$sloganlist[$index]);\n\tif (trim($slogan_a[2])==$_SERVER['USER'] || $_SERVER['USER']=='system')\n\t{\n\t\tcopy($GLOBALS['SLOGAN_FILENAME'],$GLOBALS['SLOGAN_FILENAME'].date(\"YMD\"));\n\t\t$sloganlist[$index]=\"\";\n\t\t$slogantext=implode(\"\\n\",$sloganlist);\n\t\t$slogantext=str_replace(\"\\n\\n\",\"\\n\",$slogantext);\n\t\t$slogantext=str_replace(\"\\n\\n\",\"\\n\",$slogantext);\n\t\tfile_put_contents($GLOBALS['SLOGAN_FILENAME'],$slogantext);\n\t\t@unlink(\"$_SERVER[FILE_ROOT]/resources/slogan.$index.belowzero\");\n\t}\n\nredirect('/');\n}",
"function deleteCrash() {\n\t\tCrash::DeleteCrashFile($this->config->getRequestVar(\"c\"));\n\t\t$filter = $this->config->getRequestVar(\"filter\");\n\t\t$redir = $this->config->dashboardURL;\n\t\tif($filter) {\n\t\t\t$redit .= '?a=' . $filter;\n\t\t}\n\t\theader(\"Location: \" . $redir);\n\t}",
"private static function clearLog() {\n file_put_contents(self::$newFile, '');\n }",
"public function deleteAction()\n {\n $params = Mage::app()->getRequest()->getParams();\n $fileName = Mage::getBaseDir('var') . DS . 'log' . DS . $params['name'];\n\n $this->varienIo = new Varien_Io_File();\n $this->missingFile($fileName, $params['name']);\n\n if ($this->varienIo->fileExists($fileName) && Zend_Loader::isReadable($fileName)) {\n $oystLog = Oyst_OneClick_Helper_Data::MODULE_NAME . '.log';\n if ($params['name'] !== $oystLog) {\n Mage::getSingleton('core/session')->addError(\n Mage::helper('oyst_oneclick')->__('Cannot delete \"%s\" file.', $params['name'])\n );\n } else {\n $this->varienIo->rm($fileName);\n Mage::getSingleton('core/session')->addSuccess(\n Mage::helper('oyst_oneclick')->__('Successfully deleted \"%s\".', $oystLog)\n );\n }\n }\n\n $this->_redirectReferer();\n }",
"public function actionClearChangelog() {\n Changelog::model()->deleteAll();\n $this->redirect('viewChangelog');\n }",
"public function redirectIndex() {\n $this->redirect('index');\n die();\n }",
"private function clear()\r\n {\r\n $query = $this->db->execute('DELETE FROM `<ezrpg>player_log` WHERE `player`=?', array($this->player->id));\r\n \r\n $msg = 'You have cleared your event log!';\r\n header('Location: index.php?mod=EventLog&msg=' . urlencode($msg));\r\n exit;\r\n }",
"public function removeRedirection();",
"private function clear()\r\n\t{\r\n\t\t$query = $this->db->execute('DELETE FROM <ezrpg>player_log WHERE player=?', array($this->player->id));\r\n\t\t\r\n\t\t$msg = 'You have cleared your event log!';\r\n\t\theader('Location: index.php?mod=EventLog&msg=' . urlencode($msg));\r\n\t\texit;\r\n\t}",
"public function mapsLogsdelete($maps_id,$log_id)\r\n {\r\n $deleted_mapslog = MapsLog::destroy($log_id);\r\n if($deleted_mapslog){\r\n return response()->json(['msg' => 'Deleted MapsLog']);\r\n }else{\r\n return response('Failed to delete Maps Log');\r\n }\r\n }",
"protected function clearLog()\n {\n file_put_contents($this->logPath, '');\n }",
"public function clearLogFiles();",
"function delete_log() {\n\t\t\tUD_F::check_prefix();\n\t\t\t$log_name = UD_PREFIX . 'log';\n\t\t\tdelete_option( $log_name );\n\t\t}",
"public function clear_log();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fit to height (proportionally resize to specified height) | function fit_to_height($height) {
$aspect_ratio = $this->height / $this->width;
$width = $height / $aspect_ratio;
return $this->resize($width, $height);
} | [
"function fit_to_height($height) {\n\n\t\t$aspect_ratio = $this->height / $this->width;\n\t\t$width = $height / $aspect_ratio;\n\n\t\treturn $this->resize($width, $height);\n\n\t}",
"public function fitToHeight($height) {\n $ratio = $this->height / $this->width;\n $width = $height / $ratio;\n\n return $this->resize($width, $height);\n }",
"function resize_fit_or_bigger($width, $height) {\n\n\t\t$w = $this->getWidth();\n\t\t$h = $this->getHeight();\n\n\t\t$ratio = $width / $w;\n\t\tif (($h*$ratio)<$height)\n\t\t\t$ratio = $height / $h;\n\t\t\n\t\t$h *= $ratio;\n\t\t$w *= $ratio;\n\n\t\t$this->resize($w, $h);\n\t}",
"function resizeByHeight( $height ) {\n\t\t$scale = $height / $this->height;\n\t\treturn $this->resize( $scale * $this->width, $height );\n\t}",
"function resize_fit_or_smaller($width, $height) {\n\n\t\t$w = $this->getWidth();\n\t\t$h = $this->getHeight();\n\n\t\t$ratio = $width / $w;\n\t\tif (($h*$ratio)>$height)\n\t\t\t$ratio = $height / $h;\n\t\t\n\t\t$h *= $ratio;\n\t\t$w *= $ratio;\n\n\t\t$this->resize($w, $h);\n\t}",
"public function fitIn($width, $height)\n {\n $this->resize = \"fit-in/{$width}x{$height}\";\n }",
"public function setHeight($height);",
"function resizeBestFit($width,$height) {\n \t\tif( ($width/$this->getWidth()) < ($height/$this->getHeight()) )\n \t\t\t$this->resizeToWidth($width);\n \t\telse\n \t\t\t$this->resizeToHeight($height);\n \t\t \t\t\n// $new_image = imagecreatetruecolor($width, $height);\n// imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());\n// $this->image = $new_image; \n }",
"public function resizeToFixedHeight($height) {\r\n\r\n\t\t// resize image only if new height ($height) is less than existing height ($this->height)\r\n\t\tif ($height < $this->height) {\r\n\t\t\t// calculate height scalar\r\n\t\t\t$scalar = (float)($height / $this->height);\r\n\t\t\t$width = ceil($this->width * $scalar);\r\n\t\t\t$height = ceil($this->height * $scalar);\r\n\t\t} else {\r\n\t\t\t$height = $this->height;\r\n\t\t\t$width = $this->width;\r\n\t\t}\r\n\t\t\t// set destination size\r\n\t\t\t$this->setDestinationDimensions($width, $height);\r\n\r\n\t\t\t// save new smaller image to filesystem\r\n\t\t\treturn $this->saveImage();\r\n\r\n\r\n\t}",
"public function resize( $width, $height );",
"private function calculateDimensionsHeightFixed()\n {\n $this->_height = $this->getRenderOptions()->getHeight();\n $newWidth = $this->getSourceImage()->getWidth() / $this->getSourceImage()->getHeight() * $this->_height;\n if($this->getRenderOptions()->getMin() !== PixlieRenderOptions::AUTO AND $newWidth < $this->getRenderOptions()->getMin()){\n $newWidth = $this->getRenderOptions()->getMin();\n }\n if($this->getRenderOptions()->getMax() !== PixlieRenderOptions::AUTO AND $newWidth > $this->getRenderOptions()->getMax()){\n $newWidth = $this->getRenderOptions()->getMax();\n }\n $this->_width = (int) round($newWidth,0);\n }",
"private function _setHeight()\n {\n $this->height = (count($this->fields) + 1) * $this->heightCell;\n }",
"public function setContentHeight($height);",
"public function resize(int $width, int $height) {}",
"public function setHeight(int $height);",
"abstract public function scaleToFit(int $targetWidth = null, int $targetHeight = null, bool $scaleIfSmaller = true);",
"public function setSize($width, $height){}",
"function resizeToHeight($original_width, $original_height, $desired_height) {\n $ratio = $desired_height / $original_height;\n //print '- ratio: ' . $ratio . '<br />';\n $width = $original_width * $ratio;\n //print '- new width: ' . $width . '<br />';\n //print '- new height: ' . $desired_height . '<br />';\n return array(\n 'width' => $width,\n 'height' => $desired_height\n );\n }",
"public function set_ResizeHeight($h) {\n $this->ResizeDimension['height'] = $h;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set whether or not the current password is considered expired | public function set_password_expired( $expired) {
$_SESSION[ 'current' ] = !$expired;
} | [
"protected function passwordIsExpiring()\n {\n return Carbon::fromNanosecondInterval(\n Arr::first($this->ldapUser->accountexpires)\n )->lte(now()->addDays(config('laravel_ldap.password_expiry_threshold')));\n }",
"public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }",
"public function hasPasswordExpired() {\n\n $expiration_time = $this->getPasswordExpirationTime();\n if (null === $expiration_time) {\n return false;\n }\n\n return $expiration_time < time();\n }",
"public function passwordHasExpired(): bool\n {\n return ($this->hasPassword() && $this->password_expires_at) && $this->password_expires_at->isPast();\n }",
"public function isPasswordExpired()\n {\n return (@$_SESSION[SESSION_STATUS] == \"passwordexpired\");\n }",
"function IsPasswordExpired() {\r\n\t\treturn (@$_SESSION[EW_SESSION_STATUS] == \"passwordexpired\");\r\n\t}",
"public function setExpired()\n {\n $this->attributes['status_dana'] = 'expired';\n self::save();\n }",
"function testPasswordExpirySetting() {\n\t\tMember::set_password_expiry(90);\n\t\t\n\t\t$member = $this->objFromFixture('Member', 'test');\n\t\t$this->assertNotNull($member);\n\t\t$valid = $member->changePassword(\"Xx?1234234\");\n\t\t$this->assertTrue($valid->valid());\n\t\t\n\t\t$expiryDate = date('Y-m-d', time() + 90*86400);\t\t\n\t\t$this->assertEquals($expiryDate, $member->PasswordExpiry);\n\n\t\tMember::set_password_expiry(null);\n\t\t$valid = $member->changePassword(\"Xx?1234235\");\n\t\t$this->assertTrue($valid->valid());\n\n\t\t$this->assertNull($member->PasswordExpiry);\n\t}",
"public function resetPasswordExpired(): bool {\n return (bool)self::$db->scalar(\"\n SELECT 1\n FROM users_info\n WHERE coalesce(ResetExpires, now()) <= now()\n AND UserID = ?\n \", $this->id\n );\n }",
"public function expire() {\n logit_r($this, 'expire'); \n $status = ($this->status == UserLoginReq::STATUS_NOTIFIED) ? UserLoginReq::STATUS_PAST_GRACE : UserLoginReq::STATUS_EXPIRED;\n logit_r($status, 'status');\n $this->status = $status;\n $this->save(true);\n }",
"public function setExpired()\n {\n $this->attributes['status_pembayaran'] = 'expired';\n self::save();\n }",
"public function isUserPasswordExpired()\n {\n if ($this->getSessionVariable('is_user_password_expired') !== null) {\n return $this->getSessionVariable('is_user_password_expired');\n }\n\n $maximum_password_age_in_seconds = $this->config->item('security_maximum_password_age_in_seconds');\n if (!($maximum_password_age_in_seconds > 0)) {\n $this->setSessionVariable('is_user_password_expired', false); // Disabled\n return $this->getSessionVariable('is_user_password_expired');\n }\n $password_last_changed_timestamp = strtotime($this->getAttribute('password_last_changed_timestamp'));\n if (!$password_last_changed_timestamp) {\n $this->setSessionVariable('is_user_password_expired', true); // Expired because never changed\n return $this->getSessionVariable('is_user_password_expired');\n }\n\n $now_timestamp = (int)gmdate('U');\n\n // If the last time + difference is in future\n if ($password_last_changed_timestamp + $maximum_password_age_in_seconds < $now_timestamp) {\n $this->setSessionVariable('is_user_password_expired', true); // Expired\n return $this->getSessionVariable('is_user_password_expired');\n }\n\n $this->setSessionVariable('is_user_password_expired', false); // Not expired\n return $this->getSessionVariable('is_user_password_expired');\n }",
"public function getPasswordExpiration()\n {\n return $this->password_expiration;\n }",
"public function forgotPasswordHasExpired()\n {\n Yii::info('type of expiration_timestamp = ' . gettype($this->expiration_timestamp));\n $now = (new \\DateTime())->format('Y-m-d H:i:s');\n if ($now > $this->expiration_timestamp) {\n return true;\n }\n return false;\n }",
"public function testAuthz_PASSWORD_EXPIRED()\n {\n putenv('AUTH=' . escapeshellarg(Q\\implode_assoc(\";\", array('uid'=>3, 'checksum'=>md5(3 . md5('george') . 's3cret')))));\n\n $this->Auth->authz();\n \n $this->assertEquals(Auth::PASSWORD_EXPIRED, $this->Auth->getStatus(), 'status code');\n $this->assertTrue($this->Auth->isLoggedIn());\n $this->assertNotNull($this->Auth->user(), 'user');\n $this->assertEquals(3, $this->Auth->user()->getId(), 'id');\n }",
"public function getCredentialsExpired()\r\n {\r\n return $this->credentials_expired;\r\n }",
"public function isCredentialsNonExpired()\n {\n return $this->expired_at > time() ;\n }",
"public function shouldChangePassword() {\n global $CFG_GLPI;\n\n if ($this->hasPasswordExpired()) {\n return true; // too late to change password, but returning false would not be logical here\n }\n\n $expiration_time = $this->getPasswordExpirationTime();\n if (null === $expiration_time) {\n return false;\n }\n\n $notice_delay = (int)$CFG_GLPI['password_expiration_notice'];\n if (-1 === $notice_delay) {\n return false;\n }\n\n $notice_time = strtotime('- ' . $notice_delay . ' days', $expiration_time);\n\n return $notice_time < time();\n }",
"function isPasswdResetDue() {\n global $cfg;\n return ($cfg && $cfg->getPasswdResetPeriod()\n && $this->passwd_change>($cfg->getPasswdResetPeriod()*30*24*60*60));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add FULOrderParams to OrderDetails. | public function addFULOrderParams(
string $fileFormat,
FULContext $fulContext
): OrderDetailsBuilder {
$xmlFULOrderParams = $this->dom->createElement('FULOrderParams');
$this->instance->appendChild($xmlFULOrderParams);
// Add FileFormat to FULOrderParams.
$xmlFileFormat = $this->dom->createElement('FileFormat');
$xmlFileFormat->nodeValue = $fileFormat;
$xmlFULOrderParams->appendChild($xmlFileFormat);
$xmlTest = $this->dom->createElement('TEST');
$xmlTest->nodeValue = $fulContext->isTest() ? 'TRUE' : 'FALSE';
$xmlFULOrderParams->appendChild($xmlTest);
$xmlEbcdic = $this->dom->createElement('EBCDIC');
$xmlEbcdic->nodeValue = $fulContext->isEbcdic() ? 'TRUE' : 'FALSE';
$xmlFULOrderParams->appendChild($xmlEbcdic);
return $this;
} | [
"public function addHVUOrderParams(): OrderDetailsBuilder\n {\n $xmlHVUOrderParams = $this->dom->createElement('HVUOrderParams');\n $this->instance->appendChild($xmlHVUOrderParams);\n\n return $this;\n }",
"public function addHVZOrderParams(): OrderDetailsBuilder\n {\n $xmlHVZOrderParams = $this->dom->createElement('HVZOrderParams');\n $this->instance->appendChild($xmlHVZOrderParams);\n\n return $this;\n }",
"function sv_add_tracking_info_to_jilt_order_params( $params, $order ) {\n\n // TODO: replace with code to retrieve the tracking code for the given order\n // For example: $tracking_code = get_post_meta( $order->get_id() , 'ups_shipment_ids', true );\n\n $tracking_code = get_post_meta( $order->get_id() , 'package_number', true );\n $tracking_url = get_post_meta( $order->get_id() , 'tracking_url', true );\n \n if ( $tracking_code ) {\n\n if ( ! isset( $params['properties'] ) ) {\n $params['properties'] = [];\n }\n\n // use {{ order.properties.tracking_code }} to access this value and insert it in a Jilt email\n $params['properties']['tracking_code'] = $tracking_code;\n $params['properties']['tracking_url'] = $tracking_url;\n }\n\n return $params;\n}",
"public function addOrderStepFields(FieldList $fields, Order $order);",
"public static function addOrderAttributes(&$args, WC_Order $order) {\r\n\t\tself::addExtendedInformation ( $args, $order );\r\n\t\t// self::addUserDefinedFields ( $args, $order );commented 5/2/16. Functionality not in use currently.\r\n\t}",
"public function getOrderTrackingParams($order);",
"public function withOrders($orderArgs)\n {\n foreach (func_get_args() as $order) {\n $this->fields['Orders']['FieldValue'][] = $order;\n }\n return $this;\n }",
"protected function paymentDetails($params, $order)\n {\n $shipping = 0;\n foreach ($order->getOrderLineShipping() as $line) {\n $shipping += $line->getPrice();\n }\n\n $total = $order->getTotalPrice();\n $params['PAYMENTREQUEST_0_INVNUM'] = $order->getPaymentGatewayId();\n $params['PAYMENTREQUEST_0_AMT'] = number_format($total, 2, '.', '');\n $params['PAYMENTREQUEST_0_ITEMAMT'] = number_format(($total - $shipping), 2, '.', '');\n $params['PAYMENTREQUEST_0_SHIPPINGAMT'] = number_format($shipping, 2, '.', '');\n $params['PAYMENTREQUEST_0_CURRENCYCODE'] = $order->getCurrencyCode();\n $params['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization';\n\n $i=0;\n\n $paymentFee = 0;\n foreach ($order->getOrdersLiness() as $line) {\n if ('payment.fee' === $line->getType()) {\n $paymentFee += $line->getPrice();\n }\n\n if ('product' !== $line->getType()) {\n continue;\n }\n\n // ignore products with 100% discount - paypal cannot handle these...\n if (0.00 == number_format($line->getPrice(), 2, '.', '')) {\n continue;\n }\n\n $params['L_PAYMENTREQUEST_0_NAME'.$i] = $line->getProductsName();\n $params['L_PAYMENTREQUEST_0_AMT'.$i] = number_format($line->getPrice(), 2, '.', '');\n $params['L_PAYMENTREQUEST_0_QTY'.$i] = $line->getQuantity();\n $params['L_PAYMENTREQUEST_0_ITEMCATEGORY'.$i] = 'Physical';\n $i++;\n }\n\n foreach ($order->getOrderLineDiscount() as $line) {\n $params['L_PAYMENTREQUEST_0_NAME'.$i] = $this->translator->trans($line->getProductsSku(), [], 'checkout');\n $params['L_PAYMENTREQUEST_0_AMT'.$i] = number_format($line->getPrice(), 2, '.', '');\n $params['L_PAYMENTREQUEST_0_QTY'.$i] = $line->getQuantity();\n $params['L_PAYMENTREQUEST_0_ITEMCATEGORY'.$i] = 'Physical';\n $i++;\n }\n\n if ($paymentFee > 0) {\n $params['L_PAYMENTREQUEST_0_NAME'.$i] = $this->translator->trans('payment.fee', [], 'checkout');\n $params['L_PAYMENTREQUEST_0_AMT'.$i] = number_format($paymentFee, 2, '.', '');\n $params['L_PAYMENTREQUEST_0_QTY'.$i] = 1;\n $params['L_PAYMENTREQUEST_0_ITEMCATEGORY'.$i] = 'Physical';\n $i++;\n }\n\n return $params;\n }",
"function update_order_info($order){\n }",
"function addOrder(Order $oOrder) {\n\n //$oOrder->setDeliverySite($this->getDeliverySite());\n parent::addOrder($oOrder);\n\n }",
"function setOrder(){\n $this->list_order_fields = func_get_args();\n }",
"public function withOrderFeeList()\n {\n foreach (func_get_args() as $OrderFeeList)\n {\n $this->_fields['OrderFeeList']['FieldValue'][] = $OrderFeeList;\n }\n return $this;\n }",
"function add_order_f( $entry, $form) {\n global $wpdb;\n global $QUOTE_DUR_NON_3D_PRINT_DAYS;\n global $QUOTE_DUR_3D_PRINT_DAYS;\n global $QUOTE_SELECTION_DAYS;\n\n $dsr_input = substr($entry['4'],0,1); //Populate DSR per first character in string\n $usercid = return_cid();\n $order_type = $entry['18'];\n $quote_dur;\n if ($order_type == '3D-Printed Part') {\n $quote_dur = $QUOTE_DUR_3D_PRINT_DAYS;\n } else $quote_dur = $QUOTE_DUR_NON_3D_PRINT_DAYS;\n\n //$curtime_mysql = current_time('mysql'); //curent time in the mysql format in the server's time zone (EST)\n $quotes_due_mysql = no_holidays(date(\"Y-m-d\"),date(\"Y-m-d\",strtotime(\" + \". $quote_dur. ' weekdays'))); //current time converted to unix format, quote duration added, converted back to mysql format\n $atp_mysql = no_holidays($quotes_due_mysql,date(\"Y-m-d\",strtotime($quotes_due_mysql. \" + \". $QUOTE_SELECTION_DAYS. ' weekdays'))); //quotes due time converted to unix format, selection duration added, converted back to mysql format\n\n $data = array(\n 'cid' => $usercid,\n 'dsr' => $dsr_input,\n 'order_name' => $entry['1'],\n 'need_date' => $entry['8'],\n 'material' => $entry['5'],\n 'ship_name' => $entry['13'],\n 'ship_street' => $entry['12.1'],\n 'ship_street2' => $entry['12.2'],\n 'ship_city' => $entry['12.3'],\n 'ship_state' => $entry['12.4'],\n 'ship_zip' => $entry['12.5'],\n 'qty' => $entry['2'],\n 'order_addl_rqmts' => $entry['10'],\n 'order_comments' => $entry['11'],\n 'quotes_due' => $quotes_due_mysql,\n 'atp_due' => $atp_mysql,\n 'order_type' => $order_type,\n 'bid_cost' => $entry['19']\n );\n //Checks if firm need by parsing string for Yes\n $f_need = false;\n if (strpos($entry['9'], 'Yes') !== false) {\n $f_need = true;\n }\n\n //Extracts qual level from first character of string\n $qual_reqd = $entry['6'];\n $qual_reqd_num = $qual_reqd[0];\n\n //qual_set corresponds to binary number with a 1 in each position where a checkbox is checked\n $qual_set = 0;\n for ($q_num = 1; $q_num <= 5; $q_num++) {\n $entry_num = \"7.{$q_num}\";\n if($entry[$entry_num] != '') {\n $qual_set = $qual_set | (1<<($q_num-1));\n }\n }\n $data = array_merge($data, array('firm_need' => $f_need, 'order_vqual' => $qual_set, 'order_qual' => $qual_reqd_num));\n //Insert Order to DB\n $wpdb->insert(\n 'orders',\n $data\n );\n $oid = $wpdb->insert_id; //Get auto-increment order id (oid)\n $order_files = $entry['3'];\n upload_files_from_gform($order_files, $oid, $usercid);\n $wpdb->insert('logs', array('user_type' => 'customer', 'log_type' => 'New Order', 'log_entry' => \"Order $oid created\")); //log the event\n\n //send_alert(\"Thank you, your order has been submitted. We will email you when quotes have been received.\");\n}",
"public function setOrderDetails(string $orderDetails = \"\")\n {\n $this->orderDetails = $orderDetails;\n }",
"public function setup_order() {\n $coupon_id = isset($this->params['coupon_id'])?$this->params['coupon_id']:0;\n $aid = isset($this->params['aid'])?$this->params['aid']:'';\n $currency_code = isset($this->params['currency_code'])?$this->params['currency_code']:'USD';\n \n \n \n }",
"function display_fields_for_order_details(){\r\n\r\n\t\t/**\r\n\t\t * Position 1 - Display inside order total after shipping method\r\n\t\t */\r\n\t\tadd_filter( 'woocommerce_get_order_item_totals', [$this, 'display_after_shipping_method'], 10, 2 );\r\n\r\n\t\t/**\r\n\t\t * Position 2 - Display after order total\r\n\t\t */\r\n\t\tadd_action( 'woocommerce_order_details_after_order_table', [$this,'display_after_order_details'] );\r\n\t\t\r\n\t}",
"public function addOrderDetailsToQueue($observer)\n {\n if (!Mage::getStoreConfigFlag('factfinder/export/track_checkout')\n || !Mage::helper('factfinder')->isEnabled('tracking')\n || Mage::helper('factfinder')->isInternal()\n ) {\n return;\n }\n\n $order = $observer->getOrder();\n $customerId = $order->getCustomerId();\n if ($customerId) {\n $customerId = md5('customer_' . $customerId);\n }\n\n $trackingIdFieldName = Mage::helper('factfinder_tracking')->getIdFieldName();\n $masterIdFieldName = Mage::helper('factfinder/search')->getIdFieldName();\n\n /** @var Mage_Sales_Model_Order_Item $item */\n foreach ($order->getAllItems() as $item) {\n if ($item->getChildrenItems()) {\n continue;\n }\n\n // use product id as default value in case there's no parent item\n $parentProductId = $item->getProduct()->getData($masterIdFieldName);\n $price = $item->getPriceInclTax();\n\n $parentItem = $item->getParentItem();\n\n if ($parentItem) {\n $parentProductId = $parentItem->getProduct()->getData($masterIdFieldName);\n if ($parentItem->getProduct()->isConfigurable()) {\n $price = $parentItem->getPriceInclTax();\n }\n }\n\n try {\n Mage::getModel('factfinder_tracking/queue')\n ->setProductId($item->getProduct()->getData($trackingIdFieldName))\n ->setParentProductId($parentProductId)\n ->setProductName($item->getName())\n ->setSid(Mage::helper('factfinder_tracking')->getSessionId())\n ->setUserid($customerId)\n ->setPrice($price)\n ->setCount($item->getQtyOrdered())\n ->setStoreId($order->getStoreId())\n ->save();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n }",
"public function set_field_order($order_arr = array())\n\t{\n\t\t// normalize\n\t\tforeach($this->_fields as $key => $val)\n\t\t{\n\t\t\t$this->_fields[$key] = $this->normalize_params($val);\n\t\t}\n\t\tif (!empty($order_arr))\n\t\t{\n\t\t\t$num = count($order_arr) - 1;\n\t\t\tfor ($i = 0; $i < $num; $i++)\n\t\t\t{\n\t\t\t\tif (isset($this->_fields[$order_arr[$i]]))\n\t\t\t\t{\n\t\t\t\t\t$this->_fields[$order_arr[$i]]['order'] = $i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->_fields = $this->_fields_sorter($this->_fields, 'order');\n\t\t\n\t}",
"private function setPaymentAdditionalInfo(OrderInterface $order): void\n {\n $extensionAttributes = $order->getExtensionAttributes();\n $paymentAdditionalInformation = $order->getPayment()->getAdditionalInformation();\n\n $objects = [];\n foreach ($paymentAdditionalInformation as $key => $value) {\n /** @var PaymentAdditionalInfoInterface $additionalInformationObject */\n $additionalInformationObject = $this->paymentAdditionalInfoFactory->create();\n $additionalInformationObject->setKey($key);\n\n if (!is_string($value)) {\n $value = $this->serializer->serialize($value);\n }\n $additionalInformationObject->setValue($value);\n\n $objects[] = $additionalInformationObject;\n }\n $extensionAttributes->setPaymentAdditionalInfo($objects);\n $order->setExtensionAttributes($extensionAttributes);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Override in nonabstract class to return the proper config view class name. | protected static function getConfigViewClassName()
{
throw new NotImplementedException();
} | [
"protected function getViewClassName(){\n return $this->app->routename.$this->app->viewsuffix;\n }",
"protected function resolveViewClassName(): string\n {\n return $this->configurationService->getConfigByPath('Signature', 'Mvc.View.DefaultViewClassname');\n }",
"protected function getViewType():string\n {\n $viewType = lcfirst(preg_replace('/^.+?\\\\\\\\(\\w+)Configuration$/', '$1', get_class($this)));\n return $viewType;\n }",
"public function getViewClass(): string;",
"protected function getView()\n {\n if ($this->view) {\n return 'pcmn::content.form.fields.' . snake_case(lcfirst($this->view));\n }\n\n return 'pcmn::content.form.fields.' . snake_case(lcfirst(class_basename(get_class($this))));\n }",
"private function matchView()\n\t{\n\t\treturn $this->config->config['basePath'] .DIRECTORY_SEPARATOR . 'module' . DIRECTORY_SEPARATOR . ucwords($this->module) .\n\t\t\tDIRECTORY_SEPARATOR . 'view' .DIRECTORY_SEPARATOR. $this->camelCaseToDash($this->controller) .DIRECTORY_SEPARATOR .\n\t\t\t($this->camelCaseToDash($this->action)) . $this->config->view['suffix'];\n\t}",
"public function getViewName();",
"public static function getViewName() {\n return static::$VIEW;\n }",
"public function getViewHelperClassName() {}",
"public function getViewName(){\n return $this->_view_name;\n }",
"public function getName()\n {\n return $this->view;\n }",
"public function get_configuration_template() {\n\t\treturn $this->get_id().\": called, but not implemented in the child class (coding error)\";\n\t}",
"public function getViewName() {\n\t\treturn $this->viewName;\n\t}",
"private function getViewHelpersNamespace()\n {\n $config = config('helpers.directories');\n\n // directories\n $root = $config['root'];\n $view = $config['view'];\n\n return 'App\\\\' . $root . '\\\\' . $view;\n }",
"abstract public function loadViewConfig();",
"public function GetViewClass () {\n\t\treturn $this->viewClass;\n\t}",
"abstract public function getLayoutTemplateClassName();",
"public static function getSettingsView() : string;",
"protected function resourceClass()\n {\n return Str::studly($this->viewsName());\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the nb ecr a facturer cloture. | public function getNbEcrAFacturerCloture(): ?int {
return $this->nbEcrAFacturerCloture;
} | [
"public function getNbrEcrituresBq() {\n return $this->nbrEcrituresBq;\n }",
"public function getFactureNumber()\n {\n // Recherche du nombre de facture\n $compteur = $this->createQueryBuilder('f')->select('count(f.id)')->getQuery()->getSingleScalarResult();\n\n if ($compteur != 0){\n // Si le compteur est different de 0 alors recuperer le dernier ID\n $q = $this->createQueryBuilder('c')->select('c.id')->orderBy('c.id', 'DESC')->setMaxResults(1);\n try{\n $qb = $q->getQuery()->getSingleScalarResult();\n // Incrementé de +1 l'id puis affecter sur 4 positions\n $id = $qb + 1;\n if ($id < 10){ return '000'.$id; }\n elseif ($id < 100){ return '00'.$id; }\n elseif ($id < 1000){ return '0'.$id; }\n else{ return $id; }\n } catch (NoResultException $e){\n return $e;\n }\n } else{\n return $code = '0001';\n }\n }",
"public function getCne()\n {\n return $this->cne;\n }",
"public function getNbRelCliImprimeesFact(): ?int {\n return $this->nbRelCliImprimeesFact;\n }",
"public function getNrc()\n {\n return $this->nrc;\n }",
"public function getNbJrnImprimeesFact() {\n return $this->nbJrnImprimeesFact;\n }",
"public function getNumIdccEmployeur() {\n return $this->numIdccEmployeur;\n }",
"public function getNbCobro()\n {\n return $this->nb_cobro;\n }",
"public function getNprciAccion()\n {\n return $this->nprciAccion;\n }",
"public function getNroFactura()\n {\n return $this->nro_factura;\n }",
"public function getCdeFrnNumFact(): ?int {\n return $this->cdeFrnNumFact;\n }",
"public function getEcartCumule() {\n return $this->ecartCumule;\n }",
"public function getNbreCitationEnAttente(){\n\n $sql=\"SELECT COUNT(*) as nb_citations FROM citation c\n WHERE cit_valide=0 and cit_date_valide IS NULL\";\n\n $requete = $this->db->query($sql);\n $ligne=$requete->FETCH(PDO::FETCH_OBJ);\n\n return $ligne->nb_citations; // ligne est le tableau renvoyer par sql. on selectionne la colonne que l'on a appele nb_citations dans la requete\n\n }",
"public function getOehdcntrnbr()\n {\n return $this->oehdcntrnbr;\n }",
"public function getNumCompte()\n {\n return $this->numCompte;\n }",
"public function getNumFacture() {\n return $this->numFacture;\n }",
"public function getRefusCr()\n {\n return $this->refusCr;\n }",
"public function getNbAnnexesEditeesFact(): ?int {\n return $this->nbAnnexesEditeesFact;\n }",
"public function getNbEcrituresRaz(): ?int {\n return $this->nbEcrituresRaz;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Testing adding a query argument | public function testAddQueryArg() {
$url = 'http://www.studio98.com/';
$new_url = url::add_query_arg( 'test', 'true', $url );
// Make sure they're equal
$this->assertEquals( 'http://www.studio98.com/?test=true', $new_url );
} | [
"public function testQueryParam()\n {\n // Param verification failed\n $verification_failed_response =\n $this->json('get', '/api/v3/game/list', [\n 'q' => null,\n ]);\n\n $verification_failed_response\n ->assertStatus(422);\n\n // A param for q\n $q_response =\n $this->json('get', '/api/v3/game/list', [\n 'q' => 'a',\n ]);\n\n $q_response\n ->assertStatus(200);\n }",
"public function testWithQueryAddsParametersToUrl()\n {\n $this->url->withQuery('first', 'alpha');\n $this->url->withQuery('second', 'beta');\n $url = (string)$this->url;\n $this->assertContains('first=alpha', $url);\n $this->assertContains('second=beta', $url);\n }",
"public function testGetQueryArgs()\n {\n $client = new MockClient(new Response(200, [], '{}'));\n\n $api = new Api(MOCK_APPLICATION_KEY, MOCK_APPLICATION_SECRET, 'ovh-eu', MOCK_CONSUMER_KEY, $client);\n $api->get('/me/api/credential?applicationId=49', ['status' => 'pendingValidation'], null, false);\n\n $calls = $client->calls;\n $this->assertCount(1, $calls);\n\n $req = $calls[0]['request'];\n $this->assertSame('GET', $req->getMethod());\n $this->assertSame('https://eu.api.ovh.com/1.0/me/api/credential?applicationId=49&status=pendingValidation', $req->getUri()->__toString());\n }",
"public function test__Query() {\n\t\t// Mock request\n\t\t$request = Stub::make( \"RestfulRecord\\RestfulRecordRequest\", array(\n\t\t\t\"_component\" => $this->_mockRestfulRecordComponent,\n\t\t\t\"getClient\" => function() {\n\t\t\t\treturn Stub::make( \"GuzzleHttp\\Client\", array(\n\t\t\t\t\t\"send\" => function( RequestInterface $request, array $options = array() ) {\n\t\t\t\t\t\treturn \"foo\";\n\t\t\t\t\t}\n\t\t\t\t) );\n\t\t\t}\n\t\t) );\n\n\t\t// Verify an no error occurred\n\t\tverify( $request->query() )->equals( array( false, \"foo\" ) );\n\t}",
"public function testGetQueryData()\n {\n $this->assertTrue(is_array($this->request->getQueryData()));\n $this->assertEquals(1, count($this->request->getQueryData()));\n $this->assertArrayHasKey('test', $this->request->getQueryData());\n $this->assertEquals('true', $this->request->getQueryData()['test']);\n }",
"public function testRunUrlEncodedQuery()\n {\n }",
"public function testWithQueryInvalidFormat()\n {\n $uri = $this->getUriForTest();\n $uri->withQuery(['foo=bar']);\n }",
"public function testArgumentDefaultQueryParameter() {\n $view = Views::getView('test_argument_default_query_param');\n\n $request = Request::create(Url::fromUri('internal:/whatever', ['absolute' => TRUE])->toString());\n\n // Check the query parameter default argument fallback value.\n $view->setRequest($request);\n $view->initHandlers();\n $this->assertEquals('all', $view->argument['type']->getDefaultArgument());\n\n // Check the query parameter default argument with a value.\n $request->query->add(['the_node_type' => 'page']);\n $view->setRequest($request);\n $view->initHandlers();\n $this->assertEquals('page', $view->argument['type']->getDefaultArgument());\n }",
"public function testSetQuery()\n\t{\n\t\t$this->object->setQuery('somevar=somevalue');\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getQuery(),\n\t\t\t$this->equalTo('somevar=somevalue')\n\t\t);\n\n\t\t$this->object->setQuery('somevar=somevalue&test=true');\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getQuery(),\n\t\t\t$this->equalTo('somevar=somevalue&test=true')\n\t\t);\n\n\t\t$this->object->setQuery(array('somevar' => 'somevalue', 'test' => 'true'));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getQuery(),\n\t\t\t$this->equalTo('somevar=somevalue&test=true')\n\t\t);\n\t}",
"public function testingMissingQueryArguments()\n {\n $this->expectException(\\InvalidArgumentException::class);\n\n $db = new \\Filebase\\Database([\n 'dir' => __DIR__.'/databases/users_1',\n 'cache' => false\n ]);\n\n $db->flush(true);\n\n $user = $db->get(uniqid());\n $user->name = 'John';\n $user->save();\n\n // standard matches\n $query = $db->query()->where('John')->results();\n\n $db->flush(true);\n }",
"public function testMergedQueryMethodArgumentName()\n {\n $this->addbaseQuery();\n $this->addQueryFragment();\n DALBaker::bakeQueriesFile('TestSys1');\n DAL::requireQueryClass('TestSys1');\n $queryClass = new ReflectionClass('TestSys1Queries');\n $methods = $queryClass->getMethods();\n $method = $methods[0];\n $parameters = $method->getParameters();\n $paramName = $parameters[0]->name;\n $expected = 'data';\n PHPUnit_Framework_Assert::assertEquals($expected, $paramName);\n\n }",
"public function testAddQuery()\n {\n $oShop = oxNew('oxShop');\n $oShop->addQuery('query');\n $this->assertEquals(array('query'), $oShop->getQueries());\n\n $oShop->addQuery('anotherquery');\n $this->assertEquals(array('query', 'anotherquery'), $oShop->getQueries());\n }",
"public function testQueryParams() : void\n {\n $_GET = $data = [\n 'name' => 'Denis',\n 'age' => 35\n ];\n $request = new Request();\n\n self::assertEquals($data, $request->getQueriesParams());\n self::assertNull($request->getParsedBody());\n }",
"public function testSetAndGetQueryNull()\n {\n $value = null;\n\n self::assertEquals($this->fixture, $this->fixture->setQuery($value));\n self::assertEquals($value, $this->fixture->getQuery());\n }",
"public function testWithQueryParams()\n {\n $serverRequest = $this->getEnviromentForTest();\n $expected = [\n 'q' => 'abc'\n ];\n $newQuery = [\n 'foo' => 'bar'\n ];\n\n $newRequest = $serverRequest->withQueryParams($newQuery);\n\n $this->assertEquals($expected, $serverRequest->getQueryParams());\n $this->assertEquals($newQuery, $newRequest->getQueryParams());\n }",
"public function testBuildQuery() {\n\t\t$vars = ['foo' => 'bar'];\n\n\t\t$this->assertEquals('?foo=bar', Url::buildQuery($vars));\n\t}",
"function testQueryVars()\n {\n // Prepare\n global $wp_query;\n $wp_query->query_vars['number'] = 123;\n $wp_query->query_vars['string'] = 'test';\n $wp_query->query_vars['bool'] = true;\n $wp_query->query_vars['array'] = [1,2,3];\n // Assert\n $this->assertEquals(Request::input('number'), 123);\n $this->assertEquals(Request::input('string'), 'test');\n $this->assertEquals(Request::input('bool'), true);\n $this->assertIsArray(Request::input('array'));\n $this->assertEquals(Request::input('array'), [1,2,3]);\n }",
"public function testWithQueryParams()\n {\n $params = [\n 'foo' => 'bar',\n 'baz' => '001'\n ];\n $request = $this->request->withQueryParams($params);\n\n $this->assertSame($params, $request->getQueryParams());\n }",
"public function testContainsAnRequestParameterInTheQueryString(HttpRequest $httpRequest)\n {\n $this->assertContains('Foo=Bar', $httpRequest->getQueryData(), \"The request parameter wasn't set\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a Server instance from an existing request object Provided a callback, an existing request object, and optionally an existing response object, create and return the Server instance. If no Response object is provided, one will be created. | public static function createServerFromRequest(
callable $callback,
ServerRequestInterface $request,
ResponseInterface $response = null
) {
if (! $response) {
$response = new Response();
}
return new static($callback, $request, $response);
} | [
"public static function createServerFromRequest(\n array $middleware,\n ServerRequestInterface $request\n ) {\n return new static($middleware, $request);\n }",
"public static function createFromHttpRequest(ServerRequestInterface $request);",
"public static function create()\n\t{\n\t\t$args = func_get_args();\n\t\t\n\t\t$sapiName = Application::getInstance()['sapi_name'] ?? php_sapi_name();\n\t\tif( $sapiName == 'cli' ) {\n\t\t\treturn new Cli\\Response(...$args);\n\t\t} else {\n\t\t\treturn new Http\\Response(...$args);\n\t\t}\n\t}",
"public function create()\n {\n $class = $this->server();\n\n $server = new $class($this->host, $this->port, $this->mode, $this->socket);\n\n $server->set($this->settings);\n\n foreach ($this->events as $event) {\n if (strcasecmp($event, 'start') === 0 && $server->mode == SWOOLE_BASE) {\n continue;\n }\n\n $this->delegateEvent($server, $event);\n }\n\n return $server;\n }",
"public function createRequestApplication(ServerRequestInterface $request);",
"public function __invoke(\n callable $callable,\n ServerRequestInterface $request,\n ResponseInterface $response,\n array $routeArguments\n ): ResponseInterface\n {\n container()['response'] = $response;\n\n foreach ($routeArguments as $k => $v) {\n $request = $request->withAttribute($k, $v);\n }\n\n return $callable($request, $response, $routeArguments);\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n $this->helper->setUri($request->getUri());\n return $next($request, $response);\n }",
"protected function createServer()\n\t{\n\t\tif($this->_server===null)\n\t\t{\n\t\t\tif($this->getApplication()->getMode()===TApplicationMode::Debug)\n\t\t\t\tini_set(\"soap.wsdl_cache_enabled\",0);\n\t\t\t$this->_server = new SoapServer($this->getWsdlUri(),$this->getOptions());\n\t\t}\n\t\treturn $this->_server;\n\t}",
"public function __invoke(\n callable $callable,\n ServerRequestInterface $request,\n ResponseInterface $response,\n array $routeArguments\n ): ResponseInterface {\n foreach ($routeArguments as $k => $v) {\n $request = $request->withAttribute($k, $v);\n }\n\n return $callable($request, $response, $routeArguments, $this->component);\n }",
"protected function createServer()\n\t{\n\t\tif($this->_server===null)\n\t\t{\n\t\t\tif($this->getApplication()->getMode()===TApplicationMode::Debug)\n\t\t\t\tini_set(\"soap.wsdl_cache_enabled\",0);\n\t\t\t$this->_server = new \\SoapServer($this->getWsdlUri(),$this->getOptions());\n\t\t}\n\t\treturn $this->_server;\n\t}",
"public function testInstanciationFromRequest() {\n\n $request = new Request();\n $response = Response::createFromRequest($request);\n\n $this->assertInstanceOf(Response::class, $response, 'Response::createFromRequest must return a Response object');\n\n\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)\n {\n return $this->process($request, new CallableDelegateDecorator($next, $response));\n }",
"public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $out = null)\n {\n try {\n return $this->route($request, $response, $out);\n } catch (BadRequestException $e) {\n if ($this->http400Handler !== null) {\n return $this->http400Handler->badRequest($e, $request);\n } else {\n throw $e;\n }\n } catch (PageNotFoundException $e) {\n if ($this->http404Handler !== null) {\n return $this->http404Handler->pageNotFound($request);\n } else {\n throw $e;\n }\n } catch (\\Throwable $t) {\n if ($this->http500Handler !== null) {\n return $this->http500Handler->serverError($t, $request);\n } else {\n throw $t;\n }\n }\n }",
"public function createServerRequestFromGlobals(): ServerRequestInterface;",
"private function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface\n {\n return new ServerRequest($uri, $method, 'php://input', [], $serverParams);\n }",
"public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface;",
"public function createManager(Request $request, Response $response): Manager\n\t{\n\t\treturn new Manager(\n\t\t\t$request,\n\t\t\t$response,\n\t\t\t$this->getDecoder(),\n\t\t\t$this->getModelType(),\n\t\t\t$this->getUnwrap()\n\t\t);\n\t}",
"protected function createResponseObject() {\n\t\t$response = new Response();\n\t\treturn $response;\n\t}",
"public function create(SocketServer $server, LoggerInterface $logger = null): Server;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to set the value of field codUsuario | public function setCodUsuario($codUsuario)
{
$this->codUsuario = $codUsuario;
return $this;
} | [
"function getCodUsuario() {\n return $this->codUsuario;\n }",
"public function getCodUsuario() {\n return $this->codUsuario;\n }",
"public function setCod_usuario($cod_usuario)\r\n {\r\n $this->cod_usuario = $cod_usuario;\r\n\r\n return $this;\r\n }",
"public function setCod_usuario($cod_usuario)\n {\n $this->cod_usuario = $cod_usuario;\n\n return $this;\n }",
"function set_codOficina( $codOficina ) {\n // sets the value of codOficina\n $this->codOficina = $codOficina;\n }",
"public function getCodigoUsuario()\r\n {\r\n return $this->codigoUsuario;\r\n }",
"public function getCodUsuarioCriacao()\n {\n return $this->cod_usuario_criacao;\n }",
"public function getCod_usuario()\n {\n return $this->cod_usuario;\n }",
"public function getCodigoUsuario()\n {\n return $this->codigoUsuario;\n }",
"function set_idUsuario( $idUsuario ) {\n // sets the value of idUsuario\n $this->idUsuario = $idUsuario;\n }",
"public function setFkUsuario( $value ){\n\n $this->fkUsuario = $value;\n\n }",
"public function setTbUsuarioCidade($tbUsuarioCidade){\n\t$this->tbUsuarioCidade = $tbUsuarioCidade;\n}",
"public function setCod_tipo_usuario($cod_tipo_usuario)\n {\n $this->cod_tipo_usuario = $cod_tipo_usuario;\n\n return $this;\n }",
"function setId_usuario($id_usuario) {\n $this->id_usuario = $id_usuario;\n }",
"public function definirUsuario($usuario)\n {\n $this->usuario = (int)$usuario;\n }",
"public function setIdTipoUsuario($idTipoUsuario){\n $this->idTipoUsuario = $idTipoUsuario;\n }",
"function set___modificoUsuario( $__modificoUsuario ) {\n // sets the value of __modificoUsuario\n $this->__modificoUsuario = $__modificoUsuario;\n }",
"public function setCodi($codi){\n $this->codi = $codi;\n }",
"public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getAuctionProduct get auction product | private function getAuctionProduct($productId)
{
$auctionProduct = $this->auctionProductFactory->create()->getCollection()
->addFieldToFilter('product_id', ['eq' => $productId])
->addFieldToFilter('auction_status', 1)
->addFieldToFilter('status', 0)->setPageSize(1);
$auctionProduct = $this->getFirstItemFromRecord($auctionProduct);
if ($auctionProduct && $auctionProduct->getEntityId()) {
$this->resPrice = 0;
$this->resPriceConfig = $this->auctionConfig['reserve_enable'] ? $this->auctionConfig['reserve_price'] : '';
$this->bidDay = $auctionProduct->getDays();
$this->bidId = $auctionProduct->getEntityId();
$this->incPrice = $auctionProduct->getIncrementPrice();
$this->resPrice = $auctionProduct->getReservePrice();
$this->resPrice = $this->resPrice == 0 ? $this->resPriceConfig:$this->resPrice;
$this->datestop = strtotime($auctionProduct->getStopAuctionTime());
$this->datestart = strtotime($auctionProduct->getStartAuctionTime());
return $auctionProduct;
}
return false;
} | [
"function getAuctionProduct($auctionId){\n global $conn;\n $stmt = $conn->prepare('\n SELECT product.*\n FROM product\n JOIN auction ON auction.product_id = product.id\n WHERE auction.id = ?;');\n $stmt->execute(array($auctionId));\n return $stmt->fetch();\n}",
"public function getProduct();",
"public function getProduct() {\r\n\r\n $addParams = $this->addParams(INPUT_COOKIE);\r\n $addParams = $this->addParams();\r\n\r\n if (!empty($this->params['product'])) {\r\n\r\n // Checks for cached products page and get product info from cache if exists.\r\n $products = $this->isCached($this->feed_root . '/companies/' . $this->company . '/products.json');\r\n\r\n if ($products) {\r\n \r\n $products_obj = json_decode($products);\r\n \r\n foreach ($products_obj->data as $key => $array) {\r\n if ($array->id == $this->params['product']) {\r\n $product_key = $key;\r\n }\r\n }\r\n \r\n $product = json_encode($products_obj->data[$product_key]);\r\n\r\n } else {\r\n \r\n $this->rest_endpoint = $this->feed_root . '/products/' . $this->params['product'] . '.json';\r\n $product = $this->getFeed();\r\n \r\n }\r\n\r\n if ($product) {\r\n $data = json_decode($product);\r\n return $data;\r\n } else {\r\n $this->debug('getProduct: bad reply');\r\n return false;\r\n }\r\n } else {\r\n $this->debug('getProduct: no product parameter set:' . var_export($this->params, true));\r\n return false;\r\n }\r\n }",
"public function getProduct()\n\t{\n\t\treturn $this->product();\n\t}",
"public function getProductAction(){\n $params = $this->dispatcher->getParams();\n $id = array_shift($params);\n $product = \\Multiple\\Models\\Product::findFirst(array(\n \"id =:id:\",\n \"bind\" => array(\n \"id\" => $id\n )\n ));\n $result = \\Helpers\\Model::toArray($product);\n \\Helpers\\Controller::jsonify($result);\n $this->view->disable();\n }",
"function getProduct($productId) {\n\t$url = '/products/'.$productId;\n\t$result = sendRequest($url);\n\treturn $result;\n}",
"function getProductDetails(){\n return fetchProductDetails();\n }",
"public function product()\n {\n return $this->m_product;\n }",
"public function getProduct() {\n\t\treturn $this->product;\n\t}",
"public function getProductById($id);",
"protected function get_product()\n {\n return wc_get_product($this->data['product_id']);\n }",
"public function getProduct() {\n $this->view->js = true;\n $product = $this->grabUrl();\n $this->view->product_name = $product['name'];\n $this->view->product_id = $product['id'];\n $this->view->auth = null;\n if (Sessions::get('js') == 'false') {\n $this->view->js = false;\n $this->view->product = $this->grab_product_noJS($this->view->product_id, $this->view->product_name);\n } else {\n $pageGen = rand();\n Sessions::set('pageGen', $pageGen);\n $this->view->auth = $pageGen;\n }\n return false;\n }",
"public function getFeaturedProduct();",
"public function get_product_id()\n {\n }",
"public function getProductById(int $id);",
"function get_product_amazon_by_id($_id_product)\n\t {\n\t \t$this->db->select('*');\n\t\t$this->db->where('id_product',$_id_product);\n\t \t$_data_amazon_product = $this->db->get('tb_amazon_product');\n\t\tif (count($_data_amazon_product->result_array()))\n\t\t{\n\t\t\treturn array_shift($_data_amazon_product->result_array());\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t }",
"public function getProduct()\n {\n return Mage::registry('current_product');\n }",
"public function getProductsInAuction()\n {\n $auctionProArray = [0];\n $auctionProList = $this->auctionProduct->create()->getCollection()\n ->addFieldToFilter('auction_status', ['in' => [0,1]]);\n foreach ($auctionProList as $auctionPro) {\n if ($auctionPro->getProductId()) {\n $auctionProArray[] = $auctionPro->getProductId();\n }\n }\n return $auctionProArray;\n }",
"public function getProduct_Id() {\n return $this->product_Id;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test if an exception is thrown when app_id is not passed to Client | public function testNoAppIdError() {
$config = $this->config;
// Remove app_id from config
unset($config['app_id']);
// Instantiate new Client knowing it will throw an exception
new GoCardless_Client($config);
} | [
"public function testInvalidAppId(): void\n {\n $this->expectException(InvalidAppIdException::class);\n\n $this->porter->import(new Import(new ScrapeAppReviews(0)));\n }",
"public function testMandatoryAppId()\n {\n $client = $this->createClient();\n $testRoute = static::get('router')->generate('apisearch_v1_query_all_indices', [\n 'token' => 'aaaa',\n 'app_id' => '1234',\n ]);\n\n $client->request(\n 'get',\n $testRoute\n );\n $this->assertTrue(true);\n }",
"public function testClientBadClientId(): void\n {\n $this->expectException(DuoException::class);\n $this->expectExceptionMessage(Client::INVALID_CLIENT_ID_ERROR);\n $client = new Client(\n $this->bad_client_id,\n $this->client_secret,\n $this->api_host,\n $this->redirect_url\n );\n }",
"public function invokeInvalidClientSpecified()\n {\n $storage = new \\OAuth2\\Storage\\Memory([]);\n $server = new \\OAuth2\\Server($storage, [], []);\n\n \\Slim\\Environment::mock(\n [\n 'REQUEST_METHOD' => 'GET',\n 'PATH_INFO' => '/authorize',\n 'QUERY_STRING' => 'client_id=invalidClientId',\n ]\n );\n\n $slim = new \\Slim\\Slim();\n $slim->get('/authorize', new Authorize($slim, $server));\n\n ob_start();\n\n $slim->run();\n\n ob_get_clean();\n\n $this->assertSame(400, $slim->response->status());\n\n $actual = json_decode($slim->response->getBody(), true);\n $this->assertSame(\n [\n 'error' => 'invalid_client',\n 'error_description' => 'The client id supplied is invalid',\n ],\n $actual\n );\n }",
"public function testGetAccessTokenWithInValidApplicationId() : void\r\n {\r\n $expected = 200;\r\n $this->config['application_id'] = $this->invalidAppId;\r\n $actual = $this->SendSMSInput->getAccesToken( $this->config );\r\n $this->assertEquals( $expected, $actual, 'Application ID is invalid.' );\r\n }",
"public function testNotEmptyAppID() : void\r\n {\r\n \t$this->assertNotEmpty($this->appId);\r\n }",
"public function testBadRequestSync(){\n echo \"Test BadRequestSync\\n\";\n $this->expectException('Http\\Client\\Exception\\RequestException');\n $this->expectExceptionMessage('Could not resolve host: '.static::$nonExistantDomain);\n $syncClient = ApiClient::GetAPIClientSync();\n $syncClient->GET('https://'.static::$nonExistantDomain);\n // will never reach this line\n }",
"public function testRunMissingKey()\n {\n $this->app = new Application('');\n $this->expectException(ApplicationException::class);\n $this->expectExceptionMessage('Please provide access key');\n $this->app->run();\n }",
"public function testBadRequest(){\n echo \"Test BadRequest\\n\";\n $this->expectException('Http\\Client\\Exception\\RequestException');\n $this->expectExceptionMessage('Could not resolve host: '.static::$nonExistantDomain);\n $asyncClient = ApiClient::GetAPIClientAsync();\n $asyncClient->GET('https://'.static::$nonExistantDomain);\n // will never reach this line\n }",
"public function testMissingClientID() {\n $jwt = JWT::encode([], 'TestSecret', VanillaConnect::HASHING_ALGORITHM);\n\n $this->assertFalse($this->vanillaConnect->validateRequest($jwt));\n\n $this->assertArrayHasKey('request_missing_header_item', $this->vanillaConnect->getErrors());\n }",
"public function test_user_edit_client_email_with_not_existent_client_id() {\n\n $this->actingAs($this->user)\n ->post('/clients/str' . rand() . '/edit-email', $this->postData)\n ->seeJson([\n 'success' => false,\n 'message' => trans('clients.client_not_found')\n ]);\n }",
"public function testSammuiClientInvalid()\n {\n $originalName = LoadOAuthClient::$appClientName;\n LoadOAuthClient::$appClientName = LoadOAuthClient::$appClientName . '-wrong';\n\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n LoadOAuthClient::$appClientName = $originalName;\n\n $clientId = $crawler->filterXPath('//html/head/meta[@name=\"sammui-oauth2-client-id\"]')->attr('content');\n $clientSecret = $crawler->filterXPath('//html/head/meta[@name=\"sammui-oauth2-client-secret\"]')->attr('content');\n\n $this->assertNotNull($clientId);\n $this->assertNotNull($clientSecret);\n $this->assertSame('no-client-found-for-' . LoadOAuthClient::$appClientName . '-wrong', $clientId);\n $this->assertSame('no-client-found-for-' . LoadOAuthClient::$appClientName . '-wrong', $clientSecret);\n }",
"public function testInvalidEggIdTriggersException()\n {\n $server = $this->createServerModel();\n\n $this->expectException(ModelNotFoundException::class);\n\n $this->getService()\n ->setUserLevel(User::USER_LEVEL_ADMIN)\n ->handle($server, ['egg_id' => 123456789]);\n }",
"public function testShouldFailGetUserWhenGivenInvalidId()\n {\n $response = $this->get(self::BASE_ROUTE . \"1\");\n $response->assertStatus(404);\n }",
"public function isClientError();",
"public static function isClientError(){}",
"public function testInvalidApiKey()\n {\n $config = new Config();\n $config->setApiKey('some-invalid-key');\n\n \\do_action('swiftype_config_loaded', $config);\n\n $this->assertNull($this->client);\n }",
"public function email_without_app_id_is_not_valid()\n {\n // Get sample data and remove content\n $email = $this->getSampleData();\n unset($email['app_id']);\n\n // Send email request\n $response = $this->sendRequest($email);\n\n // Check failure response is correct\n $response->assertStatus(422);\n $response->assertJsonValidationErrors('app_id');\n }",
"public function testRunWrongKey()\n {\n $_REQUEST[$this->app->getOption('access_key_name')] = 'WRONGKEY';\n\n $this->expectException(ApplicationException::class);\n $this->expectExceptionMessage('Missing or invalid access key.');\n $this->app->run();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation postTranscoderEncodesAppConfigAsync Adds a Transcoder Encode Configuration to the specified Application | public function postTranscoderEncodesAppConfigAsync($server_name, $vhost_name, $template_name, $app_name, $body)
{
return $this->postTranscoderEncodesAppConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $app_name, $body)
->then(
function ($response) {
return $response[0];
}
);
} | [
"public function postTranscoderEncodeAppConfig($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body)\n {\n $this->postTranscoderEncodeAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body);\n }",
"public function postTranscoderEncodesAppConfig($server_name, $vhost_name, $template_name, $app_name, $body)\n {\n $this->postTranscoderEncodesAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $app_name, $body);\n }",
"public function putTranscoderEncodeAppConfig($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body)\n {\n $this->putTranscoderEncodeAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body);\n }",
"public function postTranscoderEncodesAppConfigWithHttpInfo($serverName, $vhostName, $templateName, $appName, $body)\n {\n \n // verify the required parameter 'serverName' is set\n if ($serverName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $serverName when calling postTranscoderEncodesAppConfig');\n }\n\n // verify the required parameter 'vhostName' is set\n if ($vhostName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $vhostName when calling postTranscoderEncodesAppConfig');\n }\n\n // verify the required parameter 'templateName' is set\n if ($templateName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $templateName when calling postTranscoderEncodesAppConfig');\n }\n\n // verify the required parameter 'appName' is set\n if ($appName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $appName when calling postTranscoderEncodesAppConfig');\n }\n\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $body when calling postTranscoderEncodesAppConfig');\n }\n\n // parse inputs\n $resourcePath = \"/v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/transcoder/templates/{templateName}/encodes\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/xml', 'text/xml', 'application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/xml','text/xml','application/json'));\n\n \n \n // path params\n if ($serverName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"serverName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($serverName),\n $resourcePath\n );\n }// path params\n if ($vhostName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"vhostName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($vhostName),\n $resourcePath\n );\n }// path params\n if ($templateName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"templateName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($templateName),\n $resourcePath\n );\n }// path params\n if ($appName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"appName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($appName),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams\n );\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }",
"public function putTranscoderEncodeAppConfigAdv($serverName, $vhostName, $templateName, $encodeName, $appName, $body)\n {\n list($response) = $this->putTranscoderEncodeAppConfigAdvWithHttpInfo($serverName, $vhostName, $templateName, $encodeName, $appName, $body);\n return $response;\n }",
"public function getTranscoderEncodeAppConfigAdvAsync($server_name, $vhost_name, $template_name, $encode_name, $app_name)\n {\n return $this->getTranscoderEncodeAppConfigAdvAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $app_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"protected function getTranscoderEncodesAppConfigRequest($server_name, $vhost_name, $template_name, $app_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderEncodesAppConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderEncodesAppConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderEncodesAppConfig'\n );\n }\n // verify the required parameter 'app_name' is set\n if ($app_name === null || (is_array($app_name) && count($app_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $app_name when calling getTranscoderEncodesAppConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/transcoder/templates/{templateName}/encodes';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($app_name !== null) {\n $resourcePath = str_replace(\n '{' . 'appName' . '}',\n ObjectSerializer::toPathValue($app_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function postTranscoderEncodeAppConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body)\n {\n $returnType = '';\n $request = $this->postTranscoderEncodeAppConfigRequest($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function postTranscoderEncodeAppConfigWithHttpInfo($serverName, $vhostName, $templateName, $encodeName, $appName, $body)\n {\n \n // verify the required parameter 'serverName' is set\n if ($serverName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $serverName when calling postTranscoderEncodeAppConfig');\n }\n\n // verify the required parameter 'vhostName' is set\n if ($vhostName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $vhostName when calling postTranscoderEncodeAppConfig');\n }\n\n // verify the required parameter 'templateName' is set\n if ($templateName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $templateName when calling postTranscoderEncodeAppConfig');\n }\n\n // verify the required parameter 'encodeName' is set\n if ($encodeName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $encodeName when calling postTranscoderEncodeAppConfig');\n }\n\n // verify the required parameter 'appName' is set\n if ($appName === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $appName when calling postTranscoderEncodeAppConfig');\n }\n\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $body when calling postTranscoderEncodeAppConfig');\n }\n\n // parse inputs\n $resourcePath = \"/v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/transcoder/templates/{templateName}/encodes/{encodeName}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/xml', 'text/xml', 'application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/xml','text/xml','application/json'));\n\n \n \n // path params\n if ($serverName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"serverName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($serverName),\n $resourcePath\n );\n }// path params\n if ($vhostName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"vhostName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($vhostName),\n $resourcePath\n );\n }// path params\n if ($templateName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"templateName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($templateName),\n $resourcePath\n );\n }// path params\n if ($encodeName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"encodeName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($encodeName),\n $resourcePath\n );\n }// path params\n if ($appName !== null) {\n $resourcePath = str_replace(\n \"{\" . \"appName\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($appName),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams\n );\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }",
"public function getTranscoderEncodesAppConfigAsync($server_name, $vhost_name, $template_name, $app_name)\n {\n return $this->getTranscoderEncodesAppConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $app_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"protected function putTranscoderEncodeAppConfigRequest($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling putTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling putTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling putTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling putTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'app_name' is set\n if ($app_name === null || (is_array($app_name) && count($app_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $app_name when calling putTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling putTranscoderEncodeAppConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/transcoder/templates/{templateName}/encodes/{encodeName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n // path params\n if ($app_name !== null) {\n $resourcePath = str_replace(\n '{' . 'appName' . '}',\n ObjectSerializer::toPathValue($app_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getTranscoderOverlayEncodeAppConfigAsync($server_name, $vhost_name, $template_name, $overlay_name, $encode_name, $app_name)\n {\n return $this->getTranscoderOverlayEncodeAppConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $overlay_name, $encode_name, $app_name)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function postTranscoderEncodesAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $app_name, $body)\n {\n $returnType = '';\n $request = $this->postTranscoderEncodesAppConfigRequest($server_name, $vhost_name, $template_name, $app_name, $body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }",
"protected function getTranscoderEncodeAppConfigRequest($server_name, $vhost_name, $template_name, $encode_name, $app_name)\n {\n // verify the required parameter 'server_name' is set\n if ($server_name === null || (is_array($server_name) && count($server_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $server_name when calling getTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'vhost_name' is set\n if ($vhost_name === null || (is_array($vhost_name) && count($vhost_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $vhost_name when calling getTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'template_name' is set\n if ($template_name === null || (is_array($template_name) && count($template_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $template_name when calling getTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'encode_name' is set\n if ($encode_name === null || (is_array($encode_name) && count($encode_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $encode_name when calling getTranscoderEncodeAppConfig'\n );\n }\n // verify the required parameter 'app_name' is set\n if ($app_name === null || (is_array($app_name) && count($app_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $app_name when calling getTranscoderEncodeAppConfig'\n );\n }\n\n $resourcePath = '/v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/transcoder/templates/{templateName}/encodes/{encodeName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($server_name !== null) {\n $resourcePath = str_replace(\n '{' . 'serverName' . '}',\n ObjectSerializer::toPathValue($server_name),\n $resourcePath\n );\n }\n // path params\n if ($vhost_name !== null) {\n $resourcePath = str_replace(\n '{' . 'vhostName' . '}',\n ObjectSerializer::toPathValue($vhost_name),\n $resourcePath\n );\n }\n // path params\n if ($template_name !== null) {\n $resourcePath = str_replace(\n '{' . 'templateName' . '}',\n ObjectSerializer::toPathValue($template_name),\n $resourcePath\n );\n }\n // path params\n if ($encode_name !== null) {\n $resourcePath = str_replace(\n '{' . 'encodeName' . '}',\n ObjectSerializer::toPathValue($encode_name),\n $resourcePath\n );\n }\n // path params\n if ($app_name !== null) {\n $resourcePath = str_replace(\n '{' . 'appName' . '}',\n ObjectSerializer::toPathValue($app_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'text/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'text/xml', 'application/json'],\n ['application/xml', 'text/xml', 'application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function putTranscoderEncodeAppConfigAdvAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body)\n {\n $returnType = '';\n $request = $this->putTranscoderEncodeAppConfigAdvRequest($server_name, $vhost_name, $template_name, $encode_name, $app_name, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }",
"public function postTranscoderTemplateAppConfigAsync($server_name, $vhost_name, $template_name, $app_name, $body)\n {\n return $this->postTranscoderTemplateAppConfigAsyncWithHttpInfo($server_name, $vhost_name, $template_name, $app_name, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }",
"public function getTranscoderEncodeAppConfigAdv($server_name, $vhost_name, $template_name, $encode_name, $app_name)\n {\n list($response) = $this->getTranscoderEncodeAppConfigAdvWithHttpInfo($server_name, $vhost_name, $template_name, $encode_name, $app_name);\n return $response;\n }",
"public function getTranscoderEncodesAppConfig($server_name, $vhost_name, $template_name, $app_name)\n {\n list($response) = $this->getTranscoderEncodesAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $app_name);\n return $response;\n }",
"public function postTranscoderTemplateAppConfig($server_name, $vhost_name, $template_name, $app_name, $body)\n {\n $this->postTranscoderTemplateAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $app_name, $body);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns all extra fields of a certain type | function &getAllExtraFieldsByType($type, $rangeInfo = null) {
$params = array($type);
$result =& $this->retrieveRange(
'SELECT * FROM extra_fields WHERE type = ?',
count($params)===1?array_shift($params):$params,
$rangeInfo);
$extraFields = new DAOResultFactory($result, $this, '_returnExtraFieldFromRow');
return $extraFields;
} | [
"function getExtrafields()\r\n\t{\r\n\t\t$typeid = JRequest::getVar('typeid', 0, '', 'int');\r\n\t\t$version = JRequest::getVar( 'version', 0, 'request', 'int' );\r\n\t\t$where = $typeid?' WHERE ftrel.type_id='.(int)$typeid:' WHERE ie.item_id = ' . (int)$this->_id;\r\n\t\t$query = 'SELECT fi.*'\r\n\t\t\t\t.' FROM #__flexicontent_fields AS fi'\r\n\t\t\t\t.' LEFT JOIN #__flexicontent_fields_type_relations AS ftrel ON ftrel.field_id = fi.id'\r\n\t\t\t\t.' LEFT JOIN #__flexicontent_items_ext AS ie ON ftrel.type_id = ie.type_id'\r\n\t\t\t\t.$where\r\n\t\t\t\t.' AND fi.published = 1'\r\n\t\t\t\t.' GROUP BY fi.id'\r\n\t\t\t\t.' ORDER BY ftrel.ordering, fi.ordering, fi.name'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$fields = $this->_db->loadObjectList('name');\r\n\t\tforeach ($fields as $field) {\r\n\t\t\t$field->item_id\t\t= (int)$this->_id;\r\n\t\t\t$field->value \t\t= $this->getExtrafieldvalue($field->id, $version);\r\n\t\t\t$field->parameters \t= new JParameter($field->attribs);\r\n\t\t}\r\n\t\treturn $fields;\r\n\t}",
"public function getExtraFields()\n {\n return $this->extra_fields;\n }",
"public function getExtraFields()\n {\n return $this->extraFields;\n }",
"public function getExtendedFieldTypes();",
"public function getCustomTypeFields(): array;",
"protected function get_additional_fields($object_type = \\null)\n {\n }",
"protected function get_additional_fields($object_type = \\null)\n {\n }",
"function getRecDriverFields($type) {\n\n return array();\n }",
"public function extraDBFields()\n\t{\n\t\t$fields = array(\n\t\t\t'db' => array(\n\t\t\t\t'City' => 'Varchar',\n\t\t\t\t'Country' => 'Varchar',\n\t\t\t\t'Nickname' => 'Varchar',\n\t\t\t\t'LastViewed' => 'SSDatetime',\n\t\t\t\t'Signature' => 'HTMLText'\n\t\t\t),\n\t\t\t'has_one' => array(\n\t\t\t\t'Avatar' => 'Image'\n\t\t\t),\n\t\t\t'searchable_fields' => array(\n\t\t\t\t'Nickname' => true\n\t\t\t),\n\t\t\t'indexes' => array(\n\t\t\t\t'Nickname' => true,\n\t\t\t),\n\t\t);\n\t\t\n\t\t//$this->extend('extraDBFields', $fields); //TODO: throws Error in 2.3.3\n\t\t\n\t\treturn $fields;\n\t}",
"public function getAdditionalFields(): array\n {\n return $this->additional_fields;\n }",
"function get_core_field_attrs( $type ) {\r\n\t\t\treturn ( isset( $this->core_fields[ $type ] ) ) ? $this->core_fields[ $type ] : array('');\r\n\t\t}",
"public function extraFields()\n {\n $extraFields = [\n 'status',\n 'project_id',\n 'teamlead_id',\n 'end',\n 'description',\n 'created_at',\n 'updated_at'\n ];\n\n return $extraFields;\n }",
"function &getExtraFieldData() {\n\t\tif (!isset($this->extra_field_data)) {\n\t\t\t$this->extra_field_data = array();\n\t\t\t$res = db_query_params ('SELECT * FROM artifact_extra_field_data WHERE artifact_id=$1 ORDER BY extra_field_id',\n\t\t\t\t\t\tarray ($this->getID())) ;\n\t\t\t$ef = $this->ArtifactType->getExtraFields();\n\t\t\twhile ($arr = db_fetch_array($res)) {\n\t\t\t\t$type=$ef[$arr['extra_field_id']]['field_type'];\n\t\t\t\tif (($type == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) || ($type==ARTIFACT_EXTRAFIELDTYPE_MULTISELECT)) {\n\t\t\t\t\t//accumulate a sub-array of values in cases where you may have multiple rows\n\t\t\t\t\tif (!array_key_exists($arr['extra_field_id'], $this->extra_field_data) || !is_array($this->extra_field_data[$arr['extra_field_id']])) {\n\t\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']][]=$arr['field_data'];\n\t\t\t\t} else {\n\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']] = $arr['field_data'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->extra_field_data;\n\t}",
"public function getExtraFields()\n\t{\n\t\treturn static::$extraIndexFields;\n\t}",
"public function fields_AllWithMeta(){\n return $this->fields('all_with_meta');\n }",
"public function get_additional_fields( $object_type ) {\n\t\t$core_fields = array();\n\n\t\tif ( method_exists( '\\WP_REST_Controller', 'get_additional_fields' ) ) {\n\t\t\tglobal $wp_rest_additional_fields;\n\n\t\t\tif ( isset( $wp_rest_additional_fields[ $object_type ] ) ) {\n\t\t\t\t$core_fields = $wp_rest_additional_fields[ $object_type ];\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $this->rest_fields[ $object_type ] ) ) {\n\t\t\t$fields = $this->rest_fields[ $object_type ];\n\t\t} else {\n\t\t\t$fields = array();\n\t\t}\n\n\t\treturn array_merge( $fields, $core_fields );\n\t}",
"public function getAddExtraFields()\n {\n return $this->addExtraFields;\n }",
"abstract protected function fetchMetaFields();",
"public function getFields();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getAllCampaign : Use this method to get all campaigns | function getAllCampaign()
{
$params = array(
'Target' => 'AdManager' ,
'Method' => 'findAllCampaigns'
);
$result = $this->makeRequest($params);
$result = $this->object_to_array($result);
return $result;
} | [
"public function ListCampaigns() {\n\t\treturn $this->doQuery(\"campaigns\", \"GET\");\n\t}",
"public function getAll()\n {\n return Context::get()->campaigns()->with('groups')->get();\n }",
"public function getCampaigns()\n {\n return MyRadio_BannerCampaign::resultSetToObjArray($this->campaigns);\n }",
"public function getCampaigns()\n {\n $resource = 'campaigns.json';\n $client = new Client($this->getServiceUrl($resource));\n $request = $client->createRequest('GET');\n $request->setProtocolVersion('1.1');\n $request->setHeader('Authorization', $this->getOauthData());\n $request->setHeader('Host', $this->getServiceDomain());\n $request->setHeader('Accept', '*/*');\n $response = $this->sendRequest($request)->json();\n return $response['campaigns'];\n }",
"public function actionAllcampaigns()\n {\n $params = \\Yii::$app->request->getQueryParams();\n $defaultParams = array(\n 'status' => Campaign::STATUS_ACTIVE,\n 'offset' => 0,\n 'limit' => 0,\n 'sort' => '-id'\n );\n $user = $this->getUser();\n $params = array_merge($defaultParams, $params);\n /**\n * check params\n */\n // check status\n if (in_array($params['status'], array(Campaign::STATUS_ACTIVE, Campaign::STATUS_PENDING, Campaign::STATUS_DELETED)) == false) {\n $this->throwError(\"407\", \"status param is wrong\");\n }\n //check sort\n if (substr($params['sort'], 0, 1) == '-') {\n $params['sort'] = substr($params['sort'], 1);\n $orderAttr = 'DESC';\n } else {\n $orderAttr = 'ASC';\n }\n if (in_array($params['sort'], array('id', 'name', 'amountRaised', 'goalAmount')) == false) {\n $this->throwError(\"407\", \"sort prama is wrong\");\n }\n\n $sql = $user->getCampaigns($params['status'], false)->orderBy(sprintf('%s %s', $params['sort'], $orderAttr));\n if ($params['limit'] != 0) {\n $sql->offset($params['offset'])->limit($params['limit']);\n }\n $data = array();\n if ($sql->count() > 0) {\n foreach ($sql->all() as $capaign) {\n $data[] = array(\n 'id' => $capaign['id'],\n 'name' => $capaign['name'],\n 'description' => $capaign['description'],\n 'alias' => $capaign['alias'],\n 'amountRaised' => $capaign['amountRaised'],\n 'goalAmount' => $capaign['goalAmount'],\n 'type' => $capaign['type'],\n 'startDate' => $capaign['startDate'],\n 'endDate' => $capaign['endDate'],\n 'status' => $capaign['status'],\n 'numberOfDonations' => $capaign['numberOfDonations'],\n 'numberOfUniqueDonors' => $capaign['numberOfUniqueDonors'],\n 'date' => $capaign['date']\n );\n }\n }\n return $data;\n }",
"public static function getAllBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn('SELECT banner_campaign_id FROM website.banner_campaign')\n );\n }",
"function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}",
"public function fetch_campaigns()\n {\n return $this->get_data(\"campaigns\");\n }",
"public function listCampaigns()\n\t{\n\t\t$url = $this->config['Config']['US']['BETA_API_URL'] . 'campaigns';\n\n\t\t$header = array(\n\t\t\t'Authorization: Bearer ' . $this->config['Config']['BETA_API_KEY']\n\t\t);\n\n\t\t$request = json_decode($this->cURLGet($url, $header));\n\t\treturn $request;\n\t}",
"public function fetch_campaigns() {\r\n\t\treturn $this->get_data(\"campaigns\");\r\n\t}",
"public static function get_all_campaigns()\r\n { \r\n // create and check connection\r\n $link = CheckrouteDatabase::connect();\r\n\r\n // query all available measurement campaigns\r\n $stmt = mysqli_prepare($link, \"SELECT x.id, x.name, x.description, COUNT(y.id_measurement) AS 'number_of_measurements' FROM MeasurementCampaign AS x, Campaign_has_Measurement AS y WHERE x.id = y.id_campaign GROUP BY x.id\");\r\n if ($stmt) {\r\n mysqli_stmt_execute($stmt);\r\n //mysqli_stmt_bind_result($stmt, $result_sql);\r\n\r\n $result = array();\r\n while (mysqli_stmt_fetch($stmt)) {\r\n $result[] = $result_sql;\r\n }\r\n mysqli_stmt_close($stmt);\r\n }\t\t\r\n\r\n // close database connection\r\n mysqli_close($link);\r\n \r\n return $result;\r\n }",
"public function campaignList()\n {\n $this->campaignListWithHttpInfo();\n }",
"public function campaigns()\n {\n return $this->hasMany(Campaign::class);\n }",
"public function findAllCampaigns($parameters = [])\n {\n return $this->get('findAllCampaigns', $parameters);\n }",
"public function getCampaigns()\n {\n return Controllers\\CampaignsController::getInstance();\n }",
"private function fetchCampaigns() {\n $hash = $this->uri->segment(2);\n\n if( !$hash ) {\n show_error('Unknown campaign id');\n return;\n }\n\n $campaign = $this->Campaign_model\n ->where('campaigns.campaign_token', $hash)\n ->find();\n\n $opportunity = false;\n\n if( !count($campaign) || $campaign[0]->campaign_id ) {\n $opportunity = $this->Opportunity_model\n ->where('campaigns.campaign_token', $hash)\n ->find();\n }\n\n if( $opportunity && count($opportunity) ) {\n $opportunity = $opportunity[0];\n $campaign = $opportunity->campaign;\n } else {\n $campaign = $campaign[0];\n $opportunity = false;\n }\n\n return array(\n 'campaign' => $campaign,\n 'opportunity' => $opportunity\n );\n }",
"function getCampaigns()\r\n{\r\n global $session;\r\n return GetCampaigns::run(new AdWordsServices(), $session);\r\n}",
"public function getBannerCampaigns() {\n return $this->_aBannerCampaigns;\n }",
"public function campaigns()\n {\n return $this->hasManyThrough(\n 'App\\Models\\Campaign',\n 'App\\Models\\CampaignUser',\n 'user_id',\n 'id',\n 'id',\n 'campaign_id'\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
is call has record | public function isHasRecord(): bool; | [
"public function hasRecord() {}",
"public function hasRecord() {\n return !empty($this->record);\n }",
"public function hasCalls(): bool\n {\n return $this->callCount > 0;\n }",
"public function hasRecord(): bool {\n return $this->id !== null;\n }",
"public function hasCalls(): bool\n {\n return (bool) $this->calls;\n }",
"public function hasSelectedRecord() : bool;",
"public function hasBatchCalls();",
"public function hasBatchCalls()\n {\n return (bool)count($this->_batch);\n }",
"public static function verifyCalled() { return !empty(self::$calls); }",
"public function record_exists(){\r\n\r\n $this->where( array( $this->id_field.'<>' => $this->{$this->id_field} ) );\r\n \r\n $sql = $this->build_select_sql().\" LIMIT 1\";\r\n\r\n if( $row = $this->fetch_data( $this->query( $sql ) ) ){\r\n $this->clear_clauses();\r\n return TRUE;\r\n }else{\r\n $this->clear_clauses();\r\n return FALSE;\r\n }\r\n }",
"private function checkActivityExist($phone,$beanId)\n {\n global $db;\n $sQuery = \"select * from calls where parent_id= '$beanId' and name = '$phone' and status = 'Planned'\";\n $out = $db->query($sQuery); \n $retData = $db->fetchRow($out);\n return $retData;\n }",
"function canProcessRecord($record) {\n return true; \n }",
"public function hasRecordset() {\n return !empty($this->recordset);\n }",
"function hasDetails();",
"public function was_called() {\n\t\treturn ( count( $this->get_called_functions() ) > 0 );\n\t}",
"function canProcessRecord($record) {\n return true; \n }",
"public function recordExists($id);",
"function is_recording()\n {\n return is_recording();\n }",
"public function hasReturned(): bool;"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function Name : DeleteSettingsDetails Description : Delete the settings details | function DeleteSettingsDetails($id) {
global $objSmarty, $global_config;
$strDelDetails = "DELETE FROM tbl_settings WHERE id ='".$id."'";
$this->DirectSQLDelete($strDelDetails, 0);
} | [
"function deleteSettings( ) {\r\n\t\t\tdelete_option( 'Designer Pages Widget Settings' );\r\n\t\t}",
"function deleteSettings() {\r\n\t\t\tdelete_option( 'Headup Widget Settings' );\r\n\t\t}",
"public function deleteSettings()\n {\n $endpoint = 'https://api.hubapi.com/extensions/ecomm/v1/settings';\n\n return $this->client->request('delete', $endpoint);\n }",
"public function deleted(Settings $Settings)\n {\n //code...\n }",
"private function unsetSettings() {\n $settingName = $this->getExtensionKey() . ':settings';\n\n CRM_Core_BAO_Setting::executeQuery(\"DELETE FROM civicrm_setting WHERE name = '{$settingName}'\");\n }",
"public function delete(Settings $settings)\n {\n $this->settingsDao->getEntityManager()->remove($settings);\n $this->settingsDao->getEntityManager()->flush();\n }",
"public function deleteAllSettings();",
"private function handleDeletedSettings()\n\t{\n\t\tforeach ($this->deletedSettings as $key => $setting) {\n\t\t\tif ($setting['just_user']) {\n\t\t\t\tif (($user = $this->guard->user()) !== null) {\n\t\t\t\t\t$this->settingValueModel->join(\n\t\t\t\t\t\t'settings',\n\t\t\t\t\t\t'setting_values.setting_id',\n\t\t\t\t\t\t'=',\n\t\t\t\t\t\t'settings.id'\n\t\t\t\t\t)->where('settings.name', '=', $setting['name'])->where(\n\t\t\t\t\t\t'settings.package',\n\t\t\t\t\t\t'=',\n\t\t\t\t\t\t$setting['package']\n\t\t\t\t\t)->where(\n\t\t\t\t\t\t'setting_values.user_id',\n\t\t\t\t\t\t'=',\n\t\t\t\t\t\t$user->getAuthIdentifier()\n\t\t\t\t\t)->delete();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settingEntry = $this->settingsModel->where('name', '=', $setting['name'])->where(\n\t\t\t\t\t'package',\n\t\t\t\t\t'=',\n\t\t\t\t\t$setting['package']\n\t\t\t\t)->first();\n\n\t\t\t\t$settingEntry->values()->delete();\n\t\t\t\t$settingEntry->delete();\n\t\t\t}\n\n\t\t\tunset($this->deletedSettings[$key]);\n\t\t}\n\t}",
"protected function _deleteSettingGroup()\n\t{\n\t\tif ( $this->request['id'] )\n\t\t{\n\t\t\t$conf = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_sys_conf_settings', 'where' => 'conf_group=' . $this->request['id'] ) );\n\t\t\n\t\t\t$count = intval($conf['count']);\n\t\t\t\n\t\t\tif ( $count > 0 )\n\t\t\t{\n\t\t\t\t$this->registry->output->global_message = $this->lang->words['s_cantremove'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->DB->delete( 'core_sys_settings_titles', 'conf_title_id=' . $this->request['id'] );\n\t\t\t\t\n\t\t\t\t$this->registry->output->global_message = $this->lang->words['s_removed'];\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\t$this->settingsRebuildCache();\n\t\t\n\t\t$this->_settingsOverview();\n\t}",
"function deleteSettings($objectId) {\n\t\treturn $this->update(\n\t\t\t'DELETE FROM object_for_review_settings WHERE object_id = ?', (int) $objectId\n\t\t);\n\t}",
"protected function deleteConfiguration(){\n Configuration::deleteByName($this->name.'_settings');\n }",
"function clearSettingsInDB()\n {\n execQuery('DELETE__PM_OFFLINE_CC_SETTINGS', array());\n }",
"public function removeSettings() {\n\t\t$resource = Mage::getSingleton('core/resource');\n\t\t$writeConnection = $resource->getConnection('core_write');\n\t\t$tablename = $resource->getTableName('core/config_data');\n\t\t\n\t\t$obsolete_ids = JH_RemoveRedundantConfig_Model_Observer::findSettings();\n\t\t$obsolete_ids_list = implode(', ', $obsolete_ids);\n\t\t\n\t\tif (!empty($obsolete_ids)) {\n\t\t$query = \"DELETE FROM \" . $tablename. \" where config_id IN (\". $obsolete_ids_list .\") \";\n\t\t$writeConnection->query($query);\t\t\n\t\tMage::log($obsolete_ids_list, null, 'removed_obsolete_config_ids.log');\n\t\t}\t\t\n\t}",
"function pmproio_deleteLevelSettings( $level_id ) {\r\n\t\r\n\t$settings = pmproio_getSettings( null );\r\n\t\r\n\t// Remove the settings for the specified level (when they exist)\r\n\tif ( ! empty( $settings[ $level_id ] ) ) {\r\n\t\t\r\n\t\tunset( $settings[ $level_id ] );\r\n\t\tupdate_option( 'pmproio_level_settings', $settings, 'no' );\r\n\t}\r\n}",
"function clearSettingsInDB()\n {\n global $application;\n $query = new DB_Delete('pm_all_inactive_settings');\n $application->db->getDB_Result($query);\n }",
"public static function delete() {\r\n\t\t// Settings values.\r\n\t\t// Update the value in settings.\r\n\t\t$deleted = delete_site_option( self::KEY );\r\n\r\n\t\tif ( $deleted ) {\r\n\t\t\t/**\r\n\t\t\t * Action hook to run after plugin settings has been deleted.\r\n\t\t\t *\r\n\t\t\t * @since 1.8.1\r\n\t\t\t */\r\n\t\t\tdo_action( 'wpmudev_vids_after_delete_settings' );\r\n\t\t}\r\n\r\n\t\treturn $deleted;\r\n\t}",
"public function wipe_settings() {\n\t\tif (false === ($updraftplus_admin = $this->_load_ud_admin())) return new WP_Error('no_updraftplus');\n\t\t\n\t\tif (!UpdraftPlus_Options::user_can_manage()) return new WP_Error('updraftplus_permission_denied');\n\n\t\t// pass false to this method so that it does not remove the UpdraftCentral key\n\t\t$response = $updraftplus_admin->wipe_settings(false);\n\n\t\treturn $response;\n\t}",
"function deleteSettings($tombstoneId) {\n\t\treturn $this->update(\n\t\t\t'DELETE FROM data_object_tombstone_settings WHERE tombstone_id = ?', (int) $tombstoneId\n\t\t);\n\t}",
"private function delete_deprecated_settings() {\n\t\t$this->delete( 'cpac_sorting_preference' );\n\t\t$this->delete( 'cpac_layouts' );\n\t\t$this->delete( 'cpac_layout_' );\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Confirm `wp_nav_menu()` and `Walker_Nav_Menu` passes an $args object to filters. `wp_nav_menu()` is unique in that it uses an $args object rather than an array. This has been the case for some time and should be maintained for reasons of backward compatibility. | function test_wp_nav_menu_filters_are_passed_args_object() {
$tag_id = self::factory()->tag->create();
$tag_insert = wp_update_nav_menu_item(
$this->menu_id,
0,
array(
'menu-item-type' => 'taxonomy',
'menu-item-object' => 'post_tag',
'menu-item-object-id' => $tag_id,
'menu-item-status' => 'publish',
)
);
/*
* The tests take place in a range of filters to ensure the passed
* arguments are an object.
*/
// In function.
add_filter( 'pre_wp_nav_menu', array( $this, '_confirm_second_param_args_object' ), 10, 2 );
add_filter( 'wp_nav_menu_objects', array( $this, '_confirm_second_param_args_object' ), 10, 2 );
add_filter( 'wp_nav_menu_items', array( $this, '_confirm_second_param_args_object' ), 10, 2 );
// In walker.
add_filter( 'nav_menu_item_args', array( $this, '_confirm_nav_menu_item_args_object' ) );
add_filter( 'nav_menu_css_class', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
add_filter( 'nav_menu_item_id', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
add_filter( 'nav_menu_link_attributes', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
add_filter( 'nav_menu_item_title', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
add_filter( 'walker_nav_menu_start_el', array( $this, '_confirm_forth_param_args_object' ), 10, 4 );
wp_nav_menu(
array(
'echo' => false,
'menu' => $this->menu_id,
)
);
wp_delete_term( $tag_id, 'post_tag' );
/*
* Remove test filters.
*/
// In function.
remove_filter( 'pre_wp_nav_menu', array( $this, '_confirm_second_param_args_object' ), 10, 2 );
remove_filter( 'wp_nav_menu_objects', array( $this, '_confirm_second_param_args_object' ), 10, 2 );
remove_filter( 'wp_nav_menu_items', array( $this, '_confirm_second_param_args_object' ), 10, 2 );
// In walker.
remove_filter( 'nav_menu_item_args', array( $this, '_confirm_nav_menu_item_args_object' ) );
remove_filter( 'nav_menu_css_class', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_item_id', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_link_attributes', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'nav_menu_item_title', array( $this, '_confirm_third_param_args_object' ), 10, 3 );
remove_filter( 'walker_nav_menu_start_el', array( $this, '_confirm_forth_param_args_object' ), 10, 4 );
} | [
"public function filter_wp_nav_menu_args($args)\n {\n }",
"function su_nav_menu_args( $args = '' ) {\n\n \t$args['container'] = false;\n\n \tif ( ! $args['items_wrap'] )\n \t\t$args['items_wrap'] = '<ul class=\"%2$s\">%3$s</ul>';\n\n \tif ( ! isset($args['show_dividers']) )\n \t\t$args['show_dividers'] = false;\n\n \tif ( ! $args['walker'] )\n \t$args['walker'] = new SU_Nav_Walker();\n\n \treturn $args;\n\n}",
"public function iconize_nav_menu_args( $args = array() ) {\n\t\t\n\t\t// We will use the same logic found in wp_nav_menu() function.\n\t\t\n\t\t// Get the nav menu based on the requested menu.\n\t\t$menu = wp_get_nav_menu_object( $args['menu'] );\n\t\n\t\t// Get the nav menu based on the theme_location.\n\t\tif ( ! $menu && $args['theme_location'] && ( $locations = get_nav_menu_locations() ) && isset( $locations[ $args['theme_location'] ] ) ) {\n\t\t\t\n\t\t\t$menu = wp_get_nav_menu_object( $locations[ $args['theme_location'] ] );\n\t\t}\n\t\n\t\t// Get the first menu that has items if we still can't find a menu.\n\t\tif ( ! $menu && ! $args['theme_location'] ) {\n\t\t\t\n\t\t\t$menus = wp_get_nav_menus();\n\t\t\t\n\t\t\tforeach ( $menus as $menu_maybe ) {\n\t\t\t\t\n\t\t\t\tif ( $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) {\n\t\t\t\t\t\n\t\t\t\t\t$menu = $menu_maybe;\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $menu && empty( $args['walker'] ) ) {\n\t\t\t\n\t\t\t$args['walker'] = new Iconize_Walker_Nav_Menu;\n\t\t}\n\t\t\n\t\treturn $args;\n\t}",
"function tmgts_wp_nav_menu_args( $args ) {\n $args[ 'walker' ] = new Tmgts_Nav_Menu();\n\n return $args;\n\n}",
"public function filter_wp_get_nav_menu_items($items, $menu, $args)\n {\n }",
"function xu_wp_nav_menu( array $args = [] ) {\n\t// Store echo value for later use.\n\t$echo = isset( $args['echo'] ) ? $args['echo'] : true;\n\n\t// Set echo argument to false so `wp_nav_menu` don't echo.\n\t$args['echo'] = false;\n\n\t// Get cached value.\n\t$value = xu_cache_get( 'wp_nav_menu', [$args], __FUNCTION__ );\n\n\t// Don't print anything if false.\n\tif ( $value === false ) {\n\t\treturn $value;\n\t}\n\n\t// Echo value if it should be echo.\n\tif ( $echo ) {\n\t\techo $value; // WPCS: xss ok\n\t} else {\n\t\treturn $value;\n\t}\n}",
"function prism_nav_menu_args() {\n\t$args = array (\n\t\t'theme_location'\t=> apply_filters('prism_primary_menu_id', 'primary-menu'),\n\t\t'container'\t\t\t=> 'nav',\n\t\t'container_class'\t=> 'menu',\n\t\t'menu_class'\t\t=> 'sf-menu cf',\n\t\t'fallback_cb'\t\t=> 'wp_page_menu',\n\t\t'echo'\t\t\t\t=> false\n\t);\n\t\n\treturn apply_filters('prism_nav_menu_args', $args);\n}",
"function wp_get_nav_menu_items($items, $menu, $args)\n {\n }",
"function modify_arguments($args){\r\n\t\t $nav_menus = (array)get_option('_st-menu-nav_use', '');\r\n if (in_array($args['theme_location'], $nav_menus) && ( $locations = get_nav_menu_locations() ) && isset( $locations[ $args['theme_location'] ] )) {\r\n $walker = apply_filters(\"st_mega_menu_walker\", \"st_responsive_mega_menu\");\r\n // Call Custom Menu Walker\r\n $args['walker'] = new $walker();\r\n\t\t\t\t$args['menu_id'] \t\t = 'megaST';\r\n \t\t$args['container_id'] \t = 'megaMenu';\r\n $args['menu_class'] = 'main-menu';\r\n }\r\n\t\t\treturn $args;\r\n\t\t}",
"function bnd_nav_menu_args( $args ) {\n $args['container_class'] = 'navmenu';\n return $args;\n}",
"function themify_theme_menu_nav($args=array()){\n\tthemify_menu_nav($args);\n }",
"function snap_wp_page_menu_args( $args ) {\n\t$args['menu_class'] = $args['menu_class'] . ' menu-navigation-container';\n\treturn $args;\n}",
"function prism_page_menu_args() {\n\t$args = array (\n\t\t'menu_class' => 'menu cf',\n\t\t'echo' => FALSE,\n\t);\n\treturn apply_filters('prism_page_menu_args', $args);\n}",
"function fix_no_menu_warning( $args ) {\n\t\tif ( get_class( $args['walker'] ) == 'WFIM_Walker_Nav_Menu_With_Icon' )\n\t\t\t$args['walker'] = null;\n\n\t\treturn $args;\n\t}",
"function tve_menu_walker( $args ) {\n\t$args['walker'] = new TCB_Menu_Walker();\n\n\treturn $args;\n}",
"public function filter_wp_get_nav_menu_object($menu_obj, $menu_id)\n {\n }",
"public function archive_menu_filter( $items, $menu, $args )\n {\n foreach ( $items as &$item )\n {\n // Only make the wp_setup_nav_menu_item() call for archive items.\n if ( $item->type == 'custom' && in_array( 'type-archive', $item->classes ) )\n $item = $this->setup_archive_item( $item );\n }\n return $items;\n }",
"function white_custom_nav_items( $items, $menu, $args ) {\r\n\tif ( is_admin() ) {\r\n\t\treturn $items;\r\n\t}\r\n\tforeach ( $items as $item ) {\r\n\t\tif ( isset( $_GET[\"source\"] ) && ! empty( $_GET[\"source\"] ) ) {\r\n\t\t\t$lp_param = 'source';\r\n\t\t\t$lp = filter_input( INPUT_GET, 'source', FILTER_SANITIZE_STRING );\r\n\t\t\t$item->url = add_query_arg( $lp_param, $lp, $item->url );\r\n\t\t}\r\n\t}\r\n\r\n\treturn $items;\r\n}",
"public function filter_wp_get_nav_menu_object($menu_obj, $menu_id)\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Plugin Name: Top First Commentors Plugin URI: Description: The plugin will show the top first commentors (the numner is number is set by user) of your blog. Version: 0.1 Author: Denis Author URI: | function update_top_first_commentors(){
global $wpdb;
$top_first_commentors_options = get_option("top_first_commentors");
$first_commentors = array();
$q = "SELECT DISTINCT comment_post_id FROM $wpdb->comments WHERE comment_type ='' AND comment_approved = '1'";
$have_comment_post_ids = $wpdb->get_results($q);
foreach ($have_comment_post_ids as $have_comment_post_id){
$q = "SELECT comment_author,user_id FROM $wpdb->comments WHERE comment_type ='' AND comment_approved = '1' AND comment_post_id = $have_comment_post_id->comment_post_id order by comment_date limit 1";
$first_comment = $wpdb->get_results($q);
$top_first_commentors_exclude = $top_first_commentors_options["exclude"];
if(!$top_first_commentors_exclude){
array_push($first_commentors,$first_comment[0] -> comment_author);
}else{
$top_first_commentors_exclude = explode(",",$top_first_commentors_exclude);
if(!in_array($first_comment[0] -> user_id,$top_first_commentors_exclude)){
array_push($first_commentors,$first_comment[0] -> comment_author);
}
}
}
$first_commentors = (array_count_values ($first_commentors));
arsort($first_commentors);
$first_commentors_author = array_keys($first_commentors);
$top_first_commentors = array();
$top_first_commentors_number = $top_first_commentors_options["number"];
if(!$top_first_commentors_number) $top_first_commentors_number = 3;
$top_first_commentors_titles = $top_first_commentors_options["titles"];
if($top_first_commentors_titles)
$top_first_commentors_titles = explode(",",$top_first_commentors_titles);
for($i=0; $i<$top_first_commentors_number; $i++){
$q = "SELECT comment_author_url FROM $wpdb->comments WHERE comment_type ='' AND user_id = 0 AND comment_approved = '1' AND comment_author_url !='' AND comment_author = '$first_commentors_author[$i]' limit 1";
$first_comment_url = $wpdb->get_results($q);
$top_first_commentors_title = $top_first_commentors_titles[$i];
if($top_first_commentors_title) $top_first_commentors_title .= " : ";
if($first_comment_url){
$top_first_commentors[$i] = $top_first_commentors_title . '<a href="' . $first_comment_url[0] -> comment_author_url . '" title="' . $first_commentors_author[$i].'">' . $first_commentors_author[$i] . '</a>(' . $first_commentors["$first_commentors_author[$i]"].')';
} else {
$top_first_commentors[$i] = $top_first_commentors_titles[$i] .$first_commentors_author[$i] . '('.$first_commentors["$first_commentors_author[$i]"] . ')';
}
}
wp_cache_set("top_first_commentors", $top_first_commentors, "tfc", 36000);
return $top_first_commentors;
} | [
"public function topUsersCommentAction()\n { \n $all = $this->vusers->query()\n ->orderBy('comments DESC')\n ->limit('5')\n ->execute();\n \n $this->views->add('users/usersfront', [\n 'title' => 'Frågar mest',\n 'users' => $all,\n ], 'sidebar');\n }",
"function _show_most_commented($params = array()) {\n\t\tif (!empty($_GET[\"id\"])) {\n\t\t\t$_GET[\"page\"] = intval($_GET[\"id\"]);\n\t\t\tunset($_GET[\"id\"]);\n\t\t}\n\t\t// Get most commented posts\n\t\t$sql = \"SELECT \n\t\t\t\tc.object_id AS post_id,\n\t\t\t\tb.user_id,\n\t\t\t\tb.add_date AS post_date,\n\t\t\t\tb.privacy,\n\t\t\t\tb.allow_comments,\n\t\t\t\tb.title AS post_title, \n\t\t\t\tb.num_reads, \n\t\t\t\tCOUNT(c.id) AS num_comments,\n\t\t\t\tSUBSTRING(b.text FROM 1 FOR \".intval(module('blog')->POST_TEXT_PREVIEW_LENGTH).\") AS post_text \n\t\t\tFROM \".db('comments').\" AS c,\n\t\t\t\t\".db('blog_posts').\" AS b \n\t\t\tWHERE c.object_name='\"._es('blog').\"' \n\t\t\t\tAND b.active=1 \n\t\t\t\tAND b.id=c.object_id \n\t\t\t\tAND b.privacy NOT IN(9)\n\t\t\t\tAND b.allow_comments NOT IN(9)\n\t\t\tGROUP BY c.object_id \n\t\t\t\";\n\t\t// Geo filter\n\t\tif (module('blog')->ALLOW_GEO_FILTERING && GEO_LIMIT_COUNTRY != \"GEO_LIMIT_COUNTRY\" && GEO_LIMIT_COUNTRY != \"\") {\n\t\t\t$sql .= \" HAVING b.user_id IN (SELECT id FROM \".db('user').\" WHERE country = '\"._es(GEO_LIMIT_COUNTRY).\"') \";\n\t\t}\n\t\t$order_by_sql = \" ORDER BY num_comments DESC\";\n\t\t// Prepare pager\n\t\t$path = \"./?object=\".'blog'.\"&action=\".$_GET[\"action\"];\n\t\t$GLOBALS['PROJECT_CONF'][\"divide_pages\"][\"SQL_COUNT_REWRITE\"] = false;\n\t\tlist($add_sql, $pages, $total, $counter) = common()->divide_pages($sql, $path, null, module('blog')->STATS_NUM_MOST_COMMENTED * module('blog')->FROM_DB_MULTIPLY);\n\t\t// Get from db\n\t\t$Q = db()->query($sql. $order_by_sql. $add_sql);\n\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t$blog_comments_ids[$A[\"post_id\"]] = $A;\n\t\t\t$users_ids[$A[\"user_id\"]] = $A[\"user_id\"];\n\t\t}\n\t\tunset($users_ids[\"\"]);\n\t\t// Get users infos and settings\n\t\tif (!empty($users_ids))\t{\n\t\t\t$this->_users_infos = user($users_ids, array(\"id\",\"name\",\"nick\",\"profile_url\",\"photo_verified\"), array(\"WHERE\" => array(\"active\" => 1)));\n\t\t\t$this->_users_blog_settings = module('blog')->_get_blog_settings_for_user_ids($users_ids);\n\t\t}\n\t\t$posts_ids = array_keys($blog_comments_ids);\n\t\tif (!empty($posts_ids)) {\n\t\t\t$this->_num_comments = module('blog')->_get_num_comments(implode(\",\",$posts_ids));\n\t\t}\n\t\t// Process most commented posts\n\t\t$most_commented_posts\t= $this->_process_stats_item($blog_comments_ids, $counter, module('blog')->STATS_NUM_MOST_COMMENTED, $params);\n\n\t\t// For widgets\n\t\tif ($params[\"for_widgets\"]) {\n\t\t\t// Process main template\n\t\t\t$replace = array(\n\t\t\t\t\"most_commented_posts\"\t=> $most_commented_posts,\n\t\t\t);\n\t\t\treturn tpl()->parse('blog'.\"/widget_most_commented\", $replace);\n\t\t}\n\n\t\t// Process main template\n\t\t$replace = array(\n\t\t\t\"is_logged_in\"\t\t\t=> intval((bool) main()->USER_ID),\n\t\t\t\"show_own_posts_link\"\t=> main()->USER_ID ? \"./?object=\".'blog'.\"&action=show_posts\"._add_get(array(\"page\")) : \"\",\n\t\t\t\"change_settings_link\"\t=> main()->USER_ID ? \"./?object=\".'blog'.\"&action=settings\"._add_get(array(\"page\")) : \"\",\n\t\t\t\"all_blogs_link\"\t\t=> \"./?object=\".'blog'.\"&action=show_all_blogs\"._add_get(array(\"page\")),\n\t\t\t\"most_commented_posts\"\t=> $most_commented_posts,\n\t\t\t\"pages\"\t\t\t\t\t=> $pages,\n\t\t\t\"total\"\t\t\t\t\t=> intval($total),\n\t\t);\n\t\treturn tpl()->parse('blog'.\"/most_commented_main\", $replace);\n\t}",
"function wp_dashboard_recent_comments_control() {}",
"function top_comment_authors($amount = 5){\n\t global $wpdb;\n\t $results = $wpdb->get_results('\n\t SELECT\n\t COUNT(comment_author_email) AS comments_count, comment_author_email, comment_author, comment_author_url\n\t FROM\n\t '.$wpdb->comments.'\n\t WHERE\n\t comment_author_email != \"\" AND comment_type = \"\" AND comment_approved = 1\n\t GROUP BY\n\t comment_author_email\n\t ORDER BY\n\t comments_count DESC, comment_author ASC\n\t LIMIT '.$amount\n\t );\n\t $output = \"<ul>\";\n\t foreach($results as $result){\n\t $output .= \"<li>\".$result->comment_author.\"</li>\";\n\t }\n\t $output .= \"</ul>\";\n\t echo $output;\n\t}",
"function p2_recent_comments()\r\n{\r\n\r\n\t$comments = get_comments(array(\r\n\t\t'number' => 5,\r\n\t\t'status' => 'approve'\r\n\t));\r\n\t\r\n\tif ( count($comments) > 0 )\r\n\t{\r\n?>\r\n\t<ul>\r\n\t\r\n<?php foreach ( $comments as $comment ): ?>\r\n\t\t<li><?php echo $comment->comment_author ?> on <a href=\"<?php echo get_permalink($comment->comment_post_ID) ?>\"><?php echo get_the_title($comment->comment_post_ID) ?></a></li>\r\n<?php endforeach; ?>\r\n\t\r\n\t</ul>\r\n<?php\r\n\t\r\n\t}\r\n\telse\r\n\t{\r\n?>\r\n\t<p>No comments yet.</p>\r\n<?php\r\n\t}\r\n\r\n}",
"function hmn_cp_the_sorted_comments( array $args ) {\n\n\tif ( class_exists( 'CommentPopularity\\HMN_Comment_Popularity' ) ) {\n\n\t\t$hmn_cp_obj = CommentPopularity\\HMN_Comment_Popularity::get_instance();\n\n\t\tglobal $post;\n\n\t\tif ( ! array_key_exists( 'post_id', $args ) ) {\n\t\t\t$args['post_id'] = $post->ID;\n\t\t}\n\n\t\tif ( ! array_key_exists( 'callback', $args ) ) {\n\t\t\t$args['callback'] = array( $hmn_cp_obj, 'comment_callback' );\n\t\t}\n\n\t\techo $hmn_cp_obj->get_comments_sorted_by_weight( true, $args );\n\n\t}\n\n}",
"function mypassion_most_commented($comment_posts = 5 , $avatar_size = 60){\r\n$comments = get_comments('status=approve&number='.$comment_posts);\r\nforeach ($comments as $comment) { ?>\r\n\t<li>\r\n\t\t<!--<div class=\"post-thumbnail\">\r\n\t\t\t< ?php echo get_avatar( $comment, $avatar_size ); ?>\r\n\t\t</div>-->\r\n\t\t<a href=\"<?php echo get_permalink($comment->comment_post_ID ); ?>#comment-<?php echo esc_html($comment->comment_ID); ?>\" class=\"title\"><strong>\r\n\t\t<?php echo strip_tags($comment->comment_author); ?>:</strong> <?php echo wp_html_excerpt( $comment->comment_content, 60 ); ?>... </a>\r\n\t</li>\r\n<?php } \r\n}",
"function _eduglu_top_contributors($space) {\n\n // Top 20 commenters\n $result = db_query(\"\n SELECT uid, count(*) as count\n FROM {comments} c\n JOIN {og_ancestry} o\n WHERE c.nid = o.nid\n AND o.group_nid = %d\n AND timestamp > %d\n GROUP BY c.uid\n ORDER BY count(*) DESC\n LIMIT 100\", $space->id, time() - SIX_MONTHS_UNIX);\n\n $top_commenters = array();\n while ($data = db_fetch_array($result)) {\n $top_commenters[$data['uid']] = $data['count'];\n }\n\n // Top 20 posters\n $result = db_query(\"\n SELECT uid, count(*) as count\n FROM {node} n\n JOIN {og_ancestry} o \n WHERE n.nid = o.nid \n AND o.group_nid = %d\n AND created > %d\n GROUP BY n.uid \n ORDER BY count(*) DESC \n LIMIT 100\", $space->id, time() - SIX_MONTHS_UNIX);\n \n $top_posters = array();\n while ($data = db_fetch_array($result)) {\n $top_posters[$data['uid']] = $data['count'];\n } \n \n // Return if empty.\n if (empty($top_posters)) {\n return;\n }\n \n // Merge the two adding up the posts + comments count.\n $top_contributors = array();\n $uids = array_merge(array_keys($top_commenters), array_keys($top_posters));\n foreach($uids as $uid) {\n $top_contributors[$uid] = $top_commenters[$uid] + $top_posters[$uid];\n }\n \n // Sort by #, reverse order, and slice.\n asort($top_contributors);\n $top_contributors = array_reverse($top_contributors, TRUE);\n $top_contributors = array_slice($top_contributors, 0, 5, TRUE);\n\n $output = theme('eduglu_about_top_contributor_box', $top_contributors, $top_posters, $top_commenters);\n\n return $output;\n}",
"function charity_abovecommentslist() {\n do_action('charity_abovecommentslist');\n}",
"function print_top_content() {\r\r\n \r\r\n echo print_top_posts();\r\r\n \r\r\n}",
"function wp_paginate_comments($args = false) {\n\tglobal $wp_paginate;\n\t$wp_paginate->type = 'comments';\n\treturn $wp_paginate->paginate($args);\n}",
"function the_comments_pagination( $args = array() ) {\n\techo get_the_comments_pagination( $args );\n}",
"function beans_comment_author() {\n\n\techo beans_open_markup( 'beans_comment_title', 'div', array(\n\t\t'class' => 'uk-comment-title',\n\t\t'itemprop' => 'creator',\n\t\t'itemscope' => 'itemscope',\n\t\t'itemtype' => 'http://schema.org/Person'\n\t) );\n\n\t\techo get_comment_author_link();\n\n\techo beans_close_markup( 'beans_comment_title', 'div' );\n\n}",
"function onourmoon_loar_recent_comments_widget() {\n register_widget( 'OnourMoon_Recent_Comments' );\n}",
"function xchildthemex_comments_area_title_text() {\n\t return __(comments_number( '<h3>No Comments</h3>', '<h3>1 Comment</h3>', '<h3>% Comments</h3>' ), 'genesis' );\n}",
"function dp_recent_comments($no_comments = 10, $comment_len = 75) { \n global $wpdb; \n\t\n\t$request = \"SELECT * FROM $wpdb->comments\";\n\t$request .= \" JOIN $wpdb->posts ON ID = comment_post_ID\";\n\t$request .= \" WHERE comment_approved = '1' AND post_status = 'publish' AND post_password ='' AND comment_type = ''\"; \n\t$request .= \" ORDER BY comment_date DESC LIMIT $no_comments\"; \n\t\t\n\t$comments = $wpdb->get_results($request);\n\t\t\n\tif ($comments) { \n\t\tforeach ($comments as $comment) { \n\t\t\tob_start();\n\t\t\t?>\n\t\t\t\t<li>\n\t\t\t\t\t <?php echo get_avatar($comment,$size='40' ); ?> \n\t\t\t\t\t<a href=\"<?php echo get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID; ?>\"><?php echo dp_get_author($comment); ?>:</a>\n\t\t\t\t\t<?php echo strip_tags(substr(apply_filters('get_comment_text', $comment->comment_content), 0, $comment_len)); ?>\n \t\t\t\t</li>\n\t\t\t<?php\n\t\t\tob_end_flush();\n\t\t} \n\t} else { \n\t\techo \"<li>No comments</li>\";\n\t}\n}",
"function wct_comments_before_comment_title() {\n\techo wct_comments_get_before_comment_title();\n}",
"public function widget_Posters()\n {\n global $db, $lang, $mybb, $templates, $theme, $topStats;\n\n\t\t$tpl['ignore_groups'] = '';\n\t\t\n\t\tif(!empty($mybb->settings['topStats_IgnoreGroups_Posters']))\n\t\t{\n\t\t\t$tpl['ignore_groups'] = \" AND usergroup NOT IN ({$mybb->settings['topStats_IgnoreGroups_Posters']})\";\n\t\t}\t\t\n\t\t\n\t\t$lang->topStats_topPosters = $lang->sprintf($lang->topStats_topPosters, (int)$this->getConfig('Limit_Posters'));\n\t\t\n $tpl['row'] = '';\n \n $sql = \"SELECT username, usergroup, displaygroup, postnum, uid, avatar, avatardimensions\n FROM \".TABLE_PREFIX.\"users \n\t\t\t\tWHERE uid != '' \". $tpl['ignore_groups'] . \"\n ORDER BY postnum DESC \n LIMIT \".(int)$this->getConfig('Limit_Posters').\"\";\n $result = $db->query($sql);\n while ($row = $db->fetch_array($result))\n {\n $tpl['username'] = format_name($row['username'], $row['usergroup'], $row['displaygroup']);\n \t\t$tpl['profilelink'] = build_profile_link($tpl['username'], $row['uid']);\n \t\t$tpl['postnum'] = my_number_format($row['postnum']);\n $useravatar = format_avatar(htmlspecialchars_uni($row['avatar']), $row['avatardimensions'], my_strtolower($this->getConfig('AvatarWidth')));\n (!$this->getConfig('Status_Avatar')) ? '' : eval(\"\\$tpl['avatar'] = \\\"\".$templates->get(\"topStats_PostersAvatar\").\"\\\";\"); \n eval(\"\\$tpl['row'] .= \\\"\" . $templates->get(\"topStats_PostersRow\") . \"\\\";\");\n }\n eval(\"\\$topStats['Posters'] = \\\"\" . $templates->get(\"topStats_Posters\") . \"\\\";\");\n }",
"function get_mostcommented($limit = 5) {\n global $wpdb, $post, $tableposts, $tablecomments, $time_difference, $post;\n $mostcommenteds = $wpdb->get_results(\"SELECT $tableposts.ID as ID, post_title, post_name, COUNT($tablecomments.comment_post_ID) AS 'comment_total' FROM $tableposts LEFT JOIN $tablecomments ON $tableposts.ID = $tablecomments.comment_post_ID WHERE comment_approved = '1' AND post_date < '\".date(\"Y-m-d H:i:s\", (time() + ($time_difference * 3600))).\"' AND post_status = 'publish' AND post_password = '' GROUP BY $tablecomments.comment_post_ID ORDER BY comment_total DESC LIMIT $limit\");\n foreach ($mostcommenteds as $post) {\n\t\t\t$post_id = (int) $post->post_id;\n\t\t\t$post_title = htmlspecialchars(stripslashes($post->post_title));\n\t\t\t$comment_total = (int) $post->comment_total;\n $permalink = get_permalink($post->ID);\n\t\t\techo \"+ <a href=\\\"$permalink\\\">$post_title</a> ($comment_total)<br />\";\n }\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fc_openwindow(): popup $window here and now: | function fc_openwindow( $window, $parameters = array(), $options = array() ) {
if( is_string( $parameters ) )
$parameters = parameters_explode( $parameters );
$parameters['context'] = 'js';
open_javascript( preg_replace( '/&/', '&', fc_link( $window, $parameters, $options ) ) );
} | [
"function newt_open_window($left, $top, $width, $height, $title = NULL)\n{\n}",
"protected function openInNewWindow() {}",
"public function popupEvent()\n {\n return \"window.open(this.href, 'social', 'width:640,height:320,resizable:yes,toolbar:no');return false;\";\n }",
"public function linkOpenInNewWindow();",
"Function Show_popup($str_pages, $str_pagename, $int_height = FALSE, $int_width = FALSE, $str_options = FALSE) {\r\n echo \"<SCRIPT LANGUAGE='JavaScript'>\r\n \twindow.open('$str_pages','$str_pagename','height=$int_height,width=$int_width, ,$str_options');\r\n \t </SCRIPT>\";\r\n}",
"function atkPopup($target,$params,$winName,$width,$height,$scroll='no',$resize='no')\n{\n\t$url = session_url(\"include.php?file=\".$target.\"&\".$params, SESSION_NESTED);\n\t$popupurl =\"javascript:NewWindow('\".$url.\"','\".$winName.\"',\".$height.\",\".$width.\",'\".$scroll.\"','\".$resize.\"')\";\n\treturn $popupurl;\n}",
"public function popupAction()\n\t{\n\t}",
"function parse_addpopupcode() {\n echo \"if (event && event.preventDefault) event.preventDefault();\";\n echo \"winbm=window.open(this.href,'nucleusbm','scrollbars=yes,width=600,height=500,left=10,top=10,status=yes,resizable=yes');\";\n echo \"winbm.focus();return false;\";\n }",
"function getWinPopupJS() {\n\t\t$getParam = array(\n\t\t'action'=> 'popView',\n\t\t'gallery'=> $this->currentGalleryID,\n\t\t'resultPage' => $this->resultPage,\n\t\t'idx' => $this->currentImgID\n\t\t);\n\n\t\t$imagePath = $this->imageAt( $this->currentGalleryID, $this->currentImgID);\n\t\t$imgDim = tx_bahag_photogallery_graphics::getImgDimensions( $imagePath);\n\t\t$imgDim['height'] = $imgDim['height'] + 95;\n\t\t$imgDim['width'] = $imgDim['width'] + 40;\n\t\t$JS = 'window.open(\\''.$this->getUrl( $GLOBALS['TSFE']->id, $getParam).'\\',\\'name\\',\\'height='.$imgDim['height'].',width='.$imgDim['width'].', resizable=1,scrollbars=1\\'); return false;';\n\n\t\treturn$JS;\n\t}",
"function popup($link,$target='_blank',$width=750,$height=410)\n \t{\n\t\treturn 'egw_openWindowCentered2('.($link == 'this.href' ? $link : \"'\".$link.\"'\").','.\n\t\t\t($target == 'this.target' ? $target : \"'\".$target.\"'\").\",$width,$height,'yes')\";\n \t}",
"function popupwin($echostr)\n{\n\techo(\"<html><head>\");\n\techo(\"<script language=\\\"javascript\\\">\");\n\techo(\"function pop(){\");\n\techo(\"if(document.bmsform.hiddenValuesFromBMS){\");\n\techo(\"var theURL=document.bmsform.hiddenValuesFromBMS.value;\");\n\techo(\"if(theURL.length>0){\");\n\techo(\"var str=theURL.split(\\\",\\\");\");\n\techo(\"for(var i=0;i<str.length;i++){\");\n\techo(\"if(str[i]!=\\\"\\\"){\");\n\techo(\"flist=str[i].split(\\\"#\\\");\");\n\techo(\"var respstr;\");\n\techo(\"if(flist[1]){respstr=\\\"ScreenX=\\\"+flist[1];}\");\n\techo(\"if(flist[2]){\");\n\techo(\"if(respstr){ respstr=respstr+\\\",ScreenY=\\\"+flist[2];}\");\n\techo(\"{respstr=\\\"ScreenY=\\\"+flist[2];} }\");\n\techo(\"if(flist[3]){ if(respstr) { respstr=respstr+\\\",left=\\\"+flist[3]; }\");\n\techo(\"else { respstr=\\\"left=\\\"+flist[3];} }\");\n\techo(\"if(flist[4]) {if(respstr){ respstr=respstr+\\\", height=\\\"+flist[4];} else { respstr=\\\"height=\\\"+flist[4];} }\");\n\techo(\"if(flist[5]) {if(respstr){ respstr=respstr+\\\",Width=\\\"+flist[5];} else { respstr=\\\"width=\\\"+flist[5];}}\");\n\techo(\"if(flist[6]=='PopUp'){ ow(flist[0],i,respstr);}else { owunder(flist[0],i,respstr);}}\");\n\techo(\" } } } }\");\n\techo(\"</script></head>\");\n\techo(\"<body onload=\\\"pop();\\\">\");\n\techo(\"<script language=\\\"javascript\\\">\");\n\techo(\"function ow(theURL,winName,features){ window.open(theURL,winName,features); }\");\n\techo(\"function owunder(theURL,winName,features)\n\t { \n\t\t\tvar win2; \n\t\t\twin2=window.open(theURL,winName,features); \n\t\t\tif(win2)\n\t\t\t{\n\t\t\t\twin2.blur(); \n\t\t\t\twindow.focus();\n\t\t\t}\n\t\t}\");\n\techo(\"</script>\");\n\techo(\"<form name=\\\"bmsform\\\"><input type=\\\"hidden\\\" name=\\\"hiddenValuesFromBMS\\\" value=\\\"$echostr\\\"></form>\");\n\techo(\"</body></html>\");\n }",
"function js_initialOpenInfoWindow() {\n\t\t$markers = reset($this->markers);\n\t\tif (count($markers) == 1 && $this->showInfoOnLoad) {\n\t\t\treturn 'window.setTimeout(function() { GEvent.trigger(WecMap.markers[\"'. $this->mapName .'\"][0][0], \"click\");}, 1000);';\n\t\t}\n\t}",
"function JSpopup($wdth=500,$hght=400,$nmtarget=\"Intlpopup\",$DirEcho=true) {\nglobal $HTTP_HOST;\n$HostName=($HTTP_HOST==\"\" ? $_SERVER[\"HTTP_HOST\"] : $HTTP_HOST); // because diff�entes versions\n// on change le nom de target des popups internet (externes) pour ne pas foutre la merde dans les popups ouvertes sur l'intranet\n$nmtarget=(strstr($HostName,\"haras-nationaux.fr\")!=false ? \"Ext\".$nmtarget : $nmtarget);\n$ret='\n<script type=\"text/javascript\">\n\t/*<![CDATA[*/\n<!--\n// ouverture d\\'une Popup\nvar oPopupWin; // stockage du handle de la popup\nfunction popup(page, width, height) {\n NavVer=navigator.appVersion;\n\tHostName=\\''.$HostName.'\\' // sert au debogage;\n NavVer=navigator.appVersion;\n if (NavVer.indexOf(\\'MSIE 5.5\\',0) >0 ) {\n var undefined;\n undefined=\\'\\';\n }\n closepop();\n if (width==undefined)\n width='.$wdth.';\n if (height==undefined)\n height='.$hght.';\n oPopupWin = window.open(page, \\''.$nmtarget.'\\', \"alwaysRaised=1,dependent=1,height=\" + height + \",location=0,menubar=0,personalbar=0,scrollbars=1,status=0,toolbar=0,width=\" + width + \",resizable=1\");\n\toPopupWin.focus();\n\t// valeur de retour diff�ente suivant navigateur (merdique a souhait) !!!\n\tvar bAgent = window.navigator.userAgent;\n\tvar bAppName = window.navigator.appName;\n\tif ((bAppName.indexOf(\"Explorer\") >= 0) && (bAgent.indexOf(\"Mozilla/3\") >= 0) && (bAgent.indexOf(\"Mac\") >= 0))\n\t\treturn true; // dont follow link\n\telse return false; // dont follow link\n\t//return !oPopupWin;\n\n}\nfunction closepop() {\n if (oPopupWin) {\n var tmp;\n // Make sure oPopupWin is empty before\n // calling .close() or we could throw an\n // exception and never set it to null.\n tmp = oPopupWin;\n oPopupWin = null;\n // Only works in IE... Netscape crashes\n // if you have previously closed it by hand\n tmp.close();\n //if (navigator.appName != \"Netscape\") tmp.close();\n }\n\n}\n// -->\n\t/*]]>*/\n</script>\n';\nif ($DirEcho) {\n\techo $ret;\n} else return $ret;\n}",
"function debug_open_window()\n{\n static $window_opened = FALSE;\n if(!$window_opened)\n {\n ?>\n <script type=text/javascript>\n debugWindow = window.open(\"\",\"debugWin\",\"toolbar=no,scrollbars,width=600,height=400\");\n debugWindow.document.writeln('<html>');\n debugWindow.document.writeln('<head>');\n debugWindow.document.writeln('<title>Advantis Debug Info</title>');\n debugWindow.document.writeln('</head>');\n debugWindow.document.writeln('<body style=\"font-size:xx-small;\"><font face=\"verdana,arial\">');\n debugWindow.document.writeln('<hr size=1 width=\"100%\">');\n </script>\n <?\n $window_opened = TRUE;\n }\n}",
"public function getDeliveryWindow();",
"public function openPopUp($url, $width, $height, $scroll, $label){\t\t\n\t\treturn \"<a href=\\\"#\\\" onClick=\\\"window.open('$url','genid','width=\".$width.\", height=\".$height.\", location=no, menubar=no, status=no, toolbar=no, scrollbars=\".$scroll.\", resizable=no');\\\">\".$label.\"</a>\";\t\n\t}",
"function g1_socials_twitter_new_window_js( $url ) {\n\t$name = _x( 'Twitter', 'Twitter Popup Window', 'g1_socials' );\n\t$width = 600;\n\t$height = 350;\n\n\t$js = sprintf( \"window.open('%s', '%s', 'width=%d,height=%d,left='+(screen.availWidth/2-%d)+',top='+(screen.availHeight/2-%d)+''); return false;\", $url, $name, $width, $height, $width / 2, $height / 2 );\n\n\treturn $js;\n}",
"public function openWindow($url, $windowID) {\n\t\techo $this->getRow('openWindow', $url, $windowID);\n\t}",
"function fc_window_defaults( $name ) {\n global $readonly, $login_dienst, $large_window_options, $small_window_options;\n $parameters = array();\n $options = $large_window_options;\n // echo \"fc_window_defaults: $name<br>\";\n switch( strtolower( $name ) ) {\n //\n // self: display in same window:\n //\n case 'self':\n $parameters['window'] = $GLOBALS['window'];\n $parameters['window_id'] = $GLOBALS['window_id'];\n break;\n //\n // Anzeige im Hauptfenster (aus dem Hauptmenue) oder in \"grossem\" Fenster moeglich:\n //\n case 'menu':\n case 'index':\n $parameters['window'] = 'menu';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Beenden';\n $parameters['title'] = 'zurück zum Hauptmenü';\n $options = $large_window_options;\n break;\n case 'wiki':\n $parameters['window'] = 'wiki';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Doku-Wiki';\n $parameters['title'] = 'zum Doku-Wiki';\n $options = $large_window_options;\n break;\n case 'meinkonto':\n $parameters['window'] = 'gruppenkonto';\n $parameters['window_id'] = 'main';\n $parameters['meinkonto'] = '1';\n $parameters['text'] = 'mein Konto';\n $parameters['title'] = 'zum Kontoblatt der Gruppe...';\n $parameters['class'] = 'cash';\n $options = $large_window_options;\n break;\n case 'bestellungen':\n $parameters['window'] = 'bestellungen';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'alle Bestellungen';\n $parameters['title'] = 'Tabelle aller Bestellungen...';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n case 'bestellen':\n $parameters['window'] = 'bestellen';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Bestellen';\n $parameters['title'] = 'zum Bestellformular...';\n $options = $large_window_options;\n break;\n case 'bilanz':\n $parameters['window'] = 'bilanz';\n $parameters['window_id'] = 'bilanz';\n $parameters['text'] = 'Bilanz';\n $parameters['class'] = 'chart';\n $parameters['title'] = 'zur Übersicht über die Finanzen der Foodcoop...';\n $options = $large_window_options;\n break;\n case 'produkte':\n $parameters['window'] = 'produkte';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Produkte';\n $parameters['class'] = 'browse';\n $parameters['title'] = 'zur Produktdatenbank der Foodsoft...';\n $options = $large_window_options;\n break;\n case 'gruppen':\n $parameters['window'] = 'gruppen';\n $parameters['window_id'] = 'gruppen';\n $parameters['text'] = 'Gruppen';\n $parameters['class'] = 'browse';\n $parameters['title'] = 'zur Liste der Bestellgruppen...';\n $options = $large_window_options;\n break;\n case 'lieferanten':\n $parameters['window'] = 'lieferanten';\n $parameters['window_id'] = 'lieferanten';\n $parameters['text'] = 'Lieferanten';\n $parameters['class'] = 'browse';\n $parameters['title'] = 'zur Liste aller Lieferanten...';\n $options = $large_window_options;\n break;\n case 'basar':\n $parameters['window'] = 'basar';\n $parameters['window_id'] = 'basar';\n $parameters['text'] = \"Basar\";\n $parameters['title'] = \"zur Basarübersicht...\";\n $parameters['class'] = 'browse';\n $options = array_merge( $large_window_options, array( 'width' => 1200 ) );\n break;\n case 'dienstkontrollblatt':\n $parameters['window'] = 'dienstkontrollblatt';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Dienstkontrollblatt';\n $parameters['title'] = 'zur Anzeige des Dienstkontrollblatts...';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n case 'updownload':\n $parameters['window'] = 'updownload';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Up/Download';\n $parameters['title'] = 'zum Upload / Download der Datenbank...';\n $options = $large_window_options;\n break;\n case 'dienstplan':\n $parameters['window'] = 'dienstplan';\n $parameters['window_id'] = 'main';\n $parameters['text'] = 'Dienstplan';\n $parameters['title'] = 'zum Dienstplan...';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n //\n // \"grosse\" Fenster:\n //\n case 'abrechnung':\n $parameters['window'] = 'abrechnung';\n $parameters['window_id'] = 'abrechnung';\n $parameters['text'] = 'Abrechnung';\n $parameters['title'] = 'zur Übersichtsseite Abrechnung...';\n $parameters['class'] = 'record';\n $options = array_merge( $large_window_options, array( 'width' => 860, 'height' => 720 ) );\n break;\n case 'bestellschein':\n case 'lieferschein':\n $parameters['window'] = 'bestellschein';\n $parameters['window_id'] = 'bestellschein';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n case 'bestellfax':\n $parameters['window'] = 'bestellfax';\n $parameters['window_id'] = 'bestellschein';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n case 'gesamtlieferschein':\n $parameters['window'] = 'gesamtlieferschein';\n $parameters['window_id'] = 'bestellschein';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n case 'gruppenkonto':\n $parameters['window'] = 'gruppenkonto';\n $parameters['window_id'] = 'gruppenkonto';\n $parameters['text'] = 'Gruppenkonto';\n $parameters['title'] = 'zum Kontoblatt der Gruppe...';\n $parameters['class'] = 'cash';\n $options = array_merge( $large_window_options, array( 'width' => '1000' ) );\n break;\n case 'gruppenmitglieder':\n $parameters['window'] = 'gruppenmitglieder';\n $parameters['window_id'] = 'gruppenmitglieder';\n $parameters['text'] = 'Mitglieder';\n $parameters['title'] = 'zur Liste der Gruppenmitglieder...';\n $parameters['class'] = 'people';\n $options = array_merge( $large_window_options, array( 'width' => '1000', 'height' => '600' ) );\n break;\n case 'gruppenpfand':\n $parameters['window'] = 'gruppenpfand';\n $parameters['window_id'] = 'gruppenpfand';\n $parameters['text'] = 'Gruppenpfand';\n $parameters['title'] = 'Fantkram';\n $parameters['class'] = 'fant';\n $options = $large_window_options;\n break;\n case 'katalog':\n case 'artikelsuche':\n $parameters['window'] = 'artikelsuche';\n $parameters['window_id'] = 'katalog';\n $parameters['text'] = 'Lieferantenkatalog';\n $parameters['title'] = 'zum Katalog des Lieferanten...';\n $parameters['class'] = 'browse';\n $options = array_merge( $large_window_options, array( 'width' => 1100, 'height' => 820 ) );\n break;\n case 'terrakatalog_upload':\n case 'katalog_upload':\n $parameters['window'] = 'katalog_upload';\n $parameters['window_id'] = 'katalog_upload';\n $parameters['text'] = 'Katalog einlesen';\n $parameters['title'] = 'zum Einlesen eines neuen Katalogs in die Foodsoft-Datenbank...';\n $options = array_merge( $large_window_options, array( 'width' => 1100, 'height' => 820 ) );\n break;\n case 'konto':\n case 'kontoauszug':\n $parameters['window'] = 'konto';\n $parameters['window_id'] = 'kontoauszug';\n $parameters['title'] = 'zum Kontoauszug...';\n $parameters['title'] = 'Kontoauszug';\n $parameters['class'] = 'cash';\n $options = $large_window_options;\n break;\n case 'lieferantenkonto':\n $parameters['window'] = 'lieferantenkonto';\n $parameters['window_id'] = 'lieferantenkonto';\n $parameters['text'] = 'Lieferantenkonto';\n $parameters['title'] = 'zum Lieferantenkonto...';\n $parameters['class'] = 'cash';\n $options = array_merge( $large_window_options, array( 'width' => '1200' ) );\n break;\n case 'pfandzettel':\n case 'pfandverpackungen':\n $parameters['window'] = 'pfandverpackungen';\n $parameters['window_id'] = 'pfandzettel';\n $parameters['text'] = 'Pfandzettel';\n $parameters['title'] = 'Fantkram...';\n $parameters['class'] = 'fant';\n $options = $large_window_options;\n break;\n case 'produktpreise':\n case 'produktdetails':\n $parameters['window'] = 'produktpreise';\n $parameters['window_id'] = 'produktpreise';\n $parameters['text'] = 'Produktpreise';\n $parameters['title'] = 'Produktdetails und Preise...';\n $parameters['class'] = 'browse';\n $options = $large_window_options;\n break;\n case 'produktverteilung':\n case 'verteilliste':\n if( $login_dienst > 0 ) {\n $parameters['window'] = 'produktverteilung';\n $parameters['window_id'] = 'verteilliste';\n $parameters['class'] = 'browse';\n $parameters['text'] = 'Produktverteilung';\n $parameters['title'] = 'Details zur Verteilung des Produkts...';\n $options = array_merge(\n $large_window_options, array( 'toolbar' => 'no', 'location' => 'no', 'width' => '840', 'menubar' => 'no','height' => '640' ) );\n } else {\n $parameters = NULL;\n }\n break;\n case 'verluste':\n $parameters['window'] = 'verluste';\n $parameters['window_id'] = 'verluste';\n $parameters['text'] = 'Verlustaufstellung';\n $parameters['class'] = 'browse';\n $parameters['title'] = 'zur Übersicht über die Verluste der Foodcoop...';\n $options = array_merge(\n $large_window_options, array( 'toolbar' => 'no', 'location' => 'no', 'width' => '800', 'menubar' => 'no','height' => '1000' ) );\n break;\n case 'verlust_details':\n $parameters['window'] = 'verluste';\n $parameters['window_id'] = 'verlust_details';\n $parameters['text'] = 'Details...';\n $parameters['title'] = 'Zur Liste aller Einzelposten...';\n $parameters['class'] = 'browse';\n $options = array_merge(\n $large_window_options, array( 'toolbar' => 'no', 'location' => 'no', 'width' => '800', 'menubar' => 'no','height' => '1000' ) );\n break;\n //\n // \"kleine\" Fenster:\n //\n case 'editbestellung':\n case 'edit_bestellung':\n $parameters['window'] = 'editBestellung';\n $parameters['window_id'] = 'edit_bestellung';\n $parameters['title'] = 'zu den Stammdaten der Bestellung...';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '480' ) );\n break;\n case 'editbuchung':\n case 'edit_buchung':\n $parameters['window'] = 'editBuchung';\n $parameters['window_id'] = 'edit_buchung';\n $parameters['title'] = 'zu den Details der Buchung...';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '600', 'height' => '600' ) );\n break;\n // case 'edit_group': // im moment nicht benutzt\n case 'editkonto':\n case 'edit_konto':\n $parameters['window'] = 'editKonto';\n $parameters['window_id'] = 'edit_konto';\n $parameters['title'] = 'zu den Stammdaten des Bankkontos...';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '680', 'height' => 500 ) );\n break;\n case 'editlieferant':\n case 'edit_lieferant':\n $parameters['window'] = 'editLieferant';\n $parameters['window_id'] = 'edit_lieferant';\n $parameters['title'] = 'zu den Stammdaten des Lieferanten...';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '680', 'height' => 600 ) );\n break;\n case 'editprodukt':\n case 'edit_produkt':\n $parameters['window'] = 'editProdukt';\n $parameters['window_id'] = 'edit_produkt';\n $parameters['title'] = 'zu den Stammdaten des Produkts...';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '560', 'height' => 380 ) );\n break;\n case 'editverpackung':\n case 'edit_verpackung':\n $parameters['window'] = 'editVerpackung';\n $parameters['window_id'] = 'edit_verpackung';\n $parameters['title'] = 'zu den Stammdaten der Pfandverpackung...';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '500' ) );\n break;\n case 'insertbestellung':\n case 'editbestellung':\n case 'insert_bestellung':\n $parameters['window'] = 'editBestellung';\n $parameters['window_id'] = 'edit_bestellung';\n $parameters['text'] = 'neue Bestellvorlage anlegen...';\n $parameters['title'] = 'neue Bestellvorlage anlegen...';\n $parameters['class'] = 'button';\n $options = array_merge( $small_window_options, array( 'width' => '460' ) );\n break;\n case 'insertproduktgruppe':\n case 'editproduktgruppe':\n case 'produktgruppen':\n $parameters['window'] = 'editProduktgruppe';\n $parameters['window_id'] = 'produktgruppen';\n $parameters['title'] = 'Produktgruppen verwalten...';\n $parameters['text'] = 'Produktgruppen';\n $parameters['class'] = 'browse';\n $options = array_merge( $small_window_options, array( 'width' => '420', 'height' => 600, 'scrollbars' => 'yes' ) );\n break;\n case 'catalogue_acronyms':\n $parameters['window'] = 'catalogue_acronyms';\n $parameters['window_id'] = 'catalogueAcronyms';\n $parameters['title'] = 'Katalog-Akronyme...';\n $parameters['text'] = 'Katalog-Akronyme';\n $parameters['class'] = ( ( $login_dienst == 4 and ! $readonly ) ? 'edit' : 'record' );\n $options = array_merge( $small_window_options, array( 'width' => '800', 'height' => '600', 'scrollbars' => 'yes' ) );\n break;\n default:\n error( \"undefiniertes Fenster: $name \" );\n }\n if( $parameters )\n return array( 'parameters' => $parameters, 'options' => $options );\n else\n return NULL;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
customfields of an action heading show the custom fields | function plugin_headings_customfields($item) {
global $CFG_GLPI;
$ID = $item->getField('id');
$type = get_class($item);
if ($type == 'Profile') {
$prof = new PluginCustomfieldsProfile();
if ($prof->GetfromDB($ID) || $prof->createUserAccess($item)) {
$prof->showForm($ID,
array('target' => $CFG_GLPI["root_doc"].
"/plugins/customfields/front/profile.form.php"));
}
} else {
if ($ID > 0) {
echo '<div class="center">';
echo plugin_customfields_showAssociated($item);
echo '</div>';
}
}
} | [
"protected static function register_custom_fields() {\n add_action(static::$taxonomy . '_edit_form_fields', array(get_called_class(), 'edit_form_fields'), 10, 2);\n // add_action(static::$taxonomy . '_add_form_fields', array(get_called_class(), 'display_custom_fields'), 10, 2);\n add_action('edited_' . static::$taxonomy, array(get_called_class(), 'save_custom_fields'), 10, 2);\n add_action('created_' . static::$taxonomy, array(get_called_class(), 'save_custom_fields'), 10, 2);\n }",
"final private function action_fields() {\n\t\techo json_encode( array(\n\t\t\t'fields' => $this->_fields,\n\t\t\t'required' => $this->_required,\n\t\t));\n\t}",
"function add_order_meta_box_actions( $actions ) {\n $actions['shiphawk_book_manual'] = __( 'ShipHawk Book' );\n //$actions['shiphawk_subscribe_tracking'] = __( 'ShipHawk Subscribe Tracking' );\n return $actions;\n}",
"function sj_bookly_addon_custom_fields_hook() {\n do_action('sj_bookly_addon_custom_fields_hook');\n}",
"function createCustomFields() {\n if ( function_exists( 'add_meta_box' ) ) {\n foreach ( $this->postTypes as $postType ) {\n add_meta_box( 'jvfrm-post-custom-fields', 'Additional information', array( &$this, 'displayCustomFields' ), $postType, 'normal', 'high' );\n }\n }\n }",
"function quick_edit_output_custom_fields( $column_name, $post_type ) {\n\n\t\t// Check the post type we're Quick Editing is a Page\n\t\tif ( 'page' !== $post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t // Check the column we're on is the Custom Fields column\n\t if ( 'custom_fields' !== $column_name ) {\n\t return;\n\t }\n\n\t // Add a nonce field so we can check for it later.\n\t\twp_nonce_field( 'custom_fields', 'custom_fields_nonce' );\n\n\t // Output a fieldset comprising of our Custom Fields\n\t ?>\n\t <fieldset class=\"inline-edit-col-left\">\n\t \t<h4><?php _e( 'Custom Fields', 'wp-quick-bulk-edit' ); ?></h4>\n\t <div class=\"inline-edit-col inline-edit-custom-fields\">\n\t <label class=\"inline-edit-group\">\n\t <span class=\"title\"><?php _e( 'Name', 'wp-quick-bulk-edit' ); ?></span>\n\t <input type=\"text\" name=\"_custom_field_name\" value=\"\" />\n\t </label>\n\n\t \t<label class=\"inline-edit-group\">\n\t <span class=\"title\"><?php _e( 'Email', 'wp-quick-bulk-edit' ); ?></span>\n\t <input type=\"text\" name=\"_custom_field_email\" value=\"\" />\n\t </label>\n\t </div>\n\t </fieldset>\n\t <?php\t\n\t\t\n\t}",
"function template_shd_custom_field_home()\n{\n\tglobal $context, $settings, $txt, $modSettings, $scripturl;\n\n\techo '\n\t\t\t\t<div class=\"tborder\">\n\t\t\t\t\t<div class=\"cat_bar\">\n\t\t\t\t\t\t<h3 class=\"catbg\">\n\t\t\t\t\t\t\t<img src=\"', $settings['default_images_url'], '/simpledesk/custom_fields.png\" class=\"icon\" alt=\"*\" />\n\t\t\t\t\t\t\t', $txt['shd_admin_custom_fields_long'], '\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p class=\"information\">\n\t\t\t\t\t\t', $txt['shd_admin_custom_fields_desc'], '\n\t\t\t\t\t</p>\n\t\t\t\t\t<table class=\"table_grid\">\n\t\t\t\t\t\t<tr class=\"title_bar\">\n\t\t\t\t\t\t\t<td width=\"30%\" colspan=\"2\">\n\t\t\t\t\t\t\t\t<img src=\"', $settings['default_images_url'], '/simpledesk/name.png\" class=\"icon\" alt=\"*\" />\n\t\t\t\t\t\t\t\t', $txt['shd_admin_custom_fields_fieldname'], '\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t\t\t<img src=\"', $settings['default_images_url'], '/simpledesk/fieldtype.png\" class=\"icon\" alt=\"*\" />\n\t\t\t\t\t\t\t\t', $txt['shd_admin_custom_fields_fieldtype'], '\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>', $txt['shd_admin_custom_fields_active'], '</td>\n\t\t\t\t\t\t\t<td>', $txt['shd_admin_custom_fields_visible'], '</td>\n\t\t\t\t\t\t\t<td>', $txt['shd_admin_custom_field_permissions'], '</td>\n\t\t\t\t\t\t\t<td colspan=\"2\" width=\"1%\">', $txt['shd_admin_custom_fields_move'], '</td>\n\t\t\t\t\t\t\t<td>', $txt['shd_actions'], '</td>\n\t\t\t\t\t\t</tr>';\n\n\tif (empty($context['custom_fields']))\n\t\techo '\n\t\t\t\t\t\t<tr class=\"windowbg2\">\n\t\t\t\t\t\t\t<td colspan=\"10\">', $txt['shd_admin_no_custom_fields'], '</td>\n\t\t\t\t\t\t</tr>';\n\telse\n\t{\n\t\tforeach ($context['custom_fields'] as $field)\n\t\t{\n\t\t\techo '\n\t\t\t\t\t\t<tr class=\"windowbg\">\n\t\t\t\t\t\t\t<td width=\"2%\">', empty($field['icon']) ? '' : '<img src=\"' . $settings['default_images_url'] . '/simpledesk/cf/' . $field['icon'] . '\" class=\"icon\" alt=\"*\" />', '</td>\n\t\t\t\t\t\t\t<td>', $field['field_name'], '<br /><span class=\"smalltext\">', $field['field_desc'], '</span></td>\n\t\t\t\t\t\t\t<td width=\"2%\"><img src=\"' . $settings['default_images_url'] . '/simpledesk/cf_ui_' . $field['field_type'] . '.png\" class=\"icon\" alt=\"', $txt['shd_admin_custom_fields_ui_' . $field['field_type']], '\" /></td>\n\t\t\t\t\t\t\t<td>', $txt['shd_admin_custom_fields_ui_' . $field['field_type']], '</td>\n\t\t\t\t\t\t\t<td><img src=\"', $settings['default_images_url'], '/simpledesk/cf_', $field['active_string'], '.png\" alt=\"', $txt['shd_admin_custom_fields_' . $field['active_string']], '\" title=\"', $txt['shd_admin_custom_fields_' . $field['active_string']], '\" /></td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t', ($field['field_loc'] & CFIELD_TICKET) !== 0 ? ('<img src=\"' . $settings['default_images_url'] . '/simpledesk/ticket.png\" alt=\"' . $txt['shd_admin_custom_fields_inticket'] . '\" title=\"' . $txt['shd_admin_custom_fields_inticket'] . '\" />') : '', '\n\t\t\t\t\t\t\t\t', ($field['field_loc'] & CFIELD_REPLY) !== 0 ? ('<img src=\"' . $settings['default_images_url'] . '/simpledesk/replies.png\" alt=\"' . $txt['shd_admin_custom_fields_inreply'] . '\" title=\"' . $txt['shd_admin_custom_fields_inreply'] . '\" />') : '', '\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<strong>', $txt['shd_admin_custom_field_view'], ':</strong>\n\t\t\t\t\t\t\t\t\t', $field['can_see'][0] == 1 ? '<img src=\"' . $settings['default_images_url'] . '/simpledesk/user.png\" class=\"icon\" alt=\"*\" />' : '','\n\t\t\t\t\t\t\t\t\t', $field['can_see'][1] == 1 ? '<img src=\"' . $settings['default_images_url'] . '/simpledesk/staff.png\" class=\"icon\" alt=\"*\" />' : '','\n\t\t\t\t\t\t\t\t\t<img src=\"', $settings['default_images_url'], '/simpledesk/admin.png\" class=\"icon\" alt=\"*\" />\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t<strong>', $txt['shd_admin_custom_field_edit'], ':</strong>\n\t\t\t\t\t\t\t\t\t', $field['can_edit'][0] == 1 ? '<img src=\"' . $settings['default_images_url'] . '/simpledesk/user.png\" class=\"icon\" alt=\"*\" />' : '','\n\t\t\t\t\t\t\t\t\t', $field['can_edit'][1] == 1 ? '<img src=\"' . $settings['default_images_url'] . '/simpledesk/staff.png\" class=\"icon\" alt=\"*\" />' : '','\n\t\t\t\t\t\t\t\t\t<img src=\"', $settings['default_images_url'], '/simpledesk/admin.png\" class=\"icon\" alt=\"*\" />\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>', empty($field['is_first']) ? ('<a href=\"' . $scripturl . '?action=admin;area=helpdesk_customfield;sa=move;field=' . $field['id_field'] . ';direction=up;' . $context['session_var'] . '=' . $context['session_id'] . '\"><img src=\"' . $settings['default_images_url'] . '/simpledesk/move_up.png\" alt=\"' . $txt['shd_admin_move_up'] . '\" title=\"' . $txt['shd_admin_move_up'] . '\" /></a>') : '', '</td>\n\t\t\t\t\t\t\t<td>', empty($field['is_last']) ? ('<a href=\"' . $scripturl . '?action=admin;area=helpdesk_customfield;sa=move;field=' . $field['id_field'] . ';direction=down;' . $context['session_var'] . '=' . $context['session_id'] . '\"><img src=\"' . $settings['default_images_url'] . '/simpledesk/move_down.png\" alt=\"' . $txt['shd_admin_move_down'] . '\" title=\"' . $txt['shd_admin_move_down'] . '\" /></a>') : '', '</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<a href=\"', $scripturl, '?action=admin;area=helpdesk_customfield;sa=edit;field=', $field['id_field'], ';', $context['session_var'], '=', $context['session_id'], '\"><img src=\"', $settings['default_images_url'], '/simpledesk/edit.png\" class=\"icon\" alt=\"', $txt['shd_ticket_edit'],'\" title=\"', $txt['shd_ticket_edit'], '\" /></a>\n\t\t\t\t\t\t\t\t<a href=\"', $scripturl, '?action=admin;area=helpdesk_customfield;sa=save;field=', $field['id_field'], ';delete;', $context['session_var'], '=', $context['session_id'], '\" onclick=\"return confirm(' . JavaScriptEscape($txt['shd_admin_delete_custom_field_confirm']). ');\"><img src=\"', $settings['default_images_url'], '/simpledesk/delete.png\" class=\"icon\" alt=\"', $txt['shd_ticket_delete'],'\" title=\"', $txt['shd_ticket_delete'], '\" /></a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>';\n\t\t}\n\t}\n\n\techo '\n\t\t\t\t\t</table>\n\t\t\t\t\t<div class=\"flow_auto\">\n\t\t\t\t\t\t<div class=\"floatright\">\n\t\t\t\t\t\t\t<div class=\"additional_row\">[<a href=\"', $scripturl, '?action=admin;area=helpdesk_customfield;sa=new\">', $txt['shd_admin_new_custom_field'], '</a>]</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>';\n}",
"public static function get_action_fields() {\n return ['config', 'remove', 'hide', 'movein', 'move'];\n }",
"public function fields_page_action() {\n\t\treturn $this->load_view( 'fields' );\n\t}",
"public function addCustomFields()\n {\n return [\n new MetaBox( 'slide_options', __('Slide options', 'pulpit'), $this->getTypeName(), 'normal', 'high', [\n new CheckBoxField( 'suppress_title', __('Suppress title on exported slide', 'pulpit') ),\n ]\n ),\n ];\n }",
"function showMinimalActionForm($fields, $canedit) {\n\n echo \"<tr class='tab_bg_1'>\";\n if ($canedit) {\n echo \"<td width='10'>\";\n Html::showMassiveActionCheckBox($this->ruleactionclass, $fields[\"id\"]);\n echo \"</td>\";\n }\n echo $this->getMinimalActionText($fields);\n echo \"</tr>\\n\";\n }",
"public function custom_fields() {\n\t\treturn apply_filters( 'wprm_recipe_custom_fields', array(), $this );\n\t}",
"function get_fields() {\n\t\t$basic_fields = array(\n\t\t\t'title' => array(\n\t\t\t\t'label' => esc_html__( 'Title', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Text entered here will appear as title.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'main_content',\n\t\t\t),\n\t\t\t'content' => array(\n\t\t\t\t'label' => esc_html__( 'Content', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'tiny_mce',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Content entered here will appear inside the module.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'main_content',\n\t\t\t),\n\t\t\t'button_text' => array(\n\t\t\t\t'label' => esc_html__( 'Button Text', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Input your desired button text, or leave blank for no button.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'button',\n\t\t\t),\n\t\t\t'button_url' => array(\n\t\t\t\t'label' => esc_html__( 'Button URL', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'option_category' => 'basic_option',\n\t\t\t\t'description' => esc_html__( 'Input URL for your button.', 'dicm-divi-custom-modules' ),\n\t\t\t\t'toggle_slug' => 'button',\n\t\t\t),\n\t\t\t'button_url_new_window' => array(\n\t\t\t\t'default' => 'off',\n\t\t\t\t'default_on_front'=> true,\n\t\t\t\t'label' => esc_html__( 'Url Opens', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'option_category' => 'configuration',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'off' => esc_html__( 'In The Same Window', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t'on' => esc_html__( 'In The New Tab', 'dicm-divi-custom-modules' ),\n\t\t\t\t),\n\t\t\t\t'toggle_slug' => 'button',\n\t\t\t\t'description' => esc_html__( 'Choose whether your link opens in a new window or not', 'dicm-divi-custom-modules' ),\n\t\t\t),\n\t\t);\n\n\n\t\t// All possible official field types that can be used on custom module\n\t\t$all_types_tab_slug = 'demo';\n\t\t$all_types_of_fields = array(\n\t\t\t'text' => array(\n\t\t\t\t'label' => esc_html__( 'Text', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'textarea' => array(\n\t\t\t\t'label' => esc_html__( 'Textarea', 'et_builder' ),\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'select' => array(\n\t\t\t\t'label' => esc_html__( 'Select', 'et_builder' ),\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'off' => esc_html__( 'Close', 'et_builder' ),\n\t\t\t\t\t'on' => esc_html__( 'Open', 'et_builder' ),\n\t\t\t\t),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'toggle' => array(\n\t\t\t\t'label' => esc_html__( 'Toggle', 'et_builder' ),\n\t\t\t\t'type' => 'yes_no_button',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'on' => esc_html__( 'On', 'et_builder' ),\n\t\t\t\t\t'off' => esc_html__( 'Off', 'et_builder' ),\n\t\t\t\t),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'multiple_buttons' => array(\n\t\t\t\t'label' => esc_html__( 'Multiple Buttons', 'et_builder' ),\n\t\t\t\t'type' => 'multiple_buttons',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'horizontal' => array(\n\t\t\t\t\t\t'title' => esc_html__( 'Horizontal', 'et_builder' ),\n\t\t\t\t\t\t'icon' => 'flip-horizontally', // Any svg icon that is defined on ETBuilderIcon component\n\t\t\t\t\t),\n\t\t\t\t\t'vertical' => array(\n\t\t\t\t\t\t'title' => esc_html__( 'Vertical', 'et_builder' ),\n\t\t\t\t\t\t'icon' => 'flip-vertically', // Any svg icon that is defined on ETBuilderIcon component\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => '',\n\t\t\t\t'toggleable' => true,\n\t\t\t\t'multi_selection' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'multiple_checkboxes' => array(\n\t\t\t\t'label' => esc_html__( 'Multiple Checkboxes', 'et_builder' ),\n\t\t\t\t'type' => 'multiple_checkboxes',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'option_1' => esc_html__( 'Option 1', 'et_builder' ),\n\t\t\t\t\t'option_2' => esc_html__( 'Option 2', 'et_builder' ),\n\t\t\t\t\t'option_3' => esc_html__( 'Option 3', 'et_builder' ),\n\t\t\t\t),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'input_range' => array(\n\t\t\t\t'label' => esc_html__( 'Input Range', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'range',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'input_datetime' => array(\n\t\t\t\t'label' => esc_html__( 'Input Datetime', 'et_builder' ),\n\t\t\t\t'type' => 'date_picker',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'input_margin' => array(\n\t\t\t\t'label' => esc_html__( 'Input Margin', 'et_builder' ),\n\t\t\t\t'type' => 'custom_margin',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'checkboxes_category' => array(\n\t\t\t\t'label' => esc_html__( 'Checkboxes Category', 'et_builder' ),\n\t\t\t\t'type' => 'categories',\n\t\t\t\t'taxonomy_name' => 'category',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'select_sidebar' => array(\n\t\t\t\t'label' => esc_html__( 'Select Sidebar', 'et_builder' ),\n\t\t\t\t'type' => 'select_sidebar',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'input',\n\t\t\t),\n\t\t\t'codemirror' => array(\n\t\t\t\t'label' => esc_html__( 'Codemirror', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'codemirror',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'code',\n\t\t\t),\n\t\t\t'options_list' => array(\n\t\t\t\t'label' => esc_html__( 'Options List', 'et_builder' ),\n\t\t\t\t'type' => 'options_list',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'form',\n\t\t\t),\n\t\t\t'options_list_checkbox' => array(\n\t\t\t\t'label' => esc_html__( 'Options List: Checkbox', 'et_builder' ),\n\t\t\t\t'type' => 'options_list',\n\t\t\t\t'checkbox' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'form',\n\t\t\t),\n\t\t\t'options_list_radio' => array(\n\t\t\t\t'label' => esc_html__( 'Options List: Radio', 'et_builder' ),\n\t\t\t\t'type' => 'options_list',\n\t\t\t\t'radio' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'form',\n\t\t\t),\n\t\t\t'select_fonticon' => array(\n\t\t\t\t'label' => esc_html__( 'Select Font Icon', 'et_builder' ),\n\t\t\t\t'type' => 'et_font_icon_select',\n\t\t\t\t'renderer' => 'et_pb_get_font_icon_list',\n\t\t\t\t'renderer_with_field' => true,\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'typography',\n\t\t\t),\n\t\t\t'text_align' => array(\n\t\t\t\t'label' => esc_html__( 'Text Align', 'et_builder' ),\n\t\t\t\t'type' => 'text_align',\n\t\t\t\t'options' => et_builder_get_text_orientation_options(),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'typography',\n\t\t\t),\n\t\t\t'select_font' => array(\n\t\t\t\t'label' => esc_html__( 'Select Font', 'et_builder' ),\n\t\t\t\t'type' => 'font',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'typography',\n\t\t\t),\n\t\t\t'color' => array(\n\t\t\t\t'label' => esc_html__( 'Color', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'color',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'color',\n\t\t\t),\n\t\t\t'color_alpha' => array(\n\t\t\t\t'label' => esc_html__( 'Color Alpha', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'color',\n\t\t\t),\n\t\t\t'upload' => array(\n\t\t\t\t'label' => esc_html__( 'Upload', 'et_builder' ),\n\t\t\t\t'type' => 'upload',\n\t\t\t\t'upload_button_text' => esc_attr__( 'Upload an image', 'et_builder' ),\n\t\t\t\t'choose_text' => esc_attr__( 'Choose an Image', 'et_builder' ),\n\t\t\t\t'update_text' => esc_attr__( 'Set As Image', 'et_builder' ),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'upload',\n\t\t\t),\n\t\t\t'composite_tabbed' => array(\n\t\t\t\t'label' => esc_html__( 'Composite Tabbed', 'et_builder' ),\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'attr_suffix' => '',\n\t\t\t\t'type' => 'composite',\n\t\t\t\t'composite_type' => 'default',\n\t\t\t\t'composite_structure' => array(\n\t\t\t\t\t'tab_1' => array(\n\t\t\t\t\t\t'label' => esc_html( 'Tab 1', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t'controls' => array(\n\t\t\t\t\t\t\t'tab_1_text' => array(\n\t\t\t\t\t\t\t\t'label' => esc_html__( 'Text 1', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\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'tab_2' => array(\n\t\t\t\t\t\t'label' => esc_html( 'Tab 2', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t'controls' => array(\n\t\t\t\t\t\t\t'tab_2_text' => array(\n\t\t\t\t\t\t\t\t'label' => esc_html__( 'Text 2', 'dicm-divi-custom-modules' ),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'presets_shadow' => array(\n\t\t\t\t'label' => esc_html__( 'Presets', 'et_builder' ),\n\t\t\t\t'type' => 'presets_shadow',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'affects' => array(\n\t\t\t\t\t'preset_affected_1',\n\t\t\t\t\t'preset_affected_2',\n\t\t\t\t),\n\t\t\t\t'presets' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'icon' => 'none',\n\t\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t'class' => 'preset preset1',\n\t\t\t\t\t\t\t'content' => 'aA',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'preset_affected_1' => '0.1em',\n\t\t\t\t\t\t\t'preset_affected_2' => '1em',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => 'preset1'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t'class' => 'preset preset2',\n\t\t\t\t\t\t\t'content' => 'aA',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'fields' => array(\n\t\t\t\t\t\t\t'preset_affected_1' => '0.5em',\n\t\t\t\t\t\t\t'preset_affected_2' => '5em',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => 'preset2'\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => 'none',\n\t\t\t\t'default_on_front'=> true,\n\t\t\t),\n\t\t\t'preset_affected_1' => array(\n\t\t\t\t'label' => esc_html__( 'Preset Affected 1', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'range',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'depends_show_if_not' => 'none',\n\t\t\t\t'default' => array(\n\t\t\t\t\t'presets_shadow',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'none' => '0em',\n\t\t\t\t\t\t'preset1' => '0.1em',\n\t\t\t\t\t\t'preset2' => '0.5em',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'preset_affected_2' => array(\n\t\t\t\t'label' => esc_html__( 'Preset Affected 2', 'dicm-divi-custom-modules' ),\n\t\t\t\t'type' => 'range',\n\t\t\t\t'tab_slug' => $all_types_tab_slug,\n\t\t\t\t'toggle_slug' => 'advanced',\n\t\t\t\t'depends_show_if_not' => 'none',\n\t\t\t\t'default' => array(\n\t\t\t\t\t'presets_shadow',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'none' => '0em',\n\t\t\t\t\t\t'preset1' => '1em',\n\t\t\t\t\t\t'preset2' => '5em',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\treturn array_merge( $basic_fields, $all_types_of_fields );\n\t}",
"function show_custom_page_meta_box(){\n\tglobal $custom_page_meta_fields,$custom_meta_fields;\n\t$custom_meta_fields=$custom_page_meta_fields;\n\tshow_custom_meta_box();\n}",
"function ManageCustomFields()\n\t{\n\t\t$user = &GetUser();\n\t\t$perpage = $this->GetPerPage();\n\n\t\t$DisplayPage = $this->GetCurrentPage();\n\t\t$start = 0;\n\t\tif ($perpage != 'all') {\n\t\t\t$start = ($DisplayPage - 1) * $perpage;\n\t\t}\n\n\t\t$sortinfo = $this->GetSortDetails();\n\n\t\t$api = $this->GetApi();\n\n\t\t$fieldowner = ($user->Admin()) ? 0 : $user->userid;\n\t\t$NumberOfFields = $api->GetCustomFields($fieldowner, $sortinfo, true);\n\t\t$myfields = $api->GetCustomFields($fieldowner, $sortinfo, false, $start, $perpage);\n\n\t\tif ($user->HasAccess('CustomFields', 'Create')) {\n\t\t\t$GLOBALS['CustomFields_AddButton'] = $this->ParseTemplate('CustomFields_Create_Button', true, false);\n\t\t}\n\n\t\tif ($user->HasAccess('CustomFields', 'Delete')) {\n\t\t\t$GLOBALS['CustomFields_DeleteButton'] = $this->ParseTemplate('CustomFields_Delete_Button', true, false);\n\t\t}\n\n\t\tif (!isset($GLOBALS['Message'])) {\n\t\t\t$GLOBALS['Message'] = '';\n\t\t}\n\n\t\t$lists = $user->GetLists();\n\t\t$listids = array_keys($lists);\n\t\tif (sizeof($listids) < 1) {\n\t\t\t$GLOBALS['Intro_Help'] = GetLang('Help_CustomFieldsManage');\n\t\t\t$GLOBALS['Intro'] = GetLang('CustomFieldsManage');\n\t\t\t$GLOBALS['Lists_AddButton'] = '';\n\n\t\t\tif ($user->CanCreateList() === true) {\n\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('CustomFields_NoLists', GetLang('ListCreate'));\n\t\t\t\t$GLOBALS['Lists_AddButton'] = $this->ParseTemplate('List_Create_Button', true, false);\n\t\t\t} else {\n\t\t\t\t$GLOBALS['Message'] = $this->PrintSuccess('CustomFields_NoLists', GetLang('ListAssign'));\n\t\t\t}\n\t\t\t$this->ParseTemplate('Subscribers_No_Lists');\n\t\t\treturn;\n\t\t}\n\n\t\tif ($NumberOfFields == 0) {\n\t\t\t$GLOBALS['Message'] .= $this->PrintSuccess('NoCustomFields');\n\t\t\t$this->ParseTemplate('CustomFields_Manage_Empty');\n\t\t\treturn;\n\t\t}\n\n\t\t$this->SetupPaging($NumberOfFields, $DisplayPage, $perpage);\n\t\t$GLOBALS['FormAction'] = 'Action=ProcessPaging';\n\t\t$paging = $this->ParseTemplate('Paging', true, false);\n\n\t\t$template = $this->ParseTemplate('CustomFields_Manage', true, false);\n\n\t\t$customfieldlist = '';\n\n\t\tforeach ($myfields as $pos => $fieldinfo) {\n\t\t\t$api->Load($fieldinfo['fieldid']);\n\t\t\t$GLOBALS['id'] = $fieldinfo['fieldid'];\n\t\t\t$GLOBALS['Name'] = htmlspecialchars($fieldinfo['name'], ENT_QUOTES, SENDSTUDIO_CHARSET);\n\t\t\t$GLOBALS['Created'] = $this->PrintDate($api->createdate);\n\t\t\t$GLOBALS['CustomFieldType'] = GetLang('CustomFieldType_' . $api->fieldtype);\n\t\t\t$GLOBALS['CustomFieldRequired'] = ($api->Settings['FieldRequired']) ? GetLang('Yes') : GetLang('No');\n\t\t\t$GLOBALS['CustomFieldAction'] = '';\n\n\t\t\tif ($user->Admin() || ($user->HasAccess('customfields', 'edit') && $user->Get('userid') == $api->Get('ownerid'))) {\n\t\t\t\t$GLOBALS['CustomFieldAction'] .= ' <a href=\"index.php?Page=CustomFields&Action=Edit&id=' . $fieldinfo['fieldid'] . '\">' . GetLang('Edit') . '</a>';\n\t\t\t} else {\n\t\t\t\t$GLOBALS['CustomFieldAction'] .= $this->DisabledItem('Edit');\n\t\t\t}\n\n\t\t\tif ($user->Admin() || ($user->HasAccess('customfields', 'delete') && $user->Get('userid') == $api->Get('ownerid'))) {\n\t\t\t\t$GLOBALS['CustomFieldAction'] .= ' <a href=\"javascript: ConfirmDelete(' . $fieldinfo['fieldid'] . ');\">' . GetLang('Delete') . '</a>';\n\t\t\t} else {\n\t\t\t\t$GLOBALS['CustomFieldAction'] .= $this->DisabledItem('Delete');\n\t\t\t}\n\n\t\t\t$customfieldlist .= $this->ParseTemplate('CustomFields_Manage_Row', true, false);\n\t\t}\n\t\t$template = str_replace('%%TPL_CustomFields_Manage_Row%%', $customfieldlist, $template);\n\t\t$template = str_replace('%%TPL_Paging%%', $paging, $template);\n\t\t$template = str_replace('%%TPL_Paging_Bottom%%', $GLOBALS['PagingBottom'], $template);\n\t\techo $template;\n\t}",
"function modify_pages_table_display_actions() {\n if ( is_plugin_active('advanced-custom-fields-pro/acf.php') ) {\n // Add the custom columns header \"service\" to the page psot type:\n add_filter( 'manage_page_posts_columns', 'set_custom_edit_page_columns' );\n function set_custom_edit_page_columns($columns) {\n if (!isset($columns['service_offering']))\n $columns['service_offering'] = \"Service\";\n\n // Remove the Sidebar column\n unset($columns['simple-page-sidebar']);\n\n // Remove the Comments column\n unset($columns['comments']);\n\n // Remove page type\n unset($columns['post_type']);\n\n return $columns;\n }\n\n // Add the service field data to the custom columns for service\n add_action( 'manage_page_posts_custom_column' , 'custom_page_column', 10, 2 );\n function custom_page_column( $column, $post_ID ) {\n if ($column == 'service_offering') {\n $service = get_post_meta($post_ID, 'service_offering', TRUE);\n if ($service) {\n echo '<div id=\"service_offering-' . $post_ID . '\">' . $service . '</div>';\n }\n else {\n echo '—';\n }\n }\n }\n\n // Add the field for service to the bulk and quick edit screens (same function for both actions)\n add_action( 'bulk_edit_custom_box', 'add_service_to_bulk_quick_edit_custom_box', 10, 2 );\n add_action( 'quick_edit_custom_box', 'add_service_to_bulk_quick_edit_custom_box', 10, 2 );\n function add_service_to_bulk_quick_edit_custom_box( $column_name, $post_type ) {\n switch ( $post_type ) {\n case 'page':\n\n switch( $column_name ) {\n case 'service_offering':\n ?><fieldset class=\"inline-edit-col-right\" style=\"width: 100%; dispaly: block; margin-top: 2px\">\n <div class=\"inline-edit-group\" style=\"padding-left: 5px;\">\n <label>\n <span class=\"title\">Service</span>\n <input type=\"text\" name=\"service_offering\" value=\"\" />\n </label>\n </div>\n </fieldset><?php\n break;\n }\n break;\n\n }\n }\n\n // Add a modified version of WP js to allow us to save and populate data fields added above\n add_action( 'admin_print_scripts-edit.php', 'service_enqueue_edit_scripts' );\n function service_enqueue_edit_scripts() {\n wp_enqueue_script( 'service-admin-edit', get_stylesheet_directory_uri() . '/js/quick_edit.js', array( 'jquery', 'inline-edit-post' ), '', true );\n }\n\n add_action( 'save_post','service_edit_save_post', 10, 2 );\n function service_edit_save_post( $post_id, $post ) {\n\n // don't save for autosave\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n return $post_id;\n\n // dont save for revisions\n if ( isset( $post->post_type ) && $post->post_type == 'revision' )\n return $post_id;\n\n switch( $post->post_type ) {\n\n case 'page':\n\n if ( array_key_exists( 'service_offering', $_POST ) )\n update_post_meta( $post_id, 'service_offering', $_POST[ 'service_offering' ] );\n\n break;\n\n }\n\n }\n\n add_action( 'wp_ajax_service_edit_save_bulk_edit', 'service_edit_save_bulk_edit' );\n function service_edit_save_bulk_edit() {\n // get our variables\n $post_ids = ( isset( $_POST[ 'post_ids' ] ) && !empty( $_POST[ 'post_ids' ] ) ) ? $_POST[ 'post_ids' ] : array();\n $service_offering = ( isset( $_POST[ 'service_offering' ] ) && !empty( $_POST[ 'service_offering' ] ) ) ? $_POST[ 'service_offering' ] : NULL;\n // if everything is in order\n if ( !empty( $post_ids ) && is_array( $post_ids ) && !empty( $service_offering ) ) {\n foreach( $post_ids as $post_id ) {\n update_post_meta( $post_id, 'service_offering', $service_offering );\n }\n }\n }\n } // wrap\n}",
"public function fieldCreateAction() {\n parent::fieldCreateAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n //$form->setTitle('Add Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }",
"function smash_invoice_linker_rules_action_info() {\n return array(\n 'smash_invoice_linker_create' => array(\n 'label' => t('Create an invoice'),\n 'group' => t('SMASH! Invoice Linker'),\n 'parameter' => array(\n 'message' => array(\n 'type' => 'entity',\n 'label' => t('Registration Entity'),\n 'sanitize' => TRUE,\n 'translatable' => TRUE,\n ),\n ),\n 'base' => 'smash_invoice_linker_create',\n // 'access callback' => 'rules_system_integration_access',\n ),\n );\n}",
"function show_fields() {\n\t\tforeach( $this->fields as $field ) {\n\t\t\t$field->show_field();\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write configuration from memory into filesystem | protected function writeConfig() {
$content = '';
if (!$this->config) {
return;
}
foreach ($this->config as $key=>$value) {
$content .= $key.'='.$value."\r\n";
}
file_put_contents(ASCMS_DOCUMENT_ROOT.'/workbench.config', $content);
} | [
"private function write()\n\t{\n\t\t$this->config->write($this->path, 'yaml');\n\t}",
"public function writeConfig()\n {\n $config_contents = file_get_contents(Registry::get('config.dir.root') . '/config.local.php');\n if (!empty($config_contents)) {\n\n $config = array(\n 'db_host' => addslashes($this->_database_settings['host']),\n 'db_name' => addslashes($this->_database_settings['name']),\n 'db_user' => addslashes($this->_database_settings['user']),\n 'db_password' => str_replace('$', '\\$', addslashes($this->_database_settings['password'])),\n 'table_prefix' => addslashes($this->_database_settings['table_prefix']),\n 'http_host' => Url::normalizeDomain($this->_server_settings['http_host']),\n 'http_path' => rtrim($this->_server_settings['http_path'], '/'),\n 'https_host' => Url::normalizeDomain($this->_server_settings['https_host']),\n 'https_path' => rtrim($this->_server_settings['https_path'], '/'),\n 'database_backend' => addslashes($this->_database_settings['database_backend']),\n 'crypt_key' => str_replace('$', '\\$', addslashes($this->_cart_settings['secret_key']))\n );\n\n foreach ($config as $paramName => $value) {\n $config_contents = $this->_writeParam($paramName, $value, $config_contents);\n }\n\n fn_put_contents(Registry::get('config.dir.root') . '/config.local.php', $config_contents);\n }\n }",
"public function writeConfiguration(){\n\t\techo \"Writing configuration to file\\n\";\n\t\t$fp = fopen('/etc/CUGAR/config.xml','w');\n\n\t\tif($fp){\n\t\t\tfwrite($fp,$this->server_conf->asXML());\n\t\t\tfclose($fp);\n\n\t\t\t//\tCopy the config xml to persistent storage on the /cfg slice of the device\n\t\t\tFunctions::shellCommand('cp /etc/CUGAR/config.xml /cfg/CUGAR/config.xml');\n\t\t}\n\t\telse{\n\t\t\tthrow new SystemError(ErrorStore::$E_FATAL,'Could not open config file for writing','502');\n\t\t}\n\t}",
"public function saveConfiguration()\n {\n // write the formatted config file to the path\n file_put_contents(self::$config_path, $this->app['utils']->JSONFormat(self::$config));\n $this->app['monolog']->addDebug('Save configuration to '.basename(self::$config_path));\n }",
"private function persist() {\n if (!is_null($this->configFromFile)) {\n if (file_put_contents(self::getConfigFilePath(), json_encode($this->config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)) === false) {\n throw new Exception('Couldn\\'t write to config file!');\n }\n }\n }",
"public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }",
"function write_config () {\n\t\t$config = file( $this->config_path );\n\t\tforeach ( $this->entries as $entry )\n\t\t\t$config = $entry->change_config( $config );\n\t\t$file = fopen( $this->config_path, \"wb\" );\n\t\t$written = fwrite( $file, implode( \"\", $config ) );\n\t\tfclose( $file );\n\t\tif ( $written == 0 ) return FALSE;\n\t\tforeach ( $this->entries as $entry )\n\t\t\t$entry->parse_config( $config );\n\t\treturn TRUE;\n\t}",
"protected function saveConfigurationCache()\n {\n // Make sure that all configuration types are loaded before writing configuration caches.\n foreach (array_keys($this->configurationTypes) as $configurationType) {\n if (!isset($this->unprocessedConfiguration[$configurationType]) || !is_array($this->unprocessedConfiguration[$configurationType])) {\n $this->loadConfiguration($configurationType, $this->packages);\n }\n }\n\n if ($this->temporaryDirectoryPath === null) {\n return;\n }\n\n $cachePathAndFilename = $this->constructConfigurationCachePath();\n if (!file_exists(dirname($cachePathAndFilename))) {\n Files::createDirectoryRecursively(dirname($cachePathAndFilename));\n }\n\n file_put_contents($cachePathAndFilename, '<?php return ' . $this->replaceVariablesInPhpString(var_export($this->unprocessedConfiguration, true)) . ';');\n OpcodeCacheHelper::clearAllActive($cachePathAndFilename);\n $this->cacheNeedsUpdate = false;\n }",
"public function saveConfig() \n { \n write_php_ini($this->{'configuration'},\"../\".$this->{'configFile'});\n }",
"private function write(): void\n\t{\n\t\ttry\n\t\t{\n\t\t\tfile_put_contents($this->destination, $this->render());\n\n\t\t\techo \"Created Autoconfig in $this->destination\\n\";\n\t\t}\n\t\tcatch (Throwable $e)\n\t\t{\n\t\t\techo $e;\n\n\t\t\tthrow $e;\n\t\t}\n\t}",
"function save() {\n\t\tfile_put_contents( '../demo/config.dat', serialize($this) );\n\t}",
"public function writeConfig($contents)\n {\n file_put_contents($this->filename, $contents);\n }",
"public function saveConfigurationFile()\n {\n $this->configurationFileBackend->saveConfiguration($this->settings);\n }",
"private function save()\n\t{\n\t\t$this->writeAPTProxyConf();\n\t\t$this->writeSquidConf();\n\t\t$this->writeEtcProfiles();\n\t\t$this->writeACNGConf();\n\t}",
"protected function store_configuration()\n\t{\n\t\t$this->store_configuration_without(-1);\n\t}",
"function config_write_cache($data) {\n\tglobal $g;\n\n\t$filename = \"{$g['tmp_path']}/config.cache\";\n\n\t// Ensure configuration cache file is written\n\tif (!file_put_contents_safe($filename, serialize($data), TRUE)) {\n\t\twrite_log(\"Error: Failed to write configuration cache file '{$filename}'.\");\n\t\treturn FALSE;\n\t}\n\n\t// Modify file permissions\n\t@chmod($filename, 0600);\n\n\treturn TRUE;\n}",
"public function save()\n {\n $data = array();\n $data[] = \"; <?php die; ?>\";\n $data[] = \"; \";\n $data[] = \"; Liquid PHP Application Framework Configuration File\";\n $data[] = \"\";\n\n foreach($this->data as $a => $section)\n {\n $data[] = \"[\" . $a . \"]\";\n foreach($section as $b => $subsection)\n {\n foreach($subsection as $c => $value)\n {\n $data[] = $b . '.' . $c . '=\"' . $value . '\"';\n }\n }\n\n file_put_contents($this->filename, implode(\"\\r\\n\", $data));\n $this->requiresSave = false;\n }\n }",
"protected function rewriteConfig(): void\n {\n // Return immediately when the config file must not be rewritten.\n if (!$this->rewriteConfigFile) return;\n\n $tables = $this->config->getManArray('tables');\n ksort($tables);\n\n $config = new Config($this->configFileName);\n $config['tables'] = $tables;\n\n $data = [];\n foreach (self::$sections as $key)\n {\n if (!empty($config->get($key)))\n {\n $data[$key] = $config->get($key);\n }\n }\n\n $this->writeTwoPhases($this->configFileName, json_encode($data, JSON_PRETTY_PRINT));\n }",
"public function save()\n {\n $array = $this->_buildArrayToWrite();\n\n $this->_path = sfConfig::get('sf_app_dir').'/config/app.yml';\n\n file_put_contents($this->_path, sfYaml::dump($array, 4));\n\n chdir(sfConfig::get('sf_root_dir'));\n $task = new sfCacheClearTask(sfApplicationConfiguration::getActive()->getEventDispatcher(), new sfFormatter());\n $task->run(array(), array('type' => 'config'));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a querytype You can also use this method to override any existing querytype with a new mapping. This requires the availability of the classes through autoloading or a manual require before calling this method. | public function registerQueryType($type, $queryClass): CloudClientInterface; | [
"public function registerCustomTypeMappings();",
"function setQueryType($type) {\n $this->queryType = strtoupper($type);\n }",
"public static function register_type()\n {\n }",
"public function registerType()\n {\n $config = $this->getConfig();\n register_graphql_object_type($this->type, $config);\n }",
"protected function registerQuery()\n {\n $query = $this->get_query();\n $this->set_parameter(self::PARAM_QUERY, $query);\n }",
"public function registerQueryTypes(array $queryTypes)\n {\n $this->queryTypes = array_merge($this->queryTypes, $queryTypes);\n }",
"public static function register(QueryInterface $query)\n {\n self::$queries[get_class($query)] = $query;\n }",
"public function registerCustomTypes()\n {\n // enum\n DbalService::getSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');\n }",
"public function setType($query_type = 'select')\n {\n\n }",
"public function registerCustomDoctrineType($class, $name, $type)\n {\n $this->connection->registerDoctrineType($class, $name, $type);\n }",
"public static function register_type() {\n\n\t\tregister_graphql_input_type(\n\t\t\t'UsersConnectionOrderbyInput',\n\t\t\t[\n\t\t\t\t'description' => __( 'Options for ordering the connection', 'wp-graphql' ),\n\t\t\t\t'fields' => [\n\t\t\t\t\t'field' => [\n\t\t\t\t\t\t'type' => [\n\t\t\t\t\t\t\t'non_null' => 'UsersConnectionOrderbyEnum',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t'order' => [\n\t\t\t\t\t\t'type' => 'OrderEnum',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t}",
"protected function initializeDoctrineTypeMappings() {}",
"public function registerGraphqlTypes()\n {\n $types = config('avored.graphql.types');\n\n foreach ($types as $typeName => $typeClass) {\n GraphQL::addType($typeClass, $typeName);\n }\n }",
"protected function setQueryType($type) {\n\t$this->QType=$type;\t\n\t}",
"public function register_metadata_type( $class_name ) {\n\n\t\t// TODO: we shoud not allow registration of metadatum types of retricted core metadatum types (e.g. compound, term) by plugins\n\n\t\tif ( is_object( $class_name ) ) {\n\t\t\t$class_name = get_class( $class_name );\n\t\t}\n\n\t\tif ( ! in_array( $class_name, $this->metadata_types ) ) {\n\t\t\t$this->metadata_types[] = $class_name;\n\t\t}\n\t}",
"protected function registerDoctrineTypes()\n {\n if (!class_exists(Type::class)) {\n return;\n }\n\n $types = $this->app['config']->get('database.dbal.types', [\n 'timestamp' => \\Illuminate\\Database\\DBAL\\TimestampType::class,\n ]);\n\n foreach ($types as $name => $class) {\n if (!Type::hasType($name)) {\n Type::addType($name, $class);\n }\n }\n }",
"function register_field_type($class)\n {\n }",
"public static function register_type() {\n\t\tregister_graphql_enum_type(\n\t\t\t'PostObjectsConnectionDateColumnEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The column to use when filtering by date', 'wp-graphql' ),\n\t\t\t\t'values' => [\n\t\t\t\t\t'DATE' => [\n\t\t\t\t\t\t'value' => 'post_date',\n\t\t\t\t\t],\n\t\t\t\t\t'MODIFIED' => [\n\t\t\t\t\t\t'value' => 'post_modified',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t}",
"static function wpbucket_aadd_custom_post_type_to_query($query){\n if ( is_admin() || ! $query->is_main_query() ) {\n return;\n }\n\n // Check if custom taxonomy is being viewed\n if( is_tax() && empty( $query->query_vars['suppress_filters'] ) )\n {\n $query->set( 'post_type', array(\n 'post',\n 'page',\n 'pi_portfolio'\n ) );\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get thirdparty workflow plugin classes. | protected function getWorkflowPlugins(): array
{
return $this->classDiscovery
->setRelativeNamespace('ProjectX\Plugin\Workflow')
->setSearchPattern('/.*Workflow\.php$/')
->getClasses();
} | [
"public function getPluginClasses()\n {\n $arr = array();\n foreach ($this->pluginInformations as $single) {\n $arr = array_merge($arr, $single->getPluginClasses());\n }\n return $arr;\n }",
"public function getPluginClass(): string;",
"public static function get_external_plugins() {\n\t\t$required_plugins = self::get_plugins();\n\n\t\t$plugins = array();\n\t\tforeach ( $required_plugins as $thim_plugin ) {\n\t\t\tif ( $thim_plugin->is_wporg() ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$plugins[] = $thim_plugin;\n\t\t}\n\n\t\treturn $plugins;\n\t}",
"static function loadPluginClasses() {\n $plugins = Plugin::getEnabledPlugins(false);\n if ($plugins) {\n foreach ($plugins as $plugin) {\n if (is_a($plugin, \"SociaLabs\\\\Plugin\")) {\n $plugin_class_name = \"SociaLabs\\\\\" . ucfirst($plugin->name) . \"Plugin\";\n $translation_class_name = \"SociaLabs\\\\\" . ucfirst($plugin->name) . \"Translation\";\n if (!class_exists($plugin_class_name, false)) {\n if (class_exists($plugin_class_name)) {\n if (class_exists($translation_class_name)) {\n new $translation_class_name;\n }\n new $plugin_class_name;\n }\n }\n }\n }\n }\n return;\n }",
"protected function getPluginCollection() {\n if (!$this->pluginCollection && $this->type) {\n $this->pluginCollection = new DefaultSingleLazyPluginCollection(\\Drupal::service('plugin.manager.workflows.type'), $this->type, $this->type_settings);\n }\n return $this->pluginCollection;\n }",
"public function getPluginTypes();",
"public function get_plugins_with_dependencies() {\n\t\treturn array_filter( $this->plugins, array( $this, 'has_dependencies' ) );\n\t}",
"protected function get_all_plugins() {\n if (isset(self::$_plugins[$this->_plugin_type]) && is_array(self::$_plugins[$this->_plugin_type])) {\n return self::$_plugins[$this->_plugin_type];\n } else {\n $classes = get_declared_classes();\n $implementsPlugin = array();\n foreach ($classes as $c) {\n $reflect = new ReflectionClass($c);\n if ($reflect->implementsInterface($this->_plugin_type)) {\n $implementsPlugin[] = $c;\n }\n }\n self::$_plugins[$this->_plugin_type] = $implementsPlugin;\n return $implementsPlugin;\n }\n }",
"protected static function pluginCommandClasses(): array\n {\n $classes = [];\n\n $environment = static::getEnvironmentInstance();\n\n $classes = array_merge(\n $classes,\n static::resolvePluginCommandClasses($environment)\n );\n\n foreach (['commandTypePluginManager'] as $id) {\n $classes = array_merge($classes, ...static::discoverPluginManagerCommands(\n static::service($id)\n ));\n }\n\n return $classes;\n }",
"function get_plugin_list_with_class($plugintype, $class, $file) {\n\n // NOTE: do not add any other debugging here, keep forever.\n\n return core_component::get_plugin_list_with_class($plugintype, $class, $file);\n}",
"function getClasses() {\n\t\treturn $this->_AutoloadArray;\n\t}",
"public function get_required_plugins() {\n\t\treturn (array) apply_filters( 'wds_required_plugins', array() );\n\t}",
"public function getPlugins()\n {\n }",
"public function getClasses() {\n\t\t$result = [\n\t\t\t'elgg-module',\n\t\t\t'elgg-module-widget',\n\t\t\t\"elgg-widget-instance-{$this->handler}\"\n\t\t];\n\t\t\n\t\t$can_edit = $this->canEdit();\n\t\tif ($can_edit) {\n\t\t\t$result[] = 'elgg-state-draggable';\n\t\t} else {\n\t\t\t$result[] = 'elgg-state-fixed';\n\t\t}\n\t\t\n\t\tif ($this->widget_manager_custom_class) {\n\t\t\t// optional custom class for this widget\n\t\t\t$result[] = $this->widget_manager_custom_class;\n\t\t}\n\t\t\n\t\tif ($this->widget_manager_hide_header == 'yes') {\n\t\t\tif ($can_edit) {\n\t\t\t\t$result[] = 'widget_manager_hide_header_admin';\n\t\t\t} else {\n\t\t\t\t$result[] = 'widget_manager_hide_header';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->widget_manager_disable_widget_content_style == 'yes') {\n\t\t\t$result[] = 'widget_manager_disable_widget_content_style';\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"function local_recompletion_get_supported_plugins() {\n global $CFG;\n $plugins = [];\n $files = scandir($CFG->dirroot. '/local/recompletion/classes/plugins');\n foreach ($files as $file) {\n $component = clean_param(str_replace('.php', '', $file), PARAM_ALPHAEXT);\n list($plugin, $type) = core_component::normalize_component($component);\n\n if (!core_component::is_valid_plugin_name($type, $plugin)) {\n continue;\n }\n\n if ($plugin != 'core' && core_component::get_component_directory($component)) {\n $plugins[] = core_component::normalize_componentname($component);\n }\n\n }\n return $plugins;\n}",
"public function &getClasses();",
"public static function getDependencies()\n {\n // This plugin does not depend on others so return an empty array.\n return array();\n }",
"public static function required_plugins() {\n\n\t\t// BuddyPress\n\t\tself::register_plugin( array(\n\t\t\t'plugin_name' => 'BuddyPress',\n\t\t\t'cbox_name' => 'BuddyPress',\n\t\t\t'cbox_description' => 'Social networking FTW!',\n\t\t\t'version' => '1.5.6'\n\t\t) );\n\n\t\t// BuddyPress Docs\n\t\tself::register_plugin( array(\n\t\t\t'plugin_name' => 'BuddyPress Docs',\n\t\t\t'cbox_name' => 'Docs',\n\t\t\t'cbox_description' => \"Add yer docs 'ere me matey!\",\n\t\t\t'version' => '1.1.22',\n\t\t\t'depends' => 'BuddyPress (>=1.5), Hello Dolly, Jigoshop',\n\t\t\t'download_url' => 'http://downloads.wordpress.org/plugin/buddypress-docs.1.1.22.zip',\n\t\t) );\n\n\t\t// WP Better Emails\n\t\tself::register_plugin( array(\n\t\t\t'plugin_name' => 'WP Better Emails',\n\t\t\t'cbox_name' => 'HTML Email',\n\t\t\t'cbox_description' => 'Enable and design HTML emails',\n\t\t\t'version' => '0.2.4',\n\t\t\t'download_url' => 'http://downloads.wordpress.org/plugin/wp-better-emails.0.2.4.zip'\n\t\t) );\n\n\t\treturn self::$required_plugins;\n\t}",
"public function getPlugin();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Render change email view. | public function changeEmail()
{
$breadCrumb = $this->userEngine
->breadcrumbGenerate('change-email');
$recentEmail = $this->userEngine
->getChangeRequestedEmail();
JavaScript::put(['newEmail' => __ifIsset($recentEmail['data'], $recentEmail['data']['new_email'], false)]);
return $this->loadPublicView('user.change-email', $breadCrumb['data']);
} | [
"public function changeEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('change-email');\n\n $recentEmail = $this->userEngine\n ->getChangeRequestedEmail();\n \n JavaScript::put(['newEmail' => __ifIsset($recentEmail['data'], $recentEmail['data']['new_email'], false)]);\n\n $breadCrumb['data']['hideSidebar'] = true;\n $breadCrumb['data']['showFilterSidebar'] = false;\n \n return $this->loadPublicView('user.change-email', $breadCrumb['data']);\n }",
"public function viewUpdateEmail()\n {\n return view('frontend.profile.update-email');\n }",
"public function email ()\n\t{\n\t\treturn $this->render('indexEmail');\n\t}",
"public function editEmail() {\r\n $errors = array();\r\n\r\n // Recuperation du user en session\r\n $user = Session::get('user');\r\n\r\n if ($this->_request->has('email') && $this->_request->has('email2')) {\r\n\r\n // Recuperation et nettoyage des donnees soumises\r\n $data['email'] = $this->_request->getPost('email');\r\n $data['email2'] = $this->_request->getPost('email2');\r\n\r\n // Recuperation du service\r\n $accountService = new AccountService();\r\n\r\n if ($accountService->updateTmpEmailForUser($data, $user)) {\r\n // Envoi d'un email pour confirmation\r\n $accountService->sendEmailForEmailActivation($user);\r\n\r\n // Renvoie vers une page de confirmation\r\n $content = $this->createView('Connexion/Account/email_ask_activation.php');\r\n $content->set('user', $user);\r\n\r\n // Construction de la reponse\r\n return $this->html($content);\r\n }\r\n\r\n // Recuperation des erreurs\r\n $errors = $accountService->getErrors();\r\n }\r\n\r\n // Generation du contenu de la page\r\n $content = $this->createView('Connexion/Account/edit_email.php');\r\n $content->set('errors', $errors);\r\n $content->set('user', $user);\r\n\r\n // Construction de la reponse\r\n return $this->html($content);\r\n }",
"public function emailView()\n {\n $this->load->view('mailview');\n }",
"public function changeEmail(){\n\t\t$title = 'Paramètres';\n\t\t$lang = 1 ;\n\t\tif(isset($_SESSION['neozorus']['u_language'])){\n\t\t\t$lang = $_SESSION['neozorus']['u_language'];\n\t\t}\n\t\t/* Vérification des entrées du fomulaire */\n\t\tif(!empty($this->data)){\t\t\n\t\t\t$check = $this->checkEmailValidity();\n\t\t\tif ($check !== true) {\n\t\t\t\t$error = $check;\n\t\t\t}elseif(empty($this->data['confirmNewEmail']) || $this->data['confirmNewEmail'] != $this->data['newEmail']){\n\t\t\t\t$error = 'Erreur de confirmation';\n\t\t\t}else{\n\t\t\t\t$check = $this->checkPassword();\n\t\t\t\tif ($check !== true) {\n\t\t\t\t\t$error = $check;\n\t\t\t\t}else{\n\t\t\t\t\t$model = new UserModel();\n\t\t\t\t\tif($model->updateEmail($_SESSION['neozorus']['u_id'], $this->data['newEmail'])){\n\t\t\t\t\t\t$success = 'Changement effectué avec succès';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$error = 'Erreur d\\'écriture dans la base de données';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tob_start();\n\t\trequire(VIEWS_PATH . DS . 'Parameters' . DS . 'ChangeEmail.php');\n\t\t$view = ob_get_contents();\n\t\tob_clean();\n\t\trequire(VIEWS_PATH . DS . 'Home' . DS . 'Layout_CardsAndRules.php');\n\t}",
"public function actionPreviewMail()\n {\n $mailTemplate = Order::getMailTemplate(\n 'Jose Perez',\n '1'\n );\n\n $this->layout = false;\n\n return $this->renderContent($mailTemplate);\n }",
"public function loginEmailView()\n {\n $this->basicRenderView('loginEmail');\n\n }",
"public function LiveCheckEmail()\n {\n View::render('welcome/LiveCheckEmail', $data);\n }",
"public function action_view_email()\n\t{\n\t\tglobal $txt, $context;\n\n\t\tcheckSession('get');\n\t\tvalidateToken('admin-ml', 'get');\n\n\t\t$id = $this->_req->getQuery('item', 'intval', null);\n\t\tif (!empty($id))\n\t\t{\n\t\t\t// Load up the email details, no funny biz ;)\n\t\t\t$temp_email = list_maillist_unapproved($id);\n\n\t\t\tif (!empty($temp_email))\n\t\t\t{\n\t\t\t\tif ($temp_email[0]['type'] !== 'p' && allowedTo('approve_emails'))\n\t\t\t\t{\n\t\t\t\t\t// The raw email that failed\n\t\t\t\t\t$data = $temp_email[0]['body'];\n\n\t\t\t\t\t// Read/parse this message for viewing\n\t\t\t\t\t$controller = new Emailpost(new EventManager());\n\t\t\t\t\t$controller->setUser(User::$info);\n\t\t\t\t\t$result = $controller->action_pbe_preview($data);\n\t\t\t\t\t$text = $result['body'] ?? '';\n\t\t\t\t\t$email_to = $result['to'] ?? '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// PM's mean just that ...\n\t\t\t\t\t$text = $txt['noaccess'];\n\t\t\t\t\t$email_to = $txt['private'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$text = $txt['badid'];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$text = $txt['badid'];\n\t\t}\n\n\t\t$parser = ParserWrapper::instance();\n\n\t\t// Prep and show the template with what we found\n\t\t$context['body'] = $parser->parseEmail($text);\n\t\t$context['to'] = $email_to ?? '';\n\t\t$context['notice_subject'] = $temp_email[0]['subject'] ?? '';\n\t\t$context['notice_from'] = $temp_email[0]['from'] ?? '';\n\t\t$context['page_title'] = $txt['show_notice'];\n\t\t$context['error_code'] = isset($temp_email[0]['error_code'], $txt[$temp_email[0]['error_code']]) ? $txt[$temp_email[0]['error_code']] : '';\n\t\t$context['sub_template'] = 'show_email';\n\t}",
"function editUserEmail()\n {\n // Auth::handleLogin() makes sure that only logged in users can use this action/method and see that page\n Auth::handleLogin();\n $this->view->render('login/edituseremail');\n }",
"public function actionEmailNotification() {\n\t\tif (Yii::$app->user->isGuest)\n\t\t\treturn $this->goHome();\n\t\t\n\t\treturn $this->render('email-notification');\n\t}",
"public function change_email_form() {\n if ($this->checkLogin('D') == '') {\n redirect('driver');\n } else {\n\n if ($this->lang->line('dash_change_email_address') != '')\n $dash_change_email_address = stripslashes($this->lang->line('dash_change_email_address'));\n else\n $dash_change_email_address = 'Change Email Address';\n\t\t\t$this->data['sideMenu'] = 'email';\n $this->data['heading'] = $dash_change_email_address;\n $this->load->view('driver/driversettings/change_email', $this->data);\n }\n }",
"public function ChangeEmailAction() {\n }",
"public function getEmailSettings()\n {\n return view('CorpPay.emails.set_email');\n }",
"public function reverificationEmailSentAction()\n {\n return $this->render(\"public/static-message.html.twig\", [\n 'title' => \"Verification Email Sent\",\n 'paragraphs' => [\n \"A verification link has been sent to the email address you provided. Please confirm your email address by clicking on the link in the email.\",\n \"If you do you not receive your verification link within 5 minutes, be sure to check your spam filters and junk mail. If you still do not see our welcome email, please <a href='/account/verify'>request a new verification link</a>.\"\n ]\n ]);\n }",
"public function renderEmail() {\n $content = '';\n foreach($this->object->info->attributes->attribute as $item) {\n $label = (string)$item->label;\n $name = (string)$item->name;\n $type = (string)$item->type;\n switch (Db_ObjectType::baseType($type)) {\n case 'text':\n $content .= '<strong>'.__($label).'</strong>: '.$this->object->get($name).'<br/>';\n break;\n case 'textarea':\n $content .= '<strong>'.__($label).'</strong>: '.nl2br($this->object->get($name)).'<br/>';\n break;\n case 'select':\n case 'radio':\n $content .= '<strong>'.__($label).'</strong>: '.$this->object->label($name).'<br/>';\n break;\n case 'date':\n case 'selectDate':\n $content .= '<strong>'.__($label).'</strong>: '.Date::sqlText($this->object->get($name), true).'<br/>';\n break;\n case 'checkbox':\n $value = ($this->object->get($name)==1) ? __('yes') : __('no');\n $content .= '<strong>'.__($label).'</strong>: '.$value.'<br/>';\n break;\n }\n }\n return '<p>'.$content.'</p>';\n }",
"public function viewAction()\n {\n $recordId = (int) $this->params('id', null);\n\n if (null === $recordId) {\n $this->flashMessenger()->setNamespace('error')\n \t->addMessage('You have attempted to access an invalid record.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n }\n\n $record = $this->emailsService->getEmails($recordId);\n\n if (null === $record) {\n $this->flashMessenger()->setNamespace('error')\n \t->addMessage('You have attempted to access an invalid record.');\n\n return $this->redirect()->toRoute('rocket-admin/accounts/emails');\n }\n\n $form = $this->emailsService->getEditEmailsForm($recordId);\n\n return new ViewModel(array(\n 'record' => $record,\n 'form' => $form,\n 'recordId' => $recordId,\n ));\n }",
"public function showEmailResetPassword()\n {\n return view('9shop.auth.Password.ask_email');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the specified PurchaseOtpNapasResponse from storage. | public function destroy($id)
{
$purchaseOtpNapasResponse = $this->purchaseOtpNapasResponseRepository->find($id);
if (empty($purchaseOtpNapasResponse)) {
Flash::error('Purchase Otp Napas Response not found');
return redirect(route('purchaseOtpNapasResponses.index'));
}
$this->purchaseOtpNapasResponseRepository->delete($id);
Flash::success('Purchase Otp Napas Response deleted successfully.');
return redirect(route('purchaseOtpNapasResponses.index'));
} | [
"public function deleteStoredResponse(): void {\n $this->keyValueExpirable->delete(self::ADVISORIES_JSON_EXPIRABLE_KEY);\n }",
"public function releaseConfirmed($response);",
"public function releaseRemainingAuthorization(OrderInterface $order, Order $orderResponse = NULL) : void;",
"public function clearResponse(){\n $this->intuitResponse = false;\n }",
"public function\n\t\t\tresponse_clear() {\n\t\t\t\t$this->response = null;\n\t\t\t}",
"public function removeFile() {\n\t\tif ($this->responseFile && file_exists($this->responseFile)) {\n\t\t\tunlink($this->responseFile);\n\t\t}\n\t\t$this->responseFile = NULL;\n\t}",
"public function removeResponses(SurveyManager_Entity_Response $response)\n {\n $this->responses->removeElement($response);\n $response->setSurvey(null);\n }",
"private function responseDelete()\n\t{\n\t\t$url = sprintf('%sResponses/responseDelete', self::HTTP_URL);\n\t\t$args = array(\n\t\t\t'response_id'\t=>\t$this->_setting->responseId,\n\t\t\t'plurk_id'\t\t=>\t$this->_setting->plurkId\n\t\t);\n\n\t\t$this->setResultType(PlurkResponseParser::RESULT_SUCCESS_TEXT);\n\t\treturn $this->sendRequest($url, $args);\n\t}",
"function libvirt_storagepool_destroy($res) : bool\n{\n}",
"public function declineLoanByShop()\n {\n if (empty($this->token) || time() > strtotime($this->expiration)) {\n if (! $this->receiveToken()) {\n return false;\n }\n }\n\n try {\n $response = $this->http_client->delete(\"user/{$this->customer_id}/sale/{$this->loan_id}\", [\n 'headers' => [\n 'Authorization' => \"Bearer {$this->token}\",\n ],\n ]);\n\n // The loan is canceled by shop.\n if ($response->getStatusCode() === 204) {\n $this->status = 'deleted';\n\n return $this->getResponse();\n }\n } catch (Exception $e) {\n $this->sendAlarmByTelegramBot($e);\n }\n\n return false;\n }",
"public function removeTrackAction()\n {\n $trackId = $this->getRequest()->getParam('track_id');\n $track = Mage::getModel('enterprise_rma/shipping')->load($trackId);\n if ($track->getId()) {\n try {\n $model = $this->_initModel();\n if ($model->getId()) {\n $track->delete();\n\n $this->loadLayout();\n $response = $this->getLayout()->getBlock('shipment_tracking')->toHtml();\n } else {\n $response = array(\n 'error' => true,\n 'message' => $this->__('Cannot initialize rma for delete tracking number.'),\n );\n }\n } catch (Exception $e) {\n $response = array(\n 'error' => true,\n 'message' => $this->__('Cannot delete tracking number.'),\n );\n }\n } else {\n $response = array(\n 'error' => true,\n 'message' => $this->__('Cannot load track with retrieving identifier.'),\n );\n }\n if (is_array($response)) {\n $response = Mage::helper('core')->jsonEncode($response);\n }\n $this->getResponse()->setBody($response);\n }",
"public function removeQuestion($request, $response) {\n // init data\n $this->init($request);\n\n // get the question ID\n $questionID = $request->getAttribute('questionID');\n\n $this->group->removeQuestion($questionID);\n $this->group->save();\n\n return $this->return($this->group->array(), $response);\n }",
"function remove_from_cart() {\n\t\ttry {\n\t\t\techo $this->api_model->delete_data(\"cart\" , ['package_id' => $this->jsonvalue['package_id'], 'user_id' => $this->user_data['id']]);\n\t\t} catch(Exception $e) {\n echo json_encode(array( \n \"status\" => $this->lang->line('json_error_status'), \n \"error\" => $e->getMessage()));\n exit;\n }\n\t}",
"public function testRemoveTrack()\n {\n $this->user->gasTracks()->save(factory(GasTrack::class)->make());\n\n $track = $this->user->gasTracks[0];\n\n $response = $this\n ->withHeaders(['Authorization' => $this->user->uid])\n ->get('/api/v1/gas-track/'.$track->id.'/delete?api_token=' . $this->user->api_token);\n\n $response->assertStatus(200);\n\n\n $this->assertDatabaseMissing('gas_tracks', $track->toArray());\n }",
"function delete_from_vault($paymentmethod){\n \n //Set Vault Id\n $vault_id = $paymentmethod['user_id'] . date('ymdHis',time());\n\n $url = 'https://gateway.teledraft.com/api/transact.php';\n \n $fields = array( \n //Set Variables To Pass To Phoenix Payments\n 'username'=>urlencode($paymentmethod['pp_user']),\n 'password'=>urlencode($paymentmethod['pp_password']),\n 'customer_vault'=>urlencode('delete_customer'),\n 'customer_vault_id'=>urlencode($vault_id)\n );\n \n //url-ify the data for the POST\n $fields_string = '';\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string,'&');\n \n //open connection\n $ch = curl_init();\n \n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n \n //execute post\n $result = curl_exec($ch);\n parse_str($result);\n //close connection\n curl_close($ch);\n \n $return_values['response'] = $response;\n $return_values['message'] = $responsetext;\n $return_values['vault_id'] = $vault_id;\n \n return $return_values;\n }",
"function delPromo_a($auth,$r){\n// Vista: /promosAdmin/gestion.php\n// Controlador: /promosAdmin/js/controller.promosAdmin.js\n//---------------------------------------------\n// Autenticacion: Requerida como Administrador\n// Objetivo: Eliminar promociones\n\n $cdgo = $r->id_code; //Nombre del codigo promocional recibido en la solicitud\n\n //Se elimina de la base de datos el codigo solicitado\n $cmd = \"DELETE FROM promocodes WHERE cdgo = '$cdgo'\";\n $code = executeSQL($cmd);\n\n if ($code === response_ok) {\n //Se elimina listado de clientes enlazados a la promocion eliminada\n $cmd = \"DELETE FROM assignm WHERE id_code = '$cdgo'\";\n $code = executeSQL($cmd);\n }\n\n $response = array();\n SendResponse($code,$response); //Se envia respuesta del servidor\n}",
"public function forgetSentInfo($uuid = null)\n {\n $key = $this->getStoreKey($uuid, self::SMS_INFO_KEY);\n $this->storage()->forget($key);\n }",
"public function otp_expire_post()\n {\n $response = new StdClass();\n $result = new StdClass();\n $device_id =$this->input->post('device_id');\n $mobile_no =$this->input->post('mobile_no');\n $data1->device_id = $device_id;\n $data1->mobile_no=$mobile_no;\n $res = $this->Customer->remove_otp($data1);\n if(!empty($mobile_no))\n {\n $data->message = 'success';\n $data->status = '1';\n array_push($result,$data);\n $response->data = $data;\n }\n else\n {\n $data->message = 'failed';\n $data->status = '0';\n array_push($result,$data);\n $response->data = $data;\n } \n echo json_output($response);\n }",
"public function purge(string $uri, array ...$options) : ResponseInterface\n {\n return $this->sendRequest($this->send($uri, 'PURGE', $options));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter users of type client | public function scopeClients($query)
{
return $query->where('user_type', '=', '2');
} | [
"public static function getClientsOnlyUsers()\n {\n return $user = User::join('entities','entities.id','users.entity_id')\n ->where('type','client')\n ->with('client');\n }",
"function filterByOwner($user_id);",
"public function list_owner_client()\n {\n $query = User::select(\n DB::raw(\"CONCAT(users.name,' ',users.lastname,' - ', roles.display_name) AS user\"), 'users.id')\n ->whereHas(\n 'roles', function($q){\n $q->where('name','=', 'owner');\n $q->orWhere('name','=', 'client');\n }\n )\n ->join('role_user', 'users.id', '=', 'role_user.user_id')\n ->join('roles', 'role_user.role_id', '=', 'roles.id')\n ->pluck('user', 'users.id')->all();\n\n return ['' => 'Seleccionar Destinatario'] + $query;\n }",
"function cpnFilterUserType() {\n\tglobal $get;\n\n\tswitch ($get->string('filter')) {\n\t\tcase 'cosplayers': return [\n\t\t\tpudl::find('user_type', [\n\t\t\t\t'cosplay-male',\n\t\t\t\t'cosplay-female',\n\t\t\t\t'cosplay-other',\n\t\t\t]),\n\t\t];\n\n\t\tcase 'photographers': return [\n\t\t\tpudl::find('user_type', [\n\t\t\t\t'photo-event',\n\t\t\t\t'photo-shoot',\n\t\t\t]),\n\t\t];\n\n\t\tcase 'videographers': return [\n\t\t\tpudl::find('user_type', [\n\t\t\t\t'video-coverage',\n\t\t\t\t'video-interview',\n\t\t\t\t'video-music',\n\t\t\t]),\n\t\t];\n\n\t\tcase 'commissioners': return [\n\t\t\tpudl::find('user_type', [\n\t\t\t\t'commission-general',\n\t\t\t\t'commission-wig',\n\t\t\t\t'commission-seamstress',\n\t\t\t\t'commission-props',\n\t\t\t\t'commission-casting',\n\t\t\t\t'commission-armor',\n\t\t\t\t'commission-accessories',\n\t\t\t]),\n\t\t];\n\t}\n\n\tunset($_GET['filter']);\n\treturn '';\n}",
"public function getEventFilters(User $user);",
"public function filterOwnedOrManaged();",
"public function filterUsersByProvider(array $users, array $filter): array;",
"function filter_users($type=''){\n\t\t$data['pending_users']\t=\t$this->user_model->users_list($status = '0');\n\t\t$data['all_users']\t=\t$this->user_model->users_filtered_list($type);\n\t\t$data['user_types']\t=\t$this->user_model->users_types();\t\t\n\t\t$data['selected']\t=\t$type;\n\t\t$data['title']\t\t=\t'Grading System | Admin Manage Users';\n\t\t$data['main_content'] \t= \t'admin/admin_manage_users';\n\t\t$data['page']\t\t=\t'users';\n\t\t$this->load->view('admin/default/template',$data);\n\t}",
"public function filter()\n { \n if (func_num_args() > 2) {\n $owner_types = array_slice(func_get_args(), 2);\n if(!in_array(ResourceServer::getOwnerType(), $owner_types)) {\n return Response::json(array(\n 'status' => 403,\n 'error' => 'forbidden',\n 'error_message' => 'Only access tokens representing ' . implode(',', $owner_types) . ' can use this endpoint',\n ), 403);\n }\n }\n }",
"public function filterOwnedBy($user)\n {\n return $this->getData()->filter($this->owner_field, $user);\n }",
"public function userIdFiltering(&$filter)\n {\n // Enter your code here\n }",
"static public function filter_users_filter($users)\n {\n\n if (!current_user_can('edit_others_wpp_properties')) {\n $users = array();\n }\n\n return $users;\n\n }",
"function filterCreatedByUsers($user_ids) {\n $this->setCreatedByFilter(self::USER_FILTER_SELECTED);\n\n if(is_array($user_ids)) {\n foreach($user_ids as $k => $v) {\n $user_ids[$k] = (integer) $v;\n } // foreach\n } else if($user_ids) {\n $user_ids = array($user_ids);\n } else {\n $user_ids = null;\n } // if\n\n $this->setAdditionalProperty('created_by_users', $user_ids);\n }",
"function Collaborators_Friend_Collaborators_Where($userid,$inscriptionsonly=TRUE,$inscribedonly=True)\n {\n if ($inscribedonly)\n {\n $where=array\n (\n \"Friend\" => $userid,\n );\n }\n\n }",
"public function testFilterIncludeAllServersWhenAdministrator()\n {\n /** @var \\Pterodactyl\\Models\\User[] $users */\n $users = factory(User::class)->times(3)->create();\n $users[0]->root_admin = true;\n\n $servers = [\n $this->createServerModel(['user_id' => $users[0]->id]),\n $this->createServerModel(['user_id' => $users[1]->id]),\n $this->createServerModel(['user_id' => $users[2]->id]),\n ];\n\n $response = $this->actingAs($users[0])->getJson('/api/client?filter=all');\n\n $response->assertOk();\n $response->assertJsonCount(3, 'data');\n\n for ($i = 0; $i < 3; $i++) {\n $response->assertJsonPath(\"data.{$i}.attributes.server_owner\", $i === 0);\n $response->assertJsonPath(\"data.{$i}.attributes.identifier\", $servers[$i]->uuidShort);\n }\n }",
"public function filteruser() {\r\n $filters = $_POST;\r\n global $conn;\r\n $usersgroup = new User($conn);\r\n if(isset($_POST)){\r\n $_SESSION['searchedUser'] = $usersgroup->getAllUsersByFilter($filters);\r\n }\r\n View::load('pages', 'resultscreen');\r\n }",
"private function filterForUser(&$query){\n\n $idApp=Yii::$app->params['sesionApp']['idApp'];\n $userRole=Yii::$app->params['sesionApp']['userRole'];\n $idUser=Yii::$app->params['sesionApp']['userId'];\n\n switch(Perfil::roleToCodePerfil($userRole)){\n case 'ADM':\n case 'EJE':\n // llamamos todos los pedidos de la aplicacion\n $query->where(['pedido.app_idApp'=>$idApp]); \n break;\n case 'RES':\n // llamamod a todos los pedido del responsable y sus encargados\n $empleados=User::getEmployes($idApp,$idUser); //Obtenemos los empleados del usuario\n $query->where(['pedido.app_idApp'=>$idApp,'idResponsable'=>array_merge([$idUser],$empleados)]); \n break;\n\n case 'OPE':\n $query->where(['pedido.app_idApp'=>$idApp,'idResponsable'=>$idUser]); \n\n }\n\n }",
"public function filter_by_users($data){\n $userType = $data->userType;\n if($userType != \"ADMIN\"){\n $userId = \"AND `register_by` = '$userId'\";\n }\n else{\n $userId = \"\";\n }\n\n $user_type = $data->user_type;\n $sql = \"SELECT `user_id`, `fname`, `lname`, `email`, `mobile`, `user_type` FROM `user_master` WHERE `user_type` = '$user_type' \" . $userId . \"ORDER BY `user_type`\";\n $res = mysqli_query($this->conn, $sql);\n if(mysqli_num_rows($res)>0){\n while($rows = mysqli_fetch_array($res)){\n $name = $rows[1]. \" \" .$rows[2]; \n $result[]= array(\"user_id\"=>$rows[0],\n \"name\"=>$name, \n \"email\"=>$rows[3],\n \"mobile\"=>$rows[4],\n \"user_type\"=>$rows[5]\n );\n }\n echo json_encode($result);\n }\n else{\n echo mysqli_error($this->conn);\n echo \"EMPTY\";\n }\n\n\n }",
"public function getFilteredUsers($device_type, $app_id) {\n \n $query = \"SELECT * FROM gcm_users WHERE 1 = 1\";\n \n if($device_type) {\n $query = $query . \" AND device_type = '$device_type'\";\n }\n \n if($app_id) {\n $query = $query . \" AND app_id = '$app_id'\";\n }\n \n $result = mysql_query($query);\n \n return $result;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds one or more hidden fields. | public function addHiddenFields()
{
// loop fields
foreach(func_get_args() as $argument)
{
// not an array
if(!is_array($argument)) $this->add(new SpoonHiddenField($argument));
// array
else
{
foreach($argument as $name => $defaultValue) $this->add(new SpoonHiddenField($name, $defaultValue));
}
}
} | [
"private function show_hidden() {\n\n if (!empty($this->_hiddenfields)) {\n\n foreach ($this->_hiddenfields as $name => $value) {\n ?>\n <input type=\"hidden\" name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" value=\"<?php echo $value; ?>\">\n <?php\n }\n\n // Clear the array\n $this->_hiddenfields = array();\n\n }\n }",
"public function add_hidden_input_fields($pairs)\n {\n foreach ($pairs as $name => $value)\n {\n $this->add_hidden_input_field($name, $value);\n }\n }",
"function addHiddenField($id,$name,$value,$form)\r\n\t{\r\n\t\t$type = 'hidden';\r\n\t\t$class = 'hidden';\r\n\r\n\t\treturn $this->addTrayElement($type,$id,$name,$value,$class,$form);\r\n\t}",
"private function add_hidden_fields_to_fieldset( &$fieldset, $hidden ){\n\t\tforeach(array_keys( $hidden) as $key ){\n\t\t\t$value = $hidden[$key];\n\t\t\t$fieldset->addElement('hidden', $key)->setValue( $value );\n\t\t}\n\t}",
"abstract public function getHiddenFields();",
"public function maybe_render_extra_hidden_fields () {\n\t\t$fields = $this->__get( 'extra_hidden_fields' );\n\n\t\t$html = '';\n\t\tif ( is_array( $fields ) && 0 < count( $fields ) ) {\n\t\t\tforeach ( $fields as $k => $v ) {\n\t\t\t\t$html .= '<input type=\"hidden\" name=\"' . esc_attr( $k ) . '\" value=\"' . esc_attr( $v ) . '\" />' . \"\\n\";\n\t\t\t}\n\t\t}\n\t\techo $html;\n\t}",
"function create_HiddenInputs() {\n $this->hiddenInputs = '';\n $donotHide = array('searchfor','o','sortorder','start','act','sl_tags','sl_id','delete');\n foreach($_REQUEST as $key=>$val) {\n if (!in_array($key,$donotHide,true)) {\n $this->hiddenInputs.=\"<input type='hidden' value='$val' name='$key'>\\n\";\n }\n }\n }",
"protected function render_hidden_fields()\n {\n }",
"function addHiddenField($name,$value) {\r\n $element['type'] = 'hidden';\r\n $element['name'] = $name;\r\n $element['value'] = $value;\r\n $element['code'] = \"<input type='hidden' name='{$element['name']}' value='{$element['value']}'>\";\r\n\r\n return $this->addElement($element);\r\n }",
"function hidden_fields($field_name) {\n\t\t$this->hidden_fields = func_get_args();\n\n\t}",
"protected function hideFieldsForAddEdit()\n {\n }",
"protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->id->Visible = FALSE;\n\t}",
"function AddHidden($name, $value)\n\t{\n\t\techo \"<input type=hidden id=$name name=$name value=\\\"$value\\\">\\n\";\n\t}",
"protected function hideFieldsForAddEdit()\n {\n if ($this->isAdd() || $this->isCopy() || $this->isGridAdd()) {\n $this->id->Visible = false;\n }\n }",
"protected function hideFieldsForAddEdit()\n\t{\n\t}",
"public function setFieldsAsHidden(array $fieldIdList);",
"public function render_hidden_fields()\n\t{\n\t\tif (!empty($this->hidden_fields)) {\n\t\t\tforeach ($this->hidden_fields as $hidden) {\n\t\t\t\t$hidden->render();\n\t\t\t}\n\t\t}\n\t}",
"function block_editor_meta_box_hidden_fields()\n {\n }",
"public function addHidden($attributes = null)\n {\n $attributes = is_array($attributes) ? $attributes : func_get_args();\n $this->hidden = array_merge($this->hidden, $attributes);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add magento admin alert for expiring cards | public function alertExpiredCards(){
foreach($this->_cardsExpiring() as $card) {
$inbox = mage::getModel('adminNotification/feed');
$description = "<strong>Realex Payments:</strong> You have cards that are about to expire.";
$inbox->addNotice($description, Mage::helper('adminhtml')->getUrl('realexAdmin/adminhtml_tokencard/edit', array('id' => $card->getId())));
}
return $this;
} | [
"public function embargo_expiration_notice() {\n $this->mods->addNote(\"sent \" . date(\"Y-m-d\"), \"admin\", \"embargo_expiration_notice\");\n // log the event in the record history\n $this->premis->addEvent(\"notice\",\n \"Embargo Expiration 60-Day Notification sent by ETD system\",\n \"success\", array(\"software\", \"etd system\"));\n }",
"function email_expiration_notification() {\r\n do_action('email_expiration_notification');\r\n}",
"public function addAdminAlert()\n {\n }",
"public function notifyAdminCardExpiring(Users_Model_User $admin, Companies_Model_Company $company) {\r\n $templateVars = array(\r\n 'userName' => empty($admin->name) ? $admin->mail : $admin->name,\r\n 'companyLink' =>\r\n $this->getView()->serverUrl() .\r\n $this->getView()->urlGenerator()->companyUrl($company),\r\n 'company' => $company\r\n );\r\n\r\n $this->getView()->assign($templateVars);\r\n $mailBody = $this->getView()->render('admin/card-expiring.phtml');\r\n\r\n $mailConfig = array(\r\n 'toMail' => $admin->mail,\r\n 'body'=> $mailBody,\r\n 'fromText' => 'Revudio',\r\n 'subject' => 'Subscription Alert',\r\n );\r\n\r\n $mail = new Main_Mail_Smtp($mailConfig);\r\n $mail->send();\r\n }",
"public static function send_admin_expiring_notice() {\n\t\tself::maybe_init();\n\n\t\t$email_key = WP_Job_Manager_Email_Admin_Expiring_Job::get_key();\n\t\tif ( ! self::is_email_notification_enabled( $email_key ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$settings = self::get_email_settings( $email_key );\n\t\t$days_notice = WP_Job_Manager_Email_Admin_Expiring_Job::get_notice_period( $settings );\n\t\tself::send_expiring_notice( $email_key, $days_notice );\n\t}",
"public static function paymentExpired(){\n $cust = new Customer();\n $customerPaymentExpiryList = $cust->select('gym_id', 'name', 'phone', 'package_end_date')->where('payment_expiry', $this->paymentExpired)->get();\n foreach ($customerPaymentExpiryList as $element) {\n $element->gym->notify(new PaymentReminder($element, 'expired'));\n } \n }",
"public static function paymentExpiring(){\n $cust = new Customer();\n $customerPaymentExpiryList = $cust->select('gym_id', 'name', 'phone', 'package_end_date')->where('payment_expiry', $this->paymentExpiring)->get();\n foreach ($customerPaymentExpiryList as $element) {\n $element->gym->notify(new PaymentReminder($element, 'expiring'));\n } \n }",
"function envato_toolkit_credentials_admin_notices() {\n $message = sprintf( __( \"To enable theme update notifications, please enter your Envato Marketplace credentials in the %s\", \"codeless\" ),\n \"<a href='\" . admin_url() . \"admin.php?page=envato-wordpress-toolkit'>Envato WordPress Toolkit Plugin</a>\" );\n echo \"<div id='message' class='updated below-h2'><p>{$message}</p></div>\";\n }",
"public function messageSessionExpired(){\n $this->addFlash(\n 'warning',\n 'Votre session a expirée'\n );\n }",
"public function action_email_services_expired()\n {\n\n $services = Model_Extra::get_services_expired(30,false,null);\n\n $title = \"Services due for Renewal - 30 days from now\";\n $model = new Model_Notifications();\n $from = 'IB EXTRA <extra@ideabubble.ie>';\n $to = 'accounts@ideabubble.ie';\n\n $model->set_from($from);\n $result = $model->send_to_custom($to,View::factory('email/services-upcoming-renewals-digest', array('services' => $services,'title' => $title))->set('skip_comments_in_beginning_of_included_view_file', true)->render(),$title);\n\n if ($result)\n {\n echo 'email sent ok';\n }\n else\n echo 'email not sent due to an error';\n\n }",
"public function missionclientalertAction()\n {\n $ao_obj=new Ep_Ao_Delivery();\n \n $missions=$ao_obj->publishtimeaoclientmail();\n print_r($missions);//exit;\n if(count($missions)>0)\n {\n for($m=0;$m<count($missions);$m++)\n {\n\t\t\t\t$parameters['clientartname_link'] = \"/client/quotes?id=\".$missions[$m]['artId'];\n $parameters['AO_title']=$missions[$m]['title'];\n $expires=$missions[$m]['publishtime']+(60*$missions[$m]['participation_time']);\n $parameters['submitdate_bo']=date('d/m/Y H:i', $expires);\n \n $this->messageToEPMail($missions[0]['client_id'],5,$parameters);\n\t\t\t\t\t\n\t\t\t\t/** Post comments on FB**/ \n $array['cronmailclient_publish']='yes';\n $where=\" id='\".$missions[$m]['id'].\"'\";\n $ao_obj->updateDelivery($array,$where); \n }\n } \n }",
"function new_user_email_admin_notice() {}",
"protected function paymentExpired(): void\n {\n $this->order->addStatusHistoryComment(__('3DS payment expired.'));\n $this->handleFailedPayment($this->order);\n }",
"public function cardaddAction()\n {\n try {\n\n $customer = $this->getCustomer();\n\n $this->loadLayout();\n\n $block = $this->getLayout()->getBlock('xpaymentsconnector_customer_usercards_add');\n\n $response = Mage::helper('settings_xpc')->getZeroAuthMethod()\n ->obtainToken(null, $customer);\n\n if (!$response->getStatus()) {\n\n $error = !empty($response->getErrorMessage())\n ? $response->getErrorMessage()\n : 'Unable to obtain token from X-Payments';\n\n $block->setError($error);\n\n } else {\n\n $fields = array(\n 'target' => 'main',\n 'action' => 'start',\n 'token' => $response->getField('token'),\n 'allow_save_card' => 'Y',\n );\n\n Mage::getSingleton('customer/session')->setData('xpc_fields', $fields);\n }\n\n $this->renderLayout();\n\n } catch (Exception $e) {\n\n Mage::getSingleton('customer/session')->addError($this->__($e->getMessage()));\n\n $this->_redirect('xpaymentsconnector/customer/usercards');\n }\n }",
"function new_user_email_admin_notice()\n {\n }",
"public function testFrontendDetailsPriceAlert()\n {\n $aPriceAlarmData['oxemail'] = 'example_test@oxid-esales.dev';\n $aPriceAlarmData['oxprice'] = '99.99';\n $aPriceAlarmData['oxcurrency'] = 'EUR';\n $aPriceAlarmData['oxartid'] = '1001';\n $this->callShopSC('oxPriceAlarm', 'save', null, $aPriceAlarmData);\n\n $this->loginAdmin(\"Customer Info\", \"Price Alert\");\n $this->type(\"where[oxpricealarm][oxemail]\", \"example_test@oxid-esales.dev\");\n $this->clickAndWait(\"submitit\");\n $this->assertEquals(\"example_test@oxid-esales.dev\", $this->getText(\"//tr[@id='row.1']/td[1]\"));\n $this->assertEquals(\"Test product 1 [EN] šÄßüл\", $this->getText(\"//tr[@id='row.1']/td[5]\"));\n $this->assertEquals(\"99,99 EUR\", $this->getText(\"//tr[@id='row.1']/td[6]\"));\n $this->assertEquals(\"100,00 EUR\", $this->getText(\"//tr[@id='row.1']/td[7]\"));\n }",
"function at_expired_license_notice() {\n\n\t// Only for testing purposes. Leave commented.\n\t// delete_transient( 'expired_license_check' );\n\n\t// Perform checks only once every 12 hours\n\tif ( false === get_transient( 'expired_license_check' ) ) {\n\n\t\tglobal $quadro_options;\n\n\t\t// Define empty variable to prevent errors\n\t\t$response = '';\n\n\t\t// Don't show the notice if no field is completed (we show the previous one)\n\t\tif ( $quadro_options['quadro_username'] === '' || $quadro_options['quadro_userpass'] === '' || $quadro_options['quadro_userlicense'] === '' ) return false;\n\n\t\t// Check for license expiration\n\t\t$check_url = 'https://artisanthemes.io/api/theme-updates-check';\n\t\t\n\t\t$send_for_check = array(\n\t\t\t'body' => array(\n\t\t\t\t'item_slug' \t=> get_option('template'),\n\t\t\t\t'username' \t\t=> $quadro_options['quadro_username'],\n\t\t\t\t'userpass' \t\t=> $quadro_options['quadro_userpass'],\n\t\t\t\t'license' \t\t=> $quadro_options['quadro_userlicense'],\n\t\t\t\t'domain' \t\t=> esc_url( $_SERVER['SERVER_NAME'] ),\n\t\t\t)\n\t\t);\n\n\t\t$raw_response = wp_remote_post($check_url, $send_for_check);\n\t\t\n\t\tif ( !is_wp_error($raw_response) && isset($raw_response['response']) && $raw_response['response']['code'] == 200 ) {\n\t\t\t// remove SSL message from response\n\t\t\t$response = str_replace( '<!-- Really Simple SSL mixed content fixer active -->', '', $raw_response['body'] );\n\t\t}\n\n\t\t// Set License Expiration Check Transient\n\t\tset_transient( 'expired_license_check', $response, 12 * HOUR_IN_SECONDS );\n\n\t} else {\n\n\t\t// Output cached notice\n\t\t$response = wp_kses_post( get_transient( 'expired_license_check' ) );\n\n\t}\n\n\t// If response is 'ok' we don't show the notice\n\tif ( $response == 'ok' ) return false;\n\t\n\t?>\n\t<div class=\"at-admin-notice notice notice-error is-dismissible\" data-notice=\"expired_license\">\n\n\t\t<input type=\"hidden\" id=\"at_notices_nonce\" name=\"at_notices_nonce\" value=\"<?php echo wp_create_nonce('at_notices_nonce'); ?>\" />\n\n\t\t<?php if ( $response == 'The password for this user does not match the registered password.' ) { ?>\n\t\t\t<p><?php _e( 'You might be missing important updates and new features by not activating your theme. Please', 'quadro'); ?> <a href=\"<?php echo admin_url( 'themes.php?page=quadro-settings' ); ?>\"><?php _e('make sure the password on your license details is correct.', 'quadro' ); ?></a></p>\n\t\t<?php } else if ( $response == 'This is not a valid username. Please make sure you are registered at artisanthemes.io before going on.' ) { ?>\n\t\t\t<p><?php _e( 'You might be missing important updates and new features by not activating your theme. Please', 'quadro'); ?> <a href=\"<?php echo admin_url( 'themes.php?page=quadro-settings' ); ?>\"><?php _e('make sure the username on your license details is correct.', 'quadro' ); ?></a></p>\n\t\t<?php } else if ( $response == 'This theme has not been registered for this user yet. Please login at https://artisanthemes.io and register it at your profile section.' ) { ?>\n\t\t\t<p><?php _e( 'You might be missing important updates and new features by not activating your theme. Please', 'quadro'); ?> <a href=\"<?php echo admin_url( 'themes.php?page=quadro-settings' ); ?>\"><?php _e('make sure the license ID on your license details is correct.', 'quadro' ); ?></a></p>\n\t\t<?php } else if ( $response == \"This license isn't active right now. Please renew it to keep the theme updated.\" ) { ?>\n\t\t\t<p><?php _e( 'Your theme license is expired. To avoid missing important updates and new features,', 'quadro'); ?> <a href=\"https://artisanthemes.io/dashboard\"><?php _e('renew it here.', 'quadro' ); ?></a>\n\t\t\t\t<br /><?php _e('(This message will refresh after some hours)', 'quadro' ); ?>\n\t\t\t</p>\n\t\t<?php } else { ?>\n\t\t\t<p><?php echo $response; ?></p>\n\t\t<?php } ?>\n\t\n\t</div>\n\t<?php\n\t\n}",
"public function activation_admin_notice() {\n\n }",
"function churchthemes_sl_license_expired() {\n\t\techo 'Your license key has expired. Please <a href=\"http://churchthemes.net\">purchase a new license key</a> to enable theme support and automatic updates.';\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write the provided RESTfmData object into a formatted string. | public function write (RESTfmDataAbstract $restfmData) {
$xml = new XmlWriter();
$xml->openMemory();
if (RESTfmConfig::getVar('settings', 'formatNicely')) {
$xml->setIndent(TRUE);
}
$xml->startDocument('1.0', 'UTF-8');
$xml->startElement('resource');
$xml->writeAttribute('xmlns', 'http://www.restfm.com');
// Deprecated. We don't use xlink now as hrefs are now first class
// meta entities.
//$xml->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
foreach ($restfmData->getSectionNames() as $sectionName) {
$xml->startElement($sectionName);
$this->_writeSection($xml, $restfmData, $sectionName);
$xml->endElement();
}
$xml->endElement();
return $xml->outputMemory(TRUE);
} | [
"public function serialize($data, string $format): string;",
"public function writeFormat() {\n\t\t$args = func_get_args();\n\t\t$str = call_user_func_array('sprintf', $args);\n\n\t\treturn $this->write($str);\n\t}",
"public function format($data);",
"public function write (\\RESTfm\\Message\\Message $restfmMessage);",
"public function write($data) {}",
"protected function format_data() {}",
"public function writeToString($data){\n\t\t$fh = fopen(\"php://temp\", \"w\");\n\t\t$this->writeToStream($fh, $data);\n\t\trewind($fh);\n\t\t$ret = stream_get_contents($fh);\n\t\tfclose($fh);\n\t\treturn $ret;\n\t}",
"private function formatData($data){\n if (in_array('print', $this->args)){\n return print_r($data);\n } else{\n return json_encode($data);\n }\n }",
"private function write(string $data)\n {\n $this -> printer -> getPrintConnector() -> write($data);\n }",
"protected function write( $data )\n {\n echo $data;\n }",
"private function write($data)\n {\n $this -> printer -> getPrintConnector() -> write($data);\n }",
"public function write($formatedText);",
"public function serialize($data, $format = 'json');",
"public function write();",
"function write($data) {\n\n\t\t\t$this->body .= $data;\n\t\t}",
"public static function _format($data, array $context = [])\n {\n if (is_string($data)) {\n return $data;\n }\n\n $object = is_object($data);\n\n if ($object && method_exists($data, '__toString')) {\n return (string)$data;\n }\n\t\t\n\t\tif ($object && $data instanceof Query) {\n\t\t\treturn sql($data);\n\t\t}\n\n if ($object && $data instanceof JsonSerializable) {\n return json_encode($data);\n }\n\n return print_r($data, true);\n }",
"private function formatData()\n {\n $arr = array();\n\n // loop through $this->data\n foreach($this->data as $key => $value){\n // assign as an item of $arr (field=value)\n $arr[] = $key . '='. urlencode($value);\n }\n\n // Implode the array using & as the glue and store the data\n $this->curl_str = implode('&', $arr);\n }",
"public function writePact(): string\n {\n return $this->getPactJson();\n }",
"function fdf_save_string($fdfdoc) {}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scans a download item for tags | function plugin_tag_scantag_downloads($id)
{
global $_TABLES, $_TAG_CONF;
$retval = array();
$tag_name = 'tag';
if (!empty($_TAG_CONF['tag_name'])) {
$tag_name = $_TAG_CONF['tag_name'];
}
$tags = DB_getItem($_TABLES['downloads'], 'tags',
"lid='" . DB_escapeString($id) . "'");
if (!empty($tags)) {
$content = '[' . $tag_name . ':' . stripslashes($tags) . ']';
$retval = TAG_scanTag($content);
$retval = array_unique($retval);
}
return $retval;
} | [
"function plugin_tag_scanall_downloads()\n{\n global $_TABLES, $_TAG_CONF;\n\n $tag_name = 'tag';\n if (!empty($_TAG_CONF['tag_name'])) {\n $tag_name = $_TAG_CONF['tag_name'];\n }\n\n $sql = \"SELECT lid, tags FROM {$_TABLES['downloads']}\";\n $result = DB_query($sql);\n while ($A = DB_fetchArray($result)) {\n if (!empty($A['tags'])) {\n $content = '[' . $tag_name . ':' . stripslashes($A['tags']) . ']';\n $tags = TAG_scanTag($content);\n foreach ($tags as $tag) {\n TAG_saveTagToList($tag);\n TAG_saveTagToMap($tag, $A['lid'], 'downloads');\n }\n }\n }\n}",
"public function fetch_tags() {\n $getID3 = new \\getID3;\n $fileInfo = $getID3->analyze($this->path);\n\n // Get all the common tags\n /* if (isset($fileInfo['tags_html'])) {\n $this->tags = $fileInfo['tags_html']['id3v2'];\n }*/\n // Adding the cover art if it is available\n if (isset($fileInfo['comments']['picture'])) {\n $this->tags['image'] = $fileInfo['comments']['picture'][0];\n }\n }",
"protected function find_tags(){\n\t\tpreg_match_all(\"/%(.+?)%/\", $this->default, $this->tags );\n\t}",
"protected function _search_tags()\n\t{\n\t\t// Keep track whether it's an 'entry' query\n\t\t$entry_query = FALSE;\n\t\t\n\t\t// Channel\n\t\tif ($this->params['channel'])\n\t\t{\n\t\t\t// Get the IDs of the entries\n\t\t\t$this->parse_multiple_params('channel_id', $this->params['channel'], 'exp_channels', 'channel_name', 'channel_id');\n\t\t\t\n\t\t\t$ids = array();\n\t\t\t$query = $this->ee->db->select('entry_id')->get('channel_titles')->result();\n\t\t\tforeach ($query as $row) { $ids[] = $row->entry_id; }\n\t\t\t\n\t\t\t// Limit this query to the tags in this channel\n\t\t\t$entry_query = TRUE;\n\t\t\t\n\t\t\tif ($ids)\n\t\t\t{\n\t\t\t\t$this->ee->db->where_in('exp_taggable_tags_entries.entry_id', $ids);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Limit\n\t\tif ($this->params['limit'])\n\t\t{\n\t\t\t$this->ee->db->limit($this->params['limit']);\n\t\t}\n\t\t\n\t\t// Orderby and Sort\n\t\tif ($this->params['sort'])\n\t\t{\n\t\t\t$this->ee->db->order_by($this->params['orderby'] . \" \" . strtoupper($this->params['sort']));\n\t\t}\n\n\t\t// Tag ID\n\t\tif ($this->params['tag_id'])\n\t\t{\n\t\t\t$this->parse_multiple_params('exp_taggable_tags.id', $this->params['tag_id']);\n\t\t}\n\n\t\t// Tag Name\n\t\tif ($this->params['tag_name'])\n\t\t{\n\t\t\t$this->parse_multiple_params('exp_taggable_tags.name', $this->params['tag_name']);\n\t\t}\n\n\t\t// Tag URL Name\n\t\tif ($this->params['tag_url_name'])\n\t\t{\n\t\t\t$this->params['tag_url_name'] = str_replace($this->params['url_separator'], ' ', $this->params['tag_url_name']);\n\t\t\t$this->parse_multiple_params('exp_taggable_tags.name', $this->params['tag_url_name']);\n\t\t}\n\t\t\n\t\t// Template/Field Name\n\t\tif ($this->params['field'])\n\t\t{\n\t\t\t$entry_query = TRUE;\n\t\t\t\n\t\t\tif (strpos($this->params['field'], \"|\"))\n\t\t\t{\n\t\t\t\t$fields = explode(\"|\", $this->params['field']);\n\t\t\t\t\n\t\t\t\tforeach ($fields as $field)\n\t\t\t\t{\n\t\t\t\t\t$this->ee->db->or_where('exp_taggable_tags_entries.template', $field);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ee->db->where('exp_taggable_tags_entries.template', $this->params['field']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Entry ID\n\t\tif ($this->params['entry_id'])\n\t\t{\n\t\t\t$entry_query = TRUE;\n\t\t\t$this->parse_multiple_params('exp_taggable_tags_entries.entry_id', $this->params['entry_id']);\n\t\t}\n\n\t\t// Entry Title\n\t\tif ($this->params['entry_url_title'])\n\t\t{\n\t\t\t$entry_query = TRUE;\n\t\t\t$this->parse_multiple_params(\"exp_channel_titles.url_title\", $this->params['entry_url_title']);\n\t\t\t$this->ee->db->where(\"exp_taggable_tags_entries.entry_id = exp_channel_titles.entry_id\")->from('exp_channel_titles');\n\t\t}\n\n\t\t// Distinct?\n\t\tif ($entry_query)\n\t\t{\n\t\t\t$this->ee->db->distinct();\n\t\t}\n\n\t\t// Select star\n\t\t$this->ee->db->select('exp_taggable_tags.id, exp_taggable_tags.name, exp_taggable_tags.description');\n\n\t\t// MSM\n\t\t$this->ee->db->where('exp_taggable_tags.site_id', $this->site_id);\n\n\t\t// Find the tags\n\t\tif ($entry_query)\n\t\t{\n\t\t\t$this->ee->db->where('exp_taggable_tags.id = exp_taggable_tags_entries.tag_id');\n\t\t\t$this->ee->db->from('exp_taggable_tags_entries');\n\t\t}\n\n\t\t// taggable_tags_find_query\n\t\t$this->ee->extensions->call('taggable_tags_find_query');\n\n\t\t// Entry counts\n\t\t$this->ee->db->select('(SELECT COUNT(*) FROM exp_taggable_tags_entries WHERE exp_taggable_tags_entries.tag_id = exp_taggable_tags.id) AS entry_count', FALSE);\n\n\t\t// Find the tags\n\t\t$tags = $this->ee->tags->get_all();\n\t\t\n\t\t// Get the counts\n\t\tforeach ($tags as $tag) { $this->counts[] = (int)$tag->entry_count; }\n\t\t\n\t\t// Done!\n\t\treturn $tags;\n\t}",
"function getArtistsByTag($tags, $max)\n{\n global $asServer;\n try {\n // In deze forloop wordt per genre een query op de musicbrainz dataset gevuurd.\n $res = array();\n for ($i = 0; $i < $max; $i++) {\n try {\n $r = new HttpRequest($asServer . \"/2.0/?method=tag.gettopartists&tag=\" . str_replace(\" \", \"%20\", $tags[$i]) . \"&limit=2&api_key=184af8b6220039e4cb8167a5e2bb23e3\");\n $h = $r->getHeaders();\n $h['User-Agent'] = 'IKE G4 0.1';\n $r->setHeaders($h);\n $r->send();\n if ($r->getResponseCode() == 200) {\n $xmlResponse = simplexml_load_string($r->getResponseBody());\n $response = $xmlResponse->children();\n $response = $response->children();\n foreach ($response as $child) {\n if ($child->mbid != \"\") {\n $res[] = $child->mbid;\n }\n }\n }\n } catch (HttpException $ex) {\n return null;\n }\n\n }\n return $res;\n } catch (HttpException $ex) {\n return null;\n }\n}",
"function get_items_tagged_with($item_type, $tag_name_or_id, $sort='', $fields='*', $limitfrom='', $limitnum='') {\n\n global $CFG;\n\n $tag_id = tag_id_from_string($tag_name_or_id);\n\n $fields = 'it.' . $fields;\n $fields = str_replace(',', ',it.', $fields);\n\n if ($sort) {\n $sort = ' ORDER BY '. $sort;\n }\n\n $query = \"\n SELECT\n {$fields}\n FROM\n {$CFG->prefix}{$item_type} it\n INNER JOIN\n {$CFG->prefix}tag_instance tt\n ON\n it.id = tt.itemid\n WHERE\n tt.itemtype = '{$item_type}' AND\n tt.tagid = '{$tag_id}'\n {$sort}\n \";\n\n\n return get_records_sql($query, $limitfrom, $limitnum);\n\n}",
"function plugin_autotags_downloads($op, $content = '', $autotag = '')\n{\n global $_CONF, $_TABLES;\n\n if ($op == 'tagname') {\n return 'download';\n } else if ($op == 'parse') {\n $file_id = COM_applyFilter($autotag['parm1']);\n $url = COM_buildUrl($_CONF['site_url'] . '/downloads/index.php?id=' . $file_id);\n if (empty($autotag['parm2'])) {\n $linktext = stripslashes(DB_getItem($_TABLES['downloads'],\n 'title', \"lid = '\" . DB_escapeString($file_id) . \"'\"));\n } else {\n $linktext = $autotag['parm2'];\n }\n $link = COM_createLink($linktext, $url) . LB;\n $content = str_replace ($autotag['tagstr'], $link, $content);\n\n return $content;\n }\n}",
"function ciniki_ags_itemImageSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'),\n 'limit'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Limit'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'ags', 'private', 'checkAccess');\n $rc = ciniki_ags_checkAccess($ciniki, $args['tnid'], 'ciniki.ags.itemImageSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of itemimages\n //\n $strsql = \"SELECT ciniki_ags_item_images.id, \"\n . \"ciniki_ags_item_images.item_id, \"\n . \"ciniki_ags_item_images.name, \"\n . \"ciniki_ags_item_images.permalink, \"\n . \"ciniki_ags_item_images.flags, \"\n . \"ciniki_ags_item_images.sequence \"\n . \"FROM ciniki_ags_item_images \"\n . \"WHERE ciniki_ags_item_images.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.ags', array(\n array('container'=>'itemimages', 'fname'=>'id', \n 'fields'=>array('id', 'item_id', 'name', 'permalink', 'flags', 'sequence')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['itemimages']) ) {\n $itemimages = $rc['itemimages'];\n $itemimage_ids = array();\n foreach($itemimages as $iid => $itemimage) {\n $itemimage_ids[] = $itemimage['id'];\n }\n } else {\n $itemimages = array();\n $itemimage_ids = array();\n }\n\n return array('stat'=>'ok', 'itemimages'=>$itemimages, 'nplist'=>$itemimage_ids);\n}",
"public function get_item_downloads($item)\n {\n }",
"public function testTagItem()\n\t{\n\t\t$this->markTestSkipped('Test not implemented.');\n\t}",
"public function testGetItemTags()\n {\n }",
"public function obtener_tags()\r\n\t{\r\n\r\n\r\n\t\t$this->load->model(\"Solicitud_model\", \"solicitud\");\r\n\t\tif (isset($_GET['term'])){\r\n\t\t\t$q = strtolower($_GET['term']);\r\n\t\t\t$this->solicitud->getTags($q);\r\n\t\t}\r\n }",
"public function browseTags(){\n $loggedIn = $this->handleLogin();\n if( $loggedIn ){\n $taggedIds = $this->getTaggedIds( );\n $lastTag =& end( $taggedIds );\n foreach( $taggedIds as $tag => $ids ){\n foreach( $ids as $id ){\n $message = $this->persona->getVolleyQuote( 'instagram' );\n $this->submitComment( $id, $message );\n \n if( mt_rand(1,100) <= 100 ){\n $this->like($id);\n }\n \n if( mt_rand(1, 100) <= 30 ){\n list($photoId, $userId) = explode('_', $id );\n $this->follow( $userId );\n }\n \n $sleep = $this->persona->getBrowseTagsCommentWait();\n echo \"submitted comment - sleeping for $sleep seconds\\n\";\n sleep($sleep);\n }\n $sleep = $this->persona->getBrowseTagsTagWait();\n echo \"completed tag $tag - sleeping for $sleep seconds\\n\";\n sleep($sleep);\n }\n }\n }",
"function scan_db($t_nam, $tt, $url){\n $check = '';\n $iterator = $GLOBALS['client']->getIterator('Scan', array(\n 'TableName' => $t_nam,\n 'ScanFilter' => array(\n 'Title' => array(\n 'AttributeValueList' => array(\n array('S' => $tt)\n ),\n 'ComparisonOperator' => 'CONTAINS'\n ),\n )\n ));\n\n// Each item will contain the attributes we added\n foreach ($iterator as $item) {\n // Grab the time number value\n echo \"<pre>\";\n echo $item['Title']['S'];\n echo \"<pre>\";\n if ($tt == $item['Title']['S'] || $url == $item['News_URL']['S']){\n echo \"<pre>\";\n echo $item['Title']['S']. \" is already exist\";\n echo \"<pre>\";\n $check = 'True';\n }\n else{\n echo \"<pre>\";\n echo $item['Title']['S']. \" is a new item\";\n echo \"<pre>\";\n $check = 'False';\n }\n }\n return $check;\n}",
"function rss_extract_tags($item)\r\r\n{\r\r\n $arr_item = array();\r\r\n \r\r\n if (isset($item))\r\r\n {\r\r\n if ($item->getElementsByTagName(\"title\")->item(0) != null)\r\r\n $arr_item[\"title\"] = $item->getElementsByTagName(\"title\")->item(0)->firstChild->data;\r\r\n else\r\r\n $arr_item[\"title\"] = '';\r\r\n \r\r\n if ($item->getElementsByTagName(\"link\")->item(0) != null)\r\r\n $arr_item[\"link\"] = $item->getElementsByTagName(\"link\")->item(0)->firstChild->data;\r\r\n else\r\r\n $arr_item[\"link\"] = '';\r\r\n \r\r\n if ($item->getElementsByTagName(\"description\")->item(0) != null)\r\r\n $arr_item[\"description\"] = $item->getElementsByTagName(\"description\")->item(0)->firstChild->data;\r\r\n else\r\r\n $arr_item[\"description\"] = '';\r\r\n \r\r\n if ($item->getElementsByTagName(\"pubDate\")->item(0) != null)\r\r\n $arr_item[\"pubDate\"] = $item->getElementsByTagName(\"pubDate\")->item(0)->firstChild->data;\r\r\n else\r\r\n $arr_item[\"pubDate\"] = '';\r\r\n \r\r\n if ($item->getElementsByTagName(\"guid\")->item(0) != null)\r\r\n $arr_item[\"guid\"] = $item->getElementsByTagName(\"guid\")->item(0)->firstChild->data;\r\r\n else\r\r\n $arr_item[\"guid\"] = '';\r\r\n }\r\r\n \r\r\n return $arr_item;\r\r\n}",
"public function findTag($id);",
"private function checkTags()\n {\n $tags = Tag::has('activeTracks')->\n where('name', 'like', '%' . $this->search . '%')\n ->limit(5)\n ->select(['id', 'slug', 'name'])->get();\n\n if ($tags) {\n $tags = $tags->map(function ($item) {\n return [\n 'title' => $item->name,\n 'slug' => $item->slug,\n 'id' => $item->id,\n 'linkName' => 'tags',\n ];\n });\n if(!$tags->isEmpty()){\n $tags = collect(['tags' => $tags]);\n $this->setSearchResult($tags, 'filterResult');\n $this->setSearchResult($tags);\n }\n\n }\n }",
"public function searchTags($name);",
"public function searchId3Tags($trackname){\r\n //prepare search value (delete &)\r\n $trackname = str_replace(\"&\", \"\", $trackname);\r\n\r\n //prepare search val (replace +)\r\n $trackname = str_replace(\"+\", \"%2B\", $trackname);\r\n\r\n //Build string for beatport http search url\r\n $trackname = str_replace(\" \", \"+\", $trackname);\r\n\r\n //get complete HTML\r\n $beatportHTML = file_get_contents(\"https://pro.beatport.com/search?q=\".$trackname);\r\n //replace all new lines with whitespaces!\r\n $beatportHTML = preg_replace('/\\s+/', ' ', trim($beatportHTML));\r\n\r\n\r\n\r\n //get all the json data between \"tracks\": [ and };\r\n //$pattern = \"/\\\"tracks\\\"\\: \\[(.*?)};/s\" # FOR STRINGS WITH NEW LINES AND BREAKS\r\n //$pattern = \"/\\\"tracks\\\"\\: \\[(.*?)} \\] };/s\"; //FOR STRINGS WITHOUT NEW LINES AND BREAKS\r\n $pattern = \"/window\\.Playables \\= (.*?);/s\"; //FOR STRINGS WITHOUT NEW LINES AND BREAKS\r\n preg_match($pattern, $beatportHTML, $hits);\r\n $hits = $hits[1];\r\n\r\n $allJsonData = json_decode($hits);\r\n\r\n //echo \"<pre>\"; print_r($allJsonData); echo \"</pre>\";\r\n\r\n //create crawl result objects\r\n $allData = array();\r\n $resultCounter = 0;\r\n foreach($allJsonData->tracks AS $jsonDataObject){\r\n //get crawl result and fill!\r\n $crawlResult = $this->resultFactory->getCrawlResultObject();\r\n\r\n $crawlResult->setTitle(html_entity_decode($jsonDataObject->title, ENT_QUOTES));\r\n $crawlResult->setRelease(html_entity_decode($jsonDataObject->release->name, ENT_QUOTES));\r\n foreach($jsonDataObject->artists AS $artistData){\r\n $crawlResult->setArtist(html_entity_decode($artistData->name, ENT_QUOTES));\r\n $crawlResult->setProducer(html_entity_decode($artistData->name, ENT_QUOTES));\r\n }\r\n\r\n if(isset($jsonDataObject->remixers)){\r\n foreach($jsonDataObject->remixers AS $remixerData){\r\n $crawlResult->setRemixer(html_entity_decode($remixerData->name, ENT_QUOTES));\r\n }\r\n }\r\n\r\n if(isset($jsonDataObject->genres)){\r\n $genreId3 = \"\";\r\n foreach($jsonDataObject->genres AS $genre){\r\n $genreId3 .= $genre->name.\" \";\r\n }\r\n $crawlResult->setGenre(html_entity_decode($genreId3, ENT_QUOTES));\r\n }\r\n if(isset($jsonDataObject->label)){\r\n $crawlResult->setLabel(html_entity_decode($jsonDataObject->label->name, ENT_QUOTES));\r\n }\r\n\r\n //transform release ddate into datetime object for commiting to crawl result\r\n if(isset($jsonDataObject->date)){\r\n $releaseDate = new DateTime(html_entity_decode($jsonDataObject->date->released, ENT_QUOTES));\r\n $crawlResult->setReleaseDate($releaseDate);\r\n }\r\n\r\n if(isset($jsonDataObject->mix)){\r\n $crawlResult->setMix(html_entity_decode($jsonDataObject->mix, ENT_QUOTES));\r\n }\r\n\r\n if(isset($jsonDataObject->bpm)){\r\n $crawlResult->setBpm(html_entity_decode($jsonDataObject->bpm, ENT_QUOTES));\r\n }\r\n if(isset($jsonDataObject->key)){\r\n $crawlResult->setKey(html_entity_decode($jsonDataObject->key, ENT_QUOTES));\r\n }\r\n\r\n if(isset($jsonDataObject->images)){\r\n if(isset($jsonDataObject->images->dynamic)){\r\n //its an dynamic url. delete({hq}) and replace ({w}{h})the data\r\n $coverUrl = $jsonDataObject->images->dynamic->url;\r\n $coverUrl = str_replace(\"{hq}\", \"\", $coverUrl);\r\n $coverUrl = str_replace(\"{w}\", \"300\", $coverUrl);\r\n $coverUrl = str_replace(\"{h}\", \"300\", $coverUrl);\r\n $coverUrl = $coverUrl;\r\n $crawlResult->setCoverUrl($coverUrl);\r\n\r\n //set image data\r\n $coverData = @file_get_contents($coverUrl);\r\n //if cover data found (e. g. the image from beatport is not available or corrupted), set the standard image as image data\r\n if(!$coverData){\r\n $crawlResult->setCoverUrl(URL.\"/images/ErrorTagImage.jpg\");\r\n $coverData = file_get_contents(URL.\"/images/ErrorTagImage.jpg\");\r\n }\r\n\r\n $crawlResult->setCoverData($coverData);\r\n }elseif(isset($jsonDataObject->images->medium)){\r\n $coverUrl = $jsonDataObject->images->medium->url;\r\n $crawlResult->setCoverUrl($coverUrl);\r\n\r\n //set cover binary\r\n $crawlResult->setCoverData(file_get_contents($coverUrl));\r\n }\r\n }\r\n\r\n $allData[] = $crawlResult;\r\n\r\n $resultCounter++;\r\n if($resultCounter >= 10){\r\n break;\r\n }\r\n }\r\n unset($hits);\r\n return $allData;\r\n\r\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the slug generator. | public static function setSlugGenerator($name); | [
"function set_slug() {\n\t\t$this->slug = $this->post_name = $this->args['slug'];\n\t}",
"public function setSlugify()\n {\n $this->slugify = new Slugify();\n }",
"public function set_slug()\n {\n $this->slug = preg_replace('/[^a-z0-9\\-]/', '', strtolower(str_replace(' ','-',$this->first_name.'-'.$this->last_name)));\n }",
"public function setSlugAttribute()\n {\n $this->attributes['slug'] = Str::slug($this->name);\n }",
"public function new_slug(){\n\t\t$this->slug = substr( str_shuffle( URL_CHARSET ), 0, URL_LENGTH );\n\t}",
"public function generateSlug(): void\n {\n $this->model->slug = Str::slug($this->model->{$this->model->slugStrategy()});\n }",
"public function initializeSlug(){\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->nom . ' ' . $this->prenom);\n }\n }",
"public function initializeSlug(){\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->name);\n }\n }",
"public function initializeSlug() {\n if(empty($this->slug)) {\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->nom . ' ' . $this->prenom);\n }\n }",
"public function initializeSlug(){\n \n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->prenom.' '.$this->nom);\n }\n }",
"public function initializeSlug(){\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->nom);\n }\n }",
"protected function generate_slug(){\n\t\t$this->slug = \\StringUtils::toAscii($this->title); \t\n\t}",
"public function initializeSlug()\n {\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->nom);\n }\n }",
"public function initializeSlug()\n {\n //if (empty($this->slug)) {\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->title);\n //}\n }",
"protected function set_slug( string $new_slug ) {\n\t\t\t$this->slug = $new_slug;\n\t\t}",
"public function generateSlug(){\n $slugId = (string)$this->id;\n if(empty($this->slug)){\n $slugify = new Slugify();\n $this->slug = $slugify->slugify($this->title.mt_rand(1,1000));//random, to allow duplicate titles and unique slugs.\n }\n }",
"public function setSlug($slug);",
"public function setSlug($v) \n \t{ \n \t\tif ($this->slug !== $v) { \n\t\t\t$this->modifiedColumns [] = \"slug\"; \n }; \n \t\t$this->slug = $v; \n\t}",
"public function setUrlGenerator($url)\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if all games in this round has been played | public function isPlayed() : bool {
if (count($this->games) === 0) {
return false;
}
foreach ($this->getGroups() as $group) {
if (!$group->isPlayed()) {
return false;
}
}
return true;
} | [
"public function allGamesPlayed() {\n\t\tfor ($i = 1; $i <= $this->gamesPlayed; $i++) {\n \t\tif ( $this->gamesPlayed[i] < $GamesForEachEntity ) {\n \t\t\treturn false;\n \t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public function getGamesAllCompleted() {\n if ($this->currentGame != null) return false;\n \n // regular weeks have 4 games for 4 players, 5 games for 3 players.\n if ($this->format == 4) return ($this->gameCount == $this->maximumGameCount);\n if ($this->format == 3) return ($this->gameCount == $this->maximumGameCount);\n\n // otherwise, we need to count wins.\n $winsneeded = 2;\n if ($this->format == 5) $winsneeded = 3;\n if ($this->format == 7) $winsneeded = 4;\n\n $wincount = [];\n $players = $this->users;\n foreach ($players as $player) {\n $wincount[$player->id] = 0;\n }\n $games = $this->games;\n foreach ($games as $game) {\n if ($game->status == 5) continue; // skip dq'd games\n $wincount[$game->winnerId]++;\n if ($wincount[$game->winnerId] == $winsneeded) return true;\n }\n return false;\n }",
"public function allResultsFilledIn() {\n\t\tif (!$this->allTeamsFilledIn()) {\n\t\t\treturn false;\n\t\t}\n\t\t// returns true if all results of all matches of this round are filled in\n\t\tforeach($this->Matches as $match) {\n\t\t\t// only check matches where both away and home teams are filled in\n\t\t\tif (!is_null($match->home_team_id) && !is_null($match->away_team_id)) {\n\t\t\t\tif (is_null($match->homeScore) || is_null($match->awayScore) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\treturn true;\n\t}",
"function getWinningPlayers(Game $game);",
"private static function checkFull($game){\n for ($i = 0; $i < $game->size; $i++) {\n for ($j = 0; $j < $game->size; $j++) {\n if($game->board[$i][$j] == 0) {\n return false;\n }\n }\n }\n return true;\n }",
"function checkAllAreOut() {\n\t$con = $GLOBALS['con'];\n\t$gottMosAreOut = TRUE;\n\t$fubbicksAreOut = TRUE;\n\t$usernames = getAllUsernamesList($con, \"ActiveUsers\");\n\tforeach ($usernames as $name) {\n\t\tif (returnFieldForUser(\"ActiveUsers\", 5, $name) == 0) {\n\t\t\t// Is a fubbick\n\t\t\tif (returnFieldForUser(\"ActiveUsers\", 10, $name) == 0) {\n\t\t\t\t// This fubbick is living\n\t\t\t\t$fubbicksAreOut = FALSE;\n\t\t\t}\n\t\t} else if (returnFieldForUser(\"ActiveUsers\", 5, $name)) {\n\t\t\t// Is a Gottmosare\n\t\t\tif (returnFieldForUser(\"ActiveUsers\", 10, $name) == 0) {\n\t\t\t\t// This gotymosaer is living\n\t\t\t\t$gottMosAreOut = FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif ($gottMosAreOut) {\n\t\tmysqli_query_trace($con, \"UPDATE ActiveGame SET EndGame='1'\");\n\t\tmysqli_query_trace($con, \"UPDATE ActiveGame SET GottmosIsWinner='0'\");\n\t\tredirect(\"gameEnded.php\");\n\t\tdie();\n\t} else if ($fubbicksAreOut) {\n\t\tmysqli_query_trace($con, \"UPDATE ActiveGame SET EndGame='1'\");\n\t\tmysqli_query_trace($con, \"UPDATE ActiveGame SET GottmosIsWinner='1'\");\n\t\tredirect(\"gameEnded.php\");\n\t\tdie();\n\t}\n}",
"public function isWinningTeam()\n {\n $game = $this->game()->getResults();\n\n $score = DB::table('games')\n ->selectRAW('COUNT(*) as `goals`, teams.color')\n ->leftJoin('teams', 'teams.game_id', '=', 'games.id')\n ->leftJoin('player_teams', 'player_teams.team_id', '=', 'teams.id')\n ->leftJoin('stats', 'player_teams.stat_id', '=', 'stats.id')\n ->join('goals', 'goals.stat_id', '=', 'stats.id')\n ->where('games.id','=',$game->id)\n ->where('goals.own_goal','=',0)\n ->groupBy('teams.color')\n ->lists('goals', 'color');\n\n $ownGoals = DB::table('games')\n ->selectRAW('COUNT(*) as `own_goals`, (SELECT color FROM teams where id = goals.opponent_team_id) as `pointFor`')\n ->leftJoin('teams', 'teams.game_id', '=', 'games.id')\n ->leftJoin('player_teams', 'player_teams.team_id', '=', 'teams.id')\n ->leftJoin('stats', 'player_teams.stat_id', '=', 'stats.id')\n ->join('goals', 'goals.stat_id', '=', 'stats.id')\n ->where('games.id','=',$game->id)\n ->where('goals.own_goal','=',1)\n ->groupBy('teams.color')\n ->lists('own_goals', 'pointFor');\n\n foreach($ownGoals as $team=>$numOwnGoals)\n {\n $score[$team] += $numOwnGoals;\n }\n\n arsort($score);\n\n if(array_keys($score)[0] == $this->color){\n return true;\n }else{\n return false;\n }\n }",
"private function getRelevantGames() {\n // query the database\n $dir = 'sqlite:C:\\Apache24\\htdocs\\rps-game\\server\\db\\game.db';\n $dbh = new \\PDO($dir) or die(\"cannot open the database\");\n $query = $dbh->prepare('SELECT * FROM games');\n $query->execute(array());\n $results = $query->fetchAll();\n\n // process the results\n $games = array(\n 'myGames' => array(),\n 'openGames' => array(),\n );\n foreach ($results as $value) {\n $gameObj = \\GuzzleHttp\\json_decode($value['game_state']);\n if (!$gameObj->isGameOver) {\n\n // currently playing this game\n if (\n $gameObj->player1->name == $this->sender->name\n || $gameObj->player2->name == $this->sender->name\n ) {\n $games['myGames'][$value['game_id']] = $gameObj;\n continue;\n }\n\n // this game has an empty seat\n if (\n $gameObj->player1->name == FALSE\n || $gameObj->player2->name == FALSE\n ) {\n $games['openGames'][$value['game_id']] = $gameObj;\n continue;\n }\n\n }\n }\n\n return $games;\n }",
"public function won() {\n $count = 0;\n\n /*\n * Count how many times result one is bigger than result two.\n */\n foreach ($this->sets as $set) {\n /*\n * First check if the set has results.\n */\n if ($set->result_one) {\n if ($set->result_one > $set->result_two) {\n $count++;\n }\n }\n }\n\n if ($this->game->home) { // Home\n if ($count === 2) {\n return true;\n }\n }\n else { // Not home\n if ($count <= 1) {\n return true;\n }\n }\n\n return false;\n }",
"public function isInGame()\r\n\t{\r\n\t\treturn $this->onlineState == \"in-game\";\r\n\t}",
"public function isGamechoosed()\r\n {\r\n return $this->getChoosedGame() != null;\r\n }",
"public function played_matches_for_round($round = 'all')\n {\n return $round === 'all' \n ? \n $this->matches()->where('status', 'played')->with('match_teams','match_teams.all_runs') \n : \n $this->matches()->where('status', 'played')->where('round', $round)->with('match_teams','match_teams.all_runs','match_teams.team.runs.match.player');\n }",
"public function isClosed()\n {\n if (null === $this->getGames() && null !== $this->getPlayers() && count($this->getPlayers()) > 0) {\n // no games, probably not initialized yet\n // we have players, so there should be games too\n return false;\n }\n\n foreach ($this->getGames() as $game) {\n if (!$game->isClosed()) {\n return false;\n }\n }\n\n return true;\n }",
"private function isGameFinished()\n {\n $isGameFinished = false;\n\n $totalResult = $this->score + $this->savedScore;\n if ($totalResult >= self::POINTS_AT_WIN) {\n $isGameFinished = true;\n }\n\n return $isGameFinished;\n }",
"public function testSearchWithKnownGame() {\n $this->assertNotEmpty($this->grabber->searchBoardGames(\"coup\"));\n }",
"public function hasPlayed(): bool\n {\n return !is_null($this->getMagicPoints());\n }",
"public function testPlayGame()\n {\n $game = new Game();\n $game->playGame(2);\n $dices = $game->getDices();\n $values = $game->getValues();\n $this->assertCount(2, $dices);\n $this->assertCount(2, $values);\n }",
"public function hasGamePlayedAppId()\n {\n return $this->game_played_app_id !== null;\n }",
"function showRunningGames() {\r\n\tglobal $flood, $link, $db;\r\n\tglobal $games;\r\n\r\n\tif($flood || !$link || !$db) return;\r\n\t\r\n\tif(!empty($games)) {\r\n\t\techo '<p class=\"runninggames\">Running games:</p>';\r\n\t\techo '<table class=\"runninggames\">';\r\n\t\techo '<tr><th>Round</th><th>State</th><th>Begin</th><th>Players</th></tr>';\r\n\t\techo $games;\r\n\t\techo '</table>';\r\n\t}\r\n\telse {\r\n\t\techo '<p class=\"runninggames\">Currently no games are running.</p>';\r\n\t}\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get token storage path. | private function getTokenStoragePath()
{
$path = craft()->path->getStoragePath().'box_tokens/';
IOHelper::ensureFolderExists($path);
return $path;
} | [
"public function getTokenStoragePath() {\n\t\treturn $this->tokenStoragePath;\n\t}",
"private function getStoreTokenFilePath() {\n\t\treturn $this->getTokenStoragePath() . \"/token.box\";\n\t}",
"public function getFilePath()\n {\n return __DIR__.'/Storage/token-'.$this->username.'.json';\n }",
"public function storagePath()\n {\n return $this->get('path.storage');\n }",
"public function getStoragePath()\n {\n $storage_path = config('app.storage', 'storage');\n return preg_replace(\"/^\\/?$storage_path/\", '', $this->getRelativePath());\n }",
"protected function storagePath()\n {\n return $this->basePath . 'storage' . DIRECTORY_SEPARATOR;\n }",
"public function storagePath()\n {\n return $this->paths->get('storage');\n }",
"public function storagePath()\n {\n return $this->storagePath ?: $this->basePath.DIRECTORY_SEPARATOR.'storage';\n }",
"public function storagePath()\n {\n return $this->storagePath ?: $this->basePath . DIRECTORY_SEPARATOR . 'storage';\n }",
"public function storagePath()\n {\n return $this->basePath.'/'.$this->path['storage_path'];\n }",
"protected function getStorageKey()\n {\n return $this->config['guard']['storage_key'] ?? 'api_token';\n }",
"public function getStoragePath()\n {\n return self::getStoragePathForId($this->id);\n }",
"public function getStoragePath() {\n return $this->getType()->getStoragePath();\n }",
"public function getSharedStoragePath(): string\n {\n if (empty($this->sharedStoragePath)) return $this->getStoragepath();\n\n return $this->sharedStoragePath;\n }",
"public function getStoragePathAttribute()\n\t{\n\t\treturn storage_path(\"app/{$this->path}\");\n\t}",
"function storageDir()\n{\n return 'storage/';\n}",
"public static function getStorageRoot()\n {\n return static::$storageRoot;\n }",
"protected function getTokenStorage(){\n return $this->tokenStorage;\n }",
"protected static function storageFolder()\n {\n return self::$storageFolder;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to return the curated feed theme options | function postmedia_get_curated_feed_options() {
$default_theme_options = array(
'postmedia_curated_feed_one' => '',
'postmedia_curated_feed_two' => '',
'postmedia_curated_feed_three' => '',
'postmedia_curated_feed_four' => '',
'postmedia_curated_feed_five' => '',
'postmedia_curated_feed_six' => '',
'postmedia_curated_feed_seven' => '',
'postmedia_curated_feed_eight' => '',
'postmedia_curated_feed_nine' => '',
'postmedia_curated_feed_ten' => '',
);
return wp_parse_args( get_option( 'postmedia_curated_feed_options' ), $default_theme_options );
} | [
"function docu_get_my_theme_options(){\n\treturn ThemeOptions::get_theme_options();\n}",
"function mailchimp_rest_api_get_theme_options() {\n\t\t$saved = (array) get_option( 'mailchimp_rest_api_theme_options' );\n\t\t$defaults = array(\n\t\t\t'mailchimp_api_key' => '',\n\t\t\t'mailchimp_list_id' => '',\n\t\t\t'mailchimp_form_key' => '',\n\t\t\t'mailchimp_form_secret' => '',\n\t\t\t'mailchimp_honeypot' => '',\n\t\t\t'mailchimp_origin' => '',\n\t\t);\n\n\t\t$defaults = apply_filters( 'mailchimp_rest_api_default_theme_options', $defaults );\n\n\t\t$options = wp_parse_args( $saved, $defaults );\n\t\t$options = array_intersect_key( $options, $defaults );\n\n\t\treturn $options;\n\t}",
"function X2_get_theme_options() \r\n{\r\n\treturn X2_Theme_Options::get_theme_options();\r\n}",
"public static function get_theme_options() {\n return get_option( 'theme_options' );\n }",
"public static function get_theme_options() \r\n\t\t{\r\n\t\t\treturn get_option( 'theme_options' );\r\n\t\t}",
"public function get_default_theme_options() {\n return array(\n 'analytics' => '', \n 'flickr_api_key' => '',\n 'instagram_token' => '',\n 'twitter_token' => '',\n 'twitter_token_secret' => '', \n 'twitter_consumer_secret' => '',\n 'twitter_consumer_key' => '',\n 'theme_version' => '1.5'\n );\n }",
"public static function get_theme_options()\n {\n return get_option('theme_options');\n }",
"public function ssw_fetch_theme_options() {\n\t\t\t$theme_options['themes_categories'] = get_site_option( SSW_THEMES_CATEGORIES_FOR_DATABASE );\n\t\t\t$theme_options['themes_list'] = get_site_option( SSW_THEMES_LIST_FOR_DATABASE );\n\t\t\treturn $theme_options;\n\t\t}",
"public static function get_theme_options() {\n\t\t\treturn get_option( 'theme_options' );\n\t\t}",
"public static function get_theme_options() {\n\t\t\t\treturn get_option( 'theme_options' );\n\t\t\t}",
"public function getWidgetStyleOptions();",
"private function get_theme_info()\n {\n }",
"function thrive_get_theme_options( $key = null, $postId = 0 ) {\r\n\r\n\t$options = thrive_filter_default_theme_options( get_option( 'thrive_theme_options' ), thrive_get_default_theme_options() );\r\n\r\n\tif ( $key && isset( $options[ $key ] ) ) {\r\n\t\treturn $options[ $key ];\r\n\t}\r\n\r\n\t$options['thrive_follow_widget_facebook'] = get_option( 'thrive_follow_widget_facebook' );\r\n\r\n\t$options['display_meta'] = 0;\r\n\tif ( ( isset( $options['meta_author_name'] ) && $options['meta_author_name'] == 1 ) || ( isset( $options['meta_post_date'] ) && $options['meta_post_date'] == 1 ) || ( isset( $options['meta_post_category'] ) && $options['meta_post_category'] == 1 && ( get_the_category( $postId ) ) ) || ( isset( $options['meta_post_tags'] ) && $options['meta_post_tags'] == 1 ) && ( get_the_tags( $postId ) ) ) {\r\n\t\t$options['display_meta'] = 1;\r\n\t}\r\n\t$options['meta_no_columns'] = 0;\r\n\tif ( ( isset( $options['meta_author_name'] ) && $options['meta_author_name'] == 1 ) ) {\r\n\t\t$options['meta_no_columns'] ++;\r\n\t}\r\n\tif ( ( isset( $options['meta_post_date'] ) && $options['meta_post_date'] == 1 ) ) {\r\n\t\t$options['meta_no_columns'] ++;\r\n\t}\r\n\tif ( ( isset( $options['meta_post_category'] ) && $options['meta_post_category'] == 1 ) ) {\r\n\t\t$options['meta_no_columns'] ++;\r\n\t}\r\n\tif ( ( isset( $options['meta_post_tags'] ) && $options['meta_post_tags'] == 1 ) && get_the_tags() ) {\r\n\t\t$options['meta_no_columns'] ++;\r\n\t}\r\n\r\n\treturn $options;\r\n}",
"public function themeInfo()\n {\n return array(\n \"name\"=>\"\", //Name of theme\n \"version\"=>\"\",\n \"base\"=>\"\", // For example: bs4\n \"cssClass\"=>\"\",//cssClass that will be attached to widget\n ); \n }",
"function themes() { return array(); }",
"public function getThemeConfigs() {\n\n }",
"function _site_collect_theme_settings() {\n $settings = [];\n\n // Header bar\n $settings['header_bar']['tour_url'] = theme_get_setting('tour_url');\n $settings['header_bar']['contact_url'] = theme_get_setting('contact_url');\n\n // Contact information\n $settings['contact_information']['business_owner_name'] = theme_get_setting('business_owner_name');\n $settings['contact_information']['business_startup_year'] = theme_get_setting('business_startup_year');\n $settings['contact_information']['address'] = theme_get_setting('address');\n $settings['contact_information']['zipcode'] = theme_get_setting('zipcode');\n $settings['contact_information']['city'] = theme_get_setting('city');\n $settings['contact_information']['phone_system'] = theme_get_setting('phone_system');\n $settings['contact_information']['phone_readable'] = theme_get_setting('phone_readable');\n $settings['contact_information']['email'] = theme_get_setting('email');\n $settings['contact_information']['working_hours'] = theme_get_setting('working_hours');\n\n // Social\n $settings['social']['facebook']['active'] = theme_get_setting('facebook');\n $settings['social']['facebook']['url'] = theme_get_setting('facebook_url');\n $settings['social']['facebook']['tooltip'] = theme_get_setting('facebook_tooltip');\n $settings['social']['twitter']['active'] = theme_get_setting('twitter');\n $settings['social']['twitter']['url'] = theme_get_setting('twitter_url');\n $settings['social']['twitter']['tooltip'] = theme_get_setting('twitter_tooltip');\n $settings['social']['googleplus']['active'] = theme_get_setting('googleplus');\n $settings['social']['googleplus']['url'] = theme_get_setting('googleplus_url');\n $settings['social']['googleplus']['tooltip'] = theme_get_setting('googleplus_tooltip');\n $settings['social']['instagram']['active'] = theme_get_setting('instagram');\n $settings['social']['instagram']['url'] = theme_get_setting('instagram_url');\n $settings['social']['instagram']['tooltip'] = theme_get_setting('instagram_tooltip');\n $settings['social']['linkedin']['active'] = theme_get_setting('linkedin');\n $settings['social']['linkedin']['url'] = theme_get_setting('linkedin_url');\n $settings['social']['linkedin']['tooltip'] = theme_get_setting('linkedin_tooltip');\n $settings['social']['pinterest']['active'] = theme_get_setting('pinterest');\n $settings['social']['pinterest']['url'] = theme_get_setting('pinterest_url');\n $settings['social']['pinterest']['tooltip'] = theme_get_setting('pinterest_tooltip');\n $settings['social']['vimeo']['active'] = theme_get_setting('vimeo');\n $settings['social']['vimeo']['url'] = theme_get_setting('vimeo_url');\n $settings['social']['vimeo']['tooltip'] = theme_get_setting('vimeo_tooltip');\n $settings['social']['youtube']['active'] = theme_get_setting('youtube');\n $settings['social']['youtube']['url'] = theme_get_setting('youtube_url');\n $settings['social']['youtube']['tooltip'] = theme_get_setting('youtube_tooltip');\n\n return $settings;\n}",
"public function get_theme_info()\n {\n }",
"public function getCurrentThemeOptions()\n {\n return $this->currentThemeOptions;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[addItems read DettaglioLinee loop and load item in invoice] | public function addItems($invoice, $xml)
{
$DettaglioLinee = $xml->FatturaElettronicaBody->DatiBeniServizi->DettaglioLinee;
if (isset($DettaglioLinee))
{
foreach($DettaglioLinee as $dl)
{
$iva = 0;
$iva_perc = intval($dl->AliquotaIVA);
if ($iva_perc > 0)
{
$iva = floatval(floatval($dl->PrezzoUnitario) * $iva_perc / 100);
}
$sconto = 0;
if (isset($dl->ScontoMaggiorazione->Percentuale))
{
$sconto = floatval($dl->ScontoMaggiorazione->Percentuale);
}
$exemption_id = null;
if (isset($dl->Natura))
{
$exemption_id = Exemption::getIdByCode($dl->Natura);
}
$item = new Item;
$item->invoice_id = $invoice->id;
$item->product_id = Product::default();
$item->descrizione = $dl->Descrizione;
$item->qta = $this->decimal($dl->Quantita);
$item->importo = $this->decimal($dl->PrezzoUnitario);
$item->perc_iva = intval($dl->AliquotaIVA);
$item->iva = $iva;
$item->sconto = $sconto;
$item->exemption_id = $exemption_id;
$item->save();
$this->notify($invoice, "SYNC aggiunto item" .$item->id. " in fattura ".$invoice->id, 'info');
}
}
} | [
"private function addLineItemsToInvoice($data){\n $lineItems = [];\n $counter = 1;\n foreach($data as $lineData) {\n $lineItem = [];\n $lineItem['LineNum'] = $counter;\n $lineItem['Description'] = IndexSanityCheckHelper::indexSanityCheck('description', $lineData);\n\n if (array_key_exists('item_id', $lineData)) {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['ItemRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('item_id', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n } else {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n }\n $counter++;\n array_push($lineItems, $lineItem);\n }\n if ($this->getDiscountRate()) {\n if ($this->getDiscountRate() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = true;\n $discountLineItem['DiscountLineDetail']['DiscountPercent'] = $this->getDiscountRate();\n array_push($lineItems, $discountLineItem);\n }\n }\n else if ($this->getDiscountAmount()) {\n if ($this->getDiscountAmount() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = false;\n array_push($lineItems, $discountLineItem);\n }\n }\n return $lineItems;\n }",
"function invoiceLinesAdd($invoice_id){\r\n\t\t$method='invoice.lines.add';\r\n\t\t$tags=array(\r\n\t\t\t'invoice_id'=>$invoice_id\r\n\t\t);\r\n\t\t$response=$this->prepare_xml($method,$tags,$this->lines);\r\n\t\t$obj=$this->xml_obj($response, 'full');\r\n\t\t$this->lines=array();\r\n\t\treturn $obj;\r\n\t}",
"public function testInvoiceLineItems()\n {\n $invoice = new Invoice();\n\n // Check number of line items\n $this->assertEquals(0, $invoice->getLineItemCount());\n\n $qty = 3;\n $val = 12;\n $total1 = $qty * $val;\n $vat1 = Util::calculateVat($total1);\n\n // Add Line item and check count\n $lineItem1 = new InvoiceLineItem();\n $lineItem1->setQuantity($qty);\n $lineItem1->setDescription(\"Pens\");\n $lineItem1->setNetAmount($total1);\n $lineItem1->setVat($vat1);\n $invoice->appendLineItem($lineItem1);\n\n // Check number of line items\n $this->assertEquals(1, $invoice->getLineItemCount());\n\n // Add Line item and check count\n $qty = 2;\n $val = 44.23;\n $total2 = $qty * $val;\n $vat2 = Util::calculateVat($total2);\n\n $lineItem1 = new InvoiceLineItem();\n $lineItem1->setQuantity($qty);\n $lineItem1->setDescription(\"Rulers\");\n $lineItem1->setNetAmount($total2);\n $lineItem1->setVat($vat2);\n $invoice->appendLineItem($lineItem1);\n\n // Check number of line items\n $this->assertEquals(2, $invoice->getLineItemCount());\n\n // Check the totals\n $total = $total1 + $total2;\n $this->assertEquals($total, $invoice->getNetTotal());\n\n // Total with vat\n $total += $vat1 + $vat2;\n $this->assertEquals($total, $invoice->getTotal());\n\n try {\n $id = $invoice->save();\n } catch (Exception $e) {\n echo \"Save failed: \" . $e->getMessage();\n return;\n }\n\n $retrieved_invoice = Invoice::lookUpInDatabase($id);\n $this->assertNotNull($retrieved_invoice, \"Invoice not found\");\n\n $this->assertEquals(2, $retrieved_invoice->getLineItemCount());\n\n }",
"private function packageInvoiceItems() {\n\t\t$this->Invoice->InvoiceItem->lineItems = $this->invoice;\n\t\tif (!$this->Invoice->newInvoice()) {\n\t\t\t$this->Session->setFlash('An invoice was not created. Please try again.', 'flash_error');\n\t\t\treturn FALSE;\n\t\t}\n\t\tif(!$this->Invoice->InvoiceItem->linkInvoiceItems($this->Invoice->id)){\n\t\t\t$this->Session->setFlash('An invoice was created, but the charge items failed to link. Please try again.', 'flash_error');\n\t\t\treturn FALSE;\n\t\t}\n\t\t$this->Session->setFlash('The charge items were successfully linked to an invoice', 'flash_success');\n\t\treturn TRUE;\n\t}",
"public function addInvoice($observer)\n {\n $invoice = $observer->getEvent()->getInvoice();\n $orderNumber = $invoice->getOrder()->getIncrementId();\n\n Mage::log(\"Winvoice | A invoice estah associada ah encomenda numero {$orderNumber}\", null, 'winvoice.log', true);\n $useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';\n $err = $this->client->getError();\n\n if ($err) {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n }\n\n // Get client items\n $this->client->setUseCurl($useCURL);\n $this->client->soap_defencoding = 'UTF-8';\n $items = $invoice->getAllItems();\n\n foreach ($items as $item) {\n if ($item->getBase_price() == 0) {\n continue;\n }\n\n $Product = array (\n 'item' => $item->getName(), //string (*) Nome do produto/serviço\n 'type' => 'P', //char (*) Tipo (P ou S) consoante seja produto ou serviço\n 'quantity' => number_format((float)$item->getQty(), 0, '.', ''), //double (*) Quantidade (ex: 2)\n 'price' => round($item->getPriceInclTax()/( 1 + $item->getOrderItem()->getTaxPercent()/100), 6), //double (*) Preço (ex: 99.99)\n 'discount' => $item->getDiscountAmount(), //double Desconto (ex: 19.99)\n 'tax' => number_format((float)$item->getOrderItem()->getTaxPercent(), 0, '.', ''), //int (*)Taxa de IVA (ex: 23)\n 'taxreason' => '', // string Motivo de isenção de Taxa, caso aplicável (ver tabela Motivos de isenção de IVA)\n );\n\n $Products[] = $Product;\n\n Mage::log(\"Winvoice | A adicionar o item \\\"{$item->getName()}\\\" ah invoice, com os dados:\", null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Quantidade: \".number_format((float)$item->getQty(), 0, '.', ''), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Preco base: \".number_format((float)$item->getBase_price(), 2, '.', ''), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Imposto: \".number_format((float)$item->getOrderItem()->getTaxPercent(), 2, '.', ''), null, 'winvoice.log', true);\n Mage::log(\"Winvoice | Discontos: \".$item->getDiscountAmount(), null, 'winvoice.log', true);\n }\n\n // Shipping tax value in percentage\n $vat = Mage::getStoreConfig('winvoice/wconfig/wshiptax');\n\n $Product = array (\n 'item' => $invoice->getOrder()->getShippingDescription(),\n 'type' => 'S',\n 'quantity' => '1',\n 'price' => round($invoice->getOrder()->getBaseShippingInclTax()/( 1 + $vat/100), 6),\n 'discount' => number_format((float)$invoice->getOrder()->getBaseShippingDiscountAmount(), 2, '.', ''),\n 'tax' => $vat,\n 'taxreason' => '',\n );\n\n $Products[] = $Product;\n\t\t\n\n Mage::log(\"Winvoice | Id do client a enviar para factura weo: \".$this->getClientNumber($invoice), null, 'winvoice.log', true);\n\n $params = array(\n 'client' => $this->getClientNumber($invoice),\n 'type' => '1', //Tipo de documento (ver tabela Tipos de Documento)\n 'date' => date(\"Y-m-d\"), //Data do documento (ex: 2011-01-01)\n 'payment_date' => date(\"Y-m-d\"), //date (*) Data de vencimento do documento (ex: 2011-01-01)\n 'description' => '',\n 'footer' => 'Encomenda: '.$invoice->getOrder()->getIncrementId(),\n 'products' => $Products,\n 'password' => $this->password,\n );\n\n $result = $this->client->call(\"AddDocument\", $params);\n\n if ($this->client->fault) {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n } else {\n $err = $this->client->getError();\n\n if ($err) {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n } else {\n Mage::log(\"Winvoice | Mensagem retornada pelo weoInvoice: \".$this->errorMessages[$result['answer']], null, 'winvoice.log', true);\n Mage::log(\"Winvoice | ID retornado pelo weoInvoice: \".$result['description1'], null, 'winvoice.log', true);\n Mage::log(\"Winvoice | URL retornado pelo weoInvoice: \".$result['description2'], null, 'winvoice.log', true);\n\n if ($result['answer'] <> 0 && $result['answer'] <> 1) {\n if (array_key_exists($result['answer'], $this->errorMessages)) {\n Mage::log(\"Winvoice | Mensagem retornada pelo weoInvoice: \".$this->errorMessages[$result['answer']], null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__($this->errorMessages[$result['answer']]));\n } else {\n Mage::log(\"Winvoice | Erro ao criar factura.\", null, 'winvoice.log', true);\n Mage::throwException(Mage::helper('adminhtml')->__('Erro ao criar factura.'));\n }\n }\n\t\t\t\t\n $prefix = Mage::getConfig()->getTablePrefix();\n $resource = Mage::getSingleton('core/resource')->getConnection('core_read');\n $resource->addColumn($prefix.'sales_flat_invoice', 'wsinvoiceurl', 'Varchar(300) NULL');\n $resource->addColumn($prefix.'sales_flat_invoice', 'wsinvoiceid', 'INT NULL');\n\n $invoiceId = $result['description1'];\n\t\t\t\t$invoiceUrl = $result['description2'];\n $invoice->setWsinvoiceurl($invoiceUrl);\n $invoice->setWsinvoiceid($invoiceId);\n }\n }\n\n \n }",
"private function importInvoices()\n {\n @ini_set( 'auto_detect_line_endings', true );\n\n $file = fopen( $_FILES['import_invoices_file']['tmp_name'], 'r' );\n while ( $line = fgetcsv( $file, null, $this->getParameter( 'import_invoices_delimiter' ) ) ) {\n if ( $line[0] != '' ) {\n $invoice = new Lib\\Entities\\Invoice();\n $invoice->set( 'name', $line[0] );\n if ( isset( $line[1] ) ) {\n $invoice->set( 'phone', $line[1] );\n }\n if ( isset( $line[2] ) ) {\n $invoice->set( 'email', $line[2] );\n }\n if ( isset( $line[3] ) && $line[3] != '' ) {\n $dob = date_create( $line[3] );\n if ( $dob !== false ) {\n $invoice->set( 'birthday', $dob->format( 'Y-m-d' ) );\n }\n }\n $invoice->save();\n }\n }\n }",
"private function getListaSubinventory($dw_order_no, $lines) {\n $lista_subinventory = array();\n foreach ($lines as $line) {\n $delivery_line_id=CountersHelper::getDeliveyLineId();\n //$montaggio=\"N\";\n\n /*if ($line['item_has_options']=='1') {\n //verifico se c'è il montaggio\n $orderDbHelper = new OrderDBHelper($dw_order_no);\n $options = $orderDbHelper->getItemOptions($line['sku']);\n foreach ($options as $option) {\n if ( ($option->option_key=='lineitem-text') && ($option->option_value=='Montaggio: SI') ) {$montaggio=\"S\";}\n }\n\n }*/\n // print_r($lines);\n $sku = $line['sku'];\n $qta = (int)$line['order_quantity'];\n $desc = htmlspecialchars($line['description']);\n $subinventory = $line['subinventory'];\n $itemObj = new stdClass();\n $itemObj->sku = $sku;\n $itemObj->sku_description=$desc;\n $itemObj->qty=$qta;\n $itemObj->delivery_line_id=$delivery_line_id;\n $itemObj->row_total = $line['row_total'];\n $itemObj->discount_value = $line['discount_value'];\n //$itemObj->montaggio=$montaggio;\n if (!$subinventory) {\n echo \"\\nAttenzione prodotto senza subinventory: \".$sku;\n return null;\n };\n $itemObj->subinventory=$subinventory;\n\n if (!array_key_exists($subinventory, $lista_subinventory))\n $lista_subinventory[$subinventory] = array();\n\n $tmp = $lista_subinventory[$subinventory];\n array_push ($tmp, $itemObj);\n $lista_subinventory[$subinventory] = $tmp;\n\n }\n //mi ritorna per ogni subinventory la lista di item\n return $lista_subinventory;\n\n }",
"private function loadItemsForConverting() {\n $items = $this->getItems();\n\n foreach ($items as $key => $grp) {\n foreach ($grp['lines'] as $line_id => $line) {\n $parent_id = $line['parent_id'];\n $is_assembly = ($line['related_type'] == 'Assemblies');\n\n if (! $this->isSelected($line_id, $parent_id) || ! empty($line['is_comment']))\n continue;\n\n if (! $is_assembly) {\n if (empty($parent_id) && ! isset($this->products[$line_id])) {\n $this->products[$line_id] = $line;\n } else {\n if (! isset($this->assemblies[$parent_id]))\n $this->assemblies[$parent_id] = $grp['lines'][$parent_id];\n $this->assemblies[$parent_id]['related_products'][$line_id] = $line;\n }\n } else {\n if (! isset($this->assemblies[$line_id]))\n $this->assemblies[$line_id] = $line;\n }\n }\n }\n }",
"function add_items_to_invoice($invoiceID,$newItemData){\r\n\t\t\r\n\t\t//get actual items on invoice\r\n\t\t$actual_items = $this->get_items_of_invoice($invoiceID,true);\r\n\t\t\r\n\t\t$actual_items[]= $newItemData;\r\n\t\t\r\n\t\tif(update_post_meta($invoiceID,'_items_on_invoice',$actual_items)){\r\n\t\t\r\n\t\t\treturn $this->get_items_of_invoice($invoiceID,true);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\treturn false;\r\n\r\n\t}",
"function _getLineItems(&$invoice) {\n if ($invoice ['total_amount'] > $invoice ['participant_fee_amount']) {\n require_once 'api/api.php';\n // api let us down use direct sql\n // TODO get api to accept the below\n // $otherParticipants = civicrm_api('Participant','Get',array('version' =>3,'participant_registered_by_id' =>$invoice['participant_id']));\n\n\n $sql = \"SELECT * FROM {civicrm_participant} WHERE registered_by_id = %d \";\n $result = db_query ( $sql, $invoice ['participant_id'] );\n while ( $data = db_fetch_object ( $result ) ) {\n $id = $data->id;\n $apiResult = civicrm_api ( 'Participant', 'Get', array ('version' => 3, 'id' => $data->id, 'sequential' => 1 ) );\n $line_items [] = $apiResult ['values'] [0];\n }\n }\n if (is_array ( $line_items )) {\n return $line_items;\n } else {\n return null;\n }\n\n}",
"public function addLineItem($params) {\r\n \r\n $i = count($this->lineItems) + 1;\r\n $prefix = \"LV3_ITEM${i}_\"; // VALUE REQUIRED IN:\r\n $this->lineItems[] = array( // USA | CANADA\r\n \"${prefix}UNIT_COST\" => $params['unitCost'], // * *\r\n \"${prefix}QUANTITY\" => $params['quantity'], // * *\r\n \"${prefix}ITEM_SKU\" => $params['itemSKU'] ?? '', // *\r\n \"${prefix}ITEM_DESCRIPTOR\" => $params['descriptor'] ?? '', // * *\r\n \"${prefix}COMMODITY_CODE\" => $params['commodityCode'] ?? '', // * *\r\n \"${prefix}PRODUCT_CODE\" => $params['productCode'] ?? '', // *\r\n \"${prefix}MEASURE_UNITS\" => $params['measureUnits'] ?? '', // * *\r\n \"${prefix}ITEM_DISCOUNT\" => $params['itemDiscount'] ?? '', // *\r\n \"${prefix}TAX_RATE\" => $params['taxRate'] ?? '', // *\r\n \"${prefix}GOODS_TAX_RATE\" => $params['goodsTaxRate'] ?? '', // *\r\n \"${prefix}TAX_AMOUNT\" => $params['taxAmount'] ?? '', // *\r\n \"${prefix}GOODS_TAX_AMOUNT\" => $params['goodsTaxAmount'] ?? '', // *\r\n \"${prefix}CITY_TAX_RATE\" => $params['cityTaxRate'] ?? '', \r\n \"${prefix}CITY_TAX_AMOUNT\" => $params['cityTaxAmount'] ?? '', \r\n \"${prefix}COUNTY_TAX_RATE\" => $params['countyTaxRate'] ?? '', \r\n \"${prefix}COUNTY_TAX_AMOUNT\" => $params['countyTaxAmount'] ?? '', \r\n \"${prefix}STATE_TAX_RATE\" => $params['stateTaxRate'] ?? '', \r\n \"${prefix}STATE_TAX_AMOUNT\" => $params['stateTaxAmount'] ?? '', \r\n \"${prefix}CUST_SKU\" => $params['custSKU'] ?? '', \r\n \"${prefix}CUST_PO\" => $params['custPO'] ?? '', \r\n \"${prefix}SUPPLEMENTAL_DATA\" => $params['supplementalData'] ?? '', \r\n \"${prefix}GL_ACCOUNT_NUMBER\" => $params['glAccountNumber'] ?? '', \r\n \"${prefix}DIVISION_NUMBER\" => $params['divisionNumber'] ?? '', \r\n \"${prefix}PO_LINE_NUMBER\" => $params['poLineNumber'] ?? '', \r\n \"${prefix}LINE_ITEM_TOTAL\" => $params['lineItemTotal'] ?? '' // *\r\n );\r\n }",
"public function populateLineItem(Commerce_LineItemModel $lineItem);",
"private function load_items(){\n\t\tglobal $DB;\n\n\t\t$loadedItems = array();\n\n\t\t$records = $DB->get_records('local_moodec_trans_item', array('transaction_id'=> $this->_id ));\n\n\t\t// Go through the item records and add them to this transaction's items array\n\t\tif( !!$records ) {\n\t\t\tforeach($records as $record) {\n\t\t\t\t$id = (int) $record->id;\n\t\t\t\t$loadedItems[$id] = new MoodecTransactionItem($id);\n\t\t\t}\n\t\t}\n\n\t\t$this->_items = $loadedItems;\n\t}",
"public function testInvoiceItemsOne()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function parseItems(&$config) {\n \n $totalItems = 0;\n $invoiceItemList = $config->request->getAllItems();\n $config->shipments = array();\n $ship_as_bundled = $config->properties->ship_as_bundled;\n \n foreach($invoiceItemList as $invoiceItem) {\n if ($invoiceItem->getHasChildren() && ($invoiceItem->getProductType()!=\"bundle\" || !$ship_as_bundled)) {\n continue;\n }\n if ($invoiceItem->getParentItem() \n && ($invoiceItem->getParentItem()->getProductType()==\"bundle\" && $ship_as_bundled)) {\n continue;\n }\n \n \n $productId = $invoiceItem->getProductId();\n $productList = Mage::getModel('catalog/product')->getCollection()\n ->addAttributeToSelect($config->properties->widthattribute)\n ->addAttributeToSelect($config->properties->lengthattribute)\n ->addAttributeToSelect($config->properties->heightattribute);\n $productList->addIdFilter($productId);\n // Fetch the product\n foreach($productList as $product) {\n //echo $pl->getData('package_depth');\n break;\n } // end for\n \n $productData=(object)array(\"weight\"=>$invoiceItem->getWeight()*$config->properties->convert_weight,\n \"itemid\"=>$productId,\"itemname\"=>$product->getSku(). ' ' .$invoiceItem->getName(),\n \"itemPrice\"=>($invoiceItem->getParentItem() ? $invoiceItem->getParentItem()->getPrice() : $invoiceItem->getPrice()),\n \"qty\" => ($invoiceItem->getParentItem() ? $invoiceItem->getParentItem()->getQty() : $invoiceItem->getQty()));\n \n $length = $product->getData($config->properties->lengthattribute)*$config->properties->convert_size;\n if ($length==\"\" && $config->properties->defaultlength>0) {\n $length = $config->properties->defaultlength*$config->properties->convert_size;\n }\n \n $width = $product->getData($config->properties->widthattribute)*$config->properties->convert_size;\n if ($width==\"\" && $config->properties->defaultwidth>0) {\n $width = $config->properties->defaultwidth * $config->properties->convert_size;\n }\n \n $height = $product->getData($config->properties->heightattribute)*$config->properties->convert_size;\n if ($height==\"\" && $config->properties->defaultheight>0) {\n $height = $config->properties->defaultheight * $config->properties->convert_size;\n }\n \n $productData->dimensions=array($length,$width,$height);\n rsort($productData->dimensions);\n $totalItems+=$productData->qty;\n if ($productData->weight>0) {\n $config->shipments[]=$productData; \n }\n \n \n }\n // Sort the items based on size\n \n usort($config->shipments,array($this,\"shipmentsSort\")); \n $config->totalItems = $totalItems;\n }",
"public function getLineItems();",
"protected function assemble_line_items() {\n\t\t$collection = new LineItems();\n\t\tforeach ( $this->wc_order->get_items() as $line_item_data ) {\n\t\t\t$collection[] = $this->assemble_one_line_item( $line_item_data );\n\t\t}\n\t\treturn $collection;\n\t}",
"public function importItems()\n {\n $helper = Mage::helper('threadflo');\n $items = $this->send($this->getProductsApiUrl());\n\n if (isset($items)) {\n foreach ($items->item->item as $item) {\n $threadfloItemId = (int)$item->id;\n $itemName = (string)$item->name;\n $parentSku = (string)$item->parent_sku;\n $threadfloProduct = $this->send($this->getProductApiUrl($threadfloItemId));\n\n if (!$threadfloProduct) {\n $threadfloItemModel = Mage::getModel('threadflo/item')->load($threadfloItemId, 'threadflo_item_id');\n\n if ($threadfloItemModel) {\n $threadfloItemModel->delete();\n\n $helper->log('Product with Threadflo Item ID '.$threadfloItemId.' deleted.');\n\n continue;\n }\n } else {\n foreach ($threadfloProduct->item_variants->item_variant as $threadfloItem) {\n $sku = (string)$threadfloItem->sku;\n $categoryName = (string)$threadfloProduct->category_name;\n $colorName = (string)$threadfloItem->color_name;\n $sizeName = (string)$threadfloItem->size_name;\n $price = (double)$threadfloProduct->unit_price;\n\n $threadfloItemModel = Mage::getModel('threadflo/item')->load($sku, 'sku');\n\n $newItemData = array(\n 'entity_id' => $threadfloItemModel->getEntityId() ? $threadfloItemModel->getEntityId() : null,\n 'threadflo_item_id' => $threadfloItemId,\n 'item_name' => $itemName,\n 'category_name' => $categoryName,\n 'parent_sku' => $parentSku,\n 'sku' => $sku,\n 'color_name' => $colorName,\n 'size_name' => $sizeName,\n 'price' => $price\n );\n\n $threadfloItemModel->setData($newItemData)->save();\n\n $threadfloItemModel->deleteImages();\n\n foreach ($threadfloProduct->item_images->item_image as $threadfloItemImage) {\n $imageName = (string)$threadfloItemImage->name;\n $imageUrl = (string)$threadfloItemImage->url;\n $threadfloItemImageModel = Mage::getModel('threadflo/item_image');\n\n $newItemImageData = array(\n 'threadflo_item_id' => $threadfloItemModel->getId(),\n 'name' => $imageName,\n 'url' => $imageUrl\n );\n\n $threadfloItemImageModel->setData($newItemImageData)->save();\n }\n\n $helper->log('Product with Threadflo Item ID '.$threadfloItemId.' imported.');\n }\n }\n }\n\n $helper->log('Threadflo design sync complete.');\n\n return true;\n }\n\n return false;\n }",
"public function calculateInvoice() {\n foreach ($this->__get('items') as $item) {\n $this->__set('total', $this->__get('total') + $item->calculateItemTotal());\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the appScopeId Identifier of the appspecific scope when the role eligibility is scoped to an app. The scope of a role eligibility determines the set of resources for which the principal is eligible to access. App scopes are scopes that are defined and understood by this application only. Use / for tenantwide app scopes. Use directoryScopeId to limit the scope to particular directory objects, for example, administrative units. Supports $filter (eq, ne, and on null values). | public function setAppScopeId($val)
{
$this->_propDict["appScopeId"] = $val;
return $this;
} | [
"public function setScopeId($scopeId)\n {\n $collection = [];\n if ($this->_scope == self::NODE_SCOPE_STORE) {\n $collection = $this->_systemStore->getStoreCollection();\n } elseif ($this->_scope == self::NODE_SCOPE_WEBSITE) {\n $collection = $this->_systemStore->getWebsiteCollection();\n }\n\n $isSet = false;\n foreach ($collection as $scope) {\n if ($scope->getCode() == $scopeId || $scope->getId() == $scopeId) {\n $isSet = true;\n $this->_scopeId = $scope->getId();\n }\n }\n\n if (!$isSet) {\n $this->_scope = self::NODE_SCOPE_DEFAULT;\n $this->_scopeId = self::NODE_SCOPE_DEFAULT_ID;\n }\n\n return $this->setData(self::SCOPE, $this->_scope)\n ->setData(self::SCOPE_ID, $this->_scopeId);\n }",
"public function getAppScopeId()\n {\n if (array_key_exists(\"appScopeId\", $this->_propDict)) {\n return $this->_propDict[\"appScopeId\"];\n } else {\n return null;\n }\n }",
"public function setScope($scope) {\n static::$server->setApplicationScope(\n rawurlencode(PermissionScopes::prepare($scope))\n );\n }",
"public function setScopeEntityId($scopeEntityId)\n {\n $this->scopeEntityId = $scopeEntityId;\n return $this;\n }",
"public function setAppScope(?AppScope $value): void {\n $this->getBackingStore()->set('appScope', $value);\n }",
"public function setScope($key,$scope,$owner=null);",
"public function setScopeCode($code);",
"public function addUserScope($uId)\n\t{\n\t\t$this->userScope = $uId;\n\t}",
"public function app_scope_id(){\n\t\treturn $this->app_scope_id;\n\t}",
"public function setResourceScopeId(?string $value): void {\n $this->getBackingStore()->set('resourceScopeId', $value);\n }",
"public function setScope($scope);",
"protected function ensureScopeIdInitialized()\n {\n if (null === $this->scopeId) {\n $scopeId = 0;\n\n $token = $this->securityContext->getToken();\n if ($token) {\n $user = $token->getUser();\n if ($user instanceof User && $user->getId()) {\n $scopeId = $user->getId();\n }\n }\n\n $this->scopeId = $scopeId;\n }\n }",
"public function associateScope($session_id, $scope_id) {\n\n\t\t$session = O('oauth2_session', $session_id);\n\t\t$scopes = explode(' ', $session->scopes);\n\t\tif (!in_array($scope_id, $scopes)) {\n\t\t\t$scopes[] = $scope_id;\n\t\t}\n\t\t$session->scopes = join(' ', $scopes);\n\t\t$session->save();\n\t}",
"public function setAppID($id)\n {\n $this->parameters['appid'] = $id;\n }",
"public function addRequiredScope($api_endpoint_id, $scope_id)\n {\n $res = false;\n\n\t $this->tx_service->transaction(function () use($api_endpoint_id, $scope_id,&$res){\n\n $api_endpoint = ApiEndpoint::find($api_endpoint_id);\n\n if(is_null($api_endpoint))\n throw new InvalidApiEndpoint(sprintf(\"api endpoint id %s does not exists!.\",$api_endpoint_id));\n\n $scope = ApiScope::find($scope_id);\n\n if(is_null($scope))\n throw new InvalidApiScope(sprintf(\"api scope id %s does not exists!.\",$scope_id));\n\n if($scope->api_id!==$api_endpoint->api_id)\n throw new InvalidApiScope(sprintf(\"api scope id %s does not belong to api id %s !.\",$scope_id,$api_endpoint->api_id));\n\n $res = $api_endpoint->scopes()->where('id','=',$scope_id)->count();\n\n if($res>0)\n throw new InvalidApiScope(sprintf(\"api scope id %s already belongs to endpoint id %s!.\",$scope_id,$api_endpoint->id));\n\n $api_endpoint->scopes()->attach($scope_id);\n\n $res = true;\n });\n return $res;\n }",
"public function setScope($scope)\n {\n if ($this->_scope !== null) {\n throw new InvalidCallException(\"Scope can only be set through application configuration.\");\n }\n $this->_scope = $scope;\n }",
"public function patchApplicationRole($applicationId, $roleId, $request)\n {\n return $this->start()->uri(\"/api/application\")\n ->urlSegment($applicationId)\n ->urlSegment(\"role\")\n ->urlSegment($roleId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->patch()\n ->go();\n }",
"public function updateAssignedScopeObjectRoles($appliesTo, $securableId, $scopeObjectRolesAssignments, $accountId = Account::LOGGED_IN_ACCOUNT) {\n /**\n * Process each scope object roles assignment object\n */\n foreach ($scopeObjectRolesAssignments as $scopeObjectRolesAssignment) {\n\n\n // Grab the roles\n $roleIds = $scopeObjectRolesAssignment->getRoleIds();\n\n $candidateRoles = [];\n\n $realRoleIds = [];\n foreach ($roleIds as $roleId) {\n if (is_numeric($roleId) && $roleId > 0)\n $realRoleIds[] = $roleId;\n else {\n if ($appliesTo == Role::APPLIES_TO_USER)\n $candidateRoles[] = new UserRole($scopeObjectRolesAssignment->getScope(), $scopeObjectRolesAssignment->getScopeId(), 0, $accountId, $securableId);\n else\n $candidateRoles[] = new APIKeyRole($scopeObjectRolesAssignment->getScope(), $scopeObjectRolesAssignment->getScopeId(), 0, $accountId, $securableId);\n }\n }\n\n $roles = sizeof($realRoleIds) > 0 ? Role::multiFetch($realRoleIds) : [];\n // Create and save new user roles\n foreach ($realRoleIds as $roleId) {\n if (isset($roles[$roleId])) {\n $role = $roles[$roleId];\n if ($appliesTo == Role::APPLIES_TO_USER)\n $securableRole = new UserRole($role->getScope(), $scopeObjectRolesAssignment->getScopeId(), $roleId, $accountId, $securableId);\n else\n $securableRole = new APIKeyRole($role->getScope(), $scopeObjectRolesAssignment->getScopeId(), $roleId, $accountId, $securableId);\n $candidateRoles[] = $securableRole;\n }\n }\n\n // Limit the roles to just assignable ones.\n $scopeAccess = $this->scopeManager->getScopeAccess($scopeObjectRolesAssignment->getScope());\n $newRoles = $scopeAccess->getAssignableSecurableRoles($candidateRoles);\n\n // Move old roles out of the way.\n if ($appliesTo == Role::APPLIES_TO_USER) {\n $userRoles = UserRole::filter(\"WHERE userId = ? AND accountId = ? AND scope = ? AND scope_id = ?\", $securableId, $accountId, $scopeObjectRolesAssignment->getScope(), $scopeObjectRolesAssignment->getScopeId());\n foreach ($userRoles as $userRole) {\n $userRole->remove();\n }\n } else {\n $apiKeyRoles = APIKeyRole::filter(\"WHERE apiKeyId = ? AND accountId = ? AND scope = ? AND scope_id = ?\", $securableId, $accountId, $scopeObjectRolesAssignment->getScope(), $scopeObjectRolesAssignment->getScopeId());\n foreach ($apiKeyRoles as $apiKeyRole) {\n $apiKeyRole->remove();\n }\n }\n\n // Save new roles\n foreach ($newRoles as $newRole) {\n $newRole->save();\n }\n\n\n }\n\n\n }",
"public function setScope($scope = self::SCOPE_NONE)\n {\n $this->_scope = $scope;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this is the action for the client config This will be rendered in the client views in the admin area | public function clientconfigAction()
{
} | [
"public function view_crud_config () {\n $this->getResponse()->setData('context', 'crud');\n $this->getCrudinstance()->listconfig();\n return;\n }",
"protected function _configAction()\n {\n $this->_redirect('admin/system_config/edit', ['section' => $this->_configSection()]);\n }",
"public function feconfigAction()\n {\n $this->init();\n $this->getLayout()->getBlock('head')->setTitle(Mage::helper('includekrexx')->__('Administer krexX FE editing'));\n $this->renderLayout();\n }",
"public function actionConfig() {\n $configs = WebConfig::model()->findAllByAttributes(array('visible' => 1));\n //var_dump($configs);\n //exit();\n $this->render('/system/config', array('configs' => $configs));\n }",
"public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink('AdminMyModuleConfiguration'));\n }",
"public function config_page() {\n\t\trequire HS_DOCS_API_DIR_PATH . 'admin/views/admin-page.php';\n\t}",
"public static function pxp_admin_clients()\n\t{\n\t\t$action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : '';\n?>\n\t\t<div class=\"wrap\">\n<?php\n\t\tif( $action == \"add-new\" ):\n\t\t\tself::pxp_admin_add_client_display();\n\t\telse:\n\t\t\tself::pxp_admin_client_list();\n\t\tendif;\n?>\t\n\t\t</div>\n<?php\n\t}",
"public function vp_config_page()\r\n\t{\r\n\t\t$attributes = array( 'vp_instance' => &$this );\r\n\t\techo vp_get_template_html( 'admin', $attributes );\r\n\t}",
"public function indexAction()\n {\n $service = $this->getConfigAdminService();\n\n if ($this->request->isPost()) {\n $config = $this->request->getPost();\n $successful = false;\n if (!empty($config['preview'])) {\n if ($service->previewConfigValues($config)) {\n $message = '<strong>Ready to preview</strong> ';\n $message .= 'You may navigate the site to test your changes. ';\n $message .= '<div><em>The changes will not be made permanent until saved.</em></div>';\n $message = array('message' => $message, 'type' => 'info');\n $successful = true;\n }\n\n } else if (!empty($config['reset'])) {\n $service->resetConfigValues();\n $message = '<strong>Preview Settings have been reset</strong> ';\n $message = array('message' => $message);\n $successful = true;\n\n } else if (!empty($config['save'])) {\n if ($service->saveConfigValues($config)) {\n $message = '<strong>Settings have been saved</strong> ';\n $message = array('message' => $message, 'type' => 'success');\n $successful = true;\n }\n }\n\n if ($successful) {\n $this->flashMessenger()\n ->setNamespace('cgmconfigadmin')\n ->addMessage($message);\n return $this->redirect()->toRoute();\n }\n }\n return array(\n 'form' => $service->getConfigOptionsForm(),\n );\n }",
"public function admin_options()\n {\n }",
"function before_edit_configuration() { }",
"public function actionConfigSyncKickoff(): Response\n {\n return $this->renderTemplate('_special/configsync');\n }",
"function admin_view ($id=null) { \r\n\t\t$session=$this->Session->read(KT_SESSION); \r\n \t\t$this->set(\"id_configuracion\",$session['Ktconfiguration']['id']); \r\n\t\t$this->set('ruta_admin',$this->ruta_admin); \t\r\n \t$this->Ktconfiguration->id=$id;\r\n \t$this->set('configurations',$this->Ktconfiguration->read()); \t\r\n\t}",
"public function nodeconfigAction()\n {\n \n }",
"function renderConfigForm() {\n\t}",
"public static function admin_settings() {\n }",
"public function settings_page(){\n\t\t_e('<div class=\"wrap\">\n\t\t\t<img class=\"alignleft\" style=\"margin:0 10px 10px 0\" alt=\"\" src=\"'.Salesforce_API_Connector::$plugin_dir_url.'assets/images/sf.png\" />\n\t\t\t<h2>Saleforce API Connector</h2>\n\t\t</div>');\n\t}",
"abstract public function admin_options();",
"public function templateAction()\n {\n if ($error = $this->_getService()->isvalidAPIKey()) {\n $this->_getSession()->addError($error);\n $this->_redirect('adminhtml/system_config/edit/section/smsservice');\n return;\n }\n\n $this->loadLayout();\n $this->renderLayout();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query DB for valid codes for a specific phoneNumber | private function searchCode($telephone)
{
$result = self::$ctx->get('db')->query(
"SELECT `code` FROM $this->table_name WHERE telephone= {$telephone} AND is_valid = 1 AND UNIX_TIMESTAMP(createdAt)> ( UNIX_TIMESTAMP(NOW()) - 1000 ) LIMIT 1"
);
return $result->row ? $result->row['code'] : false;
} | [
"function findContactByPhoneNo($phoneNumber)\n {\n $contact = false;\n $phoneNumber = str_replace(\"+\", \"\", $phoneNumber);\n $roql_result_set = Connect\\ROQL::query(\"SELECT ID,Name.First,Name.Last FROM Contact C where Phones.PhoneList.RawNumber='\" . $phoneNumber . \"' LIMIT 1\");\n \n while ($roql_result = $roql_result_set->next()) {\n if ($row = $roql_result->next()) {\n $contact = Connect\\Contact::fetch($row[ID]);\n }\n }\n \n return $contact;\n }",
"abstract protected function retrieveCountryPhoneNumberRow($code);",
"abstract protected function retrieveCountryPhoneNumberRowFromInternationalCode($code);",
"public function checkCode()\n {\n $query = \"SELECT * FROM users WHERE email = '$this->email' AND code = $this->code\";\n return $this->runDQL($query);\n }",
"function searchPhone()\n {\n $this->validateCTIAccess();\n \n $result = false;\n $phone = $this->input->post(\"phone\");\n // TODO - sanitize phone number\n if( $phone === false )\n {\n header(\"HTTP/1.0 400 Invalid Request\");\n }\n\n $contact_data = self::$connect->getContactData( $phone, false );\n\n if( $contact_data === false )\n {\n $result = [\n \"success\" => false,\n \"contact\" => [\n \"name\" => \"Unknown Caller\",\n \"firstName\" => \"Unknown\",\n \"lastName\" => \"Caller\",\n \"phone\"=> $phone,\n \"email\"=> \"\",\n \"dp\" => \"https://www.gravatar.com/avatar/\" . md5( 'example@example.com' ) . \"?d=mm\"\n ]\n ];\n }\n else\n {\n $result = [\n \"success\" => true,\n \"contact\" => $contact_data\n ];\n }\n print json_encode( $result );\n }",
"public function searchPhoneNumber($phonenumber){\r\n\t\t\r\n\t\t//See if the phonenumber is an array or a single phonenumber\r\n\t\tif(is_array($phonenumber)){\r\n\t\t\t$this->phonenumberarray = $phonenumber;\r\n\t\t} else{\r\n\t\t\t//Means the phone number is just 1 so we need to make it into an array;\r\n\t\t\t$this->phonenumberarray[0] = $phonenumber;\r\n\t\t}\r\n\t\tforeach($this->phonenumberarray as $phonenum){\r\n\t\t\t$cleanedupnumber = $this->cleanUpNumber($phonenum);\r\n\t\t\t$url = $this->constructURL($cleanedupnumber);\r\n\t\t\t$tempreturnarray = $this->sendCurl($url);\r\n\t\t\t$this->rawphoneapireturn = $tempreturnarray;\r\n\t\t\t\r\n\t\t\tif(!isset($tempreturnarray)) throw new Exception(\"There was an error in the curl process\");\r\n\t\t\tif($tempreturnarray['error'] != false) throw new Exception(\"There was an error in getting the phone number.-\" . $tempreturnarray['error_text']);\t\t\t\r\n\t\t\tif(count($tempreturnarray['results']) == 0) return false; //No matters were found.\r\n\t\t\t\r\n\t\t\tforeach($tempreturnarray['results'] as $case){\r\n\t\t\t\t//Saves the results to the numericarray.\r\n\t\t\t\t\r\n\t\t\t\t$exists = false;\r\n\t\t\t\tfor($x=0;$x<count($this->numericarray);$x++){\r\n\t\t\t\t\t//Checks to see if this case is already part of the raw return array.\r\n\t\t\t\t\tif($this->numericarray[$x]['id'] == $case['id']){\r\n\t\t\t\t\t\t$exists = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif($exists == false) $this->numericarray[] = $case;\r\n\t\t\t\t$this->matterarray[$case['id']['text_value']] = $case;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->numericarray;\r\n\t}",
"public function sendVerifyCode($phone);",
"function vcodeValidation($db,$vcode){\n\t\t\t\n\t\t\n\t\t$found = 0;\n\t\tforeach($db->query('SELECT * FROM registration') as $row) {\n \n\t\t\t$check_vcode = $row['verification_code'];\n\t\n\t\n\t\t\tif($check_vcode == $vcode){\n\t\t\t\t\t$found = 1;\n\t\t\t}\n\t\n\t\t}\n\treturn $found;\n}",
"function getCustomerByPhone($phone_number) {\n\t\t$DB = LMSDB::getInstance();\n\n\t\t$customer = $DB->GetRow('SELECT\n\t\t\t\t\t\t\t\t\t\t\t\tva.id as voipaccountid, va.phone, va.balance, t.id as tariffid\n\t\t\t\t\t\t\t\t\t\t\t FROM\n\t\t\t\t\t\t\t\t\t\t\t\tvoipaccounts va left join assignments a on va.ownerid = a.customerid left join tariffs t on t.id = a.tariffid\n\t\t\t\t\t\t\t\t\t\t\t WHERE\n\t\t\t\t\t\t\t\t\t\t\t\tva.phone ?LIKE? ? and\n\t\t\t\t\t\t\t\t\t\t\t\tt.type = ?', array($phone_number, TARIFF_PHONE));\n\n\t\tif (!$customer)\n\t\t\tdie('Caller number phone \"' . $phone_number . '\" not found.' . PHP_EOL);\n\n\t\treturn $customer;\n\t}",
"public static function findByCode ($code) {\n // remove special chars\n $code = str_replace(array(\"'\", '\"'), \"\", $code);\n \n $db = Zend_Registry::get('dbAdapter');\n return $db->fetchRow(\n \"SELECT *\n FROM `rabatt_codes_verification` r\n WHERE r.registrationCode = ?\n LIMIT 1\", $code\n ); \n }",
"abstract protected function retrieveCountryPhoneNumberDialPlanRows($code);",
"public function createPhoneNumberVerificationCode();",
"function findCustomerByPhone(mysqli $db, string $phone)\n{\n $sql = \"SELECT * FROM `CustomerData` WHERE `Phone` LIKE '\";\n $sql.= $phone . \"'\";\n\n return $db->query($sql);\n}",
"function getCustomerByPhone($phone_number) {\n\t\t$DB = LMSDB::getInstance();\n\n\t\t$customer = $DB->GetRow('SELECT\n\t\t\t\t\t\t\t\t\tva.id as voipaccountid, va.phone, va.balance, t.id as tariffid, va.flags\n\t\t\t\t\t\t\t\t FROM\n\t\t\t\t\t\t\t\t\tvoipaccounts va\n\t\t\t\t\t\t\t\t\tleft join assignments a on va.ownerid = a.customerid\n\t\t\t\t\t\t\t\t\tleft join tariffs t on t.id = a.tariffid\n\t\t\t\t\t\t\t\t WHERE\n\t\t\t\t\t\t\t\t\tva.phone ?LIKE? ? and\n\t\t\t\t\t\t\t\t\tt.type = ?', array($phone_number, TARIFF_PHONE));\n\n\t\treturn (!$customer) ? NULL : $customer;\n\t}",
"public function lookup(string $postcode, string $number): array;",
"public static function phoneCodes()\n {\n return self::getInstance()->phoneCodes();\n }",
"function get_customer_by_phone($phone) {\n return $this->db->get_where('customer', array('phone' => $phone))->result_array();\n }",
"function check_e164Format($countryCode, $phone)\n {\n $item = Country::where('iso', $countryCode)->select('phonecode')->first();\n $len = strlen($item->phonecode);\n $phone_prefix = substr($phone, 0, $len);\n\n if ($phone_prefix == $item->phonecode) \n {\n return false;\n }\n else\n {\n return 'number should start with '.$item->phonecode;\n }\n }",
"public static function isInvalidVerifyCode($phone, $code) // rename function to reflict on code login\n {\n $find = VerifyCode::where('phone', $phone)\n ->where('code', $code)\n ->whereNotNull('code')\n ->whereNotNull('phone')\n ->first();\n\n if (!$find) {\n return self::laravelJsonError([\n 'verify_code' => [trans('phone_lib.invalid_verify_code')]\n ], false);\n }\n\n if ($find->code_expire < Carbon::now()->toDateTimeString()) {\n return PhoneLib::laravelJsonError([\n 'verify_code' => [trans('phone_lib.invalid_verify_code_expire')]\n ], false);\n }\n\n VerifyCode::where('phone', $phone)\n ->update([\n 'retry_times' => 0,\n 'code' => null,\n 'message' => null,\n 'code_expire' => null,\n 'retry_in' => null\n ]);\n // return true;\n return false;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether a different Craft version has been uploaded. | public function getHasCraftVersionChanged(): bool
{
return (Craft::$app->getVersion() != Craft::$app->getInfo()->version);
} | [
"public function isWrongFilesVersion()\n\t{\n\t\treturn $this->wrongFilesVersion;\n\t}",
"public function isInstallVersionNewer()\n {\n // Get a db connection so we can find the installed version from #__extensions\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n\n $query\n ->select ($db->quoteName('manifest_cache'))\n ->from ($db->quoteName('#__extensions'))\n ->where ($db->quoteName('element') . ' = '. $db->quote('com_cajobboard'));\n\n $db->setQuery($query);\n\n $manifest = json_decode($db->loadResult(), true);\n $installedRelease = $manifest['version'];\n\n if (version_compare($newRelease, $installedRelease, 'le'))\n {\n JFactory::getApplication()->enqueueMessage(\n Text::sprintf('COM_CAJOBBOARD_NO_UPDATE_TO_AN_OLDER_VERSION', $installedRelease, $newRelease), 'error'\n );\n\n return false;\n }\n\n return true;\n }",
"public function isVersionSent();",
"function is_update_version() {\n return $this->version['stage'] <= self::latest_stage;\n }",
"public function updateCraftVersionInfo(): bool\n {\n $info = Craft::$app->getInfo();\n $info->version = Craft::$app->getVersion();\n $info->schemaVersion = Craft::$app->schemaVersion;\n\n Craft::$app->saveInfo($info);\n\n // Only update the schema version if it's changed from what's in the file,\n // so we don't accidentally overwrite other pending changes\n $projectConfig = Craft::$app->getProjectConfig();\n if ($projectConfig->get(ProjectConfig::CONFIG_SCHEMA_VERSION_KEY, true) !== $info->schemaVersion) {\n Craft::$app->getProjectConfig()->set(ProjectConfig::CONFIG_SCHEMA_VERSION_KEY, $info->schemaVersion, 'Update Craft schema version');\n }\n\n return true;\n }",
"public function has_versions()\n {\n return ($this->get_current() != 1);\n }",
"public function verifyUpload()\n {\n // If the file has been renamed, we can assume a\n // succsessfull upload has taken place.\n if ($this->_renamed) {\n\n return true;\n }\n }",
"public function isUpload()\n {\n return ($this->params()->fromPost('extUpload') === 'true');\n }",
"private function checkCacheVersion()\n {\n $file = $this->getDirectory() . '/.version';\n\n if (!file_exists($file)) {\n return false;\n }\n\n $version = md5($this->app['bolt_version'].$this->app['bolt_name']);\n $cached = file_get_contents($file);\n\n if ($version === $cached) {\n return true;\n }\n\n return false;\n }",
"private function is_new_install() {\n\n\t\t\t// Get auto saved version number.\n\t\t\t$saved_version = Astra_Addon_Update::astra_addon_stored_version();\n\n\t\t\tif ( false === $saved_version ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function hasFullVersion(): bool;",
"function isUpload()\n {\n return ($this->type->getTypeName() == 'file');\n }",
"private function isNewThemeVersion(): string\n {\n $knownVersion = $this->getOption('version');\n $currentVersion = wp_get_theme()->get('Version');\n \n if ($knownVersion !== $currentVersion) {\n $this->updateOption('version', $currentVersion);\n return true;\n }\n \n return false;\n }",
"public function getIsModifiedOnStage()\n {\n // new unsaved pages could be never be published\n if ($this->isNew()) {\n return false;\n }\n\n $stageVersion = Versioned::get_versionnumber_by_stage('ContentModule', 'Stage', $this->ID);\n $liveVersion = Versioned::get_versionnumber_by_stage('ContentModule', 'Live', $this->ID);\n\n return ($stageVersion && $stageVersion != $liveVersion);\n }",
"protected function isVersioned()\n {\n return Injector::inst()->get($this->owner->modelClass)->hasExtension(Versioned::class);\n }",
"public function validateVersion() {\n if ($_SERVER['REQUEST_METHOD'] != 'POST') return false;\n if ($this->generateChecksumForVersion() != $this->data->checksum) return false;\n return true;\n }",
"public function upgradeCheck()\n {\n $module = $this->getNormalizedModuleName();\n if (!isset($GLOBALS['beanList'][$module])) {\n // don't upgrade non-deployed search defs\n return false;\n }\n $target = $this->getNewFileName($this->viewtype);\n if(file_exists($target)) {\n // if we already have the target, skip the upgrade\n return false;\n }\n return true;\n }",
"public function isVersioned()\n\t{\n\t\treturn (bool) $this->getVersion();\n\t}",
"protected function mm_current_version() {\n $options = $this->options;\n if($options['version'] == MM_PLUGIN_VER)\n return true;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of SoundImpl for the mob.camel.ambient sound. | public static function MOB_CAMEL_AMBIENT(): SoundImpl
{
return new SoundImpl(SoundIds::MOB_CAMEL_AMBIENT);
} | [
"public static function MOB_CAT_EAT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_CAT_EAT);\n }",
"public static function RANDOM_EAT(): SoundImpl\n {\n return new SoundImpl(SoundIds::RANDOM_EAT);\n }",
"public static function MOB_SHULKER_AMBIENT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_SHULKER_AMBIENT);\n }",
"public static function MOB_SQUID_AMBIENT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_SQUID_AMBIENT);\n }",
"public static function MOB_CAT_MEOW(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_CAT_MEOW);\n }",
"public static function SOUND_DEFINITIONS(): SoundImpl\n {\n return new SoundImpl(SoundIds::SOUND_DEFINITIONS);\n }",
"public static function RANDOM_FUSE(): SoundImpl\n {\n return new SoundImpl(SoundIds::RANDOM_FUSE);\n }",
"public static function MOB_WITHER_SHOOT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_WITHER_SHOOT);\n }",
"public static function MOB_GUARDIAN_AMBIENT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_GUARDIAN_AMBIENT);\n }",
"public static function RANDOM_ANVIL_USE(): SoundImpl\n {\n return new SoundImpl(SoundIds::RANDOM_ANVIL_USE);\n }",
"public static function MOB_FOX_EAT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_FOX_EAT);\n }",
"public static function MOB_SNIFFER_EAT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_SNIFFER_EAT);\n }",
"public static function NOTE_BASSATTACK(): SoundImpl\n {\n return new SoundImpl(SoundIds::NOTE_BASSATTACK);\n }",
"public static function MUSIC_DEFINITIONS(): SoundImpl\n {\n return new SoundImpl(SoundIds::MUSIC_DEFINITIONS);\n }",
"public static function MOB_WARDEN_LISTENING_(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_WARDEN_LISTENING_);\n }",
"public static function MOB_HORSE_EAT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_HORSE_EAT);\n }",
"public static function MOB_DOLPHIN_EAT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_DOLPHIN_EAT);\n }",
"public static function MOB_GOAT_IMPACT(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_GOAT_IMPACT);\n }",
"public static function MOB_CAMEL_DASH(): SoundImpl\n {\n return new SoundImpl(SoundIds::MOB_CAMEL_DASH);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create request for operation 'getVariableInstance' | public function getVariableInstanceRequest($id, $deserialize_value = null)
{
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling getVariableInstance'
);
}
$resourcePath = '/variable-instance/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
if ($deserialize_value !== null) {
if('form' === 'form' && is_array($deserialize_value)) {
foreach($deserialize_value as $key => $value) {
$queryParams[$key] = $value;
}
}
else {
$queryParams['deserializeValue'] = $deserialize_value;
}
}
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
foreach ($formParamValueItems as $formParamValueItem) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValueItem
];
}
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
} | [
"public function getVariableInstancesRequest($variable_name = null, $variable_name_like = null, $process_instance_id_in = null, $execution_id_in = null, $case_instance_id_in = null, $case_execution_id_in = null, $task_id_in = null, $batch_id_in = null, $activity_instance_id_in = null, $tenant_id_in = null, $variable_values = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null, $deserialize_values = null)\n {\n\n $resourcePath = '/variable-instance';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($variable_name !== null) {\n if('form' === 'form' && is_array($variable_name)) {\n foreach($variable_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableName'] = $variable_name;\n }\n }\n // query params\n if ($variable_name_like !== null) {\n if('form' === 'form' && is_array($variable_name_like)) {\n foreach($variable_name_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNameLike'] = $variable_name_like;\n }\n }\n // query params\n if ($process_instance_id_in !== null) {\n if('form' === 'form' && is_array($process_instance_id_in)) {\n foreach($process_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceIdIn'] = $process_instance_id_in;\n }\n }\n // query params\n if ($execution_id_in !== null) {\n if('form' === 'form' && is_array($execution_id_in)) {\n foreach($execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['executionIdIn'] = $execution_id_in;\n }\n }\n // query params\n if ($case_instance_id_in !== null) {\n if('form' === 'form' && is_array($case_instance_id_in)) {\n foreach($case_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseInstanceIdIn'] = $case_instance_id_in;\n }\n }\n // query params\n if ($case_execution_id_in !== null) {\n if('form' === 'form' && is_array($case_execution_id_in)) {\n foreach($case_execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseExecutionIdIn'] = $case_execution_id_in;\n }\n }\n // query params\n if ($task_id_in !== null) {\n if('form' === 'form' && is_array($task_id_in)) {\n foreach($task_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['taskIdIn'] = $task_id_in;\n }\n }\n // query params\n if ($batch_id_in !== null) {\n if('form' === 'form' && is_array($batch_id_in)) {\n foreach($batch_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['batchIdIn'] = $batch_id_in;\n }\n }\n // query params\n if ($activity_instance_id_in !== null) {\n if('form' === 'form' && is_array($activity_instance_id_in)) {\n foreach($activity_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['activityInstanceIdIn'] = $activity_instance_id_in;\n }\n }\n // query params\n if ($tenant_id_in !== null) {\n if('form' === 'form' && is_array($tenant_id_in)) {\n foreach($tenant_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['tenantIdIn'] = $tenant_id_in;\n }\n }\n // query params\n if ($variable_values !== null) {\n if('form' === 'form' && is_array($variable_values)) {\n foreach($variable_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValues'] = $variable_values;\n }\n }\n // query params\n if ($variable_names_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_names_ignore_case)) {\n foreach($variable_names_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNamesIgnoreCase'] = $variable_names_ignore_case;\n }\n }\n // query params\n if ($variable_values_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_values_ignore_case)) {\n foreach($variable_values_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValuesIgnoreCase'] = $variable_values_ignore_case;\n }\n }\n // query params\n if ($sort_by !== null) {\n if('form' === 'form' && is_array($sort_by)) {\n foreach($sort_by as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortBy'] = $sort_by;\n }\n }\n // query params\n if ($sort_order !== null) {\n if('form' === 'form' && is_array($sort_order)) {\n foreach($sort_order as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortOrder'] = $sort_order;\n }\n }\n // query params\n if ($first_result !== null) {\n if('form' === 'form' && is_array($first_result)) {\n foreach($first_result as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstResult'] = $first_result;\n }\n }\n // query params\n if ($max_results !== null) {\n if('form' === 'form' && is_array($max_results)) {\n foreach($max_results as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['maxResults'] = $max_results;\n }\n }\n // query params\n if ($deserialize_values !== null) {\n if('form' === 'form' && is_array($deserialize_values)) {\n foreach($deserialize_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValues'] = $deserialize_values;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function createProcessInstanceVariableRequest($process_instance_id)\n {\n // verify the required parameter 'process_instance_id' is set\n if ($process_instance_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $process_instance_id when calling createProcessInstanceVariable'\n );\n }\n\n $resourcePath = '/runtime/process-instances/{processInstanceId}/variables';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($process_instance_id !== null) {\n $resourcePath = str_replace(\n '{' . 'processInstanceId' . '}',\n ObjectSerializer::toPathValue($process_instance_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getHistoricVariableInstancesRequest($variable_name = null, $variable_name_like = null, $variable_value = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null, $variable_type_in = null, $include_deleted = null, $process_instance_id = null, $process_instance_id_in = null, $process_definition_id = null, $process_definition_key = null, $execution_id_in = null, $case_instance_id = null, $case_execution_id_in = null, $case_activity_id_in = null, $task_id_in = null, $activity_instance_id_in = null, $tenant_id_in = null, $without_tenant_id = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null, $deserialize_values = null)\n {\n\n $resourcePath = '/history/variable-instance';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($variable_name !== null) {\n if('form' === 'form' && is_array($variable_name)) {\n foreach($variable_name as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableName'] = $variable_name;\n }\n }\n // query params\n if ($variable_name_like !== null) {\n if('form' === 'form' && is_array($variable_name_like)) {\n foreach($variable_name_like as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNameLike'] = $variable_name_like;\n }\n }\n // query params\n if ($variable_value !== null) {\n if('form' === 'form' && is_array($variable_value)) {\n foreach($variable_value as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValue'] = $variable_value;\n }\n }\n // query params\n if ($variable_names_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_names_ignore_case)) {\n foreach($variable_names_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableNamesIgnoreCase'] = $variable_names_ignore_case;\n }\n }\n // query params\n if ($variable_values_ignore_case !== null) {\n if('form' === 'form' && is_array($variable_values_ignore_case)) {\n foreach($variable_values_ignore_case as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableValuesIgnoreCase'] = $variable_values_ignore_case;\n }\n }\n // query params\n if ($variable_type_in !== null) {\n if('form' === 'form' && is_array($variable_type_in)) {\n foreach($variable_type_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['variableTypeIn'] = $variable_type_in;\n }\n }\n // query params\n if ($include_deleted !== null) {\n if('form' === 'form' && is_array($include_deleted)) {\n foreach($include_deleted as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['includeDeleted'] = $include_deleted;\n }\n }\n // query params\n if ($process_instance_id !== null) {\n if('form' === 'form' && is_array($process_instance_id)) {\n foreach($process_instance_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceId'] = $process_instance_id;\n }\n }\n // query params\n if ($process_instance_id_in !== null) {\n if('form' === 'form' && is_array($process_instance_id_in)) {\n foreach($process_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processInstanceIdIn'] = $process_instance_id_in;\n }\n }\n // query params\n if ($process_definition_id !== null) {\n if('form' === 'form' && is_array($process_definition_id)) {\n foreach($process_definition_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processDefinitionId'] = $process_definition_id;\n }\n }\n // query params\n if ($process_definition_key !== null) {\n if('form' === 'form' && is_array($process_definition_key)) {\n foreach($process_definition_key as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['processDefinitionKey'] = $process_definition_key;\n }\n }\n // query params\n if ($execution_id_in !== null) {\n if('form' === 'form' && is_array($execution_id_in)) {\n foreach($execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['executionIdIn'] = $execution_id_in;\n }\n }\n // query params\n if ($case_instance_id !== null) {\n if('form' === 'form' && is_array($case_instance_id)) {\n foreach($case_instance_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseInstanceId'] = $case_instance_id;\n }\n }\n // query params\n if ($case_execution_id_in !== null) {\n if('form' === 'form' && is_array($case_execution_id_in)) {\n foreach($case_execution_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseExecutionIdIn'] = $case_execution_id_in;\n }\n }\n // query params\n if ($case_activity_id_in !== null) {\n if('form' === 'form' && is_array($case_activity_id_in)) {\n foreach($case_activity_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['caseActivityIdIn'] = $case_activity_id_in;\n }\n }\n // query params\n if ($task_id_in !== null) {\n if('form' === 'form' && is_array($task_id_in)) {\n foreach($task_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['taskIdIn'] = $task_id_in;\n }\n }\n // query params\n if ($activity_instance_id_in !== null) {\n if('form' === 'form' && is_array($activity_instance_id_in)) {\n foreach($activity_instance_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['activityInstanceIdIn'] = $activity_instance_id_in;\n }\n }\n // query params\n if ($tenant_id_in !== null) {\n if('form' === 'form' && is_array($tenant_id_in)) {\n foreach($tenant_id_in as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['tenantIdIn'] = $tenant_id_in;\n }\n }\n // query params\n if ($without_tenant_id !== null) {\n if('form' === 'form' && is_array($without_tenant_id)) {\n foreach($without_tenant_id as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['withoutTenantId'] = $without_tenant_id;\n }\n }\n // query params\n if ($sort_by !== null) {\n if('form' === 'form' && is_array($sort_by)) {\n foreach($sort_by as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortBy'] = $sort_by;\n }\n }\n // query params\n if ($sort_order !== null) {\n if('form' === 'form' && is_array($sort_order)) {\n foreach($sort_order as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['sortOrder'] = $sort_order;\n }\n }\n // query params\n if ($first_result !== null) {\n if('form' === 'form' && is_array($first_result)) {\n foreach($first_result as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['firstResult'] = $first_result;\n }\n }\n // query params\n if ($max_results !== null) {\n if('form' === 'form' && is_array($max_results)) {\n foreach($max_results as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['maxResults'] = $max_results;\n }\n }\n // query params\n if ($deserialize_values !== null) {\n if('form' === 'form' && is_array($deserialize_values)) {\n foreach($deserialize_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValues'] = $deserialize_values;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function getHistoricVariableInstancesRequest($process_instance_id = null, $task_id = null, $exclude_task_variables = null, $variable_name = null, $variable_name_like = null)\n {\n\n $resourcePath = '/history/historic-variable-instances';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($process_instance_id !== null) {\n $queryParams['processInstanceId'] = ObjectSerializer::toQueryValue($process_instance_id);\n }\n // query params\n if ($task_id !== null) {\n $queryParams['taskId'] = ObjectSerializer::toQueryValue($task_id);\n }\n // query params\n if ($exclude_task_variables !== null) {\n $queryParams['excludeTaskVariables'] = ObjectSerializer::toQueryValue($exclude_task_variables);\n }\n // query params\n if ($variable_name !== null) {\n $queryParams['variableName'] = ObjectSerializer::toQueryValue($variable_name);\n }\n // query params\n if ($variable_name_like !== null) {\n $queryParams['variableNameLike'] = ObjectSerializer::toQueryValue($variable_name_like);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function createGetVariable(){\n\t\treturn new \\GetVariable();\n\t}",
"public function getSingleProcessVariable() {\n $pi = self::$pis->getInstances(new ProcessInstanceRequest())->instance_0;\n\n $piv = new VariableRequest();\n $piv->setValue('testValue')->setType('String');\n self::$pis->putProcessVariable($pi->getId(),'testVariable', $piv);\n\n $this->assertNotEmpty(self::$pis->getProcessVariables($pi->getId()));\n $this->assertEquals('testValue', self::$pis->getProcessVariable($pi->getId(), 'testVariable')->getValue());\n\n self::$pis->deleteProcessVariable($pi->getId(), 'testVariable');\n }",
"protected function getHistoricInstanceVariableDataRequest($var_instance_id)\n {\n // verify the required parameter 'var_instance_id' is set\n if ($var_instance_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $var_instance_id when calling getHistoricInstanceVariableData'\n );\n }\n\n $resourcePath = '/history/historic-variable-instances/{varInstanceId}/data';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($var_instance_id !== null) {\n $resourcePath = str_replace(\n '{' . 'varInstanceId' . '}',\n ObjectSerializer::toPathValue($var_instance_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getVariableInstancesWithHttpInfo($variable_name = null, $variable_name_like = null, $process_instance_id_in = null, $execution_id_in = null, $case_instance_id_in = null, $case_execution_id_in = null, $task_id_in = null, $batch_id_in = null, $activity_instance_id_in = null, $tenant_id_in = null, $variable_values = null, $variable_names_ignore_case = null, $variable_values_ignore_case = null, $sort_by = null, $sort_order = null, $first_result = null, $max_results = null, $deserialize_values = null)\n {\n $request = $this->getVariableInstancesRequest($variable_name, $variable_name_like, $process_instance_id_in, $execution_id_in, $case_instance_id_in, $case_execution_id_in, $task_id_in, $batch_id_in, $activity_instance_id_in, $tenant_id_in, $variable_values, $variable_names_ignore_case, $variable_values_ignore_case, $sort_by, $sort_order, $first_result, $max_results, $deserialize_values);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\OpenAPI\\Client\\Model\\VariableInstanceDto[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\OpenAPI\\Client\\Model\\ExceptionDto' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\OpenAPI\\Client\\Model\\ExceptionDto', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\VariableInstanceDto[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\OpenAPI\\Client\\Model\\ExceptionDto',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }",
"public function createVariableInstanceQuery(): VariableInstanceQueryInterface;",
"public function getProcessVariables() {\n $pi = self::$pis->getInstances(new ProcessInstanceRequest())->instance_0;\n $pvc = count(get_object_vars(self::$pis->getProcessVariables($pi->getId())));\n\n $piv = new VariableRequest();\n $piv->setValue('testValue')->setType('String');\n self::$pis->putProcessVariable($pi->getId(),'testVariable', $piv);\n\n $this->assertEquals($pvc + 1, count(get_object_vars(self::$pis->getProcessVariables($pi->getId()))));\n\n self::$pis->deleteProcessVariable($pi->getId(), 'testVariable');\n $this->assertEquals($pvc, count(get_object_vars(self::$pis->getProcessVariables($pi->getId()))));\n }",
"protected function getProcessInstanceVariableDataRequest($process_instance_id, $variable_name, $scope = null)\n {\n // verify the required parameter 'process_instance_id' is set\n if ($process_instance_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $process_instance_id when calling getProcessInstanceVariableData'\n );\n }\n // verify the required parameter 'variable_name' is set\n if ($variable_name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $variable_name when calling getProcessInstanceVariableData'\n );\n }\n\n $resourcePath = '/runtime/process-instances/{processInstanceId}/variables/{variableName}/data';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($scope !== null) {\n $queryParams['scope'] = ObjectSerializer::toQueryValue($scope);\n }\n\n // path params\n if ($process_instance_id !== null) {\n $resourcePath = str_replace(\n '{' . 'processInstanceId' . '}',\n ObjectSerializer::toPathValue($process_instance_id),\n $resourcePath\n );\n }\n // path params\n if ($variable_name !== null) {\n $resourcePath = str_replace(\n '{' . 'variableName' . '}',\n ObjectSerializer::toPathValue($variable_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getHistoricVariableInstanceRequest($id, $deserialize_values = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling getHistoricVariableInstance'\n );\n }\n\n $resourcePath = '/history/variable-instance/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($deserialize_values !== null) {\n if('form' === 'form' && is_array($deserialize_values)) {\n foreach($deserialize_values as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValues'] = $deserialize_values;\n }\n }\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getLocalExecutionVariableBinaryRequest($id, $var_name)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling getLocalExecutionVariableBinary'\n );\n }\n // verify the required parameter 'var_name' is set\n if ($var_name === null || (is_array($var_name) && count($var_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $var_name when calling getLocalExecutionVariableBinary'\n );\n }\n\n $resourcePath = '/execution/{id}/localVariables/{varName}/data';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($var_name !== null) {\n $resourcePath = str_replace(\n '{' . 'varName' . '}',\n ObjectSerializer::toPathValue($var_name),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/octet-stream', 'text/plain', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/octet-stream', 'text/plain', 'application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function updateExecutionVariableRequest($execution_id, $variable_name)\n {\n // verify the required parameter 'execution_id' is set\n if ($execution_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $execution_id when calling updateExecutionVariable'\n );\n }\n // verify the required parameter 'variable_name' is set\n if ($variable_name === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $variable_name when calling updateExecutionVariable'\n );\n }\n\n $resourcePath = '/runtime/executions/{executionId}/variables/{variableName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($execution_id !== null) {\n $resourcePath = str_replace(\n '{' . 'executionId' . '}',\n ObjectSerializer::toPathValue($execution_id),\n $resourcePath\n );\n }\n // path params\n if ($variable_name !== null) {\n $resourcePath = str_replace(\n '{' . 'variableName' . '}',\n ObjectSerializer::toPathValue($variable_name),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function variableRequest($user_data, $key)\n {\n // verify the required parameter 'key' is set\n if ($key === null || (is_array($key) && count($key) === 0)) {\n throw new InvalidArgumentException(\n 'Missing the required parameter $key when calling variable'\n );\n }\n // verify the required parameter 'user_data' is set\n if ($user_data === null || (is_array($user_data) && count($user_data) === 0)) {\n throw new InvalidArgumentException(\n 'Missing the required parameter $user_data when calling variable'\n );\n }\n\n $resourcePath = '/v1/variables/{key}';\n $formParams = [];\n $queryParams = [];\n if ($this->dvcOptions->getEnableEdgeDB()) {\n $queryParams = ['enableEdgeDB' => 'true'];\n }\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($key !== null) {\n $resourcePath = str_replace(\n '{' . 'key' . '}',\n ObjectSerializer::toPathValue($key),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($user_data)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($user_data));\n } else {\n $httpBody = $user_data;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function postVariablesRequest($variable, $zap_trace_span = null)\n {\n // verify the required parameter 'variable' is set\n if ($variable === null || (is_array($variable) && count($variable) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $variable when calling postVariables'\n );\n }\n\n $resourcePath = '/api/v2/variables';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // header params\n if ($zap_trace_span !== null) {\n $headerParams['Zap-Trace-Span'] = ObjectSerializer::toHeaderValue($zap_trace_span);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($variable)) {\n $_tempBody = $variable;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function putTaskLocalVariableRequest($id, $var_name, $variable_value_dto = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling putTaskLocalVariable'\n );\n }\n // verify the required parameter 'var_name' is set\n if ($var_name === null || (is_array($var_name) && count($var_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $var_name when calling putTaskLocalVariable'\n );\n }\n\n $resourcePath = '/task/{id}/localVariables/{varName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($var_name !== null) {\n $resourcePath = str_replace(\n '{' . 'varName' . '}',\n ObjectSerializer::toPathValue($var_name),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($variable_value_dto)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($variable_value_dto));\n } else {\n $httpBody = $variable_value_dto;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function getTaskLocalVariableRequest($id, $var_name, $deserialize_value = true)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling getTaskLocalVariable'\n );\n }\n // verify the required parameter 'var_name' is set\n if ($var_name === null || (is_array($var_name) && count($var_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $var_name when calling getTaskLocalVariable'\n );\n }\n\n $resourcePath = '/task/{id}/localVariables/{varName}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($deserialize_value !== null) {\n if('form' === 'form' && is_array($deserialize_value)) {\n foreach($deserialize_value as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['deserializeValue'] = $deserialize_value;\n }\n }\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($var_name !== null) {\n $resourcePath = str_replace(\n '{' . 'varName' . '}',\n ObjectSerializer::toPathValue($var_name),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"protected function createProcessInstanceRequest($body = null)\n {\n\n $resourcePath = '/runtime/process-instances';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the basic type name of a given type string. eg: getBasicType("array") returns "array" getBasicType("bool") returns "bool" | private static function getBasicType($type) {
if (!self::isValidName($type)) return false;
return (self::isArray($type)) ? 'array' : $type;
} | [
"private function getType(): string\n {\n $type = '';\n \n switch ($this->stSpecType) {\n case self::ST_INT:\n $type = 'int';\n break;\n case self::ST_FLOAT:\n $type = 'float';\n break;\n case self::ST_BOOL:\n $type = 'bool';\n break;\n case self::ST_CHAR:\n $type = 'char';\n break;\n case self::ST_WCHART:\n $type = 'wchar_t';\n break;\n case self::ST_SHORT:\n $type = 'short';\n break;\n case self::ST_LONG:\n $type = 'long';\n break;\n case self::ST_SIGNED:\n $type = 'signed';\n break;\n case self::ST_UNSIGNED:\n $type = 'unsigned';\n break;\n case self::ST_DOUBLE:\n $type = 'double';\n break;\n case self::ST_ID:\n $type = 'identifier';\n break;\n case self::ST_QUALIFIED_ID:\n return 'Simple type specifier qualified identifier';\n }\n \n return \\sprintf('Simple type specifier \"%s\"', $type);\n }",
"abstract function typeAsString();",
"public function get_type_name() {\n\n $type = new type($this->db, $this->type);\n return $type->get_name();\n }",
"function typeToString ($type) {\r\n\t\tif ($type == TYPE_STRING) {\r\n\t\t\treturn 'string';\r\n\t\t} elseif ($type == TYPE_BOOL) {\r\n\t\t\treturn 'bool';\r\n\t\t} elseif ($type == TYPE_NUMERIC) {\r\n\t\t\treturn 'numeric';\r\n\t\t} else {\r\n\t\t\treturn 'flexible';\r\n\t\t}\r\n\t}",
"static public function str2typ($type=null);",
"private function getDataType($type) {\n $btype = 'string';\n if (preg_match('/int/', $type)) $btype = 'integer';\n else if (preg_match('/float/', $type)) $btype = 'float';\n else if (preg_match('/time/', $type)) $btype = 'timestamp';\n else if (preg_match('/text/', $type)) $btype = 'string';\n return $btype;\n }",
"function getTypeName() {\n\t\t$arr = $this->getAvailableTypes();\n\t\treturn $arr[$this->data_array['field_type']];\n\t}",
"function get_xmlrpc_string_type( $string )\n\t{\n\t\t$type = gettype( $string );\n\t\t\n\t\tswitch( $type )\n\t\t{\n\t\t\tdefault:\n\t\t\tcase 'string':\n\t\t\t\t$type = 'string';\n\t\t\t\tbreak;\n\t\t\tcase 'integer':\n\t\t\t\t$type = 'int';\n\t\t\t\tbreak;\n\t\t\tcase 'double':\n\t\t\t\t$type = 'double';\n\t\t\t\tbreak;\n\t\t\tcase 'null':\n\t\t\tcase 'boolean':\n\t\t\t\t$type = 'boolean';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $type;\n\t}",
"public function getTypeName(Type $type);",
"public function getTypeAsString()\n {\n $types = SystemAccount::getTypeChoices();\n $type = $this->getType();\n\n return $types[$type];\n }",
"public static function getTypeFieldName(): string;",
"public function getType($name);",
"function get_symbol_type_name(int $type): string\n{\n switch ($type) {\n case Loader::TYPE_CONSTANTS:\n return 'Constants';\n case Loader::TYPE_FUNCTION:\n return 'Functions';\n case Loader::TYPE_INTERFACE:\n return 'Interfaces';\n case Loader::TYPE_CLASS:\n return 'Classes';\n case Loader::TYPE_TRAIT:\n return 'Traits';\n case Loader::TYPE_ENUM:\n return 'Enums';\n }\n}",
"private function parseTypeName() {\n $name_parts = array();\n $t = $this->current();\n if ($t->isSpace()) {\n $t = $this->nextNS();\n }\n while ($t->kind == T_STRING || $t->kind == T_NS_SEPARATOR || $t->kind == T_ARRAY) {\n $name_parts[] = $t->text;\n $t = $this->next(); // not nextNS()!\n }\n if ($t->isSpace()) {\n $t = $this->nextNS();\n }\n return implode('', $name_parts);\n }",
"public function getTypeString() {\n $string = '';\n\n if ($this->isFinal()) {\n $string .= 'final ';\n }\n\n if ($this->isInterface()) {\n $string .= 'interface';\n } else {\n if ($this->isAbstract()) {\n $string .= 'abstract ';\n }\n $string .= 'class';\n }\n\n return $string;\n }",
"public static function getTypeByString($string) {\n\t\t$type = 0;\n\n\t\tswitch($string) {\n\t\t\tcase 'VEVENT':\n\t\t\t\t$type = self::EVENT;\n\t\t\t\tbreak;\n\n\t\t\tcase 'VJOURNAL':\n\t\t\t\t$type = self::JOURNAL;\n\t\t\t\tbreak;\n\n\t\t\tcase 'VTODO':\n\t\t\t\t$type = self::TODO;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $type;\n\t}",
"protected function get_type_from_string ($string)\n {\n switch (strtolower ($string)) {\n case 'png':\n return self::TYPE_PNG;\n\n case 'gif':\n return self::TYPE_GIF;\n\n case 'jpg':\n case 'jpeg':\n return self::TYPE_JPEG;\n }\n\n return null;\n }",
"public function getTypeName()\n {\n return $this->xdata->getString('@type');\n }",
"function get_field_type($name)\n {\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
int ncurses_mvgetch (int $y , int $x) Move position and get character at new position | public function mvgetch($y, $x) {
return ncurses_mvgetch($y, $x);
} | [
"function ncurses_mvaddch($y, $x, $c){}",
"function ncurses_mvaddch($y, $x, $c) {}",
"function ncurses_wmove($window, $y, $x) {}",
"function ncurses_addch($ch) {}",
"function ncurses_mvvline($y, $x, $attrchar, $n){}",
"function ncurses_echochar($character){}",
"function ncurses_waddch($window, $ch){}",
"function ncurses_mvaddstr($y, $x, $s) {}",
"function ncurses_mvwaddstr($window, $y, $x, $text) {}",
"function ming_keypress ($char) {}",
"function ncurses_erasechar() {}",
"public function getInput() {\n\t\t\t$this->redrawInput();\n\t\t\treturn ncurses_getch();\n\t\t}",
"function ncurses_wmove($window, $y, $x) {\n\t\t\tif ($window == STDSCR) { throw new NonCursesException(\"wmove called on main screen.\"); }\n\n\t\t\t$window->setCursorY($y);\n\t\t\t$window->setCursorX($x);\n\t\t}",
"function ming_keypress($char)\n{\n}",
"public function mvinch($y, $x) {\n return ncurses_mvinch($y, $x);\n }",
"function movePenTo($x, $y){}",
"function ncurses_move_panel($panel, $startx, $starty) {}",
"function moveChar() {\n\t\tif($this->atEOF(++$this->pointer)) return self::EOF;\n\t\tif($this->data[$this->pointer] == PHP_EOL) {\n\t\t\t$this->line++;\n\t\t\t$this->pos = 0;\n\t\t} else {\n\t\t\t$this->pos++;\n\t\t} \n\t\treturn $this->data[$this->pointer];\n\t}",
"private function moveCursor($x = null, $y = null)\n {\n $y = ($y ?? $this->y) + $this->yLimit;\n $x = ($x ?? $this->x) + $this->xLimit;\n $this->control(\"{$y};{$x}H\");\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List avaliable params for receiveMessages() | public function getAvailableReceiveParams(); | [
"public function getMessageParams(): array;",
"public function getMessageArgs();",
"public function getFlashMessageParameters();",
"public function getMessageParameters()\n {\n return $this->message_values;\n }",
"protected function processReceiveMessageParams(&$params) {\n\n\t\t}",
"public static function get_conversation_messages_parameters() {\n return new external_function_parameters(\n array(\n 'currentuserid' => new external_value(PARAM_INT, 'The current user\\'s id'),\n 'convid' => new external_value(PARAM_INT, 'The conversation id'),\n 'limitfrom' => new external_value(PARAM_INT, 'Limit from', VALUE_DEFAULT, 0),\n 'limitnum' => new external_value(PARAM_INT, 'Limit number', VALUE_DEFAULT, 0),\n 'newest' => new external_value(PARAM_BOOL, 'Newest first?', VALUE_DEFAULT, false),\n 'timefrom' => new external_value(PARAM_INT,\n 'The timestamp from which the messages were created', VALUE_DEFAULT, 0),\n )\n );\n }",
"public function getMessageArgs()\n\t{\n\t\treturn $this->messageArgs ;\n\t}",
"static function getMessages(){\n if(key_exists(MESSAGES, $_REQUEST)){\n return $_REQUEST[MESSAGES];\n }else{\n return array();\n }\n }",
"public static function data_for_messagearea_messages_parameters() {\n return new external_function_parameters(\n array(\n 'currentuserid' => new external_value(PARAM_INT, 'The current user\\'s id'),\n 'otheruserid' => new external_value(PARAM_INT, 'The other user\\'s id'),\n 'limitfrom' => new external_value(PARAM_INT, 'Limit from', VALUE_DEFAULT, 0),\n 'limitnum' => new external_value(PARAM_INT, 'Limit number', VALUE_DEFAULT, 0),\n 'newest' => new external_value(PARAM_BOOL, 'Newest first?', VALUE_DEFAULT, false),\n 'timefrom' => new external_value(PARAM_INT,\n 'The timestamp from which the messages were created', VALUE_DEFAULT, 0),\n )\n );\n }",
"public static function data_for_messagearea_messages_parameters()\n {\n return new external_function_parameters(\n array(\n 'currentuserid' => new external_value(PARAM_INT, 'The current user\\'s id'),\n 'otheruserid' => new external_value(PARAM_INT, 'The other user\\'s id'),\n 'limitfrom' => new external_value(PARAM_INT, 'Limit from', VALUE_DEFAULT, 0),\n 'limitnum' => new external_value(PARAM_INT, 'Limit number', VALUE_DEFAULT, 0),\n 'newest' => new external_value(PARAM_BOOL, 'Newest first?', VALUE_DEFAULT, false),\n 'timefrom' => new external_value(\n PARAM_INT,\n 'The timestamp from which the messages were created',\n VALUE_DEFAULT,\n 0\n ),\n )\n );\n }",
"public function listParams()\n {\n return [$this->prefetchSize, $this->prefetchCount, $this->global];\n }",
"public function &getCallbackParameters();",
"public static function data_for_messagearea_search_messages_parameters() {\n return new external_function_parameters(\n array(\n 'userid' => new external_value(PARAM_INT, 'The id of the user who is performing the search'),\n 'search' => new external_value(PARAM_RAW, 'The string being searched'),\n 'limitfrom' => new external_value(PARAM_INT, 'Limit from', VALUE_DEFAULT, 0),\n 'limitnum' => new external_value(PARAM_INT, 'Limit number', VALUE_DEFAULT, 0)\n )\n );\n }",
"public function getParams()\n {\n return $this->invokeParams;\n }",
"private function _convertReceiveMessage($request) {\n \n $parameters = array();\n $parameters['Action'] = 'ReceiveMessage';\n if ($request->isSetQueueName()) {\n $parameters['QueueName'] = $request->getQueueName();\n }\n if ($request->isSetMaxNumberOfMessages()) {\n $parameters['MaxNumberOfMessages'] = $request->getMaxNumberOfMessages();\n }\n if ($request->isSetVisibilityTimeout()) {\n $parameters['VisibilityTimeout'] = $request->getVisibilityTimeout();\n }\n\n return $parameters;\n }",
"public function getMessages();",
"function message_list()\r\n\t{\r\n\t\treturn $this->message_list;\r\n\t}",
"function getDefaultSendParams()\n {\n $params = array();\n $params['from'] = array(\n 'label' => _L(\"Source address\"),\n 'type' => 'text');\n\n $params['deliv_time'] = array(\n 'label' => _L(\"Delivery time\"),\n 'type' => 'enum',\n 'params' => array(array('now' => _L(\"immediate\"), 'user' => _L(\"user select\"))));\n\n $types = array('SMS_TEXT' => _L(\"Standard\"), 'SMS_FLASH' => _L(\"Flash\"));\n $params['msg_type'] = array(\n 'label' => _L(\"Message type\"),\n 'type' => 'keyval_multienum',\n 'params' => array($types));\n\n return $params;\n }",
"public static function mark_all_conversation_messages_as_read_parameters() {\n return new external_function_parameters(\n array(\n 'userid' => new external_value(PARAM_INT, 'The user id who who we are marking the messages as read for'),\n 'conversationid' =>\n new external_value(PARAM_INT, 'The conversation id who who we are marking the messages as read for')\n )\n );\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the shipper dropdown menu string. For the admin zone (order edit page), you MUST specify $onchange, so that both the onchange call and the tag are added. ? For use in the user zone (shop, frontend), you MUST NOT specify the ? $onchange call to update the ? The entry with ID $selectedId will have the selected attribute added, if found. If the $onchange string is specified and nonnull, it will be inserted into the string as the onchange attribute value. | static function getShipperMenu($countryId=0, $selectedId=0, $onchange="")
{
global $_ARRAYLANG;
if (empty(self::$arrShippers)) self::init();
$arrId = self::getCountriesRelatedShippingIdArray($countryId);
if (empty($arrId))
return $_ARRAYLANG['TXT_SHOP_SHIPMENT_NONE_FOR_COUNTRY'];
/*
// If no shipment has been chosen yet, select the first.
if (empty($selectedId)) {
$selectedId = current($arrId);
}
*/
foreach ($arrId as $key => $shipper_id) {
// Only show suitable shipments in the menu if the user is on the payment page,
// check the availability of the shipment in her country,
// and verify that the shipper will be able to handle the freight.
if (empty($_REQUEST['cmd']) || $_REQUEST['cmd'] != 'payment') {
continue;
}
if (self::calculateShipmentPrice(
$shipper_id,
$_SESSION['shop']['cart']['total_price'],
$_SESSION['shop']['cart']['total_weight']) < 0) {
unset($arrId[$key]);
}
}
if (empty($arrId)) {
return $_ARRAYLANG['TXT_SHOP_SHIPMENT_TOO_HEAVY'];
}
if (count($arrId) == 1) {
return
htmlentities(
self::$arrShippers[$shipper_id]['name'],
ENT_QUOTES, CONTREXX_CHARSET).
'<input type="hidden" name="shipperId"'.
' value="'.current($arrId).'" />'."\n";
}
$menu =
// TODO: Because the value posted from the form is not currently verified,
// but simply replaced by the default (first available) shipper ID if empty
// anyway, there is no use in showing this dummy option.
// (empty($selectedId)
// ? '<option value="0" selected="selected">'.
// $_ARRAYLANG['TXT_SHOP_SHIPMENT_PLEASE_SELECT'].
// "</option>\n"
// :
''
// )
;
foreach ($arrId as $shipper_id) {
$menu .=
'<option value="'.$shipper_id.'"'.
($shipper_id==intval($selectedId) ? ' selected="selected"' : '').
'>'.self::$arrShippers[$shipper_id]['name']."</option>\n";
}
if ($onchange) {
$menu =
'<select name="shipperId" id="shipperId"
onchange="'.$onchange.'">'.
$menu.
'</select>';
}
return $menu;
} | [
"static function getMenu(\n $menuName='countryId', $selected='', $active=true, $onchange=''\n ) {\n if (is_null(self::$arrCountries)) self::init();\n if (empty(self::$arrCountries)) return '';\n//DBG::log(\"Country::getMenu(): \".count(self::$arrCountries).\" countries\");\n if (count(self::$arrCountries) == 1) {\n $arrCountry = current(self::$arrCountries);\n return\n \\Html::getHidden($menuName, $arrCountry['id']).\n $arrCountry['name'];\n }\n return \\Html::getSelectCustom(\n $menuName, self::getMenuoptions($selected, $active),\n false, $onchange);\n }",
"function returnClientMenu() {\n\t\t//$select = \"<strong>test</strong>\";\n\t\t$select = \"\";\n\t\t//get the clients out to populate the drop down.\n\t\tlist($clients) = Client::getClients();\n\t\t$select .= '<select name=\"client_id\" id=\"project-client-select\" size=\"1\">';\n\t\t\n\t\tforeach ($clients as $client) {\n\t\t\t$select .= '<option value=\"' . $client->getValue(\"client_id\") . '\">' . $client->getValue(\"client_name\") .'</option>';\n\t\t}\n\t\t$select .= '</select>';\n\t\t\n\t\treturn $select;\n\t}",
"static function getDistributionMenu(\n $selected='', $menuName='distribution',\n $onChange='', $selectAttributes='')\n {\n $menu =\n \"<select name='$menuName' id='$menuName'\".\n ($selectAttributes ? ' '.$selectAttributes : '').\n ($onChange ? ' onchange=\"'.$onChange.'\"' : '').\">\".\n self::getDistributionMenuoptions($selected).\n \"</select>\\n\";\n return $menu;\n }",
"function genVolunteerDropDown($NAME,$IBIAS=null,$ONCHANGE=null){\n\tglobal $vc;\n\tif(!$vc)\n\t\treturn false;\n\t$qc=mysqli_query($vc,\"SELECT CONCAT(FirstName,\\\" \\\",LastName)as \\\"Name\\\",VolunteerID FROM volunteer ORDER BY Name ASC;\");\n\tif($qc){\n\t$rval=\"<select id=\\\"$NAME\\\" name=\\\"$NAME\\\"\";\n\t\tif(!empty($ONCHANGE))\n\t\t\t$rval.=\" onchange=\\\"$ONCHANGE\\\"\";\n\t$rval.=\">\\n\";\n\t$rval.=getOptionLine(-1000,\"NO VOLUNTEER SELECTED\",(!empty($IBIAS)&&is_numeric($IBIAS)&&$IBIAS<0));\n\t\twhile($qa=mysqli_fetch_row($qc)){\n\t\t\t$rval.=getOptionLine($qa[1],$qa[0],($qa[1]==$IBIAS));\n\t\t}\n\t$rval.=\"</select>\\n\";\n\treturn $rval;\n\t}\n}",
"function generateDropdown() {\n $options = \"\";\n $stocks = $this->StockHistory->getStocks();\n foreach ($stocks as $row) {\n $options .= \"<option value=\" . $row['code'] . \">\" . $row['name'] .\n \"</option>\";\n }\n return $options;\n }",
"public function generateStateDropdown() {\n\t\trequire_once( dirname( __FILE__ ) . '/../includes/stateAbbreviations.inc' );\n\n\t\t$states = statesMenuXML();\n\n\t\t$state_opts = '';\n\n\t\t// generate dropdown of state opts\n\t\tforeach ( $states as $value => $state_name ) {\n\t\t\t$selected = ( $this->form_data[ 'state' ] == $value ) ? true : false;\n\t\t\t$state_opts .= Xml::option( wfMsg( 'payflowpro_gateway-state-dropdown-' . $value ), $value, $selected );\n\t\t}\n\n\t\t$state_menu = Xml::openElement(\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => 'state',\n\t\t\t\t'id' => 'state'\n\t\t\t) );\n\t\t$state_menu .= $state_opts;\n\t\t$state_menu .= Xml::closeElement( 'select' );\n\n\t\treturn $state_menu;\n\t}",
"function getOrganizerDropdown($dbconn, $oid = NULL)\n\t{\n\t\t$query = \"SELECT * from location WHERE organizer = 1 ORDER BY sorting;\";\n\t\t$dbconn->dbconnect();\n\t\t$result = $dbconn->qry($query);\n\t\t$rownum = mysql_num_rows($result);\n\t\t$isFirst = true;\n\t\tif($rownum >= 1){\t/* seminar type */\n\t $data = \"<select class='seminardd' name='organizerid' onchange='updateOrganizer()'>\";\n\t while($row = mysql_fetch_assoc($result)){\n\t\t\t\t$data = $data . \"<option \";\n\t\t\t\tif($oid != NULL){\n\t\t\t\t\tif($oid == $row['id'])\n\t\t\t\t\t\t$data = $data . \" selected \";\n\t\t\t\t} else {\n\t\t\t\t\tif($isFirst){\n\t\t\t\t\t\t$data = $data . \" selected \";\n\t\t\t\t\t\t$isFirst = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$data = $data . \"optphone='\" . $row['phone'] .\"' optemail='\" . $row['email'] .\"' opturl='\" . $row['website'] .\"' value='\" . $row['id'] . \"'>\" . $row['name'] . \"</option>\";\n\t }\n\t $data = $data . \"<option value='NULL'>_inserisci_a_mano_</option>\";\n \t $data = $data . \"</select>\";\n }\n\n\t\treturn $data;\n\t}",
"function projectDropDownJS()\n{\n\techo '<select id=\"projectDropdown\" onchange=\"getTaskDropdown()\" name=\"Project_Selected\" class=\"form-control select select-primary\" data-toggle=\"select\" disabled>';\n\techo '<option selected=\"selected\" value=\"\">Select a Project</option>';\n\techo '</select>';\n}",
"function wh_draw_pull_down_menu_custom($name, $values, $id = '', $default = '', $parameters = '', $required = false, $reinsert_value = true, $indent = 0, $newline = false)\n {\n global $_GET, $_POST;\n\n\t\t$field = str_repeat (\"\\t\", $indent);\n $field .= '<select name=\"' . wh_output_string($name) . '\"';\n\n if ( wh_not_null ( $id ) ) {\n\t\t\t$field .= ' id=\"' . wh_output_string($id) . '\"';\n\t\t}\n\n if (wh_not_null($parameters)) {\n\t\t\t$field .= ' ' . $parameters;\n\t\t}\n\n if (empty($default) && ( (isset($_GET[$name]) && is_string($_GET[$name])) || (isset($_POST[$name]) && is_string($_POST[$name])) ) ) {\n if (isset($_GET[$name]) && is_string($_GET[$name])) {\n $default = stripslashes($_GET[$name]);\n $field .= ' selectedIndex=\"' . $default . '\"';\n } elseif (isset($_POST[$name]) && is_string($_POST[$name])) {\n $default = stripslashes($_POST[$name]);\n $field .= ' selectedIndex=\"' . $default . '\"';\n }\n }\n\n $field .= '>';\n $field .= PHP_EOL;\n\n foreach ($values as $key => $value)\n {\n $field .= str_repeat (\"\\t\", $indent+1);\n $field .= '<option value=\"' . wh_output_string($key) . '\"';\n if ($default == $key) {\n $field .= ' selected=\"selected\"';\n }\n\n $field .= '>' . wh_output_string($value, array('\"' => '"', '\\'' => ''', '<' => '<', '>' => '>')) . '</option>';\n $field .= PHP_EOL;\n }\n $field .= str_repeat (\"\\t\", $indent);\n $field .= '</select>';\n\n if ($required == true) {\n\t\t\t$field .= TEXT_FIELD_REQUIRED;\n\t\t}\n\n\t\tif ( $newline ) {\n\t\t\t$field .= ' <br />';\n\t\t}\n\t\t$field .= PHP_EOL;\n\n return $field;\n }",
"function print_js_cities_pulldown($fieldname = '', $dojs = false, $jscountryname = '', $jsstatename = '', $jscityname = '', $formid = '')\n{\n global $ilance, $phrase;\n \n $javascript = '';\n if ($dojs)\n {\n $javascript = 'onchange=\"javascript: document.' . $formid . '.' . $jsstatename . '.checked=true; document.' . $formid . '.' . $jscountryname . '.checked=true; document.' . $formid . '.' . $jscityname . '.checked=true;\"';\n }\n \n $html = '<select name=\"' . $fieldname . '\" id=\"' . $fieldname . '\" ' . $javascript . ' style=\"font-family: verdana; width:185px\"><option></option></select>';\n \n return $html;\n}",
"function customer_level_drop_down($selected_id = '') {\n\t\t\tglobal $dbh;\n\t\t\n\t\t$parent_drop_down = '<select name=\"customer_level\" id=\"parent_cat_dd\">'.LB;\n\t\t\n\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tlevel_name\n\t\t\t\t\t FROM\n\t\t\t\t\t\tadvertiser_levels\n\t\t\t\t\t ORDER BY level_weight ASC\n\t\t\t\t\t ;\";\n\t\t$rows = $dbh->queryAll($sql_query);\n\t\t\n\t\tforeach ($rows as $customer_level) {\n\t\t$ind = '--';\n\t\t\n\t\t$parent_drop_down .= '<option value=\"'.$customer_level['id'].'\" '.($selected_id == $customer_level['id'] ? 'selected=\"selected\" ' : '').'>'.$customer_level['level_name'].'</option>'.LB;\n\t\t\n\t\t}\n\t\t\n\t\t$parent_drop_down .= '</select>'.LB;\n\t\t\n\treturn $parent_drop_down;\n\t}",
"function dropdown($query=null,$id=null,$value=null,$onchange=null,$is_langfile=false){\n if($query==null && $id==null)\n {\n return null;\n }else\n {\n $ci = & get_instance();\n $ci->load->library('util');\n $temp = '<select name=\"'.$id.'\" id=\"'.$id.'\" '.$onchange.'>';\n $temp .='<option value=\"\">'.lang('all_'.$id).'</option>';\n if(!$is_langfile){\n \n $result = $ci->util->getRecordByQuery($query);\n if($result){\n foreach($result AS $r){\n if($value==$r->value){\n $temp .= '<option value=\"'.$r->value.'\" selected=\"selected\">'.$r->name.'</option>';\n }else{\n $temp .= '<option value=\"'.$r->value.'\">'.$r->name.'</option>';\n }\n }\n\n }\n }else{\n foreach($query AS $k=>$r){\n if($value==$k){\n $temp .= '<option value=\"'.$k.'\" selected=\"selected\">'.$r.'</option>';\n }else{\n $temp .= '<option value=\"'.$k.'\">'.$r.'</option>';\n }\n }\n }\n $temp .='</select>';\n return $temp;\n }\n }",
"protected function _getSingleSelect()\n {\n $currVal = htmlspecialchars($this->getValue());\n\n // Single HTML readonly\n if ($this->_isReadonly) {\n $translator = Formagic::getTranslator();\n $str = '<span id=\"' . $this->getAttribute('id') . '\">['\n . $translator->translate($this->_data[$currVal]) . ']<input '\n . 'type=\"hidden\" name=\"' . $this->getAttribute('name')\n . '\" value=\"' . $currVal . '\" /></span>';\n return $str;\n }\n\n // Single HTML default\n $str = '<select' . $this->getAttributeStr() .\">\\n\";\n $optionsArray = $this->getOptionInputs();\n $str .= $this->_buildOptions($optionsArray, $currVal);\n $str .= '</select>';\n return $str;\n }",
"function make_language_dropdown($selection) {\n\t\tglobal $menuvar, $LANGUAGES;\n\t\t\n\t\t$content = \"\\n\t\t\t\t\t\t<form name=\\\"languagechange\\\" method=\\\"get\\\" action=\\\"\" . $menuvar['SWITCHER'] . \"\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t<select name=\\\"languagechanger\\\" onChange=\\\"ajaxChangeLanguage('languageSpinner', 'ajax.php?action=updateitem&table=users&item=language&value=' + this.options[this.selectedIndex].value + '&id=\" . $_SESSION['userid']. \"', 'http://\" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\') . \"/\" . $menuvar['HOME'] . \"');\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option>--Select One</option>\";\n\t\t\n\t\tksort($LANGUAGES);\n\t\t\n\t\tforeach ($LANGUAGES as $abbrev => $long) {\n\t\t\t$content .= \"\\n\t\t\t\t\t\t\t\t<option value=\\\"\" . $abbrev . \"\\\"\" . testSelected($selection, $abbrev) . \">\" . $long . \"</option>\";\n\t\t}\n\t\t\n\t\t$content .= \"\\n\t\t\t\t\t\t\t</select><span id=\\\"languageSpinner\\\" style=\\\"display: none;\\\"><img src=\\\"themes/\" . $tts_config['ftstts_theme'] . \"/icons/indicator.gif\\\" alt=\\\"spinner\\\" /></span>\n\t\t\t\t\t\t\t\t\t\t</form>\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\treturn $content;\n\t}",
"function ec_print_menu_select( $id ){\n\techo \"<select class=\\\"ec_editor_select_box\\\" id=\\\"\" . $id . \"\\\" onchange=\\\"ec_editor_select_menu_change( );\\\">\";\n\t$db = new ec_db( );\n\t$menu_items = $db->get_menulevel1_items( );\n\tif( count( $menu_items ) > 0 ){\n\t\techo \"<option value=\\\"0\\\">Select a Menu Item</option>\";\n\t\tforeach( $menu_items as $menu ){\n\t\t\techo \"<option value=\\\"\" . $menu->menulevel1_id . \"\\\">\" . $menu->menu1_name . \"</option>\";\n\t\t}\n\t}else{\n\t\techo \"<option value=\\\"0\\\">No Menu Items Exist</option>\";\n\t}\n\techo \"</select>\";\n}",
"function getFundedLoanOptionsHtml($defautId='')\n {\n $optionHtml = '';\n \n if ($loans = getFundedLoans())\n {\n // build the option list\n foreach ($loans as $loan)\n {\n $sel = ($loan['id'] == $defautId ? 'selected' : '');\n $optionHtml .= \"<option value='{$loan['id']}' $sel>\" . htmlentities($loan['name']) . \"</option>\\n\";\n }\n }\n \n return $optionHtml;\n }",
"function erp_hr_get_departments_dropdown( $selected = '' ) {\n $departments = erp_hr_get_departments_dropdown_raw();\n $dropdown = '';\n if ( $departments ) {\n foreach ($departments as $key => $title) {\n $dropdown .= sprintf( \"<option value='%s'%s>%s</option>\\n\", $key, selected( $selected, $key, false ), $title );\n }\n }\n\n return $dropdown;\n}",
"function print_item_shipping_countries_pulldown($projectid = 0, $string = false, $onlyregions = false, $worldwide = false, $selectedcid = 0)\r\n{\r\n\tglobal $ilance, $phrase, $show;\r\n\t\r\n\t$html = '';\r\n\tif ($string == false)\r\n\t{\r\n\t\t//$html = '<select name=\"showshippingdestinations\" id=\"showshippingdestinations\" style=\"font-family: verdana\" onchange=\"show_listing_shipping_rows()\"><option value=\"\">-</option>';\r\n\t\t$html = '<select name=\"showshippingdestinations\" id=\"showshippingdestinations\" style=\"font-family: verdana\"><option value=\"\">-</option>';\r\n\t}\r\n\t\r\n\t$sql = $ilance->db->query(\"\r\n\t\tSELECT country, countryid, region\r\n\t\tFROM \" . DB_PREFIX . \"projects_shipping_regions\r\n\t\tWHERE project_id = '\" . intval($projectid) . \"'\r\n\t\t\" . ($onlyregions ? \"GROUP BY region\" : \"\") . \"\r\n\t\t\" . ($string == false ? \"GROUP BY country\" : \"\") . \"\r\n\t\tORDER BY country ASC\r\n\t\");\r\n\tif ($ilance->db->num_rows($sql) > 0)\r\n\t{\r\n\t\twhile ($res = $ilance->db->fetch_array($sql, DB_ASSOC))\r\n\t\t{\r\n\t\t\tif ($string == false)\r\n\t\t\t{\r\n\t\t\t\t$html .= (isset($selectedcid) AND $selectedcid > 0 AND $selectedcid == $res['countryid'])\r\n\t\t\t\t\t? '<option value=\"' . $res['countryid'] . '\" selected=\"selected\">' . handle_input_keywords($res['country']) . '</option>'\r\n\t\t\t\t\t: '<option value=\"' . $res['countryid'] . '\">' . handle_input_keywords($res['country']) . '</option>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$html .= ($onlyregions)\r\n\t\t\t\t\t? ucwords(str_replace('_', ' ', $res['region'])) . ', '\r\n\t\t\t\t\t: handle_input_keywords($res['country']) . ', ';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (!empty($html) AND $string)\r\n\t\t{\r\n\t\t\t$html = substr($html, 0, -2);\r\n\t\t}\r\n\t}\r\n\t\r\n\t$html .= ($string == false) ? '</select>' : '';\r\n\t\r\n\treturn $html;\r\n}",
"public function generateCurrencyDropdown() {\n\t\t$available_currencies = array(\n\t\t\t'USD' => 'USD: U.S. Dollar',\n\t\t\t'GBP' => 'GBP: British Pound',\n\t\t\t'EUR' => 'EUR: Euro',\n\t\t\t'AUD' => 'AUD: Australian Dollar',\n\t\t\t'CAD' => 'CAD: Canadian Dollar',\n\t\t\t'JPY' => 'JPY: Japanese Yen'\n\t\t);\n\n\t\t$currency_opts = '';\n\n\t\t// generate dropdown of currency opts\n\t\tforeach ( $available_currencies as $value => $currency_name ) {\n\t\t\t$selected = ( $this->form_data[ 'currency' ] == $value ) ? true : false;\n\t\t\t$currency_opts .= Xml::option( wfMsg( 'donate_interface-' . $value ), $value, $selected );\n\t\t}\n\n\t\t$currency_menu = Xml::openElement(\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => 'currency_code',\n\t\t\t\t'id' => 'input_currency_code',\n\t\t\t\t'onchange' => 'showCards()'\n\t\t\t) );\n\t\t$currency_menu .= $currency_opts;\n\t\t$currency_menu .= Xml::closeElement( 'select' );\n\n\t\treturn $currency_menu;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method set_system_state Sample of usage: $system_company>system_state = $object; | public function set_system_state(SystemState $object)
{
$this->system_state = $object;
$this->idsystem_state = $object->id;
} | [
"public function setCustomState($object)\n {\n $this->_customState = $object;\n }",
"public function set_system_user(SystemUser $object)\n {\n $this->system_user = $object;\n $this->system_user_id = $object->id;\n }",
"public function set_system_user(SystemUser $object)\n {\n $this->system_user = $object;\n $this->user_id = $object->id;\n }",
"public static function set($system){\n\t\tself::$sys = $system;\n\t}",
"function setSystemChoice() {\n\t\t$this->systemchoice = array ('modules' => 'modules', 'languages' => 'languages', 'home' => 'home', 'systemsetting' => 'systemsetting', 'generalsetting' => 'generalsetting', 'login' => 'login', 'logout' => 'logout' );\n\t}",
"public function set_system($value)\n {\n //Intentionally blank\n }",
"public function setSystem(System $system)\n {\n $this->system = $system;\n }",
"public function testSetState()\n\t{\n\t\t$state = $this->getMockForAbstractClass('PNEngineState', array($this->object));\n\n\t\t$this->object->setState($state);\n\n\t\t$this->assertEquals($state, TestReflection::getValue($this->object, 'state'));\n\t}",
"final public function set_state($state) { $this->state = $state; }",
"public function setSystem($isSystem)\r\n {\r\n $this->system = $isSystem;\r\n }",
"public static function __set_state(array $message) {}",
"public function set_system($value)\n {\n // Intentionally blanks\n }",
"public function set_state($state)\n\t{\n\t\t$this->state = $state;\n\t\t\n\t\tswitch($state)\n\t\t{\n\t\t\tcase \"initial\":\n\t\t\t\t// initial state: returns client_list\n\t\t\t\t$this->client_list = $this->get_clients();\n\t\t\t\tbreak;\n\t\t\tcase \"upload\":\n\t\t\t // upload state: returns client_list, module_list, shell_list\n\t\t\t\t$this->module_list = $this->get_templates(\"module\");\n\t\t\t\t$this->shell_list = $this->get_templates(\"shell\");\n\t\t\t\t$this->client_list = $this->get_clients();\n\t\t\t\tbreak;\n\t\t\tcase \"generate\":\n\t\t\t // generate state: returns module_list, shell_list, client_id\n\t\t\t\t$this->module_list = $this->get_templates(\"module\");\n\t\t\t\t$this->shell_list = $this->get_templates(\"shell\");\n\t\t\t\tbreak;\n\t\t}\n\n\t}",
"abstract protected function setMutatedState();",
"function set_content_object_states($object_ids, $state);",
"public function set_state($state) {\n\n // Very simple for now, maybe we'll do something more with this later\n $this->api_state = strtoupper($state);\n\n }",
"function set_state($cloudappliance_id, $state_str) {\n\t$cloudappliance_state = 0;\n\tswitch ($state_str) {\n\t\tcase \"paused\":\n\t\t\t$cloudappliance_state = 0;\n\t\t\tbreak;\n\t\tcase \"active\":\n\t\t\t$cloudappliance_state = 1;\n\t\t\tbreak;\n\t}\n\t$db=htvcenter_get_db_connection();\n\t$cloudappliance_set = $db->Execute(\"update \".$this->_db_table.\" set ca_state=$cloudappliance_state where ca_id=$cloudappliance_id\");\n\tif (!$cloudappliance_set) {\n\t\t$this->_event->log(\"set_state\", $_SERVER['REQUEST_TIME'], 2, \"cloudappliance.class.php\", $db->ErrorMsg(), \"\", \"\", 0, 0, 0);\n\t}\n}",
"public function setState($name,$value)\n {\n $this->_state[$name]=$value;\n }",
"protected function setStates()\n\t{\n\t\t$model = $this->getModel();\n\t\t$app = JFactory::getApplication();\n\t\t$input = $app->input;\n\t\t$model->setState('type', $input->get('type'));\n\t\t$model->setState('plugin', $input->get('plugin'));\n\t\t$model->setState('c', $input->getInt('c'));\n\t\t$model->setState('id', $input->getInt('id', 0));\n\t\t$model->setState('plugin_published', $input->get('plugin_published'));\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a locale from a country code that is provided. | function getLocale ($country_code='', $language_code='') {
// list-of-all-locales-and-their-short-codes
$locales = array(
'af_ZA',
'am_ET',
'ar_AE',
'ar_BH',
'ar_DZ',
'ar_EG',
'ar_IQ',
'ar_JO',
'ar_KW',
'ar_LB',
'ar_LY',
'ar_MA',
'arn-CL',
'ar_OM',
'ar_QA',
'ar_SA',
'ar_SY',
'ar_TN',
'ar_YE',
'as_IN',
'az-Cyrl-AZ',
'az-Latn-AZ',
'ba_RU',
'be_BY',
'bg_BG',
'bn_BD',
'bn_IN',
'bo_CN',
'br_FR',
'bs-Cyrl-BA',
'bs-Latn-BA',
'ca_ES',
'co_FR',
'cs_CZ',
'cy_GB',
'da_DK',
'de_AT',
'de_CH',
'de_DE',
'de_LI',
'de_LU',
'dsb-DE',
'dv_MV',
'el_GR',
'en_AU',
'en_BZ',
'en_CA',
'en_GB',
'en_IE',
'en_IN',
'en_JM',
'en_MY',
'en_NZ',
'en_PH',
'en_SG',
'en_TT',
'en_US',
'es_AR',
'es_BO',
'es_CL',
'es_CO',
'es_CR',
'es_DO',
'es_EC',
'es_ES',
'es_GT',
'es_HN',
'es_MX',
'es_NI',
'es_PA',
'es_PE',
'es_PR',
'es_PY',
'es_SV',
'es_US',
'es_UY',
'es_VE',
'et_EE',
'eu_ES',
'fa_IR',
'fi_FI',
'fil-PH',
'fo_FO',
'fr_BE',
'fr_CA',
'fr_CH',
'fr_FR',
'fr_LU',
'fr_MC',
'fy_NL',
'ga_IE',
'gd_GB',
'gl_ES',
'gsw-FR',
'gu_IN',
'ha-Latn-NG',
'he_IL',
'hi_IN',
'hr_BA',
'hr_HR',
'hsb-DE',
'hu_HU',
'hy_AM',
'id_ID',
'ig_NG',
'ii_CN',
'is_IS',
'it_CH',
'it_IT',
'iu-Cans-CA',
'iu-Latn-CA',
'ja_JP',
'ka_GE',
'kk_KZ',
'kl_GL',
'km_KH',
'kn_IN',
'kok-IN',
'ko_KR',
'ky_KG',
'lb_LU',
'lo_LA',
'lt_LT',
'lv_LV',
'mi_NZ',
'mk_MK',
'ml_IN',
'mn_MN',
'mn-Mong-CN',
'moh-CA',
'mr_IN',
'ms_BN',
'ms_MY',
'mt_MT',
'nb_NO',
'ne_NP',
'nl_BE',
'nl_NL',
'nn_NO',
'nso-ZA',
'oc_FR',
'or_IN',
'pa_IN',
'pl_PL',
'prs-AF',
'ps_AF',
'pt_BR',
'pt_PT',
'qut-GT',
'quz-BO',
'quz-EC',
'quz-PE',
'rm_CH',
'ro_RO',
'ru_RU',
'rw_RW',
'sah-RU',
'sa_IN',
'se_FI',
'se_NO',
'se_SE',
'si_LK',
'sk_SK',
'sl_SI',
'sma-NO',
'sma-SE',
'smj-NO',
'smj-SE',
'smn-FI',
'sms-FI',
'sq_AL',
'sr-Cyrl-BA',
'sr-Cyrl-CS',
'sr-Cyrl-ME',
'sr-Cyrl-RS',
'sr-Latn-BA',
'sr-Latn-CS',
'sr-Latn-ME',
'sr-Latn-RS',
'sv_FI',
'sv_SE',
'sw_KE',
'syr-SY',
'ta_IN',
'te_IN',
'tg-Cyrl-TJ',
'th_TH',
'tk_TM',
'tn_ZA',
'tr_TR',
'tt_RU',
'tzm-Latn-DZ',
'ug_CN',
'uk_UA',
'ur_PK',
'uz-Cyrl-UZ',
'uz-Latn-UZ',
'vi_VN',
'wo_SN',
'xh_ZA',
'yo_NG',
'zh_CN',
'zh_HK',
'zh_MO',
'zh_SG',
'zh_TW',
'zu-ZA'
);
/*
foreach ($locales as $locale)
{
$locale_region = locale_get_region($locale);
$locale_language = locale_get_primary_language($locale);
$locale_array = array('language' => $locale_language,
'region' => $locale_region);
if (strtoupper($country_code) == $locale_region &&
$language_code == '')
{
return locale_compose($locale_array);
}
elseif (strtoupper($country_code) == $locale_region &&
strtolower($language_code) == $locale_language)
{
return locale_compose($locale_array);
}
}
*/
/*
$locale = strtolower($language_code).'_'.strtoupper($country_code);
echo $locale;
if (in_array($locale, $locales))
return $locale;
else
return null;
*/
if (isset($language_code)) {
$ret = '';
foreach ($locales as $value) {
if (strtolower(substr($value,0,strlen($language_code))) == strtolower($language_code))
$ret = $value;
};
return $ret;
}
return false;
} | [
"public function getLocale($code);",
"public static function getCountryByCode($code) {\n\t\treturn new I18N_Country($code);\n\t}",
"public static function getCountryByCode($code);",
"abstract public function getLocaleCode();",
"private function _getLanguageISO($localeCode)\n {\n $parts = explode('_', $localeCode);\n return $parts[0];\n }",
"public function countryCodetoname($code = '')\n {\n $country_arr = $this->get_common_var('country');\n return isset($country_arr[$code]) ? $country_arr[$code] : $code;\n }",
"public static function getPrimaryLanguage($locale){}",
"public function getCountryName($countryCode, $locale = null);",
"public static function getCountryFromCode($code)\n\t{\n\t\tif (strlen($code) != 2) {\n\t\t\treturn $code;\n\t\t}\n\n\t\t$code = strtoupper($code);\n\n\t\tif (!isset(self::$code_to_name[$code])) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn self::$code_to_name[$code];\n\t}",
"public static function loadLocale($locale_code) {\n $all_locales = self::loadAllLocales();\n $locale = idx($all_locales, $locale_code);\n\n if (!$locale) {\n throw new Exception(\n pht(\n 'There is no locale with the locale code \"%s\".',\n $locale_code));\n }\n\n return $locale;\n }",
"public function getLocalePayPalPlus()\n {\n switch (\\Tools::strtolower($this->getCountryCode())) {\n case 'fr':\n return 'fr_FR';\n case 'hk':\n return 'zh_HK';\n case 'cn':\n return 'zh_CN';\n case 'tw':\n return 'zh_TW';\n case 'xc':\n return 'zh_XC';\n case 'dk':\n return 'da_DK';\n case 'nl':\n return 'nl_NL';\n case 'gb':\n return 'en_GB';\n case 'de':\n return 'de_DE';\n case 'il':\n return 'he_IL';\n case 'id':\n return 'id_ID';\n case 'it':\n return 'it_IT';\n case 'jp':\n return 'ja_JP';\n case 'no':\n return 'no_NO';\n case 'pt':\n return 'pt_PT';\n case 'pl':\n return 'pl_PL';\n case 'ru':\n return 'ru_RU';\n case 'es':\n return 'es_ES';\n case 'se':\n return 'sv_SE';\n case 'th':\n return 'th_TH';\n case 'tr':\n return 'tr_TR';\n default:\n return 'en_GB';\n }\n }",
"public static function get_country_name($code) {\n if(empty(self::$countries)) {\n self::load_countries();\n }\n\n return isset(self::$countries[$code]) ? self::$countries[$code] : $code;\n }",
"public function getLocale(): string\n {\n return $this->localeCode;\n }",
"function get_locale_full_code()\r\n {\r\n $locale = $this->locale_code;\r\n $variation = $this->country_variation();\r\n if ( $variation )\r\n \t$locale .= '@' . $variation;\r\n return $locale;\r\n }",
"function get_locale_name_from_code( $code, $name_type = 'native' ) {\n\t\t$function = __NAMESPACE__ . \"\\get_locales_with_{$name_type}_names\";\n\t\t$locales = $function();\n\n\t\treturn $locales[ $code ] ?? '';\n\t}",
"public static function getCountryByCode($countryCode)\r\n {\r\n $country = Country::findOne([\r\n 'code' => $countryCode,\r\n ]);\r\n\r\n return $country;\r\n }",
"public function getCountryCodeFromLocale(string $locale): ?string\n {\n $code = collect($this->config->get('countries'))\n ->search(function ($item) use ($locale) {\n return isset($item['locale']) && $item['locale'] === $locale;\n });\n\n return $code ? $code : null;\n }",
"public static function get_lang_local_name( $lang_code ) {\n \n $main_lang = strlen( $lang_code );\n \n\t\tswitch ( $main_lang ) :\n\t\t\tcase 'ar' :\n\t\t\t\t$lang = \"العربية\";\n\t\t\t\tbreak;\n\t\t\tcase 'de' :\n\t\t\t\t$lang = 'Deutsch';\n\t\t\tcase 'en' :\n\t\t\t\t$lang = 'English';\n\t\t\t\tbreak;\n\t\t\tcase 'es' :\n\t\t\t\t$lang = '';\n\t\t\t\tbreak;\n\t\t\tcase 'fr' :\n\t\t\t\t$lang = 'français';\n\t\t\t\tbreak;\n\t\t\tcase 'it' :\n\t\t\t\t$lang = 'Italiano';\n\t\t\t\tbreak;\n\t\t\tcase 'pt' :\n\t\t\t\t$lang = 'Português';\n\t\t\t\tbreak;\n\t\t\tcase 'ru' :\n\t\t\t\t$lang = 'Русский';\n\t\t\t\tbreak;\n\t\tendswitch;\n\t\t\n\t\treturn $lang;\n\t}",
"public function normalizeCountry() {\n\t\t// the country, and since PayPal expects the ISO 3166-1 alpha-2 identifier, we'll attempt to\n\t\t// translate from the various internal representations that might be used. Child classes can\n\t\t// override this method to provide language-specific or cart-specific translations. Many Bothans\n\t\t// died to bring us this information...\n\n\t\t// This list was taken from https://developer.paypal.com/docs/classic/api/country_codes/.\n\n\t\t$translation_table = array(\n\t\t\t'albania' => 'AL',\n\t\t\t'algeria' => 'DZ',\n\t\t\t'andorra' => 'AD',\n\t\t\t'angola' => 'AO',\n\t\t\t'anguilla' => 'AI',\n\t\t\t'antigua and barbuda' => 'AG',\n\t\t\t'argentina' => 'AR',\n\t\t\t'armenia' => 'AM',\n\t\t\t'aruba' => 'AW',\n\t\t\t'australia' => 'AU',\n\t\t\t'austria' => 'AT',\n\t\t\t'azerbaijan' => 'AZ',\n\t\t\t'bahamas' => 'BS',\n\t\t\t'bahrain' => 'BH',\n\t\t\t'barbados' => 'BB',\n\t\t\t'belgium' => 'BE',\n\t\t\t'belize' => 'BZ',\n\t\t\t'benin' => 'BJ',\n\t\t\t'bermuda' => 'BM',\n\t\t\t'bhutan' => 'BT',\n\t\t\t'bolivia' => 'BO',\n\t\t\t'bosnia-herzegovina' => 'BA',\n\t\t\t'botswana' => 'BW',\n\t\t\t'brazil' => 'BR',\n\t\t\t'brunei darussalam' => 'BN',\n\t\t\t'bulgaria' => 'BG',\n\t\t\t'burkina faso' => 'BF',\n\t\t\t'burundi' => 'BI',\n\t\t\t'cambodia' => 'KH',\n\t\t\t'canada' => 'CA',\n\t\t\t'cape verde' => 'CV',\n\t\t\t'cayman islands' => 'KY',\n\t\t\t'chad' => 'TD',\n\t\t\t'chile' => 'CL',\n\t\t\t'china' => 'CN',\n\t\t\t'colombia' => 'CO',\n\t\t\t'comoros' => 'KM',\n\t\t\t'democratic republic of congo' => 'CD',\n\t\t\t'congo' => 'CG',\n\t\t\t'cook islands' => 'CK',\n\t\t\t'costa rica' => 'CR',\n\t\t\t'croatia' => 'HR',\n\t\t\t'cyprus' => 'CY',\n\t\t\t'czech republic' => 'CZ',\n\t\t\t'denmark' => 'DK',\n\t\t\t'djibouti' => 'DJ',\n\t\t\t'dominica' => 'DM',\n\t\t\t'dominican republic' => 'DO',\n\t\t\t'ecuador' => 'EC',\n\t\t\t'egypt' => 'EG',\n\t\t\t'el salvador' => 'SV',\n\t\t\t'eriteria' => 'ER',\n\t\t\t'estonia' => 'EE',\n\t\t\t'ethiopia' => 'ET',\n\t\t\t'falkland islands (malvinas)' => 'FK',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'falkland islands' => 'FK',\n\t\t\t'fiji' => 'FJ',\n\t\t\t'finland' => 'FI',\n\t\t\t'france' => 'FR',\n\t\t\t'french guiana' => 'GF',\n\t\t\t'french polynesia' => 'PF',\n\t\t\t'gabon' => 'GA',\n\t\t\t'gambia' => 'GM',\n\t\t\t'georgia' => 'GE',\n\t\t\t'germany' => 'DE',\n\t\t\t'gibraltar' => 'GI',\n\t\t\t'greece' => 'GR',\n\t\t\t'greenland' => 'GL',\n\t\t\t'grenada' => 'GD',\n\t\t\t'guadeloupe' => 'GP',\n\t\t\t'guam' => 'GU',\n\t\t\t'guatemala' => 'GT',\n\t\t\t'guinea' => 'GN',\n\t\t\t'guinea bissau' => 'GW',\n\t\t\t'guyana' => 'GY',\n\t\t\t'holy see (vatican city state)' => 'VA',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'holy see' => 'VA',\n\t\t\t'honduras' => 'HN',\n\t\t\t'hong kong' => 'HK',\n\t\t\t'hungary' => 'HU',\n\t\t\t'iceland' => 'IS',\n\t\t\t'india' => 'IN',\n\t\t\t'indonesia' => 'ID',\n\t\t\t'ireland' => 'IE',\n\t\t\t'israel' => 'IL',\n\t\t\t'italy' => 'IT',\n\t\t\t'jamaica' => 'JM',\n\t\t\t'japan' => 'JP',\n\t\t\t'jordan' => 'JO',\n\t\t\t'kazakhstan' => 'KZ',\n\t\t\t'kenya' => 'KE',\n\t\t\t'kiribati' => 'KI',\n\t\t\t'korea, republic of' => 'KR',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'republic of korea' => 'KR',\n\t\t\t'kuwait' => 'KW',\n\t\t\t'kyrgyzstan' => 'KG',\n\t\t\t'laos' => 'LA',\n\t\t\t'latvia' => 'LV',\n\t\t\t'lesotho' => 'LS',\n\t\t\t'liechtenstein' => 'LI',\n\t\t\t'lithuania' => 'LT',\n\t\t\t'luxembourg' => 'LU',\n\t\t\t'madagascar' => 'MG',\n\t\t\t'malawi' => 'MW',\n\t\t\t'malaysia' => 'MY',\n\t\t\t'maldives' => 'MV',\n\t\t\t'mali' => 'ML',\n\t\t\t'malta' => 'MT',\n\t\t\t'marshall islands' => 'MH',\n\t\t\t'martinique' => 'MQ',\n\t\t\t'mauritania' => 'MR',\n\t\t\t'mauritius' => 'MU',\n\t\t\t'mayotte' => 'YT',\n\t\t\t'mexico' => 'MX',\n\t\t\t'micronesia, federated states of' => 'FM',\n\t\t\t// The next two derivations don't show up in the list, but seem obvious\n\t\t\t'federated states of micronesia' => 'FM',\n\t\t\t'micronesia' => 'FM',\n\t\t\t'mongolia' => 'MN',\n\t\t\t'montserrat' => 'MS',\n\t\t\t'morocco' => 'MA',\n\t\t\t'mozambique' => 'MZ',\n\t\t\t'namibia' => 'NA',\n\t\t\t'nauru' => 'NR',\n\t\t\t'nepal' => 'NP',\n\t\t\t'netherlands' => 'NL',\n\t\t\t'netherlands antilles' => 'AN',\n\t\t\t'new caledonia' => 'NC',\n\t\t\t'new zealand' => 'NZ',\n\t\t\t'nicaragua' => 'NI',\n\t\t\t'niger' => 'NE',\n\t\t\t'niue' => 'NU',\n\t\t\t'norfolk island' => 'NF',\n\t\t\t'norway' => 'NO',\n\t\t\t'oman' => 'OM',\n\t\t\t'palau' => 'PW',\n\t\t\t'panama' => 'PA',\n\t\t\t'papau new guinea' => 'PG',\n\t\t\t'peru' => 'PE',\n\t\t\t'philippines' => 'PH',\n\t\t\t'pitcairn' => 'PN',\n\t\t\t'poland' => 'PL',\n\t\t\t'portugal' => 'PT',\n\t\t\t'qatar' => 'QA',\n\t\t\t'reunion' => 'RE',\n\t\t\t'romania' => 'RO',\n\t\t\t'russian federation' => 'RU',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'russia' => 'RU',\n\t\t\t'rwanda' => 'RW',\n\t\t\t'saint helena' => 'SH',\n\t\t\t'saint kitts and nevis' => 'KN',\n\t\t\t'saint lucia' => 'LC',\n\t\t\t'saint pierre and miquelon' => 'PM',\n\t\t\t'saint vincent and the grenadines' => 'VC',\n\t\t\t'samoa' => 'WS',\n\t\t\t'san marino' => 'SM',\n\t\t\t'sao tome and principe' => 'ST',\n\t\t\t'saudi arabia' => 'SA',\n\t\t\t'senegal' => 'SN',\n\t\t\t'serbia' => 'RS',\n\t\t\t'seychelles' => 'SC',\n\t\t\t'sierra leone' => 'SL',\n\t\t\t'singapore' => 'SG',\n\t\t\t'slovakia' => 'SK',\n\t\t\t'slovenia' => 'SI',\n\t\t\t'solomon islands' => 'SB',\n\t\t\t'somalia' => 'SO',\n\t\t\t'south africa' => 'ZA',\n\t\t\t'south korea' => 'KR',\n\t\t\t'spain' => 'ES',\n\t\t\t'sri lanka' => 'LK',\n\t\t\t'suriname' => 'SR',\n\t\t\t'svalbard and jan mayen' => 'SJ',\n\t\t\t'swaziland' => 'SZ',\n\t\t\t'sweden' => 'SE',\n\t\t\t'switzerland' => 'CH',\n\t\t\t'taiwan, province of china' => 'TW',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'taiwan' => 'TW',\n\t\t\t'tajikistan' => 'TJ',\n\t\t\t'tanzania, united republic of' => 'TZ',\n\t\t\t// The next two derivations don't show up in the list, but seem obvious\n\t\t\t'united republic of tanzania' => 'TZ',\n\t\t\t'tanzania' => 'TZ',\n\t\t\t'thailand' => 'TH',\n\t\t\t'togo' => 'TG',\n\t\t\t'tonga' => 'TO',\n\t\t\t'trinidad and tobago' => 'TT',\n\t\t\t'tunisia' => 'TN',\n\t\t\t'turkey' => 'TR',\n\t\t\t'turkmenistan' => 'TM',\n\t\t\t'turks and caicos islands' => 'TC',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'turks and caicos' => 'TC',\n\t\t\t'tuvalu' => 'TV',\n\t\t\t'uganda' => 'UG',\n\t\t\t'ukraine' => 'UA',\n\t\t\t'united arab emirates' => 'AE',\n\t\t\t'united kingdom' => 'GB',\n\t\t\t'united states' => 'US',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'united states of america' => 'US',\n\t\t\t'uruguay' => 'UY',\n\t\t\t'vanuatu' => 'VU',\n\t\t\t'venezuela' => 'VE',\n\t\t\t'vietnam' => 'VN',\n\t\t\t'virgin islands, british' => 'VG',\n\t\t\t// This derivation doesn't show up in the list, but seems obvious\n\t\t\t'british virgin islands' => 'VG',\n\t\t\t'wallis and futana' => 'WF',\n\t\t\t'yemen' => 'YE',\n\t\t\t'zambia' => 'ZM',\n\t\t\t// This one is here because some carts will make the mistake of using 'uk' instead of 'gb'.\n\t\t\t'uk' => 'GB'\n\t\t);\n\n\t\t// And now, the actual translation is as simple as...\n\t\tif ( array_key_exists( strtolower( trim( $this->_country ) ), $translation_table ) ) {\n\t\t\t$this->_country = $translation_table[ strtolower( trim( $this->_country ) ) ];\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get local path of explorer js | static function getLocalExplorerJsPath()
{
return self::$js_expl_path;
} | [
"public function getOpenPath(): string;",
"public function getLocalPath() {\n }",
"public function getLocalPath(): string\n {\n return $this->localPath;\n }",
"public function getLocalPath()\n {\n return $this->_localPath;\n }",
"public function getLocalPath()\n {\n return $this->settings->getPathLocal();\n }",
"function getFullPath(){\nreturn getcwd();\n}",
"public function getLocalPath()\n {\n return $this->_localPath;\n }",
"public function getExternalPath(): string\n {\n return $this->_fs->toExternalPath($this->_path);\n }",
"function wb_sys_dlg_path($parent, $title = null, $path = null) {}",
"public function getCurrentFullPath() {}",
"public function get_local_path() {\n\t\tif ( !is_null( $this->_local_path ) )\n\t\t\treturn $this->_local_path;\n\n\t\treturn $this->get_tmp_dir( $this->get_current_path() );\n\t}",
"protected static function getPathThisScript() {}",
"public function getMooreLocalPath()\r\n {\r\n \treturn $this->_mooreLibraryPath;\r\n }",
"public function get_preview_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_preview_name();\n\t}",
"private function _getSourceFileSystemPath()\n\t{\n\t\treturn rtrim($this->getSettings()->path, '/').'/';\n\t}",
"public static function getLightKitEditorFrontRelativeRootPath(): string\n {\n return \"config/open/Ling.Light_Kit_Store/Ling.Light_Kit_Editor/front\";\n }",
"public function getExternalPath() {\n if (true === $this->_config->getConfigData('development_environment')) {\n $extPath = EXT_ROOT . $this->_config->getConfigData('base_path_dev');\n } else {\n $extPath = EXT_ROOT . $this->_config->getConfigData('base_path');\n }\n return $extPath;\n }",
"public function getCurrentRelativePath()\n {\n }",
"private function _ide_path(){\n if ( !self::$ide_path ){\n if ( $id = $this->options->from_code(self::IDE_PATH, self::BBN_APPUI) ){\n self::set_ide_path($id);\n }\n }\n return self::$ide_path;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Data provider for property fontWidth | public function fontWidthProvider()
{
return [
["ultra-condensed"],
["extra-condensed"],
["condensed"],
["semi-condensed"],
["normal"],
["semi-expanded"],
["expanded"],
["extra-expanded"],
["ultra-expanded"]
];
} | [
"function width()\n {\n $this->_font->width($this->_text);\n }",
"public function fontSizeProvider()\n {\n return [[1]];\n }",
"function getTextWidth($text){}",
"function getLocalizedWidth() {\n\t\treturn $this->getLocalizedData('width');\n\t}",
"public function widthProvider()\n {\n return [[1]];\n }",
"public function getFontSize() {}",
"function SetCustomPaintWidth($width){}",
"public function widthProvider()\n {\n return [[\"1vh\"], [1], [\"1vmin\"], [1]];\n }",
"private function getInternalFontWidth()\n {\n return $this->getInternalFont() + 4;\n }",
"public function testPropertyFontWidth($value)\n {\n $object = new ConditionalComponentTextStyle();\n $object->setFontWidth($value);\n\n $this->assertEquals($value, $object->getFontWidth());\n }",
"function getFontSize(){}",
"private function _getTextWidth($fontSize, array $lines) {}",
"public function getCharacterWidth() : int;",
"protected function width()\n {\n \treturn Arr::get($this->options, 'w');\n }",
"private function getWidth() {\n return $this->properties->getWidgetProperty(self::PROPERTY_WIDTH);\n }",
"public function setSourceWidth($data) { $this->sourceWidth = $data; }",
"public function getFontSize()\n {\n }",
"public function testPropertyFontWidth($value)\n {\n $object = new ConditionalTextStyle();\n $object->setFontWidth($value);\n\n $this->assertEquals($value, $object->getFontWidth());\n }",
"public function getDefaultWidthTxt(){\n\t\treturn ('width: ' . $this->getDefaultWidth() . 'px;');\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to get the price of bitcoin to sell | public function getBitcoinSellPrice()
{
if( Settings::getSetting('syscrack_bitcoin_live') == false )
{
return Settings::getSetting('syscrack_bitcoin_sellprice');
}
$result = json_decode( Request::post( Settings::getSetting('syscrack_bitcoin_url') )->body, true );
if( isset( $result[ strtoupper( Settings::getSetting('syscrack_bitcoin_country') ) ] ) == false )
{
throw new SyscrackException();
}
return $result[ strtoupper( Settings::getSetting('syscrack_bitcoin_country') ) ]['sell'];
} | [
"function fetch_btce_market_price() {\n $data = file_get_contents('https://btc-e.com/api/2/ppc_usd/ticker');\n $data = json_decode($data, true);\n $ppc_usd = $data['ticker']['last'];\n return round($ppc_usd, 2);\n}",
"function getBitcoinPrice()\n{\n\n $bitcoinData = getBitcoinData();\n\n $price = str_replace('#', ',', str_replace(',', '', $bitcoinData->bpi->EUR->rate));\n\n return number_format((float)$price, 2, '.', '');\n}",
"function coinbase_btc_price() {\n\tglobal $_CB_PRICE;\n\tif($_CB_PRICE == -1) {\n\t\t$ch = curl_init(); \n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://coinbase.com/api/v1/currencies/exchange_rates\"); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\t\t$r = curl_exec($ch); \n\t\tcurl_close($ch); \n\t\t$r = json_decode($r);\n\t\t$_CB_PRICE = floatval($r->btc_to_usd);\n\t\treturn $_CB_PRICE;\n\t} else {\n\t\treturn $_CB_PRICE;\n\t}\n\t\n}",
"function fetch_vircurex_market_price() {\n $btc_usd_json = file_get_contents('https://vircurex.com/api/get_highest_bid.json?base=BTC&alt=USD');\n $btc_usd = json_decode($btc_usd_json)->value;\n\n $ppc_btc_json = file_get_contents('https://vircurex.com/api/get_highest_bid.json?base=PPC&alt=BTC');\n $ppc_btc = json_decode($ppc_btc_json)->value;\n\n $ppc_usd = $btc_usd * $ppc_btc;\n return round($ppc_usd, 2);\n}",
"public function getBitcoinBuyPrice()\n {\n\n if( Settings::getSetting('syscrack_bitcoin_live') == false )\n {\n\n return Settings::getSetting('syscrack_bitcoin_buyprice');\n }\n\n $result = json_decode( Request::post( Settings::getSetting('syscrack_bitcoin_url') )->body, true );\n\n if( empty( $result ) )\n {\n\n return null;\n }\n\n return $result[ strtoupper( Settings::getSetting('syscrack_bitcoin_country') ) ]['buy'];\n }",
"function get_btc_price($exchange)\n{\n $btc_price = 0; // If the price shows up as 0, then we know there's a problem connecting to the API(s)\n $usd_cny = calculate_cny_exchange_rate();\n \n if($exchange == \"bitstamp\")\n {\n $url = fopen(\"http://www.bitstamp.net/api/ticker/\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = $json->{\"last\"};\n }/*\n // We are not using Cryptsy because of its low BTC/USD volume (<10,000 BTC)\n else if($exchange == \"cryptsy\")\n {\n // We're using the server pubapi2 because at the time of programming, pubapi1 seems to be down. When you remove the \"2\" from pubapi2, either server is randomly selected.\n $url = fopen(\"http://pubapi2.cryptsy.com/api.php?method=singlemarketdata&marketid=2\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = $json->{\"return\"}->{\"markets\"}->{\"BTC\"}->{\"lasttradeprice\"};\n }*/\n else if($exchange == \"cex.io\")\n {\n $url = fopen(\"https://cex.io/api/ticker/BTC/USD\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n var_dump($json);\n \n //$btc_price = $json->{\"return\"}->{\"markets\"}->{\"BTC\"}->{\"lasttradeprice\"};\n }\n else if($exchange == \"coinbase\")\n {\n $url = fopen(\"https://coinbase.com/api/v1/prices/spot_rate\", \"r\");\n \n $data = json_decode(stream_get_contents($url));\n \n $btc_price = $data->amount;\n }\n else if($exchange == \"btc-e\")\n {\n $url = fopen(\"https://btc-e.com/api/3/ticker/btc_usd\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = $json->{\"btc_usd\"}->{\"last\"};\n }\n else if($exchange == \"bitfinex\")\n {\n $url = fopen(\"https://api.bitfinex.com/v1/ticker/btcusd\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = $json->mid;\n }\n else if($exchange == \"kraken\")\n {\n $url = fopen(\"https://api.kraken.com/0/public/Ticker?pair=XXBTZUSD\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = $json->{\"result\"}->{\"XXBTZUSD\"}->{\"a\"}[0];\n }\n else if($exchange == \"btcchina\" && $usd_cny > 0)\n {\n $url = fopen(\"https://data.btcchina.com/data/ticker?market=btccny\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = ($json->{\"ticker\"}->{\"last\"} * $usd_cny);\n }\n else if($exchange == \"huobi\" && $usd_cny > 0)\n {\n $url = fopen(\"http://api.huobi.com/staticmarket/ticker_btc_json.js\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = ($json->{\"ticker\"}->{\"last\"} * $usd_cny);\n }\n else if($exchange == \"okcoin\") // OKCoin has a BTC/USD market\n {\n $url = fopen(\"https://www.okcoin.com/api/ticker.do?ok=1\", \"r\");\n \n $json = json_decode(stream_get_contents($url));\n \n $btc_price = ($json->{\"ticker\"}->{\"last\"});\n }\n else\n // This will be triggered if there is no method to connect to the given exchange's API\n // Remember to create a new table in the database for any new exchanges. Match the structure of the other exchanges by duplicating another exchange's table (including values).\n {\n $btc_price = -1;\n \n $log_message = \"WARNING: No method found to connect to exchange \\\"\" . $exchange . \"\\\"'s API. Please fix this.\";\n log_to_file($log_message);\n }\n \n return (float)number_format($btc_price, 2, \".\", \"\");\n \n}",
"function getPrice($currency) {\n $contents = json_decode(file_get_contents(\"https://api.coinbase.com/v2/prices/\" . strtoupper($currency) . \"-USD/spot\"), true);\n return floatval($contents['data']['amount']);\n }",
"function calculateBitcoinAmount()\n{\n if (isset($_GET['euro'])) {\n $euro = (int)$_GET['euro']; //Dit blokje code (if-statement) kun je laten staan.\n }\n\n\n //SCHRIJF HIER JE CODE.\n return $euro / getBitcoinPrice();\n}",
"public function getBuyboxPrice()\n {\n return $this->_fields['BuyboxPrice']['FieldValue'];\n }",
"public function getPrice() {\n $parameters = array();\n $product = new \\Product\\Item();\n if (! $product->get($_REQUEST['product_code'])) $this->error(\"Product not found\");\n $parameters['product_id'] = $product->id;\n $price = $product->getPrice($parameters);\n if ($product->error()) $this->error($product->error());\n $this->response->success = 1;\n $this->response->price = $price;\n print $this->formatOutput($this->response);\n }",
"function get_buyprice($prodfournprice, $qty, $product_id=0, $fourn_ref='', $fk_soc=0)\n\t{\n\t\tglobal $conf;\n\t\t$result = 0;\n\n\t\t// We do a first seach with a select by searching with couple prodfournprice and qty only (later we will search on triplet qty/product_id/fourn_ref)\n\t\t$sql = \"SELECT pfp.rowid, pfp.price as price, pfp.quantity as quantity, pfp.remise_percent,\";\n\t\t$sql.= \" pfp.fk_product, pfp.ref_fourn, pfp.fk_soc, pfp.tva_tx, pfp.fk_supplier_price_expression\";\n\t\t$sql.= \" ,pfp.default_vat_code\";\n\t\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"product_fournisseur_price as pfp\";\n\t\t$sql.= \" WHERE pfp.rowid = \".$prodfournprice;\n\t\tif ($qty > 0) $sql.= \" AND pfp.quantity <= \".$qty;\n\t\t$sql.= \" ORDER BY pfp.quantity DESC\";\n\n\t\tdol_syslog(get_class($this).\"::get_buyprice first search by prodfournprice/qty\", LOG_DEBUG);\n\t\t$resql = $this->db->query($sql);\n\t\tif ($resql)\n\t\t{\n\t\t\t$obj = $this->db->fetch_object($resql);\n\t\t\tif ($obj && $obj->quantity > 0)\t\t// If we found a supplier prices from the id of supplier price\n\t\t\t{\n if (!empty($conf->dynamicprices->enabled) && !empty($obj->fk_supplier_price_expression))\n {\n\t\t\t\t\trequire_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';\n $prod_supplier = new ProductFournisseur($this->db);\n $prod_supplier->product_fourn_price_id = $obj->rowid;\n $prod_supplier->id = $obj->fk_product;\n $prod_supplier->fourn_qty = $obj->quantity;\n $prod_supplier->fourn_tva_tx = $obj->tva_tx;\n $prod_supplier->fk_supplier_price_expression = $obj->fk_supplier_price_expression;\n $priceparser = new PriceParser($this->db);\n $price_result = $priceparser->parseProductSupplier($prod_supplier);\n if ($price_result >= 0) {\n \t$obj->price = $price_result;\n }\n }\n $this->product_fourn_price_id = $obj->rowid;\n\t\t\t\t$this->buyprice = $obj->price; // deprecated\n\t\t\t\t$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product of supplier\n\t\t\t\t$this->fourn_price_base_type = 'HT'; // Price base type\n\t\t\t\t$this->ref_fourn = $obj->ref_fourn; // deprecated\n\t\t\t\t$this->ref_supplier = $obj->ref_fourn; // Ref supplier\n\t\t\t\t$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed\n\t\t\t\t$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier\n\t\t\t\t$this->default_vat_code = $obj->default_vat_code; // Vat code supplier\n\t\t\t\t$result=$obj->fk_product;\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\telse // If not found\n\t\t\t{\n\t\t\t\t// We do a second search by doing a select again but searching with less reliable criteria: couple qty/id product, and if set fourn_ref or fk_soc.\n\t\t\t\t$sql = \"SELECT pfp.rowid, pfp.price as price, pfp.quantity as quantity, pfp.fk_soc,\";\n\t\t\t\t$sql.= \" pfp.fk_product, pfp.ref_fourn as ref_supplier, pfp.tva_tx, pfp.fk_supplier_price_expression\";\n\t\t\t\t$sql.= \" ,pfp.default_vat_code\";\n\t\t\t\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"product_fournisseur_price as pfp\";\n\t\t\t\t$sql.= \" WHERE pfp.fk_product = \".$product_id;\n\t\t\t\tif ($fourn_ref != 'none') $sql.= \" AND pfp.ref_fourn = '\".$fourn_ref.\"'\";\n\t\t\t\tif ($fk_soc > 0) $sql.= \" AND pfp.fk_soc = \".$fk_soc;\n\t\t\t\tif ($qty > 0) $sql.= \" AND pfp.quantity <= \".$qty;\n\t\t\t\t$sql.= \" ORDER BY pfp.quantity DESC\";\n\t\t\t\t$sql.= \" LIMIT 1\";\n\n\t\t\t\tdol_syslog(get_class($this).\"::get_buyprice second search from qty/ref/product_id\", LOG_DEBUG);\n\t\t\t\t$resql = $this->db->query($sql);\n\t\t\t\tif ($resql)\n\t\t\t\t{\n\t\t\t\t\t$obj = $this->db->fetch_object($resql);\n\t\t\t\t\tif ($obj && $obj->quantity > 0)\t\t// If found\n\t\t\t\t\t{\n\t\t if (!empty($conf->dynamicprices->enabled) && !empty($obj->fk_supplier_price_expression))\n\t\t {\n\t\t\t\t\t\t\trequire_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';\n\t\t $prod_supplier = new ProductFournisseur($this->db);\n\t\t $prod_supplier->product_fourn_price_id = $obj->rowid;\n\t\t $prod_supplier->id = $obj->fk_product;\n\t\t $prod_supplier->fourn_qty = $obj->quantity;\n\t\t $prod_supplier->fourn_tva_tx = $obj->tva_tx;\n\t\t $prod_supplier->fk_supplier_price_expression = $obj->fk_supplier_price_expression;\n\t\t $priceparser = new PriceParser($this->db);\n\t\t $price_result = $priceparser->parseProductSupplier($prod_supplier);\n\t\t if ($result >= 0) {\n\t\t \t$obj->price = $price_result;\n\t\t }\n\t\t }\n\t\t $this->product_fourn_price_id = $obj->rowid;\n\t\t\t\t\t\t$this->buyprice = $obj->price; // deprecated\n\t\t\t\t\t\t$this->fourn_qty = $obj->quantity;\t\t\t\t\t// min quantity for price for a virtual supplier\n\t\t\t\t\t\t$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product for a virtual supplier\n\t\t\t\t\t\t$this->fourn_price_base_type = 'HT'; // Price base type for a virtual supplier\n\t\t\t\t\t\t$this->ref_fourn = $obj->ref_supplier; // deprecated\n\t\t\t\t\t\t$this->ref_supplier = $obj->ref_supplier; // Ref supplier\n\t\t\t\t\t\t$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed\n\t\t\t\t\t\t$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier\n\t\t\t\t\t\t$this->default_vat_code = $obj->default_vat_code; // Vat code supplier\n\t\t\t\t\t\t$result=$obj->fk_product;\n\t\t\t\t\t\treturn $result;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn -1;\t// Ce produit n'existe pas avec cet id tarif fournisseur ou existe mais qte insuffisante, ni pour le couple produit/ref fournisseur dans la quantité.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->error=$this->db->lasterror();\n\t\t\t\t\treturn -3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error=$this->db->lasterror();\n\t\t\treturn -2;\n\t\t}\n\t}",
"function getPrice(){\n $this->checkProcess();\n return $this->data['price'];\n }",
"public function getBuyPrice() {\n return $this->buyPrice;\n }",
"public function getSellPrice(){\n\t\treturn $this->sellPrice;\n\t}",
"public function profitBTC()\n {\n return Money::BTC((int) floor($this->bidBTCVolume()->getAmount() - $this->askBTCVolume()->getAmount()));\n }",
"public function getPrice()\n {\n $price = Cache::tags([$this->exchange])->get($this->pair, function () {\n return $this->getPriceFromAPI($this->pair);\n });\n return $price;\n }",
"function buyBuyBuy(float $bitcoinPrice, float $initialWalletBalance, float $exchangeRate): float {\n$actualBitcoinCashPrice = $bitcoinPrice / $exchangeRate;\n$newWalletBalance = $initialWalletBalance - $actualBitcoinCashPrice;\nreturn($newWalletBalance);\n}",
"private function calculateItemPrice(){\r\n switch($this->_chargeType){\r\n case \"custom\":\r\n $this->_price = $this->_value;\r\n break;case \"leveled\":\r\n $query = $this->_mysqli->prepare(\"SELECT `price` FROM `trans_purchasable` WHERE `id`=?\");\r\n $query->bind_param(\"i\",$this->_item_id);\r\n $query->execute();\r\n $query->store_result();\r\n $query->bind_result($this->_price);\r\n\t\t$query->fetch();\r\n $query->close();\r\n break;case \"quantity\":\r\n $this->_price = $this->_value * $this->_unitPrice;\r\n break;case \"basket\":\r\n $basketID = $this->_value;\r\n $query = $this->_mysqli->prepare(\"SELECT `price` FROM `baskets` WHERE `ID`=?\");\r\n $query->bind_param(\"i\",$basketID);\r\n $query->execute();\r\n $query->store_result();\r\n $query->bind_result($this->_price);\r\n $query->fetch();\r\n $query->close();\r\n break; default:\r\n header(\"tsastatus: 500\");\r\n exit(json_encode(array(\"type\"=>1, \"message\"=>\"Calculation Error!\", \"time\"=>8000)));\r\n break;\r\n }\r\n }",
"function calculateBitcoinAmount()\n{\n if (isset($_GET['euro'])) {\n $euro = (int)$_GET['euro']; //Dit blokje code (if-statement) kun je laten staan.\n }\n\n /************************************************************ Bijv. ***********************************************************************/\n /* Als de huidigeprijs van 1 hele bitcoin 5000,- kost en jij betaalt 1000,- euro. Dan krijg je 1/5 oftewel 0,2 bitcoin. \n * Om dit te bereken moet je je koopbedrag delen door de huidigeprijs. Aantal gekochte bicoin = koopbedrag/huidigePrijs; = (1000/5000=0,2). \n */\n\n $prijs = getBitcoinPrice();\n $bedrag = $euro; \n $aantalGekochteBicoin = $bedrag / $prijs; //This is the formule of the bitcoin that you get after you buy it for any amount of money. \n\n return [$prijs,$bedrag,$aantalGekochteBicoin]; // The final result that will returned after calculation.\n\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The loaded target Returns break points as GDB syntax string | public function get_gdb_command ($breakpoints) {
$results = "";
foreach ($breakpoints as $file => $array) {
$file_name = basename($file);
foreach ($array as $line) {
$results .= "break $file_name:$line\n";
}
}
return $results;
} | [
"function phpdbg_break_next(){}",
"function dprb() {\n\t\t/** @noinspection PhpVoidFunctionResultUsedInspection */\n\t\t$breakpoint_at = pos(debug_backtrace(false));\n\n\t\tDpr::getInstance()->setBreakpoint($breakpoint_at['file'], $breakpoint_at['line']);\n\t}",
"public function getDebugLabel () : string;",
"public static function breakpoint()\n {\n print \"<h1>BREAKPOINT</h1>\\n\";\n\n /* var dumps */\n if (func_num_args() > 0) {\n print self::formatArguments(func_get_args());\n }\n print self::formatBacktrace(debug_backtrace());\n\n exit(0);\n }",
"public function getDumperStartDirective();",
"function debugger_start_debug() {}",
"function dbt($what='fileline',$which=0){\n $dbt = debug_backtrace();\n $dbt[] = array(); // necessary since some ignore rules should return the line before\n $res = array();\n $keys = array_keys($this->dbt_ignore);\n $line = array();\n while(count($dbt)>0){\n $lline = $line;\n $line = array_shift($dbt);\n \n $tres = $line;\n if(in_array(def($line,'file','-'), $this->dbt_ignore['file'])) continue;\n $tres = $lline;\n if(in_array(def($line,'class','-'), $this->dbt_ignore['class'])) continue;\n if(in_array(def($line,'function','-'),$this->dbt_ignore['function'])) continue;\n $tmp = $this->dbt_show($tres,$what);\n if($tmp===FALSE) continue;\n else if($which==0) return $tmp;\n else if($which>0) { $which--; continue;}\n else if($which==-1) { $res[] = $tmp; return $res;}\n else { $res[] = $tmp; $which++; }\n }\n return $res;\n }",
"public function getDebugText() : string {}",
"public function getSyntax() {}",
"function dbt($what='fileline',$which=0){\r\n if(is_null($this->dbt)) $this->dbt = debug_backtrace();\r\n $dbt = $this->dbt;\r\n $dbt[] = array(); // necessary since some ignore rules should return the line before\r\n $res = array();\r\n $keys = array_keys(self::$dbt_ignore);\r\n $line = array();\r\n while(count($dbt)>0){\r\n $lline = $line;\r\n $line = array_shift($dbt);\r\n \r\n $tres = $line;\r\n if(in_array(def($line,'file','-'), self::$dbt_ignore['file'])) continue;\r\n $tres = $lline;\r\n if(in_array(def($line,'class','-'), self::$dbt_ignore['class'])) continue;\r\n if(in_array(def($line,'function','-'),self::$dbt_ignore['function'])) continue;\r\n\r\n $tmp = $this->dbt_show($tres,$what);\r\n if($tmp===FALSE) continue;\r\n else if($which==0) return $tmp;\r\n else if($which>0) { $which--; continue;}\r\n else if($which==-1) { $res[] = $tmp; return $res;}\r\n else { $res[] = $tmp; $which++; }\r\n }\r\n return $res;\r\n }",
"function psf_backtrace_as_html()\n{\n $backtrace = debug_backtrace();\n $result = '';\n foreach ($backtrace as $item)\n {\n $args = '';\n foreach ($item['args'] as $vt)\n $args .= gettype($vt) . ', ';\n if (psf_string_endsWith($args, ', '))\n $args = substr($args, 0, strlen($args) - 2);\n $class = '';\n if (isset($item['class']))\n $class = $item['class'] . '::';\n $result .= '<code>' . htmlspecialchars($class. $item['function'] . \"($args)@\" . $item['file'] . ':' . $item['line']) . \"</code><br>\\n\";\n }\n return $result;\n}",
"public function dump_debug_info () {}",
"public function dumpClassLoadingInformationCommand() {}",
"public function debugDump()\n {\n foreach ( $this->calls as $nr => $call )\n {\n echo \"\\n\", $nr, \") \", $call[0], \"( \", @implode( \", \", $call[1] ), \" )\";\n }\n }",
"function wa_dumpc()\n{\n if (php_sapi_name() != 'cli') {\n // 'waException' is a trigger for default JS error handlers\n // to show output in a dialog.\n echo '<pre rel=\"waException\">';\n }\n\n // Show where we've been called from\n if(function_exists('debug_backtrace')) {\n echo \"dumped from \";\n\n $root_path = realpath(dirname(__FILE__).'/../..');\n $root_path = str_replace('\\\\', '/', $root_path);\n $root_path = preg_quote($root_path, '~');\n foreach(debug_backtrace() as $row) {\n if (ifset($row['file']) == __FILE__ || (empty($row['file']) && ifset($row['function']) == 'wa_dumpc')) {\n continue;\n }\n if (!empty($row['file'])) {\n $row['file'] = str_replace('\\\\', '/', $row['file']);\n $row['file'] = preg_replace(\"~^{$root_path}/?~\", '$1', $row['file']);\n }\n echo ifset($row['file'], '???'), ' line #', ifset($row['line'], '???'), \":\\n\";\n break;\n }\n }\n\n $args = func_get_args();\n foreach($args as $v) {\n echo \"\\n\".wa_dump_helper($v).\"\\n\";\n }\n if (php_sapi_name() != 'cli') {\n echo \"</pre>\\n\";\n }\n if (class_exists('waConfig') && !waConfig::get('is_template')) {\n return reset($args);\n }\n}",
"function debugg_trace()\n\t{\n\t\t$objet_trace = debug_backtrace();\n\t\tprint_r($objet_trace);\n\t\tdie();\n\t}",
"function dump($expr) {\n\t\techo $this->highlight($this->stringify($expr));\n\t}",
"function Dumper()\n{\n try {\n ini_set(\"highlight.comment\", \"#008000\");\n ini_set(\"highlight.default\", \"#FFFFFF\");\n ini_set(\"highlight.helper\", \"#808080\");\n ini_set(\"highlight.keyword\", \"#0099FF; font-weight: bold\");\n ini_set(\"highlight.string\", \"#99FF99\");\n\n $vars = func_get_args();\n\n foreach ( $vars as $var ) {\n $output = var_export($var, true);\n $output = trim($output);\n $output = highlight_string(\"<?php \" . $output, true); // highlight_string() requires opening PHP tag or otherwise it will not colorize the text\n $output = preg_replace(\"|\\\\<code\\\\>|\", \"<code style='background-color: #000000; padding: 10px; margin: 10px; display: block; font: 12px Consolas;'>\", $output, 1); // edit prefix\n $output = preg_replace(\"|(\\\\<span style\\\\=\\\"color\\\\: #[a-fA-F0-9]{0,6}\\\"\\\\>)(<\\\\?php )(.*?)(\\\\</span\\\\>)|\", \"\\$1\\$3\\$4\", $output); // remove custom added \"<?php \"\n echo $output;\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n}",
"public function loadCallLocationInfo()\n {\n $idx = 5;\n $bt = debug_backtrace();\n\n // Check if Ladybug was called from the helpers shortcuts\n $caller = isset($bt[$idx]['function']) ? $bt[$idx]['function'] : '';\n if (!in_array($caller, array('ld', 'ldd'))) {\n $idx -= 2;\n $caller = isset($bt[$idx]['function']) ? $bt[$idx]['function'] : '';\n if (!in_array($caller, array('ladybug_dump', 'ladybug_dump_die'))) {\n $idx = $idx - 2;\n }\n }\n\n $this->callFile = isset($bt[$idx]['file']) ? $bt[$idx]['file'] : null;\n $this->callLine = isset($bt[$idx]['line']) ? $bt[$idx]['line'] : null;\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Save the City to the affiliate meta after registration | function affwp_save_affiliate_city( $affiliate_id, $status, $args ) {
$city = sanitize_text_field( $_POST['affwp_city'] );
if ( ! empty( $city ) ) {
affwp_add_affiliate_meta( $affiliate_id, 'city', $city );
}
} | [
"function affwp_add_city_field_to_affiliate_registration_form() {\n\n\t$errors = affiliate_wp()->register->get_errors();\n\n\tif ( ! array_key_exists( 'empty_city', $errors ) ) {\n\t\t$city = sanitize_text_field( $_POST['affwp_city'] );\n\t}\n\n\t?>\n\t<p>\n\t\t<label for=\"affwp-city\">City</label>\n\t\t<input id=\"affwp-city\" type=\"text\" name=\"affwp_city\" value=\"<?php if ( ! empty( $city ) ) {\n\t\t\techo $city;\n\t\t} ?>\" title=\"City\" />\n\t</p>\n\t<?php\n}",
"function save_city_id () {\n\t\tif (!empty($this->city_id) && is_numeric($this->city_id)) {\n\t\t\t$city = new city($this->city_id); \n\t\t\tif (!empty($city->id))\n\t\t\t\t$this->city = $city->name;\n\t\t}\n\t}",
"public function saveAffiliate() {\n $affiliate = filter_input(INPUT_GET, 'affiliate');\n \n if ($affiliate) {\n update_option('codepinch-affiliate', $affiliate);\n }\n }",
"function affwp_save_affiliate_address_2( $affiliate_id, $status, $args ) {\n\n\t$address_2 = sanitize_text_field( $_POST['affwp_address_2'] );\n\n\tif ( ! empty( $address_2 ) ) {\n\t\taffwp_add_affiliate_meta( $affiliate_id, 'address_2', $address_2 );\n\t}\n\n}",
"public function setCity( $city );",
"function updateFacebookCurrentCity () {\n }",
"function saveCity($city, $region, $country) {\n $post_args = array(\n 'post_title' => esc_attr(trim(($city))),\n 'post_type' => 'city',\n 'post_status' => 'publish',\n 'meta_input' => array(\n 'city' => esc_attr(trim(($city))),\n 'region' => esc_attr(trim(($region))),\n 'country' => esc_attr(trim(($country)))\n )\n );\n $post_id = wp_insert_post($post_args, true);\n\n if (is_wp_error($post_id)) {\n echo \"Echec de l'enregistrement de \" . $city . \" \" . $region . \" \" . $country;\n exit;\n }\n}",
"public function setCity($city) { $this->city = $city ; }",
"public function saveCityData($data) {\n $city = $this->getOneCity($data);\n\n if (!$city) {\n Log::debug(\"No data found, saving new info to db\");\n $city = new City($data);\n } else {\n Log::debug(\"Info already exists in db, updating\");\n }\n\n if (!$city->region && isset($data['region'])) {\n $city->region = $data['region'];\n }\n\n if (!$city->id_accuweather && isset($data['id_accuweather'])) {\n $city->id_accuweather = $data['id_accuweather'];\n }\n\n if (!$city->id_openweathermap && isset($data['id_openweathermap'])) {\n $city->id_openweathermap = $data['id_openweathermap'];\n }\n\n $city->save();\n }",
"public function city_callback() {\n\t\t\n\t\t$settings = (array) get_option( 'prop-contact-info' );\n $city = esc_attr( $settings['prop-city'] );\n\t\techo \"<input type='text' name='prop-contact-info[prop-city]' value='$city' />\";\n\t}",
"private function _saveAgency()\n\t {\n\t\t$hash = sha1($this->_advert->city . $this->_advert->phone);\n\t\tif ($this->_exists(\"agencies\", $hash) === false && $this->_advert->person === \"agency\")\n\t\t {\n\t\t\t$this->_db->exec(\"INSERT INTO `agencies` SET \" .\n\t\t\t \"`city` = '\" . $this->_advert->city . \"', \" .\n\t\t\t \"`hash` = '\" . $hash . \"', \" .\n\t\t\t \"`name` = '\" . mb_strtoupper($this->_advert->name) . \"', \" .\n\t\t\t \"`phone` = '\" . $this->_advert->phone . \"'\"\n\t\t\t);\n\n\t\t\t$agency = [\n\t\t\t \"name\" => mb_strtoupper($this->_advert->name),\n\t\t\t \"phone\" => $this->_advert->phone,\n\t\t\t \"city\" => $this->_advert->city,\n\t\t\t];\n\n\t\t\t$cities = [\n\t\t\t \"Москва\",\n\t\t\t \"Санкт-Петербург\",\n\t\t\t \"Иркутск\",\n\t\t\t \"Красноярск\",\n\t\t\t];\n\n\t\t\tif (in_array(trim($this->_advert->city), $cities) === true)\n\t\t\t {\n\t\t\t\t$container = new Container(\"agency_send_sms\");\n\t\t\t\t$container->add(json_encode($agency));\n\t\t\t } //end if\n\n\t\t } //end if\n\n\t }",
"public function setCity($city) { $this->city = $city; }",
"public function changeCity()\n {\n echo \"ENTER new City \\n\";\n $name = UtilityAdd::stringData();\n $data = file_get_contents('address.json');\n $json_arr = json_decode($data, true);\n $json_arr[$this->index][\"address\"][\"City\"] = $name;\n file_put_contents('address.json', json_encode($json_arr));\n\n }",
"function save_cafe_custom_fields(){\n global $post;\n \n if ( $post )\n {\n update_post_meta($post->ID, \"address\", @$_POST[\"address\"]);\n update_post_meta($post->ID, \"website\", @$_POST[\"website\"]);\n }\n}",
"public function addCity() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('city', array('cityCode','cityName','stateId'), array(strtoupper($REQUEST_DATA['cityCode']),$REQUEST_DATA['cityName'],$REQUEST_DATA['states']) );\n\t}",
"public function set_city($city) {\r\n $this->city = $city;\r\n }",
"function setCity($city)\n {\n $this->__city = $city ;\n }",
"private function insertNewAffiliate() {\n\t\t\t$queryVals = array(\n\t\t\t\t'~company' => prepDB($this->registrationForm['company']),\n\t\t\t\t'~first' => prepDB($this->registrationForm['first']),\n\t\t\t\t'~last' => prepDB($this->registrationForm['last']),\n\t\t\t\t'~phone' => prepDB($this->registrationForm['phone']),\n\t\t\t\t'~fax' => prepDB($this->registrationForm['fax']),\n\t\t\t\t'~email' => prepDB($this->registrationForm['email']),\n\t\t\t\t'~website' => prepDB($this->registrationForm['website']),\n\t\t\t\t'~password' => prepDB($this->registrationForm['password']),\n\t\t\t\t'~address1' => prepDB($this->registrationForm['address1']),\n\t\t\t\t'~address2' => prepDB($this->registrationForm['address2']),\n\t\t\t\t'~city' => prepDB($this->registrationForm['city']),\n\t\t\t\t'~state' => prepDB($this->registrationForm['state']),\n\t\t\t\t'~postal' => prepDB($this->registrationForm['postal']),\n\t\t\t\t'~country' => prepDB($this->registrationForm['country']),\n\t\t\t\t'agreeTerms' => prepDB($this->registrationForm['agreeTerms']),\n\t\t\t\t'agreePolicy' => prepDB($this->registrationForm['agreePolicy']),\n\t\t\t\t'isOverAge' => prepDB($this->registrationForm['isOverAge']),\n\t\t\t\t'entryDate' => 'NOW()'\n\t\t\t\t\n\t\t\t);\n\t\t\t$this->dbh->perform('affiliates', $queryVals);\n\t\t}",
"function setCity($s)\n\t{\n\t\t$this->Info['City'] = $s;\n\t\tupdateTableByClient('ClientContact', 'City', $s, $this->Clientname);\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add array of validation rule. | public function addRules(array $rules) : ValidatorInterface; | [
"public function addrules()\n {\n $config = array(\n ['field' => 'id', 'label' => 'id', 'rules' => array(\n 'required', \n //here specify the custom rule\n //second field tells where to find the validation funcs\n array('id', array($this->fleet, 'id_add_check'))\n )\n ],\n ['field' => 'wackyid', 'label' => 'recognizedPlane', 'rules' => array( \n //here specify the custom rule\n //second field tells where to find the validation funcs\n array('wackyselect', array($this->fleet, 'recognizedPlane_check'))\n )\n ],\n );\n return $config;\n }",
"public function getValidationRules()\n {\n $rules = [\n 'genre' => 'required',\n 'title' => 'required|max:200',\n 'uploadfile' => 'required',\n 'price' => 'numeric|max:850000',\n 'days' => 'numeric|max:25'\n ];\n\n $messages = [\n\n ];\n\n return [$rules, $messages];\n }",
"protected function addRules()\n {\n $this->validator->rule('required', 'name');\n $this->validator->rule('lengthMin', 'name', 4);\n $this->validator->rule('lengthMax', 'name', 60);\n }",
"protected function addNewRules()\n {\n foreach ($this->getRules() as $rule) {\n $this->extendValidator($rule);\n }\n }",
"private function addDynamicValidationRules()\n {\n // Only check the start / end dates when both are provided\n if ($this->start_date && $this->end_date)\n $this->rules['start_date'] .= '|before:end_date';\n\n // If this is a percentage discount, add integer and max validation\n if ($this->is_percentage)\n $this->rules['amount'] .= '|integer|max:100';\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'status' => 'required|string',\n 'mailchimp_id' => 'nullable|string',\n ];\n }",
"static function addRules(array $rules){\n\n\n foreach ($rules as $rule){\n static::addRule($rule);\n }\n }",
"private function validate()\n {\n $this->validationErrors = [];\n foreach ($this->validationRules as $attr => $rules) {\n foreach ($rules as $rule) {\n $passed = true;\n if ($rule['rule'] == 'required') {\n $passed = $this->hasValue($attr);\n } elseif ($this->hasValue($attr)) {\n $passed = $this->validateRule($rule, $attr);\n }\n if (!$passed) {\n $this->validationErrors[$attr] = $rule['message'];\n }\n }\n }\n }",
"function addrule($x)\n {\n $x = func_get_args();\n // if (isset($this->rules) == FALSE) $this->rules = array();\n array_push($this->rules, $x);\n }",
"public function rules()\n {\n $rules = [];\n\n $optionID = Request::route()->getParameter('optionID');\n $values = Request::input('values');\n\n if (is_array($values)) {\n foreach ($values as $key => $value) {\n $rules['values.'.$key.'.name'] = 'required\n |unique:product_option_values,name,NULL,id,product_option_labels_id,'.$optionID;\n\n $rules['values.'.$key.'.addon_price'] = 'numeric|min:0|amount_validation|decimal_validation';\n }\n }\n\n return $rules;\n }",
"public function addRuleMessages(array $messages);",
"public function rules() {\n\t\t$args = array();\n\n\t\tforeach ( $this->rules as $arg => $validation ) {\n\t\t\tif ( ! $validation || ! is_string( $validation ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$args[ $arg ] = $this->parse_validation( $validation );\n\t\t}\n\n\t\treturn $args;\n\t}",
"public static function paramsValidationRules (): array\n {\n return [];\n }",
"public function rules()\n {\n $this->prepare_requests();\n\n return [\n // form validation rules here\n ];\n }",
"private function addRules()\n {\n // Get the different rules assigned to this field\n $rules = Former::getRules($this->name);\n if(!$rules) return false;\n\n // Iterate through them and add the attributes\n foreach ($rules as $rule => $parameters) {\n switch ($rule) {\n case 'email':\n $this->type = 'email';\n break;\n case 'url':\n $this->type = 'url';\n break;\n case 'required';\n $this->required();\n break;\n case 'after':\n case 'before':\n $format = 'Y-m-d';\n if ($this->type == 'datetime' or\n $this->type == 'datetime-local') {\n $format .= '\\TH:i:s';\n }\n\n $date = strtotime(array_get($parameters, 0));\n $attribute = ($rule == 'before') ? 'max' : 'min';\n $this->attributes[$attribute] = date($format, $date);\n break;\n case 'max':\n $this->setMax(array_get($parameters, 0));\n break;\n case 'min':\n $this->setMin(array_get($parameters, 0));\n break;\n case 'integer':\n $this->attributes['pattern'] = '\\d+';\n break;\n case 'mimes':\n case 'image':\n if ($this->type == 'file') {\n $ext = $rule == 'image' ? array('jpg', 'png', 'gif', 'bmp') : $parameters;\n $mimes = array_map('File::mime', $ext);\n $this->attributes['accept'] = implode(',', $mimes);\n }\n break;\n case 'numeric':\n if ($this->type == 'number') $this->attributes['step'] = 'any';\n else $this->attributes['pattern'] = '[+-]?\\d*\\.?\\d+';\n break;\n case 'not_numeric':\n $this->attributes['pattern'] = '\\D+';\n break;\n case 'alpha':\n $this->attributes['pattern'] = '[a-zA-Z]+';\n break;\n case 'alpha_num':\n $this->attributes['pattern'] = '[a-zA-Z0-9]+';\n break;\n case 'alpha_dash':\n $this->attributes['pattern'] = '[a-zA-Z0-9_\\-]+';\n break;\n case 'between':\n list($min, $max) = $parameters;\n $this->setMin($min);\n $this->setMax($max);\n break;\n case 'in':\n $possible = (sizeof($parameters) == 1) ? $parameters[0] : '('.join('|', $parameters).')';\n $this->attributes['pattern'] = '^' .$possible. '$';\n break;\n case 'not_in':\n $this->attributes['pattern'] = '(?:(?!^' .join('$|^', $parameters). '$).)*';\n break;\n case 'match':\n $this->attributes['pattern'] = substr($parameters[0], 1, -1);\n break;\n default:\n continue;\n break;\n }\n }\n }",
"public function getRules() {\n return [\n 'category_id' => 'required|exists:complex_provider_categories,id',\n 'company' => 'required',\n 'contact_names' => 'required',\n 'contact_surnames' => 'required',\n 'email' => 'required',\n 'phone' => 'required',\n 'mobile' => 'required',\n ];\n }",
"public function validate() {\n foreach ($this->_rules as $rule) {\n $this->_testRule($rule);\n }\n }",
"public function getValidationRules()\n {\n return [\n 'body' => ['required'],\n ];\n }",
"abstract protected function getValidationRules();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function The isys_component_dao_object_table_list constructor differentiates if $p_cat is an instance of isys_cmdb_dao_category or isys_component database. | public function __construct(isys_cmdb_dao_category &$p_cat)
{
$this->set_rec_status_list(false);
parent::__construct($p_cat);
} | [
"public function constructTableForListButton()\n {\n $obj_table=new table();\n $obj_table->setClass('button_list__constructTableForListButton');\n foreach($this->arra_button_list_unit as $obj_button_list_unit)\n { \n $obj_table->insertTr($obj_button_list_unit->toTr());\n }\n $obj_table->setStyle('display:none;');\n \n return $obj_table;\n }",
"public function __construct(Web2All_Manager_Main $web2all,$obj) {\r\n parent::__construct($web2all);\r\n \r\n $table_listableobject_interface='Web2All_Table_IListableObject';\r\n if (!($obj instanceof $table_listableobject_interface)) {\r\n throw new Exception('Web2All_Table_ObjectBaseList::constructor: requires a Web2All_Table_IListableObject as param');\r\n }\r\n \r\n $this->search_obj=$obj;\r\n\r\n $this->extra='';\r\n \r\n $this->limit=-1;\r\n \r\n $this->offset=-1;\r\n \r\n $this->db=$this->search_obj->getDB();\r\n \r\n $this->classname=get_class($this->search_obj);\r\n \r\n $this->recordSet = null;\r\n \r\n }",
"abstract public function system_table_list();",
"public function __construct()\n {\n parent::__construct();\n\n $this->setTable('categories');\n }",
"protected function init_table() \t\r\n\t\t{ \r\n\t\t\treturn self::TABLE; \r\n\t\t}",
"abstract function list_tables();",
"function _createTableList()\n {\n $this->_connect();\n\n\n $__DB= &$GLOBALS['_DB_DATAOBJECT']['CONNECTIONS'][$this->_database_dsn_md5];\n\n $this->tables = $__DB->getListOf('tables');\n\n foreach($this->tables as $table) {\n $defs = $__DB->tableInfo($table);\n \n // cast all definitions to objects - as we deal with that better.\n foreach($defs as $def) {\n if (is_array($def)) {\n $this->_definitions[$table][] = (object) $def;\n }\n }\n }\n //print_r($this->_definitions);\n }",
"function __construct($data,$tablename) \n {\n # Check the data must be array\n if (is_array($data)) \n {\n # assign this constructor params to the class fields\n $this->data = $data;\n $this->tablename = $tablename;\n }else{\n throw new \\Exception(\"Error : data must be an array \");\n }\n # Call connection function in General file\n $this->connectToDB();\n }",
"public function initTable(){\n\t\t\t\n\t\t}",
"public function __construct() {\n $table=\"pais\";/*TABLA CON LA QUE SE TRABAJA*/\n parent::__construct($table);\n }",
"private function CreateTb_Category() {\n $tCategory = new DbTable('Category');\n \n // Set id property\n $pId = new DbProperty('Id');\n $pId->SetType(DbType::Double());\n $pId->NotNull();\n $pId->PrimaryKey();\n $pId->AutoIncrement();\n // Add id to table\n $tCategory->AddProperty($pId);\n \n // Set name property\n $pName = new DbProperty('Name');\n $pName->SetType(DbType::Varchar(127));\n $pName->NotNull();\n // Add name to table\n $tCategory->AddProperty($pName);\n \n // Set submission property\n $pSubmission = new DbProperty('Submission');\n $pSubmission->SetType(DbType::Double());\n $pSubmission->NotNull();\n // Add submission to table\n $tCategory->AddProperty($pSubmission);\n \n // Add table to database\n $this->Database->AddTable($tCategory);\n }",
"public function __construct()\n {\n parent::__construct(\"AtaProgramCategory\", BaseAta_program_category::TABLE_NAME, \n BaseAta_program_category::PRIMARY_KEY, BaseAta_program_category::SCHEMA);\n }",
"function createCategoryTable() {\n global $xerte_toolkits_site;\n $prefix = $xerte_toolkits_site->database_table_prefix;\n\n $q = \"CREATE TABLE IF NOT EXISTS {$prefix}oai_categories(\n category_id INT(11) PRIMARY KEY NOT NULL,\n taxon VARCHAR(64) NOT NULL,\n label VARCHAR(255) NOT NULL,\n source_url VARCHAR(255) NOT NULL,\n parent_id INT(11))\";\n\n db_query($q);\n}",
"private function initListTable(): void\n {\n $this->list_table = new ListTable($this->getUrl(), $this->per_page_option_name, $this->ib_manager);\n $this->list_table->processActions(); // may trigger wp_redirect()\n $this->list_table->displayNotices();\n $this->list_table->prepare_items();\n }",
"function __construct($dbrow,\n $table)\n {\n // invoke constructor of base class Record\n parent::__construct($dbrow,\n $table);\n }",
"public function __construct($catid)\n {\n $query = mysql_query(\"SELECT * FROM shop__category WHERE id = $catid\");\n $result = mysql_fetch_array($query);\n $this->id = $result['id'];\n $this->name = $result['name'];\n \n $shopquery = mysql_query(\"SELECT * FROM shop__list WHERE category = $catid\");\n while($shop = mysql_fetch_array($shopquery))\n {\n $this->shops[] = new Shop($shop['id']);\n }\n }",
"function lister_tables_objets_sql($table_sql=null, $desc=array()){\n\t static $deja_la = false;\n\t static $infos_tables = null;\n\t // prealablement recuperer les tables_principales\n\t if (is_null($infos_tables)){\n\t\t // pas de reentrance (cas base/serial)\n\t\t if ($deja_la) return array();\n\t\t $deja_la = true;\n\t\t # recuperer les tables_principales si besoin\n\t\t include_spip('base/serial');\n\t\t # recuperer les tables_auxiliaires si besoin\n\t\t include_spip('base/auxiliaires');\n\t\t // recuperer les declarations explicites ancienne mode\n\t\t // qui servent a completer declarer_tables_objets_sql\n\t\t base_serial($GLOBALS['tables_principales']);\n\t\t base_auxiliaires($GLOBALS['tables_auxiliaires']);\n\t\t $infos_tables = pipeline('declarer_tables_objets_sql',array(\n\t\t\t 'spip_articles'=> array(\n\t\t\t\t 'page'=>'article',\n\t\t\t\t 'texte_retour' => 'icone_retour_article',\n\t\t\t\t 'texte_modifier' => 'icone_modifier_article',\n\t\t\t\t 'texte_creer' => 'icone_ecrire_article',\n\t\t\t\t 'texte_objets' => 'public:articles',\n\t\t\t\t 'texte_objet' => 'public:article',\n\t\t\t\t 'texte_signale_edition' => 'texte_travail_article',\n\t\t\t\t 'info_aucun_objet'=> 'info_aucun_article',\n\t\t\t\t 'info_1_objet' => 'info_1_article',\n\t\t\t\t 'info_nb_objets' => 'info_nb_articles',\n\t\t\t\t 'texte_logo_objet' => 'logo_article',\n\t\t\t\t 'titre' => 'titre, lang',\n\t\t\t\t 'date' => 'date',\n\t\t\t\t 'principale' => 'oui',\n\t\t\t\t 'champs_editables' => array('surtitre', 'titre', 'soustitre', 'descriptif','nom_site', 'url_site', 'chapo', 'texte', 'ps','virtuel'),\n\t\t\t\t 'champs_versionnes' => array('id_rubrique', 'surtitre', 'titre', 'soustitre', 'jointure_auteurs', 'descriptif', 'nom_site', 'url_site', 'chapo', 'texte', 'ps'),\n\t\t\t\t 'field' => array(\n\t\t\t\t\t \"id_article\"\t=> \"bigint(21) NOT NULL\",\n\t\t\t\t\t \"surtitre\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"titre\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"soustitre\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"id_rubrique\"\t=> \"bigint(21) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"descriptif\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"chapo\"\t=> \"mediumtext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"texte\"\t=> \"longtext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"ps\"\t=> \"mediumtext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"date\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\n\t\t\t\t\t \"statut\"\t=> \"varchar(10) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"id_secteur\"\t=> \"bigint(21) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"maj\"\t=> \"TIMESTAMP\",\n\t\t\t\t\t \"export\"\t=> \"VARCHAR(10) DEFAULT 'oui'\",\n\t\t\t\t\t \"date_redac\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\n\t\t\t\t\t \"visites\"\t=> \"integer DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"referers\"\t=> \"integer DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"popularite\"\t=> \"DOUBLE DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"accepter_forum\"\t=> \"CHAR(3) DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"date_modif\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\n\t\t\t\t\t \"lang\"\t\t=> \"VARCHAR(10) DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"langue_choisie\"\t=> \"VARCHAR(3) DEFAULT 'non'\",\n\t\t\t\t\t \"id_trad\"\t=> \"bigint(21) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"nom_site\"\t=> \"tinytext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"url_site\"\t=> \"VARCHAR(255) DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"virtuel\"\t=> \"VARCHAR(255) DEFAULT '' NOT NULL\",\n\t\t\t\t ),\n\t\t\t\t 'key' => array(\n\t\t\t\t\t \"PRIMARY KEY\"\t\t=> \"id_article\",\n\t\t\t\t\t \"KEY id_rubrique\"\t=> \"id_rubrique\",\n\t\t\t\t\t \"KEY id_secteur\"\t=> \"id_secteur\",\n\t\t\t\t\t \"KEY id_trad\"\t\t=> \"id_trad\",\n\t\t\t\t\t \"KEY lang\"\t\t=> \"lang\",\n\t\t\t\t\t \"KEY statut\"\t\t=> \"statut, date\",\n\t\t\t\t ),\n\t\t\t\t 'join' => array(\n\t\t\t\t\t \"id_article\"=>\"id_article\",\n\t\t\t\t\t \"id_rubrique\"=>\"id_rubrique\"\n\t\t\t\t ),\n\t\t\t\t 'rechercher_champs' => array(\n\t\t\t\t\t 'surtitre' => 5, 'titre' => 8, 'soustitre' => 5, 'chapo' => 3,\n\t\t\t\t\t 'texte' => 1, 'ps' => 1, 'nom_site' => 1, 'url_site' => 1,\n\t\t\t\t\t 'descriptif' => 4\n\t\t\t\t ),\n\t\t\t\t 'rechercher_jointures' => array(\n\t\t\t\t\t 'auteur' => array('nom' => 10),\n\t\t\t\t ),\n\t\t\t\t 'statut'=> array(\n\t\t\t\t\t array(\n\t\t\t\t\t\t 'champ' => 'statut',\n\t\t\t\t\t\t 'publie' => 'publie',\n\t\t\t\t\t\t 'previsu' => 'publie,prop,prepa',\n\t\t\t\t\t\t 'post_date' => 'date',\n\t\t\t\t\t\t 'exception' => 'statut'\n\t\t\t\t\t )\n\t\t\t\t ),\n\t\t\t\t 'statut_titres' => array(\n\t\t\t\t\t 'prepa'=>'info_article_redaction',\n\t\t\t\t\t 'prop'=>'info_article_propose',\n\t\t\t\t\t 'publie'=>'info_article_publie',\n\t\t\t\t\t 'refuse'=>'info_article_refuse',\n\t\t\t\t\t 'poubelle'=>'info_article_supprime'\n\t\t\t\t ),\n\t\t\t\t 'statut_textes_instituer' => \tarray(\n\t\t\t\t\t 'prepa' => 'texte_statut_en_cours_redaction',\n\t\t\t\t\t 'prop' => 'texte_statut_propose_evaluation',\n\t\t\t\t\t 'publie' => 'texte_statut_publie',\n\t\t\t\t\t 'refuse' => 'texte_statut_refuse',\n\t\t\t\t\t 'poubelle' => 'texte_statut_poubelle',\n\t\t\t\t ),\n\t\t\t\t 'tables_jointures' => array(\n\t\t\t\t\t #'id_auteur' => 'auteurs_liens' // declaration generique plus bas\n\t\t\t\t ),\n\t\t\t ),\n\t\t\t 'spip_auteurs' => array(\n\t\t\t\t 'page'=>'auteur',\n\t\t\t\t 'texte_retour' => 'icone_retour',\n\t\t\t\t 'texte_modifier' => 'admin_modifier_auteur',\n\t\t\t\t 'texte_objets' => 'icone_auteurs',\n\t\t\t\t 'texte_objet' => 'public:auteur',\n\t\t\t\t 'info_aucun_objet'=> 'info_aucun_auteur',\n\t\t\t\t 'info_1_objet' => 'info_1_auteur',\n\t\t\t\t 'info_nb_objets' => 'info_nb_auteurs',\n\t\t\t\t 'texte_logo_objet' => 'logo_auteur',\n\t\t\t\t 'texte_creer_associer' => 'creer_et_associer_un_auteur',\n\t\t\t\t 'titre' => \"nom AS titre, '' AS lang\",\n\t\t\t\t 'date' => 'date',\n\t\t\t\t 'principale' => 'oui',\n\t\t\t\t 'champs_editables' => array('nom','email','bio','nom_site','url_site','imessage','pgp'),\n\t\t\t\t 'champs_versionnes' => array('nom', 'bio', 'email', 'nom_site', 'url_site', 'login'),\n\t\t\t\t 'field' => array(\n\t\t\t\t\t \"id_auteur\"\t=> \"bigint(21) NOT NULL\",\n\t\t\t\t\t \"nom\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"bio\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"email\"\t=> \"tinytext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"nom_site\"\t=> \"tinytext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"url_site\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"login\"\t=> \"VARCHAR(255) BINARY\",\n\t\t\t\t\t \"pass\"\t=> \"tinytext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"low_sec\"\t=> \"tinytext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"statut\"\t=> \"varchar(255) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"webmestre\"\t=> \"varchar(3) DEFAULT 'non' NOT NULL\",\n\t\t\t\t\t \"maj\"\t=> \"TIMESTAMP\",\n\t\t\t\t\t \"pgp\"\t=> \"TEXT DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"htpass\"\t=> \"tinytext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"en_ligne\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\n\t\t\t\t\t \"alea_actuel\"\t=> \"tinytext\",\n\t\t\t\t\t \"alea_futur\"\t=> \"tinytext\",\n\t\t\t\t\t \"prefs\"\t=> \"tinytext\",\n\t\t\t\t\t \"cookie_oubli\"\t=> \"tinytext\",\n\t\t\t\t\t \"source\"\t=> \"VARCHAR(10) DEFAULT 'spip' NOT NULL\",\n\t\t\t\t\t \"lang\"\t=> \"VARCHAR(10) DEFAULT '' NOT NULL\"\n\t\t\t\t ),\n\t\t\t\t 'key' => array(\n\t\t\t\t\t \"PRIMARY KEY\"\t=> \"id_auteur\",\n\t\t\t\t\t \"KEY login\"\t=> \"login\",\n\t\t\t\t\t \"KEY statut\"\t=> \"statut\",\n\t\t\t\t\t \"KEY en_ligne\"\t=> \"en_ligne\",\n\t\t\t\t ),\n\t\t\t\t 'join' => array(\n\t\t\t\t\t \"id_auteur\"=>\"id_auteur\",\n\t\t\t\t\t \"login\"=>\"login\"\n\t\t\t\t ),\n\t\t\t\t 'rechercher_champs' => array(\n\t\t\t\t\t 'nom' => 5, 'bio' => 1, 'email' => 1, 'nom_site' => 1, 'url_site' => 1, 'login' => 1\n\t\t\t\t ),\n\t\t\t\t // 2 conditions pour les auteurs : statut!=poubelle,\n\t\t\t\t // et avoir des articles publies\n\t\t\t\t 'statut'=> array(\n\t\t\t\t\t array(\n\t\t\t\t\t\t 'champ' => 'statut',\n\t\t\t\t\t\t 'publie' => '!5poubelle',\n\t\t\t\t\t\t 'previsu' => '!5poubelle',\n\t\t\t\t\t\t 'exception' => 'statut'\n\t\t\t\t\t ),\n\t\t\t\t\t array(\n\t\t\t\t\t\t 'champ' => array(\n\t\t\t\t\t\t\t array('spip_auteurs_liens', 'id_auteur'),\n\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t 'spip_articles',\n\t\t\t\t\t\t\t\t array('id_objet','id_article','objet','article')\n\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t 'statut'\n\t\t\t\t\t\t ),\n\t\t\t\t\t\t 'publie' => 'publie',\n\t\t\t\t\t\t 'previsu' => '!',\n\t\t\t\t\t\t 'post_date' => 'date',\n\t\t\t\t\t\t 'exception' => array('statut','lien','tout')\n\t\t\t\t\t ),\n\t\t\t\t ),\n\t\t\t\t 'statut_images' => array(\n\t\t\t\t\t 'auteur-6forum-16.png',\n\t\t\t\t\t '0minirezo'=>'auteur-0minirezo-16.png',\n\t\t\t\t\t '1comite'=>'auteur-1comite-16.png',\n\t\t\t\t\t '6forum'=>'auteur-6forum-16.png',\n\t\t\t\t\t '5poubelle'=>'auteur-5poubelle-16.png',\n\t\t\t\t\t 'nouveau'=>''\n\t\t\t\t ),\n\t\t\t\t 'statut_titres' => array(\n\t\t\t\t\t 'titre_image_visiteur',\n\t\t\t\t\t '0minirezo'=>'titre_image_administrateur',\n\t\t\t\t\t '1comite'=>'titre_image_redacteur_02',\n\t\t\t\t\t '6forum'=>'titre_image_visiteur',\n\t\t\t\t\t '5poubelle'=>'titre_image_auteur_supprime',\n\t\t\t\t ),\n\t\t\t\t 'tables_jointures' => array(\n\t\t\t\t\t #'auteurs_liens' // declaration generique plus bas\n\t\t\t\t ),\n\t\t\t ),\n\t\t\t 'spip_rubriques' => array(\n\t\t\t\t 'page'=>'rubrique',\n\t\t\t\t 'url_voir' => 'rubrique',\n\t\t\t\t 'url_edit' => 'rubrique_edit',\n\t\t\t\t 'texte_retour' => 'icone_retour',\n\t\t\t\t 'texte_objets' => 'public:rubriques',\n\t\t\t\t 'texte_objet' => 'public:rubrique',\n\t\t\t\t 'texte_modifier' => 'icone_modifier_rubrique',\n\t\t\t\t 'texte_creer' => 'icone_creer_rubrique',\n\t\t\t\t 'info_aucun_objet'=> 'info_aucun_rubrique',\n\t\t\t\t 'info_1_objet' => 'info_1_rubrique',\n\t\t\t\t 'info_nb_objets' => 'info_nb_rubriques',\n\t\t\t\t 'texte_logo_objet' => 'logo_rubrique',\n\t\t\t\t 'titre'=>'titre, lang',\n\t\t\t\t 'date' => 'date',\n\t\t\t\t 'principale' => 'oui',\n\t\t\t\t 'champs_editables' => array('titre', 'texte', 'descriptif', 'extra'),\n\t\t\t\t 'champs_versionnes' => array('titre', 'descriptif', 'texte'),\n\t\t\t\t 'field' => array(\n\t\t\t\t\t \"id_rubrique\"\t=> \"bigint(21) NOT NULL\",\n\t\t\t\t\t \"id_parent\"\t=> \"bigint(21) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"titre\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"descriptif\"\t=> \"text DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"texte\"\t=> \"longtext DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"id_secteur\"\t=> \"bigint(21) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"maj\"\t=> \"TIMESTAMP\",\n\t\t\t\t\t \"statut\"\t=> \"varchar(10) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t \"date\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\",\n\t\t\t\t\t \"lang\"\t=> \"VARCHAR(10) DEFAULT '' NOT NULL\",\n\t\t\t\t\t \"langue_choisie\"\t=> \"VARCHAR(3) DEFAULT 'non'\",\n\t\t\t\t\t \"statut_tmp\"\t=> \"varchar(10) DEFAULT '0' NOT NULL\",\n\t\t\t\t\t\t \"date_tmp\"\t=> \"datetime DEFAULT '0000-00-00 00:00:00' NOT NULL\"\n\t\t\t\t ),\n\t\t\t\t 'key' => array(\n\t\t\t\t\t \"PRIMARY KEY\"\t=> \"id_rubrique\",\n\t\t\t\t\t \"KEY lang\"\t=> \"lang\",\n\t\t\t\t\t \"KEY id_parent\"\t=> \"id_parent\",\n\t\t\t\t ),\n\t\t\t\t 'rechercher_champs' => array(\n\t\t\t\t\t 'titre' => 8, 'descriptif' => 5, 'texte' => 1\n\t\t\t\t ),\n\t\t\t\t 'statut' => array(\n\t\t\t\t\t array(\n\t\t\t\t\t\t 'champ' => 'statut',\n\t\t\t\t\t\t 'publie' => 'publie',\n\t\t\t\t\t\t 'previsu' => '!',\n\t\t\t\t\t\t 'exception' => array('statut','tout')\n\t\t\t\t\t ),\n\t\t\t\t ),\n\t\t\t\t 'tables_jointures' => array(\n\t\t\t\t\t #'id_auteur' => 'auteurs_liens' // declaration generique plus bas\n\t\t\t\t ),\n\t\t\t ),\n\t\t\t // toutes les tables ont le droit a une jointure sur les auteurs\n\t\t\t array('tables_jointures'=>array('id_auteur'=>'auteurs_liens'))\n\t\t ));\n\t\t // completer les informations manquantes ou implicites\n\t\t $all = array();\n\t\t foreach(array_keys($infos_tables) as $t) {\n\t\t\t // les cles numeriques servent a declarer\n\t\t\t // les proprietes applicables a tous les objets\n\t\t\t // on les mets de cote\n\t\t\t if (is_numeric($t)) {\n\t\t\t\t $all = array_merge_recursive($all,$infos_tables[$t]);\n\t\t\t\t unset($infos_tables[$t]);\n\t\t\t }\n\t\t\t else\n\t\t\t\t $infos_tables[$t] = renseigner_table_objet_sql($t,$infos_tables[$t]);\n\t\t }\n\t\t // repercuter les proprietes generales communes a tous les objets\n\t\t foreach(array_keys($infos_tables) as $t) {\n\t\t\t $infos_tables[$t] = array_merge_recursive($infos_tables[$t],$all);\n\t\t }\n\n\t\t // completer les tables principales et auxiliaires\n\t\t // avec celles declarees uniquement dans declarer_table_objets_sql\n\t\t // pour assurer la compat en transition\n\t\t foreach($infos_tables as $table=>$infos) {\n\t\t\t $principale_ou_auxiliaire = ($infos['principale']?'tables_principales':'tables_auxiliaires');\n\t\t\t // memoriser des champs eventuels declares par des plugins dans le pipeline tables_xxx\n\t\t\t // qui a ete appelle avant\n\t\t\t $mem = (isset($GLOBALS[$principale_ou_auxiliaire][$table])?$GLOBALS[$principale_ou_auxiliaire][$table]:array());\n\t\t\t // l'ajouter au tableau\n\t\t\t $GLOBALS[$principale_ou_auxiliaire][$table] = array();\n\t\t\t if (isset($infos['field']) AND isset($infos['key'])){\n\t\t\t\t foreach(array('field','key','join') as $k)\n\t\t\t\t\t if (isset($infos_tables[$table][$k]))\n\t\t\t\t\t\t $GLOBALS[$principale_ou_auxiliaire][$table][$k] = &$infos_tables[$table][$k];\n\t\t\t }\n\t\t\t else {\n\t\t\t\t // ici on ne renvoie que les declarations, donc RIEN\n\t\t\t\t // pour avoir la vrai description en base, il faut passer par trouver_table\n\t\t\t\t $GLOBALS[$principale_ou_auxiliaire][$table] = array();\n\t\t\t }\n\t\t\t if (count($mem)){\n\t\t\t\t foreach(array_keys($mem) as $k)\n\t\t\t\t\t if (isset($GLOBALS[$principale_ou_auxiliaire][$table][$k]))\n\t\t\t\t\t\t $GLOBALS[$principale_ou_auxiliaire][$table][$k] = array_merge($GLOBALS[$principale_ou_auxiliaire][$table][$k],$mem[$k]);\n\t\t\t\t\t else\n\t\t\t\t\t\t $GLOBALS[$principale_ou_auxiliaire][$table][$k] = $mem[$k];\n\t\t\t }\n\t\t }\n\n\t\t // recuperer les interfaces (table_titre, table_date)\n\t\t // on ne le fait que dans un second temps pour que table_objet soit fonctionnel\n\t\t // dans le pipeline de declarer_tables_interfaces\n\t\t include_spip('public/interfaces');\n\t\t foreach(array_keys($infos_tables) as $t) {\n\t\t\t $infos_tables[$t] = renseigner_table_objet_interfaces($t,$infos_tables[$t]);\n\t\t }\n\n\t\t $deja_la = false;\n\t\t // lever la constante qui dit qu'on a tout init et qu'on peut cacher\n\t\t define('_init_tables_objets_sql',true);\n\t }\n\t if ($table_sql AND !isset($infos_tables[$table_sql])){\n\t\t #$desc = renseigner_table_objet_sql($table_sql,$desc);\n\t\t $desc = renseigner_table_objet_interfaces($table_sql,$desc);\n\t\t return $desc;\n\t }\n\t if ($table_sql)\n\t\t return isset($infos_tables[$table_sql])?$infos_tables[$table_sql]:array();\n\n\t return $infos_tables;\n }",
"public function __construct($in = array()) {\n\t\t$this->setDataToDefaults();\n\t\textract($in);\n\t\t$id = isset($id) && Math::checkIntegerValue($id) ? $id : -1;\n\t\t$sqlappend = isset($activeonly) ? (' AND `ActiveFlag`=' . ($activeonly ? '1' : '0')) : '';\n\t\t$DB = DB::getReadOnlyAccess();\n\t\t$sql = \"SELECT * FROM `d_mba_image_category_definition` WHERE `TableID`=!0!\" . $sqlappend;\n\t\t$resp = $DB->query($sql, array($id));\n\t\tif($resp->num_rows == 1) {\n\t\t\t$this->setData($resp->fetch_object());\n\t\t}\n\t}",
"protected function create_table_object() {\n\t\treturn new DBTable('test');\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save the reply id to cookie. | public function saveCookie($reply)
{
$reply = "$reply,";
$cookie = $this->cookie->r != false ? $this->cookie->r : ',';
if(strpos($cookie, $reply) === false) $cookie .= $reply;
setcookie('r', $cookie , time() + 60 * 60 * 24 * 30);
} | [
"public function saveCookie()\n {\n // var_dump($this->data);\n setcookie($this->name, serialize($this->data), $this->time, $this->path);\n }",
"private function save(): void {\n helper('cookie');\n $str = join(',', $this->data);\n $days = 3650;\n set_cookie(C__CART, $str, $days * 24 * 60 * 60);\n }",
"function setPresId() {\n error_log('setPresId' . \"\\n\", 3, '/var/tmp/php.log');\n $request = Slim::getInstance()->request();\n\n $presInfo = json_decode($request->getBody());\n\n setcookie(\"pres\", $presInfo->presID, time() + 10000, '/');\n echo($_COOKIE['pres']);\n}",
"function _cookieWrite() {\r\n\t\t$id = $this->Auth->user('id');\r\n\t\t$token = $this->_token($id);\r\n\t\t$data = compact('id', 'token');\r\n\r\n\t\t$this->_setupCookie();\r\n\t\t$this->log('writing cookie:');\r\n\t\t$this->log($data);\r\n\t\t$this->Controller->Cookie->write($this->Auth->userModel, $data);\r\n\t}",
"protected function writeCookie()\n {\n // Create a cookie to send off\n $cookie = new Cookie(\n $this->context->name,\n $this->identity->getTokenString(),\n $this->identity->expires,\n $this->context->path);\n\n // Just store this away for now\n $this->cookieJar[] = $cookie;\n }",
"public function save()\n\t{\n\t\t$this->setP3PHeader();\n\t\t$this->setCookie( $this->name, $this->generateContentString(), $this->expire);\n\t}",
"protected function saveCookie()\n\t{\n\t\t$expires = time()+3600*24*90;\n\t\tif (isset($this->cookieKey)) {\n\t\t\tif (isset($_COOKIE[$this->cookieKey])) {\n\t\t\t\t$ar = explode(\"|\", $_COOKIE[$this->cookieKey]);\n\t\t\t\t$ar[$this->key] = $this->value;\n\t\t\t\tsetcookie($this->cookieKey, implode(\"|\", $ar), $expires);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetcookie($this->cookieKey, $this->key.\"|\".$this->value, $expires);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsetcookie($this->key, $this->value, $expires);\n\t\t}\n\t}",
"public function save()\n\t{\n\t\tif ( headers_sent() === FALSE )\n\t\t{\n\t\t\treturn setcookie($this->name, $this->value, $this->expire, $this->path, $this->domain, $this->secure, $this->http_only);\n\t\t}\n\t}",
"public function write_cookie()\n\t{\n\t\tif (empty($this->_messages))\n\t\t\treturn;\n\n\t\t// Import all messages locally\n\t\t$messages = $this->_messages;\n\n\t\t// Reset the _messages array\n\t\t$this->_messages = NULL;\n\n\t\t// Store the messages in a browser cookie\n\t\tCookie::set($this->_config['storage_key'], serialize($messages));\n\t}",
"function save_cookie()\n\t{\n\n\t\t$key = $this->crypt_cookie($this->login);\n\t\t$uuid = $this->crypt_cookie(uuid());\n\t\t$cookie = $key.\":\".$uuid;\n\t\n\t\t$expire = time() + (COOKIE_TIMEOUT * 86400);\n\n\t\t//remove \"index.php\" from the script name\n\t\t$path = $_SERVER[\"PHP_SELF\"];\n $path = str_replace(\"index.php\",\"\",$path);\n\t\t$path = str_replace(\"api.php\",\"\",$path); \n \n\t\t$domain = $_SERVER[\"SERVER_NAME\"];\n\n\t\t//send only over secure site if necessary\n\t\tif (defined(\"HTTPS_ONLY\")) $secure = true;\n\t\telse $secure = false;\n\n\t\t//set the cookie\n\t\tsetcookie(\"authentication\",$cookie,$expire,$path,$domain,$secure);\t\n\n\t\t//store in the database\n\t\t$sql = \"DELETE FROM auth.cookies WHERE account_id='\".$this->accountId.\"';\";\n\t\t$sql .= \"INSERT INTO auth.cookies VALUES ('\".$this->accountId.\"','\".$key.\"','\".$uuid.\"','\".$expire.\"');\";\n\t\t$this->DB->query($sql);\n\t\n\t\tif ($this->DB->error()) $this->throwError($this->DB->error());\n\n\t}",
"public function storeloginidtocookies(){\r\n if(is_user_logged_in()){\r\n setcookie(\"sticky_id\", get_current_user_id() ,time()+31556926 ,'/');// where 31556926 is total seconds for a year.\r\n }\r\n }",
"public function store(Cookie $cookie);",
"public function save(Reply $reply) {\n \n $replyData = array(\n 'com_id' => $reply->getComment()->getId(),\n 'rep_content' => $reply->getContent(),\n 'rep_advert' => $reply->getAdvert(),\n 'rep_user' => $reply->getAuthor()\n );\n\n if ($reply->getId()) {\n // The reply has already been saved : update it\n $this->getDb()->update('reponse', $replyData, array('rep_id' => $reply->getId()));\n } else {\n // The reply has never been saved : insert it\n $this->getDb()->insert('reponse', $replyData);\n // Get the id of the newly created reply and set it on the entity.\n $id = $this->getDb()->lastInsertId();\n $reply->setId($id);\n }\n }",
"protected function saveToken()\n {\n if (isset($this->token) && $this->token) {\n return;\n }\n\n if ($this->token = $this->getCookie($this->getCookieName())) {\n return;\n }\n\n // If cookie token doesn't exist, we need to create it with unique token...\n $this->token = base_convert(md5(uniqid(rand(), true)), 16, 36);\n setcookie($this->getCookieName(), $this->token, time() + 60 * 60 * 12, '/');\n\n // ... and attach it to broker session in SSO server.\n $this->attach();\n }",
"function handleUniqueIdCookie(){\n\t\t$uniqueId=t3lib_div::_GP('uniqueid');\n\t\tif ($uniqueId) {\n\t\t\t$uniqueIdArray=explode('*',$uniqueId);\n\t\t\t//error_log('Edit :'.print_r($uniqueIdArray,true));\n\t\t\t$ret=setcookie($uniqueIdArray[0], $uniqueIdArray[1], time()+3600);\n\t\t\tif ($ret===false) error_log(__METHOD__.\":set cookie failed\");\n\t\t}\n\t}",
"protected function saveConsentCookie(array $consented_to)\n\t{\n\t\t$payload = ee('Encrypt/Cookie')->signCookieData($consented_to);\n\t\t// 60 * 60 * 24 * 365 = 31556952; A year of seconds\n\t\t$this->input_delegate->set_cookie(self::COOKIE_NAME, $payload, 31556952);\n\t\t$this->session_delegate->set_cache(__CLASS__, 'cookie_data_'.$this->member_id, $consented_to);\n\t}",
"private static function write_cookie()\n\t{\n\t\tif ( ! headers_sent())\n\t\t{\n\t\t\t$minutes = (Config::get('session.expire_on_close')) ? 0 : Config::get('session.lifetime');\n\n\t\t\tCookie::put('laravel_session', static::$session['id'], $minutes, Config::get('session.path'), Config::get('session.domain'), Config::get('session.https'), Config::get('session.http_only'));\n\t\t}\n\t}",
"function setCookie($cookie);",
"private static function write_cookie()\n\t{\n\t\tif(!headers_sent())\n\t\t{\n\t\t\t$minutes = (Config::get('session.expire_on_close')) ? 0 : Config::get('session.lifetime');\n\n\t\t\tCookie::set('laravel_session', static::$session['id'], $minutes, Config::get('session.path'), Config::get('session.domain'), Config::get('session.https'), Config::get('session.http_only'));\n\t\t}\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create two collections, merge it and checks if base collection has two routes. | public function testMerge()
{
$this->collection->get('current', '/current', 'actionCurrent');
$newCollection = new RouteCollection;
$newCollection->get('new', '/', 'action');
$this->collection->mergeWith($newCollection);
$routes = $this->collection->all();
$this->assertCount(2, $routes);
$this->assertArrayHasKey('0', $routes);
$this->assertArrayHasKey('1', $routes);
$this->assertEquals('current', $routes[0]->getName());
$this->assertEquals('/current', $routes[0]->getSourceRoute());
$this->assertEquals('new', $routes[1]->getName());
$this->assertEquals('/', $routes[1]->getSourceRoute());
} | [
"function combine_network_collections ($new_name, $collection1, $collection2) {\n\n $new_collection = new Network_Collection($new_name);\n\n //Go through and add each network from the old collections to the new collection\n\n $a = $collection1->network_array;\n foreach ($a as $network) {\n $new_collection->add_network($network);\n }\n\n $a = $collection2->network_array;\n foreach ($a as $network) {\n $new_collection->add_network($network);\n }\n\n return $new_collection;\n\n}",
"public function merge(self ...$collections): self;",
"private function loadMatchedCollection()\n {\n $this->matchedCollection = collect();\n\n foreach ($this->baseCollection as $key => $item)\n {\n\n $found = true;\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->mergeCollection->whereIn($mergePivot,$item->$basePivot)->first())\n {\n $found = false;\n continue 2;\n }\n }\n\n if($found){\n $this->matchedCollection->push($item);\n }\n\n }\n }",
"public function merge(Collection $collection);",
"public function mergeSourceCollections(ProxySourceCollection $collectionA, ProxySourceCollection $collectionB)\n {\n foreach ($collectionB as $item) {\n $collectionA[] = $item;\n }\n }",
"private function loadUnMatchedCollection()\n {\n $this->unMatchedCollection = collect();\n\n foreach ($this->mergeCollection as $key => $item)\n {\n\n foreach ($this->associativePivots as $basePivot => $mergePivot)\n {\n if(!$this->baseCollection->whereIn($basePivot,$item->$mergePivot)->first())\n {\n $this->unMatchedCollection->push($item);\n continue 2;\n }\n }\n\n\n }\n\n }",
"public function merge(PathCollection ...$pathCollections):PathCollection\n {\n return (clone $this)->appendCollections(...$pathCollections);\n }",
"private function attachCollection()\n {\n foreach ($this->routes as $route) {\n $options = [];\n $options['middlewares'] = $route->getMiddlewares();\n $name = $route->getName();\n if ($name) {\n $options['name'] = $name;\n }\n $handler = $route->getHandler();\n $pattern = $route->getPattern();\n $methods = $route->getHttpMethods();\n $this->collection->attach($methods, $pattern, $handler, $options);\n }\n }",
"public function test_can_merge_with_collection(): void {\n\t\t$initial_data = array( 1, 2, 3, 4 );\n\t\t$collection = Collection::from( $initial_data );\n\t\t$merge_collection = Collection::from( array( 5, 6, 7, 8, 9, 10 ) );\n\n\t\t$new_collection = $collection->merge( $merge_collection );\n\t\t$this->assertEquals( 1, $new_collection->to_array()[0] );\n\t\t$this->assertEquals( 2, $new_collection->to_array()[1] );\n\t\t$this->assertEquals( 3, $new_collection->to_array()[2] );\n\t\t$this->assertEquals( 4, $new_collection->to_array()[3] );\n\t\t$this->assertEquals( 5, $new_collection->to_array()[4] );\n\t\t$this->assertEquals( 6, $new_collection->to_array()[5] );\n\t\t$this->assertEquals( 7, $new_collection->to_array()[6] );\n\t\t$this->assertEquals( 8, $new_collection->to_array()[7] );\n\t\t$this->assertEquals( 9, $new_collection->to_array()[8] );\n\t\t$this->assertEquals( 10, $new_collection->to_array()[9] );\n\n\t\t// Check initial collection as is.\n\t\t$this->assertArrayNotHasKey( 5, $collection->to_array() );\n\t}",
"public static function registerMergeRoutes()\n {\n self::registerRoutes('merge');\n }",
"public function merge($collection) {\r\n\t\tif (is_object($collection) && $collection->count() > 0) {\r\n \t$this->collection = array_merge($this->collection, $collection->collection);\r\n\t\t}\r\n }",
"protected function mergeRouteGroups()\n\t{ \n\t\t$routes = $this->routes->getRoutes();\n\n\t\tforeach ($this->routeGroups as $key => $group)\n\t\t{\n\t\t\t// Spin through every route and merge the group filters onto the route.\n\t\t\tforeach ($group->getRoutes() as $route)\n\t\t\t{\n\t\t\t\t// If the group is nested within other groups we need to spin over those\n\t\t\t\t// groups and merge in those filters as well. This allows a filter\n\t\t\t\t// applied to an outer group be used on all routes within that\n\t\t\t\t// group, even if they are within other groups.\n\t\t\t\tif ($group->getGroupDepth() > 0)\n\t\t\t\t{\n\t\t\t\t\tfor ($i = count($this->routeGroups) - $group->getGroupDepth(); $i < count($this->routeGroups); ++$i)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->mergeGroupFilters($route, $this->routeGroups[$i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// After any outer group filters have been applied we can merge the\n\t\t\t\t// filters from the immediate parent group of the route. This is\n\t\t\t\t// so that outer group filters are run first, since they are\n\t\t\t\t// technically the first filters that are applied.\n\t\t\t\t$this->mergeGroupFilters($route, $group);\n\t\t\t}\n\n\t\t\t$routes = array_merge($routes, $group->getRoutes());\n\t\t}\n\n\t\t$this->routes = new RouteCollection;\n\n\t\tforeach ($routes as $name => $route)\n\t\t{\n\t\t\t$this->routes->add($route);\n\t\t}\n\n\t\t$this->routeGroups = array();\n\t}",
"public function merge(Collection $withAnotherCollection);",
"public function compareCollections() {\n foreach ($this->brafton_articles as $article) {\n $brafton_id = $article->getId();\n $this->linker = $this->storeConnection->getLinkArray();\n $existing_article = array_key_exists($brafton_id,$this->linker);\n if($existing_article==true) {\n $need_update = $this->checkForUpdate($this->storeConnection, $this->linker, $article, $brafton_id);\n }\n if(!$existing_article || $need_update){ //adding articles to array that either do not exist in the \n array_push($this->articles_to_post,$article); //Shopify store blog or exist, but require updating\n } else {\n echo '<span style=\"font-size:22px;display: block;text-align: center;\">Article '.$brafton_id.' already exists in blog </span><br />';\n }\n }\n return $this->articles_to_post; //returning list of new and or updated articles\n }",
"public function createRouteCollection(): RouteCollectionInterface;",
"public function merge(Collection $collection)\n\t{\n\t\t// return new Collection(array_merge($this->get(), $collection->get()));\n\n\t\treturn $this->add($collection->get());\n\n\t\t//Here, 'this' refers to the collection1\n\t}",
"public function canManipulateCollectionInOtherDatabaseByVia()\n {\n // Setup\n $users = $this->app->tests->users;\n\n // Create user \n $user = new \\Models\\Tests\\User('Bob');\n $users->save($user);\n\n // Check that user has no stored references\n $this->assertEquals(0, $user->blogposts->count());\n\n // Set collection of data\n $user->blogposts = $this->app->collection([\n new \\Models\\Tests\\BlogPost('Hello World 1'),\n new \\Models\\Tests\\BlogPost('Hello World 2'),\n new \\Models\\Tests\\BlogPost('Hello World 3')\n ]);\n $users->save($user);\n\n // Check that user has now has correct # of objects\n $this->assertEquals(3, $user->blogposts->count());\n\n // Pull user fresh from DB just to make sure references were saved on DB.\n $this->assertEquals(3, $users->find($user->id)->blogposts->count());\n }",
"public function merge(UsageCollection $Collection);",
"abstract protected function alterRoutes(RouteCollection $collection);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replaces the replation name for the given stub. | protected function replaceRelationName(&$stub, $name)
{
return $this->replaceTemplate('relation_name', $name, $stub);
} | [
"public function replaceNamespace(&$stub, $name);",
"private function _replaceName($stub)\n {\n $name = $this->getNameInput();\n // lloric code\n // Small case\n $stub = str_replace(\n 'dummy classes',\n str_replace('-', ' ', Str::slug(Str::plural($name))),\n $stub\n ); // llorics | lloric codes\n $stub = str_replace(\n 'dummy class',\n str_replace('-', ' ', Str::slug($name)),\n $stub\n ); // lloric | lloric code\n\n $stub = str_replace(\n 'dummyclasses',\n str_replace('-', '', Str::slug(Str::plural($name))),\n $stub\n ); // llorics | lloriccodes\n $stub = str_replace(\n 'dummyclass',\n str_replace('-', '', Str::slug($name)),\n $stub\n ); // lloric | lloriccode\n\n $stub = str_replace('dummy_classes', Str::snake(Str::plural($name)), $stub); // llorics | lloric_codes\n $stub = str_replace('dummy_class', Str::snake($name), $stub); // lloric | lloric_code\n\n $stub = str_replace('dummy-classes', Str::slug(Str::plural($name)), $stub); // llorics | lloric-codes\n $stub = str_replace('dummy-class', Str::slug($name), $stub); // lloric | lloric-code\n\n $stub = str_replace(\n 'dummy.classes',\n str_replace('-', '.', Str::slug(Str::plural($name))),\n $stub\n ); // llorics | lloric.codes\n $stub = str_replace(\n 'dummy.class',\n str_replace('-', '.', Str::slug($name)),\n $stub\n ); // lloric | lloric.code\n\n $stub = str_replace('dummyClasses', Str::camel(Str::plural($name)), $stub); // llorics | lloricCodes\n $stub = str_replace('dummyClass', Str::camel($name), $stub); // lloric | lloricCode\n // Big Cases\n $stub = str_replace('Dummy Classes', ucwords(Str::plural($name)), $stub); // Llorics | Lloric Codes\n $stub = str_replace(\n 'Dummy Class',\n ucwords(str_replace('-', ' ', Str::slug($name))),\n $stub\n ); // Lloric | Lloric Code\n\n $stub = str_replace('DummyClasses', ucfirst(Str::studly(Str::plural($name))), $stub); // Llorics | LloricCodes\n $stub = str_replace('DummyClass', ucfirst(Str::studly($name)), $stub); // Lloric | LloricCode\n return $stub;\n }",
"protected function replaceNamespace(string $stub): string\n {\n return $stub;\n }",
"protected function replaceName(&$stub, $name)\n {\n $title = ($this->group) ? $this->group . '.' . $name : $name;\n\n $stub = str_replace('SampleTitle', strtolower($name), $stub);\n $stub = str_replace('SampleViewTitle', strtolower(Str::snake($title, '-')), $stub);\n $stub = str_replace('SampleUCtitle', ucfirst(Str::studly($name)), $stub);\n\n $stub = ($this->group)\n ? str_replace('SampleModuleGroup', strtolower($this->group), $stub)\n : $this->removePrefixFromRoutes($stub);\n\n return $this;\n }",
"protected function replaceClass($stub, $name)\n {\n $stub = parent::replaceClass($stub, $name);\n\n return str_replace('DummyPayment', $this->argument('name'), $stub);\n }",
"final protected function replaceNameSpace(&$stub)\n {\n $nameSpace = ucwords(camel_case($this->namespace));\n $stub = str_replace('{{NameSpace}}', $nameSpace, $stub);\n return $this;\n }",
"protected function replaceAffirmMethod(&$stub, $name)\n {\n return $this->replaceTemplate('affirm_method', $name, $stub);\n }",
"private function populateStub($name, $stub)\n {\n return str_replace('DummyClass', $name, $stub);\n }",
"protected function replaceCallAffirm(&$stub, $name)\n {\n return $this->replaceTemplate('call_affirm', $name, $stub);\n }",
"protected function replaceClass($stub, $name)\n {\n $name = ucfirst($name);\n echo $name . PHP_EOL;\n echo $name . PHP_EOL;\n $class = str_replace($this->getNamespace($name).'\\\\', '', $name);\n\n\n $dummy = [\n 'DummyApiName',\n 'DummyApiPath',\n 'DummyClass',\n ];\n\n $reality = [\n lcfirst($this->getApiNameInput()),\n lcfirst($class),\n $class,\n ];\n\n\n return str_replace($dummy, $reality, $stub);\n }",
"protected function replaceRelation($stub, $relation)\n {\n return str_replace('RELATIONSHIP', $relation, $stub);\n }",
"protected function replacePackageName(&$stub)\n {\n return str_replace(\n ['DummyVendor', 'DummyPackageName'],\n [$this->vendorName(), $this->packageName()],\n $stub\n );\n }",
"protected function replaceClass($stub, $name)\n {\n $stub = str_replace('Dummy', $name, $stub);\n $stub = str_replace('dummy', lcfirst($name), $stub);\n return $stub;\n }",
"protected function replaceConstantName(&$stub, $name) {\n\t\t$stub = str_replace(['DUMMYCONSTANT'], [$name], $stub);\n\t\treturn $stub;\n\t}",
"protected function replaceTableNames(string &$stub)\n {\n $rolePermission = Config::get('laratrust.tables.permission_role');\n $this->replaceStubParameter($stub, 'permission_roleConfiguredTableName', $rolePermission);\n\n $permissionUser = Config::get('laratrust.tables.permission_user');\n $this->replaceStubParameter($stub, 'permission_userConfiguredTableName', $permissionUser);\n\n $roleUser = Config::get('laratrust.tables.role_user');\n $this->replaceStubParameter($stub, 'role_userConfiguredTableName', $roleUser);\n\n $rolesTable = Config::get('laratrust.tables.roles');\n $this->replaceStubParameter($stub, 'rolesTableName', $rolesTable);\n\n $permissionsTable = Config::get('laratrust.tables.permissions');\n $this->replaceStubParameter($stub, 'permissionsTableName', $permissionsTable);\n }",
"protected function replaceInterfaceName(&$stub, $namespace)\n {\n return $stub = str_replace(\n ['DummyInterfaceName'],\n $this->getInterfaceName($namespace),\n $stub\n );\n }",
"protected function replaceClass($stub, $name)\n {\n if(!$this->argument('name')){\n throw new InvalidArgumentException(\"Missing required argument repository name\");\n }\n\n $stub = parent::replaceClass($stub, $name);\n\n $loop = $this->getReplaceLoop();\n $stub = str_replace('DummyLoop,', $loop, $stub);\n\n return str_replace('DummyRoute', $this->routeName, $stub);\n }",
"protected function replaceClass($stub, $name)\n {\n return str_replace('dummy:command', $this->option('command'), parent::replaceClass($stub, $name));\n }",
"protected function replaceClass($stub, $name)\n {\n $stub = parent::replaceClass($stub, $name);\n return str_replace('DummyClass', $this->argument('name'), $stub);\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assign values from array with the field id as index and the value as value | public function assignByArray($array) {
$result=array();
foreach ($array as $fieldId=>$value) {
$result[self::$FIELD_NAMES[$fieldId]]=$value;
}
$this->assignByHash($result);
} | [
"function setValues($fld,$values){\n\t\t\t$x=0;\n\t\t\tforeach($fld as $name)\n\t\t\t{\n\t\t\t$update[] = $name.\"=\".$values[$x]; \n\t\t\t$x++;\n\t\t\t}\n\t\t\treturn $update;\n\t\t\n\t\t}",
"function addField(array $data, $field, $value)\n{\n foreach ($data as &$row) {\n $row[$field] = $value;\n }\n return $data;\n}",
"function setField($field) {\n $a = [];\n $a[0] = $field[0];\n $a[1] = $field[1];\n $a[2] = $field[2];\n setElement($a);\n $b = [];\n $b[0] = $field[3];\n $b[1] = $field[4];\n $b[2] = $field[5];\n setElement($b);\n $c = [];\n $c[0] = $field[6];\n $c[1] = $field[7];\n $c[2] = $field[8];\n setElement($c);\n }",
"public function assign($data) {\n $this->_records = array();\n foreach (PapayaUtilArray::ensure($data) as $id => $row) {\n $record = array();\n foreach ($row as $field => $value) {\n if (in_array($field, $this->_fieldMapping)) {\n $record[$field] = $value;\n }\n }\n $this->_records[$id] = $record;\n }\n $this->_recordCount = count($this->_records);\n }",
"function fill_array($array)\n\t{\n\t\t\tfor($z=0; $z <sizeof($array); $z++)\n\t\t\t{\n\t\t\t\t$this->addField($array[$z]['nombre'],$array[$z]['valor']);\n\t\t\t}\n\t}",
"private function _setFieldsToUpdateByArray($array)\n {\n\n $this->_fields = '';\n foreach ($array as $f => $v) {\n if ($this->_fields != '') {\n $this->_fields .= ', ';\n }\n $this->_fields .= $f . ' = :' . $f . '';\n $this->_binds[':' . $f] = $v;\n }\n }",
"protected function setValues()\n {\n $itemValues = $this->getEntity()->getItemFields();\n $valuesArray = array();\n foreach($itemValues as $valItemField) \n\t\t{ \n\t\t $fieldEntity = $valItemField->getField();\t\t\t\n\t\t\t\n switch ($fieldEntity->getType()) \n\t\t\t{\n\t\t\t\t\t\t \n case 'text':\n\t\t\t \n\t\t\tcase 'textarea':\n $value = $valItemField->getValue();\n break;\n\t\t\n\t\t\tcase 'pageselect':\n\t\t\t\n\t\t /*OLD METHOD STARTS*/ /*COMMENTED FOR TESTING*/\t\n\t\t\t//$value = unserialize($valItemField->getValue());\n\t\t\t//break;\n /*OLD METHOD ENDS*/\t\t\t\n\t\t\t\n\t\t\t//NEW METHOD IN PLACE STARTS 20 OCT 2014, 1:21 PM \n\t\t\t//print_r($valItemField->getPageId());\n\t\t // NEW METHOD IN PLACE STARTS 20 OCT 2014, 1:21 PM \n\t\t\t$value1 = $valItemField->getitemId();\n\t\t\tprint_r(\"Item Id :\");\n\t\t\tprint_r($this->getId());\n\t\t\tprint_r(\" \");\n\t\t\t/*\n\t\t\t//echo \"<br>\";\n\t\t\t//print_r(\"Page Id:\");\n\t\t\t//$value = $valItemField->getPageId();\t\t\t\n\t\t\t//print_r($value);\n\t\t\t//echo \"<br>\";\n\t\t\t//$result=array();\n\t\t\t//$result = $this->getDefaultEntityManager()->getRepository(‘DynamicListModule\\Entity\\DynamicListModulePages’)->findBy(array(‘itemId’ => $this->getId())); \n\t\t\t\t \n\t\t\t foreach($result as &$currentvalue)\n\t\t\t\t{\t\t\t\n\t\t\t\tprint_r(\"Page Id: \"); \n\t\t\t\tprint_r($currentvalue);\n $value=$valItemField->getItemsByPage();\t\t\t\t\n echo '<br/>';\n echo '<br/>';\t\n\t\t\t\t}\n\t\t\t */\t\t\t\n\t\t\tbreak;\n\t\t \n case 'multiselect':\n\t\t $value = unserialize($valItemField->getValue());\n\t\t\t\t $value1 = $valItemField->getitemId();\n\t\t\t print_r(\"Item Id :\");\n\t\t\t print_r($this->getId());\n\t\t\t print_r(\" \");\n\t\t\t\t//$result = $this->getDefaultEntityManager()->getRepository(‘DynamicListModule\\Entity\\DynamicListModulePages’)->findBy(array(‘itemId’ =>$this->getId())); \n\t\t\t\t//print_r($result);\n\t\t\t\tbreak;\t\t\t\n\t\t\t\t\t\n default:$value = unserialize($valItemField->getValue());\n break;\n }\n $valuesArray[$fieldEntity->getName()] = $value;\n }\n $this->values = $valuesArray;\n }",
"public function setValues(array $data)\n\t{\n\t\t$model = $this->getModel();\n\t\t$fields = $model->getFields();\n\t\t$fields = array_keys($fields);\n\t\t\n\t\t$max = $this->getCount();\n\t\t$this->_data = array();\n\t\t\n\t\t// load values from raw data\n\t\tforeach ($fields as $field)\n\t\t{\n\t\t\t// iterates through the field array values\n\t\t\tfor ($x = 0; $x < $max; $x++)\n\t\t\t{\n\t\t\t\t// verify if it exists on raw data\n\t\t\t\tif (isset($data[$field][$x]))\n\t\t\t\t{\n\t\t\t\t\t// set our data format\n\t\t\t\t\t$this->_data[$x][$field] = $data[$field][$x];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// remove empty fields from data\n\t\tforeach ($this->_data as $index => $group)\n\t\t{\n\t\t\t$this->_data[$index] = $model->removeEmptyKeys($group);\n\t\t}\n\t\t\n\t\t// finish\n\t\treturn $this;\n\t}",
"function arrayToField($arr,$field)\n\t{\n\t\t$result = array();\n\t\t\n\t\tforeach($arr as $curRow)\n\t\t{\n\t\t\t$result[] = $curRow[$field];\n\t\t}\n\t\treturn $result;\n\t}",
"function updateValues($arr) {\n foreach($this->element as $k=>$v) {\n $value = null;\n if ( isset($arr[$v->name]) ) {\n $value = $arr[$v->name];\n }\n $this->element[$k]->setValue( $value );\n }\n }",
"public function set()\n {\n $args = func_get_args();\n \n // object -> array\n \n if(is_object($args[0]))\n {\n $args[0] = (array) $args[0];\n }\n \n // adding\n \n if(is_array($args[0]))\n {\n foreach($args[0] as $field => $value)\n {\n $this->fields[$field] = $value;\n }\n }\n else\n {\n for($i = 0, $j = count($args); $i < $j; $i += 2)\n {\n $this->fields[$args[$i]] = $args[$i + 1];\n }\n }\n \n //--\n \n return $this;\n }",
"public function saveValue(array $field, $model): void {\n $model[$this->data->get('column')] = $field['value'];\n }",
"private function _setFieldsToInsertByArray($array)\n {\n\n $this->_fields = '';\n foreach ($array AS $k => $v) {\n if ($this->_fields != '') {\n $this->_fields .= ', ';\n $this->_values .= ', ';\n }\n $this->_values .= ':' . $k;\n $this->_fields .= $k;\n $this->_binds[':' . $k] = $v;\n }\n\n $this->_fields = ' (' . $this->_fields . ') VALUES (' . $this->_values . ')';\n }",
"public static function setArrayField($field_names, array $array, $value_key, $id_key='id')\r\n {\r\n self::log(\"args(field_names=\".self::pp($field_names).\", array=..., value_key=\".self::pp($value_key).\", id_key=\".self::pp($id_key).\")\", 1);\r\n if (is_array($field_names)) {\r\n // field_names is already an array\r\n foreach($field_names as $name) {\r\n self::setFieldArray($name, $array, $value_key, $id_key);\r\n }\r\n self::$console_indent--;\r\n } elseif (strpos($field_names, ',')!==false) {\r\n // field_names is comma-delimited\r\n $field_names = explode(',', $field_names);\r\n foreach($field_names as $name) {\r\n self::setFieldArray(trim($name), $array, $value_key, $id_key);\r\n }\r\n self::$console_indent--;\r\n } elseif ($field_names!='') {\r\n // assume field_names is one field\r\n foreach ($array as $row) {\r\n if (array_key_exists($value_key, $row) && array_key_exists($id_key, $row)) {\r\n self::$form[$field_names][$row[$id_key]] = $row[$value_key];\r\n }\r\n }\r\n self::$console_indent--;\r\n }\r\n }",
"private function getDateValuesForArray($arr){\n foreach($arr as $key=>$value){\n $value->es_index = $this->getDateValues($value->es_index);\n $arr[$key] = $value;\n }\n return $arr;\n }",
"public function SetValue( $fieldindex, $fieldval ) {\n\n\t // $this->m_a_fields[$index] = $fieldname;\n\t $this->m_a_values[$fieldindex] = $fieldval;\n\n\n }",
"function _set_values($id, &$results, &$table){ \n $results[$id]->title = $table['entry']['title']['$t'];\n \n $likes;\n if(isset($table['entry']['yt$rating']['numLikes'])){\n $results[$id]->likes = $table['entry']['yt$rating']['numLikes'];\n } else {\n $results[$id]->likes = 0;\n }\n \n $results[$id]->duration = $table['entry']['media$group']['yt$duration']['seconds'];\n $results[$id]->views = $table['entry']['yt$statistics']['viewCount'];\n $results[$id]->id = $id;\n }",
"function assignelem($collection, $ndx, $val) {}",
"public function getValues(array $fields);"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return class(AuthenticationResponseData) object with response data | private function createsAuthenticationResponseDataObject($response, $response_msg, $authentication_token = null, $patron_id = null){
$obj = new AuthenticationResponseDataType;
$obj->response = $response;
$obj->response_msg = $response_msg;
$obj->authentication_token = $authentication_token;
$obj->patron_id = $patron_id;
$auth_list = new SoapVar($obj,SOAP_ENC_OBJECT,null,null,'AuthenticationResponseDataType');
$data = new SoapVar($auth_list,SOAP_ENC_OBJECT,null,null,'ArrayAuthenticationResponseDataType');
return $data;
} | [
"public function getAuthDataFromResponse(): array;",
"public function getAuthenticationResponse() {\n }",
"public function getPayerAuthenticationResponse();",
"protected function getResponseData() {}",
"public function getResponseData() : ResponseDataInterface\n {\n return new GenericResponseData();\n }",
"public function getLoginData()\n {\n return $this->loginResponseData;\n }",
"public function getCardHolderAuthenticationData();",
"public function getResponseData () {}",
"private function prepareResponseData()\n {\n $responseData = [];\n $responseData['version'] = self::ALEXA_RESPONSE_VERSION;\n $response = [];\n\n //Check to see if a speech, card, or reprompt object are set and if so\n //add them to the data object\n if (!is_null($this->speech) && $this->speech instanceof OutputSpeech) {\n $response = $this->speech->toArray();\n }\n\n if (!is_null($this->card) && $this->card instanceof Card) {\n $response['card'] = $this->card->toArray();\n }\n\n if (!is_null($this->reprompt) && $this->reprompt instanceof Reprompt && trim($this->reprompt->getValue()) != \"\") {\n $response['reprompt'] = $this->reprompt->toArray();\n }\n\n if (!is_null($this->directives)) {\n foreach ($this->directives as $directive) {\n $response['directives'][] = $directive->toArray();\n }\n }\n\n if(!is_null($this->shouldSessionEnd)) {\n $response['shouldEndSession'] = $this->shouldSessionEnd;\n }\n\n $sessionAttributes = $this->getSessionData();\n $sessionAttributes = array_merge($sessionAttributes, $this->sessionAttributes);\n\n if ($sessionAttributes && count($sessionAttributes) > 0) {\n $responseData['sessionAttributes'] = $sessionAttributes;\n }\n\n $responseData['response'] = $response;\n\n return $responseData;\n }",
"public function getLoginResponse()\n {\n return $this->loginResponse;\n }",
"public function createAuthResponse()\n {\n $user = $this->getSecurityUser();\n if ($user) {\n $serialized = $this->authGenerator->generateFor($user);\n $serialized = $this->appendIdentityId($serialized);\n return new JsonResponse($serialized);\n }\n return $this->createDefaultAuthResponse();\n }",
"public function getAuthenticationDetails() {\n if(!$this->tokenHasExpired()) {\n return $this->tokenDetails;\n }\n\n $credentialType = $this->credentials[\"credential_type\"];\n\n switch ($credentialType) {\n case \"client_credentials\": \n $response = $this->getOauth2ClientCredentials($this->credentials[\"client_key\"],$this->credentials[\"client_secret\"]);\n break;\n case \"resource_owner\":\n if(array_key_exists(\"refresh_token\",$this->credentials)) {\n\n $response = $this->getOauth2ResourceOwnerCredentialsWithRefreshToken($this->credentials[\"client_key\"],\n $this->credentials[\"client_secret\"],\n $this->credentials[\"refresh_token\"]);\n } else {\n\n $response = $this->getOauth2ResourceOwnerCredentials($this->credentials[\"client_key\"],\n $this->credentials[\"client_secret\"],\n $this->credentials[\"username\"],\n $this->credentials[\"password\"]);\n }\n break;\n case \"api-key\": \n return array();\n break;\n default:\n throw new UnknownCredentialTypeException(\"Not sure what type : \".$credentialType);\n }\n\n if($response[\"http_code\"] != 200) {\n throw new \\Exception(\"Non 200 status code: \".$response[\"http_code\"].\"\\nCurlError: \".$response[\"curl_error\"].\"\\nResponse Body: \".$response[\"body\"].\"\\nHeaders: \".$response[\"header\"].\"\\n\".$response[\"last_url\"].\"\\nAdditional DebugInfo: \".$response[\"debugInfo\"]);\n }\n\n $this->tokenDetails = json_decode($response[\"body\"],true);\n\n $this->tokenDetails[\"sdk_expire_time\"] = time() + $this->tokenDetails[\"expires_in\"];\n\n return $this->tokenDetails;\n }",
"public function auth_data(){\n\n $seed = date('c');\n if (function_exists('random_bytes')) {\n $nonce = bin2hex(random_bytes(16));\n } elseif (function_exists('openssl_random_pseudo_bytes')) {\n $nonce = bin2hex(openssl_random_pseudo_bytes(16));\n } else {\n $nonce = mt_rand();\n }\n \n $nonceBase64 = base64_encode($nonce);\n $secretKey = $this->api_secretKey;\n $tranKey = base64_encode(sha1($nonce . $seed . $secretKey, true));\n $date_expiration = date('c', strtotime('+10 minute', strtotime($seed)));\n\n $body = [\"auth\" => [\n \"login\" => $this->api_login,\n \"tranKey\" => $tranKey,\n \"nonce\" => $nonceBase64,\n \"seed\" => $seed\n ] \n ];\n \n $arr_auth_data = ['auth' => $body, \n 'date_expiration' => $date_expiration];\n\n return $arr_auth_data;\n }",
"protected function parseDataFromResponse()\n {\n $content = $this->rawResponse->getBody();\n $config = new ServerSideEncryptionConfig();\n $config->parseFromXml($content);\n return $config;\n }",
"function getResponse() {\n $response = parent::getResponse();\n return $response->registerTokenResponse;\n }",
"protected function parseDataFromResponse()\n {\n $content = $this->rawResponse->body;\n $config = new ServerSideEncryptionConfig();\n $config->parseFromXml($content);\n return $config;\n }",
"public function getResponseObject ()\n\t{\n\t\treturn json_decode($this->responseJSON);\n\t}",
"public function getResponse()\n {\n return new \\OAuth2\\Response();\n }",
"public static function evalAuthInfo($data=array())\n {\n if (empty($data)) {\n return new EvalAuthInfo();\n } else {\n $obj = new EvalAuthInfo();\n\n $obj->type = empty($data['type']) ? null : $data['type'];\n $obj->code = empty($data['code']) ? null : $data['code'];\n $obj->message = empty($data['message']) ? null : $data['message'];\n $obj->livemode = empty($data['livemode']) ? null : $data['livemode'];\n $obj->mode_key = empty($data['mode_key']) ? null : $data['mode_key'];\n\n return $obj;\n }\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show the form for editing TimeEntry. | public function edit($id)
{
if (! Gate::allows('time_entry_edit')) {
return abort(401);
}
$work_types = \App\TimeWorkType::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');
$students = \App\Student::get()->pluck('identifier', 'id');
$created_bies = \App\User::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');
$created_by_teams = \App\Team::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');
$time_entry = TimeEntry::findOrFail($id);
return view('admin.time_entries.edit', compact('time_entry', 'work_types', 'students', 'created_bies', 'created_by_teams'));
} | [
"public function edit($id)\n {\n if (! Gate::allows('time_entry_edit')) {\n return abort(401);\n }\n \n $work_types = \\App\\TimeWorkType::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');\n $projects = \\App\\TimeProject::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');\n\n $time_entry = TimeEntry::findOrFail($id);\n\n return view('admin.time_entries.edit', compact('time_entry', 'work_types', 'projects'));\n }",
"public function showEditEntry()\n {\n $id = $this->request->get('id');\n\n $entry = $this->entries->byId($id);\n\n if (!$entry || $entry['user_id'] != $this->users->getCurrentUser()['id']) {\n // Got no valid ID, let's show the new entry form instead\n return null;\n }\n\n return $this->views->render('partials/entry-form', [\n 'action' => '/entry/update',\n 'title' => 'Edit your entry',\n 'id' => $id,\n 'body' => $entry['entry'],\n ]);\n }",
"private function createEditForm(time $entity)\n {\n $form = $this->createForm(new timeType(), $entity, array(\n 'action' => $this->generateUrl('time_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Aktualisieren'));\n\n return $form;\n }",
"public function editAction($id)\n {\n if (!$this->request->isPost()) {\n $timetype = TimeType::findFirstById($id);\n if (!$timetype) {\n $this->flash->error('Time type not found');\n return $this->dispatcher->forward([\"controller\" => \"timetype\", \"action\" => \"index\" ]);\n }\n\n $this->view->setVar('form', new TimeTypeForm($timetype, ['edit' => true]));\n }\n }",
"public function edit()\n {\n if (Entry::canCreateOrEdit() === false) {\n return Redirect::route('entry.index')\n ->withMessage(\"Sorry, the competition has now started and entries cannot be changed.\");\n }\n\n $entry = $this->getEntry();\n\n if ($entry) {\n return View::make('entry.edit')\n ->with('entry', $entry);\n }\n\n return Redirect::route('entry.index');\n }",
"public function editTimeEntry( $data = array() ) { \t\n\n $url = $this->_base_url . 'time_entries/' . $data['id'];\n $options['data']['time_entry'] = $data;\n \n $options['put'] = true;\n $this->_callAPI($url, $options);\n }",
"public function newAction()\n {\n $this->view->setVar('form', new TimeTypeForm(null, ['edit' => false]));\n }",
"public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MediaBundle:Clock')->find(1);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Clock entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n\n return array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n );\n }",
"private function createEditForm(Timing $entity)\n {\n $form = $this->createForm(new TimingType(), $entity, array(\n 'action' => $this->generateUrl('timing_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function edit_form()\n {\n return View::make(\"app.edit\");\n }",
"public function create()\n {\n if (! Gate::allows('time_entry_create')) {\n return abort(401);\n }\n \n $work_types = \\App\\TimeWorkType::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');\n $projects = \\App\\TimeProject::get()->pluck('name', 'id')->prepend(trans('quickadmin.qa_please_select'), '');\n\n return view('admin.time_entries.create', compact('work_types', 'projects'));\n }",
"public function actionClockEdit($id) { \n if( Yii::$app->request->post()) {\n //$this->refresh();\n $this->redirect(Yii::$app->urlManager->createUrl('/admin/clocks'));\n }\n return $this->render('clock-edit',[\n 'id' => $id\n ]);\n }",
"function edit_event($id)\n\t{\n\t\tif (!$id) redirect('/admin/calendar');\n\t\t$event = $this->event_model->get_event_by_event_time_id($id);\n\n\t\t$widgets = array(\n\t\t\t\"start_time_widget\" => $this->get_time_widget('time_start', strtotime($event->start_time)),\n\t\t\t\"end_time_widget\" => $this->get_time_widget('time_end', strtotime($event->end_time)),\n\t\t\t\"audience_select\" => $this->get_audience_select($event->audiences_id),\n\t\t\t\"category_select\" => $this->get_category_select($event->categories_id),\n\t\t\t\"venue_select\" => $this->get_venues_select($event->venues_id),\n\t\t\t\"event\"\t=> $event\n\t\t\t);\n\t\t$this->gen_page('Admin - Event', 'admin/calendar/event_add', $widgets );\n\t}",
"public static function edit_form()\n {\n $user = Users::findOne($_SESSION['user']);\n\n View::make('user/edit.html', array('user' => $user));\n }",
"protected function _editForm()\n\t{\n\t\t$this->_resetModerator( $this->topic['forum_id'] );\n\t\t\n\t\t$this->_genericPermissionCheck( 'edit_topic' );\n\t\t\t\t\t\t\t\t\n\t\t$this->output .= $this->registry->getClass('output')->getTemplate('mod')->editTopicTitle( $this->forum, $this->topic );\n\n\t\t$navigation = $this->registry->getClass('class_forums')->forumsBreadcrumbNav( $this->forum['id'] );\n\t\t\n\t\tif( is_array( $navigation ) AND count( $navigation ) )\n\t\t{\n\t\t\tforeach( $navigation as $_id => $_nav )\n\t\t\t{\n\t\t\t\t$this->registry->getClass('output')->addNavigation( $_nav[0], $_nav[1], $_nav[2], $_nav[3] );\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$this->registry->getClass('output')->addNavigation( $this->topic['title'], \"showtopic={$this->topic['tid']}\", $this->topic['title_seo'], 'showtopic' );\n\t\t$this->registry->getClass('output')->setTitle( $this->lang->words['t_edit'].\": \".$this->topic['title'] . ' - ' . ipsRegistry::$settings['board_name']);\n\t}",
"public function edit()\n {\n $weekly_timeslots = WeeklyTimeslot::orderBy('id', 'asc')->get();\n return view('ims.weekly_timeslots.edit', compact('weekly_timeslots'));\n }",
"abstract protected function timepickerField();",
"public function ns_task_edit_page() {\n\t\tglobal $task;\n\t\t\n\t\t$task_id = $this->sanitize( $_GET, 'edit' );\n\t\t/**\n\t\t * @var WP_Post $task\n\t\t */\n\t\t$task = get_post( $task_id );\n\t\tif ( $task instanceof WP_Error || $task->post_type !== $this->task_type || ! empty( get_post_meta( $task->ID, '_private', true ) ) ) {\n\t\t\twp_redirect( admin_url( 'index.php?page=ns-dashboard' ) );\n\t\t}\n\t\t\n\t\t$this->get_template( 'client-tasks-edit' );\n\t}",
"private function editForm()\n {\n $m = $this->getViewModel();\n\n $blog = $m->blog;\n\n $m->isApprover = true; // isApprover()\n\n $stylelist = BlogView::getStyleList();\n\n $id = $blog->id;\n \n \n if ($m->revid === 0) {\n $m->revid = intval($blog->revision);\n }\n\n $m->revision = BlogRevision::findFirst('blog_id='.$id.' and revision='.$m->revid);\n \n // submit choices\n $m->rev_list = [\n 'Save' => 'Save',\n 'Revision' => 'Save as new revision',\n ];\n\n $m->title = '#' . $id;\n $m->stylelist = $stylelist;\n $m->catset = BlogView::getCategorySet($id);\n $m->events = BlogView::getEvents($id);\n $m->metatags = BlogView::getMetaTags($id);\n $m->content = $m->url = $this->url;\n\n return $this->render('blog', 'edit');\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ method : Get params : vehicleId retrun : driver Array comment : used for fetching single row while updating status | public function fetchSingleUpdatedRecord( $vehicleId = null ) {
$this->db->DISTINCT();
$this->db->select('CONCAT(concat( drivers.first_name, " ", `drivers`.`last_name` )," + ", concat(team.first_name," ",team.last_name)) AS teamDriverName , vehicles.id,vehicles.label, CONCAT(users.first_name," ",users.last_name) AS dispatcher, vehicles.vin, vehicles.model, vehicles.vehicle_type,vehicles.vehicle_status,vehicles.cargo_bay_l, vehicles.cargo_capacity,concat(drivers.first_name," ",drivers.last_name) as driverName,GROUP_CONCAT(equipment_types.name) as vehicleType',FALSE);
$this->db->join('drivers','drivers.id=vehicles.driver_id','LEFT');
$this->db->join('equipment_types',("FIND_IN_SET(equipment_types.abbrevation , vehicles.vehicle_type) > 0"), 'LEFT');
$this->db->join('users',("drivers.user_id = users.id"), 'LEFT');
$this->db->join('drivers as team','vehicles.team_driver_id = team.id','left');
$this->db->where('vehicles.id',$vehicleId);
$this->db->Group_by('vehicles.id');
$result = $this->db->get('vehicles');
if($result->num_rows()>0){
return $result->row_array();
} else {
return false;
}
} | [
"public function updateVehicleInfo()\n {\n $ajax_data = array();\n $post = $this->request->request->all();\n \t$unit_id = $post['primary_keys']['vehiclePk'];\n $params = array();\n $table = '';\n\n switch ($post['id']) {\n case 'vehicle-status':\n $params['unitstatus_id'] = $post['value'];\n $table = 'unit';\n break;\n case 'vehicle-name':\n $params['unitname'] = $post['value'];\n $table = 'unit';\n break;\n case 'vehicle-vin':\n $params['vin'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-make':\n $params['make'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-model':\n $params['model'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-year':\n $params['year'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-color':\n $params['color'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-stock':\n $params['stocknumber'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-license-plate':\n $params['licenseplatenumber'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-loan-id':\n $params['loannumber'] = $post['value'];\n $table = 'unitattribute';\n break;\n case 'vehicle-install-date':\n $params['user_timezone'] = $this->user_session->getUserTimeZone();\n $params['installdate'] = $post['value'];\n $table = 'unitinstallation';\n break;\n case 'vehicle-installer':\n $params['installer'] = $post['value'];\n $table = 'unitinstallation';\n break;\n case 'vehicle-install-mileage':\n $params['unitodometer_id'] = ! empty($post['primary_keys']['vehicleOdometerId']) ? $post['primary_keys']['vehicleOdometerId'] : 0;\n $params['initialodometer'] = $post['value'];\n $table = 'unitodometer';\n break;\n default:\n break;\n }\n\n if (! empty($params) AND ! empty($unit_id)) {\n $update = $this->vehicle_logic->updateVehicleInfo($unit_id, $params, $table);\n if ($update !== false) {\n\t $ajax_data['data'] = $post;\n\t // if a unit didn't have a unitodometer record before and one was created for it, \n\t // pass back the unitodometer id to be updated in the vehicle info (needed for inline-editing)\n\t if (isset($params['unitodometer_id'])) {\n\t if ($params['unitodometer_id'] == 0) {\n \t $ajax_data['data']['unitodometer_id'] = $update; \n \t }\n \t // strip out any leading zeroes\n \t $ajax_data['data']['value'] = ltrim($post['value'], '0');\n\t }\n $ajax_data['code'] = 0;\n $ajax_data['message'] = 'Updated Vehicle Information';\n } else {\n $ajax_data['code'] = 1;\n $errors = $this->vehicle_logic->getErrorMessage();\n if (! empty($errors) AND is_array($errors)) {\n $errors = implode(', ',$errors);\n } else {\n $errors = 'Action failed due to database issue';\n }\n \n $ajax_data['validation_error'][] = $ajax_data['message'] = $errors;\n }\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Error';\n }\n \n if($ajax_data['data']['value']==0)\n {\n\t $ajax_data['data']['value']='0';\n }\n\n $this->ajax_respond($ajax_data);\n }",
"public function changeStatus( $vehicleId = null, $status = null )\n\t{\n\t\ttry{\n\n\t\t\t$requestedStatus = ($status == 1) ? \"Deactivated\" : \"Activated\";\n\t\t\t$result = $this->vehicle->changeDriverStatus($vehicleId, $status);\n\t\t\tif ( $result ) {\n\t\t\t\t$status = true;\n\t\t\t} else {\n\t\t\t\t$status = false;\n\t\t\t}\n\t\t\t\n\t\t\t$data['rows'] = $this->vehicle->fetchSingleUpdatedRecord($vehicleId);\n\t\t\t$vehicleTypeArray = array();\n\t\t\tif ( $data['rows']['vehicle_type'] != '' ) {\n\t\t\t\t$vehicleTypes = explode(',',$data['rows']['vehicle_type']);\n\t\t\t\t$temp = array();\n\t\t\t\tforeach ( $vehicleTypes as $vType ) {\n\t\t\t\t\t$vDescription = str_replace(',',' ',$this->Job->getRelatedEquipment($vType));\n\t\t\t\t\t$temp['abbrevation'] = $vType;\n\t\t\t\t\t$temp['name'] = $vDescription;\n\t\t\t\t\tarray_push($vehicleTypeArray,$temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data['rows']['vehicle_type'] = $vehicleTypeArray;\n\t\t\t$message = '<span class=\"blue-color uname\">'.ucfirst($this->userName).\"</span> changed the status to <i>\".$requestedStatus.'</i> of vehicle <a class=\"notify-link\" href=\"'.$this->serverAddr.'#/editTruck/'.$vehicleId.'\"> Truck - '.$data['rows'][\"label\"].'</a>';\n\t\t\tlogActivityEvent($vehicleId, $this->entity[\"truck\"], $this->event[\"status_change\"], $message, $this->Job);\t\n\t\t\techo json_encode(array('records' => $data, 'status' => $status ));\n\t\t}catch(Exception $e){\n\t\t\tlog_message('error','CHANGE_VEHICLE_STATUS'.$e->getMessage());\n\t\t\techo json_encode(array('success' => false));\n\t\t}\n\t}",
"public function getVehicleById(){\n\t\tif($this->input->post('vehicleId')){\n\t\t\t$data['vehicles']=array();\n\n\t\t\t$tbl_vehicle=$this->session->userdata('prefix').'vehicles';\n\t\t\t$tbl_transport=$this->session->userdata('prefix').'transport';\n\t\t\t$data='*,'.$tbl_vehicle.'.name as vehicle_name, '.$tbl_transport.'.name as driver';\n\t\t\t$join=array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t'table'=>$tbl_transport,\n\t\t\t\t\t\t'condition'=>$tbl_vehicle.'.id_transport='.$tbl_transport.'.id_transport',\n\t\t\t\t\t\t'type'=>'inner'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t$where=array($tbl_vehicle.'.id_vehicle'=>$this->input->post('vehicleId'));\n\t\t\t// get the db tables list\n\t\t\t$tableList=getTables(); // define in custom helper\n\t\t\t// check if the tbl exist in db \n\t\t\tif(in_array($tbl_vehicle, $tableList) and in_array($tbl_transport, $tableList)){\n\t\t\t\t$vdata['vehicles']=$this->Common_model->select_fields_where_like_join($tbl_vehicle, $data, $join, $where);\n\t\t\t} \n\t\t\t$this->load->view('vehicle/vehicle_list',$vdata);\n\t\t} // end of outer if\n\t}",
"function update_car_detail($car_id,$params)\n {\n try{\n $this->db->where('car_id',$car_id);\n return $this->db->update('car_detail',$params);\n } catch (Exception $ex) {\n throw new Exception('Car_detail_model model : Error in update_car_detail function - ' . $ex);\n } \n }",
"public function fetchSingleUpdatedRecord( $driverId = null ) {\n\t\t$this->db->select('drivers.first_name,drivers.last_name,drivers.phone,drivers.email,drivers.driver_license_number,drivers.id,drivers.status, CONCAT(users.first_name, \" \", users.last_name) AS dispatcher, vehicles.label,vehicles.id as vehicle_id');\n\t\t$this->db->join('vehicles','vehicles.driver_id = drivers.id','LEFT');\n\t\t$this->db->join('users','drivers.user_id = users.id','LEFT');\n\t\t$this->db->where('drivers.id',$driverId); \n\t\t$query = $this->db->get('drivers');\n\t\tif ($query->num_rows() > 0) {\n return $query->row_array();\n } else {\n return false;\n }\n\n\t}",
"function getVehicleStatus($vin,$VehicleName) {\n // needed: set the active vehicle to our current VIN:\n $requestActiveVehicle = $GLOBALS['$client']->put(\"/api/vehicle\",[\n 'headers' => [\n 'Authorization' => 'Bearer '.$GLOBALS['AuthToken'],\n ],\n 'json' => ['active_vehicle' => $vin],\n 'cookies' => $GLOBALS['cookieJar'],\n 'debug' => false\n ]);\n // get current battery-status:\n $BatteryResponse = $GLOBALS['$client']->request('GET', '/api/vehicle/'.$vin.'/battery', [\n 'headers' => [\n 'Authorization' => 'Bearer '.$GLOBALS['AuthToken'],\n 'Content-Type' => 'application/json',\n ],\n 'cookies' => $GLOBALS['cookieJar'],\n 'debug' => false\n ]);\n $rawData = json_decode($BatteryResponse->getBody(),true);\n\n // get data about previous and next charge:\n $SiblingsResponse = $GLOBALS['$client']->request('GET', '/api/vehicle/'.$vin.'/charge/siblings', [\n 'headers' => [\n 'Authorization' => 'Bearer '.$GLOBALS['AuthToken'],\n 'Content-Type' => 'application/json',\n ],\n 'cookies' => $GLOBALS['cookieJar'],\n 'debug' => false\n ]);\n\n $rawData += json_decode($SiblingsResponse->getBody(),true);\n // assemble the missing parts:\n $rawData['VehicleName'] = $VehicleName;\n // pass the array back since we modify it further!\n return $rawData;\n}",
"public function saveVehicleDriver( $driverId = null, $vehicleId = null, $userId = null, $status = '') {\n\t\t\n\t\tif ( $status == 'save' ) {\n\t\t\t$data = array(\n\t\t\t\t'vehicle_id' => $vehicleId,\n\t\t\t\t'driver_id' => $driverId,\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'status' => 1,\n\t\t\t\t'created' => date('Y-m-d H:i:s')\n\t\t\t);\n\t\t\t\t\n\t\t\t$this->db->insert('vehicle_drivers',$data);\n\t\t} else {\n\t\t\t$this->db->select('id,status');\n\t\t\t$condition = array('vehicle_id' => $vehicleId, 'driver_id' => $driverId, 'user_id' => $userId);\n\t\t\t$this->db->where($condition);\n\t\t\t$result = $this->db->get('vehicle_drivers');\n\t\t\t\n\t\t\tif ( $result->num_rows() > 0 ) {\n\t\t\t\t$finalRes = $result->row_array(); \n\t\t\t\t//if ( $finalRes['status'] == \n\t\t\t\t$data = array(\n\t\t\t\t\t'vehicle_id' => $vehicleId,\n\t\t\t\t\t'driver_id' => $driverId,\n\t\t\t\t\t'user_id' => $userId,\n\t\t\t\t);\n\t\t\t\t$this->db->where('id',$finalRes['id']);\n\t\t\t\t$this->db->update('vehicle_drivers',$data);\n\t\t\t} else {\n\t\t\t\t$data = array(\n\t\t\t\t\t'vehicle_id' => $vehicleId,\n\t\t\t\t\t'driver_id' => $driverId,\n\t\t\t\t\t'user_id' => $userId,\n\t\t\t\t\t'status' => 1,\n\t\t\t\t\t'created' => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->db->insert('vehicle_drivers',$data);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function updateStatus($vid) {\n global $db_conn;\n $vid = \"'\" . $vid . \"'\";\n executePlainSQL(\"UPDATE Vehicle SET status = 'rented' WHERE vid = \" . $vid);\n OCICommit($db_conn);\n }",
"public function updateVehicle($params);",
"public function actiongetdraftvehiclebyid() {\n\n if (Yii::app()->request->getParam('key') != API_KEY) {\n echo \"Invalid api key\";\n die();\n }\n\n $api_token = Yii::app()->request->getParam('api_token');\n $t1 = Yii::app()->request->getParam('t1');\n $t2 = Yii::app()->request->getParam('t2');\n $user_type = Yii::app()->request->getParam('user_type');\n $user_id = Yii::app()->request->getParam('user_id');\n\n $token_check = $this->verifyapitoken($api_token, $t1, $t2, $user_type, $user_id, AES256CBC_API_PASS);\n\n if (!$token_check) {\n $json = array(\n 'result' => 'false',\n 'response' => 'Invalid request'\n );\n echo json_encode($json);\n die();\n }\n\n $result = 'false';\n $response = 'Pass the required parameters';\n\n $vehicle_id = Yii::app()->request->getParam('vehicle_id');\n $wash_request_id = Yii::app()->request->getParam('wash_request_id');\n $action = '';\n $action = Yii::app()->request->getParam('action');\n $zipcode = '';\n if (Yii::app()->request->getParam('zipcode'))\n $zipcode = Yii::app()->request->getParam('zipcode');\n $exp_surge_factor = 0;\n $del_surge_factor = 0;\n $prem_surge_factor = 0;\n $zipcode_price_factor = 0;\n $coveragezipcheck = 0;\n $vehicle = array();\n if ((isset($vehicle_id) && !empty($vehicle_id))) {\n\n if (AES256CBC_STATUS == 1) {\n $wash_request_id = $this->aes256cbc_crypt($wash_request_id, 'd', AES256CBC_API_PASS);\n }\n $vehicle_exists = CustomerDraftVehicle::model()->findByAttributes(array(\"id\" => $vehicle_id));\n if (count($vehicle_exists) > 0) {\n $result = 'true';\n $response = 'Vehicle details';\n\n $cust_exists = Customers::model()->findByAttributes(array(\"id\" => $vehicle_exists->customer_id));\n $wash_request_exists = Washingrequests::model()->findByAttributes(array(\"id\" => $wash_request_id));\n\n $surgeprice = Yii::app()->db->createCommand()->select('*')->from('surge_pricing')->where(\"day='\" . strtolower(date('D')) . \"'\", array())->queryAll();\n//$zipcodeprice = Yii::app()->db->createCommand()->select('*')->from('zipcode_pricing')->where(\"id='1'\", array())->queryAll();\n\n if ($zipcode) {\n\n $coveragezipcheck = CoverageAreaCodes::model()->findByAttributes(array('zipcode' => $zipcode));\n /* if(count($coveragezipcheck)){\n\n if($coveragezipcheck->zip_color == 'yellow'){\n $zipcode_price_factor = $zipcodeprice[0]['yellow'];\n }\n\n if($coveragezipcheck->zip_color == 'red'){\n $zipcode_price_factor = $zipcodeprice[0]['red'];\n }\n\n if($coveragezipcheck->zip_color == ''){\n $zipcode_price_factor = $zipcodeprice[0]['blue'];\n }\n\n if($zipcodeprice[0]['price_unit'] == 'percent'){\n $exp_surge_factor += $zipcode_price_factor;\n $del_surge_factor += $zipcode_price_factor;\n $prem_surge_factor += $zipcode_price_factor;\n }\n\n } */\n }\n\n $exp_surge_factor += $surgeprice[0]['express'];\n $del_surge_factor += $surgeprice[0]['deluxe'];\n $prem_surge_factor += $surgeprice[0]['premium'];\n\n\n $wash_price = 0;\n $washing_plan_det = Washingplans::model()->findByAttributes(array(\"vehicle_type\" => $vehicle_exists->vehicle_type, \"title\" => $vehicle_exists->wash_package));\n if ($vehicle_exists->package_price) {\n $wash_price = $vehicle_exists->package_price;\n } else {\n $wash_price = $washing_plan_det->price;\n }\n\n if (count($coveragezipcheck)) {\n\n if ($coveragezipcheck->zip_color == 'yellow') {\n $wash_price = $washing_plan_det->tier2_price;\n }\n\n if ($coveragezipcheck->zip_color == 'red') {\n $wash_price = $washing_plan_det->tier3_price;\n }\n\n if ($coveragezipcheck->zip_color == 'purple') {\n $wash_price = $washing_plan_det->tier4_price;\n }\n }\n\n\n\n /* if((count($zipcodeprice)) && ($zipcodeprice[0]['price_unit'] == 'usd')){\n $wash_price += $zipcode_price_factor;\n $wash_price = (string) $wash_price;\n } */\n\n if ($vehicle_exists->wash_package == 'Express') {\n\n $wash_price = $wash_price + ($wash_price * ($exp_surge_factor / 100));\n }\n\n if ($vehicle_exists->wash_package == 'Deluxe') {\n //$wash_price += $surgeprice[0]['deluxe'];\n //$wash_price = (string) $wash_price;\n $wash_price = $wash_price + ($wash_price * ($del_surge_factor / 100));\n }\n\n if ($vehicle_exists->wash_package == 'Premium') {\n\n $wash_price = $wash_price + ($wash_price * ($prem_surge_factor / 100));\n }\n\n $car_price_agent = 0;\n $total_car_price = 0;\n $total_car_price_agent = 0;\n $bundle_fee = 0;\n $bundle_fee_agent = 0;\n $fifth_fee = 0;\n $first_fee = 0;\n $total_cars = 0;\n $fifth_points = $cust_exists->fifth_wash_points;\n\n if ($wash_request_exists->id) {\n $car_arr = explode(\",\", $wash_request_exists->car_list);\n $total_cars = count($car_arr);\n }\n\n foreach ($car_arr as $carid) {\n $veh_check = Vehicle::model()->findByAttributes(array(\"id\" => $carid));\n if ($veh_check->status != 6) {\n $fifth_points ++;\n if ($fifth_points > 5)\n $fifth_points = 1;\n }\n }\n\n\n\n if ($vehicle_exists->wash_package == 'Express')\n $car_price_agent = number_format($wash_price * .80, 2, '.', '');\n if ($vehicle_exists->wash_package == 'Deluxe')\n $car_price_agent = number_format($wash_price * .80, 2, '.', '');\n if ($vehicle_exists->wash_package == 'Premium')\n $car_price_agent = number_format($wash_price * .75, 2, '.', '');\n\n $total_car_price += $wash_price;\n $total_car_price += 1; //handling fee\n $total_car_price += $vehicle_exists->pet_hair;\n $total_car_price += $vehicle_exists->lifted_vehicle;\n $total_car_price += $vehicle_exists->exthandwax_addon;\n $total_car_price += $vehicle_exists->extplasticdressing_addon;\n $total_car_price += $vehicle_exists->extclaybar_addon;\n $total_car_price += $vehicle_exists->waterspotremove_addon;\n $total_car_price += $vehicle_exists->upholstery_addon;\n $total_car_price += $vehicle_exists->floormat_addon;\n\n if ($action == 'edit_vehicle') {\n if ($fifth_points == 5) {\n $fifth_fee = 5;\n $total_car_price -= $fifth_fee;\n }\n } else {\n if ($fifth_points == 4) {\n $fifth_fee = 5;\n $total_car_price -= $fifth_fee;\n }\n }\n\n\n /* if(!$cust_exists->is_first_wash && (!$total_cars)) {\n if($vehicle_exists->wash_package == 'Premium') $first_fee = 10;\n else $first_fee = 5;\n $total_car_price -= $first_fee;\n } */\n\n if ($action == 'edit_vehicle') {\n if ($total_cars > 1 && (!$fifth_fee) && ($wash_request_exists->coupon_discount <= 0)) {\n $bundle_fee = 1;\n $total_car_price -= $bundle_fee;\n }\n } else {\n if ($total_cars > 0 && (!$fifth_fee) && ($wash_request_exists->coupon_discount <= 0)) {\n $bundle_fee = 1;\n $total_car_price -= $bundle_fee;\n }\n }\n\n\n $total_car_price_agent += $car_price_agent;\n $total_car_price_agent += $vehicle_exists->pet_hair * .80;\n $total_car_price_agent += $vehicle_exists->lifted_vehicle * .80;\n $total_car_price_agent += $vehicle_exists->exthandwax_addon * .80;\n $total_car_price_agent += $vehicle_exists->extplasticdressing_addon * .80;\n $total_car_price_agent += $vehicle_exists->extclaybar_addon * .80;\n $total_car_price_agent += $vehicle_exists->waterspotremove_addon * .80;\n $total_car_price_agent += $vehicle_exists->upholstery_addon * .80;\n $total_car_price_agent += $vehicle_exists->floormat_addon * .80;\n\n\n if ($action == 'edit_vehicle') {\n if ($total_cars > 1) {\n $bundle_fee_agent = number_format(.80, 2, '.', '');\n $total_car_price_agent -= $bundle_fee_agent;\n }\n } else {\n if ($total_cars > 0) {\n $bundle_fee_agent = number_format(.80, 2, '.', '');\n $total_car_price_agent -= $bundle_fee_agent;\n }\n }\n\n\n $wash_time = $washing_plan_det->wash_time;\n if ($vehicle_exists->pet_hair > 0)\n $wash_time += 5;\n if ($vehicle_exists->lifted_vehicle > 0)\n $wash_time += 5;\n if ($vehicle_exists->exthandwax_addon > 0)\n $wash_time += 10;\n if ($vehicle_exists->extplasticdressing_addon > 0)\n $wash_time += 5;\n if ($vehicle_exists->extclaybar_addon > 0)\n $wash_time += 15;\n if ($vehicle_exists->waterspotremove_addon > 0)\n $wash_time += 10;\n if ($vehicle_exists->upholstery_addon > 0)\n $wash_time += 10;\n if ($vehicle_exists->floormat_addon > 0)\n $wash_time += 10;\n\n $hours = floor($wash_time / 60);\n $minutes = ($wash_time % 60);\n\n if ($hours < 1) {\n $washtime_str = sprintf('%02d min', $minutes);\n } else {\n if ($hours == 1) {\n if ($minutes > 0)\n $washtime_str = sprintf('%d hour %02d min', $hours, $minutes);\n else\n $washtime_str = sprintf('%d hour', $hours);\n }\n else {\n if ($minutes > 0)\n $washtime_str = sprintf('%d hours %02d min', $hours, $minutes);\n else\n $washtime_str = sprintf('%d hours', $hours);\n }\n }\n\n\n\n $vehicle = array(\n 'vehicle_no' => $vehicle_exists->vehicle_no,\n 'brand_name' => $vehicle_exists->brand_name,\n 'model_name' => $vehicle_exists->model_name,\n 'vehicle_image' => $vehicle_exists->vehicle_image,\n 'vehicle_type' => $vehicle_exists->vehicle_type,\n 'vehicle_category' => $vehicle_exists->vehicle_category,\n 'vehicle_build' => $vehicle_exists->vehicle_build,\n 'wash_package' => $vehicle_exists->wash_package,\n 'package_price' => number_format($wash_price, 2),\n \"total_price\" => number_format($total_car_price, 2),\n \"price_agent\" => $car_price_agent,\n \"total_price_agent\" => number_format($total_car_price_agent, 2),\n 'pet_hair' => number_format($vehicle_exists->pet_hair, 2),\n 'lifted_vehicle' => number_format($vehicle_exists->lifted_vehicle, 2),\n 'exthandwax_addon' => number_format($vehicle_exists->exthandwax_addon, 2),\n 'extplasticdressing_addon' => number_format($vehicle_exists->extplasticdressing_addon, 2),\n 'extclaybar_addon' => number_format($vehicle_exists->extclaybar_addon, 2),\n 'waterspotremove_addon' => number_format($vehicle_exists->waterspotremove_addon, 2),\n 'upholstery_addon' => number_format($vehicle_exists->upholstery_addon, 2),\n 'floormat_addon' => number_format($vehicle_exists->floormat_addon, 2),\n \"handling_fee\" => '1.00',\n \"bundle_discount\" => number_format($bundle_fee, 2),\n \"bundle_discount_agent\" => number_format($bundle_fee_agent, 2),\n \"fifth_wash_discount\" => number_format($fifth_fee, 2),\n \"first_wash_discount\" => number_format($first_fee, 2),\n 'wash_time' => $wash_time,\n \"wash_time_str\" => $washtime_str\n );\n }else {\n $response = \"Invalid vehicle\";\n }\n }\n\n $json = array(\n 'result' => $result,\n 'response' => $response,\n 'vehicle' => $vehicle\n );\n echo json_encode($json);\n }",
"function update_car_make($id,$params)\r\n {\r\n $this->db->where('id',$id);\r\n return $this->db->update('car_make',$params);\r\n }",
"public function update_Contacts($cus_id) {\n $sql = \"select\nv.owner,\nv.ownerConNo,\nv.ownerEmail,\nv.vehicle_id,\nv.owner_id\nfrom\ntbl_vehicle_owner as v\ninner join\ntbl_customer as c on c.cust_vehicle_owner= v.owner_id\nwhere\nv.status = 1 and c.customer_id ='$cus_id'\";\n //echo $sql;\n return $this->db->mod_select($sql);\n }",
"function update_tbl_car($id_car,$params)\n {\n $this->db->where('id_car',$id_car);\n return $this->db->update('tbl_car',$params);\n }",
"public function actionAddVehicleCommentInd(){\t \n\t date_default_timezone_set(\"Europe/London\");\n\t \n\t // Gets basic vehicle info used in the save\n\t $vehicle = Vehicles::model()->getBasicInfo($_POST['vehicle_id']);\n\t \n\t // Adds the vehicle comment\n\t $vC = new VehicleComments();\n\t $vC->added_by = Yii::app()->user->id;\n\t $vC->comment = $_POST['comment'];\n\t $vC->date_added = date(\"Y-m-d H:i:s\");\n\t $vC->vehicle_id = $_POST['vehicle_id'];\n\t $vC->make_model_id = $vehicle['make_model_id'];\n\t $vC->save();\n\t}",
"function getLeadStatus($id,$lead_type)\r\r\n {\r\r\n $objLeads_submit = ORM::factory('leadsubmit');\r\r\n $resultset = $objLeads_submit->select('tbl_client.vUsername')->join('tbl_client','left')->on('tbl_lead_submit.client_id', '=','tbl_client.iClient_id')->where('lead_types','=',$lead_type)->where('lead_id',\"=\",$id)->find_all();\r\r\n foreach($resultset as $key=>$value){ \r\r\n\t\t$client_name = '<strong>'.$value->vUsername.'</strong>';\r\r\n if($value->post_response=='Success')\r\r\n echo \"<a class='tag blue' >\".$client_name.\"-$\".$value->price.\"</a>\";\r\r\n else\r\r\n echo \"<a class='tag red' >\".$client_name.\"</a>\";\r\r\n }\r\r\n // echo Database::instance()->last_query;\r\r\n //return $id;\r\r\n }",
"function getVehicleReviews($invId) {\n $db = phpmotorsConnect();\n $sql = 'SELECT \n * \n FROM \n reviews \n WHERE \n invId = :invId\n ORDER BY\n reviewDate DESC';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':invId', $invId, PDO::PARAM_INT);\n $stmt->execute();\n $reviews = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $reviews;\n}",
"public function vehicleInformation($params)\n {\n $report_params = $units = array();\n\n $data = array(\n 'report' => array(\n 'title' => $params['report_name'],\n 'report_type' => $params['reporttypename'],\n 'time_generated' => (empty($params['createdate'])) ? Date::locale_to_locale(date('Y-m-d H:i:s'), SERVER_TIMEZONE, $params['user_timezone'], 'm/d/Y h:i A') : Date::utc_to_locale($params['createdate'], $params['user_timezone'], 'm/d/Y h:i A'),\n 'criteria' => array(\n 'selected_vehicles' => array(\n 'label' => 'Vehicles Selected',\n 'value' => 'All Vehicles'\n )\n ),\n 'columns' => array(\n 'unitname' => 'Vehicle Name',\n 'serialnumber' => 'Serial',\n 'unitgroupname' => 'Group',\n 'unitstatusname' => 'Status',\n 'vin' => 'VIN',\n 'stock' => 'Stock',\n 'make' => 'Make',\n 'model' => 'Model',\n 'year' => 'Year',\n 'color' => 'Color',\n 'licenseplatenumber' => 'License Plate',\n 'loannumber' => 'Loan ID',\n 'installdate' => 'Install Date',\n 'installer' => 'Installer',\n 'firstname' => 'Customer First Name',\n 'lastname' => 'Customer Last Name',\n 'formatted_address' => 'Formatted Address',\n 'cellphone' => 'Mobile Phone',\n 'homephone' => 'Home Phone',\n 'email' => 'Email',\n 'simcardstatus' => 'Sim Card Status',\n 'plan' => 'Plan',\n 'purchasedate' => 'Purchase Date',\n 'renewaldate' => 'Renewal Date',\n 'lastrenewaldate' => 'Last Renewed On',\n 'deactivationdate' => 'Deactivation Date' // need this column added to the DB\n ),\n 'summary' => array()\n ),\n 'units' => array()\n );\n\n if (! empty($params['unit_mode']) AND $params['unit_mode'] == 'all') {\n $units = $this->vehicle_logic->getVehicleInfoReport($params['account_id']);\n $data['units'][0]['report_title'] = '';\n $data['units'][0]['report_data'] = array();\n }\n\n if (! empty($units)) {\n $report_data = array();\n foreach ($units as $unit) {\n $report_data[] = array(\n 'unitname' => $unit['unitname'],\n 'serialnumber' => $unit['serialnumber'],\n 'unitgroupname' => $unit['unitgroupname'],\n 'unitstatusname' => $unit['unitstatusname'],\n 'vin' => $unit['vin'],\n 'stock' => $unit['stocknumber'],\n 'make' => $unit['make'],\n 'model' => $unit['model'],\n 'year' => $unit['year'],\n 'color' => $unit['color'],\n 'licenseplatenumber' => $unit['licenseplatenumber'],\n 'loannumber' => $unit['loannumber'],\n 'installdate' => Date::utc_to_locale($unit['installdate'], $params['user_timezone'], 'm/d/Y'),\n 'installer' => $unit['installer'],\n 'firstname' => $unit['firstname'],\n 'lastname' => $unit['lastname'],\n 'formatted_address' => $this->address_logic->validateAddress($unit['streetaddress'], $unit['city'], $unit['state'], $unit['zipcode'], $unit['country']),\n 'cellphone' => $unit['cellphone'],\n 'homephone' => $unit['homephone'],\n 'email' => $unit['email'],\n 'simcardstatus' => $unit['simcardstatus'],\n 'plan' => $unit['plan'],\n 'purchasedate' => Date::utc_to_locale($unit['purchasedate'], $params['user_timezone'], 'm/d/Y'),\n 'renewaldate' => Date::utc_to_locale($unit['renewaldate'], $params['user_timezone'], 'm/d/Y'),\n 'lastrenewaldate' => Date::utc_to_locale($unit['lastrenewaldate'], $params['user_timezone'], 'm/d/Y'),\n 'deactivationdate' => Date::utc_to_locale($unit['renewaldate'], $params['user_timezone'], 'm/d/Y') // need this column added to the DB\n );\n }\n\n $data['units'][0]['report_data'] = $report_data;\n }\n //print_rb($data);\n return $data;\n }",
"function update_detalle_serv($detalleserv_id,$params)\r\n {\r\n $this->db->where('detalleserv_id',$detalleserv_id);\r\n return $this->db->update('detalle_serv',$params);\r\n }",
"function select_comment_data($comment_id)\n\t{\n\t\tglobal $db;\n\n\t\t$sql = \"SELECT gb.id as comment_id, gb.post, gb.author_id, gb.post_date, gb.ip_address, gb.garage_id,\n\t\t\t\tg.made_year, makes.make, models.model, u.username, CONCAT_WS(' ', g.made_year, makes.make, models.model) AS vehicle\n \t FROM \" . GARAGE_GUESTBOOKS_TABLE . \" AS gb \n\t\t\t\tLEFT JOIN \" . GARAGE_TABLE .\" AS g on g.id = gb.garage_id\n \tLEFT JOIN \" . USERS_TABLE . \" AS u ON g.member_id = u.user_id \n \t\t\t\tLEFT JOIN \" . GARAGE_MAKES_TABLE . \" AS makes ON g.make_id = makes.id\n \t\tLEFT JOIN \" . GARAGE_MODELS_TABLE . \" AS models ON g.model_id = models.id\n WHERE gb.id = $comment_id\n ORDER BY gb.post_date ASC\";\n\n \tif( !($result = $db->sql_query($sql)) )\n \t\t{\n \t\tmessage_die(GENERAL_ERROR, 'Could Not Select Vehicle Comment', '', __LINE__, __FILE__, $sql);\n \t\t}\n\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\treturn $row;\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UTF8 aware replacement for rtrim() Strip whitespace (or other characters) from the end of a string You only need to use this if you are supplying the charlist optional arg and it contains UTF8 characters. Otherwise rtrim will work normally on a UTF8 string | public static function rtrim($str, $charlist = null)
{
if (empty($charlist) && $charlist !== null)
{
return $str;
}
if (!function_exists('utf8_rtrim'))
{
require_once __DIR__ . '/phputf8/trim.php';
}
if ($charlist === null)
{
return utf8_rtrim($str);
}
return utf8_rtrim($str, $charlist);
} | [
"function _rtrim($str, $charlist = null)\n {\n if ($charlist === null)\n {\n return rtrim($str);\n }\n \n if (getInstance()->utf8->isAscii($charlist))\n {\n return rtrim($str, $charlist); \n }\n\n $charlist = preg_replace('#[-\\[\\]:\\\\\\\\^/]#', '\\\\\\\\$0', $charlist);\n\n return preg_replace('/['.$charlist.']++$/uD', '', $str);\n }",
"public static function rtrim( $str, $charlist = null )\n {\n if ( is_null( $charlist ) )\n {\n return rtrim( $str );\n }\n $charlist = self::escapeCharacterClassCharlist( $charlist );\n return preg_replace( '/['.$charlist.']+$/u', '', $str );\n }",
"function az_rtrim($str, $charlist='') {\r\n if (strlen($charlist) == 0) {\r\n $str = rtrim($str);\r\n } else {\r\n $str = utf8_char_replace($str);\r\n $charlist = preg_quote($charlist,'#');\r\n $str = preg_replace('#['.$charlist.']+$#u','',$str);\r\n }\r\n return $str;\r\n}",
"function str_rtrim ($str, $charlist = \" \\t\\n\\r\\0\\x0B\")\n{\n return rtrim($str, $charlist);\n}",
"function utf8_rtrim($str,$charlist=''){\n if($charlist == '') return rtrim($str);\n\n //quote charlist for use in a characterclass\n $charlist = preg_replace('!([\\\\\\\\\\\\-\\\\]\\\\[/])!','\\\\\\${1}',$charlist);\n\n return preg_replace('/['.$charlist.']+$/u','',$str);\n }",
"static function utf8_trim($str,$charlist='') \n {\n if($charlist == '') return trim($str);\n return utf8_ltrim(utf8_rtrim($str));\n }",
"function utf8_ltrim($str, $charlist = '')\n {\n if ($charlist == '')\n return ltrim($str);\n \n // quote charlist for use in a characterclass\n $charlist = preg_replace('!([\\\\\\\\\\\\-\\\\]\\\\[/])!', '\\\\\\${1}', $charlist);\n \n return preg_replace('/^[' . $charlist . ']+/u', '', $str);\n }",
"function utf8_ltrim($str, $charlist = '')\n {\n if ($charlist == '') return ltrim($str);\n\n //quote charlist for use in a characterclass\n $charlist = preg_replace('!([\\\\\\\\\\\\-\\\\]\\\\[/])!', '\\\\\\${1}', $charlist);\n\n return preg_replace('/^[' . $charlist . ']+/u', '', $str);\n }",
"function pun_trim($str, $charlist = false)\n{\n\treturn utf8_trim($str, $charlist);\n}",
"function utf8_ltrim($str,$charlist=''){\r\n if($charlist == '') return ltrim($str);\r\n\r\n //quote charlist for use in a characterclass\r\n $charlist = preg_replace('!([\\\\\\\\\\\\-\\\\]\\\\[/])!','\\\\\\${1}',$charlist);\r\n\r\n return preg_replace('/^['.$charlist.']+/u','',$str);\r\n }",
"public static function rtrim()\n\t{\n\t}",
"function phpbb_ltrim($str, $charlist = false)\n{\n\tif ($charlist === false)\n\t{\n\t\treturn ltrim($str);\n\t}\n\t\n\t$php_version = explode('.', PHP_VERSION);\n\n\t// php version < 4.1.0\n\tif ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1))\n\t{\n\t\twhile ($str{0} == $charlist)\n\t\t{\n\t\t\t$str = substr($str, 1);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$str = ltrim($str, $charlist);\n\t}\n\n\treturn $str;\n}",
"function mb_trim($string, $charlist='\\\\\\\\s', $ltrim=true, $rtrim=true)\n{\n\t\t$both_ends = $ltrim && $rtrim;\n\n\t\t$char_class_inner = preg_replace(\n\t\t\t\tarray( '/[\\^\\-\\]\\\\\\]/S', '/\\\\\\{4}/S' ),\n\t\t\t\tarray( '\\\\\\\\\\\\0', '\\\\' ),\n\t\t\t\t$charlist\n\t\t);\n\n\t\t$work_horse = '[' . $char_class_inner . ']+';\n\t\t$ltrim && $left_pattern = '^' . $work_horse;\n\t\t$rtrim && $right_pattern = $work_horse . '$';\n\n\t\tif($both_ends)\n\t\t{\n\t\t\t\t$pattern_middle = $left_pattern . '|' . $right_pattern;\n\t\t}\n\t\telseif($ltrim)\n\t\t{\n\t\t\t\t$pattern_middle = $left_pattern;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$pattern_middle = $right_pattern;\n\t\t}\n\n\treturn preg_replace(\"/$pattern_middle/usSD\", '', $string);\n}",
"function trim($charlist = \" \\t\\n\\r\\0\\x0B\")\n {\n return new JString(trim($this->inner, $charlist));\n }",
"public function rtrim($str)\r\n {\r\n return 'RTRIM(' . $str . ')';\r\n }",
"function righttrim($string=NULL, $chars=NULL) {\n\t\treturn substr($string, 0, strlen($string)-$chars);\n\t}",
"function trim_right(string $string, ?string $char_mask = null): string\n{\n return null === $char_mask\n ? rtrim($string)\n : rtrim($string, $char_mask);\n}",
"function stringRtrim($string)\r\n\r\n {\r\n\r\n return rtrim($string, \"string\");\r\n\t\r\n\r\n\t}",
"function unicode_trim( $str ) {\r\n return preg_replace('/^[\\pZ|\\pC]+([\\PZ|\\PC]*)[\\pZ|\\pC]+$/u', '$1', $str);\r\n\r\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CONFIRM DELETION OF DEPOSIT | function delete2_deposit($deposit_id, $amount, $bank_account_id){
$resp = new xajaxResponse();
$former_res = mysql_query("select * from deposit where id='".$deposit_id."'");
$former = mysql_fetch_array($former_res);
start_trans();
$accno =mysql_fetch_assoc(mysql_query("select m.first_name,m.last_name,m.mem_no from member m join mem_accounts ma on m.id=ma.mem_id join deposit d on d.memaccount_id=ma.id where d.id=".$deposit_id));
if(!mysql_query("delete from deposit where id='".$deposit_id."'")){
$resp->alert("ERROR: Could not delete deposit! \n Contact FLT");
rollback();
return $resp;
}
if(! mysql_query("update bank_account set account_balance=account_balance - ".$former['amount']." where id='".$bank_account_id."'")){
$resp->alert("ERROR: Could not update bank account! \n Contact FLT");
rollback();
return $resp;
}
///////////////////
$action = "delete from deposit where id='".$deposit_id."'";
$msg = "Deleted a deposit of:".$former['amount']." from member's account:".$accno['mem_no']." - ".$accno['first_name']." ".$accno['last_name'];
log_action($_SESSION['user_id'],$action,$msg);
//////////////////
commit();
$resp->assign("status", "innerHTML", "<font color=red>Deposit deleted!</center>");
return $resp;
} | [
"function deleteDepositdetails()\n {\n global $db;\n $requete = $db->prepare('DELETE FROM deposit_details WHERE idDd = ?');\n $requete->execute(array($this->idDd));\n }",
"protected function confirmDelete() {\n\t}",
"function account_deposit_withdraw(){\n\t}",
"public function acceptDeletion()\n {\n $this->_rootElement->find($this->deleteButton, Locator::SELECTOR_XPATH)->click();\n }",
"function deleterate()\n\t{\n\t\t$model = $this->getModel( 'shippingrates');\n\n\t\t$cids = JFactory::getApplication()->input->get('cid', array(0), 'array');\n\n\t\tforeach ($cids as $cid)\n\t\t{\n\t\t\t$row = $model->getTable();\n\t\t\t$row->load( $cid );\n\n\t\t\tif (!$row->delete())\n\t\t\t{\n\t\t\t\t$this->message .= $row->getError();\n\t\t\t\t$this->messagetype = 'notice';\n\t\t\t\t$error = true;\n\t\t\t}\n\t\t}\n\n\t\tif ($error)\n\t\t{\n\t\t\t$this->message = JText::_('J2STORE_ERROR') . \" - \" . $this->message;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->message = \"\";\n\t\t}\n\n\t\t$redirect = $this->baseLink().\"&shippingTask=setrates&sid={$row->shipping_method_id}&tmpl=component\";\n\t\t$redirect = JRoute::_( $redirect, false );\n\n\t\t$this->setRedirect( $redirect, $this->message, $this->messagetype );\n\t}",
"public function deleteDebit()\n {\n $table = $this->getTable();\n $where = $table->getAdapter()->quoteInto(\n 'fa_contact_id = ?', $this->_fa_contact_id\n );\n $table->delete($where);\n }",
"function delete() {\n if (!in_array('delete', $this->allow)) throw new xException(\"Method not allowed\", 403);\n $t = new xTransaction();\n $t->start();\n // Determines candidat & commission id\n $id_candidat = $this->params['id'];\n $id_commission = xModel::load('candidat', array('id' => $id_candidat))->get(0);\n $id_commission = $id_commission['commission_id'];\n // Soft-deletes foreign 'candidat_formation' entity/ies\n $ids = $this->_get_ids(\n xModel::load('candidat_formation', array('candidat_id'=>$id_candidat))\n );\n foreach ($ids as $id) $t->execute(xModel::load('candidat_formation', array(\n 'id' => $id\n )), 'delete');\n // Nulls foreign 'commission_travail' reference\n $t->execute(xModel::load('commission_travail', array(\n 'id' => $id_commission,\n 'primo_loco' => null,\n 'secondo_loco' => null,\n 'tertio_loco' => null\n )), 'post');\n // Nulls foreign 'commission_travail' reference\n $t->execute(xModel::load('commission_finalisation', array(\n 'id' => $id_commission,\n 'candidat_id' => null\n )), 'post');\n // Soft-deletes actual entity (soft-delete)\n $t->execute(xModel::load('candidat', array(\n 'id' => $id_candidat,\n 'actif' => 0\n )), 'post');\n return $t->end();\n }",
"function delete(){\n if($this->session->userdata['brands_per']['delete']==1){ // check permission of current user for delete purchase decomposition\n if($this->input->post('guid')){ \n $this->load->model('items');\n $guid=$this->input->post('guid');\n $status=$this->items->check_approve($guid);// check if the purchase decomposition was already apparoved or what\n if($status!=FALSE){\n $this->posnic->posnic_delete($guid,'decomposition'); // delete the purchase decomposition\n echo 'TRUE';\n }else{\n echo 'Approved';\n }\n \n }\n }else{\n echo 'FALSE';\n }\n \n}",
"public function purchase_unsaved_delete()\n {\n $purchase_no = $this->input->post('purchase_no');\n /** Remove auto created purchase journal */\n $journal = $this->MAc_journal_master->get_by_doc('Purchase', $purchase_no);\n if (count($journal) > 0)\n {\n $this->MAc_journal_details->delete_by_journal_no($journal['journal_no']);\n $this->MAc_journal_master->delete_by_journal_no($journal['journal_no']);\n }\n /** Remove auto created payment receipt for partial or full cash purchase */\n $payment = $this->MAc_payment_receipts->get_by_doc('Purchase', $purchase_no);\n if (count($payment) > 0)\n {\n $this->MAc_payment_receipts->delete($payment['id']);\n }\n /** Remove purchase */\n $this->MPurchase_details->delete_by_purchase_no($purchase_no);\n $this->MPurchase_master->delete_by_purchase_no($purchase_no);\n }",
"public function canDeleteCurrency();",
"public function testDebtorDelete()\n {\n $oDebtorDAO = new DebtorDAO();\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $oDebtor->delete();\n\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n $this->assertFalse(!is_null($oDebtor->getId()));\n }",
"public function Wfc_Delete_Seal(){\n }",
"public function deposit($amount) {\n $this->cashTransaction($amount, 'DEPOSIT');\n }",
"public function multidelete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'desakelurahan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$totaldata = $this->postring->valid($_POST['totaldata'], 'xss');\n\t\t\tif ($totaldata != \"0\") {\n\t\t\t\t$items = $_POST['item'];\n\t\t\t\tforeach($items as $item){\n\t\t\t\t\t$query = $this->podb->deleteFrom('desakelurahan')->where('id', $this->postring->valid($item['deldata'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t}\n\t\t\t\t$this->poflash->success('Desakelurahan has been successfully deleted', 'admin.php?mod=desakelurahan');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error('Error deleted desakelurahan data', 'admin.php?mod=desakelurahan');\n\t\t\t}\n\t\t}\n\t}",
"function delete_adstrue_vendor_province($form,&$form_state,$value) {\n $form = array();\n $form['header'] = array(\n '#type' => 'item',\n '#markup' => '<h4>Vui lòng xác nhận để xóa tỉnh thành</h4>',\n );\n $form['province_id'] = array(\n '#type' => 'hidden',\n '#value' => $value,\n );\n return confirm_form($form,'Vui lòng xác nhận để xóa tỉnh thành','province',t(''),t('Xác nhận'),t('Hủy bỏ'));\n}",
"public function voucher_delete($id)\n {\n $q = $this->db->where('id', $id)->get('transactions')->row_array();\n if ($q['type'] == 'expense') {\n if (!get_permission('expense', 'is_delete')) {\n access_denied();\n }\n $sql = \"UPDATE accounts SET balance = balance + \" . $q['amount'] . \" WHERE id = \" . $this->db->escape($q['account_id']);\n $this->db->query($sql);\n } elseif ($q['type'] == 'deposit') {\n if (!get_permission('deposit', 'is_delete')) {\n access_denied();\n }\n $sql = \"UPDATE accounts SET balance = balance - \" . $q['amount'] . \" WHERE id = \" . $this->db->escape($q['account_id']);\n $this->db->query($sql);\n }\n $filepath = FCPATH . 'uploads/attachments/voucher/' . $q['attachments'];\n if (file_exists($filepath)) {\n unlink($filepath);\n }\n $this->db->where('id', $id);\n $this->db->delete('transactions');\n }",
"private function commitDeleting() {\n $items = $this->buffer->getFiltered(TxBuffer::DELETING);\n if (!($items_count = count($items))) {\n return;\n }\n $this->initializeQueue();\n if ($items_count === 1) {\n $invalidation = current($items);\n $this->queue->deleteItem(new ProxyItem($invalidation, $this->buffer));\n $this->buffer->delete($invalidation);\n }\n else {\n $proxyitems = [];\n foreach ($items as $item) {\n $proxyitems[] = new ProxyItem($item, $this->buffer);\n }\n $this->queue->deleteItemMultiple($proxyitems);\n $this->buffer->delete($items);\n }\n\n $this->purgeQueueStats->updateTotals($items);\n }",
"public function delete( ) {\n\t\tglobal $Cmtys;\n\t\tglobal $HDUP;\n\n\t\tif (isset($_GET['delete']) && is_numeric($_GET['delete'])) {\n\t\t\t$this->setId($_GET['delete']);\n\t\t} \n\n\t\tif (!isset($_GET['confirm_del'])) { \n\t\t\t$date = $this->Date->toString( );\n\t\t\t$title = format_html( $this->title, true );\n\t\t\techo <<<EOHTML\n\t\t\t\t<div class=\"agreement\">\n\t\t\t\t\t<h2>Are you sure you want to delete this entry?</h2>\n\t\t\t\t\t<h1 class=\"agrm\">{$title} agreement: {$date}</h1>\n\t\t\t\t</div>\n\n\t\t\t\t<form action=\"?\" method=\"get\">\n\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"admin\">\n\t\t\t\t<input type=\"hidden\" name=\"doctype\" value=\"agreement\">\n\t\t\t\t<input type=\"hidden\" name=\"delete\" value=\"{$this->id}\">\n\t\t\t\t<div align=\"right\">\n\t\t\t\t\t<a href=\"?id=admin&doctype=agreement&delete={$this->id}&confirm_del=1\">\n\t\t\t\t\t\t<img class=\"tango\" src=\"display/images/tango/32x32/actions/edit-delete.png\" alt=\"delete\">\n\t\t\t\t\t\tconfirm delete</a>\n\t\t\t\t</div>\n\t\t\t\t</form>\nEOHTML;\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$sql = \"DELETE FROM agreements WHERE id={$this->id}\";\n\t\t$success = $this->mysql_api->query($sql);\n\t\tif ( !$success ) {\n\t\t\techo '<div class=\"error\">Error: Item was not deleted</div>' . \"\\n\";\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// also delete any related previous versions\n\t\t$sql = \"DELETE FROM agreements_versions WHERE agr_id={$this->id}\";\n\t\t$success = $this->mysql_api->query($sql);\n\t\tif ( !$success ) {\n\t\t\techo <<<EOHTML\n\t\t\t\t<div class=\"error\">Error: Prior versions were not deleted</div>\nEOHTML;\n\t\t\treturn FALSE;\n\t\t}\n\n\t\techo \"<p>Item deleted</p>\\n\";\n\t\treturn TRUE;\n\t}",
"function deletePayment() {\n\t\tif (!empty($_POST['delete'])) {\n\t\t\t$sql = \"DELETE FROM cart WHERE cart_id = ?\";\n\t\t\t$query = $this->db->prepare($sql);\n\t\t\t$query->execute(array($_POST['cart_id']));\n\t\t\theader(\"location:index.php\");\n\t\t} \n\t\t\n\t\t\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
displays detailed list of unfilled orders broken down by participants | public function detailedUnfilledOrderList() {
$this->page->orders = $this->model->getDeltagereWithWearOrders(null, null, true);
$this->page->setTemplate('detailedOrderList');
$this->page->registerLateLoadJS('weardetails.js');
} | [
"public function completeOrders(){\n $data = $this->orderService->getFiltered('complete');\n return view('admin.orders.complete')->with([\n 'orders'=> $data['orders'],\n 'filters' => $data['filters'], \n 'sort' => $data['sort']\n ]);\n }",
"public function unpaid_orders()\n\t{\n\t\t//$this->order_model->get_all_unpaidorders();\n\t\t$data['title'] = 'Unpaid Order';\n\n\t\t$data['unpaidorders'] = $this->order_model->get_all_unpaidorders();\n\t\t$data['agents'] = $this->writer_model->get_all_agents();\n\n\t\t // echo \"<pre>\";\n\t\t // print_r($data['agents']);\n\t\t // die();\n\n\t\t$data['body_title'] = 'Unpaid Orders';\n\t\t$data['mainview'] = 'admin/pages/unpaid_order';\n\t\t$this->load->view('admin/shared/layout',$data);\n\t}",
"public function actionListAllIncompleteOrders(){\n \n $userid = Yii::app()->user->id; \n //get the domain of the logged in user\n \n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n $criteria->condition='status=:status';\n $criteria->params = array(':status'=>'open');\n $order= Order::model()->findAll($criteria);\n \n if($order===null) {\n http_response_code(404);\n $data['error'] ='No record found';\n echo CJSON::encode($data);\n } else {\n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"order\" => $order\n \n \n ));\n \n }\n \n }",
"public function CompleteOrders()\n {\n $order = Order::where('status', 2)->where('refund', 0)->where('free_user_id', null)->latest()->paginate(10);\n return view('admin.pages.order.complete-orders', compact('order'));\n }",
"function _display_orders_table(){\n\t\t$data['query'] = $this->get('order_id');\n\t\t$this->load->view('Orders_table', $data);\n\t}",
"public static function render_orders_list_empty_state() {\n\t\tself::render_suggestions_container( 'orders-list-empty-header' );\n\t\tself::render_suggestions_container( 'orders-list-empty-body' );\n\t\tself::render_suggestions_container( 'orders-list-empty-footer' );\n\t}",
"public function showOrders(){\n $orders = DB::table('orders')->paginate(10);\n return view(\"admin.ordersPanel\",['orders'=>$orders]);\n\n }",
"public function showAccountOrderAutomations();",
"public function showOrders()\n\t{\n\t\t$orders = Auth::user()->orders()\n\t\t\t->orderby('created_at', 'desc')\n\t\t\t->paginate(10);\n\n\t\treturn view('profile.showOrder', [\n\t\t\t'orders' => $orders,\n\t\t]);\n\t}",
"function total_orders_complete(){\n $orders = Order::where('status','!=','1')->latest()->paginate(20);\n return view('admin.Orders.orders_complete',compact('orders'));\n }",
"public function view_orders(){\n\t\t\t$this->view->render('stocks/view_orders',false);\t\n\t\t}",
"public function printCustomerOrders(){\n include '../dbcon/init.php';\n $query = \"SELECT Order_ID, Order_Total FROM ORDERS WHERE Order_Complete='N';\";\n $result = $sqli->query($query);\n $user_object = unserialize($_SESSION['user']);\n \n echo '<div class=\"staff-wrapper\">';\n while ($row = $result->fetch_assoc()) {\n echo \"<div id=\\\"staff-div\\\">\n <form method=\\\"post\\\" action=\\\"../php/updateOrder.php\\\">\n <input type=\\\"hidden\\\" name=\\\"orderID\\\" value=\\\"{$row['Order_ID']}\\\">\n <input type=\\\"hidden\\\" name=\\\"staffID\\\" value=\\\"{$user_object->_userID}\\\">\n <h3 style=\\\"font-size: 16px; font-weight: bold;\\\">Order {$row['Order_ID']}  Total: £\".number_format($row['Order_Total'],2).\"<br>[Not complete]</h3>\n <hr>\n <div>\";\n $this->getOrderItemsFromOrderID($row['Order_ID']);\n echo '<button type=\"submit\" style=\"font-size:16px; margin-bottom:15px;\" name=\"subOrder\" class=\"buttonAsLink\">Complete Order</button></form></div>\n </div>';\n }\n echo '</div>';\n $result->close();\n $sqli->close();\n }",
"public function display() {\n print_r($this->order);\n }",
"public function actionListAllYetToBeAssignedForDeliveryOrders(){\n \n \n $userid = Yii::app()->user->id; \n //get the domain of the logged in user\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n $criteria->condition='status=:status';\n $criteria->params = array(':status'=>'closed');\n $orders= Order::model()->findAll($criteria);\n \n $unassigned_orders = [];\n foreach($orders as $order){\n if($this->isOrderNotAssignedForDelivery($order['id'])){\n \n $unassigned_orders[] = $order;\n } \n }\n \n if($orders===null) {\n http_response_code(404);\n $data['error'] ='No record found';\n echo CJSON::encode($data);\n } else {\n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"order\" => $unassigned_orders\n \n \n ));\n \n }\n \n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $userOrders = $em->getRepository('AppBundle:UserOrder')->findAll();\n\n return $this->render('AppBundle:Admin:orders.html.twig', array(\n 'orders' => $userOrders,\n 'user' => null\n ));\n }",
"public function getUninvoicedOrders();",
"public function orderDetails()\n {\n $params = $this->productService->getOrders($this->requestHelper);\n\n $this->renderView(['account', 'accountOrderDetails'], $params);\n }",
"public function PendingOrders()\n {\n $order = Order::where('status', 0)->where('refund', 0)->paginate(10);\n return view('admin.pages.order.pending-orders', compact('order'));\n }",
"public function actionListAllDeliveredOrders(){\n \n $userid = Yii::app()->user->id; \n //get the domain of the logged in user\n \n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n $criteria->condition='status=:status';\n $criteria->params = array(':status'=>'delivered');\n $order= AssigningOrderForDelivery::model()->findAll($criteria);\n \n if($order===null) {\n http_response_code(404);\n $data['error'] ='No record found';\n echo CJSON::encode($data);\n } else {\n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"order\" => $order\n \n \n ));\n \n }\n \n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Users can upload/see uploaded data on this step $r>addRoute('rmsupload', new R('rmsuploads/:rmsUploadId', ['module' => 'proposalgen', 'controller' => 'fleet', 'action' => 'index', 'rmsUploadId' => false])); | public function indexAction ()
{
$this->_pageTitle = ['Upload', 'RMS Upload'];
$time = -microtime(true);
$rmsUploadId = $this->_getParam('rmsUploadId', false);
$this->_navigation->setActiveStep(FleetStepsModel::STEP_FLEET_UPLOAD);
$rmsUpload = null;
if ($rmsUploadId > 0)
{
$rmsUpload = RmsUploadMapper::getInstance()->find($rmsUploadId);
}
if ($rmsUpload instanceof RmsUploadModel)
{
$this->_navigation->updateAccessibleSteps(FleetStepsModel::STEP_FLEET_SUMMARY);
}
else
{
$this->_navigation->updateAccessibleSteps(FleetStepsModel::STEP_FLEET_UPLOAD);
}
if (!$this->uploadService) {
$this->uploadService = new RmsUploadService($this->getIdentity()->id, $this->getIdentity()->dealerId, $this->getSelectedClient()->id, $rmsUpload);
}
$form = $this->uploadService->getForm();
if (isset($this->getMpsSession()->lastSelectedRmsProviderId))
{
$form->getElement('rmsProviderId')->setValue($this->getMpsSession()->lastSelectedRmsProviderId);
}
if ($this->getRequest()->isPost())
{
$values = $this->getRequest()->getParams();
if (isset($values ["goBack"]))
{
// Bring the user back to the home page
$this->redirectToRoute('app.dashboard');
}
else if (isset($values ["performUpload"]) && !($rmsUpload instanceof RmsUploadModel))
{
$this->getMpsSession()->lastSelectedRmsProviderId = $values['rmsProviderId'];
/*
* Handle Upload
*/
if ($form->isValid($values))
{
$success = $this->uploadService->processUpload($values, $this->getIdentity()->dealerId);
/**
* Log how much time it took
*/
$time += microtime(true);
$filename = $this->uploadService->getFileName();
\Tangent\Logger\Logger::debug("It took {$time} seconds to process the CSV upload ({$filename}). ");
if ($success)
{
$timeElapsed = number_format($time, 4);
$validDevices = number_format($this->uploadService->rmsUpload->validRowCount);
$invalidDevices = number_format($this->uploadService->rmsUpload->invalidRowCount);
$this->_flashMessenger->addMessage(["success" => "Processed {$validDevices} valid devices and {$invalidDevices} invalid devices in {$timeElapsed} seconds."]);
$this->getMpsSession()->selectedRmsUploadId = $this->uploadService->rmsUpload->id;
$this->redirectToRoute(null, ["rmsUploadId" => $this->uploadService->rmsUpload->id]);
}
else
{
$this->view->invalidDevices = $this->uploadService->invalidRows;
$this->_flashMessenger->addMessage(["danger" => $this->uploadService->errorMessages]);
}
}
else
{
$this->_flashMessenger->addMessage(["danger" => 'Please fix the errors below.']);
}
}
else if (isset($values ["saveAndContinue"]))
{
$this->redirectToRoute('rms-upload.mapping', ["rmsUploadId" => $this->uploadService->rmsUpload->id]);
}
}
$this->view->form = $form;
$this->view->rmsUpload = $this->uploadService->rmsUpload;
$navigationButtons = ($this->uploadService->rmsUpload instanceof RmsUploadModel) ? AssessmentNavigationForm::BUTTONS_BACK_NEXT : AssessmentNavigationForm::BUTTONS_BACK;
$this->view->navigationForm = new AssessmentNavigationForm($navigationButtons);
} | [
"public function getFileUploadAjaxRoute();",
"public function routes()\r\n {\r\n $message = null;\r\n \r\n try \r\n {\r\n $id = $this->inputfilter->clean( $this->app->get('PARAMS.id'), 'alnum' );\r\n $item = (new \\Dsc\\Mongo\\Collections\\Assets)->setState('filter.id', $id)->getItem();\r\n if (empty($item->id)) {\r\n throw new \\Exception('Invalid Item'); \t\r\n }\r\n \r\n $file = new \\SplTempFileObject();\r\n // TODO Push this to the Assets model\r\n switch ($item->storage)\r\n {\r\n case \"s3\":\r\n $contents = @file_get_contents( $item->url );\r\n \r\n break;\r\n case \"gridfs\":\r\n default:\r\n \r\n $length = $item->length;\r\n $chunkSize = $item->chunkSize;\r\n $chunks = ceil( $length / $chunkSize );\r\n \r\n $collChunkName = $item->collectionNameGridFS() . \".chunks\";\r\n $collChunks = $item->getDb()->{$collChunkName};\r\n \r\n $contents = null;\r\n for( $i=0; $i<$chunks; $i++ )\r\n {\r\n $chunk = $collChunks->findOne( array( \"files_id\" => $item->_id, \"n\" => $i ) );\r\n $contents .= $chunk[\"data\"]->bin;\r\n }\r\n \r\n break;\r\n }\r\n \r\n $file->fwrite($contents);\r\n \r\n $reader = new \\Ddeboer\\DataImport\\Reader\\CsvReader($file, \",\");\r\n $reader->setHeaderRowNumber(0);\r\n \r\n $this->app->set('item', $item);\r\n $this->app->set('count', count($reader));\r\n \r\n $skipped = 0;\r\n $inserted = 0;\r\n $updated = 0;\r\n $failed = 0;\r\n $errors = array(); \r\n foreach ($reader as $row)\r\n {\r\n set_time_limit(0);\r\n \r\n if (empty($row['Original'])) {\r\n $skipped++;\r\n \tcontinue;\r\n }\r\n \r\n if (strpos( $row['Original'], '/' ) === 0 )\r\n {\r\n $row['Original'] = substr($row['Original'], 1);\r\n }\r\n \r\n if (empty($row['Original'])) \r\n {\r\n $skipped++;\r\n continue;\r\n }\r\n \r\n $redirect = \\Redirect\\Admin\\Models\\Routes::findOne(array(\r\n 'url.alias' => $row['Original']\r\n ));\r\n \r\n if (empty($redirect->id))\r\n {\r\n // insert\r\n $redirect = new \\Redirect\\Admin\\Models\\Routes;\r\n $redirect->{'url.alias'} = $row['Original']; \r\n $redirect->{'url.redirect'} = $row['Target'];\r\n \r\n try \r\n {\r\n $redirect->save();\r\n $inserted++;\r\n }\r\n catch(\\Exception $e)\r\n {\r\n $failed++;\r\n $errors[] = $e->getMessage();\r\n }\r\n }\r\n else\r\n {\r\n // update\r\n $redirect->{'url.alias'} = $row['Original'];\r\n $redirect->{'url.redirect'} = $row['Target'];\r\n \r\n try\r\n {\r\n $redirect->save();\r\n $updated++;\r\n }\r\n catch(\\Exception $e)\r\n {\r\n $failed++;\r\n $errors[] = $e->getMessage();\r\n } \r\n }\r\n }\r\n \r\n $this->app->set('skipped', $skipped);\r\n $this->app->set('inserted', $inserted);\r\n $this->app->set('updated', $updated);\r\n $this->app->set('failed', $failed);\r\n $this->app->set('errors', $errors);\r\n $this->app->set('message', $message);\r\n \r\n echo $this->theme->render('Redirect/Admin/Views::importer/routes_results.php');\r\n \r\n } \r\n catch ( \\Exception $e ) \r\n {\r\n \\Dsc\\System::addMessage( $e->getMessage(), 'error');\r\n $this->app->reroute('/admin/redirect/import');\r\n return;\r\n }\r\n }",
"function exec_roar_upload() {\n\t\t$this->set('title_for_layout', 'Roar! Uploader');\n\t\tif(isset($this->data)) {\n\t\t\tif($this->data['SiteHelper']['issue']['error'] != 0) {\n\t\t\t\t// If there is an error, report and stop\n\t\t\t\t$this->Session->setFlash('Error number ' . $this->data['SiteHelper']['issue']['error'] .' occured. Please contact the Comms Officer.', 'bad-flash');\n\t\t\t} elseif($this->data['SiteHelper']['issue']['type'] != 'application/pdf') {\n\t\t\t\t// If the uploaded file isn't a PDF, report and stop\n\t\t\t\t$this->Session->setFlash('The uploaded file is not a PDF file.', 'bad-flash');\n\t\t\t} else {\n\t\t\t\t$roarDir = WWW_ROOT . 'downloads/roar/'.date('Y').'/';\n\t\t\t\tif(!file_exists($roarDir)) {\n\t\t\t\t\t// If the Roar directory doesn't exist, create it.\n\t\t\t\t\tmkdir($roarDir, 0774, TRUE);\n\t\t\t\t}\n\t\t\t\tif(is_dir($roarDir)) {\n\t\t\t\t\t// If the Roar directory exists and is a directory convert the tmp_file to actual file\n\t\t\t\t\t$roarFile = $roarDir . $this->data['SiteHelper']['term'].'Roar'.$this->data['SiteHelper']['num']. '.pdf';\n\t\t\t\t\t$tmpName = $this->data['SiteHelper']['issue']['tmp_name'];\n\t\t\t\t\t$str = shell_exec('gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile='.$roarFile.' '.$tmpName);\n\t\t\t\t\tchmod($roarFile, 0664);\n\t\t\t\t\t$this->Session->setFlash('Uploaded successfully! The path you need for the <code>downloads</code> function is <code>/downloads/roar/'.date('Y').'/'.$this->data['SiteHelper']['term'].'Roar'.$this->data['SiteHelper']['num'].'.pdf</code>', 'good-flash');\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('The Roar! Directory is a file! Contact the Comms Officer.', 'bad-flash');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function noUploadsAction ()\n {\n $this->_pageTitle = ['Upload fleet data'];\n\n $arr=$this->getSelectedClient()->rmsUploads();\n if (count($arr->getResults())>0) {\n $this->redirectToRoute('app.dashboard.select-upload');\n return;\n }\n\n if (!$this->getSelectedClient()->id) {\n if (ClientRepository::countForDealer($this->getIdentity()->dealerId) < 1) {\n $this->redirectToRoute('app.dashboard.no-clients');\n } else {\n $this->redirectToRoute('app.dashboard.select-client');\n }\n return;\n }\n\n $uploadService = new RmsUploadService($this->getIdentity()->id, $this->getIdentity()->dealerId, $this->getSelectedClient()->id);\n\n $form = $uploadService->getForm();\n $form->removeElement('goBack');\n\n $form->setAction($this->view->url([], 'rms-upload'));\n\n $this->view->form = $form;\n }",
"function editResourceDirectoryAction() {\n\n if (!in_array(\"upload_resources\", $this->user ['capabilities']))\n $this->apiResult [\"message\"] = \"You are not authorized to perform this task.\\n\";\n else if (empty(trim($_POST ['new_dir_name'])))\n $this->apiResult [\"message\"] = \"Folder Name cannot be empty.\\n\";\n else {\n $res_dir_name = trim($_POST ['new_dir_name']);\n $directory_id = trim($_POST ['directory_id']);\n $resourceModel = new resourceModel();\n if($resourceModel->editResourceDirectory($directory_id,$res_dir_name)) {\n $this->apiResult [\"status\"] = 1;\n $this->apiResult [\"message\"] = \"Folder successfully added\";\n }else {\n \n $this->apiResult [\"status\"] = 0;\n $this->apiResult [\"message\"] = \"Something went wronge\" ;\n }\n }\n }",
"public function fileUploadAction()\n {\n list($model, $field, $itemId) = $this->_getFileParameters();\n\n try {\n $value = Default_Helpers_Upload::uploadFile($model, $field, $itemId);\n } catch (Exception $error) {\n $this->view->errorMessage = $error->getMessage();\n $value = Default_Helpers_Upload::getFiles($model, $field);\n }\n\n $this->_fileRenderView($itemId, $field, $value);\n }",
"static public function setupRoutes() {\n\t\t$application = Nette\\Environment::getApplication();\n\t\t$router = $application->getRouter();\n\t\t\n\t\t$router[] = new Route('files[<'.self::PARAM_NAME.'>]', array(\n\t\t\t\t\t\tself::PARAM_NAME => array(\n\t\t\t\t\t\t\t Route::PATTERN => '/([^/]*/)*[^/]+',\n\t\t\t\t\t\t\t Route::FILTER_IN => null,\n\t\t\t\t\t\t\t Route::FILTER_OUT => null\n\t\t\t\t\t\t),\n\t\t\t\t\t\tRoute::PRESENTER_KEY => 'System:Files',\n\t\t\t\t\t\t'action' => 'default'\n\t\t\t\t\t\t\t )\n\t\t);\n\t}",
"public function upload();",
"public function routeAction() {\n // handle grabbing PUT vars\n $request = $this->getRequest();\n if ($request->isPut()) {\n parse_str($request->getRawBody(), $params);\n foreach ($params as $key => $value) {\n $request->setParam($key, $value);\n }\n }\n\t\t$this->_forward(strtolower($request->getMethod()));\n\t}",
"public function register_importer_routes() {\r\r\n\t\tregister_rest_route(\r\r\n\t\t\tWizard::REST_NAMESPACE, '/import-sample-data/', array(\r\r\n\t\t\t\t'methods' => 'POST',\r\r\n\t\t\t\t'callback' => array( $this, 'pre_import' ),\r\r\n\t\t\t)\r\r\n\t\t);\r\r\n\t}",
"public function uploadFileAction()\n\t{\n\t\t$upload_handler = new Jqueryfileuploader_uploadhandler(\n\t\t\t\tarray(\n\t\t\t\t\t\t'script_url' => PROJECT_URL.'/'.PROJECT_NAME.'development/upload-file',\n\t\t\t\t\t\t'upload_dir' => SERVER_PUBLIC_PATH.'/temp/imagesss/',\n\t\t\t\t\t\t'upload_url' => PUBLIC_PATH.'/temp/imagesss/',\n\t\t\t\t\t\t'user_dirs' => false,\n\t\t\t\t\t\t'mkdir_mode' => 0755,\n\t\t\t\t\t\t'param_name' => 'files',\n\t\t\t\t\t\t// Set the following option to 'POST', if your server does not support\n\t\t\t\t\t\t// DELETE requests. This is a parameter sent to the client:\n\t\t\t\t\t\t'delete_type' => 'DELETE',\n\t\t\t\t\t\t'access_control_allow_origin' => '*',\n\t\t\t\t\t\t'access_control_allow_credentials' => false,\n\t\t\t\t\t\t'access_control_allow_methods' => array(\n\t\t\t\t\t\t\t\t'OPTIONS',\n\t\t\t\t\t\t\t\t'HEAD',\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\t\t'PUT',\n\t\t\t\t\t\t\t\t'PATCH',\n\t\t\t\t\t\t\t\t'DELETE'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'access_control_allow_headers' => array(\n\t\t\t\t\t\t\t\t'Content-Type',\n\t\t\t\t\t\t\t\t'Content-Range',\n\t\t\t\t\t\t\t\t'Content-Disposition'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// Enable to provide file downloads via GET requests to the PHP script:\n\t\t\t\t\t\t// 1. Set to 1 to download files via readfile method through PHP\n\t\t\t\t\t\t// 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache\n\t\t\t\t\t\t// 3. Set to 3 to send a X-Accel-Redirect header for nginx\n\t\t\t\t\t\t// If set to 2 or 3, adjust the upload_url option to the base path of\n\t\t\t\t\t\t// the redirect parameter, e.g. '/files/'.\n\t\t\t\t\t\t'download_via_php' => false,\n\t\t\t\t\t\t// Read files in chunks to avoid memory limits when download_via_php\n\t\t\t\t\t\t// is enabled, set to 0 to disable chunked reading of files:\n\t\t\t\t\t\t'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB\n\t\t\t\t\t\t// Defines which files can be displayed inline when downloaded:\n\t\t\t\t\t\t'inline_file_types' => '/\\.(gif|jpe?g|png)$/i',\n\t\t\t\t\t\t// Defines which files (based on their names) are accepted for upload:\n// \t\t\t\t\t\t'accept_file_types' => '/.+$/i',\n\t\t\t\t\t\t'accept_file_types' => '/\\.(gif|jpe?g|png)$/i',\n\t\t\t\t\t\t// The php.ini settings upload_max_filesize and post_max_size\n\t\t\t\t\t\t// take precedence over the following max_file_size setting:\n\t\t\t\t\t\t'max_file_size' => null,\n\t\t\t\t\t\t'min_file_size' => 1,\n\t\t\t\t\t\t// The maximum number of files for the upload directory:\n\t\t\t\t\t\t'max_number_of_files' => null,\n\t\t\t\t\t\t// Defines which files are handled as image files:\n\t\t\t\t\t\t'image_file_types' => '/\\.(gif|jpe?g|png)$/i',\n\t\t\t\t\t\t// Use exif_imagetype on all files to correct file extensions:\n\t\t\t\t\t\t'correct_image_extensions' => false,\n\t\t\t\t\t\t// Image resolution restrictions:\n\t\t\t\t\t\t'max_width' => null,\n\t\t\t\t\t\t'max_height' => null,\n\t\t\t\t\t\t'min_width' => 1,\n\t\t\t\t\t\t'min_height' => 1,\n\t\t\t\t\t\t// Set the following option to false to enable resumable uploads:\n\t\t\t\t\t\t'discard_aborted_uploads' => true,\n\t\t\t\t\t\t// Set to 0 to use the GD library to scale and orient imagess,\n\t\t\t\t\t\t// set to 1 to use imagick (if installed, falls back to GD),\n\t\t\t\t\t\t// set to 2 to use the ImageMagick convert binary directly:\n\t\t\t\t\t\t'image_library' => 1,\n\t\t\t\t\t\t// Uncomment the following to define an array of resource limits\n\t\t\t\t\t\t// for imagick:\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t 'imagick_resource_limits' => array(\n\t\t\t\t\t\t \t\timagick::RESOURCETYPE_MAP => 32,\n\t\t\t\t\t\t \t\timagick::RESOURCETYPE_MEMORY => 32\n\t\t\t\t\t\t ),\n\t\t\t\t*/\n\t\t\t\t\t\t// Command or path for to the ImageMagick convert binary:\n\t\t\t\t\t\t'convert_bin' => 'convert',\n\t\t\t\t\t\t// Uncomment the following to add parameters in front of each\n\t\t\t\t\t\t// ImageMagick convert call (the limit constraints seem only\n\t\t\t\t\t\t// to have an effect if put in front):\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t 'convert_params' => '-limit memory 32MiB -limit map 32MiB',\n\t\t\t\t*/\n\t\t\t\t\t\t// Command or path for to the ImageMagick identify binary:\n\t\t\t\t\t\t'identify_bin' => 'identify',\n\t\t\t\t\t\t'image_versions' => array(\n\t\t\t\t\t\t\t\t// The empty image version key defines options for the original image:\n\t\t\t\t\t\t\t\t'' => array(\n\t\t\t\t\t\t\t\t\t\t// Automatically rotate imagess based on EXIF meta data:\n\t\t\t\t\t\t\t\t\t\t'auto_orient' => true\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t// Uncomment the following to create medium sized imagess:\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t 'medium' => array(\n\t\t\t\t\t\t\t\t \t\t'max_width' => 800,\n\t\t\t\t\t\t\t\t \t\t'max_height' => 600\n\t\t\t\t\t\t\t\t ),\n\t\t\t\t*/\n\t\t\t\t\t\t\t\t'thumbnail' => array(\n\t\t\t\t\t\t\t\t\t\t// Uncomment the following to use a defined directory for the thumbnails\n\t\t\t\t\t\t\t\t\t\t// instead of a subdirectory based on the version identifier.\n\t\t\t\t\t\t\t\t\t\t// Make sure that this directory doesn't allow execution of files if you\n\t\t\t\t\t\t\t\t\t\t// don't pose any restrictions on the type of uploaded files, e.g. by\n\t\t\t\t\t\t\t\t\t\t// copying the .htaccess file from the files directory for Apache:\n\t\t\t\t\t\t\t\t\t\t//'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/',\n\t\t\t\t\t\t\t\t\t\t//'upload_url' => $this->get_full_url().'/thumb/',\n\t\t\t\t\t\t\t\t\t\t// Uncomment the following to force the max\n\t\t\t\t\t\t\t\t\t\t// dimensions and e.g. create square thumbnails:\n\t\t\t\t\t\t\t\t\t\t'crop' => true,\n\t\t\t\t\t\t\t\t\t\t'max_width' => 80,\n\t\t\t\t\t\t\t\t\t\t'max_height' => 80\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'print_response' => true\n\t\t\t\t)\n\t\t\t);\n\t\tdie;\n\t}",
"private function __common_remote_file_upload() {\n\t\t$url = $this->request->query ['url'];\n\t\t\n\t\t$sub_folder_path = $this->request->query ['sub_folder_path'];\n\t\t$document_type = isset ( $this->request->query ['document_type'] ) ? $this->request->query ['document_type'] : '';\n\t\t$url_upload_sql_no = isset ( $this->request->query ['url_upload_sql_no'] ) ? $this->request->query ['url_upload_sql_no'] : '';\n\t\t$client_role_id = isset ( $this->request->query ['client_role_id'] ) ? $this->request->query ['client_role_id'] : '';\n\t\t\n\t\t$upload_dir = $this->__getUploadDirPath ( $sub_folder_path );\n\t\t// by default we accept only images\n\t\t$accept_file_types = $this->__getAcceptedDocumentTypes ( $document_type );\n\t\t\n\t\t$options = array (\n\t\t\t\t'url' => $url,\n\t\t\t\t'upload_dir' => $upload_dir,\n\t\t\t\t'accept_file_types' => $accept_file_types,\n\t\t\t\t'upload_url' => $upload_dir,\n\t\t\t\t'client_role_id' => $client_role_id,\n\t\t\t\t'url_upload_sql_no' => $url_upload_sql_no,\n\t\t\t\t'max_file_size' => $this->MAX_FILE_SIZE_ALLOWED_IN_BYTES ,\n\t\t\t\t'document_type'=>$document_type\n\t\t);\n \n if(isset($data['contract_of_sale']))\n $options['contract_of_sale'] =$data['contract_of_sale']; \n \n\t\t$this->RemoteFileUpload->upload_remote_file ( $options );\n\t}",
"public function normaVraPinjamAction()\n {\n $params = $this->_request->getParams();\n $result = $this->_model->uploadNormaVraPinjam($params);\n\n $this->resultAction($result);\n }",
"public function actionUpload()\n\t{ \n \n if (isset($_FILES['uploadvideo'])) {\n // Call BlackBox function - FileHandler\n $new = new FileHandler(NULL);\n $new->handleVideo($_FILES['uploadvideo']);\n }\n \n if (isset($_FILES['uploadimage'])) {\n $new = new FileHandler(NULL);\n $new->handleImage($_FILES['uploadimage']);\n\n }\n $this->render('//survey/upload', array('model' => $model)); \n \n \n\t}",
"public function upload()\n {\n }",
"public function upload_to_crm()\n {\n $options = array_filter(get_option(static::$option_key));\n\n $this->customers->customersUpload();\n $this->orders->ordersUpload();\n\n $options['uploads'] = static::YES;\n update_option(static::$option_key, $options);\n }",
"function gtfs_manager_route_stops_upload_form($form, &$form_state, $route) {\n\n $form_state['route'] = $route;\n\n $form['gtfs_manager_stops_file_upload'] = array(\n '#title' => t('Upload file'),\n '#type' => 'file',\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Submit'\n );\n\n return $form;\n\n}",
"public function uploader_action() {\r\n\t\tMainWP_Child_Misc::get_instance()->uploader_action();\r\n\t}",
"function disallowed_uploads(){\n if(!is_array($this->disallowed)){\n $this->Session->setFlash('The disallowed files have all been processed. There are no more disallowed files in the Upload folder.');\n $this->redirect(array('action'=>'search'));\n }\n if (isset($this->request->data)){\n debug($this->request->data);die;\n }\n $this->layout = 'noThumbnailPage';\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$_responsableproceso = ($usuario_id == Yii::$app>user>identity>id_usuario) ? TRUE:FALSE; | protected function showEdicionactividad($usuario_id,$id_cproceso){
$facade = new DetallepqrsControllerFachada;
$_getresponsable = $facade->asignado_actividad($id_cproceso, '1');
$_responsableactividad = ($_getresponsable == Yii::$app->user->identity->id_usuario) ? TRUE:FALSE;
if($_responsableactividad === TRUE){
return TRUE;
}else{
return FALSE;
}
} | [
"function isActivo($usuario)\n{\n // El usuario siempre estara activo\n $activacion = 1;\n\n if ($activacion == 1) {\n return true;\n } else {\n return false;\n }\n}",
"function checkUserAutority() {\r\n include \"/home/cypress/www/htdocs/fear-the-end-secrets/sqlConnect.php\";\r\n $projectManager = new ProjectManager($db);\r\n $memberManager = new MemberManager($db);\r\n $project = $projectManager->getProjectById($_GET['id']);\r\n $isDeveloper = false;\r\n $userArrayOnProject = $memberManager->getMembreByProject($project->getId());\r\n for ($i = 0; $i < count($userArrayOnProject); $i++) {\r\n if ($_SESSION['loggedUserObject'] != null && ($userArrayOnProject[$i]->getId() == unserialize($_SESSION['loggedUserObject'])->getId()) && ($userArrayOnProject[$i]->getFunction() == \"Developer\")) {\r\n $isDeveloper = true;\r\n }\r\n }\r\n\r\n $res = false;\r\n if (($_SESSION['loggedUserObject'] != null && unserialize($_SESSION['loggedUserObject'])->getId() == $project->getFk_auteur()) || $isDeveloper) {\r\n $res = true;\r\n } else {\r\n $res = false;\r\n }\r\n return $res;\r\n}",
"public function showButtonAsignarme(){\n \n $usuariosResponsables = ArrayHelper::map($this->ordenesTrabajo->usuarioOrdenTrabajo, 'id_usuario', 'id_usuario');\n $usuarioActual = User::getCurrentUserId();\n \n return ( \n Permiso::esUsuarioOperador() && \n !($this->_estoyAsignado()) &&\n in_array($usuarioActual, $usuariosResponsables)\n );\n }",
"function verifica_usuario(){\n\t\t\t\t\n\t\tif(isset($_SESSION['tipoid'])){\n\t\t\t\n\t\t\trequire_once 'recursos/conexion.php';\n\t\t\t$idconexion=ConectarServidor();\n\t\t\t\n\t\t\t$tipoid=$_SESSION['tipoid'];\n\t\t\t$sql=\"SELECT * FROM tbl_tipousuario WHERE TipoID='$tipoid'\";\n\t\t\t$query_tipo_select=mysqli_query($idconexion,$sql) or die (\"Error al seleccionar\"\n\t\t\t.\"tipo de usuario\".mysqli_error($idconexion));\n\t\t\t\n\t\t\t$dato_tipo=mysqli_fetch_array($query_tipo_select);\n\t\t\t$tipo_usuario=$dato_tipo['Nombre'];\n\t\t\t\n\t\t\t\tif($tipo_usuario==\"Administraccion\"){\n\t\t\t\t\t\t\t\n\t\t\t\t\t$privilegio=2;\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$privilegio=1;\n\t\t\t\t}\n\t\t\t\treturn $privilegio;\t\n\t\t}\n\t\t\n\t\tmysqli_close($idconexion);\n\t\t\n\t}",
"public function esVerificado(){\n return $this->verificado == User::USUARIO_VERIFICADO;\n }",
"function utilisateurEstAdmin ()\n{\n\t\n\treturn(utilisateurEstConnecte() AND $_SESSION['user']['statut'] == 'ADM')? true : false;\n\n}",
"public function estaLogueado() {\n return isset($_SESSION[\"idUser\"]);\n }",
"function utilisateurEstAdmin () {\n\t\n\treturn(utilisateurEstConnecte() && $_SESSION['utilisateur']['statut'] == 1)? true : false;\n\n}",
"public function FN_Verificacion_Cuenta()\r\n{\r\n //Si no existe la sesion\r\n $PK_ID_Usuario = Sesion::getValue( 'PK_ID_Usuario' );\r\n $Verificacion_Cuenta = $this->_Mdl_Usuario->FN_Verificacion_Cuenta\r\n ( $PK_ID_Usuario );\r\n if($Verificacion_Cuenta)\r\n {\r\n echo \"Cuenta_No_Verifica\";\r\n }\r\n else\r\n {\r\n echo \"Verificada\";\r\n }\r\n}",
"static function esCliente()\n\t{\n\t\tif( isset($_SESSION['permisos']) && $_SESSION['permisos'] == 'cliente' )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\t\n\t}",
"function es_actualizador() {\n\tglobal $zerdb;\n\tif( ! sesion_iniciada() )\n\t\treturn;\n\n\t$u = obt_usuario_actual();\n\t$id = $u->id;\n\n\t$u = @new extraer($zerdb->usuarios, \"rango\", array(\"id\" => $id) );\n\n\treturn true == ( (int) $u->rango == 3 || es_admin() );\n}",
"protected function esEntrenador(){\n\t\t$stmt = $this->db->prepare(\"SELECT dniEntrenador FROM entrenador WHERE dniEntrenador=?\");\n\t\t$stmt->execute(array($_SESSION[\"currentuser\"]));\n\t\tif ($stmt->fetchColumn() > 0) {\n \t return true;\n\t\t}\n\t\treturn false;\n\t}",
"function isPO($id){\n\t\tglobal $TableProjetGlob;\n\t\t$idProjet = intval($id);\n\t\t$idUser = $_SESSION['id'];\n\t\tif(isConnected()){\n\t\t\t$query = \"SELECT ProductOwner FROM $TableProjetGlob WHERE $idProjet = id AND $idUser = productowner\";\n\t\t\t$result = launchQuery($query);\n\t\t\t$row = mysqli_fetch_array($result,MYSQLI_NUM);\n\t\t\t\tif($_SESSION['id'] == $row[0]){\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t} \n\t\treturn FALSE;\n\t}",
"public function isInscrit(){\r\n $retour = false ;\r\n $pseudo = $this -> getPseudo();\r\n\tif(!empty($pseudo)){\r\n\t$q = \"select User_inscrit as i from UserTab where User_pseudo = '\".$pseudo.\"'\";\r\n\t$res = execute($q) ;\r\n\t\twhile($l = mysql_fetch_assoc($res)){\r\n\t\t if($l['i'] == 1) $retour = true ;\r\n\t\t}\r\n\t}\r\n \r\n return $retour ;\r\n\r\n }",
"public function inactivarPresupuesto($conn, $conexion)\r\n {\r\n \r\n $idPresupuesto = $_SESSION['idPresupuesto'];\r\n \r\n $tableName = 'presupuestos_detalle';\r\n \r\n $arregloCondition = ['id_presupuesto_detalle' => $idPresupuesto];\r\n \r\n \r\n $arregloDatos['inactivo'] = 1;\r\n\r\n\r\n \r\n\r\n $conexion = new ConexionController();\r\n\r\n $conn = $conexion->initConectar('db');\r\n \r\n $conn->open();\r\n\r\n \r\n\r\n if ($conexion->modificarRegistro($conn, $tableName, $arregloDatos, $arregloCondition)){\r\n\r\n \r\n\r\n return true;\r\n \r\n }\r\n\r\n }",
"function isAdmin(){\r\n if( isConnected() && $_SESSION['membre']['statut'] == 1){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n}",
"public function estApprobateur(){\n return $this -> estIdentifié() && $this -> approbateur;\n }",
"function isPrimaryUser(){\n global $session;\n return $session->userrol==1;\n}",
"public function isClient(){\n return boolval(Clients::findOne(['user_id' => $this->id]));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the values of all options. Lazy options are evaluated at this point. | public function all()
{
$this->reading = true;
// Performance-wise this is slightly better than
// while (null !== $option = key($this->lazy))
foreach ($this->lazy as $option => $closures) {
// Double check, in case the option has already been resolved
// by cascade in the previous cycles
if (isset($this->lazy[$option])) {
$this->resolve($option);
}
}
foreach ($this->normalizers as $option => $normalizer) {
if (isset($this->normalizers[$option])) {
$this->normalize($option);
}
}
return $this->options;
} | [
"public function getAll()\n\t{\n\t\treturn static::$options;\n\t}",
"public function getOptionValues();",
"public function getOptions(): iterable;",
"public function getOptionValues()\n {\n return $this->option_values;\n }",
"public function getAllOptions()\n {\n return $this->options;\n }",
"public function getAll()\n {\n return $this->options;\n }",
"public function get_options() {\n\t\treturn $this->load_options();\n\t}",
"public function getAllOptions()\n {\n return $this->toOptionArray();\n }",
"public function options()\n {\n if ( ! is_null($this->options))\n {\n return $this->options;\n }\n\n $options = [];\n\n $dbOptions = Option::select('key', 'value')->where('user_id', '=', $this->user->id)->get();\n foreach ($dbOptions as $option)\n {\n $options[$option->key] = $option->value;\n }\n\n return $this->options = $options;\n }",
"function getAllOptions(){\n return self::mergeArray($this->defaultOptions,$this->requestOptions);\n }",
"protected function getAllOptions()\n {\n $this->methodExpectsRequest(__METHOD__);\n $options = $this->getRequest()->getAllOptions();\n foreach ($this->getRequest()->getAllFlags() as $name => $value) {\n $options[$this->flags_option_name[$name]] = $value;\n }\n return $options;\n }",
"public function get_options() {\n\t\treturn array_merge($this->default_options, $this->options);\n\t}",
"public function get_options() {\n return array_merge($this->default_options, $this->options);\n }",
"public function get_options() {\n\t\treturn $this->options;\n\t\t//TODO: Return copy of array\n\t}",
"public function getOptions() {\r\n return $this->options;\r\n }",
"public function allOptionsInArray()\n {\n $output = array();\n\n $options = get_option($this->args['ID']);\n\n foreach ($this->filterForExport($this->args['fields']) as $field) {\n if (isset($options[$field['id']])) {\n $output[$field['id']] = $options[$field['id']];\n } else if (isset($field['std'])) {\n $output[$field['id']] = $field['std'];\n }\n }\n return $output;\n }",
"abstract public function getOptionsSet();",
"function yourls_get_all_options() {\n\tglobal $ydb;\n\n\t// Allow plugins to short-circuit all options. (Note: regular plugins are loaded after all options)\n\t$pre = yourls_apply_filter( 'shunt_all_options', false );\n\tif ( false !== $pre )\n\t\treturn $pre;\n\n\t$table = YOURLS_DB_TABLE_OPTIONS;\n\t\n\t$allopt = $ydb->get_results( \"SELECT `option_name`, `option_value` FROM `$table` WHERE 1=1\" );\n\t\n\tforeach( (array)$allopt as $option ) {\n\t\t$ydb->option[ $option->option_name ] = yourls_maybe_unserialize( $option->option_value );\n\t}\n\n\tif( property_exists( $ydb, 'option' ) ) {\n\t\t$ydb->option = yourls_apply_filter( 'get_all_options', $ydb->option );\n\t\t$ydb->installed = true;\n\t} else {\n\t\t// Zero option found: either YOURLS is not installed or DB server is dead\n if( !yourls_is_db_alive() ) {\n yourls_db_dead(); // YOURLS will die here\n }\n $ydb->installed = false;\n\t}\n}",
"public function getValueOptions() {\n\n if (isset($this->valueOptions)) {\n return $this->valueOptions;\n }\n\n //@todo: implement the below code, and remove the line from init.\n // @todo: follow Options patterns\n // @see callback_allowed_values_function()\n // @see options_allowed_values()\n\n return parent::getValueOptions();\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements hook_form() This form builds a guided tour. | function bootstrap_tour_configure_form($form, &$form_state) {
$tour = null;
if (is_numeric(arg(5)))
$tour = _bootstrap_tour_get_data(arg(5));
$options = _bootstrap_tour_generate_entity_selector();
if (!isset($form_state['storage']['guided tours']['steps'])) {
if (is_object($tour))
$form_state['storage']['guided tours']['steps'] = count($tour->configuration['steps']);
else
$form_state['storage']['guided tours']['steps'] = 1;
}
if (!isset($form_state['storage']['guided tours']['tooltips'])) {
if (is_object($tour)) {
foreach ($tour->configuration['steps'] as $i => $step) {
$form_state['storage']['guided tours']['tooltips'][$i] = count($step['tooltips']);
}
} else {
$form_state['storage']['guided tours']['tooltips'][0] = 1;
}
}
if (!isset($form_state['storage']['guided tours']['modified step']))
$form_state['storage']['guided tours']['modified step'] = -1;
if (!isset($form_state['storage']['guided tours']['modified tooltip']))
$form_state['storage']['guided tours']['modified tooltip'] = -1;
// Build steps and tooltips
$steps = array();
for ($i = 0; $i < $form_state['storage']['guided tours']['steps']; $i++) {
$tooltips = array();
// Determine wether this step has to be collapsed or not
$step_collapsed = true;
if ($i == $form_state['storage']['guided tours']['modified step'])
$step_collapsed = false;
// Build tooltips for specific step
for ($o = 0; $o < $form_state['storage']['guided tours']['tooltips'][$i]; $o++) {
// Determine wether or not this tooltip has to be collapsed or not
$tooltip_collapsed = true;
if ($i == $form_state['storage']['guided tours']['modified step'] && $o == $form_state['storage']['guided tours']['modified tooltip'])
$tooltip_collapsed = true;
// Build tooltip
$tooltips[$o] = array(
'#type' => 'fieldset',
'#collapsible' => true,
'#collapsed' => $tooltip_collapsed,
'#title' => t('Tooltip #!number', array('!number' => $o + 1)),
'content' => array(
'#type' => 'textarea',
'#title' => t('Content'),
'#description' => t('The content of the tooltip. Can contain HTML.'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['content'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['content'] : '',
),
'selector' => array(
'#type' => 'textfield',
'#title' => t('Selector for target element'),
'#description' => t('The selector for the target element as used in jQuery().'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['selector'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['selector'] : '',
),
'position_on_tooltip' => array(
'#type' => 'textfield',
'#title' => t('Position of arrow on tooltip'),
'#description' => t('See <a href="@url">qTip2 documentation</a> for possible values!', array('@url' => url('http://craigsworks.com/projects/qtip2/docs/position/#my'))),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['position_on_tooltip'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['position_on_tooltip'] : 'top center',
),
'position_on_target' => array(
'#type' => 'textfield',
'#title' => t('Position of arrow on target element'),
'#description' => t('See <a href="@url">qTip2 documentation</a> for possible values!', array('@url' => url('http://craigsworks.com/projects/qtip2/docs/position/#at'))),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['position_on_target'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['position_on_target'] : 'bottom center',
),
'fixed' => array(
'#type' => 'radios',
'#title' => t('Tooltip has property "fixed"'),
'#description' => t('Wether or not the tooltip is "fixed" on the page. If it is not fixed, it moves with the content.'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['fixed'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['fixed'] : 0,
'#options' => array(
1 => t('Yes'),
0 => t('No'),
),
),
'hide_on_click' => array(
'#type' => 'radios',
'#title' => t('Tooltip hides on click'),
'#description' => t('Wether or not the tooltip hides if clicked.'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['hide_on_click'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['hide_on_click'] : 0,
'#options' => array(
1 => t('Yes'),
0 => t('No'),
),
),
'dynamic' => array(
'#type' => 'fieldset',
'#title' => t('Dynamic behaviour'),
'#collapsible' => true,
'#collapsed' => true,
'enabled' => array(
'#type' => 'radios',
'#title' => t('Enable dynamic behaviour?'),
'#description' => t('Be aware that the position of the arrow on the tooltip can not be changed due to limitations in qTip.'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['enabled'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['enabled'] : 0,
'#options' => array(
1 => t('Yes'),
0 => t('No'),
),
),
'event' => array(
'#type' => 'textfield',
'#title' => t('Event'),
'#description' => t('Event on the original element on which the tooltip should move to another element.'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['event'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['event'] : '',
),
'content' => array(
'#type' => 'textarea',
'#title' => t('Content after event'),
'#description' => t('The content of the tooltip after the event. Can contain HTML.'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['content'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['content'] : '',
),
'selector' => array(
'#type' => 'textfield',
'#title' => t('Selector for target of new element'),
'#description' => t('The selector for the new target element after the event as used in jQuery().'),
'#default_value' => (isset($tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['selector'])) ? $tour->configuration['steps'][$i]['tooltips'][$o]['dynamic']['selector'] : '',
),
)
);
}
// Build step
if ($i == 0) {
$steps[$i]['location'] = array(
'#type' => 'fieldset',
'#collapsible' => true,
'#title' => t('Location of that step'),
'disclaimer' => array(
'#type' => 'item',
'#markup' => t('The location of the first step is always the homepage of drupal.'),
),
);
} else {
$steps[$i]['location'] = array(
'#type' => 'fieldset',
'#collapsible' => true,
'#title' => t('Location of that step'),
'#description' => t('Set on which location this step shall occurr. Either you can choose the entity type (and appropriate bundle) or you can provide a regular expression that matches the locations address.'),
'switch' => array(
'#type' => 'radios',
'#options' => array(
'entity' => t('Entity type (and bundle)'),
'address' => t('Address')
),
'#default_value' => (isset($tour->configuration['steps'][$i]['location']['switch'])) ? $tour->configuration['steps'][$i]['location']['switch'] : 'address',
'#description' => t('Select which method you want to use!'),
'#title' => t('Location switch'),
),
'entity' => array(
'#type' => 'select',
'#title' => t('Entity type (and bundle)'),
'#description' => t('You can either just choose an entity type or you can be more specific by selecting a specific bundle of an entity type.'),
'#options' => $options,
'#default_value' => (isset($tour->configuration['steps'][$i]['location']['entity'])) ? $tour->configuration['steps'][$i]['location']['entity'] : 'ignore',
),
'address' => array(
'#type' => 'textfield',
'#title' => t('Address'),
'#description' => t('A regular expression that matches the address on which this step shall occurr. See <a href="@url">PHP documentation</a> for syntax!', array('@url' => url('http://de3.php.net/manual/en/function.preg-match.php'))),
'#default_value' => (isset($tour->configuration['steps'][$i]['location']['address'])) ? $tour->configuration['steps'][$i]['location']['address'] : '',
),
);
}
$steps[$i] += array(
'#type' => 'fieldset',
'#collapsible' => true,
'#collapsed' => $step_collapsed,
'#title' => t('Step #!number', array('!number' => $i + 1)),
'#required' => true,
'tooltips' => $tooltips,
'add-tooltip-' . $i => array(
'#type' => 'submit',
'#value' => t('Add tooltip to step #!amount', array('!amount' => $i + 1)),
'#submit' => array('bootstrap_tour_configure_add_tooltip_submit'),
'#ajax' => array(
'callback' => '_bootstrap_tour_configure_rebuild_configuration',
'effect' => 'fade',
'method' => 'replace',
'progress' => array(
'type' => 'throbber',
),
'wrapper' => 'guided-tours-step-rapper',
),
'#attributes' => array('style' => 'background: #0a0; color: #fff;'),
),
);
// Add "remove tooltip" button if needed
if (count(element_children($steps[$i]['tooltips'])) > 1)
$steps[$i]['remove-tooltip-' . $i] = array(
'#type' => 'submit',
'#value' => t('Remove last tooltip from step #!amount', array('!amount' => $i + 1)),
'#submit' => array('bootstrap_tour_configure_remove_tooltip_submit'),
'#ajax' => array(
'callback' => '_bootstrap_tour_configure_rebuild_configuration',
'effect' => 'fade',
'method' => 'replace',
'progress' => array(
'type' => 'throbber',
),
'wrapper' => 'guided-tours-step-rapper',
),
'#attributes' => array('style' => 'background: #a00; color: #fff;'),
);
}
// Build form
$form = array(
'title' => array(
'#type' => 'textfield',
'#title' => t('Title of guided tour'),
'#required' => true,
),
'visible' => array(
'#type' => 'radios',
'#title' => t('Visibility of guided tour'),
'#options' => array(1 => t('Visible'), 0 => t('Invisible')),
'#description' => t('Wether the tour is visible or not.'),
'#default_value' => 0,
'#required' => true,
),
'description' => array(
'#type' => 'textarea',
'#title' => t('Description of guided tour'),
),
'configuration' => array(
'#type' => 'fieldset',
'#collapsible' => true,
'#title' => t('Configuration'),
'#prefix' => '<div class="clearfix" id="guided-tours-step-rapper">',
'#suffix' => '</div>',
'#required' => true,
'#tree' => true,
'steps' => $steps,
'add_step' => array(
'#type' => 'submit',
'#value' => t('Add step'),
'#submit' => array('bootstrap_tour_configure_add_step_submit'),
'#ajax' => array(
'callback' => '_bootstrap_tour_configure_rebuild_configuration',
'effect' => 'fade',
'method' => 'replace',
'progress' => array(
'type' => 'throbber',
),
'wrapper' => 'guided-tours-step-rapper',
),
'#attributes' => array('style' => 'background: #0a0; color: #fff;'),
),
),
'submit' => array(
'#type' => 'submit',
'#value' => t('Save'),
),
);
// Add "remove step" button if needed
if (count(element_children($form['configuration']['steps'])) > 1)
$form['configuration']['remove_step'] = array(
'#type' => 'submit',
'#value' => t('Remove step'),
'#submit' => array('bootstrap_tour_configure_remove_step_submit'),
'#ajax' => array(
'callback' => '_bootstrap_tour_configure_rebuild_configuration',
'effect' => 'fade',
'method' => 'replace',
'progress' => array(
'type' => 'throbber',
),
'wrapper' => 'guided-tours-step-rapper',
),
'#attributes' => array('style' => 'background: #a00; color: #fff;'),
);
if (isset($tour) && is_object($tour)) {
$form['title']['#default_value'] = $tour->title;
$form['description']['#default_value'] = $tour->description;
$form['visible']['#default_value'] = $tour->visible;
}
return $form;
} | [
"function &buildForm();",
"public function buildForm();",
"public function output_setup_form() {\n\t\t$this->output_controls_html( 'wordpress' );\n\t}",
"public function buildForm()\n {\n $this\n ->add('value', 'text', ['label' => trans('elementForm.value')])\n ->addCollection('location', 'Activity\\TargetLocation', 'target_location', [], trans('elementForm.location'))\n ->addAddMoreButton('add_target_location', 'target_location')\n ->addCollection('dimension', 'Activity\\TargetDimension', 'target_dimension', [], trans('elementForm.dimension'))\n ->addAddMoreButton('add_target_dimension', 'target_dimension')\n ->addComments();\n }",
"function timetracking_form_wrapper($timetracking) {\n // Add the breadcrumb for the form's location.\n timetracking_set_breadcrumb();\n return drupal_get_form('timetracking_edit_form', $timetracking);\n}",
"public function output_setup_form() {\n\t\t$this->output_controls_html( 'webinarjamstudio' );\n\t}",
"public function buildStepFormElements();",
"function ding_navigation_box_plugin_form($form, &$form_state) {\n\treturn $form;\n}",
"protected function build_move_form()\r\n\t{\r\n\t\t$renderer =& $this->defaultRenderer();\r\n\t\t$renderer->setElementTemplate('<span>{element}</span> ');\r\n\t\t$this->addElement('static', null, null, '\"'.$this->evaluation_object->get_name().'\" ');\r\n\t\t$this->addElement('static', null, null, get_lang('MoveTo').' : ');\r\n\t\t$select= $this->addElement('select', 'move_cat', null, null);\r\n\t\tforeach ($this->evaluation_object->get_target_categories() as $cat)\r\n\t\t{\r\n\t\t\tfor ($i= 0; $i < $cat[2]; $i++)\r\n\t\t\t{\r\n\t\t\t\t$line .= '—';\r\n\t\t\t}\r\n\t\t\t$select->addoption($line . ' ' . $cat[1], $cat[0]);\r\n\t\t\t$line= '';\r\n\t\t}\r\n\t\t$this->addElement('submit', null, get_lang('Ok'));\r\n\t}",
"public function wizardForm()\n {\n $sidebar = new MenuController();\n $user = $sidebar->maerialUserData();\n $items = $sidebar->materialMenu();\n return view('material.forms.wizard', compact('items', 'user'));\n }",
"function form_donate_tutorial_6($form, &$form_state) {\n $form['description'] = array(\n '#type' => 'item',\n '#title' => t('A form with a validation handler'),\n );\n\n $form['name'] = array(\n '#type' => 'fieldset',\n '#title' => t('Name'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n $form['name']['first'] = array(\n '#type' => 'textfield',\n '#title' => t('First name'),\n '#required' => TRUE,\n '#default_value' => \"First name\",\n '#description' => \"Please enter your first name.\",\n '#size' => 20,\n '#maxlength' => 20,\n );\n $form['name']['last'] = array(\n '#type' => 'textfield',\n '#title' => t('Last name'),\n '#required' => TRUE,\n );\n\n // New form field added to permit entry of year of birth.\n // The data entered into this field will be validated with\n // the default validation function.\n $form['year_of_birth'] = array(\n '#type' => 'textfield',\n '#title' => \"Year of birth\",\n '#description' => 'Format is \"YYYY\"',\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Submit',\n );\n return $form;\n}",
"final public function definition() {\n\n $mform = $this->_form;\n $mform->setDisableShortforms();\n\n $step = $this->step;\n $mform->addElement('header', 'stepname', get_string($step::NAME, 'udmworkshop'));\n $this->step_definition();\n $this->add_action_buttons();\n\n }",
"function alterForm();",
"public function options_form() {}",
"public function step_definition() {\n global $DB, $USER;\n $mform = $this->_form;\n $record = $this->workshop->get_record();\n // Summary container.\n $mform->addElement('html', \\html_writer::start_div('wizard-summary'));\n\n // Assessment type.\n if ($record->assessmenttype == \\workshop::PEER_ASSESSMENT) {\n $assessmenttype = get_string('peerassessment', 'udmworkshop');\n } else if ($record->assessmenttype == \\workshop::SELF_ASSESSMENT) {\n $assessmenttype = get_string('selfassessment', 'udmworkshop');\n } else if ($record->assessmenttype == \\workshop::SELF_AND_PEER_ASSESSMENT) {\n $assessmenttype = get_string('selfandpeerassessment', 'udmworkshop');\n }\n $mform->addElement('static', 'summary_assessmenttype', get_string('assessmenttype', 'udmworkshop'), $assessmenttype);\n\n // Grading method.\n $strategieslist = \\workshop::available_strategies_list();\n $gradingmethod = $strategieslist[$record->strategy];\n $mform->addElement('static', 'summary_strategy', get_string('strategy', 'udmworkshop'), $gradingmethod);\n\n // Allow submission.\n if ($record->allowsubmission == 1) {\n $mform->addElement('static',\n 'summary_allowsubmission', get_string('allowsubmission', 'udmworkshop'), get_string('yes'));\n }\n\n // Submission start.\n if ($record->submissionstart != 0) {\n $strdatestring = get_string('strftimerecentfull', 'langconfig');\n $date = userdate($record->submissionstart, $strdatestring);\n $mform->addElement('static', 'summary_submissionstart', get_string('submissionstart', 'udmworkshop'), $date);\n }\n\n // Submissions deadline.\n if ($record->submissionend != 0) {\n $strdatestring = get_string('strftimerecentfull', 'langconfig');\n $date = userdate($record->submissionend, $strdatestring);\n $mform->addElement('static', 'summary_submissionend', get_string('submissionend', 'udmworkshop'), $date);\n }\n\n // Phase switch assessment.\n if ($record->submissionend != 0 && $record->phaseswitchassessment != 0) {\n $mform->addElement('static',\n 'summary_switchassessment', get_string('submissionendswitch', 'udmworkshop'), get_string('yes'));\n }\n\n // Allow assessment after submission.\n if ($record->assessassoonsubmitted != 0) {\n $mform->addElement('static',\n 'summary_assessassoonsubmitted', get_string('assessassoonsubmitted', 'udmworkshop'), get_string('yes'));\n }\n\n // Peer allocation.\n $userplan = new \\workshop_user_plan($this->workshop, $USER->id);\n $phase = \\workshop::PHASE_SUBMISSION;\n if (!isset($userplan->phases[\\workshop::PHASE_SUBMISSION])) {\n $phase = \\workshop::PHASE_SETUP;\n }\n if (isset($userplan->phases[$phase])\n && isset($userplan->phases[$phase]->tasks)\n && isset($userplan->phases[$phase]->tasks['allocate'])) {\n $details = $userplan->phases[$phase]->tasks['allocate']->details;\n $mform->addElement('static', 'summary_peerallocationdetails', get_string('allocate', 'udmworkshop'), $details);\n }\n\n // Anonymity.\n if (!$this->workshop->is_self_assessment_type()) {\n $anonymitysettings = new \\mod_udmworkshop\\anonymity_settings($this->workshop->context);\n // Display appraisees name.\n if (!empty($record->allowsubmission)) {\n $yesno = ($anonymitysettings->display_appraisees_name()) ? get_string('yes') : get_string('no');\n $label = get_string('displayappraiseesname', 'udmworkshop');\n $mform->addElement('static', 'summary_displayappraiseesname', $label, $yesno);\n }\n // Display appraisers name.\n $yesno = ($anonymitysettings->display_appraisers_name()) ? get_string('yes') : get_string('no');\n $label = get_string('displayappraisersname', 'udmworkshop');\n $mform->addElement('static', 'summary_displayappraisersname', $label, $yesno);\n // Assess without submission.\n if ($record->allowsubmission) {\n $yesno = $record->assesswithoutsubmission ? get_string('yes') : get_string('no');\n $mform->addElement('static',\n 'summary_assesswithoutsubmission', get_string('assesswithoutsubmission', 'udmworkshop'), $yesno);\n }\n }\n\n // Assessment start.\n if ($record->assessmentstart != 0) {\n $strdatestring = get_string('strftimerecentfull', 'langconfig');\n $date = userdate($record->assessmentstart, $strdatestring);\n $mform->addElement('static', 'summary_assessmentstart', get_string('assessmentstart', 'udmworkshop'), $date);\n }\n\n // Assessment end.\n if ($record->assessmentend != 0) {\n $strdatestring = get_string('strftimerecentfull', 'langconfig');\n $date = userdate($record->assessmentend, $strdatestring);\n $mform->addElement('static', 'summary_assessmentend', get_string('assessmentend', 'udmworkshop'), $date);\n }\n\n $mform->addElement('html', \\html_writer::end_div());\n\n }",
"function vacuspeed_tool_tiling_form_submit($form, &$form_state) {\n // initialize order page data\n $session_data = &vacuspeed_tool_session_data();\n $session_data['thickness_layer_1'] = 0;\n $session_data['thickness_layer_2'] = 0;\n\n // redirect to order page\n $form_state['redirect'] = array(\n 'layout/order',\n );\n}",
"function buildForm()\r\n {\r\n $this->addElement('static', '', '', $this->message);\r\n $prevnext[] = & $this->createElement('submit', $this->getButtonName('next'), Translation :: get('Next', null, Utilities :: COMMON_LIBRARIES) . ' >>');\r\n $this->addGroup($prevnext, 'buttons', '', ' ', false);\r\n $this->setDefaultAction('next');\r\n $this->_formBuilt = true;\r\n }",
"public function buildForm()\n {\n $this->addResults();\n }",
"function publish_obituary_advertiser_details_form($form, &$form_state) {\n global $user;\n $user = user_load($user->uid);\n \n $values = isset($form_state['multistep_values']['advertiser_details']) ? $form_state['multistep_values']['advertiser_details'] : array();\n \n $form['form_title'] = array(\n '#markup' => '<h2>Advertiser Details</h2>',\n '#suffix' => '<div class=\"step\">'.$form_state['active_stage'].'/'.$form_state['count_stage'].'</div>',\n );\n\n $form['advertiser_details']['name'] = array(\n '#type' => 'textfield',\n '#title' => 'Advertiser Name',\n '#attributes' => array('placeholder' => 'Name'),\n '#required' => TRUE,\n '#default_value' => isset($values['name']) ? $values['name'] : $user->realname,\n );\n\n $form['advertiser_details']['company_name'] = array(\n '#type' => 'textfield',\n '#title' => 'Company Name (if applicable)',\n '#attributes' => array('placeholder' => 'Company Name'),\n '#default_value' => isset($values['company_name']) ? $values['company_name'] : field_get_items('user', $user, 'field_account_address')[0]['organisation_name'],\n );\n\n $form['advertiser_details']['contact_number'] = array(\n '#type' => 'textfield',\n '#title' => 'Contact Number',\n '#attributes' => array('placeholder' => 'Contact Number'),\n '#required' => TRUE,\n '#default_value' => isset($values['contact_number']) ? $values['contact_number'] : field_get_items('user', $user, 'field_account_phone')[0]['number'],\n );\n\n $form['advertiser_details']['email'] = array(\n '#type' => 'textfield',\n '#title' => 'Email Address',\n '#required' => TRUE,\n '#attributes' => array('placeholder' => 'Email Address'),\n '#default_value' => isset($values['email']) ? $values['email'] : $user->mail,\n );\n\n $form['advertiser_details']['billing_address'] = array(\n 'street_address_1' => array(\n '#type' => 'textfield',\n '#title' => 'Billing Address',\n '#attributes' => array('placeholder' => 'Street Address 1'),\n '#required' => TRUE,\n '#default_value' => isset($values['street_address_1']) ? $values['street_address_1'] : field_get_items('user', $user, 'field_account_address')[0]['thoroughfare'],\n ),\n 'street_address_2' => array(\n '#type' => 'textfield',\n '#attributes' => array('placeholder' => 'Street Address 2'),\n '#default_value' => isset($values['street_address_2']) ? $values['street_address_2'] : field_get_items('user', $user, 'field_account_address')[0]['premise'],\n ),\n 'zip' => array(\n '#type' => 'textfield',\n '#attributes' => array('placeholder' => 'Zip Code'),\n '#required' => TRUE,\n '#default_value' => isset($values['zip']) ? $values['zip'] : field_get_items('user', $user, 'field_account_address')[0]['postal_code'],\n ),\n 'country' => array(\n '#type' => 'select',\n '#options' => array('' => 'Country') + country_get_list(),\n '#default_value' => isset($values['country']) ? $values['country'] : field_get_items('user', $user, 'field_account_address')[0]['country'],\n ),\n );\n\n $form['advertiser_details']['relationship'] = array(\n '#type' => 'textfield',\n '#title' => 'Relationship to Deceased',\n '#attributes' => array('placeholder' => 'Your Relantionship'),\n '#required' => TRUE,\n '#default_value' => isset($values['relationship']) ? $values['relationship'] : NULL,\n );\n \n $form['back'] = array(\n '#type' => 'submit',\n '#value' => t('Back')\n );\n \n $form['next'] = array(\n '#type' => 'submit',\n '#value' => t('Next Step')\n );\n \n return $form;\n}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Queries xStandardNumber service using getVariants by OCLC Work ID | public function getVariantsByOwi($number, $options = null) {
return $this->getVariants('owi', $number, $options);
} | [
"public function getVariantsByOclcNum($number, $options = null) {\n return $this->getVariants('oclcnum', $number, $options);\n }",
"function getVariants(){\n $this->checkProcess();\n return $this->data['variants'];\n }",
"public function getProductVariant();",
"function getVariants($product_id) {\n $sql_pa=$GLOBALS['TYPO3_DB']->SELECTquery('vars.variant_id, vars.product_id, vars.variant_price, vars.variant_stock, vars.variant_sku, vars.image1, vars.image2, vars.image3, vars.image4, vars.image5, vattrs.attribute_id, vattrs.option_id, vattrs.option_value_id', // SELECT ...\n 'tx_msvariants_domain_model_variants vars, tx_msvariants_domain_model_variantsattributes vattrs', // FROM ...\n \"vars.product_id='\".$product_id.\"' and vars.variant_id=vattrs.variant_id\", // WHERE. // TODO should we take into consideration the language popt.language_id = 0?\n '', // GROUP BY...\n '', // ORDER BY...\n '' // LIMIT ...\n );\n $qry_pa=$GLOBALS ['TYPO3_DB']->sql_query($sql_pa);\n\n $variants = array();\n while (($row = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc($qry_pa)) != false) {\n $variants[] = array(\n 'variant_id' => $row['variant_id'],\n 'product_id' => $row['product_id'],\n 'variant_price' => $row['variant_price'],\n 'variant_stock' => $row['variant_stock'],\n 'variant_sku' => $row['variant_sku'],\n 'image1' => $row['image1'],\n 'image2' => $row['image2'],\n 'image3' => $row['image3'],\n 'image4' => $row['image4'],\n 'image5' => $row['image5'],\n 'option_id' => $row['option_id'],\n 'option_value_id' => $row['option_value_id'],\n 'option_name' => mslib_fe::getRealNameOptions($row['option_id']),\n 'option_value_name' => mslib_fe::getNameOptions($row['option_value_id'])\n );\n }\n\n return $variants;\n\n }",
"public function getVariantByid($id){\n $this->db->where('id', $id);\n return $this->db->get($this->product_variant);\n }",
"public function callAPISearchProducts563()\n {\n $session = $this->currentSession->testStaffLogin();\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => self::PRODUCT_RESOURCE_PATH.self::SUB_PRODUCT_RESOURCE_PATH.$session,\n 'httpMethod' => RestRequest::HTTP_METHOD_GET,\n ],\n ];\n $results = $this->_webApiCall($serviceInfo);\n //\\Zend_Debug::dump($results);\n return $results;\n }",
"function findVariant($id);",
"public function getVariants();",
"public function gr_variants_ajax_request()\n\t{\n\t\t$response = json_encode(array('error' => 'No variants'));\n\t\tif ( isset($_GET['form_id'])) {\n\t\t\t$variants = $this->grApiInstance->getFormVariants($_GET['form_id']);\n\t\t\tif ( !empty($variants)) {\n\t\t\t\t$response = json_encode(array('success' => $variants));\n\t\t\t}\n\t\t}\n\t\theader(\"Content-Type: application/json\");\n\t\techo $response;\n\t\texit;\n\t}",
"public function getVariants()\n {\n $variants = craft()->market_variant->getAllByProductId($this->id);\n craft()->market_variant->applySales($variants, $this);\n\n if ($this->type->hasVariants){\n $variants = array_filter($variants, function ($v) {\n return !$v->isImplicit;\n });\n }else{\n $variants = array_filter($variants, function ($v) {\n return $v->isImplicit;\n });\n }\n\n return $variants;\n }",
"public function getVariant();",
"public function callAPISearchSwatch()\n {\n $session = $this->currentSession->testStaffLogin();\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => self::PRODUCT_RESOURCE_PATH.self::SUB_PRODUCT_RESOURCE_PATH.$session,\n 'httpMethod' => RestRequest::HTTP_METHOD_GET,\n ],\n ];\n $results = $this->_webApiCall($serviceInfo);\n //\\Zend_Debug::dump($results);\n return $results;\n }",
"public function getVariant(stubSession $session, stubRequest $request);",
"function get_entry_variant($variant_id)\n{\n $request = NF::$capi->get('builder/structures/variant/' . $variant_id);\n return json_decode($request->getBody(), true);\n}",
"public function getVariantByProduct($id){\n $this->db->where('qty >',0 ); \n $this->db->where('id_product', $id);\n return $this->db->get($this->product_variant);\n }",
"function dsf_get_options_stock($products_id, $options_id){\n \n $product_info_query = dsf_db_query(\"select product_options_stock from \" . DS_DB_SHOP . \".products where products_id='\" . (int)$products_id . \"'\");\n $product_info = dsf_db_fetch_array($product_info_query);\n \n \t\t\t\t\t\t$stock_counter =0;\n\t\t\t\t\t\t$product_items = explode(\"\\n\", $product_info['product_options_stock']);\t// make seperate lines\n\t\t\t\t\t\n\t\t\t\t\tforeach($product_items as $pi) {\n\t\t\t\t\t\t$pa = explode(\"~\" , $pi);\t\t// make seperate arrays\n\t\t\t\t\t\t $dosort = asort($pa);\n\t\t\t\t\t\t$pa_back='';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// put it back together.\n\t\t\t\t\t\t\tforeach($pa as $individuals) {\n\t\t\t\t\t\t\t\t\t\t$pa_back .= '~' . $individuals;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$pa_back = trim(str_replace(\"~~\",\"~\",$pa_back));\n\t\t\t\t\t\n\t\t\t\t\t// seperate it into two fields for array\n\t\t\t\t\t\t\t\t$pitems = explode(\"~ZZZStock:\" , $pa_back);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$id=trim($pitems[0]);\n\t\t\t\t\t\t\t\t$text=trim($pitems[1]);\n\t\t\t\t\t\n\t\t\t\t\t\tif ($text) $stock_array[$id] = $text;\n\t\t\t\t\t\t$stock_counter ++;\n\t\t\t\t\t}\n return (int)$stock_array[$options_id];\n \n }",
"public function getIDBSpecimenInfo($va_lookup_values, $vn_limit = 500) {\n\t\t$client = new GuzzleHttp\\Client();\n\t\tif(is_array($va_lookup_values) && sizeof($va_lookup_values)){\n\t\t\t$va_tmp = array();\n\t\t\tforeach($va_lookup_values as $vs_field => $vs_search_term){\n\t\t\t\tif(($vs_field == \"catalognumber\") && $vs_coll_code = trim($va_lookup_values[\"collectioncode\"])){\n\t\t\t\t\t$va_tmp[] = '\"'.$vs_field.'\":[\"'.trim($vs_search_term).'\", \"'.$vs_coll_code.'-'.trim($vs_search_term).'\"]';\n\t\t\t\t}else{\n\t\t\t\t\tif(trim($vs_search_term)){\n\t\t\t\t\t\t$va_tmp[] = '\"'.$vs_field.'\":\"'.trim($vs_search_term).'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(sizeof($va_tmp)){\n\t\t\t\t$vs_search = \"{\".join(\",\", $va_tmp).\"}\";\n\t\t\t}\n\t\t}\n\t\t#$vs_search = '{\"institutioncode\":\"AMNH\",\"genus\": \"Lavia\",\"specificepithet\":\"frons\"}';\n\t\tif($vs_search){\n\t\t\t$vn_specimen_found = 0;\n\t\t\ttry{\n\t\t\t\t$response = $client->get(\"https://search.idigbio.org/v2/search/records/?rq=\".urlencode($vs_search).\"&limit=\".$vn_limit);\n\t\t\t\t$data = $response->json();\n\t\t\t}catch(Exception $e){\n\t\t\t\treturn array(\"success\" => false, \"error\" => \"could not connect to idigbio.org: \".$e->getMessage(), \"retry\" => true);\n\t\t\t}\n\t\t\tif(is_array($data[\"items\"]) && (sizeof($data[\"items\"]) > 0)){\n\t\t\t\treturn array(\"success\" => true, \"error\" => \"\", \"data\" => $data);\n\t\t\t}else{\n\t\t\t\treturn array(\"success\" => false, \"error\" => \"No results found on idigbio.org\");\n\t\t\t}\n\t\t}else{\n\t\t\treturn array(\"success\" => false, \"error\" => \"search not defined\");\n\t\t}\n\t}",
"function fn_get_product_feature_variant($variant_id, $lang_code = CART_LANGUAGE)\n{\n $fields = \"*\";\n $join = db_quote(\"LEFT JOIN ?:product_feature_variant_descriptions ON ?:product_feature_variant_descriptions.variant_id = ?:product_feature_variants.variant_id AND ?:product_feature_variant_descriptions.lang_code = ?s\", $lang_code);\n $condition = db_quote(\"?:product_feature_variants.variant_id = ?i\", $variant_id);\n\n /**\n * Changes SQL parameters before select product feature variant data\n *\n * @param string $fields String of comma-separated SQL fields to be selected in an SQL-query\n * @param string $join String with the complete JOIN information (JOIN type, tables and fields) for an SQL-query\n * @param string $condition String containing SQL-query condition possibly prepended with a logical operator (AND or OR)\n * @param int $variant_id Variant identifier\n * @param string $lang_code 2-letters language code\n */\n fn_set_hook('get_product_feature_variant_before_select', $fields, $join, $condition, $variant_id, $lang_code);\n\n $var = db_get_row(\"SELECT $fields FROM ?:product_feature_variants $join WHERE $condition\");\n\n if (empty($var)) {\n return false;\n }\n\n $var['image_pair'] = fn_get_image_pairs($variant_id, 'feature_variant', 'V', true, true, $lang_code);\n\n if (empty($var['meta_description']) && defined('AUTO_META_DESCRIPTION') && AREA != 'A') {\n $var['meta_description'] = fn_generate_meta_description($var['description']);\n }\n\n /**\n * Changes product feature variant data\n *\n * @param array $var Variant data\n * @param int $feature_id Feature identifier\n * @param string $lang_code 2-letters language code\n */\n fn_set_hook('get_product_feature_variant_post', $var, $variant_id, $lang_code);\n\n return $var;\n}",
"public function getMasterVariant();"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all dream counts on each day of the week for analysis/charts. | public function getDreamCountByDayOfWeek(int $userId = NULL): array
{
$sql = "
SELECT
DAYNAME(dream.dreamt_at) AS 'day_of_week',
COUNT(dream.id) AS 'count'
FROM
dj.dream dream
GROUP BY
DAYNAME(dream.dreamt_at)
ORDER BY
DAYOFWEEK(dream.dreamt_at) ASC
;
";
$dreamCountData = $this->connection->fetchAll($sql);
$dreamCountDataByDay = [];
foreach($dreamCountData as $row)
{
$dreamCountDataByDay[$row['day_of_week']] = $row['count'];
}
return $dreamCountDataByDay;
} | [
"public function getDreamCountByDayOfWeek(): array\n\t{\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tDAYNAME(dream.dreamt_at) AS 'day_of_week',\n\t\t\t\tCOUNT(dream.id) AS 'count'\n\t\t\tFROM\n\t\t\t\tdj.dream dream\n\t\t \tWHERE\n\t\t \t\t{$this->getUserCondition()}\n\t\t\tGROUP BY\n\t\t\t\tDAYNAME(dream.dreamt_at)\n\t\t\tORDER BY\n\t\t\t\tDAYOFWEEK(dream.dreamt_at) ASC\n\t\t\t;\n\t\t\";\n\t\t$dreamCountData = \\Yii::$app->getDb()->createCommand($sql)->queryAll();\n\t\t$dreamCountDataByDay = [];\n\t\tforeach($dreamCountData as $row)\n\t\t{\n\t\t\t$dreamCountDataByDay[$row['day_of_week']] = $row['count'];\n\t\t}\n\t\treturn $dreamCountDataByDay;\n\t}",
"public function getDailyDataCount()\n {\n return $this->count(self::DAILY_DATA);\n }",
"public function days() {\n\t\tforeach ( self::$_days as $day => $day_title ) {\n\t\t\t$day_weather = $this->_weather [$day];\n\t\t\t$condition = $day_weather ['condition'];\n\t\t\t$temp = $day_weather ['temp'];\n\t\t\t$wind = $day_weather ['wind'];\n\t\t\t$pm25 = isset ( $day_weather ['pm25'] ) ? ( int ) $day_weather ['pm25'] : 0;\n\t\t\tempty ( $pm25 ) && $pm25 = '未知';\n\t\t\t$date = $day_weather ['date'];\n\t\t\t$time = $day_weather ['time'];\n\t\t\t$icon = $day_weather ['imgs'] [0];\n\t\t\tif (isset ( $this->_workflow )) {\n\t\t\t\t$this->_workflow->result ( 'weather_' . $day, $day_weather ['link'], \"{$time} {$day_title},{$condition}\", \"气温{$temp},{$wind},PM2.5:{$pm25},{$date}\", 'icon/' . $icon . '.jpg' );\n\t\t\t}\n\t\t}\n\t}",
"private function getWishlistsByDay()\n {\n $this->runTest(\n 'Test 52. Get wishlist products count by day',\n 'SELECT period, SUM(analytic_shop.wishlist_products_count) as wishlist_products_count\n FROM analytic_data analytic,\n analytic_shop analytic_shop\n WHERE period >= \"2012-10-21 00:00\"\n AND period < \"2012-10-22 00:00\"\n AND analytic_shop.analytic_id = analytic.id\n GROUP BY period\n ORDER BY period\n LIMIT 100'\n );\n }",
"public function get_grid_days_counts() {\n\t\t// Fetch the events for each day on the grid, if not done already.\n\t\t$this->get_grid_days();\n\n\t\treturn $this->grid_days_found_cache;\n\t}",
"public function getTotalPostPerWeek(){\n $sql = \"SELECT\n strftime('%W', datetime(post.created, 'unixepoch')) as week,\n count(post.text) as post_count\n FROM\n post \n GROUP BY\n strftime('%W', datetime(post.created, 'unixepoch'))\";\n\n $conn = $this->entityManager->getConnection();\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n\n return\n $stmt->fetchAll();\n }",
"public function getNumberOfDays()\n\t{\n\t\treturn count(self::$week);\n\t}",
"function getFreqPerDay($result)\r\n\t{\r\n\t\t$freq = array(0,0,0,0,0,0,0); // create array to contain frequencies\r\n\t\twhile ($row = mysqli_fetch_array($result))\r\n\t\t{\r\n\t\t\t$day = $row[\"DayOfWeek\"];\r\n\t\t\tswitch($day)\r\n\t\t\t{\r\n\t\t\t\tcase \"Monday\":\r\n\t\t\t\t\t$freq[0] = $freq[0] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"Tuesday\":\r\n\t\t\t\t\t$freq[1] = $freq[1] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"Wednesday\":\r\n\t\t\t\t\t$freq[2] = $freq[2] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"Thursday\":\r\n\t\t\t\t\t$freq[3] = $freq[3] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"Friday\":\r\n\t\t\t\t\t$freq[4] = $freq[4] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"Saturday\":\r\n\t\t\t\t\t$freq[5] = $freq[5] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"Sunday\":\r\n\t\t\t\t\t$freq[6] = $freq[6] + 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\techo \"<b>This should not be possible.</b>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $freq;\r\n\t}",
"public function totalPerWeek() {\n\t\t$posts_per_week = $this->posts_collection->groupBy('week');\n\t\t$total_posts_per_week = [];\n\n\t\tforeach ($posts_per_week as $wk => $week) {\n\t\t\t$total_posts_per_week[$wk] = count($week);\n\t\t}\n\n\t\treturn $total_posts_per_week;\n\n\t}",
"private function getPlayedWeeks(): int\n {\n $dates = PoolDate::cycle()->with([\n 'events' => function (HasMany $q) {\n return $q->with(['venue', 'date', 'team_1', 'team_2']);\n },\n ])->orderBy('date')->get();\n $week = 0;\n foreach ($dates as $date) {\n if (count($date->events) > 0 && $date->events[0]->score1 !== null) {\n $week++;\n }\n }\n\n return $week;\n }",
"public function getNumberOfTweetsPerDay(): array\n {\n return $this->tweetsPerHour;\n }",
"public function getDaysOfWeeks()\n {\n return $this->daysOfWeeks;\n }",
"public function getAllThisWeek()\n {\n $now = Carbon::today();\n $today = $now->toDateString();\n $last_sun = new Carbon('last sunday');\n $last_sunday = $last_sun->toDateString();\n\n return $this->merchant->whereBetween('date_created', array($last_sunday, $today))->count();\n }",
"public function weeklySummary(Request $request)\n {\n //get fc to validate dates\n $fc = new ForecastingController();\n\n //if date check fails run dates for this week only\n if (!$fc->checkIsAValidDate($request->date)) {\n $startDate = Carbon::now()->startOfWeek();\n $endDate = Carbon::now()->endOfWeek();\n } else {\n //valid passed date generate those dates\n $startDate = Carbon::parse($request->date)->startOfWeek();\n $endDate = Carbon::parse($request->date)->endOfWeek();\n }\n $title = \"Weekly Stock on Hand\";\n\n //get stock on hand infrmation\n $counts = StockOnHand::where(\"store_id\", $this->store->id)\n ->whereBetween('created_at', [$startDate->format('Y-m-d'), $endDate->format('Y-m-d')])\n ->orderby('created_at', 'asc')\n ->get();\n\n $countMap = [];\n $productMap = [];\n\n //remap count data, gather products\n foreach ($counts as $count) {\n $products = $count->products()->with(\"units\")->get();\n\n foreach ($products as $product) {\n\n //map daily entry to value in total\n if (!isset($counter[$product->id][$count->created_at->format('D')])) {\n $countMap[$product->id][$count->created_at->format('D')] = 0;\n }\n\n $countMap[$product->id][$count->created_at->format('D')] += ($product->pivot->count / $product->units->quantity);\n\n $productMap[$product->id] = $product;\n }\n\n //var_dump($countMap);\n }\n\n\n //dd($counts);\n $days = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n $chartData1 = $this->chartData($countMap, $productMap, $days);\n\n return view(\"soh.weekly\", [\n \"title\" => $title,\n \"startDate\" => $startDate,\n \"endDate\" => $endDate,\n \"counts\" => $counts,\n \"countMap\" => $countMap,\n \"productMap\" => $productMap,\n \"days\" => $days,\n \"chartData1\" => $chartData1\n ]);\n }",
"public function getDaysOfWeek() {\n\t\t$timestamp = strtotime( 'next Sunday' );\n\t\t$days = array();\n\t\tfor ( $i = 0; $i < 7; $i ++ ) {\n\t\t\t$days[] = strftime( '%A', $timestamp );\n\t\t\t$timestamp = strtotime( '+1 day', $timestamp );\n\t\t}\n\n\t\treturn apply_filters( 'wd_scan_get_days_of_week', $days );\n\t}",
"public function getFoodStats() {\n $return = array();\n $foods = $this->createEntity('Mad')->findAll();\n foreach ($foods as $food) {\n $return[$food->kategori] = array('total' => 0);\n foreach ($food->getMadtider() as $madtid) {\n $return[$food->kategori][$madtid->dato]['total'] = 0;\n $return[$food->kategori][$madtid->dato]['udleveret'] = 0;\n $return[$food->kategori]['total'] += 0;\n\n $query = \"SELECT received, COUNT(*) FROM deltagere_madtider WHERE madtid_id = ? GROUP BY received ORDER BY received\";\n foreach ($res = $this->db->query($query, array($madtid->id)) as $part) {\n if ($part[0] == '1') {\n $return[$food->kategori][$madtid->dato]['total'] += $part[1];\n $return[$food->kategori][$madtid->dato]['udleveret'] = $part[1];\n $return[$food->kategori]['total'] += $part[1];\n } else {\n $return[$food->kategori][$madtid->dato]['total'] += $part[1];\n $return[$food->kategori]['total'] += $part[1];\n }\n }\n }\n }\n $entry = $this->createEntity('Indgang')->findByType('banquet');\n if ($entry) {\n $return[\"Jubilæumsfest\"][$entry->start]['total'] = $entry->getParticipantCount();\n $return[\"Jubilæumsfest\"]['total'] = $return[\"Jubilæumsfest\"][$entry->start]['total'];\n }\n return $return;\n }",
"function jpen_get_daily_posts_count( $date ) {\n $posts = jpen_get_daily_posts( $date );\n\n return sizeof( $posts );\n}",
"public function getCommentCountOverSevenDays()\n {\n $counts = [];\n\n foreach($this->getDatesForLastSevenDays() as $day)\n {\n $counts[] = $this->getCommentCountBetweenDates( $day['start_datetime'], $day['end_datetime']);\n }\n\n return json_encode($counts);\n }",
"public function countPostsByDay()\n\t{\n\t\t$stmt = $this->pdo->prepare(\"SELECT count(id) FROM posts WHERE created_at >= now() - INTERVAL 1 DAY\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchColumn();\n\t}"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists all ChefDEnquete entities. | public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('projetBundle:ChefDEnquete')->findAll();
return $this->render('projetBundle:ChefDEnquete:index.html.twig', array(
'entities' => $entities,
));
} | [
"public function indexAction() {\n $em = $this->getDoctrine()->getEntityManager();\n $entities = $em->getRepository('EphpGestoriBundle:Gestore')->findAll();\n\n return array('entities' => $entities);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('RecipesBundle:Cuisine')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $chefs = $em->getRepository('AppBundle:Chef')->findAll();\n\n return $this->render('chef/index.html.twig', array(\n 'chefs' => $chefs,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('FuncionarioBundle:Fornecedor')->findAll();\n\n return array(\n 'entities' => $entities\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('Area4ContableBundle:Egreso')->findAll();\n\n return array('entities' => $entities);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('NTEAntiquitasBundle:AntiquitasFiches')->findAll();\n\n return array(\n 'titre' => 'Fiches',\n 'entities' => $entities,\n );\n }",
"public function getAllEntries()\n {\n return $this->createEntity('Indgang')->findAll();\n }",
"public function allAction()\n {\n $ventes = $this->get('oc_fidelite.vente_manager')->readAll();\n\n return $this->render('OCFideliteBundle:Vente:all_vte.html.twig', array(\n 'ventes' => $ventes,\n ));\n }",
"public function listeEpciAction(){\n $this->denyAccessUnlessGranted('ROLE_ADMIN', 'Vous n\\'avez pas accès à cette page' );\n $em = $this->getDoctrine()->getManager();\n\n $listeEpci = $em->getRepository('LSIMarketBundle:Epci')->findAllEpci();\n //dump($listeEpci);\n\n return $this->render('@LSIMarket/admin/gestion_epci/liste_epci.html.twig', array('listeepci' => $listeEpci));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GarnetTaxiBeBundle:Ligne')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('LvSaladeBundle:Famille')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('BrasserieBundle:Levure')->findBy([], ['nom' => 'ASC']);\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }",
"public function indexAction()\n {\n if(!$this->isAdmin()){\n return $this->redirect($this->generateUrl('accueil'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('YnovLabsBundle:Ecole')->findAll();\n\n return $this->render('YnovLabsBundle:Ecole:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Entreprise')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n $entities = $this->getRepository('CpmJovenesBundle:Eje')->findAll();\n return array('entities' => $entities);\n }",
"public function indexAction()\n {\n $entities = $this->get('FabricationManager')->getAllEntity();\n return array('entities' => $entities);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('TechTBundle:Tbdettecnico')->findAll();\n\n return $this->render('TechTBundle:Tbdettecnico:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('EvidenciaBundle:Evidencia')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $froFacTramites = $em->getRepository('JHWEBFinancieroBundle:FroFacTramite')->findAll();\n\n return $this->render('frofactramite/index.html.twig', array(\n 'froFacTramites' => $froFacTramites,\n ));\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allow the removal of any mutexes requested by the API. | protected function runForgetMutexChecks()
{
if ($this->cache->has('eyewitness_scheduler_forget_mutex')) {
foreach(json_decode($this->cache->pull('eyewitness_scheduler_forget_mutex'), true) as $mutex) {
if (! $event = $this->findEventMutex($mutex)) {
continue;
}
$event->forgetMutex();
}
}
} | [
"protected function removeMutex()\n {\n if ($this->description) {\n parent::removeMutex();\n }\n }",
"protected function removeMutex()\n {\n if ($this->description) {\n @unlink($this->mutexPath());\n }\n }",
"final public static function destroy($mutex) {}",
"public function unblockAccess();",
"function membersRemoveMultipleFromGroups($params = array()){\n\t\t\treturn $this->put(\"/members/groups/remove\", $params);\n\t\t}",
"public function clearPermissionGroups() {\r\n // TODO: implement\r\n }",
"public function removeLock($uri);",
"function wp_ajax_wp_remove_post_lock() {}",
"private function unlockConcurrentExecution()\n\t{\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($this->getLockTag());\n\t}",
"public function del() {\n sem_acquire($this->__mutex); //block until released\n @shm_remove_var($this->__shm, $this->__key);\n sem_release($this->__mutex); //release mutex\n }",
"function taskbook_remove_capabilities()\n{\n $manager_roles = array('administrator', 'editor');\n\n foreach ($manager_roles as $the_role) {\n $role = get_role($the_role);\n $role->remove_cap('read');\n $role->remove_cap('edit_tasks');\n $role->remove_cap('publish_tasks');\n $role->remove_cap('edit_published_tasks');\n $role->remove_cap('read_private_tasks');\n $role->remove_cap('edit_others_tasks');\n $role->remove_cap('edit_private_tasks');\n $role->remove_cap('delete_tasks');\n $role->remove_cap('delete_published_tasks');\n $role->remove_cap('delete_private_tasks');\n $role->remove_cap('delete_others_tasks');\n }\n}",
"public function mass_remove()\n {\n $SQL = [];\n foreach ($_POST['remove'] as $GroupID => $K) {\n if (is_number($GroupID)) {\n $SQL[] = sprintf('%d', $GroupID);\n }\n }\n\n if (!empty($SQL)) {\n $SQL = sprintf(\n '\n\t\t\t\t\tDELETE FROM %s\n\t\t\t\t\tWHERE UserID = %d\n\t\t\t\t\t\tAND GroupID IN (%s)',\n $this->Table,\n G::$LoggedUser['ID'],\n implode(', ', $SQL)\n );\n $this->query_and_clear_cache($SQL);\n }\n }",
"public function removeRetainsObjectForObjectsNotInCurrentSession() : void {}",
"function wp_ajax_wp_remove_post_lock()\n {\n }",
"public function unauthorizedUsersMayNotDeleteThreads()\n {\n $this->withExceptionHandling();\n\n $thread = create(Thread::class);\n\n $this->delete($thread->path())\n ->assertRedirect(route('login'));\n\n $this->signIn();\n\n $this->delete($thread->path())\n ->assertStatus(403);\n }",
"function remove() {\n\t\t\t$response = $this->API->call(\"threads/remove.json\",array(\"thread\" => $this->ID),\"POST\");\n\t\t\tif ($response !== false) {\n\t\t\t\t$this->_cacheBust();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function removeStaleAuthLockoutTokens() {\n\t\tif ($this->director->isInstalled()) {\n\t\t\t$this->removeStaleTokens(static::TOKEN_PREFIX_LOCKOUT.'%', '1 HOUR');\n\t\t}\n\t}",
"protected function removeOldUserLocks(){\n\n\t\t$locks = $this->getLocksForUUID();\n\n\t\tif($locks->isEmpty()){\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * check if the item is in the cart\n\t\t */\n\n\t\tforeach($locks as $lock){\n\n\t\t\tif(!isset($this->tickets[$lock->ticket_id])){\n\t\t\t\t$this->locksRemoved[] = $lock;\n\t\t\t\t$lock->delete();\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$foundLockInCart = false;\n\n\t\t\tforeach($this->tickets AS $ticket_id => $data){\n\n\t\t\t\tif(!isset($data[\"formdata\"]) || !isset($data[\"formdata\"][\"id\"])){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$item_uid = $data[\"formdata\"][\"id\"];\n\n\t\t\t\tif($ticket_id == $lock->ticket_id && $item_uid == $lock->item_uid){\n\t\t\t\t\t$foundLockInCart = true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tif(!$foundLockInCart){\n\t\t\t\t$this->locksRemoved[] = $lock;\n\t\t\t\t$lock->delete();\n\t\t\t}\n\t\t}\n\t}",
"public function remove_caps(){\n\n $member_blogger = get_role( 'member_blogger' );\n $member_blogger->remove_cap( 'create_entry' );\n $member_blogger->remove_cap( 'read_entry' );\n $member_blogger->remove_cap( 'update_entry' );\n $member_blogger->remove_cap( 'delete_entry' );\n\n }"
] | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.